This is an automated email from the ASF dual-hosted git repository.
jackietien pushed a commit to branch ty/removejoldep
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/ty/removejoldep by this push:
new 6efde7f2696 remove jol
6efde7f2696 is described below
commit 6efde7f269660d785a962c38139f6a0f18bd59bd
Author: JackieTien97 <[email protected]>
AuthorDate: Fri Mar 1 20:10:35 2024 +0800
remove jol
---
iotdb-core/datanode/pom.xml | 4 ----
.../execution/fragment/FragmentInstanceExecution.java | 15 ++-------------
.../execution/fragment/FragmentInstanceManager.java | 10 ----------
.../execution/fragment/FragmentInstanceExecutionTest.java | 3 ---
pom.xml | 11 -----------
5 files changed, 2 insertions(+), 41 deletions(-)
diff --git a/iotdb-core/datanode/pom.xml b/iotdb-core/datanode/pom.xml
index d2ae8f7b21a..5ee73ad4b6d 100644
--- a/iotdb-core/datanode/pom.xml
+++ b/iotdb-core/datanode/pom.xml
@@ -131,10 +131,6 @@
<groupId>io.airlift</groupId>
<artifactId>units</artifactId>
</dependency>
- <dependency>
- <groupId>io.airlift</groupId>
- <artifactId>stats</artifactId>
- </dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment/FragmentInstanceExecution.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment/FragmentInstanceExecution.java
index 890d1098353..eb359d2154a 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment/FragmentInstanceExecution.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment/FragmentInstanceExecution.java
@@ -30,16 +30,12 @@ import
org.apache.iotdb.db.queryengine.execution.exchange.sink.ISink;
import org.apache.iotdb.db.queryengine.execution.schedule.IDriverScheduler;
import org.apache.iotdb.db.utils.SetThreadName;
-import io.airlift.stats.CounterStat;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.util.List;
-import static java.util.Objects.requireNonNull;
-import static
org.apache.iotdb.db.queryengine.execution.fragment.FragmentInstanceState.FAILED;
-
public class FragmentInstanceExecution {
private static final Logger LOGGER =
LoggerFactory.getLogger(FragmentInstanceExecution.class);
@@ -66,14 +62,13 @@ public class FragmentInstanceExecution {
List<IDriver> drivers,
ISink sinkHandle,
FragmentInstanceStateMachine stateMachine,
- CounterStat failedInstances,
long timeOut,
MPPDataExchangeManager exchangeManager)
throws CpuNotEnoughException, MemoryNotEnoughException {
FragmentInstanceExecution execution =
new FragmentInstanceExecution(
instanceId, context, drivers, sinkHandle, stateMachine, timeOut,
exchangeManager);
- execution.initialize(failedInstances, scheduler);
+ execution.initialize(scheduler);
scheduler.submitDrivers(instanceId.getQueryId(), drivers, timeOut,
context.getSessionInfo());
return execution;
}
@@ -121,8 +116,7 @@ public class FragmentInstanceExecution {
// this is a separate method to ensure that the `this` reference is not
leaked during construction
@SuppressWarnings("squid:S1181")
- private void initialize(CounterStat failedInstances, IDriverScheduler
scheduler) {
- requireNonNull(failedInstances, "failedInstances is null");
+ private void initialize(IDriverScheduler scheduler) {
stateMachine.addStateChangeListener(
newState -> {
try (SetThreadName threadName = new
SetThreadName(instanceId.getFullId())) {
@@ -134,11 +128,6 @@ public class FragmentInstanceExecution {
LOGGER.debug("Enter the stateChangeListener");
}
- // Update failed tasks counter
- if (newState == FAILED) {
- failedInstances.update(1);
- }
-
clearShuffleSinkHandle(newState);
// delete tmp file if exists
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment/FragmentInstanceManager.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment/FragmentInstanceManager.java
index f17d6d3926d..4f26f1d100f 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment/FragmentInstanceManager.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment/FragmentInstanceManager.java
@@ -40,7 +40,6 @@ import
org.apache.iotdb.db.schemaengine.schemaregion.ISchemaRegion;
import org.apache.iotdb.db.storageengine.dataregion.IDataRegionForQuery;
import org.apache.iotdb.db.utils.SetThreadName;
-import io.airlift.stats.CounterStat;
import io.airlift.units.Duration;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -76,9 +75,6 @@ public class FragmentInstanceManager {
private final Duration infoCacheTime;
- // record failed instances count
- private final CounterStat failedInstances = new CounterStat();
-
private final ExecutorService intoOperationExecutor;
private final MPPDataExchangeManager exchangeManager =
@@ -176,7 +172,6 @@ public class FragmentInstanceManager {
drivers,
sink,
stateMachine,
- failedInstances,
instance.getTimeOut(),
exchangeManager);
} catch (Throwable t) {
@@ -248,7 +243,6 @@ public class FragmentInstanceManager {
drivers,
sink,
stateMachine,
- failedInstances,
instance.getTimeOut(),
exchangeManager);
} catch (Throwable t) {
@@ -316,10 +310,6 @@ public class FragmentInstanceManager {
return context.getInstanceInfo();
}
- public CounterStat getFailedInstances() {
- return failedInstances;
- }
-
private FragmentInstanceInfo createFailedInstanceInfo(FragmentInstanceId
instanceId) {
FragmentInstanceContext context = instanceContext.get(instanceId);
return new FragmentInstanceInfo(
diff --git
a/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/execution/fragment/FragmentInstanceExecutionTest.java
b/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/execution/fragment/FragmentInstanceExecutionTest.java
index d54a1fc851c..0998105c587 100644
---
a/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/execution/fragment/FragmentInstanceExecutionTest.java
+++
b/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/execution/fragment/FragmentInstanceExecutionTest.java
@@ -30,7 +30,6 @@ import
org.apache.iotdb.db.queryengine.execution.exchange.sink.ISink;
import org.apache.iotdb.db.queryengine.execution.schedule.IDriverScheduler;
import org.apache.iotdb.db.storageengine.dataregion.DataRegion;
-import io.airlift.stats.CounterStat;
import org.junit.Test;
import org.mockito.Mockito;
@@ -64,7 +63,6 @@ public class FragmentInstanceExecutionTest {
fragmentInstanceContext.setDataRegion(dataRegion);
List<IDriver> drivers = Collections.emptyList();
ISink sinkHandle = Mockito.mock(ISink.class);
- CounterStat failedInstances = new CounterStat();
long timeOut = -1;
MPPDataExchangeManager exchangeManager =
Mockito.mock(MPPDataExchangeManager.class);
FragmentInstanceExecution execution =
@@ -75,7 +73,6 @@ public class FragmentInstanceExecutionTest {
drivers,
sinkHandle,
stateMachine,
- failedInstances,
timeOut,
exchangeManager);
assertEquals(FragmentInstanceState.RUNNING,
execution.getInstanceState());
diff --git a/pom.xml b/pom.xml
index 3d721a8c1b5..93fcd69eb3b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -842,17 +842,6 @@
<artifactId>units</artifactId>
<version>${airlift-units.version}</version>
</dependency>
- <dependency>
- <groupId>io.airlift</groupId>
- <artifactId>stats</artifactId>
- <version>${airlift.version}</version>
- <exclusions>
- <exclusion>
- <groupId>javax.annotation</groupId>
- <artifactId>javax.annotation-api</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-api</artifactId>