Skip to content

Commit e9039a7

Browse files
authored
[To dev/1.3] Pipe: Delete unnecessary metrics (#16165) (#16168)
1 parent 1a3f960 commit e9039a7

1 file changed

Lines changed: 0 additions & 40 deletions

File tree

iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/metric/overview/PipeDataNodeSinglePipeMetrics.java

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@
2727
import org.apache.iotdb.db.pipe.source.dataregion.IoTDBDataRegionSource;
2828
import org.apache.iotdb.db.pipe.source.schemaregion.IoTDBSchemaRegionSource;
2929
import org.apache.iotdb.metrics.AbstractMetricService;
30-
import org.apache.iotdb.metrics.impl.DoNothingMetricManager;
3130
import org.apache.iotdb.metrics.metricsets.IMetricSet;
32-
import org.apache.iotdb.metrics.type.Histogram;
3331
import org.apache.iotdb.metrics.utils.MetricLevel;
3432
import org.apache.iotdb.metrics.utils.MetricType;
3533

@@ -41,7 +39,6 @@
4139
import java.util.Map;
4240
import java.util.Objects;
4341
import java.util.concurrent.ConcurrentHashMap;
44-
import java.util.concurrent.TimeUnit;
4542

4643
public class PipeDataNodeSinglePipeMetrics implements IMetricSet {
4744

@@ -53,28 +50,11 @@ public class PipeDataNodeSinglePipeMetrics implements IMetricSet {
5350
public final Map<String, PipeDataNodeRemainingEventAndTimeOperator>
5451
remainingEventAndTimeOperatorMap = new ConcurrentHashMap<>();
5552

56-
private static Histogram PIPE_DATANODE_INSERTNODE_TRANSFER_TIME_HISTOGRAM =
57-
DoNothingMetricManager.DO_NOTHING_HISTOGRAM;
58-
private static Histogram PIPE_DATANODE_TSFILE_TRANSFER_TIME_HISTOGRAM =
59-
DoNothingMetricManager.DO_NOTHING_HISTOGRAM;
60-
6153
//////////////////////////// bindTo & unbindFrom (metric framework) ////////////////////////////
6254

6355
@Override
6456
public void bindTo(final AbstractMetricService metricService) {
6557
this.metricService = metricService;
66-
PIPE_DATANODE_INSERTNODE_TRANSFER_TIME_HISTOGRAM =
67-
metricService.getOrCreateHistogram(
68-
Metric.PIPE_DATANODE_EVENT_TRANSFER.toString(),
69-
MetricLevel.IMPORTANT,
70-
Tag.NAME.toString(),
71-
"insert_node");
72-
PIPE_DATANODE_TSFILE_TRANSFER_TIME_HISTOGRAM =
73-
metricService.getOrCreateHistogram(
74-
Metric.PIPE_DATANODE_EVENT_TRANSFER.toString(),
75-
MetricLevel.IMPORTANT,
76-
Tag.NAME.toString(),
77-
"tsfile");
7858
ImmutableSet.copyOf(remainingEventAndTimeOperatorMap.keySet()).forEach(this::createMetrics);
7959
}
8060

@@ -155,17 +135,6 @@ public void unbindFrom(final AbstractMetricService metricService) {
155135
LOGGER.warn(
156136
"Failed to unbind from pipe remaining event and time metrics, RemainingEventAndTimeOperator map not empty");
157137
}
158-
metricService.remove(
159-
MetricType.HISTOGRAM,
160-
Metric.PIPE_DATANODE_EVENT_TRANSFER.toString(),
161-
Tag.NAME.toString(),
162-
"insert_node");
163-
164-
metricService.remove(
165-
MetricType.HISTOGRAM,
166-
Metric.PIPE_DATANODE_EVENT_TRANSFER.toString(),
167-
Tag.NAME.toString(),
168-
"tsfile");
169138
}
170139

171140
private void removeMetrics(final String pipeID) {
@@ -268,11 +237,6 @@ public void decreaseInsertNodeEventCount(
268237
pipeName + "_" + creationTime,
269238
k -> new PipeDataNodeRemainingEventAndTimeOperator(pipeName, creationTime));
270239
operator.decreaseInsertNodeEventCount();
271-
272-
if (transferTime > 0) {
273-
operator.getInsertNodeTransferTimer().update(transferTime, TimeUnit.NANOSECONDS);
274-
PIPE_DATANODE_INSERTNODE_TRANSFER_TIME_HISTOGRAM.update(transferTime);
275-
}
276240
}
277241

278242
public void increaseRawTabletEventCount(final String pipeName, final long creationTime) {
@@ -307,10 +271,6 @@ public void decreaseTsFileEventCount(
307271
k -> new PipeDataNodeRemainingEventAndTimeOperator(pipeName, creationTime));
308272

309273
operator.decreaseTsFileEventCount();
310-
if (transferTime > 0) {
311-
operator.getTsFileTransferTimer().update(transferTime, TimeUnit.NANOSECONDS);
312-
PIPE_DATANODE_TSFILE_TRANSFER_TIME_HISTOGRAM.update(transferTime);
313-
}
314274
}
315275

316276
public void increaseHeartbeatEventCount(final String pipeName, final long creationTime) {

0 commit comments

Comments
 (0)