You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by yo...@apache.org on 2023/01/12 15:36:20 UTC
[iotdb] branch Move-ConfigNodeConfig-into-CommonConfig updated: stash
This is an automated email from the ASF dual-hosted git repository.
yongzao pushed a commit to branch Move-ConfigNodeConfig-into-CommonConfig
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/Move-ConfigNodeConfig-into-CommonConfig by this push:
new d902d5ca3a stash
d902d5ca3a is described below
commit d902d5ca3a98c116c5cd374fb2553d8ea469e930
Author: YongzaoDan <53...@qq.com>
AuthorDate: Thu Jan 12 23:36:10 2023 +0800
stash
---
.../schemaRegion/SchemaRegionManagementTest.java | 19 ++++++++++++-------
.../mpp/execution/schedule/DriverSchedulerTest.java | 3 +--
.../db/mpp/plan/analyze/FakePartitionFetcherImpl.java | 15 +++++++--------
.../db/mpp/plan/analyze/cache/PartitionCacheTest.java | 2 --
.../db/mpp/plan/plan/FragmentInstanceSerdeTest.java | 2 --
.../iotdb/db/mpp/plan/plan/distribution/Util.java | 1 -
.../plan/plan/node/write/WritePlanNodeSplitTest.java | 1 -
.../db/wal/allocation/FirstCreateStrategyTest.java | 2 --
8 files changed, 20 insertions(+), 25 deletions(-)
diff --git a/server/src/test/java/org/apache/iotdb/db/metadata/schemaRegion/SchemaRegionManagementTest.java b/server/src/test/java/org/apache/iotdb/db/metadata/schemaRegion/SchemaRegionManagementTest.java
index 89ea99f0a5..8f4c43a854 100644
--- a/server/src/test/java/org/apache/iotdb/db/metadata/schemaRegion/SchemaRegionManagementTest.java
+++ b/server/src/test/java/org/apache/iotdb/db/metadata/schemaRegion/SchemaRegionManagementTest.java
@@ -25,7 +25,6 @@ import org.apache.iotdb.commons.consensus.ConsensusProtocolClass;
import org.apache.iotdb.commons.exception.IllegalPathException;
import org.apache.iotdb.commons.file.SystemFileFactory;
import org.apache.iotdb.commons.path.PartialPath;
-import org.apache.iotdb.consensus.ConsensusFactory;
import org.apache.iotdb.db.conf.IoTDBConfig;
import org.apache.iotdb.db.conf.IoTDBDescriptor;
import org.apache.iotdb.db.metadata.MetadataConstant;
@@ -61,7 +60,8 @@ public class SchemaRegionManagementTest extends AbstractSchemaRegionTest {
@Test
public void testRatisModeSnapshot() throws Exception {
- String schemaRegionConsensusProtocolClass = COMMON_CONFIG.getSchemaRegionConsensusProtocolClass().getProtocol();
+ String schemaRegionConsensusProtocolClass =
+ COMMON_CONFIG.getSchemaRegionConsensusProtocolClass().getProtocol();
COMMON_CONFIG.setSchemaRegionConsensusProtocolClass(ConsensusProtocolClass.RATIS_CONSENSUS);
try {
ISchemaRegion schemaRegion = getSchemaRegion("root.sg", 0);
@@ -143,7 +143,8 @@ public class SchemaRegionManagementTest extends AbstractSchemaRegionTest {
new PartialPath("root.sg.d2.s1").getFullPath(), result.get(1).getFullPath());
} finally {
- COMMON_CONFIG.setSchemaRegionConsensusProtocolClass(ConsensusProtocolClass.parse(schemaRegionConsensusProtocolClass));
+ COMMON_CONFIG.setSchemaRegionConsensusProtocolClass(
+ ConsensusProtocolClass.parse(schemaRegionConsensusProtocolClass));
}
}
@@ -161,7 +162,8 @@ public class SchemaRegionManagementTest extends AbstractSchemaRegionTest {
@Test
public void testEmptySnapshot() throws Exception {
- String schemaRegionConsensusProtocolClass = COMMON_CONFIG.getSchemaRegionConsensusProtocolClass().getProtocol();
+ String schemaRegionConsensusProtocolClass =
+ COMMON_CONFIG.getSchemaRegionConsensusProtocolClass().getProtocol();
COMMON_CONFIG.setSchemaRegionConsensusProtocolClass(ConsensusProtocolClass.RATIS_CONSENSUS);
try {
ISchemaRegion schemaRegion = getSchemaRegion("root.sg", 0);
@@ -200,14 +202,16 @@ public class SchemaRegionManagementTest extends AbstractSchemaRegionTest {
Assert.assertEquals(0, result.size());
} finally {
- COMMON_CONFIG.setSchemaRegionConsensusProtocolClass(ConsensusProtocolClass.parse(schemaRegionConsensusProtocolClass));
+ COMMON_CONFIG.setSchemaRegionConsensusProtocolClass(
+ ConsensusProtocolClass.parse(schemaRegionConsensusProtocolClass));
}
}
@Test
@Ignore
public void testSnapshotPerformance() throws Exception {
- String schemaRegionConsensusProtocolClass = COMMON_CONFIG.getSchemaRegionConsensusProtocolClass().getProtocol();
+ String schemaRegionConsensusProtocolClass =
+ COMMON_CONFIG.getSchemaRegionConsensusProtocolClass().getProtocol();
COMMON_CONFIG.setSchemaRegionConsensusProtocolClass(ConsensusProtocolClass.RATIS_CONSENSUS);
try {
ISchemaRegion schemaRegion = getSchemaRegion("root.sg", 0);
@@ -240,7 +244,8 @@ public class SchemaRegionManagementTest extends AbstractSchemaRegionTest {
schemaRegion.loadSnapshot(snapshotDir);
} finally {
- COMMON_CONFIG.setSchemaRegionConsensusProtocolClass(ConsensusProtocolClass.parse(schemaRegionConsensusProtocolClass));
+ COMMON_CONFIG.setSchemaRegionConsensusProtocolClass(
+ ConsensusProtocolClass.parse(schemaRegionConsensusProtocolClass));
}
}
}
diff --git a/server/src/test/java/org/apache/iotdb/db/mpp/execution/schedule/DriverSchedulerTest.java b/server/src/test/java/org/apache/iotdb/db/mpp/execution/schedule/DriverSchedulerTest.java
index cbdf040b89..f48d87a633 100644
--- a/server/src/test/java/org/apache/iotdb/db/mpp/execution/schedule/DriverSchedulerTest.java
+++ b/server/src/test/java/org/apache/iotdb/db/mpp/execution/schedule/DriverSchedulerTest.java
@@ -19,7 +19,6 @@
package org.apache.iotdb.db.mpp.execution.schedule;
import org.apache.iotdb.commons.conf.CommonDescriptor;
-import org.apache.iotdb.db.conf.IoTDBDescriptor;
import org.apache.iotdb.db.mpp.common.FragmentInstanceId;
import org.apache.iotdb.db.mpp.common.PlanFragmentId;
import org.apache.iotdb.db.mpp.common.QueryId;
@@ -42,7 +41,7 @@ public class DriverSchedulerTest {
private final DriverScheduler manager = DriverScheduler.getInstance();
private static final long QUERY_TIMEOUT_MS =
- CommonDescriptor.getInstance().getConf().getQueryTimeoutThreshold();
+ CommonDescriptor.getInstance().getConf().getQueryTimeoutThreshold();
@After
public void tearDown() {
diff --git a/server/src/test/java/org/apache/iotdb/db/mpp/plan/analyze/FakePartitionFetcherImpl.java b/server/src/test/java/org/apache/iotdb/db/mpp/plan/analyze/FakePartitionFetcherImpl.java
index 209b9e4bf2..958c30b293 100644
--- a/server/src/test/java/org/apache/iotdb/db/mpp/plan/analyze/FakePartitionFetcherImpl.java
+++ b/server/src/test/java/org/apache/iotdb/db/mpp/plan/analyze/FakePartitionFetcherImpl.java
@@ -33,7 +33,6 @@ import org.apache.iotdb.commons.partition.SchemaNodeManagementPartition;
import org.apache.iotdb.commons.partition.SchemaPartition;
import org.apache.iotdb.commons.partition.executor.SeriesPartitionExecutor;
import org.apache.iotdb.commons.path.PathPatternTree;
-import org.apache.iotdb.db.conf.IoTDBDescriptor;
import org.apache.iotdb.mpp.rpc.thrift.TRegionRouteReq;
import java.util.ArrayList;
@@ -48,7 +47,7 @@ public class FakePartitionFetcherImpl implements IPartitionFetcher {
CommonDescriptor.getInstance().getConf().getSeriesPartitionExecutorClass();
private final int seriesPartitionSlotNum =
- CommonDescriptor.getInstance().getConf().getSeriesSlotNum();
+ CommonDescriptor.getInstance().getConf().getSeriesSlotNum();
private final SeriesPartitionExecutor partitionExecutor =
SeriesPartitionExecutor.getSeriesPartitionExecutor(
@@ -62,8 +61,8 @@ public class FakePartitionFetcherImpl implements IPartitionFetcher {
SchemaPartition schemaPartition =
new SchemaPartition(
- CommonDescriptor.getInstance().getConf().getSeriesPartitionExecutorClass(),
- CommonDescriptor.getInstance().getConf().getSeriesSlotNum());
+ CommonDescriptor.getInstance().getConf().getSeriesPartitionExecutorClass(),
+ CommonDescriptor.getInstance().getConf().getSeriesSlotNum());
Map<String, Map<TSeriesPartitionSlot, TRegionReplicaSet>> schemaPartitionMap = new HashMap<>();
Map<TSeriesPartitionSlot, TRegionReplicaSet> regionMap = new HashMap<>();
@@ -130,8 +129,8 @@ public class FakePartitionFetcherImpl implements IPartitionFetcher {
DataPartition dataPartition =
new DataPartition(
- CommonDescriptor.getInstance().getConf().getSeriesPartitionExecutorClass(),
- CommonDescriptor.getInstance().getConf().getSeriesSlotNum());
+ CommonDescriptor.getInstance().getConf().getSeriesPartitionExecutorClass(),
+ CommonDescriptor.getInstance().getConf().getSeriesSlotNum());
Map<String, Map<TSeriesPartitionSlot, Map<TTimePartitionSlot, List<TRegionReplicaSet>>>>
dataPartitionMap = new HashMap<>();
Map<TSeriesPartitionSlot, Map<TTimePartitionSlot, List<TRegionReplicaSet>>> sgPartitionMap =
@@ -229,8 +228,8 @@ public class FakePartitionFetcherImpl implements IPartitionFetcher {
// only test root.sg
DataPartition dataPartition =
new DataPartition(
- CommonDescriptor.getInstance().getConf().getSeriesPartitionExecutorClass(),
- CommonDescriptor.getInstance().getConf().getSeriesSlotNum());
+ CommonDescriptor.getInstance().getConf().getSeriesPartitionExecutorClass(),
+ CommonDescriptor.getInstance().getConf().getSeriesSlotNum());
Map<String, Map<TSeriesPartitionSlot, Map<TTimePartitionSlot, List<TRegionReplicaSet>>>>
dataPartitionMap = new HashMap<>();
diff --git a/server/src/test/java/org/apache/iotdb/db/mpp/plan/analyze/cache/PartitionCacheTest.java b/server/src/test/java/org/apache/iotdb/db/mpp/plan/analyze/cache/PartitionCacheTest.java
index f2d94e4eb3..06ee67b31d 100644
--- a/server/src/test/java/org/apache/iotdb/db/mpp/plan/analyze/cache/PartitionCacheTest.java
+++ b/server/src/test/java/org/apache/iotdb/db/mpp/plan/analyze/cache/PartitionCacheTest.java
@@ -31,8 +31,6 @@ import org.apache.iotdb.commons.partition.DataPartition;
import org.apache.iotdb.commons.partition.DataPartitionQueryParam;
import org.apache.iotdb.commons.partition.SchemaPartition;
import org.apache.iotdb.commons.partition.executor.SeriesPartitionExecutor;
-import org.apache.iotdb.db.conf.IoTDBConfig;
-import org.apache.iotdb.db.conf.IoTDBDescriptor;
import org.junit.After;
import org.junit.Before;
diff --git a/server/src/test/java/org/apache/iotdb/db/mpp/plan/plan/FragmentInstanceSerdeTest.java b/server/src/test/java/org/apache/iotdb/db/mpp/plan/plan/FragmentInstanceSerdeTest.java
index ec976b613d..0d9ac11ea6 100644
--- a/server/src/test/java/org/apache/iotdb/db/mpp/plan/plan/FragmentInstanceSerdeTest.java
+++ b/server/src/test/java/org/apache/iotdb/db/mpp/plan/plan/FragmentInstanceSerdeTest.java
@@ -29,8 +29,6 @@ import org.apache.iotdb.commons.exception.IllegalPathException;
import org.apache.iotdb.commons.partition.QueryExecutor;
import org.apache.iotdb.commons.partition.StorageExecutor;
import org.apache.iotdb.commons.path.MeasurementPath;
-import org.apache.iotdb.db.conf.IoTDBConfig;
-import org.apache.iotdb.db.conf.IoTDBDescriptor;
import org.apache.iotdb.db.mpp.common.PlanFragmentId;
import org.apache.iotdb.db.mpp.common.SessionInfo;
import org.apache.iotdb.db.mpp.plan.analyze.QueryType;
diff --git a/server/src/test/java/org/apache/iotdb/db/mpp/plan/plan/distribution/Util.java b/server/src/test/java/org/apache/iotdb/db/mpp/plan/plan/distribution/Util.java
index d283fac011..0231d0faaa 100644
--- a/server/src/test/java/org/apache/iotdb/db/mpp/plan/plan/distribution/Util.java
+++ b/server/src/test/java/org/apache/iotdb/db/mpp/plan/plan/distribution/Util.java
@@ -35,7 +35,6 @@ import org.apache.iotdb.commons.partition.SchemaPartition;
import org.apache.iotdb.commons.partition.executor.SeriesPartitionExecutor;
import org.apache.iotdb.commons.path.PartialPath;
import org.apache.iotdb.commons.path.PathPatternTree;
-import org.apache.iotdb.db.conf.IoTDBDescriptor;
import org.apache.iotdb.db.metadata.template.Template;
import org.apache.iotdb.db.mpp.common.MPPQueryContext;
import org.apache.iotdb.db.mpp.common.schematree.ClusterSchemaTree;
diff --git a/server/src/test/java/org/apache/iotdb/db/mpp/plan/plan/node/write/WritePlanNodeSplitTest.java b/server/src/test/java/org/apache/iotdb/db/mpp/plan/plan/node/write/WritePlanNodeSplitTest.java
index 5b0bd0c69c..6825dc35d3 100644
--- a/server/src/test/java/org/apache/iotdb/db/mpp/plan/plan/node/write/WritePlanNodeSplitTest.java
+++ b/server/src/test/java/org/apache/iotdb/db/mpp/plan/plan/node/write/WritePlanNodeSplitTest.java
@@ -19,7 +19,6 @@
package org.apache.iotdb.db.mpp.plan.plan.node.write;
-import org.aopalliance.reflect.Code;
import org.apache.iotdb.common.rpc.thrift.TConsensusGroupId;
import org.apache.iotdb.common.rpc.thrift.TConsensusGroupType;
import org.apache.iotdb.common.rpc.thrift.TRegionReplicaSet;
diff --git a/server/src/test/java/org/apache/iotdb/db/wal/allocation/FirstCreateStrategyTest.java b/server/src/test/java/org/apache/iotdb/db/wal/allocation/FirstCreateStrategyTest.java
index ccb4730f14..4084abfe72 100644
--- a/server/src/test/java/org/apache/iotdb/db/wal/allocation/FirstCreateStrategyTest.java
+++ b/server/src/test/java/org/apache/iotdb/db/wal/allocation/FirstCreateStrategyTest.java
@@ -18,8 +18,6 @@
*/
package org.apache.iotdb.db.wal.allocation;
-import org.apache.iotdb.commons.conf.CommonConfig;
-import org.apache.iotdb.commons.conf.CommonDescriptor;
import org.apache.iotdb.commons.exception.IllegalPathException;
import org.apache.iotdb.commons.path.PartialPath;
import org.apache.iotdb.db.conf.IoTDBConfig;