Skip to content

Commit 2eb33ba

Browse files
Fix missing i18n for pipe log messages on ConfigNode.
Move hardcoded heartbeat and extractor-close logs into ManagerMessages with zh translations. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent a1ac7a0 commit 2eb33ba

4 files changed

Lines changed: 16 additions & 9 deletions

File tree

‎iotdb-core/confignode/src/main/i18n/en/org/apache/iotdb/confignode/i18n/ManagerMessages.java‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,12 @@ public final class ManagerMessages {
6363
public static final String DECREASE_REFERENCE_COUNT_FOR_SNAPSHOT_ERROR =
6464
"Decrease reference count for snapshot {} error.";
6565
public static final String DELETING_REGIONS_COSTS_MS = "Deleting regions costs {}ms";
66+
public static final String DETECTED_HISTORICAL_PIPE_COMPLETION_REPORT_FROM_DATANODE =
67+
"Detected historical pipe completion report from DataNode {} for pipe {}. remainingEventCount: {}, remainingTime: {}, completedDataNodes: {}";
6668
public static final String DETECTED_COMPLETION_OF_PIPE_STATIC_META_REMOVE_IT =
6769
"Detected completion of pipe {}, static meta: {}, remove it.";
70+
public static final String ALL_DATANODES_REPORTED_HISTORICAL_PIPE_COMPLETED =
71+
"All DataNodes reported historical pipe {} completed. globalRemainingEventCount: {}, globalRemainingTime: {}, staticMeta: {}";
6872
public static final String DETECT_PIPERUNTIMECRITICALEXCEPTION_FROM_AGENT_STOP_PIPE =
6973
"Detect PipeRuntimeCriticalException {} from agent, stop pipe {}.";
7074
public static final String DETECT_PIPERUNTIMESINKCRITICALEXCEPTION_FROM_AGENT_STOP_PIPE =
@@ -115,7 +119,7 @@ public final class ManagerMessages {
115119
public static final String FAILED_TO_CLOSE_CONSUMER_IN_CONSUMER_GROUP_RESULT_STATUS =
116120
"Failed to close consumer {} in consumer group {}. Result status: {}.";
117121
public static final String FAILED_TO_CLOSE_EXTRACTOR_AFTER_FAILED_TO_INITIALIZE_EXTRACTOR =
118-
"Failed to close extractor after failed to initialize extractor. ";
122+
"Failed to close extractor after failed to initialize extractor. Ignore this exception.";
119123
public static final String FAILED_TO_CLOSE_SINK_AFTER_FAILED_TO_INITIALIZE_IT_IGNORE =
120124
"Failed to close sink after failed to initialize it. Ignore this exception.";
121125
public static final String FAILED_TO_COLLECT_COMMITCREATETABLEPLAN =

‎iotdb-core/confignode/src/main/i18n/zh/org/apache/iotdb/confignode/i18n/ManagerMessages.java‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,14 @@ public final class ManagerMessages {
6363
public static final String DECREASE_REFERENCE_COUNT_FOR_SNAPSHOT_ERROR =
6464
"Decrease reference count for snapshot {} error.";
6565
public static final String DELETING_REGIONS_COSTS_MS = "Deleting regions costs {}ms";
66+
public static final String DETECTED_HISTORICAL_PIPE_COMPLETION_REPORT_FROM_DATANODE =
67+
"检测到来自 DataNode {} 的历史 pipe 完成上报,pipe {}。remainingEventCount: {}, remainingTime: {}, completedDataNodes: {}";
6668
public static final String DETECTED_COMPLETION_OF_PIPE_STATIC_META_REMOVE_IT =
67-
"Detected completion of pipe {}, static meta: {}, remove it.";
69+
"检测到 pipe {} 已完成,static meta: {},将其移除。";
70+
public static final String ALL_DATANODES_REPORTED_HISTORICAL_PIPE_COMPLETED =
71+
"所有 DataNode 均已上报历史 pipe {} 完成。globalRemainingEventCount: {}, globalRemainingTime: {}, staticMeta: {}";
6872
public static final String DETECT_PIPERUNTIMECRITICALEXCEPTION_FROM_AGENT_STOP_PIPE =
69-
"Detect PipeRuntimeCriticalException {} from agent, stop pipe {}.";
73+
"检测到 agent 上报 PipeRuntimeCriticalException {},停止 pipe {}。";
7074
public static final String DETECT_PIPERUNTIMESINKCRITICALEXCEPTION_FROM_AGENT_STOP_PIPE =
7175
"检测到 agent 上报 PipeRuntimeSinkCriticalException {},停止 pipe {}。";
7276
public static final String ENABLE_SEPARATION_OF_POWERS_IS_NOT_SUPPORTED = "不支持启用权力分离";
@@ -114,9 +118,9 @@ public final class ManagerMessages {
114118
public static final String FAILED_TO_CLOSE_CONSUMER_IN_CONSUMER_GROUP_RESULT_STATUS =
115119
"Failed to close consumer {} in consumer group {}. Result status: {}.";
116120
public static final String FAILED_TO_CLOSE_EXTRACTOR_AFTER_FAILED_TO_INITIALIZE_EXTRACTOR =
117-
"Failed to close extractor after failed to initialize extractor. ";
121+
"初始化 extractor 失败后关闭 extractor 失败,忽略此异常。";
118122
public static final String FAILED_TO_CLOSE_SINK_AFTER_FAILED_TO_INITIALIZE_IT_IGNORE =
119-
"Failed to close sink after failed to initialize it. Ignore this exception.";
123+
"初始化 sink 失败后关闭 sink 失败,忽略此异常。";
120124
public static final String FAILED_TO_COLLECT_COMMITCREATETABLEPLAN =
121125
"Failed to collect CommitCreateTablePlan";
122126
public static final String FAILED_TO_COLLECT_PIPE_META_LIST_FROM_CONFIG_NODE_TASK =

‎iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/pipe/agent/task/PipeConfigNodeSubtask.java‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,7 @@ private void initSource(final Map<String, String> sourceAttributes) throws Excep
109109
PipeLogger.log(
110110
LOGGER::warn,
111111
closeException,
112-
ManagerMessages.FAILED_TO_CLOSE_EXTRACTOR_AFTER_FAILED_TO_INITIALIZE_EXTRACTOR
113-
+ "Ignore this exception.");
112+
ManagerMessages.FAILED_TO_CLOSE_EXTRACTOR_AFTER_FAILED_TO_INITIALIZE_EXTRACTOR);
114113
}
115114
throw e;
116115
}

‎iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/pipe/coordinator/runtime/heartbeat/PipeHeartbeatParser.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ private void parseHeartbeatAndSaveMetaChangeLocally(
159159
temporaryMeta.markDataNodeCompleted(nodeId);
160160
PipeLogger.log(
161161
LOGGER::info,
162-
"Detected historical pipe completion report from DataNode {} for pipe {}. remainingEventCount: {}, remainingTime: {}, completedDataNodes: {}",
162+
ManagerMessages.DETECTED_HISTORICAL_PIPE_COMPLETION_REPORT_FROM_DATANODE,
163163
nodeId,
164164
staticMeta.getPipeName(),
165165
pipeHeartbeat.getRemainingEventCount(staticMeta),
@@ -172,7 +172,7 @@ private void parseHeartbeatAndSaveMetaChangeLocally(
172172
if (uncompletedDataNodeIds.isEmpty()) {
173173
PipeLogger.log(
174174
LOGGER::info,
175-
"All DataNodes reported historical pipe {} completed. globalRemainingEventCount: {}, globalRemainingTime: {}, staticMeta: {}",
175+
ManagerMessages.ALL_DATANODES_REPORTED_HISTORICAL_PIPE_COMPLETED,
176176
staticMeta.getPipeName(),
177177
temporaryMeta.getGlobalRemainingEvents(),
178178
temporaryMeta.getGlobalRemainingTime(),

0 commit comments

Comments
 (0)