You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ta...@apache.org on 2022/04/14 09:53:35 UTC

[iotdb] branch metric_dependency_resolve updated (5bea3e8feb -> 1ebb0ef8b5)

This is an automated email from the ASF dual-hosted git repository.

tanxinyu pushed a change to branch metric_dependency_resolve
in repository https://gitbox.apache.org/repos/asf/iotdb.git


 discard 5bea3e8feb debug (#5538)
    omit 890373c51a fix dependency
    omit b9a8581a84 init
     add 51b10a2679 [IOTDB-2910] Fix Count aggregate is not right after delete sg bug (#5511)
     add 40585a34d4 [IOTDB-2805] Create data region (#5509)
     add 984f1986d1 [IOTDB-2903] fix last value fetch failure during show timesereis (#5508)
     add 8ade542133 Make some modifications according to talking for recent PRs of SchemaRegion (#5498)
     add f3dc12ff59 [IOTDB-2896] Fix warning of illegal cross compaction strategy (#5503)
     add 7cc2a739b4 [IOTDB-2911][Part 1: Underlying Data Structures] TransformOperator: operator implementation for nested expression evaluation (#5513)
     add cc30e64dc2 fix ci (#5519)
     add 4de7d70fe1 [IOTDB-2901] Refine codes of DataTypeMismatchException and checkDataTypeMatch (#5501)
     add a0b1f19a88 Generate dataset header for query result set —— simple raw data query (#5522)
     add 60fc7fc0da Add DistributionPlanner for WRITE operation (#5515)
     add becb89fe61 [IOTDB-2905] IoTDBRecoverUnclosedIT failed in ci  (#5514)
     add 2bd55ae2f4 [IOTDB-2899] Feature/set storage group (#5510)
     add 07a407be6f fix NPE when stop IoTDB and MLogTxtWriter parsing CreateAlignedTimeseriesPlan error (#5525)
     add 25dc043b17 get time partition interval from config node (#5523)
     add 627e479c3b [IOTDB-2779] TemporaryClient for ConfigNode to connect DataNode (#5530)
     add 74df66decc [IOTDB-2847] Implementation of PartitionFetcher (#5516)
     add a8c8acbc94 Generate header of result set: show timeseries/devices/sg (#5531)
     add 976d041b76 [IOTDB-2896] Fix warning of illegal seq compaction performer (#5534)
     new dbf89c6846 init
     new ab2b339451 fix dependency
     new 1ebb0ef8b5 debug (#5538)

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (5bea3e8feb)
            \
             N -- N -- N   refs/heads/metric_dependency_resolve (1ebb0ef8b5)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../resources/conf/iotdb-confignode.properties     |  12 +-
 .../iotdb/confignode/cli/TemporaryClient.java      | 199 +++++++++++
 .../iotdb/confignode/conf/ConfigNodeConf.java      |  11 +
 .../confignode/conf/ConfigNodeDescriptor.java      |   5 +
 .../consensus/response/DataPartitionDataSet.java   |  23 +-
 .../consensus/response/SchemaPartitionDataSet.java |  23 +-
 .../iotdb/confignode/manager/DataNodeManager.java  |   3 +
 .../iotdb/confignode/manager/RegionManager.java    |  29 +-
 .../persistence/DataNodeInfoPersistence.java       |  11 +
 .../iotdb/confignode/cli/TemporaryClientDemo.java  |  55 +++
 .../server/ConfigNodeRPCServerProcessorTest.java   |  63 ++--
 .../db/integration/IoTDBDeleteStorageGroupIT.java  |  23 ++
 .../iotdb/db/integration/IoTDBMetadataFetchIT.java |  38 +++
 .../db/integration/IoTDBRecoverUnclosedIT.java     |  17 +-
 .../session/IoTDBSessionDisableMemControlIT.java   |   8 +-
 .../apache/iotdb/session/IoTDBSessionSimpleIT.java |   4 +-
 .../iotdb/session/IoTDBSessionVectorInsertIT.java  |   4 +-
 .../iotdb/commons/cluster/DataNodeLocation.java    |   4 +
 .../iotdb/commons/consensus/ConsensusGroupId.java  |   5 +-
 .../iotdb/commons/partition/DataPartition.java     |  22 +-
 .../iotdb/commons/partition/RegionReplicaSet.java  |  45 ++-
 .../resources/conf/iotdb-engine.properties         |   2 +-
 .../java/org/apache/iotdb/db/conf/IoTDBConfig.java |  19 +-
 .../org/apache/iotdb/db/conf/IoTDBDescriptor.java  |   9 +-
 .../iotdb/db/consensus/ConsensusManager.java       |  72 ----
 .../consensus/statemachine/BaseStateMachine.java   |  10 +-
 .../db/engine/compaction/CompactionScheduler.java  |  18 +-
 .../constant/CrossCompactionPerformer.java         |   2 +-
 .../constant/CrossCompactionSelector.java          |  32 +-
 .../constant/InnerSeqCompactionPerformer.java      |   2 +-
 .../constant/InnerSequenceCompactionSelector.java  |   8 +-
 .../constant/InnerUnseqCompactionPerformer.java    |   2 +-
 .../InnerUnsequenceCompactionSelector.java         |   6 +-
 .../compaction/cross/CrossSpaceCompactionTask.java |   9 +
 .../compaction/inner/InnerSpaceCompactionTask.java |  13 +-
 .../db/engine/compaction/log/TsFileIdentifier.java |   5 +
 .../impl/ReadChunkCompactionPerformer.java         |   2 +-
 .../impl/ReadPointCompactionPerformer.java         |   4 +-
 .../compaction/task/AbstractCompactionTask.java    |   3 +
 .../iotdb/db/engine/storagegroup/DataRegion.java   |   8 +-
 .../metadata/DataTypeMismatchException.java        |   6 +-
 .../iotdb/db/metadata/Executor/SchemaVisitor.java  |  43 ++-
 .../db/metadata/idtable/IDTableHashmapImpl.java    |  50 +--
 .../db/metadata/lastCache/LastCacheManager.java    |   8 +-
 .../iotdb/db/metadata/logfile/MLogTxtWriter.java   |  11 +-
 .../db/metadata/schemaregion/SchemaRegion.java     |  50 +--
 .../metadata/schemaregion/SchemaRegionUtils.java   |  42 +++
 .../schemaregion/rocksdb/RSchemaRegion.java        |  49 +--
 .../iotdb/db/mpp/common/GroupByTimeParameter.java  |  27 --
 .../apache/iotdb/db/mpp/common/PlanFragmentId.java |   4 +-
 .../plan/node => common/header}/ColumnHeader.java  |  23 +-
 .../iotdb/db/mpp/common/header/DatasetHeader.java  |  86 +++++
 .../iotdb/db/mpp/common/header/HeaderConstant.java |  90 +++++
 .../db/mpp/common/schematree/PathPatternTree.java  |  12 +
 .../iotdb/db/mpp/common/schematree/SchemaTree.java |  13 +
 .../execution/{ => config}/ConfigExecution.java    |  17 +-
 .../db/mpp/execution/{ => config}/IConfigTask.java |   2 +-
 .../execution/{ => config}/SampleConfigTask.java   |   2 +-
 .../mpp/execution/config/SetStorageGroupTask.java  |  75 +++++
 .../db/mpp/operator/process/TransformOperator.java | 118 +++++++
 .../db/mpp/operator/source/SeriesScanUtil.java     |  16 +-
 .../apache/iotdb/db/mpp/sql/analyze/Analysis.java  |  14 +
 .../apache/iotdb/db/mpp/sql/analyze/Analyzer.java  | 368 ++++++++++++---------
 .../mpp/sql/analyze/ClusterPartitionFetcher.java   | 205 +++++++++++-
 .../mpp/sql/analyze/FakePartitionFetcherImpl.java  |  30 +-
 .../db/mpp/sql/analyze/IPartitionFetcher.java      |  20 +-
 .../sql/analyze/StandalonePartitionFetcher.java    |  23 +-
 .../apache/iotdb/db/mpp/sql/parser/ASTVisitor.java |  21 ++
 .../db/mpp/sql/planner/DistributionPlanner.java    |  20 +-
 .../iotdb/db/mpp/sql/planner/LogicalPlanner.java   |  10 +-
 .../db/mpp/sql/planner/plan/FragmentInstance.java  |  49 ++-
 .../db/mpp/sql/planner/plan/IOutputPlanNode.java   |   2 +-
 .../db/mpp/sql/planner/plan/PlanFragment.java      |   5 +-
 .../plan/SimpleFragmentParallelPlanner.java        |   9 +-
 .../planner/plan/WriteFragmentParallelPlanner.java |  70 ++++
 .../db/mpp/sql/planner/plan/node/PlanNode.java     |   9 +-
 .../db/mpp/sql/planner/plan/node/PlanNodeType.java |   3 +-
 .../db/mpp/sql/planner/plan/node/PlanVisitor.java  |  11 +-
 .../planner/plan/node/SimplePlanNodeRewriter.java  |   4 +
 .../{source/SourceNode.java => WritePlanNode.java} |  16 +-
 .../node/metedata/read/DevicesSchemaScanNode.java  |  10 +-
 .../metedata/read/TimeSeriesSchemaScanNode.java    |  10 +-
 .../write/CreateAlignedTimeSeriesNode.java         |  21 +-
 .../node/metedata/write/CreateTimeSeriesNode.java  |  24 +-
 .../planner/plan/node/process/AggregateNode.java   |   8 +-
 .../planner/plan/node/process/DeviceMergeNode.java |   5 +-
 .../planner/plan/node/process/ExchangeNode.java    |   3 +-
 .../sql/planner/plan/node/process/FillNode.java    |   2 +-
 .../sql/planner/plan/node/process/FilterNode.java  |   2 +-
 .../planner/plan/node/process/FilterNullNode.java  |   2 +-
 .../plan/node/process/GroupByLevelNode.java        |   2 +-
 .../sql/planner/plan/node/process/LimitNode.java   |   2 +-
 .../sql/planner/plan/node/process/OffsetNode.java  |   2 +-
 .../sql/planner/plan/node/process/SortNode.java    |   2 +-
 .../planner/plan/node/process/TimeJoinNode.java    |   3 +-
 .../plan/node/source/SeriesAggregateScanNode.java  |  15 +-
 .../planner/plan/node/source/SeriesScanNode.java   |  10 +-
 .../plan/node/write/InsertMultiTabletsNode.java    |   9 +-
 .../sql/planner/plan/node/write/InsertNode.java    |  12 +-
 .../sql/planner/plan/node/write/InsertRowNode.java |   3 +-
 .../planner/plan/node/write/InsertRowsNode.java    |   3 +-
 .../plan/node/write/InsertRowsOfOneDeviceNode.java |   3 +-
 .../planner/plan/node/write/InsertTabletNode.java  |   5 +-
 .../db/mpp/sql/rewriter/WildcardsRemover.java      |  14 +-
 .../db/mpp/sql/statement/StatementVisitor.java     |  20 +-
 .../statement/component/GroupByLevelComponent.java |   2 +-
 .../component/GroupByLevelController.java          |   2 +-
 .../mpp/sql/statement/component/ResultColumn.java  |   9 +
 .../sql/statement/component/SelectComponent.java   |  29 +-
 .../statement/crud/AggregationQueryStatement.java  |  13 +-
 .../sql/statement/crud/GroupByQueryStatement.java  |  11 +
 .../mpp/sql/statement/crud/InsertRowStatement.java |   5 +-
 .../sql/statement/crud/InsertTabletStatement.java  |   5 +-
 .../mpp/sql/statement/crud/LastQueryStatement.java |  11 +
 .../db/mpp/sql/statement/crud/QueryStatement.java  |  85 +++--
 ...tatement.java => SetStorageGroupStatement.java} |  37 +--
 ...atement.java => ShowStorageGroupStatement.java} |  22 +-
 .../apache/iotdb/db/qp/executor/PlanExecutor.java  |   4 +-
 .../apache/iotdb/db/qp/physical/crud/UDTFPlan.java |  37 +--
 .../apache/iotdb/db/query/dataset/UDTFDataSet.java |   3 +-
 .../iotdb/db/query/expression/Expression.java      |  12 +-
 .../query/expression/binary/BinaryExpression.java  |  14 +-
 .../db/query/expression/unary/ConstantOperand.java |   8 +-
 .../query/expression/unary/FunctionExpression.java |  26 +-
 .../query/expression/unary/LogicNotExpression.java |  17 +-
 .../query/expression/unary/NegationExpression.java |  11 +-
 .../query/expression/unary/TimeSeriesOperand.java  |  10 +-
 .../db/query/udf/core/executor/UDTFContext.java    |  60 ++++
 .../iotdb/db/query/udf/core/layer/DAGBuilder.java  |   9 +-
 .../{DAGBuilder.java => EvaluationDAGBuilder.java} |  66 ++--
 .../query/udf/core/layer/RawQueryInputLayer.java   |   4 +
 .../query/udf/core/layer/TsBlockInputDataSet.java  |  64 ++++
 .../java/org/apache/iotdb/db/service/DataNode.java |   8 +
 .../iotdb/db/service/InternalServiceImpl.java      |  78 ++---
 .../apache/iotdb/db/service/IoTDBShutdownHook.java |   6 +-
 .../thrift/impl/DataNodeManagementServiceImpl.java |  57 ++--
 .../apache/iotdb/db/utils/EnvironmentUtils.java    |   2 -
 .../db/wal/recover/file/TsFilePlanRedoer.java      |   5 +-
 .../compaction/cross/CrossSpaceCompactionTest.java |  73 ++--
 .../iotdb/db/metadata/idtable/IDTableTest.java     |   2 +-
 .../db/mpp/sql/plan/DistributionPlannerTest.java   |  87 ++++-
 .../db/mpp/sql/plan/FragmentInstanceSerdeTest.java |  31 +-
 .../iotdb/db/mpp/sql/plan/LogicalPlannerTest.java  |   2 +
 .../db/mpp/sql/plan/QueryLogicalPlanUtil.java      |   2 +-
 .../node/process/GroupByLevelNodeSerdeTest.java    |   2 +-
 .../sql/plan/node/process/LimitNodeSerdeTest.java  |   2 +-
 .../sql/plan/node/process/OffsetNodeSerdeTest.java |   2 +-
 .../sql/plan/node/process/SortNodeSerdeTest.java   |   2 +-
 .../plan/node/process/TimeJoinNodeSerdeTest.java   |   2 +-
 .../iotdb/db/service/InternalServiceImplTest.java  |  59 +++-
 server/src/test/resources/iotdb-engine.properties  |   3 +-
 .../src/main/thrift/confignode.thrift              |   7 +-
 thrift/src/main/thrift/management.thrift           |  14 -
 .../iotdb/tsfile/read/common/block/TsBlock.java    |  80 ++++-
 .../read/common/block/column/BinaryColumn.java     |   5 +
 .../read/common/block/column/BooleanColumn.java    |   5 +
 .../tsfile/read/common/block/column/Column.java    |   5 +
 .../read/common/block/column/DoubleColumn.java     |   5 +
 .../read/common/block/column/FloatColumn.java      |   5 +
 .../tsfile/read/common/block/column/IntColumn.java |   5 +
 .../read/common/block/column/LongColumn.java       |   5 +
 .../block/column/RunLengthEncodedColumn.java       |   6 +
 .../read/common/block/column/TimeColumn.java       |   4 +
 163 files changed, 2600 insertions(+), 1202 deletions(-)
 create mode 100644 confignode/src/main/java/org/apache/iotdb/confignode/cli/TemporaryClient.java
 create mode 100644 confignode/src/test/java/org/apache/iotdb/confignode/cli/TemporaryClientDemo.java
 delete mode 100644 server/src/main/java/org/apache/iotdb/db/consensus/ConsensusManager.java
 delete mode 100644 server/src/main/java/org/apache/iotdb/db/mpp/common/GroupByTimeParameter.java
 rename server/src/main/java/org/apache/iotdb/db/mpp/{sql/planner/plan/node => common/header}/ColumnHeader.java (87%)
 create mode 100644 server/src/main/java/org/apache/iotdb/db/mpp/common/header/DatasetHeader.java
 create mode 100644 server/src/main/java/org/apache/iotdb/db/mpp/common/header/HeaderConstant.java
 rename server/src/main/java/org/apache/iotdb/db/mpp/execution/{ => config}/ConfigExecution.java (84%)
 rename server/src/main/java/org/apache/iotdb/db/mpp/execution/{ => config}/IConfigTask.java (94%)
 rename server/src/main/java/org/apache/iotdb/db/mpp/execution/{ => config}/SampleConfigTask.java (96%)
 create mode 100644 server/src/main/java/org/apache/iotdb/db/mpp/execution/config/SetStorageGroupTask.java
 create mode 100644 server/src/main/java/org/apache/iotdb/db/mpp/operator/process/TransformOperator.java
 create mode 100644 server/src/main/java/org/apache/iotdb/db/mpp/sql/planner/plan/WriteFragmentParallelPlanner.java
 copy server/src/main/java/org/apache/iotdb/db/mpp/sql/planner/plan/node/{source/SourceNode.java => WritePlanNode.java} (68%)
 copy server/src/main/java/org/apache/iotdb/db/mpp/sql/statement/metadata/{ShowStatement.java => SetStorageGroupStatement.java} (64%)
 copy server/src/main/java/org/apache/iotdb/db/mpp/sql/statement/metadata/{ShowDevicesStatement.java => ShowStorageGroupStatement.java} (71%)
 create mode 100644 server/src/main/java/org/apache/iotdb/db/query/udf/core/executor/UDTFContext.java
 copy server/src/main/java/org/apache/iotdb/db/query/udf/core/layer/{DAGBuilder.java => EvaluationDAGBuilder.java} (59%)
 create mode 100644 server/src/main/java/org/apache/iotdb/db/query/udf/core/layer/TsBlockInputDataSet.java


[iotdb] 03/03: debug (#5538)

Posted by ta...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tanxinyu pushed a commit to branch metric_dependency_resolve
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 1ebb0ef8b522d56ee5c4c452f74e61c56749b865
Author: YongzaoDan <33...@users.noreply.github.com>
AuthorDate: Thu Apr 14 17:32:02 2022 +0800

    debug (#5538)
    
    Co-authored-by: CRZbulabula <cr...@gmail.com>
---
 .../iotdb/confignode/physical/PhysicalPlan.java    |  1 -
 .../physical/SerializeDeserializeUT.java           | 27 ++++++++++++++++++++++
 .../iotdb/consensus/ratis/RequestMessage.java      |  1 -
 3 files changed, 27 insertions(+), 2 deletions(-)

diff --git a/confignode/src/main/java/org/apache/iotdb/confignode/physical/PhysicalPlan.java b/confignode/src/main/java/org/apache/iotdb/confignode/physical/PhysicalPlan.java
index 7bd81645a5..7f1c18f9fb 100644
--- a/confignode/src/main/java/org/apache/iotdb/confignode/physical/PhysicalPlan.java
+++ b/confignode/src/main/java/org/apache/iotdb/confignode/physical/PhysicalPlan.java
@@ -72,7 +72,6 @@ public abstract class PhysicalPlan implements IConsensusRequest {
       buffer.reset();
       throw e;
     }
-    buffer.flip();
   }
 
   protected abstract void serializeImpl(ByteBuffer buffer);
diff --git a/confignode/src/test/java/org/apache/iotdb/confignode/physical/SerializeDeserializeUT.java b/confignode/src/test/java/org/apache/iotdb/confignode/physical/SerializeDeserializeUT.java
index 0878cf483e..3dc71321d7 100644
--- a/confignode/src/test/java/org/apache/iotdb/confignode/physical/SerializeDeserializeUT.java
+++ b/confignode/src/test/java/org/apache/iotdb/confignode/physical/SerializeDeserializeUT.java
@@ -66,6 +66,7 @@ public class SerializeDeserializeUT {
     RegisterDataNodePlan plan0 =
         new RegisterDataNodePlan(new DataNodeLocation(1, new Endpoint("0.0.0.0", 6667)));
     plan0.serialize(buffer);
+    buffer.flip();
     RegisterDataNodePlan plan1 = (RegisterDataNodePlan) PhysicalPlan.Factory.create(buffer);
     Assert.assertEquals(plan0, plan1);
   }
@@ -74,6 +75,7 @@ public class SerializeDeserializeUT {
   public void QueryDataNodeInfoPlanTest() throws IOException {
     QueryDataNodeInfoPlan plan0 = new QueryDataNodeInfoPlan(-1);
     plan0.serialize(buffer);
+    buffer.flip();
     QueryDataNodeInfoPlan plan1 = (QueryDataNodeInfoPlan) PhysicalPlan.Factory.create(buffer);
     Assert.assertEquals(plan0, plan1);
   }
@@ -82,6 +84,7 @@ public class SerializeDeserializeUT {
   public void SetStorageGroupPlanTest() throws IOException {
     SetStorageGroupPlan plan0 = new SetStorageGroupPlan(new StorageGroupSchema("sg"));
     plan0.serialize(buffer);
+    buffer.flip();
     SetStorageGroupPlan plan1 = (SetStorageGroupPlan) PhysicalPlan.Factory.create(buffer);
     Assert.assertEquals(plan0, plan1);
   }
@@ -107,6 +110,7 @@ public class SerializeDeserializeUT {
     plan0.addRegion(schemaRegionSet);
 
     plan0.serialize(buffer);
+    buffer.flip();
     CreateRegionsPlan plan1 = (CreateRegionsPlan) PhysicalPlan.Factory.create(buffer);
     Assert.assertEquals(plan0, plan1);
   }
@@ -128,6 +132,7 @@ public class SerializeDeserializeUT {
     CreateSchemaPartitionPlan plan0 = new CreateSchemaPartitionPlan();
     plan0.setAssignedSchemaPartition(assignedSchemaPartition);
     plan0.serialize(buffer);
+    buffer.flip();
     CreateSchemaPartitionPlan plan1 =
         (CreateSchemaPartitionPlan) PhysicalPlan.Factory.create(buffer);
     Assert.assertEquals(plan0, plan1);
@@ -145,6 +150,7 @@ public class SerializeDeserializeUT {
         new GetOrCreateSchemaPartitionPlan(PhysicalPlanType.GetOrCreateSchemaPartition);
     plan0.setPartitionSlotsMap(partitionSlotsMap);
     plan0.serialize(buffer);
+    buffer.flip();
     GetOrCreateSchemaPartitionPlan plan1 =
         (GetOrCreateSchemaPartitionPlan) PhysicalPlan.Factory.create(buffer);
     Assert.assertEquals(plan0, plan1);
@@ -177,6 +183,7 @@ public class SerializeDeserializeUT {
     CreateDataPartitionPlan plan0 = new CreateDataPartitionPlan();
     plan0.setAssignedDataPartition(assignedDataPartition);
     plan0.serialize(buffer);
+    buffer.flip();
     CreateDataPartitionPlan plan1 = (CreateDataPartitionPlan) PhysicalPlan.Factory.create(buffer);
     Assert.assertEquals(plan0, plan1);
   }
@@ -197,6 +204,7 @@ public class SerializeDeserializeUT {
         new GetOrCreateDataPartitionPlan(PhysicalPlanType.GetDataPartition);
     plan0.setPartitionSlotsMap(partitionSlotsMap);
     plan0.serialize(buffer);
+    buffer.flip();
     GetOrCreateDataPartitionPlan plan1 =
         (GetOrCreateDataPartitionPlan) PhysicalPlan.Factory.create(buffer);
     Assert.assertEquals(plan0, plan1);
@@ -216,6 +224,7 @@ public class SerializeDeserializeUT {
         new AuthorPlan(
             PhysicalPlanType.CREATE_USER, "thulab", "", "passwd", "", new HashSet<>(), "");
     plan0.serialize(buffer);
+    buffer.flip();
     plan1 = (AuthorPlan) PhysicalPlan.Factory.create(buffer);
     Assert.assertEquals(plan0, plan1);
     cleanBuffer();
@@ -223,6 +232,7 @@ public class SerializeDeserializeUT {
     // create role
     plan0 = new AuthorPlan(PhysicalPlanType.CREATE_ROLE, "", "admin", "", "", new HashSet<>(), "");
     plan0.serialize(buffer);
+    buffer.flip();
     plan1 = (AuthorPlan) PhysicalPlan.Factory.create(buffer);
     Assert.assertEquals(plan0, plan1);
     cleanBuffer();
@@ -232,6 +242,7 @@ public class SerializeDeserializeUT {
         new AuthorPlan(
             PhysicalPlanType.UPDATE_USER, "tempuser", "", "", "newpwd", new HashSet<>(), "");
     plan0.serialize(buffer);
+    buffer.flip();
     plan1 = (AuthorPlan) PhysicalPlan.Factory.create(buffer);
     Assert.assertEquals(plan0, plan1);
     cleanBuffer();
@@ -240,6 +251,7 @@ public class SerializeDeserializeUT {
     plan0 =
         new AuthorPlan(PhysicalPlanType.GRANT_USER, "tempuser", "", "", "", permissions, "root.ln");
     plan0.serialize(buffer);
+    buffer.flip();
     plan1 = (AuthorPlan) PhysicalPlan.Factory.create(buffer);
     Assert.assertEquals(plan0, plan1);
     cleanBuffer();
@@ -255,6 +267,7 @@ public class SerializeDeserializeUT {
             permissions,
             "root.ln");
     plan0.serialize(buffer);
+    buffer.flip();
     plan1 = (AuthorPlan) PhysicalPlan.Factory.create(buffer);
     Assert.assertEquals(plan0, plan1);
     cleanBuffer();
@@ -263,6 +276,7 @@ public class SerializeDeserializeUT {
     plan0 =
         new AuthorPlan(PhysicalPlanType.GRANT_ROLE, "", "temprole", "", "", new HashSet<>(), "");
     plan0.serialize(buffer);
+    buffer.flip();
     plan1 = (AuthorPlan) PhysicalPlan.Factory.create(buffer);
     Assert.assertEquals(plan0, plan1);
     cleanBuffer();
@@ -272,6 +286,7 @@ public class SerializeDeserializeUT {
         new AuthorPlan(
             PhysicalPlanType.REVOKE_USER, "tempuser", "", "", "", permissions, "root.ln");
     plan0.serialize(buffer);
+    buffer.flip();
     plan1 = (AuthorPlan) PhysicalPlan.Factory.create(buffer);
     Assert.assertEquals(plan0, plan1);
     cleanBuffer();
@@ -281,6 +296,7 @@ public class SerializeDeserializeUT {
         new AuthorPlan(
             PhysicalPlanType.REVOKE_ROLE, "", "temprole", "", "", permissions, "root.ln");
     plan0.serialize(buffer);
+    buffer.flip();
     plan1 = (AuthorPlan) PhysicalPlan.Factory.create(buffer);
     Assert.assertEquals(plan0, plan1);
     cleanBuffer();
@@ -296,6 +312,7 @@ public class SerializeDeserializeUT {
             new HashSet<>(),
             "");
     plan0.serialize(buffer);
+    buffer.flip();
     plan1 = (AuthorPlan) PhysicalPlan.Factory.create(buffer);
     Assert.assertEquals(plan0, plan1);
     cleanBuffer();
@@ -303,6 +320,7 @@ public class SerializeDeserializeUT {
     // drop user
     plan0 = new AuthorPlan(PhysicalPlanType.DROP_USER, "xiaoming", "", "", "", new HashSet<>(), "");
     plan0.serialize(buffer);
+    buffer.flip();
     plan1 = (AuthorPlan) PhysicalPlan.Factory.create(buffer);
     Assert.assertEquals(plan0, plan1);
     cleanBuffer();
@@ -310,6 +328,7 @@ public class SerializeDeserializeUT {
     // drop role
     plan0 = new AuthorPlan(PhysicalPlanType.DROP_ROLE, "", "admin", "", "", new HashSet<>(), "");
     plan0.serialize(buffer);
+    buffer.flip();
     plan1 = (AuthorPlan) PhysicalPlan.Factory.create(buffer);
     Assert.assertEquals(plan0, plan1);
     cleanBuffer();
@@ -317,6 +336,7 @@ public class SerializeDeserializeUT {
     // list user
     plan0 = new AuthorPlan(PhysicalPlanType.LIST_USER, "", "", "", "", new HashSet<>(), "");
     plan0.serialize(buffer);
+    buffer.flip();
     plan1 = (AuthorPlan) PhysicalPlan.Factory.create(buffer);
     Assert.assertEquals(plan0, plan1);
     cleanBuffer();
@@ -324,6 +344,7 @@ public class SerializeDeserializeUT {
     // list role
     plan0 = new AuthorPlan(PhysicalPlanType.LIST_ROLE, "", "", "", "", new HashSet<>(), "");
     plan0.serialize(buffer);
+    buffer.flip();
     plan1 = (AuthorPlan) PhysicalPlan.Factory.create(buffer);
     Assert.assertEquals(plan0, plan1);
     cleanBuffer();
@@ -332,6 +353,7 @@ public class SerializeDeserializeUT {
     plan0 =
         new AuthorPlan(PhysicalPlanType.LIST_USER_PRIVILEGE, "", "", "", "", new HashSet<>(), "");
     plan0.serialize(buffer);
+    buffer.flip();
     plan1 = (AuthorPlan) PhysicalPlan.Factory.create(buffer);
     Assert.assertEquals(plan0, plan1);
     cleanBuffer();
@@ -340,6 +362,7 @@ public class SerializeDeserializeUT {
     plan0 =
         new AuthorPlan(PhysicalPlanType.LIST_ROLE_PRIVILEGE, "", "", "", "", new HashSet<>(), "");
     plan0.serialize(buffer);
+    buffer.flip();
     plan1 = (AuthorPlan) PhysicalPlan.Factory.create(buffer);
     Assert.assertEquals(plan0, plan1);
     cleanBuffer();
@@ -348,6 +371,7 @@ public class SerializeDeserializeUT {
     plan0 =
         new AuthorPlan(PhysicalPlanType.LIST_USER_PRIVILEGE, "", "", "", "", new HashSet<>(), "");
     plan0.serialize(buffer);
+    buffer.flip();
     plan1 = (AuthorPlan) PhysicalPlan.Factory.create(buffer);
     Assert.assertEquals(plan0, plan1);
     cleanBuffer();
@@ -356,6 +380,7 @@ public class SerializeDeserializeUT {
     plan0 =
         new AuthorPlan(PhysicalPlanType.LIST_ROLE_PRIVILEGE, "", "", "", "", new HashSet<>(), "");
     plan0.serialize(buffer);
+    buffer.flip();
     plan1 = (AuthorPlan) PhysicalPlan.Factory.create(buffer);
     Assert.assertEquals(plan0, plan1);
     cleanBuffer();
@@ -363,6 +388,7 @@ public class SerializeDeserializeUT {
     // list all role of user
     plan0 = new AuthorPlan(PhysicalPlanType.LIST_USER_ROLES, "", "", "", "", new HashSet<>(), "");
     plan0.serialize(buffer);
+    buffer.flip();
     plan1 = (AuthorPlan) PhysicalPlan.Factory.create(buffer);
     Assert.assertEquals(plan0, plan1);
     cleanBuffer();
@@ -370,6 +396,7 @@ public class SerializeDeserializeUT {
     // list all user of role
     plan0 = new AuthorPlan(PhysicalPlanType.LIST_ROLE_USERS, "", "", "", "", new HashSet<>(), "");
     plan0.serialize(buffer);
+    buffer.flip();
     plan1 = (AuthorPlan) PhysicalPlan.Factory.create(buffer);
     Assert.assertEquals(plan0, plan1);
     cleanBuffer();
diff --git a/consensus/src/main/java/org/apache/iotdb/consensus/ratis/RequestMessage.java b/consensus/src/main/java/org/apache/iotdb/consensus/ratis/RequestMessage.java
index 050358fdb2..5607c805ac 100644
--- a/consensus/src/main/java/org/apache/iotdb/consensus/ratis/RequestMessage.java
+++ b/consensus/src/main/java/org/apache/iotdb/consensus/ratis/RequestMessage.java
@@ -61,7 +61,6 @@ public class RequestMessage implements Message {
             actualRequest.serializeRequest(byteBuffer);
             byteBuffer.flip();
             serializedContent = ByteString.copyFrom(byteBuffer);
-            byteBuffer.flip();
           }
         }
       }


[iotdb] 01/03: init

Posted by ta...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tanxinyu pushed a commit to branch metric_dependency_resolve
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit dbf89c68463dd88a70f8a89503bd02fb4a733859
Author: LebronAl <TX...@gmail.com>
AuthorDate: Thu Apr 14 12:29:47 2022 +0800

    init
---
 confignode/src/assembly/resources/conf/logback.xml     |  2 +-
 .../thrift/server/ConfigNodeRPCServerProcessor.java    |  1 +
 .../iotdb/confignode/consensus/RatisConsensusDemo.java | 11 +++++++----
 consensus/pom.xml                                      | 13 +++++++++----
 .../apache/iotdb/consensus/ratis/RatisConsensus.java   | 11 +++++++----
 server/pom.xml                                         | 18 ------------------
 .../org/apache/iotdb/db/client/ConfigNodeClient.java   |  1 +
 .../java/org/apache/iotdb/db/conf/IoTDBConfig.java     |  6 +++---
 .../java/org/apache/iotdb/db/service/DataNode.java     |  8 ++++++--
 9 files changed, 35 insertions(+), 36 deletions(-)

diff --git a/confignode/src/assembly/resources/conf/logback.xml b/confignode/src/assembly/resources/conf/logback.xml
index 4e8e0d6275..7d9ac70f67 100644
--- a/confignode/src/assembly/resources/conf/logback.xml
+++ b/confignode/src/assembly/resources/conf/logback.xml
@@ -127,7 +127,7 @@
             <level>INFO</level>
         </filter>
     </appender>
-    <root level="info">
+    <root level="debug">
         <appender-ref ref="FILEDEBUG"/>
         <appender-ref ref="FILEWARN"/>
         <appender-ref ref="FILEERROR"/>
diff --git a/confignode/src/main/java/org/apache/iotdb/confignode/service/thrift/server/ConfigNodeRPCServerProcessor.java b/confignode/src/main/java/org/apache/iotdb/confignode/service/thrift/server/ConfigNodeRPCServerProcessor.java
index 6bcb05877e..7da25479df 100644
--- a/confignode/src/main/java/org/apache/iotdb/confignode/service/thrift/server/ConfigNodeRPCServerProcessor.java
+++ b/confignode/src/main/java/org/apache/iotdb/confignode/service/thrift/server/ConfigNodeRPCServerProcessor.java
@@ -84,6 +84,7 @@ public class ConfigNodeRPCServerProcessor implements ConfigIService.Iface {
 
     TDataNodeRegisterResp resp = new TDataNodeRegisterResp();
     dataSet.convertToRpcDataNodeRegisterResp(resp);
+    LOGGER.error("{}", resp);
     return resp;
   }
 
diff --git a/confignode/src/test/java/org/apache/iotdb/confignode/consensus/RatisConsensusDemo.java b/confignode/src/test/java/org/apache/iotdb/confignode/consensus/RatisConsensusDemo.java
index 696d85a538..9348655d81 100644
--- a/confignode/src/test/java/org/apache/iotdb/confignode/consensus/RatisConsensusDemo.java
+++ b/confignode/src/test/java/org/apache/iotdb/confignode/consensus/RatisConsensusDemo.java
@@ -34,6 +34,7 @@ import org.apache.thrift.protocol.TBinaryProtocol;
 import org.apache.thrift.transport.TTransport;
 import org.apache.thrift.transport.TTransportException;
 import org.junit.Assert;
+import org.junit.Test;
 
 import java.util.Map;
 import java.util.concurrent.TimeUnit;
@@ -55,6 +56,7 @@ public class RatisConsensusDemo {
    * ConfigNode by yourself 5. Add @Test 6. run ratisConsensusRegisterDemo 7. run
    * ratisConsensusQueryDemo
    */
+  @Test
   public void ratisConsensusSetStorageGroupsDemo() throws TException, InterruptedException {
     createClients();
     setStorageGroups();
@@ -65,6 +67,7 @@ public class RatisConsensusDemo {
     queryDataNodes();
   }
 
+  @Test
   public void ratisConsensusQueryStorageGroupsDemo() throws TException, InterruptedException {
     createClients();
     queryStorageGroups();
@@ -78,8 +81,8 @@ public class RatisConsensusDemo {
   private void createClients() throws TTransportException {
     // Create clients for these three ConfigNodes
     // to simulate DataNodes to send RPC requests
-    clients = new ConfigIService.Client[3];
-    for (int i = 0; i < 3; i++) {
+    clients = new ConfigIService.Client[1];
+    for (int i = 0; i < 1; i++) {
       TTransport transport =
           RpcTransportFactory.INSTANCE.getTransport(localhost, 22277 + i * 2, timeOutInMS);
       transport.open();
@@ -107,7 +110,7 @@ public class RatisConsensusDemo {
     TimeUnit.SECONDS.sleep(1);
 
     // DataNodes can connect to any ConfigNode and send read requests
-    for (int i = 0; i < 3; i++) {
+    for (int i = 0; i < 1; i++) {
       TDataNodeMessageResp msgMap = clients[i].getDataNodesMessage(-1);
       System.out.printf(
           "\nQuery DataNode message from ConfigNode 0.0.0.0:%d. Result: %s\n",
@@ -128,7 +131,7 @@ public class RatisConsensusDemo {
     // sleep 1s to make sure all ConfigNode in ConfigNodeGroup hold the same PartitionTable
     TimeUnit.SECONDS.sleep(1);
 
-    for (int i = 0; i < 3; i++) {
+    for (int i = 0; i < 1; i++) {
       TStorageGroupSchemaResp msgMap = clients[i].getStorageGroupsSchema();
       System.out.printf(
           "\nQuery StorageGroup message from ConfigNode 0.0.0.0:%d. Result: {\n", 22277 + i * 2);
diff --git a/consensus/pom.xml b/consensus/pom.xml
index f668d8b4bd..bdb355d8b6 100644
--- a/consensus/pom.xml
+++ b/consensus/pom.xml
@@ -38,13 +38,18 @@
         </dependency>
         <dependency>
             <groupId>org.apache.ratis</groupId>
-            <artifactId>ratis-grpc</artifactId>
+            <artifactId>ratis-common</artifactId>
+            <version>2.2.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.ratis</groupId>
+            <artifactId>ratis-netty</artifactId>
             <version>2.2.0</version>
         </dependency>
         <dependency>
-            <groupId>io.dropwizard.metrics</groupId>
-            <artifactId>metrics-core</artifactId>
-            <version>3.2.5</version>
+            <groupId>org.apache.ratis</groupId>
+            <artifactId>ratis-grpc</artifactId>
+            <version>2.2.0</version>
         </dependency>
         <dependency>
             <groupId>org.apache.iotdb</groupId>
diff --git a/consensus/src/main/java/org/apache/iotdb/consensus/ratis/RatisConsensus.java b/consensus/src/main/java/org/apache/iotdb/consensus/ratis/RatisConsensus.java
index b42b57b77a..91acd7b106 100644
--- a/consensus/src/main/java/org/apache/iotdb/consensus/ratis/RatisConsensus.java
+++ b/consensus/src/main/java/org/apache/iotdb/consensus/ratis/RatisConsensus.java
@@ -37,11 +37,12 @@ import org.apache.iotdb.consensus.exception.PeerNotInConsensusGroupException;
 import org.apache.iotdb.consensus.exception.RatisRequestFailedException;
 import org.apache.iotdb.consensus.statemachine.IStateMachine;
 
+import org.apache.ratis.RaftConfigKeys;
 import org.apache.ratis.client.RaftClient;
 import org.apache.ratis.conf.Parameters;
 import org.apache.ratis.conf.RaftProperties;
-import org.apache.ratis.grpc.GrpcConfigKeys;
-import org.apache.ratis.grpc.GrpcFactory;
+import org.apache.ratis.netty.NettyConfigKeys;
+import org.apache.ratis.netty.NettyFactory;
 import org.apache.ratis.protocol.ClientId;
 import org.apache.ratis.protocol.GroupInfoReply;
 import org.apache.ratis.protocol.Message;
@@ -51,6 +52,7 @@ import org.apache.ratis.protocol.RaftGroup;
 import org.apache.ratis.protocol.RaftGroupId;
 import org.apache.ratis.protocol.RaftPeer;
 import org.apache.ratis.protocol.exceptions.NotLeaderException;
+import org.apache.ratis.rpc.SupportedRpcType;
 import org.apache.ratis.server.RaftServer;
 import org.apache.ratis.server.RaftServerConfigKeys;
 import org.apache.ratis.util.NetUtils;
@@ -105,10 +107,11 @@ class RatisConsensus implements IConsensus {
     RaftProperties properties = new RaftProperties();
 
     RaftServerConfigKeys.setStorageDir(properties, Collections.singletonList(ratisStorageDir));
+    RaftConfigKeys.Rpc.setType(properties, SupportedRpcType.NETTY);
 
     // set the port which server listen to in RaftProperty object
     final int port = NetUtils.createSocketAddr(address).getPort();
-    GrpcConfigKeys.Server.setPort(properties, port);
+    NettyConfigKeys.Server.setPort(properties, port);
 
     server =
         RaftServer.newBuilder()
@@ -508,7 +511,7 @@ class RatisConsensus implements IConsensus {
             .setProperties(raftProperties)
             .setRaftGroup(group)
             .setClientRpc(
-                new GrpcFactory(new Parameters())
+                new NettyFactory(new Parameters())
                     .newRaftClientRpc(ClientId.randomId(), raftProperties));
     RaftClient client = builder.build();
     closeRaftClient(group.getGroupId());
diff --git a/server/pom.xml b/server/pom.xml
index 6d3dfa22d3..4704e35300 100644
--- a/server/pom.xml
+++ b/server/pom.xml
@@ -128,14 +128,6 @@
             <groupId>io.dropwizard.metrics</groupId>
             <artifactId>metrics-core</artifactId>
         </dependency>
-        <dependency>
-            <groupId>io.dropwizard.metrics</groupId>
-            <artifactId>metrics-jvm</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>io.dropwizard.metrics</groupId>
-            <artifactId>metrics-json</artifactId>
-        </dependency>
         <dependency>
             <groupId>commons-cli</groupId>
             <artifactId>commons-cli</artifactId>
@@ -251,22 +243,12 @@
             <artifactId>micrometer-metrics</artifactId>
             <version>${project.version}</version>
         </dependency>
-        <dependency>
-            <groupId>org.apache.iotdb</groupId>
-            <artifactId>dropwizard-metrics</artifactId>
-            <version>${project.version}</version>
-        </dependency>
         <dependency>
             <groupId>commons-lang</groupId>
             <artifactId>commons-lang</artifactId>
             <version>2.6</version>
             <scope>compile</scope>
         </dependency>
-        <dependency>
-            <groupId>com.codahale.metrics</groupId>
-            <artifactId>metrics-core</artifactId>
-            <version>3.0.2</version>
-        </dependency>
         <dependency>
             <groupId>org.rocksdb</groupId>
             <artifactId>rocksdbjni</artifactId>
diff --git a/server/src/main/java/org/apache/iotdb/db/client/ConfigNodeClient.java b/server/src/main/java/org/apache/iotdb/db/client/ConfigNodeClient.java
index a963ffe476..c3c5b610f7 100644
--- a/server/src/main/java/org/apache/iotdb/db/client/ConfigNodeClient.java
+++ b/server/src/main/java/org/apache/iotdb/db/client/ConfigNodeClient.java
@@ -157,6 +157,7 @@ public class ConfigNodeClient {
     for (int i = 0; i < RETRY_NUM; i++) {
       try {
         TDataNodeRegisterResp resp = client.registerDataNode(req);
+        logger.error("{}", resp);
         if (!updateConfigNodeLeader(resp.status)) {
           return resp;
         }
diff --git a/server/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java b/server/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java
index 5a87a42625..ec601dcd64 100644
--- a/server/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java
+++ b/server/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java
@@ -45,7 +45,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import java.io.File;
-import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List;
 import java.util.concurrent.TimeUnit;
 import java.util.regex.Matcher;
@@ -842,7 +842,7 @@ public class IoTDBConfig {
   /**
    * Ip and port of config nodes. each one is a {internalIp | domain name}:{meta port} string tuple.
    */
-  private List<String> configNodeUrls = new ArrayList<>();
+  private List<String> configNodeUrls = Collections.singletonList("127.0.0.1:22278");
 
   /** Internal ip for data node */
   private String internalIp = "127.0.0.1";
@@ -854,7 +854,7 @@ public class IoTDBConfig {
   private int consensusPort = 40010;
 
   /** The max time of data node waiting to join into the cluster */
-  private long joinClusterTimeOutMs = TimeUnit.SECONDS.toMillis(60);
+  private long joinClusterTimeOutMs = TimeUnit.SECONDS.toMillis(5);
 
   /**
    * The consensus protocol class. The Datanode should communicate with ConfigNode on startup and
diff --git a/server/src/main/java/org/apache/iotdb/db/service/DataNode.java b/server/src/main/java/org/apache/iotdb/db/service/DataNode.java
index 89c39da1e7..e7fdc7290e 100644
--- a/server/src/main/java/org/apache/iotdb/db/service/DataNode.java
+++ b/server/src/main/java/org/apache/iotdb/db/service/DataNode.java
@@ -136,15 +136,19 @@ public class DataNode implements DataNodeMBean {
           logger.info("Joined the cluster successfully");
           return;
         }
+      } catch (IoTDBConnectionException e) {
+        logger.warn("Cannot join the cluster, because: {}", e.getMessage());
+      }
 
+      try {
         // wait 5s to start the next try
         Thread.sleep(IoTDBDescriptor.getInstance().getConfig().getJoinClusterTimeOutMs());
-      } catch (IoTDBConnectionException e) {
-        logger.warn("Cannot join the cluster, because: {}", e.getMessage());
       } catch (InterruptedException e) {
         Thread.currentThread().interrupt();
         logger.warn("Unexpected interruption when waiting to join the cluster", e);
+        break;
       }
+
       // start the next try
       retry--;
     }


[iotdb] 02/03: fix dependency

Posted by ta...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tanxinyu pushed a commit to branch metric_dependency_resolve
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit ab2b339451deb8c88db677c3266d81ade90f6072
Author: LebronAl <TX...@gmail.com>
AuthorDate: Thu Apr 14 14:44:21 2022 +0800

    fix dependency
---
 confignode/src/assembly/resources/conf/logback.xml |  2 +-
 pom.xml                                            | 15 ---------------
 server/pom.xml                                     |  9 +++++----
 3 files changed, 6 insertions(+), 20 deletions(-)

diff --git a/confignode/src/assembly/resources/conf/logback.xml b/confignode/src/assembly/resources/conf/logback.xml
index 7d9ac70f67..4e8e0d6275 100644
--- a/confignode/src/assembly/resources/conf/logback.xml
+++ b/confignode/src/assembly/resources/conf/logback.xml
@@ -127,7 +127,7 @@
             <level>INFO</level>
         </filter>
     </appender>
-    <root level="debug">
+    <root level="info">
         <appender-ref ref="FILEDEBUG"/>
         <appender-ref ref="FILEWARN"/>
         <appender-ref ref="FILEERROR"/>
diff --git a/pom.xml b/pom.xml
index 1bc1bf9e83..90a8dbccb4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -307,21 +307,6 @@
                 <artifactId>jetty-webapp</artifactId>
                 <version>${jetty.version}</version>
             </dependency>
-            <dependency>
-                <groupId>io.dropwizard.metrics</groupId>
-                <artifactId>metrics-core</artifactId>
-                <version>${metrics.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>io.dropwizard.metrics</groupId>
-                <artifactId>metrics-jvm</artifactId>
-                <version>${metrics.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>io.dropwizard.metrics</groupId>
-                <artifactId>metrics-json</artifactId>
-                <version>${metrics.version}</version>
-            </dependency>
             <dependency>
                 <groupId>me.tongfei</groupId>
                 <artifactId>progressbar</artifactId>
diff --git a/server/pom.xml b/server/pom.xml
index 4704e35300..572c1aa1b6 100644
--- a/server/pom.xml
+++ b/server/pom.xml
@@ -124,10 +124,6 @@
             <artifactId>openapi</artifactId>
             <version>${project.version}</version>
         </dependency>
-        <dependency>
-            <groupId>io.dropwizard.metrics</groupId>
-            <artifactId>metrics-core</artifactId>
-        </dependency>
         <dependency>
             <groupId>commons-cli</groupId>
             <artifactId>commons-cli</artifactId>
@@ -243,6 +239,11 @@
             <artifactId>micrometer-metrics</artifactId>
             <version>${project.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.iotdb</groupId>
+            <artifactId>dropwizard-metrics</artifactId>
+            <version>${project.version}</version>
+        </dependency>
         <dependency>
             <groupId>commons-lang</groupId>
             <artifactId>commons-lang</artifactId>