Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -120,23 +120,6 @@ public int getInsertNodeEventCount() {
return insertNodeEventCount.get();
}

long getRemainingEvents() {
final long remainingEvents =
tsfileEventCount.get()
+ rawTabletEventCount.get()
+ insertNodeEventCount.get()
+ heartbeatEventCount.get()
+ schemaRegionExtractors.stream()
.map(IoTDBSchemaRegionSource::getUnTransferredEventCount)
.reduce(Long::sum)
.orElse(0L);

// There are cases where the indicator is negative. For example, after the Pipe is restarted,
// the Processor SubTask is still collecting Events, resulting in a negative count. This
// situation cannot be avoided because the Pipe may be restarted internally.
return remainingEvents >= 0 ? remainingEvents : 0;
}

/**
* This will calculate the estimated remaining time of pipe.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ private void createAutoGauge(final String pipeID) {
Metric.PIPE_DATANODE_REMAINING_EVENT_COUNT.toString(),
MetricLevel.IMPORTANT,
operator,
PipeDataNodeRemainingEventAndTimeOperator::getRemainingEvents,
PipeDataNodeRemainingEventAndTimeOperator::getRemainingNonHeartbeatEvents,
Tag.NAME.toString(),
operator.getPipeName(),
Tag.CREATION_TIME.toString(),
Expand Down Expand Up @@ -403,7 +403,7 @@ public Pair<Long, Double> getRemainingEventAndTime(
remainingEventAndTimeOperatorMap.computeIfAbsent(
pipeName + "_" + creationTime,
k -> new PipeDataNodeRemainingEventAndTimeOperator(pipeName, creationTime));
return new Pair<>(operator.getRemainingEvents(), operator.getRemainingTime());
return new Pair<>(operator.getRemainingNonHeartbeatEvents(), operator.getRemainingTime());
}

//////////////////////////// singleton ////////////////////////////
Expand Down
Loading