diff --git a/external-service-impl/mqtt/src/main/i18n/en/org/apache/iotdb/mqtt/i18n/MqttMessages.java b/external-service-impl/mqtt/src/main/i18n/en/org/apache/iotdb/mqtt/i18n/MqttMessages.java index 81e24b940c605..a64a21c4e6184 100644 --- a/external-service-impl/mqtt/src/main/i18n/en/org/apache/iotdb/mqtt/i18n/MqttMessages.java +++ b/external-service-impl/mqtt/src/main/i18n/en/org/apache/iotdb/mqtt/i18n/MqttMessages.java @@ -46,9 +46,25 @@ public final class MqttMessages { public static final String FIND_MQTT_PLUGIN = "PayloadFormatManager(), find MQTT Payload Plugin {}."; public static final String MQTT_PLUGIN_JAR_URLS = "MQTT Plugin jarURLs: {}"; + public static final String UNKNOWN_PAYLOAD_FORMAT_NAMED = "Unknown payload format named: "; // --- JSONPayloadFormatter --- public static final String PAYLOAD_INVALID = "payload is invalidate"; private MqttMessages() {} + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String LOG_LINE_PATTERN_PARSING_FAILS_FAILED_LINE_MESSAGE_ARG_EXCEPTION_6EFB0EE2 = "The line pattern parsing fails, and the failed line message is {} ,exception is"; + public static final String LOG_CONNECTION_REFUSED_CLIENT_ID_MISSING_EMPTY_VALID_CLIENT_ID_REQUIRED_A566DC15 = + "Connection refused: client_id is missing or empty. A valid client_id is required to establish" + + " a connection."; + public static final String LOG_RECEIVE_PUBLISH_MESSAGE_CLIENTID_ARG_USERNAME_ARG_QOS_ARG_TOPIC_7E60C3A6 = "Receive publish message. clientId: {}, username: {}, qos: {}, topic: {}, payload: {}"; + public static final String LOG_MQTT_JSON_INSERT_ERROR_CODE_ARG_MESSAGE_ARG_B1A78FBD = "mqtt json insert error, code={}, message={}"; + public static final String LOG_MEET_ERROR_INSERTING_DATABASE_ARG_TABLE_ARG_TAGS_ARG_ATTRIBUTES_173457D5 = + "meet error when inserting database {}, table {}, tags {}, attributes {}, fields {}, at time" + + " {}, because "; + public static final String LOG_MEET_ERROR_INSERTING_DEVICE_ARG_MEASUREMENTS_ARG_AT_TIME_ARG_680D67D2 = "meet error when inserting device {}, measurements {}, at time {}, because "; + public static final String LOG_START_MQTT_SERVICE_SUCCESSFULLY_LISTENING_IP_ARG_PORT_ARG_47CE46D5 = "Start MQTT service successfully, listening on ip {} port {}"; + } diff --git a/external-service-impl/mqtt/src/main/i18n/zh/org/apache/iotdb/mqtt/i18n/MqttMessages.java b/external-service-impl/mqtt/src/main/i18n/zh/org/apache/iotdb/mqtt/i18n/MqttMessages.java index eb9b4dc62c5f5..21290b3802622 100644 --- a/external-service-impl/mqtt/src/main/i18n/zh/org/apache/iotdb/mqtt/i18n/MqttMessages.java +++ b/external-service-impl/mqtt/src/main/i18n/zh/org/apache/iotdb/mqtt/i18n/MqttMessages.java @@ -46,9 +46,21 @@ public final class MqttMessages { public static final String FIND_MQTT_PLUGIN = "PayloadFormatManager(),找到 MQTT Payload 插件 {}。"; public static final String MQTT_PLUGIN_JAR_URLS = "MQTT 插件 jarURLs:{}"; + public static final String UNKNOWN_PAYLOAD_FORMAT_NAMED = "未知 payload 格式名称:"; // --- JSONPayloadFormatter --- public static final String PAYLOAD_INVALID = "payload 无效"; private MqttMessages() {} + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String LOG_LINE_PATTERN_PARSING_FAILS_FAILED_LINE_MESSAGE_ARG_EXCEPTION_6EFB0EE2 = "行模式解析失败,失败的行消息为 {},异常为"; + public static final String LOG_CONNECTION_REFUSED_CLIENT_ID_MISSING_EMPTY_VALID_CLIENT_ID_REQUIRED_A566DC15 = "连接被拒绝:client_id 缺失或为空。建立连接需要有效的 client_id。"; + public static final String LOG_RECEIVE_PUBLISH_MESSAGE_CLIENTID_ARG_USERNAME_ARG_QOS_ARG_TOPIC_7E60C3A6 = "收到 publish 消息。clientId: {}, 用户名: {}, qos: {}, 主题: {}, payload: {}"; + public static final String LOG_MQTT_JSON_INSERT_ERROR_CODE_ARG_MESSAGE_ARG_B1A78FBD = "MQTT JSON 插入错误,code={},消息={}"; + public static final String LOG_MEET_ERROR_INSERTING_DATABASE_ARG_TABLE_ARG_TAGS_ARG_ATTRIBUTES_173457D5 = "插入数据库 {}、表 {}、标签 {}、属性 {}、字段 {}、时间 {} 时遇到错误,原因:"; + public static final String LOG_MEET_ERROR_INSERTING_DEVICE_ARG_MEASUREMENTS_ARG_AT_TIME_ARG_680D67D2 = "插入设备 {}、测点 {}、时间 {} 时遇到错误,原因:"; + public static final String LOG_START_MQTT_SERVICE_SUCCESSFULLY_LISTENING_IP_ARG_PORT_ARG_47CE46D5 = "MQTT 服务启动成功,监听 IP {},端口 {}"; + } diff --git a/external-service-impl/mqtt/src/main/java/org/apache/iotdb/mqtt/LinePayloadFormatter.java b/external-service-impl/mqtt/src/main/java/org/apache/iotdb/mqtt/LinePayloadFormatter.java index 3c8b9ae044d3d..3dc40f5fde2ea 100644 --- a/external-service-impl/mqtt/src/main/java/org/apache/iotdb/mqtt/LinePayloadFormatter.java +++ b/external-service-impl/mqtt/src/main/java/org/apache/iotdb/mqtt/LinePayloadFormatter.java @@ -122,7 +122,7 @@ public List format(String topic, ByteBuf payload) { messages.add(message); } catch (Exception e) { log.warn( - "The line pattern parsing fails, and the failed line message is {} ,exception is", + MqttMessages.LOG_LINE_PATTERN_PARSING_FAILS_FAILED_LINE_MESSAGE_ARG_EXCEPTION_6EFB0EE2, line, e); } diff --git a/external-service-impl/mqtt/src/main/java/org/apache/iotdb/mqtt/MPPPublishHandler.java b/external-service-impl/mqtt/src/main/java/org/apache/iotdb/mqtt/MPPPublishHandler.java index 60e22ebd9dcc7..72bf4c1260020 100644 --- a/external-service-impl/mqtt/src/main/java/org/apache/iotdb/mqtt/MPPPublishHandler.java +++ b/external-service-impl/mqtt/src/main/java/org/apache/iotdb/mqtt/MPPPublishHandler.java @@ -95,7 +95,8 @@ public String getID() { public void onConnect(InterceptConnectMessage msg) { if (msg.getClientID() == null || msg.getClientID().trim().isEmpty()) { LOG.error( - "Connection refused: client_id is missing or empty. A valid client_id is required to establish a connection."); + MqttMessages + .LOG_CONNECTION_REFUSED_CLIENT_ID_MISSING_EMPTY_VALID_CLIENT_ID_REQUIRED_A566DC15); } if (!clientIdToSessionMap.containsKey(msg.getClientID())) { MqttClientSession session = new MqttClientSession(msg.getClientID()); @@ -136,7 +137,8 @@ public void onPublish(InterceptPublishMessage msg) { String username = msg.getUsername(); MqttQoS qos = msg.getQos(); LOG.debug( - "Receive publish message. clientId: {}, username: {}, qos: {}, topic: {}, payload: {}", + MqttMessages + .LOG_RECEIVE_PUBLISH_MESSAGE_CLIENTID_ARG_USERNAME_ARG_QOS_ARG_TOPIC_7E60C3A6, clientId, username, qos, @@ -197,13 +199,13 @@ private void insertTable(TableMessage message, MqttClientSession session) { if (tsStatus.getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode() && tsStatus.getCode() != TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode()) { LOG.warn( - "mqtt json insert error, code={}, message={}", + MqttMessages.LOG_MQTT_JSON_INSERT_ERROR_CODE_ARG_MESSAGE_ARG_B1A78FBD, tsStatus.getCode(), tsStatus.getMessage()); } } catch (Exception e) { LOG.warn( - "meet error when inserting database {}, table {}, tags {}, attributes {}, fields {}, at time {}, because ", + MqttMessages.LOG_MEET_ERROR_INSERTING_DATABASE_ARG_TABLE_ARG_TAGS_ARG_ATTRIBUTES_173457D5, message.getDatabase(), message.getTable(), message.getTagKeys(), @@ -316,14 +318,14 @@ private void insertTree(TreeMessage message, MqttClientSession session) { if (tsStatus.getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode() && tsStatus.getCode() != TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode()) { LOG.warn( - "mqtt json insert error, code={}, message={}", + MqttMessages.LOG_MQTT_JSON_INSERT_ERROR_CODE_ARG_MESSAGE_ARG_B1A78FBD, tsStatus.getCode(), tsStatus.getMessage()); } } } catch (Exception e) { LOG.warn( - "meet error when inserting device {}, measurements {}, at time {}, because ", + MqttMessages.LOG_MEET_ERROR_INSERTING_DEVICE_ARG_MEASUREMENTS_ARG_AT_TIME_ARG_680D67D2, message.getDevice(), message.getMeasurements(), message.getTimestamp(), diff --git a/external-service-impl/mqtt/src/main/java/org/apache/iotdb/mqtt/MQTTService.java b/external-service-impl/mqtt/src/main/java/org/apache/iotdb/mqtt/MQTTService.java index 7c9ed2d475501..aec315b043a98 100644 --- a/external-service-impl/mqtt/src/main/java/org/apache/iotdb/mqtt/MQTTService.java +++ b/external-service-impl/mqtt/src/main/java/org/apache/iotdb/mqtt/MQTTService.java @@ -67,7 +67,7 @@ public void startup() { } LOG.info( - "Start MQTT service successfully, listening on ip {} port {}", + MqttMessages.LOG_START_MQTT_SERVICE_SUCCESSFULLY_LISTENING_IP_ARG_PORT_ARG_47CE46D5, iotDBConfig.getMqttHost(), iotDBConfig.getMqttPort()); diff --git a/external-service-impl/mqtt/src/main/java/org/apache/iotdb/mqtt/PayloadFormatManager.java b/external-service-impl/mqtt/src/main/java/org/apache/iotdb/mqtt/PayloadFormatManager.java index 80bf09f4efc98..94ca77a8178e0 100644 --- a/external-service-impl/mqtt/src/main/java/org/apache/iotdb/mqtt/PayloadFormatManager.java +++ b/external-service-impl/mqtt/src/main/java/org/apache/iotdb/mqtt/PayloadFormatManager.java @@ -67,7 +67,8 @@ private static void init() { public static PayloadFormatter getPayloadFormat(String name) { PayloadFormatter formatter = mqttPayloadPluginMap.get(name); - Preconditions.checkArgument(formatter != null, "Unknown payload format named: " + name); + Preconditions.checkArgument( + formatter != null, MqttMessages.UNKNOWN_PAYLOAD_FORMAT_NAMED + name); return formatter; } diff --git a/external-service-impl/rest/src/main/i18n/en/org/apache/iotdb/rest/i18n/RestMessages.java b/external-service-impl/rest/src/main/i18n/en/org/apache/iotdb/rest/i18n/RestMessages.java index bbe6f60a363bb..1b4bf36432cac 100644 --- a/external-service-impl/rest/src/main/i18n/en/org/apache/iotdb/rest/i18n/RestMessages.java +++ b/external-service-impl/rest/src/main/i18n/en/org/apache/iotdb/rest/i18n/RestMessages.java @@ -31,6 +31,53 @@ public final class RestMessages { // --- RequestValidationHandler (v2) --- public static final String PREFIX_PATHS_EMPTY = "prefix_paths should not be empty"; + public static final String SQL_SHOULD_NOT_BE_NULL = "sql should not be null"; + public static final String ROW_LIMIT_SHOULD_BE_POSITIVE = "row_limit should be positive"; + public static final String ROW_LIMIT_CAMEL_SHOULD_BE_POSITIVE = "rowLimit should be positive"; + public static final String PREFIX_PATHS_NOT_NULL = "prefix_paths should not be null"; + public static final String TIMESTAMPS_NOT_NULL = "timestamps should not be null"; + public static final String IS_ALIGNED_NOT_NULL = "is_aligned should not be null"; + public static final String IS_ALIGNED_CAMEL_NOT_NULL = "isAligned should not be null"; + public static final String DEVICE_NOT_NULL = "device should not be null"; + public static final String DEVICE_ID_NOT_NULL = "deviceId should not be null"; + public static final String DATA_TYPES_NOT_NULL = "data_types should not be null"; + public static final String DATA_TYPES_CAMEL_NOT_NULL = "dataTypes should not be null"; + public static final String MEASUREMENTS_NOT_NULL = "measurements should not be null"; + public static final String VALUES_NOT_NULL = "values should not be null"; + public static final String DEVICES_NOT_NULL = "devices should not be null"; + public static final String DATA_TYPES_LIST_NOT_NULL = "data_types_list should not be null"; + public static final String VALUES_LIST_NOT_NULL = "values_list should not be null"; + public static final String MEASUREMENTS_LIST_NOT_NULL = "measurements_list should not be null"; + public static final String EXPRESSION_NOT_NULL = "expression should not be null"; + public static final String PREFIX_PATH_NOT_NULL = "prefix_path should not be null"; + public static final String PREFIX_PATH_CAMEL_NOT_NULL = "prefixPath should not be null"; + public static final String START_TIME_NOT_NULL = "start_time should not be null"; + public static final String START_TIME_CAMEL_NOT_NULL = "startTime should not be null"; + public static final String END_TIME_NOT_NULL = "end_time should not be null"; + public static final String END_TIME_CAMEL_NOT_NULL = "endTime should not be null"; + public static final String DATABASE_NOT_NULL = "database should not be null"; + public static final String TABLE_NOT_NULL = "table should not be null"; + public static final String COLUMN_NAMES_NOT_NULL = "column_names should not be null"; + public static final String COLUMN_CATEGORIES_NOT_NULL = + "column_categories should not be null"; + public static final String COLUMN_NAMES_AND_COLUMN_CATEGORIES_SIZE_MISMATCH = + "column_names and column_categories should have the same size"; + public static final String COLUMN_CATEGORIES_AND_DATA_TYPES_SIZE_MISMATCH = + "column_categories and data_types should have the same size"; + public static final String VALUES_AND_TIMESTAMPS_SIZE_MISMATCH = + "values and timestamps should have the same size"; + public static final String ILLEGAL_TABLE_DATA_TYPE = + "The %s data type of %s is illegal"; + public static final String ILLEGAL_DEVICE_MEASUREMENT_DATA_TYPE = + "The %s data type of %s.%s is illegal"; + public static final String ROW_VALUES_SIZE_MISMATCH = + "The number of values in the %dth row is not equal to the data_types size"; + public static final String ERROR_MESSAGE_SEPARATOR = ","; private RestMessages() {} + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_0521CEDE = "unsupported data type: "; + } diff --git a/external-service-impl/rest/src/main/i18n/zh/org/apache/iotdb/rest/i18n/RestMessages.java b/external-service-impl/rest/src/main/i18n/zh/org/apache/iotdb/rest/i18n/RestMessages.java index db2742dfd171a..23f3475cdc4cc 100644 --- a/external-service-impl/rest/src/main/i18n/zh/org/apache/iotdb/rest/i18n/RestMessages.java +++ b/external-service-impl/rest/src/main/i18n/zh/org/apache/iotdb/rest/i18n/RestMessages.java @@ -31,6 +31,51 @@ public final class RestMessages { // --- RequestValidationHandler (v2) --- public static final String PREFIX_PATHS_EMPTY = "prefix_paths 不能为空"; + public static final String SQL_SHOULD_NOT_BE_NULL = "sql 不能为空"; + public static final String ROW_LIMIT_SHOULD_BE_POSITIVE = "row_limit 应为正数"; + public static final String ROW_LIMIT_CAMEL_SHOULD_BE_POSITIVE = "rowLimit 应为正数"; + public static final String PREFIX_PATHS_NOT_NULL = "prefix_paths 不能为空"; + public static final String TIMESTAMPS_NOT_NULL = "timestamps 不能为空"; + public static final String IS_ALIGNED_NOT_NULL = "is_aligned 不能为空"; + public static final String IS_ALIGNED_CAMEL_NOT_NULL = "isAligned 不能为空"; + public static final String DEVICE_NOT_NULL = "device 不能为空"; + public static final String DEVICE_ID_NOT_NULL = "deviceId 不能为空"; + public static final String DATA_TYPES_NOT_NULL = "data_types 不能为空"; + public static final String DATA_TYPES_CAMEL_NOT_NULL = "dataTypes 不能为空"; + public static final String MEASUREMENTS_NOT_NULL = "measurements 不能为空"; + public static final String VALUES_NOT_NULL = "values 不能为空"; + public static final String DEVICES_NOT_NULL = "devices 不能为空"; + public static final String DATA_TYPES_LIST_NOT_NULL = "data_types_list 不能为空"; + public static final String VALUES_LIST_NOT_NULL = "values_list 不能为空"; + public static final String MEASUREMENTS_LIST_NOT_NULL = "measurements_list 不能为空"; + public static final String EXPRESSION_NOT_NULL = "expression 不能为空"; + public static final String PREFIX_PATH_NOT_NULL = "prefix_path 不能为空"; + public static final String PREFIX_PATH_CAMEL_NOT_NULL = "prefixPath 不能为空"; + public static final String START_TIME_NOT_NULL = "start_time 不能为空"; + public static final String START_TIME_CAMEL_NOT_NULL = "startTime 不能为空"; + public static final String END_TIME_NOT_NULL = "end_time 不能为空"; + public static final String END_TIME_CAMEL_NOT_NULL = "endTime 不能为空"; + public static final String DATABASE_NOT_NULL = "database 不能为空"; + public static final String TABLE_NOT_NULL = "table 不能为空"; + public static final String COLUMN_NAMES_NOT_NULL = "column_names 不能为空"; + public static final String COLUMN_CATEGORIES_NOT_NULL = "column_categories 不能为空"; + public static final String COLUMN_NAMES_AND_COLUMN_CATEGORIES_SIZE_MISMATCH = + "column_names 和 column_categories 的数量应相同"; + public static final String COLUMN_CATEGORIES_AND_DATA_TYPES_SIZE_MISMATCH = + "column_categories 和 data_types 的数量应相同"; + public static final String VALUES_AND_TIMESTAMPS_SIZE_MISMATCH = + "values 和 timestamps 的数量应相同"; + public static final String ILLEGAL_TABLE_DATA_TYPE = "%s 是 %s 的非法数据类型"; + public static final String ILLEGAL_DEVICE_MEASUREMENT_DATA_TYPE = + "%s 是 %s.%s 的非法数据类型"; + public static final String ROW_VALUES_SIZE_MISMATCH = + "第 %d 行的 values 数量与 data_types 数量不相等"; + public static final String ERROR_MESSAGE_SEPARATOR = ","; private RestMessages() {} + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_0521CEDE = "不支持的数据类型: "; + } diff --git a/external-service-impl/rest/src/main/java/org/apache/iotdb/rest/protocol/table/v1/handler/RequestValidationHandler.java b/external-service-impl/rest/src/main/java/org/apache/iotdb/rest/protocol/table/v1/handler/RequestValidationHandler.java index fc546212caf43..8bab22426fe7e 100644 --- a/external-service-impl/rest/src/main/java/org/apache/iotdb/rest/protocol/table/v1/handler/RequestValidationHandler.java +++ b/external-service-impl/rest/src/main/java/org/apache/iotdb/rest/protocol/table/v1/handler/RequestValidationHandler.java @@ -17,6 +17,7 @@ package org.apache.iotdb.rest.protocol.table.v1.handler; +import org.apache.iotdb.rest.i18n.RestMessages; import org.apache.iotdb.rest.protocol.table.v1.model.InsertTabletRequest; import org.apache.iotdb.rest.protocol.table.v1.model.SQL; @@ -32,40 +33,41 @@ public class RequestValidationHandler { private RequestValidationHandler() {} public static void validateSQL(SQL sql) { - Objects.requireNonNull(sql.getSql(), "sql should not be null"); + Objects.requireNonNull(sql.getSql(), RestMessages.SQL_SHOULD_NOT_BE_NULL); if (sql.getRowLimit() != null) { - Validate.isTrue(sql.getRowLimit() > 0, "row_limit should be positive"); + Validate.isTrue(sql.getRowLimit() > 0, RestMessages.ROW_LIMIT_SHOULD_BE_POSITIVE); } } public static void validateInsertTabletRequest(InsertTabletRequest insertTabletRequest) { - Objects.requireNonNull(insertTabletRequest.getDatabase(), "database should not be null"); - Objects.requireNonNull(insertTabletRequest.getTable(), "table should not be null"); - Objects.requireNonNull(insertTabletRequest.getColumnNames(), "column_names should not be null"); + Objects.requireNonNull(insertTabletRequest.getDatabase(), RestMessages.DATABASE_NOT_NULL); + Objects.requireNonNull(insertTabletRequest.getTable(), RestMessages.TABLE_NOT_NULL); Objects.requireNonNull( - insertTabletRequest.getColumnCategories(), "column_categories should not be null"); - Objects.requireNonNull(insertTabletRequest.getDataTypes(), "data_types should not be null"); - Objects.requireNonNull(insertTabletRequest.getTimestamps(), "timestamps should not be null"); - Objects.requireNonNull(insertTabletRequest.getValues(), "values should not be null"); + insertTabletRequest.getColumnNames(), RestMessages.COLUMN_NAMES_NOT_NULL); + Objects.requireNonNull( + insertTabletRequest.getColumnCategories(), RestMessages.COLUMN_CATEGORIES_NOT_NULL); + Objects.requireNonNull(insertTabletRequest.getDataTypes(), RestMessages.DATA_TYPES_NOT_NULL); + Objects.requireNonNull(insertTabletRequest.getTimestamps(), RestMessages.TIMESTAMPS_NOT_NULL); + Objects.requireNonNull(insertTabletRequest.getValues(), RestMessages.VALUES_NOT_NULL); List errorMessages = new ArrayList<>(); String table = insertTabletRequest.getTable(); if (insertTabletRequest.getColumnCategories().size() == 0 || insertTabletRequest.getColumnCategories().size() != insertTabletRequest.getColumnNames().size()) { - errorMessages.add("column_names and column_categories should have the same size"); + errorMessages.add(RestMessages.COLUMN_NAMES_AND_COLUMN_CATEGORIES_SIZE_MISMATCH); } if (insertTabletRequest.getColumnCategories().size() != insertTabletRequest.getDataTypes().size()) { - errorMessages.add("column_categories and data_types should have the same size"); + errorMessages.add(RestMessages.COLUMN_CATEGORIES_AND_DATA_TYPES_SIZE_MISMATCH); } if (insertTabletRequest.getTimestamps().size() != insertTabletRequest.getValues().size()) { - errorMessages.add("values and timestamps should have the same size"); + errorMessages.add(RestMessages.VALUES_AND_TIMESTAMPS_SIZE_MISMATCH); } for (int i = 0; i < insertTabletRequest.getDataTypes().size(); i++) { String dataType = insertTabletRequest.getDataTypes().get(i); if (isDataType(dataType)) { - errorMessages.add("The " + dataType + " data type of " + table + " is illegal"); + errorMessages.add(String.format(RestMessages.ILLEGAL_TABLE_DATA_TYPE, dataType, table)); } } @@ -73,15 +75,12 @@ public static void validateInsertTabletRequest(InsertTabletRequest insertTabletR for (int i = 0; i < insertTabletRequest.getValues().size(); i++) { List values = insertTabletRequest.getValues().get(i); if (dataTypeSize != values.size()) { - errorMessages.add( - "The number of values in the " - + (i + 1) - + "th row is not equal to the data_types size"); + errorMessages.add(String.format(RestMessages.ROW_VALUES_SIZE_MISMATCH, i + 1)); } } if (!errorMessages.isEmpty()) { - throw new RuntimeException(String.join(",", errorMessages)); + throw new RuntimeException(String.join(RestMessages.ERROR_MESSAGE_SEPARATOR, errorMessages)); } } diff --git a/external-service-impl/rest/src/main/java/org/apache/iotdb/rest/protocol/table/v1/handler/StatementConstructionHandler.java b/external-service-impl/rest/src/main/java/org/apache/iotdb/rest/protocol/table/v1/handler/StatementConstructionHandler.java index 28cf4d0c1b196..5836fbf0bacdd 100644 --- a/external-service-impl/rest/src/main/java/org/apache/iotdb/rest/protocol/table/v1/handler/StatementConstructionHandler.java +++ b/external-service-impl/rest/src/main/java/org/apache/iotdb/rest/protocol/table/v1/handler/StatementConstructionHandler.java @@ -95,7 +95,8 @@ public static InsertTabletStatement constructInsertTabletStatement( intValues[rowIndex] = (int) object; } else { throw new WriteProcessRejectException( - "unsupported data type: " + object.getClass().toString()); + RestMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_0521CEDE + + object.getClass().toString()); } } columns[columnIndex] = intValues; @@ -113,7 +114,8 @@ public static InsertTabletStatement constructInsertTabletStatement( longValues[rowIndex] = (long) object; } else { throw new WriteProcessRejectException( - "unsupported data type: " + object.getClass().toString()); + RestMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_0521CEDE + + object.getClass().toString()); } } columns[columnIndex] = longValues; diff --git a/external-service-impl/rest/src/main/java/org/apache/iotdb/rest/protocol/v1/handler/RequestValidationHandler.java b/external-service-impl/rest/src/main/java/org/apache/iotdb/rest/protocol/v1/handler/RequestValidationHandler.java index dc81322cc7880..9a01bffb249dd 100644 --- a/external-service-impl/rest/src/main/java/org/apache/iotdb/rest/protocol/v1/handler/RequestValidationHandler.java +++ b/external-service-impl/rest/src/main/java/org/apache/iotdb/rest/protocol/v1/handler/RequestValidationHandler.java @@ -17,6 +17,7 @@ package org.apache.iotdb.rest.protocol.v1.handler; +import org.apache.iotdb.rest.i18n.RestMessages; import org.apache.iotdb.rest.protocol.v1.model.ExpressionRequest; import org.apache.iotdb.rest.protocol.v1.model.InsertTabletRequest; import org.apache.iotdb.rest.protocol.v1.model.SQL; @@ -30,24 +31,28 @@ public class RequestValidationHandler { private RequestValidationHandler() {} public static void validateSQL(SQL sql) { - Objects.requireNonNull(sql.getSql(), "sql should not be null"); + Objects.requireNonNull(sql.getSql(), RestMessages.SQL_SHOULD_NOT_BE_NULL); if (sql.getRowLimit() != null) { - Validate.isTrue(sql.getRowLimit() > 0, "rowLimit should be positive"); + Validate.isTrue(sql.getRowLimit() > 0, RestMessages.ROW_LIMIT_CAMEL_SHOULD_BE_POSITIVE); } } public static void validateInsertTabletRequest(InsertTabletRequest insertTabletRequest) { - Objects.requireNonNull(insertTabletRequest.getTimestamps(), "timestamps should not be null"); - Objects.requireNonNull(insertTabletRequest.getIsAligned(), "isAligned should not be null"); - Objects.requireNonNull(insertTabletRequest.getDeviceId(), "deviceId should not be null"); - Objects.requireNonNull(insertTabletRequest.getDataTypes(), "dataTypes should not be null"); - Objects.requireNonNull(insertTabletRequest.getValues(), "values should not be null"); + Objects.requireNonNull(insertTabletRequest.getTimestamps(), RestMessages.TIMESTAMPS_NOT_NULL); + Objects.requireNonNull( + insertTabletRequest.getIsAligned(), RestMessages.IS_ALIGNED_CAMEL_NOT_NULL); + Objects.requireNonNull(insertTabletRequest.getDeviceId(), RestMessages.DEVICE_ID_NOT_NULL); + Objects.requireNonNull( + insertTabletRequest.getDataTypes(), RestMessages.DATA_TYPES_CAMEL_NOT_NULL); + Objects.requireNonNull(insertTabletRequest.getValues(), RestMessages.VALUES_NOT_NULL); } public static void validateExpressionRequest(ExpressionRequest expressionRequest) { - Objects.requireNonNull(expressionRequest.getExpression(), "expression should not be null"); - Objects.requireNonNull(expressionRequest.getPrefixPath(), "prefixPath should not be null"); - Objects.requireNonNull(expressionRequest.getStartTime(), "startTime should not be null"); - Objects.requireNonNull(expressionRequest.getEndTime(), "endTime should not be null"); + Objects.requireNonNull(expressionRequest.getExpression(), RestMessages.EXPRESSION_NOT_NULL); + Objects.requireNonNull( + expressionRequest.getPrefixPath(), RestMessages.PREFIX_PATH_CAMEL_NOT_NULL); + Objects.requireNonNull( + expressionRequest.getStartTime(), RestMessages.START_TIME_CAMEL_NOT_NULL); + Objects.requireNonNull(expressionRequest.getEndTime(), RestMessages.END_TIME_CAMEL_NOT_NULL); } } diff --git a/external-service-impl/rest/src/main/java/org/apache/iotdb/rest/protocol/v1/handler/StatementConstructionHandler.java b/external-service-impl/rest/src/main/java/org/apache/iotdb/rest/protocol/v1/handler/StatementConstructionHandler.java index 9fbd9ac669683..6f9eee2e87a4e 100644 --- a/external-service-impl/rest/src/main/java/org/apache/iotdb/rest/protocol/v1/handler/StatementConstructionHandler.java +++ b/external-service-impl/rest/src/main/java/org/apache/iotdb/rest/protocol/v1/handler/StatementConstructionHandler.java @@ -96,7 +96,8 @@ public static InsertTabletStatement constructInsertTabletStatement( intValues[rowIndex] = (int) object; } else { throw new WriteProcessRejectException( - "unsupported data type: " + object.getClass().toString()); + RestMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_0521CEDE + + object.getClass().toString()); } } columns[columnIndex] = intValues; @@ -114,7 +115,8 @@ public static InsertTabletStatement constructInsertTabletStatement( longValues[rowIndex] = (long) object; } else { throw new WriteProcessRejectException( - "unsupported data type: " + object.getClass().toString()); + RestMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_0521CEDE + + object.getClass().toString()); } } columns[columnIndex] = longValues; diff --git a/external-service-impl/rest/src/main/java/org/apache/iotdb/rest/protocol/v2/handler/RequestValidationHandler.java b/external-service-impl/rest/src/main/java/org/apache/iotdb/rest/protocol/v2/handler/RequestValidationHandler.java index b5b5858de5603..01cc4ea7ae216 100644 --- a/external-service-impl/rest/src/main/java/org/apache/iotdb/rest/protocol/v2/handler/RequestValidationHandler.java +++ b/external-service-impl/rest/src/main/java/org/apache/iotdb/rest/protocol/v2/handler/RequestValidationHandler.java @@ -36,27 +36,27 @@ public class RequestValidationHandler { private RequestValidationHandler() {} public static void validateSQL(SQL sql) { - Objects.requireNonNull(sql.getSql(), "sql should not be null"); + Objects.requireNonNull(sql.getSql(), RestMessages.SQL_SHOULD_NOT_BE_NULL); if (sql.getRowLimit() != null) { - Validate.isTrue(sql.getRowLimit() > 0, "row_limit should be positive"); + Validate.isTrue(sql.getRowLimit() > 0, RestMessages.ROW_LIMIT_SHOULD_BE_POSITIVE); } } public static void validatePrefixPaths(PrefixPathList prefixPathList) { - Objects.requireNonNull(prefixPathList.getPrefixPaths(), "prefix_paths should not be null"); + Objects.requireNonNull(prefixPathList.getPrefixPaths(), RestMessages.PREFIX_PATHS_NOT_NULL); if (prefixPathList.getPrefixPaths().isEmpty()) { throw new IllegalArgumentException(RestMessages.PREFIX_PATHS_EMPTY); } } public static void validateInsertTabletRequest(InsertTabletRequest insertTabletRequest) { - Objects.requireNonNull(insertTabletRequest.getTimestamps(), "timestamps should not be null"); - Objects.requireNonNull(insertTabletRequest.getIsAligned(), "is_aligned should not be null"); - Objects.requireNonNull(insertTabletRequest.getDevice(), "device should not be null"); - Objects.requireNonNull(insertTabletRequest.getDataTypes(), "data_types should not be null"); + Objects.requireNonNull(insertTabletRequest.getTimestamps(), RestMessages.TIMESTAMPS_NOT_NULL); + Objects.requireNonNull(insertTabletRequest.getIsAligned(), RestMessages.IS_ALIGNED_NOT_NULL); + Objects.requireNonNull(insertTabletRequest.getDevice(), RestMessages.DEVICE_NOT_NULL); + Objects.requireNonNull(insertTabletRequest.getDataTypes(), RestMessages.DATA_TYPES_NOT_NULL); Objects.requireNonNull( - insertTabletRequest.getMeasurements(), "measurements should not be null"); - Objects.requireNonNull(insertTabletRequest.getValues(), "values should not be null"); + insertTabletRequest.getMeasurements(), RestMessages.MEASUREMENTS_NOT_NULL); + Objects.requireNonNull(insertTabletRequest.getValues(), RestMessages.VALUES_NOT_NULL); List errorMessages = new ArrayList<>(); String device = insertTabletRequest.getDevice(); for (int i = 0; i < insertTabletRequest.getMeasurements().size(); i++) { @@ -64,23 +64,24 @@ public static void validateInsertTabletRequest(InsertTabletRequest insertTabletR String measurement = insertTabletRequest.getMeasurements().get(i); if (isDataType(dataType)) { errorMessages.add( - "The " + dataType + " data type of " + device + "." + measurement + " is illegal"); + String.format( + RestMessages.ILLEGAL_DEVICE_MEASUREMENT_DATA_TYPE, dataType, device, measurement)); } } if (!errorMessages.isEmpty()) { - throw new RuntimeException(String.join(",", errorMessages)); + throw new RuntimeException(String.join(RestMessages.ERROR_MESSAGE_SEPARATOR, errorMessages)); } } public static void validateInsertRecordsRequest(InsertRecordsRequest insertRecordsRequest) { - Objects.requireNonNull(insertRecordsRequest.getTimestamps(), "timestamps should not be null"); - Objects.requireNonNull(insertRecordsRequest.getIsAligned(), "is_aligned should not be null"); - Objects.requireNonNull(insertRecordsRequest.getDevices(), "devices should not be null"); + Objects.requireNonNull(insertRecordsRequest.getTimestamps(), RestMessages.TIMESTAMPS_NOT_NULL); + Objects.requireNonNull(insertRecordsRequest.getIsAligned(), RestMessages.IS_ALIGNED_NOT_NULL); + Objects.requireNonNull(insertRecordsRequest.getDevices(), RestMessages.DEVICES_NOT_NULL); Objects.requireNonNull( - insertRecordsRequest.getDataTypesList(), "data_types_list should not be null"); - Objects.requireNonNull(insertRecordsRequest.getValuesList(), "values_list should not be null"); + insertRecordsRequest.getDataTypesList(), RestMessages.DATA_TYPES_LIST_NOT_NULL); + Objects.requireNonNull(insertRecordsRequest.getValuesList(), RestMessages.VALUES_LIST_NOT_NULL); Objects.requireNonNull( - insertRecordsRequest.getMeasurementsList(), "measurements_list should not be null"); + insertRecordsRequest.getMeasurementsList(), RestMessages.MEASUREMENTS_LIST_NOT_NULL); List errorMessages = new ArrayList<>(); for (int i = 0; i < insertRecordsRequest.getDataTypesList().size(); i++) { String device = insertRecordsRequest.getDevices().get(i); @@ -90,12 +91,16 @@ public static void validateInsertRecordsRequest(InsertRecordsRequest insertRecor String measurement = measurements.get(c); if (isDataType(dataType)) { errorMessages.add( - "The " + dataType + " data type of " + device + "." + measurement + " is illegal"); + String.format( + RestMessages.ILLEGAL_DEVICE_MEASUREMENT_DATA_TYPE, + dataType, + device, + measurement)); } } } if (!errorMessages.isEmpty()) { - throw new RuntimeException(String.join(",", errorMessages)); + throw new RuntimeException(String.join(RestMessages.ERROR_MESSAGE_SEPARATOR, errorMessages)); } } @@ -109,9 +114,9 @@ private static boolean isDataType(String dataType) { } public static void validateExpressionRequest(ExpressionRequest expressionRequest) { - Objects.requireNonNull(expressionRequest.getExpression(), "expression should not be null"); - Objects.requireNonNull(expressionRequest.getPrefixPath(), "prefix_path should not be null"); - Objects.requireNonNull(expressionRequest.getStartTime(), "start_time should not be null"); - Objects.requireNonNull(expressionRequest.getEndTime(), "end_time should not be null"); + Objects.requireNonNull(expressionRequest.getExpression(), RestMessages.EXPRESSION_NOT_NULL); + Objects.requireNonNull(expressionRequest.getPrefixPath(), RestMessages.PREFIX_PATH_NOT_NULL); + Objects.requireNonNull(expressionRequest.getStartTime(), RestMessages.START_TIME_NOT_NULL); + Objects.requireNonNull(expressionRequest.getEndTime(), RestMessages.END_TIME_NOT_NULL); } } diff --git a/external-service-impl/rest/src/main/java/org/apache/iotdb/rest/protocol/v2/handler/StatementConstructionHandler.java b/external-service-impl/rest/src/main/java/org/apache/iotdb/rest/protocol/v2/handler/StatementConstructionHandler.java index 679c4556e90c0..50d365535ae23 100644 --- a/external-service-impl/rest/src/main/java/org/apache/iotdb/rest/protocol/v2/handler/StatementConstructionHandler.java +++ b/external-service-impl/rest/src/main/java/org/apache/iotdb/rest/protocol/v2/handler/StatementConstructionHandler.java @@ -106,7 +106,8 @@ public static InsertTabletStatement constructInsertTabletStatement( intValues[rowIndex] = (int) object; } else { throw new WriteProcessRejectException( - "unsupported data type: " + object.getClass().toString()); + RestMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_0521CEDE + + object.getClass().toString()); } } columns[columnIndex] = intValues; @@ -124,7 +125,8 @@ public static InsertTabletStatement constructInsertTabletStatement( longValues[rowIndex] = (long) object; } else { throw new WriteProcessRejectException( - "unsupported data type: " + object.getClass().toString()); + RestMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_0521CEDE + + object.getClass().toString()); } } columns[columnIndex] = longValues; diff --git a/iotdb-client/cli/src/main/i18n/en/org/apache/iotdb/cli/i18n/CliMessages.java b/iotdb-client/cli/src/main/i18n/en/org/apache/iotdb/cli/i18n/CliMessages.java index cdc272c13fa1a..9a877ca9d3c3b 100644 --- a/iotdb-client/cli/src/main/i18n/en/org/apache/iotdb/cli/i18n/CliMessages.java +++ b/iotdb-client/cli/src/main/i18n/en/org/apache/iotdb/cli/i18n/CliMessages.java @@ -67,4 +67,27 @@ public final class CliMessages { public static final String CANNOT_CONVERT = "%s can not convert to %s"; private CliMessages() {} + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String EXCEPTION_HANDSHAKE_ERROR_TARGET_SERVER_IP_ARG_PORT_ARG_BECAUSE_ARG_9D522E62 = "Handshake error with target server ip: %s, port: %s, because: %s."; + public static final String EXCEPTION_NETWORK_ERROR_SEAL_FILE_ARG_BECAUSE_ARG_62E92EE8 = "Network error when seal file %s, because %s."; + public static final String EXCEPTION_SEAL_FILE_ARG_ERROR_RESULT_STATUS_ARG_FE3B82AC = "Seal file %s error, result status %s."; + public static final String EXCEPTION_NETWORK_ERROR_TRANSFER_FILE_ARG_BECAUSE_ARG_BC25323C = "Network error when transfer file %s, because %s."; + public static final String EXCEPTION_TRANSFER_FILE_ARG_ERROR_RESULT_STATUS_ARG_E565D9FD = "Transfer file %s error, result status %s."; + public static final String LOG_TARGETDATADIR_PARAMETER_EXCEPTION_NUMBER_ORIGINAL_PATHS_DOES_NOT_MATCH_NUMBER_8B31BF59 = + "-targetdatadir parameter exception, the number of original paths does not match the number of" + + " specified paths"; + public static final String LOG_TARGETWALDIR_PARAMETER_EXCEPTION_NUMBER_ORIGINAL_PATHS_DOES_NOT_MATCH_NUMBER_94AFE885 = + "-targetwaldir parameter exception, the number of original paths does not match the number of" + + " specified paths"; + public static final String LOG_DIRECTORY_BACKED_UP_CANNOT_SOURCE_DIRECTORY_PLEASE_CHECK_ARG_ARG_371383B7 = "The directory to be backed up cannot be in the source directory, please check:{},{},{}"; + public static final String LOG_DIRECTORY_BACKED_UP_CANNOT_SOURCE_DIRECTORY_PLEASE_CHECK_ARG_ARG_6DA7D5DA = "The directory to be backed up cannot be in the source directory, please check:{},{}"; + public static final String LOG_DIRECTORY_BACKED_UP_CANNOT_SOURCE_DIRECTORY_PLEASE_CHECK_ARG_CFA67674 = "The directory to be backed up cannot be in the source directory, please check:{}"; + public static final String LOG_TOTAL_FILE_NUMBER_A1554ADC = "total file number:"; + public static final String LOG_VERIFY_NUMBER_FILES_E171592C = ",verify the number of files:"; + public static final String LOG_BACKUP_FILE_NUMBER_72FC1312 = ",backup file number:"; + public static final String LOG_INPUT_TIME_FORMAT_ARG_NOT_SUPPORTED_00172A7B = "Input time format {} is not supported, "; + public static final String LOG_PLEASE_INPUT_LIKE_YYYY_MM_DD_HH_MM_SS_SSS_9318BFC7 = "please input like yyyy-MM-dd\\ HH:mm:ss.SSS or yyyy-MM-dd'T'HH:mm:ss.SSS%n"; + } diff --git a/iotdb-client/cli/src/main/i18n/zh/org/apache/iotdb/cli/i18n/CliMessages.java b/iotdb-client/cli/src/main/i18n/zh/org/apache/iotdb/cli/i18n/CliMessages.java index a518f34c38092..68e5c47e9995d 100644 --- a/iotdb-client/cli/src/main/i18n/zh/org/apache/iotdb/cli/i18n/CliMessages.java +++ b/iotdb-client/cli/src/main/i18n/zh/org/apache/iotdb/cli/i18n/CliMessages.java @@ -67,4 +67,23 @@ public final class CliMessages { public static final String CANNOT_CONVERT = "%s 无法转换为 %s"; private CliMessages() {} + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String EXCEPTION_HANDSHAKE_ERROR_TARGET_SERVER_IP_ARG_PORT_ARG_BECAUSE_ARG_9D522E62 = "与目标服务器握手失败,IP:%s,端口:%s,原因:%s。"; + public static final String EXCEPTION_NETWORK_ERROR_SEAL_FILE_ARG_BECAUSE_ARG_62E92EE8 = "封存文件 %s 时发生网络错误,原因:%s。"; + public static final String EXCEPTION_SEAL_FILE_ARG_ERROR_RESULT_STATUS_ARG_FE3B82AC = "封存文件 %s 出错,结果状态 %s。"; + public static final String EXCEPTION_NETWORK_ERROR_TRANSFER_FILE_ARG_BECAUSE_ARG_BC25323C = "传输文件 %s 时发生网络错误,原因:%s。"; + public static final String EXCEPTION_TRANSFER_FILE_ARG_ERROR_RESULT_STATUS_ARG_E565D9FD = "传输文件 %s 出错,结果状态 %s。"; + public static final String LOG_TARGETDATADIR_PARAMETER_EXCEPTION_NUMBER_ORIGINAL_PATHS_DOES_NOT_MATCH_NUMBER_8B31BF59 = "-targetdatadir 参数异常,原始路径数量与指定路径数量不匹配"; + public static final String LOG_TARGETWALDIR_PARAMETER_EXCEPTION_NUMBER_ORIGINAL_PATHS_DOES_NOT_MATCH_NUMBER_94AFE885 = "-targetwaldir 参数异常,原始路径数量与指定路径数量不匹配"; + public static final String LOG_DIRECTORY_BACKED_UP_CANNOT_SOURCE_DIRECTORY_PLEASE_CHECK_ARG_ARG_371383B7 = "待备份目录不能位于源目录中,请检查:{},{},{}"; + public static final String LOG_DIRECTORY_BACKED_UP_CANNOT_SOURCE_DIRECTORY_PLEASE_CHECK_ARG_ARG_6DA7D5DA = "待备份目录不能位于源目录中,请检查:{},{}"; + public static final String LOG_DIRECTORY_BACKED_UP_CANNOT_SOURCE_DIRECTORY_PLEASE_CHECK_ARG_CFA67674 = "待备份目录不能位于源目录中,请检查:{}"; + public static final String LOG_TOTAL_FILE_NUMBER_A1554ADC = "文件总数:"; + public static final String LOG_VERIFY_NUMBER_FILES_E171592C = ",校验文件数量:"; + public static final String LOG_BACKUP_FILE_NUMBER_72FC1312 = ",备份文件数量:"; + public static final String LOG_INPUT_TIME_FORMAT_ARG_NOT_SUPPORTED_00172A7B = "不支持输入时间格式 {},"; + public static final String LOG_PLEASE_INPUT_LIKE_YYYY_MM_DD_HH_MM_SS_SSS_9318BFC7 = "请输入类似 yyyy-MM-dd\\ HH:mm:ss.SSS 或 yyyy-MM-dd'T'HH:mm:ss.SSS 的格式%n"; + } diff --git a/iotdb-client/cli/src/main/java/org/apache/iotdb/tool/backup/IoTDBDataBackTool.java b/iotdb-client/cli/src/main/java/org/apache/iotdb/tool/backup/IoTDBDataBackTool.java index c257502dfdbf1..b128a614f4ccd 100644 --- a/iotdb-client/cli/src/main/java/org/apache/iotdb/tool/backup/IoTDBDataBackTool.java +++ b/iotdb-client/cli/src/main/java/org/apache/iotdb/tool/backup/IoTDBDataBackTool.java @@ -149,7 +149,8 @@ public static boolean vaildParam(String dnDataDirs, String dnWalDirs) { if (!targetDataDirParam.isEmpty()) { if (!matchPattern(targetDataDirParam, dnDataDirs)) { LOGGER.error( - "-targetdatadir parameter exception, the number of original paths does not match the number of specified paths"); + CliMessages + .LOG_TARGETDATADIR_PARAMETER_EXCEPTION_NUMBER_ORIGINAL_PATHS_DOES_NOT_MATCH_NUMBER_8B31BF59); isVaild = false; } if (targetPathVild(targetDataDirParam)) { @@ -161,7 +162,8 @@ public static boolean vaildParam(String dnDataDirs, String dnWalDirs) { if (!targetWalDirParam.isEmpty()) { if (!matchPattern(targetWalDirParam, dnWalDirs)) { LOGGER.error( - "-targetwaldir parameter exception, the number of original paths does not match the number of specified paths"); + CliMessages + .LOG_TARGETWALDIR_PARAMETER_EXCEPTION_NUMBER_ORIGINAL_PATHS_DOES_NOT_MATCH_NUMBER_94AFE885); isVaild = false; } if (targetPathVild(targetWalDirParam)) { @@ -375,26 +377,30 @@ private static void isDirectoryInsideOrSame(Map copyMap) { && targetDataDirParam.length() > 0 && targetWalDirParam.length() > 0) { LOGGER.error( - "The directory to be backed up cannot be in the source directory, please check:{},{},{}", + CliMessages + .LOG_DIRECTORY_BACKED_UP_CANNOT_SOURCE_DIRECTORY_PLEASE_CHECK_ARG_ARG_371383B7, targetDirParam, targetDataDirParam, targetWalDirParam); System.exit(0); } else if (targetDirParam.length() > 0 && targetDataDirParam.length() > 0) { LOGGER.error( - "The directory to be backed up cannot be in the source directory, please check:{},{}", + CliMessages + .LOG_DIRECTORY_BACKED_UP_CANNOT_SOURCE_DIRECTORY_PLEASE_CHECK_ARG_ARG_6DA7D5DA, targetDirParam, targetDataDirParam); System.exit(0); } else if (targetDirParam.length() > 0 && targetWalDirParam.length() > 0) { LOGGER.error( - "The directory to be backed up cannot be in the source directory, please check:{},{}", + CliMessages + .LOG_DIRECTORY_BACKED_UP_CANNOT_SOURCE_DIRECTORY_PLEASE_CHECK_ARG_ARG_6DA7D5DA, targetDirParam, targetWalDirParam); System.exit(0); } else if (targetDirParam.length() > 0) { LOGGER.error( - "The directory to be backed up cannot be in the source directory, please check:{}", + CliMessages + .LOG_DIRECTORY_BACKED_UP_CANNOT_SOURCE_DIRECTORY_PLEASE_CHECK_ARG_CFA67674, targetDirParam); System.exit(0); } @@ -930,14 +936,17 @@ public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) if (processFileCount.get() > targetFileCount.get()) { writeFileData(filename, processFileCount.get()); LOGGER.info( - "total file number:" + CliMessages.LOG_TOTAL_FILE_NUMBER_A1554ADC + fileCount - + ",verify the number of files:" + + CliMessages.LOG_VERIFY_NUMBER_FILES_E171592C + targetFileCount); } else { writeFileData(filename, targetFileCount.get()); LOGGER.info( - "total file number:" + fileCount + ",backup file number:" + targetFileCount); + CliMessages.LOG_TOTAL_FILE_NUMBER_A1554ADC + + fileCount + + CliMessages.LOG_BACKUP_FILE_NUMBER_72FC1312 + + targetFileCount); } return FileVisitResult.CONTINUE; } @@ -1000,14 +1009,17 @@ public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) if (processFileCount.get() > targetFileCount.get()) { writeFileData(filename, processFileCount.get()); LOGGER.info( - "total file number:" + CliMessages.LOG_TOTAL_FILE_NUMBER_A1554ADC + fileCount - + ",verify the number of files:" + + CliMessages.LOG_VERIFY_NUMBER_FILES_E171592C + targetFileCount); } else { writeFileData(filename, targetFileCount.get()); LOGGER.info( - "total file number:" + fileCount + ",backup file number:" + targetFileCount); + CliMessages.LOG_TOTAL_FILE_NUMBER_A1554ADC + + fileCount + + CliMessages.LOG_BACKUP_FILE_NUMBER_72FC1312 + + targetFileCount); } return FileVisitResult.CONTINUE; } diff --git a/iotdb-client/cli/src/main/java/org/apache/iotdb/tool/data/AbstractDataTool.java b/iotdb-client/cli/src/main/java/org/apache/iotdb/tool/data/AbstractDataTool.java index 4ef95c78eda14..353427c6610f5 100644 --- a/iotdb-client/cli/src/main/java/org/apache/iotdb/tool/data/AbstractDataTool.java +++ b/iotdb-client/cli/src/main/java/org/apache/iotdb/tool/data/AbstractDataTool.java @@ -264,8 +264,8 @@ protected static boolean checkTimeFormat() { } } LOGGER.info( - "Input time format {} is not supported, " - + "please input like yyyy-MM-dd\\ HH:mm:ss.SSS or yyyy-MM-dd'T'HH:mm:ss.SSS%n", + CliMessages.LOG_INPUT_TIME_FORMAT_ARG_NOT_SUPPORTED_00172A7B + + CliMessages.LOG_PLEASE_INPUT_LIKE_YYYY_MM_DD_HH_MM_SS_SSS_9318BFC7, timeFormat); return false; } diff --git a/iotdb-client/cli/src/main/java/org/apache/iotdb/tool/tsfile/ImportTsFileRemotely.java b/iotdb-client/cli/src/main/java/org/apache/iotdb/tool/tsfile/ImportTsFileRemotely.java index bec4a13c37214..2ab7e30609c77 100644 --- a/iotdb-client/cli/src/main/java/org/apache/iotdb/tool/tsfile/ImportTsFileRemotely.java +++ b/iotdb-client/cli/src/main/java/org/apache/iotdb/tool/tsfile/ImportTsFileRemotely.java @@ -162,8 +162,11 @@ public void sendHandshake() { if (resp.getStatus().getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()) { throw new PipeConnectionException( String.format( - "Handshake error with target server ip: %s, port: %s, because: %s.", - client.getIpAddress(), client.getPort(), resp.getStatus())); + CliMessages + .EXCEPTION_HANDSHAKE_ERROR_TARGET_SERVER_IP_ARG_PORT_ARG_BECAUSE_ARG_9D522E62, + client.getIpAddress(), + client.getPort(), + resp.getStatus())); } else { client.setTimeout(PipeConfig.getInstance().getPipeSinkTransferTimeoutMs()); IOT_PRINTER.println( @@ -174,8 +177,11 @@ public void sendHandshake() { } catch (final Exception e) { throw new PipeException( String.format( - "Handshake error with target server ip: %s, port: %s, because: %s.", - client.getIpAddress(), client.getPort(), e.getMessage())); + CliMessages + .EXCEPTION_HANDSHAKE_ERROR_TARGET_SERVER_IP_ARG_PORT_ARG_BECAUSE_ARG_9D522E62, + client.getIpAddress(), + client.getPort(), + e.getMessage())); } } @@ -218,14 +224,21 @@ public void doTransfer(final File tsFile, final File modFile) throws PipeExcepti resp = client.pipeTransfer(req); } catch (final Exception e) { throw new PipeConnectionException( - String.format("Network error when seal file %s, because %s.", tsFile, e.getMessage()), e); + String.format( + CliMessages.EXCEPTION_NETWORK_ERROR_SEAL_FILE_ARG_BECAUSE_ARG_62E92EE8, + tsFile, + e.getMessage()), + e); } final TSStatus status = resp.getStatus(); if (status.getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode() && status.getCode() != TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode()) { throw new PipeConnectionException( - String.format("Seal file %s error, result status %s.", tsFile, status)); + String.format( + CliMessages.EXCEPTION_SEAL_FILE_ARG_ERROR_RESULT_STATUS_ARG_FE3B82AC, + tsFile, + status)); } IOT_PRINTER.println("Successfully transferred file " + tsFile); @@ -257,7 +270,9 @@ private void transferFilePieces(final File file, final boolean isMultiFile) } catch (final Exception e) { throw new PipeConnectionException( String.format( - "Network error when transfer file %s, because %s.", file, e.getMessage()), + CliMessages.EXCEPTION_NETWORK_ERROR_TRANSFER_FILE_ARG_BECAUSE_ARG_BC25323C, + file, + e.getMessage()), e); } @@ -279,7 +294,10 @@ private void transferFilePieces(final File file, final boolean isMultiFile) if (status.getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode() && status.getCode() != TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode()) { throw new PipeException( - String.format("Transfer file %s error, result status %s.", file, status)); + String.format( + CliMessages.EXCEPTION_TRANSFER_FILE_ARG_ERROR_RESULT_STATUS_ARG_E565D9FD, + file, + status)); } } } diff --git a/iotdb-client/isession/src/main/i18n/en/org/apache/iotdb/isession/i18n/ISessionMessages.java b/iotdb-client/isession/src/main/i18n/en/org/apache/iotdb/isession/i18n/ISessionMessages.java index 76ba04d1ba568..bc593534c60d2 100644 --- a/iotdb-client/isession/src/main/i18n/en/org/apache/iotdb/isession/i18n/ISessionMessages.java +++ b/iotdb-client/isession/src/main/i18n/en/org/apache/iotdb/isession/i18n/ISessionMessages.java @@ -32,4 +32,9 @@ public final class ISessionMessages { "It is not a direct child of the template: "; private ISessionMessages() {} + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String EXCEPTION_DATA_TYPE_ARG_NOT_SUPPORTED_31213160 = "Data type %s is not supported."; + } diff --git a/iotdb-client/isession/src/main/i18n/zh/org/apache/iotdb/isession/i18n/ISessionMessages.java b/iotdb-client/isession/src/main/i18n/zh/org/apache/iotdb/isession/i18n/ISessionMessages.java index 09937e460d0d6..5514a76c0f71e 100644 --- a/iotdb-client/isession/src/main/i18n/zh/org/apache/iotdb/isession/i18n/ISessionMessages.java +++ b/iotdb-client/isession/src/main/i18n/zh/org/apache/iotdb/isession/i18n/ISessionMessages.java @@ -32,4 +32,9 @@ public final class ISessionMessages { "这不是该模板的直接子节点:"; private ISessionMessages() {} + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String EXCEPTION_DATA_TYPE_ARG_NOT_SUPPORTED_31213160 = "不支持数据类型 %s。"; + } diff --git a/iotdb-client/isession/src/main/java/org/apache/iotdb/isession/SessionDataSet.java b/iotdb-client/isession/src/main/java/org/apache/iotdb/isession/SessionDataSet.java index 46881ce5893cd..a926103222a20 100644 --- a/iotdb-client/isession/src/main/java/org/apache/iotdb/isession/SessionDataSet.java +++ b/iotdb-client/isession/src/main/java/org/apache/iotdb/isession/SessionDataSet.java @@ -192,7 +192,8 @@ private RowRecord constructRowRecordFromValueArray() throws StatementExecutionEx break; default: throw new UnSupportedDataTypeException( - String.format("Data type %s is not supported.", dataType)); + String.format( + ISessionMessages.EXCEPTION_DATA_TYPE_ARG_NOT_SUPPORTED_31213160, dataType)); } } else { field = new Field(null); diff --git a/iotdb-client/jdbc/src/main/i18n/en/org/apache/iotdb/jdbc/i18n/JdbcMessages.java b/iotdb-client/jdbc/src/main/i18n/en/org/apache/iotdb/jdbc/i18n/JdbcMessages.java index d5db57b4fce58..43e0ef6cb46fa 100644 --- a/iotdb-client/jdbc/src/main/i18n/en/org/apache/iotdb/jdbc/i18n/JdbcMessages.java +++ b/iotdb-client/jdbc/src/main/i18n/en/org/apache/iotdb/jdbc/i18n/JdbcMessages.java @@ -179,6 +179,52 @@ public final class JdbcMessages { public static final String NOT_SUPPORT_SET_SAVEPOINT = "Does not support setSavepoint"; public static final String USE_DATABASE_ERROR = "Use database error: {}"; public static final String RECONNECT_INTERRUPTED = "reconnect is interrupted."; + public static final String SINGLE_QUOTE = "'"; + public static final String RIGHT_PARENTHESIS = ")"; private JdbcMessages() {} + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String EXCEPTION_CONNECTION_ERROR_PLEASE_CHECK_WHETHER_NETWORK_AVAILABLE_SERVER_CA72E0D6 = "Connection Error, please check whether the network is available or the server"; + public static final String EXCEPTION_HAS_STARTED_BD7BC366 = " has started."; + public static final String EXCEPTION_ERROR_URL_FORMAT_URL_SHOULD_JDBC_IOTDB_ANYTHING_PORT_DATABASE_17D1DCFB = + "Error url format, url should be jdbc:iotdb://anything:port/[database] or" + + " jdbc:iotdb://anything:port[/database]?property1=value1&property2=value2, current url is "; + public static final String EXCEPTION_FAIL_RECONNECT_SERVER_EXECUTING_ARG_PLEASE_CHECK_SERVER_STATUS_34668040 = "Fail to reconnect to server when executing %s. please check server status"; + public static final String EXCEPTION_FAIL_RECONNECT_SERVER_EXECUTING_BATCH_SQLS_PLEASE_CHECK_SERVER_STATUS_1E4C0C24 = "Fail to reconnect to server when executing batch sqls. please check server status"; + public static final String EXCEPTION_FAIL_RECONNECT_SERVER_EXECUTE_QUERY_B6F770F5 = "Fail to reconnect to server when execute query "; + public static final String EXCEPTION_PLEASE_CHECK_SERVER_STATUS_DA9E1E33 = ". please check server status"; + public static final String EXCEPTION_FAIL_RECONNECT_SERVER_EXECUTE_UPDATE_7F009AA4 = "Fail to reconnect to server when execute update "; + public static final String EXCEPTION_CANNOT_GET_ID_STATEMENT_AFTER_RECONNECTING_PLEASE_CHECK_SERVER_STATUS_D4C1F67E = "Cannot get id for statement after reconnecting. please check server status"; + public static final String EXCEPTION_CAN_T_INFER_SQL_TYPE_INSTANCE_ARG_USE_SETOBJECT_EXPLICIT_F457F33A = "Can't infer the SQL type for an instance of %s. Use setObject() with explicit type."; + public static final String EXCEPTION_PARAMETER_INDEX_OUT_RANGE_3DD066E0 = "Parameter index out of range: "; + public static final String EXCEPTION_EXPECTED_1_3F4E8D6E = " (expected 1-"; + public static final String LOG_SET_TIME_ERROR_IOTDB_PREPARED_STATEMENT_ARG_AAAACB25 = "set time error when iotdb prepared statement :%s "; + public static final String EXCEPTION_CAN_T_INFER_SQL_TYPE_USE_INSTANCE_ARG_USE_SETOBJECT_A5B1C1BD = "Can''t infer the SQL type to use for an instance of %s. Use setObject() with"; + public static final String EXCEPTION_EXPLICIT_TYPES_VALUE_SPECIFY_TYPE_USE_CD046EDA = " an explicit Types value to specify the type to use."; + public static final String EXCEPTION_NO_CONVERSION_3F7E3A35 = "No conversion from "; + public static final String EXCEPTION_TYPES_BOOLEAN_POSSIBLE_54D316E6 = " to Types.BOOLEAN possible."; + public static final String EXCEPTION_CAN_T_SET_SCALE_5559DE62 = "Can't set scale of '"; + public static final String EXCEPTION_DECIMAL_ARGUMENT_504BC102 = "' for DECIMAL argument '"; + public static final String LOG_FAIL_GET_ALL_TIMESERIES_2A802516 = "Fail to get all timeseries "; + public static final String LOG_INFO_AFTER_RECONNECTING_7E70A784 = "info after reconnecting."; + public static final String LOG_PLEASE_CHECK_SERVER_STATUS_2049BB22 = " please check server status"; + public static final String LOG_FAIL_RECONNECT_SERVER_AC4C86AB = "Fail to reconnect to server "; + public static final String LOG_GETTING_ALL_TIMESERIES_INFO_PLEASE_CHECK_SERVER_STATUS_009B5EFE = "when getting all timeseries info. please check server status"; + public static final String EXCEPTION_FAILED_FETCH_ALL_METADATA_JSON_5FB95E70 = "Failed to fetch all metadata in json "; + public static final String EXCEPTION_AFTER_RECONNECTING_PLEASE_CHECK_SERVER_STATUS_DE1D65AC = "after reconnecting. Please check the server status."; + public static final String EXCEPTION_FAILED_RECONNECT_SERVER_632A4B76 = "Failed to reconnect to the server "; + public static final String EXCEPTION_FETCHING_ALL_METADATA_JSON_PLEASE_CHECK_SERVER_STATUS_1A0813B2 = "when fetching all metadata in json. Please check the server status."; + public static final String LOG_PROTOCOL_DIFFER_CLIENT_VERSION_ARG_BUT_SERVER_VERSION_ARG_F0AA3D03 = "Protocol differ, Client version is {}, but Server version is {}"; + public static final String LOG_ARG_ARG_PLEASE_CHANGE_IT_TIME_VIA_ALTER_USER_STATEMENT_6B67087C = "{}{}, please change it in time via 'ALTER USER' statement"; + public static final String EXCEPTION_ERROR_OCCURS_CLOSING_SESSION_AT_SERVER_MAYBE_SERVER_DOWN_2BCE63C0 = "Error occurs when closing session at server. Maybe server is down."; + public static final String EXCEPTION_STATEMENTS_RESULT_SET_CONCURRENCY_ARG_NOT_SUPPORTED_C6043E9A = "Statements with result set concurrency %d are not supported"; + public static final String EXCEPTION_STATEMENTS_RESULTSET_TYPE_ARG_NOT_SUPPORTED_8BE22644 = "Statements with ResultSet type %d are not supported"; + public static final String EXCEPTION_PROTOCOL_NOT_SUPPORTED_CLIENT_VERSION_ARG_BUT_SERVER_VERSION_ARG_53F892DC = "Protocol not supported, Client version is %s, but Server version is %s"; + public static final String EXCEPTION_CAN_NOT_ESTABLISH_CONNECTION_ARG_YOU_MAY_TRY_CONNECT_OLD_8FC3703E = + "Can not establish connection with %s : You may try to connect an old version IoTDB instance" + + " using a client with new version: %s. "; + public static final String EXCEPTION_CAN_NOT_ESTABLISH_CONNECTION_ARG_ARG_D7246055 = "Can not establish connection with %s : %s. "; + } diff --git a/iotdb-client/jdbc/src/main/i18n/zh/org/apache/iotdb/jdbc/i18n/JdbcMessages.java b/iotdb-client/jdbc/src/main/i18n/zh/org/apache/iotdb/jdbc/i18n/JdbcMessages.java index 0cc824fd08446..1aeededfc900a 100644 --- a/iotdb-client/jdbc/src/main/i18n/zh/org/apache/iotdb/jdbc/i18n/JdbcMessages.java +++ b/iotdb-client/jdbc/src/main/i18n/zh/org/apache/iotdb/jdbc/i18n/JdbcMessages.java @@ -179,6 +179,52 @@ public final class JdbcMessages { public static final String NOT_SUPPORT_SET_SAVEPOINT = "不支持 setSavepoint"; public static final String USE_DATABASE_ERROR = "使用数据库错误:{}"; public static final String RECONNECT_INTERRUPTED = "重新连接被中断。"; + public static final String SINGLE_QUOTE = "'"; + public static final String RIGHT_PARENTHESIS = ")"; private JdbcMessages() {} + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String EXCEPTION_CONNECTION_ERROR_PLEASE_CHECK_WHETHER_NETWORK_AVAILABLE_SERVER_CA72E0D6 = "连接错误,请检查网络是否可用或服务器是否正常"; + public static final String EXCEPTION_HAS_STARTED_BD7BC366 = " 已启动。"; + public static final String EXCEPTION_ERROR_URL_FORMAT_URL_SHOULD_JDBC_IOTDB_ANYTHING_PORT_DATABASE_17D1DCFB = + "URL 格式错误,URL 应为 jdbc:iotdb://anything:port/[database] 或" + + " jdbc:iotdb://anything:port[/database]?property1=value1&property2=value2,当前 URL 为 "; + public static final String EXCEPTION_FAIL_RECONNECT_SERVER_EXECUTING_ARG_PLEASE_CHECK_SERVER_STATUS_34668040 = "执行 %s 时无法重新连接到服务器。请检查服务器状态"; + public static final String EXCEPTION_FAIL_RECONNECT_SERVER_EXECUTING_BATCH_SQLS_PLEASE_CHECK_SERVER_STATUS_1E4C0C24 = "执行批量 SQL 时无法重新连接到服务器。请检查服务器状态"; + public static final String EXCEPTION_FAIL_RECONNECT_SERVER_EXECUTE_QUERY_B6F770F5 = "执行查询时无法重新连接到服务器 "; + public static final String EXCEPTION_PLEASE_CHECK_SERVER_STATUS_DA9E1E33 = "。请检查服务器状态"; + public static final String EXCEPTION_FAIL_RECONNECT_SERVER_EXECUTE_UPDATE_7F009AA4 = "执行更新时无法重新连接到服务器 "; + public static final String EXCEPTION_CANNOT_GET_ID_STATEMENT_AFTER_RECONNECTING_PLEASE_CHECK_SERVER_STATUS_D4C1F67E = "重新连接后无法获取 statement 的 id。请检查服务器状态"; + public static final String EXCEPTION_CAN_T_INFER_SQL_TYPE_INSTANCE_ARG_USE_SETOBJECT_EXPLICIT_F457F33A = "无法推断 %s 实例的 SQL 类型。请使用带显式类型的 setObject()。"; + public static final String EXCEPTION_PARAMETER_INDEX_OUT_RANGE_3DD066E0 = "参数索引超出范围:"; + public static final String EXCEPTION_EXPECTED_1_3F4E8D6E = "(期望 1-"; + public static final String LOG_SET_TIME_ERROR_IOTDB_PREPARED_STATEMENT_ARG_AAAACB25 = "IoTDB prepared statement 设置时间出错:%s "; + public static final String EXCEPTION_CAN_T_INFER_SQL_TYPE_USE_INSTANCE_ARG_USE_SETOBJECT_A5B1C1BD = "无法推断 %s 实例要使用的 SQL 类型。请使用 setObject() 并"; + public static final String EXCEPTION_EXPLICIT_TYPES_VALUE_SPECIFY_TYPE_USE_CD046EDA = "显式指定 Types 值来确定要使用的类型。"; + public static final String EXCEPTION_NO_CONVERSION_3F7E3A35 = "不支持从 "; + public static final String EXCEPTION_TYPES_BOOLEAN_POSSIBLE_54D316E6 = " 转换为 Types.BOOLEAN。"; + public static final String EXCEPTION_CAN_T_SET_SCALE_5559DE62 = "无法设置 '"; + public static final String EXCEPTION_DECIMAL_ARGUMENT_504BC102 = "' 的精度,该值属于 DECIMAL 参数 '"; + public static final String LOG_FAIL_GET_ALL_TIMESERIES_2A802516 = "无法获取所有时间序列 "; + public static final String LOG_INFO_AFTER_RECONNECTING_7E70A784 = "重新连接后的信息。"; + public static final String LOG_PLEASE_CHECK_SERVER_STATUS_2049BB22 = " 请检查服务器状态"; + public static final String LOG_FAIL_RECONNECT_SERVER_AC4C86AB = "无法重新连接到服务器 "; + public static final String LOG_GETTING_ALL_TIMESERIES_INFO_PLEASE_CHECK_SERVER_STATUS_009B5EFE = "获取所有时间序列信息时。请检查服务器状态"; + public static final String EXCEPTION_FAILED_FETCH_ALL_METADATA_JSON_5FB95E70 = "无法获取 JSON 格式的所有元数据 "; + public static final String EXCEPTION_AFTER_RECONNECTING_PLEASE_CHECK_SERVER_STATUS_DE1D65AC = "重新连接后。请检查服务器状态。"; + public static final String EXCEPTION_FAILED_RECONNECT_SERVER_632A4B76 = "无法重新连接到服务器 "; + public static final String EXCEPTION_FETCHING_ALL_METADATA_JSON_PLEASE_CHECK_SERVER_STATUS_1A0813B2 = "获取 JSON 格式的所有元数据时。请检查服务器状态。"; + public static final String LOG_PROTOCOL_DIFFER_CLIENT_VERSION_ARG_BUT_SERVER_VERSION_ARG_F0AA3D03 = "协议不同,客户端版本为 {},服务器版本为 {}"; + public static final String LOG_ARG_ARG_PLEASE_CHANGE_IT_TIME_VIA_ALTER_USER_STATEMENT_6B67087C = "{}{},请及时通过 'ALTER USER' 语句修改"; + public static final String EXCEPTION_ERROR_OCCURS_CLOSING_SESSION_AT_SERVER_MAYBE_SERVER_DOWN_2BCE63C0 = "在服务器端关闭会话时发生错误。服务器可能已宕机。"; + public static final String EXCEPTION_STATEMENTS_RESULT_SET_CONCURRENCY_ARG_NOT_SUPPORTED_C6043E9A = "不支持结果集并发级别为 %d 的 Statement"; + public static final String EXCEPTION_STATEMENTS_RESULTSET_TYPE_ARG_NOT_SUPPORTED_8BE22644 = "不支持 ResultSet 类型为 %d 的 Statement"; + public static final String EXCEPTION_PROTOCOL_NOT_SUPPORTED_CLIENT_VERSION_ARG_BUT_SERVER_VERSION_ARG_53F892DC = "协议不支持,客户端版本为 %s,服务器版本为 %s"; + public static final String EXCEPTION_CAN_NOT_ESTABLISH_CONNECTION_ARG_YOU_MAY_TRY_CONNECT_OLD_8FC3703E = + "无法与 %s 建立连接:可能正在使用新版本客户端连接旧版本 IoTDB 实例:" + + "%s。"; + public static final String EXCEPTION_CAN_NOT_ESTABLISH_CONNECTION_ARG_ARG_D7246055 = "无法与 %s 建立连接:%s。"; + } diff --git a/iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBConnection.java b/iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBConnection.java index 7f37e2206fb87..79716120c1fb8 100644 --- a/iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBConnection.java +++ b/iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBConnection.java @@ -184,7 +184,8 @@ public void close() throws SQLException { getClient().closeSession(req); } catch (TException e) { throw new SQLException( - "Error occurs when closing session at server. Maybe server is down.", e); + JdbcMessages.EXCEPTION_ERROR_OCCURS_CLOSING_SESSION_AT_SERVER_MAYBE_SERVER_DOWN_2BCE63C0, + e); } finally { isClosed = true; if (transport != null) { @@ -235,11 +236,14 @@ public Statement createStatement(int resultSetType, int resultSetConcurrency) if (resultSetConcurrency != ResultSet.CONCUR_READ_ONLY) { throw new SQLException( String.format( - "Statements with result set concurrency %d are not supported", resultSetConcurrency)); + JdbcMessages.EXCEPTION_STATEMENTS_RESULT_SET_CONCURRENCY_ARG_NOT_SUPPORTED_C6043E9A, + resultSetConcurrency)); } if (resultSetType == ResultSet.TYPE_SCROLL_SENSITIVE) { throw new SQLException( - String.format("Statements with ResultSet type %d are not supported", resultSetType)); + String.format( + JdbcMessages.EXCEPTION_STATEMENTS_RESULTSET_TYPE_ARG_NOT_SUPPORTED_8BE22644, + resultSetType)); } return new IoTDBStatement(this, getClient(), sessionId, zoneId, charset, queryTimeout); } @@ -580,14 +584,16 @@ private void openSession() throws SQLException { this.timeFactor = RpcUtils.getTimeFactor(openResp); if (protocolVersion.getValue() != openResp.getServerProtocolVersion().getValue()) { logger.warn( - "Protocol differ, Client version is {}, but Server version is {}", + JdbcMessages.LOG_PROTOCOL_DIFFER_CLIENT_VERSION_ARG_BUT_SERVER_VERSION_ARG_F0AA3D03, protocolVersion.getValue(), openResp.getServerProtocolVersion().getValue()); if (openResp.getServerProtocolVersion().getValue() == 0) { // less than 0.10 throw new TException( String.format( - "Protocol not supported, Client version is %s, but Server version is %s", - protocolVersion.getValue(), openResp.getServerProtocolVersion().getValue())); + JdbcMessages + .EXCEPTION_PROTOCOL_NOT_SUPPORTED_CLIENT_VERSION_ARG_BUT_SERVER_VERSION_ARG_53F892DC, + protocolVersion.getValue(), + openResp.getServerProtocolVersion().getValue())); } } String expirationInformer = "Your password will expire at "; @@ -600,7 +606,7 @@ private void openSession() throws SQLException { LocalDateTime now = LocalDateTime.now(); if (now.isAfter(expirationDate.minusDays(3))) { logger.warn( - "{}{}, please change it in time via 'ALTER USER' statement", + JdbcMessages.LOG_ARG_ARG_PLEASE_CHANGE_IT_TIME_VIA_ALTER_USER_STATEMENT_6B67087C, expirationInformer, expirationDateStr); } @@ -611,14 +617,17 @@ private void openSession() throws SQLException { // the server is an old version (less than 0.10) throw new SQLException( String.format( - "Can not establish connection with %s : You may try to connect an old version IoTDB instance using a client with new version: %s. ", - params.getJdbcUriString(), e.getMessage()), + JdbcMessages + .EXCEPTION_CAN_NOT_ESTABLISH_CONNECTION_ARG_YOU_MAY_TRY_CONNECT_OLD_8FC3703E, + params.getJdbcUriString(), + e.getMessage()), e); } throw new SQLException( String.format( - "Can not establish connection with %s : %s. ", - params.getJdbcUriString(), e.getMessage()), + JdbcMessages.EXCEPTION_CAN_NOT_ESTABLISH_CONNECTION_ARG_ARG_D7246055, + params.getJdbcUriString(), + e.getMessage()), e); } catch (StatementExecutionException e) { // failed to connect, disconnect from the server diff --git a/iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBDatabaseMetadata.java b/iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBDatabaseMetadata.java index 2f4ea5af2401c..0e5d5b64a92a6 100644 --- a/iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBDatabaseMetadata.java +++ b/iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBDatabaseMetadata.java @@ -674,17 +674,17 @@ public String toString() { return getMetadataInJsonFunc(); } catch (TException e2) { LOGGER.error( - "Fail to get all timeseries " - + "info after reconnecting." - + " please check server status", + JdbcMessages.LOG_FAIL_GET_ALL_TIMESERIES_2A802516 + + JdbcMessages.LOG_INFO_AFTER_RECONNECTING_7E70A784 + + JdbcMessages.LOG_PLEASE_CHECK_SERVER_STATUS_2049BB22, e2); } catch (IoTDBSQLException e1) { // ignored } } else { LOGGER.error( - "Fail to reconnect to server " - + "when getting all timeseries info. please check server status"); + JdbcMessages.LOG_FAIL_RECONNECT_SERVER_AC4C86AB + + JdbcMessages.LOG_GETTING_ALL_TIMESERIES_INFO_PLEASE_CHECK_SERVER_STATUS_009B5EFE); } } return ""; @@ -704,13 +704,14 @@ public String getMetadataInJson() throws SQLException { return getMetadataInJsonFunc(); } catch (TException e2) { throw new SQLException( - "Failed to fetch all metadata in json " - + "after reconnecting. Please check the server status."); + JdbcMessages.EXCEPTION_FAILED_FETCH_ALL_METADATA_JSON_5FB95E70 + + JdbcMessages.EXCEPTION_AFTER_RECONNECTING_PLEASE_CHECK_SERVER_STATUS_DE1D65AC); } } else { throw new SQLException( - "Failed to reconnect to the server " - + "when fetching all metadata in json. Please check the server status."); + JdbcMessages.EXCEPTION_FAILED_RECONNECT_SERVER_632A4B76 + + JdbcMessages + .EXCEPTION_FETCHING_ALL_METADATA_JSON_PLEASE_CHECK_SERVER_STATUS_1A0813B2); } } } diff --git a/iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBDriver.java b/iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBDriver.java index de7065c1c571c..c2cc964f2a113 100644 --- a/iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBDriver.java +++ b/iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBDriver.java @@ -67,8 +67,9 @@ public Connection connect(String url, Properties info) throws SQLException { return acceptsURL(url) ? new IoTDBConnection(url, info) : null; } catch (TTransportException e) { throw new SQLException( - "Connection Error, please check whether the network is available or the server" - + " has started.", + JdbcMessages + .EXCEPTION_CONNECTION_ERROR_PLEASE_CHECK_WHETHER_NETWORK_AVAILABLE_SERVER_CA72E0D6 + + JdbcMessages.EXCEPTION_HAS_STARTED_BD7BC366, e); } } diff --git a/iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBPreparedStatement.java b/iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBPreparedStatement.java index 80f6530c18adf..53bc38f7d5165 100644 --- a/iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBPreparedStatement.java +++ b/iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBPreparedStatement.java @@ -418,8 +418,8 @@ public void setObject(int parameterIndex, Object x) throws SQLException { // Can't infer a type. throw new SQLException( String.format( - "Can''t infer the SQL type to use for an instance of %s. Use setObject() with" - + " an explicit Types value to specify the type to use.", + JdbcMessages.EXCEPTION_CAN_T_INFER_SQL_TYPE_USE_INSTANCE_ARG_USE_SETOBJECT_A5B1C1BD + + JdbcMessages.EXCEPTION_EXPLICIT_TYPES_VALUE_SPECIFY_TYPE_USE_CD046EDA, x.getClass().getName())); } } @@ -459,7 +459,9 @@ public void setObject(int parameterIndex, Object parameterObj, int targetSqlType setBoolean(parameterIndex, false); } else { throw new SQLException( - "No conversion from " + parameterObj + " to Types.BOOLEAN possible."); + JdbcMessages.EXCEPTION_NO_CONVERSION_3F7E3A35 + + parameterObj + + JdbcMessages.EXCEPTION_TYPES_BOOLEAN_POSSIBLE_54D316E6); } break; } else if (parameterObj instanceof Number) { @@ -470,7 +472,9 @@ public void setObject(int parameterIndex, Object parameterObj, int targetSqlType break; } else { throw new SQLException( - "No conversion from " + parameterObj + " to Types.BOOLEAN possible."); + JdbcMessages.EXCEPTION_NO_CONVERSION_3F7E3A35 + + parameterObj + + JdbcMessages.EXCEPTION_TYPES_BOOLEAN_POSSIBLE_54D316E6); } case Types.BIT: @@ -866,11 +870,11 @@ private void setNumericObject( ((java.math.BigDecimal) parameterAsNum).setScale(scale, BigDecimal.ROUND_HALF_UP); } catch (ArithmeticException arEx) { throw new SQLException( - "Can't set scale of '" + JdbcMessages.EXCEPTION_CAN_T_SET_SCALE_5559DE62 + scale - + "' for DECIMAL argument '" + + JdbcMessages.EXCEPTION_DECIMAL_ARGUMENT_504BC102 + parameterAsNum - + "'"); + + JdbcMessages.SINGLE_QUOTE); } } @@ -942,7 +946,9 @@ public void setTime(int parameterIndex, Time x) throws SQLException { setLong(parameterIndex, time); } catch (TException e) { logger.error( - String.format("set time error when iotdb prepared statement :%s ", e.getMessage())); + String.format( + JdbcMessages.LOG_SET_TIME_ERROR_IOTDB_PREPARED_STATEMENT_ARG_AAAACB25, + e.getMessage())); } } @@ -975,7 +981,9 @@ public void setTime(int parameterIndex, Time x, Calendar cal) throws SQLExceptio parameterIndex, zonedDateTime.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME)); } catch (TException e) { logger.error( - String.format("set time error when iotdb prepared statement :%s ", e.getMessage())); + String.format( + JdbcMessages.LOG_SET_TIME_ERROR_IOTDB_PREPARED_STATEMENT_ARG_AAAACB25, + e.getMessage())); } } diff --git a/iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBStatement.java b/iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBStatement.java index 1c6ce8c0e9b14..029b8bda9dbb8 100644 --- a/iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBStatement.java +++ b/iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBStatement.java @@ -279,7 +279,9 @@ public boolean execute(String sql) throws SQLException { } catch (TException e) { throw new SQLException( String.format( - "Fail to reconnect to server when executing %s. please check server status", sql), + JdbcMessages + .EXCEPTION_FAIL_RECONNECT_SERVER_EXECUTING_ARG_PLEASE_CHECK_SERVER_STATUS_34668040, + sql), e); } } @@ -420,7 +422,9 @@ public int[] executeBatch() throws SQLException { return executeBatchSQL(); } catch (TException e) { throw new SQLException( - "Fail to reconnect to server when executing batch sqls. please check server status", e); + JdbcMessages + .EXCEPTION_FAIL_RECONNECT_SERVER_EXECUTING_BATCH_SQLS_PLEASE_CHECK_SERVER_STATUS_1E4C0C24, + e); } finally { clearBatch(); } @@ -483,7 +487,9 @@ public ResultSet executeQuery(String sql, long timeoutInMS) throws SQLException return executeQuerySQL(sql, timeoutInMS); } catch (TException e) { throw new SQLException( - "Fail to reconnect to server when execute query " + sql + ". please check server status", + JdbcMessages.EXCEPTION_FAIL_RECONNECT_SERVER_EXECUTE_QUERY_B6F770F5 + + sql + + JdbcMessages.EXCEPTION_PLEASE_CHECK_SERVER_STATUS_DA9E1E33, e); } } @@ -550,7 +556,9 @@ public int executeUpdate(String sql) throws SQLException { return executeUpdateSQL(sql); } catch (TException e) { throw new SQLException( - "Fail to reconnect to server when execute update " + sql + ". please check server status", + JdbcMessages.EXCEPTION_FAIL_RECONNECT_SERVER_EXECUTE_UPDATE_7F009AA4 + + sql + + JdbcMessages.EXCEPTION_PLEASE_CHECK_SERVER_STATUS_DA9E1E33, e); } } @@ -748,7 +756,9 @@ private boolean reInit() throws SQLException { return true; } catch (Exception e) { throw new SQLException( - "Cannot get id for statement after reconnecting. please check server status", e); + JdbcMessages + .EXCEPTION_CANNOT_GET_ID_STATEMENT_AFTER_RECONNECTING_PLEASE_CHECK_SERVER_STATUS_D4C1F67E, + e); } } @@ -761,11 +771,15 @@ private void requestStmtId() throws SQLException { this.stmtId = client.requestStatementId(sessionId); } catch (TException e2) { throw new SQLException( - "Cannot get id for statement after reconnecting. please check server status", e2); + JdbcMessages + .EXCEPTION_CANNOT_GET_ID_STATEMENT_AFTER_RECONNECTING_PLEASE_CHECK_SERVER_STATUS_D4C1F67E, + e2); } } else { throw new SQLException( - "Cannot get id for statement after reconnecting. please check server status", e); + JdbcMessages + .EXCEPTION_CANNOT_GET_ID_STATEMENT_AFTER_RECONNECTING_PLEASE_CHECK_SERVER_STATUS_D4C1F67E, + e); } } } diff --git a/iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBTablePreparedStatement.java b/iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBTablePreparedStatement.java index 674ec164691a9..2fd0f382435fb 100644 --- a/iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBTablePreparedStatement.java +++ b/iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBTablePreparedStatement.java @@ -484,7 +484,8 @@ public void setObject(int parameterIndex, Object x) throws SQLException { } else { throw new SQLException( String.format( - "Can't infer the SQL type for an instance of %s. Use setObject() with explicit type.", + JdbcMessages + .EXCEPTION_CAN_T_INFER_SQL_TYPE_INSTANCE_ARG_USE_SETOBJECT_EXPLICIT_F457F33A, x.getClass().getName())); } } @@ -506,7 +507,11 @@ private void checkParameterIndex(int index) throws SQLException { } if (index < 1 || index > parameterCount) { throw new SQLException( - "Parameter index out of range: " + index + " (expected 1-" + parameterCount + ")"); + JdbcMessages.EXCEPTION_PARAMETER_INDEX_OUT_RANGE_3DD066E0 + + index + + JdbcMessages.EXCEPTION_EXPECTED_1_3F4E8D6E + + parameterCount + + JdbcMessages.RIGHT_PARENTHESIS); } } diff --git a/iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/Utils.java b/iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/Utils.java index 00e46cc340d15..6e556ec2acf83 100644 --- a/iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/Utils.java +++ b/iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/Utils.java @@ -19,6 +19,8 @@ package org.apache.iotdb.jdbc; +import org.apache.iotdb.jdbc.i18n.JdbcMessages; + import java.nio.charset.Charset; import java.time.DateTimeException; import java.time.ZoneId; @@ -97,7 +99,8 @@ static IoTDBConnectionParams parseUrl(String url, Properties info) throws IoTDBU } if (!isUrlLegal) { throw new IoTDBURLException( - "Error url format, url should be jdbc:iotdb://anything:port/[database] or jdbc:iotdb://anything:port[/database]?property1=value1&property2=value2, current url is " + JdbcMessages + .EXCEPTION_ERROR_URL_FORMAT_URL_SHOULD_JDBC_IOTDB_ANYTHING_PORT_DATABASE_17D1DCFB + url); } diff --git a/iotdb-client/service-rpc/src/main/i18n/en/org/apache/iotdb/rpc/i18n/RpcMessages.java b/iotdb-client/service-rpc/src/main/i18n/en/org/apache/iotdb/rpc/i18n/RpcMessages.java index 0e545164e8d40..3b064ab156c86 100644 --- a/iotdb-client/service-rpc/src/main/i18n/en/org/apache/iotdb/rpc/i18n/RpcMessages.java +++ b/iotdb-client/service-rpc/src/main/i18n/en/org/apache/iotdb/rpc/i18n/RpcMessages.java @@ -78,5 +78,17 @@ public final class RpcMessages { // SynchronizedHandler public static final String ERROR_IN_CALLING_METHOD = "Error in calling method "; + // Shared fragments + public static final String EMPTY_MESSAGE = ""; + public static final String REMOTE_ADDRESS_PREFIX = " from "; + private RpcMessages() {} + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String EXCEPTION_SIZE_COLUMNINDEX2TSBLOCKCOLUMNINDEXLIST_ARG_DOESN_T_EQUAL_SIZE_COLUMNNAMELIST_ARG_F1209A2B = "Size of columnIndex2TsBlockColumnIndexList %s doesn't equal to size of columnNameList %s."; + public static final String EXCEPTION_CANNOT_FETCH_RESULT_SERVER_BECAUSE_NETWORK_CONNECTION_ARG_24BE1326 = "Cannot fetch result from server, because of network connection: {} "; + public static final String EXCEPTION_ARG_ARG_046AFB8B = "%d: %s"; + public static final String EXCEPTION_LATER_REQUEST_SAME_GROUP_WILL_REDIRECTED_0A61CB0B = "later request in same group will be redirected to "; + } diff --git a/iotdb-client/service-rpc/src/main/i18n/zh/org/apache/iotdb/rpc/i18n/RpcMessages.java b/iotdb-client/service-rpc/src/main/i18n/zh/org/apache/iotdb/rpc/i18n/RpcMessages.java index 03faa1dbb8374..abfc2ad462c5d 100644 --- a/iotdb-client/service-rpc/src/main/i18n/zh/org/apache/iotdb/rpc/i18n/RpcMessages.java +++ b/iotdb-client/service-rpc/src/main/i18n/zh/org/apache/iotdb/rpc/i18n/RpcMessages.java @@ -35,7 +35,7 @@ public final class RpcMessages { // TElasticFramedTransport - SSL public static final String NON_SSL_TO_SSL_PORT = - "可能正在发送非 SSL 请求%s到启用了 SSL 的 Thrift-RPC 端口,请确认使用了正确的配置"; + "可能正在发送非 SSL 请求%s 到启用了 SSL 的 Thrift-RPC 端口,请确认使用了正确的配置"; // ConfigurableTByteBuffer public static final String UNEXPECTED_END_OF_INPUT = "输入缓冲区意外结束"; @@ -66,5 +66,17 @@ public final class RpcMessages { // SynchronizedHandler public static final String ERROR_IN_CALLING_METHOD = "调用方法时出错:"; + // Shared fragments + public static final String EMPTY_MESSAGE = ""; + public static final String REMOTE_ADDRESS_PREFIX = " 来自 "; + private RpcMessages() {} + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String EXCEPTION_SIZE_COLUMNINDEX2TSBLOCKCOLUMNINDEXLIST_ARG_DOESN_T_EQUAL_SIZE_COLUMNNAMELIST_ARG_F1209A2B = "columnIndex2TsBlockColumnIndexList 的大小 %s 不等于 columnNameList 的大小 %s。"; + public static final String EXCEPTION_CANNOT_FETCH_RESULT_SERVER_BECAUSE_NETWORK_CONNECTION_ARG_24BE1326 = "由于网络连接问题,无法从服务器获取结果:{} "; + public static final String EXCEPTION_ARG_ARG_046AFB8B = "%d: %s"; + public static final String EXCEPTION_LATER_REQUEST_SAME_GROUP_WILL_REDIRECTED_0A61CB0B = "同一组中的后续请求将被重定向到 "; + } diff --git a/iotdb-client/service-rpc/src/main/java/org/apache/iotdb/rpc/BatchExecutionException.java b/iotdb-client/service-rpc/src/main/java/org/apache/iotdb/rpc/BatchExecutionException.java index 3ec3c4b836897..8ba6ca6e30859 100644 --- a/iotdb-client/service-rpc/src/main/java/org/apache/iotdb/rpc/BatchExecutionException.java +++ b/iotdb-client/service-rpc/src/main/java/org/apache/iotdb/rpc/BatchExecutionException.java @@ -20,6 +20,7 @@ package org.apache.iotdb.rpc; import org.apache.iotdb.common.rpc.thrift.TSStatus; +import org.apache.iotdb.rpc.i18n.RpcMessages; import java.util.List; @@ -32,7 +33,7 @@ public BatchExecutionException(String message) { } public BatchExecutionException(List statusList) { - super(""); + super(RpcMessages.EMPTY_MESSAGE); this.statusList = statusList; } diff --git a/iotdb-client/service-rpc/src/main/java/org/apache/iotdb/rpc/IoTDBJDBCDataSet.java b/iotdb-client/service-rpc/src/main/java/org/apache/iotdb/rpc/IoTDBJDBCDataSet.java index 000ab5a279909..75ff09a882e43 100644 --- a/iotdb-client/service-rpc/src/main/java/org/apache/iotdb/rpc/IoTDBJDBCDataSet.java +++ b/iotdb-client/service-rpc/src/main/java/org/apache/iotdb/rpc/IoTDBJDBCDataSet.java @@ -400,7 +400,8 @@ public boolean fetchResults() throws StatementExecutionException, IoTDBConnectio return resp.hasResultSet; } catch (TException e) { throw new IoTDBConnectionException( - "Cannot fetch result from server, because of network connection: {} ", e); + RpcMessages.EXCEPTION_CANNOT_FETCH_RESULT_SERVER_BECAUSE_NETWORK_CONNECTION_ARG_24BE1326, + e); } } diff --git a/iotdb-client/service-rpc/src/main/java/org/apache/iotdb/rpc/IoTDBRpcDataSet.java b/iotdb-client/service-rpc/src/main/java/org/apache/iotdb/rpc/IoTDBRpcDataSet.java index 42bf974a3eb80..7619be16734d6 100644 --- a/iotdb-client/service-rpc/src/main/java/org/apache/iotdb/rpc/IoTDBRpcDataSet.java +++ b/iotdb-client/service-rpc/src/main/java/org/apache/iotdb/rpc/IoTDBRpcDataSet.java @@ -200,8 +200,10 @@ public IoTDBRpcDataSet( if (columnIndex2TsBlockColumnIndexList.size() != this.columnNameList.size()) { throw new IllegalArgumentException( String.format( - "Size of columnIndex2TsBlockColumnIndexList %s doesn't equal to size of columnNameList %s.", - columnIndex2TsBlockColumnIndexList.size(), this.columnNameList.size())); + RpcMessages + .EXCEPTION_SIZE_COLUMNINDEX2TSBLOCKCOLUMNINDEXLIST_ARG_DOESN_T_EQUAL_SIZE_COLUMNNAMELIST_ARG_F1209A2B, + columnIndex2TsBlockColumnIndexList.size(), + this.columnNameList.size())); } this.columnIndex2TsBlockColumnIndexList = columnIndex2TsBlockColumnIndexList; } @@ -279,7 +281,8 @@ public boolean fetchResults() throws StatementExecutionException, IoTDBConnectio return resp.hasResultSet; } catch (TException e) { throw new IoTDBConnectionException( - "Cannot fetch result from server, because of network connection: {} ", e); + RpcMessages.EXCEPTION_CANNOT_FETCH_RESULT_SERVER_BECAUSE_NETWORK_CONNECTION_ARG_24BE1326, + e); } } diff --git a/iotdb-client/service-rpc/src/main/java/org/apache/iotdb/rpc/RedirectException.java b/iotdb-client/service-rpc/src/main/java/org/apache/iotdb/rpc/RedirectException.java index c7db354b5291e..b37486742d1a7 100644 --- a/iotdb-client/service-rpc/src/main/java/org/apache/iotdb/rpc/RedirectException.java +++ b/iotdb-client/service-rpc/src/main/java/org/apache/iotdb/rpc/RedirectException.java @@ -20,6 +20,7 @@ package org.apache.iotdb.rpc; import org.apache.iotdb.common.rpc.thrift.TEndPoint; +import org.apache.iotdb.rpc.i18n.RpcMessages; import java.io.IOException; import java.util.List; @@ -33,21 +34,25 @@ public class RedirectException extends IOException { private final List endPointList; public RedirectException(TEndPoint endPoint) { - super("later request in same group will be redirected to " + endPoint.toString()); + super( + RpcMessages.EXCEPTION_LATER_REQUEST_SAME_GROUP_WILL_REDIRECTED_0A61CB0B + + endPoint.toString()); this.endPoint = endPoint; this.deviceEndPointMap = null; this.endPointList = null; } public RedirectException(Map deviceEndPointMap) { - super("later request in same group will be redirected to " + deviceEndPointMap); + super( + RpcMessages.EXCEPTION_LATER_REQUEST_SAME_GROUP_WILL_REDIRECTED_0A61CB0B + + deviceEndPointMap); this.endPoint = null; this.deviceEndPointMap = deviceEndPointMap; this.endPointList = null; } public RedirectException(List endPointList) { - super("later request in same group will be redirected to " + endPointList); + super(RpcMessages.EXCEPTION_LATER_REQUEST_SAME_GROUP_WILL_REDIRECTED_0A61CB0B + endPointList); this.endPoint = null; this.deviceEndPointMap = null; this.endPointList = endPointList; diff --git a/iotdb-client/service-rpc/src/main/java/org/apache/iotdb/rpc/StatementExecutionException.java b/iotdb-client/service-rpc/src/main/java/org/apache/iotdb/rpc/StatementExecutionException.java index 0752931e56e27..69d87c1743002 100644 --- a/iotdb-client/service-rpc/src/main/java/org/apache/iotdb/rpc/StatementExecutionException.java +++ b/iotdb-client/service-rpc/src/main/java/org/apache/iotdb/rpc/StatementExecutionException.java @@ -20,13 +20,14 @@ package org.apache.iotdb.rpc; import org.apache.iotdb.common.rpc.thrift.TSStatus; +import org.apache.iotdb.rpc.i18n.RpcMessages; public class StatementExecutionException extends Exception { private int statusCode; public StatementExecutionException(TSStatus status) { - super(String.format("%d: %s", status.code, status.message)); + super(String.format(RpcMessages.EXCEPTION_ARG_ARG_046AFB8B, status.code, status.message)); this.statusCode = status.code; } diff --git a/iotdb-client/service-rpc/src/main/java/org/apache/iotdb/rpc/TElasticFramedTransport.java b/iotdb-client/service-rpc/src/main/java/org/apache/iotdb/rpc/TElasticFramedTransport.java index 6a174f86b6ad8..0757fb6bbedee 100644 --- a/iotdb-client/service-rpc/src/main/java/org/apache/iotdb/rpc/TElasticFramedTransport.java +++ b/iotdb-client/service-rpc/src/main/java/org/apache/iotdb/rpc/TElasticFramedTransport.java @@ -101,7 +101,6 @@ public TElasticFramedTransport( protected AutoScalingBufferWriteTransport writeBuffer; protected final byte[] i32buf = new byte[4]; private final boolean copyBinary; - private static final String FROM = " from "; @Override public boolean isOpen() { @@ -165,7 +164,9 @@ public int read(byte[] buf, int off, int len) throws TTransportException { TTransportException.CORRUPTED_DATA, String.format( RpcMessages.NON_SSL_TO_SSL_PORT, - remoteAddress == null ? "" : FROM + remoteAddress)); + remoteAddress == null + ? RpcMessages.EMPTY_MESSAGE + : RpcMessages.REMOTE_ADDRESS_PREFIX + remoteAddress)); } throw e; } @@ -210,7 +211,10 @@ protected void validateFrame(int size) throws TTransportException { if (underlying instanceof TSocket) { remoteAddress = ((TSocket) underlying).getSocket().getRemoteSocketAddress(); } - String remoteInfo = (remoteAddress == null) ? "" : FROM + remoteAddress; + String remoteInfo = + (remoteAddress == null) + ? RpcMessages.EMPTY_MESSAGE + : RpcMessages.REMOTE_ADDRESS_PREFIX + remoteAddress; close(); error.throwException(size, remoteInfo, thriftMaxFrameSize); @@ -285,7 +289,10 @@ public void checkReadBytesAvailable(long numBytes) throws TTransportException { if (underlying instanceof TSocket) { remoteAddress = ((TSocket) underlying).getSocket().getRemoteSocketAddress(); } - String remoteInfo = (remoteAddress == null) ? "" : FROM + remoteAddress; + String remoteInfo = + (remoteAddress == null) + ? RpcMessages.EMPTY_MESSAGE + : RpcMessages.REMOTE_ADDRESS_PREFIX + remoteAddress; close(); FrameError.STRING_LENGTH_EXCEEDED.throwException(numBytes, remoteInfo, thriftMaxFrameSize); } diff --git a/iotdb-client/session/src/main/i18n/en/org/apache/iotdb/session/i18n/SessionMessages.java b/iotdb-client/session/src/main/i18n/en/org/apache/iotdb/session/i18n/SessionMessages.java index 94e14129a56bf..6b0525994eeb9 100644 --- a/iotdb-client/session/src/main/i18n/en/org/apache/iotdb/session/i18n/SessionMessages.java +++ b/iotdb-client/session/src/main/i18n/en/org/apache/iotdb/session/i18n/SessionMessages.java @@ -259,4 +259,29 @@ public final class SessionMessages { "unexpected error in createTimeseriesUsingSchemaTemplate"; private SessionMessages() {} + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String LOG_PROTOCOL_DIFFER_CLIENT_VERSION_ARG_BUT_SERVER_VERSION_ARG_9C8EC583 = "Protocol differ, Client version is {}}, but Server version is {}"; + public static final String EXCEPTION_PROTOCOL_NOT_SUPPORTED_CLIENT_VERSION_ARG_BUT_SERVER_VERSION_ARG_53F892DC = "Protocol not supported, Client version is %s, but Server version is %s"; + public static final String LOG_RETRY_ATTEMPT_ARG_RESULT_ARG_EXCEPTION_ARG_20E5D9DA = "Retry attempt #{}, result {}, exception {}"; + public static final String LOG_ALL_VALUES_NULL_SUBMISSION_IGNORED_DEVICEID_ARG_TIME_ARG_MEASUREMENTS_07AFDDFE = + "All values are null and this submission is ignored,deviceId is [{}],time is [{}],measurements" + + " are [{}]"; + public static final String EXCEPTION_DEVICEIDS_TIMES_MEASUREMENTSLIST_VALUESLIST_S_SIZE_SHOULD_EQUAL_EC87D88B = "deviceIds, times, measurementsList and valuesList's size should be equal"; + public static final String EXCEPTION_PREFIXPATHS_TIMES_SUBMEASUREMENTSLIST_VALUESLIST_S_SIZE_SHOULD_EQUAL_1465011C = "prefixPaths, times, subMeasurementsList and valuesList's size should be equal"; + public static final String EXCEPTION_TIMES_SUBMEASUREMENTSLIST_VALUESLIST_S_SIZE_SHOULD_EQUAL_002C539A = "times, subMeasurementsList and valuesList's size should be equal"; + public static final String EXCEPTION_DIFFERENT_LENGTH_MEASUREMENTS_DATATYPES_ENCODINGS_ED354A24 = "Different length of measurements, datatypes, encodings "; + public static final String EXCEPTION_COMPRESSORS_CREATE_DEVICE_TEMPLATE_BBDBB28E = "or compressors when create device template."; + public static final String EXCEPTION_GIVEN_DEVICE_PATH_LIST_SHOULD_NOT_CONTAINS_NULL_E9132577 = "Given device path list should not be or contains null."; + public static final String EXCEPTION_YOU_SHOULD_SPECIFY_EITHER_NODEURLS_HOST_RPCPORT_BUT_NOT_BOTH_77E7B084 = "You should specify either nodeUrls or (host + rpcPort), but not both"; + public static final String LOG_CANNOT_PUT_VALUES_MEASUREMENT_ARG_TYPE_ARG_27AFC67B = "Cannot put values for measurement {}, type={}"; + public static final String EXCEPTION_DATA_TYPE_ARG_NOT_SUPPORTED_31213160 = "Data type %s is not supported."; + public static final String LOG_FAILED_CHANGE_BACK_SQL_DIALECT_EXECUTING_SET_SQL_DIALECT_ARG_947F35E7 = "Failed to change back sql_dialect by executing: set sql_dialect={}"; + public static final String LOG_FAILED_CHANGE_BACK_DATABASE_EXECUTING_USE_ARG_274541CA = "Failed to change back database by executing: use {}"; + public static final String LOG_SESSIONPOOL_HAS_WAIT_ARG_SECONDS_GET_NEW_CONNECTION_ARG_ARG_D053274A = "the SessionPool has wait for {} seconds to get a new connection: {} with {}"; + public static final String LOG_CURRENT_OCCUPIED_SIZE_ARG_QUEUE_SIZE_ARG_CONSIDERED_SIZE_ARG_DE97C14E = "current occupied size {}, queue size {}, considered size {} "; + public static final String EXCEPTION_RETRY_EXECUTE_STATEMENT_ARG_FAILED_ARG_TIMES_ARG_216C6873 = "retry to execute statement on %s failed %d times: %s"; + public static final String EXCEPTION_SESSIONPOOL_DOESN_T_SUPPORT_EXECUTING_ARG_DIRECTLY_B778F701 = "SessionPool doesn't support executing %s directly"; + } diff --git a/iotdb-client/session/src/main/i18n/zh/org/apache/iotdb/session/i18n/SessionMessages.java b/iotdb-client/session/src/main/i18n/zh/org/apache/iotdb/session/i18n/SessionMessages.java index 63d025f85d967..05a74599aa6e7 100644 --- a/iotdb-client/session/src/main/i18n/zh/org/apache/iotdb/session/i18n/SessionMessages.java +++ b/iotdb-client/session/src/main/i18n/zh/org/apache/iotdb/session/i18n/SessionMessages.java @@ -258,4 +258,28 @@ public final class SessionMessages { "createTimeseriesUsingSchemaTemplate 发生意外错误"; private SessionMessages() {} + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String LOG_PROTOCOL_DIFFER_CLIENT_VERSION_ARG_BUT_SERVER_VERSION_ARG_9C8EC583 = "协议不同,客户端版本为 {}},服务器版本为 {}"; + public static final String EXCEPTION_PROTOCOL_NOT_SUPPORTED_CLIENT_VERSION_ARG_BUT_SERVER_VERSION_ARG_53F892DC = "协议不支持,客户端版本为 %s,服务器版本为 %s"; + public static final String LOG_RETRY_ATTEMPT_ARG_RESULT_ARG_EXCEPTION_ARG_20E5D9DA = "第 {} 次重试,结果 {},异常 {}"; + public static final String LOG_ALL_VALUES_NULL_SUBMISSION_IGNORED_DEVICEID_ARG_TIME_ARG_MEASUREMENTS_07AFDDFE = + "所有值均为 null,本次提交被忽略,deviceId 为 [{}],time 为 [{}],measurements 为 [{}]"; + public static final String EXCEPTION_DEVICEIDS_TIMES_MEASUREMENTSLIST_VALUESLIST_S_SIZE_SHOULD_EQUAL_EC87D88B = "deviceIds、times、measurementsList 和 valuesList 的大小应相等"; + public static final String EXCEPTION_PREFIXPATHS_TIMES_SUBMEASUREMENTSLIST_VALUESLIST_S_SIZE_SHOULD_EQUAL_1465011C = "prefixPaths、times、subMeasurementsList 和 valuesList 的大小应相等"; + public static final String EXCEPTION_TIMES_SUBMEASUREMENTSLIST_VALUESLIST_S_SIZE_SHOULD_EQUAL_002C539A = "times、subMeasurementsList 和 valuesList 的大小应相等"; + public static final String EXCEPTION_DIFFERENT_LENGTH_MEASUREMENTS_DATATYPES_ENCODINGS_ED354A24 = "measurements、datatypes、encodings 的长度不同 "; + public static final String EXCEPTION_COMPRESSORS_CREATE_DEVICE_TEMPLATE_BBDBB28E = "或创建设备模板时的压缩器。"; + public static final String EXCEPTION_GIVEN_DEVICE_PATH_LIST_SHOULD_NOT_CONTAINS_NULL_E9132577 = "给定的设备路径列表不应为空,也不应包含 null。"; + public static final String EXCEPTION_YOU_SHOULD_SPECIFY_EITHER_NODEURLS_HOST_RPCPORT_BUT_NOT_BOTH_77E7B084 = "应指定 nodeUrls 或 (host + rpcPort),但不能同时指定"; + public static final String LOG_CANNOT_PUT_VALUES_MEASUREMENT_ARG_TYPE_ARG_27AFC67B = "无法写入测点 {} 的值,类型={}"; + public static final String EXCEPTION_DATA_TYPE_ARG_NOT_SUPPORTED_31213160 = "不支持数据类型 %s。"; + public static final String LOG_FAILED_CHANGE_BACK_SQL_DIALECT_EXECUTING_SET_SQL_DIALECT_ARG_947F35E7 = "执行 set sql_dialect={} 时无法切回 sql_dialect"; + public static final String LOG_FAILED_CHANGE_BACK_DATABASE_EXECUTING_USE_ARG_274541CA = "执行 use {} 时无法切回数据库"; + public static final String LOG_SESSIONPOOL_HAS_WAIT_ARG_SECONDS_GET_NEW_CONNECTION_ARG_ARG_D053274A = "SessionPool 已等待 {} 秒以获取新连接:{},参数 {}"; + public static final String LOG_CURRENT_OCCUPIED_SIZE_ARG_QUEUE_SIZE_ARG_CONSIDERED_SIZE_ARG_DE97C14E = "当前已占用大小 {},队列大小 {},纳入计算的大小 {} "; + public static final String EXCEPTION_RETRY_EXECUTE_STATEMENT_ARG_FAILED_ARG_TIMES_ARG_216C6873 = "在 %s 上重试执行语句失败 %d 次:%s"; + public static final String EXCEPTION_SESSIONPOOL_DOESN_T_SUPPORT_EXECUTING_ARG_DIRECTLY_B778F701 = "SessionPool 不支持直接执行 %s"; + } diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java index f352a0612e6a7..5a161d18c0848 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java @@ -1663,7 +1663,8 @@ public void insertRecords( int len = deviceIds.size(); if (len != times.size() || len != measurementsList.size() || len != valuesList.size()) { throw new IllegalArgumentException( - "deviceIds, times, measurementsList and valuesList's size should be equal"); + SessionMessages + .EXCEPTION_DEVICEIDS_TIMES_MEASUREMENTSLIST_VALUESLIST_S_SIZE_SHOULD_EQUAL_EC87D88B); } if (enableRedirection) { insertStringRecordsWithLeaderCache(deviceIds, times, measurementsList, valuesList, false); @@ -1880,7 +1881,8 @@ public void insertAlignedRecords( int len = deviceIds.size(); if (len != times.size() || len != measurementsList.size() || len != valuesList.size()) { throw new IllegalArgumentException( - "prefixPaths, times, subMeasurementsList and valuesList's size should be equal"); + SessionMessages + .EXCEPTION_PREFIXPATHS_TIMES_SUBMEASUREMENTSLIST_VALUESLIST_S_SIZE_SHOULD_EQUAL_1465011C); } if (enableRedirection) { insertStringRecordsWithLeaderCache(deviceIds, times, measurementsList, valuesList, true); @@ -2055,7 +2057,8 @@ public void insertRecords( int len = deviceIds.size(); if (len != times.size() || len != measurementsList.size() || len != valuesList.size()) { throw new IllegalArgumentException( - "deviceIds, times, measurementsList and valuesList's size should be equal"); + SessionMessages + .EXCEPTION_DEVICEIDS_TIMES_MEASUREMENTSLIST_VALUESLIST_S_SIZE_SHOULD_EQUAL_EC87D88B); } // judge if convert records to tablets. if (enableRecordsAutoConvertTablet && len >= MIN_RECORDS_SIZE) { @@ -2109,7 +2112,8 @@ public void insertAlignedRecords( int len = deviceIds.size(); if (len != times.size() || len != measurementsList.size() || len != valuesList.size()) { throw new IllegalArgumentException( - "prefixPaths, times, subMeasurementsList and valuesList's size should be equal"); + SessionMessages + .EXCEPTION_PREFIXPATHS_TIMES_SUBMEASUREMENTSLIST_VALUESLIST_S_SIZE_SHOULD_EQUAL_1465011C); } // judge if convert records to tablets. if (enableRecordsAutoConvertTablet && len >= MIN_RECORDS_SIZE) { @@ -2337,7 +2341,8 @@ public void insertAlignedRecordsOfOneDevice( int len = times.size(); if (len != measurementsList.size() || len != valuesList.size()) { throw new IllegalArgumentException( - "times, subMeasurementsList and valuesList's size should be equal"); + SessionMessages + .EXCEPTION_TIMES_SUBMEASUREMENTSLIST_VALUESLIST_S_SIZE_SHOULD_EQUAL_002C539A); } if (enableRecordsAutoConvertTablet && len >= MIN_RECORDS_SIZE @@ -2677,7 +2682,8 @@ private void insertRecordsWithLeaderCache( recordsGroup.putIfAbsent(connection, request); } catch (NoValidValueException e) { logger.warn( - "All values are null and this submission is ignored,deviceId is [{}],time is [{}],measurements are [{}]", + SessionMessages + .LOG_ALL_VALUES_NULL_SUBMISSION_IGNORED_DEVICEID_ARG_TIME_ARG_MEASUREMENTS_07AFDDFE, deviceIds.get(i), times.get(i), measurementsList.get(i)); @@ -3838,8 +3844,8 @@ public void createSchemaTemplate( int len = measurements.size(); if (len != dataTypes.size() || len != encodings.size() || len != compressors.size()) { throw new StatementExecutionException( - "Different length of measurements, datatypes, encodings " - + "or compressors when create device template."); + SessionMessages.EXCEPTION_DIFFERENT_LENGTH_MEASUREMENTS_DATATYPES_ENCODINGS_ED354A24 + + SessionMessages.EXCEPTION_COMPRESSORS_CREATE_DEVICE_TEMPLATE_BBDBB28E); } for (int idx = 0; idx < measurements.size(); idx++) { MeasurementNode mNode = @@ -4152,7 +4158,7 @@ public void createTimeseriesUsingSchemaTemplate(List devicePathList) throws IoTDBConnectionException, StatementExecutionException { if (devicePathList == null || devicePathList.contains(null)) { throw new StatementExecutionException( - "Given device path list should not be or contains null."); + SessionMessages.EXCEPTION_GIVEN_DEVICE_PATH_LIST_SHOULD_NOT_CONTAINS_NULL_E9132577); } TCreateTimeseriesUsingSchemaTemplateReq request = new TCreateTimeseriesUsingSchemaTemplateReq(); request.setDevicePathList(devicePathList); @@ -4439,7 +4445,8 @@ public Session build() { if (nodeUrls != null && (!SessionConfig.DEFAULT_HOST.equals(host) || rpcPort != SessionConfig.DEFAULT_PORT)) { throw new IllegalArgumentException( - "You should specify either nodeUrls or (host + rpcPort), but not both"); + SessionMessages + .EXCEPTION_YOU_SHOULD_SPECIFY_EITHER_NODEURLS_HOST_RPCPORT_BUT_NOT_BOTH_77E7B084); } return new Session(this); } diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/SessionConnection.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/SessionConnection.java index c3e62cdd3e92e..ed61c2e8dd5cc 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/SessionConnection.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/SessionConnection.java @@ -236,14 +236,15 @@ private void init(TEndPoint endPoint, boolean useSSL, String trustStore, String this.timeFactor = RpcUtils.getTimeFactor(openResp); if (Session.protocolVersion.getValue() != openResp.getServerProtocolVersion().getValue()) { logger.warn( - "Protocol differ, Client version is {}}, but Server version is {}", + SessionMessages.LOG_PROTOCOL_DIFFER_CLIENT_VERSION_ARG_BUT_SERVER_VERSION_ARG_9C8EC583, Session.protocolVersion.getValue(), openResp.getServerProtocolVersion().getValue()); // less than 0.10 if (openResp.getServerProtocolVersion().getValue() == 0) { throw new TException( String.format( - "Protocol not supported, Client version is %s, but Server version is %s", + SessionMessages + .EXCEPTION_PROTOCOL_NOT_SUPPORTED_CLIENT_VERSION_ARG_BUT_SERVER_VERSION_ARG_53F892DC, Session.protocolVersion.getValue(), openResp.getServerProtocolVersion().getValue())); } @@ -957,7 +958,10 @@ private RetryResult callWithRetryAndReconnect( } logger.debug( - "Retry attempt #{}, result {}, exception {}", retryAttempt, result, lastTException); + SessionMessages.LOG_RETRY_ATTEMPT_ARG_RESULT_ARG_EXCEPTION_ARG_20E5D9DA, + retryAttempt, + result, + lastTException); // prepare for the next retry if (lastTException != null || !availableNodes.get().contains(this.endPoint) diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/ThriftConnection.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/ThriftConnection.java index e3b9e8fc98987..b204bb04bf6c4 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/ThriftConnection.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/ThriftConnection.java @@ -131,14 +131,15 @@ public void init( if (Session.protocolVersion.getValue() != openResp.getServerProtocolVersion().getValue()) { LOGGER.warn( - "Protocol differ, Client version is {}}, but Server version is {}", + SessionMessages.LOG_PROTOCOL_DIFFER_CLIENT_VERSION_ARG_BUT_SERVER_VERSION_ARG_9C8EC583, Session.protocolVersion.getValue(), openResp.getServerProtocolVersion().getValue()); // less than 0.10 if (openResp.getServerProtocolVersion().getValue() == 0) { throw new TException( String.format( - "Protocol not supported, Client version is %s, but Server version is %s", + SessionMessages + .EXCEPTION_PROTOCOL_NOT_SUPPORTED_CLIENT_VERSION_ARG_BUT_SERVER_VERSION_ARG_53F892DC, Session.protocolVersion.getValue(), openResp.getServerProtocolVersion().getValue())); } diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/pool/SessionPool.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/pool/SessionPool.java index 3eaabe7f1fa78..98e35bcd24f16 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/pool/SessionPool.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/pool/SessionPool.java @@ -698,12 +698,14 @@ private ISession getSession() throws IoTDBConnectionException { long timeOut = Math.min(waitToGetSessionTimeoutInMs, 60_000); if (System.currentTimeMillis() - start > timeOut) { LOGGER.warn( - "the SessionPool has wait for {} seconds to get a new connection: {} with {}", + SessionMessages + .LOG_SESSIONPOOL_HAS_WAIT_ARG_SECONDS_GET_NEW_CONNECTION_ARG_ARG_D053274A, (System.currentTimeMillis() - start) / 1000, formattedNodeUrls, user); LOGGER.warn( - "current occupied size {}, queue size {}, considered size {} ", + SessionMessages + .LOG_CURRENT_OCCUPIED_SIZE_ARG_QUEUE_SIZE_ARG_CONSIDERED_SIZE_ARG_DE97C14E, occupied.size(), queue.size(), size); @@ -892,8 +894,10 @@ private void cleanSessionAndMayThrowConnectionException( if (times == FINAL_RETRY) { throw new IoTDBConnectionException( String.format( - "retry to execute statement on %s failed %d times: %s", - formattedNodeUrls, RETRY, e.getMessage()), + SessionMessages.EXCEPTION_RETRY_EXECUTE_STATEMENT_ARG_FAILED_ARG_TIMES_ARG_216C6873, + formattedNodeUrls, + RETRY, + e.getMessage()), e); } } @@ -3112,7 +3116,9 @@ public void executeNonQueryStatement(String sql) // 'use XXX' and 'set sql_dialect' is forbidden in SessionPool.executeNonQueryStatement if (isUseDatabase(sql) || isSetSqlDialect(sql)) { throw new IllegalArgumentException( - String.format("SessionPool doesn't support executing %s directly", sql)); + String.format( + SessionMessages.EXCEPTION_SESSIONPOOL_DOESN_T_SUPPORT_EXECUTING_ARG_DIRECTLY_B778F701, + sql)); } ISession session = getSession(); diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/pool/TableSessionWrapper.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/pool/TableSessionWrapper.java index 761bb3a40d3b1..4cf7ca980f347 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/pool/TableSessionWrapper.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/pool/TableSessionWrapper.java @@ -24,6 +24,7 @@ import org.apache.iotdb.rpc.IoTDBConnectionException; import org.apache.iotdb.rpc.StatementExecutionException; import org.apache.iotdb.session.Session; +import org.apache.iotdb.session.i18n.SessionMessages; import org.apache.tsfile.write.record.Tablet; import org.slf4j.Logger; @@ -113,7 +114,8 @@ public void close() throws IoTDBConnectionException { session.executeNonQueryStatement("set sql_dialect=" + sessionPool.sqlDialect); } catch (StatementExecutionException e) { LOGGER.warn( - "Failed to change back sql_dialect by executing: set sql_dialect={}", + SessionMessages + .LOG_FAILED_CHANGE_BACK_SQL_DIALECT_EXECUTING_SET_SQL_DIALECT_ARG_947F35E7, sessionPool.sqlDialect, e); session.close(); @@ -129,7 +131,9 @@ public void close() throws IoTDBConnectionException { session.executeNonQueryStatement("use " + sessionPool.database); } catch (StatementExecutionException e) { LOGGER.warn( - "Failed to change back database by executing: use {}", sessionPool.database, e); + SessionMessages.LOG_FAILED_CHANGE_BACK_DATABASE_EXECUTING_USE_ARG_274541CA, + sessionPool.database, + e); session.close(); session = null; return; diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/util/SessionUtils.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/util/SessionUtils.java index da15b5a0731c5..3fbb0de0f730f 100644 --- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/util/SessionUtils.java +++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/util/SessionUtils.java @@ -148,7 +148,8 @@ private static int calOccupationOfOneColumn( break; default: throw new UnSupportedDataTypeException( - String.format("Data type %s is not supported.", dataType)); + String.format( + SessionMessages.EXCEPTION_DATA_TYPE_ARG_NOT_SUPPORTED_31213160, dataType)); } return valueOccupation; } @@ -269,7 +270,10 @@ public static void putValues( } } catch (Throwable e) { LOGGER.error( - "Cannot put values for measurement {}, type={}", measurements.get(i), types.get(i), e); + SessionMessages.LOG_CANNOT_PUT_VALUES_MEASUREMENT_ARG_TYPE_ARG_27AFC67B, + measurements.get(i), + types.get(i), + e); throw e; } } @@ -363,7 +367,8 @@ private static void getValueBufferOfDataType( break; default: throw new UnSupportedDataTypeException( - String.format("Data type %s is not supported.", dataType)); + String.format( + SessionMessages.EXCEPTION_DATA_TYPE_ARG_NOT_SUPPORTED_31213160, dataType)); } } @@ -452,7 +457,8 @@ public static void encodeValue( break; default: throw new UnSupportedDataTypeException( - String.format("Data type %s is not supported.", dataType)); + String.format( + SessionMessages.EXCEPTION_DATA_TYPE_ARG_NOT_SUPPORTED_31213160, dataType)); } try { encoder.flush(outputStream); diff --git a/iotdb-client/subscription/src/main/i18n/en/org/apache/iotdb/rpc/subscription/i18n/SubscriptionMessages.java b/iotdb-client/subscription/src/main/i18n/en/org/apache/iotdb/rpc/subscription/i18n/SubscriptionMessages.java index 3b03471138da9..d271739dc1cd8 100644 --- a/iotdb-client/subscription/src/main/i18n/en/org/apache/iotdb/rpc/subscription/i18n/SubscriptionMessages.java +++ b/iotdb-client/subscription/src/main/i18n/en/org/apache/iotdb/rpc/subscription/i18n/SubscriptionMessages.java @@ -92,4 +92,155 @@ public final class SubscriptionMessages { "SubscriptionConsumer {} submit endpoints syncer"; private SubscriptionMessages() {} + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String EXCEPTION_UNEXPECTED_FIELDS_ARG_WAS_OBTAINED_DURING_SHOW_TOPIC_30B5D702 = "Unexpected fields %s was obtained during SHOW TOPIC..."; + public static final String EXCEPTION_UNEXPECTED_FIELDS_ARG_WAS_OBTAINED_DURING_SHOW_SUBSCRIPTION_71F9C549 = "Unexpected fields %s was obtained during SHOW SUBSCRIPTION..."; + public static final String EXCEPTION_SUBSCRIPTION_SESSION_MUST_CONFIGURED_ENDPOINT_2CAD53A9 = "Subscription session must be configured with an endpoint."; + public static final String EXCEPTION_ARG_ILLEGAL_IDENTIFIER_NOT_ENCLOSED_BACKTICKS_CAN_ONLY_CONSIST_DIGITS_55D6A31F = + "%s is illegal, identifier not enclosed with backticks can only consist of digits, characters" + + " and underscore."; + public static final String EXCEPTION_WATERMARK_TIMESTAMP_ONLY_AVAILABLE_WATERMARK_MESSAGES_ACTUAL_MESSAGE_TYPE_F8E32C57 = "Watermark timestamp is only available for watermark messages, actual message type: "; + public static final String EXCEPTION_ARG_DO_NOT_SUPPORT_GETRESULTSETS_7789852D = "%s do not support getResultSets()."; + public static final String EXCEPTION_ARG_DO_NOT_SUPPORT_GETRECORDTABLETITERATOR_46B4A489 = "%s do not support getRecordTabletIterator()."; + public static final String EXCEPTION_ARG_DO_NOT_SUPPORT_GETTSFILE_40D23462 = "%s do not support getTsFile()."; + public static final String EXCEPTION_USER_DATA_HAS_BEEN_REMOVED_ARG_7093644B = "User data has been removed from %s."; + public static final String EXCEPTION_ARG_DOES_NOT_SUPPORT_OPENTREEREADER_TABLE_MODEL_TSFILE_68621ECF = "%s does not support openTreeReader() for table model tsfile."; + public static final String EXCEPTION_ARG_DOES_NOT_SUPPORT_OPENTABLEREADER_TREE_MODEL_TSFILE_CEC27860 = "%s does not support openTableReader() for tree model tsfile."; + public static final String EXCEPTION_UNKNOWN_COLUMN_CATEGORY_4F49F64B = "Unknown column category: "; + public static final String EXCEPTION_DATA_TYPE_ARG_NOT_SUPPORTED_31213160 = "Data type %s is not supported."; + public static final String LOG_SUBSCRIPTIONPUSHCONSUMER_ARG_POLL_EMPTY_MESSAGE_TOPICS_ARG_AFTER_ARG_MILLISECOND_741801C2 = "SubscriptionPushConsumer {} poll empty message from topics {} after {} millisecond(s)"; + public static final String LOG_CONSUMER_LISTENER_RAISED_EXCEPTION_CONSUMING_MESSAGE_ARG_867EE46D = "Consumer listener raised an exception while consuming message: {}"; + public static final String LOG_ARG_FAILED_CREATE_CONNECTION_ARG_BECAUSE_ARG_E536E22A = "{} failed to create connection with {} because of {}"; + public static final String LOG_ARG_FAILED_FETCH_ALL_ENDPOINTS_ARG_BECAUSE_ARG_2C9E11D4 = "{} failed to fetch all endpoints from {} because of {}"; + public static final String LOG_TERMINATION_OCCURRED_SUBSCRIPTIONCONSUMER_ARG_POLLING_TOPICS_UNSUBSCRIBE_TOPIC_ARG_AUTOMATICALLY_E9B695FA = + "Termination occurred when SubscriptionConsumer {} polling topics, unsubscribe topic {}" + + " automatically"; + public static final String LOG_ARG_FAILED_SENDING_HEARTBEAT_SUBSCRIPTION_PROVIDER_ARG_BECAUSE_ARG_SET_0B38FB1F = + "{} failed to sending heartbeat to subscription provider {} because of {}, set subscription" + + " provider unavailable"; + public static final String LOG_EXCEPTION_OCCURRED_ARG_CLOSING_REMOVING_SUBSCRIPTION_PROVIDER_ARG_BECAUSE_ARG_2EC38739 = "Exception occurred when {} closing and removing subscription provider {} because of {}"; + public static final String EXCEPTION_CLUSTER_HAS_NO_AVAILABLE_SUBSCRIPTION_PROVIDERS_CONNECT_INITIAL_ENDPOINTS_ARG_5DB83198 = "Cluster has no available subscription providers to connect with initial endpoints %s"; + public static final String LOG_ARG_HAS_BEEN_LAUNCHED_SET_CORE_POOL_SIZE_ARG_WILL_0FDECBE3 = "{} has been launched, set core pool size to {} will be ignored"; + public static final String LOG_INTERRUPT_WORKER_WHICH_MAY_CAUSE_SOME_TASK_INCONSISTENT_PLEASE_CHECK_04926D9F = "Interrupt the worker, which may cause some task inconsistent. Please check the biz logs."; + public static final String LOG_THREAD_POOL_CAN_T_SHUTDOWN_EVEN_INTERRUPTING_WORKER_THREADS_WHICH_A49166F9 = + "Thread pool can't be shutdown even with interrupting worker threads, which may cause some" + + " task inconsistent. Please check the biz logs."; + public static final String LOG_CURRENT_THREAD_INTERRUPTED_IT_TRYING_STOP_WORKER_THREADS_MAY_LEAVE_CF07ABA0 = + "The current thread is interrupted when it is trying to stop the worker threads. This may" + + " leave an inconsistent state. Please check the biz logs."; + public static final String LOG_IOEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_SERIALIZE_HANDSHAKE_REQUEST_ARG_C1414290 = "IOException occurred when SubscriptionProvider {} serialize handshake request {}"; + public static final String LOG_TEXCEPTION_IOTDBCONNECTIONEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_HANDSHAKE_REQUEST_ARG_SET_SUBSCRIPTI = + "TException/IoTDBConnectionException occurred when SubscriptionProvider {} handshake with" + + " request {}, set SubscriptionProvider unavailable"; + public static final String LOG_TEXCEPTION_IOTDBCONNECTIONEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_CLOSE_SET_SUBSCRIPTIONPROVIDER_UNAVA = + "TException/IoTDBConnectionException occurred when SubscriptionProvider {} close, set" + + " SubscriptionProvider unavailable"; + public static final String LOG_IOEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_SERIALIZE_HEARTBEAT_REQUEST_ARG_634C8333 = "IOException occurred when SubscriptionProvider {} serialize heartbeat request {}"; + public static final String LOG_TEXCEPTION_IOTDBCONNECTIONEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_HEARTBEAT_SET_SUBSCRIPTIONPROVIDER_U = + "TException/IoTDBConnectionException occurred when SubscriptionProvider {} heartbeat, set" + + " SubscriptionProvider unavailable"; + public static final String LOG_IOEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_SERIALIZE_SUBSCRIBE_REQUEST_ARG_5E703B32 = "IOException occurred when SubscriptionProvider {} serialize subscribe request {}"; + public static final String LOG_TEXCEPTION_IOTDBCONNECTIONEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_SUBSCRIBE_REQUEST_ARG_SET_SUBSCRIPTI = + "TException/IoTDBConnectionException occurred when SubscriptionProvider {} subscribe with" + + " request {}, set SubscriptionProvider unavailable"; + public static final String LOG_IOEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_SERIALIZE_UNSUBSCRIBE_REQUEST_ARG_85D423CE = "IOException occurred when SubscriptionProvider {} serialize unsubscribe request {}"; + public static final String LOG_TEXCEPTION_IOTDBCONNECTIONEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_UNSUBSCRIBE_REQUEST_ARG_SET_SUBSCRIP = + "TException/IoTDBConnectionException occurred when SubscriptionProvider {} unsubscribe with" + + " request {}, set SubscriptionProvider unavailable"; + public static final String LOG_IOEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_SERIALIZE_SEEK_REQUEST_TOPIC_ARG_7620B991 = "IOException occurred when SubscriptionProvider {} serialize seek request for topic {}"; + public static final String LOG_TEXCEPTION_IOTDBCONNECTIONEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_SEEK_REQUEST_TOPIC_ARG_SET_AEAFC363 = + "TException/IoTDBConnectionException occurred when SubscriptionProvider {} seek with request" + + " for topic {}, set SubscriptionProvider unavailable"; + public static final String LOG_IOEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_SERIALIZE_SEEK_TOPICPROGRESS_TOPIC_ARG_E64C0FAF = "IOException occurred when SubscriptionProvider {} serialize seek(topicProgress) for topic {}"; + public static final String LOG_TEXCEPTION_IOTDBCONNECTIONEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_SEEK_TOPICPROGRESS_TOPIC_ARG_SET_193 = + "TException/IoTDBConnectionException occurred when SubscriptionProvider {} seek(topicProgress)" + + " for topic {}, set SubscriptionProvider unavailable"; + public static final String LOG_IOEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_SERIALIZE_SEEKAFTER_TOPICPROGRESS_TOPIC_ARG_9F79F3CF = + "IOException occurred when SubscriptionProvider {} serialize seekAfter(topicProgress) for" + + " topic {}"; + public static final String LOG_TEXCEPTION_IOTDBCONNECTIONEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_SEEKAFTER_TOPICPROGRESS_TOPIC_ARG_SE = + "TException/IoTDBConnectionException occurred when SubscriptionProvider {}" + + " seekAfter(topicProgress) for topic {}, set SubscriptionProvider unavailable"; + public static final String LOG_IOEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_SERIALIZE_POLL_REQUEST_ARG_969C4A7A = "IOException occurred when SubscriptionProvider {} serialize poll request {}"; + public static final String LOG_TEXCEPTION_IOTDBCONNECTIONEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_POLL_REQUEST_ARG_SET_SUBSCRIPTIONPRO = + "TException/IoTDBConnectionException occurred when SubscriptionProvider {} poll with request" + + " {}, set SubscriptionProvider unavailable"; + public static final String LOG_IOEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_SERIALIZE_COMMIT_REQUEST_ARG_D5335538 = "IOException occurred when SubscriptionProvider {} serialize commit request {}"; + public static final String LOG_TEXCEPTION_IOTDBCONNECTIONEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_COMMIT_REQUEST_ARG_SET_SUBSCRIPTIONP = + "TException/IoTDBConnectionException occurred when SubscriptionProvider {} commit with request" + + " {}, set SubscriptionProvider unavailable"; + public static final String LOG_FAILED_COMMIT_DRAINED_PROCESSOR_MESSAGES_CLOSE_4264DB35 = "Failed to commit drained processor messages on close"; + public static final String LOG_FAILED_COMMIT_PENDING_DRAINED_PROCESSOR_MESSAGES_CLOSE_644B5DDD = "Failed to commit pending drained processor messages on close"; + public static final String LOG_SUBSCRIPTIONPULLCONSUMER_ARG_DOES_NOT_SUBSCRIBE_TOPIC_ARG_F40BE4D1 = "SubscriptionPullConsumer {} does not subscribe to topic {}"; + public static final String LOG_SUBSCRIPTIONPULLCONSUMER_ARG_POLL_EMPTY_MESSAGE_TOPICS_ARG_AFTER_ARG_MILLISECOND_78F4D4A6 = "SubscriptionPullConsumer {} poll empty message from topics {} after {} millisecond(s)"; + public static final String EXCEPTION_SUBSCRIPTIONPULLCONSUMER_ARG_CANNOT_SEEK_TOPIC_ARG_SUBSCRIBED_MULTIPLE_TOPICS_BECAUSE_B99BCABC = + "SubscriptionPullConsumer %s cannot seek topic %s while subscribed to multiple topics because" + + " processor %s does not support topic-scoped reset"; + public static final String LOG_DETECT_ALREADY_EXISTED_FILE_ARG_POLLING_TOPIC_ARG_RESUME_CONSUMPTION_AD735649 = "Detect already existed file {} when polling topic {}, resume consumption"; + public static final String LOG_DETECT_ALREADY_EXISTED_FILE_ARG_POLLING_TOPIC_ARG_ADD_RANDOM_64BBDEEB = "Detect already existed file {} when polling topic {}, add random suffix {} to filename"; + public static final String LOG_SUBSCRIPTIONRUNTIMECRITICALEXCEPTION_OCCURRED_SUBSCRIPTIONCONSUMER_ARG_POLLING_TOPICS_ARG_C96324AD = "SubscriptionRuntimeCriticalException occurred when SubscriptionConsumer {} polling topics {}"; + public static final String LOG_EXECUTIONEXCEPTION_OCCURRED_SUBSCRIPTIONCONSUMER_ARG_POLLING_TOPICS_ARG_40F5E1CC = "ExecutionException occurred when SubscriptionConsumer {} polling topics {}"; + public static final String LOG_INTERRUPTEDEXCEPTION_OCCURRED_SUBSCRIPTIONCONSUMER_ARG_POLLING_TOPICS_ARG_9B556CD5 = "InterruptedException occurred when SubscriptionConsumer {} polling topics {}"; + public static final String LOG_SUBSCRIPTIONRUNTIMENONCRITICALEXCEPTION_OCCURRED_SUBSCRIPTIONCONSUMER_ARG_POLLING_TOPICS_ARG_61838153 = + "SubscriptionRuntimeNonCriticalException occurred when SubscriptionConsumer {} polling topics" + + " {}"; + public static final String LOG_ARG_START_POLL_FILE_ARG_COMMIT_CONTEXT_ARG_AT_OFFSET_0F677E12 = "{} start to poll file {} with commit context {} at offset {}"; + public static final String LOG_SUBSCRIPTIONCONSUMER_ARG_SUCCESSFULLY_POLL_FILE_ARG_COMMIT_CONTEXT_ARG_A23E0FDB = "SubscriptionConsumer {} successfully poll file {} with commit context {}"; + public static final String LOG_ERROR_OCCURRED_SUBSCRIPTIONCONSUMER_ARG_POLLING_FILE_ARG_COMMIT_CONTEXT_ARG_03619D67 = + "Error occurred when SubscriptionConsumer {} polling file {} with commit context {}: {}," + + " critical: {}"; + public static final String LOG_ERROR_OCCURRED_SUBSCRIPTIONCONSUMER_ARG_POLLING_TABLETS_COMMIT_CONTEXT_ARG_ARG_FF40B4E1 = + "Error occurred when SubscriptionConsumer {} polling tablets with commit context {}: {}," + + " critical: {}"; + public static final String LOG_ARG_FAILED_COMMIT_CONTEXTS_ARG_CF224D1E = "{} failed commit contexts: {}"; + public static final String LOG_ARG_STAGED_ARG_CONSENSUS_ACK_S_REDIRECT_AFTER_PROVIDER_ARG_0F0C0623 = "{} staged {} consensus ack(s) for redirect after provider {} became unavailable"; + public static final String LOG_ARG_KEEP_ARG_NON_CONSENSUS_ACK_S_PENDING_AFTER_PROVIDER_32F56904 = "{} keep {} non-consensus ack(s) pending after provider {} commit failure"; + public static final String LOG_ARG_FAILED_SUBSCRIBE_TOPICS_ARG_SUBSCRIPTION_PROVIDER_ARG_TRY_NEXT_4DF9FC46 = + "{} failed to subscribe topics {} from subscription provider {}, try next subscription" + + " provider..."; + public static final String LOG_ARG_FAILED_UNSUBSCRIBE_TOPICS_ARG_SUBSCRIPTION_PROVIDER_ARG_TRY_NEXT_2205E8A8 = + "{} failed to unsubscribe topics {} from subscription provider {}, try next subscription" + + " provider..."; + public static final String LOG_ARG_FAILED_SEEK_TOPIC_ARG_SUBSCRIPTION_PROVIDER_ARG_SEEK_REQUIRES_15AFE61D = + "{} failed to seek topic {} from subscription provider {}; seek requires every provider to" + + " succeed, so the client will continue notifying the remaining providers before failing this" + + " seek."; + public static final String LOG_ARG_FAILED_SEEK_TOPIC_ARG_TOPICPROGRESS_REGIONCOUNT_ARG_PROVIDER_ARG_E999A05B = + "{} failed to seek topic {} to topicProgress(regionCount={}) from provider {}; seek requires" + + " every provider to succeed, so the client will continue notifying the remaining providers" + + " before failing this seek."; + public static final String LOG_ARG_FAILED_SEEKAFTER_TOPIC_ARG_TOPICPROGRESS_REGIONCOUNT_ARG_PROVIDER_ARG_0C795E87 = + "{} failed to seekAfter topic {} to topicProgress(regionCount={}) from provider {}; seek" + + " requires every provider to succeed, so the client will continue notifying the remaining" + + " providers before failing this seekAfter."; + public static final String LOG_ARG_FAILED_REDIRECT_ARG_PENDING_CONSENSUS_ACK_S_ARG_VIA_E6A10AC5 = "{} failed to redirect {} pending consensus ack(s) for {} via provider {}"; + public static final String LOG_ARG_FAILED_FETCH_ALL_ENDPOINTS_SUBSCRIPTION_PROVIDER_ARG_TRY_NEXT_25651CAD = + "{} failed to fetch all endpoints from subscription provider {}, try next subscription" + + " provider..."; + public static final String EXCEPTION_FAILED_HANDSHAKE_SUBSCRIPTION_PROVIDER_ARG_BECAUSE_ARG_251C2E2A = "Failed to handshake with subscription provider %s because of %s"; + public static final String EXCEPTION_CLUSTER_HAS_NO_AVAILABLE_SUBSCRIPTION_PROVIDERS_ARG_POLL_TOPIC_ARG_FABF7A4E = "Cluster has no available subscription providers when %s poll topic %s"; + public static final String EXCEPTION_SOMETHING_UNEXPECTED_HAPPENED_ARG_POLL_FILE_SUBSCRIPTION_PROVIDER_DATA_NODE_07426483 = + "something unexpected happened when %s poll file from subscription provider with data node id" + + " %s, the subscription provider may be unavailable or not existed"; + public static final String EXCEPTION_SOMETHING_UNEXPECTED_HAPPENED_ARG_POLL_TABLETS_SUBSCRIPTION_PROVIDER_DATA_NODE_8D80E611 = + "something unexpected happened when %s poll tablets from subscription provider with data node" + + " id %s, the subscription provider may be unavailable or not existed"; + public static final String EXCEPTION_SOMETHING_UNEXPECTED_HAPPENED_ARG_COMMIT_NACK_ARG_MESSAGES_SUBSCRIPTION_PROVIDER_2026D7CE = + "something unexpected happened when %s commit (nack: %s) messages to subscription provider" + + " with data node id %s, the subscription provider may be unavailable or not existed"; + public static final String EXCEPTION_CLUSTER_HAS_NO_AVAILABLE_SUBSCRIPTION_PROVIDERS_ARG_SUBSCRIBE_TOPIC_ARG_06E872FE = "Cluster has no available subscription providers when %s subscribe topic %s"; + public static final String EXCEPTION_CLUSTER_HAS_NO_AVAILABLE_SUBSCRIPTION_PROVIDERS_ARG_UNSUBSCRIBE_TOPIC_ARG_BF50B2B1 = "Cluster has no available subscription providers when %s unsubscribe topic %s"; + public static final String EXCEPTION_CLUSTER_HAS_NO_AVAILABLE_SUBSCRIPTION_PROVIDERS_ARG_SEEK_TOPIC_ARG_9F93C2E7 = "Cluster has no available subscription providers when %s seek topic %s"; + public static final String EXCEPTION_CLUSTER_HAS_NO_AVAILABLE_SUBSCRIPTION_PROVIDERS_ARG_SEEKAFTER_TOPIC_ARG_C86D5F85 = "Cluster has no available subscription providers when %s seekAfter topic %s"; + public static final String EXCEPTION_CLUSTER_HAS_NO_AVAILABLE_SUBSCRIPTION_PROVIDERS_ARG_FETCH_ALL_ENDPOINTS_D232693E = "Cluster has no available subscription providers when %s fetch all endpoints"; + public static final String EXCEPTION_PASSWORD_ENCRYPTEDPASSWORD_MUTUALLY_EXCLUSIVE_ENCRYPTEDPASSWORD_ALREADY_SET_E4548A43 = "password and encryptedPassword are mutually exclusive; encryptedPassword is already set"; + public static final String EXCEPTION_PASSWORD_ENCRYPTEDPASSWORD_MUTUALLY_EXCLUSIVE_PASSWORD_ALREADY_SET_BB20AD1E = "password and encryptedPassword are mutually exclusive; password is already set"; + public static final String EXCEPTION_CONSENSUS_MODE_TOPIC_SHOULD_NOT_GENERATE_PIPE_SOURCE_ATTRIBUTES_BBDFF732 = "Consensus mode topic should not generate pipe source attributes"; + public static final String EXCEPTION_UNSUPPORTED_SUBSCRIPTIONCOMMITCONTEXT_VERSION_8021B27B = "Unsupported SubscriptionCommitContext version: "; + public static final String OUTDATED_SUBSCRIPTION_EVENT = "outdated subscription event"; + public static final String FIELD_SEPARATOR = ", "; + public static final String DIALECT_NOT_NULL = "dialect"; + } diff --git a/iotdb-client/subscription/src/main/i18n/zh/org/apache/iotdb/rpc/subscription/i18n/SubscriptionMessages.java b/iotdb-client/subscription/src/main/i18n/zh/org/apache/iotdb/rpc/subscription/i18n/SubscriptionMessages.java index ccd186c9ed348..855a8ea3f4e2c 100644 --- a/iotdb-client/subscription/src/main/i18n/zh/org/apache/iotdb/rpc/subscription/i18n/SubscriptionMessages.java +++ b/iotdb-client/subscription/src/main/i18n/zh/org/apache/iotdb/rpc/subscription/i18n/SubscriptionMessages.java @@ -92,4 +92,111 @@ public final class SubscriptionMessages { "SubscriptionConsumer {} 提交端点同步器"; private SubscriptionMessages() {} + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String EXCEPTION_UNEXPECTED_FIELDS_ARG_WAS_OBTAINED_DURING_SHOW_TOPIC_30B5D702 = "执行 SHOW TOPIC 时获取到意外字段 %s..."; + public static final String EXCEPTION_UNEXPECTED_FIELDS_ARG_WAS_OBTAINED_DURING_SHOW_SUBSCRIPTION_71F9C549 = "执行 SHOW SUBSCRIPTION 时获取到意外字段 %s..."; + public static final String EXCEPTION_SUBSCRIPTION_SESSION_MUST_CONFIGURED_ENDPOINT_2CAD53A9 = "订阅会话必须配置 endpoint。"; + public static final String EXCEPTION_ARG_ILLEGAL_IDENTIFIER_NOT_ENCLOSED_BACKTICKS_CAN_ONLY_CONSIST_DIGITS_55D6A31F = + "%s 非法,未用反引号括起的标识符只能包含数字、字符和下划线。"; + public static final String EXCEPTION_WATERMARK_TIMESTAMP_ONLY_AVAILABLE_WATERMARK_MESSAGES_ACTUAL_MESSAGE_TYPE_F8E32C57 = "Watermark 时间戳仅适用于 watermark 消息,实际消息类型:"; + public static final String EXCEPTION_ARG_DO_NOT_SUPPORT_GETRESULTSETS_7789852D = "%s 不支持 getResultSets()."; + public static final String EXCEPTION_ARG_DO_NOT_SUPPORT_GETRECORDTABLETITERATOR_46B4A489 = "%s 不支持 getRecordTabletIterator()."; + public static final String EXCEPTION_ARG_DO_NOT_SUPPORT_GETTSFILE_40D23462 = "%s 不支持 getTsFile()."; + public static final String EXCEPTION_USER_DATA_HAS_BEEN_REMOVED_ARG_7093644B = "已从 %s 移除用户数据。"; + public static final String EXCEPTION_ARG_DOES_NOT_SUPPORT_OPENTREEREADER_TABLE_MODEL_TSFILE_68621ECF = "%s 不支持对表模型 TsFile 调用 openTreeReader()。"; + public static final String EXCEPTION_ARG_DOES_NOT_SUPPORT_OPENTABLEREADER_TREE_MODEL_TSFILE_CEC27860 = "%s 不支持对树模型 TsFile 调用 openTableReader()。"; + public static final String EXCEPTION_UNKNOWN_COLUMN_CATEGORY_4F49F64B = "未知的列 category: "; + public static final String EXCEPTION_DATA_TYPE_ARG_NOT_SUPPORTED_31213160 = "不支持的数据类型 %s。"; + public static final String LOG_SUBSCRIPTIONPUSHCONSUMER_ARG_POLL_EMPTY_MESSAGE_TOPICS_ARG_AFTER_ARG_MILLISECOND_741801C2 = "SubscriptionPushConsumer {} 从主题 {} poll 到空消息,耗时 {} 毫秒"; + public static final String LOG_CONSUMER_LISTENER_RAISED_EXCEPTION_CONSUMING_MESSAGE_ARG_867EE46D = "消费者 listener 消费消息时抛出异常:{}"; + public static final String LOG_ARG_FAILED_CREATE_CONNECTION_ARG_BECAUSE_ARG_E536E22A = "{} 无法与 {} 创建连接,原因:{}"; + public static final String LOG_ARG_FAILED_FETCH_ALL_ENDPOINTS_ARG_BECAUSE_ARG_2C9E11D4 = "{} 无法从 {} 获取所有 endpoint,原因:{}"; + public static final String LOG_TERMINATION_OCCURRED_SUBSCRIPTIONCONSUMER_ARG_POLLING_TOPICS_UNSUBSCRIBE_TOPIC_ARG_AUTOMATICALLY_E9B695FA = "订阅消费者 {} poll 主题时发生终止,自动取消订阅主题 {}"; + public static final String LOG_ARG_FAILED_SENDING_HEARTBEAT_SUBSCRIPTION_PROVIDER_ARG_BECAUSE_ARG_SET_0B38FB1F = "{} 无法向 SubscriptionProvider {} 发送心跳,原因:{},将 SubscriptionProvider 设为不可用"; + public static final String LOG_EXCEPTION_OCCURRED_ARG_CLOSING_REMOVING_SUBSCRIPTION_PROVIDER_ARG_BECAUSE_ARG_2EC38739 = "{} 关闭并移除 SubscriptionProvider {} 时发生异常,原因:{}"; + public static final String EXCEPTION_CLUSTER_HAS_NO_AVAILABLE_SUBSCRIPTION_PROVIDERS_CONNECT_INITIAL_ENDPOINTS_ARG_5DB83198 = "集群没有可连接初始 endpoint %s 的可用 SubscriptionProvider"; + public static final String LOG_ARG_HAS_BEEN_LAUNCHED_SET_CORE_POOL_SIZE_ARG_WILL_0FDECBE3 = "{} 已启动,将 core pool size 设置为 {} 的操作会被忽略"; + public static final String LOG_INTERRUPT_WORKER_WHICH_MAY_CAUSE_SOME_TASK_INCONSISTENT_PLEASE_CHECK_04926D9F = "中断 worker 可能造成某些任务不一致。请检查业务日志。"; + public static final String LOG_THREAD_POOL_CAN_T_SHUTDOWN_EVEN_INTERRUPTING_WORKER_THREADS_WHICH_A49166F9 = + "即使中断工作线程也无法关闭线程池,可能造成某些任务不一致。请检查业务日志。"; + public static final String LOG_CURRENT_THREAD_INTERRUPTED_IT_TRYING_STOP_WORKER_THREADS_MAY_LEAVE_CF07ABA0 = + "当前线程尝试停止工作线程时被中断,可能留下不一致状态。请检查业务日志。"; + public static final String LOG_IOEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_SERIALIZE_HANDSHAKE_REQUEST_ARG_C1414290 = "SubscriptionProvider {} 序列化握手请求 {} 时发生 IOException"; + public static final String LOG_TEXCEPTION_IOTDBCONNECTIONEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_HANDSHAKE_REQUEST_ARG_SET_SUBSCRIPTI = "SubscriptionProvider {} 使用请求 {} 握手时发生 TException/IoTDBConnectionException,将 SubscriptionProvider 设为不可用"; + public static final String LOG_TEXCEPTION_IOTDBCONNECTIONEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_CLOSE_SET_SUBSCRIPTIONPROVIDER_UNAVA = "SubscriptionProvider {} 关闭时发生 TException/IoTDBConnectionException,将 SubscriptionProvider 设为不可用"; + public static final String LOG_IOEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_SERIALIZE_HEARTBEAT_REQUEST_ARG_634C8333 = "SubscriptionProvider {} 序列化心跳请求 {} 时发生 IOException"; + public static final String LOG_TEXCEPTION_IOTDBCONNECTIONEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_HEARTBEAT_SET_SUBSCRIPTIONPROVIDER_U = "SubscriptionProvider {} 发送心跳时发生 TException/IoTDBConnectionException,将 SubscriptionProvider 设为不可用"; + public static final String LOG_IOEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_SERIALIZE_SUBSCRIBE_REQUEST_ARG_5E703B32 = "SubscriptionProvider {} 序列化订阅请求 {} 时发生 IOException"; + public static final String LOG_TEXCEPTION_IOTDBCONNECTIONEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_SUBSCRIBE_REQUEST_ARG_SET_SUBSCRIPTI = "SubscriptionProvider {} 使用请求 {} 订阅时发生 TException/IoTDBConnectionException,将 SubscriptionProvider 设为不可用"; + public static final String LOG_IOEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_SERIALIZE_UNSUBSCRIBE_REQUEST_ARG_85D423CE = "SubscriptionProvider {} 序列化取消订阅请求 {} 时发生 IOException"; + public static final String LOG_TEXCEPTION_IOTDBCONNECTIONEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_UNSUBSCRIBE_REQUEST_ARG_SET_SUBSCRIP = "SubscriptionProvider {} 使用请求 {} 取消订阅时发生 TException/IoTDBConnectionException,将 SubscriptionProvider 设为不可用"; + public static final String LOG_IOEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_SERIALIZE_SEEK_REQUEST_TOPIC_ARG_7620B991 = "SubscriptionProvider {} 序列化主题 {} 的 seek 请求时发生 IOException"; + public static final String LOG_TEXCEPTION_IOTDBCONNECTIONEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_SEEK_REQUEST_TOPIC_ARG_SET_AEAFC363 = "SubscriptionProvider {} 对主题 {} 执行 seek 请求时发生 TException/IoTDBConnectionException,将 SubscriptionProvider 设为不可用"; + public static final String LOG_IOEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_SERIALIZE_SEEK_TOPICPROGRESS_TOPIC_ARG_E64C0FAF = "SubscriptionProvider {} 序列化主题 {} 的 seek(TopicProgress) 时发生 IOException"; + public static final String LOG_TEXCEPTION_IOTDBCONNECTIONEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_SEEK_TOPICPROGRESS_TOPIC_ARG_SET_193 = "SubscriptionProvider {} 对主题 {} 执行 seek(TopicProgress) 时发生 TException/IoTDBConnectionException,将 SubscriptionProvider 设为不可用"; + public static final String LOG_IOEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_SERIALIZE_SEEKAFTER_TOPICPROGRESS_TOPIC_ARG_9F79F3CF = "SubscriptionProvider {} 序列化主题 {} 的 seekAfter(TopicProgress) 时发生 IOException"; + public static final String LOG_TEXCEPTION_IOTDBCONNECTIONEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_SEEKAFTER_TOPICPROGRESS_TOPIC_ARG_SE = "SubscriptionProvider {} 对主题 {} 执行 seekAfter(TopicProgress) 时发生 TException/IoTDBConnectionException,将 SubscriptionProvider 设为不可用"; + public static final String LOG_IOEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_SERIALIZE_POLL_REQUEST_ARG_969C4A7A = "SubscriptionProvider {} 序列化 poll 请求 {} 时发生 IOException"; + public static final String LOG_TEXCEPTION_IOTDBCONNECTIONEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_POLL_REQUEST_ARG_SET_SUBSCRIPTIONPRO = "SubscriptionProvider {} 使用请求 {} poll 时发生 TException/IoTDBConnectionException,将 SubscriptionProvider 设为不可用"; + public static final String LOG_IOEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_SERIALIZE_COMMIT_REQUEST_ARG_D5335538 = "SubscriptionProvider {} 序列化 commit 请求 {} 时发生 IOException"; + public static final String LOG_TEXCEPTION_IOTDBCONNECTIONEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_COMMIT_REQUEST_ARG_SET_SUBSCRIPTIONP = "SubscriptionProvider {} 使用请求 {} commit 时发生 TException/IoTDBConnectionException,将 SubscriptionProvider 设为不可用"; + public static final String LOG_FAILED_COMMIT_DRAINED_PROCESSOR_MESSAGES_CLOSE_4264DB35 = "关闭时无法提交已排空的 processor 消息"; + public static final String LOG_FAILED_COMMIT_PENDING_DRAINED_PROCESSOR_MESSAGES_CLOSE_644B5DDD = "关闭时无法提交待处理且已排空的 processor 消息"; + public static final String LOG_SUBSCRIPTIONPULLCONSUMER_ARG_DOES_NOT_SUBSCRIBE_TOPIC_ARG_F40BE4D1 = "SubscriptionPullConsumer {} 未订阅主题 {}"; + public static final String LOG_SUBSCRIPTIONPULLCONSUMER_ARG_POLL_EMPTY_MESSAGE_TOPICS_ARG_AFTER_ARG_MILLISECOND_78F4D4A6 = "SubscriptionPullConsumer {} 从主题 {} poll 到空消息,耗时 {} 毫秒"; + public static final String EXCEPTION_SUBSCRIPTIONPULLCONSUMER_ARG_CANNOT_SEEK_TOPIC_ARG_SUBSCRIBED_MULTIPLE_TOPICS_BECAUSE_B99BCABC = + "SubscriptionPullConsumer %s 订阅多个主题时无法 seek 主题 %s,原因:processor %s 不支持" + + "主题范围的 reset"; + public static final String LOG_DETECT_ALREADY_EXISTED_FILE_ARG_POLLING_TOPIC_ARG_RESUME_CONSUMPTION_AD735649 = "检测到已存在文件 {},poll 主题 {} 时恢复消费"; + public static final String LOG_DETECT_ALREADY_EXISTED_FILE_ARG_POLLING_TOPIC_ARG_ADD_RANDOM_64BBDEEB = "检测到已存在文件 {},poll 主题 {} 时为文件名添加随机后缀 {}"; + public static final String LOG_SUBSCRIPTIONRUNTIMECRITICALEXCEPTION_OCCURRED_SUBSCRIPTIONCONSUMER_ARG_POLLING_TOPICS_ARG_C96324AD = "SubscriptionConsumer {} poll 主题 {} 时发生 SubscriptionRuntimeCriticalException"; + public static final String LOG_EXECUTIONEXCEPTION_OCCURRED_SUBSCRIPTIONCONSUMER_ARG_POLLING_TOPICS_ARG_40F5E1CC = "SubscriptionConsumer {} poll 主题 {} 时发生 ExecutionException"; + public static final String LOG_INTERRUPTEDEXCEPTION_OCCURRED_SUBSCRIPTIONCONSUMER_ARG_POLLING_TOPICS_ARG_9B556CD5 = "SubscriptionConsumer {} poll 主题 {} 时发生 InterruptedException"; + public static final String LOG_SUBSCRIPTIONRUNTIMENONCRITICALEXCEPTION_OCCURRED_SUBSCRIPTIONCONSUMER_ARG_POLLING_TOPICS_ARG_61838153 = "SubscriptionConsumer {} poll 主题 {} 时发生 SubscriptionRuntimeNonCriticalException"; + public static final String LOG_ARG_START_POLL_FILE_ARG_COMMIT_CONTEXT_ARG_AT_OFFSET_0F677E12 = "{} 开始 poll 文件 {},commit context {},offset {}"; + public static final String LOG_SUBSCRIPTIONCONSUMER_ARG_SUCCESSFULLY_POLL_FILE_ARG_COMMIT_CONTEXT_ARG_A23E0FDB = "订阅消费者 {} 成功 poll 文件 {},commit context {}"; + public static final String LOG_ERROR_OCCURRED_SUBSCRIPTIONCONSUMER_ARG_POLLING_FILE_ARG_COMMIT_CONTEXT_ARG_03619D67 = "订阅消费者 {} poll 文件 {} 时发生错误,commit context {}:{},critical:{}"; + public static final String LOG_ERROR_OCCURRED_SUBSCRIPTIONCONSUMER_ARG_POLLING_TABLETS_COMMIT_CONTEXT_ARG_ARG_FF40B4E1 = "订阅消费者 {} poll tablets 时发生错误,commit context {}:{},critical:{}"; + public static final String LOG_ARG_FAILED_COMMIT_CONTEXTS_ARG_CF224D1E = "{} commit contexts 失败:{}"; + public static final String LOG_ARG_STAGED_ARG_CONSENSUS_ACK_S_REDIRECT_AFTER_PROVIDER_ARG_0F0C0623 = "{} 已暂存 {} 个 consensus ack,用于 provider {} 不可用后的重定向"; + public static final String LOG_ARG_KEEP_ARG_NON_CONSENSUS_ACK_S_PENDING_AFTER_PROVIDER_32F56904 = "{} 保留 {} 个 non-consensus ack 待处理,因为 provider {} commit 失败"; + public static final String LOG_ARG_FAILED_SUBSCRIBE_TOPICS_ARG_SUBSCRIPTION_PROVIDER_ARG_TRY_NEXT_4DF9FC46 = "{} 无法订阅主题 {},SubscriptionProvider {} 失败,尝试下一个 SubscriptionProvider..."; + public static final String LOG_ARG_FAILED_UNSUBSCRIBE_TOPICS_ARG_SUBSCRIPTION_PROVIDER_ARG_TRY_NEXT_2205E8A8 = "{} 无法取消订阅主题 {},SubscriptionProvider {} 失败,尝试下一个 SubscriptionProvider..."; + public static final String LOG_ARG_FAILED_SEEK_TOPIC_ARG_SUBSCRIPTION_PROVIDER_ARG_SEEK_REQUIRES_15AFE61D = + "{} 无法在主题 {} 上从 SubscriptionProvider {} 执行 seek; seek 要求每个 provider 都成功," + + "因此客户端会先继续通知剩余 provider,然后再使本次 seek 失败。"; + public static final String LOG_ARG_FAILED_SEEK_TOPIC_ARG_TOPICPROGRESS_REGIONCOUNT_ARG_PROVIDER_ARG_E999A05B = + "{} 无法在主题 {} 上 seek 到 TopicProgress(regionCount={}),provider {} 失败; seek 要求每个" + + " provider 都成功,因此客户端会先继续通知剩余 provider,然后再使本次 seek 失败。"; + public static final String LOG_ARG_FAILED_SEEKAFTER_TOPIC_ARG_TOPICPROGRESS_REGIONCOUNT_ARG_PROVIDER_ARG_0C795E87 = + "{} 无法在主题 {} 上 seekAfter 到 TopicProgress(regionCount={}),provider {} 失败; seek 要求每个" + + " provider 都成功,因此客户端会先继续通知剩余 provider,然后再使本次 seekAfter 失败。"; + public static final String LOG_ARG_FAILED_REDIRECT_ARG_PENDING_CONSENSUS_ACK_S_ARG_VIA_E6A10AC5 = "{} 无法重定向 {} 个待处理 consensus ack,目标 {},provider {}"; + public static final String LOG_ARG_FAILED_FETCH_ALL_ENDPOINTS_SUBSCRIPTION_PROVIDER_ARG_TRY_NEXT_25651CAD = "{} 无法从 SubscriptionProvider {} 获取所有 endpoint,尝试下一个 SubscriptionProvider..."; + public static final String EXCEPTION_FAILED_HANDSHAKE_SUBSCRIPTION_PROVIDER_ARG_BECAUSE_ARG_251C2E2A = "与 SubscriptionProvider %s 握手失败,原因:%s"; + public static final String EXCEPTION_CLUSTER_HAS_NO_AVAILABLE_SUBSCRIPTION_PROVIDERS_ARG_POLL_TOPIC_ARG_FABF7A4E = "%s poll 主题 %s 时,集群没有可用的 SubscriptionProvider"; + public static final String EXCEPTION_SOMETHING_UNEXPECTED_HAPPENED_ARG_POLL_FILE_SUBSCRIPTION_PROVIDER_DATA_NODE_07426483 = + "%s 从 DataNode id 为 %s 的 SubscriptionProvider poll 文件时发生意外情况,该 SubscriptionProvider" + + " 可能不可用或不存在"; + public static final String EXCEPTION_SOMETHING_UNEXPECTED_HAPPENED_ARG_POLL_TABLETS_SUBSCRIPTION_PROVIDER_DATA_NODE_8D80E611 = + "%s 从 DataNode id 为 %s 的 SubscriptionProvider poll tablets 时发生意外情况,该 SubscriptionProvider" + + " 可能不可用或不存在"; + public static final String EXCEPTION_SOMETHING_UNEXPECTED_HAPPENED_ARG_COMMIT_NACK_ARG_MESSAGES_SUBSCRIPTION_PROVIDER_2026D7CE = + "%s 向 SubscriptionProvider commit 消息(nack:%s),DataNode id 为 %s," + + "该 SubscriptionProvider 可能不可用或不存在"; + public static final String EXCEPTION_CLUSTER_HAS_NO_AVAILABLE_SUBSCRIPTION_PROVIDERS_ARG_SUBSCRIBE_TOPIC_ARG_06E872FE = "%s 订阅主题 %s 时,集群没有可用的 SubscriptionProvider"; + public static final String EXCEPTION_CLUSTER_HAS_NO_AVAILABLE_SUBSCRIPTION_PROVIDERS_ARG_UNSUBSCRIBE_TOPIC_ARG_BF50B2B1 = "%s 取消订阅主题 %s 时,集群没有可用的 SubscriptionProvider"; + public static final String EXCEPTION_CLUSTER_HAS_NO_AVAILABLE_SUBSCRIPTION_PROVIDERS_ARG_SEEK_TOPIC_ARG_9F93C2E7 = "%s seek 主题 %s 时,集群没有可用的 SubscriptionProvider"; + public static final String EXCEPTION_CLUSTER_HAS_NO_AVAILABLE_SUBSCRIPTION_PROVIDERS_ARG_SEEKAFTER_TOPIC_ARG_C86D5F85 = "%s seekAfter 主题 %s 时,集群没有可用的 SubscriptionProvider"; + public static final String EXCEPTION_CLUSTER_HAS_NO_AVAILABLE_SUBSCRIPTION_PROVIDERS_ARG_FETCH_ALL_ENDPOINTS_D232693E = "%s 获取所有 endpoint 时,集群没有可用的 SubscriptionProvider"; + public static final String EXCEPTION_PASSWORD_ENCRYPTEDPASSWORD_MUTUALLY_EXCLUSIVE_ENCRYPTEDPASSWORD_ALREADY_SET_E4548A43 = "password 与 encryptedPassword 互斥;已设置 encryptedPassword"; + public static final String EXCEPTION_PASSWORD_ENCRYPTEDPASSWORD_MUTUALLY_EXCLUSIVE_PASSWORD_ALREADY_SET_BB20AD1E = "password 与 encryptedPassword 互斥;已设置 password"; + public static final String EXCEPTION_CONSENSUS_MODE_TOPIC_SHOULD_NOT_GENERATE_PIPE_SOURCE_ATTRIBUTES_BBDFF732 = "Consensus mode 主题不应生成 pipe source attributes"; + public static final String EXCEPTION_UNSUPPORTED_SUBSCRIPTIONCOMMITCONTEXT_VERSION_8021B27B = "不支持的 SubscriptionCommitContext 版本:"; + public static final String OUTDATED_SUBSCRIPTION_EVENT = "过期的订阅事件"; + public static final String FIELD_SEPARATOR = ","; + public static final String DIALECT_NOT_NULL = "dialect 不能为空"; + } diff --git a/iotdb-client/subscription/src/main/java/org/apache/iotdb/rpc/subscription/config/TopicConfig.java b/iotdb-client/subscription/src/main/java/org/apache/iotdb/rpc/subscription/config/TopicConfig.java index fefd8778bb602..bef0b74809ebc 100644 --- a/iotdb-client/subscription/src/main/java/org/apache/iotdb/rpc/subscription/config/TopicConfig.java +++ b/iotdb-client/subscription/src/main/java/org/apache/iotdb/rpc/subscription/config/TopicConfig.java @@ -20,6 +20,7 @@ package org.apache.iotdb.rpc.subscription.config; import org.apache.iotdb.pipe.api.customizer.parameter.PipeParameters; +import org.apache.iotdb.rpc.subscription.i18n.SubscriptionMessages; import org.apache.tsfile.utils.ReadWriteIOUtils; @@ -206,7 +207,8 @@ public Map getAttributesWithSourceRealtimeMode() { public Map getAttributesWithSourceMode() { if (isConsensusMode()) { throw new IllegalArgumentException( - "Consensus mode topic should not generate pipe source attributes"); + SubscriptionMessages + .EXCEPTION_CONSENSUS_MODE_TOPIC_SHOULD_NOT_GENERATE_PIPE_SOURCE_ATTRIBUTES_BBDFF732); } return isSnapshotMode() ? SNAPSHOT_MODE_CONFIG : LIVE_MODE_CONFIG; } diff --git a/iotdb-client/subscription/src/main/java/org/apache/iotdb/rpc/subscription/payload/poll/ErrorPayload.java b/iotdb-client/subscription/src/main/java/org/apache/iotdb/rpc/subscription/payload/poll/ErrorPayload.java index 4cf4d3d96b4f4..b0b9d6d0c5bfc 100644 --- a/iotdb-client/subscription/src/main/java/org/apache/iotdb/rpc/subscription/payload/poll/ErrorPayload.java +++ b/iotdb-client/subscription/src/main/java/org/apache/iotdb/rpc/subscription/payload/poll/ErrorPayload.java @@ -19,6 +19,8 @@ package org.apache.iotdb.rpc.subscription.payload.poll; +import org.apache.iotdb.rpc.subscription.i18n.SubscriptionMessages; + import org.apache.tsfile.utils.ReadWriteIOUtils; import java.io.DataOutputStream; @@ -28,7 +30,7 @@ public class ErrorPayload implements SubscriptionPollPayload { - private static final String OUTDATED_ERROR_MSG = "outdated subscription event"; + private static final String OUTDATED_ERROR_MSG = SubscriptionMessages.OUTDATED_SUBSCRIPTION_EVENT; public static final ErrorPayload OUTDATED_ERROR_PAYLOAD = new ErrorPayload(OUTDATED_ERROR_MSG, false); diff --git a/iotdb-client/subscription/src/main/java/org/apache/iotdb/rpc/subscription/payload/poll/SubscriptionCommitContext.java b/iotdb-client/subscription/src/main/java/org/apache/iotdb/rpc/subscription/payload/poll/SubscriptionCommitContext.java index b31e52d43aec3..2f982738fe7a2 100644 --- a/iotdb-client/subscription/src/main/java/org/apache/iotdb/rpc/subscription/payload/poll/SubscriptionCommitContext.java +++ b/iotdb-client/subscription/src/main/java/org/apache/iotdb/rpc/subscription/payload/poll/SubscriptionCommitContext.java @@ -19,6 +19,8 @@ package org.apache.iotdb.rpc.subscription.payload.poll; +import org.apache.iotdb.rpc.subscription.i18n.SubscriptionMessages; + import org.apache.tsfile.utils.PublicBAOS; import org.apache.tsfile.utils.ReadWriteIOUtils; @@ -256,7 +258,8 @@ public static SubscriptionCommitContext deserialize(final ByteBuffer buffer) { final byte version = ReadWriteIOUtils.readByte(buffer); if (version != SERIALIZATION_VERSION) { throw new IllegalArgumentException( - "Unsupported SubscriptionCommitContext version: " + version); + SubscriptionMessages.EXCEPTION_UNSUPPORTED_SUBSCRIPTIONCOMMITCONTEXT_VERSION_8021B27B + + version); } final int dataNodeId = ReadWriteIOUtils.readInt(buffer); final int rebootTimes = ReadWriteIOUtils.readInt(buffer); diff --git a/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/AbstractSubscriptionSession.java b/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/AbstractSubscriptionSession.java index 6683a1c5adf2e..24f2bc43fcb3d 100644 --- a/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/AbstractSubscriptionSession.java +++ b/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/AbstractSubscriptionSession.java @@ -23,6 +23,7 @@ import org.apache.iotdb.rpc.IoTDBConnectionException; import org.apache.iotdb.rpc.StatementExecutionException; import org.apache.iotdb.rpc.subscription.exception.SubscriptionException; +import org.apache.iotdb.rpc.subscription.i18n.SubscriptionMessages; import org.apache.iotdb.session.subscription.model.Subscription; import org.apache.iotdb.session.subscription.model.Topic; import org.apache.iotdb.session.subscription.util.IdentifierUtils; @@ -202,8 +203,11 @@ private Set convertDataSetToTopics(final SessionDataSet dataSet) if (fields.size() != 2) { throw new SubscriptionException( String.format( - "Unexpected fields %s was obtained during SHOW TOPIC...", - fields.stream().map(Object::toString).collect(Collectors.joining(", ")))); + SubscriptionMessages + .EXCEPTION_UNEXPECTED_FIELDS_ARG_WAS_OBTAINED_DURING_SHOW_TOPIC_30B5D702, + fields.stream() + .map(Object::toString) + .collect(Collectors.joining(SubscriptionMessages.FIELD_SEPARATOR)))); } topics.add(new Topic(fields.get(0).getStringValue(), fields.get(1).getStringValue())); } @@ -219,8 +223,11 @@ private Set convertDataSetToSubscriptions(final SessionDataSet dat if (fields.size() != 4) { throw new SubscriptionException( String.format( - "Unexpected fields %s was obtained during SHOW SUBSCRIPTION...", - fields.stream().map(Object::toString).collect(Collectors.joining(", ")))); + SubscriptionMessages + .EXCEPTION_UNEXPECTED_FIELDS_ARG_WAS_OBTAINED_DURING_SHOW_SUBSCRIPTION_71F9C549, + fields.stream() + .map(Object::toString) + .collect(Collectors.joining(SubscriptionMessages.FIELD_SEPARATOR)))); } subscriptions.add( new Subscription( diff --git a/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/SubscriptionSessionWrapper.java b/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/SubscriptionSessionWrapper.java index 58c0b4a957f83..d7e715fa62762 100644 --- a/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/SubscriptionSessionWrapper.java +++ b/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/SubscriptionSessionWrapper.java @@ -22,6 +22,7 @@ import org.apache.iotdb.common.rpc.thrift.TEndPoint; import org.apache.iotdb.rpc.IoTDBConnectionException; import org.apache.iotdb.rpc.subscription.exception.SubscriptionParameterNotValidException; +import org.apache.iotdb.rpc.subscription.i18n.SubscriptionMessages; import org.apache.iotdb.session.AbstractSessionBuilder; import org.apache.iotdb.session.Session; import org.apache.iotdb.session.SessionConnection; @@ -49,7 +50,7 @@ public SessionConnection constructSessionConnection( throws IoTDBConnectionException { if (Objects.isNull(endpoint)) { throw new SubscriptionParameterNotValidException( - "Subscription session must be configured with an endpoint."); + SubscriptionMessages.EXCEPTION_SUBSCRIPTION_SESSION_MUST_CONFIGURED_ENDPOINT_2CAD53A9); } return new SubscriptionSessionConnection( session, diff --git a/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/consumer/base/AbstractSubscriptionConsumer.java b/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/consumer/base/AbstractSubscriptionConsumer.java index b5e187bc8767d..8c3d66c1b625b 100644 --- a/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/consumer/base/AbstractSubscriptionConsumer.java +++ b/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/consumer/base/AbstractSubscriptionConsumer.java @@ -548,7 +548,10 @@ AbstractSubscriptionProvider constructProviderAndHandshake(final TEndPoint endPo } throw new SubscriptionConnectionException( String.format( - "Failed to handshake with subscription provider %s because of %s", provider, e), + SubscriptionMessages + .EXCEPTION_FAILED_HANDSHAKE_SUBSCRIPTION_PROVIDER_ARG_BECAUSE_ARG_251C2E2A, + provider, + e), e); } @@ -598,14 +601,16 @@ private Path getFilePath( if (allowFileAlreadyExistsException) { if (inFlightFilesCommitContextSet.contains(commitContext)) { LOGGER.info( - "Detect already existed file {} when polling topic {}, resume consumption", + SubscriptionMessages + .LOG_DETECT_ALREADY_EXISTED_FILE_ARG_POLLING_TOPIC_ARG_RESUME_CONSUMPTION_AD735649, fileName, topicName); return filePath; } final String suffix = RandomStringGenerator.generate(16); LOGGER.warn( - "Detect already existed file {} when polling topic {}, add random suffix {} to filename", + SubscriptionMessages + .LOG_DETECT_ALREADY_EXISTED_FILE_ARG_POLLING_TOPIC_ARG_ADD_RANDOM_64BBDEEB, fileName, topicName, suffix); @@ -650,7 +655,8 @@ private Path getFilePath( final SubscriptionCommitContext commitContext = resp.getCommitContext(); final String topicNameToUnsubscribe = commitContext.getTopicName(); LOGGER.info( - "Termination occurred when SubscriptionConsumer {} polling topics, unsubscribe topic {} automatically", + SubscriptionMessages + .LOG_TERMINATION_OCCURRED_SUBSCRIPTIONCONSUMER_ARG_POLLING_TOPICS_UNSUBSCRIBE_TOPIC_ARG_AUTOMATICALLY_E9B695FA, coreReportMessage(), topicNameToUnsubscribe); unsubscribe(Collections.singleton(topicNameToUnsubscribe), false); @@ -736,14 +742,16 @@ protected List multiplePoll( final SubscriptionRuntimeCriticalException ex = (SubscriptionRuntimeCriticalException) cause; LOGGER.warn( - "SubscriptionRuntimeCriticalException occurred when SubscriptionConsumer {} polling topics {}", + SubscriptionMessages + .LOG_SUBSCRIPTIONRUNTIMECRITICALEXCEPTION_OCCURRED_SUBSCRIPTIONCONSUMER_ARG_POLLING_TOPICS_ARG_C96324AD, this, topicNames, ex); lastSubscriptionRuntimeCriticalException = ex; } else { LOGGER.warn( - "ExecutionException occurred when SubscriptionConsumer {} polling topics {}", + SubscriptionMessages + .LOG_EXECUTIONEXCEPTION_OCCURRED_SUBSCRIPTIONCONSUMER_ARG_POLLING_TOPICS_ARG_40F5E1CC, this, topicNames, e); @@ -752,7 +760,8 @@ protected List multiplePoll( } } catch (final InterruptedException e) { LOGGER.warn( - "InterruptedException occurred when SubscriptionConsumer {} polling topics {}", + SubscriptionMessages + .LOG_INTERRUPTEDEXCEPTION_OCCURRED_SUBSCRIPTIONCONSUMER_ARG_POLLING_TOPICS_ARG_9B556CD5, this, topicNames, e); @@ -823,7 +832,8 @@ private List singlePoll( .ifPresent(currentMessages::add); } catch (final SubscriptionRuntimeNonCriticalException e) { LOGGER.warn( - "SubscriptionRuntimeNonCriticalException occurred when SubscriptionConsumer {} polling topics {}", + SubscriptionMessages + .LOG_SUBSCRIPTIONRUNTIMENONCRITICALEXCEPTION_OCCURRED_SUBSCRIPTIONCONSUMER_ARG_POLLING_TOPICS_ARG_61838153, this, topicNames, e); @@ -832,7 +842,8 @@ private List singlePoll( } } catch (final SubscriptionRuntimeCriticalException e) { LOGGER.warn( - "SubscriptionRuntimeCriticalException occurred when SubscriptionConsumer {} polling topics {}", + SubscriptionMessages + .LOG_SUBSCRIPTIONRUNTIMECRITICALEXCEPTION_OCCURRED_SUBSCRIPTIONCONSUMER_ARG_POLLING_TOPICS_ARG_C96324AD, this, topicNames, e); @@ -934,7 +945,7 @@ private Optional pollFileInternal( long writingOffset = fileWriter.length(); LOGGER.info( - "{} start to poll file {} with commit context {} at offset {}", + SubscriptionMessages.LOG_ARG_START_POLL_FILE_ARG_COMMIT_CONTEXT_ARG_AT_OFFSET_0F677E12, this, file.getAbsolutePath(), commitContext, @@ -1062,7 +1073,8 @@ private Optional pollFileInternal( fileWriter.close(); LOGGER.info( - "SubscriptionConsumer {} successfully poll file {} with commit context {}", + SubscriptionMessages + .LOG_SUBSCRIPTIONCONSUMER_ARG_SUCCESSFULLY_POLL_FILE_ARG_COMMIT_CONTEXT_ARG_A23E0FDB, this, file.getAbsolutePath(), commitContext); @@ -1094,7 +1106,8 @@ private Optional pollFileInternal( throw new SubscriptionPollTimeoutException(message); } else { LOGGER.warn( - "Error occurred when SubscriptionConsumer {} polling file {} with commit context {}: {}, critical: {}", + SubscriptionMessages + .LOG_ERROR_OCCURRED_SUBSCRIPTIONCONSUMER_ARG_POLLING_FILE_ARG_COMMIT_CONTEXT_ARG_03619D67, this, file.getAbsolutePath(), commitContext, @@ -1216,7 +1229,8 @@ private Optional pollTabletsInternal( return Optional.empty(); } LOGGER.warn( - "Error occurred when SubscriptionConsumer {} polling tablets with commit context {}: {}, critical: {}", + SubscriptionMessages + .LOG_ERROR_OCCURRED_SUBSCRIPTIONCONSUMER_ARG_POLLING_TABLETS_COMMIT_CONTEXT_ARG_ARG_FF40B4E1, this, commitContext, errorMessage, @@ -1246,8 +1260,10 @@ private List pollInternal( } throw new SubscriptionConnectionException( String.format( - "Cluster has no available subscription providers when %s poll topic %s", - this, topicNames)); + SubscriptionMessages + .EXCEPTION_CLUSTER_HAS_NO_AVAILABLE_SUBSCRIPTION_PROVIDERS_ARG_POLL_TOPIC_ARG_FABF7A4E, + this, + topicNames)); } // ignore SubscriptionConnectionException to improve poll auto retry try { @@ -1273,8 +1289,10 @@ private List pollFileInternal( } throw new SubscriptionConnectionException( String.format( - "something unexpected happened when %s poll file from subscription provider with data node id %s, the subscription provider may be unavailable or not existed", - this, dataNodeId)); + SubscriptionMessages + .EXCEPTION_SOMETHING_UNEXPECTED_HAPPENED_ARG_POLL_FILE_SUBSCRIPTION_PROVIDER_DATA_NODE_07426483, + this, + dataNodeId)); } // ignore SubscriptionConnectionException to improve poll auto retry try { @@ -1300,8 +1318,10 @@ private List pollTabletsInternal( } throw new SubscriptionConnectionException( String.format( - "something unexpected happened when %s poll tablets from subscription provider with data node id %s, the subscription provider may be unavailable or not existed", - this, dataNodeId)); + SubscriptionMessages + .EXCEPTION_SOMETHING_UNEXPECTED_HAPPENED_ARG_POLL_TABLETS_SUBSCRIPTION_PROVIDER_DATA_NODE_8D80E611, + this, + dataNodeId)); } // ignore SubscriptionConnectionException to improve poll auto retry try { @@ -1370,7 +1390,10 @@ private void commit(final Iterable commitContexts, fi String.format( "%s commit (nack: %s) partially accepted, requested=%d, accepted=%d, failed=%d", this, nack, requestedCount, acceptedCount, failedCommitContexts.size()); - LOGGER.warn("{} failed commit contexts: {}", errorMessage, failedCommitContexts); + LOGGER.warn( + SubscriptionMessages.LOG_ARG_FAILED_COMMIT_CONTEXTS_ARG_CF224D1E, + errorMessage, + failedCommitContexts); throw new SubscriptionRuntimeNonCriticalException(errorMessage); } } @@ -1428,14 +1451,16 @@ protected Set ackCommitContextsWithPartialProgress( } if (stagedCount > 0) { LOGGER.warn( - "{} staged {} consensus ack(s) for redirect after provider {} became unavailable", + SubscriptionMessages + .LOG_ARG_STAGED_ARG_CONSENSUS_ACK_S_REDIRECT_AFTER_PROVIDER_ARG_0F0C0623, this, stagedCount, entry.getKey()); } if (retainedCount > 0) { LOGGER.warn( - "{} keep {} non-consensus ack(s) pending after provider {} commit failure", + SubscriptionMessages + .LOG_ARG_KEEP_ARG_NON_CONSENSUS_ACK_S_PENDING_AFTER_PROVIDER_32F56904, this, retainedCount, entry.getKey(), @@ -1487,8 +1512,11 @@ private AbstractSubscriptionProvider.CommitResult commitInternal( } throw new SubscriptionConnectionException( String.format( - "something unexpected happened when %s commit (nack: %s) messages to subscription provider with data node id %s, the subscription provider may be unavailable or not existed", - this, nack, dataNodeId)); + SubscriptionMessages + .EXCEPTION_SOMETHING_UNEXPECTED_HAPPENED_ARG_COMMIT_NACK_ARG_MESSAGES_SUBSCRIPTION_PROVIDER_2026D7CE, + this, + nack, + dataNodeId)); } return provider.commit(subscriptionCommitContexts, nack); } finally { @@ -1599,8 +1627,10 @@ private void subscribeWithRedirection(final Set topicNames) throws Subsc if (providers.isEmpty()) { throw new SubscriptionConnectionException( String.format( - "Cluster has no available subscription providers when %s subscribe topic %s", - this, topicNames)); + SubscriptionMessages + .EXCEPTION_CLUSTER_HAS_NO_AVAILABLE_SUBSCRIPTION_PROVIDERS_ARG_SUBSCRIBE_TOPIC_ARG_06E872FE, + this, + topicNames)); } for (final AbstractSubscriptionProvider provider : providers) { try { @@ -1613,7 +1643,8 @@ private void subscribeWithRedirection(final Set topicNames) throws Subsc return; } LOGGER.warn( - "{} failed to subscribe topics {} from subscription provider {}, try next subscription provider...", + SubscriptionMessages + .LOG_ARG_FAILED_SUBSCRIBE_TOPICS_ARG_SUBSCRIPTION_PROVIDER_ARG_TRY_NEXT_4DF9FC46, this, topicNames, provider, @@ -1634,8 +1665,10 @@ private void unsubscribeWithRedirection(final Set topicNames) if (providers.isEmpty()) { throw new SubscriptionConnectionException( String.format( - "Cluster has no available subscription providers when %s unsubscribe topic %s", - this, topicNames)); + SubscriptionMessages + .EXCEPTION_CLUSTER_HAS_NO_AVAILABLE_SUBSCRIPTION_PROVIDERS_ARG_UNSUBSCRIBE_TOPIC_ARG_BF50B2B1, + this, + topicNames)); } for (final AbstractSubscriptionProvider provider : providers) { try { @@ -1648,7 +1681,8 @@ private void unsubscribeWithRedirection(final Set topicNames) return; } LOGGER.warn( - "{} failed to unsubscribe topics {} from subscription provider {}, try next subscription provider...", + SubscriptionMessages + .LOG_ARG_FAILED_UNSUBSCRIBE_TOPICS_ARG_SUBSCRIPTION_PROVIDER_ARG_TRY_NEXT_2205E8A8, this, topicNames, provider, @@ -1675,8 +1709,10 @@ private void seekOnAllProviders( if (providers.isEmpty()) { throw new SubscriptionConnectionException( String.format( - "Cluster has no available subscription providers when %s seek topic %s", - this, topicName)); + SubscriptionMessages + .EXCEPTION_CLUSTER_HAS_NO_AVAILABLE_SUBSCRIPTION_PROVIDERS_ARG_SEEK_TOPIC_ARG_9F93C2E7, + this, + topicName)); } final List failedProviders = new ArrayList<>(); Throwable firstFailure = null; @@ -1689,7 +1725,8 @@ private void seekOnAllProviders( firstFailure = e; } LOGGER.warn( - "{} failed to seek topic {} from subscription provider {}; seek requires every provider to succeed, so the client will continue notifying the remaining providers before failing this seek.", + SubscriptionMessages + .LOG_ARG_FAILED_SEEK_TOPIC_ARG_SUBSCRIPTION_PROVIDER_ARG_SEEK_REQUIRES_15AFE61D, this, topicName, provider, @@ -1713,8 +1750,10 @@ private void seekToTopicProgressOnAllProviders( if (providers.isEmpty()) { throw new SubscriptionConnectionException( String.format( - "Cluster has no available subscription providers when %s seek topic %s", - this, topicName)); + SubscriptionMessages + .EXCEPTION_CLUSTER_HAS_NO_AVAILABLE_SUBSCRIPTION_PROVIDERS_ARG_SEEK_TOPIC_ARG_9F93C2E7, + this, + topicName)); } final List failedProviders = new ArrayList<>(); Throwable firstFailure = null; @@ -1727,7 +1766,8 @@ private void seekToTopicProgressOnAllProviders( firstFailure = e; } LOGGER.warn( - "{} failed to seek topic {} to topicProgress(regionCount={}) from provider {}; seek requires every provider to succeed, so the client will continue notifying the remaining providers before failing this seek.", + SubscriptionMessages + .LOG_ARG_FAILED_SEEK_TOPIC_ARG_TOPICPROGRESS_REGIONCOUNT_ARG_PROVIDER_ARG_E999A05B, this, topicName, topicProgress.getRegionProgress().size(), @@ -1752,8 +1792,10 @@ private void seekAfterTopicProgressOnAllProviders( if (providers.isEmpty()) { throw new SubscriptionConnectionException( String.format( - "Cluster has no available subscription providers when %s seekAfter topic %s", - this, topicName)); + SubscriptionMessages + .EXCEPTION_CLUSTER_HAS_NO_AVAILABLE_SUBSCRIPTION_PROVIDERS_ARG_SEEKAFTER_TOPIC_ARG_C86D5F85, + this, + topicName)); } final List failedProviders = new ArrayList<>(); Throwable firstFailure = null; @@ -1766,7 +1808,8 @@ private void seekAfterTopicProgressOnAllProviders( firstFailure = e; } LOGGER.warn( - "{} failed to seekAfter topic {} to topicProgress(regionCount={}) from provider {}; seek requires every provider to succeed, so the client will continue notifying the remaining providers before failing this seekAfter.", + SubscriptionMessages + .LOG_ARG_FAILED_SEEKAFTER_TOPIC_ARG_TOPICPROGRESS_REGIONCOUNT_ARG_PROVIDER_ARG_0C795E87, this, topicName, topicProgress.getRegionProgress().size(), @@ -1858,7 +1901,8 @@ private void flushPendingRedirectAcks(final List currentMes } } catch (final SubscriptionException e) { LOGGER.warn( - "{} failed to redirect {} pending consensus ack(s) for {} via provider {}", + SubscriptionMessages + .LOG_ARG_FAILED_REDIRECT_ARG_PENDING_CONSENSUS_ACK_S_ARG_VIA_E6A10AC5, this, contextsToRedirect.size(), entry.getKey(), @@ -2021,14 +2065,17 @@ Map fetchAllEndPointsWithRedirection() throws SubscriptionEx if (providers.isEmpty()) { throw new SubscriptionConnectionException( String.format( - "Cluster has no available subscription providers when %s fetch all endpoints", this)); + SubscriptionMessages + .EXCEPTION_CLUSTER_HAS_NO_AVAILABLE_SUBSCRIPTION_PROVIDERS_ARG_FETCH_ALL_ENDPOINTS_D232693E, + this)); } for (final AbstractSubscriptionProvider provider : providers) { try { return provider.heartbeat().getEndPoints(); } catch (final Exception e) { LOGGER.warn( - "{} failed to fetch all endpoints from subscription provider {}, try next subscription provider...", + SubscriptionMessages + .LOG_ARG_FAILED_FETCH_ALL_ENDPOINTS_SUBSCRIPTION_PROVIDER_ARG_TRY_NEXT_25651CAD, this, provider, e); diff --git a/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/consumer/base/AbstractSubscriptionConsumerBuilder.java b/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/consumer/base/AbstractSubscriptionConsumerBuilder.java index 991d237ed2b89..156769dd00395 100644 --- a/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/consumer/base/AbstractSubscriptionConsumerBuilder.java +++ b/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/consumer/base/AbstractSubscriptionConsumerBuilder.java @@ -21,6 +21,7 @@ import org.apache.iotdb.isession.SessionConfig; import org.apache.iotdb.rpc.subscription.config.ConsumerConstant; +import org.apache.iotdb.rpc.subscription.i18n.SubscriptionMessages; import org.apache.iotdb.session.subscription.util.IdentifierUtils; import org.apache.thrift.annotation.Nullable; @@ -76,7 +77,8 @@ public AbstractSubscriptionConsumerBuilder password(final String password) { if (!Objects.equals(password, SessionConfig.DEFAULT_PASSWORD) && Objects.nonNull(this.encryptedPassword)) { throw new IllegalStateException( - "password and encryptedPassword are mutually exclusive; encryptedPassword is already set"); + SubscriptionMessages + .EXCEPTION_PASSWORD_ENCRYPTEDPASSWORD_MUTUALLY_EXCLUSIVE_ENCRYPTEDPASSWORD_ALREADY_SET_E4548A43); } this.password = password; return this; @@ -88,7 +90,8 @@ public AbstractSubscriptionConsumerBuilder encryptedPassword(final String encryp } if (!Objects.equals(this.password, SessionConfig.DEFAULT_PASSWORD)) { throw new IllegalStateException( - "password and encryptedPassword are mutually exclusive; password is already set"); + SubscriptionMessages + .EXCEPTION_PASSWORD_ENCRYPTEDPASSWORD_MUTUALLY_EXCLUSIVE_PASSWORD_ALREADY_SET_BB20AD1E); } this.encryptedPassword = encryptedPassword; return this; diff --git a/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/consumer/base/AbstractSubscriptionProvider.java b/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/consumer/base/AbstractSubscriptionProvider.java index 6187ba0ca2767..3b2b55ee4e4c9 100644 --- a/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/consumer/base/AbstractSubscriptionProvider.java +++ b/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/consumer/base/AbstractSubscriptionProvider.java @@ -30,6 +30,7 @@ import org.apache.iotdb.rpc.subscription.exception.SubscriptionPipeTimeoutException; import org.apache.iotdb.rpc.subscription.exception.SubscriptionRuntimeCriticalException; import org.apache.iotdb.rpc.subscription.exception.SubscriptionRuntimeNonCriticalException; +import org.apache.iotdb.rpc.subscription.i18n.SubscriptionMessages; import org.apache.iotdb.rpc.subscription.payload.poll.PollFilePayload; import org.apache.iotdb.rpc.subscription.payload.poll.PollPayload; import org.apache.iotdb.rpc.subscription.payload.poll.PollTabletsPayload; @@ -210,7 +211,8 @@ PipeSubscribeHandshakeResp handshake(final ConsumerConfig consumerConfig) req = PipeSubscribeHandshakeReq.toTPipeSubscribeReq(consumerConfig); } catch (final IOException e) { LOGGER.warn( - "IOException occurred when SubscriptionProvider {} serialize handshake request {}", + SubscriptionMessages + .LOG_IOEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_SERIALIZE_HANDSHAKE_REQUEST_ARG_C1414290, this, consumerConfig, e); @@ -222,7 +224,8 @@ PipeSubscribeHandshakeResp handshake(final ConsumerConfig consumerConfig) } catch (final TException | IoTDBConnectionException e) { // Assume provider unavailable LOGGER.warn( - "TException/IoTDBConnectionException occurred when SubscriptionProvider {} handshake with request {}, set SubscriptionProvider unavailable", + SubscriptionMessages + .LOG_TEXCEPTION_IOTDBCONNECTIONEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_HANDSHAKE_REQUEST_ARG_SET_SUBSCRIPTI, this, consumerConfig, e); @@ -254,7 +257,8 @@ void closeInternal() throws SubscriptionException { } catch (final TException | IoTDBConnectionException e) { // Assume provider unavailable LOGGER.warn( - "TException/IoTDBConnectionException occurred when SubscriptionProvider {} close, set SubscriptionProvider unavailable", + SubscriptionMessages + .LOG_TEXCEPTION_IOTDBCONNECTIONEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_CLOSE_SET_SUBSCRIPTIONPROVIDER_UNAVA, this, e); setUnavailable(); @@ -277,7 +281,8 @@ PipeSubscribeHeartbeatResp heartbeat( req = SubscriptionHeartbeatReq.toThriftReq(processorBufferedCommitContexts); } catch (final IOException e) { LOGGER.warn( - "IOException occurred when SubscriptionProvider {} serialize heartbeat request {}", + SubscriptionMessages + .LOG_IOEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_SERIALIZE_HEARTBEAT_REQUEST_ARG_634C8333, this, processorBufferedCommitContexts, e); @@ -290,7 +295,8 @@ PipeSubscribeHeartbeatResp heartbeat( } catch (final TException | IoTDBConnectionException e) { // Assume provider unavailable LOGGER.warn( - "TException/IoTDBConnectionException occurred when SubscriptionProvider {} heartbeat, set SubscriptionProvider unavailable", + SubscriptionMessages + .LOG_TEXCEPTION_IOTDBCONNECTIONEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_HEARTBEAT_SET_SUBSCRIPTIONPROVIDER_U, this, e); setUnavailable(); @@ -306,7 +312,8 @@ Map subscribe(final Set topicNames) throws Subscrip req = PipeSubscribeSubscribeReq.toTPipeSubscribeReq(topicNames); } catch (final IOException e) { LOGGER.warn( - "IOException occurred when SubscriptionProvider {} serialize subscribe request {}", + SubscriptionMessages + .LOG_IOEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_SERIALIZE_SUBSCRIBE_REQUEST_ARG_5E703B32, this, topicNames, e); @@ -318,7 +325,8 @@ Map subscribe(final Set topicNames) throws Subscrip } catch (final TException | IoTDBConnectionException e) { // Assume provider unavailable LOGGER.warn( - "TException/IoTDBConnectionException occurred when SubscriptionProvider {} subscribe with request {}, set SubscriptionProvider unavailable", + SubscriptionMessages + .LOG_TEXCEPTION_IOTDBCONNECTIONEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_SUBSCRIBE_REQUEST_ARG_SET_SUBSCRIPTI, this, topicNames, e); @@ -337,7 +345,8 @@ Map unsubscribe(final Set topicNames) throws Subscr req = PipeSubscribeUnsubscribeReq.toTPipeSubscribeReq(topicNames); } catch (final IOException e) { LOGGER.warn( - "IOException occurred when SubscriptionProvider {} serialize unsubscribe request {}", + SubscriptionMessages + .LOG_IOEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_SERIALIZE_UNSUBSCRIBE_REQUEST_ARG_85D423CE, this, topicNames, e); @@ -349,7 +358,8 @@ Map unsubscribe(final Set topicNames) throws Subscr } catch (final TException | IoTDBConnectionException e) { // Assume provider unavailable LOGGER.warn( - "TException/IoTDBConnectionException occurred when SubscriptionProvider {} unsubscribe with request {}, set SubscriptionProvider unavailable", + SubscriptionMessages + .LOG_TEXCEPTION_IOTDBCONNECTIONEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_UNSUBSCRIBE_REQUEST_ARG_SET_SUBSCRIP, this, topicNames, e); @@ -369,7 +379,8 @@ void seek(final String topicName, final short seekType, final long timestamp) req = SubscriptionSeekReq.toThriftReq(topicName, seekType, timestamp); } catch (final IOException e) { LOGGER.warn( - "IOException occurred when SubscriptionProvider {} serialize seek request for topic {}", + SubscriptionMessages + .LOG_IOEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_SERIALIZE_SEEK_REQUEST_TOPIC_ARG_7620B991, this, topicName, e); @@ -380,7 +391,8 @@ void seek(final String topicName, final short seekType, final long timestamp) resp = getSessionConnection().pipeSubscribe(req); } catch (final TException | IoTDBConnectionException e) { LOGGER.warn( - "TException/IoTDBConnectionException occurred when SubscriptionProvider {} seek with request for topic {}, set SubscriptionProvider unavailable", + SubscriptionMessages + .LOG_TEXCEPTION_IOTDBCONNECTIONEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_SEEK_REQUEST_TOPIC_ARG_SET_AEAFC363, this, topicName, e); @@ -397,7 +409,8 @@ void seekToTopicProgress(final String topicName, final TopicProgress topicProgre req = SubscriptionSeekReq.toTopicProgressReq(topicName, topicProgress); } catch (final IOException e) { LOGGER.warn( - "IOException occurred when SubscriptionProvider {} serialize seek(topicProgress) for topic {}", + SubscriptionMessages + .LOG_IOEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_SERIALIZE_SEEK_TOPICPROGRESS_TOPIC_ARG_E64C0FAF, this, topicName, e); @@ -408,7 +421,8 @@ void seekToTopicProgress(final String topicName, final TopicProgress topicProgre resp = getSessionConnection().pipeSubscribe(req); } catch (final TException | IoTDBConnectionException e) { LOGGER.warn( - "TException/IoTDBConnectionException occurred when SubscriptionProvider {} seek(topicProgress) for topic {}, set SubscriptionProvider unavailable", + SubscriptionMessages + .LOG_TEXCEPTION_IOTDBCONNECTIONEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_SEEK_TOPICPROGRESS_TOPIC_ARG_SET_193, this, topicName, e); @@ -425,7 +439,8 @@ void seekAfterTopicProgress(final String topicName, final TopicProgress topicPro req = SubscriptionSeekReq.toSeekAfterTopicProgressReq(topicName, topicProgress); } catch (final IOException e) { LOGGER.warn( - "IOException occurred when SubscriptionProvider {} serialize seekAfter(topicProgress) for topic {}", + SubscriptionMessages + .LOG_IOEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_SERIALIZE_SEEKAFTER_TOPICPROGRESS_TOPIC_ARG_9F79F3CF, this, topicName, e); @@ -436,7 +451,8 @@ void seekAfterTopicProgress(final String topicName, final TopicProgress topicPro resp = getSessionConnection().pipeSubscribe(req); } catch (final TException | IoTDBConnectionException e) { LOGGER.warn( - "TException/IoTDBConnectionException occurred when SubscriptionProvider {} seekAfter(topicProgress) for topic {}, set SubscriptionProvider unavailable", + SubscriptionMessages + .LOG_TEXCEPTION_IOTDBCONNECTIONEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_SEEKAFTER_TOPICPROGRESS_TOPIC_ARG_SE, this, topicName, e); @@ -494,7 +510,8 @@ List poll(final SubscriptionPollRequest pollMessage) req = PipeSubscribePollReq.toTPipeSubscribeReq(pollMessage); } catch (final IOException e) { LOGGER.warn( - "IOException occurred when SubscriptionProvider {} serialize poll request {}", + SubscriptionMessages + .LOG_IOEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_SERIALIZE_POLL_REQUEST_ARG_969C4A7A, this, pollMessage, e); @@ -506,7 +523,8 @@ List poll(final SubscriptionPollRequest pollMessage) } catch (final TException | IoTDBConnectionException e) { // Assume provider unavailable LOGGER.warn( - "TException/IoTDBConnectionException occurred when SubscriptionProvider {} poll with request {}, set SubscriptionProvider unavailable", + SubscriptionMessages + .LOG_TEXCEPTION_IOTDBCONNECTIONEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_POLL_REQUEST_ARG_SET_SUBSCRIPTIONPRO, this, pollMessage, e); @@ -526,7 +544,8 @@ CommitResult commit( req = PipeSubscribeCommitReq.toTPipeSubscribeReq(subscriptionCommitContexts, nack); } catch (final IOException e) { LOGGER.warn( - "IOException occurred when SubscriptionProvider {} serialize commit request {}", + SubscriptionMessages + .LOG_IOEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_SERIALIZE_COMMIT_REQUEST_ARG_D5335538, this, subscriptionCommitContexts, e); @@ -538,7 +557,8 @@ CommitResult commit( } catch (final TException | IoTDBConnectionException e) { // Assume provider unavailable LOGGER.warn( - "TException/IoTDBConnectionException occurred when SubscriptionProvider {} commit with request {}, set SubscriptionProvider unavailable", + SubscriptionMessages + .LOG_TEXCEPTION_IOTDBCONNECTIONEXCEPTION_OCCURRED_SUBSCRIPTIONPROVIDER_ARG_COMMIT_REQUEST_ARG_SET_SUBSCRIPTIONP, this, subscriptionCommitContexts, e); diff --git a/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/consumer/base/AbstractSubscriptionProviders.java b/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/consumer/base/AbstractSubscriptionProviders.java index 51ff7195db2a8..31f4dd46a0e0e 100644 --- a/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/consumer/base/AbstractSubscriptionProviders.java +++ b/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/consumer/base/AbstractSubscriptionProviders.java @@ -89,7 +89,11 @@ void openProviders(final AbstractSubscriptionConsumer consumer) throws Subscript defaultProvider = consumer.constructProviderAndHandshake(endPoint); } catch (final Exception e) { LOGGER.warn( - "{} failed to create connection with {} because of {}", consumer, endPoint, e, e); + SubscriptionMessages.LOG_ARG_FAILED_CREATE_CONNECTION_ARG_BECAUSE_ARG_E536E22A, + consumer, + endPoint, + e, + e); continue; // try next endpoint } defaultDataNodeId = defaultProvider.getDataNodeId(); @@ -100,7 +104,11 @@ void openProviders(final AbstractSubscriptionConsumer consumer) throws Subscript allEndPoints = defaultProvider.heartbeat().getEndPoints(); } catch (final Exception e) { LOGGER.warn( - "{} failed to fetch all endpoints from {} because of {}", consumer, endPoint, e, e); + SubscriptionMessages.LOG_ARG_FAILED_FETCH_ALL_ENDPOINTS_ARG_BECAUSE_ARG_2C9E11D4, + consumer, + endPoint, + e, + e); break; } @@ -114,7 +122,7 @@ void openProviders(final AbstractSubscriptionConsumer consumer) throws Subscript provider = consumer.constructProviderAndHandshake(entry.getValue()); } catch (final Exception e) { LOGGER.warn( - "{} failed to create connection with {} because of {}", + SubscriptionMessages.LOG_ARG_FAILED_CREATE_CONNECTION_ARG_BECAUSE_ARG_E536E22A, consumer, entry.getValue(), e, @@ -130,7 +138,8 @@ void openProviders(final AbstractSubscriptionConsumer consumer) throws Subscript if (hasNoAvailableProviders()) { throw new SubscriptionConnectionException( String.format( - "Cluster has no available subscription providers to connect with initial endpoints %s", + SubscriptionMessages + .EXCEPTION_CLUSTER_HAS_NO_AVAILABLE_SUBSCRIPTION_PROVIDERS_CONNECT_INITIAL_ENDPOINTS_ARG_5DB83198, initialEndpoints)); } @@ -255,7 +264,8 @@ private void heartbeatInternal(final AbstractSubscriptionConsumer consumer) { // unsubscribe completed topics for (final String topicName : resp.getTopicNamesToUnsubscribe()) { LOGGER.info( - "Termination occurred when SubscriptionConsumer {} polling topics, unsubscribe topic {} automatically", + SubscriptionMessages + .LOG_TERMINATION_OCCURRED_SUBSCRIPTIONCONSUMER_ARG_POLLING_TOPICS_UNSUBSCRIBE_TOPIC_ARG_AUTOMATICALLY_E9B695FA, consumer.coreReportMessage(), topicName); consumer.unsubscribe(topicName); @@ -263,7 +273,8 @@ private void heartbeatInternal(final AbstractSubscriptionConsumer consumer) { provider.setAvailable(); } catch (final Exception e) { LOGGER.warn( - "{} failed to sending heartbeat to subscription provider {} because of {}, set subscription provider unavailable", + SubscriptionMessages + .LOG_ARG_FAILED_SENDING_HEARTBEAT_SUBSCRIPTION_PROVIDER_ARG_BECAUSE_ARG_SET_0B38FB1F, consumer, provider, e, @@ -317,7 +328,11 @@ private void syncInternal(final AbstractSubscriptionConsumer consumer) { newProvider = consumer.constructProviderAndHandshake(endPoint); } catch (final Exception e) { LOGGER.warn( - "{} failed to create connection with {} because of {}", consumer, endPoint, e, e); + SubscriptionMessages.LOG_ARG_FAILED_CREATE_CONNECTION_ARG_BECAUSE_ARG_E536E22A, + consumer, + endPoint, + e, + e); continue; } addProvider(entry.getKey(), newProvider); @@ -328,7 +343,8 @@ private void syncInternal(final AbstractSubscriptionConsumer consumer) { provider.setAvailable(); } catch (final Exception e) { LOGGER.warn( - "{} failed to sending heartbeat to subscription provider {} because of {}, set subscription provider unavailable", + SubscriptionMessages + .LOG_ARG_FAILED_SENDING_HEARTBEAT_SUBSCRIPTION_PROVIDER_ARG_BECAUSE_ARG_SET_0B38FB1F, consumer, provider, e, @@ -341,7 +357,8 @@ private void syncInternal(final AbstractSubscriptionConsumer consumer) { closeAndRemoveProvider(entry.getKey()); } catch (final Exception e) { LOGGER.warn( - "Exception occurred when {} closing and removing subscription provider {} because of {}", + SubscriptionMessages + .LOG_EXCEPTION_OCCURRED_ARG_CLOSING_REMOVING_SUBSCRIPTION_PROVIDER_ARG_BECAUSE_ARG_2EC38739, consumer, provider, e, @@ -359,7 +376,8 @@ private void syncInternal(final AbstractSubscriptionConsumer consumer) { closeAndRemoveProvider(dataNodeId); } catch (final Exception e) { LOGGER.warn( - "Exception occurred when {} closing and removing subscription provider {} because of {}", + SubscriptionMessages + .LOG_EXCEPTION_OCCURRED_ARG_CLOSING_REMOVING_SUBSCRIPTION_PROVIDER_ARG_BECAUSE_ARG_2EC38739, consumer, provider, e, diff --git a/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/consumer/base/AbstractSubscriptionPullConsumer.java b/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/consumer/base/AbstractSubscriptionPullConsumer.java index 240ab1745527b..f6f1510b7b3f1 100644 --- a/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/consumer/base/AbstractSubscriptionPullConsumer.java +++ b/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/consumer/base/AbstractSubscriptionPullConsumer.java @@ -158,7 +158,9 @@ public synchronized void close() { try { commitSync(drainedMessages); } catch (final SubscriptionException e) { - LOGGER.warn("Failed to commit drained processor messages on close", e); + LOGGER.warn( + SubscriptionMessages.LOG_FAILED_COMMIT_DRAINED_PROCESSOR_MESSAGES_CLOSE_4264DB35, + e); } } } else { @@ -176,7 +178,10 @@ public synchronized void close() { try { commitSync(drainedMessages); } catch (final SubscriptionException e) { - LOGGER.warn("Failed to commit pending drained processor messages on close", e); + LOGGER.warn( + SubscriptionMessages + .LOG_FAILED_COMMIT_PENDING_DRAINED_PROCESSOR_MESSAGES_CLOSE_644B5DDD, + e); } } } @@ -224,7 +229,8 @@ protected List poll(final Set topicNames, final lon .forEach( topicName -> LOGGER.warn( - "SubscriptionPullConsumer {} does not subscribe to topic {}", + SubscriptionMessages + .LOG_SUBSCRIPTIONPULLCONSUMER_ARG_DOES_NOT_SUBSCRIBE_TOPIC_ARG_F40BE4D1, this, topicName)); } else { @@ -238,7 +244,8 @@ protected List poll(final Set topicNames, final lon final List messages = multiplePoll(parsedTopicNames, timeoutMs); if (messages.isEmpty() && processors.isEmpty()) { LOGGER.info( - "SubscriptionPullConsumer {} poll empty message from topics {} after {} millisecond(s)", + SubscriptionMessages + .LOG_SUBSCRIPTIONPULLCONSUMER_ARG_POLL_EMPTY_MESSAGE_TOPICS_ARG_AFTER_ARG_MILLISECOND_78F4D4A6, this, CollectionUtils.getLimitedString(parsedTopicNames, 32), timeoutMs); @@ -414,8 +421,11 @@ private void ensureTopicScopedProcessorResetSupported(final String topicName) if (!processor.supportsTopicScopedReset()) { throw new SubscriptionParameterNotValidException( String.format( - "SubscriptionPullConsumer %s cannot seek topic %s while subscribed to multiple topics because processor %s does not support topic-scoped reset", - this, topicName, processor.getClass().getName())); + SubscriptionMessages + .EXCEPTION_SUBSCRIPTIONPULLCONSUMER_ARG_CANNOT_SEEK_TOPIC_ARG_SUBSCRIBED_MULTIPLE_TOPICS_BECAUSE_B99BCABC, + this, + topicName, + processor.getClass().getName())); } } } diff --git a/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/consumer/base/AbstractSubscriptionPushConsumer.java b/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/consumer/base/AbstractSubscriptionPushConsumer.java index 8c7842b714c88..b1e45de8e0ed0 100644 --- a/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/consumer/base/AbstractSubscriptionPushConsumer.java +++ b/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/consumer/base/AbstractSubscriptionPushConsumer.java @@ -199,7 +199,8 @@ public void run() { }); if (messages.isEmpty()) { LOGGER.info( - "SubscriptionPushConsumer {} poll empty message from topics {} after {} millisecond(s)", + SubscriptionMessages + .LOG_SUBSCRIPTIONPUSHCONSUMER_ARG_POLL_EMPTY_MESSAGE_TOPICS_ARG_AFTER_ARG_MILLISECOND_741801C2, this, CollectionUtils.getLimitedString(subscribedTopics.keySet(), 32), autoPollTimeoutMs); @@ -224,7 +225,10 @@ public void run() { } } catch (final Exception e) { LOGGER.warn( - "Consumer listener raised an exception while consuming message: {}", message, e); + SubscriptionMessages + .LOG_CONSUMER_LISTENER_RAISED_EXCEPTION_CONSUMING_MESSAGE_ARG_867EE46D, + message, + e); messagesToNack.add(message); } } diff --git a/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/consumer/base/ColumnAlignProcessor.java b/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/consumer/base/ColumnAlignProcessor.java index 95889ec9406d3..58815488fa795 100644 --- a/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/consumer/base/ColumnAlignProcessor.java +++ b/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/consumer/base/ColumnAlignProcessor.java @@ -19,6 +19,7 @@ package org.apache.iotdb.session.subscription.consumer.base; +import org.apache.iotdb.rpc.subscription.i18n.SubscriptionMessages; import org.apache.iotdb.session.subscription.payload.SubscriptionMessage; import org.apache.iotdb.session.subscription.payload.SubscriptionMessageType; @@ -61,7 +62,7 @@ public ColumnAlignProcessor() { } public ColumnAlignProcessor(final Dialect dialect) { - this.dialect = Objects.requireNonNull(dialect, "dialect"); + this.dialect = Objects.requireNonNull(dialect, SubscriptionMessages.DIALECT_NOT_NULL); } @Override diff --git a/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/consumer/base/SubscriptionExecutorServiceManager.java b/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/consumer/base/SubscriptionExecutorServiceManager.java index 6429643effeac..4f48f9d6f4df2 100644 --- a/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/consumer/base/SubscriptionExecutorServiceManager.java +++ b/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/consumer/base/SubscriptionExecutorServiceManager.java @@ -192,7 +192,7 @@ void setCorePoolSize(final int corePoolSize) { } LOGGER.warn( - "{} has been launched, set core pool size to {} will be ignored", + SubscriptionMessages.LOG_ARG_HAS_BEEN_LAUNCHED_SET_CORE_POOL_SIZE_ARG_WILL_0FDECBE3, this.name, corePoolSize); } @@ -234,17 +234,20 @@ void shutdown() { AWAIT_TERMINATION_TIMEOUT_MS, TimeUnit.MILLISECONDS)) { this.executor.shutdownNow(); LOGGER.warn( - "Interrupt the worker, which may cause some task inconsistent. Please check the biz logs."); + SubscriptionMessages + .LOG_INTERRUPT_WORKER_WHICH_MAY_CAUSE_SOME_TASK_INCONSISTENT_PLEASE_CHECK_04926D9F); if (!this.executor.awaitTermination( AWAIT_TERMINATION_TIMEOUT_MS, TimeUnit.MILLISECONDS)) { LOGGER.error( - "Thread pool can't be shutdown even with interrupting worker threads, which may cause some task inconsistent. Please check the biz logs."); + SubscriptionMessages + .LOG_THREAD_POOL_CAN_T_SHUTDOWN_EVEN_INTERRUPTING_WORKER_THREADS_WHICH_A49166F9); } } } catch (final InterruptedException e) { this.executor.shutdownNow(); LOGGER.error( - "The current thread is interrupted when it is trying to stop the worker threads. This may leave an inconsistent state. Please check the biz logs."); + SubscriptionMessages + .LOG_CURRENT_THREAD_INTERRUPTED_IT_TRYING_STOP_WORKER_THREADS_MAY_LEAVE_CF07ABA0); Thread.currentThread().interrupt(); } diff --git a/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/payload/SubscriptionMessage.java b/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/payload/SubscriptionMessage.java index 523b86587fe44..d9884197fbe5f 100644 --- a/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/payload/SubscriptionMessage.java +++ b/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/payload/SubscriptionMessage.java @@ -21,6 +21,7 @@ import org.apache.iotdb.rpc.subscription.exception.SubscriptionIncompatibleHandlerException; import org.apache.iotdb.rpc.subscription.exception.SubscriptionRuntimeException; +import org.apache.iotdb.rpc.subscription.i18n.SubscriptionMessages; import org.apache.iotdb.rpc.subscription.payload.poll.SubscriptionCommitContext; import org.apache.thrift.annotation.Nullable; @@ -90,7 +91,8 @@ public short getMessageType() { public long getWatermarkTimestamp() { if (messageType != SubscriptionMessageType.WATERMARK.getType()) { throw new IllegalStateException( - "Watermark timestamp is only available for watermark messages, actual message type: " + SubscriptionMessages + .EXCEPTION_WATERMARK_TIMESTAMP_ONLY_AVAILABLE_WATERMARK_MESSAGES_ACTUAL_MESSAGE_TYPE_F8E32C57 + messageType); } return watermarkTimestamp; @@ -173,7 +175,9 @@ public List getResultSets() { return ((SubscriptionRecordHandler) handler).getResultSets(); } throw new SubscriptionIncompatibleHandlerException( - String.format("%s do not support getResultSets().", handler.getClass().getSimpleName())); + String.format( + SubscriptionMessages.EXCEPTION_ARG_DO_NOT_SUPPORT_GETRESULTSETS_7789852D, + handler.getClass().getSimpleName())); } public Iterator getRecordTabletIterator() { @@ -186,7 +190,8 @@ public Iterator getRecordTabletIterator() { } throw new SubscriptionIncompatibleHandlerException( String.format( - "%s do not support getRecordTabletIterator().", handler.getClass().getSimpleName())); + SubscriptionMessages.EXCEPTION_ARG_DO_NOT_SUPPORT_GETRECORDTABLETITERATOR_46B4A489, + handler.getClass().getSimpleName())); } public SubscriptionTsFileHandler getTsFile() { @@ -194,13 +199,17 @@ public SubscriptionTsFileHandler getTsFile() { return (SubscriptionTsFileHandler) handler; } throw new SubscriptionIncompatibleHandlerException( - String.format("%s do not support getTsFile().", handler.getClass().getSimpleName())); + String.format( + SubscriptionMessages.EXCEPTION_ARG_DO_NOT_SUPPORT_GETTSFILE_40D23462, + handler.getClass().getSimpleName())); } private void ensureUserDataAvailable() { if (userDataRemoved) { throw new SubscriptionRuntimeException( - String.format("User data has been removed from %s.", getClass().getSimpleName())); + String.format( + SubscriptionMessages.EXCEPTION_USER_DATA_HAS_BEEN_REMOVED_ARG_7093644B, + getClass().getSimpleName())); } } } diff --git a/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/payload/SubscriptionRecordHandler.java b/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/payload/SubscriptionRecordHandler.java index 69bd24d768711..fbc7170392c0a 100644 --- a/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/payload/SubscriptionRecordHandler.java +++ b/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/payload/SubscriptionRecordHandler.java @@ -21,6 +21,7 @@ import org.apache.iotdb.rpc.subscription.annotation.TableModel; import org.apache.iotdb.rpc.subscription.exception.SubscriptionRuntimeException; +import org.apache.iotdb.rpc.subscription.i18n.SubscriptionMessages; import org.apache.thrift.annotation.Nullable; import org.apache.tsfile.enums.TSDataType; @@ -147,7 +148,8 @@ public List getColumnCategories() { return ColumnCategory.ATTRIBUTE; default: throw new IllegalArgumentException( - "Unknown column category: " + columnCategory); + SubscriptionMessages.EXCEPTION_UNKNOWN_COLUMN_CATEGORY_4F49F64B + + columnCategory); } })) .collect(Collectors.toList()); @@ -264,7 +266,9 @@ private boolean isTableData() { private void ensureUserDataAvailable() { if (userDataRemoved) { throw new SubscriptionRuntimeException( - String.format("User data has been removed from %s.", getClass().getSimpleName())); + String.format( + SubscriptionMessages.EXCEPTION_USER_DATA_HAS_BEEN_REMOVED_ARG_7093644B, + getClass().getSimpleName())); } } @@ -374,7 +378,8 @@ private TSRecord generateTsRecord( break; default: throw new UnSupportedDataTypeException( - String.format("Data type %s is not supported.", dataType)); + String.format( + SubscriptionMessages.EXCEPTION_DATA_TYPE_ARG_NOT_SUPPORTED_31213160, dataType)); } } return record; @@ -411,7 +416,8 @@ private static Field generateFieldFromTabletValue( break; default: throw new UnSupportedDataTypeException( - String.format("Data type %s is not supported.", dataType)); + String.format( + SubscriptionMessages.EXCEPTION_DATA_TYPE_ARG_NOT_SUPPORTED_31213160, dataType)); } return field; } diff --git a/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/payload/SubscriptionTsFileHandler.java b/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/payload/SubscriptionTsFileHandler.java index cd6f3270891f9..c033c5e1bb9c7 100644 --- a/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/payload/SubscriptionTsFileHandler.java +++ b/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/payload/SubscriptionTsFileHandler.java @@ -21,6 +21,7 @@ import org.apache.iotdb.rpc.subscription.annotation.TableModel; import org.apache.iotdb.rpc.subscription.exception.SubscriptionIncompatibleHandlerException; +import org.apache.iotdb.rpc.subscription.i18n.SubscriptionMessages; import org.apache.thrift.annotation.Nullable; import org.apache.tsfile.read.v4.ITsFileReader; @@ -43,7 +44,8 @@ public ITsFileTreeReader openTreeReader() throws IOException { if (databaseName != null) { throw new SubscriptionIncompatibleHandlerException( String.format( - "%s does not support openTreeReader() for table model tsfile.", + SubscriptionMessages + .EXCEPTION_ARG_DOES_NOT_SUPPORT_OPENTREEREADER_TABLE_MODEL_TSFILE_68621ECF, getClass().getSimpleName())); } return new TsFileTreeReaderBuilder().file(getFile()).build(); @@ -54,7 +56,8 @@ public ITsFileReader openTableReader() throws IOException { if (databaseName == null) { throw new SubscriptionIncompatibleHandlerException( String.format( - "%s does not support openTableReader() for tree model tsfile.", + SubscriptionMessages + .EXCEPTION_ARG_DOES_NOT_SUPPORT_OPENTABLEREADER_TREE_MODEL_TSFILE_CEC27860, getClass().getSimpleName())); } return new TsFileReaderBuilder().file(getFile()).build(); diff --git a/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/util/IdentifierUtils.java b/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/util/IdentifierUtils.java index b7df61732682f..595778945db25 100644 --- a/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/util/IdentifierUtils.java +++ b/iotdb-client/subscription/src/main/java/org/apache/iotdb/session/subscription/util/IdentifierUtils.java @@ -55,7 +55,8 @@ private static void checkIdentifier(final String src) { || PathVisitor.isRealNumber(src)) { throw new SubscriptionIdentifierSemanticException( String.format( - "%s is illegal, identifier not enclosed with backticks can only consist of digits, characters and underscore.", + SubscriptionMessages + .EXCEPTION_ARG_ILLEGAL_IDENTIFIER_NOT_ENCLOSED_BACKTICKS_CAN_ONLY_CONSIST_DIGITS_55D6A31F, src)); } } diff --git a/iotdb-core/calc-commons/src/main/i18n/en/org/apache/iotdb/calc/i18n/CalcMessages.java b/iotdb-core/calc-commons/src/main/i18n/en/org/apache/iotdb/calc/i18n/CalcMessages.java index 9267e141fb53f..9a53ce77f4e83 100644 --- a/iotdb-core/calc-commons/src/main/i18n/en/org/apache/iotdb/calc/i18n/CalcMessages.java +++ b/iotdb-core/calc-commons/src/main/i18n/en/org/apache/iotdb/calc/i18n/CalcMessages.java @@ -151,4 +151,280 @@ private CalcMessages() {} "pushed element is null"; public static final String FAILED_TO_DELETE_TEMP_DIR = "Failed to delete temp dir {}."; + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String EXCEPTION_WRONG_OBJECT_FILE_PATH_D317B1AB = "wrong object file path: "; + public static final String EXCEPTION_OFFSET_ARG_GREATER_THAN_EQUAL_OBJECT_SIZE_ARG_FILE_PATH_31936A19 = "offset %d is greater than or equal to object size %d, file path is %s"; + public static final String EXCEPTION_READ_OBJECT_SIZE_ARG_TOO_LARGE_SIZE_2G_FILE_PATH_7D4A4D10 = "Read object size %s is too large (size > 2G), file path is %s"; + public static final String LOG_FAILED_CLOSE_FILE_METHOD_DEREGISTER_ARG_BECAUSE_ARG_1744AC60 = "Failed to close file in method deregister(%s), because %s"; + public static final String LOG_FAILED_CLEAN_DIR_METHOD_DEREGISTER_ARG_BECAUSE_ARG_F53193E5 = "Failed to clean dir in method deregister(%s), because %s"; + public static final String EXCEPTION_TYPE_ACCUMULATOR_DOES_NOT_SUPPORT_REMOVE_INPUT_905AFAA1 = "This type of accumulator does not support remove input!"; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_AGGREGATION_VARIANCE_ARG_17A45959 = "Unsupported data type in aggregation variance : %s"; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_CENTRALMOMENT_AGGREGATION_0A19C2A8 = "Unsupported data type in CentralMoment Aggregation: "; + public static final String EXCEPTION_UNKNOWN_FUNCTION_ARG_NODE_ARG_927DA6A7 = "Unknown function %s on Node: %d."; + public static final String EXCEPTION_INLIST_LITERAL_TIMESTAMP_CAN_ONLY_LONGLITERAL_DOUBLELITERAL_GENERICLITERAL_CURRENT_A3105E67 = + "InList Literal for TIMESTAMP can only be LongLiteral, DoubleLiteral and GenericLiteral," + + " current is "; + public static final String EXCEPTION_PARTITION_HANDLER_FINISHED_CANNOT_ADD_MORE_DATA_D8E31A3E = "The partition handler is finished, cannot add more data."; + public static final String EXCEPTION_AFTER_MATCH_SKIP_FAILED_PATTERN_VARIABLE_NOT_PRESENT_MATCH_2891B276 = "AFTER MATCH SKIP TO failed: pattern variable is not present in match"; + public static final String EXCEPTION_AFTER_MATCH_SKIP_FAILED_CANNOT_SKIP_FIRST_ROW_MATCH_71D4093B = "AFTER MATCH SKIP TO failed: cannot skip to first row of match"; + public static final String EXCEPTION_AGGREGATE_FUNCTION_ARG_DOES_NOT_SUPPORT_COPYING_3E03976C = "aggregate function %s does not support copying"; + public static final String EXCEPTION_UNSUPPORTED_BUILT_WINDOW_FUNCTION_NAME_F994ED27 = "Unsupported built-in window function name: "; + public static final String EXCEPTION_UNSUPPORTED_DEFAULT_VALUE_S_DATA_TYPE_LAG_BEB00511 = "Unsupported default value's data type in Lag: "; + public static final String EXCEPTION_CANNOT_COMPARE_VALUES_DIFFERENT_TYPES_A95EDA7F = "Cannot compare values of different types: "; + public static final String EXCEPTION_VS_AEDAB253 = " vs. "; + public static final String EXCEPTION_TARGET_TYPE_NOT_GENERICDATATYPE_CB87EF37 = "Target type is not a GenericDataType: "; + public static final String EXCEPTION_UNSUPPORTED_EXPRESSION_TYPE_5C50C92E = "Unsupported expression type: "; + public static final String EXCEPTION_IDENTITYLINEARFILL_S_NEEDPREPAREFORNEXT_METHOD_SHOULD_ALWAYS_RETURN_FALSE_FF7AD73B = "IdentityLinearFill's needPrepareForNext() method should always return false."; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_LAST_ARG_37F52124 = "Unsupported data type in LAST: %s"; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_LAST_AGGREGATION_ARG_2FCF5ADA = "Unsupported data type in LAST Aggregation: %s"; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_LAST_AGGREGATION_ARG_B3F2EE42 = "Unsupported data type in LAST aggregation: %s"; + public static final String EXCEPTION_SIZE_CHILDRENCOLUMNS_DATATYPES_SHOULD_SAME_6EA43EA8 = "The size of childrenColumns and dataTypes should be the same."; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_FIRST_AGGREGATION_ARG_8D31C6CA = "Unsupported data type in FIRST_BY Aggregation: %s"; + public static final String EXCEPTION_APPROX_PERCENTILE_REQUIRES_2_3_ARGUMENTS_BUT_GOT_ARG_D78590AA = "APPROX_PERCENTILE requires 2 or 3 arguments, but got %d"; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_APPROX_PERCENTILE_AGGREGATION_ARG_CFEC0431 = "Unsupported data type in APPROX_PERCENTILE Aggregation: %s"; + public static final String EXCEPTION_APPROXPERCENTILEACCUMULATOR_DOES_NOT_SUPPORT_STATISTICS_2BB01365 = "ApproxPercentileAccumulator does not support statistics"; + public static final String EXCEPTION_NO_EXACT_DOUBLE_REPRESENTATION_LONG_ARG_3E5B7550 = "no exact double representation for long: %s"; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_COVARIANCE_AGGREGATION_ARG_643BEDD0 = "Unsupported data type in Covariance Aggregation: %s"; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_LAST_AGGREGATION_ARG_8C41FBCC = "Unsupported data type in LAST_BY Aggregation: %s"; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_CENTRALMOMENT_AGGREGATION_ARG_74B9A3A8 = "Unsupported data type in CentralMoment Aggregation: %s"; + public static final String EXCEPTION_SECOND_THIRD_ARGUMENT_MUST_GREATER_THAN_0_BUT_GOT_K_0AFFFA6A = "The second and third argument must be greater than 0, but got k="; + public static final String EXCEPTION_CAPACITY_E92593AD = ", capacity="; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_AGGREGATION_AVG_ARG_4E63A3C3 = "Unsupported data type in aggregation AVG : %s"; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_CORRELATION_AGGREGATION_ARG_2FF29597 = "Unsupported data type in Correlation Aggregation: %s"; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_FIRST_ARG_D5B6C6F9 = "Unsupported data type in FIRST: %s"; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_FIRST_AGGREGATION_ARG_B2D27BB9 = "Unsupported data type in FIRST Aggregation: %s"; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_FIRST_AGGREGATION_ARG_2652C363 = "Unsupported data type in FIRST aggregation: %s"; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_VARIANCE_AGGREGATION_ARG_C641D425 = "Unsupported data type in VARIANCE Aggregation: %s"; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_ARG_7D59F7B2 = "Unsupported data type : %s"; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_APPROX_COUNT_DISTINCT_AGGREGATION_ARG_58F0391E = "Unsupported data type in APPROX_COUNT_DISTINCT Aggregation: %s"; + public static final String EXCEPTION_APPROXCOUNTDISTINCTACCUMULATOR_DOES_NOT_SUPPORT_STATISTICS_81005A79 = "ApproxCountDistinctAccumulator does not support statistics"; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_MAX_AGGREGATION_ARG_CCB09C60 = "Unsupported data type in MAX Aggregation: %s"; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_SUM_AGGREGATION_ARG_92F5A18D = "Unsupported data type in SUM Aggregation: %s"; + public static final String EXCEPTION_DISTINCT_VALUES_HAS_EXCEEDED_THRESHOLD_ARG_CALCULATE_MODE_8CA29DC2 = "distinct values has exceeded the threshold %s when calculate Mode"; + public static final String EXCEPTION_APPROXMOSTFREQUENTACCUMULATOR_DOES_NOT_SUPPORT_STATISTICS_DB1E218B = "ApproxMostFrequentAccumulator does not support statistics"; + public static final String EXCEPTION_DISTINCT_AGGREGATION_FUNCTION_STATE_CAN_NOT_COPIED_34D0A276 = "Distinct aggregation function state can not be copied"; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_REGRESSION_AGGREGATION_ARG_7BB08DA2 = "Unsupported data type in Regression Aggregation: %s"; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_MIN_AGGREGATION_ARG_CB73B158 = "Unsupported data type in MIN Aggregation: %s"; + public static final String EXCEPTION_INVALID_FORMAT_SERIALIZED_HISTOGRAM_GOT_ENCODING_A8E50EA5 = "Invalid format for serialized histogram, got encoding: "; + public static final String EXCEPTION_MAX_STANDARD_ERROR_MUST_ARG_ARG_ARG_EB8443D6 = "Max Standard Error must be in [%s, %s]: %s"; + public static final String EXCEPTION_CANNOT_MERGE_HYPERLOGLOG_INSTANCES_DIFFERENT_PRECISION_9DCF13BC = "Cannot merge HyperLogLog instances with different precision"; + public static final String EXCEPTION_DISTINCT_VALUES_HAS_EXCEEDED_THRESHOLD_ARG_CALCULATE_MODE_ONE_GROUP_A3F5A1D3 = "distinct values has exceeded the threshold %s when calculate MODE in one group"; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_MAX_MIN_AGGREGATION_ARG_982BEBD5 = "Unsupported data type in MAX_BY/MIN_BY Aggregation: %s"; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_EXTREME_AGGREGATION_ARG_AF4DA98F = "Unsupported data type EXTREME Aggregation: %s"; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_EXTREME_AGGREGATION_ARG_276BE220 = "Unsupported data type in EXTREME Aggregation: %s"; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_AVG_AGGREGATION_ARG_66BF3128 = "Unsupported data type in AVG Aggregation: %s"; + public static final String EXCEPTION_CAN_T_READ_NEW_TSBLOCK_FILESPILLERREADER_072AF71D = "Can't read a new tsBlock in FileSpillerReader: "; + public static final String EXCEPTION_CAN_T_CLOSE_FILECHANNEL_FILESPILLERREADER_E46979F0 = "Can't close fileChannel in FileSpillerReader: "; + public static final String EXCEPTION_CREATE_FILE_ERROR_B8B379CF = "Create file error: "; + public static final String EXCEPTION_CAN_T_WRITE_INTERMEDIATE_SORTED_DATA_FILE_0027961E = "Can't write intermediate sorted data to file: "; + public static final String EXCEPTION_CAN_T_GET_FILE_FILESPILLERREADER_CHECK_IF_FILE_EXISTS_DEED83D9 = "Can't get file for FileSpillerReader, check if the file exists: "; + public static final String EXCEPTION_LONG_VALUE_ARG_OUT_RANGE_INTEGER_VALUE_B3F9016B = "long value %d is out of range of integer value."; + public static final String EXCEPTION_FLOAT_VALUE_ARG_OUT_RANGE_INTEGER_VALUE_B0E6DDED = "Float value %f is out of range of integer value."; + public static final String EXCEPTION_FLOAT_VALUE_ARG_OUT_RANGE_LONG_VALUE_62F8153E = "Float value %f is out of range of long value."; + public static final String EXCEPTION_DOUBLE_VALUE_ARG_OUT_RANGE_INTEGER_VALUE_BAB52E11 = "Double value %f is out of range of integer value."; + public static final String EXCEPTION_DOUBLE_VALUE_ARG_OUT_RANGE_LONG_VALUE_5793A91E = "Double value %f is out of range of long value."; + public static final String EXCEPTION_DOUBLE_VALUE_ARG_OUT_RANGE_FLOAT_VALUE_DB914FA0 = "Double value %f is out of range of float value."; + public static final String EXCEPTION_TEXT_VALUE_ARG_OUT_RANGE_FLOAT_VALUE_D171B313 = "Text value %s is out of range of float value."; + public static final String EXCEPTION_TEXT_VALUE_ARG_OUT_RANGE_DOUBLE_VALUE_C0589D83 = "Text value %s is out of range of double value."; + public static final String EXCEPTION_UNSUPPORTED_SOURCE_DATATYPE_ARG_678B759C = "Unsupported source dataType: %s"; + public static final String EXCEPTION_CANNOT_CAST_ARG_ARG_TYPE_8266A2C6 = "Cannot cast %s to %s type"; + public static final String EXCEPTION_ARGUMENT_EXCEPTION_SCALAR_FUNCTION_NUM_MUST_REPRESENTABLE_BITS_SPECIFIED_ARG_241AD2FE = + "Argument exception, the scalar function num must be representable with the bits specified. %s" + + " cannot be represented with %s bits."; + public static final String EXCEPTION_ARGUMENT_EXCEPTION_SCALAR_FUNCTION_BIT_COUNT_BITS_MUST_BETWEEN_2_6A365911 = "Argument exception, the scalar function bit_count bits must be between 2 and 64."; + public static final String LOG_ERROR_OCCURRED_DURING_EXECUTING_UDTF_PLEASE_CHECK_WHETHER_IMPLEMENTATION_UDF_7A719D38 = + "Error occurred during executing UDTF, please check whether the implementation of UDF is" + + " correct according to the udf-api description."; + public static final String EXCEPTION_ERROR_OCCURRED_DURING_EXECUTING_UDTF_ARG_ARG_PLEASE_CHECK_WHETHER_4E706370 = + "Error occurred during executing UDTF#%s: %s, please check whether the implementation of UDF" + + " is correct according to the udf-api description."; + public static final String EXCEPTION_UNSUPPORTED_TYPE_FF7F518D = "Unsupported Type: "; + public static final String EXCEPTION_LOGICALORMULTICOLUMNTRANSFORMER_DO_NOT_SUPPORT_DOTRANSFORM_SELECTION_E3A2B2FA = "LogicalOrMultiColumnTransformer do not support doTransform with selection"; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_ARG_B411C29E = "Unsupported data type: %s"; + public static final String EXCEPTION_LOGICALANDMULTICOLUMNTRANSFORMER_DO_NOT_SUPPORT_DOTRANSFORM_SELECTION_2507527D = "LogicalAndMultiColumnTransformer do not support doTransform with selection"; + public static final String EXCEPTION_ERROR_OCCURS_EVALUATING_USER_DEFINED_SCALAR_FUNCTION_05903C18 = "Error occurs when evaluating user-defined scalar function "; + public static final String EXCEPTION_FAILED_EXECUTE_FUNCTION_HMAC_MD5_INVALID_INPUT_FORMAT_EMPTY_KEY_DED1C525 = + "Failed to execute function hmac_md5 due to an invalid input format, the empty key is not" + + " allowed in HMAC operation."; + public static final String EXCEPTION_FAILED_EXECUTE_FUNCTION_HMAC_SHA1_INVALID_INPUT_FORMAT_EMPTY_KEY_518063E5 = + "Failed to execute function hmac_sha1 due to an invalid input format, the empty key is not" + + " allowed in HMAC operation."; + public static final String EXCEPTION_FAILED_EXECUTE_FUNCTION_HMAC_SHA256_INVALID_INPUT_FORMAT_EMPTY_KEY_2F6AD64E = + "Failed to execute function hmac_sha256 due to an invalid input format, the empty key is not" + + " allowed in HMAC operation."; + public static final String EXCEPTION_FAILED_EXECUTE_FUNCTION_HMAC_SHA512_INVALID_INPUT_FORMAT_EMPTY_KEY_3671AF09 = + "Failed to execute function hmac_sha512 due to an invalid input format, the empty key is not" + + " allowed in HMAC operation."; + public static final String EXCEPTION_INVALID_FORMAT_STRING_ARG_ARG_05853138 = "Invalid format string: %s (%s)"; + public static final String EXCEPTION_YEAR_MUST_BETWEEN_1000_9999_8FBB94AA = "Year must be between 1000 and 9999."; + public static final String EXCEPTION_UNSUPPORTED_PRECISION_CDB58979 = "Unsupported precision: "; + public static final String EXCEPTION_UNKNOWN_PRECISION_0119BEB0 = "Unknown precision: "; + public static final String EXCEPTION_ARGUMENT_EXCEPTION_SCALAR_FUNCTION_SUBSTRING_LENGTH_MUST_NOT_LESS_THAN_072B7355 = "Argument exception,the scalar function substring length must not be less than 0"; + public static final String EXCEPTION_ARGUMENT_EXCEPTION_SCALAR_FUNCTION_SUBSTRING_BEGINPOSITION_MUST_NOT_GREATER_THAN_F0BA2A56 = + "Argument exception,the scalar function substring beginPosition must not be greater than the" + + " string length"; + public static final String EXCEPTION_TYPE_DB38663D = "type "; + public static final String EXCEPTION_NOT_SUPPORTED_GENERATEPROBLEMATICVALUESTRING_624BB179 = " is not supported in generateProblematicValueString()"; + public static final String EXCEPTION_BASE64_LENGTH_MUST_MULTIPLE_4_INCLUDING_PADDING_8717829D = "Base64 length must be a multiple of 4 (including padding '=')"; + public static final String EXCEPTION_LENGTH_INPUT_BLOB_FUNCTION_BIG_ENDIAN_32_MUST_4_C1214BB5 = "The length of the input BLOB of function from_big_endian_32 must be 4."; + public static final String EXCEPTION_LENGTH_INPUT_BLOB_FUNCTION_BIG_ENDIAN_64_MUST_8_797F1A26 = "The length of the input BLOB of function from_big_endian_64 must be 8."; + public static final String EXCEPTION_LENGTH_INPUT_BLOB_FUNCTION_LITTLE_ENDIAN_32_MUST_4_0FBBD083 = "The length of the input BLOB of function from_little_endian_32 must be 4."; + public static final String EXCEPTION_LENGTH_INPUT_BLOB_FUNCTION_LITTLE_ENDIAN_64_MUST_8_771F7A96 = "The length of the input BLOB of function from_little_endian_64 must be 8."; + public static final String EXCEPTION_LENGTH_INPUT_BLOB_FUNCTION_IEEE754_32_BIG_ENDIAN_MUST_4_51AF4EF0 = "The length of the input BLOB of function from_ieee754_32_big_endian must be 4."; + public static final String EXCEPTION_LENGTH_INPUT_BLOB_FUNCTION_IEEE754_64_BIG_ENDIAN_MUST_8_56F33455 = "The length of the input BLOB of function from_ieee754_64_big_endian must be 8."; + public static final String EXCEPTION_FAILED_EXECUTE_FUNCTION_ARG_VALUE_ARG_CORRESPONDING_INVALID_TARGET_SIZE_5054AE0B = + "Failed to execute function '%s' due to the value %s corresponding to a invalid target size," + + " the allowed range is [0, %d]."; + public static final String EXCEPTION_FAILED_EXECUTE_FUNCTION_ARG_VALUE_ARG_CORRESPONDING_EMPTY_PADDING_STRING_F1CE573C = "Failed to execute function '%s' due the value %s corresponding to a empty padding string."; + public static final String EXCEPTION_FOUND_NO_COLUMN_ARG_ARG_8CF632F7 = "Found no column %s in %s"; + public static final String EXCEPTION_SORT_ITEM_ARG_NOT_INCLUDED_CHILDREN_S_OUTPUT_COLUMNS_CC911999 = "Sort Item %s is not included in children's output columns"; + public static final String EXCEPTION_LEFT_CHILD_JOINNODE_DOESN_T_CONTAIN_LEFTOUTPUTSYMBOL_0C8AA216 = "Left child of JoinNode doesn't contain LeftOutputSymbol "; + public static final String EXCEPTION_RIGHT_CHILD_JOINNODE_DOESN_T_CONTAIN_RIGHTOUTPUTSYMBOL_10A86F63 = "Right child of JoinNode doesn't contain RightOutputSymbol "; + public static final String EXCEPTION_LEFT_CHILD_JOINNODE_DOESN_T_CONTAIN_LEFT_ASOF_MAIN_JOIN_2850234A = "Left child of JoinNode doesn't contain left ASOF main join key."; + public static final String EXCEPTION_RIGHT_CHILD_JOINNODE_DOESN_T_CONTAIN_RIGHT_ASOF_MAIN_JOIN_1A9631C9 = "Right child of JoinNode doesn't contain right ASOF main join key."; + public static final String EXCEPTION_JOIN_KEY_TYPE_MISMATCH_LEFT_JOIN_KEY_TYPE_072E692E = "Join key type mismatch. Left join key type: "; + public static final String EXCEPTION_RIGHT_JOIN_KEY_TYPE_56895767 = ", right join key type: "; + public static final String EXCEPTION_ROW_COUNT_MUST_0_1_8D44189F = "Row count must be 0 or 1"; + public static final String EXCEPTION_COLUMN_ARG_CANNOT_RESOLVED_508579EC = "Column '%s' cannot be resolved."; + public static final String EXCEPTION_REQUESTED_VALUE_UNKNOWN_CAPTURE_WAS_IT_REGISTERED_PATTERN_C77DF7E9 = "Requested value for unknown Capture. Was it registered in the Pattern?"; + public static final String EXCEPTION_TARGET_NODE_INDEX_MUST_BE_GREATER_THAN_OR_EQUAL_TO_ONE_75BFB7C3 = "Target node index must be greater than or equal to one"; + public static final String EXCEPTION_ALREADY_AT_TARGET_32DFD57F = "Already at target"; + public static final String EXCEPTION_PARTIALRESULT_OF_COVARIANCE_SHOULD_BE_1_E6A950B1 = "partialResult of Covariance should be 1"; + public static final String EXCEPTION_INPUT_OF_COVARIANCE_SHOULD_BE_1_75D3F4FD = "Input of Covariance should be 1"; + public static final String EXCEPTION_COVARIANCE_STATE_COUNT_IS_SMALLER_THAN_REMOVED_STATE_COUNT_8C088DC6 = "Covariance state count is smaller than removed state count"; + public static final String EXCEPTION_PARTIALRESULT_OF_VARIANCE_SHOULD_BE_1_9C281868 = "partialResult of variance should be 1"; + public static final String EXCEPTION_INPUT_OF_VARIANCE_SHOULD_BE_1_1BC7A702 = "Input of variance should be 1"; + public static final String EXCEPTION_PARTIALRESULT_OF_CENTRALMOMENT_SHOULD_BE_1_B7C0B4B9 = "partialResult of CentralMoment should be 1"; + public static final String EXCEPTION_PARTIALRESULT_SHOULD_BE_1_399D5DC3 = "partialResult should be 1"; + public static final String EXCEPTION_INPUT_OF_CENTRALMOMENT_SHOULD_BE_1_FD23B170 = "Input of CentralMoment should be 1"; + public static final String EXCEPTION_CENTRALMOMENT_STATE_COUNT_IS_SMALLER_THAN_REMOVED_STATE_COUNT_B87864BA = "CentralMoment state count is smaller than removed state count"; + public static final String EXCEPTION_PARTIALRESULT_OF_CORRELATION_SHOULD_BE_1_D5A8CED6 = "partialResult of Correlation should be 1"; + public static final String EXCEPTION_INPUT_OF_CORRELATION_SHOULD_BE_1_5D666DB5 = "Input of Correlation should be 1"; + public static final String EXCEPTION_CORRELATION_STATE_COUNT_IS_SMALLER_THAN_REMOVED_STATE_COUNT_66C90757 = "Correlation state count is smaller than removed state count"; + public static final String EXCEPTION_PARTIALRESULT_OF_REGRESSION_SHOULD_BE_1_B7ED33FA = "partialResult of Regression should be 1"; + public static final String EXCEPTION_INPUT_OF_REGRESSION_SHOULD_BE_1_9AF4E8EC = "Input of Regression should be 1"; + public static final String EXCEPTION_REGRESSION_STATE_COUNT_IS_SMALLER_THAN_REMOVED_STATE_COUNT_4415A3AE = "Regression state count is smaller than removed state count"; + public static final String EXCEPTION_INVALID_STARTINGPOSITION_COLON_ARG_7B4D49C0 = "invalid startingPosition: %s"; + public static final String EXCEPTION_ROWID_DOES_NOT_MATCH_THIS_TSBLOCK_18F9EB4D = "rowId does not match this TsBlock"; + public static final String EXCEPTION_CURSOR_STILL_ACTIVE_E9462D3B = "Cursor still active"; + public static final String EXCEPTION_NO_ACTIVE_CURSOR_C89C9944 = "No active cursor"; + public static final String EXCEPTION_NOT_YET_ADVANCED_1600C5A7 = "Not yet advanced"; + public static final String EXCEPTION_SHOULD_NOT_ATTEMPT_COMPACTION_WHEN_TSBLOCK_IS_LOCKED_DF775E6B = "Should not attempt compaction when TsBlock is locked"; + public static final String EXCEPTION_STRATEGY_IS_NULL_DDA2C67F = "strategy is null"; + public static final String EXCEPTION_ROWIDEVICTIONLISTENER_IS_NULL_457EFBEE = "rowIdEvictionListener is null"; + public static final String EXCEPTION_TOPN_MUST_BE_GREATER_THAN_ZERO_43866D3E = "topN must be greater than zero"; + public static final String EXCEPTION_NO_ROOT_TO_PEEK_43C3D8D5 = "No root to peek"; + public static final String EXCEPTION_GROUP_ID_HAS_AN_EMPTY_HEAP_C9EDB841 = "Group ID has an empty heap"; + public static final String EXCEPTION_POPANDINSERT_LEFT_PAREN_RIGHT_PAREN_REQUIRES_AT_LEAST_A_ROOT_NODE_0CA0DD58 = "popAndInsert() requires at least a root node"; + public static final String EXCEPTION_OPERATORCONTEXT_IS_NULL_D15B1EDB = "operatorContext is null"; + public static final String EXCEPTION_CHILD_OPERATOR_IS_NULL_8860113C = "child operator is null"; + public static final String EXCEPTION_LIMIT_MUST_BE_AT_LEAST_ZERO_E960530F = "limit must be at least zero"; + public static final String EXCEPTION_OFFSET_MUST_BE_AT_LEAST_ZERO_21BB6BB6 = "offset must be at least zero"; + public static final String EXCEPTION_TSBLOCKS_IS_NULL_02287FD8 = "tsBlocks is null"; + public static final String EXCEPTION_FILLARRAY_SHOULD_NOT_BE_NULL_OR_EMPTY_118FB134 = "fillArray should not be null or empty"; + public static final String EXCEPTION_UNIQUE_ROW_ID_EXCEEDS_A_LIMIT_COLON_ARG_71EE4B7D = "Unique row id exceeds a limit: %s"; + public static final String EXCEPTION_HELPERCOLUMNINDEX_FOR_PREVIOUSFILLWITHGROUPOPERATOR_SHOULD_NEVER_BE_NEGATIVE_ABA9C2B1 = "helperColumnIndex for PreviousFillWithGroupOperator should never be negative"; + public static final String EXCEPTION_OUTPUTCOLUMNCOUNT_IS_NOT_EQUAL_TO_VALUE_COLUMN_COUNT_OF_CHILD_OPERATOR_QUOTE_S_T_8E30BAD8 = "outputColumnCount is not equal to value column count of child operator's TsBlock"; + public static final String EXCEPTION_HELPERCOLUMNINDEX_SHOULD_BE_RESOLVED_WHEN_TIMEBOUND_EXISTS_01BE233B = "helperColumnIndex should be resolved when timeBound exists"; + public static final String EXCEPTION_TYPE_IS_NULL_16A3D3EB = "type is null"; + public static final String EXCEPTION_LOGICALINDEXNAVIGATION_IS_NULL_3B31CD23 = "logicalIndexNavigation is null"; + public static final String EXCEPTION_OVERRIDING_AGGREGATIONS_FOR_CHILD_THREAD_9C84E47D = "overriding aggregations for child thread"; + public static final String EXCEPTION_SKIP_TO_NAVIGATION_IS_MISSING_FOR_SKIP_TO_ARG_8A303D73 = "skip to navigation is missing for SKIP TO %s"; + public static final String EXCEPTION_LABELS_IS_NULL_F4FBBECE = "labels is null"; + public static final String EXCEPTION_LOGICAL_OFFSET_MUST_BE_GREATER_THAN_EQUALS_0_COMMA_ACTUAL_COLON_ARG_539807BF = "logical offset must be >= 0, actual: %s"; + public static final String EXCEPTION_CURRENT_ROW_IS_OUT_OF_BOUNDS_OF_THE_MATCH_D8D8B611 = "current row is out of bounds of the match"; + public static final String EXCEPTION_EVALUATIONS_IS_NULL_F3F72380 = "evaluations is null"; + public static final String EXCEPTION_PARTITION_IS_NULL_27FD9756 = "partition is null"; + public static final String EXCEPTION_LABELNAMES_IS_NULL_EEFDB807 = "labelNames is null"; + public static final String EXCEPTION_BOUNDSIGNATURE_IS_NULL_D1077180 = "boundSignature is null"; + public static final String EXCEPTION_ACCUMULATO_IS_NULL_D51F532F = "accumulato is null"; + public static final String EXCEPTION_PATTERNAGGREGATIONTRACKER_IS_NULL_82EC5B1C = "patternAggregationTracker is null"; + public static final String EXCEPTION_PATTERNAGGREGATIONTRACKER_IN_INCONSISTENT_STATE_C6FF5294 = "PatternAggregationTracker in inconsistent state"; + public static final String EXCEPTION_SETEVALUATOR_IN_INCONSISTENT_STATE_D5FAA900 = "SetEvaluator in inconsistent state"; + public static final String EXCEPTION_ACCUMULATOR_IS_NULL_EF0C1DFF = "accumulator is null"; + public static final String EXCEPTION_INTERMEDIATETYPE_IS_NULL_D0D9B957 = "intermediateType is null"; + public static final String EXCEPTION_INPUTCHANNELS_IS_NULL_647DA393 = "inputChannels is null"; + public static final String EXCEPTION_ARRAY_IS_NULL_BCF2EEB1 = "array is null"; + public static final String EXCEPTION_USED_SLOTS_COUNT_IS_NEGATIVE_49F017C5 = "used slots count is negative"; + public static final String EXCEPTION_USED_SLOTS_COUNT_EXCEEDS_ARRAY_SIZE_6DCD8C7E = "used slots count exceeds array size"; + public static final String EXCEPTION_ARRAY_INDEX_OUT_OF_BOUNDS_35C8A83F = "array index out of bounds"; + public static final String EXCEPTION_EXCLUSIONS_IS_NULL_336ED5E7 = "exclusions is null"; + public static final String EXCEPTION_INSTRUCTIONS_IS_NULL_A9CDA591 = "instructions is null"; + public static final String EXCEPTION_LABELMAPPING_IS_NULL_535461C7 = "labelMapping is null"; + public static final String EXCEPTION_INVALID_PATTERN_COLON_PERMUTATION_WITH_SINGLE_ELEMENT_DOT_RUN_IRROWPATTERNFLATTE_3FF56E02 = "invalid pattern: permutation with single element. run IrRowPatternFlattener first"; + public static final String EXCEPTION_INVALID_MIN_VALUE_COLON_ARG_8D899A2E = "invalid min value: %s"; + public static final String EXCEPTION_INVALID_RANGE_COLON_LEFT_PAREN_ARG_COMMA_ARG_RIGHT_PAREN_EF9544AA = "invalid range: (%s, %s)"; + public static final String EXCEPTION_NEXTCOLUMN_QUOTE_S_TIME_SHOULD_BE_GREATER_THAN_CURRENT_TIME_334CB115 = "nextColumn's time should be greater than current time"; + public static final String EXCEPTION_HASHCHANNEL_IS_NULL_A5E70672 = "hashChannel is null"; + public static final String EXCEPTION_MARKDISTINCTCHANNELS_IS_NULL_7130C56A = "markDistinctChannels is null"; + public static final String EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_OF_LAST_SHOULD_BE_BINARYCOLUMN_24E654CD = "intermediate input and output of LAST should be BinaryColumn"; + public static final String EXCEPTION_LENGTH_OF_INPUT_COLUMN_LEFT_BRACKET_RIGHT_BRACKET_FOR_FIRST_BY_SHOULD_BE_3_BE623E5E = "Length of input Column[] for FIRST_BY should be 3"; + public static final String EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_OF_FIRST_BY_SHOULD_BE_BINARYCOLUMN_F0D867AB = "intermediate input and output of FIRST_BY should be BinaryColumn"; + public static final String EXCEPTION_INPUT_OF_COVARIANCE_SHOULD_BE_2_786B97E6 = "Input of Covariance should be 2"; + public static final String EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_SHOULD_BE_BINARYCOLUMN_3B5148FA = "intermediate input and output should be BinaryColumn"; + public static final String EXCEPTION_LENGTH_OF_INPUT_COLUMN_LEFT_BRACKET_RIGHT_BRACKET_FOR_LAST_BY_SHOULD_BE_3_D759D45F = "Length of input Column[] for LAST_BY should be 3"; + public static final String EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_OF_LAST_BY_SHOULD_BE_BINARYCOLUMN_87700792 = "intermediate input and output of LAST_BY should be BinaryColumn"; + public static final String EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_OF_UDAF_SHOULD_BE_BINARYCOLUMN_6F28900F = "intermediate input and output of UDAF should be BinaryColumn"; + public static final String EXCEPTION_ARGUMENT_OF_AVG_SHOULD_BE_ONE_COLUMN_82162B82 = "argument of AVG should be one column"; + public static final String EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_OF_AVG_SHOULD_BE_BINARYCOLUMN_9CCDD5EB = "intermediate input and output of AVG should be BinaryColumn"; + public static final String EXCEPTION_INPUT_OF_CORRELATION_SHOULD_BE_2_64BB37B5 = "Input of Correlation should be 2"; + public static final String EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_OF_FIRST_SHOULD_BE_BINARYCOLUMN_57CE212C = "intermediate input and output of FIRST should be BinaryColumn"; + public static final String EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_OF_APPROX_COUNT_DISTINCT_SHOULD_BE_BINARYCOLUMN_F444D3BE = "intermediate input and output of APPROX_COUNT_DISTINCT should be BinaryColumn"; + public static final String EXCEPTION_SELECTEDPOSITIONS_IS_NULL_2300C002 = "selectedPositions is null"; + public static final String EXCEPTION_RETAINEDPOSITIONS_IS_NULL_E62F9B0D = "retainedPositions is null"; + public static final String EXCEPTION_POSITIONCOUNT_IS_NEGATIVE_2FACCDCA = "positionCount is negative"; + public static final String EXCEPTION_SELECTEDPOSITIONCOUNT_IS_NEGATIVE_A8A7FDA1 = "selectedPositionCount is negative"; + public static final String EXCEPTION_SELECTEDPOSITIONCOUNT_CANNOT_BE_GREATER_THAN_POSITIONCOUNT_871FF8DA = "selectedPositionCount cannot be greater than positionCount"; + public static final String EXCEPTION_SELECTEDPOSITION_IS_SMALLER_THAN_SELECTEDPOSITIONCOUNT_465B9220 = "selectedPosition is smaller than selectedPositionCount"; + public static final String EXCEPTION_BLOCK_POSITION_COUNT_DOES_NOT_MATCH_CURRENT_POSITION_COUNT_FE4BBE3D = "Block position count does not match current position count"; + public static final String EXCEPTION_GETSELECTEDPOSITIONS_NOT_AVAILABLE_WHEN_IN_SELECTALL_MODE_CBE671D3 = "getSelectedPositions not available when in selectAll mode"; + public static final String EXCEPTION_ARGUMENT_OF_MAX_SHOULD_BE_ONE_COLUMN_FC251F55 = "argument of MAX should be one column"; + public static final String EXCEPTION_ARGUMENT_OF_SUM_SHOULD_BE_ONE_COLUMN_D6E636D1 = "argument of SUM should be one column"; + public static final String EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_OF_MODE_SHOULD_BE_BINARYCOLUMN_2BB3E0AF = "intermediate input and output of Mode should be BinaryColumn"; + public static final String EXCEPTION_ARGUMENT_OF_COUNT_LEFT_PAREN_RIGHT_PAREN_SHOULD_BE_ONE_COLUMN_9158A9FE = "argument of COUNT(*) should be one column"; + public static final String EXCEPTION_WRONG_INPUTDATATYPES_SIZE_DOT_675FF289 = "Wrong inputDataTypes size."; + public static final String EXCEPTION_ARGUMENT_OF_COUNT_SHOULD_BE_ONE_COLUMN_906D6B19 = "argument of COUNT should be one column"; + public static final String EXCEPTION_INTERMEDIATE_OUTPUT_OF_REGRESSION_SHOULD_BE_BINARYCOLUMN_E74D77ED = "intermediate output of Regression should be BinaryColumn"; + public static final String EXCEPTION_INPUT_OF_REGRESSION_SHOULD_BE_2_3893EEE3 = "Input of Regression should be 2"; + public static final String EXCEPTION_LENGTH_OF_INPUT_COLUMN_LEFT_BRACKET_RIGHT_BRACKET_FOR_MAX_BY_SLASH_MIN_BY_SHOULD_3767E905 = "Length of input Column[] for MAX_BY/MIN_BY should be 2"; + public static final String EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_OF_MAX_BY_SLASH_MIN_BY_SHOULD_BE_BINARYCOLUMN_82B1BE6B = "intermediate input and output of MAX_BY/MIN_BY should be BinaryColumn"; + public static final String EXCEPTION_ARGUMENT_OF_MIN_SHOULD_BE_ONE_COLUMN_F8AA1E88 = "argument of MIN should be one column"; + public static final String EXCEPTION_STEP_IS_NULL_F83262DA = "step is null"; + public static final String EXCEPTION_MASKCHANNEL_IS_NULL_571AD53D = "maskChannel is null"; + public static final String EXCEPTION_EXPECTED_1_INPUT_CHANNEL_FOR_INTERMEDIATE_AGGREGATION_3190C507 = "expected 1 input channel for intermediate aggregation"; + public static final String EXCEPTION_VALUE_IS_NULL_192F6BFF = "value is null"; + public static final String EXCEPTION_VALUE_MUST_BE_POSITIVE_24FE7959 = "value must be positive"; + public static final String EXCEPTION_NUMBEROFBUCKETS_MUST_BE_A_POWER_OF_2_COMMA_ACTUAL_COLON_ARG_476E74ED = "numberOfBuckets must be a power of 2, actual: %s"; + public static final String EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_OF_MODE_SHOULD_BE_BINARYCOLUMN_0D03B323 = "intermediate input and output of MODE should be BinaryColumn"; + public static final String EXCEPTION_AGGREGATION_BUFFER_IS_FULL_233DAF3E = "Aggregation buffer is full"; + public static final String EXCEPTION_PAGE_IS_NULL_4AA19E1C = "page is null"; + public static final String EXCEPTION_SPILL_IS_NOT_SUPPORTED_E6E35549 = "spill is not supported"; + public static final String EXCEPTION_LENGTH_OF_INPUT_COLUMN_LEFT_BRACKET_RIGHT_BRACKET_FOR_LASTBY_SLASH_FIRSTBY_SHOUL_9E836ABA = "Length of input Column[] for LastBy/FirstBy should be 3"; + public static final String EXCEPTION_THE_SIZE_OF_READYQUEUE_CANNOT_BE_NEGATIVE_DOT_01D8D0CB = "The size of readyQueue cannot be negative."; + public static final String EXCEPTION_THE_SIZE_BETWEEN_WHENTRANSFORMERS_AND_THENTRANSFORMERS_NEEDS_TO_BE_SAME_AC796883 = "the size between whenTransformers and thenTransformers needs to be same"; + public static final String EXCEPTION_EXCEED_MAX_CALL_TIMES_OF_GETCOLUMN_69C77C7E = "Exceed max call times of getColumn"; + public static final String EXCEPTION_FILTER_IS_NOT_SUPPORTED_IN_ARG_DOT_FILTER_IS_ARG_DOT_417C4F3C = "Filter is not supported in %s. Filter is %s."; + public static final String EXCEPTION_NULL_9B41EF67 = "null"; + public static final String EXCEPTION_ARG_MUST_HAVE_JOIN_KEYS_DOT_C24DAB2D = "%s must have join keys."; + public static final String EXCEPTION_SOURCE_OF_SEMIJOINNODE_DOESN_QUOTE_T_CONTAIN_SOURCEOUTPUTSYMBOL_DOT_527996EC = "Source of SemiJoinNode doesn't contain sourceOutputSymbol."; + public static final String EXCEPTION_SOURCE_OF_SEMIJOINNODE_DOESN_QUOTE_T_CONTAIN_SOURCEJOINSYMBOL_DOT_32209273 = "Source of SemiJoinNode doesn't contain sourceJoinSymbol."; + public static final String EXCEPTION_FILTERINGSOURCE_OF_SEMIJOINNODE_DOESN_QUOTE_T_CONTAIN_FILTERINGSOURCEJOINSYMBOL__1B75DDE2 = "FilteringSource of SemiJoinNode doesn't contain filteringSourceJoinSymbol."; + public static final String EXCEPTION_NAME_IS_NULL_C8B35959 = "name is null"; + public static final String EXCEPTION_FUNCTION_IS_NULL_E0FA4B62 = "function is null"; + public static final String EXCEPTION_PREVIOUS_IS_NULL_056F5D52 = "previous is null"; + public static final String EXCEPTION_PROPERTY_IS_NULL_1C6980FF = "property is null"; + public static final String EXCEPTION_PATTERN_IS_NULL_AC4E239A = "pattern is null"; + public static final String EXCEPTION_CAPTURES_IS_NULL_75EACA5A = "captures is null"; + public static final String EXCEPTION_PREDICATE_IS_NULL_22E687A9 = "predicate is null"; + public static final String EXCEPTION_EXPECTEDCLASS_IS_NULL_B619CCC7 = "expectedClass is null"; + public static final String EXCEPTION_EXPECTEDVALUE_CAN_QUOTE_T_BE_NULL_DOT_USE_ISNULL_LEFT_PAREN_RIGHT_PAREN_PATTERN__FC25E374 = "expectedValue can't be null. Use isNull() pattern instead."; + public static final String EXCEPTION_CAPTURE_IS_NULL_C54AA710 = "capture is null"; + public static final String EXCEPTION_PROPERTYPATTERN_IS_NULL_37185AE7 = "propertyPattern is null"; + public static final String EXCEPTION_TARGET_NODE_MUST_EXIST_2C8D8F3A = "Target node must exist"; + public static final String EXCEPTION_HEAP_MUST_HAVE_AT_LEAST_ONE_NODE_BEFORE_STARTING_TRAVERSAL_A1E65C70 = "heap must have at least one node before starting traversal"; + public static final String EXCEPTION_NEW_CHILD_SHOULDN_QUOTE_T_EXIST_YET_1EB3B129 = "New child shouldn't exist yet"; + public static final String EXCEPTION_ROWID_AND_UNIQUEVALUE_MASK_OVERLAPS_9A092E09 = "RowId and uniqueValue mask overlaps"; + } diff --git a/iotdb-core/calc-commons/src/main/i18n/zh/org/apache/iotdb/calc/i18n/CalcMessages.java b/iotdb-core/calc-commons/src/main/i18n/zh/org/apache/iotdb/calc/i18n/CalcMessages.java index 00a0b60be5950..888578a7a48f0 100644 --- a/iotdb-core/calc-commons/src/main/i18n/zh/org/apache/iotdb/calc/i18n/CalcMessages.java +++ b/iotdb-core/calc-commons/src/main/i18n/zh/org/apache/iotdb/calc/i18n/CalcMessages.java @@ -143,4 +143,265 @@ private CalcMessages() {} "推入的元素为 null"; public static final String FAILED_TO_DELETE_TEMP_DIR = "删除临时目录 {} 失败。"; + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String EXCEPTION_WRONG_OBJECT_FILE_PATH_D317B1AB = "错误的对象文件路径:"; + public static final String EXCEPTION_OFFSET_ARG_GREATER_THAN_EQUAL_OBJECT_SIZE_ARG_FILE_PATH_31936A19 = "偏移量 %d 大于或等于对象大小 %d,文件路径为 %s"; + public static final String EXCEPTION_READ_OBJECT_SIZE_ARG_TOO_LARGE_SIZE_2G_FILE_PATH_7D4A4D10 = "读取的对象大小 %s 过大(大小 > 2G),文件路径为 %s"; + public static final String LOG_FAILED_CLOSE_FILE_METHOD_DEREGISTER_ARG_BECAUSE_ARG_1744AC60 = "在方法 deregister(%s) 中关闭文件失败,原因:%s"; + public static final String LOG_FAILED_CLEAN_DIR_METHOD_DEREGISTER_ARG_BECAUSE_ARG_F53193E5 = "在方法 deregister(%s) 中清理目录失败,原因:%s"; + public static final String EXCEPTION_TYPE_ACCUMULATOR_DOES_NOT_SUPPORT_REMOVE_INPUT_905AFAA1 = "该类型的累加器不支持移除输入!"; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_AGGREGATION_VARIANCE_ARG_17A45959 = "variance 聚合中不支持的数据类型:%s"; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_CENTRALMOMENT_AGGREGATION_0A19C2A8 = "CentralMoment 聚合中不支持的数据类型:"; + public static final String EXCEPTION_UNKNOWN_FUNCTION_ARG_NODE_ARG_927DA6A7 = "未知函数 %s,所在节点:%d。"; + public static final String EXCEPTION_INLIST_LITERAL_TIMESTAMP_CAN_ONLY_LONGLITERAL_DOUBLELITERAL_GENERICLITERAL_CURRENT_A3105E67 = "TIMESTAMP 的 InList Literal 只能是 LongLiteral、DoubleLiteral 或 GenericLiteral,当前为"; + public static final String EXCEPTION_PARTITION_HANDLER_FINISHED_CANNOT_ADD_MORE_DATA_D8E31A3E = "分区处理器已结束,不能再添加数据。"; + public static final String EXCEPTION_AFTER_MATCH_SKIP_FAILED_PATTERN_VARIABLE_NOT_PRESENT_MATCH_2891B276 = "匹配后跳转失败:匹配中不存在模式变量"; + public static final String EXCEPTION_AFTER_MATCH_SKIP_FAILED_CANNOT_SKIP_FIRST_ROW_MATCH_71D4093B = "匹配后跳转失败:不能跳到匹配的第一行"; + public static final String EXCEPTION_AGGREGATE_FUNCTION_ARG_DOES_NOT_SUPPORT_COPYING_3E03976C = "聚合函数 %s 不支持复制"; + public static final String EXCEPTION_UNSUPPORTED_BUILT_WINDOW_FUNCTION_NAME_F994ED27 = "不支持的内置窗口函数名称:"; + public static final String EXCEPTION_UNSUPPORTED_DEFAULT_VALUE_S_DATA_TYPE_LAG_BEB00511 = "Lag 中不支持的默认值数据类型:"; + public static final String EXCEPTION_CANNOT_COMPARE_VALUES_DIFFERENT_TYPES_A95EDA7F = "无法比较不同类型的值:"; + public static final String EXCEPTION_VS_AEDAB253 = " 与 "; + public static final String EXCEPTION_TARGET_TYPE_NOT_GENERICDATATYPE_CB87EF37 = "目标类型不是 GenericDataType:"; + public static final String EXCEPTION_UNSUPPORTED_EXPRESSION_TYPE_5C50C92E = "不支持的表达式类型:"; + public static final String EXCEPTION_IDENTITYLINEARFILL_S_NEEDPREPAREFORNEXT_METHOD_SHOULD_ALWAYS_RETURN_FALSE_FF7AD73B = "IdentityLinearFill 的 needPrepareForNext() 方法应始终返回 false。"; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_LAST_ARG_37F52124 = "LAST 中不支持的数据类型:%s"; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_LAST_AGGREGATION_ARG_2FCF5ADA = "LAST 聚合中不支持的数据类型:%s"; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_LAST_AGGREGATION_ARG_B3F2EE42 = "LAST 聚合中不支持的数据类型:%s"; + public static final String EXCEPTION_SIZE_CHILDRENCOLUMNS_DATATYPES_SHOULD_SAME_6EA43EA8 = "childrenColumns 和 dataTypes 的大小应相同。"; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_FIRST_AGGREGATION_ARG_8D31C6CA = "FIRST_BY 聚合中不支持的数据类型:%s"; + public static final String EXCEPTION_APPROX_PERCENTILE_REQUIRES_2_3_ARGUMENTS_BUT_GOT_ARG_D78590AA = "APPROX_PERCENTILE 需要 2 个或 3 个参数,但实际为 %d"; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_APPROX_PERCENTILE_AGGREGATION_ARG_CFEC0431 = "APPROX_PERCENTILE 聚合中不支持的数据类型:%s"; + public static final String EXCEPTION_APPROXPERCENTILEACCUMULATOR_DOES_NOT_SUPPORT_STATISTICS_2BB01365 = "ApproxPercentileAccumulator 不支持统计信息"; + public static final String EXCEPTION_NO_EXACT_DOUBLE_REPRESENTATION_LONG_ARG_3E5B7550 = "long 没有精确的 double 表示:%s"; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_COVARIANCE_AGGREGATION_ARG_643BEDD0 = "Covariance 聚合中不支持的数据类型:%s"; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_LAST_AGGREGATION_ARG_8C41FBCC = "LAST_BY 聚合中不支持的数据类型:%s"; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_CENTRALMOMENT_AGGREGATION_ARG_74B9A3A8 = "CentralMoment 聚合中不支持的数据类型:%s"; + public static final String EXCEPTION_SECOND_THIRD_ARGUMENT_MUST_GREATER_THAN_0_BUT_GOT_K_0AFFFA6A = "第二个和第三个参数必须大于 0,实际 k="; + public static final String EXCEPTION_CAPACITY_E92593AD = ",容量="; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_AGGREGATION_AVG_ARG_4E63A3C3 = "AVG 聚合中不支持的数据类型:%s"; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_CORRELATION_AGGREGATION_ARG_2FF29597 = "Correlation 聚合中不支持的数据类型:%s"; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_FIRST_ARG_D5B6C6F9 = "FIRST 中不支持的数据类型:%s"; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_FIRST_AGGREGATION_ARG_B2D27BB9 = "FIRST 聚合中不支持的数据类型:%s"; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_FIRST_AGGREGATION_ARG_2652C363 = "FIRST 聚合中不支持的数据类型:%s"; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_VARIANCE_AGGREGATION_ARG_C641D425 = "VARIANCE 聚合中不支持的数据类型:%s"; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_ARG_7D59F7B2 = "不支持的数据类型 : %s"; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_APPROX_COUNT_DISTINCT_AGGREGATION_ARG_58F0391E = "APPROX_COUNT_DISTINCT 聚合中不支持的数据类型:%s"; + public static final String EXCEPTION_APPROXCOUNTDISTINCTACCUMULATOR_DOES_NOT_SUPPORT_STATISTICS_81005A79 = "ApproxCountDistinctAccumulator 不支持统计信息"; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_MAX_AGGREGATION_ARG_CCB09C60 = "MAX 聚合中不支持的数据类型:%s"; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_SUM_AGGREGATION_ARG_92F5A18D = "SUM 聚合中不支持的数据类型:%s"; + public static final String EXCEPTION_DISTINCT_VALUES_HAS_EXCEEDED_THRESHOLD_ARG_CALCULATE_MODE_8CA29DC2 = "计算 MODE 时不同值数量已超过阈值 %s"; + public static final String EXCEPTION_APPROXMOSTFREQUENTACCUMULATOR_DOES_NOT_SUPPORT_STATISTICS_DB1E218B = "ApproxMostFrequentAccumulator 不支持统计信息"; + public static final String EXCEPTION_DISTINCT_AGGREGATION_FUNCTION_STATE_CAN_NOT_COPIED_34D0A276 = "DISTINCT 聚合函数状态不能复制"; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_REGRESSION_AGGREGATION_ARG_7BB08DA2 = "Regression 聚合中不支持的数据类型:%s"; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_MIN_AGGREGATION_ARG_CB73B158 = "MIN 聚合中不支持的数据类型:%s"; + public static final String EXCEPTION_INVALID_FORMAT_SERIALIZED_HISTOGRAM_GOT_ENCODING_A8E50EA5 = "序列化直方图格式无效,编码为:"; + public static final String EXCEPTION_MAX_STANDARD_ERROR_MUST_ARG_ARG_ARG_EB8443D6 = "最大标准误差必须在 [%s, %s] 范围内:%s"; + public static final String EXCEPTION_CANNOT_MERGE_HYPERLOGLOG_INSTANCES_DIFFERENT_PRECISION_9DCF13BC = "无法合并精度不同的 HyperLogLog 实例"; + public static final String EXCEPTION_DISTINCT_VALUES_HAS_EXCEEDED_THRESHOLD_ARG_CALCULATE_MODE_ONE_GROUP_A3F5A1D3 = "在单个分组中计算 MODE 时不同值数量已超过阈值 %s"; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_MAX_MIN_AGGREGATION_ARG_982BEBD5 = "MAX_BY/MIN_BY 聚合中不支持的数据类型:%s"; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_EXTREME_AGGREGATION_ARG_AF4DA98F = "EXTREME 聚合不支持的数据类型:%s"; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_EXTREME_AGGREGATION_ARG_276BE220 = "EXTREME 聚合中不支持的数据类型:%s"; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_AVG_AGGREGATION_ARG_66BF3128 = "AVG 聚合中不支持的数据类型:%s"; + public static final String EXCEPTION_CAN_T_READ_NEW_TSBLOCK_FILESPILLERREADER_072AF71D = "无法在 FileSpillerReader 中读取新的 tsBlock:"; + public static final String EXCEPTION_CAN_T_CLOSE_FILECHANNEL_FILESPILLERREADER_E46979F0 = "无法关闭 FileSpillerReader 中的 FileChannel:"; + public static final String EXCEPTION_CREATE_FILE_ERROR_B8B379CF = "创建 文件 错误: "; + public static final String EXCEPTION_CAN_T_WRITE_INTERMEDIATE_SORTED_DATA_FILE_0027961E = "无法将中间排序数据写入文件:"; + public static final String EXCEPTION_CAN_T_GET_FILE_FILESPILLERREADER_CHECK_IF_FILE_EXISTS_DEED83D9 = "无法获取 FileSpillerReader 的文件,请检查文件是否存在:"; + public static final String EXCEPTION_LONG_VALUE_ARG_OUT_RANGE_INTEGER_VALUE_B3F9016B = "long 值 %d 超出 int 值范围。"; + public static final String EXCEPTION_FLOAT_VALUE_ARG_OUT_RANGE_INTEGER_VALUE_B0E6DDED = "float 值 %f 超出 int 值范围。"; + public static final String EXCEPTION_FLOAT_VALUE_ARG_OUT_RANGE_LONG_VALUE_62F8153E = "float 值 %f 超出 long 值范围。"; + public static final String EXCEPTION_DOUBLE_VALUE_ARG_OUT_RANGE_INTEGER_VALUE_BAB52E11 = "double 值 %f 超出 int 值范围。"; + public static final String EXCEPTION_DOUBLE_VALUE_ARG_OUT_RANGE_LONG_VALUE_5793A91E = "double 值 %f 超出 long 值范围。"; + public static final String EXCEPTION_DOUBLE_VALUE_ARG_OUT_RANGE_FLOAT_VALUE_DB914FA0 = "double 值 %f 超出 float 值范围。"; + public static final String EXCEPTION_TEXT_VALUE_ARG_OUT_RANGE_FLOAT_VALUE_D171B313 = "Text 值 %s 超出 float 值范围。"; + public static final String EXCEPTION_TEXT_VALUE_ARG_OUT_RANGE_DOUBLE_VALUE_C0589D83 = "Text 值 %s 超出 double 值范围。"; + public static final String EXCEPTION_UNSUPPORTED_SOURCE_DATATYPE_ARG_678B759C = "不支持的源 dataType:%s"; + public static final String EXCEPTION_CANNOT_CAST_ARG_ARG_TYPE_8266A2C6 = "无法将 %s 转换为 %s 类型"; + public static final String EXCEPTION_ARGUMENT_EXCEPTION_SCALAR_FUNCTION_NUM_MUST_REPRESENTABLE_BITS_SPECIFIED_ARG_241AD2FE = + "参数异常,标量函数 num 必须能用指定的位数表示。%s 不能用 %s 位表示。"; + public static final String EXCEPTION_ARGUMENT_EXCEPTION_SCALAR_FUNCTION_BIT_COUNT_BITS_MUST_BETWEEN_2_6A365911 = "参数异常,标量函数 bit_count 的位数必须在 2 到 64 之间。"; + public static final String LOG_ERROR_OCCURRED_DURING_EXECUTING_UDTF_PLEASE_CHECK_WHETHER_IMPLEMENTATION_UDF_7A719D38 = + "执行 UDTF 时发生错误,请根据 UDF API 描述检查 UDF 实现是否正确。"; + public static final String EXCEPTION_ERROR_OCCURRED_DURING_EXECUTING_UDTF_ARG_ARG_PLEASE_CHECK_WHETHER_4E706370 = + "执行 UDTF#%s 时发生错误:%s,请根据 UDF API 描述检查 UDF 实现是否正确。"; + public static final String EXCEPTION_UNSUPPORTED_TYPE_FF7F518D = "不支持的类型: "; + public static final String EXCEPTION_LOGICALORMULTICOLUMNTRANSFORMER_DO_NOT_SUPPORT_DOTRANSFORM_SELECTION_E3A2B2FA = "LogicalOrMultiColumnTransformer 不支持带 selection 的 doTransform"; + public static final String EXCEPTION_UNSUPPORTED_DATA_TYPE_ARG_B411C29E = "不支持的数据类型: %s"; + public static final String EXCEPTION_LOGICALANDMULTICOLUMNTRANSFORMER_DO_NOT_SUPPORT_DOTRANSFORM_SELECTION_2507527D = "LogicalAndMultiColumnTransformer 不支持带 selection 的 doTransform"; + public static final String EXCEPTION_ERROR_OCCURS_EVALUATING_USER_DEFINED_SCALAR_FUNCTION_05903C18 = "计算用户自定义标量函数时发生错误:"; + public static final String EXCEPTION_FAILED_EXECUTE_FUNCTION_HMAC_MD5_INVALID_INPUT_FORMAT_EMPTY_KEY_DED1C525 = "无法执行函数 hmac_md5,原因:输入格式无效,HMAC 操作不允许空密钥。"; + public static final String EXCEPTION_FAILED_EXECUTE_FUNCTION_HMAC_SHA1_INVALID_INPUT_FORMAT_EMPTY_KEY_518063E5 = "无法执行函数 hmac_sha1,原因:输入格式无效,HMAC 操作不允许空密钥。"; + public static final String EXCEPTION_FAILED_EXECUTE_FUNCTION_HMAC_SHA256_INVALID_INPUT_FORMAT_EMPTY_KEY_2F6AD64E = "无法执行函数 hmac_sha256,原因:输入格式无效,HMAC 操作不允许空密钥。"; + public static final String EXCEPTION_FAILED_EXECUTE_FUNCTION_HMAC_SHA512_INVALID_INPUT_FORMAT_EMPTY_KEY_3671AF09 = "无法执行函数 hmac_sha512,原因:输入格式无效,HMAC 操作不允许空密钥。"; + public static final String EXCEPTION_INVALID_FORMAT_STRING_ARG_ARG_05853138 = "无效的格式字符串:%s (%s)"; + public static final String EXCEPTION_YEAR_MUST_BETWEEN_1000_9999_8FBB94AA = "年份必须在 1000 到 9999 之间。"; + public static final String EXCEPTION_UNSUPPORTED_PRECISION_CDB58979 = "不支持的精度:"; + public static final String EXCEPTION_UNKNOWN_PRECISION_0119BEB0 = "未知精度:"; + public static final String EXCEPTION_ARGUMENT_EXCEPTION_SCALAR_FUNCTION_SUBSTRING_LENGTH_MUST_NOT_LESS_THAN_072B7355 = "参数异常,标量函数 substring 的长度参数不能小于 0"; + public static final String EXCEPTION_ARGUMENT_EXCEPTION_SCALAR_FUNCTION_SUBSTRING_BEGINPOSITION_MUST_NOT_GREATER_THAN_F0BA2A56 = + "参数异常,标量函数 substring 的 beginPosition 不能大于字符串长度"; + public static final String EXCEPTION_TYPE_DB38663D = "类型:"; + public static final String EXCEPTION_NOT_SUPPORTED_GENERATEPROBLEMATICVALUESTRING_624BB179 = "在 generateProblematicValueString() 中不受支持"; + public static final String EXCEPTION_BASE64_LENGTH_MUST_MULTIPLE_4_INCLUDING_PADDING_8717829D = "Base64 长度必须是 4 的倍数(包括填充字符 '=')"; + public static final String EXCEPTION_LENGTH_INPUT_BLOB_FUNCTION_BIG_ENDIAN_32_MUST_4_C1214BB5 = "函数 from_big_endian_32 的输入 BLOB 长度必须为 4。"; + public static final String EXCEPTION_LENGTH_INPUT_BLOB_FUNCTION_BIG_ENDIAN_64_MUST_8_797F1A26 = "函数 from_big_endian_64 的输入 BLOB 长度必须为 8。"; + public static final String EXCEPTION_LENGTH_INPUT_BLOB_FUNCTION_LITTLE_ENDIAN_32_MUST_4_0FBBD083 = "函数 from_little_endian_32 的输入 BLOB 长度必须为 4。"; + public static final String EXCEPTION_LENGTH_INPUT_BLOB_FUNCTION_LITTLE_ENDIAN_64_MUST_8_771F7A96 = "函数 from_little_endian_64 的输入 BLOB 长度必须为 8。"; + public static final String EXCEPTION_LENGTH_INPUT_BLOB_FUNCTION_IEEE754_32_BIG_ENDIAN_MUST_4_51AF4EF0 = "函数 from_ieee754_32_big_endian 的输入 BLOB 长度必须为 4。"; + public static final String EXCEPTION_LENGTH_INPUT_BLOB_FUNCTION_IEEE754_64_BIG_ENDIAN_MUST_8_56F33455 = "函数 from_ieee754_64_big_endian 的输入 BLOB 长度必须为 8。"; + public static final String EXCEPTION_FAILED_EXECUTE_FUNCTION_ARG_VALUE_ARG_CORRESPONDING_INVALID_TARGET_SIZE_5054AE0B = + "无法执行函数 '%s',原因:值 %s 对应无效的目标大小,允许范围为 [0, %d]。"; + public static final String EXCEPTION_FAILED_EXECUTE_FUNCTION_ARG_VALUE_ARG_CORRESPONDING_EMPTY_PADDING_STRING_F1CE573C = "无法执行函数 '%s',原因:值 %s 对应空的填充字符串。"; + public static final String EXCEPTION_FOUND_NO_COLUMN_ARG_ARG_8CF632F7 = "未找到列 %s,所在位置:%s"; + public static final String EXCEPTION_SORT_ITEM_ARG_NOT_INCLUDED_CHILDREN_S_OUTPUT_COLUMNS_CC911999 = "排序项 %s 未包含在子节点输出列中"; + public static final String EXCEPTION_LEFT_CHILD_JOINNODE_DOESN_T_CONTAIN_LEFTOUTPUTSYMBOL_0C8AA216 = "JoinNode 的左子节点不包含 LeftOutputSymbol"; + public static final String EXCEPTION_RIGHT_CHILD_JOINNODE_DOESN_T_CONTAIN_RIGHTOUTPUTSYMBOL_10A86F63 = "JoinNode 的右子节点不包含 RightOutputSymbol"; + public static final String EXCEPTION_LEFT_CHILD_JOINNODE_DOESN_T_CONTAIN_LEFT_ASOF_MAIN_JOIN_2850234A = "JoinNode 的左子节点不包含左侧 ASOF 主连接键。"; + public static final String EXCEPTION_RIGHT_CHILD_JOINNODE_DOESN_T_CONTAIN_RIGHT_ASOF_MAIN_JOIN_1A9631C9 = "JoinNode 的右子节点不包含右侧 ASOF 主连接键。"; + public static final String EXCEPTION_JOIN_KEY_TYPE_MISMATCH_LEFT_JOIN_KEY_TYPE_072E692E = "连接键类型不匹配。左连接键类型:"; + public static final String EXCEPTION_RIGHT_JOIN_KEY_TYPE_56895767 = ",右连接键类型:"; + public static final String EXCEPTION_ROW_COUNT_MUST_0_1_8D44189F = "行数必须为 0 或 1"; + public static final String EXCEPTION_COLUMN_ARG_CANNOT_RESOLVED_508579EC = "无法解析列 '%s'。"; + public static final String EXCEPTION_REQUESTED_VALUE_UNKNOWN_CAPTURE_WAS_IT_REGISTERED_PATTERN_C77DF7E9 = "请求了未知 Capture 的值。是否已在 Pattern 中注册?"; + public static final String EXCEPTION_TARGET_NODE_INDEX_MUST_BE_GREATER_THAN_OR_EQUAL_TO_ONE_75BFB7C3 = "目标节点索引必须大于或等于 1"; + public static final String EXCEPTION_ALREADY_AT_TARGET_32DFD57F = "已到达目标"; + public static final String EXCEPTION_PARTIALRESULT_OF_COVARIANCE_SHOULD_BE_1_E6A950B1 = "Covariance 的 partialResult 应为 1"; + public static final String EXCEPTION_INPUT_OF_COVARIANCE_SHOULD_BE_1_75D3F4FD = "Covariance 的输入数量应为 1"; + public static final String EXCEPTION_COVARIANCE_STATE_COUNT_IS_SMALLER_THAN_REMOVED_STATE_COUNT_8C088DC6 = "Covariance 状态计数小于已移除状态计数"; + public static final String EXCEPTION_PARTIALRESULT_OF_VARIANCE_SHOULD_BE_1_9C281868 = "variance 的 partialResult 应为 1"; + public static final String EXCEPTION_INPUT_OF_VARIANCE_SHOULD_BE_1_1BC7A702 = "variance 的输入数量应为 1"; + public static final String EXCEPTION_PARTIALRESULT_OF_CENTRALMOMENT_SHOULD_BE_1_B7C0B4B9 = "CentralMoment 的 partialResult 应为 1"; + public static final String EXCEPTION_PARTIALRESULT_SHOULD_BE_1_399D5DC3 = "partialResult 应为 1"; + public static final String EXCEPTION_INPUT_OF_CENTRALMOMENT_SHOULD_BE_1_FD23B170 = "CentralMoment 的输入数量应为 1"; + public static final String EXCEPTION_CENTRALMOMENT_STATE_COUNT_IS_SMALLER_THAN_REMOVED_STATE_COUNT_B87864BA = "CentralMoment 状态计数小于已移除状态计数"; + public static final String EXCEPTION_PARTIALRESULT_OF_CORRELATION_SHOULD_BE_1_D5A8CED6 = "Correlation 的 partialResult 应为 1"; + public static final String EXCEPTION_INPUT_OF_CORRELATION_SHOULD_BE_1_5D666DB5 = "Correlation 的输入数量应为 1"; + public static final String EXCEPTION_CORRELATION_STATE_COUNT_IS_SMALLER_THAN_REMOVED_STATE_COUNT_66C90757 = "Correlation 状态计数小于已移除状态计数"; + public static final String EXCEPTION_PARTIALRESULT_OF_REGRESSION_SHOULD_BE_1_B7ED33FA = "Regression 的 partialResult 应为 1"; + public static final String EXCEPTION_INPUT_OF_REGRESSION_SHOULD_BE_1_9AF4E8EC = "Regression 的输入数量应为 1"; + public static final String EXCEPTION_REGRESSION_STATE_COUNT_IS_SMALLER_THAN_REMOVED_STATE_COUNT_4415A3AE = "Regression 状态计数小于已移除状态计数"; + public static final String EXCEPTION_INVALID_STARTINGPOSITION_COLON_ARG_7B4D49C0 = "无效的 startingPosition: %s"; + public static final String EXCEPTION_ROWID_DOES_NOT_MATCH_THIS_TSBLOCK_18F9EB4D = "rowId 与当前 TsBlock 不匹配"; + public static final String EXCEPTION_CURSOR_STILL_ACTIVE_E9462D3B = "游标仍处于活动状态"; + public static final String EXCEPTION_NO_ACTIVE_CURSOR_C89C9944 = "没有活动游标"; + public static final String EXCEPTION_NOT_YET_ADVANCED_1600C5A7 = "尚未前进"; + public static final String EXCEPTION_SHOULD_NOT_ATTEMPT_COMPACTION_WHEN_TSBLOCK_IS_LOCKED_DF775E6B = "TsBlock 锁定时不应尝试压缩"; + public static final String EXCEPTION_STRATEGY_IS_NULL_DDA2C67F = "策略不能为空"; + public static final String EXCEPTION_ROWIDEVICTIONLISTENER_IS_NULL_457EFBEE = "rowIdEvictionListener 不能为空"; + public static final String EXCEPTION_TOPN_MUST_BE_GREATER_THAN_ZERO_43866D3E = "topN 必须大于 0"; + public static final String EXCEPTION_NO_ROOT_TO_PEEK_43C3D8D5 = "没有可查看的根节点"; + public static final String EXCEPTION_GROUP_ID_HAS_AN_EMPTY_HEAP_C9EDB841 = "分组 ID 的堆为空"; + public static final String EXCEPTION_POPANDINSERT_LEFT_PAREN_RIGHT_PAREN_REQUIRES_AT_LEAST_A_ROOT_NODE_0CA0DD58 = "popAndInsert() 至少需要一个根节点"; + public static final String EXCEPTION_OPERATORCONTEXT_IS_NULL_D15B1EDB = "operatorContext 不能为空"; + public static final String EXCEPTION_CHILD_OPERATOR_IS_NULL_8860113C = "子算子不能为空"; + public static final String EXCEPTION_LIMIT_MUST_BE_AT_LEAST_ZERO_E960530F = "LIMIT 必须至少为 0"; + public static final String EXCEPTION_OFFSET_MUST_BE_AT_LEAST_ZERO_21BB6BB6 = "偏移量必须至少为 0"; + public static final String EXCEPTION_TSBLOCKS_IS_NULL_02287FD8 = "tsBlocks 不能为空"; + public static final String EXCEPTION_FILLARRAY_SHOULD_NOT_BE_NULL_OR_EMPTY_118FB134 = "fillArray 不能为 null 或空"; + public static final String EXCEPTION_UNIQUE_ROW_ID_EXCEEDS_A_LIMIT_COLON_ARG_71EE4B7D = "唯一行 ID 超出限制:%s"; + public static final String EXCEPTION_HELPERCOLUMNINDEX_FOR_PREVIOUSFILLWITHGROUPOPERATOR_SHOULD_NEVER_BE_NEGATIVE_ABA9C2B1 = "PreviousFillWithGroupOperator 的 helperColumnIndex 不应为负数"; + public static final String EXCEPTION_OUTPUTCOLUMNCOUNT_IS_NOT_EQUAL_TO_VALUE_COLUMN_COUNT_OF_CHILD_OPERATOR_QUOTE_S_T_8E30BAD8 = "outputColumnCount 不等于子算子 TsBlock 的值列数量"; + public static final String EXCEPTION_HELPERCOLUMNINDEX_SHOULD_BE_RESOLVED_WHEN_TIMEBOUND_EXISTS_01BE233B = "存在 timeBound 时应解析 helperColumnIndex"; + public static final String EXCEPTION_TYPE_IS_NULL_16A3D3EB = "类型不能为空"; + public static final String EXCEPTION_LOGICALINDEXNAVIGATION_IS_NULL_3B31CD23 = "logicalIndexNavigation 不能为空"; + public static final String EXCEPTION_OVERRIDING_AGGREGATIONS_FOR_CHILD_THREAD_9C84E47D = "正在覆盖子线程的聚合"; + public static final String EXCEPTION_SKIP_TO_NAVIGATION_IS_MISSING_FOR_SKIP_TO_ARG_8A303D73 = "跳转到 %s 缺少跳转导航"; + public static final String EXCEPTION_LABELS_IS_NULL_F4FBBECE = "标签不能为空"; + public static final String EXCEPTION_LOGICAL_OFFSET_MUST_BE_GREATER_THAN_EQUALS_0_COMMA_ACTUAL_COLON_ARG_539807BF = "逻辑偏移量必须 >= 0,实际为:%s"; + public static final String EXCEPTION_CURRENT_ROW_IS_OUT_OF_BOUNDS_OF_THE_MATCH_D8D8B611 = "当前行超出匹配范围"; + public static final String EXCEPTION_EVALUATIONS_IS_NULL_F3F72380 = "求值列表不能为空"; + public static final String EXCEPTION_PARTITION_IS_NULL_27FD9756 = "分区不能为空"; + public static final String EXCEPTION_LABELNAMES_IS_NULL_EEFDB807 = "labelNames 不能为空"; + public static final String EXCEPTION_BOUNDSIGNATURE_IS_NULL_D1077180 = "boundSignature 不能为空"; + public static final String EXCEPTION_ACCUMULATO_IS_NULL_D51F532F = "累加器不能为空"; + public static final String EXCEPTION_PATTERNAGGREGATIONTRACKER_IS_NULL_82EC5B1C = "patternAggregationTracker 不能为空"; + public static final String EXCEPTION_PATTERNAGGREGATIONTRACKER_IN_INCONSISTENT_STATE_C6FF5294 = "PatternAggregationTracker 状态不一致"; + public static final String EXCEPTION_SETEVALUATOR_IN_INCONSISTENT_STATE_D5FAA900 = "SetEvaluator 状态不一致"; + public static final String EXCEPTION_ACCUMULATOR_IS_NULL_EF0C1DFF = "累加器不能为空"; + public static final String EXCEPTION_INTERMEDIATETYPE_IS_NULL_D0D9B957 = "intermediateType 不能为空"; + public static final String EXCEPTION_INPUTCHANNELS_IS_NULL_647DA393 = "inputChannels 不能为空"; + public static final String EXCEPTION_ARRAY_IS_NULL_BCF2EEB1 = "数组不能为空"; + public static final String EXCEPTION_USED_SLOTS_COUNT_IS_NEGATIVE_49F017C5 = "已用槽位数量为负数"; + public static final String EXCEPTION_USED_SLOTS_COUNT_EXCEEDS_ARRAY_SIZE_6DCD8C7E = "已用槽位数量超过数组大小"; + public static final String EXCEPTION_ARRAY_INDEX_OUT_OF_BOUNDS_35C8A83F = "数组索引越界"; + public static final String EXCEPTION_EXCLUSIONS_IS_NULL_336ED5E7 = "排除项不能为空"; + public static final String EXCEPTION_INSTRUCTIONS_IS_NULL_A9CDA591 = "指令不能为空"; + public static final String EXCEPTION_LABELMAPPING_IS_NULL_535461C7 = "labelMapping 不能为空"; + public static final String EXCEPTION_INVALID_PATTERN_COLON_PERMUTATION_WITH_SINGLE_ELEMENT_DOT_RUN_IRROWPATTERNFLATTE_3FF56E02 = "无效的模式:单元素排列。请先运行 IrRowPatternFlattener"; + public static final String EXCEPTION_INVALID_MIN_VALUE_COLON_ARG_8D899A2E = "无效的最小值:%s"; + public static final String EXCEPTION_INVALID_RANGE_COLON_LEFT_PAREN_ARG_COMMA_ARG_RIGHT_PAREN_EF9544AA = "无效范围:(%s, %s)"; + public static final String EXCEPTION_NEXTCOLUMN_QUOTE_S_TIME_SHOULD_BE_GREATER_THAN_CURRENT_TIME_334CB115 = "nextColumn 的时间应大于当前时间"; + public static final String EXCEPTION_HASHCHANNEL_IS_NULL_A5E70672 = "hashChannel 不能为空"; + public static final String EXCEPTION_MARKDISTINCTCHANNELS_IS_NULL_7130C56A = "markDistinctChannels 不能为空"; + public static final String EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_OF_LAST_SHOULD_BE_BINARYCOLUMN_24E654CD = "LAST 的中间输入和输出应为 BinaryColumn"; + public static final String EXCEPTION_LENGTH_OF_INPUT_COLUMN_LEFT_BRACKET_RIGHT_BRACKET_FOR_FIRST_BY_SHOULD_BE_3_BE623E5E = "FIRST_BY 的输入 Column[] 长度应为 3"; + public static final String EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_OF_FIRST_BY_SHOULD_BE_BINARYCOLUMN_F0D867AB = "FIRST_BY 的中间输入和输出应为 BinaryColumn"; + public static final String EXCEPTION_INPUT_OF_COVARIANCE_SHOULD_BE_2_786B97E6 = "Covariance 的输入数量应为 2"; + public static final String EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_SHOULD_BE_BINARYCOLUMN_3B5148FA = "中间输入和输出应为 BinaryColumn"; + public static final String EXCEPTION_LENGTH_OF_INPUT_COLUMN_LEFT_BRACKET_RIGHT_BRACKET_FOR_LAST_BY_SHOULD_BE_3_D759D45F = "LAST_BY 的输入 Column[] 长度应为 3"; + public static final String EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_OF_LAST_BY_SHOULD_BE_BINARYCOLUMN_87700792 = "LAST_BY 的中间输入和输出应为 BinaryColumn"; + public static final String EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_OF_UDAF_SHOULD_BE_BINARYCOLUMN_6F28900F = "UDAF 的中间输入和输出应为 BinaryColumn"; + public static final String EXCEPTION_ARGUMENT_OF_AVG_SHOULD_BE_ONE_COLUMN_82162B82 = "AVG 的参数应为一列"; + public static final String EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_OF_AVG_SHOULD_BE_BINARYCOLUMN_9CCDD5EB = "AVG 的中间输入和输出应为 BinaryColumn"; + public static final String EXCEPTION_INPUT_OF_CORRELATION_SHOULD_BE_2_64BB37B5 = "Correlation 的输入数量应为 2"; + public static final String EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_OF_FIRST_SHOULD_BE_BINARYCOLUMN_57CE212C = "FIRST 的中间输入和输出应为 BinaryColumn"; + public static final String EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_OF_APPROX_COUNT_DISTINCT_SHOULD_BE_BINARYCOLUMN_F444D3BE = "APPROX_COUNT_DISTINCT 的中间输入和输出应为 BinaryColumn"; + public static final String EXCEPTION_SELECTEDPOSITIONS_IS_NULL_2300C002 = "selectedPositions 不能为空"; + public static final String EXCEPTION_RETAINEDPOSITIONS_IS_NULL_E62F9B0D = "retainedPositions 不能为空"; + public static final String EXCEPTION_POSITIONCOUNT_IS_NEGATIVE_2FACCDCA = "positionCount 为负数"; + public static final String EXCEPTION_SELECTEDPOSITIONCOUNT_IS_NEGATIVE_A8A7FDA1 = "selectedPositionCount 为负数"; + public static final String EXCEPTION_SELECTEDPOSITIONCOUNT_CANNOT_BE_GREATER_THAN_POSITIONCOUNT_871FF8DA = "selectedPositionCount 不能大于 positionCount"; + public static final String EXCEPTION_SELECTEDPOSITION_IS_SMALLER_THAN_SELECTEDPOSITIONCOUNT_465B9220 = "selectedPosition 小于 selectedPositionCount"; + public static final String EXCEPTION_BLOCK_POSITION_COUNT_DOES_NOT_MATCH_CURRENT_POSITION_COUNT_FE4BBE3D = "Block 位置数与当前位置数不匹配"; + public static final String EXCEPTION_GETSELECTEDPOSITIONS_NOT_AVAILABLE_WHEN_IN_SELECTALL_MODE_CBE671D3 = "selectAll 模式下 getSelectedPositions 不可用"; + public static final String EXCEPTION_ARGUMENT_OF_MAX_SHOULD_BE_ONE_COLUMN_FC251F55 = "MAX 的参数应为一列"; + public static final String EXCEPTION_ARGUMENT_OF_SUM_SHOULD_BE_ONE_COLUMN_D6E636D1 = "SUM 的参数应为一列"; + public static final String EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_OF_MODE_SHOULD_BE_BINARYCOLUMN_2BB3E0AF = "Mode 的中间输入和输出应为 BinaryColumn"; + public static final String EXCEPTION_ARGUMENT_OF_COUNT_LEFT_PAREN_RIGHT_PAREN_SHOULD_BE_ONE_COLUMN_9158A9FE = "COUNT(*) 的参数应为一列"; + public static final String EXCEPTION_WRONG_INPUTDATATYPES_SIZE_DOT_675FF289 = "inputDataTypes 大小错误。"; + public static final String EXCEPTION_ARGUMENT_OF_COUNT_SHOULD_BE_ONE_COLUMN_906D6B19 = "COUNT 的参数应为一列"; + public static final String EXCEPTION_INTERMEDIATE_OUTPUT_OF_REGRESSION_SHOULD_BE_BINARYCOLUMN_E74D77ED = "Regression 的中间输出应为 BinaryColumn"; + public static final String EXCEPTION_INPUT_OF_REGRESSION_SHOULD_BE_2_3893EEE3 = "Regression 的输入数量应为 2"; + public static final String EXCEPTION_LENGTH_OF_INPUT_COLUMN_LEFT_BRACKET_RIGHT_BRACKET_FOR_MAX_BY_SLASH_MIN_BY_SHOULD_3767E905 = "MAX_BY/MIN_BY 的输入 Column[] 长度应为 2"; + public static final String EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_OF_MAX_BY_SLASH_MIN_BY_SHOULD_BE_BINARYCOLUMN_82B1BE6B = "MAX_BY/MIN_BY 的中间输入和输出应为 BinaryColumn"; + public static final String EXCEPTION_ARGUMENT_OF_MIN_SHOULD_BE_ONE_COLUMN_F8AA1E88 = "MIN 的参数应为一列"; + public static final String EXCEPTION_STEP_IS_NULL_F83262DA = "步骤不能为空"; + public static final String EXCEPTION_MASKCHANNEL_IS_NULL_571AD53D = "maskChannel 不能为空"; + public static final String EXCEPTION_EXPECTED_1_INPUT_CHANNEL_FOR_INTERMEDIATE_AGGREGATION_3190C507 = "中间聚合期望 1 个输入通道"; + public static final String EXCEPTION_VALUE_IS_NULL_192F6BFF = "值不能为空"; + public static final String EXCEPTION_VALUE_MUST_BE_POSITIVE_24FE7959 = "值必须为正数"; + public static final String EXCEPTION_NUMBEROFBUCKETS_MUST_BE_A_POWER_OF_2_COMMA_ACTUAL_COLON_ARG_476E74ED = "numberOfBuckets 必须是 2 的幂,实际为:%s"; + public static final String EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_OF_MODE_SHOULD_BE_BINARYCOLUMN_0D03B323 = "MODE 的中间输入和输出应为 BinaryColumn"; + public static final String EXCEPTION_AGGREGATION_BUFFER_IS_FULL_233DAF3E = "聚合缓冲区已满"; + public static final String EXCEPTION_PAGE_IS_NULL_4AA19E1C = "页面不能为空"; + public static final String EXCEPTION_SPILL_IS_NOT_SUPPORTED_E6E35549 = "不支持 spill"; + public static final String EXCEPTION_LENGTH_OF_INPUT_COLUMN_LEFT_BRACKET_RIGHT_BRACKET_FOR_LASTBY_SLASH_FIRSTBY_SHOUL_9E836ABA = "LAST_BY/FIRST_BY 的输入 Column[] 长度应为 3"; + public static final String EXCEPTION_THE_SIZE_OF_READYQUEUE_CANNOT_BE_NEGATIVE_DOT_01D8D0CB = "readyQueue 的大小不能为负数。"; + public static final String EXCEPTION_THE_SIZE_BETWEEN_WHENTRANSFORMERS_AND_THENTRANSFORMERS_NEEDS_TO_BE_SAME_AC796883 = "whenTransformers 和 thenTransformers 的大小应相同"; + public static final String EXCEPTION_EXCEED_MAX_CALL_TIMES_OF_GETCOLUMN_69C77C7E = "超过 getColumn 的最大调用次数"; + public static final String EXCEPTION_FILTER_IS_NOT_SUPPORTED_IN_ARG_DOT_FILTER_IS_ARG_DOT_417C4F3C = "%s 不支持过滤条件。过滤条件为 %s。"; + public static final String EXCEPTION_NULL_9B41EF67 = "null"; + public static final String EXCEPTION_ARG_MUST_HAVE_JOIN_KEYS_DOT_C24DAB2D = "%s 必须包含连接键。"; + public static final String EXCEPTION_SOURCE_OF_SEMIJOINNODE_DOESN_QUOTE_T_CONTAIN_SOURCEOUTPUTSYMBOL_DOT_527996EC = "SemiJoinNode 的 Source 不包含 sourceOutputSymbol。"; + public static final String EXCEPTION_SOURCE_OF_SEMIJOINNODE_DOESN_QUOTE_T_CONTAIN_SOURCEJOINSYMBOL_DOT_32209273 = "SemiJoinNode 的 Source 不包含 sourceJoinSymbol。"; + public static final String EXCEPTION_FILTERINGSOURCE_OF_SEMIJOINNODE_DOESN_QUOTE_T_CONTAIN_FILTERINGSOURCEJOINSYMBOL__1B75DDE2 = "SemiJoinNode 的 FilteringSource 不包含 filteringSourceJoinSymbol。"; + public static final String EXCEPTION_NAME_IS_NULL_C8B35959 = "名称不能为空"; + public static final String EXCEPTION_FUNCTION_IS_NULL_E0FA4B62 = "函数不能为空"; + public static final String EXCEPTION_PREVIOUS_IS_NULL_056F5D52 = "前一个值不能为空"; + public static final String EXCEPTION_PROPERTY_IS_NULL_1C6980FF = "属性不能为空"; + public static final String EXCEPTION_PATTERN_IS_NULL_AC4E239A = "模式不能为空"; + public static final String EXCEPTION_CAPTURES_IS_NULL_75EACA5A = "捕获列表不能为空"; + public static final String EXCEPTION_PREDICATE_IS_NULL_22E687A9 = "谓词不能为空"; + public static final String EXCEPTION_EXPECTEDCLASS_IS_NULL_B619CCC7 = "期望类不能为空"; + public static final String EXCEPTION_EXPECTEDVALUE_CAN_QUOTE_T_BE_NULL_DOT_USE_ISNULL_LEFT_PAREN_RIGHT_PAREN_PATTERN__FC25E374 = "expectedValue 不能为 null,请改用 isNull() 模式。"; + public static final String EXCEPTION_CAPTURE_IS_NULL_C54AA710 = "捕获不能为空"; + public static final String EXCEPTION_PROPERTYPATTERN_IS_NULL_37185AE7 = "propertyPattern 不能为空"; + public static final String EXCEPTION_TARGET_NODE_MUST_EXIST_2C8D8F3A = "目标节点必须存在"; + public static final String EXCEPTION_HEAP_MUST_HAVE_AT_LEAST_ONE_NODE_BEFORE_STARTING_TRAVERSAL_A1E65C70 = "堆在开始遍历前必须至少有一个节点"; + public static final String EXCEPTION_NEW_CHILD_SHOULDN_QUOTE_T_EXIST_YET_1EB3B129 = "新子节点不应已存在"; + public static final String EXCEPTION_ROWID_AND_UNIQUEVALUE_MASK_OVERLAPS_9A092E09 = "RowId 和 uniqueValue 掩码重叠"; + } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/aggregation/Accumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/aggregation/Accumulator.java index 38b0c5353936d..93634db3be33d 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/aggregation/Accumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/aggregation/Accumulator.java @@ -19,6 +19,8 @@ package org.apache.iotdb.calc.execution.aggregation; +import org.apache.iotdb.calc.i18n.CalcMessages; + import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; import org.apache.tsfile.enums.TSDataType; @@ -43,7 +45,7 @@ public interface Accumulator { */ default void removeIntermediate(Column[] partialResult) { throw new UnsupportedOperationException( - "This type of accumulator does not support remove input!"); + CalcMessages.EXCEPTION_TYPE_ACCUMULATOR_DOES_NOT_SUPPORT_REMOVE_INPUT_905AFAA1); } /** diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/aggregation/CentralMomentAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/aggregation/CentralMomentAccumulator.java index f3ae6ed6e6937..c8c0ab7446827 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/aggregation/CentralMomentAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/aggregation/CentralMomentAccumulator.java @@ -14,6 +14,8 @@ package org.apache.iotdb.calc.execution.aggregation; +import org.apache.iotdb.calc.i18n.CalcMessages; + import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; import org.apache.tsfile.enums.TSDataType; @@ -78,7 +80,8 @@ private double getDoubleValue(Column column, int position) { return column.getDouble(position); default: throw new UnsupportedOperationException( - "Unsupported data type in CentralMoment Aggregation: " + seriesDataType); + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_CENTRALMOMENT_AGGREGATION_0A19C2A8 + + seriesDataType); } } @@ -102,7 +105,9 @@ private void update(double value) { @Override public void addIntermediate(Column[] partialResult) { - checkArgument(partialResult.length == 1, "partialResult of CentralMoment should be 1"); + checkArgument( + partialResult.length == 1, + CalcMessages.EXCEPTION_PARTIALRESULT_OF_CENTRALMOMENT_SHOULD_BE_1_B7C0B4B9); if (partialResult[0].isNull(0)) { return; } @@ -156,7 +161,8 @@ private void merge(long nB, double meanB, double m2B, double m3B, double m4B) { @Override public void outputIntermediate(ColumnBuilder[] columnBuilders) { - checkArgument(columnBuilders.length == 1, "partialResult should be 1"); + checkArgument( + columnBuilders.length == 1, CalcMessages.EXCEPTION_PARTIALRESULT_SHOULD_BE_1_399D5DC3); if (count == 0) { columnBuilders[0].appendNull(); } else { @@ -202,7 +208,8 @@ public void outputFinal(ColumnBuilder columnBuilder) { @Override public void removeIntermediate(Column[] input) { - checkArgument(input.length == 1, "Input of CentralMoment should be 1"); + checkArgument( + input.length == 1, CalcMessages.EXCEPTION_INPUT_OF_CENTRALMOMENT_SHOULD_BE_1_FD23B170); if (input[0].isNull(0)) { return; } @@ -214,7 +221,10 @@ public void removeIntermediate(Column[] input) { if (nB == 0) { return; } - checkArgument(count >= nB, "CentralMoment state count is smaller than removed state count"); + checkArgument( + count >= nB, + CalcMessages + .EXCEPTION_CENTRALMOMENT_STATE_COUNT_IS_SMALLER_THAN_REMOVED_STATE_COUNT_B87864BA); if (count == nB) { reset(); diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/aggregation/CorrelationAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/aggregation/CorrelationAccumulator.java index cf7e7ad5964c1..97ad313c2b6db 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/aggregation/CorrelationAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/aggregation/CorrelationAccumulator.java @@ -19,6 +19,8 @@ package org.apache.iotdb.calc.execution.aggregation; +import org.apache.iotdb.calc.i18n.CalcMessages; + import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; import org.apache.tsfile.enums.TSDataType; @@ -78,7 +80,7 @@ private double getDoubleValue(Column column, int position, TSDataType dataType) case DOUBLE: return column.getDouble(position); default: - throw new IllegalArgumentException("Unsupported data type: " + dataType); + throw new IllegalArgumentException(CalcMessages.UNSUPPORTED_DATA_TYPE + dataType); } } @@ -100,7 +102,9 @@ private void update(double x, double y) { @Override public void addIntermediate(Column[] partialResult) { - checkArgument(partialResult.length == 1, "partialResult of Correlation should be 1"); + checkArgument( + partialResult.length == 1, + CalcMessages.EXCEPTION_PARTIALRESULT_OF_CORRELATION_SHOULD_BE_1_D5A8CED6); if (partialResult[0].isNull(0)) { return; } @@ -153,7 +157,9 @@ private void merge( @Override public void outputIntermediate(ColumnBuilder[] columnBuilders) { - checkArgument(columnBuilders.length == 1, "partialResult of Correlation should be 1"); + checkArgument( + columnBuilders.length == 1, + CalcMessages.EXCEPTION_PARTIALRESULT_OF_CORRELATION_SHOULD_BE_1_D5A8CED6); if (count == 0) { columnBuilders[0].appendNull(); } else { @@ -181,7 +187,8 @@ public void outputFinal(ColumnBuilder columnBuilder) { @Override public void removeIntermediate(Column[] input) { - checkArgument(input.length == 1, "Input of Correlation should be 1"); + checkArgument( + input.length == 1, CalcMessages.EXCEPTION_INPUT_OF_CORRELATION_SHOULD_BE_1_5D666DB5); if (input[0].isNull(0)) { return; } @@ -194,7 +201,9 @@ public void removeIntermediate(Column[] input) { return; } checkArgument( - count >= otherCount, "Correlation state count is smaller than removed state count"); + count >= otherCount, + CalcMessages + .EXCEPTION_CORRELATION_STATE_COUNT_IS_SMALLER_THAN_REMOVED_STATE_COUNT_66C90757); if (count == otherCount) { reset(); diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/aggregation/CovarianceAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/aggregation/CovarianceAccumulator.java index 30c64a5e68da1..dc2110ce098c9 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/aggregation/CovarianceAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/aggregation/CovarianceAccumulator.java @@ -19,6 +19,8 @@ package org.apache.iotdb.calc.execution.aggregation; +import org.apache.iotdb.calc.i18n.CalcMessages; + import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; import org.apache.tsfile.enums.TSDataType; @@ -81,7 +83,7 @@ private double getDoubleValue(Column column, int position, TSDataType dataType) case DOUBLE: return column.getDouble(position); default: - throw new IllegalArgumentException("Unsupported data type: " + dataType); + throw new IllegalArgumentException(CalcMessages.UNSUPPORTED_DATA_TYPE + dataType); } } @@ -98,7 +100,9 @@ private void update(double x, double y) { @Override public void addIntermediate(Column[] partialResult) { - checkArgument(partialResult.length == 1, "partialResult of Covariance should be 1"); + checkArgument( + partialResult.length == 1, + CalcMessages.EXCEPTION_PARTIALRESULT_OF_COVARIANCE_SHOULD_BE_1_E6A950B1); if (partialResult[0].isNull(0)) { return; } @@ -138,7 +142,9 @@ private void merge(long otherCount, double otherMeanX, double otherMeanY, double @Override public void outputIntermediate(ColumnBuilder[] columnBuilders) { - checkArgument(columnBuilders.length == 1, "partialResult of Covariance should be 1"); + checkArgument( + columnBuilders.length == 1, + CalcMessages.EXCEPTION_PARTIALRESULT_OF_COVARIANCE_SHOULD_BE_1_E6A950B1); if (count == 0) { columnBuilders[0].appendNull(); return; @@ -171,13 +177,14 @@ public void outputFinal(ColumnBuilder columnBuilder) { } break; default: - throw new UnsupportedOperationException("Unknown type: " + covarianceType); + throw new UnsupportedOperationException(CalcMessages.UNKNOWN_TYPE + covarianceType); } } @Override public void removeIntermediate(Column[] input) { - checkArgument(input.length == 1, "Input of Covariance should be 1"); + checkArgument( + input.length == 1, CalcMessages.EXCEPTION_INPUT_OF_COVARIANCE_SHOULD_BE_1_75D3F4FD); if (input[0].isNull(0)) { return; } @@ -190,7 +197,8 @@ public void removeIntermediate(Column[] input) { return; } checkArgument( - count >= otherCount, "Covariance state count is smaller than removed state count"); + count >= otherCount, + CalcMessages.EXCEPTION_COVARIANCE_STATE_COUNT_IS_SMALLER_THAN_REMOVED_STATE_COUNT_8C088DC6); if (count == otherCount) { reset(); diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/aggregation/RegressionAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/aggregation/RegressionAccumulator.java index 6cf056a69d148..ca58ba7a68fb7 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/aggregation/RegressionAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/aggregation/RegressionAccumulator.java @@ -14,6 +14,8 @@ package org.apache.iotdb.calc.execution.aggregation; +import org.apache.iotdb.calc.i18n.CalcMessages; + import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; import org.apache.tsfile.enums.TSDataType; @@ -79,7 +81,7 @@ private double getDoubleValue(Column column, int position, TSDataType dataType) case DOUBLE: return column.getDouble(position); default: - throw new IllegalArgumentException("Unsupported data type: " + dataType); + throw new IllegalArgumentException(CalcMessages.UNSUPPORTED_DATA_TYPE + dataType); } } @@ -97,7 +99,9 @@ private void update(double x, double y) { @Override public void addIntermediate(Column[] partialResult) { - checkArgument(partialResult.length == 1, "partialResult of Regression should be 1"); + checkArgument( + partialResult.length == 1, + CalcMessages.EXCEPTION_PARTIALRESULT_OF_REGRESSION_SHOULD_BE_1_B7ED33FA); if (partialResult[0].isNull(0)) { return; } @@ -143,7 +147,9 @@ private void merge( @Override public void outputIntermediate(ColumnBuilder[] columnBuilders) { - checkArgument(columnBuilders.length == 1, "partialResult of Regression should be 1"); + checkArgument( + columnBuilders.length == 1, + CalcMessages.EXCEPTION_PARTIALRESULT_OF_REGRESSION_SHOULD_BE_1_B7ED33FA); if (count == 0) { columnBuilders[0].appendNull(); } else { @@ -182,13 +188,14 @@ public void outputFinal(ColumnBuilder columnBuilder) { } break; default: - throw new UnsupportedOperationException("Unknown type: " + regressionType); + throw new UnsupportedOperationException(CalcMessages.UNKNOWN_TYPE + regressionType); } } @Override public void removeIntermediate(Column[] input) { - checkArgument(input.length == 1, "Input of Regression should be 1"); + checkArgument( + input.length == 1, CalcMessages.EXCEPTION_INPUT_OF_REGRESSION_SHOULD_BE_1_9AF4E8EC); if (input[0].isNull(0)) { return; } @@ -201,7 +208,8 @@ public void removeIntermediate(Column[] input) { return; } checkArgument( - count >= otherCount, "Regression state count is smaller than removed state count"); + count >= otherCount, + CalcMessages.EXCEPTION_REGRESSION_STATE_COUNT_IS_SMALLER_THAN_REMOVED_STATE_COUNT_4415A3AE); if (count == otherCount) { reset(); diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/aggregation/VarianceAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/aggregation/VarianceAccumulator.java index 48972749c3a27..528f12982724d 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/aggregation/VarianceAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/aggregation/VarianceAccumulator.java @@ -19,6 +19,8 @@ package org.apache.iotdb.calc.execution.aggregation; +import org.apache.iotdb.calc.i18n.CalcMessages; + import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; import org.apache.tsfile.enums.TSDataType; @@ -77,13 +79,17 @@ public void addInput(Column[] columns, BitMap bitMap) { case TIMESTAMP: default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in aggregation variance : %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_AGGREGATION_VARIANCE_ARG_17A45959, + seriesDataType)); } } @Override public void addIntermediate(Column[] partialResult) { - checkArgument(partialResult.length == 1, "partialResult of variance should be 1"); + checkArgument( + partialResult.length == 1, + CalcMessages.EXCEPTION_PARTIALRESULT_OF_VARIANCE_SHOULD_BE_1_9C281868); if (partialResult[0].isNull(0)) { return; } @@ -103,7 +109,7 @@ public void addIntermediate(Column[] partialResult) { @Override public void removeIntermediate(Column[] input) { - checkArgument(input.length == 1, "Input of variance should be 1"); + checkArgument(input.length == 1, CalcMessages.EXCEPTION_INPUT_OF_VARIANCE_SHOULD_BE_1_1BC7A702); if (input[0].isNull(0)) { return; } @@ -141,7 +147,9 @@ public void setFinal(Column finalResult) { @Override public void outputIntermediate(ColumnBuilder[] columnBuilders) { - checkArgument(columnBuilders.length == 1, "partialResult of variance should be 1"); + checkArgument( + columnBuilders.length == 1, + CalcMessages.EXCEPTION_PARTIALRESULT_OF_VARIANCE_SHOULD_BE_1_9C281868); if (count == 0) { columnBuilders[0].appendNull(); } else { diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/GroupedTopNRowNumberAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/GroupedTopNRowNumberAccumulator.java index 284e325ff5aed..0343359dc572b 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/GroupedTopNRowNumberAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/GroupedTopNRowNumberAccumulator.java @@ -21,6 +21,7 @@ import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.LongBigArray; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.LongBigArrayFIFOQueue; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.calc.utils.HeapTraversal; import org.apache.tsfile.read.common.block.TsBlock; @@ -48,11 +49,12 @@ public class GroupedTopNRowNumberAccumulator { public GroupedTopNRowNumberAccumulator( RowIdComparisonStrategy strategy, int topN, LongConsumer rowIdEvictionListener) { - this.strategy = requireNonNull(strategy, "strategy is null"); - checkArgument(topN > 0, "topN must be greater than zero"); + this.strategy = requireNonNull(strategy, CalcMessages.EXCEPTION_STRATEGY_IS_NULL_DDA2C67F); + checkArgument(topN > 0, CalcMessages.EXCEPTION_TOPN_MUST_BE_GREATER_THAN_ZERO_43866D3E); this.topN = topN; this.rowIdEvictionListener = - requireNonNull(rowIdEvictionListener, "rowIdEvictionListener is null"); + requireNonNull( + rowIdEvictionListener, CalcMessages.EXCEPTION_ROWIDEVICTIONLISTENER_IS_NULL_457EFBEE); } public long sizeOf() { @@ -139,7 +141,8 @@ private long calculateRootRowNumber(int groupId) { private long peekRootRowId(int groupId) { long heapRootNodeIndex = groupIdToHeapBuffer.getHeapRootNodeIndex(groupId); - checkArgument(heapRootNodeIndex != UNKNOWN_INDEX, "No root to peek"); + checkArgument( + heapRootNodeIndex != UNKNOWN_INDEX, CalcMessages.EXCEPTION_NO_ROOT_TO_PEEK_43C3D8D5); return heapNodeBuffer.getRowId(heapRootNodeIndex); } @@ -164,7 +167,9 @@ private void setChildIndex(long heapNodeIndex, HeapTraversal.Child child, long n */ private void heapPop(int groupId, LongConsumer contextEvictionListener) { long heapRootNodeIndex = groupIdToHeapBuffer.getHeapRootNodeIndex(groupId); - checkArgument(heapRootNodeIndex != UNKNOWN_INDEX, "Group ID has an empty heap"); + checkArgument( + heapRootNodeIndex != UNKNOWN_INDEX, + CalcMessages.EXCEPTION_GROUP_ID_HAS_AN_EMPTY_HEAP_C9EDB841); long lastNodeIndex = heapDetachLastInsertionLeaf(groupId); long lastRowId = heapNodeBuffer.getRowId(lastNodeIndex); @@ -202,7 +207,9 @@ private long heapDetachLastInsertionLeaf(int groupId) { previousNodeIndex = currentNodeIndex; childPosition = heapTraversal.nextChild(); currentNodeIndex = getChildIndex(currentNodeIndex, childPosition); - verify(currentNodeIndex != UNKNOWN_INDEX, "Target node must exist"); + verify( + currentNodeIndex != UNKNOWN_INDEX, + CalcMessages.EXCEPTION_TARGET_NODE_MUST_EXIST_2C8D8F3A); } // Detach the last insertion leaf node, but do not deallocate yet @@ -258,8 +265,10 @@ private void heapInsert(int groupId, long newRowId) { verify( previousHeapNodeIndex != UNKNOWN_INDEX && childPosition != null, - "heap must have at least one node before starting traversal"); - verify(currentHeapNodeIndex == UNKNOWN_INDEX, "New child shouldn't exist yet"); + CalcMessages.EXCEPTION_HEAP_MUST_HAVE_AT_LEAST_ONE_NODE_BEFORE_STARTING_TRAVERSAL_A1E65C70); + verify( + currentHeapNodeIndex == UNKNOWN_INDEX, + CalcMessages.EXCEPTION_NEW_CHILD_SHOULDN_QUOTE_T_EXIST_YET_1EB3B129); long newHeapNodeIndex = heapNodeBuffer.allocateNewNode(newRowId); @@ -280,7 +289,10 @@ private void heapInsert(int groupId, long newRowId) { */ private void heapPopAndInsert(int groupId, long newRowId, LongConsumer contextEvictionListener) { long heapRootNodeIndex = groupIdToHeapBuffer.getHeapRootNodeIndex(groupId); - checkState(heapRootNodeIndex != UNKNOWN_INDEX, "popAndInsert() requires at least a root node"); + checkState( + heapRootNodeIndex != UNKNOWN_INDEX, + CalcMessages + .EXCEPTION_POPANDINSERT_LEFT_PAREN_RIGHT_PAREN_REQUIRES_AT_LEAST_A_ROOT_NODE_0CA0DD58); // Clear contents of the root node to create a vacancy for another row long poppedRowId = heapNodeBuffer.getRowId(heapRootNodeIndex); diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/RowReferenceTsBlockManager.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/RowReferenceTsBlockManager.java index dd81ab2f55f7b..a3cc842833136 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/RowReferenceTsBlockManager.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/RowReferenceTsBlockManager.java @@ -21,6 +21,7 @@ import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.IntBigArray; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.LongBigArrayFIFOQueue; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.tsfile.read.common.block.TsBlock; import org.apache.tsfile.utils.RamUsageEstimator; @@ -51,10 +52,10 @@ public LoadCursor add(TsBlock tsBlock) { } public LoadCursor add(TsBlock tsBlock, int startingPosition) { - checkState(currentCursor == null, "Cursor still active"); + checkState(currentCursor == null, CalcMessages.EXCEPTION_CURSOR_STILL_ACTIVE_E9462D3B); checkArgument( startingPosition >= 0 && startingPosition <= tsBlock.getPositionCount(), - "invalid startingPosition: %s", + CalcMessages.EXCEPTION_INVALID_STARTINGPOSITION_COLON_ARG_7B4D49C0, startingPosition); TsBlockAccounting tsBlockAccounting = @@ -99,7 +100,7 @@ private void checkTsBlockMaintenance(TsBlockAccounting tsBlockAccounting) { public TsBlock getTsBlock(long rowId) { if (isCursorRowId(rowId)) { - checkState(currentCursor != null, "No active cursor"); + checkState(currentCursor != null, CalcMessages.EXCEPTION_NO_ACTIVE_CURSOR_C89C9944); return currentCursor.getTsBlock(); } int tsBlockId = rowIdBuffer.getTsBlockId(rowId); @@ -108,7 +109,7 @@ public TsBlock getTsBlock(long rowId) { public int getPosition(long rowId) { if (isCursorRowId(rowId)) { - checkState(currentCursor != null, "No active cursor"); + checkState(currentCursor != null, CalcMessages.EXCEPTION_NO_ACTIVE_CURSOR_C89C9944); // rowId for cursors only reference the single current position return currentCursor.getCurrentPosition(); } @@ -160,7 +161,7 @@ private TsBlock getTsBlock() { } private int getCurrentPosition() { - checkState(currentPosition >= 0, "Not yet advanced"); + checkState(currentPosition >= 0, CalcMessages.EXCEPTION_NOT_YET_ADVANCED_1600C5A7); return currentPosition; } @@ -174,25 +175,25 @@ public boolean advance() { @Override public int compareTo(RowIdComparisonStrategy strategy, long rowId) { - checkState(currentPosition >= 0, "Not yet advanced"); + checkState(currentPosition >= 0, CalcMessages.EXCEPTION_NOT_YET_ADVANCED_1600C5A7); return strategy.compare(RESERVED_ROW_ID_FOR_CURSOR, rowId); } @Override public boolean equals(RowIdHashStrategy strategy, long rowId) { - checkState(currentPosition >= 0, "Not yet advanced"); + checkState(currentPosition >= 0, CalcMessages.EXCEPTION_NOT_YET_ADVANCED_1600C5A7); return strategy.equals(RESERVED_ROW_ID_FOR_CURSOR, rowId); } @Override public long hash(RowIdHashStrategy strategy) { - checkState(currentPosition >= 0, "Not yet advanced"); + checkState(currentPosition >= 0, CalcMessages.EXCEPTION_NOT_YET_ADVANCED_1600C5A7); return strategy.hashCode(RESERVED_ROW_ID_FOR_CURSOR); } @Override public long allocateRowId() { - checkState(currentPosition >= 0, "Not yet advanced"); + checkState(currentPosition >= 0, CalcMessages.EXCEPTION_NOT_YET_ADVANCED_1600C5A7); return tsBlockAccounting.referencePosition(currentPosition); } @@ -255,7 +256,9 @@ public TsBlock getTsBlock() { /** Dereferences the row ID from this TsBlock. */ public void dereference(long rowId) { int position = rowIdBuffer.getPosition(rowId); - checkArgument(rowId == rowIds[position], "rowId does not match this TsBlock"); + checkArgument( + rowId == rowIds[position], + CalcMessages.EXCEPTION_ROWID_DOES_NOT_MATCH_THIS_TSBLOCK_18F9EB4D); rowIds[position] = RowIdBuffer.UNKNOWN_ID; activePositions--; rowIdBuffer.deallocate(rowId); @@ -280,7 +283,9 @@ public void loadTsBlockLoadIfNeeded() { } public void compact() { - checkState(!lockedTsBlock, "Should not attempt compaction when TsBlock is locked"); + checkState( + !lockedTsBlock, + CalcMessages.EXCEPTION_SHOULD_NOT_ATTEMPT_COMPACTION_WHEN_TSBLOCK_IS_LOCKED_DF775E6B); if (activePositions == tsBlock.getPositionCount()) { return; diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/AbstractFillOperator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/AbstractFillOperator.java index e354c6e9e628a..fe56c91c643a5 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/AbstractFillOperator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/AbstractFillOperator.java @@ -22,6 +22,7 @@ import org.apache.iotdb.calc.execution.operator.CommonOperatorContext; import org.apache.iotdb.calc.execution.operator.Operator; import org.apache.iotdb.calc.execution.operator.process.fill.IFill; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.commons.queryengine.execution.MemoryEstimationHelper; import com.google.common.util.concurrent.ListenableFuture; @@ -44,11 +45,13 @@ public abstract class AbstractFillOperator implements ProcessOperator { protected AbstractFillOperator( CommonOperatorContext operatorContext, IFill[] fillArray, Operator child) { - this.operatorContext = requireNonNull(operatorContext, "operatorContext is null"); + this.operatorContext = + requireNonNull(operatorContext, CalcMessages.EXCEPTION_OPERATORCONTEXT_IS_NULL_D15B1EDB); checkArgument( - fillArray != null && fillArray.length > 0, "fillArray should not be null or empty"); + fillArray != null && fillArray.length > 0, + CalcMessages.EXCEPTION_FILLARRAY_SHOULD_NOT_BE_NULL_OR_EMPTY_118FB134); this.fillArray = fillArray; - this.child = requireNonNull(child, "child operator is null"); + this.child = requireNonNull(child, CalcMessages.EXCEPTION_CHILD_OPERATOR_IS_NULL_8860113C); this.outputColumnCount = fillArray.length; } @@ -71,7 +74,8 @@ public TsBlock next() throws Exception { checkArgument( outputColumnCount == block.getValueColumnCount(), - "outputColumnCount is not equal to value column count of child operator's TsBlock"); + CalcMessages + .EXCEPTION_OUTPUTCOLUMNCOUNT_IS_NOT_EQUAL_TO_VALUE_COLUMN_COUNT_OF_CHILD_OPERATOR_QUOTE_S_T_8E30BAD8); Column[] valueColumns = new Column[outputColumnCount]; diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/AbstractLinearFillOperator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/AbstractLinearFillOperator.java index 2e523d1bf4c4e..d25259b926ffb 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/AbstractLinearFillOperator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/AbstractLinearFillOperator.java @@ -22,6 +22,7 @@ import org.apache.iotdb.calc.execution.operator.CommonOperatorContext; import org.apache.iotdb.calc.execution.operator.Operator; import org.apache.iotdb.calc.execution.operator.process.fill.ILinearFill; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.commons.queryengine.execution.MemoryEstimationHelper; import com.google.common.util.concurrent.ListenableFuture; @@ -65,11 +66,13 @@ public abstract class AbstractLinearFillOperator implements ProcessOperator { protected AbstractLinearFillOperator( CommonOperatorContext operatorContext, ILinearFill[] fillArray, Operator child) { - this.operatorContext = requireNonNull(operatorContext, "operatorContext is null"); + this.operatorContext = + requireNonNull(operatorContext, CalcMessages.EXCEPTION_OPERATORCONTEXT_IS_NULL_D15B1EDB); checkArgument( - fillArray != null && fillArray.length > 0, "fillArray should not be null or empty"); + fillArray != null && fillArray.length > 0, + CalcMessages.EXCEPTION_FILLARRAY_SHOULD_NOT_BE_NULL_OR_EMPTY_118FB134); this.fillArray = fillArray; - this.child = requireNonNull(child, "child operator is null"); + this.child = requireNonNull(child, CalcMessages.EXCEPTION_CHILD_OPERATOR_IS_NULL_8860113C); this.outputColumnCount = fillArray.length; this.cachedTsBlock = new ArrayList<>(); this.cachedRowIndex = new ArrayList<>(); diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/AssignUniqueIdOperator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/AssignUniqueIdOperator.java index f7faaadc0a519..0fc91b955d87b 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/AssignUniqueIdOperator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/AssignUniqueIdOperator.java @@ -21,6 +21,7 @@ import org.apache.iotdb.calc.execution.operator.CommonOperatorContext; import org.apache.iotdb.calc.execution.operator.Operator; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.commons.queryengine.execution.MemoryEstimationHelper; import com.google.common.util.concurrent.ListenableFuture; @@ -127,7 +128,9 @@ private Column generateIdColumn(int positionCount) { requestValues(); } long rowId = rowIdCounter++; - verify((rowId & uniqueValueMask) == 0, "RowId and uniqueValue mask overlaps"); + verify( + (rowId & uniqueValueMask) == 0, + CalcMessages.EXCEPTION_ROWID_AND_UNIQUEVALUE_MASK_OVERLAPS_9A092E09); columnBuilder.writeLong(uniqueValueMask | rowId); } return columnBuilder.build(); @@ -136,6 +139,9 @@ private Column generateIdColumn(int positionCount) { private void requestValues() { rowIdCounter = rowIdPool.getAndAdd(ROW_IDS_PER_REQUEST); maxRowIdCounterValue = Math.min(rowIdCounter + ROW_IDS_PER_REQUEST, MAX_ROW_ID); - checkState(rowIdCounter < MAX_ROW_ID, "Unique row id exceeds a limit: %s", MAX_ROW_ID); + checkState( + rowIdCounter < MAX_ROW_ID, + CalcMessages.EXCEPTION_UNIQUE_ROW_ID_EXCEEDS_A_LIMIT_COLON_ARG_71EE4B7D, + MAX_ROW_ID); } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/LimitOperator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/LimitOperator.java index 9f21dcf86a66b..5a99df33b2758 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/LimitOperator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/LimitOperator.java @@ -21,6 +21,7 @@ import org.apache.iotdb.calc.execution.operator.CommonOperatorContext; import org.apache.iotdb.calc.execution.operator.Operator; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.commons.queryengine.execution.MemoryEstimationHelper; import com.google.common.util.concurrent.ListenableFuture; @@ -39,10 +40,11 @@ public class LimitOperator implements ProcessOperator { private final Operator child; public LimitOperator(CommonOperatorContext operatorContext, long limit, Operator child) { - this.operatorContext = requireNonNull(operatorContext, "operatorContext is null"); - checkArgument(limit >= 0, "limit must be at least zero"); + this.operatorContext = + requireNonNull(operatorContext, CalcMessages.EXCEPTION_OPERATORCONTEXT_IS_NULL_D15B1EDB); + checkArgument(limit >= 0, CalcMessages.EXCEPTION_LIMIT_MUST_BE_AT_LEAST_ZERO_E960530F); this.remainingLimit = limit; - this.child = requireNonNull(child, "child operator is null"); + this.child = requireNonNull(child, CalcMessages.EXCEPTION_CHILD_OPERATOR_IS_NULL_8860113C); } public LimitOperator(LimitOperator limitOperator, Operator child) { diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/OffsetOperator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/OffsetOperator.java index 376f3d9d2215a..2c8a87cade248 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/OffsetOperator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/OffsetOperator.java @@ -21,6 +21,7 @@ import org.apache.iotdb.calc.execution.operator.CommonOperatorContext; import org.apache.iotdb.calc.execution.operator.Operator; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.commons.queryengine.execution.MemoryEstimationHelper; import com.google.common.util.concurrent.ListenableFuture; @@ -39,10 +40,11 @@ public class OffsetOperator implements ProcessOperator { private final Operator child; public OffsetOperator(CommonOperatorContext operatorContext, long offset, Operator child) { - this.operatorContext = requireNonNull(operatorContext, "operatorContext is null"); - checkArgument(offset >= 0, "offset must be at least zero"); + this.operatorContext = + requireNonNull(operatorContext, CalcMessages.EXCEPTION_OPERATORCONTEXT_IS_NULL_D15B1EDB); + checkArgument(offset >= 0, CalcMessages.EXCEPTION_OFFSET_MUST_BE_AT_LEAST_ZERO_21BB6BB6); this.remainingOffset = offset; - this.child = requireNonNull(child, "child operator is null"); + this.child = requireNonNull(child, CalcMessages.EXCEPTION_CHILD_OPERATOR_IS_NULL_8860113C); } public OffsetOperator(OffsetOperator offsetOperator, Operator child) { diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/PreviousFillWithGroupOperator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/PreviousFillWithGroupOperator.java index 06f1d63547001..2810d6a182a52 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/PreviousFillWithGroupOperator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/PreviousFillWithGroupOperator.java @@ -22,6 +22,7 @@ import org.apache.iotdb.calc.execution.operator.CommonOperatorContext; import org.apache.iotdb.calc.execution.operator.Operator; import org.apache.iotdb.calc.execution.operator.process.fill.IFill; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.calc.utils.datastructure.SortKey; import org.apache.iotdb.commons.queryengine.execution.MemoryEstimationHelper; @@ -65,15 +66,18 @@ public PreviousFillWithGroupOperator( int helperColumnIndex, Comparator groupKeyComparator, List dataTypes) { - this.operatorContext = requireNonNull(operatorContext, "operatorContext is null"); + this.operatorContext = + requireNonNull(operatorContext, CalcMessages.EXCEPTION_OPERATORCONTEXT_IS_NULL_D15B1EDB); checkArgument( - fillArray != null && fillArray.length > 0, "fillArray should not be null or empty"); + fillArray != null && fillArray.length > 0, + CalcMessages.EXCEPTION_FILLARRAY_SHOULD_NOT_BE_NULL_OR_EMPTY_118FB134); this.fillArray = fillArray; - this.child = requireNonNull(child, "child operator is null"); + this.child = requireNonNull(child, CalcMessages.EXCEPTION_CHILD_OPERATOR_IS_NULL_8860113C); this.outputColumnCount = fillArray.length; checkArgument( helperColumnIndex >= 0, - "helperColumnIndex for PreviousFillWithGroupOperator should never be negative"); + CalcMessages + .EXCEPTION_HELPERCOLUMNINDEX_FOR_PREVIOUSFILLWITHGROUPOPERATOR_SHOULD_NEVER_BE_NEGATIVE_ABA9C2B1); this.helperColumnIndex = helperColumnIndex; this.groupKeyComparator = groupKeyComparator; this.resultBuilder = new TsBlockBuilder(dataTypes); @@ -88,7 +92,8 @@ public TsBlock next() throws Exception { checkArgument( outputColumnCount == block.getValueColumnCount(), - "outputColumnCount is not equal to value column count of child operator's TsBlock"); + CalcMessages + .EXCEPTION_OUTPUTCOLUMNCOUNT_IS_NOT_EQUAL_TO_VALUE_COLUMN_COUNT_OF_CHILD_OPERATOR_QUOTE_S_T_8E30BAD8); // current TsBlock's first row is not same group as the last row of previous TsBlock // we need to call reset the fill diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/TableNextFillOperator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/TableNextFillOperator.java index 1630336b26765..3bcc67ade8155 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/TableNextFillOperator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/TableNextFillOperator.java @@ -22,6 +22,7 @@ import org.apache.iotdb.calc.execution.operator.CommonOperatorContext; import org.apache.iotdb.calc.execution.operator.Operator; import org.apache.iotdb.calc.execution.operator.process.fill.ILinearFill; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.tsfile.block.column.Column; import org.apache.tsfile.read.common.block.TsBlock; @@ -44,7 +45,7 @@ public TableNextFillOperator( super(operatorContext, fillArray, child); checkArgument( !hasTimeBound || helperColumnIndex != -1, - "helperColumnIndex should be resolved when timeBound exists"); + CalcMessages.EXCEPTION_HELPERCOLUMNINDEX_SHOULD_BE_RESOLVED_WHEN_TIMEBOUND_EXISTS_01BE233B); this.helperColumnIndex = helperColumnIndex; this.hasTimeBound = hasTimeBound; } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/ValuesOperator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/ValuesOperator.java index 35ca8a4252f66..b1a3e46d4b6da 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/ValuesOperator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/ValuesOperator.java @@ -21,6 +21,7 @@ import org.apache.iotdb.calc.execution.operator.CommonOperatorContext; import org.apache.iotdb.calc.execution.operator.Operator; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.commons.queryengine.execution.MemoryEstimationHelper; import com.google.common.collect.ImmutableList; @@ -43,8 +44,9 @@ public class ValuesOperator implements Operator { private long currentRetainedSize; public ValuesOperator(CommonOperatorContext operatorContext, List tsBlocks) { - this.operatorContext = requireNonNull(operatorContext, "operatorContext is null"); - requireNonNull(tsBlocks, "tsBlocks is null"); + this.operatorContext = + requireNonNull(operatorContext, CalcMessages.EXCEPTION_OPERATORCONTEXT_IS_NULL_D15B1EDB); + requireNonNull(tsBlocks, CalcMessages.EXCEPTION_TSBLOCKS_IS_NULL_02287FD8); this.tsBlocks = ImmutableList.copyOf(tsBlocks).iterator(); diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/fill/identity/IdentityLinearFill.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/fill/identity/IdentityLinearFill.java index d6650f273ea03..8df44c219ea73 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/fill/identity/IdentityLinearFill.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/fill/identity/IdentityLinearFill.java @@ -20,6 +20,7 @@ package org.apache.iotdb.calc.execution.operator.process.fill.identity; import org.apache.iotdb.calc.execution.operator.process.fill.ILinearFill; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.tsfile.block.column.Column; @@ -40,7 +41,8 @@ public boolean needPrepareForNext( public boolean prepareForNext( long startRowIndex, long endRowIndex, Column nextTimeColumn, Column nextValueColumn) { throw new UnsupportedOperationException( - "IdentityLinearFill's needPrepareForNext() method should always return false."); + CalcMessages + .EXCEPTION_IDENTITYLINEARFILL_S_NEEDPREPAREFORNEXT_METHOD_SHOULD_ALWAYS_RETURN_FALSE_FF7AD73B); } @Override diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/fill/linear/LinearFill.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/fill/linear/LinearFill.java index 2231b4f029b0c..ea1071361b65c 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/fill/linear/LinearFill.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/fill/linear/LinearFill.java @@ -20,6 +20,7 @@ package org.apache.iotdb.calc.execution.operator.process.fill.linear; import org.apache.iotdb.calc.execution.operator.process.fill.ILinearFill; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.tsfile.block.column.Column; import org.apache.tsfile.read.common.block.column.RunLengthEncodedColumn; @@ -183,7 +184,8 @@ public boolean prepareForNext( long startRowIndex, long endRowIndex, Column nextTimeColumn, Column nextValueColumn) { checkArgument( nextTimeColumn.getPositionCount() > 0 && endRowIndex < startRowIndex, - "nextColumn's time should be greater than current time"); + CalcMessages + .EXCEPTION_NEXTCOLUMN_QUOTE_S_TIME_SHOULD_BE_GREATER_THAN_CURRENT_TIME_334CB115); if (endRowIndex <= nextRowIndex) { return true; } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/function/PartitionRecognizer.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/function/PartitionRecognizer.java index deb225f219853..f8045d55bec31 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/function/PartitionRecognizer.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/function/PartitionRecognizer.java @@ -21,6 +21,7 @@ import org.apache.iotdb.calc.execution.operator.process.function.partition.PartitionState; import org.apache.iotdb.calc.execution.operator.process.function.partition.Slice; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.calc.utils.datastructure.SortKey; import org.apache.iotdb.commons.udf.utils.UDFDataTypeTransformer; import org.apache.iotdb.udf.api.type.Type; @@ -74,7 +75,7 @@ public PartitionRecognizer( public void addTsBlock(TsBlock tsBlock) { if (noMoreData) { throw new IllegalArgumentException( - "The partition handler is finished, cannot add more data."); + CalcMessages.EXCEPTION_PARTITION_HANDLER_FINISHED_CANNOT_ADD_MORE_DATA_D8E31A3E); } currentTsBlock = tsBlock; } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/gapfill/AbstractGapFillOperator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/gapfill/AbstractGapFillOperator.java index 52fb6b59bace7..172fd371faa0e 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/gapfill/AbstractGapFillOperator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/gapfill/AbstractGapFillOperator.java @@ -22,6 +22,7 @@ import org.apache.iotdb.calc.execution.operator.CommonOperatorContext; import org.apache.iotdb.calc.execution.operator.Operator; import org.apache.iotdb.calc.execution.operator.process.ProcessOperator; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.calc.plan.planner.CommonOperatorUtils; import org.apache.iotdb.calc.utils.datastructure.SortKey; import org.apache.iotdb.commons.queryengine.execution.MemoryEstimationHelper; @@ -99,7 +100,8 @@ public TsBlock next() throws Exception { } checkArgument( outputColumnCount == block.getValueColumnCount(), - "outputColumnCount is not equal to value column count of child operator's TsBlock"); + CalcMessages + .EXCEPTION_OUTPUTCOLUMNCOUNT_IS_NOT_EQUAL_TO_VALUE_COLUMN_COUNT_OF_CHILD_OPERATOR_QUOTE_S_T_8E30BAD8); resultBuilder.reset(); SortKey previousGroupKey = lastGroupKey; diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/rowpattern/LogicalIndexNavigation.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/rowpattern/LogicalIndexNavigation.java index fbf7e709e1f92..ae2fd42439b14 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/rowpattern/LogicalIndexNavigation.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/rowpattern/LogicalIndexNavigation.java @@ -20,6 +20,7 @@ package org.apache.iotdb.calc.execution.operator.process.rowpattern; import org.apache.iotdb.calc.execution.operator.process.rowpattern.matcher.ArrayView; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.commons.queryengine.plan.relational.planner.rowpattern.IrLabel; import org.apache.iotdb.commons.queryengine.plan.relational.planner.rowpattern.LogicalIndexPointer; @@ -50,10 +51,14 @@ public class LogicalIndexNavigation { public LogicalIndexNavigation( Set labels, boolean last, boolean running, int logicalOffset, int physicalOffset) { - this.labels = requireNonNull(labels, "labels is null"); + this.labels = requireNonNull(labels, CalcMessages.EXCEPTION_LABELS_IS_NULL_F4FBBECE); this.last = last; this.running = running; - checkArgument(logicalOffset >= 0, "logical offset must be >= 0, actual: %s", logicalOffset); + checkArgument( + logicalOffset >= 0, + CalcMessages + .EXCEPTION_LOGICAL_OFFSET_MUST_BE_GREATER_THAN_EQUALS_0_COMMA_ACTUAL_COLON_ARG_539807BF, + logicalOffset); this.logicalOffset = logicalOffset; this.physicalOffset = physicalOffset; } @@ -95,7 +100,7 @@ public int resolvePosition( int currentRow, ArrayView matchedLabels, int searchStart, int searchEnd, int patternStart) { checkArgument( currentRow >= patternStart && currentRow < patternStart + matchedLabels.length(), - "current row is out of bounds of the match"); + CalcMessages.EXCEPTION_CURRENT_ROW_IS_OUT_OF_BOUNDS_OF_THE_MATCH_D8D8B611); // used to handle `logical offset` int relativePosition; diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/rowpattern/PatternAggregationTracker.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/rowpattern/PatternAggregationTracker.java index 7678e38f22a41..64280ba60d3b5 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/rowpattern/PatternAggregationTracker.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/rowpattern/PatternAggregationTracker.java @@ -21,6 +21,7 @@ import org.apache.iotdb.calc.execution.operator.process.rowpattern.matcher.ArrayView; import org.apache.iotdb.calc.execution.operator.process.rowpattern.matcher.IntList; +import org.apache.iotdb.calc.i18n.CalcMessages; import java.util.Set; @@ -66,7 +67,7 @@ public class PatternAggregationTracker { private final IntList allPositions; public PatternAggregationTracker(Set labels, boolean running) { - this.labels = requireNonNull(labels, "labels is null"); + this.labels = requireNonNull(labels, CalcMessages.EXCEPTION_LABELS_IS_NULL_F4FBBECE); this.running = running; this.allPositions = new IntList(DEFAULT_CAPACITY); } @@ -102,10 +103,10 @@ public ArrayView resolveNewPositions( int currentRow, ArrayView matchedLabels, int partitionStart, int patternStart) { checkArgument( currentRow >= patternStart && currentRow < patternStart + matchedLabels.length(), - "current row is out of bounds of the match"); + CalcMessages.EXCEPTION_CURRENT_ROW_IS_OUT_OF_BOUNDS_OF_THE_MATCH_D8D8B611); checkState( aggregated <= evaluated && evaluated <= matchedLabels.length(), - "PatternAggregationTracker in inconsistent state"); + CalcMessages.EXCEPTION_PATTERNAGGREGATIONTRACKER_IN_INCONSISTENT_STATE_C6FF5294); IntList positions = new IntList(DEFAULT_CAPACITY); int last = running ? currentRow - patternStart : matchedLabels.length() - 1; @@ -129,7 +130,9 @@ public ArrayView resolveNewPositions( // for ThreadEquivalence // return all positions to aggregate in `labels` starting from 0 public ArrayView getAllPositions(ArrayView labels) { - checkState(evaluated <= labels.length(), "SetEvaluator in inconsistent state"); + checkState( + evaluated <= labels.length(), + CalcMessages.EXCEPTION_SETEVALUATOR_IN_INCONSISTENT_STATE_D5FAA900); for (int position = evaluated; position < labels.length(); position++) { if (appliesToLabel(labels.get(position))) { diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/rowpattern/PatternAggregator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/rowpattern/PatternAggregator.java index d8ac5f5052138..06032ba2ee55f 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/rowpattern/PatternAggregator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/rowpattern/PatternAggregator.java @@ -23,6 +23,7 @@ import org.apache.iotdb.calc.execution.operator.process.window.partition.Partition; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.AggregationMask; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.TableAccumulator; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.commons.exception.SemanticException; import org.apache.iotdb.commons.queryengine.plan.relational.function.BoundSignature; @@ -74,11 +75,15 @@ public PatternAggregator( TableAccumulator accumulator, List argumentChannels, PatternAggregationTracker patternAggregationTracker) { - this.boundSignature = requireNonNull(boundSignature, "boundSignature is null"); - this.accumulator = requireNonNull(accumulator, "accumulato is null"); + this.boundSignature = + requireNonNull(boundSignature, CalcMessages.EXCEPTION_BOUNDSIGNATURE_IS_NULL_D1077180); + this.accumulator = + requireNonNull(accumulator, CalcMessages.EXCEPTION_ACCUMULATO_IS_NULL_D51F532F); this.argumentChannels = argumentChannels; this.patternAggregationTracker = - requireNonNull(patternAggregationTracker, "patternAggregationTracker is null"); + requireNonNull( + patternAggregationTracker, + CalcMessages.EXCEPTION_PATTERNAGGREGATIONTRACKER_IS_NULL_82EC5B1C); accumulator.reset(); } @@ -169,7 +174,8 @@ public PatternAggregator copy() { } catch (UnsupportedOperationException e) { throw new SemanticException( String.format( - "aggregate function %s does not support copying", boundSignature.getName())); + CalcMessages.EXCEPTION_AGGREGATE_FUNCTION_ARG_DOES_NOT_SUPPORT_COPYING_3E03976C, + boundSignature.getName())); } return new PatternAggregator( diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/rowpattern/PatternAggregators.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/rowpattern/PatternAggregators.java index 7d0667760f9ea..b0ed21701bee3 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/rowpattern/PatternAggregators.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/rowpattern/PatternAggregators.java @@ -19,6 +19,8 @@ package org.apache.iotdb.calc.execution.operator.process.rowpattern; +import org.apache.iotdb.calc.i18n.CalcMessages; + import java.util.Arrays; import java.util.List; @@ -55,7 +57,9 @@ public void release(int key) { public void copy(int parent, int child) { ensureCapacity(child); - checkState(values[child] == null, "overriding aggregations for child thread"); + checkState( + values[child] == null, + CalcMessages.EXCEPTION_OVERRIDING_AGGREGATIONS_FOR_CHILD_THREAD_9C84E47D); if (values[parent] != null) { PatternAggregator[] aggregations = new PatternAggregator[patternAggregators.size()]; diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/rowpattern/PatternPartitionExecutor.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/rowpattern/PatternPartitionExecutor.java index d50451c2f53a2..82637f82125ef 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/rowpattern/PatternPartitionExecutor.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/rowpattern/PatternPartitionExecutor.java @@ -388,7 +388,7 @@ private void skipAfterMatch( case FIRST: checkState( skipToNavigation.isPresent(), - "skip to navigation is missing for SKIP TO %s", + CalcMessages.EXCEPTION_SKIP_TO_NAVIGATION_IS_MISSING_FOR_SKIP_TO_ARG_8A303D73, skipToPosition.name()); int position = skipToNavigation @@ -401,11 +401,12 @@ private void skipAfterMatch( patternStart); if (position == -1) { throw new SemanticException( - "AFTER MATCH SKIP TO failed: pattern variable is not present in match"); + CalcMessages + .EXCEPTION_AFTER_MATCH_SKIP_FAILED_PATTERN_VARIABLE_NOT_PRESENT_MATCH_2891B276); } if (position == patternStart) { throw new SemanticException( - "AFTER MATCH SKIP TO failed: cannot skip to first row of match"); + CalcMessages.EXCEPTION_AFTER_MATCH_SKIP_FAILED_CANNOT_SKIP_FIRST_ROW_MATCH_71D4093B); } lastSkippedPosition = position - 1; break; diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/rowpattern/PatternVariableRecognizer.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/rowpattern/PatternVariableRecognizer.java index e9a40006ce272..c116aa4f9ebbb 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/rowpattern/PatternVariableRecognizer.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/rowpattern/PatternVariableRecognizer.java @@ -23,6 +23,7 @@ import org.apache.iotdb.calc.execution.operator.process.rowpattern.expression.PatternExpressionComputation; import org.apache.iotdb.calc.execution.operator.process.rowpattern.matcher.ArrayView; import org.apache.iotdb.calc.execution.operator.process.window.partition.Partition; +import org.apache.iotdb.calc.i18n.CalcMessages; import java.util.List; @@ -65,8 +66,9 @@ public PatternVariableRecognizer( this.searchStart = searchStart; this.searchEnd = searchEnd; this.patternVariableComputations = - requireNonNull(patternVariableComputations, "evaluations is null"); - this.partition = requireNonNull(partition, "partition is null"); + requireNonNull( + patternVariableComputations, CalcMessages.EXCEPTION_EVALUATIONS_IS_NULL_F3F72380); + this.partition = requireNonNull(partition, CalcMessages.EXCEPTION_PARTITION_IS_NULL_27FD9756); } public int getInputLength() { @@ -112,7 +114,8 @@ public PatternVariableComputation( List patternAggregators, List labelNames) { super(valueAccessors, computation, patternAggregators); - this.labelNames = requireNonNull(labelNames, "labelNames is null"); + this.labelNames = + requireNonNull(labelNames, CalcMessages.EXCEPTION_LABELNAMES_IS_NULL_EEFDB807); } /** diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/rowpattern/PhysicalValuePointer.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/rowpattern/PhysicalValuePointer.java index d10039d49a3f1..1b248dd2cd620 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/rowpattern/PhysicalValuePointer.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/rowpattern/PhysicalValuePointer.java @@ -19,6 +19,8 @@ package org.apache.iotdb.calc.execution.operator.process.rowpattern; +import org.apache.iotdb.calc.i18n.CalcMessages; + import org.apache.tsfile.read.common.type.Type; import static java.util.Objects.requireNonNull; @@ -34,9 +36,10 @@ public class PhysicalValuePointer implements PhysicalValueAccessor { public PhysicalValuePointer( int sourceChannel, Type type, LogicalIndexNavigation logicalIndexNavigation) { this.sourceChannel = sourceChannel; - this.type = requireNonNull(type, "type is null"); + this.type = requireNonNull(type, CalcMessages.EXCEPTION_TYPE_IS_NULL_16A3D3EB); this.logicalIndexNavigation = - requireNonNull(logicalIndexNavigation, "logicalIndexNavigation is null"); + requireNonNull( + logicalIndexNavigation, CalcMessages.EXCEPTION_LOGICALINDEXNAVIGATION_IS_NULL_3B31CD23); } public int getSourceChannel() { diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/rowpattern/expression/CastComputation.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/rowpattern/expression/CastComputation.java index a5cff7572d769..e7a4f1e6f6887 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/rowpattern/expression/CastComputation.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/rowpattern/expression/CastComputation.java @@ -77,7 +77,7 @@ public Object evaluate(List values) { } } else { throw new UnsupportedOperationException( - "Target type is not a GenericDataType: " + targetType); + CalcMessages.EXCEPTION_TARGET_TYPE_NOT_GENERICDATATYPE_CB87EF37 + targetType); } } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/rowpattern/expression/ComparisonOperator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/rowpattern/expression/ComparisonOperator.java index 4a92a1bebce62..0837277540fcc 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/rowpattern/expression/ComparisonOperator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/rowpattern/expression/ComparisonOperator.java @@ -100,7 +100,10 @@ private static int compare(Object left, Object right) { if (normLeft.type != normRight.type) { throw new SemanticException( - "Cannot compare values of different types: " + normLeft.type + " vs. " + normRight.type); + CalcMessages.EXCEPTION_CANNOT_COMPARE_VALUES_DIFFERENT_TYPES_A95EDA7F + + normLeft.type + + CalcMessages.EXCEPTION_VS_AEDAB253 + + normRight.type); } return normLeft.compareTo(normRight); diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/rowpattern/expression/Computation.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/rowpattern/expression/Computation.java index d04af8045b1fe..59de959cd7cdf 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/rowpattern/expression/Computation.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/rowpattern/expression/Computation.java @@ -165,7 +165,8 @@ private static Computation parse( return new CastComputation(inner, targetType); } else { throw new SemanticException( - "Unsupported expression type: " + expression.getClass().getName()); + CalcMessages.EXCEPTION_UNSUPPORTED_EXPRESSION_TYPE_5C50C92E + + expression.getClass().getName()); } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/rowpattern/matcher/ArrayView.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/rowpattern/matcher/ArrayView.java index 718f1aafe48a4..5615ef140c19f 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/rowpattern/matcher/ArrayView.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/rowpattern/matcher/ArrayView.java @@ -19,6 +19,8 @@ package org.apache.iotdb.calc.execution.operator.process.rowpattern.matcher; +import org.apache.iotdb.calc.i18n.CalcMessages; + import com.google.common.annotations.VisibleForTesting; import java.util.Arrays; @@ -33,14 +35,17 @@ public class ArrayView { private final int length; public ArrayView(int[] array, int length) { - this.array = requireNonNull(array, "array is null"); - checkArgument(length >= 0, "used slots count is negative"); - checkArgument(length <= array.length, "used slots count exceeds array size"); + this.array = requireNonNull(array, CalcMessages.EXCEPTION_ARRAY_IS_NULL_BCF2EEB1); + checkArgument(length >= 0, CalcMessages.EXCEPTION_USED_SLOTS_COUNT_IS_NEGATIVE_49F017C5); + checkArgument( + length <= array.length, + CalcMessages.EXCEPTION_USED_SLOTS_COUNT_EXCEEDS_ARRAY_SIZE_6DCD8C7E); this.length = length; } public int get(int index) { - checkArgument(index >= 0 && index < length, "array index out of bounds"); + checkArgument( + index >= 0 && index < length, CalcMessages.EXCEPTION_ARRAY_INDEX_OUT_OF_BOUNDS_35C8A83F); return array[index]; } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/rowpattern/matcher/IrRowPatternToProgramRewriter.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/rowpattern/matcher/IrRowPatternToProgramRewriter.java index d6aab623f005b..f6073d1d373ef 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/rowpattern/matcher/IrRowPatternToProgramRewriter.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/rowpattern/matcher/IrRowPatternToProgramRewriter.java @@ -58,8 +58,10 @@ private static class Rewriter extends IrRowPatternVisitor { private final Map labelMapping; public Rewriter(List instructions, Map labelMapping) { - this.instructions = requireNonNull(instructions, "instructions is null"); - this.labelMapping = requireNonNull(labelMapping, "labelMapping is null"); + this.instructions = + requireNonNull(instructions, CalcMessages.EXCEPTION_INSTRUCTIONS_IS_NULL_A9CDA591); + this.labelMapping = + requireNonNull(labelMapping, CalcMessages.EXCEPTION_LABELMAPPING_IS_NULL_535461C7); } @Override @@ -135,7 +137,8 @@ protected Void visitIrConcatenation(IrConcatenation node, Void context) { protected Void visitIrPermutation(IrPermutation node, Void context) { checkArgument( node.getPatterns().size() > 1, - "invalid pattern: permutation with single element. run IrRowPatternFlattener first"); + CalcMessages + .EXCEPTION_INVALID_PATTERN_COLON_PERMUTATION_WITH_SINGLE_ELEMENT_DOT_RUN_IRROWPATTERNFLATTE_3FF56E02); List indexes = IntStream.range(0, node.getPatterns().size()).boxed().collect(toImmutableList()); @@ -192,7 +195,7 @@ protected Void visitIrQuantified(IrQuantified node, Void context) { } private void loopingQuantified(IrRowPattern pattern, boolean greedy, int min) { - checkArgument(min >= 0, "invalid min value: %s", min); + checkArgument(min >= 0, CalcMessages.EXCEPTION_INVALID_MIN_VALUE_COLON_ARG_8D899A2E, min); if (min == 0) { int startSplitPosition = instructions.size(); @@ -231,7 +234,11 @@ private void loop(int loopingPosition, boolean greedy) { } private void rangeQuantified(IrRowPattern pattern, boolean greedy, int min, int max) { - checkArgument(min <= max, "invalid range: (%s, %s)", min, max); + checkArgument( + min <= max, + CalcMessages.EXCEPTION_INVALID_RANGE_COLON_LEFT_PAREN_ARG_COMMA_ARG_RIGHT_PAREN_EF9544AA, + min, + max); for (int i = 0; i < min; i++) { process(pattern); diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/rowpattern/matcher/MatchResult.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/rowpattern/matcher/MatchResult.java index 0e3511c0a526f..dcce2860b239a 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/rowpattern/matcher/MatchResult.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/rowpattern/matcher/MatchResult.java @@ -19,6 +19,8 @@ package org.apache.iotdb.calc.execution.operator.process.rowpattern.matcher; +import org.apache.iotdb.calc.i18n.CalcMessages; + import static java.util.Objects.requireNonNull; public class MatchResult { @@ -31,8 +33,9 @@ public class MatchResult { public MatchResult(boolean matched, ArrayView labels, ArrayView exclusions) { this.matched = matched; - this.labels = requireNonNull(labels, "labels is null"); - this.exclusions = requireNonNull(exclusions, "exclusions is null"); + this.labels = requireNonNull(labels, CalcMessages.EXCEPTION_LABELS_IS_NULL_F4FBBECE); + this.exclusions = + requireNonNull(exclusions, CalcMessages.EXCEPTION_EXCLUSIONS_IS_NULL_336ED5E7); } public boolean isMatched() { diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/window/function/WindowFunctionFactory.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/window/function/WindowFunctionFactory.java index 5a88fbf786d18..28e28c2b62d36 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/window/function/WindowFunctionFactory.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/window/function/WindowFunctionFactory.java @@ -30,6 +30,7 @@ import org.apache.iotdb.calc.execution.operator.process.window.function.value.LastValueFunction; import org.apache.iotdb.calc.execution.operator.process.window.function.value.LeadFunction; import org.apache.iotdb.calc.execution.operator.process.window.function.value.NthValueFunction; +import org.apache.iotdb.calc.i18n.CalcMessages; import java.util.List; @@ -61,7 +62,7 @@ public static WindowFunction createBuiltinWindowFunction( return new NTileFunction(argumentChannels.get(0)); default: throw new UnsupportedOperationException( - "Unsupported built-in window function name: " + functionName); + CalcMessages.EXCEPTION_UNSUPPORTED_BUILT_WINDOW_FUNCTION_NAME_F994ED27 + functionName); } } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/window/function/aggregate/WindowAggregator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/window/function/aggregate/WindowAggregator.java index 874d365d61a7a..aecdbbae8763b 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/window/function/aggregate/WindowAggregator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/window/function/aggregate/WindowAggregator.java @@ -22,6 +22,7 @@ import org.apache.iotdb.calc.execution.operator.process.window.partition.Partition; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.AggregationMask; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.TableAccumulator; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.calc.plan.planner.CommonOperatorUtils; import com.google.common.primitives.Ints; @@ -42,9 +43,13 @@ public class WindowAggregator { public WindowAggregator( TableAccumulator accumulator, TSDataType outputType, List inputChannels) { - this.accumulator = requireNonNull(accumulator, "accumulator is null"); - this.outputType = requireNonNull(outputType, "intermediateType is null"); - this.inputChannels = Ints.toArray(requireNonNull(inputChannels, "inputChannels is null")); + this.accumulator = + requireNonNull(accumulator, CalcMessages.EXCEPTION_ACCUMULATOR_IS_NULL_EF0C1DFF); + this.outputType = + requireNonNull(outputType, CalcMessages.EXCEPTION_INTERMEDIATETYPE_IS_NULL_D0D9B957); + this.inputChannels = + Ints.toArray( + requireNonNull(inputChannels, CalcMessages.EXCEPTION_INPUTCHANNELS_IS_NULL_647DA393)); } public TSDataType getType() { diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/window/function/value/LagFunction.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/window/function/value/LagFunction.java index 9ac4708c33c3e..b8711824f9133 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/window/function/value/LagFunction.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/window/function/value/LagFunction.java @@ -20,6 +20,7 @@ package org.apache.iotdb.calc.execution.operator.process.window.function.value; import org.apache.iotdb.calc.execution.operator.process.window.partition.Partition; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.tsfile.block.column.ColumnBuilder; import org.apache.tsfile.enums.TSDataType; @@ -110,7 +111,7 @@ private void writeDefaultValue( return; default: throw new UnSupportedDataTypeException( - "Unsupported default value's data type in Lag: " + dataType); + CalcMessages.EXCEPTION_UNSUPPORTED_DEFAULT_VALUE_S_DATA_TYPE_LAG_BEB00511 + dataType); } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/window/function/value/LeadFunction.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/window/function/value/LeadFunction.java index 37b71595f0f65..1e9e1831c6aa3 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/window/function/value/LeadFunction.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/process/window/function/value/LeadFunction.java @@ -20,6 +20,7 @@ package org.apache.iotdb.calc.execution.operator.process.window.function.value; import org.apache.iotdb.calc.execution.operator.process.window.partition.Partition; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.tsfile.block.column.ColumnBuilder; import org.apache.tsfile.enums.TSDataType; @@ -111,7 +112,7 @@ private void writeDefaultValue( return; default: throw new UnSupportedDataTypeException( - "Unsupported default value's data type in Lag: " + dataType); + CalcMessages.EXCEPTION_UNSUPPORTED_DEFAULT_VALUE_S_DATA_TYPE_LAG_BEB00511 + dataType); } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/MarkDistinctOperator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/MarkDistinctOperator.java index c37015ee1f5f4..ee81140a65ee0 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/MarkDistinctOperator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/MarkDistinctOperator.java @@ -22,6 +22,7 @@ import org.apache.iotdb.calc.execution.operator.CommonOperatorContext; import org.apache.iotdb.calc.execution.operator.Operator; import org.apache.iotdb.calc.execution.operator.process.ProcessOperator; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.calc.plan.planner.memory.MemoryReservationManager; import org.apache.iotdb.commons.queryengine.execution.MemoryEstimationHelper; import org.apache.iotdb.commons.queryengine.execution.operator.source.relational.aggregation.grouped.UpdateMemory; @@ -66,11 +67,13 @@ public MarkDistinctOperator( List types, List markDistinctChannels, Optional hashChannel) { - this.operatorContext = requireNonNull(operatorContext, "operatorContext is null"); + this.operatorContext = + requireNonNull(operatorContext, CalcMessages.EXCEPTION_OPERATORCONTEXT_IS_NULL_D15B1EDB); this.child = child; - requireNonNull(hashChannel, "hashChannel is null"); - requireNonNull(markDistinctChannels, "markDistinctChannels is null"); + requireNonNull(hashChannel, CalcMessages.EXCEPTION_HASHCHANNEL_IS_NULL_A5E70672); + requireNonNull( + markDistinctChannels, CalcMessages.EXCEPTION_MARKDISTINCTCHANNELS_IS_NULL_7130C56A); ImmutableList.Builder distinctTypes = ImmutableList.builder(); for (int channel : markDistinctChannels) { diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/AbstractApproxMostFrequentAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/AbstractApproxMostFrequentAccumulator.java index d595e5ef711a3..c5dcb58371294 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/AbstractApproxMostFrequentAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/AbstractApproxMostFrequentAccumulator.java @@ -20,6 +20,7 @@ package org.apache.iotdb.calc.execution.operator.source.relational.aggregation; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.approximate.SpaceSavingStateFactory; +import org.apache.iotdb.calc.i18n.CalcMessages; import com.google.gson.Gson; import org.apache.tsfile.block.column.ColumnBuilder; @@ -52,7 +53,7 @@ public boolean hasFinalResult() { @Override public void addStatistics(Statistics[] statistics) { throw new UnsupportedOperationException( - "ApproxMostFrequentAccumulator does not support statistics"); + CalcMessages.EXCEPTION_APPROXMOSTFREQUENTACCUMULATOR_DOES_NOT_SUPPORT_STATISTICS_DB1E218B); } @Override diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/AbstractApproxPercentileAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/AbstractApproxPercentileAccumulator.java index 861c27e856f9e..73cf3e66badc4 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/AbstractApproxPercentileAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/AbstractApproxPercentileAccumulator.java @@ -20,6 +20,7 @@ package org.apache.iotdb.calc.execution.operator.source.relational.aggregation; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.approximate.TDigest; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.commons.exception.SemanticException; import org.apache.tsfile.block.column.Column; @@ -64,7 +65,8 @@ public void addInput(Column[] arguments, AggregationMask mask) { } else { throw new SemanticException( String.format( - "APPROX_PERCENTILE requires 2 or 3 arguments, but got %d", arguments.length)); + CalcMessages.EXCEPTION_APPROX_PERCENTILE_REQUIRES_2_3_ARGUMENTS_BUT_GOT_ARG_D78590AA, + arguments.length)); } switch (seriesDataType) { case INT32: @@ -83,7 +85,9 @@ public void addInput(Column[] arguments, AggregationMask mask) { default: throw new UnSupportedDataTypeException( String.format( - "Unsupported data type in APPROX_PERCENTILE Aggregation: %s", seriesDataType)); + CalcMessages + .EXCEPTION_UNSUPPORTED_DATA_TYPE_APPROX_PERCENTILE_AGGREGATION_ARG_CFEC0431, + seriesDataType)); } } @@ -135,7 +139,9 @@ public void evaluateFinal(ColumnBuilder columnBuilder) { default: throw new UnSupportedDataTypeException( String.format( - "Unsupported data type in APPROX_PERCENTILE Aggregation: %s", seriesDataType)); + CalcMessages + .EXCEPTION_UNSUPPORTED_DATA_TYPE_APPROX_PERCENTILE_AGGREGATION_ARG_CFEC0431, + seriesDataType)); } } @@ -147,7 +153,7 @@ public boolean hasFinalResult() { @Override public void addStatistics(Statistics[] statistics) { throw new UnsupportedOperationException( - "ApproxPercentileAccumulator does not support statistics"); + CalcMessages.EXCEPTION_APPROXPERCENTILEACCUMULATOR_DOES_NOT_SUPPORT_STATISTICS_2BB01365); } @Override @@ -167,7 +173,8 @@ public static double toDoubleExact(long value) { double doubleValue = (double) value; if ((long) doubleValue != value) { throw new SemanticException( - String.format("no exact double representation for long: %s", value)); + String.format( + CalcMessages.EXCEPTION_NO_EXACT_DOUBLE_REPRESENTATION_LONG_ARG_3E5B7550, value)); } return value; } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/AccumulatorFactory.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/AccumulatorFactory.java index f4c0d98ce65dc..bba13a2c490dd 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/AccumulatorFactory.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/AccumulatorFactory.java @@ -446,7 +446,10 @@ public static GroupedAccumulator getGroupedApproxMostFrequentAccumulator(TSDataT case OBJECT: default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in APPROX_COUNT_DISTINCT Aggregation: %s", type)); + String.format( + CalcMessages + .EXCEPTION_UNSUPPORTED_DATA_TYPE_APPROX_COUNT_DISTINCT_AGGREGATION_ARG_58F0391E, + type)); } } @@ -472,7 +475,10 @@ public static TableAccumulator getApproxMostFrequentAccumulator(TSDataType type) case OBJECT: default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in APPROX_COUNT_DISTINCT Aggregation: %s", type)); + String.format( + CalcMessages + .EXCEPTION_UNSUPPORTED_DATA_TYPE_APPROX_COUNT_DISTINCT_AGGREGATION_ARG_58F0391E, + type)); } } @@ -496,10 +502,14 @@ public static TableAccumulator createBuiltinMultiInputAccumulator( TAggregationType aggregationType, List inputDataTypes) { switch (aggregationType) { case MAX_BY: - checkState(inputDataTypes.size() == 2, "Wrong inputDataTypes size."); + checkState( + inputDataTypes.size() == 2, + CalcMessages.EXCEPTION_WRONG_INPUTDATATYPES_SIZE_DOT_675FF289); // return new MaxByAccumulator(inputDataTypes.get(0), inputDataTypes.get(1)); case MIN_BY: - checkState(inputDataTypes.size() == 2, "Wrong inputDataTypes size."); + checkState( + inputDataTypes.size() == 2, + CalcMessages.EXCEPTION_WRONG_INPUTDATATYPES_SIZE_DOT_675FF289); // return new MinByAccumulator(inputDataTypes.get(0), inputDataTypes.get(1)); default: throw new IllegalArgumentException( @@ -599,7 +609,8 @@ private static class DistinctAccumulator implements TableAccumulator { private final List inputTypes; private DistinctAccumulator(TableAccumulator accumulator, List inputTypes) { - this.accumulator = requireNonNull(accumulator, "accumulator is null"); + this.accumulator = + requireNonNull(accumulator, CalcMessages.EXCEPTION_ACCUMULATOR_IS_NULL_EF0C1DFF); this.hash = new MarkDistinctHash(inputTypes, false, UpdateMemory.NOOP); this.inputTypes = inputTypes; } @@ -612,7 +623,7 @@ public long getEstimatedSize() { @Override public TableAccumulator copy() { throw new UnsupportedOperationException( - "Distinct aggregation function state can not be copied"); + CalcMessages.EXCEPTION_DISTINCT_AGGREGATION_FUNCTION_STATE_CAN_NOT_COPIED_34D0A276); } @Override @@ -674,7 +685,8 @@ private static class DistinctGroupedAccumulator implements GroupedAccumulator { private final List inputTypes; private DistinctGroupedAccumulator(GroupedAccumulator accumulator, List inputTypes) { - this.accumulator = requireNonNull(accumulator, "accumulator is null"); + this.accumulator = + requireNonNull(accumulator, CalcMessages.EXCEPTION_ACCUMULATOR_IS_NULL_EF0C1DFF); this.inputTypes = ImmutableList.builder() .add(INT32) // group id column diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/AggregationMask.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/AggregationMask.java index fd8e6db4e7d2f..d9f93774a874e 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/AggregationMask.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/AggregationMask.java @@ -19,6 +19,8 @@ package org.apache.iotdb.calc.execution.operator.source.relational.aggregation; +import org.apache.iotdb.calc.i18n.CalcMessages; + import org.apache.tsfile.block.column.Column; import org.apache.tsfile.read.common.block.column.RunLengthEncodedColumn; @@ -59,15 +61,17 @@ private AggregationMask(int positionCount) { } private AggregationMask(int positionCount, int[] selectedPositions, int selectedPositionCount) { - checkArgument(positionCount >= 0, "positionCount is negative"); - checkArgument(selectedPositionCount >= 0, "selectedPositionCount is negative"); + checkArgument(positionCount >= 0, CalcMessages.EXCEPTION_POSITIONCOUNT_IS_NEGATIVE_2FACCDCA); + checkArgument( + selectedPositionCount >= 0, + CalcMessages.EXCEPTION_SELECTEDPOSITIONCOUNT_IS_NEGATIVE_A8A7FDA1); checkArgument( selectedPositionCount <= positionCount, - "selectedPositionCount cannot be greater than positionCount"); - requireNonNull(selectedPositions, "selectedPositions is null"); + CalcMessages.EXCEPTION_SELECTEDPOSITIONCOUNT_CANNOT_BE_GREATER_THAN_POSITIONCOUNT_871FF8DA); + requireNonNull(selectedPositions, CalcMessages.EXCEPTION_SELECTEDPOSITIONS_IS_NULL_2300C002); checkArgument( selectedPositions.length >= selectedPositionCount, - "selectedPosition is smaller than selectedPositionCount"); + CalcMessages.EXCEPTION_SELECTEDPOSITION_IS_SMALLER_THAN_SELECTEDPOSITIONCOUNT_465B9220); reset(positionCount); this.selectedPositions = selectedPositions; @@ -75,7 +79,7 @@ private AggregationMask(int positionCount, int[] selectedPositions, int selected } public void reset(int positionCount) { - checkArgument(positionCount >= 0, "positionCount is negative"); + checkArgument(positionCount >= 0, CalcMessages.EXCEPTION_POSITIONCOUNT_IS_NEGATIVE_2FACCDCA); this.positionCount = positionCount; this.selectedPositionCount = positionCount; } @@ -105,7 +109,7 @@ public Column[] filterBlock(Column[] columns) { private Column[] getPositions( Column[] originalColumns, int[] retainedPositions, int offset, int length) { - requireNonNull(retainedPositions, "retainedPositions is null"); + requireNonNull(retainedPositions, CalcMessages.EXCEPTION_RETAINEDPOSITIONS_IS_NULL_E62F9B0D); Column[] columns = new Column[originalColumns.length]; for (int i = 0; i < originalColumns.length; i++) { @@ -123,7 +127,9 @@ public int getSelectedPositionCount() { } public int[] getSelectedPositions() { - checkState(!isSelectAll(), "getSelectedPositions not available when in selectAll mode"); + checkState( + !isSelectAll(), + CalcMessages.EXCEPTION_GETSELECTEDPOSITIONS_NOT_AVAILABLE_WHEN_IN_SELECTALL_MODE_CBE671D3); return selectedPositions; } @@ -141,7 +147,7 @@ private void unselectPositions(Column column, boolean shouldTestValues) { int positionCount = column.getPositionCount(); checkArgument( positionCount == this.positionCount, - "Block position count does not match current position count"); + CalcMessages.EXCEPTION_BLOCK_POSITION_COUNT_DOES_NOT_MATCH_CURRENT_POSITION_COUNT_FE4BBE3D); if (isSelectNone()) { return; } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/ApproxCountDistinctAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/ApproxCountDistinctAccumulator.java index 1106abb57b9fd..4c5f15e4e04f1 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/ApproxCountDistinctAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/ApproxCountDistinctAccumulator.java @@ -21,6 +21,7 @@ import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.approximate.HyperLogLog; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.approximate.HyperLogLogStateFactory; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; @@ -92,7 +93,9 @@ public void addInput(Column[] arguments, AggregationMask mask) { default: throw new UnSupportedDataTypeException( String.format( - "Unsupported data type in APPROX_COUNT_DISTINCT Aggregation: %s", seriesDataType)); + CalcMessages + .EXCEPTION_UNSUPPORTED_DATA_TYPE_APPROX_COUNT_DISTINCT_AGGREGATION_ARG_58F0391E, + seriesDataType)); } } @@ -111,7 +114,8 @@ public void addIntermediate(Column argument) { public void evaluateIntermediate(ColumnBuilder columnBuilder) { checkArgument( columnBuilder instanceof BinaryColumnBuilder, - "intermediate input and output of APPROX_COUNT_DISTINCT should be BinaryColumn"); + CalcMessages + .EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_OF_APPROX_COUNT_DISTINCT_SHOULD_BE_BINARYCOLUMN_F444D3BE); columnBuilder.writeBinary(new Binary(state.getHyperLogLog().serialize())); } @@ -128,7 +132,7 @@ public boolean hasFinalResult() { @Override public void addStatistics(Statistics[] statistics) { throw new UnsupportedOperationException( - "ApproxCountDistinctAccumulator does not support statistics"); + CalcMessages.EXCEPTION_APPROXCOUNTDISTINCTACCUMULATOR_DOES_NOT_SUPPORT_STATISTICS_81005A79); } @Override diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/AvgAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/AvgAccumulator.java index 9d142151a1053..0c4834569b30b 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/AvgAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/AvgAccumulator.java @@ -18,6 +18,8 @@ */ package org.apache.iotdb.calc.execution.operator.source.relational.aggregation; +import org.apache.iotdb.calc.i18n.CalcMessages; + import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; import org.apache.tsfile.enums.TSDataType; @@ -57,7 +59,9 @@ public TableAccumulator copy() { @Override public void addInput(Column[] arguments, AggregationMask mask) { - checkArgument(arguments.length == 1, "argument of AVG should be one column"); + checkArgument( + arguments.length == 1, + CalcMessages.EXCEPTION_ARGUMENT_OF_AVG_SHOULD_BE_ONE_COLUMN_82162B82); switch (argumentDataType) { case INT32: addIntInput(arguments[0], mask); @@ -80,13 +84,17 @@ public void addInput(Column[] arguments, AggregationMask mask) { case TIMESTAMP: default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in aggregation AVG : %s", argumentDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_AGGREGATION_AVG_ARG_4E63A3C3, + argumentDataType)); } } @Override public void removeInput(Column[] arguments) { - checkArgument(arguments.length == 1, "argument of AVG should be one column"); + checkArgument( + arguments.length == 1, + CalcMessages.EXCEPTION_ARGUMENT_OF_AVG_SHOULD_BE_ONE_COLUMN_82162B82); switch (argumentDataType) { case INT32: removeIntInput(arguments[0]); @@ -109,7 +117,9 @@ public void removeInput(Column[] arguments) { case TIMESTAMP: default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in aggregation AVG : %s", argumentDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_AGGREGATION_AVG_ARG_4E63A3C3, + argumentDataType)); } } @@ -119,7 +129,8 @@ public void addIntermediate(Column argument) { argument instanceof BinaryColumn || (argument instanceof RunLengthEncodedColumn && ((RunLengthEncodedColumn) argument).getValue() instanceof BinaryColumn), - "intermediate input and output of AVG should be BinaryColumn"); + CalcMessages + .EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_OF_AVG_SHOULD_BE_BINARYCOLUMN_9CCDD5EB); for (int i = 0; i < argument.getPositionCount(); i++) { if (argument.isNull(i)) { @@ -138,7 +149,8 @@ public void addIntermediate(Column argument) { public void evaluateIntermediate(ColumnBuilder columnBuilder) { checkArgument( columnBuilder instanceof BinaryColumnBuilder, - "intermediate input and output of AVG should be BinaryColumn"); + CalcMessages + .EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_OF_AVG_SHOULD_BE_BINARYCOLUMN_9CCDD5EB); if (!initResult) { columnBuilder.appendNull(); } else { diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/BinaryApproxMostFrequentAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/BinaryApproxMostFrequentAccumulator.java index ad3464ea3e6e3..b5330091797eb 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/BinaryApproxMostFrequentAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/BinaryApproxMostFrequentAccumulator.java @@ -22,6 +22,7 @@ import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.approximate.Counter; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.approximate.SpaceSaving; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.approximate.SpaceSavingStateFactory; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.commons.exception.SemanticException; import org.apache.tsfile.block.column.Column; @@ -58,9 +59,9 @@ public void addInput(Column[] arguments, AggregationMask mask) { int capacity = arguments[2].getInt(0); if (maxBuckets <= 0 || capacity <= 0) { throw new SemanticException( - "The second and third argument must be greater than 0, but got k=" + CalcMessages.EXCEPTION_SECOND_THIRD_ARGUMENT_MUST_GREATER_THAN_0_BUT_GOT_K_0AFFFA6A + maxBuckets - + ", capacity=" + + CalcMessages.EXCEPTION_CAPACITY_E92593AD + capacity); } SpaceSaving spaceSaving = getOrCreateSpaceSaving(state, maxBuckets, capacity); diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/BooleanApproxMostFrequentAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/BooleanApproxMostFrequentAccumulator.java index 2ad23c9b376de..7a5adf665a60b 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/BooleanApproxMostFrequentAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/BooleanApproxMostFrequentAccumulator.java @@ -22,6 +22,7 @@ import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.approximate.Counter; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.approximate.SpaceSaving; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.approximate.SpaceSavingStateFactory; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.commons.exception.SemanticException; import org.apache.tsfile.block.column.Column; @@ -57,9 +58,9 @@ public void addInput(Column[] arguments, AggregationMask mask) { int capacity = arguments[2].getInt(0); if (maxBuckets <= 0 || capacity <= 0) { throw new SemanticException( - "The second and third argument must be greater than 0, but got k=" + CalcMessages.EXCEPTION_SECOND_THIRD_ARGUMENT_MUST_GREATER_THAN_0_BUT_GOT_K_0AFFFA6A + maxBuckets - + ", capacity=" + + CalcMessages.EXCEPTION_CAPACITY_E92593AD + capacity); } SpaceSaving spaceSaving = getOrCreateSpaceSaving(state, maxBuckets, capacity); diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/CountAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/CountAccumulator.java index 68918a1e68ab8..6e50c4cce300f 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/CountAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/CountAccumulator.java @@ -18,6 +18,8 @@ */ package org.apache.iotdb.calc.execution.operator.source.relational.aggregation; +import org.apache.iotdb.calc.i18n.CalcMessages; + import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; import org.apache.tsfile.file.metadata.statistics.Statistics; @@ -42,7 +44,9 @@ public TableAccumulator copy() { @Override public void addInput(Column[] arguments, AggregationMask mask) { - checkArgument(arguments.length == 1, "argument of COUNT should be one column"); + checkArgument( + arguments.length == 1, + CalcMessages.EXCEPTION_ARGUMENT_OF_COUNT_SHOULD_BE_ONE_COLUMN_906D6B19); int positionCount = mask.getSelectedPositionCount(); if (mask.isSelectAll()) { @@ -67,7 +71,9 @@ public void addInput(Column[] arguments, AggregationMask mask) { @Override public void removeInput(Column[] arguments) { - checkArgument(arguments.length == 1, "argument of COUNT should be one column"); + checkArgument( + arguments.length == 1, + CalcMessages.EXCEPTION_ARGUMENT_OF_COUNT_SHOULD_BE_ONE_COLUMN_906D6B19); int count = arguments[0].getPositionCount(); if (!arguments[0].mayHaveNull()) { countState -= count; diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/CountAllAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/CountAllAccumulator.java index 884a6fc6d67ef..5ca5fdcab127b 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/CountAllAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/CountAllAccumulator.java @@ -45,14 +45,20 @@ public TableAccumulator copy() { @Override public void addInput(Column[] arguments, AggregationMask mask) { - checkArgument(arguments.length == 1, "argument of COUNT(*) should be one column"); + checkArgument( + arguments.length == 1, + CalcMessages + .EXCEPTION_ARGUMENT_OF_COUNT_LEFT_PAREN_RIGHT_PAREN_SHOULD_BE_ONE_COLUMN_9158A9FE); int count = mask.getSelectedPositionCount(); countState += count; } @Override public void removeInput(Column[] arguments) { - checkArgument(arguments.length == 1, "argument of COUNT(*) should be one column"); + checkArgument( + arguments.length == 1, + CalcMessages + .EXCEPTION_ARGUMENT_OF_COUNT_LEFT_PAREN_RIGHT_PAREN_SHOULD_BE_ONE_COLUMN_9158A9FE); int count = arguments[0].getPositionCount(); countState -= count; } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/DoubleApproxMostFrequentAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/DoubleApproxMostFrequentAccumulator.java index fcab7ebbf2c4c..97bbd6ef257c9 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/DoubleApproxMostFrequentAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/DoubleApproxMostFrequentAccumulator.java @@ -22,6 +22,7 @@ import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.approximate.Counter; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.approximate.SpaceSaving; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.approximate.SpaceSavingStateFactory; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.commons.exception.SemanticException; import org.apache.tsfile.block.column.Column; @@ -57,9 +58,9 @@ public void addInput(Column[] arguments, AggregationMask mask) { int capacity = arguments[2].getInt(0); if (maxBuckets <= 0 || capacity <= 0) { throw new SemanticException( - "The second and third argument must be greater than 0, but got k=" + CalcMessages.EXCEPTION_SECOND_THIRD_ARGUMENT_MUST_GREATER_THAN_0_BUT_GOT_K_0AFFFA6A + maxBuckets - + ", capacity=" + + CalcMessages.EXCEPTION_CAPACITY_E92593AD + capacity); } SpaceSaving spaceSaving = getOrCreateSpaceSaving(state, maxBuckets, capacity); diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/FirstAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/FirstAccumulator.java index 778b6b9253137..fe2faa9ca57a6 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/FirstAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/FirstAccumulator.java @@ -19,6 +19,8 @@ package org.apache.iotdb.calc.execution.operator.source.relational.aggregation; +import org.apache.iotdb.calc.i18n.CalcMessages; + import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; import org.apache.tsfile.enums.TSDataType; @@ -94,7 +96,8 @@ public void addInput(Column[] arguments, AggregationMask mask) { return; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in FIRST: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_FIRST_ARG_D5B6C6F9, seriesDataType)); } } @@ -104,7 +107,8 @@ public void addIntermediate(Column argument) { argument instanceof BinaryColumn || (argument instanceof RunLengthEncodedColumn && ((RunLengthEncodedColumn) argument).getValue() instanceof BinaryColumn), - "intermediate input and output of FIRST should be BinaryColumn"); + CalcMessages + .EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_OF_FIRST_SHOULD_BE_BINARYCOLUMN_57CE212C); for (int i = 0; i < argument.getPositionCount(); i++) { if (argument.isNull(i)) { @@ -174,7 +178,9 @@ public void addIntermediate(Column argument) { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in FIRST Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_FIRST_AGGREGATION_ARG_B2D27BB9, + seriesDataType)); } } } @@ -183,7 +189,8 @@ public void addIntermediate(Column argument) { public void evaluateIntermediate(ColumnBuilder columnBuilder) { checkArgument( columnBuilder instanceof BinaryColumnBuilder, - "intermediate input and output of FIRST should be BinaryColumn"); + CalcMessages + .EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_OF_FIRST_SHOULD_BE_BINARYCOLUMN_57CE212C); // Case 1: Found a valid result with a valid timestamp (Highest Priority) if (initResult || initNullTimeValue) { @@ -233,7 +240,9 @@ public void evaluateFinal(ColumnBuilder columnBuilder) { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in FIRST aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_FIRST_AGGREGATION_ARG_2652C363, + seriesDataType)); } } @@ -293,7 +302,9 @@ public void addStatistics(Statistics[] statistics) { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in FIRST Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_FIRST_AGGREGATION_ARG_B2D27BB9, + seriesDataType)); } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/FirstByAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/FirstByAccumulator.java index 81482c897b41a..22b6da926beab 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/FirstByAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/FirstByAccumulator.java @@ -19,6 +19,8 @@ package org.apache.iotdb.calc.execution.operator.source.relational.aggregation; +import org.apache.iotdb.calc.i18n.CalcMessages; + import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; import org.apache.tsfile.enums.TSDataType; @@ -86,7 +88,10 @@ public TableAccumulator copy() { @Override public void addInput(Column[] arguments, AggregationMask mask) { - checkArgument(arguments.length == 3, "Length of input Column[] for FIRST_BY should be 3"); + checkArgument( + arguments.length == 3, + CalcMessages + .EXCEPTION_LENGTH_OF_INPUT_COLUMN_LEFT_BRACKET_RIGHT_BRACKET_FOR_FIRST_BY_SHOULD_BE_3_BE623E5E); // arguments[0] is x column, arguments[1] is y column, arguments[2] is time column switch (xDataType) { @@ -115,7 +120,9 @@ public void addInput(Column[] arguments, AggregationMask mask) { return; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in FIRST_BY Aggregation: %s", yDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_FIRST_AGGREGATION_ARG_8D31C6CA, + yDataType)); } } @@ -125,7 +132,8 @@ public void addIntermediate(Column argument) { argument instanceof BinaryColumn || (argument instanceof RunLengthEncodedColumn && ((RunLengthEncodedColumn) argument).getValue() instanceof BinaryColumn), - "intermediate input and output of FIRST_BY should be BinaryColumn"); + CalcMessages + .EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_OF_FIRST_BY_SHOULD_BE_BINARYCOLUMN_F0D867AB); for (int i = 0; i < argument.getPositionCount(); i++) { if (argument.isNull(i)) { @@ -211,7 +219,9 @@ public void addIntermediate(Column argument) { default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in FIRST_BY Aggregation: %s", yDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_FIRST_AGGREGATION_ARG_8D31C6CA, + yDataType)); } } } @@ -220,7 +230,8 @@ public void addIntermediate(Column argument) { public void evaluateIntermediate(ColumnBuilder columnBuilder) { checkArgument( columnBuilder instanceof BinaryColumnBuilder, - "intermediate input and output of FIRST_BY should be BinaryColumn"); + CalcMessages + .EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_OF_FIRST_BY_SHOULD_BE_BINARYCOLUMN_F0D867AB); if (initResult || initNullTimeValue) { // if the initResult is activated, the result must carry a not null time @@ -268,7 +279,9 @@ public void evaluateFinal(ColumnBuilder columnBuilder) { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in FIRST_BY Aggregation: %s", xDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_FIRST_AGGREGATION_ARG_8D31C6CA, + xDataType)); } } @@ -334,7 +347,9 @@ public void addStatistics(Statistics[] statistics) { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in FIRST_BY Aggregation: %s", yDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_FIRST_AGGREGATION_ARG_8D31C6CA, + yDataType)); } } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/FloatApproxMostFrequentAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/FloatApproxMostFrequentAccumulator.java index 0a00fa8d51717..0ecbe2192d748 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/FloatApproxMostFrequentAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/FloatApproxMostFrequentAccumulator.java @@ -22,6 +22,7 @@ import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.approximate.Counter; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.approximate.SpaceSaving; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.approximate.SpaceSavingStateFactory; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.commons.exception.SemanticException; import org.apache.tsfile.block.column.Column; @@ -57,9 +58,9 @@ public void addInput(Column[] arguments, AggregationMask mask) { int capacity = arguments[2].getInt(0); if (maxBuckets <= 0 || capacity <= 0) { throw new SemanticException( - "The second and third argument must be greater than 0, but got k=" + CalcMessages.EXCEPTION_SECOND_THIRD_ARGUMENT_MUST_GREATER_THAN_0_BUT_GOT_K_0AFFFA6A + maxBuckets - + ", capacity=" + + CalcMessages.EXCEPTION_CAPACITY_E92593AD + capacity); } SpaceSaving spaceSaving = getOrCreateSpaceSaving(state, maxBuckets, capacity); diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/IntApproxMostFrequentAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/IntApproxMostFrequentAccumulator.java index a1055dae9cbb4..2ed406e3b1a6a 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/IntApproxMostFrequentAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/IntApproxMostFrequentAccumulator.java @@ -22,6 +22,7 @@ import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.approximate.Counter; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.approximate.SpaceSaving; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.approximate.SpaceSavingStateFactory; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.commons.exception.SemanticException; import org.apache.tsfile.block.column.Column; @@ -57,9 +58,9 @@ public void addInput(Column[] arguments, AggregationMask mask) { int capacity = arguments[2].getInt(0); if (maxBuckets <= 0 || capacity <= 0) { throw new SemanticException( - "The second and third argument must be greater than 0, but got k=" + CalcMessages.EXCEPTION_SECOND_THIRD_ARGUMENT_MUST_GREATER_THAN_0_BUT_GOT_K_0AFFFA6A + maxBuckets - + ", capacity=" + + CalcMessages.EXCEPTION_CAPACITY_E92593AD + capacity); } SpaceSaving spaceSaving = getOrCreateSpaceSaving(state, maxBuckets, capacity); diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/LastAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/LastAccumulator.java index 0899f38993d6d..5918a640c303e 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/LastAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/LastAccumulator.java @@ -19,6 +19,8 @@ package org.apache.iotdb.calc.execution.operator.source.relational.aggregation; +import org.apache.iotdb.calc.i18n.CalcMessages; + import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; import org.apache.tsfile.enums.TSDataType; @@ -104,7 +106,8 @@ public void addInput(Column[] arguments, AggregationMask mask) { return; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in LAST: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_LAST_ARG_37F52124, seriesDataType)); } } @@ -114,7 +117,8 @@ public void addIntermediate(Column argument) { argument instanceof BinaryColumn || (argument instanceof RunLengthEncodedColumn && ((RunLengthEncodedColumn) argument).getValue() instanceof BinaryColumn), - "intermediate input and output of LAST should be BinaryColumn"); + CalcMessages + .EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_OF_LAST_SHOULD_BE_BINARYCOLUMN_24E654CD); for (int i = 0; i < argument.getPositionCount(); i++) { if (argument.isNull(i)) { @@ -184,7 +188,9 @@ public void addIntermediate(Column argument) { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in LAST Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_LAST_AGGREGATION_ARG_2FCF5ADA, + seriesDataType)); } } } @@ -193,7 +199,8 @@ public void addIntermediate(Column argument) { public void evaluateIntermediate(ColumnBuilder columnBuilder) { checkArgument( columnBuilder instanceof BinaryColumnBuilder, - "intermediate input and output of LAST should be BinaryColumn"); + CalcMessages + .EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_OF_LAST_SHOULD_BE_BINARYCOLUMN_24E654CD); if (initResult || initNullTimeValue) { // if the initResult is activated, the result must carry a not null time @@ -241,7 +248,9 @@ public void evaluateFinal(ColumnBuilder columnBuilder) { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in LAST aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_LAST_AGGREGATION_ARG_B3F2EE42, + seriesDataType)); } } @@ -301,7 +310,9 @@ public void addStatistics(Statistics[] statistics) { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in LAST Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_LAST_AGGREGATION_ARG_2FCF5ADA, + seriesDataType)); } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/LastByAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/LastByAccumulator.java index 580bebcc59160..c5dfd41eacbb7 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/LastByAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/LastByAccumulator.java @@ -19,6 +19,8 @@ package org.apache.iotdb.calc.execution.operator.source.relational.aggregation; +import org.apache.iotdb.calc.i18n.CalcMessages; + import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; import org.apache.tsfile.enums.TSDataType; @@ -91,7 +93,10 @@ public TableAccumulator copy() { @Override public void addInput(Column[] arguments, AggregationMask mask) { - checkArgument(arguments.length == 3, "Length of input Column[] for LAST_BY should be 3"); + checkArgument( + arguments.length == 3, + CalcMessages + .EXCEPTION_LENGTH_OF_INPUT_COLUMN_LEFT_BRACKET_RIGHT_BRACKET_FOR_LAST_BY_SHOULD_BE_3_D759D45F); // arguments[0] is x column, arguments[1] is y column, arguments[2] is time column switch (xDataType) { @@ -120,7 +125,9 @@ public void addInput(Column[] arguments, AggregationMask mask) { return; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in LAST_BY Aggregation: %s", yDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_LAST_AGGREGATION_ARG_8C41FBCC, + yDataType)); } } @@ -130,7 +137,8 @@ public void addIntermediate(Column argument) { argument instanceof BinaryColumn || (argument instanceof RunLengthEncodedColumn && ((RunLengthEncodedColumn) argument).getValue() instanceof BinaryColumn), - "intermediate input and output of LAST_BY should be BinaryColumn"); + CalcMessages + .EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_OF_LAST_BY_SHOULD_BE_BINARYCOLUMN_87700792); for (int i = 0; i < argument.getPositionCount(); i++) { if (argument.isNull(i)) { @@ -217,7 +225,9 @@ public void addIntermediate(Column argument) { default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in LAST_BY Aggregation: %s", yDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_LAST_AGGREGATION_ARG_8C41FBCC, + yDataType)); } } } @@ -226,7 +236,8 @@ public void addIntermediate(Column argument) { public void evaluateIntermediate(ColumnBuilder columnBuilder) { checkArgument( columnBuilder instanceof BinaryColumnBuilder, - "intermediate input and output of LAST_BY should be BinaryColumn"); + CalcMessages + .EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_OF_LAST_BY_SHOULD_BE_BINARYCOLUMN_87700792); if (initResult || initNullTimeValue) { // if the initResult is activated, the result must carry a not null time @@ -274,7 +285,9 @@ public void evaluateFinal(ColumnBuilder columnBuilder) { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in LAST_BY Aggregation: %s", xDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_LAST_AGGREGATION_ARG_8C41FBCC, + xDataType)); } } @@ -334,7 +347,9 @@ public void addStatistics(Statistics[] statistics) { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in LAST_BY Aggregation: %s", yDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_LAST_AGGREGATION_ARG_8C41FBCC, + yDataType)); } } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/LongApproxMostFrequentAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/LongApproxMostFrequentAccumulator.java index 227cb74c05f7a..f4216d8b16f09 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/LongApproxMostFrequentAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/LongApproxMostFrequentAccumulator.java @@ -22,6 +22,7 @@ import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.approximate.Counter; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.approximate.SpaceSaving; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.approximate.SpaceSavingStateFactory; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.commons.exception.SemanticException; import org.apache.tsfile.block.column.Column; @@ -56,9 +57,9 @@ public void addInput(Column[] arguments, AggregationMask mask) { int capacity = arguments[2].getInt(0); if (maxBuckets <= 0 || capacity <= 0) { throw new SemanticException( - "The second and third argument must be greater than 0, but got k=" + CalcMessages.EXCEPTION_SECOND_THIRD_ARGUMENT_MUST_GREATER_THAN_0_BUT_GOT_K_0AFFFA6A + maxBuckets - + ", capacity=" + + CalcMessages.EXCEPTION_CAPACITY_E92593AD + capacity); } SpaceSaving spaceSaving = getOrCreateSpaceSaving(state, maxBuckets, capacity); diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/MaxAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/MaxAccumulator.java index 26b599fbb730f..37047146d011d 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/MaxAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/MaxAccumulator.java @@ -19,6 +19,8 @@ package org.apache.iotdb.calc.execution.operator.source.relational.aggregation; +import org.apache.iotdb.calc.i18n.CalcMessages; + import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; import org.apache.tsfile.enums.TSDataType; @@ -57,7 +59,9 @@ public TableAccumulator copy() { @Override public void addInput(Column[] arguments, AggregationMask mask) { - checkArgument(arguments.length == 1, "argument of MAX should be one column"); + checkArgument( + arguments.length == 1, + CalcMessages.EXCEPTION_ARGUMENT_OF_MAX_SHOULD_BE_ONE_COLUMN_FC251F55); switch (seriesDataType) { case INT32: @@ -84,7 +88,9 @@ public void addInput(Column[] arguments, AggregationMask mask) { return; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MAX Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_MAX_AGGREGATION_ARG_CCB09C60, + seriesDataType)); } } @@ -120,7 +126,9 @@ public void addIntermediate(Column argument) { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MAX Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_MAX_AGGREGATION_ARG_CCB09C60, + seriesDataType)); } } } @@ -157,7 +165,9 @@ public void evaluateIntermediate(ColumnBuilder columnBuilder) { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MAX Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_MAX_AGGREGATION_ARG_CCB09C60, + seriesDataType)); } } @@ -192,7 +202,9 @@ public void evaluateFinal(ColumnBuilder columnBuilder) { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MAX Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_MAX_AGGREGATION_ARG_CCB09C60, + seriesDataType)); } } @@ -240,7 +252,9 @@ public void addStatistics(Statistics[] statistics) { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MAX Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_MAX_AGGREGATION_ARG_CCB09C60, + seriesDataType)); } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/MinAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/MinAccumulator.java index 00a922c4eac47..08f99b53b0358 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/MinAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/MinAccumulator.java @@ -19,6 +19,8 @@ package org.apache.iotdb.calc.execution.operator.source.relational.aggregation; +import org.apache.iotdb.calc.i18n.CalcMessages; + import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; import org.apache.tsfile.enums.TSDataType; @@ -57,7 +59,9 @@ public TableAccumulator copy() { @Override public void addInput(Column[] arguments, AggregationMask mask) { - checkArgument(arguments.length == 1, "argument of MIN should be one column"); + checkArgument( + arguments.length == 1, + CalcMessages.EXCEPTION_ARGUMENT_OF_MIN_SHOULD_BE_ONE_COLUMN_F8AA1E88); switch (seriesDataType) { case INT32: @@ -84,7 +88,9 @@ public void addInput(Column[] arguments, AggregationMask mask) { return; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MIN Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_MIN_AGGREGATION_ARG_CB73B158, + seriesDataType)); } } @@ -120,7 +126,9 @@ public void addIntermediate(Column argument) { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MIN Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_MIN_AGGREGATION_ARG_CB73B158, + seriesDataType)); } } } @@ -157,7 +165,9 @@ public void evaluateIntermediate(ColumnBuilder columnBuilder) { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MIN Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_MIN_AGGREGATION_ARG_CB73B158, + seriesDataType)); } } @@ -192,7 +202,9 @@ public void evaluateFinal(ColumnBuilder columnBuilder) { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MIN Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_MIN_AGGREGATION_ARG_CB73B158, + seriesDataType)); } } @@ -240,7 +252,9 @@ public void addStatistics(Statistics[] statistics) { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MIN Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_MIN_AGGREGATION_ARG_CB73B158, + seriesDataType)); } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/RecordIterator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/RecordIterator.java index 4046943bd7fc6..499b7575b47f8 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/RecordIterator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/RecordIterator.java @@ -59,7 +59,7 @@ public RecordIterator( this.positionCount = positionCount; if (childrenColumns.size() != dataTypes.size()) { throw new IllegalArgumentException( - "The size of childrenColumns and dataTypes should be the same."); + CalcMessages.EXCEPTION_SIZE_CHILDRENCOLUMNS_DATATYPES_SHOULD_SAME_6EA43EA8); } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/SumAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/SumAccumulator.java index 0c392ebaa2b68..98fee0156072f 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/SumAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/SumAccumulator.java @@ -18,6 +18,8 @@ */ package org.apache.iotdb.calc.execution.operator.source.relational.aggregation; +import org.apache.iotdb.calc.i18n.CalcMessages; + import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; import org.apache.tsfile.enums.TSDataType; @@ -51,7 +53,9 @@ public TableAccumulator copy() { @Override public void addInput(Column[] arguments, AggregationMask mask) { - checkArgument(arguments.length == 1, "argument of SUM should be one column"); + checkArgument( + arguments.length == 1, + CalcMessages.EXCEPTION_ARGUMENT_OF_SUM_SHOULD_BE_ONE_COLUMN_D6E636D1); switch (argumentDataType) { case INT32: addIntInput(arguments[0], mask); @@ -74,13 +78,17 @@ public void addInput(Column[] arguments, AggregationMask mask) { case TIMESTAMP: default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in SUM Aggregation: %s", argumentDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_SUM_AGGREGATION_ARG_92F5A18D, + argumentDataType)); } } @Override public void removeInput(Column[] arguments) { - checkArgument(arguments.length == 1, "argument of SUM should be one column"); + checkArgument( + arguments.length == 1, + CalcMessages.EXCEPTION_ARGUMENT_OF_SUM_SHOULD_BE_ONE_COLUMN_D6E636D1); switch (argumentDataType) { case INT32: removeIntInput(arguments[0]); @@ -103,7 +111,9 @@ public void removeInput(Column[] arguments) { case TIMESTAMP: default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in SUM Aggregation: %s", argumentDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_SUM_AGGREGATION_ARG_92F5A18D, + argumentDataType)); } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/TableAggregator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/TableAggregator.java index 1df3f6fb159b4..0ae4890bab619 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/TableAggregator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/TableAggregator.java @@ -19,6 +19,7 @@ package org.apache.iotdb.calc.execution.operator.source.relational.aggregation; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.calc.metric.QueryExecutionMetricSet; import org.apache.iotdb.calc.plan.planner.CommonOperatorUtils; import org.apache.iotdb.commons.queryengine.plan.relational.planner.node.AggregationNode; @@ -55,14 +56,19 @@ public TableAggregator( TSDataType outputType, List inputChannels, OptionalInt maskChannel) { - this.accumulator = requireNonNull(accumulator, "accumulator is null"); - this.step = requireNonNull(step, "step is null"); - this.outputType = requireNonNull(outputType, "intermediateType is null"); - this.inputChannels = Ints.toArray(requireNonNull(inputChannels, "inputChannels is null")); - this.maskChannel = requireNonNull(maskChannel, "maskChannel is null"); + this.accumulator = + requireNonNull(accumulator, CalcMessages.EXCEPTION_ACCUMULATOR_IS_NULL_EF0C1DFF); + this.step = requireNonNull(step, CalcMessages.EXCEPTION_STEP_IS_NULL_F83262DA); + this.outputType = + requireNonNull(outputType, CalcMessages.EXCEPTION_INTERMEDIATETYPE_IS_NULL_D0D9B957); + this.inputChannels = + Ints.toArray( + requireNonNull(inputChannels, CalcMessages.EXCEPTION_INPUTCHANNELS_IS_NULL_647DA393)); + this.maskChannel = + requireNonNull(maskChannel, CalcMessages.EXCEPTION_MASKCHANNEL_IS_NULL_571AD53D); checkArgument( step.isInputRaw() || inputChannels.size() == 1, - "expected 1 input channel for intermediate aggregation"); + CalcMessages.EXCEPTION_EXPECTED_1_INPUT_CHANNEL_FOR_INTERMEDIATE_AGGREGATION_3190C507); } public TSDataType getType() { diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/TableCentralMomentAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/TableCentralMomentAccumulator.java index e3a7b629dcbd9..82e1c04225c58 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/TableCentralMomentAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/TableCentralMomentAccumulator.java @@ -15,6 +15,7 @@ package org.apache.iotdb.calc.execution.operator.source.relational.aggregation; import org.apache.iotdb.calc.execution.aggregation.CentralMomentAccumulator; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; @@ -88,7 +89,8 @@ private double getDoubleValue(Column column, int position) { default: throw new UnSupportedDataTypeException( String.format( - "Unsupported data type in CentralMoment Aggregation: %s", seriesDataType)); + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_CENTRALMOMENT_AGGREGATION_ARG_74B9A3A8, + seriesDataType)); } } @@ -116,7 +118,7 @@ public void addIntermediate(Column argument) { argument instanceof BinaryColumn || (argument instanceof RunLengthEncodedColumn && ((RunLengthEncodedColumn) argument).getValue() instanceof BinaryColumn), - "intermediate input and output should be BinaryColumn"); + CalcMessages.EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_SHOULD_BE_BINARYCOLUMN_3B5148FA); for (int i = 0; i < argument.getPositionCount(); i++) { if (argument.isNull(i)) { @@ -175,7 +177,7 @@ private void merge(long nB, double meanB, double m2B, double m3B, double m4B) { public void evaluateIntermediate(ColumnBuilder columnBuilder) { checkArgument( columnBuilder instanceof BinaryColumnBuilder, - "intermediate input and output should be BinaryColumn"); + CalcMessages.EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_SHOULD_BE_BINARYCOLUMN_3B5148FA); if (count == 0) { columnBuilder.appendNull(); @@ -231,7 +233,8 @@ public TableAccumulator copy() { @Override public void removeInput(Column[] arguments) { - checkArgument(arguments.length == 1, "Input of CentralMoment should be 1"); + checkArgument( + arguments.length == 1, CalcMessages.EXCEPTION_INPUT_OF_CENTRALMOMENT_SHOULD_BE_1_FD23B170); if (count == 0 || arguments[0].isNull(0)) { return; } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/TableCorrelationAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/TableCorrelationAccumulator.java index acf046bd4f093..8a99e89d71833 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/TableCorrelationAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/TableCorrelationAccumulator.java @@ -14,6 +14,8 @@ package org.apache.iotdb.calc.execution.operator.source.relational.aggregation; +import org.apache.iotdb.calc.i18n.CalcMessages; + import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; import org.apache.tsfile.enums.TSDataType; @@ -101,7 +103,9 @@ private double getDoubleValue(Column column, int position, TSDataType dataType) return column.getDouble(position); default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in Correlation Aggregation: %s", dataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_CORRELATION_AGGREGATION_ARG_2FF29597, + dataType)); } } @@ -120,7 +124,8 @@ private void update(double x, double y) { @Override public void removeInput(Column[] arguments) { - checkArgument(arguments.length == 2, "Input of Correlation should be 2"); + checkArgument( + arguments.length == 2, CalcMessages.EXCEPTION_INPUT_OF_CORRELATION_SHOULD_BE_2_64BB37B5); if (count == 0 || arguments[0].isNull(0) || arguments[1].isNull(0)) { return; } @@ -164,7 +169,7 @@ public void addIntermediate(Column argument) { argument instanceof BinaryColumn || (argument instanceof RunLengthEncodedColumn && ((RunLengthEncodedColumn) argument).getValue() instanceof BinaryColumn), - "intermediate input and output should be BinaryColumn"); + CalcMessages.EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_SHOULD_BE_BINARYCOLUMN_3B5148FA); for (int i = 0; i < argument.getPositionCount(); i++) { if (argument.isNull(i)) { @@ -223,7 +228,7 @@ private void merge( public void evaluateIntermediate(ColumnBuilder columnBuilder) { checkArgument( columnBuilder instanceof BinaryColumnBuilder, - "intermediate input and output should be BinaryColumn"); + CalcMessages.EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_SHOULD_BE_BINARYCOLUMN_3B5148FA); if (count == 0) { columnBuilder.appendNull(); diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/TableCovarianceAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/TableCovarianceAccumulator.java index 50a62d28f0fad..0c07073c44344 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/TableCovarianceAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/TableCovarianceAccumulator.java @@ -15,6 +15,7 @@ package org.apache.iotdb.calc.execution.operator.source.relational.aggregation; import org.apache.iotdb.calc.execution.aggregation.CovarianceAccumulator; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; @@ -107,7 +108,9 @@ private double getDoubleValue(Column column, int position, TSDataType dataType) return column.getDouble(position); default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in Covariance Aggregation: %s", dataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_COVARIANCE_AGGREGATION_ARG_643BEDD0, + dataType)); } } @@ -124,7 +127,8 @@ private void update(double x, double y) { @Override public void removeInput(Column[] arguments) { - checkArgument(arguments.length == 2, "Input of Covariance should be 2"); + checkArgument( + arguments.length == 2, CalcMessages.EXCEPTION_INPUT_OF_COVARIANCE_SHOULD_BE_2_786B97E6); if (count == 0 || arguments[0].isNull(0) || arguments[1].isNull(0)) { return; } @@ -164,7 +168,7 @@ public void addIntermediate(Column argument) { argument instanceof BinaryColumn || (argument instanceof RunLengthEncodedColumn && ((RunLengthEncodedColumn) argument).getValue() instanceof BinaryColumn), - "intermediate input and output should be BinaryColumn"); + CalcMessages.EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_SHOULD_BE_BINARYCOLUMN_3B5148FA); for (int i = 0; i < argument.getPositionCount(); i++) { if (argument.isNull(i)) { @@ -209,7 +213,7 @@ private void merge(long otherCount, double otherMeanX, double otherMeanY, double public void evaluateIntermediate(ColumnBuilder columnBuilder) { checkArgument( columnBuilder instanceof BinaryColumnBuilder, - "intermediate input and output should be BinaryColumn"); + CalcMessages.EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_SHOULD_BE_BINARYCOLUMN_3B5148FA); if (count == 0) { columnBuilder.appendNull(); @@ -243,7 +247,7 @@ public void evaluateFinal(ColumnBuilder columnBuilder) { } break; default: - throw new UnsupportedOperationException("Unknown type: " + covarianceType); + throw new UnsupportedOperationException(CalcMessages.UNKNOWN_TYPE + covarianceType); } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/TableMaxMinByBaseAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/TableMaxMinByBaseAccumulator.java index d6df22858df4b..f26159d3fa2d5 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/TableMaxMinByBaseAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/TableMaxMinByBaseAccumulator.java @@ -19,6 +19,8 @@ package org.apache.iotdb.calc.execution.operator.source.relational.aggregation; +import org.apache.iotdb.calc.i18n.CalcMessages; + import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; import org.apache.tsfile.enums.TSDataType; @@ -66,7 +68,10 @@ protected TableMaxMinByBaseAccumulator(TSDataType xDataType, TSDataType yDataTyp // Column should be like: | x | y | @Override public void addInput(Column[] arguments, AggregationMask mask) { - checkArgument(arguments.length == 2, "Length of input Column[] for MAX_BY/MIN_BY should be 2"); + checkArgument( + arguments.length == 2, + CalcMessages + .EXCEPTION_LENGTH_OF_INPUT_COLUMN_LEFT_BRACKET_RIGHT_BRACKET_FOR_MAX_BY_SLASH_MIN_BY_SHOULD_3767E905); switch (yDataType) { case INT32: case DATE: @@ -102,7 +107,8 @@ public void addIntermediate(Column argument) { argument instanceof BinaryColumn || (argument instanceof RunLengthEncodedColumn && ((RunLengthEncodedColumn) argument).getValue() instanceof BinaryColumn), - "intermediate input and output of MAX_BY/MIN_BY should be BinaryColumn"); + CalcMessages + .EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_OF_MAX_BY_SLASH_MIN_BY_SHOULD_BE_BINARYCOLUMN_82B1BE6B); for (int i = 0; i < argument.getPositionCount(); i++) { if (argument.isNull(i)) { @@ -123,7 +129,8 @@ public void addStatistics(Statistics[] statistics) { public void evaluateIntermediate(ColumnBuilder columnBuilder) { checkArgument( columnBuilder instanceof BinaryColumnBuilder, - "intermediate input and output of MAX_BY/MIN_BY should be BinaryColumn"); + CalcMessages + .EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_OF_MAX_BY_SLASH_MIN_BY_SHOULD_BE_BINARYCOLUMN_82B1BE6B); if (!initResult) { columnBuilder.appendNull(); diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/TableModeAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/TableModeAccumulator.java index c7d1a13039110..af9635a4f42b4 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/TableModeAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/TableModeAccumulator.java @@ -19,6 +19,7 @@ package org.apache.iotdb.calc.execution.operator.source.relational.aggregation; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.commons.conf.CommonDescriptor; import org.apache.tsfile.block.column.Column; @@ -167,7 +168,8 @@ public void addIntermediate(Column argument) { argument instanceof BinaryColumn || (argument instanceof RunLengthEncodedColumn && ((RunLengthEncodedColumn) argument).getValue() instanceof BinaryColumn), - "intermediate input and output of Mode should be BinaryColumn"); + CalcMessages + .EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_OF_MODE_SHOULD_BE_BINARYCOLUMN_2BB3E0AF); for (int i = 0; i < argument.getPositionCount(); i++) { if (argument.isNull(i)) { @@ -183,7 +185,7 @@ public void addIntermediate(Column argument) { public void evaluateIntermediate(ColumnBuilder columnBuilder) { checkArgument( columnBuilder instanceof BinaryColumnBuilder, - "intermediate input and output should be BinaryColumn"); + CalcMessages.EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_SHOULD_BE_BINARYCOLUMN_3B5148FA); columnBuilder.writeBinary(new Binary(serializeCountMap())); } @@ -744,7 +746,8 @@ private void checkMapSize(int size) { if (size > MAP_SIZE_THRESHOLD) { throw new RuntimeException( String.format( - "distinct values has exceeded the threshold %s when calculate Mode", + CalcMessages + .EXCEPTION_DISTINCT_VALUES_HAS_EXCEEDED_THRESHOLD_ARG_CALCULATE_MODE_8CA29DC2, MAP_SIZE_THRESHOLD)); } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/TableRegressionAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/TableRegressionAccumulator.java index fb474bc58a99b..79f008eddc6a5 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/TableRegressionAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/TableRegressionAccumulator.java @@ -15,6 +15,7 @@ package org.apache.iotdb.calc.execution.operator.source.relational.aggregation; import org.apache.iotdb.calc.execution.aggregation.RegressionAccumulator; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; @@ -109,7 +110,9 @@ private double getDoubleValue(Column column, int position, TSDataType dataType) return column.getDouble(position); default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in Regression Aggregation: %s", dataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_REGRESSION_AGGREGATION_ARG_7BB08DA2, + dataType)); } } @@ -176,7 +179,7 @@ private void merge( public void evaluateIntermediate(ColumnBuilder columnBuilder) { checkArgument( columnBuilder instanceof BinaryColumnBuilder, - "intermediate output of Regression should be BinaryColumn"); + CalcMessages.EXCEPTION_INTERMEDIATE_OUTPUT_OF_REGRESSION_SHOULD_BE_BINARYCOLUMN_E74D77ED); if (count == 0) { columnBuilder.appendNull(); } else { @@ -215,13 +218,14 @@ public void evaluateFinal(ColumnBuilder columnBuilder) { } break; default: - throw new UnsupportedOperationException("Unknown type: " + regressionType); + throw new UnsupportedOperationException(CalcMessages.UNKNOWN_TYPE + regressionType); } } @Override public void removeInput(Column[] arguments) { - checkArgument(arguments.length == 2, "Input of Regression should be 2"); + checkArgument( + arguments.length == 2, CalcMessages.EXCEPTION_INPUT_OF_REGRESSION_SHOULD_BE_2_3893EEE3); if (count == 0 || arguments[0].isNull(0) || arguments[1].isNull(0)) { return; } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/TableVarianceAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/TableVarianceAccumulator.java index ef186d8d3fbcb..3b9c552d9546f 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/TableVarianceAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/TableVarianceAccumulator.java @@ -20,6 +20,7 @@ package org.apache.iotdb.calc.execution.operator.source.relational.aggregation; import org.apache.iotdb.calc.execution.aggregation.VarianceAccumulator; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; @@ -86,7 +87,9 @@ public void addInput(Column[] arguments, AggregationMask mask) { case TIMESTAMP: default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in VARIANCE Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_VARIANCE_AGGREGATION_ARG_C641D425, + seriesDataType)); } } @@ -114,7 +117,9 @@ public void removeInput(Column[] arguments) { case TIMESTAMP: default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in VARIANCE Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_VARIANCE_AGGREGATION_ARG_C641D425, + seriesDataType)); } } @@ -124,7 +129,7 @@ public void addIntermediate(Column argument) { argument instanceof BinaryColumn || (argument instanceof RunLengthEncodedColumn && ((RunLengthEncodedColumn) argument).getValue() instanceof BinaryColumn), - "intermediate input and output should be BinaryColumn"); + CalcMessages.EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_SHOULD_BE_BINARYCOLUMN_3B5148FA); for (int i = 0; i < argument.getPositionCount(); i++) { if (argument.isNull(i)) { @@ -150,7 +155,7 @@ public void addIntermediate(Column argument) { public void evaluateIntermediate(ColumnBuilder columnBuilder) { checkArgument( columnBuilder instanceof BinaryColumnBuilder, - "intermediate input and output should be BinaryColumn"); + CalcMessages.EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_SHOULD_BE_BINARYCOLUMN_3B5148FA); if (count == 0) { columnBuilder.appendNull(); diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/UserDefinedAggregateFunctionAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/UserDefinedAggregateFunctionAccumulator.java index cd6d0dc1101e9..2080e7a43a6bf 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/UserDefinedAggregateFunctionAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/UserDefinedAggregateFunctionAccumulator.java @@ -87,7 +87,8 @@ public void addIntermediate(Column argument) { argument instanceof BinaryColumn || (argument instanceof RunLengthEncodedColumn && ((RunLengthEncodedColumn) argument).getValue() instanceof BinaryColumn), - "intermediate input and output of UDAF should be BinaryColumn"); + CalcMessages + .EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_OF_UDAF_SHOULD_BE_BINARYCOLUMN_6F28900F); State otherState = aggregateFunction.createState(); for (int i = 0; i < argument.getPositionCount(); i++) { otherState.reset(); @@ -101,7 +102,8 @@ public void addIntermediate(Column argument) { public void evaluateIntermediate(ColumnBuilder columnBuilder) { checkArgument( columnBuilder instanceof BinaryColumnBuilder, - "intermediate input and output of UDAF should be BinaryColumn"); + CalcMessages + .EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_OF_UDAF_SHOULD_BE_BINARYCOLUMN_6F28900F); byte[] bytes = state.serialize(); columnBuilder.writeBinary(new Binary(bytes)); } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/Utils.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/Utils.java index a74d402f54088..6115452671653 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/Utils.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/Utils.java @@ -19,6 +19,8 @@ package org.apache.iotdb.calc.execution.operator.source.relational.aggregation; +import org.apache.iotdb.calc.i18n.CalcMessages; + import org.apache.tsfile.enums.TSDataType; import org.apache.tsfile.utils.Binary; import org.apache.tsfile.utils.BytesUtils; @@ -127,7 +129,7 @@ public static int calcTypeSize(TSDataType dataType, TsPrimitiveType value) { return 4 + value.getBinary().getValues().length; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type : %s", dataType)); + String.format(CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_ARG_7D59F7B2, dataType)); } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/approximate/HyperLogLog.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/approximate/HyperLogLog.java index 6acae090a2fb3..9da01acf70c33 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/approximate/HyperLogLog.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/approximate/HyperLogLog.java @@ -98,14 +98,14 @@ private static double getAlpha(int precision, int m) { } private static boolean isPowerOf2(long value) { - Preconditions.checkArgument(value > 0L, "value must be positive"); + Preconditions.checkArgument(value > 0L, CalcMessages.EXCEPTION_VALUE_MUST_BE_POSITIVE_24FE7959); return (value & value - 1L) == 0L; } private static int indexBitLength(int numberOfBuckets) { Preconditions.checkArgument( isPowerOf2(numberOfBuckets), - "numberOfBuckets must be a power of 2, actual: %s", + CalcMessages.EXCEPTION_NUMBEROFBUCKETS_MUST_BE_A_POWER_OF_2_COMMA_ACTUAL_COLON_ARG_476E74ED, numberOfBuckets); return Integer.numberOfTrailingZeros(numberOfBuckets); } @@ -115,8 +115,10 @@ private static int standardErrorToBuckets(double maxStandardError) { || maxStandardError > HIGHEST_MAX_STANDARD_ERROR) { throw new IoTDBRuntimeException( String.format( - "Max Standard Error must be in [%s, %s]: %s", - LOWEST_MAX_STANDARD_ERROR, HIGHEST_MAX_STANDARD_ERROR, maxStandardError), + CalcMessages.EXCEPTION_MAX_STANDARD_ERROR_MUST_ARG_ARG_ARG_EB8443D6, + LOWEST_MAX_STANDARD_ERROR, + HIGHEST_MAX_STANDARD_ERROR, + maxStandardError), NUMERIC_VALUE_OUT_OF_RANGE.getStatusCode(), true); } @@ -223,7 +225,7 @@ public void reset() { public void merge(HyperLogLog other) { if (this.m != other.m) { throw new IllegalArgumentException( - "Cannot merge HyperLogLog instances with different precision"); + CalcMessages.EXCEPTION_CANNOT_MERGE_HYPERLOGLOG_INSTANCES_DIFFERENT_PRECISION_9DCF13BC); } for (int i = 0; i < m; i++) { diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/approximate/HyperLogLogStateFactory.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/approximate/HyperLogLogStateFactory.java index b3566454c822e..cc0780efa1ae1 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/approximate/HyperLogLogStateFactory.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/approximate/HyperLogLogStateFactory.java @@ -20,6 +20,7 @@ package org.apache.iotdb.calc.execution.operator.source.relational.aggregation.approximate; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.HyperLogLogBigArray; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.tsfile.utils.RamUsageEstimator; @@ -71,7 +72,7 @@ public HyperLogLogBigArray getHyperLogLogs() { } public void setHyperLogLogs(HyperLogLogBigArray value) { - requireNonNull(value, "value is null"); + requireNonNull(value, CalcMessages.EXCEPTION_VALUE_IS_NULL_192F6BFF); this.hlls = value; } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/approximate/SpaceSavingStateFactory.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/approximate/SpaceSavingStateFactory.java index 05c7aa7076ac6..e0de9bfb85329 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/approximate/SpaceSavingStateFactory.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/approximate/SpaceSavingStateFactory.java @@ -20,6 +20,7 @@ package org.apache.iotdb.calc.execution.operator.source.relational.aggregation.approximate; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.SpaceSavingBigArray; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.tsfile.utils.RamUsageEstimator; @@ -73,7 +74,7 @@ public SpaceSavingBigArray getSpaceSavings() { } public void setSpaceSavings(SpaceSavingBigArray value) { - requireNonNull(value, "value is null"); + requireNonNull(value, CalcMessages.EXCEPTION_VALUE_IS_NULL_192F6BFF); this.spaceSavings = value; } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/approximate/TDigest.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/approximate/TDigest.java index 05cd6a1c04e10..6a06032207936 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/approximate/TDigest.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/approximate/TDigest.java @@ -736,7 +736,8 @@ public static TDigest fromBytes(ByteBuffer buf) { return r; } else { throw new IllegalStateException( - "Invalid format for serialized histogram, got encoding: " + encoding); + CalcMessages.EXCEPTION_INVALID_FORMAT_SERIALIZED_HISTOGRAM_GOT_ENCODING_A8E50EA5 + + encoding); } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/AbstractGroupedApproxPercentileAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/AbstractGroupedApproxPercentileAccumulator.java index 0c5fb7d789f3b..075650e6115ca 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/AbstractGroupedApproxPercentileAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/AbstractGroupedApproxPercentileAccumulator.java @@ -22,6 +22,7 @@ import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.AggregationMask; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.approximate.TDigest; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.TDigestBigArray; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; @@ -64,7 +65,8 @@ public void addInput(int[] groupIds, Column[] arguments, AggregationMask mask) { } else { throw new IllegalArgumentException( String.format( - "APPROX_PERCENTILE requires 2 or 3 arguments, but got %d", arguments.length)); + CalcMessages.EXCEPTION_APPROX_PERCENTILE_REQUIRES_2_3_ARGUMENTS_BUT_GOT_ARG_D78590AA, + arguments.length)); } switch (seriesDataType) { @@ -84,7 +86,9 @@ public void addInput(int[] groupIds, Column[] arguments, AggregationMask mask) { default: throw new UnSupportedDataTypeException( String.format( - "Unsupported data type in APPROX_PERCENTILE Aggregation: %s", seriesDataType)); + CalcMessages + .EXCEPTION_UNSUPPORTED_DATA_TYPE_APPROX_PERCENTILE_AGGREGATION_ARG_CFEC0431, + seriesDataType)); } } @@ -137,7 +141,9 @@ public void evaluateFinal(int groupId, ColumnBuilder columnBuilder) { default: throw new UnSupportedDataTypeException( String.format( - "Unsupported data type in APPROX_PERCENTILE Aggregation: %s", seriesDataType)); + CalcMessages + .EXCEPTION_UNSUPPORTED_DATA_TYPE_APPROX_PERCENTILE_AGGREGATION_ARG_CFEC0431, + seriesDataType)); } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/BinaryGroupedApproxMostFrequentAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/BinaryGroupedApproxMostFrequentAccumulator.java index 1ab874833934e..6292db2cc5f2c 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/BinaryGroupedApproxMostFrequentAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/BinaryGroupedApproxMostFrequentAccumulator.java @@ -23,6 +23,7 @@ import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.BinaryApproxMostFrequentAccumulator; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.approximate.SpaceSaving; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.SpaceSavingBigArray; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.commons.exception.SemanticException; import org.apache.tsfile.block.column.Column; @@ -46,9 +47,9 @@ public void addInput(int[] groupIds, Column[] arguments, AggregationMask mask) { int capacity = arguments[2].getInt(0); if (maxBuckets <= 0 || capacity <= 0) { throw new SemanticException( - "The second and third argument must be greater than 0, but got k=" + CalcMessages.EXCEPTION_SECOND_THIRD_ARGUMENT_MUST_GREATER_THAN_0_BUT_GOT_K_0AFFFA6A + maxBuckets - + ", capacity=" + + CalcMessages.EXCEPTION_CAPACITY_E92593AD + capacity); } SpaceSavingBigArray spaceSavingBigArray = getOrCreateSpaceSaving(state); diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/BooleanGroupedApproxMostFrequentAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/BooleanGroupedApproxMostFrequentAccumulator.java index 326934c3660a1..482e2baa64c5b 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/BooleanGroupedApproxMostFrequentAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/BooleanGroupedApproxMostFrequentAccumulator.java @@ -23,6 +23,7 @@ import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.BooleanApproxMostFrequentAccumulator; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.approximate.SpaceSaving; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.SpaceSavingBigArray; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.commons.exception.SemanticException; import org.apache.tsfile.block.column.Column; @@ -45,9 +46,9 @@ public void addInput(int[] groupIds, Column[] arguments, AggregationMask mask) { int capacity = arguments[2].getInt(0); if (maxBuckets <= 0 || capacity <= 0) { throw new SemanticException( - "The second and third argument must be greater than 0, but got k=" + CalcMessages.EXCEPTION_SECOND_THIRD_ARGUMENT_MUST_GREATER_THAN_0_BUT_GOT_K_0AFFFA6A + maxBuckets - + ", capacity=" + + CalcMessages.EXCEPTION_CAPACITY_E92593AD + capacity); } SpaceSavingBigArray spaceSavingBigArray = getOrCreateSpaceSaving(state); diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/DoubleGroupedApproxMostFrequentAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/DoubleGroupedApproxMostFrequentAccumulator.java index 3f550d56ed04a..463381f45179e 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/DoubleGroupedApproxMostFrequentAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/DoubleGroupedApproxMostFrequentAccumulator.java @@ -23,6 +23,7 @@ import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.DoubleApproxMostFrequentAccumulator; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.approximate.SpaceSaving; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.SpaceSavingBigArray; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.commons.exception.SemanticException; import org.apache.tsfile.block.column.Column; @@ -45,9 +46,9 @@ public void addInput(int[] groupIds, Column[] arguments, AggregationMask mask) { int capacity = arguments[2].getInt(0); if (maxBuckets <= 0 || capacity <= 0) { throw new SemanticException( - "The second and third argument must be greater than 0, but got k=" + CalcMessages.EXCEPTION_SECOND_THIRD_ARGUMENT_MUST_GREATER_THAN_0_BUT_GOT_K_0AFFFA6A + maxBuckets - + ", capacity=" + + CalcMessages.EXCEPTION_CAPACITY_E92593AD + capacity); } SpaceSavingBigArray spaceSavingBigArray = getOrCreateSpaceSaving(state); diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/FloatGroupedApproxMostFrequentAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/FloatGroupedApproxMostFrequentAccumulator.java index 387bff5a2b4b6..d9be22ce12f82 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/FloatGroupedApproxMostFrequentAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/FloatGroupedApproxMostFrequentAccumulator.java @@ -23,6 +23,7 @@ import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.FloatApproxMostFrequentAccumulator; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.approximate.SpaceSaving; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.SpaceSavingBigArray; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.commons.exception.SemanticException; import org.apache.tsfile.block.column.Column; @@ -45,9 +46,9 @@ public void addInput(int[] groupIds, Column[] arguments, AggregationMask mask) { int capacity = arguments[2].getInt(0); if (maxBuckets <= 0 || capacity <= 0) { throw new SemanticException( - "The second and third argument must be greater than 0, but got k=" + CalcMessages.EXCEPTION_SECOND_THIRD_ARGUMENT_MUST_GREATER_THAN_0_BUT_GOT_K_0AFFFA6A + maxBuckets - + ", capacity=" + + CalcMessages.EXCEPTION_CAPACITY_E92593AD + capacity); } SpaceSavingBigArray spaceSavingBigArray = getOrCreateSpaceSaving(state); diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedAggregator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedAggregator.java index 927d0249682fc..21332ebbc67e5 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedAggregator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedAggregator.java @@ -20,6 +20,7 @@ package org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.AggregationMask; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.calc.plan.planner.CommonOperatorUtils; import org.apache.iotdb.commons.queryengine.plan.relational.planner.node.AggregationNode; @@ -49,14 +50,19 @@ public GroupedAggregator( TSDataType outputType, List inputChannels, OptionalInt maskChannel) { - this.accumulator = requireNonNull(accumulator, "accumulator is null"); - this.step = requireNonNull(step, "step is null"); - this.outputType = requireNonNull(outputType, "intermediateType is null"); - this.inputChannels = Ints.toArray(requireNonNull(inputChannels, "inputChannels is null")); - this.maskChannel = requireNonNull(maskChannel, "maskChannel is null"); + this.accumulator = + requireNonNull(accumulator, CalcMessages.EXCEPTION_ACCUMULATOR_IS_NULL_EF0C1DFF); + this.step = requireNonNull(step, CalcMessages.EXCEPTION_STEP_IS_NULL_F83262DA); + this.outputType = + requireNonNull(outputType, CalcMessages.EXCEPTION_INTERMEDIATETYPE_IS_NULL_D0D9B957); + this.inputChannels = + Ints.toArray( + requireNonNull(inputChannels, CalcMessages.EXCEPTION_INPUTCHANNELS_IS_NULL_647DA393)); + this.maskChannel = + requireNonNull(maskChannel, CalcMessages.EXCEPTION_MASKCHANNEL_IS_NULL_571AD53D); checkArgument( step.isInputRaw() || inputChannels.size() == 1, - "expected 1 input channel for intermediate aggregation"); + CalcMessages.EXCEPTION_EXPECTED_1_INPUT_CHANNEL_FOR_INTERMEDIATE_AGGREGATION_3190C507); } public TSDataType getType() { diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedApproxCountDistinctAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedApproxCountDistinctAccumulator.java index 115ddfe3a64bd..5a2d38af35846 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedApproxCountDistinctAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedApproxCountDistinctAccumulator.java @@ -23,6 +23,7 @@ import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.approximate.HyperLogLog; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.approximate.HyperLogLogStateFactory; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.HyperLogLogBigArray; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; @@ -89,7 +90,9 @@ public void addInput(int[] groupIds, Column[] arguments, AggregationMask mask) { default: throw new UnSupportedDataTypeException( String.format( - "Unsupported data type in APPROX_COUNT_DISTINCT Aggregation: %s", seriesDataType)); + CalcMessages + .EXCEPTION_UNSUPPORTED_DATA_TYPE_APPROX_COUNT_DISTINCT_AGGREGATION_ARG_58F0391E, + seriesDataType)); } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedAvgAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedAvgAccumulator.java index 0f23f7c913bc9..e241f2c1d7b79 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedAvgAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedAvgAccumulator.java @@ -21,6 +21,7 @@ import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.AggregationMask; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.DoubleBigArray; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.LongBigArray; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; @@ -61,7 +62,9 @@ public void setGroupCount(long groupCount) { @Override public void addInput(int[] groupIds, Column[] arguments, AggregationMask mask) { - checkArgument(arguments.length == 1, "argument of AVG should be one column"); + checkArgument( + arguments.length == 1, + CalcMessages.EXCEPTION_ARGUMENT_OF_AVG_SHOULD_BE_ONE_COLUMN_82162B82); switch (argumentDataType) { case INT32: addIntInput(groupIds, arguments[0], mask); @@ -84,7 +87,9 @@ public void addInput(int[] groupIds, Column[] arguments, AggregationMask mask) { case TIMESTAMP: default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in AVG Aggregation: %s", argumentDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_AVG_AGGREGATION_ARG_66BF3128, + argumentDataType)); } } @@ -94,7 +99,8 @@ public void addIntermediate(int[] groupIds, Column argument) { argument instanceof BinaryColumn || (argument instanceof RunLengthEncodedColumn && ((RunLengthEncodedColumn) argument).getValue() instanceof BinaryColumn), - "intermediate input and output of AVG should be BinaryColumn"); + CalcMessages + .EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_OF_AVG_SHOULD_BE_BINARYCOLUMN_9CCDD5EB); for (int i = 0; i < groupIds.length; i++) { if (!argument.isNull(i)) { @@ -107,7 +113,8 @@ public void addIntermediate(int[] groupIds, Column argument) { public void evaluateIntermediate(int groupId, ColumnBuilder columnBuilder) { checkArgument( columnBuilder instanceof BinaryColumnBuilder, - "intermediate input and output of AVG should be BinaryColumn"); + CalcMessages + .EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_OF_AVG_SHOULD_BE_BINARYCOLUMN_9CCDD5EB); if (countValues.get(groupId) == 0) { columnBuilder.appendNull(); } else { diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedCentralMomentAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedCentralMomentAccumulator.java index 246edc6bcd9eb..2571c33a82492 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedCentralMomentAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedCentralMomentAccumulator.java @@ -23,6 +23,7 @@ import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.AggregationMask; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.DoubleBigArray; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.LongBigArray; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; @@ -114,7 +115,8 @@ private double getDoubleValue(Column column, int position) { default: throw new UnSupportedDataTypeException( String.format( - "Unsupported data type in CentralMoment Aggregation: %s", seriesDataType)); + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_CENTRALMOMENT_AGGREGATION_ARG_74B9A3A8, + seriesDataType)); } } @@ -146,7 +148,7 @@ public void addIntermediate(int[] groupIds, Column argument) { argument instanceof BinaryColumn || (argument instanceof RunLengthEncodedColumn && ((RunLengthEncodedColumn) argument).getValue() instanceof BinaryColumn), - "intermediate input and output should be BinaryColumn"); + CalcMessages.EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_SHOULD_BE_BINARYCOLUMN_3B5148FA); for (int i = 0; i < argument.getPositionCount(); i++) { if (argument.isNull(i)) { @@ -208,7 +210,7 @@ private void merge(int groupId, long nB, double meanB, double m2B, double m3B, d public void evaluateIntermediate(int groupId, ColumnBuilder columnBuilder) { checkArgument( columnBuilder instanceof BinaryColumnBuilder, - "intermediate input and output should be BinaryColumn"); + CalcMessages.EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_SHOULD_BE_BINARYCOLUMN_3B5148FA); if (counts.get(groupId) == 0) { columnBuilder.appendNull(); diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedCorrelationAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedCorrelationAccumulator.java index 589b2437ce26f..fd73c66db7b21 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedCorrelationAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedCorrelationAccumulator.java @@ -22,6 +22,7 @@ import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.AggregationMask; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.DoubleBigArray; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.LongBigArray; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; @@ -119,7 +120,9 @@ private double getDoubleValue(Column column, int position, TSDataType dataType) return column.getDouble(position); default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in Correlation Aggregation: %s", dataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_CORRELATION_AGGREGATION_ARG_2FF29597, + dataType)); } } @@ -144,7 +147,7 @@ public void addIntermediate(int[] groupIds, Column argument) { argument instanceof BinaryColumn || (argument instanceof RunLengthEncodedColumn && ((RunLengthEncodedColumn) argument).getValue() instanceof BinaryColumn), - "intermediate input and output should be BinaryColumn"); + CalcMessages.EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_SHOULD_BE_BINARYCOLUMN_3B5148FA); for (int i = 0; i < argument.getPositionCount(); i++) { if (argument.isNull(i)) { @@ -204,7 +207,7 @@ private void merge( public void evaluateIntermediate(int groupId, ColumnBuilder columnBuilder) { checkArgument( columnBuilder instanceof BinaryColumnBuilder, - "intermediate input and output should be BinaryColumn"); + CalcMessages.EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_SHOULD_BE_BINARYCOLUMN_3B5148FA); if (counts.get(groupId) == 0) { columnBuilder.appendNull(); diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedCovarianceAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedCovarianceAccumulator.java index 187053751d8cc..5b615133d015a 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedCovarianceAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedCovarianceAccumulator.java @@ -23,6 +23,7 @@ import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.AggregationMask; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.DoubleBigArray; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.LongBigArray; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; @@ -116,7 +117,9 @@ private double getDoubleValue(Column column, int position, TSDataType dataType) return column.getDouble(position); default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in Covariance Aggregation: %s", dataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_COVARIANCE_AGGREGATION_ARG_643BEDD0, + dataType)); } } @@ -139,7 +142,7 @@ public void addIntermediate(int[] groupIds, Column argument) { argument instanceof BinaryColumn || (argument instanceof RunLengthEncodedColumn && ((RunLengthEncodedColumn) argument).getValue() instanceof BinaryColumn), - "intermediate input and output should be BinaryColumn"); + CalcMessages.EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_SHOULD_BE_BINARYCOLUMN_3B5148FA); for (int i = 0; i < argument.getPositionCount(); i++) { if (argument.isNull(i)) { @@ -189,7 +192,7 @@ private void merge( public void evaluateIntermediate(int groupId, ColumnBuilder columnBuilder) { checkArgument( columnBuilder instanceof BinaryColumnBuilder, - "intermediate input and output should be BinaryColumn"); + CalcMessages.EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_SHOULD_BE_BINARYCOLUMN_3B5148FA); long count = counts.get(groupId); if (count == 0) { @@ -225,7 +228,7 @@ public void evaluateFinal(int groupId, ColumnBuilder columnBuilder) { } break; default: - throw new UnsupportedOperationException("Unknown type: " + covarianceType); + throw new UnsupportedOperationException(CalcMessages.UNKNOWN_TYPE + covarianceType); } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedExtremeAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedExtremeAccumulator.java index bd5aca876b7af..98bf3c2872364 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedExtremeAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedExtremeAccumulator.java @@ -25,6 +25,7 @@ import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.FloatBigArray; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.IntBigArray; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.LongBigArray; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; @@ -68,7 +69,9 @@ public GroupedExtremeAccumulator(TSDataType seriesDataType) { case TIMESTAMP: default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type EXTREME Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_EXTREME_AGGREGATION_ARG_AF4DA98F, + seriesDataType)); } } @@ -99,7 +102,9 @@ public long getEstimatedSize() { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in EXTREME Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_EXTREME_AGGREGATION_ARG_276BE220, + seriesDataType)); } return INSTANCE_SIZE + valuesSize; @@ -130,7 +135,9 @@ public void setGroupCount(long groupCount) { case BOOLEAN: default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in EXTREME Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_EXTREME_AGGREGATION_ARG_276BE220, + seriesDataType)); } } @@ -159,7 +166,9 @@ public void addInput(int[] groupIds, Column[] arguments, AggregationMask mask) { case TIMESTAMP: default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type EXTREME Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_EXTREME_AGGREGATION_ARG_AF4DA98F, + seriesDataType)); } } @@ -193,7 +202,9 @@ public void addIntermediate(int[] groupIds, Column argument) { case TIMESTAMP: default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in EXTREME Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_EXTREME_AGGREGATION_ARG_276BE220, + seriesDataType)); } } } @@ -225,7 +236,9 @@ public void evaluateIntermediate(int groupId, ColumnBuilder columnBuilder) { case TIMESTAMP: default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in EXTREME Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_EXTREME_AGGREGATION_ARG_276BE220, + seriesDataType)); } } } @@ -257,7 +270,9 @@ public void evaluateFinal(int groupId, ColumnBuilder columnBuilder) { case TIMESTAMP: default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in EXTREME Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_EXTREME_AGGREGATION_ARG_276BE220, + seriesDataType)); } } } @@ -290,7 +305,9 @@ public void reset() { case TIMESTAMP: default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in EXTREME Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_EXTREME_AGGREGATION_ARG_276BE220, + seriesDataType)); } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedFirstAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedFirstAccumulator.java index b0c52d525018c..640d6a5a4739b 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedFirstAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedFirstAccumulator.java @@ -26,6 +26,7 @@ import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.FloatBigArray; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.IntBigArray; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.LongBigArray; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; @@ -88,7 +89,9 @@ public GroupedFirstAccumulator(TSDataType seriesDataType) { return; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in FIRST Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_FIRST_AGGREGATION_ARG_B2D27BB9, + seriesDataType)); } } @@ -121,7 +124,9 @@ public long getEstimatedSize() { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in FIRST Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_FIRST_AGGREGATION_ARG_B2D27BB9, + seriesDataType)); } return INSTANCE_SIZE @@ -162,7 +167,9 @@ public void setGroupCount(long groupCount) { return; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in FIRST Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_FIRST_AGGREGATION_ARG_B2D27BB9, + seriesDataType)); } } @@ -195,7 +202,9 @@ public void addInput(int[] groupIds, Column[] arguments, AggregationMask mask) { return; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in FIRST Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_FIRST_AGGREGATION_ARG_B2D27BB9, + seriesDataType)); } } @@ -205,7 +214,8 @@ public void addIntermediate(int[] groupIds, Column argument) { argument instanceof BinaryColumn || (argument instanceof RunLengthEncodedColumn && ((RunLengthEncodedColumn) argument).getValue() instanceof BinaryColumn), - "intermediate input and output of FIRST should be BinaryColumn"); + CalcMessages + .EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_OF_FIRST_SHOULD_BE_BINARYCOLUMN_57CE212C); for (int i = 0; i < groupIds.length; i++) { if (argument.isNull(i)) { @@ -277,7 +287,9 @@ public void addIntermediate(int[] groupIds, Column argument) { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in FIRST Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_FIRST_AGGREGATION_ARG_B2D27BB9, + seriesDataType)); } } } @@ -286,7 +298,8 @@ public void addIntermediate(int[] groupIds, Column argument) { public void evaluateIntermediate(int groupId, ColumnBuilder columnBuilder) { checkArgument( columnBuilder instanceof BinaryColumnBuilder, - "intermediate input and output of FIRST should be BinaryColumn"); + CalcMessages + .EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_OF_FIRST_SHOULD_BE_BINARYCOLUMN_57CE212C); if (inits.get(groupId) || initNullTimeValues.get(groupId)) { columnBuilder.writeBinary(new Binary(serializeTimeWithValue(groupId))); return; @@ -327,7 +340,9 @@ public void evaluateFinal(int groupId, ColumnBuilder columnBuilder) { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in FIRST Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_FIRST_AGGREGATION_ARG_B2D27BB9, + seriesDataType)); } } @@ -365,7 +380,9 @@ public void reset() { return; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in FIRST Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_FIRST_AGGREGATION_ARG_B2D27BB9, + seriesDataType)); } } @@ -427,7 +444,9 @@ private byte[] serializeTimeWithValue(int groupId) { return bytes; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in FIRST Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_FIRST_AGGREGATION_ARG_B2D27BB9, + seriesDataType)); } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedFirstByAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedFirstByAccumulator.java index 8364971fcea13..378f188cf7347 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedFirstByAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedFirstByAccumulator.java @@ -26,6 +26,7 @@ import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.FloatBigArray; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.IntBigArray; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.LongBigArray; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; @@ -97,7 +98,9 @@ public GroupedFirstByAccumulator(TSDataType xDataType, TSDataType yDataType) { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in FIRST_BY Aggregation: %s", xDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_FIRST_AGGREGATION_ARG_8D31C6CA, + xDataType)); } } @@ -130,7 +133,9 @@ public long getEstimatedSize() { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in FIRST_BY Aggregation: %s", xDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_FIRST_AGGREGATION_ARG_8D31C6CA, + xDataType)); } return INSTANCE_SIZE @@ -173,7 +178,9 @@ public void setGroupCount(long groupCount) { return; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in FIRST_BY Aggregation: %s", xDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_FIRST_AGGREGATION_ARG_8D31C6CA, + xDataType)); } } @@ -212,13 +219,18 @@ public void reset() { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in FIRST_BY Aggregation: %s", xDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_FIRST_AGGREGATION_ARG_8D31C6CA, + xDataType)); } } @Override public void addInput(int[] groupIds, Column[] arguments, AggregationMask mask) { - checkArgument(arguments.length == 3, "Length of input Column[] for LastBy/FirstBy should be 3"); + checkArgument( + arguments.length == 3, + CalcMessages + .EXCEPTION_LENGTH_OF_INPUT_COLUMN_LEFT_BRACKET_RIGHT_BRACKET_FOR_LASTBY_SLASH_FIRSTBY_SHOUL_9E836ABA); // arguments[0] is x column, arguments[1] is y column, arguments[2] is time column switch (xDataType) { @@ -247,7 +259,9 @@ public void addInput(int[] groupIds, Column[] arguments, AggregationMask mask) { return; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in FIRST_BY Aggregation: %s", xDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_FIRST_AGGREGATION_ARG_8D31C6CA, + xDataType)); } } @@ -257,7 +271,8 @@ public void addIntermediate(int[] groupIds, Column argument) { argument instanceof BinaryColumn || (argument instanceof RunLengthEncodedColumn && ((RunLengthEncodedColumn) argument).getValue() instanceof BinaryColumn), - "intermediate input and output of FIRST_BY should be BinaryColumn"); + CalcMessages + .EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_OF_FIRST_BY_SHOULD_BE_BINARYCOLUMN_F0D867AB); for (int i = 0; i < argument.getPositionCount(); i++) { if (argument.isNull(i)) { @@ -338,7 +353,9 @@ public void addIntermediate(int[] groupIds, Column argument) { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in FIRST_BY Aggregation: %s", xDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_FIRST_AGGREGATION_ARG_8D31C6CA, + xDataType)); } } } @@ -347,7 +364,8 @@ public void addIntermediate(int[] groupIds, Column argument) { public void evaluateIntermediate(int groupId, ColumnBuilder columnBuilder) { checkArgument( columnBuilder instanceof BinaryColumnBuilder, - "intermediate input and output of FIRST_BY should be BinaryColumn"); + CalcMessages + .EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_OF_FIRST_BY_SHOULD_BE_BINARYCOLUMN_F0D867AB); if (inits.get(groupId) || initNullTimeValues.get(groupId)) { columnBuilder.writeBinary(new Binary(serializeTimeWithValue(groupId))); @@ -397,7 +415,9 @@ private byte[] serializeTimeWithValue(int groupId) { return bytes; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in FIRST_BY Aggregation: %s", xDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_FIRST_AGGREGATION_ARG_8D31C6CA, + xDataType)); } } return bytes; @@ -424,7 +444,9 @@ private int calculateValueLength(int groupId) { return 1; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in FIRST_BY Aggregation: %s", xDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_FIRST_AGGREGATION_ARG_8D31C6CA, + xDataType)); } } @@ -461,7 +483,9 @@ public void evaluateFinal(int groupId, ColumnBuilder columnBuilder) { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in FIRST_BY Aggregation: %s", xDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_FIRST_AGGREGATION_ARG_8D31C6CA, + xDataType)); } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedLastAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedLastAccumulator.java index c5696464da464..abdd939b58251 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedLastAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedLastAccumulator.java @@ -26,6 +26,7 @@ import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.FloatBigArray; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.IntBigArray; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.LongBigArray; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; @@ -88,7 +89,9 @@ public GroupedLastAccumulator(TSDataType seriesDataType) { return; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in LAST Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_LAST_AGGREGATION_ARG_2FCF5ADA, + seriesDataType)); } } @@ -121,7 +124,9 @@ public long getEstimatedSize() { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in LAST Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_LAST_AGGREGATION_ARG_2FCF5ADA, + seriesDataType)); } return INSTANCE_SIZE @@ -162,7 +167,9 @@ public void setGroupCount(long groupCount) { return; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in LAST Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_LAST_AGGREGATION_ARG_2FCF5ADA, + seriesDataType)); } } @@ -195,7 +202,9 @@ public void addInput(int[] groupIds, Column[] arguments, AggregationMask mask) { return; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in LAST Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_LAST_AGGREGATION_ARG_2FCF5ADA, + seriesDataType)); } } @@ -205,7 +214,8 @@ public void addIntermediate(int[] groupIds, Column argument) { argument instanceof BinaryColumn || (argument instanceof RunLengthEncodedColumn && ((RunLengthEncodedColumn) argument).getValue() instanceof BinaryColumn), - "intermediate input and output of LAST should be BinaryColumn"); + CalcMessages + .EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_OF_LAST_SHOULD_BE_BINARYCOLUMN_24E654CD); for (int i = 0; i < groupIds.length; i++) { if (argument.isNull(i)) { @@ -277,7 +287,9 @@ public void addIntermediate(int[] groupIds, Column argument) { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in LAST Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_LAST_AGGREGATION_ARG_2FCF5ADA, + seriesDataType)); } } } @@ -286,7 +298,8 @@ public void addIntermediate(int[] groupIds, Column argument) { public void evaluateIntermediate(int groupId, ColumnBuilder columnBuilder) { checkArgument( columnBuilder instanceof BinaryColumnBuilder, - "intermediate input and output of LAST should be BinaryColumn"); + CalcMessages + .EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_OF_LAST_SHOULD_BE_BINARYCOLUMN_24E654CD); if (inits.get(groupId) || initNullTimeValues.get(groupId)) { columnBuilder.writeBinary(new Binary(serializeTimeWithValue(groupId))); return; @@ -327,7 +340,9 @@ public void evaluateFinal(int groupId, ColumnBuilder columnBuilder) { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in LAST Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_LAST_AGGREGATION_ARG_2FCF5ADA, + seriesDataType)); } } @@ -365,7 +380,9 @@ public void reset() { return; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in LAST Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_LAST_AGGREGATION_ARG_2FCF5ADA, + seriesDataType)); } } @@ -427,7 +444,9 @@ private byte[] serializeTimeWithValue(int groupId) { return bytes; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in LAST Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_LAST_AGGREGATION_ARG_2FCF5ADA, + seriesDataType)); } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedLastByAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedLastByAccumulator.java index ab6ddae16cc72..fd29bbdb376b7 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedLastByAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedLastByAccumulator.java @@ -26,6 +26,7 @@ import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.FloatBigArray; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.IntBigArray; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.LongBigArray; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; @@ -97,7 +98,9 @@ public GroupedLastByAccumulator(TSDataType xDataType, TSDataType yDataType) { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in LAST_BY Aggregation: %s", xDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_LAST_AGGREGATION_ARG_8C41FBCC, + xDataType)); } } @@ -130,7 +133,9 @@ public long getEstimatedSize() { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in LAST_BY Aggregation: %s", xDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_LAST_AGGREGATION_ARG_8C41FBCC, + xDataType)); } return INSTANCE_SIZE @@ -173,7 +178,9 @@ public void setGroupCount(long groupCount) { return; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in LAST_BY Aggregation: %s", xDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_LAST_AGGREGATION_ARG_8C41FBCC, + xDataType)); } } @@ -212,13 +219,18 @@ public void reset() { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in LAST_BY Aggregation: %s", xDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_LAST_AGGREGATION_ARG_8C41FBCC, + xDataType)); } } @Override public void addInput(int[] groupIds, Column[] arguments, AggregationMask mask) { - checkArgument(arguments.length == 3, "Length of input Column[] for LAST_BY should be 3"); + checkArgument( + arguments.length == 3, + CalcMessages + .EXCEPTION_LENGTH_OF_INPUT_COLUMN_LEFT_BRACKET_RIGHT_BRACKET_FOR_LAST_BY_SHOULD_BE_3_D759D45F); // arguments[0] is x column, arguments[1] is y column, arguments[2] is time column switch (xDataType) { @@ -247,7 +259,9 @@ public void addInput(int[] groupIds, Column[] arguments, AggregationMask mask) { return; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in LAST_BY Aggregation: %s", xDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_LAST_AGGREGATION_ARG_8C41FBCC, + xDataType)); } } @@ -257,7 +271,8 @@ public void addIntermediate(int[] groupIds, Column argument) { argument instanceof BinaryColumn || (argument instanceof RunLengthEncodedColumn && ((RunLengthEncodedColumn) argument).getValue() instanceof BinaryColumn), - "intermediate input and output of LAST_BY should be BinaryColumn"); + CalcMessages + .EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_OF_LAST_BY_SHOULD_BE_BINARYCOLUMN_87700792); for (int i = 0; i < argument.getPositionCount(); i++) { if (argument.isNull(i)) { @@ -338,7 +353,9 @@ public void addIntermediate(int[] groupIds, Column argument) { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in LAST_BY Aggregation: %s", xDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_LAST_AGGREGATION_ARG_8C41FBCC, + xDataType)); } } } @@ -347,7 +364,8 @@ public void addIntermediate(int[] groupIds, Column argument) { public void evaluateIntermediate(int groupId, ColumnBuilder columnBuilder) { checkArgument( columnBuilder instanceof BinaryColumnBuilder, - "intermediate input and output of LAST_BY should be BinaryColumn"); + CalcMessages + .EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_OF_LAST_BY_SHOULD_BE_BINARYCOLUMN_87700792); if (inits.get(groupId) || initNullTimeValues.get(groupId)) { columnBuilder.writeBinary(new Binary(serializeTimeWithValue(groupId))); @@ -396,7 +414,9 @@ private byte[] serializeTimeWithValue(int groupId) { return bytes; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in LAST_BY Aggregation: %s", xDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_LAST_AGGREGATION_ARG_8C41FBCC, + xDataType)); } } return bytes; @@ -423,7 +443,9 @@ private int calculateValueLength(int groupId) { return 1; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in LAST_BY Aggregation: %s", xDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_LAST_AGGREGATION_ARG_8C41FBCC, + xDataType)); } } @@ -460,7 +482,9 @@ public void evaluateFinal(int groupId, ColumnBuilder columnBuilder) { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in LAST_BY Aggregation: %s", xDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_LAST_AGGREGATION_ARG_8C41FBCC, + xDataType)); } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedMaxAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedMaxAccumulator.java index 119501e421391..c4da41c8acb51 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedMaxAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedMaxAccumulator.java @@ -26,6 +26,7 @@ import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.FloatBigArray; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.IntBigArray; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.LongBigArray; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; @@ -77,7 +78,9 @@ public GroupedMaxAccumulator(TSDataType seriesDataType) { return; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MAX Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_MAX_AGGREGATION_ARG_CCB09C60, + seriesDataType)); } } @@ -110,7 +113,9 @@ public long getEstimatedSize() { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MAX Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_MAX_AGGREGATION_ARG_CCB09C60, + seriesDataType)); } return INSTANCE_SIZE + valuesSize + inits.sizeOf(); @@ -145,7 +150,9 @@ public void setGroupCount(long groupCount) { return; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MAX Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_MAX_AGGREGATION_ARG_CCB09C60, + seriesDataType)); } } @@ -178,7 +185,9 @@ public void addInput(int[] groupIds, Column[] arguments, AggregationMask mask) { return; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MAX Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_MAX_AGGREGATION_ARG_CCB09C60, + seriesDataType)); } } @@ -216,7 +225,9 @@ public void addIntermediate(int[] groupIds, Column argument) { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MAX Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_MAX_AGGREGATION_ARG_CCB09C60, + seriesDataType)); } } } @@ -253,7 +264,9 @@ public void evaluateIntermediate(int groupId, ColumnBuilder columnBuilder) { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MAX Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_MAX_AGGREGATION_ARG_CCB09C60, + seriesDataType)); } } } @@ -289,7 +302,9 @@ public void evaluateFinal(int groupId, ColumnBuilder columnBuilder) { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MAX Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_MAX_AGGREGATION_ARG_CCB09C60, + seriesDataType)); } } } @@ -326,7 +341,9 @@ public void reset() { return; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MAX Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_MAX_AGGREGATION_ARG_CCB09C60, + seriesDataType)); } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedMaxMinByBaseAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedMaxMinByBaseAccumulator.java index 0f59a575f45c6..18bf03c3dddc1 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedMaxMinByBaseAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedMaxMinByBaseAccumulator.java @@ -26,6 +26,7 @@ import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.FloatBigArray; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.IntBigArray; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.LongBigArray; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; @@ -105,7 +106,9 @@ protected GroupedMaxMinByBaseAccumulator(TSDataType xDataType, TSDataType yDataT break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MAX_BY/MIN_BY Aggregation: %s", xDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_MAX_MIN_AGGREGATION_ARG_982BEBD5, + xDataType)); } switch (yDataType) { @@ -134,7 +137,9 @@ protected GroupedMaxMinByBaseAccumulator(TSDataType xDataType, TSDataType yDataT break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MAX_BY/MIN_BY Aggregation: %s", yDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_MAX_MIN_AGGREGATION_ARG_982BEBD5, + yDataType)); } } @@ -167,7 +172,9 @@ public long getEstimatedSize() { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MAX_BY/MIN_BY Aggregation: %s", xDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_MAX_MIN_AGGREGATION_ARG_982BEBD5, + xDataType)); } switch (yDataType) { @@ -196,7 +203,9 @@ public long getEstimatedSize() { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MAX_BY/MIN_BY Aggregation: %s", xDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_MAX_MIN_AGGREGATION_ARG_982BEBD5, + xDataType)); } return INSTANCE_SIZE + valuesSize + inits.sizeOf() + xNulls.sizeOf(); @@ -232,7 +241,9 @@ public void setGroupCount(long groupCount) { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MAX_BY/MIN_BY Aggregation: %s", xDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_MAX_MIN_AGGREGATION_ARG_982BEBD5, + xDataType)); } switch (yDataType) { case INT32: @@ -260,7 +271,9 @@ public void setGroupCount(long groupCount) { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MAX_BY/MIN_BY Aggregation: %s", xDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_MAX_MIN_AGGREGATION_ARG_982BEBD5, + xDataType)); } } @@ -297,7 +310,9 @@ public void reset() { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MAX_BY/MIN_BY Aggregation: %s", xDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_MAX_MIN_AGGREGATION_ARG_982BEBD5, + xDataType)); } switch (yDataType) { @@ -326,7 +341,9 @@ public void reset() { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MAX_BY/MIN_BY Aggregation: %s", yDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_MAX_MIN_AGGREGATION_ARG_982BEBD5, + yDataType)); } } @@ -358,7 +375,9 @@ public void addInput(int[] groupIds, Column[] arguments, AggregationMask mask) { return; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MAX_BY/MIN_BY Aggregation: %s", yDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_MAX_MIN_AGGREGATION_ARG_982BEBD5, + yDataType)); } } @@ -368,7 +387,8 @@ public void addIntermediate(int[] groupIds, Column argument) { argument instanceof BinaryColumn || (argument instanceof RunLengthEncodedColumn && ((RunLengthEncodedColumn) argument).getValue() instanceof BinaryColumn), - "intermediate input and output of MAX_BY/MIN_BY should be BinaryColumn"); + CalcMessages + .EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_OF_MAX_BY_SLASH_MIN_BY_SHOULD_BE_BINARYCOLUMN_82B1BE6B); for (int i = 0; i < groupIds.length; i++) { if (argument.isNull(i)) { @@ -384,7 +404,8 @@ public void addIntermediate(int[] groupIds, Column argument) { public void evaluateIntermediate(int groupId, ColumnBuilder columnBuilder) { checkArgument( columnBuilder instanceof BinaryColumnBuilder, - "intermediate input and output of MAX_BY/MIN_BY should be BinaryColumn"); + CalcMessages + .EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_OF_MAX_BY_SLASH_MIN_BY_SHOULD_BE_BINARYCOLUMN_82B1BE6B); if (!inits.get(groupId)) { columnBuilder.appendNull(); @@ -613,7 +634,9 @@ private void writeX(int groupId, ColumnBuilder columnBuilder) { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MAX_BY/MIN_BY Aggregation: %s", xDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_MAX_MIN_AGGREGATION_ARG_982BEBD5, + xDataType)); } } @@ -647,7 +670,9 @@ private void updateX(int groupId, Column xColumn, int xIndex) { xBooleanValues.set(groupId, xColumn.getBoolean(xIndex)); default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MAX_BY/MIN_BY Aggregation: %s", xDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_MAX_MIN_AGGREGATION_ARG_982BEBD5, + xDataType)); } } } @@ -719,7 +744,9 @@ private void writeIntermediate( default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MAX_BY/MIN_BY Aggregation: %s", dataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_MAX_MIN_AGGREGATION_ARG_982BEBD5, + dataType)); } } @@ -747,7 +774,9 @@ private int calculateValueLength(int groupId, TSDataType dataType, boolean isX) return 1; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MAX_BY/MIN_BY Aggregation: %s", dataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_MAX_MIN_AGGREGATION_ARG_982BEBD5, + dataType)); } } @@ -803,7 +832,9 @@ private void updateFromBytesIntermediateInput(int groupId, byte[] bytes) { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MAX_BY/MIN_BY Aggregation: %s", yDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_MAX_MIN_AGGREGATION_ARG_982BEBD5, + yDataType)); } } @@ -842,7 +873,9 @@ private void readXFromBytesIntermediateInput( break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MAX_BY/MIN_BY Aggregation: %s", xDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_MAX_MIN_AGGREGATION_ARG_982BEBD5, + xDataType)); } } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedMinAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedMinAccumulator.java index 1993e2142fc76..87ea0c725a344 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedMinAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedMinAccumulator.java @@ -26,6 +26,7 @@ import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.FloatBigArray; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.IntBigArray; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.LongBigArray; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; @@ -77,7 +78,9 @@ public GroupedMinAccumulator(TSDataType seriesDataType) { return; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MIN Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_MIN_AGGREGATION_ARG_CB73B158, + seriesDataType)); } } @@ -110,7 +113,9 @@ public long getEstimatedSize() { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MIN Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_MIN_AGGREGATION_ARG_CB73B158, + seriesDataType)); } return INSTANCE_SIZE + valuesSize + inits.sizeOf(); @@ -145,7 +150,9 @@ public void setGroupCount(long groupCount) { return; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MIN Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_MIN_AGGREGATION_ARG_CB73B158, + seriesDataType)); } } @@ -178,7 +185,9 @@ public void addInput(int[] groupIds, Column[] arguments, AggregationMask mask) { return; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MIN Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_MIN_AGGREGATION_ARG_CB73B158, + seriesDataType)); } } @@ -216,7 +225,9 @@ public void addIntermediate(int[] groupIds, Column argument) { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MIN Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_MIN_AGGREGATION_ARG_CB73B158, + seriesDataType)); } } } @@ -253,7 +264,9 @@ public void evaluateIntermediate(int groupId, ColumnBuilder columnBuilder) { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MIN Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_MIN_AGGREGATION_ARG_CB73B158, + seriesDataType)); } } } @@ -289,7 +302,9 @@ public void evaluateFinal(int groupId, ColumnBuilder columnBuilder) { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MIN Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_MIN_AGGREGATION_ARG_CB73B158, + seriesDataType)); } } } @@ -326,7 +341,9 @@ public void reset() { return; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MIN Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_MIN_AGGREGATION_ARG_CB73B158, + seriesDataType)); } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedModeAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedModeAccumulator.java index 4e6511ffff843..a7560ebb2bfaf 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedModeAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedModeAccumulator.java @@ -22,6 +22,7 @@ import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.AggregationMask; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.LongBigArray; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.MapBigArray; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.commons.conf.CommonDescriptor; import org.apache.tsfile.block.column.Column; @@ -110,7 +111,8 @@ public void addIntermediate(int[] groupIds, Column argument) { argument instanceof BinaryColumn || (argument instanceof RunLengthEncodedColumn && ((RunLengthEncodedColumn) argument).getValue() instanceof BinaryColumn), - "intermediate input and output of MODE should be BinaryColumn"); + CalcMessages + .EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_OF_MODE_SHOULD_BE_BINARYCOLUMN_0D03B323); for (int i = 0; i < argument.getPositionCount(); i++) { if (argument.isNull(i)) { @@ -126,7 +128,8 @@ public void addIntermediate(int[] groupIds, Column argument) { public void evaluateIntermediate(int groupId, ColumnBuilder columnBuilder) { checkArgument( columnBuilder instanceof BinaryColumnBuilder, - "intermediate input and output of MODE should be BinaryColumn"); + CalcMessages + .EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_OF_MODE_SHOULD_BE_BINARYCOLUMN_0D03B323); columnBuilder.writeBinary(new Binary(serializeCountMap(groupId))); } @@ -593,7 +596,8 @@ private void checkMapSize(int size) { if (size > MAP_SIZE_THRESHOLD) { throw new RuntimeException( String.format( - "distinct values has exceeded the threshold %s when calculate MODE in one group", + CalcMessages + .EXCEPTION_DISTINCT_VALUES_HAS_EXCEEDED_THRESHOLD_ARG_CALCULATE_MODE_ONE_GROUP_A3F5A1D3, MAP_SIZE_THRESHOLD)); } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedRegressionAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedRegressionAccumulator.java index 2155633f5e80f..944307f41a718 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedRegressionAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedRegressionAccumulator.java @@ -23,6 +23,7 @@ import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.AggregationMask; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.DoubleBigArray; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.LongBigArray; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; @@ -124,7 +125,9 @@ private double getDoubleValue(Column column, int position, TSDataType dataType) return column.getDouble(position); default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in Regression Aggregation: %s", dataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_REGRESSION_AGGREGATION_ARG_7BB08DA2, + dataType)); } } @@ -148,7 +151,7 @@ public void addIntermediate(int[] groupIds, Column argument) { argument instanceof BinaryColumn || (argument instanceof RunLengthEncodedColumn && ((RunLengthEncodedColumn) argument).getValue() instanceof BinaryColumn), - "intermediate input and output should be BinaryColumn"); + CalcMessages.EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_SHOULD_BE_BINARYCOLUMN_3B5148FA); for (int i = 0; i < argument.getPositionCount(); i++) { if (argument.isNull(i)) { @@ -205,7 +208,7 @@ private void merge( public void evaluateIntermediate(int groupId, ColumnBuilder columnBuilder) { checkArgument( columnBuilder instanceof BinaryColumnBuilder, - "intermediate input and output should be BinaryColumn"); + CalcMessages.EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_SHOULD_BE_BINARYCOLUMN_3B5148FA); if (counts.get(groupId) == 0) { columnBuilder.appendNull(); @@ -245,7 +248,7 @@ public void evaluateFinal(int groupId, ColumnBuilder columnBuilder) { } break; default: - throw new UnsupportedOperationException("Unknown type: " + regressionType); + throw new UnsupportedOperationException(CalcMessages.UNKNOWN_TYPE + regressionType); } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedSumAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedSumAccumulator.java index 5c7673d7c7502..d01acb8fd5e57 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedSumAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedSumAccumulator.java @@ -21,6 +21,7 @@ import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.AggregationMask; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.BooleanBigArray; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.DoubleBigArray; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; @@ -54,7 +55,9 @@ public void setGroupCount(long groupCount) { @Override public void addInput(int[] groupIds, Column[] arguments, AggregationMask mask) { - checkArgument(arguments.length == 1, "argument of SUM should be one column"); + checkArgument( + arguments.length == 1, + CalcMessages.EXCEPTION_ARGUMENT_OF_SUM_SHOULD_BE_ONE_COLUMN_D6E636D1); switch (argumentDataType) { case INT32: addIntInput(groupIds, arguments[0], mask); @@ -77,7 +80,9 @@ public void addInput(int[] groupIds, Column[] arguments, AggregationMask mask) { case TIMESTAMP: default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in SUM Aggregation: %s", argumentDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_SUM_AGGREGATION_ARG_92F5A18D, + argumentDataType)); } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedUserDefinedAggregateAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedUserDefinedAggregateAccumulator.java index 2ef228b06624b..a488af0fe0d0c 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedUserDefinedAggregateAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedUserDefinedAggregateAccumulator.java @@ -109,7 +109,8 @@ public void addIntermediate(int[] groupIds, Column argument) { argument instanceof BinaryColumn || (argument instanceof RunLengthEncodedColumn && ((RunLengthEncodedColumn) argument).getValue() instanceof BinaryColumn), - "intermediate input and output of UDAF should be BinaryColumn"); + CalcMessages + .EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_OF_UDAF_SHOULD_BE_BINARYCOLUMN_6F28900F); for (int i = 0; i < groupIds.length; i++) { if (!argument.isNull(i)) { @@ -125,7 +126,8 @@ public void addIntermediate(int[] groupIds, Column argument) { public void evaluateIntermediate(int groupId, ColumnBuilder columnBuilder) { checkArgument( columnBuilder instanceof BinaryColumnBuilder, - "intermediate input and output of UDAF should be BinaryColumn"); + CalcMessages + .EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_OF_UDAF_SHOULD_BE_BINARYCOLUMN_6F28900F); if (stateArray.get(groupId) == null) { throw new IllegalStateException( String.format(CalcMessages.STATE_FOR_GROUP_NOT_FOUND, groupId)); diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedVarianceAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedVarianceAccumulator.java index 75446b2cfab11..9596da3401b79 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedVarianceAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/GroupedVarianceAccumulator.java @@ -23,6 +23,7 @@ import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.AggregationMask; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.DoubleBigArray; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.LongBigArray; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; @@ -90,7 +91,9 @@ public void addInput(int[] groupIds, Column[] arguments, AggregationMask mask) { case TIMESTAMP: default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in VARIANCE Aggregation: %s", seriesDataType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_VARIANCE_AGGREGATION_ARG_C641D425, + seriesDataType)); } } @@ -100,7 +103,7 @@ public void addIntermediate(int[] groupIds, Column argument) { argument instanceof BinaryColumn || (argument instanceof RunLengthEncodedColumn && ((RunLengthEncodedColumn) argument).getValue() instanceof BinaryColumn), - "intermediate input and output should be BinaryColumn"); + CalcMessages.EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_SHOULD_BE_BINARYCOLUMN_3B5148FA); for (int i = 0; i < argument.getPositionCount(); i++) { if (argument.isNull(i)) { @@ -131,7 +134,7 @@ public void addIntermediate(int[] groupIds, Column argument) { public void evaluateIntermediate(int groupId, ColumnBuilder columnBuilder) { checkArgument( columnBuilder instanceof BinaryColumnBuilder, - "intermediate input and output should be BinaryColumn"); + CalcMessages.EXCEPTION_INTERMEDIATE_INPUT_AND_OUTPUT_SHOULD_BE_BINARYCOLUMN_3B5148FA); if (counts.get(groupId) == 0) { columnBuilder.appendNull(); diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/HashAggregationOperator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/HashAggregationOperator.java index 997afd10f707d..7a58000f5ab88 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/HashAggregationOperator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/HashAggregationOperator.java @@ -24,6 +24,7 @@ import org.apache.iotdb.calc.execution.operator.Operator; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.builder.HashAggregationBuilder; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.builder.InMemoryHashAggregationBuilder; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.calc.plan.planner.memory.MemoryReservationManager; import org.apache.iotdb.commons.queryengine.execution.MemoryEstimationHelper; import org.apache.iotdb.commons.queryengine.plan.relational.planner.node.AggregationNode; @@ -126,7 +127,8 @@ public TsBlock next() throws Exception { } updateOccupiedMemorySize(); } else { - checkState(!aggregationBuilder.isFull(), "Aggregation buffer is full"); + checkState( + !aggregationBuilder.isFull(), CalcMessages.EXCEPTION_AGGREGATION_BUFFER_IS_FULL_233DAF3E); } // Each call only calculate at most once, no need to check time slice. diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/IntGroupedApproxMostFrequentAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/IntGroupedApproxMostFrequentAccumulator.java index a1271ef393ffb..1af46ec59551b 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/IntGroupedApproxMostFrequentAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/IntGroupedApproxMostFrequentAccumulator.java @@ -23,6 +23,7 @@ import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.IntApproxMostFrequentAccumulator; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.approximate.SpaceSaving; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.SpaceSavingBigArray; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.commons.exception.SemanticException; import org.apache.tsfile.block.column.Column; @@ -45,9 +46,9 @@ public void addInput(int[] groupIds, Column[] arguments, AggregationMask mask) { int capacity = arguments[2].getInt(0); if (maxBuckets <= 0 || capacity <= 0) { throw new SemanticException( - "The second and third argument must be greater than 0, but got k=" + CalcMessages.EXCEPTION_SECOND_THIRD_ARGUMENT_MUST_GREATER_THAN_0_BUT_GOT_K_0AFFFA6A + maxBuckets - + ", capacity=" + + CalcMessages.EXCEPTION_CAPACITY_E92593AD + capacity); } SpaceSavingBigArray spaceSavingBigArray = getOrCreateSpaceSaving(state); diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/LongGroupedApproxMostFrequentAccumulator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/LongGroupedApproxMostFrequentAccumulator.java index c3b2be2fa6a77..58b62309c523a 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/LongGroupedApproxMostFrequentAccumulator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/LongGroupedApproxMostFrequentAccumulator.java @@ -23,6 +23,7 @@ import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.LongApproxMostFrequentAccumulator; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.approximate.SpaceSaving; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.array.SpaceSavingBigArray; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.commons.exception.SemanticException; import org.apache.tsfile.block.column.Column; @@ -45,9 +46,9 @@ public void addInput(int[] groupIds, Column[] arguments, AggregationMask mask) { int capacity = arguments[2].getInt(0); if (maxBuckets <= 0 || capacity <= 0) { throw new SemanticException( - "The second and third argument must be greater than 0, but got k=" + CalcMessages.EXCEPTION_SECOND_THIRD_ARGUMENT_MUST_GREATER_THAN_0_BUT_GOT_K_0AFFFA6A + maxBuckets - + ", capacity=" + + CalcMessages.EXCEPTION_CAPACITY_E92593AD + capacity); } SpaceSavingBigArray spaceSavingBigArray = getOrCreateSpaceSaving(state); diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/StreamingAggregationOperator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/StreamingAggregationOperator.java index 7609ac32926a4..de47159122023 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/StreamingAggregationOperator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/StreamingAggregationOperator.java @@ -23,6 +23,7 @@ import org.apache.iotdb.calc.execution.operator.CommonOperatorContext; import org.apache.iotdb.calc.execution.operator.Operator; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.TableAggregator; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.calc.plan.planner.CommonOperatorUtils; import org.apache.iotdb.calc.utils.datastructure.SortKey; import org.apache.iotdb.commons.queryengine.execution.MemoryEstimationHelper; @@ -95,7 +96,7 @@ public StreamingAggregationOperator( aggregators.stream().map(TableAggregator::getType)) .collect(Collectors.toList())); this.resultColumnsBuilder = resultBuilder.getValueColumnBuilders(); - checkArgument(!spillEnabled, "spill is not supported"); + checkArgument(!spillEnabled, CalcMessages.EXCEPTION_SPILL_IS_NOT_SUPPORTED_E6E35549); } @Override @@ -145,7 +146,7 @@ public TsBlock next() throws Exception { } private void processInput(TsBlock page) { - requireNonNull(page, "page is null"); + requireNonNull(page, CalcMessages.EXCEPTION_PAGE_IS_NULL_4AA19E1C); if (currentGroup != null) { if (groupKeyComparator.compare(currentGroup, new SortKey(page, 0)) != 0) { diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/StreamingHashAggregationOperator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/StreamingHashAggregationOperator.java index 49c41bf7fa30f..b85a2d509737b 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/StreamingHashAggregationOperator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/grouped/StreamingHashAggregationOperator.java @@ -24,6 +24,7 @@ import org.apache.iotdb.calc.execution.operator.Operator; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.builder.HashAggregationBuilder; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.grouped.builder.InMemoryHashAggregationBuilder; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.calc.plan.planner.memory.MemoryReservationManager; import org.apache.iotdb.calc.utils.datastructure.SortKey; import org.apache.iotdb.commons.queryengine.execution.MemoryEstimationHelper; @@ -115,7 +116,7 @@ public StreamingHashAggregationOperator( this.preGroupedIndexInResult.length + this.unPreGroupedIndexInResult.length + aggregators.size(); - checkArgument(!spillEnabled, "spill is not supported"); + checkArgument(!spillEnabled, CalcMessages.EXCEPTION_SPILL_IS_NOT_SUPPORTED_E6E35549); aggregationBuilder = new InMemoryHashAggregationBuilder( aggregators, @@ -179,7 +180,7 @@ public TsBlock next() throws Exception { } private void processInput(TsBlock page) { - requireNonNull(page, "page is null"); + requireNonNull(page, CalcMessages.EXCEPTION_PAGE_IS_NULL_4AA19E1C); if (currentGroup != null) { if (groupKeyComparator.compare(currentGroup, new SortKey(page, 0)) != 0) { diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/relational/ColumnTransformerBuilder.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/relational/ColumnTransformerBuilder.java index a25188361af2d..729b0dbd6fa6c 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/relational/ColumnTransformerBuilder.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/relational/ColumnTransformerBuilder.java @@ -1498,8 +1498,9 @@ private ColumnTransformer getFunctionColumnTransformer( } throw new IllegalArgumentException( String.format( - "Unknown function %s on Node: %d.", - functionName, CommonDescriptor.getInstance().getConfig().getNodeId())); + CalcMessages.EXCEPTION_UNKNOWN_FUNCTION_ARG_NODE_ARG_927DA6A7, + functionName, + CommonDescriptor.getInstance().getConfig().getNodeId())); } @Override @@ -1575,7 +1576,8 @@ private static InMultiColumnTransformer constructInColumnTransformer( timestampSet.add(Long.parseLong(((GenericLiteral) value).getValue())); } else { throw new SemanticException( - "InList Literal for TIMESTAMP can only be LongLiteral, DoubleLiteral and GenericLiteral, current is " + CalcMessages + .EXCEPTION_INLIST_LITERAL_TIMESTAMP_CAN_ONLY_LONGLITERAL_DOUBLELITERAL_GENERICLITERAL_CURRENT_A3105E67 + value.getClass().getSimpleName()); } } catch (IllegalArgumentException e) { diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/schedule/queue/IndexedBlockingQueue.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/schedule/queue/IndexedBlockingQueue.java index 1aec747685841..fed7a6077a639 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/schedule/queue/IndexedBlockingQueue.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/schedule/queue/IndexedBlockingQueue.java @@ -111,7 +111,8 @@ public synchronized E remove(ID id) { return null; } size--; - Preconditions.checkState(size >= 0, "The size of readyQueue cannot be negative."); + Preconditions.checkState( + size >= 0, CalcMessages.EXCEPTION_THE_SIZE_OF_READYQUEUE_CANNOT_BE_NEGATIVE_DOT_01D8D0CB); return output; } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/plan/planner/TableOperatorGenerator.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/plan/planner/TableOperatorGenerator.java index a59016030e7c8..047e79e51d653 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/plan/planner/TableOperatorGenerator.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/plan/planner/TableOperatorGenerator.java @@ -576,7 +576,10 @@ private int getColumnIndex(Symbol symbol, PlanNode node) { channel++; } throw new IllegalStateException( - String.format("Found no column %s in %s", symbol, node.getOutputSymbols())); + String.format( + CalcMessages.EXCEPTION_FOUND_NO_COLUMN_ARG_ARG_8CF632F7, + symbol, + node.getOutputSymbols())); } @Override @@ -903,7 +906,9 @@ protected void genSortInformation( if (i == null) { throw new IllegalStateException( String.format( - "Sort Item %s is not included in children's output columns", sortItem)); + CalcMessages + .EXCEPTION_SORT_ITEM_ARG_NOT_INCLUDED_CHILDREN_S_OUTPUT_COLUMNS_CC911999, + sortItem)); } sortItemIndexList.add(i); sortItemDataTypeList.add(getTSDataType(typeProvider.getTableModelType(sortItem))); @@ -979,7 +984,7 @@ public Operator visitJoin(JoinNode node, C context) { Integer index = leftColumnNamesMap.get(node.getLeftOutputSymbols().get(i)); if (index == null) { throw new IllegalStateException( - "Left child of JoinNode doesn't contain LeftOutputSymbol " + CalcMessages.EXCEPTION_LEFT_CHILD_JOINNODE_DOESN_T_CONTAIN_LEFTOUTPUTSYMBOL_0C8AA216 + node.getLeftOutputSymbols().get(i)); } leftOutputSymbolIdx[i] = index; @@ -992,7 +997,7 @@ public Operator visitJoin(JoinNode node, C context) { Integer index = rightColumnNamesMap.get(node.getRightOutputSymbols().get(i)); if (index == null) { throw new IllegalStateException( - "Right child of JoinNode doesn't contain RightOutputSymbol " + CalcMessages.EXCEPTION_RIGHT_CHILD_JOINNODE_DOESN_T_CONTAIN_RIGHTOUTPUTSYMBOL_10A86F63 + node.getLeftOutputSymbols().get(i)); } rightOutputSymbolIdx[i] = index; @@ -1051,13 +1056,15 @@ public Operator visitJoin(JoinNode node, C context) { Integer leftAsofJoinKeyPosition = leftColumnNamesMap.get(asofJoinClause.getLeft()); if (leftAsofJoinKeyPosition == null) { throw new IllegalStateException( - "Left child of JoinNode doesn't contain left ASOF main join key."); + CalcMessages + .EXCEPTION_LEFT_CHILD_JOINNODE_DOESN_T_CONTAIN_LEFT_ASOF_MAIN_JOIN_2850234A); } leftJoinKeyPositions[equiSize] = leftAsofJoinKeyPosition; Integer rightAsofJoinKeyPosition = rightColumnNamesMap.get(asofJoinClause.getRight()); if (rightAsofJoinKeyPosition == null) { throw new IllegalStateException( - "Right child of JoinNode doesn't contain right ASOF main join key."); + CalcMessages + .EXCEPTION_RIGHT_CHILD_JOINNODE_DOESN_T_CONTAIN_RIGHT_ASOF_MAIN_JOIN_1A9631C9); } rightJoinKeyPositions[equiSize] = rightAsofJoinKeyPosition; @@ -1168,11 +1175,15 @@ protected void semanticCheckForJoin(JoinNode node) { checkArgument( !node.getFilter().isPresent() || node.getFilter().get().equals(TRUE_LITERAL), String.format( - "Filter is not supported in %s. Filter is %s.", - node.getJoinType(), node.getFilter().map(Expression::toString).orElse("null"))); + CalcMessages.EXCEPTION_FILTER_IS_NOT_SUPPORTED_IN_ARG_DOT_FILTER_IS_ARG_DOT_417C4F3C, + node.getJoinType(), + node.getFilter() + .map(Expression::toString) + .orElse(CalcMessages.EXCEPTION_NULL_9B41EF67))); checkArgument( !node.getCriteria().isEmpty() || node.getAsofCriteria().isPresent(), - String.format("%s must have join keys.", node.getJoinType())); + String.format( + CalcMessages.EXCEPTION_ARG_MUST_HAVE_JOIN_KEYS_DOT_C24DAB2D, node.getJoinType())); } catch (IllegalArgumentException e) { throw new SemanticException(e.getMessage()); } @@ -1225,7 +1236,10 @@ public Operator visitSemiJoin(SemiJoinNode node, C context) { int[] sourceOutputSymbolIdx = new int[node.getSource().getOutputSymbols().size()]; for (int i = 0; i < sourceOutputSymbolIdx.length; i++) { Integer index = sourceColumnNamesMap.get(sourceOutputSymbols.get(i)); - checkNotNull(index, "Source of SemiJoinNode doesn't contain sourceOutputSymbol."); + checkNotNull( + index, + CalcMessages + .EXCEPTION_SOURCE_OF_SEMIJOINNODE_DOESN_QUOTE_T_CONTAIN_SOURCEOUTPUTSYMBOL_DOT_527996EC); sourceOutputSymbolIdx[i] = index; } @@ -1233,13 +1247,17 @@ public Operator visitSemiJoin(SemiJoinNode node, C context) { makeLayoutFromOutputSymbols(node.getRightChild().getOutputSymbols()); Integer sourceJoinKeyPosition = sourceColumnNamesMap.get(node.getSourceJoinSymbol()); - checkNotNull(sourceJoinKeyPosition, "Source of SemiJoinNode doesn't contain sourceJoinSymbol."); + checkNotNull( + sourceJoinKeyPosition, + CalcMessages + .EXCEPTION_SOURCE_OF_SEMIJOINNODE_DOESN_QUOTE_T_CONTAIN_SOURCEJOINSYMBOL_DOT_32209273); Integer filteringSourceJoinKeyPosition = filteringSourceColumnNamesMap.get(node.getFilteringSourceJoinSymbol()); checkNotNull( filteringSourceJoinKeyPosition, - "FilteringSource of SemiJoinNode doesn't contain filteringSourceJoinSymbol."); + CalcMessages + .EXCEPTION_FILTERINGSOURCE_OF_SEMIJOINNODE_DOESN_QUOTE_T_CONTAIN_FILTERINGSOURCEJOINSYMBOL__1B75DDE2); Type sourceJoinKeyType = context.getTableTypeProvider().getTableModelType(node.getSourceJoinSymbol()); @@ -1265,9 +1283,9 @@ public Operator visitSemiJoin(SemiJoinNode node, C context) { protected void checkIfJoinKeyTypeMatches(Type leftJoinKeyType, Type rightJoinKeyType) { if (leftJoinKeyType != rightJoinKeyType) { throw new SemanticException( - "Join key type mismatch. Left join key type: " + CalcMessages.EXCEPTION_JOIN_KEY_TYPE_MISMATCH_LEFT_JOIN_KEY_TYPE_072E692E + leftJoinKeyType - + ", right join key type: " + + CalcMessages.EXCEPTION_RIGHT_JOIN_KEY_TYPE_56895767 + rightJoinKeyType); } } @@ -2240,7 +2258,7 @@ public Operator visitValuesNode(ValuesNode node, C context) { new Column[0]); return new ValuesOperator(operatorContext, ImmutableList.of(oneRowWithoutColumnsBlock)); } else { - throw new IllegalArgumentException("Row count must be 0 or 1"); + throw new IllegalArgumentException(CalcMessages.EXCEPTION_ROW_COUNT_MUST_0_1_8D44189F); } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/plan/relational/metadata/CommonMetadataUtils.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/plan/relational/metadata/CommonMetadataUtils.java index 4a2cfe159a068..e61218e669100 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/plan/relational/metadata/CommonMetadataUtils.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/plan/relational/metadata/CommonMetadataUtils.java @@ -19,6 +19,7 @@ package org.apache.iotdb.calc.plan.relational.metadata; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.commons.exception.IoTDBException; import org.apache.iotdb.commons.exception.SemanticException; import org.apache.iotdb.commons.exception.table.TableNotExistsException; @@ -184,7 +185,7 @@ public static void throwTableNotExistsException(final String database, final Str public static void throwColumnNotExistsException(final Object columnName) { throw new SemanticException( new IoTDBException( - String.format("Column '%s' cannot be resolved.", columnName), + String.format(CalcMessages.EXCEPTION_COLUMN_ARG_CANNOT_RESOLVED_508579EC, columnName), TSStatusCode.COLUMN_NOT_EXISTS.getStatusCode())); } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/plan/relational/utils/matching/Captures.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/plan/relational/utils/matching/Captures.java index ae8762c7a91b2..eec38c8451f98 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/plan/relational/utils/matching/Captures.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/plan/relational/utils/matching/Captures.java @@ -18,6 +18,8 @@ */ package org.apache.iotdb.calc.plan.relational.utils.matching; +import org.apache.iotdb.calc.i18n.CalcMessages; + import java.util.NoSuchElementException; import java.util.Objects; @@ -53,7 +55,8 @@ public Captures addAll(Captures other) { public T get(Capture capture) { if (this.equals(NIL)) { throw new NoSuchElementException( - "Requested value for unknown Capture. Was it registered in the Pattern?"); + CalcMessages + .EXCEPTION_REQUESTED_VALUE_UNKNOWN_CAPTURE_WAS_IT_REGISTERED_PATTERN_C77DF7E9); } if (this.capture.equals(capture)) { return (T) value; diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/plan/relational/utils/matching/Match.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/plan/relational/utils/matching/Match.java index a2d90d860a475..9650a6e81bf7f 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/plan/relational/utils/matching/Match.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/plan/relational/utils/matching/Match.java @@ -18,6 +18,8 @@ */ package org.apache.iotdb.calc.plan.relational.utils.matching; +import org.apache.iotdb.calc.i18n.CalcMessages; + import java.util.Objects; import static com.google.common.base.MoreObjects.toStringHelper; @@ -31,7 +33,7 @@ public static Match of(Captures captures) { private final Captures captures; private Match(Captures captures) { - this.captures = requireNonNull(captures, "captures is null"); + this.captures = requireNonNull(captures, CalcMessages.EXCEPTION_CAPTURES_IS_NULL_75EACA5A); } public T capture(Capture capture) { diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/plan/relational/utils/matching/Pattern.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/plan/relational/utils/matching/Pattern.java index 4fc225b7773d9..5fb7f8bcdb6b3 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/plan/relational/utils/matching/Pattern.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/plan/relational/utils/matching/Pattern.java @@ -18,6 +18,7 @@ */ package org.apache.iotdb.calc.plan.relational.utils.matching; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.calc.plan.relational.utils.matching.pattern.CapturePattern; import org.apache.iotdb.calc.plan.relational.utils.matching.pattern.FilterPattern; import org.apache.iotdb.calc.plan.relational.utils.matching.pattern.TypeOfPattern; @@ -45,11 +46,11 @@ public static Pattern typeOf(Class expectedClass) { } protected Pattern(Pattern previous) { - this(Optional.of(requireNonNull(previous, "previous is null"))); + this(Optional.of(requireNonNull(previous, CalcMessages.EXCEPTION_PREVIOUS_IS_NULL_056F5D52))); } protected Pattern(Optional> previous) { - this.previous = requireNonNull(previous, "previous is null"); + this.previous = requireNonNull(previous, CalcMessages.EXCEPTION_PREVIOUS_IS_NULL_056F5D52); } // FIXME make sure there's a proper toString, diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/plan/relational/utils/matching/Property.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/plan/relational/utils/matching/Property.java index 7cf028299b9d0..64b58539a3de9 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/plan/relational/utils/matching/Property.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/plan/relational/utils/matching/Property.java @@ -18,6 +18,7 @@ */ package org.apache.iotdb.calc.plan.relational.utils.matching; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.calc.plan.relational.utils.matching.pattern.EqualsPattern; import org.apache.iotdb.calc.plan.relational.utils.matching.pattern.FilterPattern; @@ -53,8 +54,8 @@ public static Property optionalProperty( } public Property(String name, BiFunction> function) { - this.name = requireNonNull(name, "name is null"); - this.function = requireNonNull(function, "function is null"); + this.name = requireNonNull(name, CalcMessages.EXCEPTION_NAME_IS_NULL_C8B35959); + this.function = requireNonNull(function, CalcMessages.EXCEPTION_FUNCTION_IS_NULL_E0FA4B62); } public String getName() { diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/plan/relational/utils/matching/PropertyPattern.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/plan/relational/utils/matching/PropertyPattern.java index 9c2b9cb658692..dd73fce633157 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/plan/relational/utils/matching/PropertyPattern.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/plan/relational/utils/matching/PropertyPattern.java @@ -18,6 +18,8 @@ */ package org.apache.iotdb.calc.plan.relational.utils.matching; +import org.apache.iotdb.calc.i18n.CalcMessages; + import static java.util.Objects.requireNonNull; public class PropertyPattern { @@ -30,8 +32,8 @@ public static PropertyPattern of( } private PropertyPattern(Property property, Pattern pattern) { - this.property = requireNonNull(property, "property is null"); - this.pattern = requireNonNull(pattern, "pattern is null"); + this.property = requireNonNull(property, CalcMessages.EXCEPTION_PROPERTY_IS_NULL_1C6980FF); + this.pattern = requireNonNull(pattern, CalcMessages.EXCEPTION_PATTERN_IS_NULL_AC4E239A); } public Property getProperty() { diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/plan/relational/utils/matching/pattern/CapturePattern.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/plan/relational/utils/matching/pattern/CapturePattern.java index a425cb82ede46..6576f949c21cc 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/plan/relational/utils/matching/pattern/CapturePattern.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/plan/relational/utils/matching/pattern/CapturePattern.java @@ -18,6 +18,7 @@ */ package org.apache.iotdb.calc.plan.relational.utils.matching.pattern; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.calc.plan.relational.utils.matching.Capture; import org.apache.iotdb.calc.plan.relational.utils.matching.Captures; import org.apache.iotdb.calc.plan.relational.utils.matching.Match; @@ -33,7 +34,7 @@ public class CapturePattern extends Pattern { public CapturePattern(Capture capture, Pattern previous) { super(previous); - this.capture = requireNonNull(capture, "capture is null"); + this.capture = requireNonNull(capture, CalcMessages.EXCEPTION_CAPTURE_IS_NULL_C54AA710); } public Capture capture() { diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/plan/relational/utils/matching/pattern/EqualsPattern.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/plan/relational/utils/matching/pattern/EqualsPattern.java index b08db4d14026d..6ca3b560f4a5b 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/plan/relational/utils/matching/pattern/EqualsPattern.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/plan/relational/utils/matching/pattern/EqualsPattern.java @@ -18,6 +18,7 @@ */ package org.apache.iotdb.calc.plan.relational.utils.matching.pattern; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.calc.plan.relational.utils.matching.Captures; import org.apache.iotdb.calc.plan.relational.utils.matching.Match; import org.apache.iotdb.calc.plan.relational.utils.matching.Pattern; @@ -34,7 +35,10 @@ public class EqualsPattern extends Pattern { public EqualsPattern(T expectedValue, Optional> previous) { super(previous); this.expectedValue = - requireNonNull(expectedValue, "expectedValue can't be null. Use isNull() pattern instead."); + requireNonNull( + expectedValue, + CalcMessages + .EXCEPTION_EXPECTEDVALUE_CAN_QUOTE_T_BE_NULL_DOT_USE_ISNULL_LEFT_PAREN_RIGHT_PAREN_PATTERN__FC25E374); } public T expectedValue() { diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/plan/relational/utils/matching/pattern/FilterPattern.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/plan/relational/utils/matching/pattern/FilterPattern.java index 8c882f1ae8e42..29944314338b5 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/plan/relational/utils/matching/pattern/FilterPattern.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/plan/relational/utils/matching/pattern/FilterPattern.java @@ -18,6 +18,7 @@ */ package org.apache.iotdb.calc.plan.relational.utils.matching.pattern; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.calc.plan.relational.utils.matching.Captures; import org.apache.iotdb.calc.plan.relational.utils.matching.Match; import org.apache.iotdb.calc.plan.relational.utils.matching.Pattern; @@ -34,7 +35,7 @@ public class FilterPattern extends Pattern { public FilterPattern(BiPredicate predicate, Optional> previous) { super(previous); - this.predicate = requireNonNull(predicate, "predicate is null"); + this.predicate = requireNonNull(predicate, CalcMessages.EXCEPTION_PREDICATE_IS_NULL_22E687A9); } public BiPredicate predicate() { diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/plan/relational/utils/matching/pattern/TypeOfPattern.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/plan/relational/utils/matching/pattern/TypeOfPattern.java index a60bcb0355b6b..fb11d6964650d 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/plan/relational/utils/matching/pattern/TypeOfPattern.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/plan/relational/utils/matching/pattern/TypeOfPattern.java @@ -18,6 +18,7 @@ */ package org.apache.iotdb.calc.plan.relational.utils.matching.pattern; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.calc.plan.relational.utils.matching.Captures; import org.apache.iotdb.calc.plan.relational.utils.matching.Match; import org.apache.iotdb.calc.plan.relational.utils.matching.Pattern; @@ -37,7 +38,8 @@ public TypeOfPattern(Class expectedClass) { public TypeOfPattern(Class expectedClass, Optional> previous) { super(previous); - this.expectedClass = requireNonNull(expectedClass, "expectedClass is null"); + this.expectedClass = + requireNonNull(expectedClass, CalcMessages.EXCEPTION_EXPECTEDCLASS_IS_NULL_B619CCC7); } public Class expectedClass() { diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/plan/relational/utils/matching/pattern/WithPattern.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/plan/relational/utils/matching/pattern/WithPattern.java index 9daf7b8725a72..8571cb1b537e7 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/plan/relational/utils/matching/pattern/WithPattern.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/plan/relational/utils/matching/pattern/WithPattern.java @@ -18,6 +18,7 @@ */ package org.apache.iotdb.calc.plan.relational.utils.matching.pattern; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.calc.plan.relational.utils.matching.Captures; import org.apache.iotdb.calc.plan.relational.utils.matching.Match; import org.apache.iotdb.calc.plan.relational.utils.matching.Pattern; @@ -36,7 +37,8 @@ public class WithPattern extends Pattern { public WithPattern(PropertyPattern propertyPattern, Pattern previous) { super(previous); - this.propertyPattern = requireNonNull(propertyPattern, "propertyPattern is null"); + this.propertyPattern = + requireNonNull(propertyPattern, CalcMessages.EXCEPTION_PROPERTYPATTERN_IS_NULL_37185AE7); } public Pattern getPattern() { diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/service/AbstractTemporaryQueryDataFileService.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/service/AbstractTemporaryQueryDataFileService.java index 11c7d62a3c23c..c3e9d18f6fef9 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/service/AbstractTemporaryQueryDataFileService.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/service/AbstractTemporaryQueryDataFileService.java @@ -94,14 +94,20 @@ public void deregister(String queryId) { recorder.closeFile(); } catch (IOException e) { logger.warn( - String.format("Failed to close file in method deregister(%s), because %s", queryId, e)); + String.format( + CalcMessages.LOG_FAILED_CLOSE_FILE_METHOD_DEREGISTER_ARG_BECAUSE_ARG_1744AC60, + queryId, + e)); } } try { FileUtils.deleteDirectory(SystemFileFactory.INSTANCE.getFile(getDirName(queryId))); } catch (IOException e) { logger.warn( - String.format("Failed to clean dir in method deregister(%s), because %s", queryId, e)); + String.format( + CalcMessages.LOG_FAILED_CLEAN_DIR_METHOD_DEREGISTER_ARG_BECAUSE_ARG_F53193E5, + queryId, + e)); } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/AbstractCaseWhenThenColumnTransformer.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/AbstractCaseWhenThenColumnTransformer.java index 4f95b16d1cbf2..5603bde031d1a 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/AbstractCaseWhenThenColumnTransformer.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/AbstractCaseWhenThenColumnTransformer.java @@ -19,6 +19,8 @@ package org.apache.iotdb.calc.transformation.dag.column; +import org.apache.iotdb.calc.i18n.CalcMessages; + import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; import org.apache.tsfile.external.commons.lang3.Validate; @@ -42,7 +44,8 @@ protected AbstractCaseWhenThenColumnTransformer( super(returnType); Validate.isTrue( whenTransformers.size() == thenTransformers.size(), - "the size between whenTransformers and thenTransformers needs to be same"); + CalcMessages + .EXCEPTION_THE_SIZE_BETWEEN_WHENTRANSFORMERS_AND_THENTRANSFORMERS_NEEDS_TO_BE_SAME_AC796883); this.whenThenTransformers = new ArrayList<>(); for (int i = 0; i < whenTransformers.size(); i++) { this.whenThenTransformers.add(new Pair<>(whenTransformers.get(i), thenTransformers.get(i))); diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/ColumnCache.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/ColumnCache.java index 24d537e2e5d92..6ada45d6d10e4 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/ColumnCache.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/ColumnCache.java @@ -19,6 +19,8 @@ package org.apache.iotdb.calc.transformation.dag.column; +import org.apache.iotdb.calc.i18n.CalcMessages; + import org.apache.tsfile.block.column.Column; import static com.google.common.base.Preconditions.checkArgument; @@ -34,7 +36,8 @@ public ColumnCache() { public Column getColumn() { referenceCount--; - checkArgument(referenceCount >= 0, "Exceed max call times of getColumn"); + checkArgument( + referenceCount >= 0, CalcMessages.EXCEPTION_EXCEED_MAX_CALL_TIMES_OF_GETCOLUMN_69C77C7E); Column res = this.column; // set column to null for memory control if (referenceCount == 0) { diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/binary/Like2ColumnTransformer.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/binary/Like2ColumnTransformer.java index 508d9b9dc6f97..25e3d0cb05895 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/binary/Like2ColumnTransformer.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/binary/Like2ColumnTransformer.java @@ -19,6 +19,7 @@ package org.apache.iotdb.calc.transformation.dag.column.binary; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.calc.transformation.dag.column.ColumnTransformer; import org.apache.tsfile.block.column.Column; @@ -42,11 +43,13 @@ public Like2ColumnTransformer( protected void checkType() { if (!isCharType(leftTransformer.getType())) { throw new UnsupportedOperationException( - "Unsupported Type: " + leftTransformer.getType().getTypeEnum()); + CalcMessages.EXCEPTION_UNSUPPORTED_TYPE_FF7F518D + + leftTransformer.getType().getTypeEnum()); } if (!isCharType(rightTransformer.getType())) { throw new UnsupportedOperationException( - "Unsupported Type: " + rightTransformer.getType().getTypeEnum()); + CalcMessages.EXCEPTION_UNSUPPORTED_TYPE_FF7F518D + + rightTransformer.getType().getTypeEnum()); } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/binary/factory/HmacStrategiesFactory.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/binary/factory/HmacStrategiesFactory.java index 25e7c5a5f9d92..6d7fb46fb21b7 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/binary/factory/HmacStrategiesFactory.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/binary/factory/HmacStrategiesFactory.java @@ -19,6 +19,7 @@ package org.apache.iotdb.calc.transformation.dag.column.binary.factory; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.calc.transformation.dag.column.binary.strategies.HmacStrategy; import org.apache.iotdb.commons.exception.SemanticException; @@ -53,7 +54,8 @@ public static HmacStrategy createConstantKeyHmacMd5Strategy(byte[] constantKey) hashFunction = Hashing.hmacMd5(constantKey); } catch (IllegalArgumentException e) { throw new SemanticException( - "Failed to execute function hmac_md5 due to an invalid input format, the empty key is not allowed in HMAC operation."); + CalcMessages + .EXCEPTION_FAILED_EXECUTE_FUNCTION_HMAC_MD5_INVALID_INPUT_FORMAT_EMPTY_KEY_DED1C525); } return (data, ignoredKey) -> hashFunction.hashBytes(data).asBytes(); } @@ -64,7 +66,8 @@ public static HmacStrategy createConstantKeyHmacSha1Strategy(byte[] constantKey) hashFunction = Hashing.hmacSha1(constantKey); } catch (IllegalArgumentException e) { throw new SemanticException( - "Failed to execute function hmac_sha1 due to an invalid input format, the empty key is not allowed in HMAC operation."); + CalcMessages + .EXCEPTION_FAILED_EXECUTE_FUNCTION_HMAC_SHA1_INVALID_INPUT_FORMAT_EMPTY_KEY_518063E5); } return (data, ignoredKey) -> hashFunction.hashBytes(data).asBytes(); } @@ -75,7 +78,8 @@ public static HmacStrategy createConstantKeyHmacSha256Strategy(byte[] constantKe hashFunction = Hashing.hmacSha256(constantKey); } catch (IllegalArgumentException e) { throw new SemanticException( - "Failed to execute function hmac_sha256 due to an invalid input format, the empty key is not allowed in HMAC operation."); + CalcMessages + .EXCEPTION_FAILED_EXECUTE_FUNCTION_HMAC_SHA256_INVALID_INPUT_FORMAT_EMPTY_KEY_2F6AD64E); } return (data, ignoredKey) -> hashFunction.hashBytes(data).asBytes(); } @@ -86,7 +90,8 @@ public static HmacStrategy createConstantKeyHmacSha512Strategy(byte[] constantKe hashFunction = Hashing.hmacSha512(constantKey); } catch (IllegalArgumentException e) { throw new SemanticException( - "Failed to execute function hmac_sha512 due to an invalid input format, the empty key is not allowed in HMAC operation."); + CalcMessages + .EXCEPTION_FAILED_EXECUTE_FUNCTION_HMAC_SHA512_INVALID_INPUT_FORMAT_EMPTY_KEY_3671AF09); } return (data, ignoredKey) -> hashFunction.hashBytes(data).asBytes(); } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/multi/AbstractGreatestLeastColumnTransformer.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/multi/AbstractGreatestLeastColumnTransformer.java index 434f371d0d38a..bde0f970e0207 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/multi/AbstractGreatestLeastColumnTransformer.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/multi/AbstractGreatestLeastColumnTransformer.java @@ -19,6 +19,7 @@ package org.apache.iotdb.calc.transformation.dag.column.multi; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.calc.transformation.dag.column.ColumnTransformer; import org.apache.tsfile.block.column.Column; @@ -78,7 +79,7 @@ public static ColumnTransformer getGreatestColumnTransformer( return new BinaryGreatestColumnTransformer(type, columnTransformers); default: throw new UnsupportedOperationException( - String.format("Unsupported data type: %s", typeEnum)); + String.format(CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_ARG_B411C29E, typeEnum)); } } @@ -103,7 +104,7 @@ public static ColumnTransformer getLeastColumnTransformer( return new BinaryLeastColumnTransformer(type, columnTransformers); default: throw new UnsupportedOperationException( - String.format("Unsupported data type: %s", typeEnum)); + String.format(CalcMessages.EXCEPTION_UNSUPPORTED_DATA_TYPE_ARG_B411C29E, typeEnum)); } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/multi/LogicalAndMultiColumnTransformer.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/multi/LogicalAndMultiColumnTransformer.java index 2011f0ccc57c1..7e8dce8502e6c 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/multi/LogicalAndMultiColumnTransformer.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/multi/LogicalAndMultiColumnTransformer.java @@ -19,6 +19,7 @@ package org.apache.iotdb.calc.transformation.dag.column.multi; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.calc.transformation.dag.column.ColumnTransformer; import org.apache.tsfile.block.column.Column; @@ -117,6 +118,7 @@ protected void doTransform( List childrenColumns, ColumnBuilder builder, int positionCount, boolean[] selection) { // do nothing throw new UnsupportedOperationException( - "LogicalAndMultiColumnTransformer do not support doTransform with selection"); + CalcMessages + .EXCEPTION_LOGICALANDMULTICOLUMNTRANSFORMER_DO_NOT_SUPPORT_DOTRANSFORM_SELECTION_2507527D); } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/multi/LogicalOrMultiColumnTransformer.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/multi/LogicalOrMultiColumnTransformer.java index a7ae49f2b7f7e..326948200130c 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/multi/LogicalOrMultiColumnTransformer.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/multi/LogicalOrMultiColumnTransformer.java @@ -19,6 +19,7 @@ package org.apache.iotdb.calc.transformation.dag.column.multi; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.calc.transformation.dag.column.ColumnTransformer; import org.apache.tsfile.block.column.Column; @@ -117,6 +118,7 @@ protected void doTransform( List childrenColumns, ColumnBuilder builder, int positionCount, boolean[] selection) { // do nothing throw new UnsupportedOperationException( - "LogicalOrMultiColumnTransformer do not support doTransform with selection"); + CalcMessages + .EXCEPTION_LOGICALORMULTICOLUMNTRANSFORMER_DO_NOT_SUPPORT_DOTRANSFORM_SELECTION_E3A2B2FA); } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/ternary/Like3ColumnTransformer.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/ternary/Like3ColumnTransformer.java index 5cbdb29f9e101..dfddd2c34d5e7 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/ternary/Like3ColumnTransformer.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/ternary/Like3ColumnTransformer.java @@ -19,6 +19,7 @@ package org.apache.iotdb.calc.transformation.dag.column.ternary; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.calc.transformation.dag.column.ColumnTransformer; import org.apache.tsfile.block.column.Column; @@ -43,15 +44,18 @@ public Like3ColumnTransformer( protected void checkType() { if (!isCharType(firstColumnTransformer.getType())) { throw new UnsupportedOperationException( - "Unsupported Type: " + firstColumnTransformer.getType().getTypeEnum()); + CalcMessages.EXCEPTION_UNSUPPORTED_TYPE_FF7F518D + + firstColumnTransformer.getType().getTypeEnum()); } if (!isCharType(secondColumnTransformer.getType())) { throw new UnsupportedOperationException( - "Unsupported Type: " + secondColumnTransformer.getType().getTypeEnum()); + CalcMessages.EXCEPTION_UNSUPPORTED_TYPE_FF7F518D + + secondColumnTransformer.getType().getTypeEnum()); } if (!isCharType(thirdColumnTransformer.getType())) { throw new UnsupportedOperationException( - "Unsupported Type: " + thirdColumnTransformer.getType().getTypeEnum()); + CalcMessages.EXCEPTION_UNSUPPORTED_TYPE_FF7F518D + + thirdColumnTransformer.getType().getTypeEnum()); } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/ternary/utils/BytePaddingUtils.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/ternary/utils/BytePaddingUtils.java index e944540a2f7b4..199cecaec4abc 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/ternary/utils/BytePaddingUtils.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/ternary/utils/BytePaddingUtils.java @@ -19,6 +19,7 @@ package org.apache.iotdb.calc.transformation.dag.column.ternary.utils; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.commons.exception.SemanticException; public class BytePaddingUtils { @@ -42,15 +43,20 @@ public static byte[] padBytes( if (targetLength < 0 || targetLength > Integer.MAX_VALUE) { throw new SemanticException( String.format( - "Failed to execute function '%s' due to the value %s corresponding to a invalid target size, the allowed range is [0, %d].", - functionName, HexToString(originBytes), Integer.MAX_VALUE)); + CalcMessages + .EXCEPTION_FAILED_EXECUTE_FUNCTION_ARG_VALUE_ARG_CORRESPONDING_INVALID_TARGET_SIZE_5054AE0B, + functionName, + HexToString(originBytes), + Integer.MAX_VALUE)); } if (paddingByte.length == 0) { throw new SemanticException( String.format( - "Failed to execute function '%s' due the value %s corresponding to a empty padding string.", - functionName, HexToString(originBytes))); + CalcMessages + .EXCEPTION_FAILED_EXECUTE_FUNCTION_ARG_VALUE_ARG_CORRESPONDING_EMPTY_PADDING_STRING_F1CE573C, + functionName, + HexToString(originBytes))); } int inputLength = originBytes.length; diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/udf/UserDefineScalarFunctionTransformer.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/udf/UserDefineScalarFunctionTransformer.java index 4e22315b62868..94e9eada0c048 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/udf/UserDefineScalarFunctionTransformer.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/udf/UserDefineScalarFunctionTransformer.java @@ -20,6 +20,7 @@ package org.apache.iotdb.calc.transformation.dag.column.udf; import org.apache.iotdb.calc.execution.operator.source.relational.aggregation.RecordIterator; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.calc.transformation.dag.column.ColumnTransformer; import org.apache.iotdb.calc.transformation.dag.column.multi.MultiColumnTransformer; import org.apache.iotdb.udf.api.relational.ScalarFunction; @@ -61,7 +62,7 @@ protected void doTransform( } } catch (Exception e) { throw new RuntimeException( - "Error occurs when evaluating user-defined scalar function " + CalcMessages.EXCEPTION_ERROR_OCCURS_EVALUATING_USER_DEFINED_SCALAR_FUNCTION_05903C18 + scalarFunction.getClass().getName(), e); } @@ -88,7 +89,7 @@ protected void doTransform( } } catch (Throwable e) { throw new RuntimeException( - "Error occurs when evaluating user-defined scalar function " + CalcMessages.EXCEPTION_ERROR_OCCURS_EVALUATING_USER_DEFINED_SCALAR_FUNCTION_05903C18 + scalarFunction.getClass().getName(), e); } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/ArithmeticNegationColumnTransformer.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/ArithmeticNegationColumnTransformer.java index 2fa77f1970978..1c0ef6677a7ed 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/ArithmeticNegationColumnTransformer.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/ArithmeticNegationColumnTransformer.java @@ -19,6 +19,7 @@ package org.apache.iotdb.calc.transformation.dag.column.unary; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.calc.transformation.dag.column.ColumnTransformer; import org.apache.tsfile.block.column.Column; @@ -59,7 +60,8 @@ protected void doTransform(Column column, ColumnBuilder columnBuilder, boolean[] protected final void checkType() { if (!childColumnTransformer.isReturnTypeNumeric()) { throw new UnsupportedOperationException( - "Unsupported Type: " + childColumnTransformer.getType().toString()); + CalcMessages.EXCEPTION_UNSUPPORTED_TYPE_FF7F518D + + childColumnTransformer.getType().toString()); } } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/LikeColumnTransformer.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/LikeColumnTransformer.java index 26821874e2734..787443ef459d5 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/LikeColumnTransformer.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/LikeColumnTransformer.java @@ -19,6 +19,7 @@ package org.apache.iotdb.calc.transformation.dag.column.unary; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.calc.transformation.dag.column.ColumnTransformer; import org.apache.tsfile.block.column.Column; @@ -68,7 +69,8 @@ protected void doTransform(Column column, ColumnBuilder columnBuilder, boolean[] protected void checkType() { if (!isCharType(childColumnTransformer.getType())) { throw new UnsupportedOperationException( - "Unsupported Type: " + childColumnTransformer.getType().getTypeEnum()); + CalcMessages.EXCEPTION_UNSUPPORTED_TYPE_FF7F518D + + childColumnTransformer.getType().getTypeEnum()); } } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/LogicNotColumnTransformer.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/LogicNotColumnTransformer.java index d1ec093087f93..3de964dfdcb22 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/LogicNotColumnTransformer.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/LogicNotColumnTransformer.java @@ -19,6 +19,7 @@ package org.apache.iotdb.calc.transformation.dag.column.unary; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.calc.transformation.dag.column.ColumnTransformer; import org.apache.tsfile.block.column.Column; @@ -59,7 +60,8 @@ protected void doTransform(Column column, ColumnBuilder columnBuilder, boolean[] protected void checkType() { if (!(childColumnTransformer.typeEquals(TypeEnum.BOOLEAN))) { throw new UnsupportedOperationException( - "Unsupported Type: " + childColumnTransformer.getType().getTypeEnum()); + CalcMessages.EXCEPTION_UNSUPPORTED_TYPE_FF7F518D + + childColumnTransformer.getType().getTypeEnum()); } } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/RegularColumnTransformer.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/RegularColumnTransformer.java index 0f7c08cb0d17b..7271ed3a71c1e 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/RegularColumnTransformer.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/RegularColumnTransformer.java @@ -19,6 +19,7 @@ package org.apache.iotdb.calc.transformation.dag.column.unary; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.calc.transformation.dag.column.ColumnTransformer; import org.apache.tsfile.block.column.Column; @@ -81,7 +82,8 @@ protected void doTransform(Column column, ColumnBuilder columnBuilder, boolean[] protected void checkType() { if (!isCharType(childColumnTransformer.getType())) { throw new UnsupportedOperationException( - "Unsupported Type: " + childColumnTransformer.getType().getTypeEnum()); + CalcMessages.EXCEPTION_UNSUPPORTED_TYPE_FF7F518D + + childColumnTransformer.getType().getTypeEnum()); } } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/scalar/AbstractCastFunctionColumnTransformer.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/scalar/AbstractCastFunctionColumnTransformer.java index d8df707f39c32..af7a1f600247d 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/scalar/AbstractCastFunctionColumnTransformer.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/scalar/AbstractCastFunctionColumnTransformer.java @@ -19,6 +19,7 @@ package org.apache.iotdb.calc.transformation.dag.column.unary.scalar; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.calc.transformation.dag.column.ColumnTransformer; import org.apache.iotdb.calc.transformation.dag.column.unary.UnaryColumnTransformer; import org.apache.iotdb.calc.transformation.dag.util.CastFunctionUtils; @@ -184,7 +185,9 @@ protected void castTimestamp(ColumnBuilder columnBuilder, long value) { } } catch (DateTimeParseException e) { throw new IoTDBRuntimeException( - "Year must be between 1000 and 9999.", DATE_OUT_OF_RANGE.getStatusCode(), true); + CalcMessages.EXCEPTION_YEAR_MUST_BETWEEN_1000_9999_8FBB94AA, + DATE_OUT_OF_RANGE.getStatusCode(), + true); } } @@ -350,7 +353,10 @@ protected void castString(ColumnBuilder columnBuilder, Binary value) { } } catch (DateTimeParseException | NumberFormatException e) { throw new SemanticException( - String.format("Cannot cast %s to %s type", stringValue, returnType.getDisplayName())); + String.format( + CalcMessages.EXCEPTION_CANNOT_CAST_ARG_ARG_TYPE_8266A2C6, + stringValue, + returnType.getDisplayName())); } } @@ -391,7 +397,10 @@ protected void castBlob(ColumnBuilder columnBuilder, Binary value) { } } catch (DateTimeParseException | NumberFormatException e) { throw new SemanticException( - String.format("Cannot cast %s to %s type", stringValue, returnType.getDisplayName())); + String.format( + CalcMessages.EXCEPTION_CANNOT_CAST_ARG_ARG_TYPE_8266A2C6, + stringValue, + returnType.getDisplayName())); } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/scalar/CastFunctionColumnTransformer.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/scalar/CastFunctionColumnTransformer.java index 9a86020a183fd..710117863c350 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/scalar/CastFunctionColumnTransformer.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/scalar/CastFunctionColumnTransformer.java @@ -19,6 +19,7 @@ package org.apache.iotdb.calc.transformation.dag.column.unary.scalar; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.calc.transformation.dag.column.ColumnTransformer; import org.apache.tsfile.block.column.Column; @@ -73,7 +74,8 @@ protected void transform( default: throw new UnsupportedOperationException( String.format( - "Unsupported source dataType: %s", childColumnTransformer.getType().getTypeEnum())); + CalcMessages.EXCEPTION_UNSUPPORTED_SOURCE_DATATYPE_ARG_678B759C, + childColumnTransformer.getType().getTypeEnum())); } } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/scalar/DateBinFunctionColumnTransformer.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/scalar/DateBinFunctionColumnTransformer.java index 71abdf569fad4..db60b63efaff8 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/scalar/DateBinFunctionColumnTransformer.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/scalar/DateBinFunctionColumnTransformer.java @@ -19,6 +19,7 @@ package org.apache.iotdb.calc.transformation.dag.column.unary.scalar; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.calc.transformation.dag.column.ColumnTransformer; import org.apache.iotdb.calc.transformation.dag.column.unary.UnaryColumnTransformer; import org.apache.iotdb.commons.conf.CommonDescriptor; @@ -77,7 +78,7 @@ private static LocalDateTime convertToLocalDateTime(long timestamp, ZoneId zoneI break; default: throw new IllegalArgumentException( - "Unsupported precision: " + CalcMessages.EXCEPTION_UNSUPPORTED_PRECISION_CDB58979 + CommonDescriptor.getInstance().getConfig().getTimestampPrecision()); } @@ -100,7 +101,7 @@ private static long convertToTimestamp(LocalDateTime dateTime, ZoneId zoneId) { return TimeUnit.MILLISECONDS.toNanos(epochMilliSecond) + nanoAdjustment; default: throw new IllegalArgumentException( - "Unknown precision: " + CalcMessages.EXCEPTION_UNKNOWN_PRECISION_0119BEB0 + CommonDescriptor.getInstance().getConfig().getTimestampPrecision()); } } @@ -115,7 +116,7 @@ private static long getNanoTimeStamp(long timestamp) { return timestamp; default: throw new IllegalArgumentException( - "Unknown precision: " + CalcMessages.EXCEPTION_UNKNOWN_PRECISION_0119BEB0 + CommonDescriptor.getInstance().getConfig().getTimestampPrecision()); } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/scalar/FormatColumnTransformer.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/scalar/FormatColumnTransformer.java index 1fe62b0759a81..3a1a2153b7ae5 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/scalar/FormatColumnTransformer.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/scalar/FormatColumnTransformer.java @@ -19,6 +19,7 @@ package org.apache.iotdb.calc.transformation.dag.column.unary.scalar; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.calc.transformation.dag.column.ColumnTransformer; import org.apache.iotdb.calc.transformation.dag.column.multi.MultiColumnTransformer; import org.apache.iotdb.commons.exception.SemanticException; @@ -88,7 +89,8 @@ private void transform(List childrenColumns, ColumnBuilder builder, int } catch (IllegalFormatConversionException | MissingFormatArgumentException e) { String message = e.toString().replaceFirst("^java\\.util\\.(\\w+)Exception", "$1"); throw new SemanticException( - String.format("Invalid format string: %s (%s)", pattern, message)); + String.format( + CalcMessages.EXCEPTION_INVALID_FORMAT_STRING_ARG_ARG_05853138, pattern, message)); } } @@ -111,7 +113,7 @@ private Object valueConverter(TypeEnum type, Column column, int i) { return DateTimeUtils.convertToZonedDateTime(column.getLong(i), zoneId); default: throw new UnsupportedOperationException( - String.format("Unsupported source dataType: %s", type)); + String.format(CalcMessages.EXCEPTION_UNSUPPORTED_SOURCE_DATATYPE_ARG_678B759C, type)); } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/scalar/RoundColumnTransformer.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/scalar/RoundColumnTransformer.java index 08c170e45a656..4b9ff1486eece 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/scalar/RoundColumnTransformer.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/scalar/RoundColumnTransformer.java @@ -93,7 +93,8 @@ private void transform( case TIMESTAMP: default: throw new UnsupportedOperationException( - String.format("Unsupported source dataType: %s", sourceType)); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_SOURCE_DATATYPE_ARG_678B759C, sourceType)); } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/scalar/RoundFunctionColumnTransformer.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/scalar/RoundFunctionColumnTransformer.java index 4a429c1f62ea3..b10822cfd79d6 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/scalar/RoundFunctionColumnTransformer.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/scalar/RoundFunctionColumnTransformer.java @@ -19,6 +19,7 @@ package org.apache.iotdb.calc.transformation.dag.column.unary.scalar; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.calc.transformation.dag.column.ColumnTransformer; import org.apache.iotdb.calc.transformation.dag.column.unary.UnaryColumnTransformer; @@ -88,7 +89,8 @@ private void transform(Column column, ColumnBuilder columnBuilder, TypeEnum sour default: throw new UnsupportedOperationException( String.format( - "Unsupported source dataType: %s", childColumnTransformer.getType().getTypeEnum())); + CalcMessages.EXCEPTION_UNSUPPORTED_SOURCE_DATATYPE_ARG_678B759C, + childColumnTransformer.getType().getTypeEnum())); } } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/scalar/SubString2ColumnTransformer.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/scalar/SubString2ColumnTransformer.java index 58bc28bb0a6d5..b75e119717392 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/scalar/SubString2ColumnTransformer.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/scalar/SubString2ColumnTransformer.java @@ -19,6 +19,7 @@ package org.apache.iotdb.calc.transformation.dag.column.unary.scalar; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.calc.transformation.dag.column.ColumnTransformer; import org.apache.iotdb.calc.transformation.dag.column.binary.BinaryColumnTransformer; import org.apache.iotdb.commons.exception.SemanticException; @@ -76,7 +77,8 @@ private void transform( int beginPosition = rightType.getInt(rightColumn, i); if (beginPosition > currentValue.length()) { throw new SemanticException( - "Argument exception,the scalar function substring beginPosition must not be greater than the string length"); + CalcMessages + .EXCEPTION_ARGUMENT_EXCEPTION_SCALAR_FUNCTION_SUBSTRING_BEGINPOSITION_MUST_NOT_GREATER_THAN_F0BA2A56); } else { int maxMin = Math.max(1, beginPosition); currentValue = currentValue.substring(maxMin - 1); diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/scalar/SubString3ColumnTransformer.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/scalar/SubString3ColumnTransformer.java index fc8e9354a2baa..52ccd327eb717 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/scalar/SubString3ColumnTransformer.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/scalar/SubString3ColumnTransformer.java @@ -19,6 +19,7 @@ package org.apache.iotdb.calc.transformation.dag.column.unary.scalar; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.calc.transformation.dag.column.ColumnTransformer; import org.apache.iotdb.calc.transformation.dag.column.ternary.TernaryColumnTransformer; import org.apache.iotdb.commons.exception.SemanticException; @@ -105,7 +106,8 @@ private void transform( int endPosition; if (length < 0) { throw new SemanticException( - "Argument exception,the scalar function substring length must not be less than 0"); + CalcMessages + .EXCEPTION_ARGUMENT_EXCEPTION_SCALAR_FUNCTION_SUBSTRING_LENGTH_MUST_NOT_LESS_THAN_072B7355); } if (beginPosition > Integer.MAX_VALUE - length) { endPosition = Integer.MAX_VALUE; @@ -114,7 +116,8 @@ private void transform( } if (beginPosition > currentValue.length()) { throw new SemanticException( - "Argument exception,the scalar function substring beginPosition must not be greater than the string length"); + CalcMessages + .EXCEPTION_ARGUMENT_EXCEPTION_SCALAR_FUNCTION_SUBSTRING_BEGINPOSITION_MUST_NOT_GREATER_THAN_F0BA2A56); } else { int maxMin = Math.max(1, beginPosition); int minMax = Math.min(currentValue.length(), endPosition); diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/scalar/SubStringColumnTransformer.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/scalar/SubStringColumnTransformer.java index 566e78c377561..c82f565043324 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/scalar/SubStringColumnTransformer.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/scalar/SubStringColumnTransformer.java @@ -19,6 +19,7 @@ package org.apache.iotdb.calc.transformation.dag.column.unary.scalar; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.calc.transformation.dag.column.ColumnTransformer; import org.apache.iotdb.calc.transformation.dag.column.unary.UnaryColumnTransformer; import org.apache.iotdb.commons.exception.SemanticException; @@ -40,7 +41,8 @@ public SubStringColumnTransformer( super(returnType, childColumnTransformer); if (length < 0) { throw new SemanticException( - "Argument exception,the scalar function substring length must not be less than 0"); + CalcMessages + .EXCEPTION_ARGUMENT_EXCEPTION_SCALAR_FUNCTION_SUBSTRING_LENGTH_MUST_NOT_LESS_THAN_072B7355); } // case which is two args or the result of the beginPosition add length is over if (length == Integer.MAX_VALUE || beginPosition > Integer.MAX_VALUE - length) { @@ -77,7 +79,8 @@ private void transform(Column column, ColumnBuilder columnBuilder, int i) { String currentValue = column.getBinary(i).getStringValue(TSFileConfig.STRING_CHARSET); if (beginPosition > currentValue.length()) { throw new SemanticException( - "Argument exception,the scalar function substring beginPosition must not be greater than the string length"); + CalcMessages + .EXCEPTION_ARGUMENT_EXCEPTION_SCALAR_FUNCTION_SUBSTRING_BEGINPOSITION_MUST_NOT_GREATER_THAN_F0BA2A56); } else { int maxMin = Math.max(1, beginPosition); int minMax = Math.min(currentValue.length(), endPosition); diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/scalar/TryCastFunctionColumnTransformer.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/scalar/TryCastFunctionColumnTransformer.java index 9d07564640b43..ff8a20ddaad3b 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/scalar/TryCastFunctionColumnTransformer.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/scalar/TryCastFunctionColumnTransformer.java @@ -19,6 +19,7 @@ package org.apache.iotdb.calc.transformation.dag.column.unary.scalar; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.calc.transformation.dag.column.ColumnTransformer; import org.apache.iotdb.commons.exception.IoTDBRuntimeException; @@ -75,7 +76,7 @@ protected void transform( default: throw new UnsupportedOperationException( String.format( - "Unsupported source dataType: %s", + CalcMessages.EXCEPTION_UNSUPPORTED_SOURCE_DATATYPE_ARG_678B759C, childColumnTransformer.getType().getTypeEnum())); } } catch (IoTDBRuntimeException e) { diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/scalar/factory/CodecStrategiesFactory.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/scalar/factory/CodecStrategiesFactory.java index 7c474f1f052cf..3a3964f14b22f 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/scalar/factory/CodecStrategiesFactory.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/scalar/factory/CodecStrategiesFactory.java @@ -49,7 +49,7 @@ public final class CodecStrategiesFactory { try { if (input.length % 4 != 0) { throw new SemanticException( - "Base64 length must be a multiple of 4 (including padding '=')"); + CalcMessages.EXCEPTION_BASE64_LENGTH_MUST_MULTIPLE_4_INCLUDING_PADDING_8717829D); } return Base64.getDecoder().decode(input); } catch (IllegalArgumentException e) { diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/scalar/factory/NumericCodecStrategiesFactory.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/scalar/factory/NumericCodecStrategiesFactory.java index f0a38b11453b0..1c89adf3528ee 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/scalar/factory/NumericCodecStrategiesFactory.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/scalar/factory/NumericCodecStrategiesFactory.java @@ -19,6 +19,7 @@ package org.apache.iotdb.calc.transformation.dag.column.unary.scalar.factory; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.commons.exception.SemanticException; import java.nio.ByteBuffer; @@ -106,7 +107,7 @@ public interface BytesToDoubleStrategy { // validate input length, if its length is not 4, throw exception if (input.length != 4) { throw new SemanticException( - "The length of the input BLOB of function from_big_endian_32 must be 4."); + CalcMessages.EXCEPTION_LENGTH_INPUT_BLOB_FUNCTION_BIG_ENDIAN_32_MUST_4_C1214BB5); } return ByteBuffer.wrap(input).order(ByteOrder.BIG_ENDIAN).getInt(); }; @@ -115,7 +116,7 @@ public interface BytesToDoubleStrategy { (input) -> { if (input.length != 8) { throw new SemanticException( - "The length of the input BLOB of function from_big_endian_64 must be 8."); + CalcMessages.EXCEPTION_LENGTH_INPUT_BLOB_FUNCTION_BIG_ENDIAN_64_MUST_8_797F1A26); } return ByteBuffer.wrap(input).order(ByteOrder.BIG_ENDIAN).getLong(); }; @@ -124,7 +125,7 @@ public interface BytesToDoubleStrategy { (input) -> { if (input.length != 4) { throw new SemanticException( - "The length of the input BLOB of function from_little_endian_32 must be 4."); + CalcMessages.EXCEPTION_LENGTH_INPUT_BLOB_FUNCTION_LITTLE_ENDIAN_32_MUST_4_0FBBD083); } return ByteBuffer.wrap(input).order(ByteOrder.LITTLE_ENDIAN).getInt(); }; @@ -133,7 +134,7 @@ public interface BytesToDoubleStrategy { (input) -> { if (input.length != 8) { throw new SemanticException( - "The length of the input BLOB of function from_little_endian_64 must be 8."); + CalcMessages.EXCEPTION_LENGTH_INPUT_BLOB_FUNCTION_LITTLE_ENDIAN_64_MUST_8_771F7A96); } return ByteBuffer.wrap(input).order(ByteOrder.LITTLE_ENDIAN).getLong(); }; @@ -142,7 +143,8 @@ public interface BytesToDoubleStrategy { (input) -> { if (input.length != 4) { throw new SemanticException( - "The length of the input BLOB of function from_ieee754_32_big_endian must be 4."); + CalcMessages + .EXCEPTION_LENGTH_INPUT_BLOB_FUNCTION_IEEE754_32_BIG_ENDIAN_MUST_4_51AF4EF0); } return Float.intBitsToFloat(ByteBuffer.wrap(input).order(ByteOrder.BIG_ENDIAN).getInt()); }; @@ -151,7 +153,8 @@ public interface BytesToDoubleStrategy { (input) -> { if (input.length != 8) { throw new SemanticException( - "The length of the input BLOB of function from_ieee754_64_big_endian must be 8."); + CalcMessages + .EXCEPTION_LENGTH_INPUT_BLOB_FUNCTION_IEEE754_64_BIG_ENDIAN_MUST_8_56F33455); } return Double.longBitsToDouble( ByteBuffer.wrap(input).order(ByteOrder.BIG_ENDIAN).getLong()); diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/scalar/util/TransformerDebugUtils.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/scalar/util/TransformerDebugUtils.java index 35bf7daf08cc2..594db14c88eac 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/scalar/util/TransformerDebugUtils.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/column/unary/scalar/util/TransformerDebugUtils.java @@ -19,6 +19,7 @@ package org.apache.iotdb.calc.transformation.dag.column.unary.scalar.util; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.commons.exception.SemanticException; import org.apache.tsfile.common.conf.TSFileConfig; @@ -57,6 +58,8 @@ public static String generateOriginalValue(byte[] inputBytes, Type originalType) } throw new SemanticException( - "type " + originalType + " is not supported in generateProblematicValueString()"); + CalcMessages.EXCEPTION_TYPE_DB38663D + + originalType + + CalcMessages.EXCEPTION_NOT_SUPPORTED_GENERATEPROBLEMATICVALUESTRING_624BB179); } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/udf/UDTFExecutor.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/udf/UDTFExecutor.java index 9242f722c1ac3..3051edb2fa522 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/udf/UDTFExecutor.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/udf/UDTFExecutor.java @@ -19,6 +19,7 @@ package org.apache.iotdb.calc.transformation.dag.udf; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.calc.transformation.dag.adapter.PointCollectorAdaptor; import org.apache.iotdb.calc.transformation.dag.util.InputRowUtils; import org.apache.iotdb.calc.transformation.datastructure.tv.ElasticSerializableTVList; @@ -281,12 +282,15 @@ public void beforeDestroy() { private void onError(String methodName, Exception e) { LOGGER.warn( - "Error occurred during executing UDTF, please check whether the implementation of UDF is correct according to the udf-api description.", + CalcMessages + .LOG_ERROR_OCCURRED_DURING_EXECUTING_UDTF_PLEASE_CHECK_WHETHER_IMPLEMENTATION_UDF_7A719D38, e); throw new RuntimeException( String.format( - "Error occurred during executing UDTF#%s: %s, please check whether the implementation of UDF is correct according to the udf-api description.", - methodName, System.lineSeparator()) + CalcMessages + .EXCEPTION_ERROR_OCCURRED_DURING_EXECUTING_UDTF_ARG_ARG_PLEASE_CHECK_WHETHER_4E706370, + methodName, + System.lineSeparator()) + e); } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/util/BitwiseUtils.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/util/BitwiseUtils.java index a5758094742cb..5c6bf1ac5657d 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/util/BitwiseUtils.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/util/BitwiseUtils.java @@ -19,6 +19,7 @@ package org.apache.iotdb.calc.transformation.dag.util; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.commons.exception.SemanticException; public class BitwiseUtils { @@ -41,15 +42,18 @@ public static void bitCountCheck(long num, long bits) { if (num > lowBitsMask || num < ~lowBitsMask) { throw new SemanticException( String.format( - "Argument exception, the scalar function num must be representable with the bits specified. %s cannot be represented with %s bits.", - num, bits)); + CalcMessages + .EXCEPTION_ARGUMENT_EXCEPTION_SCALAR_FUNCTION_NUM_MUST_REPRESENTABLE_BITS_SPECIFIED_ARG_241AD2FE, + num, + bits)); } } public static void bitCountCheckBits(long bits) { if (bits <= 1 || bits > 64) { throw new SemanticException( - "Argument exception, the scalar function bit_count bits must be between 2 and 64."); + CalcMessages + .EXCEPTION_ARGUMENT_EXCEPTION_SCALAR_FUNCTION_BIT_COUNT_BITS_MUST_BETWEEN_2_6A365911); } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/util/CastFunctionUtils.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/util/CastFunctionUtils.java index 98c00c1ee8906..2c0eff17ea26d 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/util/CastFunctionUtils.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/util/CastFunctionUtils.java @@ -41,7 +41,8 @@ public class CastFunctionUtils { public static int castLongToInt(long value) { if (value > Integer.MAX_VALUE || value < Integer.MIN_VALUE) { throw new SemanticException( - String.format("long value %d is out of range of integer value.", value)); + String.format( + CalcMessages.EXCEPTION_LONG_VALUE_ARG_OUT_RANGE_INTEGER_VALUE_B3F9016B, value)); } return (int) value; } @@ -49,7 +50,8 @@ public static int castLongToInt(long value) { public static int castFloatToInt(float value) { if (value > Integer.MAX_VALUE || value < Integer.MIN_VALUE) { throw new SemanticException( - String.format("Float value %f is out of range of integer value.", value)); + String.format( + CalcMessages.EXCEPTION_FLOAT_VALUE_ARG_OUT_RANGE_INTEGER_VALUE_B0E6DDED, value)); } return Math.round(value); } @@ -57,7 +59,8 @@ public static int castFloatToInt(float value) { public static long castFloatToLong(float value) { if (value > Long.MAX_VALUE || value < Long.MIN_VALUE) { throw new SemanticException( - String.format("Float value %f is out of range of long value.", value)); + String.format( + CalcMessages.EXCEPTION_FLOAT_VALUE_ARG_OUT_RANGE_LONG_VALUE_62F8153E, value)); } return Math.round((double) value); } @@ -65,7 +68,8 @@ public static long castFloatToLong(float value) { public static int castDoubleToInt(double value) { if (value > Integer.MAX_VALUE || value < Integer.MIN_VALUE) { throw new SemanticException( - String.format("Double value %f is out of range of integer value.", value)); + String.format( + CalcMessages.EXCEPTION_DOUBLE_VALUE_ARG_OUT_RANGE_INTEGER_VALUE_BAB52E11, value)); } return Math.round((float) value); } @@ -73,7 +77,8 @@ public static int castDoubleToInt(double value) { public static long castDoubleToLong(double value) { if (value > Long.MAX_VALUE || value < Long.MIN_VALUE) { throw new SemanticException( - String.format("Double value %f is out of range of long value.", value)); + String.format( + CalcMessages.EXCEPTION_DOUBLE_VALUE_ARG_OUT_RANGE_LONG_VALUE_5793A91E, value)); } return Math.round(value); } @@ -81,7 +86,8 @@ public static long castDoubleToLong(double value) { public static float castDoubleToFloat(double value) { if (value > Float.MAX_VALUE || value < -Float.MAX_VALUE) { throw new SemanticException( - String.format("Double value %f is out of range of float value.", value)); + String.format( + CalcMessages.EXCEPTION_DOUBLE_VALUE_ARG_OUT_RANGE_FLOAT_VALUE_DB914FA0, value)); } return (float) value; } @@ -90,7 +96,8 @@ public static float castTextToFloat(String value) { float f = Float.parseFloat(value); if (f == Float.POSITIVE_INFINITY || f == Float.NEGATIVE_INFINITY) { throw new SemanticException( - String.format("Text value %s is out of range of float value.", value)); + String.format( + CalcMessages.EXCEPTION_TEXT_VALUE_ARG_OUT_RANGE_FLOAT_VALUE_D171B313, value)); } return f; } @@ -99,7 +106,8 @@ public static double castTextToDouble(String value) { double d = Double.parseDouble(value); if (d == Double.POSITIVE_INFINITY || d == Double.NEGATIVE_INFINITY) { throw new SemanticException( - String.format("Text value %s is out of range of double value.", value)); + String.format( + CalcMessages.EXCEPTION_TEXT_VALUE_ARG_OUT_RANGE_DOUBLE_VALUE_C0589D83, value)); } return d; } @@ -148,7 +156,9 @@ public static Object cast( return castBinary(binaryV, targetType, session.getZoneId()); default: throw new UnsupportedOperationException( - String.format("Unsupported source dataType: %s", sourceType.getTypeEnum())); + String.format( + CalcMessages.EXCEPTION_UNSUPPORTED_SOURCE_DATATYPE_ARG_678B759C, + sourceType.getTypeEnum())); } } @@ -350,7 +360,10 @@ private static Object castBinary(Binary value, Type targetType, ZoneId zoneId) { } } catch (DateTimeParseException | NumberFormatException e) { throw new SemanticException( - String.format("Cannot cast %s to %s type", stringValue, targetType.getDisplayName())); + String.format( + CalcMessages.EXCEPTION_CANNOT_CAST_ARG_ARG_TYPE_8266A2C6, + stringValue, + targetType.getDisplayName())); } } } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/utils/HeapTraversal.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/utils/HeapTraversal.java index fdd7be0fb7808..ac6875377e076 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/utils/HeapTraversal.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/utils/HeapTraversal.java @@ -19,6 +19,8 @@ package org.apache.iotdb.calc.utils; +import org.apache.iotdb.calc.i18n.CalcMessages; + import org.apache.tsfile.utils.RamUsageEstimator; import static com.google.common.base.Preconditions.checkArgument; @@ -38,7 +40,9 @@ public enum Child { private int treeDepthToNode; public void resetWithPathTo(long targetNodeIndex) { - checkArgument(targetNodeIndex >= 1, "Target node index must be greater than or equal to one"); + checkArgument( + targetNodeIndex >= 1, + CalcMessages.EXCEPTION_TARGET_NODE_INDEX_MUST_BE_GREATER_THAN_OR_EQUAL_TO_ONE_75BFB7C3); int leadingZeros = Long.numberOfLeadingZeros(targetNodeIndex); // Shift off the leading zeros PLUS the most significant one bit (which is not needed for this // calculation) @@ -51,7 +55,7 @@ public boolean isTarget() { } public Child nextChild() { - checkState(!isTarget(), "Already at target"); + checkState(!isTarget(), CalcMessages.EXCEPTION_ALREADY_AT_TARGET_32DFD57F); Child childToFollow = (shifted & TOP_BIT_MASK) == 0 ? Child.LEFT : Child.RIGHT; shifted <<= 1; treeDepthToNode--; diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/utils/ObjectTypeUtils.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/utils/ObjectTypeUtils.java index e821b2f553a1b..46ffbeb75454b 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/utils/ObjectTypeUtils.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/utils/ObjectTypeUtils.java @@ -113,7 +113,7 @@ public static Binary replaceRegionIdForObjectBinary(int newRegionId, Binary orig return ObjectTypeUtils.generateObjectBinary(pair.getLeft(), newObjectPath); } catch (NumberFormatException e) { throw new IoTDBRuntimeException( - "wrong object file path: " + pair.getRight(), + CalcMessages.EXCEPTION_WRONG_OBJECT_FILE_PATH_D317B1AB + pair.getRight(), TSStatusCode.OBJECT_READ_ERROR.getStatusCode()); } } @@ -125,15 +125,19 @@ public static int getActualReadSize(String filePath, long fileSize, long offset, if (offset >= fileSize) { throw new SemanticException( String.format( - "offset %d is greater than or equal to object size %d, file path is %s", - offset, fileSize, filePath)); + CalcMessages + .EXCEPTION_OFFSET_ARG_GREATER_THAN_EQUAL_OBJECT_SIZE_ARG_FILE_PATH_31936A19, + offset, + fileSize, + filePath)); } long actualReadSize = Math.min(length < 0 ? fileSize : length, fileSize - offset); if (actualReadSize > Integer.MAX_VALUE) { throw new SemanticException( String.format( - "Read object size %s is too large (size > 2G), file path is %s", - actualReadSize, filePath)); + CalcMessages.EXCEPTION_READ_OBJECT_SIZE_ARG_TOO_LARGE_SIZE_2G_FILE_PATH_7D4A4D10, + actualReadSize, + filePath)); } return (int) actualReadSize; } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/utils/sort/DiskSpiller.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/utils/sort/DiskSpiller.java index 43cc574d26bf2..cdda259e2b076 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/utils/sort/DiskSpiller.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/utils/sort/DiskSpiller.java @@ -19,6 +19,7 @@ package org.apache.iotdb.calc.utils.sort; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.calc.utils.datastructure.SortKey; import org.apache.iotdb.commons.exception.IoTDBException; import org.apache.iotdb.rpc.TSStatusCode; @@ -98,7 +99,10 @@ public void spillSortedData(List sortedData) throws IoTDBException { spill(tsBlocks); } catch (IOException e) { throw new IoTDBException( - "Create file error: " + filePrefix + (fileIndex - 1) + FILE_SUFFIX, + CalcMessages.EXCEPTION_CREATE_FILE_ERROR_B8B379CF + + filePrefix + + (fileIndex - 1) + + FILE_SUFFIX, e, TSStatusCode.INTERNAL_SERVER_ERROR.getStatusCode()); } @@ -126,7 +130,7 @@ private void writeData(List sortedData, String fileName) throws IoTDBEx } } catch (IOException e) { throw new IoTDBException( - "Can't write intermediate sorted data to file: " + fileName, + CalcMessages.EXCEPTION_CAN_T_WRITE_INTERMEDIATE_SORTED_DATA_FILE_0027961E + fileName, e, TSStatusCode.INTERNAL_SERVER_ERROR.getStatusCode()); } @@ -167,7 +171,8 @@ public List getReaders(SortBufferManager sortBufferManager) throws I } } catch (IOException e) { throw new IoTDBException( - "Can't get file for FileSpillerReader, check if the file exists: " + filePaths, + CalcMessages.EXCEPTION_CAN_T_GET_FILE_FILESPILLERREADER_CHECK_IF_FILE_EXISTS_DEED83D9 + + filePaths, e, TSStatusCode.INTERNAL_SERVER_ERROR.getStatusCode()); } diff --git a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/utils/sort/FileSpillerReader.java b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/utils/sort/FileSpillerReader.java index af7d726d5fff3..7b9917404812c 100644 --- a/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/utils/sort/FileSpillerReader.java +++ b/iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/utils/sort/FileSpillerReader.java @@ -19,6 +19,7 @@ package org.apache.iotdb.calc.utils.sort; +import org.apache.iotdb.calc.i18n.CalcMessages; import org.apache.iotdb.calc.utils.datastructure.MergeSortKey; import org.apache.iotdb.commons.exception.IoTDBException; import org.apache.iotdb.rpc.TSStatusCode; @@ -103,7 +104,7 @@ private long read() throws IoTDBException { return cachedTsBlock.getRetainedSizeInBytes(); } catch (IOException e) { throw new IoTDBException( - "Can't read a new tsBlock in FileSpillerReader: " + fileName, + CalcMessages.EXCEPTION_CAN_T_READ_NEW_TSBLOCK_FILESPILLERREADER_072AF71D + fileName, e, TSStatusCode.INTERNAL_SERVER_ERROR.getStatusCode()); } @@ -147,7 +148,7 @@ public void close() throws IoTDBException { fileChannel.close(); } catch (IOException e) { throw new IoTDBException( - "Can't close fileChannel in FileSpillerReader: " + fileName, + CalcMessages.EXCEPTION_CAN_T_CLOSE_FILECHANNEL_FILESPILLERREADER_E46979F0 + fileName, e, TSStatusCode.INTERNAL_SERVER_ERROR.getStatusCode()); } diff --git a/iotdb-core/confignode/src/main/i18n/en/org/apache/iotdb/confignode/i18n/ConfigNodeMessages.java b/iotdb-core/confignode/src/main/i18n/en/org/apache/iotdb/confignode/i18n/ConfigNodeMessages.java index f662fa5871dfb..a49880e7728ac 100644 --- a/iotdb-core/confignode/src/main/i18n/en/org/apache/iotdb/confignode/i18n/ConfigNodeMessages.java +++ b/iotdb-core/confignode/src/main/i18n/en/org/apache/iotdb/confignode/i18n/ConfigNodeMessages.java @@ -522,4 +522,80 @@ public final class ConfigNodeMessages { public static final String AUTHENTICATION_FAILED = "Authentication failed."; private ConfigNodeMessages() {} + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String MESSAGE_ILLEGAL_PATTERN_PATH_ARG_PATTERN_PATH_SHOULD_END_OTHERWISE_IT_50E969BB = + "Illegal pattern path: %s, pattern path should end with **, otherwise, it should be a specific" + + " database or device path without *"; + public static final String MESSAGE_NUMBER_TTL_RULES_HAS_REACHED_LIMIT_8575FF1E = "The number of TTL rules has reached the limit "; + public static final String MESSAGE_CAPACITY_ARG_REQUESTED_TOTAL_ARG_PLEASE_DELETE_SOME_EXISTING_RULES_35B24B22 = "(capacity: %d, requested total: %d). Please delete some existing rules first."; + public static final String LOG_EXITS_JVM_MEMORY_USAGE_ARG_0BCD1CCF = " exits. Jvm memory usage: {}"; + public static final String EXCEPTION_TOPOLOGY_PROBING_BASE_INTERVAL_MS_MUST_POSITIVE_BUT_GOT_18C9B7A2 = "topology_probing_base_interval_in_ms must be positive, but got: "; + public static final String EXCEPTION_TOPOLOGY_PROBING_TIMEOUT_RATIO_MUST_0_1_BUT_GOT_FBD0E28B = "topology_probing_timeout_ratio must be in (0, 1), but got: "; + public static final String EXCEPTION_DATA_CONFIGNODE_SYSTEM_CONFIGNODE_SYSTEM_PROPERTIES_786349AB = "data/confignode/system/confignode-system.properties. "; + public static final String EXCEPTION_PLEASE_DELETE_DATA_DIR_DATA_CONFIGNODE_RESTART_AGAIN_8527BE66 = "Please delete data dir data/confignode and restart again."; + public static final String EXCEPTION_CONFIG_NODE_CONSENSUS_PROTOCOL_CLASS_SET_E7A83ED6 = "the config_node_consensus_protocol_class is set to"; + public static final String EXCEPTION_AVAILABLE_ONLY_SCHEMA_REPLICATION_FACTOR_SET_1_45667207 = "available only when schema_replication_factor is set to 1"; + public static final String EXCEPTION_MESSAGE_E81C4E4F = "or"; + public static final String EXCEPTION_AVAILABLE_ONLY_DATA_REPLICATION_FACTOR_SET_1_71748D3D = "available only when data_replication_factor is set to 1"; + public static final String EXCEPTION_ARG_ARG_6E068B23 = "%s or %s"; + public static final String EXCEPTION_SCHEMAREGION_DOESN_T_SUPPORT_ORG_APACHE_IOTDB_CONSENSUS_IOT_IOTCONSENSUS_84350FD1 = "the SchemaRegion doesn't support org.apache.iotdb.consensus.iot.IoTConsensus"; + public static final String EXCEPTION_SCHEMAREGION_DOESN_T_SUPPORT_ORG_APACHE_IOTDB_CONSENSUS_IOT_IOTCONSENSUSV2_BA353C6D = "the SchemaRegion doesn't support org.apache.iotdb.consensus.iot.IoTConsensusV2"; + public static final String EXCEPTION_GREEDY_MIN_COST_FLOW_HASH_C07DA2EE = "GREEDY or MIN_COST_FLOW or HASH"; + public static final String EXCEPTION_UNRECOGNIZED_LEADER_DISTRIBUTION_POLICY_SET_F9FFB410 = "an unrecognized leader_distribution_policy is set"; + public static final String EXCEPTION_LEADER_GREEDY_55C6B994 = "LEADER or GREEDY"; + public static final String EXCEPTION_UNRECOGNIZED_ROUTE_PRIORITY_POLICY_SET_C0012AE4 = "an unrecognized route_priority_policy is set"; + public static final String EXCEPTION_THERE_NO_AVAILABLE_ARG_DATABASES_ARG_CURRENTLY_9B8297B3 = "There are no available %s for databases: %s currently, "; + public static final String EXCEPTION_PLEASE_USE_SHOW_CLUSTER_SHOW_REGIONS_CHECK_CLUSTER_STATUS_611120DF = "please use \"show cluster\" or \"show regions\" to check the cluster status"; + public static final String EXCEPTION_SCHEMAREGIONGROUPS_3C409207 = "SchemaRegionGroups"; + public static final String EXCEPTION_DATAREGIONGROUPS_945CCE78 = "DataRegionGroups"; + public static final String EXCEPTION_DATANODE_NOT_ENOUGH_PLEASE_REGISTER_MORE_9F5EEDF5 = "DataNode is not enough, please register more. "; + public static final String EXCEPTION_CURRENT_DATANODES_ARG_REPLICATIONFACTOR_ARG_5D686D2B = "Current DataNodes: %s, replicationFactor: %d"; + public static final String EXCEPTION_THERE_NO_AVAILABLE_AINODES_CURRENTLY_PLEASE_USE_SHOW_CLUSTER_CHECK_FD32EB52 = + "There are no available AINodes currently, please use \"show cluster\" to check the cluster" + + " status."; + public static final String EXCEPTION_ADD_CONSENSUSGROUP_ARG_FAILED_D3FDDC1B = "Add ConsensusGroup to: %s failed."; + public static final String EXCEPTION_ADD_PEER_ARG_FAILED_17DEB6CA = "Add peer: %s failed."; + public static final String EXCEPTION_DATABASE_ARG_DOESN_T_EXIST_778BBF66 = "Database: %s doesn't exist."; + public static final String LOG_REDIRECTION_RECOMMENDED_REMOVECONFIGNODE_BUT_NO_LEADER_ENDPOINT_PROVIDED_ABORT_RETRY_520A4C64 = "Redirection recommended for removeConfigNode but no leader endpoint provided, abort retry."; + public static final String LOG_FAILED_WRITE_AUDIT_LOG_DATANODE_ARG_RESPONSE_ARG_691ABC90 = "Failed to write audit log to DataNode {}, response: {}"; + public static final String LOG_FAILED_WRITE_AUDIT_LOG_DATANODE_ARG_90F15E13 = "Failed to write audit log to DataNode {}"; + public static final String EXCEPTION_UNKNOWN_PHYSICALPLANTYPE_ARG_7F21B699 = "Unknown PhysicalPlanType: %d"; + public static final String LOG_CANNOT_READ_MORE_PHYSICALPLANS_ARG_SUCCESSFULLY_READ_INDEX_ARG_REASON_2EC90E78 = "Cannot read more PhysicalPlans from {}, successfully read index is {}. The reason is"; + public static final String EXCEPTION_FILE_11296840 = "file: "; + public static final String EXCEPTION_ARG_CALCULATED_ARG_0EEEE191 = "%d Calculated: %d."; + public static final String LOG_CANNOT_DESERIALIZE_PHYSICALPLANS_BYTEBUFFER_IGNORE_REMAINING_LOGS_06AE778F = "Cannot deserialize PhysicalPlans from ByteBuffer, ignore remaining logs"; + public static final String MESSAGE_FAILED_ALTER_DATABASE_DOESN_T_SUPPORT_ALTER_SCHEMAREPLICATIONFACTOR_YET_AD96111F = "Failed to alter database. Doesn't support ALTER SchemaReplicationFactor yet."; + public static final String MESSAGE_FAILED_ALTER_DATABASE_DOESN_T_SUPPORT_ALTER_DATAREPLICATIONFACTOR_YET_2E7FF6E7 = "Failed to alter database. Doesn't support ALTER DataReplicationFactor yet."; + public static final String MESSAGE_FAILED_ALTER_DATABASE_DOESN_T_SUPPORT_ALTER_TIMEPARTITIONORIGIN_YET_B315F2E3 = "Failed to alter database. Doesn't support ALTER TimePartitionOrigin yet."; + public static final String MESSAGE_FAILED_ALTER_DATABASE_DOESN_T_SUPPORT_ALTER_TIMEPARTITIONINTERVAL_YET_F539A76F = "Failed to alter database. Doesn't support ALTER TimePartitionInterval yet."; + public static final String MESSAGE_REMOVE_CONSENSUSGROUP_FAILED_BECAUSE_TARGET_CONFIGNODE_NOT_CURRENT_CONFIGNODE_608E64F9 = "remove ConsensusGroup failed because the target ConfigNode is not current ConfigNode."; + public static final String MESSAGE_REMOVE_CONSENSUSGROUP_FAILED_BECAUSE_INTERNAL_FAILURE_SEE_OTHER_LOGS_MORE_51858EC2 = "remove ConsensusGroup failed because internal failure. See other logs for more details"; + public static final String EXCEPTION_LOADPIPETASKINFOEXCEPTION_2270468E = "loadPipeTaskInfoException="; + public static final String EXCEPTION_LOADPIPEPLUGININFOEXCEPTION_40362E11 = ", loadPipePluginInfoException="; + public static final String MESSAGE_FAILED_SET_PIPE_STATUS_STOPPED_RUNTIME_EXCEPTION_FLAG_BECAUSE_BFEA15AA = "Failed to set pipe status with stopped-by-runtime-exception flag, because "; + public static final String EXCEPTION_UNKNOWN_TYPE_7618F8F4 = "unknown type: "; + public static final String EXCEPTION_NO_SUCH_USER_ARG_D11B1046 = "No such user : %s"; + public static final String EXCEPTION_NO_SUCH_USER_ID_99CA691B = "No such user id: "; + public static final String LOG_HANDLING_COMMIT_PROGRESS_META_CHANGES_FA21A080 = "Handling commit progress meta changes ..."; + public static final String EXCEPTION_FAILED_CREATE_ALTER_TOPIC_ILLEGAL_ARG_ARG_EXPECTED_1_POSITIVE_A33070FB = "Failed to create or alter topic, illegal %s=%s, expected -1 or a positive long value"; + public static final String LOG_TRYING_GET_MAX_TTL_UNDER_ONE_DATABASE_USE_LONG_MAX_9D70ACB2 = " when trying to get max ttl under one database, use Long.MAX_VALUE."; + public static final String MESSAGE_ENABLE_IOTDB_CLUSTER_S_DATA_SERVICE_PLEASE_REGISTER_ARG_MORE_F48F3890 = "To enable IoTDB-Cluster's data service, please register %d more IoTDB-DataNode"; + public static final String MESSAGE_APPLY_NEW_CONFIGNODE_FAILED_BECAUSE_CURRENT_CONFIGNODE_CAN_T_STORE_1BB6A6BF = "Apply new ConfigNode failed because current ConfigNode can't store ConfigNode information."; + public static final String MESSAGE_REMOVE_CONFIGNODE_FAILED_BECAUSE_CURRENT_CONFIGNODE_CAN_T_STORE_CONFIGNODE_8AB3BCB4 = "Remove ConfigNode failed because current ConfigNode can't store ConfigNode information."; + public static final String LOG_NODE_ARG_REGION_ARG_70A7CD4F = "node: {}, region: {}"; + public static final String LOG_NO_NEED_REMOVE_IT_NODE_ARG_REGION_ARG_D14062CE = "no need to remove it, node: {}, region: {}"; + public static final String LOG_PID_ARG_FAILED_WRITE_UPDATE_API_EXECUTING_CONSENSUS_LAYER_824FB30E = "pid={} Failed in the write update API executing the consensus layer due to: "; + public static final String LOG_PID_ARG_FAILED_WRITE_DELETE_API_EXECUTING_CONSENSUS_LAYER_0E758BF5 = "pid={} Failed in the write delete API executing the consensus layer due to: "; + public static final String LOG_NEW_LEADER_NODEID_ARG_0A63760B = "the new leader is [nodeId:{}]"; + public static final String LOG_START_CLEANING_UP_RELATED_SERVICES_A409E261 = "start cleaning up related services"; + public static final String LOG_ALL_SERVICES_OLD_LEADER_UNAVAILABLE_NOW_8A22E60F = "all services on old leader are unavailable now."; + public static final String LOG_FILEPATH_ARG_RETRY_ARG_16284354 = "filePath: {}, retry: {}"; + public static final String EXCEPTION_COLON_5D70AD09 = ":"; + public static final String MESSAGE_COLON_CEFF3F4D = ": "; + public static final String EMPTY_MESSAGE = ""; + public static final String EXCEPTION_PROCEDURE_TYPE_IS_NULL_93147BD3 = "Procedure type is null"; + public static final String EXCEPTION_DOT_9D9B854A = "."; + } diff --git a/iotdb-core/confignode/src/main/i18n/en/org/apache/iotdb/confignode/i18n/ManagerMessages.java b/iotdb-core/confignode/src/main/i18n/en/org/apache/iotdb/confignode/i18n/ManagerMessages.java index 5dbfe15157668..96b4241b087c3 100644 --- a/iotdb-core/confignode/src/main/i18n/en/org/apache/iotdb/confignode/i18n/ManagerMessages.java +++ b/iotdb-core/confignode/src/main/i18n/en/org/apache/iotdb/confignode/i18n/ManagerMessages.java @@ -525,4 +525,138 @@ public final class ManagerMessages { public static final String REMOVE_CONFIGNODE_FAILED_BECAUSE_TRANSFER_CONFIGNODE_LEADER_FAILED = "Remove ConfigNode failed because transfer ConfigNode leader failed."; private ManagerMessages() {} + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String LOG_SUBSCRIPTIONHANDLELEADERCHANGEPROCEDURE_WAS_SUBMITTED_PROCEDUREID_ARG_6DBD6075 = "SubscriptionHandleLeaderChangeProcedure was submitted, procedureId: {}."; + public static final String LOG_SUBSCRIPTIONHANDLELEADERCHANGEPROCEDURE_WAS_FAILED_SUBMIT_58FAB03F = "SubscriptionHandleLeaderChangeProcedure was failed to submit."; + public static final String EXCEPTION_INVALID_2928F475 = " is invalid"; + public static final String MESSAGE_FAIL_CREATE_TRIGGER_ARG_SIZE_JAR_TOO_LARGE_YOU_CAN_11869523 = + "Fail to create trigger[%s], the size of Jar is too large, you can increase the value of" + + " property 'config_node_ratis_log_appender_buffer_size_max' on ConfigNode"; + public static final String MESSAGE_FAIL_CREATE_PIPE_PLUGIN_ARG_SIZE_JAR_TOO_LARGE_YOU_D194A893 = + "Fail to create pipe plugin[%s], the size of Jar is too large, you can increase the value of" + + " property 'config_node_ratis_log_appender_buffer_size_max' on ConfigNode"; + public static final String MESSAGE_FAIL_CREATE_UDF_ARG_SIZE_JAR_TOO_LARGE_YOU_CAN_2F119802 = + "Fail to create UDF[%s], the size of Jar is too large, you can increase the value of property" + + " 'config_node_ratis_log_appender_buffer_size_max' on ConfigNode"; + public static final String EXCEPTION_FAILED_SERIALIZE_REGION_PROGRESS_1769D6F1 = "Failed to serialize region progress "; + public static final String MESSAGE_CONSENSUSMANAGER_TARGET_CONFIGNODE_NOT_INITIALIZED_4D386066 = "ConsensusManager of target-ConfigNode is not initialized, "; + public static final String MESSAGE_PLEASE_MAKE_SURE_TARGET_CONFIGNODE_HAS_BEEN_STARTED_SUCCESSFULLY_C78201DC = "please make sure the target-ConfigNode has been started successfully."; + public static final String MESSAGE_CONFIG_NODE_CONSENSUS_PROTOCOL_CLASS_D0F437AF = "config_node_consensus_protocol_class"; + public static final String MESSAGE_DATA_REGION_CONSENSUS_PROTOCOL_CLASS_AB025B20 = "data_region_consensus_protocol_class"; + public static final String MESSAGE_SCHEMA_REGION_CONSENSUS_PROTOCOL_CLASS_480645EF = "schema_region_consensus_protocol_class"; + public static final String MESSAGE_SERIES_SLOT_NUM_115D9BE0 = "series_slot_num"; + public static final String MESSAGE_SERIES_PARTITION_EXECUTOR_CLASS_AD1B5C24 = "series_partition_executor_class"; + public static final String MESSAGE_TIME_PARTITION_INTERVAL_CE476507 = "time_partition_interval"; + public static final String MESSAGE_SCHEMA_REPLICATION_FACTOR_11DB65B5 = "schema_replication_factor"; + public static final String MESSAGE_DATA_REPLICATION_FACTOR_22465D3B = "data_replication_factor"; + public static final String MESSAGE_SCHEMA_REGION_PER_DATA_NODE_555F29BC = "schema_region_per_data_node"; + public static final String MESSAGE_DATA_REGION_PER_DATA_NODE_C183AAD5 = "data_region_per_data_node"; + public static final String MESSAGE_READ_CONSISTENCY_LEVEL_B12D8D95 = "read_consistency_level"; + public static final String MESSAGE_DISK_SPACE_WARNING_THRESHOLD_19635ACA = "disk_space_warning_threshold"; + public static final String MESSAGE_TIMESTAMP_PRECISION_9591C9C9 = "timestamp_precision"; + public static final String MESSAGE_SCHEMA_ENGINE_MODE_E37ED98C = "schema_engine_mode"; + public static final String MESSAGE_TAG_ATTRIBUTE_TOTAL_SIZE_AF658CFE = "tag_attribute_total_size"; + public static final String MESSAGE_DATABASE_LIMIT_THRESHOLD_45C23274 = "database_limit_threshold"; + public static final String LOG_UNEXPECTED_ERROR_HAPPENED_SETTING_SPACE_QUOTA_DATABASE_ARG_F6ED7586 = "Unexpected error happened while setting space quota on database: %s "; + public static final String LOG_UNEXPECTED_ERROR_HAPPENED_SETTING_THROTTLE_QUOTA_USER_ARG_C111BE81 = "Unexpected error happened while setting throttle quota on user: %s "; + public static final String LOG_SCHEMA_TEMPLATE_NEED_TWO_FILES_1E57542A = "schema_template need two files"; + public static final String LOG_GOT_IOEXCEPTION_DESERIALIZE_USE_ROLE_FILE_TYPE_ARG_1B548759 = "Got IOException when deserialize use&role file, type:{}"; + public static final String LOG_GOT_IOEXCEPTION_DESERIALIZE_ROLELIST_1354F29E = "Got IOException when deserialize roleList"; + public static final String LOG_GOT_EXCEPTION_DESERIALIZING_TTL_FILE_F806EB40 = "Got exception when deserializing ttl file"; + public static final String LOG_UNRECOGNIZED_NODE_TYPE_CANNOT_DESERIALIZE_MTREE_GIVEN_BUFFER_5CF3121B = "Unrecognized node type. Cannot deserialize MTree from given buffer"; + public static final String LOG_GOT_IOEXCEPTION_CONSTRUCT_DATABASE_TREE_49436621 = "Got IOException when construct database Tree"; + public static final String LOG_GOT_IOEXCEPTION_DESERIALIZE_TEMPLATE_INFO_49EE617E = "Got IOException when deserialize template info"; + public static final String MESSAGE_MEASUREMENTS_NOT_FOUND_ARG_CANNOT_AUTO_DETECT_980D7D44 = "Measurements not found for %s, cannot auto detect"; + public static final String LOG_FAILED_TAKE_SNAPSHOT_BECAUSE_SNAPSHOT_FILE_ARG_ALREADY_EXIST_EB2A6093 = "Failed to take snapshot, because snapshot file [{}] is already exist."; + public static final String LOG_FAILED_LOAD_SNAPSHOT_SNAPSHOT_FILE_ARG_NOT_EXIST_8828CFBA = "Failed to load snapshot,snapshot file [{}] is not exist."; + public static final String LOG_YOU_MAYBE_NEED_RENAME_SIMPLE_DIR_0_0_MANUALLY_2A12C5C9 = "you maybe need to rename the simple dir to 0_0 manually."; + public static final String LOG_CONFIGNODE_LOCAL_PEER_HAS_ALREADY_BEEN_CREATED_ARG_FA75E88F = "ConfigNode local peer has already been created: {}"; + public static final String LOG_CONFIGNODE_PEER_ARG_HAS_ALREADY_BEEN_ADDED_ARG_A8F958B0 = "ConfigNode peer {} has already been added: {}"; + public static final String LOG_CONFIGNODE_PEER_ARG_HAS_ALREADY_BEEN_REMOVED_ARG_FACD71EE = "ConfigNode peer {} has already been removed: {}"; + public static final String MESSAGE_CURRENT_CONFIGNODE_LEADER_BUT_NOT_READY_YET_PLEASE_TRY_AGAIN_F0B10645 = "The current ConfigNode is leader but consensus is not ready yet."; + + public static final String MESSAGE_CURRENT_CONFIGNODE_LEADER_SERVICE_NOT_READY = "The current ConfigNode is leader but leader services are not ready yet."; + + public static final String MESSAGE_CURRENT_CONFIGNODE_NOT_LEADER_PLEASE_REDIRECT_NEW_CONFIGNODE_F9AF262D = "The current ConfigNode is not leader, please redirect to a new ConfigNode."; + public static final String LOG_FAILED_SYNC_COMMIT_PROGRESS_RESULT_STATUS_ARG_A9E46E80 = "Failed to sync commit progress. Result status: {}."; + public static final String MESSAGE_FAILED_ALTER_DATABASE_DATABASE_2734674F = "Failed to alter database. The Database "; + public static final String MESSAGE_DOESN_T_EXIST_EED8C92E = " doesn't exist."; + public static final String MESSAGE_FAILED_ALTER_DATABASE_SCHEMAREGIONGROUPNUM_COULD_ONLY_INCREASED_B98229D3 = "Failed to alter database. The SchemaRegionGroupNum could only be increased. "; + public static final String MESSAGE_CURRENT_SCHEMAREGIONGROUPNUM_ARG_ALTER_SCHEMAREGIONGROUPNUM_ARG_F7495BC2 = "Current SchemaRegionGroupNum: %d, Alter SchemaRegionGroupNum: %d"; + public static final String MESSAGE_FAILED_ALTER_DATABASE_DATAREGIONGROUPNUM_COULD_ONLY_INCREASED_84283EB5 = "Failed to alter database. The DataRegionGroupNum could only be increased. "; + public static final String MESSAGE_CURRENT_DATAREGIONGROUPNUM_ARG_ALTER_DATAREGIONGROUPNUM_ARG_61C6E978 = "Current DataRegionGroupNum: %d, Alter DataRegionGroupNum: %d"; + public static final String MESSAGE_FAILED_CREATE_DATABASE_SCHEMAREPLICATIONFACTOR_SHOULD_POSITIVE_8847F33C = "Failed to create database. The schemaReplicationFactor should be positive."; + public static final String MESSAGE_FAILED_CREATE_DATABASE_DATAREPLICATIONFACTOR_SHOULD_POSITIVE_C2565B7E = "Failed to create database. The dataReplicationFactor should be positive."; + public static final String MESSAGE_FAILED_CREATE_DATABASE_TIMEPARTITIONORIGIN_SHOULD_NON_NEGATIVE_BD0595C9 = "Failed to create database. The timePartitionOrigin should be non-negative."; + public static final String MESSAGE_FAILED_CREATE_DATABASE_TIMEPARTITIONINTERVAL_SHOULD_POSITIVE_BB1B473F = "Failed to create database. The timePartitionInterval should be positive."; + public static final String MESSAGE_FAILED_CREATE_DATABASE_SCHEMAREGIONGROUPNUM_SHOULD_POSITIVE_8396A2AB = "Failed to create database. The schemaRegionGroupNum should be positive."; + public static final String MESSAGE_ACCEPT_NODE_REGISTRATION_4133276A = "Accept Node registration."; + public static final String MESSAGE_ACCEPT_NODE_RESTART_1BC1A8DD = "Accept Node restart."; + public static final String MESSAGE_REJECT_ARG_START_BECAUSE_CLUSTERNAME_CURRENT_ARG_TARGET_CLUSTER_INCONSISTENT_B9E197DB = + "Reject %s start. Because the ClusterName of the current %s and the target cluster are" + + " inconsistent. "; + public static final String MESSAGE_CLUSTERNAME_CURRENT_NODE_ARG_CLUSTERNAME_TARGET_CLUSTER_ARG_5C34BE8D = "ClusterName of the current Node: %s, ClusterName of the target cluster: %s."; + public static final String MESSAGE_1_CHANGE_SEED_CONFIG_NODE_PARAMETER_ARG_JOIN_CORRECT_CLUSTER_5E9D753C = "\t1. Change the seed_config_node parameter in %s to join the correct cluster."; + public static final String MESSAGE_2_CHANGE_CLUSTER_NAME_PARAMETER_ARG_MATCH_TARGET_CLUSTER_0A0DB235 = "\n\t2. Change the cluster_name parameter in %s to match the target cluster"; + public static final String MESSAGE_REJECT_ARG_REGISTRATION_BECAUSE_FOLLOWING_IP_PORT_ARG_CURRENT_ARG_CB78CC3B = + "Reject %s registration. Because the following ip:port: %s of the current %s is conflicted" + + " with other registered Nodes in the cluster."; + public static final String MESSAGE_1_USE_SQL_SHOW_CLUSTER_DETAILS_FIND_OUT_CONFLICT_NODES_A1195AEA = + "\t1. Use SQL: \"show cluster details\" to find out the conflict Nodes. Remove them and retry" + + " start."; + public static final String MESSAGE_2_CHANGE_CONFLICT_IP_PORT_CONFIGURATIONS_ARG_FILE_RETRY_START_CF3F08F6 = "\n\t2. Change the conflict ip:port configurations in %s file and retry start."; + public static final String MESSAGE_CLUSTER_ID_HAS_NOT_GENERATED_PLEASE_TRY_AGAIN_LATER_58A1C3F2 = "cluster id has not generated, please try again later"; + public static final String MESSAGE_REJECT_ARG_RESTART_BECAUSE_CLUSTERNAME_CURRENT_ARG_TARGET_CLUSTER_INCONSISTENT_2075F29D = + "Reject %s restart. Because the ClusterName of the current %s and the target cluster are" + + " inconsistent. "; + public static final String MESSAGE_REJECT_ARG_RESTART_BECAUSE_NODEID_CURRENT_ARG_ARG_AC13EDD5 = "Reject %s restart. Because the nodeId of the current %s is %d."; + public static final String MESSAGE_1_DELETE_DATA_DIR_RETRY_86A23473 = "\t1. Delete \"data\" dir and retry."; + public static final String MESSAGE_REJECT_ARG_RESTART_BECAUSE_THERE_NO_CORRESPONDING_ARG_WHOSE_NODEID_455578E9 = "Reject %s restart. Because there are no corresponding %s(whose nodeId=%d) in the cluster."; + public static final String MESSAGE_1_MAYBE_YOU_VE_ALREADY_REMOVED_CURRENT_ARG_WHOSE_NODEID_92165504 = + "\t1. Maybe you've already removed the current %s(whose nodeId=%d). Please delete the useless" + + " 'data' dir and retry start."; + public static final String MESSAGE_REJECT_ARG_RESTART_BECAUSE_CLUSTERID_CURRENT_ARG_TARGET_CLUSTER_INCONSISTENT_0398A6CE = + "Reject %s restart. Because the clusterId of the current %s and the target cluster are" + + " inconsistent. "; + public static final String MESSAGE_CLUSTERID_CURRENT_NODE_ARG_CLUSTERID_TARGET_CLUSTER_ARG_23C42434 = "ClusterId of the current Node: %s, ClusterId of the target cluster: %s."; + public static final String MESSAGE_1_PLEASE_CHECK_IF_NODE_CONFIGURATION_PATH_CORRECT_7FB5D559 = "\t1. Please check if the node configuration or path is correct."; + public static final String MESSAGE_REJECT_ARG_RESTART_BECAUSE_INTERNAL_TENDPOINTS_ARG_CAN_T_MODIFIED_A58B99F0 = "Reject %s restart. Because the internal TEndPoints of this %s can't be modified."; + public static final String MESSAGE_1_PLEASE_KEEP_INTERNAL_TENDPOINTS_NODE_SAME_AS_BEFORE_2FDB2034 = "\t1. Please keep the internal TEndPoints of this Node the same as before."; + public static final String MESSAGE_REMOVE_CONFIGNODE_FAILED_BECAUSE_THERE_ONLY_ONE_CONFIGNODE_CURRENT_CLUSTER_D1273758 = "Remove ConfigNode failed because there is only one ConfigNode in current Cluster."; + public static final String MESSAGE_REMOVE_CONFIGNODE_FAILED_BECAUSE_THERE_NO_OTHER_CONFIGNODE_RUNNING_STATUS_C9C43315 = + "Remove ConfigNode failed because there is no other ConfigNode in Running status in current" + + " Cluster."; + public static final String MESSAGE_REMOVE_CONFIGNODE_FAILED_BECAUSE_CONFIGNODEGROUP_LEADER_ELECTION_PLEASE_RETRY_3EE602F6 = "Remove ConfigNode failed because the ConfigNodeGroup is on leader election, please retry."; + public static final String MESSAGE_TRANSFER_CONFIGNODE_LEADER_FAILED_BECAUSE_CAN_NOT_FIND_ANY_RUNNING_1FE4F96D = "Transfer ConfigNode leader failed because can not find any running ConfigNode."; + public static final String MESSAGE_CONFIGNODE_REMOVED_LEADER_ALREADY_TRANSFER_LEADER_FA6D1603 = "The ConfigNode to be removed is leader, already transfer Leader to "; + public static final String MESSAGE_TARGET_DATANODE_NOT_EXISTED_PLEASE_ENSURE_YOUR_INPUT_QUERYID_CORRECT_AB84CCDF = "The target DataNode is not existed, please ensure your input is correct"; + public static final String MESSAGE_CREATE_SCHEMAPARTITION_FAILED_BECAUSE_DATABASE_ARG_NOT_EXISTS_D8AE1679 = "Create SchemaPartition failed because the database: %s is not exists"; + public static final String MESSAGE_CREATE_SCHEMAPARTITION_FAILED_BECAUSE_DATABASE_ARG_DOES_NOT_EXIST_2617832C = "Create SchemaPartition failed because the database: %s does not exist"; + public static final String MESSAGE_CREATE_DATAPARTITION_FAILED_BECAUSE_DATABASE_ARG_NOT_EXISTS_F223D5C2 = "Create DataPartition failed because the database: %s is not exists"; + public static final String MESSAGE_CREATE_DATAPARTITION_FAILED_BECAUSE_DATABASE_ARG_DOES_NOT_EXIST_D7A8C1FC = "Create DataPartition failed because the database: %s does not exist"; + public static final String LOG_REGIONGROUP_ARG_SERIESPARTITIONSLOT_COUNT_ARG_30F57B14 = "to RegionGroup {}, SeriesPartitionSlot Count: {}"; + public static final String LOG_REGIONGROUPID_ARG_SERIESPARTITIONSLOT_COUNT_ARG_5DAE4B6A = "RegionGroupId: {}, SeriesPartitionSlot Count: {}"; + public static final String LOG_INCREASE_REFERENCE_COUNT_SNAPSHOT_ARG_ERROR_HOLDER_MESSAGE_ARG_962E8672 = "Increase reference count for snapshot %s error. Holder Message: %s"; + public static final String LOG_DECREASE_REFERENCE_COUNT_SNAPSHOT_ARG_ERROR_HOLDER_MESSAGE_ARG_8C7FF9CE = "Decrease reference count for snapshot %s error. Holder Message: %s"; + public static final String MESSAGE_RECEIVER_CONFIGNODE_HAS_SET_UP_NEW_RECEIVER_SENDER_MUST_RE_77B80C51 = + "The receiver ConfigNode has set up a new receiver and the sender must re-send its handshake" + + " request."; + public static final String LOG_IGNORE_EXCEPTION_2AC431FA = "Ignore this exception."; + public static final String LOG_REPORTING_PIPE_META_ARG_REMAININGEVENTCOUNT_ARG_ESTIMATEDREMAININGTIME_ARG_E2727CB4 = "Reporting pipe meta: {}, remainingEventCount: {}, estimatedRemainingTime: {}"; + public static final String LOG_PIPEMETAFROMAGENT_NULL_PIPEMETAFROMCOORDINATOR_ARG_36C513AE = "pipeMetaFromAgent is null, pipeMetaFromCoordinator: {}"; + public static final String LOG_DETECTED_HISTORICAL_PIPE_COMPLETION_REPORT_DATANODE_ARG_PIPE_ARG_REMAININGEVENTCOUNT_7E6C52E9 = + "Detected historical pipe completion report from DataNode {} for pipe {}. remainingEventCount:" + + " {}, remainingTime: {}, completedDataNodes: {}"; + public static final String LOG_ALL_DATANODES_REPORTED_HISTORICAL_PIPE_ARG_COMPLETED_GLOBALREMAININGEVENTCOUNT_ARG_GLOBALREMAININGTIME_255 = + "All DataNodes reported historical pipe {} completed. globalRemainingEventCount: {}," + + " globalRemainingTime: {}, staticMeta: {}"; + public static final String LOG_UPDATED_PROGRESS_INDEX_PIPE_NAME_ARG_CONSENSUS_GROUP_ID_ARG_DF112F4F = "Updated progress index for (pipe name: {}, consensus group id: {}) ... "; + public static final String LOG_PROGRESS_INDEX_COORDINATOR_ARG_PROGRESS_INDEX_AGENT_ARG_UPDATED_PROGRESSINDEX_1A22ABC5 = "Progress index on coordinator: {}, progress index from agent: {}, updated progressIndex: {}"; + public static final String LOG_DETECT_PIPERUNTIMECONNECTORCRITICALEXCEPTION_ARG_7D198DD7 = "Detect PipeRuntimeConnectorCriticalException %s "; + public static final String LOG_AGENT_STOP_PIPE_ARG_42212C21 = "from agent, stop pipe %s."; + public static final String LOG_CREATEREGIONGROUPS_REGIONGROUP_ARG_BELONGED_DATABASE_ARG_DATANODES_ARG_5270AB6B = "[CreateRegionGroups] RegionGroup: {}, belonged database: {}, on DataNodes: {}"; + public static final String EXCEPTION_DATANODEID_SHOULD_NOT_BE_MINUS_1_HERE_5CB27796 = "dataNodeId should not be -1 here"; + } diff --git a/iotdb-core/confignode/src/main/i18n/en/org/apache/iotdb/confignode/i18n/ProcedureMessages.java b/iotdb-core/confignode/src/main/i18n/en/org/apache/iotdb/confignode/i18n/ProcedureMessages.java index 085a803777ee8..77df8c2291c7c 100644 --- a/iotdb-core/confignode/src/main/i18n/en/org/apache/iotdb/confignode/i18n/ProcedureMessages.java +++ b/iotdb-core/confignode/src/main/i18n/en/org/apache/iotdb/confignode/i18n/ProcedureMessages.java @@ -1087,4 +1087,203 @@ public final class ProcedureMessages { public static final String FAILED_IN_THE_WRITE_API_EXECUTING_THE_CONSENSUS_LAYER_DUE = "Failed in the write API executing the consensus layer due to: "; private ProcedureMessages() {} + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String EXCEPTION_MS_95BA098D = " ms."; + public static final String LOG_ARG_JOIN_WAIT_GOT_INTERRUPTED_316B5E9F = "{} join wait got interrupted"; + public static final String LOG_NO_COMPLETED_PROCEDURES_CLEANUP_50434D91 = "No completed procedures to cleanup."; + public static final String LOG_ERROR_DELETING_COMPLETED_PROCEDURES_ARG_1A3A185E = "Error deleting completed procedures {}."; + public static final String LOG_EVICT_COMPLETED_ARG_A968A070 = "Evict completed {}"; + public static final String LOG_EXECUTING_PROCEDURE_SHOULD_RUNNABLE_STATE_BUT_IT_S_NOT_PROCEDURE_7CF42CE8 = "The executing procedure should in RUNNABLE state, but it's not. Procedure is {}"; + public static final String LOG_FINISHED_SUBPROCEDURE_PID_ARG_RESUME_PROCESSING_PPID_ARG_93ED990B = "Finished subprocedure pid={}, resume processing ppid={}"; + public static final String LOG_HALT_PID_ARG_ACTIVECOUNT_ARG_411F3EBF = "Halt pid={}, activeCount={}"; + public static final String LOG_EXCEPTION_HAPPENED_WORKER_ARG_EXECUTE_PROCEDURE_ARG_6E3AD27D = "Exception happened when worker {} execute procedure {}"; + public static final String LOG_WORKER_STUCK_ARG_ARG_RUN_TIME_ARG_MS_FB612354 = "Worker stuck {}({}), run time {} ms"; + public static final String LOG_PROCEDURE_WORKERS_ARG_RUNNING_ARG_RUNNING_STUCK_1565936D = "Procedure workers: {} is running, {} is running and stuck"; + public static final String LOG_PROCEDUREEXECUTOR_THREADGROUP_ARG_CONTAINS_RUNNING_THREADS_WHICH_USED_NON_PROCEDURE_BD865211 = + "ProcedureExecutor threadGroup {} contains running threads which are used by non-procedure" + + " module."; + public static final String LOG_ADD_PROCEDURE_ARG_AS_ARG_TH_ROLLBACK_STEP_C71B2184 = "Add procedure {} as the {}th rollback step"; + public static final String LOG_STATEMACHINEPROCEDURE_PID_ARG_NOT_SET_NEXT_STATE_BUT_RETURN_HAS_7F93E63F = + "StateMachineProcedure pid={} not set next state, but return HAS_MORE_STATE. It is likely that" + + " there is some problem with the code. Please check the code. This procedure is about to be" + + " terminated: {}"; + public static final String LOG_STATEMACHINEPROCEDURE_PID_ARG_SET_NEXT_STATE_ARG_BUT_RETURN_NO_0CA2D56C = "StateMachineProcedure pid={} set next state to {}, but return NO_MORE_STATE"; + public static final String LOG_DON_T_ADD_SUCCESSFUL_PROCEDURE_BACK_SCHEDULER_IT_WILL_IGNORED_E015472C = "Don't add a successful procedure back to the scheduler, it will be ignored"; + public static final String LOG_SCHEDULER_NOT_RUNNING_6969C9FF = "the scheduler is not running"; + public static final String LOG_SCHEDULER_WAITING_TIME_LEFT_ARG_NANOS_D7717019 = "the scheduler waiting time left {} nanos"; + public static final String LOG_SLEEP_FAILED_CONFIGNODEPROCEDUREENV_BCD470AC = "Sleep failed in ConfigNodeProcedureEnv: "; + public static final String LOG_INVALIDATE_CACHE_FAILED_BECAUSE_DATANODE_ARG_UNKNOWN_4F2D374C = "Invalidate cache failed, because DataNode {} is Unknown"; + public static final String LOG_INVALIDATE_CACHE_FAILED_INVALIDATE_PARTITION_CACHE_STATUS_ARG_INVALIDATE_SCHEMAENGINE_BEB7A065 = + "Invalidate cache failed, invalidate partition cache status is {}, invalidate schemaengine" + + " cache status is {}"; + public static final String MESSAGE_REMOVE_CONFIGNODE_FAILED_BECAUSE_UPDATE_CONSENSUSGROUP_PEER_INFORMATION_FAILED_FCE5302B = "Remove ConfigNode failed because update ConsensusGroup peer information failed."; + public static final String MESSAGE_CAN_T_REMOVE_DATANODE_LIMIT_REPLICATION_FACTOR_D960E3A6 = "Can't remove datanode due to the limit of replication factor, "; + public static final String MESSAGE_AVAILABLEDATANODESIZE_ARG_MAXREPLICAFACTOR_ARG_MAX_ALLOWED_REMOVED_DATA_NODE_SIZE_FB8C382C = "availableDataNodeSize: %s, maxReplicaFactor: %s, max allowed removed Data Node size is: %s"; + public static final String EXCEPTION_NOT_SUPPORTED_0A83F963 = " is not supported"; + public static final String LOG_START_ADD_TRIGGER_ARG_TRIGGERTABLE_CONFIG_NODES_NEEDTOSAVEJAR_ARG_0C23D81E = "Start to add trigger [{}] in TriggerTable on Config Nodes, needToSaveJar[{}]"; + public static final String LOG_START_CREATE_TRIGGERINSTANCE_ARG_DATA_NODES_917C3313 = "Start to create triggerInstance [{}] on Data Nodes"; + public static final String LOG_START_ACTIVE_TRIGGER_ARG_DATA_NODES_A4AB8131 = "Start to active trigger [{}] on Data Nodes"; + public static final String LOG_START_ACTIVE_TRIGGER_ARG_CONFIG_NODES_153A5D40 = "Start to active trigger [{}] on Config Nodes"; + public static final String LOG_RETRIEVABLE_ERROR_TRYING_CREATE_TRIGGER_ARG_STATE_ARG_44976C4E = "Retrievable error trying to create trigger [{}], state [{}]"; + public static final String LOG_START_CONFIG_NODE_INACTIVE_ROLLBACK_TRIGGER_ARG_536929E5 = "Start to [CONFIG_NODE_INACTIVE] rollback of trigger [{}]"; + public static final String LOG_START_DATA_NODE_INACTIVE_ROLLBACK_TRIGGER_ARG_38C93D64 = "Start to [DATA_NODE_INACTIVE] rollback of trigger [{}]"; + public static final String LOG_RETRIEVABLE_ERROR_TRYING_DROP_TRIGGER_ARG_STATE_ARG_2282AC35 = "Retrievable error trying to drop trigger [{}], state [{}]"; + public static final String LOG_DELETEDATABASEPROCEDURE_PRE_DELETE_DATABASE_ARG_6A1FEACC = "[DeleteDatabaseProcedure] Pre delete database: {}"; + public static final String LOG_DELETEDATABASEPROCEDURE_INVALIDATE_CACHE_DATABASE_ARG_299FC9BC = "[DeleteDatabaseProcedure] Invalidate cache of database: {}"; + public static final String LOG_DELETEDATABASEPROCEDURE_DELETE_DATABASESCHEMA_ARG_A49A47AC = "[DeleteDatabaseProcedure] Delete DatabaseSchema: {}"; + public static final String LOG_DELETEDATABASEPROCEDURE_SUCCESSFULLY_DELETE_SCHEMAREGION_ARG_ARG_BA0535DA = "[DeleteDatabaseProcedure] Successfully delete SchemaRegion[{}] on {}"; + public static final String LOG_DELETEDATABASEPROCEDURE_FAILED_DELETE_SCHEMAREGION_ARG_ARG_SUBMIT_ASYNC_DELETION_8C3E6DE3 = "[DeleteDatabaseProcedure] Failed to delete SchemaRegion[{}] on {}. Submit to async deletion."; + public static final String LOG_DELETEDATABASEPROCEDURE_DATA_PARTITION_POLICY_TABLE_DATABASE_ARG_CLEARED_7A32E28A = "[DeleteDatabaseProcedure] The data partition policy table of database: {} is cleared."; + public static final String LOG_DELETEDATABASEPROCEDURE_DATABASE_ARG_DELETED_SUCCESSFULLY_3A4E9202 = "[DeleteDatabaseProcedure] Database: {} is deleted successfully"; + public static final String LOG_DELETEDATABASEPROCEDURE_RETRIABLE_ERROR_TRYING_DELETE_DATABASE_ARG_STATE_ARG_8167D246 = "[DeleteDatabaseProcedure] Retriable error trying to delete database {}, state {}"; + public static final String LOG_DELETEDATABASEPROCEDURE_ROLLBACK_PREDELETED_ARG_638F53DA = "[DeleteDatabaseProcedure] Rollback to preDeleted: {}"; + public static final String EXCEPTION_FAILED_DAA6EA2F = " failed "; + public static final String EXCEPTION_FAILED_CHECK_TIME_SERIES_EXISTENCE_ALL_REPLICASET_SCHEMAREGION_ARG_FAILURES_5F668154 = "failed to check time series existence in all replicaset of schemaRegion %s. Failures: %s"; + public static final String LOG_FAILED_ROLLBACK_CONFIGNODE_TTL_STATE_9666EF54 = "Failed to rollback ConfigNode ttl state."; + public static final String LOG_FAILED_ROLLBACK_DATANODE_TTL_CACHE_436C008A = "Failed to rollback DataNode ttl cache."; + public static final String EXCEPTION_ROLLBACK_CONFIGNODE_TTL_FAILED_6D4FB59A = "Rollback ConfigNode ttl failed for "; + public static final String EXCEPTION_ROLLBACK_DATANODE_TTL_CACHE_FAILED_AF9C7102 = "Rollback dataNode ttl cache failed for "; + public static final String LOG_PLEASE_VERIFY_WHETHER_LEADER_CHANGE_HAS_OCCURRED_DURING_STAGE_9FE68EE3 = "Please verify whether a leader change has occurred during this stage. "; + public static final String LOG_IF_LOG_TRIGGERED_WITHOUT_LEADER_CHANGE_IT_INDICATES_POTENTIAL_BUG_32AE71FD = + "If this log is triggered without a leader change, it indicates a potential bug in the" + + " partition table."; + public static final String LOG_SKIP_RECOVERING_SCHEDULE_TASK_CQ_ARG_BECAUSE_ITS_METADATA_UNAVAILABLE_00286802 = "Skip recovering the schedule task of CQ {} because its metadata is unavailable."; + public static final String LOG_PROCEDUREID_ARG_ACQUIRE_LOCK_3FBF9987 = "procedureId {} acquire lock."; + public static final String LOG_PROCEDUREID_ARG_ACQUIRE_LOCK_FAILED_WILL_WAIT_LOCK_AFTER_FINISHING_3B27278E = "procedureId {} acquire lock failed, will wait for lock after finishing execution."; + public static final String LOG_PROCEDUREID_ARG_RELEASE_LOCK_FF860D6B = "procedureId {} release lock."; + public static final String LOG_RETRIEVABLE_ERROR_TRYING_ADD_CONFIG_NODE_ARG_STATE_ARG_D7285810 = "Retrievable error trying to add config node {}, state {}"; + public static final String LOG_RETRIEVABLE_ERROR_TRYING_REMOVE_CONFIG_NODE_ARG_STATE_ARG_3754EBA1 = "Retrievable error trying to remove config node {}, state {}"; + public static final String LOG_PROCEDUREID_ARG_REMOVEDATANODES_SKIPS_ACQUIRING_LOCK_SINCE_UPPER_LAYER_ENSURES_C7546FF8 = + "procedureId {}-RemoveDataNodes skips acquiring lock, since upper layer ensures the serial" + + " execution."; + public static final String LOG_PROCEDUREID_ARG_REMOVEDATANODES_SKIPS_RELEASING_LOCK_SINCE_IT_HASN_T_AED8A3DA = "procedureId {}-RemoveDataNodes skips releasing lock, since it hasn't acquire any lock."; + public static final String LOG_ARG_CAN_NOT_REMOVE_DATANODE_ARG_495F9F85 = "{}, Can not remove DataNode {} "; + public static final String LOG_BECAUSE_NUMBER_DATANODES_LESS_EQUAL_THAN_REGION_REPLICA_NUMBER_DEC0CB38 = "because the number of DataNodes is less or equal than region replica number"; + public static final String LOG_ARG_DATANODE_REGIONS_REMOVED_ARG_216A7DC7 = "{}, DataNode regions to be removed is {}"; + public static final String LOG_RETRIEVABLE_ERROR_TRYING_REMOVE_DATA_NODE_ARG_STATE_ARG_4EFEB850 = "Retrievable error trying to remove data node {}, state {}"; + public static final String LOG_SUBMIT_REGIONMIGRATEPROCEDURE_REGIONID_ARG_REMOVEDDATANODE_ARG_DESTDATANODE_ARG_COORDINATORFORADDPEER_ARG_ = + "Submit RegionMigrateProcedure for regionId {}: removedDataNode={}, destDataNode={}," + + " coordinatorForAddPeer={}, coordinatorForRemovePeer={}"; + public static final String LOG_ARG_CANNOT_FIND_TARGET_DATANODE_MIGRATE_REGION_ARG_81A78E06 = "{}, Cannot find target DataNode to migrate the region: {}"; + public static final String LOG_ARG_SOME_REGIONS_MIGRATED_FAILED_DATANODE_ARG_MIGRATEDFAILEDREGIONS_ARG_11644841 = "{}, Some regions are migrated failed in DataNode: {}, migratedFailedRegions: {}."; + public static final String LOG_REGIONS_HAVE_BEEN_SUCCESSFULLY_MIGRATED_WILL_NOT_ROLL_BACK_YOU_AE904563 = + "Regions that have been successfully migrated will not roll back, you can submit the" + + " RemoveDataNodes task again later."; + public static final String LOG_ARG_DATANODES_ARG_ALL_REGIONS_MIGRATED_SUCCESSFULLY_START_STOP_THEM_32D56F28 = "{}, DataNodes: {} all regions migrated successfully, start to stop them."; + public static final String LOG_ARG_START_ROLL_BACK_DATANODES_STATUS_ARG_05C67270 = "{}, Start to roll back the DataNodes status: {}"; + public static final String LOG_ARG_ROLL_BACK_DATANODES_STATUS_SUCCESSFULLY_ARG_6773A2DF = "{}, Roll back the DataNodes status successfully: {}"; + public static final String LOG_DATAPARTITIONINTEGRITY_NO_DATANODES_REGISTERED_NO_WAY_COLLECT_EARLIEST_TIMESLOTS_WAITING_7025EB23 = + "[DataPartitionIntegrity] No DataNodes registered, no way to collect earliest timeslots," + + " waiting for them to go up"; + public static final String LOG_DATAPARTITIONINTEGRITY_FAILED_COLLECTED_EARLIEST_TIMESLOTS_DATANODE_ID_ARG_ALREADY_OUT_834B62B9 = + "[DataPartitionIntegrity] Failed to collected earliest timeslots from the DataNode[id={}]," + + " already out of max retry time"; + public static final String LOG_DATAPARTITIONINTEGRITY_FAILED_COLLECTED_EARLIEST_TIMESLOTS_DATANODE_ID_ARG_RESPONSE_STATUS_B0A31EC4 = + "[DataPartitionIntegrity] Failed to collected earliest timeslots from the DataNode[id={}]," + + " response status is {}"; + public static final String LOG_COLLECTED_EARLIEST_TIMESLOTS_DATANODE_ID_ARG_ARG_5CDF2BA6 = "Collected earliest timeslots from the DataNode[id={}]: {}"; + public static final String LOG_DATAPARTITIONINTEGRITY_FAILED_COLLECT_EARLIEST_TIMESLOTS_DATANODE_ID_ARG_ARG_A211840A = "[DataPartitionIntegrity] Failed to collect earliest timeslots from the DataNode[id={}]: {}"; + public static final String LOG_COLLECTED_EARLIEST_TIMESLOTS_ARG_DATANODES_ARG_NUMBER_SUCCESSFUL_DATANODES_ARG_1CC129EF = "Collected earliest timeslots from {} DataNodes: {}, the number of successful DataNodes is {}"; + public static final String LOG_DATAPARTITIONINTEGRITY_NO_MISSING_DATA_PARTITIONS_DETECTED_NOTHING_NEEDS_REPAIRED_TERMINATING_72F2635F = + "[DataPartitionIntegrity] No missing data partitions detected, nothing needs to be repaired," + + " terminating procedure"; + public static final String LOG_DATAPARTITIONINTEGRITY_NO_DATA_PARTITION_TABLE_RELATED_DATABASE_ARG_WAS_FOUND_B5B90613 = + "[DataPartitionIntegrity] No data partition table related to database {} was found from the" + + " ConfigNode, and this issue needs to be repaired"; + public static final String LOG_DATAPARTITIONINTEGRITY_DATABASE_ARG_HAS_LOST_TIMESLOT_ARG_ITS_DATA_TABLE_499AF395 = + "[DataPartitionIntegrity] Database {} has lost timeslot {} in its data table partition, and" + + " this issue needs to be repaired"; + public static final String LOG_DATAPARTITIONINTEGRITY_NO_DATABASES_HAVE_LOST_DATA_PARTITIONS_TERMINATING_PROCEDURE_3E718CC3 = "[DataPartitionIntegrity] No databases have lost data partitions, terminating procedure"; + public static final String LOG_DATAPARTITIONINTEGRITY_IDENTIFIED_ARG_DATABASES_HAVE_LOST_DATA_PARTITIONS_WILL_REQUEST_6DEA7502 = + "[DataPartitionIntegrity] Identified {} databases have lost data partitions, will request" + + " DataPartitionTable generation from {} DataNodes"; + public static final String LOG_REQUESTING_DATAPARTITIONTABLE_GENERATION_ARG_DATANODES_559F97E8 = "Requesting DataPartitionTable generation from {} DataNodes..."; + public static final String LOG_DATAPARTITIONINTEGRITY_NO_DATANODES_REGISTERED_NO_WAY_REQUESTED_DATAPARTITIONTABLE_GENERATION_TERMINATING_ = + "[DataPartitionIntegrity] No DataNodes registered, no way to requested DataPartitionTable" + + " generation, terminating procedure"; + public static final String LOG_DATAPARTITIONINTEGRITY_FAILED_REQUEST_DATAPARTITIONTABLE_GENERATION_DATANODE_ID_ARG_ALREADY_OUT_6B0C9351 = + "[DataPartitionIntegrity] Failed to request DataPartitionTable generation from the" + + " DataNode[id={}], already out of max retry time"; + public static final String LOG_DATAPARTITIONINTEGRITY_FAILED_REQUEST_DATAPARTITIONTABLE_GENERATION_DATANODE_ID_ARG_RESPONSE_STATUS_93012D = + "[DataPartitionIntegrity] Failed to request DataPartitionTable generation from the" + + " DataNode[id={}], response status is {}"; + public static final String LOG_DATAPARTITIONINTEGRITY_FAILED_REQUEST_DATAPARTITIONTABLE_GENERATION_DATANODE_ID_ARG_ARG_818B47B8 = + "[DataPartitionIntegrity] Failed to request DataPartitionTable generation from" + + " DataNode[id={}]: {}"; + public static final String LOG_DATAPARTITIONINTEGRITY_FAILED_REQUEST_DATAPARTITIONTABLE_GENERATION_HEART_BEAT_DATANODE_ID_ARG_2AB63F12 = + "[DataPartitionIntegrity] Failed to request DataPartitionTable generation heart beat from the" + + " DataNode[id={}], already out of max retry time"; + public static final String LOG_DATAPARTITIONINTEGRITY_FAILED_REQUEST_DATAPARTITIONTABLE_GENERATION_HEART_BEAT_DATANODE_ID_ARG_DC1702EF = + "[DataPartitionIntegrity] Failed to request DataPartitionTable generation heart beat from the" + + " DataNode[id={}], state is {}, response status is {}"; + public static final String LOG_DATAPARTITIONINTEGRITY_DATANODE_ARG_COMPLETED_DATAPARTITIONTABLE_GENERATION_TERMINATING_HEART_BEAT_59DAAD5 = + "[DataPartitionIntegrity] DataNode {} completed DataPartitionTable generation, terminating" + + " heart beat"; + public static final String LOG_DATAPARTITIONINTEGRITY_DATANODE_ARG_STILL_GENERATING_DATAPARTITIONTABLE_63F84C78 = "[DataPartitionIntegrity] DataNode {} still generating DataPartitionTable"; + public static final String LOG_DATAPARTITIONINTEGRITY_DATANODE_ARG_RETURNED_UNKNOWN_ERROR_CODE_ARG_2DA6A21E = "[DataPartitionIntegrity] DataNode {} returned unknown error code: {}"; + public static final String LOG_DATAPARTITIONINTEGRITY_ERROR_CHECKING_DATAPARTITIONTABLE_STATUS_DATANODE_ARG_ARG_TERMINATING_HEART_D6EDA91 = + "[DataPartitionIntegrity] Error checking DataPartitionTable status from DataNode {}: {}," + + " terminating heart beat"; + public static final String LOG_DATAPARTITIONINTEGRITY_NO_DATAPARTITIONTABLES_MERGE_DATAPARTITIONTABLES_EMPTY_920E3DE6 = "[DataPartitionIntegrity] No DataPartitionTables to merge, dataPartitionTables is empty"; + public static final String LOG_DATAPARTITIONINTEGRITY_NO_DATA_PARTITION_TABLE_RELATED_DATABASE_ARG_WAS_FOUND_D1698512 = + "[DataPartitionIntegrity] No data partition table related to database {} was found from the" + + " ConfigNode, use data partition table of DataNode directly"; + public static final String LOG_DATAPARTITIONINTEGRITY_DATAPARTITIONTABLE_SUCCESSFULLY_WRITTEN_CONSENSUS_LOG_2B1634A6 = "[DataPartitionIntegrity] DataPartitionTable successfully written to consensus log"; + public static final String LOG_DATAPARTITIONINTEGRITY_ARG_SERIALIZE_FAILED_DATANODEID_ARG_967B51AA = "[DataPartitionIntegrity] {} serialize failed for dataNodeId: {}"; + public static final String LOG_DATAPARTITIONINTEGRITY_ARG_SERIALIZE_FINALDATAPARTITIONTABLES_FAILED_7E44DCD8 = "[DataPartitionIntegrity] {} serialize finalDataPartitionTables failed"; + public static final String LOG_DATAPARTITIONINTEGRITY_ARG_DESERIALIZE_FAILED_DATANODEID_ARG_22388A60 = "[DataPartitionIntegrity] {} deserialize failed for dataNodeId: {}"; + public static final String LOG_DATAPARTITIONINTEGRITY_ARG_DESERIALIZE_FINALDATAPARTITIONTABLES_FAILED_7E23E4BD = "[DataPartitionIntegrity] {} deserialize finalDataPartitionTables failed"; + public static final String LOG_DATAPARTITIONINTEGRITY_FAILED_DESERIALIZE_DATABASESCOPEDDATAPARTITIONTABLE_3B6933B5 = "[DataPartitionIntegrity] Failed to deserialize DatabaseScopedDataPartitionTable"; + public static final String EXCEPTION_FAILED_C6FF154E = " failed"; + public static final String LOG_SUBSCRIPTIONHANDLELEADERCHANGEPROCEDURE_EXECUTEFROMVALIDATE_97490577 = "SubscriptionHandleLeaderChangeProcedure: executeFromValidate"; + public static final String LOG_SUBSCRIPTIONHANDLELEADERCHANGEPROCEDURE_EXECUTEFROMOPERATEONCONFIGNODES_D4E8BD37 = "SubscriptionHandleLeaderChangeProcedure: executeFromOperateOnConfigNodes"; + public static final String LOG_SUBSCRIPTIONHANDLELEADERCHANGEPROCEDURE_FAILED_PULL_COMMIT_PROGRESS_DATANODE_ARG_STATUS_ARG_8C6DEC4E = + "SubscriptionHandleLeaderChangeProcedure: failed to pull commit progress from DataNode {}," + + " status: {}"; + public static final String LOG_SUBSCRIPTIONHANDLELEADERCHANGEPROCEDURE_FAILED_WRITE_API_EXECUTING_CONSENSUS_LAYER_56B3832A = + "SubscriptionHandleLeaderChangeProcedure: failed in the write API executing the consensus" + + " layer due to: "; + public static final String LOG_SUBSCRIPTIONHANDLELEADERCHANGEPROCEDURE_EXECUTEFROMOPERATEONDATANODES_0D9F7C98 = "SubscriptionHandleLeaderChangeProcedure: executeFromOperateOnDataNodes"; + public static final String LOG_SUBSCRIPTIONHANDLELEADERCHANGEPROCEDURE_IGNORED_FAILED_TOPIC_META_PUSH_DATANODE_ARG_STATUS_ARG_67FC003F = + "SubscriptionHandleLeaderChangeProcedure: ignored failed topic meta push to DataNode {}," + + " status: {}"; + public static final String LOG_SUBSCRIPTIONHANDLELEADERCHANGEPROCEDURE_IGNORED_FAILED_CONSUMER_GROUP_META_PUSH_DATANODE_ARG_STATUS_17C948 = + "SubscriptionHandleLeaderChangeProcedure: ignored failed consumer group meta push to DataNode" + + " {}, status: {}"; + public static final String LOG_SUBSCRIPTIONHANDLELEADERCHANGEPROCEDURE_IGNORED_FAILED_SUBSCRIPTION_RUNTIME_PUSH_UNREADABLE_DATANODE_ARG_S = + "SubscriptionHandleLeaderChangeProcedure: ignored failed subscription runtime push to" + + " unreadable DataNode {}, status: {}"; + public static final String LOG_SUBSCRIPTIONHANDLELEADERCHANGEPROCEDURE_ROLLBACKFROMVALIDATE_74B408B7 = "SubscriptionHandleLeaderChangeProcedure: rollbackFromValidate"; + public static final String LOG_SUBSCRIPTIONHANDLELEADERCHANGEPROCEDURE_ROLLBACKFROMOPERATEONCONFIGNODES_D4C70763 = "SubscriptionHandleLeaderChangeProcedure: rollbackFromOperateOnConfigNodes"; + public static final String LOG_SUBSCRIPTIONHANDLELEADERCHANGEPROCEDURE_ROLLBACKFROMOPERATEONDATANODES_0250F6E9 = "SubscriptionHandleLeaderChangeProcedure: rollbackFromOperateOnDataNodes"; + public static final String LOG_SUBSCRIPTIONHANDLELEADERCHANGEPROCEDURE_FAILED_DESERIALIZE_REGION_PROGRESS_KEY_ARG_SUMMARY_ARG_F6935E59 = + "SubscriptionHandleLeaderChangeProcedure: failed to deserialize region progress, key={}," + + " summary={}"; + public static final String EXCEPTION_FAILED_PUSH_SUBSCRIPTION_RUNTIME_STATE_READABLE_DATANODES_DURING_LEADER_CHANGE_F37E6F2C = + "Failed to push subscription runtime state to readable DataNodes during leader change," + + " details: %s"; + public static final String EXCEPTION_FAILED_SERIALIZE_REGION_PROGRESS_1769D6F1 = "Failed to serialize region progress "; + public static final String EXCEPTION_NO_READABLE_DATANODE_AVAILABLE_ACCEPT_SUBSCRIPTION_METADATA_RUNTIME_UPDATES_DURING_22E61621 = + "No readable DataNode is available to accept subscription metadata/runtime updates during" + + " leader change"; + public static final String LOG_CREATESUBSCRIPTIONPROCEDURE_TOPIC_ARG_USES_CONSENSUS_SUBSCRIPTION_MODE_031CF049 = "CreateSubscriptionProcedure: topic [{}] uses consensus subscription mode "; + public static final String LOG_MODE_ARG_SKIPPING_PIPE_CREATION_5F4D1026 = "(mode={}), skipping pipe creation"; + public static final String LOG_CREATESUBSCRIPTIONPROCEDURE_CONSENSUS_BASED_TOPICS_ARG_WILL_HANDLED_DATANODE_90A9C2FD = "CreateSubscriptionProcedure: consensus-based topics {} will be handled by DataNode "; + public static final String LOG_VIA_CONSUMER_GROUP_META_PUSH_NO_PIPE_CREATION_NEEDED_D56CFE31 = "via consumer group meta push (no pipe creation needed)"; + public static final String LOG_DROPSUBSCRIPTIONPROCEDURE_TOPIC_ARG_USES_CONSENSUS_SUBSCRIPTION_MODE_6962D13C = "DropSubscriptionProcedure: topic [{}] uses consensus subscription mode "; + public static final String LOG_MODE_ARG_SKIPPING_PIPE_REMOVAL_133B0CD6 = "(mode={}), skipping pipe removal"; + public static final String LOG_COMMITPROGRESSSYNCPROCEDURE_ACQUIRELOCK_SKIP_PROCEDURE_LAST_EXECUTION_TIME_ARG_CE3DD247 = "CommitProgressSyncProcedure: acquireLock, skip the procedure due to the last execution time {}"; + public static final String LOG_COMMITPROGRESSSYNCPROCEDURE_EXECUTEFROMVALIDATE_CF220E1F = "CommitProgressSyncProcedure: executeFromValidate"; + public static final String LOG_COMMITPROGRESSSYNCPROCEDURE_EXECUTEFROMOPERATEONCONFIGNODES_0DC818CA = "CommitProgressSyncProcedure: executeFromOperateOnConfigNodes"; + public static final String LOG_FAILED_PULL_COMMIT_PROGRESS_DATANODE_ARG_STATUS_ARG_33037B29 = "Failed to pull commit progress from DataNode {}, status: {}"; + public static final String LOG_COMMITPROGRESSSYNCPROCEDURE_EXECUTEFROMOPERATEONDATANODES_NO_OP_34420360 = "CommitProgressSyncProcedure: executeFromOperateOnDataNodes (no-op)"; + public static final String LOG_COMMITPROGRESSSYNCPROCEDURE_ROLLBACKFROMVALIDATE_2309D4D2 = "CommitProgressSyncProcedure: rollbackFromValidate"; + public static final String LOG_COMMITPROGRESSSYNCPROCEDURE_ROLLBACKFROMOPERATEONCONFIGNODES_57CB907B = "CommitProgressSyncProcedure: rollbackFromOperateOnConfigNodes"; + public static final String LOG_COMMITPROGRESSSYNCPROCEDURE_ROLLBACKFROMOPERATEONDATANODES_0D2CEB50 = "CommitProgressSyncProcedure: rollbackFromOperateOnDataNodes"; + public static final String LOG_COMMITPROGRESSSYNCPROCEDURE_FAILED_DESERIALIZE_REGION_PROGRESS_KEY_ARG_SUMMARY_ARG_0202F658 = "CommitProgressSyncProcedure: failed to deserialize region progress, key={}, summary={}"; + public static final String EXCEPTION_UNEXPECTED_PARENT_444B4289 = "Unexpected parent"; + public static final String LOG_ARG_8393DD4A = "{}"; + } diff --git a/iotdb-core/confignode/src/main/i18n/zh/org/apache/iotdb/confignode/i18n/ConfigNodeMessages.java b/iotdb-core/confignode/src/main/i18n/zh/org/apache/iotdb/confignode/i18n/ConfigNodeMessages.java index 8bffa1b08311a..df8c564ed9516 100644 --- a/iotdb-core/confignode/src/main/i18n/zh/org/apache/iotdb/confignode/i18n/ConfigNodeMessages.java +++ b/iotdb-core/confignode/src/main/i18n/zh/org/apache/iotdb/confignode/i18n/ConfigNodeMessages.java @@ -518,4 +518,77 @@ public final class ConfigNodeMessages { public static final String AUTHENTICATION_FAILED = "认证失败。"; private ConfigNodeMessages() {} + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String MESSAGE_ILLEGAL_PATTERN_PATH_ARG_PATTERN_PATH_SHOULD_END_OTHERWISE_IT_50E969BB = + "非法的路径模式:%s,路径模式应以 ** 结尾;否则,它应是不含 * 的具体数据库或设备路径"; + public static final String MESSAGE_NUMBER_TTL_RULES_HAS_REACHED_LIMIT_8575FF1E = "TTL 规则数量已达到上限 "; + public static final String MESSAGE_CAPACITY_ARG_REQUESTED_TOTAL_ARG_PLEASE_DELETE_SOME_EXISTING_RULES_35B24B22 = "(容量:%d,请求总数:%d)。请先删除一些已有规则。"; + public static final String LOG_EXITS_JVM_MEMORY_USAGE_ARG_0BCD1CCF = " 退出。JVM 内存使用情况:{}"; + public static final String EXCEPTION_TOPOLOGY_PROBING_BASE_INTERVAL_MS_MUST_POSITIVE_BUT_GOT_18C9B7A2 = "topology_probing_base_interval_in_ms 必须为正数,实际为:"; + public static final String EXCEPTION_TOPOLOGY_PROBING_TIMEOUT_RATIO_MUST_0_1_BUT_GOT_FBD0E28B = "topology_probing_timeout_ratio 必须在 (0, 1) 范围内,实际为:"; + public static final String EXCEPTION_DATA_CONFIGNODE_SYSTEM_CONFIGNODE_SYSTEM_PROPERTIES_786349AB = "data/confignode/system/confignode-system.properties. "; + public static final String EXCEPTION_PLEASE_DELETE_DATA_DIR_DATA_CONFIGNODE_RESTART_AGAIN_8527BE66 = "请删除数据目录 data/confignode 后重新启动。"; + public static final String EXCEPTION_CONFIG_NODE_CONSENSUS_PROTOCOL_CLASS_SET_E7A83ED6 = "config_node_consensus_protocol_class 被设置为"; + public static final String EXCEPTION_AVAILABLE_ONLY_SCHEMA_REPLICATION_FACTOR_SET_1_45667207 = "仅在 schema_replication_factor 设置为 1 时可用"; + public static final String EXCEPTION_MESSAGE_E81C4E4F = "或"; + public static final String EXCEPTION_AVAILABLE_ONLY_DATA_REPLICATION_FACTOR_SET_1_71748D3D = "仅在 data_replication_factor 设置为 1 时可用"; + public static final String EXCEPTION_ARG_ARG_6E068B23 = "%s 或 %s"; + public static final String EXCEPTION_SCHEMAREGION_DOESN_T_SUPPORT_ORG_APACHE_IOTDB_CONSENSUS_IOT_IOTCONSENSUS_84350FD1 = "SchemaRegion 不支持 org.apache.iotdb.consensus.iot.IoTConsensus"; + public static final String EXCEPTION_SCHEMAREGION_DOESN_T_SUPPORT_ORG_APACHE_IOTDB_CONSENSUS_IOT_IOTCONSENSUSV2_BA353C6D = "SchemaRegion 不支持 org.apache.iotdb.consensus.iot.IoTConsensusV2"; + public static final String EXCEPTION_GREEDY_MIN_COST_FLOW_HASH_C07DA2EE = "GREEDY、MIN_COST_FLOW 或 HASH"; + public static final String EXCEPTION_UNRECOGNIZED_LEADER_DISTRIBUTION_POLICY_SET_F9FFB410 = "设置了无法识别的 leader_distribution_policy"; + public static final String EXCEPTION_LEADER_GREEDY_55C6B994 = "LEADER 或 GREEDY"; + public static final String EXCEPTION_UNRECOGNIZED_ROUTE_PRIORITY_POLICY_SET_C0012AE4 = "设置了无法识别的 route_priority_policy"; + public static final String EXCEPTION_THERE_NO_AVAILABLE_ARG_DATABASES_ARG_CURRENTLY_9B8297B3 = "当前数据库 %s 没有可用的 %s,"; + public static final String EXCEPTION_PLEASE_USE_SHOW_CLUSTER_SHOW_REGIONS_CHECK_CLUSTER_STATUS_611120DF = "请使用 \"show cluster\" 或 \"show regions\" 检查集群状态"; + public static final String EXCEPTION_SCHEMAREGIONGROUPS_3C409207 = "SchemaRegionGroups"; + public static final String EXCEPTION_DATAREGIONGROUPS_945CCE78 = "DataRegionGroups"; + public static final String EXCEPTION_DATANODE_NOT_ENOUGH_PLEASE_REGISTER_MORE_9F5EEDF5 = "DataNode 数量不足,请注册更多 DataNode。"; + public static final String EXCEPTION_CURRENT_DATANODES_ARG_REPLICATIONFACTOR_ARG_5D686D2B = "当前 DataNode: %s, replicationFactor: %d"; + public static final String EXCEPTION_THERE_NO_AVAILABLE_AINODES_CURRENTLY_PLEASE_USE_SHOW_CLUSTER_CHECK_FD32EB52 = "当前没有可用的 AINode,请使用 \"show cluster\" 检查集群状态。"; + public static final String EXCEPTION_ADD_CONSENSUSGROUP_ARG_FAILED_D3FDDC1B = "向 %s 添加 ConsensusGroup 失败。"; + public static final String EXCEPTION_ADD_PEER_ARG_FAILED_17DEB6CA = "添加 peer: %s 失败。"; + public static final String EXCEPTION_DATABASE_ARG_DOESN_T_EXIST_778BBF66 = "数据库 %s 不存在。"; + public static final String LOG_REDIRECTION_RECOMMENDED_REMOVECONFIGNODE_BUT_NO_LEADER_ENDPOINT_PROVIDED_ABORT_RETRY_520A4C64 = "removeConfigNode 建议重定向,但未提供 leader 端点,终止重试。"; + public static final String LOG_FAILED_WRITE_AUDIT_LOG_DATANODE_ARG_RESPONSE_ARG_691ABC90 = "向 DataNode {} 写入审计日志失败,响应:{}"; + public static final String LOG_FAILED_WRITE_AUDIT_LOG_DATANODE_ARG_90F15E13 = "向 DataNode {} 写入审计日志失败"; + public static final String EXCEPTION_UNKNOWN_PHYSICALPLANTYPE_ARG_7F21B699 = "未知的 PhysicalPlanType: %d"; + public static final String LOG_CANNOT_READ_MORE_PHYSICALPLANS_ARG_SUCCESSFULLY_READ_INDEX_ARG_REASON_2EC90E78 = "无法从 {} 读取更多 PhysicalPlans,已成功读取的索引为 {}。原因是"; + public static final String EXCEPTION_FILE_11296840 = "文件: "; + public static final String EXCEPTION_ARG_CALCULATED_ARG_0EEEE191 = "%d,计算值:%d。"; + public static final String LOG_CANNOT_DESERIALIZE_PHYSICALPLANS_BYTEBUFFER_IGNORE_REMAINING_LOGS_06AE778F = "无法从 ByteBuffer 反序列化 PhysicalPlans,忽略剩余日志"; + public static final String MESSAGE_FAILED_ALTER_DATABASE_DOESN_T_SUPPORT_ALTER_SCHEMAREPLICATIONFACTOR_YET_AD96111F = "修改数据库失败。暂不支持 ALTER schemaReplicationFactor。"; + public static final String MESSAGE_FAILED_ALTER_DATABASE_DOESN_T_SUPPORT_ALTER_DATAREPLICATIONFACTOR_YET_2E7FF6E7 = "修改数据库失败。暂不支持 ALTER DataReplicationFactor。"; + public static final String MESSAGE_FAILED_ALTER_DATABASE_DOESN_T_SUPPORT_ALTER_TIMEPARTITIONORIGIN_YET_B315F2E3 = "修改数据库失败。暂不支持 ALTER TimePartitionOrigin。"; + public static final String MESSAGE_FAILED_ALTER_DATABASE_DOESN_T_SUPPORT_ALTER_TIMEPARTITIONINTERVAL_YET_F539A76F = "修改数据库失败。暂不支持 ALTER TimePartitionInterval。"; + public static final String MESSAGE_REMOVE_CONSENSUSGROUP_FAILED_BECAUSE_TARGET_CONFIGNODE_NOT_CURRENT_CONFIGNODE_608E64F9 = "移除 ConsensusGroup 失败,原因:目标 ConfigNode 不是当前 ConfigNode。"; + public static final String MESSAGE_REMOVE_CONSENSUSGROUP_FAILED_BECAUSE_INTERNAL_FAILURE_SEE_OTHER_LOGS_MORE_51858EC2 = "移除 ConsensusGroup 失败,原因:内部错误。更多详情请查看其他日志"; + public static final String EXCEPTION_LOADPIPETASKINFOEXCEPTION_2270468E = "加载 PipeTaskInfo 异常="; + public static final String EXCEPTION_LOADPIPEPLUGININFOEXCEPTION_40362E11 = ", 加载 PipePluginInfo 异常="; + public static final String MESSAGE_FAILED_SET_PIPE_STATUS_STOPPED_RUNTIME_EXCEPTION_FLAG_BECAUSE_BFEA15AA = "设置 pipe 状态及运行时异常停止标记失败,原因:"; + public static final String EXCEPTION_UNKNOWN_TYPE_7618F8F4 = "未知的类型: "; + public static final String EXCEPTION_NO_SUCH_USER_ARG_D11B1046 = "没有该用户:%s"; + public static final String EXCEPTION_NO_SUCH_USER_ID_99CA691B = "没有该用户 id: "; + public static final String LOG_HANDLING_COMMIT_PROGRESS_META_CHANGES_FA21A080 = "正在处理提交进度元数据变更 ..."; + public static final String EXCEPTION_FAILED_CREATE_ALTER_TOPIC_ILLEGAL_ARG_ARG_EXPECTED_1_POSITIVE_A33070FB = "创建或修改 topic 失败,非法参数 %s=%s,期望为 -1 或正 long 值"; + public static final String LOG_TRYING_GET_MAX_TTL_UNDER_ONE_DATABASE_USE_LONG_MAX_9D70ACB2 = " 尝试获取单个数据库下的最大 ttl 时,使用 Long.MAX_VALUE。"; + public static final String MESSAGE_ENABLE_IOTDB_CLUSTER_S_DATA_SERVICE_PLEASE_REGISTER_ARG_MORE_F48F3890 = "要启用 IoTDB-Cluster 的数据服务,请再注册 %d 个 IoTDB-DataNode"; + public static final String MESSAGE_APPLY_NEW_CONFIGNODE_FAILED_BECAUSE_CURRENT_CONFIGNODE_CAN_T_STORE_1BB6A6BF = "应用新 ConfigNode 失败,原因:当前 ConfigNode 无法存储 ConfigNode 信息。"; + public static final String MESSAGE_REMOVE_CONFIGNODE_FAILED_BECAUSE_CURRENT_CONFIGNODE_CAN_T_STORE_CONFIGNODE_8AB3BCB4 = "移除 ConfigNode 失败,原因:当前 ConfigNode 无法存储 ConfigNode 信息。"; + public static final String LOG_NODE_ARG_REGION_ARG_70A7CD4F = "节点: {}, Region: {}"; + public static final String LOG_NO_NEED_REMOVE_IT_NODE_ARG_REGION_ARG_D14062CE = "无需移除,节点:{},Region:{}"; + public static final String LOG_PID_ARG_FAILED_WRITE_UPDATE_API_EXECUTING_CONSENSUS_LAYER_824FB30E = "pid={} 执行共识层写入更新 API 失败,原因:"; + public static final String LOG_PID_ARG_FAILED_WRITE_DELETE_API_EXECUTING_CONSENSUS_LAYER_0E758BF5 = "pid={} 执行共识层写入删除 API 失败,原因:"; + public static final String LOG_NEW_LEADER_NODEID_ARG_0A63760B = "新的 leader 为 [nodeId:{}]"; + public static final String LOG_START_CLEANING_UP_RELATED_SERVICES_A409E261 = "开始清理相关服务"; + public static final String LOG_ALL_SERVICES_OLD_LEADER_UNAVAILABLE_NOW_8A22E60F = "旧 leader 上的所有服务现在均不可用。"; + public static final String LOG_FILEPATH_ARG_RETRY_ARG_16284354 = "filePath:{},重试:{}"; + public static final String EXCEPTION_COLON_5D70AD09 = ":"; + public static final String MESSAGE_COLON_CEFF3F4D = ": "; + public static final String EMPTY_MESSAGE = ""; + public static final String EXCEPTION_PROCEDURE_TYPE_IS_NULL_93147BD3 = "Procedure 类型不能为空"; + public static final String EXCEPTION_DOT_9D9B854A = "."; + } diff --git a/iotdb-core/confignode/src/main/i18n/zh/org/apache/iotdb/confignode/i18n/ManagerMessages.java b/iotdb-core/confignode/src/main/i18n/zh/org/apache/iotdb/confignode/i18n/ManagerMessages.java index e7321e5376c7c..7c6abde6d513e 100644 --- a/iotdb-core/confignode/src/main/i18n/zh/org/apache/iotdb/confignode/i18n/ManagerMessages.java +++ b/iotdb-core/confignode/src/main/i18n/zh/org/apache/iotdb/confignode/i18n/ManagerMessages.java @@ -520,4 +520,122 @@ public final class ManagerMessages { public static final String REMOVE_CONFIGNODE_FAILED_BECAUSE_TRANSFER_CONFIGNODE_LEADER_FAILED = "移除 ConfigNode 失败,转移 ConfigNode leader 失败。"; private ManagerMessages() {} + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String LOG_SUBSCRIPTIONHANDLELEADERCHANGEPROCEDURE_WAS_SUBMITTED_PROCEDUREID_ARG_6DBD6075 = "SubscriptionHandleLeaderChangeProcedure 已提交,procedureId:{}。"; + public static final String LOG_SUBSCRIPTIONHANDLELEADERCHANGEPROCEDURE_WAS_FAILED_SUBMIT_58FAB03F = "SubscriptionHandleLeaderChangeProcedure 提交失败。"; + public static final String EXCEPTION_INVALID_2928F475 = " 无效"; + public static final String MESSAGE_FAIL_CREATE_TRIGGER_ARG_SIZE_JAR_TOO_LARGE_YOU_CAN_11869523 = + "创建 trigger[%s] 失败,Jar 包过大,可以在 ConfigNode 上调大属性 'config_node_ratis_log_appender_buffer_size_max' 的值"; + public static final String MESSAGE_FAIL_CREATE_PIPE_PLUGIN_ARG_SIZE_JAR_TOO_LARGE_YOU_D194A893 = + "创建 pipe plugin[%s] 失败,Jar 包过大,可以在 ConfigNode 上调大属性 'config_node_ratis_log_appender_buffer_size_max' 的值"; + public static final String MESSAGE_FAIL_CREATE_UDF_ARG_SIZE_JAR_TOO_LARGE_YOU_CAN_2F119802 = + "创建 UDF[%s] 失败,Jar 包过大,可以在 ConfigNode 上调大属性 'config_node_ratis_log_appender_buffer_size_max' 的值"; + public static final String EXCEPTION_FAILED_SERIALIZE_REGION_PROGRESS_1769D6F1 = "序列化 Region 进度失败 "; + public static final String MESSAGE_CONSENSUSMANAGER_TARGET_CONFIGNODE_NOT_INITIALIZED_4D386066 = "目标 ConfigNode 的 ConsensusManager 未初始化,"; + public static final String MESSAGE_PLEASE_MAKE_SURE_TARGET_CONFIGNODE_HAS_BEEN_STARTED_SUCCESSFULLY_C78201DC = "请确保目标 ConfigNode 已成功启动。"; + public static final String MESSAGE_CONFIG_NODE_CONSENSUS_PROTOCOL_CLASS_D0F437AF = "config_node_consensus_protocol_class"; + public static final String MESSAGE_DATA_REGION_CONSENSUS_PROTOCOL_CLASS_AB025B20 = "data_region_consensus_protocol_class"; + public static final String MESSAGE_SCHEMA_REGION_CONSENSUS_PROTOCOL_CLASS_480645EF = "schema_region_consensus_protocol_class"; + public static final String MESSAGE_SERIES_SLOT_NUM_115D9BE0 = "series_slot_num"; + public static final String MESSAGE_SERIES_PARTITION_EXECUTOR_CLASS_AD1B5C24 = "series_partition_executor_class"; + public static final String MESSAGE_TIME_PARTITION_INTERVAL_CE476507 = "time_partition_interval"; + public static final String MESSAGE_SCHEMA_REPLICATION_FACTOR_11DB65B5 = "schema_replication_factor"; + public static final String MESSAGE_DATA_REPLICATION_FACTOR_22465D3B = "data_replication_factor"; + public static final String MESSAGE_SCHEMA_REGION_PER_DATA_NODE_555F29BC = "schema_region_per_data_node"; + public static final String MESSAGE_DATA_REGION_PER_DATA_NODE_C183AAD5 = "data_region_per_data_node"; + public static final String MESSAGE_READ_CONSISTENCY_LEVEL_B12D8D95 = "read_consistency_level"; + public static final String MESSAGE_DISK_SPACE_WARNING_THRESHOLD_19635ACA = "disk_space_warning_threshold"; + public static final String MESSAGE_TIMESTAMP_PRECISION_9591C9C9 = "timestamp_precision"; + public static final String MESSAGE_SCHEMA_ENGINE_MODE_E37ED98C = "schema_engine_mode"; + public static final String MESSAGE_TAG_ATTRIBUTE_TOTAL_SIZE_AF658CFE = "tag_attribute_total_size"; + public static final String MESSAGE_DATABASE_LIMIT_THRESHOLD_45C23274 = "database_limit_threshold"; + public static final String LOG_UNEXPECTED_ERROR_HAPPENED_SETTING_SPACE_QUOTA_DATABASE_ARG_F6ED7586 = "设置数据库 %s 的空间配额时发生意外错误 "; + public static final String LOG_UNEXPECTED_ERROR_HAPPENED_SETTING_THROTTLE_QUOTA_USER_ARG_C111BE81 = "设置用户 %s 的限流配额时发生意外错误 "; + public static final String LOG_SCHEMA_TEMPLATE_NEED_TWO_FILES_1E57542A = "schema_template 需要两个文件"; + public static final String LOG_GOT_IOEXCEPTION_DESERIALIZE_USE_ROLE_FILE_TYPE_ARG_1B548759 = "反序列化 use&role 文件时发生 IOException,类型:{}"; + public static final String LOG_GOT_IOEXCEPTION_DESERIALIZE_ROLELIST_1354F29E = "反序列化 roleList 时发生 IOException"; + public static final String LOG_GOT_EXCEPTION_DESERIALIZING_TTL_FILE_F806EB40 = "反序列化 ttl 文件时发生异常"; + public static final String LOG_UNRECOGNIZED_NODE_TYPE_CANNOT_DESERIALIZE_MTREE_GIVEN_BUFFER_5CF3121B = "无法识别节点类型,无法从给定缓冲区反序列化 MTree"; + public static final String LOG_GOT_IOEXCEPTION_CONSTRUCT_DATABASE_TREE_49436621 = "构建数据库树时发生 IOException"; + public static final String LOG_GOT_IOEXCEPTION_DESERIALIZE_TEMPLATE_INFO_49EE617E = "反序列化模板信息时发生 IOException"; + public static final String MESSAGE_MEASUREMENTS_NOT_FOUND_ARG_CANNOT_AUTO_DETECT_980D7D44 = "未找到 %s 的测点,无法自动检测"; + public static final String LOG_FAILED_TAKE_SNAPSHOT_BECAUSE_SNAPSHOT_FILE_ARG_ALREADY_EXIST_EB2A6093 = "获取快照失败,原因:快照文件 [{}] 已存在。"; + public static final String LOG_FAILED_LOAD_SNAPSHOT_SNAPSHOT_FILE_ARG_NOT_EXIST_8828CFBA = "无法加载快照,快照文件 [{}] 不存在。"; + public static final String LOG_YOU_MAYBE_NEED_RENAME_SIMPLE_DIR_0_0_MANUALLY_2A12C5C9 = "可能需要手动将 simple 目录重命名为 0_0。"; + public static final String LOG_CONFIGNODE_LOCAL_PEER_HAS_ALREADY_BEEN_CREATED_ARG_FA75E88F = "ConfigNode 本地 peer 已创建:{}"; + public static final String LOG_CONFIGNODE_PEER_ARG_HAS_ALREADY_BEEN_ADDED_ARG_A8F958B0 = "ConfigNode peer {} 已添加:{}"; + public static final String LOG_CONFIGNODE_PEER_ARG_HAS_ALREADY_BEEN_REMOVED_ARG_FACD71EE = "ConfigNode peer {} 已移除:{}"; + public static final String MESSAGE_CURRENT_CONFIGNODE_LEADER_BUT_NOT_READY_YET_PLEASE_TRY_AGAIN_F0B10645 = "当前 Config 节点是 leader,但共识层还没有准备好。"; + + public static final String MESSAGE_CURRENT_CONFIGNODE_LEADER_SERVICE_NOT_READY = "当前 Config 节点是 leader,但 leader 服务层还没有准备好。"; + + public static final String MESSAGE_CURRENT_CONFIGNODE_NOT_LEADER_PLEASE_REDIRECT_NEW_CONFIGNODE_F9AF262D = "当前 ConfigNode 不是 leader,请重定向到新的 ConfigNode。"; + public static final String LOG_FAILED_SYNC_COMMIT_PROGRESS_RESULT_STATUS_ARG_A9E46E80 = "同步提交进度失败。结果状态:{}。"; + public static final String MESSAGE_FAILED_ALTER_DATABASE_DATABASE_2734674F = "修改数据库失败。数据库 "; + public static final String MESSAGE_DOESN_T_EXIST_EED8C92E = " 不存在。"; + public static final String MESSAGE_FAILED_ALTER_DATABASE_SCHEMAREGIONGROUPNUM_COULD_ONLY_INCREASED_B98229D3 = "修改数据库失败。SchemaRegionGroupNum 只能增加。"; + public static final String MESSAGE_CURRENT_SCHEMAREGIONGROUPNUM_ARG_ALTER_SCHEMAREGIONGROUPNUM_ARG_F7495BC2 = "当前 schemaRegionGroupNum:%d,待修改的 schemaRegionGroupNum:%d"; + public static final String MESSAGE_FAILED_ALTER_DATABASE_DATAREGIONGROUPNUM_COULD_ONLY_INCREASED_84283EB5 = "修改数据库失败。DataRegionGroupNum 只能增加。"; + public static final String MESSAGE_CURRENT_DATAREGIONGROUPNUM_ARG_ALTER_DATAREGIONGROUPNUM_ARG_61C6E978 = "当前 DataRegionGroupNum:%d,待修改的 DataRegionGroupNum:%d"; + public static final String MESSAGE_FAILED_CREATE_DATABASE_SCHEMAREPLICATIONFACTOR_SHOULD_POSITIVE_8847F33C = "创建数据库失败。schemaReplicationFactor 应为正数。"; + public static final String MESSAGE_FAILED_CREATE_DATABASE_DATAREPLICATIONFACTOR_SHOULD_POSITIVE_C2565B7E = "创建数据库失败。dataReplicationFactor 应为正数。"; + public static final String MESSAGE_FAILED_CREATE_DATABASE_TIMEPARTITIONORIGIN_SHOULD_NON_NEGATIVE_BD0595C9 = "创建数据库失败。timePartitionOrigin 应为非负数。"; + public static final String MESSAGE_FAILED_CREATE_DATABASE_TIMEPARTITIONINTERVAL_SHOULD_POSITIVE_BB1B473F = "创建数据库失败。timePartitionInterval 应为正数。"; + public static final String MESSAGE_FAILED_CREATE_DATABASE_SCHEMAREGIONGROUPNUM_SHOULD_POSITIVE_8396A2AB = "创建数据库失败。schemaRegionGroupNum 应为正数。"; + public static final String MESSAGE_ACCEPT_NODE_REGISTRATION_4133276A = "接受节点注册。"; + public static final String MESSAGE_ACCEPT_NODE_RESTART_1BC1A8DD = "接受节点重启。"; + public static final String MESSAGE_REJECT_ARG_START_BECAUSE_CLUSTERNAME_CURRENT_ARG_TARGET_CLUSTER_INCONSISTENT_B9E197DB = "拒绝启动 %s。原因:当前 %s 的 ClusterName 与目标集群不一致。"; + public static final String MESSAGE_CLUSTERNAME_CURRENT_NODE_ARG_CLUSTERNAME_TARGET_CLUSTER_ARG_5C34BE8D = "当前节点的 ClusterName:%s,目标集群的 ClusterName:%s。"; + public static final String MESSAGE_1_CHANGE_SEED_CONFIG_NODE_PARAMETER_ARG_JOIN_CORRECT_CLUSTER_5E9D753C = "\\t1. 修改 %s 中的 seed_config_node 参数以加入正确的集群。"; + public static final String MESSAGE_2_CHANGE_CLUSTER_NAME_PARAMETER_ARG_MATCH_TARGET_CLUSTER_0A0DB235 = "\\n\\t2. 修改 %s 中的 cluster_name 参数以匹配目标集群"; + public static final String MESSAGE_REJECT_ARG_REGISTRATION_BECAUSE_FOLLOWING_IP_PORT_ARG_CURRENT_ARG_CB78CC3B = + "拒绝注册 %s。原因:以下 ip:port:%s(属于当前 %s)与集群中其他已注册节点冲突。"; + public static final String MESSAGE_1_USE_SQL_SHOW_CLUSTER_DETAILS_FIND_OUT_CONFLICT_NODES_A1195AEA = "\\t1. 使用 SQL:\\\"show cluster details\\\" 找出冲突节点。移除它们后重试启动。"; + public static final String MESSAGE_2_CHANGE_CONFLICT_IP_PORT_CONFIGURATIONS_ARG_FILE_RETRY_START_CF3F08F6 = "\\n\\t2. 修改 %s 文件中的冲突 ip:port 配置,然后重试启动。"; + public static final String MESSAGE_CLUSTER_ID_HAS_NOT_GENERATED_PLEASE_TRY_AGAIN_LATER_58A1C3F2 = "cluster id 尚未生成,请稍后重试"; + public static final String MESSAGE_REJECT_ARG_RESTART_BECAUSE_CLUSTERNAME_CURRENT_ARG_TARGET_CLUSTER_INCONSISTENT_2075F29D = "拒绝重启 %s。原因:当前 %s 的 ClusterName 与目标集群不一致。"; + public static final String MESSAGE_REJECT_ARG_RESTART_BECAUSE_NODEID_CURRENT_ARG_ARG_AC13EDD5 = "拒绝重启 %s。原因:当前 %s 的 nodeId 为 %d。"; + public static final String MESSAGE_1_DELETE_DATA_DIR_RETRY_86A23473 = "\\t1. 删除 \\\"data\\\" 目录后重试。"; + public static final String MESSAGE_REJECT_ARG_RESTART_BECAUSE_THERE_NO_CORRESPONDING_ARG_WHOSE_NODEID_455578E9 = "拒绝重启 %s。原因:集群中没有对应的 %s(nodeId=%d)。"; + public static final String MESSAGE_1_MAYBE_YOU_VE_ALREADY_REMOVED_CURRENT_ARG_WHOSE_NODEID_92165504 = + "\\t1. 可能你已经移除了当前 %s(nodeId=%d)。请删除无用的 'data' 目录并重试启动。"; + public static final String MESSAGE_REJECT_ARG_RESTART_BECAUSE_CLUSTERID_CURRENT_ARG_TARGET_CLUSTER_INCONSISTENT_0398A6CE = "拒绝重启 %s。原因:当前 %s 的 clusterId 与目标集群不一致。"; + public static final String MESSAGE_CLUSTERID_CURRENT_NODE_ARG_CLUSTERID_TARGET_CLUSTER_ARG_23C42434 = "当前节点的 ClusterId:%s,目标集群的 ClusterId:%s。"; + public static final String MESSAGE_1_PLEASE_CHECK_IF_NODE_CONFIGURATION_PATH_CORRECT_7FB5D559 = "\\t1. 请检查节点配置或路径是否正确。"; + public static final String MESSAGE_REJECT_ARG_RESTART_BECAUSE_INTERNAL_TENDPOINTS_ARG_CAN_T_MODIFIED_A58B99F0 = "拒绝重启 %s。原因:此 %s 的 internal TEndPoints 不能被修改。"; + public static final String MESSAGE_1_PLEASE_KEEP_INTERNAL_TENDPOINTS_NODE_SAME_AS_BEFORE_2FDB2034 = "\\t1. 请保持此节点的 internal TEndPoints 与之前一致。"; + public static final String MESSAGE_REMOVE_CONFIGNODE_FAILED_BECAUSE_THERE_ONLY_ONE_CONFIGNODE_CURRENT_CLUSTER_D1273758 = "移除 ConfigNode 失败,原因:当前集群中只有一个 ConfigNode。"; + public static final String MESSAGE_REMOVE_CONFIGNODE_FAILED_BECAUSE_THERE_NO_OTHER_CONFIGNODE_RUNNING_STATUS_C9C43315 = "移除 ConfigNode 失败,原因:当前集群中没有其他处于 Running 状态的 ConfigNode。"; + public static final String MESSAGE_REMOVE_CONFIGNODE_FAILED_BECAUSE_CONFIGNODEGROUP_LEADER_ELECTION_PLEASE_RETRY_3EE602F6 = "移除 ConfigNode 失败,原因:ConfigNodeGroup 正在进行 leader 选举,请重试。"; + public static final String MESSAGE_TRANSFER_CONFIGNODE_LEADER_FAILED_BECAUSE_CAN_NOT_FIND_ANY_RUNNING_1FE4F96D = "转移 ConfigNode leader 失败,原因:找不到任何正在运行的 ConfigNode。"; + public static final String MESSAGE_CONFIGNODE_REMOVED_LEADER_ALREADY_TRANSFER_LEADER_FA6D1603 = "待移除的 ConfigNode 是 leader,已将 Leader 转移到 "; + public static final String MESSAGE_TARGET_DATANODE_NOT_EXISTED_PLEASE_ENSURE_YOUR_INPUT_QUERYID_CORRECT_AB84CCDF = "目标 DataNode 不存在,请确保输入的 正确"; + public static final String MESSAGE_CREATE_SCHEMAPARTITION_FAILED_BECAUSE_DATABASE_ARG_NOT_EXISTS_D8AE1679 = "创建 SchemaPartition 失败,原因:数据库 %s 不存在"; + public static final String MESSAGE_CREATE_SCHEMAPARTITION_FAILED_BECAUSE_DATABASE_ARG_DOES_NOT_EXIST_2617832C = "创建 SchemaPartition 失败,原因:数据库 %s 不存在"; + public static final String MESSAGE_CREATE_DATAPARTITION_FAILED_BECAUSE_DATABASE_ARG_NOT_EXISTS_F223D5C2 = "创建 DataPartition 失败,原因:数据库 %s 不存在"; + public static final String MESSAGE_CREATE_DATAPARTITION_FAILED_BECAUSE_DATABASE_ARG_DOES_NOT_EXIST_D7A8C1FC = "创建 DataPartition 失败,原因:数据库 %s 不存在"; + public static final String LOG_REGIONGROUP_ARG_SERIESPARTITIONSLOT_COUNT_ARG_30F57B14 = "到 RegionGroup {},SeriesPartitionSlot 数量:{}"; + public static final String LOG_REGIONGROUPID_ARG_SERIESPARTITIONSLOT_COUNT_ARG_5DAE4B6A = "RegionGroupId:{},SeriesPartitionSlot 数量:{}"; + public static final String LOG_INCREASE_REFERENCE_COUNT_SNAPSHOT_ARG_ERROR_HOLDER_MESSAGE_ARG_962E8672 = "增加快照 %s 的引用计数失败。Holder 消息:%s"; + public static final String LOG_DECREASE_REFERENCE_COUNT_SNAPSHOT_ARG_ERROR_HOLDER_MESSAGE_ARG_8C7FF9CE = "减少快照 %s 的引用计数失败。Holder 消息:%s"; + public static final String MESSAGE_RECEIVER_CONFIGNODE_HAS_SET_UP_NEW_RECEIVER_SENDER_MUST_RE_77B80C51 = + "接收端 ConfigNode 已建立新的 receiver,发送端必须重新发送 handshake 请求。"; + public static final String LOG_IGNORE_EXCEPTION_2AC431FA = "忽略此异常。"; + public static final String LOG_REPORTING_PIPE_META_ARG_REMAININGEVENTCOUNT_ARG_ESTIMATEDREMAININGTIME_ARG_E2727CB4 = "上报 pipe meta:{},remainingEventCount:{},estimatedRemainingTime:{}"; + public static final String LOG_PIPEMETAFROMAGENT_NULL_PIPEMETAFROMCOORDINATOR_ARG_36C513AE = "pipeMetaFromAgent 为空,pipeMetaFromCoordinator:{}"; + public static final String LOG_DETECTED_HISTORICAL_PIPE_COMPLETION_REPORT_DATANODE_ARG_PIPE_ARG_REMAININGEVENTCOUNT_7E6C52E9 = + "检测到 DataNode {} 上 pipe {} 的历史 pipe 完成报告。remainingEventCount:" + + "{},remainingTime:{},completedDataNodes:{}"; + public static final String LOG_ALL_DATANODES_REPORTED_HISTORICAL_PIPE_ARG_COMPLETED_GLOBALREMAININGEVENTCOUNT_ARG_GLOBALREMAININGTIME_255 = + "所有 DataNode 均报告历史 pipe {} 已完成。globalRemainingEventCount:{}," + + "globalRemainingTime:{},staticMeta:{}"; + public static final String LOG_UPDATED_PROGRESS_INDEX_PIPE_NAME_ARG_CONSENSUS_GROUP_ID_ARG_DF112F4F = "已更新 (pipe 名称:{},共识组 id:{}) 的进度索引 ... "; + public static final String LOG_PROGRESS_INDEX_COORDINATOR_ARG_PROGRESS_INDEX_AGENT_ARG_UPDATED_PROGRESSINDEX_1A22ABC5 = "coordinator 上的进度索引:{},agent 上的进度索引:{},更新后的 progressIndex:{}"; + public static final String LOG_DETECT_PIPERUNTIMECONNECTORCRITICALEXCEPTION_ARG_7D198DD7 = "检测到 PipeRuntimeConnectorCriticalException %s "; + public static final String LOG_AGENT_STOP_PIPE_ARG_42212C21 = "来自 agent,停止 pipe %s。"; + public static final String LOG_CREATEREGIONGROUPS_REGIONGROUP_ARG_BELONGED_DATABASE_ARG_DATANODES_ARG_5270AB6B = "[CreateRegionGroups] RegionGroup:{},所属数据库:{},DataNodes:{}"; + public static final String EXCEPTION_DATANODEID_SHOULD_NOT_BE_MINUS_1_HERE_5CB27796 = "dataNodeId 不应为 -1"; + } diff --git a/iotdb-core/confignode/src/main/i18n/zh/org/apache/iotdb/confignode/i18n/ProcedureMessages.java b/iotdb-core/confignode/src/main/i18n/zh/org/apache/iotdb/confignode/i18n/ProcedureMessages.java index d928f4f6bae8b..cbdf916d74b91 100644 --- a/iotdb-core/confignode/src/main/i18n/zh/org/apache/iotdb/confignode/i18n/ProcedureMessages.java +++ b/iotdb-core/confignode/src/main/i18n/zh/org/apache/iotdb/confignode/i18n/ProcedureMessages.java @@ -1085,4 +1085,159 @@ public final class ProcedureMessages { public static final String FAILED_IN_THE_WRITE_API_EXECUTING_THE_CONSENSUS_LAYER_DUE = "在共识层执行写入 API 失败,原因:"; private ProcedureMessages() {} + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String EXCEPTION_MS_95BA098D = " ms."; + public static final String LOG_ARG_JOIN_WAIT_GOT_INTERRUPTED_316B5E9F = "{} 的 join 等待被中断"; + public static final String LOG_NO_COMPLETED_PROCEDURES_CLEANUP_50434D91 = "没有已完成的 procedures 需要清理。"; + public static final String LOG_ERROR_DELETING_COMPLETED_PROCEDURES_ARG_1A3A185E = "删除已完成的 procedures {} 时出错。"; + public static final String LOG_EVICT_COMPLETED_ARG_A968A070 = "驱逐已完成的 {}"; + public static final String LOG_EXECUTING_PROCEDURE_SHOULD_RUNNABLE_STATE_BUT_IT_S_NOT_PROCEDURE_7CF42CE8 = "执行中的 procedure 应处于 RUNNABLE 状态,但实际不是。Procedure 为 {}"; + public static final String LOG_FINISHED_SUBPROCEDURE_PID_ARG_RESUME_PROCESSING_PPID_ARG_93ED990B = "subprocedure pid={} 已完成,恢复处理 ppid={}"; + public static final String LOG_HALT_PID_ARG_ACTIVECOUNT_ARG_411F3EBF = "暂停 pid={}, activeCount={}"; + public static final String LOG_EXCEPTION_HAPPENED_WORKER_ARG_EXECUTE_PROCEDURE_ARG_6E3AD27D = "worker {} 执行 procedure {} 时发生异常"; + public static final String LOG_WORKER_STUCK_ARG_ARG_RUN_TIME_ARG_MS_FB612354 = "Worker 卡住 {}({}),运行时间 {} ms"; + public static final String LOG_PROCEDURE_WORKERS_ARG_RUNNING_ARG_RUNNING_STUCK_1565936D = "Procedure workers:{} 正在运行,{} 正在运行且卡住"; + public static final String LOG_PROCEDUREEXECUTOR_THREADGROUP_ARG_CONTAINS_RUNNING_THREADS_WHICH_USED_NON_PROCEDURE_BD865211 = "ProcedureExecutor threadGroup {} 包含被非 procedure 模块使用的运行线程。"; + public static final String LOG_ADD_PROCEDURE_ARG_AS_ARG_TH_ROLLBACK_STEP_C71B2184 = "将 procedure {} 添加为第 {} 个回滚步骤"; + public static final String LOG_STATEMACHINEPROCEDURE_PID_ARG_NOT_SET_NEXT_STATE_BUT_RETURN_HAS_7F93E63F = + "StateMachineProcedure pid={} 未设置下一状态,却返回 HAS_MORE_STATE。代码可能存在问题,请检查代码。该 procedure 即将被终止:{}"; + public static final String LOG_STATEMACHINEPROCEDURE_PID_ARG_SET_NEXT_STATE_ARG_BUT_RETURN_NO_0CA2D56C = "StateMachineProcedure pid={} 设置下一状态为 {},但返回 NO_MORE_STATE"; + public static final String LOG_DON_T_ADD_SUCCESSFUL_PROCEDURE_BACK_SCHEDULER_IT_WILL_IGNORED_E015472C = "不要将已成功的 procedure 加回 scheduler,它将被忽略"; + public static final String LOG_SCHEDULER_NOT_RUNNING_6969C9FF = "scheduler 未运行"; + public static final String LOG_SCHEDULER_WAITING_TIME_LEFT_ARG_NANOS_D7717019 = "scheduler 剩余等待时间 {} nanos"; + public static final String LOG_SLEEP_FAILED_CONFIGNODEPROCEDUREENV_BCD470AC = "ConfigNodeProcedureEnv 中 Sleep 失败:"; + public static final String LOG_INVALIDATE_CACHE_FAILED_BECAUSE_DATANODE_ARG_UNKNOWN_4F2D374C = "缓存失效失败,原因:DataNode {} 状态未知"; + public static final String LOG_INVALIDATE_CACHE_FAILED_INVALIDATE_PARTITION_CACHE_STATUS_ARG_INVALIDATE_SCHEMAENGINE_BEB7A065 = "缓存失效失败,分区缓存失效状态为 {},schemaengine 缓存失效状态为 {}"; + public static final String MESSAGE_REMOVE_CONFIGNODE_FAILED_BECAUSE_UPDATE_CONSENSUSGROUP_PEER_INFORMATION_FAILED_FCE5302B = "移除 ConfigNode 失败,原因:更新 ConsensusGroup peer 信息失败。"; + public static final String MESSAGE_CAN_T_REMOVE_DATANODE_LIMIT_REPLICATION_FACTOR_D960E3A6 = "无法移除 DataNode,原因:受副本因子限制,"; + public static final String MESSAGE_AVAILABLEDATANODESIZE_ARG_MAXREPLICAFACTOR_ARG_MAX_ALLOWED_REMOVED_DATA_NODE_SIZE_FB8C382C = "availableDataNodeSize:%s,maxReplicaFactor:%s,允许移除的最大 DataNode 数量为:%s"; + public static final String EXCEPTION_NOT_SUPPORTED_0A83F963 = " 不支持"; + public static final String LOG_START_ADD_TRIGGER_ARG_TRIGGERTABLE_CONFIG_NODES_NEEDTOSAVEJAR_ARG_0C23D81E = "开始在 Config Nodes 的 TriggerTable 中添加 trigger [{}],needToSaveJar[{}]"; + public static final String LOG_START_CREATE_TRIGGERINSTANCE_ARG_DATA_NODES_917C3313 = "开始在 Data Nodes 上创建 triggerInstance [{}]"; + public static final String LOG_START_ACTIVE_TRIGGER_ARG_DATA_NODES_A4AB8131 = "开始在 Data Nodes 上激活 trigger [{}]"; + public static final String LOG_START_ACTIVE_TRIGGER_ARG_CONFIG_NODES_153A5D40 = "开始在 Config Nodes 上激活 trigger [{}]"; + public static final String LOG_RETRIEVABLE_ERROR_TRYING_CREATE_TRIGGER_ARG_STATE_ARG_44976C4E = "尝试创建 trigger [{}] 时发生可重试错误,状态 [{}]"; + public static final String LOG_START_CONFIG_NODE_INACTIVE_ROLLBACK_TRIGGER_ARG_536929E5 = "开始 trigger [{}] 的 [CONFIG_NODE_INACTIVE] 回滚"; + public static final String LOG_START_DATA_NODE_INACTIVE_ROLLBACK_TRIGGER_ARG_38C93D64 = "开始 trigger [{}] 的 [DATA_NODE_INACTIVE] 回滚"; + public static final String LOG_RETRIEVABLE_ERROR_TRYING_DROP_TRIGGER_ARG_STATE_ARG_2282AC35 = "尝试删除 trigger [{}] 时发生可重试错误,状态 [{}]"; + public static final String LOG_DELETEDATABASEPROCEDURE_PRE_DELETE_DATABASE_ARG_6A1FEACC = "[DeleteDatabaseProcedure] 预删除数据库:{}"; + public static final String LOG_DELETEDATABASEPROCEDURE_INVALIDATE_CACHE_DATABASE_ARG_299FC9BC = "[DeleteDatabaseProcedure] 使数据库 {} 的缓存失效"; + public static final String LOG_DELETEDATABASEPROCEDURE_DELETE_DATABASESCHEMA_ARG_A49A47AC = "[DeleteDatabaseProcedure] 删除数据库 Schema:{}"; + public static final String LOG_DELETEDATABASEPROCEDURE_SUCCESSFULLY_DELETE_SCHEMAREGION_ARG_ARG_BA0535DA = "[DeleteDatabaseProcedure] 成功删除 SchemaRegion[{}],位置 {}"; + public static final String LOG_DELETEDATABASEPROCEDURE_FAILED_DELETE_SCHEMAREGION_ARG_ARG_SUBMIT_ASYNC_DELETION_8C3E6DE3 = "[DeleteDatabaseProcedure] 删除 SchemaRegion[{}] 失败,位置 {}。提交异步删除。"; + public static final String LOG_DELETEDATABASEPROCEDURE_DATA_PARTITION_POLICY_TABLE_DATABASE_ARG_CLEARED_7A32E28A = "[DeleteDatabaseProcedure] 数据库 {} 的数据分区策略表已清理。"; + public static final String LOG_DELETEDATABASEPROCEDURE_DATABASE_ARG_DELETED_SUCCESSFULLY_3A4E9202 = "[DeleteDatabaseProcedure] 数据库 {} 已成功删除"; + public static final String LOG_DELETEDATABASEPROCEDURE_RETRIABLE_ERROR_TRYING_DELETE_DATABASE_ARG_STATE_ARG_8167D246 = "[DeleteDatabaseProcedure] 尝试删除数据库 {} 时发生可重试错误,状态 {}"; + public static final String LOG_DELETEDATABASEPROCEDURE_ROLLBACK_PREDELETED_ARG_638F53DA = "[DeleteDatabaseProcedure] 回滚到预删除状态:{}"; + public static final String EXCEPTION_FAILED_DAA6EA2F = " 失败 "; + public static final String EXCEPTION_FAILED_CHECK_TIME_SERIES_EXISTENCE_ALL_REPLICASET_SCHEMAREGION_ARG_FAILURES_5F668154 = "检查 SchemaRegion %s 的所有 replicaset 中的时间序列是否存在失败。失败信息:%s"; + public static final String LOG_FAILED_ROLLBACK_CONFIGNODE_TTL_STATE_9666EF54 = "无法回滚 ConfigNode ttl 状态。"; + public static final String LOG_FAILED_ROLLBACK_DATANODE_TTL_CACHE_436C008A = "无法回滚 DataNode ttl 缓存。"; + public static final String EXCEPTION_ROLLBACK_CONFIGNODE_TTL_FAILED_6D4FB59A = "回滚 ConfigNode ttl 失败,对象:"; + public static final String EXCEPTION_ROLLBACK_DATANODE_TTL_CACHE_FAILED_AF9C7102 = "回滚 DataNode ttl 缓存失败,对象:"; + public static final String LOG_PLEASE_VERIFY_WHETHER_LEADER_CHANGE_HAS_OCCURRED_DURING_STAGE_9FE68EE3 = "请确认该阶段是否发生 leader 变更。"; + public static final String LOG_IF_LOG_TRIGGERED_WITHOUT_LEADER_CHANGE_IT_INDICATES_POTENTIAL_BUG_32AE71FD = + "如果未发生 leader 变更却触发该日志,说明分区表可能存在潜在问题。"; + public static final String LOG_SKIP_RECOVERING_SCHEDULE_TASK_CQ_ARG_BECAUSE_ITS_METADATA_UNAVAILABLE_00286802 = "跳过恢复 CQ {} 的调度任务,原因:其元数据不可用。"; + public static final String LOG_PROCEDUREID_ARG_ACQUIRE_LOCK_3FBF9987 = "procedureId {} 获取锁。"; + public static final String LOG_PROCEDUREID_ARG_ACQUIRE_LOCK_FAILED_WILL_WAIT_LOCK_AFTER_FINISHING_3B27278E = "procedureId {} 获取锁失败,将在执行完成后等待锁。"; + public static final String LOG_PROCEDUREID_ARG_RELEASE_LOCK_FF860D6B = "procedureId {} 释放锁。"; + public static final String LOG_RETRIEVABLE_ERROR_TRYING_ADD_CONFIG_NODE_ARG_STATE_ARG_D7285810 = "尝试添加 ConfigNode {} 时发生可重试错误,状态 {}"; + public static final String LOG_RETRIEVABLE_ERROR_TRYING_REMOVE_CONFIG_NODE_ARG_STATE_ARG_3754EBA1 = "尝试移除 ConfigNode {} 时发生可重试错误,状态 {}"; + public static final String LOG_PROCEDUREID_ARG_REMOVEDATANODES_SKIPS_ACQUIRING_LOCK_SINCE_UPPER_LAYER_ENSURES_C7546FF8 = "procedureId {}-RemoveDataNodes 跳过获取锁,因为上层保证串行执行。"; + public static final String LOG_PROCEDUREID_ARG_REMOVEDATANODES_SKIPS_RELEASING_LOCK_SINCE_IT_HASN_T_AED8A3DA = "procedureId {}-RemoveDataNodes 跳过释放锁,因为它没有获取任何锁。"; + public static final String LOG_ARG_CAN_NOT_REMOVE_DATANODE_ARG_495F9F85 = "{}, 不能移除 DataNode {} "; + public static final String LOG_BECAUSE_NUMBER_DATANODES_LESS_EQUAL_THAN_REGION_REPLICA_NUMBER_DEC0CB38 = "因为 DataNode 数量小于或等于 Region 副本数"; + public static final String LOG_ARG_DATANODE_REGIONS_REMOVED_ARG_216A7DC7 = "{},待移除的 DataNode Region 为 {}"; + public static final String LOG_RETRIEVABLE_ERROR_TRYING_REMOVE_DATA_NODE_ARG_STATE_ARG_4EFEB850 = "尝试移除 DataNode {} 时发生可重试错误,状态 {}"; + public static final String LOG_SUBMIT_REGIONMIGRATEPROCEDURE_REGIONID_ARG_REMOVEDDATANODE_ARG_DESTDATANODE_ARG_COORDINATORFORADDPEER_ARG_ = + "提交 RegionMigrateProcedure,regionId {}: removedDataNode={}, destDataNode={}," + + " coordinatorForAddPeer={}, coordinatorForRemovePeer={}"; + public static final String LOG_ARG_CANNOT_FIND_TARGET_DATANODE_MIGRATE_REGION_ARG_81A78E06 = "{},找不到用于迁移 Region {} 的目标 DataNode"; + public static final String LOG_ARG_SOME_REGIONS_MIGRATED_FAILED_DATANODE_ARG_MIGRATEDFAILEDREGIONS_ARG_11644841 = "{},DataNode {} 中部分 Regions 迁移失败,migratedFailedRegions:{}。"; + public static final String LOG_REGIONS_HAVE_BEEN_SUCCESSFULLY_MIGRATED_WILL_NOT_ROLL_BACK_YOU_AE904563 = "已成功迁移的 Regions 不会回滚,之后可以再次提交 RemoveDataNodes 任务。"; + public static final String LOG_ARG_DATANODES_ARG_ALL_REGIONS_MIGRATED_SUCCESSFULLY_START_STOP_THEM_32D56F28 = "{},DataNodes:{} 的所有 Regions 已成功迁移,开始停止它们。"; + public static final String LOG_ARG_START_ROLL_BACK_DATANODES_STATUS_ARG_05C67270 = "{},开始回滚 DataNodes 状态:{}"; + public static final String LOG_ARG_ROLL_BACK_DATANODES_STATUS_SUCCESSFULLY_ARG_6773A2DF = "{},成功回滚 DataNodes 状态:{}"; + public static final String LOG_DATAPARTITIONINTEGRITY_NO_DATANODES_REGISTERED_NO_WAY_COLLECT_EARLIEST_TIMESLOTS_WAITING_7025EB23 = + "[DataPartitionIntegrity] 没有已注册的 DataNode,无法收集最早的 timeslot,等待它们上线"; + public static final String LOG_DATAPARTITIONINTEGRITY_FAILED_COLLECTED_EARLIEST_TIMESLOTS_DATANODE_ID_ARG_ALREADY_OUT_834B62B9 = + "[DataPartitionIntegrity] 从 DataNode[id={}] 收集最早 timeslot 失败,已超过最大重试时间"; + public static final String LOG_DATAPARTITIONINTEGRITY_FAILED_COLLECTED_EARLIEST_TIMESLOTS_DATANODE_ID_ARG_RESPONSE_STATUS_B0A31EC4 = + "[DataPartitionIntegrity] 从 DataNode[id={}] 收集最早 timeslot 失败,响应状态为 {}"; + public static final String LOG_COLLECTED_EARLIEST_TIMESLOTS_DATANODE_ID_ARG_ARG_5CDF2BA6 = "已从 DataNode[id={}] 收集最早 timeslot:{}"; + public static final String LOG_DATAPARTITIONINTEGRITY_FAILED_COLLECT_EARLIEST_TIMESLOTS_DATANODE_ID_ARG_ARG_A211840A = "[DataPartitionIntegrity] 从 DataNode[id={}] 收集最早 timeslot 失败:{}"; + public static final String LOG_COLLECTED_EARLIEST_TIMESLOTS_ARG_DATANODES_ARG_NUMBER_SUCCESSFUL_DATANODES_ARG_1CC129EF = "从 {} 个 DataNode 收集最早 timeslot:{},成功的 DataNode 数量为 {}"; + public static final String LOG_DATAPARTITIONINTEGRITY_NO_MISSING_DATA_PARTITIONS_DETECTED_NOTHING_NEEDS_REPAIRED_TERMINATING_72F2635F = + "[DataPartitionIntegrity] 未检测到缺失的数据分区,无需修复,终止 procedure"; + public static final String LOG_DATAPARTITIONINTEGRITY_NO_DATA_PARTITION_TABLE_RELATED_DATABASE_ARG_WAS_FOUND_B5B90613 = + "[DataPartitionIntegrity] 未从 ConfigNode 找到与数据库 {} 相关的数据分区表,需要修复该问题"; + public static final String LOG_DATAPARTITIONINTEGRITY_DATABASE_ARG_HAS_LOST_TIMESLOT_ARG_ITS_DATA_TABLE_499AF395 = + "[DataPartitionIntegrity] 数据库 {} 在其数据表分区中丢失 timeslot {},需要修复该问题"; + public static final String LOG_DATAPARTITIONINTEGRITY_NO_DATABASES_HAVE_LOST_DATA_PARTITIONS_TERMINATING_PROCEDURE_3E718CC3 = "[DataPartitionIntegrity] 没有数据库丢失数据分区,终止 procedure"; + public static final String LOG_DATAPARTITIONINTEGRITY_IDENTIFIED_ARG_DATABASES_HAVE_LOST_DATA_PARTITIONS_WILL_REQUEST_6DEA7502 = + "[DataPartitionIntegrity] 已识别出 {} 个数据库丢失数据分区,将请求 {} 个 DataNode 生成 DataPartitionTable"; + public static final String LOG_REQUESTING_DATAPARTITIONTABLE_GENERATION_ARG_DATANODES_559F97E8 = "正在请求 {} 个 DataNode 生成 DataPartitionTable..."; + public static final String LOG_DATAPARTITIONINTEGRITY_NO_DATANODES_REGISTERED_NO_WAY_REQUESTED_DATAPARTITIONTABLE_GENERATION_TERMINATING_ = + "[DataPartitionIntegrity] 没有已注册的 DataNode,无法请求生成 DataPartitionTable,终止 procedure"; + public static final String LOG_DATAPARTITIONINTEGRITY_FAILED_REQUEST_DATAPARTITIONTABLE_GENERATION_DATANODE_ID_ARG_ALREADY_OUT_6B0C9351 = + "[DataPartitionIntegrity] 从 DataNode[id={}] 请求生成 DataPartitionTable 失败,已超过最大重试时间"; + public static final String LOG_DATAPARTITIONINTEGRITY_FAILED_REQUEST_DATAPARTITIONTABLE_GENERATION_DATANODE_ID_ARG_RESPONSE_STATUS_93012D = + "[DataPartitionIntegrity] 从 DataNode[id={}] 请求生成 DataPartitionTable 失败,响应状态为 {}"; + public static final String LOG_DATAPARTITIONINTEGRITY_FAILED_REQUEST_DATAPARTITIONTABLE_GENERATION_DATANODE_ID_ARG_ARG_818B47B8 = "[DataPartitionIntegrity] 从 DataNode[id={}] 请求生成 DataPartitionTable 失败:{}"; + public static final String LOG_DATAPARTITIONINTEGRITY_FAILED_REQUEST_DATAPARTITIONTABLE_GENERATION_HEART_BEAT_DATANODE_ID_ARG_2AB63F12 = + "[DataPartitionIntegrity] 从 DataNode[id={}] 请求 DataPartitionTable 生成心跳失败,已超过最大重试时间"; + public static final String LOG_DATAPARTITIONINTEGRITY_FAILED_REQUEST_DATAPARTITIONTABLE_GENERATION_HEART_BEAT_DATANODE_ID_ARG_DC1702EF = + "[DataPartitionIntegrity] 从 DataNode[id={}] 请求 DataPartitionTable 生成心跳失败,状态为 {},响应状态为 {}"; + public static final String LOG_DATAPARTITIONINTEGRITY_DATANODE_ARG_COMPLETED_DATAPARTITIONTABLE_GENERATION_TERMINATING_HEART_BEAT_59DAAD5 = + "[DataPartitionIntegrity] DataNode {} 已完成 DataPartitionTable 生成,终止心跳"; + public static final String LOG_DATAPARTITIONINTEGRITY_DATANODE_ARG_STILL_GENERATING_DATAPARTITIONTABLE_63F84C78 = "[DataPartitionIntegrity] DataNode {} 仍在生成 DataPartitionTable"; + public static final String LOG_DATAPARTITIONINTEGRITY_DATANODE_ARG_RETURNED_UNKNOWN_ERROR_CODE_ARG_2DA6A21E = "[DataPartitionIntegrity] DataNode {} 返回未知错误码:{}"; + public static final String LOG_DATAPARTITIONINTEGRITY_ERROR_CHECKING_DATAPARTITIONTABLE_STATUS_DATANODE_ARG_ARG_TERMINATING_HEART_D6EDA91 = + "[DataPartitionIntegrity] 从 DataNode {} 检查 DataPartitionTable 状态出错:{},终止心跳"; + public static final String LOG_DATAPARTITIONINTEGRITY_NO_DATAPARTITIONTABLES_MERGE_DATAPARTITIONTABLES_EMPTY_920E3DE6 = "[DataPartitionIntegrity] 没有可合并的 DataPartitionTable,dataPartitionTables 为空"; + public static final String LOG_DATAPARTITIONINTEGRITY_NO_DATA_PARTITION_TABLE_RELATED_DATABASE_ARG_WAS_FOUND_D1698512 = + "[DataPartitionIntegrity] 未从 ConfigNode 找到与数据库 {} 相关的数据分区表,直接使用 DataNode 的数据分区表"; + public static final String LOG_DATAPARTITIONINTEGRITY_DATAPARTITIONTABLE_SUCCESSFULLY_WRITTEN_CONSENSUS_LOG_2B1634A6 = "[DataPartitionIntegrity] DataPartitionTable 已成功写入共识日志"; + public static final String LOG_DATAPARTITIONINTEGRITY_ARG_SERIALIZE_FAILED_DATANODEID_ARG_967B51AA = "[DataPartitionIntegrity] {} 对 dataNodeId:{} 序列化失败"; + public static final String LOG_DATAPARTITIONINTEGRITY_ARG_SERIALIZE_FINALDATAPARTITIONTABLES_FAILED_7E44DCD8 = "[DataPartitionIntegrity] {} 序列化 finalDataPartitionTables 失败"; + public static final String LOG_DATAPARTITIONINTEGRITY_ARG_DESERIALIZE_FAILED_DATANODEID_ARG_22388A60 = "[DataPartitionIntegrity] {} 对 dataNodeId:{} 反序列化失败"; + public static final String LOG_DATAPARTITIONINTEGRITY_ARG_DESERIALIZE_FINALDATAPARTITIONTABLES_FAILED_7E23E4BD = "[DataPartitionIntegrity] {} 反序列化 finalDataPartitionTables 失败"; + public static final String LOG_DATAPARTITIONINTEGRITY_FAILED_DESERIALIZE_DATABASESCOPEDDATAPARTITIONTABLE_3B6933B5 = "[DataPartitionIntegrity] 反序列化失败 DatabaseScopedDataPartitionTable"; + public static final String EXCEPTION_FAILED_C6FF154E = " 失败"; + public static final String LOG_SUBSCRIPTIONHANDLELEADERCHANGEPROCEDURE_EXECUTEFROMVALIDATE_97490577 = "SubscriptionHandleLeaderChangeProcedure: executeFromValidate"; + public static final String LOG_SUBSCRIPTIONHANDLELEADERCHANGEPROCEDURE_EXECUTEFROMOPERATEONCONFIGNODES_D4E8BD37 = "SubscriptionHandleLeaderChangeProcedure: executeFromOperateOnConfigNodes"; + public static final String LOG_SUBSCRIPTIONHANDLELEADERCHANGEPROCEDURE_FAILED_PULL_COMMIT_PROGRESS_DATANODE_ARG_STATUS_ARG_8C6DEC4E = "SubscriptionHandleLeaderChangeProcedure:拉取 DataNode {} 的提交进度失败,状态:{}"; + public static final String LOG_SUBSCRIPTIONHANDLELEADERCHANGEPROCEDURE_FAILED_WRITE_API_EXECUTING_CONSENSUS_LAYER_56B3832A = "SubscriptionHandleLeaderChangeProcedure:写入 API 执行共识层时失败,原因:"; + public static final String LOG_SUBSCRIPTIONHANDLELEADERCHANGEPROCEDURE_EXECUTEFROMOPERATEONDATANODES_0D9F7C98 = "SubscriptionHandleLeaderChangeProcedure: executeFromOperateOnDataNodes"; + public static final String LOG_SUBSCRIPTIONHANDLELEADERCHANGEPROCEDURE_IGNORED_FAILED_TOPIC_META_PUSH_DATANODE_ARG_STATUS_ARG_67FC003F = "SubscriptionHandleLeaderChangeProcedure:忽略向 DataNode {} 推送 topic 元数据失败,状态:{}"; + public static final String LOG_SUBSCRIPTIONHANDLELEADERCHANGEPROCEDURE_IGNORED_FAILED_CONSUMER_GROUP_META_PUSH_DATANODE_ARG_STATUS_17C948 = "SubscriptionHandleLeaderChangeProcedure:忽略向 DataNode {} 推送 consumer group 元数据失败,状态:{}"; + public static final String LOG_SUBSCRIPTIONHANDLELEADERCHANGEPROCEDURE_IGNORED_FAILED_SUBSCRIPTION_RUNTIME_PUSH_UNREADABLE_DATANODE_ARG_S = "SubscriptionHandleLeaderChangeProcedure:忽略向不可读 DataNode {} 推送订阅运行时信息失败,状态:{}"; + public static final String LOG_SUBSCRIPTIONHANDLELEADERCHANGEPROCEDURE_ROLLBACKFROMVALIDATE_74B408B7 = "SubscriptionHandleLeaderChangeProcedure: rollbackFromValidate"; + public static final String LOG_SUBSCRIPTIONHANDLELEADERCHANGEPROCEDURE_ROLLBACKFROMOPERATEONCONFIGNODES_D4C70763 = "SubscriptionHandleLeaderChangeProcedure: rollbackFromOperateOnConfigNodes"; + public static final String LOG_SUBSCRIPTIONHANDLELEADERCHANGEPROCEDURE_ROLLBACKFROMOPERATEONDATANODES_0250F6E9 = "SubscriptionHandleLeaderChangeProcedure: rollbackFromOperateOnDataNodes"; + public static final String LOG_SUBSCRIPTIONHANDLELEADERCHANGEPROCEDURE_FAILED_DESERIALIZE_REGION_PROGRESS_KEY_ARG_SUMMARY_ARG_F6935E59 = "SubscriptionHandleLeaderChangeProcedure: 反序列化 Region 进度失败,key={}, summary={}"; + public static final String EXCEPTION_FAILED_PUSH_SUBSCRIPTION_RUNTIME_STATE_READABLE_DATANODES_DURING_LEADER_CHANGE_F37E6F2C = "leader 变更期间向可读 DataNode 推送订阅运行时状态失败,详情:%s"; + public static final String EXCEPTION_FAILED_SERIALIZE_REGION_PROGRESS_1769D6F1 = "序列化 Region 进度失败 "; + public static final String EXCEPTION_NO_READABLE_DATANODE_AVAILABLE_ACCEPT_SUBSCRIPTION_METADATA_RUNTIME_UPDATES_DURING_22E61621 = "leader 变更期间没有可读 DataNode 可接受订阅元数据/运行时更新"; + public static final String LOG_CREATESUBSCRIPTIONPROCEDURE_TOPIC_ARG_USES_CONSENSUS_SUBSCRIPTION_MODE_031CF049 = "CreateSubscriptionProcedure: topic [{}] 使用共识订阅模式 "; + public static final String LOG_MODE_ARG_SKIPPING_PIPE_CREATION_5F4D1026 = "(mode={}),跳过创建 pipe"; + public static final String LOG_CREATESUBSCRIPTIONPROCEDURE_CONSENSUS_BASED_TOPICS_ARG_WILL_HANDLED_DATANODE_90A9C2FD = "CreateSubscriptionProcedure:基于共识的 topics {} 将由 DataNode 处理"; + public static final String LOG_VIA_CONSUMER_GROUP_META_PUSH_NO_PIPE_CREATION_NEEDED_D56CFE31 = "通过 consumer group 元数据推送(无需创建 pipe)"; + public static final String LOG_DROPSUBSCRIPTIONPROCEDURE_TOPIC_ARG_USES_CONSENSUS_SUBSCRIPTION_MODE_6962D13C = "DropSubscriptionProcedure: topic [{}] 使用共识订阅模式 "; + public static final String LOG_MODE_ARG_SKIPPING_PIPE_REMOVAL_133B0CD6 = "(mode={}),跳过移除 pipe"; + public static final String LOG_COMMITPROGRESSSYNCPROCEDURE_ACQUIRELOCK_SKIP_PROCEDURE_LAST_EXECUTION_TIME_ARG_CE3DD247 = "CommitProgressSyncProcedure:acquireLock,因上次执行时间 {} 跳过该 procedure"; + public static final String LOG_COMMITPROGRESSSYNCPROCEDURE_EXECUTEFROMVALIDATE_CF220E1F = "CommitProgressSyncProcedure: executeFromValidate"; + public static final String LOG_COMMITPROGRESSSYNCPROCEDURE_EXECUTEFROMOPERATEONCONFIGNODES_0DC818CA = "CommitProgressSyncProcedure: executeFromOperateOnConfigNodes"; + public static final String LOG_FAILED_PULL_COMMIT_PROGRESS_DATANODE_ARG_STATUS_ARG_33037B29 = "拉取 DataNode {} 的提交进度失败,状态:{}"; + public static final String LOG_COMMITPROGRESSSYNCPROCEDURE_EXECUTEFROMOPERATEONDATANODES_NO_OP_34420360 = "CommitProgressSyncProcedure: executeFromOperateOnDataNodes(无操作)"; + public static final String LOG_COMMITPROGRESSSYNCPROCEDURE_ROLLBACKFROMVALIDATE_2309D4D2 = "CommitProgressSyncProcedure: rollbackFromValidate"; + public static final String LOG_COMMITPROGRESSSYNCPROCEDURE_ROLLBACKFROMOPERATEONCONFIGNODES_57CB907B = "CommitProgressSyncProcedure: rollbackFromOperateOnConfigNodes"; + public static final String LOG_COMMITPROGRESSSYNCPROCEDURE_ROLLBACKFROMOPERATEONDATANODES_0D2CEB50 = "CommitProgressSyncProcedure: rollbackFromOperateOnDataNodes"; + public static final String LOG_COMMITPROGRESSSYNCPROCEDURE_FAILED_DESERIALIZE_REGION_PROGRESS_KEY_ARG_SUMMARY_ARG_0202F658 = "CommitProgressSyncProcedure: 反序列化 Region 进度失败,key={}, summary={}"; + public static final String EXCEPTION_UNEXPECTED_PARENT_444B4289 = "非预期父节点"; + public static final String LOG_ARG_8393DD4A = "{}"; + } diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/client/async/handlers/audit/DataNodeWriteAuditLogHandler.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/client/async/handlers/audit/DataNodeWriteAuditLogHandler.java index 1b2fce27a0e0b..08d714747e5d2 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/client/async/handlers/audit/DataNodeWriteAuditLogHandler.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/client/async/handlers/audit/DataNodeWriteAuditLogHandler.java @@ -19,6 +19,7 @@ package org.apache.iotdb.confignode.client.async.handlers.audit; import org.apache.iotdb.common.rpc.thrift.TSStatus; +import org.apache.iotdb.confignode.i18n.ConfigNodeMessages; import org.apache.iotdb.rpc.TSStatusCode; import org.apache.thrift.async.AsyncMethodCallback; @@ -36,12 +37,15 @@ public DataNodeWriteAuditLogHandler(int nodeId) { @Override public void onComplete(TSStatus tsStatus) { if (tsStatus.getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()) { - logger.error("Failed to write audit log to DataNode {}, response: {}", nodeId, tsStatus); + logger.error( + ConfigNodeMessages.LOG_FAILED_WRITE_AUDIT_LOG_DATANODE_ARG_RESPONSE_ARG_691ABC90, + nodeId, + tsStatus); } } @Override public void onError(Exception e) { - logger.error("Failed to write audit log to DataNode {}", nodeId, e); + logger.error(ConfigNodeMessages.LOG_FAILED_WRITE_AUDIT_LOG_DATANODE_ARG_90F15E13, nodeId, e); } } diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/client/async/handlers/rpc/subscription/PullCommitProgressRPCHandler.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/client/async/handlers/rpc/subscription/PullCommitProgressRPCHandler.java index e485f6ecc4b43..5c44d10339d96 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/client/async/handlers/rpc/subscription/PullCommitProgressRPCHandler.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/client/async/handlers/rpc/subscription/PullCommitProgressRPCHandler.java @@ -22,6 +22,7 @@ import org.apache.iotdb.common.rpc.thrift.TDataNodeLocation; import org.apache.iotdb.confignode.client.async.CnToDnAsyncRequestType; import org.apache.iotdb.confignode.client.async.handlers.rpc.DataNodeAsyncRequestRPCHandler; +import org.apache.iotdb.confignode.i18n.ConfigNodeMessages; import org.apache.iotdb.mpp.rpc.thrift.TPullCommitProgressResp; import org.apache.iotdb.rpc.RpcUtils; import org.apache.iotdb.rpc.TSStatusCode; @@ -51,10 +52,11 @@ public void onComplete(TPullCommitProgressResp response) { responseMap.put(requestId, response); if (response.getStatus().getCode() == TSStatusCode.SUCCESS_STATUS.getStatusCode()) { - LOGGER.info("Successfully {} on DataNode: {}", requestType, formattedTargetLocation); + LOGGER.info( + ConfigNodeMessages.SUCCESSFULLY_ON_DATANODE, requestType, formattedTargetLocation); } else { LOGGER.error( - "Failed to {} on DataNode: {}, response: {}", + ConfigNodeMessages.FAILED_TO_ON_DATANODE_RESPONSE, requestType, formattedTargetLocation, response); diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/client/sync/SyncConfigNodeClientPool.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/client/sync/SyncConfigNodeClientPool.java index 8414519307bdc..93e39b0e97710 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/client/sync/SyncConfigNodeClientPool.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/client/sync/SyncConfigNodeClientPool.java @@ -140,7 +140,8 @@ public TSStatus removeConfigNode( updateConfigNodeLeader(status); if (configNodeLeader == null) { LOGGER.warn( - "Redirection recommended for removeConfigNode but no leader endpoint provided, abort retry."); + ConfigNodeMessages + .LOG_REDIRECTION_RECOMMENDED_REMOVECONFIGNODE_BUT_NO_LEADER_ENDPOINT_PROVIDED_ABORT_RETRY_520A4C64); break; } try (SyncConfigNodeIServiceClient clientLeader = diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeDescriptor.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeDescriptor.java index b6bf74edb31ba..283911b6d77ed 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeDescriptor.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeDescriptor.java @@ -349,7 +349,8 @@ private void loadProperties(TrimProperties properties) throws BadNodeUrlExceptio String.valueOf(conf.getTopologyProbingBaseIntervalInMs()))); if (topologyProbingBaseIntervalInMs <= 0) { throw new IOException( - "topology_probing_base_interval_in_ms must be positive, but got: " + ConfigNodeMessages + .EXCEPTION_TOPOLOGY_PROBING_BASE_INTERVAL_MS_MUST_POSITIVE_BUT_GOT_18C9B7A2 + topologyProbingBaseIntervalInMs); } conf.setTopologyProbingBaseIntervalInMs(topologyProbingBaseIntervalInMs); @@ -361,7 +362,7 @@ private void loadProperties(TrimProperties properties) throws BadNodeUrlExceptio String.valueOf(conf.getTopologyProbingTimeoutRatio()))); if (topologyProbingTimeoutRatio <= 0 || topologyProbingTimeoutRatio >= 1.0) { throw new IOException( - "topology_probing_timeout_ratio must be in (0, 1), but got: " + ConfigNodeMessages.EXCEPTION_TOPOLOGY_PROBING_TIMEOUT_RATIO_MUST_0_1_BUT_GOT_FBD0E28B + topologyProbingTimeoutRatio); } conf.setTopologyProbingTimeoutRatio(topologyProbingTimeoutRatio); diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeStartupCheck.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeStartupCheck.java index 111f32bcdd374..fb7d674d0822a 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeStartupCheck.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeStartupCheck.java @@ -98,9 +98,14 @@ private void checkGlobalConfig() throws ConfigurationException { || CONF.getInternalPort() != CONF.getSeedConfigNode().getPort())) { throw new ConfigurationException( IoTDBConstant.CN_SEED_CONFIG_NODE, - CONF.getSeedConfigNode().getIp() + ":" + CONF.getSeedConfigNode().getPort(), - CONF.getInternalAddress() + ":" + CONF.getInternalPort(), - "the config_node_consensus_protocol_class is set to" + ConsensusFactory.SIMPLE_CONSENSUS); + CONF.getSeedConfigNode().getIp() + + ConfigNodeMessages.EXCEPTION_COLON_5D70AD09 + + CONF.getSeedConfigNode().getPort(), + CONF.getInternalAddress() + + ConfigNodeMessages.EXCEPTION_COLON_5D70AD09 + + CONF.getInternalPort(), + ConfigNodeMessages.EXCEPTION_CONFIG_NODE_CONSENSUS_PROTOCOL_CLASS_SET_E7A83ED6 + + ConsensusFactory.SIMPLE_CONSENSUS); } // The replication factor should be positive @@ -122,7 +127,8 @@ private void checkGlobalConfig() throws ConfigurationException { CONF.getSchemaRegionConsensusProtocolClass(), ConsensusFactory.RATIS_CONSENSUS, ConsensusFactory.SIMPLE_CONSENSUS - + "available only when schema_replication_factor is set to 1"); + + ConfigNodeMessages + .EXCEPTION_AVAILABLE_ONLY_SCHEMA_REPLICATION_FACTOR_SET_1_45667207); } // When the data_replication_factor is greater than 1 @@ -132,9 +138,11 @@ private void checkGlobalConfig() throws ConfigurationException { throw new ConfigurationException( ConfigNodeMessages.DATA_REGION_CONSENSUS_PROTOCOL_CLASS, CONF.getDataRegionConsensusProtocolClass(), - ConsensusFactory.IOT_CONSENSUS + "or" + ConsensusFactory.RATIS_CONSENSUS, + ConsensusFactory.IOT_CONSENSUS + + ConfigNodeMessages.EXCEPTION_MESSAGE_E81C4E4F + + ConsensusFactory.RATIS_CONSENSUS, ConsensusFactory.SIMPLE_CONSENSUS - + "available only when data_replication_factor is set to 1"); + + ConfigNodeMessages.EXCEPTION_AVAILABLE_ONLY_DATA_REPLICATION_FACTOR_SET_1_71748D3D); } // When the schemaengine region consensus protocol is set to IoTConsensus, @@ -144,8 +152,11 @@ private void checkGlobalConfig() throws ConfigurationException { ConfigNodeMessages.SCHEMA_REGION_CONSENSUS_PROTOCOL_CLASS, String.valueOf(CONF.getSchemaRegionConsensusProtocolClass()), String.format( - "%s or %s", ConsensusFactory.SIMPLE_CONSENSUS, ConsensusFactory.RATIS_CONSENSUS), - "the SchemaRegion doesn't support org.apache.iotdb.consensus.iot.IoTConsensus"); + ConfigNodeMessages.EXCEPTION_ARG_ARG_6E068B23, + ConsensusFactory.SIMPLE_CONSENSUS, + ConsensusFactory.RATIS_CONSENSUS), + ConfigNodeMessages + .EXCEPTION_SCHEMAREGION_DOESN_T_SUPPORT_ORG_APACHE_IOTDB_CONSENSUS_IOT_IOTCONSENSUS_84350FD1); } // When the schemaengine region consensus protocol is set to IoTConsensusV2, @@ -155,8 +166,11 @@ private void checkGlobalConfig() throws ConfigurationException { ConfigNodeMessages.SCHEMA_REGION_CONSENSUS_PROTOCOL_CLASS, String.valueOf(CONF.getSchemaRegionConsensusProtocolClass()), String.format( - "%s or %s", ConsensusFactory.SIMPLE_CONSENSUS, ConsensusFactory.RATIS_CONSENSUS), - "the SchemaRegion doesn't support org.apache.iotdb.consensus.iot.IoTConsensusV2"); + ConfigNodeMessages.EXCEPTION_ARG_ARG_6E068B23, + ConsensusFactory.SIMPLE_CONSENSUS, + ConsensusFactory.RATIS_CONSENSUS), + ConfigNodeMessages + .EXCEPTION_SCHEMAREGION_DOESN_T_SUPPORT_ORG_APACHE_IOTDB_CONSENSUS_IOT_IOTCONSENSUSV2_BA353C6D); } // The leader distribution policy is limited @@ -166,8 +180,8 @@ private void checkGlobalConfig() throws ConfigurationException { throw new ConfigurationException( ConfigNodeMessages.LEADER_DISTRIBUTION_POLICY, CONF.getRoutePriorityPolicy(), - "GREEDY or MIN_COST_FLOW or HASH", - "an unrecognized leader_distribution_policy is set"); + ConfigNodeMessages.EXCEPTION_GREEDY_MIN_COST_FLOW_HASH_C07DA2EE, + ConfigNodeMessages.EXCEPTION_UNRECOGNIZED_LEADER_DISTRIBUTION_POLICY_SET_F9FFB410); } // The route priority policy is limited @@ -176,8 +190,8 @@ private void checkGlobalConfig() throws ConfigurationException { throw new ConfigurationException( ConfigNodeMessages.ROUTE_PRIORITY_POLICY, CONF.getRoutePriorityPolicy(), - "LEADER or GREEDY", - "an unrecognized route_priority_policy is set"); + ConfigNodeMessages.EXCEPTION_LEADER_GREEDY_55C6B994, + ConfigNodeMessages.EXCEPTION_UNRECOGNIZED_ROUTE_PRIORITY_POLICY_SET_C0012AE4); } // The default RegionGroupNum should be positive diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/conf/SystemPropertiesUtils.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/conf/SystemPropertiesUtils.java index 2f2cea4535f57..2a8376f734138 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/conf/SystemPropertiesUtils.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/conf/SystemPropertiesUtils.java @@ -349,8 +349,10 @@ public static int loadConfigNodeIdWhenRestarted() throws IOException { } catch (NumberFormatException e) { throw new IOException( ConfigNodeMessages.THE_PARAMETER_CONFIG_NODE_ID_DOESN_T_EXIST_IN - + "data/confignode/system/confignode-system.properties. " - + "Please delete data dir data/confignode and restart again.", + + ConfigNodeMessages + .EXCEPTION_DATA_CONFIGNODE_SYSTEM_CONFIGNODE_SYSTEM_PROPERTIES_786349AB + + ConfigNodeMessages + .EXCEPTION_PLEASE_DELETE_DATA_DIR_DATA_CONFIGNODE_RESTART_AGAIN_8527BE66, e); } } diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/consensus/request/write/region/CreateRegionGroupsPlan.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/consensus/request/write/region/CreateRegionGroupsPlan.java index 82677d7458113..83b774a543f9a 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/consensus/request/write/region/CreateRegionGroupsPlan.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/consensus/request/write/region/CreateRegionGroupsPlan.java @@ -25,6 +25,7 @@ import org.apache.iotdb.commons.utils.ThriftCommonsSerDeUtils; import org.apache.iotdb.confignode.consensus.request.ConfigPhysicalPlan; import org.apache.iotdb.confignode.consensus.request.ConfigPhysicalPlanType; +import org.apache.iotdb.confignode.i18n.ManagerMessages; import org.slf4j.Logger; @@ -71,7 +72,8 @@ public void planLog(final Logger logger) { final String database = regionGroupEntry.getKey(); for (final TRegionReplicaSet regionReplicaSet : regionGroupEntry.getValue()) { logger.info( - "[CreateRegionGroups] RegionGroup: {}, belonged database: {}, on DataNodes: {}", + ManagerMessages + .LOG_CREATEREGIONGROUPS_REGIONGROUP_ARG_BELONGED_DATABASE_ARG_DATANODES_ARG_5270AB6B, regionReplicaSet.getRegionId(), database, regionReplicaSet.getDataNodeLocations().stream() diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/consensus/statemachine/ConfigRegionStateMachine.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/consensus/statemachine/ConfigRegionStateMachine.java index 251db87dbdcd8..c69f5971e3ce3 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/consensus/statemachine/ConfigRegionStateMachine.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/consensus/statemachine/ConfigRegionStateMachine.java @@ -271,7 +271,7 @@ public void notifyLeaderChanged(ConsensusGroupId groupId, int newLeaderId) { if (currentNodeId != newLeaderId) { LOGGER.info( ConfigNodeMessages.CURRENT_NODE_NODEID_IP_PORT_IS_NO_LONGER_THE_LEADER - + "the new leader is [nodeId:{}]", + + ConfigNodeMessages.LOG_NEW_LEADER_NODEID_ARG_0A63760B, currentNodeId, currentNodeTEndPoint, newLeaderId); @@ -286,7 +286,7 @@ public void notifyNotLeader() { final int currentNodeId = ConfigNodeDescriptor.getInstance().getConf().getConfigNodeId(); LOGGER.info( ConfigNodeMessages.CURRENT_NODE_NODEID_IP_PORT_IS_NO_LONGER_THE_LEADER - + "start cleaning up related services", + + ConfigNodeMessages.LOG_START_CLEANING_UP_RELATED_SERVICES_A409E261, currentNodeId, currentNodeTEndPoint); resignLeaderAsync(); @@ -416,7 +416,7 @@ private void stopLeaderServices() { LOGGER.info( ConfigNodeMessages.CURRENT_NODE_NODEID_IP_PORT_IS_NO_LONGER_THE_LEADER - + "all services on old leader are unavailable now.", + + ConfigNodeMessages.LOG_ALL_SERVICES_OLD_LEADER_UNAVAILABLE_NOW_8A22E60F, currentNodeId, currentNodeTEndPoint); } @@ -541,7 +541,7 @@ private void writeLogForSimpleConsensus(ConfigPhysicalPlan plan) { } catch (IOException e) { LOGGER.warn( ConfigNodeMessages.CAN_T_CLOSE_STANDALONELOG_FOR_CONFIGNODE_SIMPLECONSENSUS_MODE - + "filePath: {}, retry: {}", + + ConfigNodeMessages.LOG_FILEPATH_ARG_RETRY_ARG_16284354, simpleLogFile.getAbsolutePath(), retry); try { diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/exception/AddConsensusGroupException.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/exception/AddConsensusGroupException.java index b1545dcd2bb70..5bb72351fcc97 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/exception/AddConsensusGroupException.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/exception/AddConsensusGroupException.java @@ -20,10 +20,14 @@ package org.apache.iotdb.confignode.exception; import org.apache.iotdb.common.rpc.thrift.TConfigNodeLocation; +import org.apache.iotdb.confignode.i18n.ConfigNodeMessages; public class AddConsensusGroupException extends ConfigNodeException { public AddConsensusGroupException(TConfigNodeLocation configNodeLocation) { - super(String.format("Add ConsensusGroup to: %s failed.", configNodeLocation.toString())); + super( + String.format( + ConfigNodeMessages.EXCEPTION_ADD_CONSENSUSGROUP_ARG_FAILED_D3FDDC1B, + configNodeLocation.toString())); } } diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/exception/AddPeerException.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/exception/AddPeerException.java index 82fe8357f42ac..99ce467696dde 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/exception/AddPeerException.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/exception/AddPeerException.java @@ -20,10 +20,14 @@ package org.apache.iotdb.confignode.exception; import org.apache.iotdb.common.rpc.thrift.TConfigNodeLocation; +import org.apache.iotdb.confignode.i18n.ConfigNodeMessages; public class AddPeerException extends ConfigNodeException { public AddPeerException(TConfigNodeLocation configNodeLocation) { - super(String.format("Add peer: %s failed.", configNodeLocation.toString())); + super( + String.format( + ConfigNodeMessages.EXCEPTION_ADD_PEER_ARG_FAILED_17DEB6CA, + configNodeLocation.toString())); } } diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/exception/DatabaseNotExistsException.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/exception/DatabaseNotExistsException.java index 258650d980120..f4cb9cc5dc30b 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/exception/DatabaseNotExistsException.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/exception/DatabaseNotExistsException.java @@ -19,9 +19,12 @@ package org.apache.iotdb.confignode.exception; +import org.apache.iotdb.confignode.i18n.ConfigNodeMessages; + public class DatabaseNotExistsException extends ConfigNodeException { public DatabaseNotExistsException(final String database) { - super(String.format("Database: %s doesn't exist.", database)); + super( + String.format(ConfigNodeMessages.EXCEPTION_DATABASE_ARG_DOESN_T_EXIST_778BBF66, database)); } } diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/exception/NoAvailableAINodeException.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/exception/NoAvailableAINodeException.java index 0737b9f75aca4..5c568af234fc5 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/exception/NoAvailableAINodeException.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/exception/NoAvailableAINodeException.java @@ -19,9 +19,12 @@ package org.apache.iotdb.confignode.exception; +import org.apache.iotdb.confignode.i18n.ConfigNodeMessages; + public class NoAvailableAINodeException extends ConfigNodeException { public NoAvailableAINodeException() { super( - "There are no available AINodes currently, please use \"show cluster\" to check the cluster status."); + ConfigNodeMessages + .EXCEPTION_THERE_NO_AVAILABLE_AINODES_CURRENTLY_PLEASE_USE_SHOW_CLUSTER_CHECK_FD32EB52); } } diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/exception/NoAvailableRegionGroupException.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/exception/NoAvailableRegionGroupException.java index 9f66f78c44f32..069d469fd08b0 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/exception/NoAvailableRegionGroupException.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/exception/NoAvailableRegionGroupException.java @@ -20,20 +20,24 @@ package org.apache.iotdb.confignode.exception; import org.apache.iotdb.common.rpc.thrift.TConsensusGroupType; +import org.apache.iotdb.confignode.i18n.ConfigNodeMessages; import java.util.List; public class NoAvailableRegionGroupException extends ConfigNodeException { - private static final String SCHEMA_REGION_GROUP = "SchemaRegionGroups"; - private static final String DATA_REGION_GROUP = "DataRegionGroups"; + private static final String SCHEMA_REGION_GROUP = + ConfigNodeMessages.EXCEPTION_SCHEMAREGIONGROUPS_3C409207; + private static final String DATA_REGION_GROUP = + ConfigNodeMessages.EXCEPTION_DATAREGIONGROUPS_945CCE78; public NoAvailableRegionGroupException( final TConsensusGroupType regionGroupType, final List databases) { super( String.format( - "There are no available %s for databases: %s currently, " - + "please use \"show cluster\" or \"show regions\" to check the cluster status", + ConfigNodeMessages.EXCEPTION_THERE_NO_AVAILABLE_ARG_DATABASES_ARG_CURRENTLY_9B8297B3 + + ConfigNodeMessages + .EXCEPTION_PLEASE_USE_SHOW_CLUSTER_SHOW_REGIONS_CHECK_CLUSTER_STATUS_611120DF, TConsensusGroupType.SchemaRegion.equals(regionGroupType) ? SCHEMA_REGION_GROUP : DATA_REGION_GROUP, diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/exception/NotEnoughDataNodeException.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/exception/NotEnoughDataNodeException.java index fa54afc48b05e..29d4aa4387116 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/exception/NotEnoughDataNodeException.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/exception/NotEnoughDataNodeException.java @@ -20,6 +20,7 @@ package org.apache.iotdb.confignode.exception; import org.apache.iotdb.common.rpc.thrift.TDataNodeConfiguration; +import org.apache.iotdb.confignode.i18n.ConfigNodeMessages; import java.util.List; @@ -29,8 +30,9 @@ public NotEnoughDataNodeException( List dataNodeConfigurations, int replicationFactor) { super( String.format( - "DataNode is not enough, please register more. " - + "Current DataNodes: %s, replicationFactor: %d", - dataNodeConfigurations, replicationFactor)); + ConfigNodeMessages.EXCEPTION_DATANODE_NOT_ENOUGH_PLEASE_REGISTER_MORE_9F5EEDF5 + + ConfigNodeMessages.EXCEPTION_CURRENT_DATANODES_ARG_REPLICATIONFACTOR_ARG_5D686D2B, + dataNodeConfigurations, + replicationFactor)); } } diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/exception/physical/UnknownPhysicalPlanTypeException.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/exception/physical/UnknownPhysicalPlanTypeException.java index 2e9d87a877d82..270059b3e35b9 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/exception/physical/UnknownPhysicalPlanTypeException.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/exception/physical/UnknownPhysicalPlanTypeException.java @@ -21,10 +21,13 @@ import org.apache.iotdb.confignode.consensus.request.ConfigPhysicalPlanType; import org.apache.iotdb.confignode.exception.ConfigNodeException; +import org.apache.iotdb.confignode.i18n.ConfigNodeMessages; public class UnknownPhysicalPlanTypeException extends ConfigNodeException { public UnknownPhysicalPlanTypeException(ConfigPhysicalPlanType type) { - super(String.format("Unknown PhysicalPlanType: %d", type.ordinal())); + super( + String.format( + ConfigNodeMessages.EXCEPTION_UNKNOWN_PHYSICALPLANTYPE_ARG_7F21B699, type.ordinal())); } } diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/ClusterQuotaManager.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/ClusterQuotaManager.java index 68b7c1680a8d6..d53890f75c341 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/ClusterQuotaManager.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/ClusterQuotaManager.java @@ -31,6 +31,7 @@ import org.apache.iotdb.confignode.client.async.handlers.DataNodeAsyncRequestContext; import org.apache.iotdb.confignode.consensus.request.write.quota.SetSpaceQuotaPlan; import org.apache.iotdb.confignode.consensus.request.write.quota.SetThrottleQuotaPlan; +import org.apache.iotdb.confignode.i18n.ManagerMessages; import org.apache.iotdb.confignode.manager.partition.PartitionManager; import org.apache.iotdb.confignode.persistence.quota.QuotaInfo; import org.apache.iotdb.confignode.rpc.thrift.TShowThrottleReq; @@ -99,7 +100,8 @@ public TSStatus setSpaceQuota(final TSetSpaceQuotaReq req) { } catch (final ConsensusException e) { LOGGER.warn( String.format( - "Unexpected error happened while setting space quota on database: %s ", + ManagerMessages + .LOG_UNEXPECTED_ERROR_HAPPENED_SETTING_SPACE_QUOTA_DATABASE_ARG_F6ED7586, req.getDatabase()), e); // consensus layer related errors @@ -206,7 +208,8 @@ public TSStatus setThrottleQuota(TSetThrottleQuotaReq req) { } catch (ConsensusException e) { LOGGER.warn( String.format( - "Unexpected error happened while setting throttle quota on user: %s ", + ManagerMessages + .LOG_UNEXPECTED_ERROR_HAPPENED_SETTING_THROTTLE_QUOTA_USER_ARG_C111BE81, req.getUserName()), e); // consensus layer related errors diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/ConfigManager.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/ConfigManager.java index c5bafc550f642..42d82ecbe5c02 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/ConfigManager.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/ConfigManager.java @@ -1253,8 +1253,9 @@ protected TSStatus confirmLeader() { if (getConsensusManager() == null) { return new TSStatus(TSStatusCode.CONSENSUS_NOT_INITIALIZED.getStatusCode()) .setMessage( - "ConsensusManager of target-ConfigNode is not initialized, " - + "please make sure the target-ConfigNode has been started successfully."); + ManagerMessages.MESSAGE_CONSENSUSMANAGER_TARGET_CONFIGNODE_NOT_INITIALIZED_4D386066 + + ManagerMessages + .MESSAGE_PLEASE_MAKE_SURE_TARGET_CONFIGNODE_HAS_BEEN_STARTED_SUCCESSFULLY_C78201DC); } // Procedure recovery replays metadata writes before external load warm-up is complete. if (procedureManager.isProcedureExecutionThread()) { @@ -1465,71 +1466,94 @@ public TSStatus checkConfigNodeGlobalConfig(TConfigNodeRegisterReq req) { .getConfigNodeConsensusProtocolClass() .equals(CONF.getConfigNodeConsensusProtocolClass())) { return errorStatus.setMessage( - errorPrefix + "config_node_consensus_protocol_class" + errorSuffix); + errorPrefix + + ManagerMessages.MESSAGE_CONFIG_NODE_CONSENSUS_PROTOCOL_CLASS_D0F437AF + + errorSuffix); } if (!clusterParameters .getDataRegionConsensusProtocolClass() .equals(CONF.getDataRegionConsensusProtocolClass())) { return errorStatus.setMessage( - errorPrefix + "data_region_consensus_protocol_class" + errorSuffix); + errorPrefix + + ManagerMessages.MESSAGE_DATA_REGION_CONSENSUS_PROTOCOL_CLASS_AB025B20 + + errorSuffix); } if (!clusterParameters .getSchemaRegionConsensusProtocolClass() .equals(CONF.getSchemaRegionConsensusProtocolClass())) { return errorStatus.setMessage( - errorPrefix + "schema_region_consensus_protocol_class" + errorSuffix); + errorPrefix + + ManagerMessages.MESSAGE_SCHEMA_REGION_CONSENSUS_PROTOCOL_CLASS_480645EF + + errorSuffix); } if (clusterParameters.getSeriesPartitionSlotNum() != CONF.getSeriesSlotNum()) { - return errorStatus.setMessage(errorPrefix + "series_slot_num" + errorSuffix); + return errorStatus.setMessage( + errorPrefix + ManagerMessages.MESSAGE_SERIES_SLOT_NUM_115D9BE0 + errorSuffix); } if (!clusterParameters .getSeriesPartitionExecutorClass() .equals(CONF.getSeriesPartitionExecutorClass())) { - return errorStatus.setMessage(errorPrefix + "series_partition_executor_class" + errorSuffix); + return errorStatus.setMessage( + errorPrefix + + ManagerMessages.MESSAGE_SERIES_PARTITION_EXECUTOR_CLASS_AD1B5C24 + + errorSuffix); } if (clusterParameters.getTimePartitionInterval() != COMMON_CONF.getTimePartitionInterval()) { - return errorStatus.setMessage(errorPrefix + "time_partition_interval" + errorSuffix); + return errorStatus.setMessage( + errorPrefix + ManagerMessages.MESSAGE_TIME_PARTITION_INTERVAL_CE476507 + errorSuffix); } if (clusterParameters.getSchemaReplicationFactor() != CONF.getSchemaReplicationFactor()) { - return errorStatus.setMessage(errorPrefix + "schema_replication_factor" + errorSuffix); + return errorStatus.setMessage( + errorPrefix + ManagerMessages.MESSAGE_SCHEMA_REPLICATION_FACTOR_11DB65B5 + errorSuffix); } if (clusterParameters.getDataReplicationFactor() != CONF.getDataReplicationFactor()) { - return errorStatus.setMessage(errorPrefix + "data_replication_factor" + errorSuffix); + return errorStatus.setMessage( + errorPrefix + ManagerMessages.MESSAGE_DATA_REPLICATION_FACTOR_22465D3B + errorSuffix); } if (clusterParameters.getSchemaRegionPerDataNode() != CONF.getSchemaRegionPerDataNode()) { - return errorStatus.setMessage(errorPrefix + "schema_region_per_data_node" + errorSuffix); + return errorStatus.setMessage( + errorPrefix + ManagerMessages.MESSAGE_SCHEMA_REGION_PER_DATA_NODE_555F29BC + errorSuffix); } if (clusterParameters.getDataRegionPerDataNode() != CONF.getDataRegionPerDataNode()) { - return errorStatus.setMessage(errorPrefix + "data_region_per_data_node" + errorSuffix); + return errorStatus.setMessage( + errorPrefix + ManagerMessages.MESSAGE_DATA_REGION_PER_DATA_NODE_C183AAD5 + errorSuffix); } if (!clusterParameters.getReadConsistencyLevel().equals(CONF.getReadConsistencyLevel())) { - return errorStatus.setMessage(errorPrefix + "read_consistency_level" + errorSuffix); + return errorStatus.setMessage( + errorPrefix + ManagerMessages.MESSAGE_READ_CONSISTENCY_LEVEL_B12D8D95 + errorSuffix); } if (clusterParameters.getDiskSpaceWarningThreshold() != COMMON_CONF.getDiskSpaceWarningThreshold()) { - return errorStatus.setMessage(errorPrefix + "disk_space_warning_threshold" + errorSuffix); + return errorStatus.setMessage( + errorPrefix + + ManagerMessages.MESSAGE_DISK_SPACE_WARNING_THRESHOLD_19635ACA + + errorSuffix); } if (!clusterParameters.getTimestampPrecision().equals(COMMON_CONF.getTimestampPrecision())) { - return errorStatus.setMessage(errorPrefix + "timestamp_precision" + errorSuffix); + return errorStatus.setMessage( + errorPrefix + ManagerMessages.MESSAGE_TIMESTAMP_PRECISION_9591C9C9 + errorSuffix); } if (!clusterParameters.getSchemaEngineMode().equals(COMMON_CONF.getSchemaEngineMode())) { - return errorStatus.setMessage(errorPrefix + "schema_engine_mode" + errorSuffix); + return errorStatus.setMessage( + errorPrefix + ManagerMessages.MESSAGE_SCHEMA_ENGINE_MODE_E37ED98C + errorSuffix); } if (clusterParameters.getTagAttributeTotalSize() != COMMON_CONF.getTagAttributeTotalSize()) { - return errorStatus.setMessage(errorPrefix + "tag_attribute_total_size" + errorSuffix); + return errorStatus.setMessage( + errorPrefix + ManagerMessages.MESSAGE_TAG_ATTRIBUTE_TOTAL_SIZE_AF658CFE + errorSuffix); } if (clusterParameters.getDatabaseLimitThreshold() != COMMON_CONF.getDatabaseLimitThreshold()) { - return errorStatus.setMessage(errorPrefix + "database_limit_threshold" + errorSuffix); + return errorStatus.setMessage( + errorPrefix + ManagerMessages.MESSAGE_DATABASE_LIMIT_THRESHOLD_45C23274 + errorSuffix); } return null; @@ -2607,7 +2631,8 @@ private static ByteBuffer serializeRegionProgress(final RegionProgress regionPro regionProgress.serialize(dos); return ByteBuffer.wrap(baos.getBuf(), 0, baos.size()).asReadOnlyBuffer(); } catch (final IOException e) { - throw new RuntimeException("Failed to serialize region progress " + regionProgress, e); + throw new RuntimeException( + ManagerMessages.EXCEPTION_FAILED_SERIALIZE_REGION_PROGRESS_1769D6F1 + regionProgress, e); } } diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/ProcedureManager.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/ProcedureManager.java index cb76a9550afe8..8331930745692 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/ProcedureManager.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/ProcedureManager.java @@ -1182,7 +1182,9 @@ public TSStatus reconstructRegion(TReconstructRegionReq req) { .orElseThrow( () -> new IllegalArgumentException( - ManagerMessages.REGION_ID + x + " is invalid")); + ManagerMessages.REGION_ID + + x + + ManagerMessages.EXCEPTION_INVALID_2928F475)); final TDataNodeLocation coordinator = handler .filterDataNodeWithOtherRegionReplica( @@ -1413,7 +1415,8 @@ && new UpdateProcedurePlan(createTriggerProcedure).getSerializedSize() > planSiz return new TSStatus(TSStatusCode.CREATE_TRIGGER_ERROR.getStatusCode()) .setMessage( String.format( - "Fail to create trigger[%s], the size of Jar is too large, you can increase the value of property 'config_node_ratis_log_appender_buffer_size_max' on ConfigNode", + ManagerMessages + .MESSAGE_FAIL_CREATE_TRIGGER_ARG_SIZE_JAR_TOO_LARGE_YOU_CAN_11869523, triggerInformation.getTriggerName())); } } catch (IOException e) { @@ -1466,7 +1469,8 @@ && new UpdateProcedurePlan(createPipePluginProcedure).getSerializedSize() return new TSStatus(TSStatusCode.CREATE_PIPE_PLUGIN_ERROR.getStatusCode()) .setMessage( String.format( - "Fail to create pipe plugin[%s], the size of Jar is too large, you can increase the value of property 'config_node_ratis_log_appender_buffer_size_max' on ConfigNode", + ManagerMessages + .MESSAGE_FAIL_CREATE_PIPE_PLUGIN_ARG_SIZE_JAR_TOO_LARGE_YOU_D194A893, pipePluginMeta.getPluginName())); } } catch (IOException e) { @@ -1687,9 +1691,13 @@ public void subscriptionHandleLeaderChange( new SubscriptionHandleLeaderChangeProcedure( regionGroupToOldAndNewLeaderPairMap, runtimeVersion)); LOGGER.info( - "SubscriptionHandleLeaderChangeProcedure was submitted, procedureId: {}.", procedureId); + ManagerMessages + .LOG_SUBSCRIPTIONHANDLELEADERCHANGEPROCEDURE_WAS_SUBMITTED_PROCEDUREID_ARG_6DBD6075, + procedureId); } catch (Exception e) { - LOGGER.warn("SubscriptionHandleLeaderChangeProcedure was failed to submit.", e); + LOGGER.warn( + ManagerMessages.LOG_SUBSCRIPTIONHANDLELEADERCHANGEPROCEDURE_WAS_FAILED_SUBMIT_58FAB03F, + e); } } diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/TTLManager.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/TTLManager.java index 284b77004beac..2c7a8c8797157 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/TTLManager.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/TTLManager.java @@ -78,7 +78,8 @@ public TSStatus setTTL(SetTTLPlan setTTLPlan, final boolean isGeneratedByPipe) { TSStatus errorStatus = new TSStatus(TSStatusCode.ILLEGAL_PARAMETER.getStatusCode()); errorStatus.setMessage( String.format( - "Illegal pattern path: %s, pattern path should end with **, otherwise, it should be a specific database or device path without *", + ConfigNodeMessages + .MESSAGE_ILLEGAL_PATTERN_PATH_ARG_PATTERN_PATH_SHOULD_END_OTHERWISE_IT_50E969BB, path.getFullPath())); return errorStatus; } @@ -100,7 +101,8 @@ public TSStatus unsetTTL(SetTTLPlan setTTLPlan, final boolean isGeneratedByPipe) TSStatus errorStatus = new TSStatus(TSStatusCode.ILLEGAL_PARAMETER.getStatusCode()); errorStatus.setMessage( String.format( - "Illegal pattern path: %s, pattern path should end with **, otherwise, it should be a specific database or device path without *", + ConfigNodeMessages + .MESSAGE_ILLEGAL_PATTERN_PATH_ARG_PATTERN_PATH_SHOULD_END_OTHERWISE_IT_50E969BB, path.getFullPath())); return errorStatus; } diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/UDFManager.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/UDFManager.java index 9768b1211709d..b696293a715ce 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/UDFManager.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/UDFManager.java @@ -114,7 +114,7 @@ public TSStatus createFunction(TCreateFunctionReq req) { return new TSStatus(TSStatusCode.CREATE_UDF_ERROR.getStatusCode()) .setMessage( String.format( - "Fail to create UDF[%s], the size of Jar is too large, you can increase the value of property 'config_node_ratis_log_appender_buffer_size_max' on ConfigNode", + ManagerMessages.MESSAGE_FAIL_CREATE_UDF_ARG_SIZE_JAR_TOO_LARGE_YOU_CAN_2F119802, udfName)); } TSStatus preCreateStatus = configManager.getConsensusManager().write(createFunctionPlan); diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/consensus/ConsensusManager.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/consensus/ConsensusManager.java index d7024c357b188..d4c4ef4b4da29 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/consensus/ConsensusManager.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/consensus/ConsensusManager.java @@ -279,7 +279,7 @@ private void upgrade() { if (oldWalDir.exists() && !oldWalDir.renameTo(new File(getConfigRegionDir()))) { LOGGER.warn( ManagerMessages.UPGRADE_CONFIGNODE_CONSENSUS_WAL_DIR_FOR_SIMPLECONSENSUS_FROM_VERSION_1 - + "you maybe need to rename the simple dir to 0_0 manually."); + + ManagerMessages.LOG_YOU_MAYBE_NEED_RENAME_SIMPLE_DIR_0_0_MANUALLY_2A12C5C9); } } } @@ -305,7 +305,9 @@ public void createPeerForConsensusGroup(List configNodeLoca try { consensusImpl.createLocalPeer(DEFAULT_CONSENSUS_GROUP_ID, peerList); } catch (ConsensusGroupAlreadyExistException e) { - LOGGER.info("ConfigNode local peer has already been created: {}", e.getMessage()); + LOGGER.info( + ManagerMessages.LOG_CONFIGNODE_LOCAL_PEER_HAS_ALREADY_BEEN_CREATED_ARG_FA75E88F, + e.getMessage()); } } @@ -325,7 +327,9 @@ public void addConfigNodePeer(TConfigNodeLocation configNodeLocation) throws Add configNodeLocation.getConsensusEndPoint())); } catch (PeerAlreadyInConsensusGroupException e) { LOGGER.info( - "ConfigNode peer {} has already been added: {}", configNodeLocation, e.getMessage()); + ManagerMessages.LOG_CONFIGNODE_PEER_ARG_HAS_ALREADY_BEEN_ADDED_ARG_A8F958B0, + configNodeLocation, + e.getMessage()); } catch (ConsensusException e) { throw new AddPeerException(configNodeLocation); } @@ -349,7 +353,9 @@ public boolean removeConfigNodePeer(TConfigNodeLocation configNodeLocation) { return true; } catch (PeerNotInConsensusGroupException e) { LOGGER.info( - "ConfigNode peer {} has already been removed: {}", configNodeLocation, e.getMessage()); + ManagerMessages.LOG_CONFIGNODE_PEER_ARG_HAS_ALREADY_BEEN_REMOVED_ARG_FACD71EE, + configNodeLocation, + e.getMessage()); return true; } catch (ConsensusException e) { return false; @@ -455,7 +461,8 @@ private TSStatus confirmLeader(final boolean checkLoadReady) { if (!isLeader()) { TSStatus result = new TSStatus(TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode()); result.setMessage( - "The current ConfigNode is not leader, please redirect to a new ConfigNode."); + ManagerMessages + .MESSAGE_CURRENT_CONFIGNODE_NOT_LEADER_PLEASE_REDIRECT_NEW_CONFIGNODE_F9AF262D); TConfigNodeLocation leaderLocation = getLeaderLocation(); if (leaderLocation != null) { result.setRedirectNode(leaderLocation.getInternalEndPoint()); @@ -467,11 +474,12 @@ private TSStatus confirmLeader(final boolean checkLoadReady) { if (!isLeaderReady()) { return getLeaderWarmingUpStatus( - "The current ConfigNode is leader but consensus is not ready yet."); + ManagerMessages + .MESSAGE_CURRENT_CONFIGNODE_LEADER_BUT_NOT_READY_YET_PLEASE_TRY_AGAIN_F0B10645); } if (!stateMachine.areLeaderServicesReady()) { return getLeaderWarmingUpStatus( - "The current ConfigNode is leader but leader services are not ready yet."); + ManagerMessages.MESSAGE_CURRENT_CONFIGNODE_LEADER_SERVICE_NOT_READY); } if (checkLoadReady && !configManager.getLoadManager().isLoadReady()) { return getLeaderWarmingUpStatus(configManager.getLoadManager().getLoadReadyReason()); diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/externalservice/ExternalServiceManager.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/externalservice/ExternalServiceManager.java index d050e564b58f9..ab561bb5df9fe 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/externalservice/ExternalServiceManager.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/externalservice/ExternalServiceManager.java @@ -191,7 +191,9 @@ public TExternalServiceListResp showService(int dataNodeId) { public List getUserDefinedService(int dataNodeId) { try { - checkState(dataNodeId != -1, "dataNodeId should not be -1 here"); + checkState( + dataNodeId != -1, + ManagerMessages.EXCEPTION_DATANODEID_SHOULD_NOT_BE_MINUS_1_HERE_5CB27796); ShowExternalServiceResp response = (ShowExternalServiceResp) diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/balancer/partition/DataPartitionPolicyTable.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/balancer/partition/DataPartitionPolicyTable.java index 334f7983d216b..2cce461478c49 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/balancer/partition/DataPartitionPolicyTable.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/balancer/partition/DataPartitionPolicyTable.java @@ -77,7 +77,7 @@ public TConsensusGroupId getRegionGroupIdOrActivateIfNecessary( regionGroupId, seriesPartitionSlotCounter.get(regionGroupId) + 1); LOGGER.info( ManagerMessages.ACTIVATEDATAALLOTTABLE_ACTIVATE_SERIESPARTITIONSLOT - + "to RegionGroup {}, SeriesPartitionSlot Count: {}", + + ManagerMessages.LOG_REGIONGROUP_ARG_SERIESPARTITIONSLOT_COUNT_ARG_30F57B14, seriesPartitionSlot, regionGroupId, seriesPartitionSlotCounter.get(regionGroupId)); @@ -165,7 +165,8 @@ public void logDataAllotTable(String database) { regionGroupId -> LOGGER.info( ManagerMessages.REBALANCEDATAALLOTTABLE_DATABASE - + "RegionGroupId: {}, SeriesPartitionSlot Count: {}", + + ManagerMessages + .LOG_REGIONGROUPID_ARG_SERIESPARTITIONSLOT_COUNT_ARG_5DAE4B6A, database, regionGroupId, seriesPartitionSlotCounter.get(regionGroupId))); diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/node/ClusterNodeStartUtils.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/node/ClusterNodeStartUtils.java index 60c806db32859..321b177b98fe3 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/node/ClusterNodeStartUtils.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/node/ClusterNodeStartUtils.java @@ -31,6 +31,7 @@ import org.apache.iotdb.commons.conf.CommonDescriptor; import org.apache.iotdb.confignode.conf.ConfigNodeConfig; import org.apache.iotdb.confignode.conf.ConfigNodeDescriptor; +import org.apache.iotdb.confignode.i18n.ManagerMessages; import org.apache.iotdb.confignode.manager.ConfigManager; import org.apache.iotdb.confignode.rpc.thrift.TAINodeRegisterReq; import org.apache.iotdb.confignode.rpc.thrift.TConfigNodeRegisterReq; @@ -51,9 +52,10 @@ public class ClusterNodeStartUtils { public static final TSStatus ACCEPT_NODE_REGISTRATION = new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode()) - .setMessage("Accept Node registration."); + .setMessage(ManagerMessages.MESSAGE_ACCEPT_NODE_REGISTRATION_4133276A); public static final TSStatus ACCEPT_NODE_RESTART = - new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode()).setMessage("Accept Node restart."); + new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode()) + .setMessage(ManagerMessages.MESSAGE_ACCEPT_NODE_RESTART_1BC1A8DD); private ClusterNodeStartUtils() { // Empty constructor @@ -65,11 +67,15 @@ private static TSStatus confirmClusterName(NodeType nodeType, String clusterName status.setCode(TSStatusCode.REJECT_NODE_START.getStatusCode()); status.setMessage( String.format( - "Reject %s start. Because the ClusterName of the current %s and the target cluster are inconsistent. " - + "ClusterName of the current Node: %s, ClusterName of the target cluster: %s." + ManagerMessages + .MESSAGE_REJECT_ARG_START_BECAUSE_CLUSTERNAME_CURRENT_ARG_TARGET_CLUSTER_INCONSISTENT_B9E197DB + + ManagerMessages + .MESSAGE_CLUSTERNAME_CURRENT_NODE_ARG_CLUSTERNAME_TARGET_CLUSTER_ARG_5C34BE8D + POSSIBLE_SOLUTIONS - + "\t1. Change the seed_config_node parameter in %s to join the correct cluster." - + "\n\t2. Change the cluster_name parameter in %s to match the target cluster", + + ManagerMessages + .MESSAGE_1_CHANGE_SEED_CONFIG_NODE_PARAMETER_ARG_JOIN_CORRECT_CLUSTER_5E9D753C + + ManagerMessages + .MESSAGE_2_CHANGE_CLUSTER_NAME_PARAMETER_ARG_MATCH_TARGET_CLUSTER_0A0DB235, nodeType.getNodeType(), nodeType.getNodeType(), clusterName, @@ -87,10 +93,13 @@ private static TSStatus rejectRegistrationBecauseConflictEndPoints( status.setCode(TSStatusCode.REJECT_NODE_START.getStatusCode()); status.setMessage( String.format( - "Reject %s registration. Because the following ip:port: %s of the current %s is conflicted with other registered Nodes in the cluster." + ManagerMessages + .MESSAGE_REJECT_ARG_REGISTRATION_BECAUSE_FOLLOWING_IP_PORT_ARG_CURRENT_ARG_CB78CC3B + POSSIBLE_SOLUTIONS - + "\t1. Use SQL: \"show cluster details\" to find out the conflict Nodes. Remove them and retry start." - + "\n\t2. Change the conflict ip:port configurations in %s file and retry start.", + + ManagerMessages + .MESSAGE_1_USE_SQL_SHOW_CLUSTER_DETAILS_FIND_OUT_CONFLICT_NODES_A1195AEA + + ManagerMessages + .MESSAGE_2_CHANGE_CONFLICT_IP_PORT_CONFIGURATIONS_ARG_FILE_RETRY_START_CF3F08F6, nodeType.getNodeType(), conflictEndPoints, nodeType.getNodeType(), @@ -108,7 +117,8 @@ public static TSStatus confirmClusterId(ConfigManager configManager) { if (clusterId == null) { status .setCode(TSStatusCode.GET_CLUSTER_ID_ERROR.getStatusCode()) - .setMessage("cluster id has not generated, please try again later"); + .setMessage( + ManagerMessages.MESSAGE_CLUSTER_ID_HAS_NOT_GENERATED_PLEASE_TRY_AGAIN_LATER_58A1C3F2); return status; } return new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode()); @@ -222,11 +232,15 @@ public static TSStatus confirmNodeRestart( status.setCode(TSStatusCode.REJECT_NODE_START.getStatusCode()); status.setMessage( String.format( - "Reject %s restart. Because the ClusterName of the current %s and the target cluster are inconsistent. " - + "ClusterName of the current Node: %s, ClusterName of the target cluster: %s." + ManagerMessages + .MESSAGE_REJECT_ARG_RESTART_BECAUSE_CLUSTERNAME_CURRENT_ARG_TARGET_CLUSTER_INCONSISTENT_2075F29D + + ManagerMessages + .MESSAGE_CLUSTERNAME_CURRENT_NODE_ARG_CLUSTERNAME_TARGET_CLUSTER_ARG_5C34BE8D + POSSIBLE_SOLUTIONS - + "\t1. Change the seed_config_node parameter in %s to join the correct cluster." - + "\n\t2. Change the cluster_name parameter in %s to match the target cluster", + + ManagerMessages + .MESSAGE_1_CHANGE_SEED_CONFIG_NODE_PARAMETER_ARG_JOIN_CORRECT_CLUSTER_5E9D753C + + ManagerMessages + .MESSAGE_2_CHANGE_CLUSTER_NAME_PARAMETER_ARG_MATCH_TARGET_CLUSTER_0A0DB235, nodeType.getNodeType(), nodeType.getNodeType(), clusterName, @@ -241,9 +255,9 @@ public static TSStatus confirmNodeRestart( status.setCode(TSStatusCode.REJECT_NODE_START.getStatusCode()); status.setMessage( String.format( - "Reject %s restart. Because the nodeId of the current %s is %d." + ManagerMessages.MESSAGE_REJECT_ARG_RESTART_BECAUSE_NODEID_CURRENT_ARG_ARG_AC13EDD5 + POSSIBLE_SOLUTIONS - + "\t1. Delete \"data\" dir and retry.", + + ManagerMessages.MESSAGE_1_DELETE_DATA_DIR_RETRY_86A23473, nodeType.getNodeType(), nodeType.getNodeType(), nodeId)); @@ -284,9 +298,11 @@ public static TSStatus confirmNodeRestart( status.setCode(TSStatusCode.REJECT_NODE_START.getStatusCode()); status.setMessage( String.format( - "Reject %s restart. Because there are no corresponding %s(whose nodeId=%d) in the cluster." + ManagerMessages + .MESSAGE_REJECT_ARG_RESTART_BECAUSE_THERE_NO_CORRESPONDING_ARG_WHOSE_NODEID_455578E9 + POSSIBLE_SOLUTIONS - + "\t1. Maybe you've already removed the current %s(whose nodeId=%d). Please delete the useless 'data' dir and retry start.", + + ManagerMessages + .MESSAGE_1_MAYBE_YOU_VE_ALREADY_REMOVED_CURRENT_ARG_WHOSE_NODEID_92165504, nodeType.getNodeType(), nodeType.getNodeType(), nodeId, @@ -330,10 +346,13 @@ public static TSStatus confirmNodeRestart( status.setCode(TSStatusCode.REJECT_NODE_START.getStatusCode()); status.setMessage( String.format( - "Reject %s restart. Because the clusterId of the current %s and the target cluster are inconsistent. " - + "ClusterId of the current Node: %s, ClusterId of the target cluster: %s." + ManagerMessages + .MESSAGE_REJECT_ARG_RESTART_BECAUSE_CLUSTERID_CURRENT_ARG_TARGET_CLUSTER_INCONSISTENT_0398A6CE + + ManagerMessages + .MESSAGE_CLUSTERID_CURRENT_NODE_ARG_CLUSTERID_TARGET_CLUSTER_ARG_23C42434 + POSSIBLE_SOLUTIONS - + "\t1. Please check if the node configuration or path is correct.", + + ManagerMessages + .MESSAGE_1_PLEASE_CHECK_IF_NODE_CONFIGURATION_PATH_CORRECT_7FB5D559, nodeType.getNodeType(), nodeType.getNodeType(), clusterId, @@ -346,9 +365,11 @@ public static TSStatus confirmNodeRestart( status.setCode(TSStatusCode.REJECT_NODE_START.getStatusCode()); status.setMessage( String.format( - "Reject %s restart. Because the internal TEndPoints of this %s can't be modified." + ManagerMessages + .MESSAGE_REJECT_ARG_RESTART_BECAUSE_INTERNAL_TENDPOINTS_ARG_CAN_T_MODIFIED_A58B99F0 + POSSIBLE_SOLUTIONS - + "\t1. Please keep the internal TEndPoints of this Node the same as before.", + + ManagerMessages + .MESSAGE_1_PLEASE_KEEP_INTERNAL_TENDPOINTS_NODE_SAME_AS_BEFORE_2FDB2034, nodeType.getNodeType(), nodeType.getNodeType())); return status; diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/node/NodeManager.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/node/NodeManager.java index 928db046980d0..bbe9a598d6f28 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/node/NodeManager.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/node/NodeManager.java @@ -918,7 +918,8 @@ public TSStatus checkConfigNodeBeforeRemove(RemoveConfigNodePlan removeConfigNod if (getRegisteredConfigNodes().size() <= 1) { return new TSStatus(TSStatusCode.REMOVE_CONFIGNODE_ERROR.getStatusCode()) .setMessage( - "Remove ConfigNode failed because there is only one ConfigNode in current Cluster."); + ManagerMessages + .MESSAGE_REMOVE_CONFIGNODE_FAILED_BECAUSE_THERE_ONLY_ONE_CONFIGNODE_CURRENT_CLUSTER_D1273758); } // Check OnlineConfigNodes number @@ -930,7 +931,8 @@ public TSStatus checkConfigNodeBeforeRemove(RemoveConfigNodePlan removeConfigNod if (System.nanoTime() > deadline) { return new TSStatus(TSStatusCode.REMOVE_CONFIGNODE_ERROR.getStatusCode()) .setMessage( - "Remove ConfigNode failed because there is no other ConfigNode in Running status in current Cluster."); + ManagerMessages + .MESSAGE_REMOVE_CONFIGNODE_FAILED_BECAUSE_THERE_NO_OTHER_CONFIGNODE_RUNNING_STATUS_C9C43315); } try { Thread.sleep(1000); @@ -954,7 +956,8 @@ public TSStatus checkConfigNodeBeforeRemove(RemoveConfigNodePlan removeConfigNod if (leader == null) { return new TSStatus(TSStatusCode.REMOVE_CONFIGNODE_ERROR.getStatusCode()) .setMessage( - "Remove ConfigNode failed because the ConfigNodeGroup is on leader election, please retry."); + ManagerMessages + .MESSAGE_REMOVE_CONFIGNODE_FAILED_BECAUSE_CONFIGNODEGROUP_LEADER_ELECTION_PLEASE_RETRY_3EE602F6); } if (leader @@ -984,7 +987,8 @@ private TSStatus transferLeader( } else { return new TSStatus(TSStatusCode.TRANSFER_LEADER_ERROR.getStatusCode()) .setMessage( - "Transfer ConfigNode leader failed because can not find any running ConfigNode."); + ManagerMessages + .MESSAGE_TRANSFER_CONFIGNODE_LEADER_FAILED_BECAUSE_CAN_NOT_FIND_ANY_RUNNING_1FE4F96D); } try { getConsensusManager() @@ -1000,9 +1004,9 @@ private TSStatus transferLeader( return new TSStatus(TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode()) .setRedirectNode(newLeader.getInternalEndPoint()) .setMessage( - "The ConfigNode to be removed is leader, already transfer Leader to " + ManagerMessages.MESSAGE_CONFIGNODE_REMOVED_LEADER_ALREADY_TRANSFER_LEADER_FA6D1603 + newLeader - + "."); + + ConfigNodeMessages.EXCEPTION_DOT_9D9B854A); } public List merge() { @@ -1238,7 +1242,8 @@ private TSStatus killSpecificQuery( if (dataNodeLocation == null) { return new TSStatus(TSStatusCode.INTERNAL_SERVER_ERROR.getStatusCode()) .setMessage( - "The target DataNode is not existed, please ensure your input is correct"); + ManagerMessages + .MESSAGE_TARGET_DATANODE_NOT_EXISTED_PLEASE_ENSURE_YOUR_INPUT_QUERYID_CORRECT_AB84CCDF); } else { TKillQueryInstanceReq req = new TKillQueryInstanceReq(); req.setQueryId(queryId); diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/partition/PartitionManager.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/partition/PartitionManager.java index 5be81256b5c39..6dabf620d4f5e 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/partition/PartitionManager.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/partition/PartitionManager.java @@ -231,7 +231,8 @@ public SchemaPartitionResp getOrCreateSchemaPartition(final GetOrCreateSchemaPar new TSStatus(TSStatusCode.DATABASE_NOT_EXIST.getStatusCode()) .setMessage( String.format( - "Create SchemaPartition failed because the database: %s is not exists", + ManagerMessages + .MESSAGE_CREATE_SCHEMAPARTITION_FAILED_BECAUSE_DATABASE_ARG_NOT_EXISTS_D8AE1679, database)), false, null); @@ -266,7 +267,8 @@ public SchemaPartitionResp getOrCreateSchemaPartition(final GetOrCreateSchemaPar new TSStatus(TSStatusCode.DATABASE_NOT_EXIST.getStatusCode()) .setMessage( String.format( - "Create SchemaPartition failed because the database: %s does not exist", + ManagerMessages + .MESSAGE_CREATE_SCHEMAPARTITION_FAILED_BECAUSE_DATABASE_ARG_DOES_NOT_EXIST_2617832C, database)), false, null); @@ -376,7 +378,8 @@ public DataPartitionResp getOrCreateDataPartition(final GetOrCreateDataPartition new TSStatus(TSStatusCode.DATABASE_NOT_EXIST.getStatusCode()) .setMessage( String.format( - "Create DataPartition failed because the database: %s is not exists", + ManagerMessages + .MESSAGE_CREATE_DATAPARTITION_FAILED_BECAUSE_DATABASE_ARG_NOT_EXISTS_F223D5C2, database)), false, null); @@ -411,7 +414,8 @@ public DataPartitionResp getOrCreateDataPartition(final GetOrCreateDataPartition new TSStatus(TSStatusCode.DATABASE_NOT_EXIST.getStatusCode()) .setMessage( String.format( - "Create DataPartition failed because the database: %s does not exist", + ManagerMessages + .MESSAGE_CREATE_DATAPARTITION_FAILED_BECAUSE_DATABASE_ARG_DOES_NOT_EXIST_D7A8C1FC, database)), false, null); diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/pipe/agent/task/PipeConfigNodeSubtask.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/pipe/agent/task/PipeConfigNodeSubtask.java index fd1a849063062..9ae36282e59c2 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/pipe/agent/task/PipeConfigNodeSubtask.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/pipe/agent/task/PipeConfigNodeSubtask.java @@ -107,7 +107,7 @@ private void initSource(final Map sourceAttributes) throws Excep } catch (Exception closeException) { LOGGER.warn( ManagerMessages.FAILED_TO_CLOSE_EXTRACTOR_AFTER_FAILED_TO_INITIALIZE_EXTRACTOR - + "Ignore this exception.", + + ManagerMessages.LOG_IGNORE_EXCEPTION_2AC431FA, closeException); } throw e; diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/pipe/agent/task/PipeConfigNodeTaskAgent.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/pipe/agent/task/PipeConfigNodeTaskAgent.java index 58fd18cf854f8..e7cd8984235cc 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/pipe/agent/task/PipeConfigNodeTaskAgent.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/pipe/agent/task/PipeConfigNodeTaskAgent.java @@ -234,7 +234,8 @@ protected void collectPipeMetaListInternal( logger.ifPresent( l -> l.info( - "Reporting pipe meta: {}, remainingEventCount: {}, estimatedRemainingTime: {}", + ManagerMessages + .LOG_REPORTING_PIPE_META_ARG_REMAININGEVENTCOUNT_ARG_ESTIMATEDREMAININGTIME_ARG_E2727CB4, pipeMeta.coreReportMessage(), remainingEventCount, estimatedRemainingTime)); diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/pipe/coordinator/runtime/heartbeat/PipeHeartbeatParser.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/pipe/coordinator/runtime/heartbeat/PipeHeartbeatParser.java index 597120ffe1cf5..568917ba5bc67 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/pipe/coordinator/runtime/heartbeat/PipeHeartbeatParser.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/pipe/coordinator/runtime/heartbeat/PipeHeartbeatParser.java @@ -144,7 +144,7 @@ private void parseHeartbeatAndSaveMetaChangeLocally( if (pipeMetaFromAgent == null) { LOGGER.info( ManagerMessages.PIPERUNTIMECOORDINATOR_MEETS_ERROR_IN_UPDATING_PIPEMETAKEEPER - + "pipeMetaFromAgent is null, pipeMetaFromCoordinator: {}", + + ManagerMessages.LOG_PIPEMETAFROMAGENT_NULL_PIPEMETAFROMCOORDINATOR_ARG_36C513AE, pipeMetaFromCoordinator); continue; } @@ -158,7 +158,8 @@ private void parseHeartbeatAndSaveMetaChangeLocally( temporaryMeta.markDataNodeCompleted(nodeId); LOGGER.info( - "Detected historical pipe completion report from DataNode {} for pipe {}. remainingEventCount: {}, remainingTime: {}, completedDataNodes: {}", + ManagerMessages + .LOG_DETECTED_HISTORICAL_PIPE_COMPLETION_REPORT_DATANODE_ARG_PIPE_ARG_REMAININGEVENTCOUNT_7E6C52E9, nodeId, staticMeta.getPipeName(), pipeHeartbeat.getRemainingEventCount(staticMeta), @@ -170,7 +171,8 @@ private void parseHeartbeatAndSaveMetaChangeLocally( uncompletedDataNodeIds.removeAll(temporaryMeta.getCompletedDataNodeIds()); if (uncompletedDataNodeIds.isEmpty()) { LOGGER.info( - "All DataNodes reported historical pipe {} completed. globalRemainingEventCount: {}, globalRemainingTime: {}, staticMeta: {}", + ManagerMessages + .LOG_ALL_DATANODES_REPORTED_HISTORICAL_PIPE_ARG_COMPLETED_GLOBALREMAININGEVENTCOUNT_ARG_GLOBALREMAININGTIME_255, staticMeta.getPipeName(), temporaryMeta.getGlobalRemainingEvents(), temporaryMeta.getGlobalRemainingTime(), @@ -232,8 +234,10 @@ private void parseHeartbeatAndSaveMetaChangeLocally( .ifPresent( l -> l.info( - "Updated progress index for (pipe name: {}, consensus group id: {}) ... " - + "Progress index on coordinator: {}, progress index from agent: {}, updated progressIndex: {}", + ManagerMessages + .LOG_UPDATED_PROGRESS_INDEX_PIPE_NAME_ARG_CONSENSUS_GROUP_ID_ARG_DF112F4F + + ManagerMessages + .LOG_PROGRESS_INDEX_COORDINATOR_ARG_PROGRESS_INDEX_AGENT_ARG_UPDATED_PROGRESSINDEX_1A22ABC5, pipeMetaFromCoordinator.getStaticMeta().getPipeName(), runtimeMetaFromCoordinator.getKey(), runtimeMetaFromCoordinator.getValue().getProgressIndex(), @@ -298,9 +302,11 @@ private void parseHeartbeatAndSaveMetaChangeLocally( LOGGER.warn( String.format( - "Detect PipeRuntimeConnectorCriticalException %s " - + "from agent, stop pipe %s.", - exception, pipeName)); + ManagerMessages + .LOG_DETECT_PIPERUNTIMECONNECTORCRITICALEXCEPTION_ARG_7D198DD7 + + ManagerMessages.LOG_AGENT_STOP_PIPE_ARG_42212C21, + exception, + pipeName)); }); } } diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/pipe/event/PipeConfigRegionSnapshotEvent.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/pipe/event/PipeConfigRegionSnapshotEvent.java index 0d0d8374c3391..f41b94345e26e 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/pipe/event/PipeConfigRegionSnapshotEvent.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/pipe/event/PipeConfigRegionSnapshotEvent.java @@ -174,8 +174,10 @@ public boolean internallyIncreaseResourceReferenceCount(final String holderMessa } catch (final Exception e) { LOGGER.warn( String.format( - "Increase reference count for snapshot %s error. Holder Message: %s", - snapshotPath, holderMessage), + ManagerMessages + .LOG_INCREASE_REFERENCE_COUNT_SNAPSHOT_ARG_ERROR_HOLDER_MESSAGE_ARG_962E8672, + snapshotPath, + holderMessage), e); return false; } @@ -192,8 +194,10 @@ public boolean internallyDecreaseResourceReferenceCount(final String holderMessa } catch (final Exception e) { LOGGER.warn( String.format( - "Decrease reference count for snapshot %s error. Holder Message: %s", - snapshotPath, holderMessage), + ManagerMessages + .LOG_DECREASE_REFERENCE_COUNT_SNAPSHOT_ARG_ERROR_HOLDER_MESSAGE_ARG_8C7FF9CE, + snapshotPath, + holderMessage), e); return false; } diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/pipe/receiver/protocol/IoTDBConfigNodeReceiver.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/pipe/receiver/protocol/IoTDBConfigNodeReceiver.java index 7de8e8bf78d9d..e45e813299ff8 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/pipe/receiver/protocol/IoTDBConfigNodeReceiver.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/pipe/receiver/protocol/IoTDBConfigNodeReceiver.java @@ -183,7 +183,8 @@ public TPipeTransferResp receive(final TPipeTransferReq req) { return new TPipeTransferResp( new TSStatus(TSStatusCode.PIPE_CONFIG_RECEIVER_HANDSHAKE_NEEDED.getStatusCode()) .setMessage( - "The receiver ConfigNode has set up a new receiver and the sender must re-send its handshake request.")); + ManagerMessages + .MESSAGE_RECEIVER_CONFIGNODE_HAS_SET_UP_NEW_RECEIVER_SENDER_MUST_RE_77B80C51)); } final TPipeTransferResp resp; final long startTime = System.nanoTime(); diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/schema/ClusterSchemaManager.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/schema/ClusterSchemaManager.java index cfecd8e011482..2391dbb62a9b3 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/schema/ClusterSchemaManager.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/schema/ClusterSchemaManager.java @@ -234,7 +234,9 @@ public TSStatus alterDatabase( // Reject if Database doesn't exist result = new TSStatus(TSStatusCode.DATABASE_NOT_EXIST.getStatusCode()); result.setMessage( - "Failed to alter database. The Database " + databaseSchema.getName() + " doesn't exist."); + ManagerMessages.MESSAGE_FAILED_ALTER_DATABASE_DATABASE_2734674F + + databaseSchema.getName() + + ManagerMessages.MESSAGE_DOESN_T_EXIST_EED8C92E); return result; } @@ -246,9 +248,12 @@ public TSStatus alterDatabase( result = new TSStatus(TSStatusCode.DATABASE_CONFIG_ERROR.getStatusCode()); result.setMessage( String.format( - "Failed to alter database. The SchemaRegionGroupNum could only be increased. " - + "Current SchemaRegionGroupNum: %d, Alter SchemaRegionGroupNum: %d", - minSchemaRegionGroupNum, databaseSchema.getMinSchemaRegionGroupNum())); + ManagerMessages + .MESSAGE_FAILED_ALTER_DATABASE_SCHEMAREGIONGROUPNUM_COULD_ONLY_INCREASED_B98229D3 + + ManagerMessages + .MESSAGE_CURRENT_SCHEMAREGIONGROUPNUM_ARG_ALTER_SCHEMAREGIONGROUPNUM_ARG_F7495BC2, + minSchemaRegionGroupNum, + databaseSchema.getMinSchemaRegionGroupNum())); return result; } } @@ -260,9 +265,12 @@ public TSStatus alterDatabase( result = new TSStatus(TSStatusCode.DATABASE_CONFIG_ERROR.getStatusCode()); result.setMessage( String.format( - "Failed to alter database. The DataRegionGroupNum could only be increased. " - + "Current DataRegionGroupNum: %d, Alter DataRegionGroupNum: %d", - minDataRegionGroupNum, databaseSchema.getMinDataRegionGroupNum())); + ManagerMessages + .MESSAGE_FAILED_ALTER_DATABASE_DATAREGIONGROUPNUM_COULD_ONLY_INCREASED_84283EB5 + + ManagerMessages + .MESSAGE_CURRENT_DATAREGIONGROUPNUM_ARG_ALTER_DATAREGIONGROUPNUM_ARG_61C6E978, + minDataRegionGroupNum, + databaseSchema.getMinDataRegionGroupNum())); return result; } } @@ -854,7 +862,8 @@ public static TSStatus enrichDatabaseSchemaWithDefaultProperties( errorResp = new TSStatus(TSStatusCode.DATABASE_CONFIG_ERROR.getStatusCode()) .setMessage( - "Failed to create database. The schemaReplicationFactor should be positive."); + ManagerMessages + .MESSAGE_FAILED_CREATE_DATABASE_SCHEMAREPLICATIONFACTOR_SHOULD_POSITIVE_8847F33C); } if (!databaseSchema.isSetDataReplicationFactor()) { @@ -864,7 +873,8 @@ public static TSStatus enrichDatabaseSchemaWithDefaultProperties( errorResp = new TSStatus(TSStatusCode.DATABASE_CONFIG_ERROR.getStatusCode()) .setMessage( - "Failed to create database. The dataReplicationFactor should be positive."); + ManagerMessages + .MESSAGE_FAILED_CREATE_DATABASE_DATAREPLICATIONFACTOR_SHOULD_POSITIVE_C2565B7E); } if (!databaseSchema.isSetTimePartitionOrigin()) { @@ -874,7 +884,8 @@ public static TSStatus enrichDatabaseSchemaWithDefaultProperties( errorResp = new TSStatus(TSStatusCode.DATABASE_CONFIG_ERROR.getStatusCode()) .setMessage( - "Failed to create database. The timePartitionOrigin should be non-negative."); + ManagerMessages + .MESSAGE_FAILED_CREATE_DATABASE_TIMEPARTITIONORIGIN_SHOULD_NON_NEGATIVE_BD0595C9); } if (!databaseSchema.isSetTimePartitionInterval()) { @@ -884,7 +895,8 @@ public static TSStatus enrichDatabaseSchemaWithDefaultProperties( errorResp = new TSStatus(TSStatusCode.DATABASE_CONFIG_ERROR.getStatusCode()) .setMessage( - "Failed to create database. The timePartitionInterval should be positive."); + ManagerMessages + .MESSAGE_FAILED_CREATE_DATABASE_TIMEPARTITIONINTERVAL_SHOULD_POSITIVE_BB1B473F); } if (isSystemDatabase || isAuditDatabase) { @@ -896,7 +908,8 @@ public static TSStatus enrichDatabaseSchemaWithDefaultProperties( errorResp = new TSStatus(TSStatusCode.DATABASE_CONFIG_ERROR.getStatusCode()) .setMessage( - "Failed to create database. The schemaRegionGroupNum should be positive."); + ManagerMessages + .MESSAGE_FAILED_CREATE_DATABASE_SCHEMAREGIONGROUPNUM_SHOULD_POSITIVE_8396A2AB); } if (isSystemDatabase || isAuditDatabase) { diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/subscription/SubscriptionMetaSyncer.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/subscription/SubscriptionMetaSyncer.java index 307554231c736..64f545f016244 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/subscription/SubscriptionMetaSyncer.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/subscription/SubscriptionMetaSyncer.java @@ -111,7 +111,9 @@ private synchronized void sync() { // sync commit progress if syncing consumer group meta successfully final TSStatus commitProgressSyncStatus = procedureManager.commitProgressSync(); if (commitProgressSyncStatus.getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()) { - LOGGER.warn("Failed to sync commit progress. Result status: {}.", commitProgressSyncStatus); + LOGGER.warn( + ManagerMessages.LOG_FAILED_SYNC_COMMIT_PROGRESS_RESULT_STATUS_ARG_A9E46E80, + commitProgressSyncStatus); return; } diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/TTLInfo.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/TTLInfo.java index 4921b03851c0d..e4e93475482d0 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/TTLInfo.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/TTLInfo.java @@ -76,9 +76,11 @@ public TSStatus setTTL(SetTTLPlan plan) { TSStatus errorStatus = new TSStatus(TSStatusCode.OVERSIZE_TTL.getStatusCode()); errorStatus.setMessage( String.format( - "The number of TTL rules has reached the limit " - + "(capacity: %d, requested total: %d). Please delete some existing rules first.", - tTlRuleCapacity, requestedTTLRuleCount)); + ConfigNodeMessages.MESSAGE_NUMBER_TTL_RULES_HAS_REACHED_LIMIT_8575FF1E + + ConfigNodeMessages + .MESSAGE_CAPACITY_ARG_REQUESTED_TOTAL_ARG_PLEASE_DELETE_SOME_EXISTING_RULES_35B24B22, + tTlRuleCapacity, + requestedTTLRuleCount)); return errorStatus; } ttlCache.setTTL(plan.getPathPattern(), plan.getTTL()); diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/auth/AuthorPlanExecutor.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/auth/AuthorPlanExecutor.java index a65e05c8ad796..3c444eaa98287 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/auth/AuthorPlanExecutor.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/auth/AuthorPlanExecutor.java @@ -202,7 +202,7 @@ public TSStatus executeAuthorNonQuery(AuthorTreePlan authorPlan) { default: throw new AuthException( TSStatusCode.UNSUPPORTED_AUTH_OPERATION, - "unknown type: " + authorPlan.getAuthorType()); + ConfigNodeMessages.EXCEPTION_UNKNOWN_TYPE_7618F8F4 + authorPlan.getAuthorType()); } } catch (AuthException e) { return RpcUtils.getStatus(e.getCode(), e.getMessage()); @@ -713,7 +713,8 @@ public TPermissionInfoResp checkRoleOfUser(String username, String roleName) User user = authorizer.getUser(username); if (user == null) { throw new AuthException( - TSStatusCode.USER_NOT_EXIST, String.format("No such user : %s", username)); + TSStatusCode.USER_NOT_EXIST, + String.format(ConfigNodeMessages.EXCEPTION_NO_SUCH_USER_ARG_D11B1046, username)); } result = getUserPermissionInfo(username, ModelType.ALL); if (user.getRoleSet().contains(roleName)) { @@ -730,7 +731,8 @@ public TPermissionInfoResp getUser(String username) throws AuthException { User user = authorizer.getUser(username); if (user == null) { throw new AuthException( - TSStatusCode.USER_NOT_EXIST, String.format("No such user : %s", username)); + TSStatusCode.USER_NOT_EXIST, + String.format(ConfigNodeMessages.EXCEPTION_NO_SUCH_USER_ARG_D11B1046, username)); } result = getUserPermissionInfo(username, ModelType.ALL); result.setStatus(RpcUtils.getStatus(TSStatusCode.SUCCESS_STATUS)); @@ -742,7 +744,8 @@ public String getUserName(long userId) throws AuthException { User user = authorizer.getUser(userId); if (user == null) { throw new AuthException( - TSStatusCode.USER_NOT_EXIST, String.format("No such user id: " + userId)); + TSStatusCode.USER_NOT_EXIST, + String.format(ConfigNodeMessages.EXCEPTION_NO_SUCH_USER_ID_99CA691B + userId)); } return user.getName(); } diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/node/NodeInfo.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/node/NodeInfo.java index 0b8c22d1b0249..e2d3ed3e162af 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/node/NodeInfo.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/node/NodeInfo.java @@ -150,7 +150,8 @@ public TSStatus registerDataNode(RegisterDataNodePlan registerDataNodePlan) { if (nextNodeId.get() < MINIMUM_DATANODE) { result.setMessage( String.format( - "To enable IoTDB-Cluster's data service, please register %d more IoTDB-DataNode", + ConfigNodeMessages + .MESSAGE_ENABLE_IOTDB_CLUSTER_S_DATA_SERVICE_PLEASE_REGISTER_ARG_MORE_F48F3890, MINIMUM_DATANODE - nextNodeId.get())); } else if (nextNodeId.get() == MINIMUM_DATANODE) { result.setMessage( @@ -437,7 +438,8 @@ public TSStatus applyConfigNode(ApplyConfigNodePlan applyConfigNodePlan) { LOGGER.error(ConfigNodeMessages.UPDATE_ONLINE_CONFIGNODE_FAILED, e); status.setCode(TSStatusCode.ADD_CONFIGNODE_ERROR.getStatusCode()); status.setMessage( - "Apply new ConfigNode failed because current ConfigNode can't store ConfigNode information."); + ConfigNodeMessages + .MESSAGE_APPLY_NEW_CONFIGNODE_FAILED_BECAUSE_CURRENT_CONFIGNODE_CAN_T_STORE_1BB6A6BF); } finally { configNodeInfoReadWriteLock.writeLock().unlock(); } @@ -472,7 +474,8 @@ public TSStatus removeConfigNode(RemoveConfigNodePlan removeConfigNodePlan) { LOGGER.error(ConfigNodeMessages.REMOVE_ONLINE_CONFIGNODE_FAILED, e); status.setCode(TSStatusCode.REMOVE_CONFIGNODE_ERROR.getStatusCode()); status.setMessage( - "Remove ConfigNode failed because current ConfigNode can't store ConfigNode information."); + ConfigNodeMessages + .MESSAGE_REMOVE_CONFIGNODE_FAILED_BECAUSE_CURRENT_CONFIGNODE_CAN_T_STORE_CONFIGNODE_8AB3BCB4); } finally { versionInfoReadWriteLock.writeLock().unlock(); configNodeInfoReadWriteLock.writeLock().unlock(); diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/partition/DatabasePartitionTable.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/partition/DatabasePartitionTable.java index d2f1f80e7a3e0..1ed35210afcd2 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/partition/DatabasePartitionTable.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/partition/DatabasePartitionTable.java @@ -542,7 +542,7 @@ void addRegionNewLocation(TConsensusGroupId regionId, TDataNodeLocation node) { if (regionGroup.getReplicaSet().getDataNodeLocations().contains(node)) { LOGGER.info( ConfigNodeMessages.NODE_IS_ALREADY_IN_REGION_LOCATIONS_WHEN_ADDREGIONNEWLOCATION_IN - + "node: {}, region: {}", + + ConfigNodeMessages.LOG_NODE_ARG_REGION_ARG_70A7CD4F, databaseName, node, regionId); @@ -565,7 +565,7 @@ void removeRegionLocation(TConsensusGroupId regionId, int nodeId) { .noneMatch(id -> id == nodeId)) { LOGGER.info( ConfigNodeMessages.NODE_IS_NOT_IN_REGION_LOCATIONS_WHEN_REMOVEREGIONOLDLOCATION_IN - + "no need to remove it, node: {}, region: {}", + + ConfigNodeMessages.LOG_NO_NEED_REMOVE_IT_NODE_ARG_REGION_ARG_D14062CE, databaseName, nodeId, regionId); diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/pipe/PipeInfo.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/pipe/PipeInfo.java index e353398cd9de1..3cbd84faacd1a 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/pipe/PipeInfo.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/pipe/PipeInfo.java @@ -142,7 +142,8 @@ public TSStatus setPipeStatusWithStoppedByRuntimeException( ConfigNodeMessages.FAILED_TO_SET_PIPE_STATUS_WITH_STOPPED_BY_RUNTIME_EXCEPTION, e); return new TSStatus(TSStatusCode.PIPE_ERROR.getStatusCode()) .setMessage( - "Failed to set pipe status with stopped-by-runtime-exception flag, because " + ConfigNodeMessages + .MESSAGE_FAILED_SET_PIPE_STATUS_STOPPED_RUNTIME_EXCEPTION_FLAG_BECAUSE_BFEA15AA + e.getMessage()); } } @@ -315,9 +316,9 @@ public void processLoadSnapshot(final File snapshotDir) throws IOException { if (loadPipeTaskInfoException != null || loadPipePluginInfoException != null) { throw new IOException( ConfigNodeMessages.FAILED_TO_LOAD_PIPE_INFO_FROM_SNAPSHOT - + "loadPipeTaskInfoException=" + + ConfigNodeMessages.EXCEPTION_LOADPIPETASKINFOEXCEPTION_2270468E + loadPipeTaskInfoException - + ", loadPipePluginInfoException=" + + ConfigNodeMessages.EXCEPTION_LOADPIPEPLUGININFOEXCEPTION_40362E11 + loadPipePluginInfoException); } } diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/quota/QuotaInfo.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/quota/QuotaInfo.java index 93d2b27210910..783ad6c336891 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/quota/QuotaInfo.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/quota/QuotaInfo.java @@ -28,6 +28,7 @@ import org.apache.iotdb.commons.snapshot.SnapshotProcessor; import org.apache.iotdb.confignode.consensus.request.write.quota.SetSpaceQuotaPlan; import org.apache.iotdb.confignode.consensus.request.write.quota.SetThrottleQuotaPlan; +import org.apache.iotdb.confignode.i18n.ManagerMessages; import org.apache.iotdb.rpc.RpcUtils; import org.apache.iotdb.rpc.TSStatusCode; @@ -149,7 +150,7 @@ public boolean processTakeSnapshot(File snapshotDir) throws TException, IOExcept File snapshotFile = new File(snapshotDir, snapshotFileName); if (snapshotFile.exists() && snapshotFile.isFile()) { logger.error( - "Failed to take snapshot, because snapshot file [{}] is already exist.", + ManagerMessages.LOG_FAILED_TAKE_SNAPSHOT_BECAUSE_SNAPSHOT_FILE_ARG_ALREADY_EXIST_EB2A6093, snapshotFile.getAbsolutePath()); return false; } @@ -197,7 +198,7 @@ public void processLoadSnapshot(File snapshotDir) throws TException, IOException File snapshotFile = new File(snapshotDir, snapshotFileName); if (!snapshotFile.exists() || !snapshotFile.isFile()) { logger.error( - "Failed to load snapshot,snapshot file [{}] is not exist.", + ManagerMessages.LOG_FAILED_LOAD_SNAPSHOT_SNAPSHOT_FILE_ARG_NOT_EXIST_8828CFBA, snapshotFile.getAbsolutePath()); return; } diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/schema/CNPhysicalPlanGenerator.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/schema/CNPhysicalPlanGenerator.java index a7354ee8c9c9c..698676f54e25f 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/schema/CNPhysicalPlanGenerator.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/schema/CNPhysicalPlanGenerator.java @@ -41,6 +41,7 @@ import org.apache.iotdb.confignode.consensus.request.write.pipe.payload.PipeCreateTableOrViewPlan; import org.apache.iotdb.confignode.consensus.request.write.template.CommitSetSchemaTemplatePlan; import org.apache.iotdb.confignode.consensus.request.write.template.CreateSchemaTemplatePlan; +import org.apache.iotdb.confignode.i18n.ManagerMessages; import org.apache.iotdb.confignode.persistence.schema.mnode.IConfigMNode; import org.apache.iotdb.confignode.persistence.schema.mnode.factory.ConfigMNodeFactory; import org.apache.iotdb.confignode.persistence.schema.mnode.impl.ConfigTableNode; @@ -110,7 +111,7 @@ public CNPhysicalPlanGenerator( final Path snapshotFilePath, final CNSnapshotFileType fileType, final String userName) throws IOException { if (fileType == CNSnapshotFileType.SCHEMA) { - logger.warn("schema_template need two files"); + logger.warn(ManagerMessages.LOG_SCHEMA_TEMPLATE_NEED_TWO_FILES_1E57542A); return; } if (fileType == CNSnapshotFileType.USER_ROLE) { @@ -297,7 +298,9 @@ private void generateUserRolePhysicalPlan(final boolean isUser) { } } catch (IOException ioException) { logger.error( - "Got IOException when deserialize use&role file, type:{}", snapshotFileType, ioException); + ManagerMessages.LOG_GOT_IOEXCEPTION_DESERIALIZE_USE_ROLE_FILE_TYPE_ARG_1B548759, + snapshotFileType, + ioException); latestException = ioException; } finally { strBufferLocal.remove(); @@ -317,7 +320,7 @@ private void generateGrantRolePhysicalPlan() { planDeque.add(plan); } } catch (IOException ioException) { - logger.error("Got IOException when deserialize roleList", ioException); + logger.error(ManagerMessages.LOG_GOT_IOEXCEPTION_DESERIALIZE_ROLELIST_1354F29E, ioException); latestException = ioException; } finally { strBufferLocal.remove(); @@ -358,7 +361,7 @@ private void generateSetTTLPlan() { size--; } } catch (final IOException | IllegalPathException e) { - logger.error("Got exception when deserializing ttl file", e); + logger.error(ManagerMessages.LOG_GOT_EXCEPTION_DESERIALIZING_TTL_FILE_F806EB40, e); latestException = e; } } @@ -496,12 +499,15 @@ private void generateDatabasePhysicalPlan() { tableSet.add(tableNode.getTable()); break; default: - logger.error("Unrecognized node type. Cannot deserialize MTree from given buffer"); + logger.error( + ManagerMessages + .LOG_UNRECOGNIZED_NODE_TYPE_CANNOT_DESERIALIZE_MTREE_GIVEN_BUFFER_5CF3121B); return; } } } catch (final IOException ioException) { - logger.error("Got IOException when construct database Tree", ioException); + logger.error( + ManagerMessages.LOG_GOT_IOEXCEPTION_CONSTRUCT_DATABASE_TREE_49436621, ioException); latestException = ioException; } } @@ -524,7 +530,8 @@ private void generateTemplatePlan() { size--; } } catch (IOException ioException) { - logger.error("Got IOException when deserialize template info", ioException); + logger.error( + ManagerMessages.LOG_GOT_IOEXCEPTION_DESERIALIZE_TEMPLATE_INFO_49EE617E, ioException); latestException = ioException; } } diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/schema/ClusterSchemaInfo.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/schema/ClusterSchemaInfo.java index 47f2264505b73..22e7100ec5805 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/schema/ClusterSchemaInfo.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/schema/ClusterSchemaInfo.java @@ -359,7 +359,7 @@ public CountDatabaseResp countMatchedDatabases(final CountDatabasePlan plan) { LOGGER.error(ERROR_NAME, e); result.setStatus( new TSStatus(TSStatusCode.DATABASE_NOT_EXIST.getStatusCode()) - .setMessage(ERROR_NAME + ": " + e.getMessage())); + .setMessage(ERROR_NAME + ConfigNodeMessages.MESSAGE_COLON_CEFF3F4D + e.getMessage())); } finally { databaseReadWriteLock.readLock().unlock(); } @@ -398,7 +398,7 @@ public DatabaseSchemaResp getMatchedDatabaseSchemas(final GetDatabasePlan plan) LOGGER.error(ERROR_NAME, e); result.setStatus( new TSStatus(TSStatusCode.DATABASE_NOT_EXIST.getStatusCode()) - .setMessage(ERROR_NAME + ": " + e.getMessage())); + .setMessage(ERROR_NAME + ConfigNodeMessages.MESSAGE_COLON_CEFF3F4D + e.getMessage())); } finally { databaseReadWriteLock.readLock().unlock(); } @@ -663,7 +663,9 @@ public long getDatabaseMaxTTL(final String database) { .orElse(Long.MAX_VALUE); } catch (final MetadataException e) { LOGGER.warn( - ERROR_NAME + " when trying to get max ttl under one database, use Long.MAX_VALUE.", e); + ERROR_NAME + + ConfigNodeMessages.LOG_TRYING_GET_MAX_TTL_UNDER_ONE_DATABASE_USE_LONG_MAX_9D70ACB2, + e); } finally { databaseReadWriteLock.readLock().unlock(); } @@ -1528,7 +1530,7 @@ public TSStatus preDeleteColumn(final PreDeleteColumnPlan plan) { plan.getTableName(), plan.getColumnName(), plan instanceof PreDeleteViewColumnPlan)) { - status.setMessage(""); + status.setMessage(ConfigNodeMessages.EMPTY_MESSAGE); } return status; } catch (final MetadataException e) { diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/schema/TreeDeviceViewFieldDetector.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/schema/TreeDeviceViewFieldDetector.java index 0b0fae36288ab..f407d4d8ecdce 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/schema/TreeDeviceViewFieldDetector.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/schema/TreeDeviceViewFieldDetector.java @@ -31,6 +31,7 @@ import org.apache.iotdb.commons.schema.table.column.TsTableColumnSchema; import org.apache.iotdb.commons.utils.StatusUtils; import org.apache.iotdb.confignode.client.async.CnToDnAsyncRequestType; +import org.apache.iotdb.confignode.i18n.ManagerMessages; import org.apache.iotdb.confignode.manager.ConfigManager; import org.apache.iotdb.confignode.procedure.impl.schema.DataNodeRegionTaskExecutor; import org.apache.iotdb.mpp.rpc.thrift.TDeviceViewReq; @@ -146,7 +147,9 @@ public TSStatus detectMissingFieldTypes() { return new TSStatus(TSStatusCode.TYPE_NOT_FOUND.getStatusCode()) .setMessage( String.format( - "Measurements not found for %s, cannot auto detect", unknownField.getKey())); + ManagerMessages + .MESSAGE_MEASUREMENTS_NOT_FOUND_ARG_CANNOT_AUTO_DETECT_980D7D44, + unknownField.getKey())); } } } diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/subscription/SubscriptionInfo.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/subscription/SubscriptionInfo.java index ee0161ba085e1..e74d5d7fd2a16 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/subscription/SubscriptionInfo.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/subscription/SubscriptionInfo.java @@ -432,8 +432,10 @@ private void validateRetentionValue(final TopicConfig topicConfig, final String if (parsedValue == 0 || parsedValue < -1) { throw new SubscriptionException( String.format( - "Failed to create or alter topic, illegal %s=%s, expected -1 or a positive long value", - key, rawValue)); + ConfigNodeMessages + .EXCEPTION_FAILED_CREATE_ALTER_TOPIC_ILLEGAL_ARG_ARG_EXPECTED_1_POSITIVE_A33070FB, + key, + rawValue)); } } catch (final NumberFormatException e) { final String exceptionMessage = @@ -816,7 +818,7 @@ public TSStatus handleConsumerGroupMetaChanges(ConsumerGroupHandleMetaChangePlan public TSStatus handleCommitProgressChanges(CommitProgressHandleMetaChangePlan plan) { acquireWriteLock(); try { - LOGGER.info("Handling commit progress meta changes ..."); + LOGGER.info(ConfigNodeMessages.LOG_HANDLING_COMMIT_PROGRESS_META_CHANGES_FA21A080); commitProgressKeeper.replaceAll(plan.getRegionProgressMap()); return new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode()); } finally { diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/CompletedProcedureRecycler.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/CompletedProcedureRecycler.java index 179563cc3b3e5..6d64895f35b18 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/CompletedProcedureRecycler.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/CompletedProcedureRecycler.java @@ -19,6 +19,7 @@ package org.apache.iotdb.confignode.procedure; +import org.apache.iotdb.confignode.i18n.ProcedureMessages; import org.apache.iotdb.confignode.procedure.store.IProcedureStore; import org.slf4j.Logger; @@ -51,7 +52,7 @@ public CompletedProcedureRecycler( protected void periodicExecute(final Env env) { if (completed.isEmpty()) { if (LOG.isTraceEnabled()) { - LOG.trace("No completed procedures to cleanup."); + LOG.trace(ProcedureMessages.LOG_NO_COMPLETED_PROCEDURES_CLEANUP_50434D91); } return; } @@ -73,7 +74,8 @@ protected void periodicExecute(final Env env) { try { store.delete(batchIds, 0, batchCount); } catch (Exception e) { - LOG.error("Error deleting completed procedures {}.", proc, e); + LOG.error( + ProcedureMessages.LOG_ERROR_DELETING_COMPLETED_PROCEDURES_ARG_1A3A185E, proc, e); // Do not remove from the completed map. Even this procedure may be restored // unexpectedly in another new CN leader, we do not need to do anything else since // procedures are idempotent. @@ -83,7 +85,7 @@ protected void periodicExecute(final Env env) { } } it.remove(); - LOG.trace("Evict completed {}", proc); + LOG.trace(ProcedureMessages.LOG_EVICT_COMPLETED_ARG_A968A070, proc); } } if (batchCount > 0) { @@ -92,7 +94,8 @@ protected void periodicExecute(final Env env) { } catch (Exception e) { // Even this procedure may be restored unexpectedly in another new CN leader, we do not need // to do anything else since procedures are idempotent. - LOG.error("Error deleting completed procedures {}.", batchIds, e); + LOG.error( + ProcedureMessages.LOG_ERROR_DELETING_COMPLETED_PROCEDURES_ARG_1A3A185E, batchIds, e); } } } diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/Procedure.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/Procedure.java index 29a241b16d09d..8c05078bcfafa 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/Procedure.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/Procedure.java @@ -679,7 +679,10 @@ protected synchronized boolean setTimeoutFailure(Env env) { long timeDiff = System.currentTimeMillis() - lastUpdate; setFailure( "ProcedureExecutor", - new ProcedureException(ProcedureMessages.OPERATION_TIMED_OUT_AFTER + timeDiff + " ms.")); + new ProcedureException( + ProcedureMessages.OPERATION_TIMED_OUT_AFTER + + timeDiff + + ProcedureMessages.EXCEPTION_MS_95BA098D)); return true; } return false; diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/ProcedureExecutor.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/ProcedureExecutor.java index 82afea3859fd4..230f22724cf0d 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/ProcedureExecutor.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/ProcedureExecutor.java @@ -413,7 +413,9 @@ private void executeProcedure(Procedure proc) { private void executeProcedure(RootProcedureStack rootProcStack, Procedure proc) { if (proc.getState() != ProcedureState.RUNNABLE) { LOG.error( - "The executing procedure should in RUNNABLE state, but it's not. Procedure is {}", proc); + ProcedureMessages + .LOG_EXECUTING_PROCEDURE_SHOULD_RUNNABLE_STATE_BUT_IT_S_NOT_PROCEDURE_7CF42CE8, + proc); return; } boolean reExecute; @@ -494,7 +496,7 @@ private void countDownChildren(RootProcedureStack rootProcStack, Procedure // do not add this procedure when exception occurred scheduler.addFront(parent); LOG.info( - "Finished subprocedure pid={}, resume processing ppid={}", + ProcedureMessages.LOG_FINISHED_SUBPROCEDURE_PID_ARG_RESUME_PROCESSING_PPID_ARG_93ED990B, proc.getProcId(), parent.getProcId()); } @@ -798,7 +800,9 @@ public void run() { } activeExecutorCount.decrementAndGet(); LOG.trace( - "Halt pid={}, activeCount={}", procedure.getProcId(), activeExecutorCount.get()); + ProcedureMessages.LOG_HALT_PID_ARG_ACTIVECOUNT_ARG_411F3EBF, + procedure.getProcId(), + activeExecutorCount.get()); this.activeProcedure.set(null); lastUpdated = System.currentTimeMillis(); startTime.set(lastUpdated); @@ -807,7 +811,7 @@ public void run() { } catch (Exception e) { if (this.activeProcedure.get() != null) { LOG.warn( - "Exception happened when worker {} execute procedure {}", + ProcedureMessages.LOG_EXCEPTION_HAPPENED_WORKER_ARG_EXECUTE_PROCEDURE_ARG_6E3AD27D, getName(), this.activeProcedure.get(), e); @@ -876,13 +880,15 @@ private int calculateRunningAndStuckWorkers() { if (worker.getCurrentRunTime() > DEFAULT_WORKER_STUCK_THRESHOLD) { stuckCount++; LOG.warn( - "Worker stuck {}({}), run time {} ms", + ProcedureMessages.LOG_WORKER_STUCK_ARG_ARG_RUN_TIME_ARG_MS_FB612354, worker, proc.getProcType(), worker.getCurrentRunTime()); } LOG.info( - "Procedure workers: {} is running, {} is running and stuck", runningCount, stuckCount); + ProcedureMessages.LOG_PROCEDURE_WORKERS_ARG_RUNNING_ARG_RUNNING_STUCK_1565936D, + runningCount, + stuckCount); } return stuckCount; } @@ -944,7 +950,8 @@ public void join() { threadGroup.destroy(); } catch (IllegalThreadStateException e) { LOG.warn( - "ProcedureExecutor threadGroup {} contains running threads which are used by non-procedure module.", + ProcedureMessages + .LOG_PROCEDUREEXECUTOR_THREADGROUP_ARG_CONTAINS_RUNNING_THREADS_WHICH_USED_NON_PROCEDURE_BD865211, this.threadGroup); this.threadGroup.list(); } @@ -975,7 +982,8 @@ public ConcurrentHashMap> getProcedures() { */ public long submitProcedure(Procedure procedure) { Preconditions.checkArgument(procedure.getState() == ProcedureState.INITIALIZING); - Preconditions.checkArgument(!procedure.hasParent(), "Unexpected parent", procedure); + Preconditions.checkArgument( + !procedure.hasParent(), ProcedureMessages.EXCEPTION_UNEXPECTED_PARENT_444B4289, procedure); // Initialize the procedure procedure.setProcId(store.getNextProcId()); procedure.setProcRunnable(); diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/RootProcedureStack.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/RootProcedureStack.java index ff19872a550b6..1fa240997f764 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/RootProcedureStack.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/RootProcedureStack.java @@ -19,6 +19,7 @@ package org.apache.iotdb.confignode.procedure; +import org.apache.iotdb.confignode.i18n.ProcedureMessages; import org.apache.iotdb.confignode.procedure.exception.ProcedureException; import org.apache.iotdb.confignode.procedure.state.ProcedureState; @@ -129,7 +130,10 @@ protected synchronized void addRollbackStep(Procedure proc) { subprocStack = new ArrayList<>(); } proc.addStackIndex(subprocStack.size()); - LOG.trace("Add procedure {} as the {}th rollback step", proc, subprocStack.size()); + LOG.trace( + ProcedureMessages.LOG_ADD_PROCEDURE_ARG_AS_ARG_TH_ROLLBACK_STEP_C71B2184, + proc, + subprocStack.size()); subprocStack.add(proc); } diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/StoppableThread.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/StoppableThread.java index 2e5bf8dd20314..448c9ff5f3cf2 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/StoppableThread.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/StoppableThread.java @@ -19,6 +19,8 @@ package org.apache.iotdb.confignode.procedure; +import org.apache.iotdb.confignode.i18n.ProcedureMessages; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -43,7 +45,7 @@ public void awaitTermination() { } } } catch (InterruptedException e) { - LOG.warn("{} join wait got interrupted", getName(), e); + LOG.warn(ProcedureMessages.LOG_ARG_JOIN_WAIT_GOT_INTERRUPTED_316B5E9F, getName(), e); Thread.currentThread().interrupt(); } } diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/env/ConfigNodeProcedureEnv.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/env/ConfigNodeProcedureEnv.java index d271d5ef33b9c..5f022eab05ba8 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/env/ConfigNodeProcedureEnv.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/env/ConfigNodeProcedureEnv.java @@ -44,6 +44,7 @@ import org.apache.iotdb.confignode.consensus.request.write.region.CreateRegionGroupsPlan; import org.apache.iotdb.confignode.exception.AddConsensusGroupException; import org.apache.iotdb.confignode.exception.AddPeerException; +import org.apache.iotdb.confignode.i18n.ProcedureMessages; import org.apache.iotdb.confignode.manager.ConfigManager; import org.apache.iotdb.confignode.manager.consensus.ConsensusManager; import org.apache.iotdb.confignode.manager.load.LoadManager; @@ -184,7 +185,7 @@ public boolean invalidateCache(final String databaseName) throws IOException, TE try { TimeUnit.MILLISECONDS.sleep(500); } catch (final InterruptedException e) { - LOG.error("Sleep failed in ConfigNodeProcedureEnv: ", e); + LOG.error(ProcedureMessages.LOG_SLEEP_FAILED_CONFIGNODEPROCEDUREENV_BCD470AC, e); Thread.currentThread().interrupt(); break; } @@ -194,7 +195,7 @@ public boolean invalidateCache(final String databaseName) throws IOException, TE if (nodeStatus == NodeStatus.Unknown) { LOG.warn( - "Invalidate cache failed, because DataNode {} is Unknown", + ProcedureMessages.LOG_INVALIDATE_CACHE_FAILED_BECAUSE_DATANODE_ARG_UNKNOWN_4F2D374C, dataNodeConfiguration.getLocation().getInternalEndPoint()); return false; } @@ -218,7 +219,8 @@ public boolean invalidateCache(final String databaseName) throws IOException, TE if (!verifySucceed(invalidatePartitionStatus, invalidateSchemaStatus)) { LOG.error( - "Invalidate cache failed, invalidate partition cache status is {}, invalidate schemaengine cache status is {}", + ProcedureMessages + .LOG_INVALIDATE_CACHE_FAILED_INVALIDATE_PARTITION_CACHE_STATUS_ARG_INVALIDATE_SCHEMAENGINE_BEB7A065, invalidatePartitionStatus, invalidateSchemaStatus); return false; @@ -285,10 +287,11 @@ public void removeConfigNodePeer(TConfigNodeLocation tConfigNodeLocation) tsStatus = new TSStatus(TSStatusCode.REMOVE_CONFIGNODE_ERROR.getStatusCode()) .setMessage( - "Remove ConfigNode failed because update ConsensusGroup peer information failed."); + ProcedureMessages + .MESSAGE_REMOVE_CONFIGNODE_FAILED_BECAUSE_UPDATE_CONSENSUSGROUP_PEER_INFORMATION_FAILED_FCE5302B); } } catch (ConsensusException e) { - LOG.warn("Failed in the write API executing the consensus layer due to: ", e); + LOG.warn(ProcedureMessages.FAILED_IN_THE_WRITE_API_EXECUTING_THE_CONSENSUS_LAYER_DUE, e); tsStatus = new TSStatus(TSStatusCode.EXECUTE_STATEMENT_ERROR.getStatusCode()); tsStatus.setMessage(e.getMessage()); } @@ -516,7 +519,7 @@ public void persistRegionGroup(CreateRegionGroupsPlan createRegionGroupsPlan) { try { getConsensusManager().write(createRegionGroupsPlan); } catch (ConsensusException e) { - LOG.warn("Failed in the write API executing the consensus layer due to: ", e); + LOG.warn(ProcedureMessages.FAILED_IN_THE_WRITE_API_EXECUTING_THE_CONSENSUS_LAYER_DUE, e); } } diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/env/RemoveDataNodeHandler.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/env/RemoveDataNodeHandler.java index 5b505ec001bff..8361f5ada2e83 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/env/RemoveDataNodeHandler.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/env/RemoveDataNodeHandler.java @@ -595,8 +595,9 @@ public TSStatus checkRegionReplication(RemoveDataNodePlan removeDataNodePlan) { status.setCode(TSStatusCode.NO_ENOUGH_DATANODE.getStatusCode()); status.setMessage( String.format( - "Can't remove datanode due to the limit of replication factor, " - + "availableDataNodeSize: %s, maxReplicaFactor: %s, max allowed removed Data Node size is: %s", + ProcedureMessages.MESSAGE_CAN_T_REMOVE_DATANODE_LIMIT_REPLICATION_FACTOR_D960E3A6 + + ProcedureMessages + .MESSAGE_AVAILABLEDATANODESIZE_ARG_MAXREPLICAFACTOR_ARG_MAX_ALLOWED_REMOVED_DATA_NODE_SIZE_FB8C382C, availableDatanodeSize, NodeInfo.getMinimumDataNode(), (availableDatanodeSize - NodeInfo.getMinimumDataNode()))); diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/StateMachineProcedure.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/StateMachineProcedure.java index c3c9167e6ef82..efa62010540e2 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/StateMachineProcedure.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/StateMachineProcedure.java @@ -19,6 +19,7 @@ package org.apache.iotdb.confignode.procedure.impl; +import org.apache.iotdb.confignode.i18n.ProcedureMessages; import org.apache.iotdb.confignode.procedure.Procedure; import org.apache.iotdb.confignode.procedure.exception.ProcedureException; @@ -156,7 +157,7 @@ protected Procedure[] execute(final Env env) throws InterruptedException { addNextStateAndCalculateCycles(); } - LOG.trace("{}", this); + LOG.trace(ProcedureMessages.LOG_ARG_8393DD4A, this); stateFlow = executeFromState(env, state); if (!isFailed()) { addNextStateAndCalculateCycles(); @@ -179,7 +180,8 @@ private void addNextStateAndCalculateCycles() { if (Flow.HAS_MORE_STATE == stateFlow) { if (nextState == NO_NEXT_STATE) { LOG.error( - "StateMachineProcedure pid={} not set next state, but return HAS_MORE_STATE. It is likely that there is some problem with the code. Please check the code. This procedure is about to be terminated: {}", + ProcedureMessages + .LOG_STATEMACHINEPROCEDURE_PID_ARG_NOT_SET_NEXT_STATE_BUT_RETURN_HAS_7F93E63F, getProcId(), this); stateFlow = Flow.NO_MORE_STATE; @@ -190,7 +192,8 @@ private void addNextStateAndCalculateCycles() { if (Flow.NO_MORE_STATE == stateFlow) { if (nextState != NO_NEXT_STATE) { LOG.warn( - "StateMachineProcedure pid={} set next state to {}, but return NO_MORE_STATE", + ProcedureMessages + .LOG_STATEMACHINEPROCEDURE_PID_ARG_SET_NEXT_STATE_ARG_BUT_RETURN_NO_0CA2D56C, getProcId(), nextState); } diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/cq/CreateCQProcedure.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/cq/CreateCQProcedure.java index 490f723d2e6b0..f7897f8ebea85 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/cq/CreateCQProcedure.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/cq/CreateCQProcedure.java @@ -181,7 +181,8 @@ void recoverScheduledTask(ConfigNodeProcedureEnv env) throws ConsensusException Optional cqEntry = getCurrentCQEntry(env); if (!cqEntry.isPresent()) { LOGGER.info( - "Skip recovering the schedule task of CQ {} because its metadata is unavailable.", + ProcedureMessages + .LOG_SKIP_RECOVERING_SCHEDULE_TASK_CQ_ARG_BECAUSE_ITS_METADATA_UNAVAILABLE_00286802, req.cqId); return; } diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/node/AbstractNodeProcedure.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/node/AbstractNodeProcedure.java index b141027917366..4807a7e60b17c 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/node/AbstractNodeProcedure.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/node/AbstractNodeProcedure.java @@ -19,6 +19,7 @@ package org.apache.iotdb.confignode.procedure.impl.node; +import org.apache.iotdb.confignode.i18n.ProcedureMessages; import org.apache.iotdb.confignode.procedure.env.ConfigNodeProcedureEnv; import org.apache.iotdb.confignode.procedure.impl.StateMachineProcedure; import org.apache.iotdb.confignode.procedure.state.ProcedureLockState; @@ -44,11 +45,12 @@ protected ProcedureLockState acquireLock(ConfigNodeProcedureEnv configNodeProced configNodeProcedureEnv.getSchedulerLock().lock(); try { if (configNodeProcedureEnv.getNodeLock().tryLock(this)) { - LOG.info("procedureId {} acquire lock.", getProcId()); + LOG.info(ProcedureMessages.LOG_PROCEDUREID_ARG_ACQUIRE_LOCK_3FBF9987, getProcId()); return ProcedureLockState.LOCK_ACQUIRED; } LOG.info( - "procedureId {} acquire lock failed, will wait for lock after finishing execution.", + ProcedureMessages + .LOG_PROCEDUREID_ARG_ACQUIRE_LOCK_FAILED_WILL_WAIT_LOCK_AFTER_FINISHING_3B27278E, getProcId()); return ProcedureLockState.LOCK_EVENT_WAIT; } finally { @@ -60,7 +62,7 @@ protected ProcedureLockState acquireLock(ConfigNodeProcedureEnv configNodeProced protected void releaseLock(ConfigNodeProcedureEnv configNodeProcedureEnv) { configNodeProcedureEnv.getSchedulerLock().lock(); try { - LOG.info("procedureId {} release lock.", getProcId()); + LOG.info(ProcedureMessages.LOG_PROCEDUREID_ARG_RELEASE_LOCK_FF860D6B, getProcId()); if (configNodeProcedureEnv.getNodeLock().releaseLock(this)) { configNodeProcedureEnv .getNodeLock() diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/node/AddConfigNodeProcedure.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/node/AddConfigNodeProcedure.java index b737bdba02cab..a3a5ffb41de4e 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/node/AddConfigNodeProcedure.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/node/AddConfigNodeProcedure.java @@ -94,7 +94,7 @@ protected Flow executeFromState(ConfigNodeProcedureEnv env, AddConfigNodeState s setFailure(new ProcedureException(ProcedureMessages.ADD_CONFIGNODE_FAILED + state)); } else { LOG.error( - "Retrievable error trying to add config node {}, state {}", + ProcedureMessages.LOG_RETRIEVABLE_ERROR_TRYING_ADD_CONFIG_NODE_ARG_STATE_ARG_D7285810, tConfigNodeLocation, state, e); diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/node/RemoveConfigNodeProcedure.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/node/RemoveConfigNodeProcedure.java index d5d0fc41a4ba8..bbd408fac8b6e 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/node/RemoveConfigNodeProcedure.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/node/RemoveConfigNodeProcedure.java @@ -78,10 +78,14 @@ protected Flow executeFromState(ConfigNodeProcedureEnv env, RemoveConfigNodeStat if (isRollbackSupported(state)) { setFailure( new ProcedureException( - ProcedureMessages.REMOVE_CONFIG_NODE + removedConfigNode + " failed " + state)); + ProcedureMessages.REMOVE_CONFIG_NODE + + removedConfigNode + + ProcedureMessages.EXCEPTION_FAILED_DAA6EA2F + + state)); } else { LOG.error( - "Retrievable error trying to remove config node {}, state {}", + ProcedureMessages + .LOG_RETRIEVABLE_ERROR_TRYING_REMOVE_CONFIG_NODE_ARG_STATE_ARG_3754EBA1, removedConfigNode, state, e); diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/node/RemoveDataNodesProcedure.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/node/RemoveDataNodesProcedure.java index e1dc73aa54028..400d8f8facd66 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/node/RemoveDataNodesProcedure.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/node/RemoveDataNodesProcedure.java @@ -77,7 +77,8 @@ protected ProcedureLockState acquireLock(ConfigNodeProcedureEnv configNodeProced configNodeProcedureEnv.getSchedulerLock().lock(); try { LOG.info( - "procedureId {}-RemoveDataNodes skips acquiring lock, since upper layer ensures the serial execution.", + ProcedureMessages + .LOG_PROCEDUREID_ARG_REMOVEDATANODES_SKIPS_ACQUIRING_LOCK_SINCE_UPPER_LAYER_ENSURES_C7546FF8, getProcId()); return ProcedureLockState.LOCK_ACQUIRED; } finally { @@ -90,7 +91,8 @@ protected void releaseLock(ConfigNodeProcedureEnv configNodeProcedureEnv) { configNodeProcedureEnv.getSchedulerLock().lock(); try { LOG.info( - "procedureId {}-RemoveDataNodes skips releasing lock, since it hasn't acquire any lock.", + ProcedureMessages + .LOG_PROCEDUREID_ARG_REMOVEDATANODES_SKIPS_RELEASING_LOCK_SINCE_IT_HASN_T_AED8A3DA, getProcId()); } finally { configNodeProcedureEnv.getSchedulerLock().unlock(); @@ -111,8 +113,9 @@ protected Flow executeFromState(ConfigNodeProcedureEnv env, RemoveDataNodeState setNextState(RemoveDataNodeState.REMOVE_DATA_NODE_PREPARE); } else { LOG.error( - "{}, Can not remove DataNode {} " - + "because the number of DataNodes is less or equal than region replica number", + ProcedureMessages.LOG_ARG_CAN_NOT_REMOVE_DATANODE_ARG_495F9F85 + + ProcedureMessages + .LOG_BECAUSE_NUMBER_DATANODES_LESS_EQUAL_THAN_REGION_REPLICA_NUMBER_DEC0CB38, REMOVE_DATANODE_PROCESS, removedDataNodes); return Flow.NO_MORE_STATE; @@ -125,7 +128,7 @@ protected Flow executeFromState(ConfigNodeProcedureEnv env, RemoveDataNodeState regionMigrationPlans = removeDataNodeHandler.selectedRegionMigrationPlans(removedDataNodes); LOG.info( - "{}, DataNode regions to be removed is {}", + ProcedureMessages.LOG_ARG_DATANODE_REGIONS_REMOVED_ARG_216A7DC7, REMOVE_DATANODE_PROCESS, regionMigrationPlans); setNextState(RemoveDataNodeState.BROADCAST_DISABLE_DATA_NODE); @@ -150,7 +153,7 @@ protected Flow executeFromState(ConfigNodeProcedureEnv env, RemoveDataNodeState setFailure(new ProcedureException(ProcedureMessages.REMOVE_DATA_NODE_FAILED + state)); } else { LOG.error( - "Retrievable error trying to remove data node {}, state {}", + ProcedureMessages.LOG_RETRIEVABLE_ERROR_TRYING_REMOVE_DATA_NODE_ARG_STATE_ARG_4EFEB850, removedDataNodes, state, e); @@ -185,7 +188,8 @@ private void submitChildRegionMigrate(ConfigNodeProcedureEnv env) { coordinatorForRemovePeer); addChildProcedure(regionMigrateProcedure); LOG.info( - "Submit RegionMigrateProcedure for regionId {}: removedDataNode={}, destDataNode={}, coordinatorForAddPeer={}, coordinatorForRemovePeer={}", + ProcedureMessages + .LOG_SUBMIT_REGIONMIGRATEPROCEDURE_REGIONID_ARG_REMOVEDDATANODE_ARG_DESTDATANODE_ARG_COORDINATORFORADDPEER_ARG_, regionId, simplifyTDataNodeLocation(removedDataNode), simplifyTDataNodeLocation(destDataNode), @@ -193,7 +197,7 @@ private void submitChildRegionMigrate(ConfigNodeProcedureEnv env) { simplifyTDataNodeLocation(coordinatorForRemovePeer)); } else { LOG.error( - "{}, Cannot find target DataNode to migrate the region: {}", + ProcedureMessages.LOG_ARG_CANNOT_FIND_TARGET_DATANODE_MIGRATE_REGION_ARG_81A78E06, REMOVE_DATANODE_PROCESS, regionId); // TODO terminate all the uncompleted remove datanode process @@ -223,8 +227,10 @@ private void checkRegionStatusAndStopDataNode(ConfigNodeProcedureEnv env) { .collect(Collectors.toList()); if (!migratedFailedRegions.isEmpty()) { LOG.warn( - "{}, Some regions are migrated failed in DataNode: {}, migratedFailedRegions: {}." - + "Regions that have been successfully migrated will not roll back, you can submit the RemoveDataNodes task again later.", + ProcedureMessages + .LOG_ARG_SOME_REGIONS_MIGRATED_FAILED_DATANODE_ARG_MIGRATEDFAILEDREGIONS_ARG_11644841 + + ProcedureMessages + .LOG_REGIONS_HAVE_BEEN_SUCCESSFULLY_MIGRATED_WILL_NOT_ROLL_BACK_YOU_AE904563, REMOVE_DATANODE_PROCESS, dataNode, migratedFailedRegions); @@ -235,7 +241,8 @@ private void checkRegionStatusAndStopDataNode(ConfigNodeProcedureEnv env) { } if (!successDataNodes.isEmpty()) { LOG.info( - "{}, DataNodes: {} all regions migrated successfully, start to stop them.", + ProcedureMessages + .LOG_ARG_DATANODES_ARG_ALL_REGIONS_MIGRATED_SUCCESSFULLY_START_STOP_THEM_32D56F28, REMOVE_DATANODE_PROCESS, successDataNodes); env.getRemoveDataNodeHandler().removeDataNodePersistence(successDataNodes); @@ -243,13 +250,13 @@ private void checkRegionStatusAndStopDataNode(ConfigNodeProcedureEnv env) { } if (!rollBackDataNodes.isEmpty()) { LOG.info( - "{}, Start to roll back the DataNodes status: {}", + ProcedureMessages.LOG_ARG_START_ROLL_BACK_DATANODES_STATUS_ARG_05C67270, REMOVE_DATANODE_PROCESS, rollBackDataNodes); env.getRemoveDataNodeHandler().changeDataNodeStatus(rollBackDataNodes, nodeStatusMap); env.getRemoveDataNodeHandler().broadcastDataNodeStatusChange(rollBackDataNodes); LOG.info( - "{}, Roll back the DataNodes status successfully: {}", + ProcedureMessages.LOG_ARG_ROLL_BACK_DATANODES_STATUS_SUCCESSFULLY_ARG_6773A2DF, REMOVE_DATANODE_PROCESS, rollBackDataNodes); } diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/partition/DataPartitionTableIntegrityCheckProcedure.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/partition/DataPartitionTableIntegrityCheckProcedure.java index cc738669e4149..c1a7650ba1985 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/partition/DataPartitionTableIntegrityCheckProcedure.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/partition/DataPartitionTableIntegrityCheckProcedure.java @@ -244,7 +244,8 @@ private Flow collectEarliestTimeslots() { if (allDataNodes.isEmpty()) { LOG.error( - "[DataPartitionIntegrity] No DataNodes registered, no way to collect earliest timeslots, waiting for them to go up"); + ProcedureMessages + .LOG_DATAPARTITIONINTEGRITY_NO_DATANODES_REGISTERED_NO_WAY_COLLECT_EARLIEST_TIMESLOTS_WAITING_7025EB23); sleep( CHECK_ALL_DATANODE_IS_ALIVE_INTERVAL, "[DataPartitionIntegrity] Error waiting for DataNode startup due to thread interruption."); @@ -274,7 +275,8 @@ private Flow collectEarliestTimeslots() { if (response instanceof TSStatus) { failedDataNodes.add(dataNode); LOG.error( - "[DataPartitionIntegrity] Failed to collected earliest timeslots from the DataNode[id={}], already out of max retry time", + ProcedureMessages + .LOG_DATAPARTITIONINTEGRITY_FAILED_COLLECTED_EARLIEST_TIMESLOTS_DATANODE_ID_ARG_ALREADY_OUT_834B62B9, dataNode.getLocation().getDataNodeId()); continue; } @@ -283,7 +285,8 @@ private Flow collectEarliestTimeslots() { if (resp.getStatus().getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()) { failedDataNodes.add(dataNode); LOG.error( - "[DataPartitionIntegrity] Failed to collected earliest timeslots from the DataNode[id={}], response status is {}", + ProcedureMessages + .LOG_DATAPARTITIONINTEGRITY_FAILED_COLLECTED_EARLIEST_TIMESLOTS_DATANODE_ID_ARG_RESPONSE_STATUS_B0A31EC4, dataNode.getLocation().getDataNodeId(), resp.getStatus()); continue; @@ -298,13 +301,14 @@ private Flow collectEarliestTimeslots() { if (LOG.isDebugEnabled()) { LOG.debug( - "Collected earliest timeslots from the DataNode[id={}]: {}", + ProcedureMessages.LOG_COLLECTED_EARLIEST_TIMESLOTS_DATANODE_ID_ARG_ARG_5CDF2BA6, dataNode.getLocation().getDataNodeId(), nodeTimeslots); } } catch (Exception e) { LOG.error( - "[DataPartitionIntegrity] Failed to collect earliest timeslots from the DataNode[id={}]: {}", + ProcedureMessages + .LOG_DATAPARTITIONINTEGRITY_FAILED_COLLECT_EARLIEST_TIMESLOTS_DATANODE_ID_ARG_ARG_A211840A, dataNode.getLocation().getDataNodeId(), e.getMessage(), e); @@ -314,7 +318,8 @@ private Flow collectEarliestTimeslots() { if (LOG.isDebugEnabled()) { LOG.debug( - "Collected earliest timeslots from {} DataNodes: {}, the number of successful DataNodes is {}", + ProcedureMessages + .LOG_COLLECTED_EARLIEST_TIMESLOTS_ARG_DATANODES_ARG_NUMBER_SUCCESSFUL_DATANODES_ARG_1CC129EF, allDataNodes.size(), earliestTimeslots, allDataNodes.size() - failedDataNodes.size()); @@ -340,7 +345,8 @@ private Flow analyzeMissingPartitions(final ConfigNodeProcedureEnv env) { if (earliestTimeslots.isEmpty()) { LOG.warn( - "[DataPartitionIntegrity] No missing data partitions detected, nothing needs to be repaired, terminating procedure"); + ProcedureMessages + .LOG_DATAPARTITIONINTEGRITY_NO_MISSING_DATA_PARTITIONS_DETECTED_NOTHING_NEEDS_REPAIRED_TERMINATING_72F2635F); return Flow.NO_MORE_STATE; } @@ -360,7 +366,8 @@ private Flow analyzeMissingPartitions(final ConfigNodeProcedureEnv env) { || localDataPartitionTable.get(database).isEmpty()) { databasesWithLostDataPartition.add(database); LOG.warn( - "[DataPartitionIntegrity] No data partition table related to database {} was found from the ConfigNode, and this issue needs to be repaired", + ProcedureMessages + .LOG_DATAPARTITIONINTEGRITY_NO_DATA_PARTITION_TABLE_RELATED_DATABASE_ARG_WAS_FOUND_B5B90613, database); continue; } @@ -390,7 +397,8 @@ private Flow analyzeMissingPartitions(final ConfigNodeProcedureEnv env) { > TimePartitionUtils.getStartTimeByPartitionId(earliestTimeslot)) { databasesWithLostDataPartition.add(database); LOG.warn( - "[DataPartitionIntegrity] Database {} has lost timeslot {} in its data table partition, and this issue needs to be repaired", + ProcedureMessages + .LOG_DATAPARTITIONINTEGRITY_DATABASE_ARG_HAS_LOST_TIMESLOT_ARG_ITS_DATA_TABLE_499AF395, database, earliestTimeslot); } @@ -398,12 +406,14 @@ private Flow analyzeMissingPartitions(final ConfigNodeProcedureEnv env) { if (databasesWithLostDataPartition.isEmpty()) { LOG.info( - "[DataPartitionIntegrity] No databases have lost data partitions, terminating procedure"); + ProcedureMessages + .LOG_DATAPARTITIONINTEGRITY_NO_DATABASES_HAVE_LOST_DATA_PARTITIONS_TERMINATING_PROCEDURE_3E718CC3); return Flow.NO_MORE_STATE; } LOG.info( - "[DataPartitionIntegrity] Identified {} databases have lost data partitions, will request DataPartitionTable generation from {} DataNodes", + ProcedureMessages + .LOG_DATAPARTITIONINTEGRITY_IDENTIFIED_ARG_DATABASES_HAVE_LOST_DATA_PARTITIONS_WILL_REQUEST_6DEA7502, databasesWithLostDataPartition.size(), allDataNodes.size() - failedDataNodes.size()); setNextState(DataPartitionTableIntegrityCheckProcedureState.REQUEST_PARTITION_TABLES); @@ -441,12 +451,14 @@ private Flow analyzeMissingPartitions(final ConfigNodeProcedureEnv env) { private Flow requestPartitionTables() { if (LOG.isDebugEnabled()) { LOG.debug( - "Requesting DataPartitionTable generation from {} DataNodes...", allDataNodes.size()); + ProcedureMessages.LOG_REQUESTING_DATAPARTITIONTABLE_GENERATION_ARG_DATANODES_559F97E8, + allDataNodes.size()); } if (allDataNodes.isEmpty()) { LOG.error( - "[DataPartitionIntegrity] No DataNodes registered, no way to requested DataPartitionTable generation, terminating procedure"); + ProcedureMessages + .LOG_DATAPARTITIONINTEGRITY_NO_DATANODES_REGISTERED_NO_WAY_REQUESTED_DATAPARTITIONTABLE_GENERATION_TERMINATING_); sleep( CHECK_ALL_DATANODE_IS_ALIVE_INTERVAL, "[DataPartitionIntegrity] Error waiting for DataNode startup due to thread interruption."); @@ -480,7 +492,8 @@ private Flow requestPartitionTables() { if (response instanceof TSStatus) { failedDataNodes.add(dataNode); LOG.error( - "[DataPartitionIntegrity] Failed to request DataPartitionTable generation from the DataNode[id={}], already out of max retry time", + ProcedureMessages + .LOG_DATAPARTITIONINTEGRITY_FAILED_REQUEST_DATAPARTITIONTABLE_GENERATION_DATANODE_ID_ARG_ALREADY_OUT_6B0C9351, dataNode.getLocation().getDataNodeId()); continue; } @@ -489,14 +502,16 @@ private Flow requestPartitionTables() { if (resp.getStatus().getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()) { failedDataNodes.add(dataNode); LOG.error( - "[DataPartitionIntegrity] Failed to request DataPartitionTable generation from the DataNode[id={}], response status is {}", + ProcedureMessages + .LOG_DATAPARTITIONINTEGRITY_FAILED_REQUEST_DATAPARTITIONTABLE_GENERATION_DATANODE_ID_ARG_RESPONSE_STATUS_93012D, dataNode.getLocation().getDataNodeId(), resp.getStatus()); } } catch (Exception e) { failedDataNodes.add(dataNode); LOG.error( - "[DataPartitionIntegrity] Failed to request DataPartitionTable generation from DataNode[id={}]: {}", + ProcedureMessages + .LOG_DATAPARTITIONINTEGRITY_FAILED_REQUEST_DATAPARTITIONTABLE_GENERATION_DATANODE_ID_ARG_ARG_818B47B8, dataNodeId, e.getMessage(), e); @@ -545,7 +560,8 @@ private Flow requestPartitionTablesHeartBeat() { if (response instanceof TSStatus) { failedDataNodes.add(dataNode); LOG.error( - "[DataPartitionIntegrity] Failed to request DataPartitionTable generation heart beat from the DataNode[id={}], already out of max retry time", + ProcedureMessages + .LOG_DATAPARTITIONINTEGRITY_FAILED_REQUEST_DATAPARTITIONTABLE_GENERATION_HEART_BEAT_DATANODE_ID_ARG_2AB63F12, dataNode.getLocation().getDataNodeId()); continue; } @@ -557,7 +573,8 @@ private Flow requestPartitionTablesHeartBeat() { if (resp.getStatus().getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()) { LOG.error( - "[DataPartitionIntegrity] Failed to request DataPartitionTable generation heart beat from the DataNode[id={}], state is {}, response status is {}", + ProcedureMessages + .LOG_DATAPARTITIONINTEGRITY_FAILED_REQUEST_DATAPARTITIONTABLE_GENERATION_HEART_BEAT_DATANODE_ID_ARG_DC1702EF, dataNode.getLocation().getDataNodeId(), state, resp.getStatus()); @@ -571,26 +588,30 @@ private Flow requestPartitionTablesHeartBeat() { deserializeDatabaseScopedTableList(byteBufferList); dataPartitionTables.put(dataNodeId, databaseScopedDataPartitionTableList); LOG.info( - "[DataPartitionIntegrity] DataNode {} completed DataPartitionTable generation, terminating heart beat", + ProcedureMessages + .LOG_DATAPARTITIONINTEGRITY_DATANODE_ARG_COMPLETED_DATAPARTITIONTABLE_GENERATION_TERMINATING_HEART_BEAT_59DAAD5, dataNodeId); completeCount++; break; case IN_PROGRESS: LOG.info( - "[DataPartitionIntegrity] DataNode {} still generating DataPartitionTable", + ProcedureMessages + .LOG_DATAPARTITIONINTEGRITY_DATANODE_ARG_STILL_GENERATING_DATAPARTITIONTABLE_63F84C78, dataNodeId); break; default: failedDataNodes.add(dataNode); LOG.error( - "[DataPartitionIntegrity] DataNode {} returned unknown error code: {}", + ProcedureMessages + .LOG_DATAPARTITIONINTEGRITY_DATANODE_ARG_RETURNED_UNKNOWN_ERROR_CODE_ARG_2DA6A21E, dataNodeId, resp.getErrorCode()); break; } } catch (Exception e) { LOG.error( - "[DataPartitionIntegrity] Error checking DataPartitionTable status from DataNode {}: {}, terminating heart beat", + ProcedureMessages + .LOG_DATAPARTITIONINTEGRITY_ERROR_CHECKING_DATAPARTITIONTABLE_STATUS_DATANODE_ARG_ARG_TERMINATING_HEART_D6EDA91, dataNodeId, e.getMessage(), e); @@ -640,7 +661,8 @@ private Flow mergePartitionTables(final ConfigNodeProcedureEnv env) { if (dataPartitionTables.isEmpty()) { LOG.error( - "[DataPartitionIntegrity] No DataPartitionTables to merge, dataPartitionTables is empty"); + ProcedureMessages + .LOG_DATAPARTITIONINTEGRITY_NO_DATAPARTITIONTABLES_MERGE_DATAPARTITIONTABLES_EMPTY_920E3DE6); delayRollbackNextState( DataPartitionTableIntegrityCheckProcedureState.COLLECT_EARLIEST_TIMESLOTS); return Flow.HAS_MORE_STATE; @@ -659,7 +681,8 @@ private Flow mergePartitionTables(final ConfigNodeProcedureEnv env) { || localDataPartitionTableMap.get(database) == null || localDataPartitionTableMap.get(database).isEmpty()) { LOG.warn( - "[DataPartitionIntegrity] No data partition table related to database {} was found from the ConfigNode, use data partition table of DataNode directly", + ProcedureMessages + .LOG_DATAPARTITIONINTEGRITY_NO_DATA_PARTITION_TABLE_RELATED_DATABASE_ARG_WAS_FOUND_D1698512, database); continue; } @@ -738,7 +761,8 @@ private Flow writePartitionTableToConsensus(final ConfigNodeProcedureEnv env) { if (tsStatus.getCode() == TSStatusCode.SUCCESS_STATUS.getStatusCode()) { LOG.info( - "[DataPartitionIntegrity] DataPartitionTable successfully written to consensus log"); + ProcedureMessages + .LOG_DATAPARTITIONINTEGRITY_DATAPARTITIONTABLE_SUCCESSFULLY_WRITTEN_CONSENSUS_LOG_2B1634A6); break; } else { LOG.error( @@ -827,7 +851,8 @@ public void serialize(final DataOutputStream stream) throws IOException { stream.write(buf, 0, size); } catch (IOException | TException e) { LOG.error( - "[DataPartitionIntegrity] {} serialize failed for dataNodeId: {}", + ProcedureMessages + .LOG_DATAPARTITIONINTEGRITY_ARG_SERIALIZE_FAILED_DATANODEID_ARG_967B51AA, this.getClass().getSimpleName(), entry.getKey(), e); @@ -860,7 +885,8 @@ public void serialize(final DataOutputStream stream) throws IOException { stream.write(buf, 0, size); } catch (IOException | TException e) { LOG.error( - "[DataPartitionIntegrity] {} serialize finalDataPartitionTables failed", + ProcedureMessages + .LOG_DATAPARTITIONINTEGRITY_ARG_SERIALIZE_FINALDATAPARTITIONTABLES_FAILED_7E44DCD8, this.getClass().getSimpleName(), e); throw new IOException(ProcedureMessages.FAILED_TO_SERIALIZE_FINALDATAPARTITIONTABLES, e); @@ -946,7 +972,8 @@ public void deserialize(final ByteBuffer byteBuffer) { } catch (IOException | TException e) { LOG.error( - "[DataPartitionIntegrity] {} deserialize failed for dataNodeId: {}", + ProcedureMessages + .LOG_DATAPARTITIONINTEGRITY_ARG_DESERIALIZE_FAILED_DATANODEID_ARG_22388A60, this.getClass().getSimpleName(), dataNodeId, e); @@ -988,7 +1015,8 @@ public void deserialize(final ByteBuffer byteBuffer) { } catch (IOException | TException e) { LOG.error( - "[DataPartitionIntegrity] {} deserialize finalDataPartitionTables failed", + ProcedureMessages + .LOG_DATAPARTITIONINTEGRITY_ARG_DESERIALIZE_FINALDATAPARTITIONTABLES_FAILED_7E23E4BD, this.getClass().getSimpleName(), e); throw new RuntimeException( @@ -1058,7 +1086,9 @@ private List deserializeDatabaseScopedTableLis result.add(table); } catch (Exception e) { LOG.error( - "[DataPartitionIntegrity] Failed to deserialize DatabaseScopedDataPartitionTable", e); + ProcedureMessages + .LOG_DATAPARTITIONINTEGRITY_FAILED_DESERIALIZE_DATABASESCOPEDDATAPARTITIONTABLE_3B6933B5, + e); } } diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/region/AddRegionPeerProcedure.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/region/AddRegionPeerProcedure.java index d09647a332f5b..9dfeae681d49b 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/region/AddRegionPeerProcedure.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/region/AddRegionPeerProcedure.java @@ -189,8 +189,10 @@ private Flow warnAndRollBackAndNoMoreState( if (correctDataNodeLocations.remove(targetDataNode)) { LOGGER.warn( ProcedureMessages.PID_ADDREGION_IT_APPEARS_THAT_CONSENSUS_WRITE_HAS_NOT_MODIFIED - + "Please verify whether a leader change has occurred during this stage. " - + "If this log is triggered without a leader change, it indicates a potential bug in the partition table.", + + ProcedureMessages + .LOG_PLEASE_VERIFY_WHETHER_LEADER_CHANGE_HAS_OCCURRED_DURING_STAGE_9FE68EE3 + + ProcedureMessages + .LOG_IF_LOG_TRIGGERED_WITHOUT_LEADER_CHANGE_IT_INDICATES_POTENTIAL_BUG_32AE71FD, getProcId()); } String correctStr = diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/schema/DeleteDatabaseProcedure.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/schema/DeleteDatabaseProcedure.java index 0b3eca82dceb4..271381841ed45 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/schema/DeleteDatabaseProcedure.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/schema/DeleteDatabaseProcedure.java @@ -92,14 +92,15 @@ protected Flow executeFromState(final ConfigNodeProcedureEnv env, final DeleteDa switch (state) { case PRE_DELETE_DATABASE: LOG.info( - "[DeleteDatabaseProcedure] Pre delete database: {}", deleteDatabaseSchema.getName()); + ProcedureMessages.LOG_DELETEDATABASEPROCEDURE_PRE_DELETE_DATABASE_ARG_6A1FEACC, + deleteDatabaseSchema.getName()); env.preDeleteDatabase( PreDeleteDatabasePlan.PreDeleteType.EXECUTE, deleteDatabaseSchema.getName()); setNextState(DeleteDatabaseState.INVALIDATE_CACHE); break; case INVALIDATE_CACHE: LOG.info( - "[DeleteDatabaseProcedure] Invalidate cache of database: {}", + ProcedureMessages.LOG_DELETEDATABASEPROCEDURE_INVALIDATE_CACHE_DATABASE_ARG_299FC9BC, deleteDatabaseSchema.getName()); if (env.invalidateCache(deleteDatabaseSchema.getName())) { setNextState(DeleteDatabaseState.DELETE_DATABASE_SCHEMA); @@ -111,7 +112,7 @@ protected Flow executeFromState(final ConfigNodeProcedureEnv env, final DeleteDa break; case DELETE_DATABASE_SCHEMA: LOG.info( - "[DeleteDatabaseProcedure] Delete DatabaseSchema: {}", + ProcedureMessages.LOG_DELETEDATABASEPROCEDURE_DELETE_DATABASESCHEMA_ARG_A49A47AC, deleteDatabaseSchema.getName()); // Submit RegionDeleteTasks @@ -171,13 +172,15 @@ protected Flow executeFromState(final ConfigNodeProcedureEnv env, final DeleteDa asyncClientHandler.getResponseMap().entrySet()) { if (entry.getValue().getCode() == TSStatusCode.SUCCESS_STATUS.getStatusCode()) { LOG.info( - "[DeleteDatabaseProcedure] Successfully delete SchemaRegion[{}] on {}", + ProcedureMessages + .LOG_DELETEDATABASEPROCEDURE_SUCCESSFULLY_DELETE_SCHEMAREGION_ARG_ARG_BA0535DA, asyncClientHandler.getRequest(entry.getKey()), schemaRegionDeleteTaskMap.get(entry.getKey()).getTargetDataNode()); schemaRegionDeleteTaskMap.remove(entry.getKey()); } else { LOG.warn( - "[DeleteDatabaseProcedure] Failed to delete SchemaRegion[{}] on {}. Submit to async deletion.", + ProcedureMessages + .LOG_DELETEDATABASEPROCEDURE_FAILED_DELETE_SCHEMAREGION_ARG_ARG_SUBMIT_ASYNC_DELETION_8C3E6DE3, asyncClientHandler.getRequest(entry.getKey()), schemaRegionDeleteTaskMap.get(entry.getKey()).getTargetDataNode()); } @@ -198,7 +201,8 @@ protected Flow executeFromState(final ConfigNodeProcedureEnv env, final DeleteDa .getLoadManager() .clearDataPartitionPolicyTable(deleteDatabaseSchema.getName()); LOG.info( - "[DeleteDatabaseProcedure] The data partition policy table of database: {} is cleared.", + ProcedureMessages + .LOG_DELETEDATABASEPROCEDURE_DATA_PARTITION_POLICY_TABLE_DATABASE_ARG_CLEARED_7A32E28A, deleteDatabaseSchema.getName()); // Delete Database metrics @@ -211,7 +215,8 @@ protected Flow executeFromState(final ConfigNodeProcedureEnv env, final DeleteDa if (deleteConfigResult.getCode() == TSStatusCode.SUCCESS_STATUS.getStatusCode()) { LOG.info( - "[DeleteDatabaseProcedure] Database: {} is deleted successfully", + ProcedureMessages + .LOG_DELETEDATABASEPROCEDURE_DATABASE_ARG_DELETED_SUCCESSFULLY_3A4E9202, deleteDatabaseSchema.getName()); return Flow.NO_MORE_STATE; } else if (getCycles() > RETRY_THRESHOLD) { @@ -226,11 +231,12 @@ protected Flow executeFromState(final ConfigNodeProcedureEnv env, final DeleteDa new ProcedureException( ProcedureMessages.DELETEDATABASEPROCEDURE_DELETE_DATABASE + deleteDatabaseSchema.getName() - + " failed " + + ProcedureMessages.EXCEPTION_FAILED_DAA6EA2F + state)); } else { LOG.error( - "[DeleteDatabaseProcedure] Retriable error trying to delete database {}, state {}", + ProcedureMessages + .LOG_DELETEDATABASEPROCEDURE_RETRIABLE_ERROR_TRYING_DELETE_DATABASE_ARG_STATE_ARG_8167D246, deleteDatabaseSchema.getName(), state, e); @@ -251,7 +257,8 @@ protected void rollbackState(final ConfigNodeProcedureEnv env, final DeleteDatab case PRE_DELETE_DATABASE: case INVALIDATE_CACHE: LOG.info( - "[DeleteDatabaseProcedure] Rollback to preDeleted: {}", deleteDatabaseSchema.getName()); + ProcedureMessages.LOG_DELETEDATABASEPROCEDURE_ROLLBACK_PREDELETED_ARG_638F53DA, + deleteDatabaseSchema.getName()); env.preDeleteDatabase( PreDeleteDatabasePlan.PreDeleteType.ROLLBACK, deleteDatabaseSchema.getName()); break; diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/schema/SchemaUtils.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/schema/SchemaUtils.java index 4b8d0a533afe3..f7509e3f9a314 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/schema/SchemaUtils.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/schema/SchemaUtils.java @@ -323,7 +323,7 @@ public static TSStatus executeInConsensusLayer( try { status = env.getConfigManager().getConsensusManager().write(plan); } catch (final ConsensusException e) { - logger.warn("Failed in the write API executing the consensus layer due to: ", e); + logger.warn(ProcedureMessages.FAILED_IN_THE_WRITE_API_EXECUTING_THE_CONSENSUS_LAYER_DUE, e); status = new TSStatus(TSStatusCode.EXECUTE_STATEMENT_ERROR.getStatusCode()); status.setMessage(e.getMessage()); } diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/schema/SetTTLProcedure.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/schema/SetTTLProcedure.java index dca79a02366f6..9ecd4c35b2809 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/schema/SetTTLProcedure.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/schema/SetTTLProcedure.java @@ -212,9 +212,9 @@ private void restoreTTLOnConfigNode( if (status.getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()) { throw new ProcedureException( new MetadataException( - "Rollback ConfigNode ttl failed for " - + String.join(".", pathPattern) - + ": " + ProcedureMessages.EXCEPTION_ROLLBACK_CONFIGNODE_TTL_FAILED_6D4FB59A + + String.join(ConfigNodeMessages.EXCEPTION_DOT_9D9B854A, pathPattern) + + ConfigNodeMessages.MESSAGE_COLON_CEFF3F4D + status.getMessage())); } } @@ -246,7 +246,8 @@ private void restoreTTLOnDataNodes( if (hasFailedDataNode(clientHandler)) { throw new ProcedureException( new MetadataException( - "Rollback dataNode ttl cache failed for " + String.join(".", pathPattern))); + ProcedureMessages.EXCEPTION_ROLLBACK_DATANODE_TTL_CACHE_FAILED_AF9C7102 + + String.join(ConfigNodeMessages.EXCEPTION_DOT_9D9B854A, pathPattern))); } } @@ -263,13 +264,13 @@ protected void rollbackState(final ConfigNodeProcedureEnv env, final SetTTLState try { rollbackConfigNodeTTL(env); } catch (ProcedureException e) { - LOGGER.error("Failed to rollback ConfigNode ttl state.", e); + LOGGER.error(ProcedureMessages.LOG_FAILED_ROLLBACK_CONFIGNODE_TTL_STATE_9666EF54, e); rollbackFailure = e; } try { rollbackDataNodeTTL(env); } catch (ProcedureException e) { - LOGGER.error("Failed to rollback DataNode ttl cache.", e); + LOGGER.error(ProcedureMessages.LOG_FAILED_ROLLBACK_DATANODE_TTL_CACHE_436C008A, e); if (rollbackFailure == null) { rollbackFailure = e; } else { diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/schema/SetTemplateProcedure.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/schema/SetTemplateProcedure.java index 55fffedad6145..964f907c850b1 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/schema/SetTemplateProcedure.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/schema/SetTemplateProcedure.java @@ -343,7 +343,8 @@ protected void onAllReplicasetFailure( String.format( ProcedureMessages .SET_TEMPLATE_TO_FAILED_WHEN_CHECK_TIME_SERIES_EXISTENCE_ON - + "failed to check time series existence in all replicaset of schemaRegion %s. Failures: %s", + + ProcedureMessages + .EXCEPTION_FAILED_CHECK_TIME_SERIES_EXISTENCE_ALL_REPLICASET_SCHEMAREGION_ARG_FAILURES_5F668154, templateName, templateSetPath, consensusGroupId.id, diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/schema/table/AbstractAlterOrDropTableProcedure.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/schema/table/AbstractAlterOrDropTableProcedure.java index 7cf1ff1c24f83..b157ab28a131b 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/schema/table/AbstractAlterOrDropTableProcedure.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/schema/table/AbstractAlterOrDropTableProcedure.java @@ -105,7 +105,9 @@ protected void preRelease(final ConfigNodeProcedureEnv env, final @Nullable Stri setFailure( new ProcedureException( new MetadataException( - ProcedureMessages.PRE_RELEASE + getActionMessage() + " failed"))); + ProcedureMessages.PRE_RELEASE + + getActionMessage() + + ProcedureMessages.EXCEPTION_FAILED_C6FF154E))); } } @@ -153,7 +155,9 @@ protected void rollbackPreRelease( setFailure( new ProcedureException( new MetadataException( - ProcedureMessages.ROLLBACK_PRE_RELEASE + getActionMessage() + " failed"))); + ProcedureMessages.ROLLBACK_PRE_RELEASE + + getActionMessage() + + ProcedureMessages.EXCEPTION_FAILED_C6FF154E))); } } diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/subscription/consumer/runtime/CommitProgressSyncProcedure.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/subscription/consumer/runtime/CommitProgressSyncProcedure.java index e9b3056e66211..a27e576996e41 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/subscription/consumer/runtime/CommitProgressSyncProcedure.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/subscription/consumer/runtime/CommitProgressSyncProcedure.java @@ -22,6 +22,7 @@ import org.apache.iotdb.common.rpc.thrift.TSStatus; import org.apache.iotdb.commons.pipe.config.PipeConfig; import org.apache.iotdb.confignode.consensus.request.write.subscription.consumer.runtime.CommitProgressHandleMetaChangePlan; +import org.apache.iotdb.confignode.i18n.ProcedureMessages; import org.apache.iotdb.confignode.persistence.subscription.SubscriptionInfo; import org.apache.iotdb.confignode.procedure.env.ConfigNodeProcedureEnv; import org.apache.iotdb.confignode.procedure.impl.subscription.AbstractOperateSubscriptionProcedure; @@ -81,7 +82,8 @@ protected ProcedureLockState acquireLock(ConfigNodeProcedureEnv configNodeProced if (System.currentTimeMillis() - LAST_EXECUTION_TIME.get() < MIN_EXECUTION_INTERVAL_MS) { subscriptionInfo = null; LOGGER.info( - "CommitProgressSyncProcedure: acquireLock, skip the procedure due to the last execution time {}", + ProcedureMessages + .LOG_COMMITPROGRESSSYNCPROCEDURE_ACQUIRELOCK_SKIP_PROCEDURE_LAST_EXECUTION_TIME_ARG_CE3DD247, LAST_EXECUTION_TIME.get()); return ProcedureLockState.LOCK_ACQUIRED; } @@ -95,7 +97,7 @@ protected SubscriptionOperation getOperation() { @Override public boolean executeFromValidate(ConfigNodeProcedureEnv env) { - LOGGER.info("CommitProgressSyncProcedure: executeFromValidate"); + LOGGER.info(ProcedureMessages.LOG_COMMITPROGRESSSYNCPROCEDURE_EXECUTEFROMVALIDATE_CF220E1F); LAST_EXECUTION_TIME.set(System.currentTimeMillis()); return true; } @@ -103,7 +105,8 @@ public boolean executeFromValidate(ConfigNodeProcedureEnv env) { @Override public void executeFromOperateOnConfigNodes(ConfigNodeProcedureEnv env) throws SubscriptionException { - LOGGER.info("CommitProgressSyncProcedure: executeFromOperateOnConfigNodes"); + LOGGER.info( + ProcedureMessages.LOG_COMMITPROGRESSSYNCPROCEDURE_EXECUTEFROMOPERATEONCONFIGNODES_0DC818CA); // 1. Pull commit progress from all DataNodes final Map respMap = env.pullCommitProgressFromDataNodes(); @@ -117,7 +120,7 @@ public void executeFromOperateOnConfigNodes(ConfigNodeProcedureEnv env) final TPullCommitProgressResp resp = entry.getValue(); if (resp.getStatus().getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()) { LOGGER.warn( - "Failed to pull commit progress from DataNode {}, status: {}", + ProcedureMessages.LOG_FAILED_PULL_COMMIT_PROGRESS_DATANODE_ARG_STATUS_ARG_33037B29, entry.getKey(), resp.getStatus()); continue; @@ -147,7 +150,7 @@ public void executeFromOperateOnConfigNodes(ConfigNodeProcedureEnv env) new CommitProgressHandleMetaChangePlan( serializeRegionProgressMap(mergedRegionProgress))); } catch (ConsensusException e) { - LOGGER.warn("Failed in the write API executing the consensus layer due to: ", e); + LOGGER.warn(ProcedureMessages.FAILED_IN_THE_WRITE_API_EXECUTING_THE_CONSENSUS_LAYER_DUE, e); response = new TSStatus(TSStatusCode.EXECUTE_STATEMENT_ERROR.getStatusCode()); response.setMessage(e.getMessage()); } @@ -158,23 +161,28 @@ public void executeFromOperateOnConfigNodes(ConfigNodeProcedureEnv env) @Override public void executeFromOperateOnDataNodes(ConfigNodeProcedureEnv env) { - LOGGER.info("CommitProgressSyncProcedure: executeFromOperateOnDataNodes (no-op)"); + LOGGER.info( + ProcedureMessages + .LOG_COMMITPROGRESSSYNCPROCEDURE_EXECUTEFROMOPERATEONDATANODES_NO_OP_34420360); // No need to push back to DataNodes } @Override public void rollbackFromValidate(ConfigNodeProcedureEnv env) { - LOGGER.info("CommitProgressSyncProcedure: rollbackFromValidate"); + LOGGER.info(ProcedureMessages.LOG_COMMITPROGRESSSYNCPROCEDURE_ROLLBACKFROMVALIDATE_2309D4D2); } @Override public void rollbackFromOperateOnConfigNodes(ConfigNodeProcedureEnv env) { - LOGGER.info("CommitProgressSyncProcedure: rollbackFromOperateOnConfigNodes"); + LOGGER.info( + ProcedureMessages + .LOG_COMMITPROGRESSSYNCPROCEDURE_ROLLBACKFROMOPERATEONCONFIGNODES_57CB907B); } @Override public void rollbackFromOperateOnDataNodes(ConfigNodeProcedureEnv env) { - LOGGER.info("CommitProgressSyncProcedure: rollbackFromOperateOnDataNodes"); + LOGGER.info( + ProcedureMessages.LOG_COMMITPROGRESSSYNCPROCEDURE_ROLLBACKFROMOPERATEONDATANODES_0D2CEB50); } @Override @@ -228,7 +236,8 @@ private static RegionProgress deserializeRegionProgress( return RegionProgress.deserialize(duplicate); } catch (final RuntimeException e) { LOGGER.warn( - "CommitProgressSyncProcedure: failed to deserialize region progress, key={}, summary={}", + ProcedureMessages + .LOG_COMMITPROGRESSSYNCPROCEDURE_FAILED_DESERIALIZE_REGION_PROGRESS_KEY_ARG_SUMMARY_ARG_0202F658, key, summarizeRegionProgressPayload(buffer), e); @@ -288,7 +297,9 @@ private static ByteBuffer serializeRegionProgress(final RegionProgress regionPro dos.flush(); return ByteBuffer.wrap(baos.toByteArray()).asReadOnlyBuffer(); } catch (final IOException e) { - throw new RuntimeException("Failed to serialize region progress " + regionProgress, e); + throw new RuntimeException( + ProcedureMessages.EXCEPTION_FAILED_SERIALIZE_REGION_PROGRESS_1769D6F1 + regionProgress, + e); } } diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/subscription/runtime/SubscriptionHandleLeaderChangeProcedure.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/subscription/runtime/SubscriptionHandleLeaderChangeProcedure.java index 5337b719d207f..b8be6882519dc 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/subscription/runtime/SubscriptionHandleLeaderChangeProcedure.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/subscription/runtime/SubscriptionHandleLeaderChangeProcedure.java @@ -25,6 +25,7 @@ import org.apache.iotdb.commons.cluster.NodeStatus; import org.apache.iotdb.commons.subscription.meta.topic.TopicMeta; import org.apache.iotdb.confignode.consensus.request.write.subscription.consumer.runtime.CommitProgressHandleMetaChangePlan; +import org.apache.iotdb.confignode.i18n.ProcedureMessages; import org.apache.iotdb.confignode.procedure.env.ConfigNodeProcedureEnv; import org.apache.iotdb.confignode.procedure.impl.subscription.AbstractOperateSubscriptionProcedure; import org.apache.iotdb.confignode.procedure.impl.subscription.SubscriptionOperation; @@ -87,7 +88,8 @@ protected SubscriptionOperation getOperation() { @Override public boolean executeFromValidate(final ConfigNodeProcedureEnv env) { - LOGGER.info("SubscriptionHandleLeaderChangeProcedure: executeFromValidate"); + LOGGER.info( + ProcedureMessages.LOG_SUBSCRIPTIONHANDLELEADERCHANGEPROCEDURE_EXECUTEFROMVALIDATE_97490577); if (regionGroupToOldAndNewLeaderPairMap.isEmpty()) { return false; } @@ -102,7 +104,9 @@ public boolean executeFromValidate(final ConfigNodeProcedureEnv env) { @Override public void executeFromOperateOnConfigNodes(final ConfigNodeProcedureEnv env) throws SubscriptionException { - LOGGER.info("SubscriptionHandleLeaderChangeProcedure: executeFromOperateOnConfigNodes"); + LOGGER.info( + ProcedureMessages + .LOG_SUBSCRIPTIONHANDLELEADERCHANGEPROCEDURE_EXECUTEFROMOPERATEONCONFIGNODES_D4E8BD37); final Map respMap = env.pullCommitProgressFromDataNodes(); final Map mergedRegionProgress = @@ -113,7 +117,8 @@ public void executeFromOperateOnConfigNodes(final ConfigNodeProcedureEnv env) final TPullCommitProgressResp resp = entry.getValue(); if (resp.getStatus().getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()) { LOGGER.warn( - "SubscriptionHandleLeaderChangeProcedure: failed to pull commit progress from DataNode {}, status: {}", + ProcedureMessages + .LOG_SUBSCRIPTIONHANDLELEADERCHANGEPROCEDURE_FAILED_PULL_COMMIT_PROGRESS_DATANODE_ARG_STATUS_ARG_8C6DEC4E, entry.getKey(), resp.getStatus()); continue; @@ -143,7 +148,8 @@ public void executeFromOperateOnConfigNodes(final ConfigNodeProcedureEnv env) serializeRegionProgressMap(mergedRegionProgress))); } catch (final ConsensusException e) { LOGGER.warn( - "SubscriptionHandleLeaderChangeProcedure: failed in the write API executing the consensus layer due to: ", + ProcedureMessages + .LOG_SUBSCRIPTIONHANDLELEADERCHANGEPROCEDURE_FAILED_WRITE_API_EXECUTING_CONSENSUS_LAYER_56B3832A, e); throw new SubscriptionException(e.getMessage()); } @@ -156,14 +162,17 @@ public void executeFromOperateOnConfigNodes(final ConfigNodeProcedureEnv env) @Override public void executeFromOperateOnDataNodes(final ConfigNodeProcedureEnv env) throws SubscriptionException, IOException { - LOGGER.info("SubscriptionHandleLeaderChangeProcedure: executeFromOperateOnDataNodes"); + LOGGER.info( + ProcedureMessages + .LOG_SUBSCRIPTIONHANDLELEADERCHANGEPROCEDURE_EXECUTEFROMOPERATEONDATANODES_0D9F7C98); final Map topicRespMap = pushTopicMetaToDataNodes(env); topicRespMap.forEach( (dataNodeId, resp) -> { if (resp.getStatus().getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()) { LOGGER.warn( - "SubscriptionHandleLeaderChangeProcedure: ignored failed topic meta push to DataNode {}, status: {}", + ProcedureMessages + .LOG_SUBSCRIPTIONHANDLELEADERCHANGEPROCEDURE_IGNORED_FAILED_TOPIC_META_PUSH_DATANODE_ARG_STATUS_ARG_67FC003F, dataNodeId, resp.getStatus()); } @@ -175,7 +184,8 @@ public void executeFromOperateOnDataNodes(final ConfigNodeProcedureEnv env) (dataNodeId, resp) -> { if (resp.getStatus().getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()) { LOGGER.warn( - "SubscriptionHandleLeaderChangeProcedure: ignored failed consumer group meta push to DataNode {}, status: {}", + ProcedureMessages + .LOG_SUBSCRIPTIONHANDLELEADERCHANGEPROCEDURE_IGNORED_FAILED_CONSUMER_GROUP_META_PUSH_DATANODE_ARG_STATUS_17C948, dataNodeId, resp.getStatus()); } @@ -194,7 +204,8 @@ public void executeFromOperateOnDataNodes(final ConfigNodeProcedureEnv env) if (!runtimePushError.isEmpty()) { throw new SubscriptionException( String.format( - "Failed to push subscription runtime state to readable DataNodes during leader change, details: %s", + ProcedureMessages + .EXCEPTION_FAILED_PUSH_SUBSCRIPTION_RUNTIME_STATE_READABLE_DATANODES_DURING_LEADER_CHANGE_F37E6F2C, runtimePushError)); } runtimeRespMap.forEach( @@ -202,7 +213,8 @@ public void executeFromOperateOnDataNodes(final ConfigNodeProcedureEnv env) if (!readableDataNodeIds.contains(dataNodeId) && status.getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()) { LOGGER.warn( - "SubscriptionHandleLeaderChangeProcedure: ignored failed subscription runtime push to unreadable DataNode {}, status: {}", + ProcedureMessages + .LOG_SUBSCRIPTIONHANDLELEADERCHANGEPROCEDURE_IGNORED_FAILED_SUBSCRIPTION_RUNTIME_PUSH_UNREADABLE_DATANODE_ARG_S, dataNodeId, status); } @@ -212,17 +224,23 @@ public void executeFromOperateOnDataNodes(final ConfigNodeProcedureEnv env) @Override public void rollbackFromValidate(final ConfigNodeProcedureEnv env) { - LOGGER.info("SubscriptionHandleLeaderChangeProcedure: rollbackFromValidate"); + LOGGER.info( + ProcedureMessages + .LOG_SUBSCRIPTIONHANDLELEADERCHANGEPROCEDURE_ROLLBACKFROMVALIDATE_74B408B7); } @Override public void rollbackFromOperateOnConfigNodes(final ConfigNodeProcedureEnv env) { - LOGGER.info("SubscriptionHandleLeaderChangeProcedure: rollbackFromOperateOnConfigNodes"); + LOGGER.info( + ProcedureMessages + .LOG_SUBSCRIPTIONHANDLELEADERCHANGEPROCEDURE_ROLLBACKFROMOPERATEONCONFIGNODES_D4C70763); } @Override public void rollbackFromOperateOnDataNodes(final ConfigNodeProcedureEnv env) { - LOGGER.info("SubscriptionHandleLeaderChangeProcedure: rollbackFromOperateOnDataNodes"); + LOGGER.info( + ProcedureMessages + .LOG_SUBSCRIPTIONHANDLELEADERCHANGEPROCEDURE_ROLLBACKFROMOPERATEONDATANODES_0250F6E9); } @Override @@ -316,7 +334,8 @@ private static RegionProgress deserializeRegionProgress( return RegionProgress.deserialize(duplicate); } catch (final RuntimeException e) { LOGGER.warn( - "SubscriptionHandleLeaderChangeProcedure: failed to deserialize region progress, key={}, summary={}", + ProcedureMessages + .LOG_SUBSCRIPTIONHANDLELEADERCHANGEPROCEDURE_FAILED_DESERIALIZE_REGION_PROGRESS_KEY_ARG_SUMMARY_ARG_F6935E59, key, summarizeRegionProgressPayload(buffer), e); @@ -376,7 +395,9 @@ private static ByteBuffer serializeRegionProgress(final RegionProgress regionPro dos.flush(); return ByteBuffer.wrap(baos.toByteArray()).asReadOnlyBuffer(); } catch (final IOException e) { - throw new RuntimeException("Failed to serialize region progress " + regionProgress, e); + throw new RuntimeException( + ProcedureMessages.EXCEPTION_FAILED_SERIALIZE_REGION_PROGRESS_1769D6F1 + regionProgress, + e); } } @@ -413,7 +434,8 @@ private Set getReadableDataNodeIds(final ConfigNodeProcedureEnv env) .collect(Collectors.toSet()); if (readableDataNodeIds.isEmpty()) { throw new SubscriptionException( - "No readable DataNode is available to accept subscription metadata/runtime updates during leader change"); + ProcedureMessages + .EXCEPTION_NO_READABLE_DATANODE_AVAILABLE_ACCEPT_SUBSCRIPTION_METADATA_RUNTIME_UPDATES_DURING_22E61621); } return readableDataNodeIds; } diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/subscription/subscription/CreateSubscriptionProcedure.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/subscription/subscription/CreateSubscriptionProcedure.java index 57e60c9cdda28..eb5a7d92ea146 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/subscription/subscription/CreateSubscriptionProcedure.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/subscription/subscription/CreateSubscriptionProcedure.java @@ -122,8 +122,9 @@ protected boolean executeFromValidate(final ConfigNodeProcedureEnv env) // skip pipe creation consensusTopicNames.add(topicName); LOGGER.info( - "CreateSubscriptionProcedure: topic [{}] uses consensus subscription mode " - + "(mode={}), skipping pipe creation", + ProcedureMessages + .LOG_CREATESUBSCRIPTIONPROCEDURE_TOPIC_ARG_USES_CONSENSUS_SUBSCRIPTION_MODE_031CF049 + + ProcedureMessages.LOG_MODE_ARG_SKIPPING_PIPE_CREATION_5F4D1026, topicName, topicMode); continue; @@ -203,8 +204,9 @@ protected void executeFromOperateOnDataNodes(final ConfigNodeProcedureEnv env) if (!consensusTopicNames.isEmpty()) { LOGGER.info( - "CreateSubscriptionProcedure: consensus-based topics {} will be handled by DataNode " - + "via consumer group meta push (no pipe creation needed)", + ProcedureMessages + .LOG_CREATESUBSCRIPTIONPROCEDURE_CONSENSUS_BASED_TOPICS_ARG_WILL_HANDLED_DATANODE_90A9C2FD + + ProcedureMessages.LOG_VIA_CONSUMER_GROUP_META_PUSH_NO_PIPE_CREATION_NEEDED_D56CFE31, consensusTopicNames); } diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/subscription/subscription/DropSubscriptionProcedure.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/subscription/subscription/DropSubscriptionProcedure.java index 8db599402090d..822c696327e5e 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/subscription/subscription/DropSubscriptionProcedure.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/subscription/subscription/DropSubscriptionProcedure.java @@ -112,8 +112,9 @@ protected boolean executeFromValidate(final ConfigNodeProcedureEnv env) if (isConsensusBasedTopic) { LOGGER.info( - "DropSubscriptionProcedure: topic [{}] uses consensus subscription mode " - + "(mode={}), skipping pipe removal", + ProcedureMessages + .LOG_DROPSUBSCRIPTIONPROCEDURE_TOPIC_ARG_USES_CONSENSUS_SUBSCRIPTION_MODE_6962D13C + + ProcedureMessages.LOG_MODE_ARG_SKIPPING_PIPE_REMOVAL_133B0CD6, topic, topicMode); continue; diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/trigger/CreateTriggerProcedure.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/trigger/CreateTriggerProcedure.java index 8406eee97b380..3ea95ca4d542a 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/trigger/CreateTriggerProcedure.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/trigger/CreateTriggerProcedure.java @@ -93,7 +93,8 @@ protected Flow executeFromState( ConfigManager configManager = env.getConfigManager(); LOG.info( - "Start to add trigger [{}] in TriggerTable on Config Nodes, needToSaveJar[{}]", + ProcedureMessages + .LOG_START_ADD_TRIGGER_ARG_TRIGGERTABLE_CONFIG_NODES_NEEDTOSAVEJAR_ARG_0C23D81E, triggerInformation.getTriggerName(), jarFile != null); @@ -113,7 +114,7 @@ protected Flow executeFromState( case CONFIG_NODE_INACTIVE: LOG.info( - "Start to create triggerInstance [{}] on Data Nodes", + ProcedureMessages.LOG_START_CREATE_TRIGGERINSTANCE_ARG_DATA_NODES_917C3313, triggerInformation.getTriggerName()); if (RpcUtils.squashResponseStatusList( @@ -131,7 +132,8 @@ protected Flow executeFromState( case DATA_NODE_INACTIVE: LOG.info( - "Start to active trigger [{}] on Data Nodes", triggerInformation.getTriggerName()); + ProcedureMessages.LOG_START_ACTIVE_TRIGGER_ARG_DATA_NODES_A4AB8131, + triggerInformation.getTriggerName()); if (RpcUtils.squashResponseStatusList( env.activeTriggerOnDataNodes(triggerInformation.getTriggerName())) @@ -148,7 +150,8 @@ protected Flow executeFromState( case DATA_NODE_ACTIVE: LOG.info( - "Start to active trigger [{}] on Config Nodes", triggerInformation.getTriggerName()); + ProcedureMessages.LOG_START_ACTIVE_TRIGGER_ARG_CONFIG_NODES_153A5D40, + triggerInformation.getTriggerName()); env.getConfigManager() .getConsensusManager() .write( @@ -174,7 +177,7 @@ protected Flow executeFromState( setFailure(new ProcedureException(e)); } else { LOG.error( - "Retrievable error trying to create trigger [{}], state [{}]", + ProcedureMessages.LOG_RETRIEVABLE_ERROR_TRYING_CREATE_TRIGGER_ARG_STATE_ARG_44976C4E, triggerInformation.getTriggerName(), state, e); @@ -222,7 +225,7 @@ protected void rollbackState(ConfigNodeProcedureEnv env, CreateTriggerState stat case CONFIG_NODE_INACTIVE: LOG.info( - "Start to [CONFIG_NODE_INACTIVE] rollback of trigger [{}]", + ProcedureMessages.LOG_START_CONFIG_NODE_INACTIVE_ROLLBACK_TRIGGER_ARG_536929E5, triggerInformation.getTriggerName()); if (RpcUtils.squashResponseStatusList( @@ -238,7 +241,7 @@ protected void rollbackState(ConfigNodeProcedureEnv env, CreateTriggerState stat case DATA_NODE_INACTIVE: LOG.info( - "Start to [DATA_NODE_INACTIVE] rollback of trigger [{}]", + ProcedureMessages.LOG_START_DATA_NODE_INACTIVE_ROLLBACK_TRIGGER_ARG_38C93D64, triggerInformation.getTriggerName()); if (RpcUtils.squashResponseStatusList( diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/trigger/DropTriggerProcedure.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/trigger/DropTriggerProcedure.java index 126197cbfe653..bdbe1a717e5e7 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/trigger/DropTriggerProcedure.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/trigger/DropTriggerProcedure.java @@ -117,7 +117,10 @@ protected Flow executeFromState(ConfigNodeProcedureEnv env, DropTriggerState sta setFailure(new ProcedureException(e.getMessage())); } else { LOG.error( - "Retrievable error trying to drop trigger [{}], state [{}]", triggerName, state, e); + ProcedureMessages.LOG_RETRIEVABLE_ERROR_TRYING_DROP_TRIGGER_ARG_STATE_ARG_2282AC35, + triggerName, + state, + e); if (getCycles() > RETRY_THRESHOLD) { setFailure( new ProcedureException( diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/scheduler/AbstractProcedureScheduler.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/scheduler/AbstractProcedureScheduler.java index 5a8d53dcb1649..a33d78d9ce25d 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/scheduler/AbstractProcedureScheduler.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/scheduler/AbstractProcedureScheduler.java @@ -19,6 +19,7 @@ package org.apache.iotdb.confignode.procedure.scheduler; +import org.apache.iotdb.confignode.i18n.ProcedureMessages; import org.apache.iotdb.confignode.procedure.Procedure; import org.slf4j.Logger; @@ -79,7 +80,9 @@ public void signalAll() { @Override public void addFront(final Procedure procedure) { if (procedure != null && procedure.isSuccess()) { - LOG.warn("Don't add a successful procedure back to the scheduler, it will be ignored"); + LOG.warn( + ProcedureMessages + .LOG_DON_T_ADD_SUCCESSFUL_PROCEDURE_BACK_SCHEDULER_IT_WILL_IGNORED_E015472C); return; } push(procedure, true, true); @@ -93,7 +96,9 @@ public void addFront(final Procedure procedure, boolean notify) { @Override public void addBack(final Procedure procedure) { if (procedure.isSuccess()) { - LOG.warn("Don't add a successful procedure back to the scheduler, it will be ignored"); + LOG.warn( + ProcedureMessages + .LOG_DON_T_ADD_SUCCESSFUL_PROCEDURE_BACK_SCHEDULER_IT_WILL_IGNORED_E015472C); return; } push(procedure, false, true); @@ -140,7 +145,7 @@ public Procedure poll(final long nanos) { schedLock(); try { if (!running) { - LOG.debug("the scheduler is not running"); + LOG.debug(ProcedureMessages.LOG_SCHEDULER_NOT_RUNNING_6969C9FF); return null; } @@ -151,7 +156,7 @@ public Procedure poll(final long nanos) { schedWaitCond.await(); } else { long leftTime = schedWaitCond.awaitNanos(nanos); - LOG.debug("the scheduler waiting time left {} nanos", leftTime); + LOG.debug(ProcedureMessages.LOG_SCHEDULER_WAITING_TIME_LEFT_ARG_NANOS_D7717019, leftTime); } if (!queueHasRunnables()) { return null; diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/store/ConfigProcedureStore.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/store/ConfigProcedureStore.java index c626171fb7951..d9d3bf88cf87a 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/store/ConfigProcedureStore.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/store/ConfigProcedureStore.java @@ -91,13 +91,15 @@ public long getNextProcId() { @Override public void update(Procedure procedure) throws Exception { - Objects.requireNonNull(ProcedureFactory.getProcedureType(procedure), "Procedure type is null"); + Objects.requireNonNull( + ProcedureFactory.getProcedureType(procedure), + ConfigNodeMessages.EXCEPTION_PROCEDURE_TYPE_IS_NULL_93147BD3); final UpdateProcedurePlan updateProcedurePlan = new UpdateProcedurePlan(procedure); try { configManager.getConsensusManager().write(updateProcedurePlan); } catch (ConsensusException e) { LOG.warn( - "pid={} Failed in the write update API executing the consensus layer due to: ", + ConfigNodeMessages.LOG_PID_ARG_FAILED_WRITE_UPDATE_API_EXECUTING_CONSENSUS_LAYER_824FB30E, procedure.getProcId(), e); // In consensus layer API, do nothing but just throw an exception to let upper caller handle @@ -121,7 +123,7 @@ public void delete(long procId) throws Exception { configManager.getConsensusManager().write(deleteProcedurePlan); } catch (ConsensusException e) { LOG.warn( - "pid={} Failed in the write delete API executing the consensus layer due to: ", + ConfigNodeMessages.LOG_PID_ARG_FAILED_WRITE_DELETE_API_EXECUTING_CONSENSUS_LAYER_0E758BF5, procId, e); // In consensus layer API, do nothing but just throw an exception to let upper caller handle diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/store/ProcedureFactory.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/store/ProcedureFactory.java index 231b44ad2eef4..26392e7c897fd 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/store/ProcedureFactory.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/store/ProcedureFactory.java @@ -577,7 +577,9 @@ public static ProcedureType getProcedureType(final Procedure procedure) { return ProcedureType.DATA_PARTITION_TABLE_INTEGRITY_CHECK_PROCEDURE; } throw new UnsupportedOperationException( - ProcedureMessages.PROCEDURE_TYPE + procedure.getClass() + " is not supported"); + ProcedureMessages.PROCEDURE_TYPE + + procedure.getClass() + + ProcedureMessages.EXCEPTION_NOT_SUPPORTED_0A83F963); } private static class ProcedureFactoryHolder { diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/service/ConfigNodeShutdownHook.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/service/ConfigNodeShutdownHook.java index 9860ee6d497ce..6b894804dc53f 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/service/ConfigNodeShutdownHook.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/service/ConfigNodeShutdownHook.java @@ -92,7 +92,8 @@ public void run() { if (LOGGER.isInfoEnabled()) { LOGGER.info( - ConfigNodeConstant.GLOBAL_NAME + " exits. Jvm memory usage: {}", + ConfigNodeConstant.GLOBAL_NAME + + ConfigNodeMessages.LOG_EXITS_JVM_MEMORY_USAGE_ARG_0BCD1CCF, MemUtils.bytesCntToStr( Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory())); } diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/service/thrift/ConfigNodeRPCServiceProcessor.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/service/thrift/ConfigNodeRPCServiceProcessor.java index efd3f8abe8018..48cf7b4c30632 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/service/thrift/ConfigNodeRPCServiceProcessor.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/service/thrift/ConfigNodeRPCServiceProcessor.java @@ -446,27 +446,31 @@ public TSStatus alterDatabase(final TDatabaseSchema databaseSchema) { errorResp = new TSStatus(TSStatusCode.DATABASE_CONFIG_ERROR.getStatusCode()) .setMessage( - "Failed to alter database. Doesn't support ALTER SchemaReplicationFactor yet."); + ConfigNodeMessages + .MESSAGE_FAILED_ALTER_DATABASE_DOESN_T_SUPPORT_ALTER_SCHEMAREPLICATIONFACTOR_YET_AD96111F); } if (databaseSchema.isSetDataReplicationFactor()) { errorResp = new TSStatus(TSStatusCode.DATABASE_CONFIG_ERROR.getStatusCode()) .setMessage( - "Failed to alter database. Doesn't support ALTER DataReplicationFactor yet."); + ConfigNodeMessages + .MESSAGE_FAILED_ALTER_DATABASE_DOESN_T_SUPPORT_ALTER_DATAREPLICATIONFACTOR_YET_2E7FF6E7); } if (databaseSchema.isSetTimePartitionOrigin()) { errorResp = new TSStatus(TSStatusCode.DATABASE_CONFIG_ERROR.getStatusCode()) .setMessage( - "Failed to alter database. Doesn't support ALTER TimePartitionOrigin yet."); + ConfigNodeMessages + .MESSAGE_FAILED_ALTER_DATABASE_DOESN_T_SUPPORT_ALTER_TIMEPARTITIONORIGIN_YET_B315F2E3); } if (databaseSchema.isSetTimePartitionInterval()) { errorResp = new TSStatus(TSStatusCode.DATABASE_CONFIG_ERROR.getStatusCode()) .setMessage( - "Failed to alter database. Doesn't support ALTER TimePartitionInterval yet."); + ConfigNodeMessages + .MESSAGE_FAILED_ALTER_DATABASE_DOESN_T_SUPPORT_ALTER_TIMEPARTITIONINTERVAL_YET_F539A76F); } if (errorResp != null) { @@ -866,7 +870,8 @@ public TSStatus deleteConfigNodePeer(TConfigNodeLocation configNodeLocation) { && configNodeLocation.getConfigNodeId() != configNodeConfig.getConfigNodeId()) { return new TSStatus(TSStatusCode.REMOVE_CONFIGNODE_ERROR.getStatusCode()) .setMessage( - "remove ConsensusGroup failed because the target ConfigNode is not current ConfigNode."); + ConfigNodeMessages + .MESSAGE_REMOVE_CONSENSUSGROUP_FAILED_BECAUSE_TARGET_CONFIGNODE_NOT_CURRENT_CONFIGNODE_608E64F9); } ConsensusGroupId groupId = configManager.getConsensusManager().getConsensusGroupId(); @@ -878,7 +883,8 @@ public TSStatus deleteConfigNodePeer(TConfigNodeLocation configNodeLocation) { } catch (ConsensusException e) { return new TSStatus(TSStatusCode.REMOVE_CONFIGNODE_ERROR.getStatusCode()) .setMessage( - "remove ConsensusGroup failed because internal failure. See other logs for more details"); + ConfigNodeMessages + .MESSAGE_REMOVE_CONSENSUSGROUP_FAILED_BECAUSE_INTERNAL_FAILURE_SEE_OTHER_LOGS_MORE_51858EC2); } return new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode()) diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/writelog/io/BatchLogReader.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/writelog/io/BatchLogReader.java index b9224be411e3b..98a228eeb5fbf 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/writelog/io/BatchLogReader.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/writelog/io/BatchLogReader.java @@ -19,6 +19,7 @@ package org.apache.iotdb.confignode.writelog.io; import org.apache.iotdb.confignode.consensus.request.ConfigPhysicalPlan; +import org.apache.iotdb.confignode.i18n.ConfigNodeMessages; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -47,7 +48,10 @@ private List readLogs(ByteBuffer buffer) { try { plans.add(ConfigPhysicalPlan.Factory.create(buffer)); } catch (IOException e) { - logger.error("Cannot deserialize PhysicalPlans from ByteBuffer, ignore remaining logs", e); + logger.error( + ConfigNodeMessages + .LOG_CANNOT_DESERIALIZE_PHYSICALPLANS_BYTEBUFFER_IGNORE_REMAINING_LOGS_06AE778F, + e); fileCorrupted = true; break; } diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/writelog/io/SingleFileLogReader.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/writelog/io/SingleFileLogReader.java index b46057b8330d7..4c5c3f6340d73 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/writelog/io/SingleFileLogReader.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/writelog/io/SingleFileLogReader.java @@ -88,8 +88,8 @@ public boolean hasNext() { throw new IOException( String.format( ConfigNodeMessages.THE_CHECK_SUM_OF_THE_NO_LOG_BATCH_IS_INCORRECT - + "file: " - + "%d Calculated: %d.", + + ConfigNodeMessages.EXCEPTION_FILE_11296840 + + ConfigNodeMessages.EXCEPTION_ARG_CALCULATED_ARG_0EEEE191, idx, checkSum, checkSummer.getValue())); @@ -104,7 +104,8 @@ public boolean hasNext() { fileCorrupted = fileCorrupted || batchLogReader.isFileCorrupted(); } catch (Exception e) { logger.error( - "Cannot read more PhysicalPlans from {}, successfully read index is {}. The reason is", + ConfigNodeMessages + .LOG_CANNOT_READ_MORE_PHYSICALPLANS_ARG_SUCCESSFULLY_READ_INDEX_ARG_REASON_2EC90E78, idx, filepath, e); diff --git a/iotdb-core/consensus/src/main/i18n/en/org/apache/iotdb/consensus/i18n/ConsensusMessages.java b/iotdb-core/consensus/src/main/i18n/en/org/apache/iotdb/consensus/i18n/ConsensusMessages.java index 9c7eec311757a..ae5d4d5296df6 100644 --- a/iotdb-core/consensus/src/main/i18n/en/org/apache/iotdb/consensus/i18n/ConsensusMessages.java +++ b/iotdb-core/consensus/src/main/i18n/en/org/apache/iotdb/consensus/i18n/ConsensusMessages.java @@ -165,4 +165,14 @@ private ConsensusMessages() {} public static final String FAILED_TO_READ_KEYSTORE = "Failed to read key store or trust store."; public static final String NOT_IMPLEMENTED_YET = "not implemented yet"; + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String EXCEPTION_RAFT_SERVER_CANNOT_SERVE_READ_REQUESTS_NOW_LEADER_UNKNOWN_UNDER_B6D65373 = "Raft Server cannot serve read requests now (leader is unknown or under recovery). "; + public static final String EXCEPTION_PLEASE_TRY_READ_LATER_D8E0CDE1 = "Please try read later: "; + public static final String EXCEPTION_RATIS_REQUEST_FAILED_52AF217F = "Ratis request failed "; + public static final String EXCEPTION_UNKNOWN_88183B94 = "Unknown"; + public static final String EXCEPTION_RATIS_REQUEST_FAILED_58107CDE = "Ratis request failed: "; + public static final String EXCEPTION_DOT_F779BA66 = ". "; + } diff --git a/iotdb-core/consensus/src/main/i18n/en/org/apache/iotdb/consensus/i18n/IoTConsensusMessages.java b/iotdb-core/consensus/src/main/i18n/en/org/apache/iotdb/consensus/i18n/IoTConsensusMessages.java index 5817bbf637874..7c06b02f8b30a 100644 --- a/iotdb-core/consensus/src/main/i18n/en/org/apache/iotdb/consensus/i18n/IoTConsensusMessages.java +++ b/iotdb-core/consensus/src/main/i18n/en/org/apache/iotdb/consensus/i18n/IoTConsensusMessages.java @@ -298,4 +298,36 @@ private IoTConsensusMessages() {} "Interrupted after polling and sleeping"; public static final String INTERRUPTED_AFTER_GETTING_A_BATCH = "Interrupted after getting a batch"; + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String LOG_ONNEWPEERCREATED_CALLBACK_FAILED_GROUP_ARG_2671FCDA = "onNewPeerCreated callback failed for group {}"; + public static final String LOG_ONPEERREMOVED_CALLBACK_FAILED_GROUP_ARG_9B79CBAF = "onPeerRemoved callback failed for group {}"; + public static final String EXCEPTION_UNSUPPORTED_WRITER_META_VERSION_ARG_ARG_7D14E679 = "Unsupported writer meta version %d in %s"; + public static final String LOG_WRITE_NO_SUBSCRIPTION_QUEUES_REGISTERED_0F4E697B = "write() no subscription queues registered, "; + public static final String LOG_GROUP_ARG_SEARCHINDEX_ARG_ARG_D5E034E6 = "group={}, searchIndex={}, this={}"; + public static final String LOG_SUBSCRIPTIONQUEUES_ARG_ARG_6C4FE107 = ", subscriptionQueues: {}, this: {}"; + public static final String LOG_CANNOT_NOTIFY_ARG_BUILD_SYNC_LOG_CHANNEL_490770FB = "cannot notify {} to build sync log channel. "; + public static final String LOG_PLEASE_CHECK_STATUS_NODE_MANUALLY_40FBC9B3 = "Please check the status of this node manually"; + public static final String LOG_FAILED_SYNC_WRITER_SAFE_TIME_BARRIER_PEER_ARG_GROUP_ARG_05A13E6A = "Failed to sync writer safe-time barrier to peer {} for group {}, "; + public static final String LOG_SAFEPT_ARG_WRITERNODEID_ARG_BARRIER_ARG_AC74618F = "safePt={}, writerNodeId={}, barrier={}"; + public static final String LOG_RECOVERED_WRITER_META_GROUP_ARG_ARG_RECOVEREDLOCALSEQ_ARG_9B989AAC = "Recovered writer meta for group {} from {}, recoveredLocalSeq={}, "; + public static final String LOG_PERSISTEDLOCALSEQ_ARG_5EBAA9A5 = "persistedLocalSeq={}"; + public static final String LOG_FAILED_LOAD_WRITER_META_GROUP_ARG_ARG_STARTING_FRESH_WRITER_A24EDEFE = "Failed to load writer meta for group {} from {}. Starting fresh writer metadata."; + public static final String LOG_INITIALIZED_FRESH_WRITER_META_GROUP_ARG_RECOVEREDLOCALSEQ_ARG_A7254C6E = "Initialized fresh writer meta for group {}, recoveredLocalSeq={}"; + public static final String LOG_FAILED_PERSIST_WRITER_META_GROUP_ARG_AT_LOCALSEQ_ARG_PT_3502F119 = "Failed to persist writer meta for group {} at localSeq={}, pt={}"; + public static final String LOG_REGISTERED_SUBSCRIPTION_QUEUE_GROUP_ARG_5102ABA0 = "Registered subscription queue for group {}, "; + public static final String LOG_TOTAL_SUBSCRIPTION_QUEUES_ARG_CURRENTSEARCHINDEX_ARG_ARG_9BF9006A = "total subscription queues: {}, currentSearchIndex={}, this={}"; + public static final String LOG_DEREGISTERED_SUBSCRIPTION_QUEUE_GROUP_ARG_REMAINING_SUBSCRIPTION_QUEUES_ARG_B86E31AF = "Deregistered subscription queue for group {}, remaining subscription queues: {}"; + public static final String LOG_OBSERVED_INCOMPARABLE_WRITER_SAFE_TIME_BARRIER_WRITER_ARG_0F0C171D = "Observed incomparable writer safe-time barrier for writer {}. "; + public static final String LOG_KEEP_PENDINGSAFEPHYSICALTIME_ARG_PENDINGSAFELOCALSEQ_ARG_7123FD95 = "keep pendingSafePhysicalTime={}, pendingSafeLocalSeq={}, "; + public static final String LOG_IGNORE_SAFEPHYSICALTIME_ARG_SAFELOCALSEQ_ARG_A601C4D1 = "ignore safePhysicalTime={}, safeLocalSeq={}"; + public static final String LOG_WRITE_OFFERING_ARG_SUBSCRIPTION_QUEUE_S_GROUP_ARG_SEARCHINDEX_ARG_A8489EDF = "write() offering to {} subscription queue(s), group={}, searchIndex={}, requestType={}"; + public static final String LOG_OFFER_RESULT_ARG_QUEUESIZE_ARG_QUEUEREMAINING_ARG_7ADC84C2 = "offer result={}, queueSize={}, queueRemaining={}"; + public static final String LOG_SUBSCRIPTION_QUEUE_FULL_DROPPED_ARG_ENTRY_S_LAST_ARG_MS_2AD8AB3D = "Subscription queue full, dropped {} entry(s) in the last {} ms, latest "; + public static final String LOG_SEARCHINDEX_ARG_QUEUESIZE_ARG_QUEUEREMAINING_ARG_2EA619ED = "searchIndex={}, queueSize={}, queueRemaining={}"; + public static final String LOG_SUBSCRIPTION_QUEUE_FULL_DROPPED_ENTRY_SEARCHINDEX_ARG_DROPPEDCOUNT_ARG_61F126B8 = "Subscription queue full, dropped entry searchIndex={}, droppedCount={}"; + public static final String LOG_RESERVED_ARG_BYTES_BATCH_ARG_ARG_CURRENT_TOTAL_USAGE_ARG_308AE9C2 = "Reserved {} bytes for batch {}-{}, current total usage {}"; + public static final String LOG_ARG_FAILED_SEND_IDLE_WRITER_SAFE_TIME_BARRIER_ARG_STATUS_AE047EAD = "{}: Failed to send idle writer safe-time barrier to {}. status={}"; + } diff --git a/iotdb-core/consensus/src/main/i18n/en/org/apache/iotdb/consensus/i18n/RatisMessages.java b/iotdb-core/consensus/src/main/i18n/en/org/apache/iotdb/consensus/i18n/RatisMessages.java index 147c684de75d1..e3332413fa621 100644 --- a/iotdb-core/consensus/src/main/i18n/en/org/apache/iotdb/consensus/i18n/RatisMessages.java +++ b/iotdb-core/consensus/src/main/i18n/en/org/apache/iotdb/consensus/i18n/RatisMessages.java @@ -119,4 +119,14 @@ private RatisMessages() {} "JMX Reporter is disabled from RatisMetricRegistries"; public static final String CONSOLE_REPORTER_DISABLED = "Console Reporter is disabled from RatisMetricRegistries"; + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String LOG_RESET_PEER_LIST_CURRENT_PEER_LIST_CORRECT_NOTHING_NEED_RESET_0E009CDA = "[RESET PEER LIST] The current peer list is correct, nothing need to be reset: {}"; + public static final String EXCEPTION_INTERNAL_GRPC_CONNECTION_ERROR_59404D15 = "internal GRPC connection error:"; + public static final String LOG_FAILED_ARG_ATTEMPT_ARG_SLEEP_ARG_THEN_RETRY_36A9A0C2 = "Failed {}, attempt #{}, sleep {} and then retry"; + public static final String LOG_ARG_INTERRUPTED_WAITING_RETRY_38D69BCC = "{}: interrupted when waiting for retry"; + public static final String EXCEPTION_SUPPLIER_EQUALS_EQUALS_NULL_13BACC3E = "supplier == null"; + public static final String EXCEPTION_CONDITION_EQUALS_EQUALS_NULL_E3A6C947 = "condition == null"; + } diff --git a/iotdb-core/consensus/src/main/i18n/zh/org/apache/iotdb/consensus/i18n/ConsensusMessages.java b/iotdb-core/consensus/src/main/i18n/zh/org/apache/iotdb/consensus/i18n/ConsensusMessages.java index 9802fe06a8d7e..6681f371aca7b 100644 --- a/iotdb-core/consensus/src/main/i18n/zh/org/apache/iotdb/consensus/i18n/ConsensusMessages.java +++ b/iotdb-core/consensus/src/main/i18n/zh/org/apache/iotdb/consensus/i18n/ConsensusMessages.java @@ -163,4 +163,14 @@ private ConsensusMessages() {} public static final String FAILED_TO_READ_KEYSTORE = "读取 keystore 或 truststore 失败。"; public static final String NOT_IMPLEMENTED_YET = "尚未实现"; + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String EXCEPTION_RAFT_SERVER_CANNOT_SERVE_READ_REQUESTS_NOW_LEADER_UNKNOWN_UNDER_B6D65373 = "Raft Server 当前无法处理读请求(leader 未知或正在恢复)。"; + public static final String EXCEPTION_PLEASE_TRY_READ_LATER_D8E0CDE1 = "请稍后重试读取:"; + public static final String EXCEPTION_RATIS_REQUEST_FAILED_52AF217F = "Ratis 请求失败 "; + public static final String EXCEPTION_UNKNOWN_88183B94 = "未知"; + public static final String EXCEPTION_RATIS_REQUEST_FAILED_58107CDE = "Ratis 请求失败:"; + public static final String EXCEPTION_DOT_F779BA66 = ". "; + } diff --git a/iotdb-core/consensus/src/main/i18n/zh/org/apache/iotdb/consensus/i18n/IoTConsensusMessages.java b/iotdb-core/consensus/src/main/i18n/zh/org/apache/iotdb/consensus/i18n/IoTConsensusMessages.java index 92bb5de1973e9..5343fb3dacc91 100644 --- a/iotdb-core/consensus/src/main/i18n/zh/org/apache/iotdb/consensus/i18n/IoTConsensusMessages.java +++ b/iotdb-core/consensus/src/main/i18n/zh/org/apache/iotdb/consensus/i18n/IoTConsensusMessages.java @@ -296,4 +296,36 @@ private IoTConsensusMessages() {} "轮询和等待后被中断"; public static final String INTERRUPTED_AFTER_GETTING_A_BATCH = "获取批次后被中断"; + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String LOG_ONNEWPEERCREATED_CALLBACK_FAILED_GROUP_ARG_2671FCDA = "group {} 的 onNewPeerCreated 回调失败"; + public static final String LOG_ONPEERREMOVED_CALLBACK_FAILED_GROUP_ARG_9B79CBAF = "group {} 的 onPeerRemoved 回调失败"; + public static final String EXCEPTION_UNSUPPORTED_WRITER_META_VERSION_ARG_ARG_7D14E679 = "不支持 writer meta 版本 %d,位置 %s"; + public static final String LOG_WRITE_NO_SUBSCRIPTION_QUEUES_REGISTERED_0F4E697B = "write() 没有已注册的订阅队列,"; + public static final String LOG_GROUP_ARG_SEARCHINDEX_ARG_ARG_D5E034E6 = "group={}, searchIndex={}, 当前对象={}"; + public static final String LOG_SUBSCRIPTIONQUEUES_ARG_ARG_6C4FE107 = ",订阅队列:{},当前对象:{}"; + public static final String LOG_CANNOT_NOTIFY_ARG_BUILD_SYNC_LOG_CHANNEL_490770FB = "无法通知 {} 构建同步日志通道。"; + public static final String LOG_PLEASE_CHECK_STATUS_NODE_MANUALLY_40FBC9B3 = "请手动检查该节点状态"; + public static final String LOG_FAILED_SYNC_WRITER_SAFE_TIME_BARRIER_PEER_ARG_GROUP_ARG_05A13E6A = "无法将 writer safe-time barrier 同步到 peer {},group {},"; + public static final String LOG_SAFEPT_ARG_WRITERNODEID_ARG_BARRIER_ARG_AC74618F = "safePt={}, writerNodeId={}, barrier={}"; + public static final String LOG_RECOVERED_WRITER_META_GROUP_ARG_ARG_RECOVEREDLOCALSEQ_ARG_9B989AAC = "已恢复 group {} 的 writer meta,来源 {},recoveredLocalSeq={},"; + public static final String LOG_PERSISTEDLOCALSEQ_ARG_5EBAA9A5 = "persistedLocalSeq={}"; + public static final String LOG_FAILED_LOAD_WRITER_META_GROUP_ARG_ARG_STARTING_FRESH_WRITER_A24EDEFE = "无法加载 group {} 的 writer meta,来源 {}。正在启动新的 writer 元数据。"; + public static final String LOG_INITIALIZED_FRESH_WRITER_META_GROUP_ARG_RECOVEREDLOCALSEQ_ARG_A7254C6E = "已初始化 group {} 的新 writer meta,recoveredLocalSeq={}"; + public static final String LOG_FAILED_PERSIST_WRITER_META_GROUP_ARG_AT_LOCALSEQ_ARG_PT_3502F119 = "无法持久化 group {} 的 writer meta,localSeq={},pt={}"; + public static final String LOG_REGISTERED_SUBSCRIPTION_QUEUE_GROUP_ARG_5102ABA0 = "已注册 group {} 的订阅队列,"; + public static final String LOG_TOTAL_SUBSCRIPTION_QUEUES_ARG_CURRENTSEARCHINDEX_ARG_ARG_9BF9006A = "订阅队列总数:{},currentSearchIndex={},当前对象={}"; + public static final String LOG_DEREGISTERED_SUBSCRIPTION_QUEUE_GROUP_ARG_REMAINING_SUBSCRIPTION_QUEUES_ARG_B86E31AF = "已注销 group {} 的订阅队列,剩余订阅队列:{}"; + public static final String LOG_OBSERVED_INCOMPARABLE_WRITER_SAFE_TIME_BARRIER_WRITER_ARG_0F0C171D = "观察到 writer {} 存在不可比较的 writer safe-time barrier。"; + public static final String LOG_KEEP_PENDINGSAFEPHYSICALTIME_ARG_PENDINGSAFELOCALSEQ_ARG_7123FD95 = "保留 pendingSafePhysicalTime={},pendingSafeLocalSeq={},"; + public static final String LOG_IGNORE_SAFEPHYSICALTIME_ARG_SAFELOCALSEQ_ARG_A601C4D1 = "忽略 safePhysicalTime={},safeLocalSeq={}"; + public static final String LOG_WRITE_OFFERING_ARG_SUBSCRIPTION_QUEUE_S_GROUP_ARG_SEARCHINDEX_ARG_A8489EDF = "write() 正在提交到 {} 个订阅队列,group={},searchIndex={},requestType={}"; + public static final String LOG_OFFER_RESULT_ARG_QUEUESIZE_ARG_QUEUEREMAINING_ARG_7ADC84C2 = "提交结果={},queueSize={},queueRemaining={}"; + public static final String LOG_SUBSCRIPTION_QUEUE_FULL_DROPPED_ARG_ENTRY_S_LAST_ARG_MS_2AD8AB3D = "订阅队列已满,丢弃了 {} 个 entry,最近 {} ms,最新 "; + public static final String LOG_SEARCHINDEX_ARG_QUEUESIZE_ARG_QUEUEREMAINING_ARG_2EA619ED = "searchIndex={}, queueSize={}, queueRemaining={}"; + public static final String LOG_SUBSCRIPTION_QUEUE_FULL_DROPPED_ENTRY_SEARCHINDEX_ARG_DROPPEDCOUNT_ARG_61F126B8 = "订阅队列已满,丢弃 entry,searchIndex={},droppedCount={}"; + public static final String LOG_RESERVED_ARG_BYTES_BATCH_ARG_ARG_CURRENT_TOTAL_USAGE_ARG_308AE9C2 = "预留 {} 字节给批次 {}-{},当前总使用量 {}"; + public static final String LOG_ARG_FAILED_SEND_IDLE_WRITER_SAFE_TIME_BARRIER_ARG_STATUS_AE047EAD = "{}:无法向 {} 发送 idle writer safe-time barrier。状态={}"; + } diff --git a/iotdb-core/consensus/src/main/i18n/zh/org/apache/iotdb/consensus/i18n/RatisMessages.java b/iotdb-core/consensus/src/main/i18n/zh/org/apache/iotdb/consensus/i18n/RatisMessages.java index f4ba63d9fd668..b9495713f837b 100644 --- a/iotdb-core/consensus/src/main/i18n/zh/org/apache/iotdb/consensus/i18n/RatisMessages.java +++ b/iotdb-core/consensus/src/main/i18n/zh/org/apache/iotdb/consensus/i18n/RatisMessages.java @@ -92,7 +92,7 @@ private RatisMessages() {} // ===================== DiskGuardian ===================== public static final String ERROR_LISTING_FILES = - "{}:列出共识组 {} 的文件时出错:"; + "{}:列出 {} 在 {} 下的文件时出错:"; public static final String CLEAR_SNAPSHOT_FLAG_FAILED = "{}:清除共识组 {} 的快照标志失败,请检查相关实现"; public static final String TAKE_SNAPSHOT_FAILED = @@ -118,4 +118,14 @@ private RatisMessages() {} "JMX Reporter 在 RatisMetricRegistries 中已禁用"; public static final String CONSOLE_REPORTER_DISABLED = "Console Reporter 在 RatisMetricRegistries 中已禁用"; + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String LOG_RESET_PEER_LIST_CURRENT_PEER_LIST_CORRECT_NOTHING_NEED_RESET_0E009CDA = "[RESET PEER LIST] 当前 peer 列表正确,无需重置:{}"; + public static final String EXCEPTION_INTERNAL_GRPC_CONNECTION_ERROR_59404D15 = "内部 GRPC 连接错误:"; + public static final String LOG_FAILED_ARG_ATTEMPT_ARG_SLEEP_ARG_THEN_RETRY_36A9A0C2 = "{} 失败,第 {} 次尝试,休眠 {} 后重试"; + public static final String LOG_ARG_INTERRUPTED_WAITING_RETRY_38D69BCC = "{}:等待重试时被中断"; + public static final String EXCEPTION_SUPPLIER_EQUALS_EQUALS_NULL_13BACC3E = "supplier == null"; + public static final String EXCEPTION_CONDITION_EQUALS_EQUALS_NULL_E3A6C947 = "condition == null"; + } diff --git a/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/exception/RatisReadUnavailableException.java b/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/exception/RatisReadUnavailableException.java index 1ef5506942cb7..be7e5fc0214e0 100644 --- a/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/exception/RatisReadUnavailableException.java +++ b/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/exception/RatisReadUnavailableException.java @@ -19,12 +19,15 @@ package org.apache.iotdb.consensus.exception; +import org.apache.iotdb.consensus.i18n.ConsensusMessages; + /** RaftServer is unable to serve linearizable read requests. */ public class RatisReadUnavailableException extends ConsensusException { private static final String RATIS_READ_UNAVAILABLE = - "Raft Server cannot serve read requests now (leader is unknown or under recovery). " - + "Please try read later: "; + ConsensusMessages + .EXCEPTION_RAFT_SERVER_CANNOT_SERVE_READ_REQUESTS_NOW_LEADER_UNKNOWN_UNDER_B6D65373 + + ConsensusMessages.EXCEPTION_PLEASE_TRY_READ_LATER_D8E0CDE1; public RatisReadUnavailableException(Throwable cause) { super(RATIS_READ_UNAVAILABLE, cause); diff --git a/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/exception/RatisRequestFailedException.java b/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/exception/RatisRequestFailedException.java index 46d47a4b08b83..26e8e447be36b 100644 --- a/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/exception/RatisRequestFailedException.java +++ b/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/exception/RatisRequestFailedException.java @@ -19,23 +19,29 @@ package org.apache.iotdb.consensus.exception; +import org.apache.iotdb.consensus.i18n.ConsensusMessages; + import java.util.Optional; public class RatisRequestFailedException extends ConsensusException { public RatisRequestFailedException(Exception cause) { super( - "Ratis request failed " - + Optional.ofNullable(cause).map(Exception::getMessage).orElse("Unknown"), + ConsensusMessages.EXCEPTION_RATIS_REQUEST_FAILED_52AF217F + + Optional.ofNullable(cause) + .map(Exception::getMessage) + .orElse(ConsensusMessages.EXCEPTION_UNKNOWN_88183B94), cause); } public RatisRequestFailedException(String message, Exception cause) { super( - "Ratis request failed: " + ConsensusMessages.EXCEPTION_RATIS_REQUEST_FAILED_58107CDE + message - + ". " - + Optional.ofNullable(cause).map(Exception::getMessage).orElse("Unknown"), + + ConsensusMessages.EXCEPTION_DOT_F779BA66 + + Optional.ofNullable(cause) + .map(Exception::getMessage) + .orElse(ConsensusMessages.EXCEPTION_UNKNOWN_88183B94), cause); } } diff --git a/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/IoTConsensus.java b/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/IoTConsensus.java index dde577e39f740..09d19b6dabf41 100644 --- a/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/IoTConsensus.java +++ b/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/IoTConsensus.java @@ -338,7 +338,10 @@ public void createLocalPeer(ConsensusGroupId groupId, List peers) try { callback.accept(groupId, stateMachineMap.get(groupId)); } catch (final Exception e) { - logger.warn("onNewPeerCreated callback failed for group {}", groupId, e); + logger.warn( + IoTConsensusMessages.LOG_ONNEWPEERCREATED_CALLBACK_FAILED_GROUP_ARG_2671FCDA, + groupId, + e); } } } @@ -354,7 +357,8 @@ public void deleteLocalPeer(ConsensusGroupId groupId) throws ConsensusException try { removeCallback.accept(groupId); } catch (final Exception e) { - logger.warn("onPeerRemoved callback failed for group {}", groupId, e); + logger.warn( + IoTConsensusMessages.LOG_ONPEERREMOVED_CALLBACK_FAILED_GROUP_ARG_9B79CBAF, groupId, e); } } diff --git a/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/IoTConsensusServerImpl.java b/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/IoTConsensusServerImpl.java index f3c7d4e50ae26..cd617b7a971be 100644 --- a/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/IoTConsensusServerImpl.java +++ b/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/IoTConsensusServerImpl.java @@ -312,7 +312,8 @@ public TSStatus write(IConsensusRequest request) { && indexedConsensusRequest.getSearchIndex() % 50 == 0) { // Log periodically when no subscription queues are registered logger.debug( - "write() no subscription queues registered, " + "group={}, searchIndex={}, this={}", + IoTConsensusMessages.LOG_WRITE_NO_SUBSCRIPTION_QUEUES_REGISTERED_0F4E697B + + IoTConsensusMessages.LOG_GROUP_ARG_SEARCHINDEX_ARG_ARG_D5E034E6, consensusGroupId, indexedConsensusRequest.getSearchIndex(), System.identityHashCode(this)); @@ -325,7 +326,8 @@ public TSStatus write(IConsensusRequest request) { System.nanoTime() - writeToStateMachineEndTime); } else if (logger.isDebugEnabled()) { logger.debug( - IoTConsensusMessages.WRITE_OPERATION_FAILED + ", subscriptionQueues: {}, this: {}", + IoTConsensusMessages.WRITE_OPERATION_FAILED + + IoTConsensusMessages.LOG_SUBSCRIPTIONQUEUES_ARG_ARG_6C4FE107, thisNode.getGroupId(), indexedConsensusRequest.getSearchIndex(), result.getCode(), @@ -648,8 +650,8 @@ public void notifyPeersToBuildSyncLogChannel(Peer targetPeer) // after current operation // TODO: (xingtanzjr) design more reliable way for IoTConsensus logger.error( - "cannot notify {} to build sync log channel. " - + "Please check the status of this node manually", + IoTConsensusMessages.LOG_CANNOT_NOTIFY_ARG_BUILD_SYNC_LOG_CHANNEL_490770FB + + IoTConsensusMessages.LOG_PLEASE_CHECK_STATUS_NODE_MANUALLY_40FBC9B3, peer, e); } @@ -784,8 +786,8 @@ private TSStatus syncWriterSafeTimeBarrierToPeer( return res.getStatus(); } catch (Exception e) { logger.debug( - "Failed to sync writer safe-time barrier to peer {} for group {}, " - + "safePt={}, writerNodeId={}, barrier={}", + IoTConsensusMessages.LOG_FAILED_SYNC_WRITER_SAFE_TIME_BARRIER_PEER_ARG_GROUP_ARG_05A13E6A + + IoTConsensusMessages.LOG_SAFEPT_ARG_WRITERNODEID_ARG_BARRIER_ARG_AC74618F, targetPeer, consensusGroupId, safePhysicalTime, @@ -937,8 +939,9 @@ private void initializeWriterMeta() { if (writerMetaOptional.isPresent()) { final WriterMeta writerMeta = writerMetaOptional.get(); logger.info( - "Recovered writer meta for group {} from {}, recoveredLocalSeq={}, " - + "persistedLocalSeq={}", + IoTConsensusMessages + .LOG_RECOVERED_WRITER_META_GROUP_ARG_ARG_RECOVEREDLOCALSEQ_ARG_9B989AAC + + IoTConsensusMessages.LOG_PERSISTEDLOCALSEQ_ARG_5EBAA9A5, consensusGroupId, writerMetaPath, recoveredSearchIndex, @@ -952,14 +955,16 @@ private void initializeWriterMeta() { } } catch (IOException e) { logger.warn( - "Failed to load writer meta for group {} from {}. Starting fresh writer metadata.", + IoTConsensusMessages + .LOG_FAILED_LOAD_WRITER_META_GROUP_ARG_ARG_STARTING_FRESH_WRITER_A24EDEFE, consensusGroupId, writerMetaPath, e); } lastAssignedPhysicalTime.set(System.currentTimeMillis()); logger.info( - "Initialized fresh writer meta for group {}, recoveredLocalSeq={}", + IoTConsensusMessages + .LOG_INITIALIZED_FRESH_WRITER_META_GROUP_ARG_RECOVEREDLOCALSEQ_ARG_A7254C6E, consensusGroupId, recoveredSearchIndex); } @@ -1004,7 +1009,8 @@ private void persistLatestWriterMeta(final boolean force) { lastPersistedWriterPhysicalTime = latestMeta.getLastAssignedPhysicalTimeMs(); } catch (IOException e) { logger.warn( - "Failed to persist writer meta for group {} at localSeq={}, pt={}", + IoTConsensusMessages + .LOG_FAILED_PERSIST_WRITER_META_GROUP_ARG_AT_LOCALSEQ_ARG_PT_3502F119, consensusGroupId, latestMeta.getLastAllocatedLocalSeq(), latestMeta.getLastAssignedPhysicalTimeMs(), @@ -1060,8 +1066,9 @@ public void registerSubscriptionQueue( // Immediately re-evaluate the safe delete index with new subscription awareness checkAndUpdateSafeDeletedSearchIndex(); logger.info( - "Registered subscription queue for group {}, " - + "total subscription queues: {}, currentSearchIndex={}, this={}", + IoTConsensusMessages.LOG_REGISTERED_SUBSCRIPTION_QUEUE_GROUP_ARG_5102ABA0 + + IoTConsensusMessages + .LOG_TOTAL_SUBSCRIPTION_QUEUES_ARG_CURRENTSEARCHINDEX_ARG_ARG_9BF9006A, consensusGroupId, subscriptionQueueRegistry.size(), searchIndex.get(), @@ -1073,7 +1080,8 @@ public void deregisterSubscriptionQueue(final BlockingQueue load(Path path) throws IOException { if (version != FORMAT_VERSION) { throw new IOException( String.format( - "Unsupported writer meta version %d in %s", version, path.toAbsolutePath())); + IoTConsensusMessages.EXCEPTION_UNSUPPORTED_WRITER_META_VERSION_ARG_ARG_7D14E679, + version, + path.toAbsolutePath())); } return Optional.of(new WriterMeta(dataInputStream.readLong(), dataInputStream.readLong())); } diff --git a/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/WriterSafeFrontierTracker.java b/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/WriterSafeFrontierTracker.java index 0f48e8d22de84..a8e96e06cee3d 100644 --- a/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/WriterSafeFrontierTracker.java +++ b/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/WriterSafeFrontierTracker.java @@ -19,6 +19,8 @@ package org.apache.iotdb.consensus.iot; +import org.apache.iotdb.consensus.i18n.IoTConsensusMessages; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -81,9 +83,10 @@ public synchronized void observePendingWriterSafeTimeBarrier( return; } LOGGER.warn( - "Observed incomparable writer safe-time barrier for writer {}. " - + "keep pendingSafePhysicalTime={}, pendingSafeLocalSeq={}, " - + "ignore safePhysicalTime={}, safeLocalSeq={}", + IoTConsensusMessages.LOG_OBSERVED_INCOMPARABLE_WRITER_SAFE_TIME_BARRIER_WRITER_ARG_0F0C171D + + IoTConsensusMessages + .LOG_KEEP_PENDINGSAFEPHYSICALTIME_ARG_PENDINGSAFELOCALSEQ_ARG_7123FD95 + + IoTConsensusMessages.LOG_IGNORE_SAFEPHYSICALTIME_ARG_SAFELOCALSEQ_ARG_A601C4D1, writerNodeId, state.pendingSafePhysicalTime, state.pendingSafeLocalSeq, diff --git a/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/logdispatcher/LogDispatcher.java b/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/logdispatcher/LogDispatcher.java index 06967749874ad..1622c2052fa9e 100644 --- a/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/logdispatcher/LogDispatcher.java +++ b/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/logdispatcher/LogDispatcher.java @@ -538,7 +538,8 @@ private void maybeSendIdleWriterSafeTimeBarrier() { lastIdleWriterSafeTimeBarrierSentTimeMs = now; } else { logger.debug( - "{}: Failed to send idle writer safe-time barrier to {}. status={}", + IoTConsensusMessages + .LOG_ARG_FAILED_SEND_IDLE_WRITER_SAFE_TIME_BARRIER_ARG_STATUS_AE047EAD, impl.getThisNode().getGroupId(), peer, status); diff --git a/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/logdispatcher/SyncStatus.java b/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/logdispatcher/SyncStatus.java index 35304b82406c1..08296aef1f5cf 100644 --- a/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/logdispatcher/SyncStatus.java +++ b/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/logdispatcher/SyncStatus.java @@ -20,6 +20,7 @@ package org.apache.iotdb.consensus.iot.logdispatcher; import org.apache.iotdb.consensus.config.IoTConsensusConfig; +import org.apache.iotdb.consensus.i18n.IoTConsensusMessages; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -55,7 +56,8 @@ public synchronized void addNextBatch(Batch batch) throws InterruptedException { } if (LOGGER.isDebugEnabled()) { LOGGER.debug( - "Reserved {} bytes for batch {}-{}, current total usage {}", + IoTConsensusMessages + .LOG_RESERVED_ARG_BYTES_BATCH_ARG_ARG_CURRENT_TOTAL_USAGE_ARG_308AE9C2, batch.getMemorySize(), batch.getStartIndex(), batch.getEndIndex(), diff --git a/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/subscription/SubscriptionQueueRegistry.java b/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/subscription/SubscriptionQueueRegistry.java index 50bac4b273511..ea6872b8788c6 100644 --- a/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/subscription/SubscriptionQueueRegistry.java +++ b/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/subscription/SubscriptionQueueRegistry.java @@ -20,6 +20,7 @@ package org.apache.iotdb.consensus.iot.subscription; import org.apache.iotdb.consensus.common.request.IndexedConsensusRequest; +import org.apache.iotdb.consensus.i18n.IoTConsensusMessages; import org.apache.iotdb.consensus.iot.SubscriptionWalRetentionPolicy; import org.slf4j.Logger; @@ -80,7 +81,8 @@ public synchronized void offer(final IndexedConsensusRequest indexedConsensusReq if (LOGGER.isDebugEnabled()) { LOGGER.debug( - "write() offering to {} subscription queue(s), group={}, searchIndex={}, requestType={}", + IoTConsensusMessages + .LOG_WRITE_OFFERING_ARG_SUBSCRIPTION_QUEUE_S_GROUP_ARG_SEARCHINDEX_ARG_A8489EDF, queueCount, consensusGroupId, indexedConsensusRequest.getSearchIndex(), @@ -93,7 +95,7 @@ public synchronized void offer(final IndexedConsensusRequest indexedConsensusReq final boolean offered = queue.offer(indexedConsensusRequest); if (LOGGER.isDebugEnabled()) { LOGGER.debug( - "offer result={}, queueSize={}, queueRemaining={}", + IoTConsensusMessages.LOG_OFFER_RESULT_ARG_QUEUESIZE_ARG_QUEUEREMAINING_ARG_7ADC84C2, offered, queue.size(), queue.remainingCapacity()); @@ -105,8 +107,10 @@ public synchronized void offer(final IndexedConsensusRequest indexedConsensusReq if (now - lastLogTime >= QUEUE_FULL_LOG_INTERVAL_MS && lastDropLogTimeMs.compareAndSet(lastLogTime, now)) { LOGGER.warn( - "Subscription queue full, dropped {} entry(s) in the last {} ms, latest " - + "searchIndex={}, queueSize={}, queueRemaining={}", + IoTConsensusMessages + .LOG_SUBSCRIPTION_QUEUE_FULL_DROPPED_ARG_ENTRY_S_LAST_ARG_MS_2AD8AB3D + + IoTConsensusMessages + .LOG_SEARCHINDEX_ARG_QUEUESIZE_ARG_QUEUEREMAINING_ARG_2EA619ED, droppedEntries.getAndSet(0), QUEUE_FULL_LOG_INTERVAL_MS, indexedConsensusRequest.getSearchIndex(), @@ -114,7 +118,8 @@ public synchronized void offer(final IndexedConsensusRequest indexedConsensusReq queue.remainingCapacity()); } else if (LOGGER.isDebugEnabled()) { LOGGER.debug( - "Subscription queue full, dropped entry searchIndex={}, droppedCount={}", + IoTConsensusMessages + .LOG_SUBSCRIPTION_QUEUE_FULL_DROPPED_ENTRY_SEARCHINDEX_ARG_DROPPEDCOUNT_ARG_61F126B8, indexedConsensusRequest.getSearchIndex(), droppedCount); } diff --git a/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/ratis/RatisConsensus.java b/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/ratis/RatisConsensus.java index 372b45b8afc6f..19c77ecb6b908 100644 --- a/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/ratis/RatisConsensus.java +++ b/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/ratis/RatisConsensus.java @@ -484,7 +484,8 @@ private RaftClientReply doRead( .setGroupId(request.getRaftGroupId()) .setException( new ReadIndexException( - "internal GRPC connection error:", ioe.getCause())) + RatisMessages.EXCEPTION_INTERNAL_GRPC_CONNECTION_ERROR_59404D15, + ioe.getCause())) .setSuccess(false) .build(); } else { @@ -673,7 +674,7 @@ public void resetPeerList(ConsensusGroupId groupId, List correctPeers) if (localRaftPeerSet.equals(correctRaftPeerSet)) { // configurations are the same logger.info( - "[RESET PEER LIST] The current peer list is correct, nothing need to be reset: {}", + RatisMessages.LOG_RESET_PEER_LIST_CURRENT_PEER_LIST_CORRECT_NOTHING_NEED_RESET_0E009CDA, localRaftPeerSet); return; } diff --git a/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/ratis/utils/Retriable.java b/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/ratis/utils/Retriable.java index 1436a0f21de38..3c5f1167a9d23 100644 --- a/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/ratis/utils/Retriable.java +++ b/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/ratis/utils/Retriable.java @@ -19,6 +19,8 @@ package org.apache.iotdb.consensus.ratis.utils; +import org.apache.iotdb.consensus.i18n.RatisMessages; + import org.apache.ratis.util.TimeDuration; import org.apache.ratis.util.function.CheckedSupplier; import org.slf4j.Logger; @@ -45,7 +47,7 @@ public static RETURN attempt( Supplier name, Logger log) throws THROWABLE, InterruptedException { - Objects.requireNonNull(supplier, "supplier == null"); + Objects.requireNonNull(supplier, RatisMessages.EXCEPTION_SUPPLIER_EQUALS_EQUALS_NULL_13BACC3E); for (int attempt = 0; ; attempt++) { try { final RETURN ret = supplier.get(); @@ -54,7 +56,10 @@ public static RETURN attempt( TimeDuration waitTime = policy.getWaitTime(attempt); if (log != null && log.isDebugEnabled()) { log.debug( - "Failed {}, attempt #{}, sleep {} and then retry", name.get(), attempt, waitTime); + RatisMessages.LOG_FAILED_ARG_ATTEMPT_ARG_SLEEP_ARG_THEN_RETRY_36A9A0C2, + name.get(), + attempt, + waitTime); } waitTime.sleep(); continue; @@ -63,7 +68,7 @@ public static RETURN attempt( } catch (InterruptedException e) { Thread.currentThread().interrupt(); if (log != null && log.isWarnEnabled()) { - log.warn("{}: interrupted when waiting for retry", name.get()); + log.warn(RatisMessages.LOG_ARG_INTERRUPTED_WAITING_RETRY_38D69BCC, name.get()); } throw e; } @@ -83,7 +88,8 @@ public static void attemptUntilTrue( public static void attemptUntilTrue( BooleanSupplier condition, int maxAttempts, TimeDuration sleepTime, String name, Logger log) throws InterruptedException { - Objects.requireNonNull(condition, "condition == null"); + Objects.requireNonNull( + condition, RatisMessages.EXCEPTION_CONDITION_EQUALS_EQUALS_NULL_E3A6C947); attempt( () -> null, RetryPolicy.newBuilder() diff --git a/iotdb-core/datanode/src/main/i18n/en/org/apache/iotdb/db/i18n/DataNodeMiscMessages.java b/iotdb-core/datanode/src/main/i18n/en/org/apache/iotdb/db/i18n/DataNodeMiscMessages.java index e4a780d13f890..a6b0a3d5281a1 100644 --- a/iotdb-core/datanode/src/main/i18n/en/org/apache/iotdb/db/i18n/DataNodeMiscMessages.java +++ b/iotdb-core/datanode/src/main/i18n/en/org/apache/iotdb/db/i18n/DataNodeMiscMessages.java @@ -42,6 +42,40 @@ public final class DataNodeMiscMessages { "deleteRegion %s error, %s"; public static final String DELETE_REGION_SUCCEED = "deleteRegion %s succeed"; + public static final String START_TO_ADD_PEER_FOR_REGION = + "{}, Start to addPeer {} for region {}"; + public static final String EXECUTED_ADD_PEER_FOR_REGION_ERROR = + "{}, executed addPeer {} for region {} error"; + public static final String REGION_MIGRATE_UNEXPECTED_EXCEPTION = + "Unexpected exception"; + public static final String ADD_PEER_FOR_REGION_ERROR_FMT = + "%s, AddPeer for region error, peerId: %s, regionId: %s"; + public static final String SUCCEED_TO_ADD_PEER_FOR_REGION = + "{}, Succeed to addPeer {} for region {}"; + public static final String START_TO_REMOVE_PEER_FOR_REGION = + "{}, Start to removePeer {} for region {}"; + public static final String EXECUTED_REMOVE_PEER_FOR_REGION_ERROR_RETRY_TIMES = + "{}, executed removePeer {} for region {} error, retry times: {}"; + public static final String REMOVE_PEER_FOR_REGION_ERROR_AFTER_MAX_RETRY_TIMES_FMT = + "%s, RemovePeer for region error after max retry times, peerId: %s, regionId: %s"; + public static final String SUCCEED_TO_REMOVE_PEER_FOR_REGION = + "{}, Succeed to removePeer {} for region {}"; + public static final String START_TO_DELETE_PEER_FOR_REGION = + "{}, Start to deletePeer {} for region {}"; + public static final String DELETE_PEER_ERROR_WITH_ERROR_MESSAGE_FMT = + "deletePeer error, regionId: %s, errorMessage: %s"; + public static final String DELETE_PEER_ERROR_WITH_REGION_ID = + "{}, deletePeer error, regionId: {}"; + public static final String DELETE_PEER_FOR_REGION_ERROR_EXCEPTION_FMT = + "deletePeer for region: %s error. exception: %s"; + public static final String SUCCEED_TO_DELETE_PEER_FROM_CONSENSUS_GROUP = + "{}, Succeed to deletePeer {} from consensus group"; + public static final String START_TO_DELETE_REGION_FOR_DATANODE = + "{}, Start to deleteRegion {} for datanode {}"; + public static final String DELETE_REGION_ERROR_LOG = + "{}, deleteRegion {} error"; + public static final String SUCCEED_TO_DELETE_REGION = + "{}, Succeed to deleteRegion {}"; public static final String ERROR_PROCESSING_DATA_REGION = "Error processing data region: {}"; public static final String FAILED_TO_PROCESS_TSFILE = @@ -933,6 +967,22 @@ private DataNodeMiscMessages() {} public static final String INVALID_PUSH_SINGLE_PIPE_META_REQ = "Invalid TPushSinglePipeMetaReq"; public static final String INVALID_PARAM = "Invalid param"; public static final String INVALID_PARAMETERS_CHECK_USER_GUIDE = "Invalid parameters. Please check the user guide."; + public static final String AGGREGATE_MIN_MAX_VALUE_ONLY_SUPPORT_ALLOWED_TYPES = + "Aggregate functions [MIN_VALUE, MAX_VALUE] only support data types [INT32, INT64, FLOAT, DOUBLE, STRING, DATE, TIMESTAMP]"; + public static final String AGGREGATE_AVG_SUM_STDDEV_ONLY_SUPPORT_NUMERIC_TYPES = + "Aggregate functions [AVG, SUM, EXTREME, STDDEV, STDDEV_POP, STDDEV_SAMP, VARIANCE, VAR_POP, VAR_SAMP] only support numeric data types [INT32, INT64, FLOAT, DOUBLE]"; + public static final String AGGREGATE_SKEWNESS_KURTOSIS_ONLY_SUPPORT_NUMERIC_TYPES = + "Aggregate functions [SKEWNESS, KURTOSIS] only support numeric data types [INT32, INT64, FLOAT, DOUBLE, TIMESTAMP]"; + public static final String AGGREGATE_FUNCTION_INPUT_SERIES_ONLY_SUPPORTS_BOOLEAN = + "Input series of Aggregation function [%s] only supports data type [BOOLEAN]"; + public static final String AGGREGATE_CORR_COVAR_REGR_ONLY_SUPPORT_NUMERIC_TYPES = + "Aggregate functions [CORR, COVAR_POP, COVAR_SAMP, REGR_SLOPE, REGR_INTERCEPT] only support numeric data types [INT32, INT64, FLOAT, DOUBLE, TIMESTAMP]"; + public static final String CHECK_AGGREGATION_KEEP_CONDITION = + "Please check input keep condition of Aggregation function [%s]"; + public static final String AGGREGATION_KEEP_CONDITION_REQUIREMENT = + "Keep condition of Aggregation function [%s] need to be constant or compare expression constructed by keep and a long number"; + public static final String DATABASE_NAME_IS_TREE_MODEL_DATABASE = + "The database name %s is a tree model database, which is not allowed to set in the client session."; public static final String INVALID_REQUEST = "Invalid request "; public static final String PREPARED_STMT_NOT_SUPPORTED_FOR_TREE = "PreparedStatement is not supported for Tree model"; public static final String FILE_LENGTH_LARGER_THAN_MAX = "The file length is larger than max_object_file_size_in_bytes"; @@ -983,4 +1033,408 @@ private DataNodeMiscMessages() {} public static final String GET_TREE_UDF = "get tree udf: {}"; public static final String GET_TABLE_UDF = "get table udf: {}"; public static final String GET_TRIGGER = "get trigger: {}"; + // --------------------------------------------------------------------------- + // Additional log messages + // --------------------------------------------------------------------------- + public static final String MISC_LOG_DELAYANALYZER_CALCULATED_SAFE_WATERMARK_CURRENTTIME_P_DELAY_74E1214C = + "[DelayAnalyzer] Calculated safe watermark: {} (currentTime: {}, P{} delay: {}ms)"; + public static final String MISC_LOG_LOGIN_LOCK_MANAGER_INITIALIZED_WITH_IP_LEVEL_ATTEMPTS_USER_57AE7966 = + "Login lock manager initialized with: IP-level attempts={}, User-level attempts={}, Lock " + + "time={} minutes"; + public static final String MISC_LOG_USER_ID_LOCKED_DUE_TO_FAILED_ATTEMPTS_743CFB3A = + "User ID '{}' locked due to {} failed attempts"; + public static final String MISC_LOG_USER_LEVEL_ATTEMPTS_AUTO_ENABLED_WITH_DEFAULT_1000_BECAUSE_FAB86B7D = + "User-level attempts auto-enabled with default 1000 because IP-level is enabled (set to {})"; + public static final String MISC_LOG_INVALID_LOCK_TIME_VALUE_RESET_TO_DEFAULT_10_MINUTES_8DCE21EF = + "Invalid lock time value ({}), reset to default (10 minutes)"; + public static final String MISC_LOG_SUCCESSFULLY_WAITED_FOR_PIPE_TO_FINISH_FBDF5157 = + "Successfully waited for pipe {} to finish."; + public static final String MISC_LOG_DATANODE_EXITS_JVM_MEMORY_USAGE_BE69D1F5 = + "DataNode exits. Jvm memory usage: {}"; + public static final String MISC_LOG_FAILED_TO_REPORT_DATANODE_S_SHUTDOWN_TO_CONFIGNODE_THE_CLUSTER_E6727497 = + "Failed to report DataNode's shutdown to ConfigNode. The cluster will still take the current " + + "DataNode as Running for a few seconds."; + public static final String MISC_LOG_SOMETHING_WRONG_HAPPENED_WHILE_CALLING_CONSENSUS_LAYER_S_8B8FBB16 = + "Something wrong happened while calling consensus layer's triggerSnapshot API."; + public static final String MISC_LOG_THE_ADDREGIONPEERTASK_HAS_ALREADY_BEEN_SUBMITTED_AND_WILL_4D398F73 = + "{} The AddRegionPeerTask {} has already been submitted and will not be submitted again."; + public static final String MISC_LOG_THE_REMOVEREGIONPEER_HAS_ALREADY_BEEN_SUBMITTED_AND_WILL_6754D9FB = + "{} The RemoveRegionPeer {} has already been submitted and will not be submitted again."; + public static final String MISC_LOG_THE_DELETEOLDREGIONPEERTASK_HAS_ALREADY_BEEN_SUBMITTED_AND_75815D37 = + "{} The DeleteOldRegionPeerTask {} has already been submitted and will not be submitted " + + "again."; + public static final String MISC_LOG_RESET_PEER_LIST_FAIL_THIS_DATANODE_NOT_CONTAINS_PEER_OF_6539945C = + "Reset peer list fail, this DataNode not contains peer of consensus group {}. Maybe caused " + + "by create local peer failure."; + public static final String MISC_LOG_SUBMIT_ADDREGIONPEERTASK_ERROR_FOR_REGION_4E999BA9 = + "{}, Submit AddRegionPeerTask error for Region: {}"; + public static final String MISC_LOG_SUBMIT_REMOVEREGIONPEER_TASK_ERROR_FOR_REGION_200E7F68 = + "{}, Submit RemoveRegionPeer task error for Region: {}"; + public static final String MISC_LOG_SUBMIT_DELETEOLDREGIONPEERTASK_ERROR_FOR_REGION_460C308A = + "{}, Submit DeleteOldRegionPeerTask error for Region: {}"; + public static final String MISC_LOG_GET_TRIGGER_EXECUTOR_1727D243 = "get trigger executor: {}"; + public static final String MISC_LOG_SUCCESSFULLY_PULL_SYSTEM_CONFIGURATIONS_FROM_CONFIGNODE_C8E04BF8 = + "Successfully pull system configurations from ConfigNode-leader, which takes {} ms"; + public static final String MISC_LOG_SUCCESSFULLY_REGISTER_TO_THE_CLUSTER_WHICH_TAKES_MS_ED479CA7 = + "Successfully register to the cluster: {} , which takes {} ms."; + public static final String MISC_LOG_RESTART_REQUEST_TO_CLUSTER_IS_ACCEPTED_WHICH_TAKES_MS_E8305E02 = + "Restart request to cluster: {} is accepted, which takes {} ms."; + public static final String MISC_LOG_SCHEMAREGION_CONSENSUS_START_SUCCESSFULLY_WHICH_TAKES_MS_3D1B8523 = + "SchemaRegion consensus start successfully, which takes {} ms."; + public static final String MISC_LOG_DATAREGION_CONSENSUS_START_SUCCESSFULLY_WHICH_TAKES_MS_2B2DB4CB = + "DataRegion consensus start successfully, which takes {} ms."; + public static final String MISC_LOG_IOTDB_DATANODE_IS_SETTING_UP_SOME_DATABASES_MAY_NOT_BE_READY_961523F0 = + "IoTDB DataNode is setting up, some databases may not be ready now, please wait several " + + "seconds..."; + public static final String MISC_LOG_SUCCESSFULLY_REGISTERED_ALL_THE_TRIGGERS_WHICH_TAKES_MS_246178BB = + "successfully registered all the triggers, which takes {} ms."; + public static final String MISC_LOG_PREPARE_EXTERNAL_SERVICE_RESOURCES_SUCCESSFULLY_WHICH_TAKES_00E62CB0 = + "Prepare external-service resources successfully, which takes {} ms."; + public static final String MISC_LOG_CANNOT_SEND_RESTART_REQUEST_TO_THE_CONFIGNODE_LEADER_BECAUSE_AB17D41A = + "Cannot send restart request to the ConfigNode-leader, because: {}"; + public static final String MISC_LOG_CANNOT_PULL_SYSTEM_CONFIGURATIONS_FROM_CONFIGNODE_LEADER_FE630DAE = + "Cannot pull system configurations from ConfigNode-leader after {} retries."; + public static final String MISC_LOG_CANNOT_SEND_RESTART_DATANODE_REQUEST_TO_CONFIGNODE_LEADER_4F50C19F = + "Cannot send restart DataNode request to ConfigNode-leader after {} retries."; + public static final String MISC_LOG_TOTALLY_FIND_TSFILES_TO_BE_SETTLED_DB47A63C = + "Totally find {} tsFiles to be settled."; + public static final String MISC_LOG_SYSTEM_PROPERTIES_FILE_HAS_BEEN_MOVED_SUCCESSFULLY_4445A448 = + "system.properties file has been moved successfully: {} -> {}"; + public static final String MISC_LOG_SERIALIZE_MUTABLE_SYSTEM_PROPERTIES_SUCCESSFULLY_WHICH_TAKES_4656A206 = + "Serialize mutable system properties successfully, which takes {} ms."; + public static final String MISC_LOG_SYSTEMPROPERTIES_NORMALIZE_FROM_TO_FOR_COMPATIBILITY_BE1C725F = + "[SystemProperties] Normalize {} from {} to {} for compatibility."; + public static final String MISC_LOG_DO_NOT_UPGRADE_IOTDB_FROM_V0_9_OR_LOWER_VERSION_TO_V1_0_9878EC88 = + "DO NOT UPGRADE IoTDB from v0.9 or lower version to v1.0! Please upgrade to v0.10 first"; + public static final String MISC_LOG_CANNOT_FIND_IOTDB_HOME_OR_IOTDB_CONF_ENVIRONMENT_VARIABLE_BE01B2FE = + "Cannot find IOTDB_HOME or IOTDB_CONF environment variable when loading config file {}, use " + + "default configuration"; + public static final String MISC_LOG_COULDN_T_LOAD_THE_CONFIGURATION_FROM_ANY_OF_THE_KNOWN_SOURCES_EE3ED103 = + "Couldn't load the configuration {} from any of the known sources."; + public static final String MISC_LOG_THE_PARAMETER_DN_MAX_CONNECTION_FOR_INTERNAL_SERVICE_IS_D2F24BEB = + "The parameter dn_max_connection_for_internal_service is out of date. Please rename it to " + + "dn_max_client_count_for_each_node_in_client_manager."; + public static final String MISC_LOG_PARTITION_TABLE_RECOVER_WORKER_NUM_SHOULD_BE_GREATER_THAN_74A2512B = + "partition_table_recover_worker_num should be greater than 0, but current value is {}, " + + "ignore that and use the default value {}"; + public static final String MISC_LOG_PARTITION_TABLE_RECOVER_MAX_READ_MEGABYTES_PER_SECOND_SHOULD_42BCDFBC = + "partition_table_recover_max_read_megabytes_per_second should be greater than 0, but current " + + "value is {}, ignore that and use the default value {}"; + public static final String MISC_LOG_THE_THROTTLE_THRESHOLD_PARAMS_IS_DEPRECATED_PLEASE_USE_AA0E8EC7 = + "The throttle threshold params: {} is deprecated, please use {}"; + public static final String MISC_LOG_FAILED_TO_PARSE_QUERY_SAMPLE_THROUGHPUT_BYTES_PER_SEC_TO_00144244 = + "Failed to parse query_sample_throughput_bytes_per_sec {} to integer"; + public static final String MISC_LOG_THE_PARAMETER_DN_TARGET_CONFIG_NODE_LIST_HAS_BEEN_ABANDONED_6C0DE50B = + "The parameter dn_target_config_node_list has been abandoned, only the first ConfigNode " + + "address will be used to join in the cluster. Please use dn_seed_config_node instead."; + public static final String MISC_LOG_FAILED_TO_RELOAD_PROPERTIES_FROM_REJECT_DATANODE_STARTUP_74E66EEC = + "Failed to reload properties from {}, reject DataNode startup."; + public static final String MISC_LOG_CONFIGNODES_ARE_SET_IN_WRONG_FORMAT_PLEASE_SET_THEM_LIKE_18E97679 = + "ConfigNodes are set in wrong format, please set them like 127.0.0.1:10710"; + public static final String MISC_LOG_INITIAL_ALLOCATEMEMORYFORWRITE_B90EC7D9 = + "initial allocateMemoryForWrite = {}"; + public static final String MISC_LOG_INITIAL_ALLOCATEMEMORYFORREAD_07FB30F0 = + "initial allocateMemoryForRead = {}"; + public static final String MISC_LOG_INITIAL_ALLOCATEMEMORYFORSCHEMA_965D4CE3 = + "initial allocateMemoryForSchema = {}"; + public static final String MISC_LOG_INITIAL_ALLOCATEMEMORYFORCONSENSUS_18B40138 = + "initial allocateMemoryForConsensus = {}"; + public static final String MISC_LOG_INITIAL_ALLOCATEMEMORYFORPIPE_616F9713 = + "initial allocateMemoryForPipe = {}"; + public static final String MISC_LOG_ALLOCATEMEMORYFORSCHEMAREGION_3BE141E8 = + "allocateMemoryForSchemaRegion = {}"; + public static final String MISC_LOG_ALLOCATEMEMORYFORSCHEMACACHE_61BFCE7D = + "allocateMemoryForSchemaCache = {}"; + public static final String MISC_LOG_ALLOCATEMEMORYFORPARTITIONCACHE_809AA695 = + "allocateMemoryForPartitionCache = {}"; + public static final String MISC_LOG_THE_PARAMETER_STORAGE_QUERY_SCHEMA_CONSENSUS_FREE_MEMORY_51C9A377 = + "The parameter storage_query_schema_consensus_free_memory_proportion is deprecated since " + + "v1.2.3, please use datanode_memory_proportion instead."; + public static final String MISC_LOG_THE_SUM_OF_REJECT_PROPORTION_WAL_BUFFER_QUEUE_PROPORTION_185B1C49 = + "The sum of reject_proportion, wal_buffer_queue_proportion and device_path_cache_proportion " + + "is too large, use default values 0.8, 0.1 and 0.05."; + public static final String MISC_LOG_THE_VALUE_OF_STORAGE_ENGINE_MEMORY_PROPORTION_IS_ILLEGAL_22CA9433 = + "The value of storage_engine_memory_proportion is illegal, use default value 8:2 ."; + public static final String MISC_LOG_THE_VALUE_OF_WRITE_MEMORY_PROPORTION_IS_ILLEGAL_USE_DEFAULT_EE4FA112 = + "The value of write_memory_proportion is illegal, use default value 19:1 ."; + public static final String MISC_LOG_SET_LOADTSFILESPILTPARTITIONMAXSIZE_FROM_TO_560BA8F7 = + "Set loadTsFileSpiltPartitionMaxSize from {} to {}"; + public static final String MISC_LOG_LOADTSFILESTATEMENTSPLITTHRESHOLD_CHANGED_FROM_TO_1CB90529 = + "loadTsFileStatementSplitThreshold changed from {} to {}"; + public static final String MISC_LOG_LOADTSFILESUBSTATEMENTBATCHSIZE_CHANGED_FROM_TO_D4EF3D07 = + "loadTsFileSubStatementBatchSize changed from {} to {}"; + public static final String MISC_LOG_CANNOT_FIND_GIVEN_DIRECTORY_STRATEGY_USING_THE_DEFAULT_VALUE_7997B145 = + "Cannot find given directory strategy {}, using the default value"; + public static final String MISC_LOG_CONFIG_PROPERTY_BOOLEAN_STRING_INFER_TYPE_CAN_ONLY_BE_BOOLEAN_2FA3AFC5 = + "Config Property boolean_string_infer_type can only be BOOLEAN or TEXT but is {}"; + public static final String MISC_LOG_CONFIG_PROPERTY_FLOATING_STRING_INFER_TYPE_CAN_ONLY_BE_FLOAT_8041EAC4 = + "Config Property floating_string_infer_type can only be FLOAT, DOUBLE or TEXT but is {}"; + public static final String MISC_LOG_CONFIG_PROPERTY_NAN_STRING_INFER_TYPE_CAN_ONLY_BE_FLOAT_61F60E0E = + "Config Property nan_string_infer_type can only be FLOAT, DOUBLE or TEXT but is {}"; + public static final String MISC_LOG_ILLEGAL_DEFAULTDATABASELEVEL_SHOULD_1_USE_DEFAULT_VALUE_97F43732 = + "Illegal defaultDatabaseLevel: {}, should >= 1, use default value 1"; + public static final String MISC_LOG_INVALID_LOADTSFILESTATEMENTSPLITTHRESHOLD_VALUE_USING_DEFAULT_45EA7FBF = + "Invalid loadTsFileStatementSplitThreshold value: {}. Using default value: 10"; + public static final String MISC_LOG_INVALID_LOADTSFILESUBSTATEMENTBATCHSIZE_VALUE_USING_DEFAULT_5C285109 = + "Invalid loadTsFileSubStatementBatchSize value: {}. Using default value: 10"; + public static final String MISC_LOG_FAILED_TO_UPDATE_THE_VALUE_OF_METRIC_BECAUSE_OF_CONNECTION_B0FC4929 = + "Failed to update the value of metric because of connection failure, because "; + public static final String MISC_LOG_FAILED_TO_UPDATE_THE_VALUE_OF_METRIC_BECAUSE_OF_INTERNAL_E5C64806 = + "Failed to update the value of metric because of internal error, because "; + public static final String MISC_LOG_FAILED_TO_STOP_EXTERNAL_SERVICE_S_BECAUSE_S_IT_WILL_BE_DROP_B2909C1E = + "Failed to stop External Service %s because %s. It will be drop forcedly"; + public static final String MISC_LOG_CHANGEREGIONLEADER_START_CHANGE_THE_LEADER_OF_REGIONGROUP_248A99AD = + "[ChangeRegionLeader] Start change the leader of RegionGroup: {} to DataNode: {}"; + public static final String MISC_LOG_SUCCESSFULLY_SUBMIT_ADDREGIONPEER_TASK_FOR_REGION_TARGET_64183781 = + "Successfully submit addRegionPeer task for region: {}, target DataNode: {}"; + public static final String MISC_LOG_SUCCESSFULLY_SUBMIT_REMOVEREGIONPEER_TASK_FOR_REGION_DATANODE_9B74B948 = + "Successfully submit removeRegionPeer task for region: {}, DataNode to be removed: {}"; + public static final String MISC_LOG_SUCCESSFULLY_SUBMIT_DELETEOLDREGIONPEER_TASK_FOR_REGION_3F3BB495 = + "Successfully submit deleteOldRegionPeer task for region: {}, DataNode to be removed: {}"; + public static final String MISC_LOG_START_TO_CREATENEWREGIONPEER_TO_REGION_6DCE04AD = + "{}, Start to createNewRegionPeer {} to region {}"; + public static final String MISC_LOG_SUCCEED_TO_CREATENEWREGIONPEER_FOR_REGION_FDF176E3 = + "{}, Succeed to createNewRegionPeer {} for region {}"; + public static final String MISC_LOG_EXECUTING_SYSTEM_EXIT_0_IN_STOPANDCLEARDATANODE_RPC_METHOD_647927C6 = + "Executing system.exit(0) in stopAndClearDataNode RPC method after 30 seconds"; + public static final String MISC_LOG_ERROR_OCCURRED_WHEN_PULLING_COMMIT_PROGRESS_48C12E4B = + "Error occurred when pulling commit progress"; + public static final String MISC_LOG_ERROR_OCCURRED_WHEN_RECEIVING_SUBSCRIPTION_PROGRESS_BROADCAST_94B2CF10 = + "Error occurred when receiving subscription progress broadcast"; + public static final String MISC_LOG_ERROR_OCCURRED_WHEN_PUSHING_SUBSCRIPTION_RUNTIME_STATE_D4E71CE3 = + "Error occurred when pushing subscription runtime state"; + public static final String MISC_LOG_FAILED_TO_PROCESS_CONSENSUS_SUBSCRIPTION_ROUTE_UPDATE_80D73E2B = + "Failed to process consensus subscription route update"; + public static final String MISC_LOG_THE_AVAILABLE_DISK_SPACE_IS_THE_TOTAL_DISK_SPACE_IS_AND_4506856F = + "The available disk space is : {}, the total disk space is : {}, and the remaining disk " + + "usage ratio: {} is less than disk_space_warning_threshold: {}, set system to readonly!"; + public static final String MISC_LOG_CHANGEREGIONLEADER_FAILED_TO_CHANGE_THE_LEADER_OF_REGIONGROUP_F1A1DC14 = + "[ChangeRegionLeader] Failed to change the leader of RegionGroup: {}"; + public static final String MISC_LOG_ERROR_OCCURRED_WHEN_CREATING_TRIGGER_INSTANCE_FOR_TRIGGER_5A8F8890 = + "Error occurred when creating trigger instance for trigger: {}. The cause is {}."; + public static final String MISC_LOG_ERROR_OCCURRED_DURING_ACTIVE_TRIGGER_INSTANCE_FOR_TRIGGER_7731ECF2 = + "Error occurred during active trigger instance for trigger: {}. The cause is {}."; + public static final String MISC_LOG_ERROR_OCCURRED_WHEN_TRY_TO_INACTIVE_TRIGGER_INSTANCE_FOR_FA93D7E7 = + "Error occurred when try to inactive trigger instance for trigger: {}. The cause is {}. "; + public static final String MISC_LOG_ERROR_OCCURRED_WHEN_DROPPING_TRIGGER_INSTANCE_FOR_TRIGGER_23B94EBE = + "Error occurred when dropping trigger instance for trigger: {}. The cause is {}."; + public static final String MISC_LOG_ERROR_OCCURRED_WHEN_UPDATING_LOCATION_FOR_TRIGGER_THE_CAUSE_1C076D98 = + "Error occurred when updating Location for trigger: {}. The cause is {}."; + public static final String MISC_LOG_CREATENEWREGIONPEER_ERROR_PEERS_REGIONID_ERRORMESSAGE_2EDAE3C8 = + "{}, CreateNewRegionPeer error, peers: {}, regionId: {}, errorMessage"; + public static final String MISC_LOG_FAILED_TO_SERIALIZE_DATABASESCOPEDDATAPARTITIONTABLE_FOR_2EFDD270 = + "Failed to serialize DatabaseScopedDataPartitionTable for database: {}"; + public static final String MISC_LOG_ERROR_OCCURRED_WHEN_TRYING_TO_FIRE_TRIGGER_ON_TENDPOINT_BFCBA56E = + "Error occurred when trying to fire trigger({}) on TEndPoint: {}, the cause is: {}"; + public static final String MISC_LOG_FAILED_TO_UPDATE_LOCATION_OF_STATEFUL_TRIGGER_THROUGH_CONFIG_E6777439 = + "Failed to update location of stateful trigger({}) through config node. The cause is {}."; + public static final String MISC_LOG_TRIGGER_WAS_FIRED_WITH_WRONG_EVENT_43D89454 = + "Trigger {} was fired with wrong event {}"; + public static final String MISC_LOG_DOES_NOT_EXIST_SKIP_IT_EFB94454 = + "{} does not exist ,skip it."; + public static final String MISC_LOG_ERROR_WHEN_PARSE_TAG_AND_ATTRIBUTES_FILE_OF_NODE_PATH_D1492217 = + "Error when parse tag and attributes file of node path {}"; + public static final String MISC_LOG_TOTALLY_FIND_TSFILES_TO_BE_SETTLED_INCLUDING_TSFILES_TO_522BCA28 = + "Totally find {} tsFiles to be settled, including {} tsFiles to be recovered."; + public static final String MISC_LOG_FINISH_SETTLING_SUCCESSFULLY_FOR_TSFILE_C8BF06D7 = + "Finish settling successfully for tsFile : {}"; + public static final String MISC_LOG_MEET_ERROR_WHILE_SETTLING_THE_TSFILE_A3515E1A = + "Meet error while settling the tsFile : {}"; + public static final String MISC_LOG_FINISH_SETTLING_TSFILES_MEET_ERRORS_6B564B68 = + "Finish Settling, {} tsfiles meet errors."; + public static final String MISC_LOG_THE_TSFILE_SHOULD_BE_SEALED_WHEN_REWRITTING_8B631F6C = + "The tsFile {} should be sealed when rewritting."; + public static final String MISC_LOG_MEET_ERROR_WHEN_READING_SETTLE_LOG_LOG_PATH_2B076234 = + "meet error when reading settle log, log path:{}"; + + // --------------------------------------------------------------------------- + // Additional exception messages + // --------------------------------------------------------------------------- + public static final String MISC_EXCEPTION_CANNOT_LOAD_FILE_S_BECAUSE_THE_FILE_HAS_CRASHED_6C180DF9 = + "Cannot load file %s because the file has crashed."; + public static final String MISC_EXCEPTION_THE_VERSION_OF_THIS_TSFILE_IS_TOO_LOW_PLEASE_UPGRADE_IT_19CC276C = + "The version of this tsfile is too low, please upgrade it to the version 4."; + public static final String MISC_EXCEPTION_TSFILE_REWRITE_PROCESS_CANNOT_PROCEED_AT_POSITION_SBECAUSE_3763D32F = + "TsFile rewrite process cannot proceed at position %sbecause: %s"; + public static final String MISC_EXCEPTION_DATA_TYPE_S_IS_NOT_SUPPORTED_5D5C02E4 = + "Data type %s is not supported."; + public static final String MISC_EXCEPTION_WINDOW_SIZE_MUST_BE_BETWEEN_D_AND_D_GOT_D_3559BE09 = + "Window size must be between %d and %d, got %d"; + public static final String MISC_EXCEPTION_CONFIDENCE_LEVEL_MUST_BE_BETWEEN_0_AND_1_GOT_F_2CDA358E = + "Confidence level must be between 0 and 1, got %f"; + public static final String MISC_EXCEPTION_PERCENTILE_MUST_BE_BETWEEN_0_AND_1_GOT_F_DE6B1311 = + "Percentile must be between 0 and 1, got %f"; + public static final String MISC_EXCEPTION_IRREGULAR_DATA_DIR_STRUCTURE_THERE_SHOULD_BE_A_SEQUENCE_95B4D431 = + "Irregular data dir structure.There should be a sequence and unsequence directory under the " + + "data directory %s"; + public static final String MISC_EXCEPTION_IRREGULAR_DATA_DIR_STRUCTURE_THERE_SHOULD_BE_DATABASE_DIRECTORIES_10C36DC2 = + "Irregular data dir structure.There should be database directories under the " + + "sequence/unsequence directory %s"; + public static final String MISC_EXCEPTION_IRREGULAR_DATA_DIR_STRUCTURE_THERE_SHOULD_BE_DATAREGION_6BCDBFA1 = + "Irregular data dir structure.There should be dataRegion directories under the database " + + "directory %s"; + public static final String MISC_EXCEPTION_IRREGULAR_DATA_DIR_STRUCTURE_THERE_SHOULD_BE_TIMEINTERVAL_8D074700 = + "Irregular data dir structure.There should be timeInterval directories under the database " + + "directory %s"; + public static final String MISC_EXCEPTION_IRREGULAR_DATA_DIR_STRUCTURE_THERE_SHOULD_BE_TSFILES_UNDER_6381FDA5 = + "Irregular data dir structure.There should be tsfiles under the timeInterval directories " + + "directory %s"; + public static final String MISC_EXCEPTION_USER_S_DOES_NOT_EXIST_0CE725D8 = + "User %s does not exist"; + public static final String MISC_EXCEPTION_DATA_TYPE_IS_NOT_CONSISTENT_INPUT_S_REGISTERED_S_AE9DBDC0 = + "data type is not consistent, input %s, registered %s"; + public static final String MISC_EXCEPTION_DATA_TYPE_IS_NOT_CONSISTENT_INPUT_S_REGISTERED_S_BECAUSE_50C4BF31 = + "data type is not consistent, input %s, registered %s because %s"; + public static final String MISC_EXCEPTION_DATA_TYPE_S_IS_NOT_SUPPORTED_WHEN_CONVERT_DATA_AT_CLIENT_405429CC = + "data type %s is not supported when convert data at client"; + public static final String MISC_EXCEPTION_DEVICEID_SHOULD_NOT_BE_EMPTY_IN_GETTTL_METHOD_IN_TIMEFILTERFORDEVICETTL_8A501A45 = + "deviceID should not be empty in getTTL method in TimeFilterForDeviceTTL"; + public static final String MISC_EXCEPTION_FAILED_TO_DECOMPRESS_COMPRESSEDBUFFER_56398D3E = + "Failed to decompress compressedBuffer"; + public static final String MISC_EXCEPTION_ENCODING_S_DOES_NOT_SUPPORT_S_58301155 = + "encoding %s does not support %s"; + public static final String MISC_EXCEPTION_STORAGEENGINE_FAILED_TO_STOP_BECAUSE_OF_S_84D26574 = + "StorageEngine failed to stop because of %s."; + public static final String MISC_EXCEPTION_THE_FILE_LENGTH_S_IS_NOT_EQUAL_TO_THE_OFFSET_S_73905F07 = + "The file length %s is not equal to the offset %s"; + public static final String MISC_EXCEPTION_THE_REMOVE_DATANODE_SCRIPT_HAS_BEEN_DEPRECATED_PLEASE_CONNECT_F91DF360 = + "The remove-datanode script has been deprecated. Please connect to the CLI and use SQL: " + + "remove datanode [datanode_id]."; + public static final String MISC_EXCEPTION_CANNOT_PULL_SYSTEM_CONFIGURATIONS_FROM_CONFIGNODE_LEADER_BAD295DC = + "Cannot pull system configurations from ConfigNode-leader. Please check whether the " + + "dn_seed_config_node in iotdb-system.properties is correct or alive."; + public static final String MISC_EXCEPTION_CANNOT_REGISTER_INTO_THE_CLUSTER_PLEASE_CHECK_WHETHER_THE_D8B29F58 = + "Cannot register into the cluster. Please check whether the dn_seed_config_node in " + + "iotdb-system.properties is correct or alive."; + public static final String MISC_EXCEPTION_CANNOT_SEND_RESTART_DATANODE_REQUEST_TO_CONFIGNODE_LEADER_368BE214 = + "Cannot send restart DataNode request to ConfigNode-leader. Please check whether the " + + "dn_seed_config_node in iotdb-system.properties is correct or alive."; + public static final String MISC_EXCEPTION_FAIL_TO_GET_SG_OF_THIS_TSFILE_WHILE_PARSING_THE_FILE_PATH_9EADADE1 = + "Fail to get sg of this tsFile while parsing the file path."; + public static final String MISC_EXCEPTION_CONFIGURING_THE_DATA_DIRECTORIES_AS_CROSS_DISK_DIRECTORIES_FC0A3875 = + "Configuring the data directories as cross-disk directories is not supported under " + + "RatisConsensus(it will be supported in a later version)."; + public static final String MISC_EXCEPTION_CONFIGURING_THE_WALMODE_AS_DISABLE_IS_NOT_SUPPORTED_UNDER_49298819 = + "Configuring the WALMode as disable is not supported under IoTConsensus and IoTConsensusV2 " + + "stream mode"; + public static final String MISC_EXCEPTION_ENCRYPTTYPE_IS_NOT_UNENCRYPTED_BUT_USER_ENCRYPT_TOKEN_IS_F828C20B = + "encryptType is not UNENCRYPTED, but user_encrypt_token is not set. Please set it in the " + + "environment variable."; + public static final String MISC_EXCEPTION_USER_ENCRYPT_TOKEN_HINT_SHOULD_NOT_INCLUDE_USER_ENCRYPT_50531D40 = + "user_encrypt_token_hint should not include user_encrypt_token, please check it in your " + + "environment variable."; + public static final String MISC_EXCEPTION_USER_ENCRYPT_TOKEN_HINT_SHOULD_NOT_INCLUDE_THE_REVERSE_OF_39B2D35C = + "user_encrypt_token_hint should not include the reverse of user_encrypt_token, please check " + + "it in your environment variable."; + public static final String MISC_EXCEPTION_RESTART_SYSTEM_AFTER_NOT_STORING_KEY_BUT_USER_ENCRYPT_TOKEN_61CCF9A2 = + "restart system after not storing key, but user_encrypt_token is not set. Please set it in " + + "the environment variable before restart. Here is your token hint info: %s"; + public static final String MISC_EXCEPTION_CHANGING_ENCRYPT_TYPE_OR_KEY_FOR_TSFILE_ENCRYPTION_AFTER_0668F74E = + "Changing encrypt type or key for tsfile encryption after first start is not permitted. Here " + + "is your token hint info: %s"; + public static final String MISC_EXCEPTION_FAIL_TO_RELOAD_CONFIG_FILE_S_BECAUSE_S_93CCAB8D = + "Fail to reload config file %s because %s"; + public static final String MISC_EXCEPTION_EACH_SUBSECTION_OF_CONFIGURATION_ITEM_UDF_READER_TRANSFORMER_97CA8962 = + "Each subsection of configuration item udf_reader_transformer_collector_memory_proportion " + + "should be an integer, which is %s"; + public static final String MISC_EXCEPTION_EACH_SUBSECTION_OF_CONFIGURATION_ITEM_CHUNKMETA_CHUNK_TIMESERIESMETA_77A43CE2 = + "Each subsection of configuration item chunkmeta_chunk_timeseriesmeta_free_memory_proportion " + + "should be an integer, which is %s"; + public static final String MISC_EXCEPTION_ILLEGAL_DEFAULTDATABASELEVEL_D_SHOULD_1_03088B38 = + "Illegal defaultDatabaseLevel: %d, should >= 1"; + public static final String MISC_EXCEPTION_LOADTSFILESPILTPARTITIONMAXSIZE_SHOULD_BE_GREATER_THAN_OR_95B4DB23 = + "loadTsFileSpiltPartitionMaxSize should be greater than or equal to 0"; + public static final String MISC_EXCEPTION_REMOVING_IS_ONLY_ALLOWED_IN_AN_ENVIRONMENT_WHERE_THE_DATANODE_5A3E1FEA = + "Removing is only allowed in an environment where the datanode has been successfully " + + "started. Please check whether it is removed on the confignode, or if you have deleted the " + + "system.properties file by mistake."; + public static final String MISC_EXCEPTION_STATEMENTID_SDOESN_T_EXIST_IN_THIS_SESSION_S_BD5B4733 = + "StatementId: %sdoesn't exist in this session %s"; + public static final String MISC_EXCEPTION_INTERNALCLIENTSESSION_SHOULD_NEVER_CALL_PREPARE_STATEMENT_CCAB3CDC = + "InternalClientSession should never call PREPARE statement methods."; + public static final String MISC_EXCEPTION_STATEMENTID_S_DOESN_T_EXIST_IN_THIS_SESSION_S_4AA25E49 = + "StatementId: %s doesn't exist in this session %s"; + public static final String MISC_EXCEPTION_MQTT_CLIENT_SESSION_DOES_NOT_SUPPORT_PREPARE_STATEMENT_B42FBC65 = + "MQTT client session does not support PREPARE statement."; + public static final String MISC_EXCEPTION_DATAREGIONLIST_SIZE_SHOULD_ONLY_BE_1_NOW_CURRENT_SIZE_IS_282E453C = + "dataRegionList.size() should only be 1 now, current size is %s"; + public static final String MISC_EXCEPTION_PARAMETER_WINDOWSIZE_D_SHOULD_BE_POSITIVE_D95CBF33 = + "Parameter windowSize(%d) should be positive."; + public static final String MISC_EXCEPTION_PARAMETER_SLIDINGSTEP_D_SHOULD_BE_POSITIVE_C0C25C2C = + "Parameter slidingStep(%d) should be positive."; + public static final String MISC_EXCEPTION_PARAMETER_TIMEINTERVAL_D_SHOULD_BE_POSITIVE_53A6CE3B = + "Parameter timeInterval(%d) should be positive."; + public static final String MISC_EXCEPTION_FAILED_TO_REFLECT_TRIGGER_INSTANCE_WITH_CLASSNAME_S_BECAUSE_C0CC44E2 = + "Failed to reflect trigger instance with className(%s), because %s"; + public static final String MISC_EXCEPTION_S_IS_NOT_ALLOWED_ONLY_SUPPORT_S_862A4D86 = + "%s is not allowed, only support %s"; + public static final String MISC_EXCEPTION_S_IS_NOT_ALLOWED_ONLY_SUPPORT_S_1B06E0B7 = + " %s is not allowed, only support %s"; + public static final String PARAMETER_CANNOT_BE_MODIFIED_AFTER_FIRST_STARTUP_FMT = + "%s can't be modified after first startup"; + public static final String UNSUPPORTED_INVOCATION_BY_DATANODE = + "This method is not supported for invocation by DataNode"; + public static final String UNSUPPORTED_INVOCATION_BY_DATANODE_USE_SUBMIT_LOAD_CONFIGURATION_TASK = + "This method is not supported for invocation by DataNode, please call " + + "submitLoadConfigurationTask instead"; + public static final String INVALID_REQUEST_FROM_CONFIG_NODE_FMT = + "Invalid request %s from config node."; + public static final String INVALID_METHOD_NAME_FMT = "Invalid method name: '%s'"; + public static final String DATA_PARTITION_TABLE_GENERATION_IN_PROGRESS_FMT = + "DataPartitionTable generation in progress: %.1f%%"; + public static final String DATA_PARTITION_TABLE_GENERATION_WITH_TASK_ID_IN_PROGRESS_FMT = + "DataPartitionTable generation with task ID: %s in progress: %.1f%%"; + public static final String DATA_PARTITION_TABLE_GENERATION_COMPLETED_STATS = + "DataPartitionTable generation completed successfully. Processed: {}, Failed: {}"; + public static final String DATA_PARTITION_TABLE_GENERATION_ALREADY_IN_PROGRESS_FMT = + "DataPartitionTable generation is already in the progress: %.1f%%"; + public static final String DATA_PARTITION_TABLE_GENERATION_COMPLETED_SUCCESSFULLY = + "DataPartitionTable generation completed successfully"; + public static final String DATA_PARTITION_TABLE_GENERATION_FAILED_FMT = + "DataPartitionTable generation failed: %s"; + public static final String BATCH_PROCESS_FAILED_FMT = "Batch process failed:%s"; + public static final String STORAGE_GROUP_NOT_READY_FMT = + "the sg %s may not ready now, please wait and retry later"; + public static final String BAD_NODE_URL_FORMAT_FMT = + "Node url %s has bad format, which should be {IP/DomainName}:{Port}"; + public static final String INCONSISTENT_DATA_TYPES_FMT = + "Inconsistent data types, existing data type: %s, incoming: %s"; + public static final String CREATE_SYSTEM_DIRECTORY_FAILED = "Create system directory failed! "; + public static final String DATABASE_READ_ONLY_NON_QUERY = + "Database is read-only, and does not accept non-query operation now"; + public static final String AINODE_CONNECTION_FAILED_FMT = + "Failed to connect to AINode because [%s], please check the status of your AINode."; + public static final String AINODE_CLIENT_REFRESH_FROM_CONFIG_NODE_FAILED = + "[AINodeClient] refreshFromConfigNode failed: {}"; + + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String MESSAGE_DB_34B9E556 = " ON DB:"; + public static final String MESSAGE_MESSAGE_CECB319D = " ON "; + public static final String MESSAGE_MESSAGE_57992626 = " on "; + public static final String MESSAGE_REGION_ARG_STATE_ARG_EXECUTED_SUCCEED_F78C5849 = "Region: %s, state: %s, executed succeed"; + public static final String MESSAGE_FAILED_CREATE_EXTERNAL_SERVICE_ARG_IT_ALREADY_EXISTS_50AE69DF = "Failed to create External Service %s, it already exists!"; + public static final String MESSAGE_FAILED_START_EXTERNAL_SERVICE_ARG_BECAUSE_IT_NOT_EXISTED_29D6D3F2 = "Failed to start External Service %s, because it is not existed!"; + public static final String MESSAGE_FAILED_START_EXTERNAL_SERVICE_ARG_BECAUSE_ITS_INSTANCE_CAN_NOT_F5A6C198 = + "Failed to start External Service %s, because its instance can not be constructed" + + " successfully. Exception: %s"; + public static final String MESSAGE_FAILED_STOP_EXTERNAL_SERVICE_ARG_BECAUSE_IT_NOT_EXISTED_3CCCDA42 = "Failed to stop External Service %s, because it is not existed!"; + public static final String MESSAGE_FAILED_DROP_EXTERNAL_SERVICE_ARG_BECAUSE_IT_NOT_EXISTED_FDD11F17 = "Failed to drop External Service %s, because it is not existed!"; + public static final String MESSAGE_FAILED_DROP_EXTERNAL_SERVICE_ARG_BECAUSE_IT_BUILT_59858F3F = "Failed to drop External Service %s, because it is BUILT-IN!"; + public static final String MESSAGE_FAILED_DROP_EXTERNAL_SERVICE_ARG_BECAUSE_IT_RUNNING_89B38F80 = "Failed to drop External Service %s, because it is RUNNING!"; + public static final String MESSAGE_CHANGEREGIONLEADER_SUCCESSFULLY_CHANGE_LEADER_REGIONGROUP_462797B4 = "[ChangeRegionLeader] Successfully change the leader of RegionGroup: "; + public static final String MESSAGE_MESSAGE_3501C7E6 = " to "; + public static final String MESSAGE_EXECUTEFASTLASTDATAQUERYFORONEPREFIXPATH_DOS_NOT_SUPPORT_WILDCARDS_8E8F44F5 = "The \"executeFastLastDataQueryForOnePrefixPath\" dos not support wildcards."; + public static final String MESSAGE_TEMPLATE_NULL_TRYING_ACTIVATE_TEMPLATE_MAY_TEMPLATE_BEING_UNSET_1CE92779 = "The template is null when trying to activate template, may be the template is being unset."; + public static final String MESSAGE_DOT_9D9B854A = "."; + public static final String MESSAGE_ERROR_OCCURRED_WHILE_PARSING_SQL_TO_PHYSICAL_PLAN_COLON_5C9F2C59 = "Error occurred while parsing SQL to physical plan: "; + public static final String MESSAGE_ERROR_OCCURRED_IN_READ_PROCESS_COLON_CD184195 = "Error occurred in read process: "; + public static final String MESSAGE_THE_READ_STATEMENT_IS_NOT_ALLOWED_IN_BATCH_COLON_D6A3D5EB = "The read statement is not allowed in batch: "; + public static final String MESSAGE_LEFT_BRACKET_ARG_RIGHT_BRACKET_EXCEPTION_OCCURRED_COLON_ARG_FAILED_DOT_909D8FFA = "[%s] Exception occurred: %s failed. "; + public static final String EXCEPTION_SUFFIX_IS_NULL_6CC6B965 = "Suffix is null"; + public static final String EXCEPTION_RUNTIMESTATE_D4D018BA = "runtimeState"; + public static final String EXCEPTION_STATEMENTNAME_IS_NULL_C03BB8D4 = "statementName is null"; + public static final String EXCEPTION_SQL_IS_NULL_BEDB2B7A = "sql is null"; + } diff --git a/iotdb-core/datanode/src/main/i18n/en/org/apache/iotdb/db/i18n/DataNodePipeMessages.java b/iotdb-core/datanode/src/main/i18n/en/org/apache/iotdb/db/i18n/DataNodePipeMessages.java index f669934149d9e..1f0288901b798 100644 --- a/iotdb-core/datanode/src/main/i18n/en/org/apache/iotdb/db/i18n/DataNodePipeMessages.java +++ b/iotdb-core/datanode/src/main/i18n/en/org/apache/iotdb/db/i18n/DataNodePipeMessages.java @@ -1383,6 +1383,8 @@ public final class DataNodePipeMessages { // pipe – OpcUaServerBuilder // --------------------------------------------------------------------------- public static final String UNABLE_CREATE_SECURITY_DIR = "Unable to create security dir: "; + public static final String OPC_UA_SECURITY_DIR = "Security dir: {}"; + public static final String OPC_UA_SECURITY_PKI_DIR = "Security pki dir: {}"; // --------------------------------------------------------------------------- // pipe – PipeDataNodePluginAgent @@ -1396,4 +1398,918 @@ public final class DataNodePipeMessages { "TPipeTransferResp is null when transferring slice."; private DataNodePipeMessages() {} + // --------------------------------------------------------------------------- + // Additional log messages + // --------------------------------------------------------------------------- + public static final String PIPE_LOG_SUBSCRIPTION_DETECT_DUPLICATED_PIPETSFILEINSERTIONEVENT_23A4740C = + "Subscription: Detect duplicated PipeTsFileInsertionEvent {}, commit it directly"; + public static final String PIPE_LOG_SUBSCRIPTION_PREFETCHING_QUEUE_BOUND_TO_TOPIC_FOR_CONSUMER_ECB64624 = + "Subscription: prefetching queue bound to topic [{}] for consumer group [{}] is completed, " + + "return termination response to client"; + public static final String PIPE_LOG_SUBSCRIPTION_PREFETCHING_QUEUE_BOUND_TO_TOPIC_FOR_CONSUMER_8F561EB2 = + "Subscription: prefetching queue bound to topic [{}] for consumer group [{}] is completed, " + + "reply to client heartbeat request"; + public static final String PIPE_LOG_SUBSCRIPTION_CREATE_PREFETCHING_QUEUE_BOUND_TO_TOPIC_FOR_E7F21F1E = + "Subscription: create prefetching queue bound to topic [{}] for consumer group [{}]"; + public static final String PIPE_LOG_SUBSCRIPTION_DROP_PREFETCHING_QUEUE_BOUND_TO_TOPIC_FOR_CONSUMER_21F313CB = + "Subscription: drop prefetching queue bound to topic [{}] for consumer group [{}]"; + public static final String PIPE_LOG_SUBSCRIPTION_PREFETCHING_QUEUE_BOUND_TO_TOPIC_FOR_CONSUMER_03B89C51 = + "Subscription: prefetching queue bound to topic [{}] for consumer group [{}] still exists, " + + "unbind it before closing"; + public static final String PIPE_LOG_SUBSCRIPTION_PREFETCHING_QUEUE_BOUND_TO_TOPIC_FOR_CONSUMER_EA7D450B = + "Subscription: prefetching queue bound to topic [{}] for consumer group [{}] is closed"; + public static final String PIPE_LOG_SUBSCRIPTION_PREFETCHING_QUEUE_BOUND_TO_TOPIC_FOR_CONSUMER_12E69B65 = + "Subscription: prefetching queue bound to topic [{}] for consumer group [{}] does not exist"; + public static final String PIPE_LOG_SUBSCRIPTION_PREFETCHING_QUEUE_BOUND_TO_TOPIC_FOR_CONSUMER_C2735402 = + "Subscription: prefetching queue bound to topic [{}] for consumer group [{}] has already " + + "existed"; + public static final String PIPE_LOG_SUBSCRIPTIONPREFETCHINGTABLETQUEUE_DETECTED_OUTDATED_POLL_C0001CCF = + "SubscriptionPrefetchingTabletQueue {} detected outdated poll request, consumer {}, commit " + + "context {}, offset {}"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONBROKER_POLL_CALLED_CONSUMERID_TOPICNAMES_5F1F5175 = + "ConsensusSubscriptionBroker [{}]: poll called, consumerId={}, topicNames={}, queueCount={}, " + + "maxBytes={}"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONBROKER_POLL_RESULT_CONSUMERID_EVENTSPOLLED_06412726 = + "ConsensusSubscriptionBroker [{}]: poll result, consumerId={}, eventsPolled={}, " + + "eventsNacked={}"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONBROKER_REFRESHED_OWNERSHIP_FOR_TOPIC_EB11CF64 = + "ConsensusSubscriptionBroker [{}]: refreshed ownership for topic [{}], consumers={}, " + + "regions={}, generation={}"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONBROKER_STABLE_OWNERSHIP_POLL_ORDER_D40BB7D4 = + "ConsensusSubscriptionBroker [{}]: stable ownership poll order for topic [{}], " + + "assignedQueueCount={}"; + public static final String PIPE_LOG_SUBSCRIPTION_CONSENSUS_PREFETCHING_QUEUE_FOR_TOPIC_REGION_B40792D9 = + "Subscription: consensus prefetching queue for topic [{}], region [{}] in consumer group " + + "[{}] already exists, skipping"; + public static final String PIPE_LOG_SUBSCRIPTION_CREATE_CONSENSUS_PREFETCHING_QUEUE_BOUND_TO_0DBFC05E = + "Subscription: create consensus prefetching queue bound to topic [{}] for consumer group " + + "[{}], consensusGroupId={}, fallbackCommittedRegionProgress={}, tailStartSearchIndex={}, " + + "initialRuntimeVersion={}, initialActive={}, totalRegionQueues={}"; + public static final String PIPE_LOG_SUBSCRIPTION_CLOSED_CONSENSUS_PREFETCHING_QUEUE_FOR_TOPIC_3A9DDEC5 = + "Subscription: closed consensus prefetching queue for topic [{}] region [{}] in consumer " + + "group [{}] due to region removal"; + public static final String PIPE_LOG_SUBSCRIPTION_CONSENSUS_PREFETCHING_QUEUE_S_BOUND_TO_TOPIC_AB10ED07 = + "Subscription: consensus prefetching queue(s) bound to topic [{}] for consumer group [{}] " + + "still exist, unbind before closing"; + public static final String PIPE_LOG_SUBSCRIPTION_DROP_ALL_CONSENSUS_PREFETCHING_QUEUE_S_BOUND_FCC1B2C4 = + "Subscription: drop all {} consensus prefetching queue(s) bound to topic [{}] for consumer " + + "group [{}]"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONBROKER_NO_QUEUES_FOR_TOPIC_TO_COMMIT_7D8CC39D = + "ConsensusSubscriptionBroker [{}]: no queues for topic [{}] to commit"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONBROKER_COMMIT_CONTEXT_NOT_FOUND_IN_46DF62A6 = + "ConsensusSubscriptionBroker [{}]: commit context {} not found in any of {} region queue(s) " + + "for topic [{}]"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONBROKER_NO_QUEUES_FOR_TOPIC_TO_SEEK_6307A90D = + "ConsensusSubscriptionBroker [{}]: no queues for topic [{}] to seek"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONBROKER_UNSUPPORTED_SEEKTYPE_FOR_TOPIC_EDCA2CF2 = + "ConsensusSubscriptionBroker [{}]: unsupported seekType {} for topic [{}]"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONBROKER_NO_QUEUES_FOR_TOPIC_TO_SEEK_9AC3890C = + "ConsensusSubscriptionBroker [{}]: no queues for topic [{}] to seek(topicProgress)"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONBROKER_NO_QUEUES_FOR_TOPIC_TO_SEEKAFTER_C6D87BFD = + "ConsensusSubscriptionBroker [{}]: no queues for topic [{}] to seekAfter(topicProgress)"; + public static final String PIPE_LOG_SUBSCRIPTION_CONSENSUS_PREFETCHING_QUEUES_BOUND_TO_TOPIC_63B37089 = + "Subscription: consensus prefetching queues bound to topic [{}] for consumer group [{}] do " + + "not exist"; + public static final String PIPE_LOG_SUBSCRIPTIONPREFETCHINGTSFILEQUEUE_DETECTED_OUTDATED_POLL_7E0CE108 = + "SubscriptionPrefetchingTsFileQueue {} detected outdated poll request, consumer {}, commit " + + "context {}, writing offset {}"; + public static final String PIPE_LOG_SUBSCRIPTION_SUBSCRIPTIONPREFETCHINGQUEUE_COMMIT_PIPETERMINATEEVENT_36529DC9 = + "Subscription: SubscriptionPrefetchingQueue {} commit PipeTerminateEvent {}"; + public static final String PIPE_LOG_SUBSCRIPTION_SUBSCRIPTIONPREFETCHINGQUEUE_IGNORE_ENRICHEDEVENT_95C6241C = + "Subscription: SubscriptionPrefetchingQueue {} ignore EnrichedEvent {} when prefetching."; + public static final String PIPE_LOG_SUBSCRIPTION_SUBSCRIPTIONPREFETCHINGQUEUE_POLL_COMMITTED_8684FF17 = + "Subscription: SubscriptionPrefetchingQueue {} poll committed event {} from prefetching " + + "queue (broken invariant), remove it"; + public static final String PIPE_LOG_SUBSCRIPTION_SUBSCRIPTIONPREFETCHINGQUEUE_POLL_NON_POLLABLE_644D5D6B = + "Subscription: SubscriptionPrefetchingQueue {} poll non-pollable event {} from prefetching " + + "queue (broken invariant), nack and remove it"; + public static final String PIPE_LOG_SUBSCRIPTION_SUBSCRIPTIONPREFETCHINGQUEUE_INTERRUPTED_WHILE_F8923826 = + "Subscription: SubscriptionPrefetchingQueue {} interrupted while polling events."; + public static final String PIPE_LOG_SUBSCRIPTION_INCONSISTENT_HEARTBEAT_EVENT_WHEN_PEEKING_BROKEN_BFE1DF6E = + "Subscription: inconsistent heartbeat event when {} peeking (broken invariant), expected {}, " + + "actual {}, offer back"; + public static final String PIPE_LOG_SUBSCRIPTION_SUBSCRIPTIONPREFETCHINGQUEUE_ONLY_SUPPORT_PREFETCH_F3B33B30 = + "Subscription: SubscriptionPrefetchingQueue {} only support prefetch EnrichedEvent. Ignore " + + "{}."; + public static final String PIPE_LOG_SUBSCRIPTION_SUBSCRIPTIONPREFETCHINGQUEUE_PREFETCH_TSFILEINSERTIONEVENT_19444D2C = + "Subscription: SubscriptionPrefetchingQueue {} prefetch TsFileInsertionEvent when " + + "ToTabletIterator is not null (broken invariant). Ignore {}."; + public static final String PIPE_LOG_FAILED_TO_INCREASE_REFERENCE_COUNT_FOR_WHEN_ON_RETRYABLE_4E10BE3B = + "Failed to increase reference count for {} when {} on retryable TabletInsertionEvent"; + public static final String PIPE_LOG_EXCEPTION_OCCURRED_WHEN_ON_RETRYABLE_TABLETINSERTIONEVENT_2350D9F7 = + "Exception occurred when {} on retryable TabletInsertionEvent {}"; + public static final String PIPE_LOG_SUBSCRIPTION_SUBSCRIPTION_COMMIT_CONTEXT_DOES_NOT_EXIST_0E4EF990 = + "Subscription: subscription commit context {} does not exist, it may have been committed or " + + "something unexpected happened, prefetching queue: {}"; + public static final String PIPE_LOG_SUBSCRIPTION_SUBSCRIPTION_EVENT_IS_COMMITTED_SUBSCRIPTION_BEE17D7F = + "Subscription: subscription event {} is committed, subscription commit context {}, " + + "prefetching queue: {}"; + public static final String PIPE_LOG_SUBSCRIPTION_SUBSCRIPTION_EVENT_IS_NOT_COMMITTABLE_SUBSCRIPTION_8D03A10C = + "Subscription: subscription event {} is not committable, subscription commit context {}, " + + "prefetching queue: {}"; + public static final String PIPE_LOG_INCONSISTENT_CONSUMER_GROUP_WHEN_ACKING_EVENT_CURRENT_INCOMING_AEE3E90F = + "inconsistent consumer group when acking event, current: {}, incoming: {}, consumer id: {}, " + + "event commit context: {}, prefetching queue: {}, commit it anyway..."; + public static final String PIPE_LOG_SUBSCRIPTION_SUBSCRIPTION_COMMIT_CONTEXT_DOES_NOT_EXIST_DE907E05 = + "Subscription: subscription commit context [{}] does not exist, it may have been committed " + + "or something unexpected happened, prefetching queue: {}"; + public static final String PIPE_LOG_INCONSISTENT_CONSUMER_GROUP_WHEN_NACKING_EVENT_CURRENT_INCOMING_B0104C41 = + "inconsistent consumer group when nacking event, current: {}, incoming: {}, consumer id: {}, " + + "event commit context: {}, prefetching queue: {}, commit it anyway..."; + public static final String PIPE_LOG_SUBSCRIPTION_SUBSCRIPTIONPREFETCHINGQUEUE_RECYCLE_EVENT_7B120BC3 = + "Subscription: SubscriptionPrefetchingQueue {} recycle event {} from in flight events, nack " + + "and enqueue it to prefetching queue"; + public static final String PIPE_LOG_SUBSCRIPTION_POISON_MESSAGE_DETECTED_NACKCOUNT_FORCE_ACKING_7528DD6B = + "Subscription: poison message detected (nackCount={}), force-acking event {} in prefetching " + + "queue: {}"; + public static final String PIPE_LOG_SUBSCRIPTION_POISON_MESSAGE_DETECTED_NACKCOUNT_FORCE_ACKING_D984349C = + "Subscription: poison message detected (nackCount={}), force-acking eagerly pollable event " + + "{} in prefetching queue: {}"; + public static final String PIPE_LOG_SUBSCRIPTION_POISON_MESSAGE_DETECTED_NACKCOUNT_FORCE_ACKING_FEF0F0BF = + "Subscription: poison message detected (nackCount={}), force-acking pollable event {} in " + + "prefetching queue: {}"; + public static final String PIPE_LOG_SUBSCRIPTION_UNKNOWN_PIPESUBSCRIBEREQUESTVERSION_RESPONSE_56E5D93F = + "Subscription: Unknown PipeSubscribeRequestVersion, response status = {}."; + public static final String PIPE_LOG_THE_SUBSCRIPTION_REQUEST_VERSION_IS_DIFFERENT_FROM_THE_CLIENT_324A125F = + "The subscription request version {} is different from the client request version {}, the " + + "receiver will be reset to the client request version."; + public static final String PIPE_LOG_SUBSCRIPTION_CONSENSUS_IS_A_NO_OP_ON_THIS_DATANODE_BECAUSE_28F7E92B = + "Subscription: consensus {} is a no-op on this DataNode because no local queue exists, " + + "consumerGroup={}, topic={}"; + public static final String PIPE_LOG_SUBSCRIPTIONBROKERAGENT_REFRESHING_CONSENSUS_QUEUE_ORDER_1886704D = + "SubscriptionBrokerAgent: refreshing consensus queue order-mode for topic [{}] to [{}]"; + public static final String PIPE_LOG_SUBSCRIPTION_UNBOUND_CONSENSUS_PREFETCHING_QUEUE_S_FOR_REMOVED_AC018742 = + "Subscription: unbound {} consensus prefetching queue(s) for removed region [{}]"; + public static final String PIPE_LOG_SUBSCRIPTIONBROKERAGENT_SETACTIVEFORREGION_REGIONID_ACTIVE_4AC3A2CB = + "SubscriptionBrokerAgent: setActiveForRegion regionId={}, active={}"; + public static final String PIPE_LOG_SUBSCRIPTIONBROKERAGENT_SETACTIVEWRITERSFORREGION_REGIONID_48B39B3E = + "SubscriptionBrokerAgent: setActiveWritersForRegion regionId={}, activeWriterNodeIds={}"; + public static final String PIPE_LOG_SUBSCRIPTIONBROKERAGENT_APPLYRUNTIMESTATEFORREGION_REGIONID_6D8C37A1 = + "SubscriptionBrokerAgent: applyRuntimeStateForRegion regionId={}, runtimeState={}"; + public static final String PIPE_LOG_SUBSCRIPTION_FAILED_TO_PARSE_CONSENSUS_REGION_ID_FOR_COMMITTED_9F1A50EB = + "Subscription: failed to parse consensus region id {} for committed progress, topic={}, " + + "consumerGroup={}"; + public static final String PIPE_LOG_SUBSCRIPTION_CONSENSUS_BROKER_BOUND_TO_CONSUMER_GROUP_DOES_E46FCDD9 = + "Subscription: consensus broker bound to consumer group [{}] does not exist"; + public static final String PIPE_LOG_SUBSCRIPTION_PIPE_BROKER_BOUND_TO_CONSUMER_GROUP_DOES_NOT_E9B60B22 = + "Subscription: pipe broker bound to consumer group [{}] does not exist"; + public static final String PIPE_LOG_SUBSCRIPTION_BROKER_BOUND_TO_CONSUMER_GROUP_DOES_NOT_EXIST_74CAD5BE = + "Subscription: broker bound to consumer group [{}] does not exist"; + public static final String PIPE_LOG_SUBSCRIPTION_CONSUMER_GROUP_META_CHANGE_DETECTED_TOPICSUNSUBBYGROUP_F6DAF20A = + "Subscription: consumer group [{}] meta change detected, topicsUnsubByGroup={}, " + + "newlySubscribedTopics={}"; + public static final String PIPE_LOG_EXCEPTION_OCCURRED_WHEN_HANDLING_SINGLE_CONSUMER_GROUP_META_10E7688C = + "Exception occurred when handling single consumer group meta changes for consumer group {}"; + public static final String PIPE_LOG_SUBSCRIPTION_BROKER_BOUND_TO_CONSUMER_GROUP_HAS_ALREADY_0F37997F = + "Subscription: broker bound to consumer group [{}] has already existed when the creation " + + "time of consumer group meta on local agent {} is inconsistent with meta from coordinator " + + "{}, drop it"; + public static final String PIPE_LOG_SUBSCRIPTION_BROKER_BOUND_TO_CONSUMER_GROUP_DOES_NOT_EXISTED_9F09E4DE = + "Subscription: broker bound to consumer group [{}] does not existed when the corresponding " + + "consumer group meta has already existed on local agent, ignore it"; + public static final String PIPE_LOG_EXCEPTION_OCCURRED_WHEN_HANDLING_SINGLE_TOPIC_META_CHANGES_43434FC4 = + "Exception occurred when handling single topic meta changes for topic {}"; + public static final String PIPE_LOG_PULLED_TOPIC_META_FROM_CONFIG_NODE_RECOVERING_5C4B1AEE = + "Pulled topic meta from config node: {}, recovering ..."; + public static final String PIPE_LOG_INTERRUPTED_WHILE_SLEEPING_WILL_RETRY_TO_GET_TOPIC_META_976E4BE2 = + "Interrupted while sleeping, will retry to get topic meta from config node."; + public static final String PIPE_LOG_PULLED_CONSUMER_GROUP_META_FROM_CONFIG_NODE_RECOVERING_A85B948F = + "Pulled consumer group meta from config node: {}, recovering ..."; + public static final String PIPE_LOG_INTERRUPTED_WHILE_SLEEPING_WILL_RETRY_TO_GET_CONSUMER_GROUP_7E161F39 = + "Interrupted while sleeping, will retry to get consumer group meta from config node."; + public static final String PIPE_LOG_FAILED_TO_GET_TOPIC_META_FROM_CONFIG_NODE_FOR_TIMES_WILL_E8D0B7F8 = + "Failed to get topic meta from config node for {} times, will retry at most {} times."; + public static final String PIPE_LOG_FAILED_TO_GET_CONSUMER_GROUP_META_FROM_CONFIG_NODE_FOR_TIMES_3E4C727C = + "Failed to get consumer group meta from config node for {} times, will retry at most {} " + + "times."; + public static final String PIPE_LOG_SUBSCRIPTION_CONSUMER_REFRESHED_OF_PROCESSOR_BUFFERED_COMMIT_8C7A352A = + "Subscription: consumer {} refreshed {} of {} processor-buffered commit context lease(s)"; + public static final String PIPE_LOG_SUBSCRIPTION_CONSUMER_POLL_SUCCESSFULLY_WITH_REQUEST_6BC8BFED = + "Subscription: consumer {} poll {} successfully with request: {}"; + public static final String PIPE_LOG_SUBSCRIPTION_CONSUMER_COMMIT_NACK_FULL_COMMIT_CONTEXTS_CFC18359 = + "Subscription: consumer {} commit (nack: {}) full commit contexts: {}"; + public static final String PIPE_LOG_SUBSCRIPTION_CONSUMER_COMMIT_NACK_FULL_REQUESTED_COMMIT_1E67E8A3 = + "Subscription: consumer {} commit (nack: {}) full requested commit contexts: {}, full " + + "accepted commit contexts: {}, full stale unsubscribed commit contexts: {}"; + public static final String PIPE_LOG_SUBSCRIPTION_REMOVE_CONSUMER_CONFIG_WHEN_HANDLING_EXIT_3827D0E8 = + "Subscription: remove consumer config {} when handling exit"; + public static final String PIPE_LOG_SUBSCRIPTION_CONSUMER_IS_INACTIVE_FOR_MS_EXCEEDING_TIMEOUT_36E06B11 = + "Subscription: consumer {} is inactive for {} ms, exceeding timeout {} ms, close it on " + + "server side."; + public static final String PIPE_LOG_SUBSCRIPTION_THE_CONSUMER_HAS_ALREADY_EXISTED_WHEN_HANDSHAKING_3761AD81 = + "Subscription: The consumer {} has already existed when handshaking, skip creating consumer."; + public static final String PIPE_LOG_SUBSCRIPTION_CONSUMER_HANDSHAKE_SUCCESSFULLY_DATA_NODE_ID_58DA6A5F = + "Subscription: consumer {} handshake successfully, data node id: {}"; + public static final String PIPE_LOG_SUBSCRIPTION_CONSUMER_UNSUBSCRIBE_SUCCESSFULLY_AA5E0AA9 = + "Subscription: consumer {} unsubscribe {} successfully"; + public static final String PIPE_LOG_SUBSCRIPTION_CONSUMER_COMMIT_NACK_ACCEPTED_SUCCESSFULLY_58D1C111 = + "Subscription: consumer {} commit (nack: {}) accepted successfully, summary: {}"; + public static final String PIPE_LOG_SUBSCRIPTION_CONSUMER_SEEK_TOPIC_TO_TOPICPROGRESS_REGIONCOUNT_41702313 = + "Subscription: consumer {} seek topic {} to topicProgress(regionCount={})"; + public static final String PIPE_LOG_SUBSCRIPTION_CONSUMER_SEEKAFTER_TOPIC_TO_TOPICPROGRESS_REGIONCOUNT_838584F8 = + "Subscription: consumer {} seekAfter topic {} to topicProgress(regionCount={})"; + public static final String PIPE_LOG_SUBSCRIPTION_CONSUMER_SEEK_TOPIC_WITH_SEEKTYPE_799FF449 = + "Subscription: consumer {} seek topic {} with seekType={}"; + public static final String PIPE_LOG_SUBSCRIPTION_UNSUBSCRIBE_ALL_SUBSCRIBED_TOPICS_BEFORE_CLOSE_BFB787AE = + "Subscription: unsubscribe all subscribed topics {} before close consumer {}"; + public static final String PIPE_LOG_SUBSCRIPTION_THE_CONSUMER_DOES_NOT_EXISTED_WHEN_CLOSING_CCB63DCB = + "Subscription: The consumer {} does not existed when closing, skip dropping consumer."; + public static final String PIPE_LOG_SUBSCRIPTION_CONSUMER_UNSUBSCRIBE_COMPLETED_TOPICS_SUCCESSFULLY_44BAFF55 = + "Subscription: consumer {} unsubscribe {} (completed topics) successfully"; + public static final String PIPE_LOG_SUBSCRIPTION_FAILED_TO_CLOSE_TIMED_OUT_CONSUMER_AFTER_MS_89CC11F1 = + "Subscription: failed to close timed out consumer {} after {} ms inactivity"; + public static final String PIPE_LOG_SUBSCRIPTION_DETECT_STALE_CONSUMER_CONFIG_WHEN_HANDSHAKING_B0196DB8 = + "Subscription: Detect stale consumer config when handshaking, stale consumer config {} will " + + "be cleared, consumer config will set to the incoming consumer config {}."; + public static final String PIPE_LOG_SUBSCRIPTION_MISSING_CONSUMER_CONFIG_WHEN_HANDLING_HEARTBEAT_B9EFB1CC = + "Subscription: missing consumer config when handling heartbeat request: {}"; + public static final String PIPE_LOG_EXCEPTION_OCCURRED_WHEN_FETCH_ENDPOINTS_FOR_CONSUMER_IN_325B571A = + "Exception occurred when fetch endpoints for consumer {} in config node"; + public static final String PIPE_LOG_SUBSCRIPTION_MISSING_CONSUMER_CONFIG_WHEN_HANDLING_PIPESUBSCRIBESUBSCRIBEREQ_DF466A30 = + "Subscription: missing consumer config when handling PipeSubscribeSubscribeReq: {}"; + public static final String PIPE_LOG_SUBSCRIPTION_MISSING_CONSUMER_CONFIG_WHEN_HANDLING_PIPESUBSCRIBEUNSUBSCRIBEREQ_673CE701 = + "Subscription: missing consumer config when handling PipeSubscribeUnsubscribeReq: {}"; + public static final String PIPE_LOG_SUBSCRIPTION_MISSING_CONSUMER_CONFIG_WHEN_HANDLING_PIPESUBSCRIBEPOLLREQ_6BB9292B = + "Subscription: missing consumer config when handling PipeSubscribePollReq: {}"; + public static final String PIPE_LOG_SUBSCRIPTION_CONSUMER_POLL_NULL_RESPONSE_FOR_EVENT_OUTDATED_4CF7FAAA = + "Subscription: consumer {} poll null response for event {} (outdated: {}) with request: {}"; + public static final String PIPE_LOG_SUBSCRIPTION_CONSUMER_POLL_FOR_EVENT_OUTDATED_FAILED_WITH_0BEFF244 = + "Subscription: consumer {} poll {} for event {} (outdated: {}) failed with request: {}"; + public static final String PIPE_LOG_SUBSCRIPTION_MISSING_CONSUMER_CONFIG_WHEN_HANDLING_PIPESUBSCRIBECOMMITREQ_76B28EBB = + "Subscription: missing consumer config when handling PipeSubscribeCommitReq: {}"; + public static final String PIPE_LOG_SUBSCRIPTION_CONSUMER_COMMIT_NACK_PARTIALLY_ACCEPTED_REQUESTED_87D0C038 = + "Subscription: consumer {} commit (nack: {}) partially accepted, requested summary: {}, " + + "accepted summary: {}, stale unsubscribed summary: {}"; + public static final String PIPE_LOG_SUBSCRIPTION_MISSING_CONSUMER_CONFIG_WHEN_HANDLING_PIPESUBSCRIBECLOSEREQ_717660F8 = + "Subscription: missing consumer config when handling PipeSubscribeCloseReq: {}"; + public static final String PIPE_LOG_EXCEPTION_OCCURRED_WHEN_SEEKING_WITH_REQUEST_6B581543 = + "Exception occurred when seeking with request {}"; + public static final String PIPE_LOG_SUBSCRIPTION_MISSING_CONSUMER_CONFIG_WHEN_HANDLING_SUBSCRIPTION_B85D47A4 = + "Subscription: missing consumer config when handling subscription seek request: {}"; + public static final String PIPE_LOG_UNEXPECTED_STATUS_CODE_WHEN_CREATING_CONSUMER_IN_CONFIG_5D2E1B97 = + "Unexpected status code {} when creating consumer {} in config node"; + public static final String PIPE_LOG_UNEXPECTED_STATUS_CODE_WHEN_CLOSING_CONSUMER_IN_CONFIG_NODE_0C2E0CE6 = + "Unexpected status code {} when closing consumer {} in config node"; + public static final String PIPE_LOG_UNEXPECTED_STATUS_CODE_WHEN_SUBSCRIBING_TOPICS_FOR_CONSUMER_8676DA8A = + "Unexpected status code {} when subscribing topics {} for consumer {} in config node"; + public static final String PIPE_LOG_EXCEPTION_OCCURRED_WHEN_SUBSCRIBING_TOPICS_FOR_CONSUMER_E5D72F10 = + "Exception occurred when subscribing topics {} for consumer {} in config node"; + public static final String PIPE_LOG_UNEXPECTED_STATUS_CODE_WHEN_UNSUBSCRIBING_TOPICS_FOR_CONSUMER_EFC771F0 = + "Unexpected status code {} when unsubscribing topics {} for consumer {} in config node"; + public static final String PIPE_LOG_EXCEPTION_OCCURRED_WHEN_UNSUBSCRIBING_TOPICS_FOR_CONSUMER_FE4B3CEE = + "Exception occurred when unsubscribing topics {} for consumer {} in config node"; + public static final String PIPE_LOG_SUBSCRIPTION_CONSUMER_POLL_EXCESSIVE_PAYLOAD_FOR_EVENT_OUTDATED_2BFF690B = + "Subscription: consumer {} poll excessive payload {} for event {} (outdated: {}) with " + + "request: {}, something unexpected happened with parameter configuration or payload " + + "control..."; + public static final String PIPE_LOG_FAILED_TO_UNBIND_FROM_SUBSCRIPTION_PREFETCHING_QUEUE_METRICS_6614388C = + "Failed to unbind from subscription prefetching queue metrics, prefetching queue map not " + + "empty"; + public static final String PIPE_LOG_FAILED_TO_DEREGISTER_SUBSCRIPTION_PREFETCHING_QUEUE_METRICS_F08479A7 = + "Failed to deregister subscription prefetching queue metrics, " + + "SubscriptionPrefetchingQueue({}) does not exist"; + public static final String PIPE_LOG_FAILED_TO_MARK_TRANSFER_EVENT_RATE_SUBSCRIPTIONPREFETCHINGQUEUE_7DEF95B5 = + "Failed to mark transfer event rate, SubscriptionPrefetchingQueue({}) does not exist"; + public static final String PIPE_LOG_FAILED_TO_UNBIND_FROM_CONSENSUS_SUBSCRIPTION_PREFETCHING_A8F920D9 = + "Failed to unbind from consensus subscription prefetching queue metrics, queue map not empty"; + public static final String PIPE_LOG_FAILED_TO_DEREGISTER_CONSENSUS_SUBSCRIPTION_PREFETCHING_8B180091 = + "Failed to deregister consensus subscription prefetching queue metrics, " + + "ConsensusPrefetchingQueue({}) does not exist"; + public static final String PIPE_LOG_FAILED_TO_MARK_TRANSFER_EVENT_RATE_CONSENSUSPREFETCHINGQUEUE_FE9B91C3 = + "Failed to mark transfer event rate, ConsensusPrefetchingQueue({}) does not exist"; + public static final String PIPE_LOG_SUBSCRIPTIONEVENTTSFILERESPONSE_IS_EMPTY_WHEN_FETCHING_NEXT_DFD60DF1 = + "SubscriptionEventTsFileResponse {} is empty when fetching next response (broken invariant)"; + public static final String PIPE_LOG_SUBSCRIPTIONEVENTTSFILERESPONSE_IS_NOT_EMPTY_WHEN_INITIALIZING_C9DE83C9 = + "SubscriptionEventTsFileResponse {} is not empty when initializing (broken invariant)"; + public static final String PIPE_LOG_SUBSCRIPTIONEVENTTSFILERESPONSE_IS_EMPTY_WHEN_GENERATING_B8D03E93 = + "SubscriptionEventTsFileResponse {} is empty when generating next response (broken invariant)"; + public static final String PIPE_LOG_SUBSCRIPTIONEVENTTABLETRESPONSE_WAIT_FOR_RESOURCE_ENOUGH_9926289F = + "SubscriptionEventTabletResponse {} wait for resource enough for parsing tablets {} seconds."; + public static final String PIPE_LOG_SUBSCRIPTIONEVENTTABLETRESPONSE_IS_EMPTY_WHEN_FETCHING_NEXT_4464E3F2 = + "SubscriptionEventTabletResponse {} is empty when fetching next response (broken invariant)"; + public static final String PIPE_LOG_SUBSCRIPTIONEVENTTABLETRESPONSE_IS_NOT_EMPTY_WHEN_INITIALIZING_88F075C9 = + "SubscriptionEventTabletResponse {} is not empty when initializing (broken invariant)"; + public static final String PIPE_LOG_DETECT_LARGE_TABLETS_WITH_BYTE_S_CURRENT_TABLETS_SIZE_BYTE_4D472E38 = + "Detect large tablets with {} byte(s), current tablets size {} byte(s)"; + public static final String PIPE_LOG_SUBSCRIPTIONEVENTBINARYCACHE_ALLOCATEDMEMORYBLOCK_HAS_SHRUNK_08F23ADE = + "SubscriptionEventBinaryCache.allocatedMemoryBlock has shrunk from {} to {}."; + public static final String PIPE_LOG_SUBSCRIPTIONEVENTBINARYCACHE_ALLOCATEDMEMORYBLOCK_HAS_EXPANDED_52A971D9 = + "SubscriptionEventBinaryCache.allocatedMemoryBlock has expanded from {} to {}."; + public static final String PIPE_LOG_SUBSCRIPTIONEVENTBINARYCACHE_RAISED_AN_EXCEPTION_WHILE_SERIALIZING_F3B698CB = + "SubscriptionEventBinaryCache raised an exception while serializing " + + "CachedSubscriptionPollResponse: {}"; + public static final String PIPE_LOG_SUBSCRIPTION_SOMETHING_UNEXPECTED_HAPPENED_WHEN_SERIALIZING_5467B7B6 = + "Subscription: something unexpected happened when serializing " + + "CachedSubscriptionPollResponse: {}"; + public static final String PIPE_LOG_HAS_BEEN_ITERATED_TIMES_CURRENT_TSFILEINSERTIONEVENT_0939C298 = + "{} has been iterated {} times, current TsFileInsertionEvent {}"; + public static final String PIPE_LOG_SUBSCRIPTIONPIPETABLETEVENTBATCH_ONLY_SUPPORT_CONVERT_PIPEINSERTNODETABLETINSERTIONEVENT_B888B8AA = + "SubscriptionPipeTabletEventBatch {} only support convert PipeInsertNodeTabletInsertionEvent " + + "or PipeRawTabletInsertionEvent to tablet. Ignore {}."; + public static final String PIPE_LOG_SUBSCRIPTIONPIPETABLETEVENTBATCH_UNEXPECTED_TABLET_INSERTION_8FB1B507 = + "SubscriptionPipeTabletEventBatch: Unexpected tablet insertion event {}, skipping it."; + public static final String PIPE_LOG_SUBSCRIPTIONPIPETABLETEVENTBATCH_FAILED_TO_INCREASE_THE_595722D8 = + "SubscriptionPipeTabletEventBatch: Failed to increase the reference count of event {}, " + + "skipping it."; + public static final String PIPE_LOG_SUBSCRIPTIONPIPETABLETEVENTBATCH_OVERRIDE_NON_NULL_CURRENTTABLETINSERTIONEVENTSITERATOR_2633B158 = + "SubscriptionPipeTabletEventBatch {} override non-null currentTabletInsertionEventsIterator " + + "when iterating (broken invariant)."; + public static final String PIPE_LOG_SUBSCRIPTIONPIPETABLETEVENTBATCH_IGNORE_ENRICHEDEVENT_WHEN_E6BAEACE = + "SubscriptionPipeTabletEventBatch {} ignore EnrichedEvent {} when iterating (broken " + + "invariant)."; + public static final String PIPE_LOG_SUBSCRIPTIONPIPETSFILEEVENTBATCH_IGNORE_TSFILEINSERTIONEVENT_88189024 = + "SubscriptionPipeTsFileEventBatch {} ignore TsFileInsertionEvent {} when batching."; + public static final String PIPE_LOG_SUBSCRIPTIONPIPEEVENTBATCH_IGNORE_ENRICHEDEVENT_WHEN_BATCHING_E69BE90D = + "SubscriptionPipeEventBatch {} ignore EnrichedEvent {} when batching."; + public static final String PIPE_LOG_CONSENSUS_PREFETCH_EXECUTOR_IS_SHUTDOWN_SKIP_REGISTERING_83E36171 = + "Consensus prefetch executor is shutdown, skip registering {}"; + public static final String PIPE_LOG_CONSENSUS_PREFETCH_SUBTASK_IS_ALREADY_REGISTERED_419FE7AD = + "Consensus prefetch subtask {} is already registered"; + public static final String PIPE_LOG_CONSENSUS_PREFETCH_WORKER_LOOP_EXITS_ABNORMALLY_531EE564 = + "Consensus prefetch worker loop exits abnormally"; + public static final String PIPE_LOG_FAILED_TO_CLOSE_SINK_AFTER_FAILED_TO_INITIALIZE_SINK_IGNORE_CF2E3D90 = + "Failed to close sink after failed to initialize sink. Ignore this exception."; + public static final String PIPE_LOG_CONSENSUSPREFETCHSUBTASK_UNEXPECTED_ERROR_WHILE_DRIVING_D361F4C2 = + "ConsensusPrefetchSubtask {}: unexpected error while driving queue {}"; + public static final String PIPE_LOG_SUBSCRIPTIONSINKSUBTASK_FOR_CONSENSUS_TOPIC_FAILED_UNEXPECTEDLY_FC41B565 = + "SubscriptionSinkSubtask for consensus topic [{}] failed unexpectedly, skip auto-resubmit"; + public static final String PIPE_LOG_FAILED_TO_BROADCAST_SUBSCRIPTION_PROGRESS_TO_DATANODE_AT_7024F5B2 = + "Failed to broadcast subscription progress to DataNode {} at {}: {}"; + public static final String PIPE_LOG_FAILED_TO_BROADCAST_SUBSCRIPTION_PROGRESS_FOR_REGION_DE9074BD = + "Failed to broadcast subscription progress for region {}: {}"; + public static final String PIPE_LOG_RECEIVED_SUBSCRIPTION_PROGRESS_BROADCAST_CONSUMERGROUPID_CDAEF839 = + "Received subscription progress broadcast: consumerGroupId={}, topicName={}, regionId={}, " + + "physicalTime={}, localSeq={}"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONCOMMITSTATE_IDEMPOTENT_RE_COMMIT_FOR_30464FC4 = + "ConsensusSubscriptionCommitState: idempotent re-commit for ({},{},{})"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONCOMMITSTATE_IDEMPOTENT_DIRECT_COMMIT_B093AC01 = + "ConsensusSubscriptionCommitState: idempotent direct commit for ({},{},{})"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONCOMMITMANAGER_RECOVERED_COMMITTEDREGIONPROGRESS_F6B92C6B = + "ConsensusSubscriptionCommitManager: recovered committedRegionProgress={} from ConfigNode " + + "for consumerGroupId={}, topicName={}, regionId={}"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONCOMMITMANAGER_CANNOT_COMMIT_FOR_UNKNOWN_751BD2A9 = + "ConsensusSubscriptionCommitManager: Cannot commit for unknown state, consumerGroupId={}, " + + "topicName={}, regionId={}, writerId={}, writerProgress={}"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONCOMMITMANAGER_CANNOT_DIRECT_COMMIT_D6AD7D96 = + "ConsensusSubscriptionCommitManager: Cannot direct-commit for unknown state, " + + "consumerGroupId={}, topicName={}, regionId={}, writerId={}, writerProgress={}"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONCOMMITMANAGER_CANNOT_RESET_UNKNOWN_C469052F = + "ConsensusSubscriptionCommitManager: Cannot reset unknown state, consumerGroupId={}, " + + "topicName={}, regionId={}"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONCOMMITMANAGER_IGNORE_BROADCAST_WITHOUT_211DE477 = + "ConsensusSubscriptionCommitManager: ignore broadcast without writer identity, " + + "consumerGroupId={}, topicName={}, regionId={}, writerId={}, writerProgress={}"; + public static final String PIPE_LOG_SKIP_MALFORMED_CONSENSUS_SUBSCRIPTION_PROGRESS_FILE_NAME_BB4D75F0 = + "Skip malformed consensus subscription progress file name {}"; + public static final String PIPE_LOG_FAILED_TO_RECOVER_CONSENSUS_SUBSCRIPTION_PROGRESS_FOR_CONSUMERGROUPID_DF30716B = + "Failed to recover consensus subscription progress for consumerGroupId={}, topicName={}"; + public static final String PIPE_LOG_FAILED_TO_DELETE_CONSENSUS_SUBSCRIPTION_PROGRESS_FILE_51C57096 = + "Failed to delete consensus subscription progress file {}"; + public static final String PIPE_LOG_FAILED_TO_PERSIST_CONSENSUS_SUBSCRIPTION_PROGRESS_FOR_CONSUMERGROUPID_4EA71236 = + "Failed to persist consensus subscription progress for consumerGroupId={}, topicName={}, " + + "regionId={}"; + public static final String PIPE_LOG_FAILED_TO_REWRITE_CONSENSUS_SUBSCRIPTION_PROGRESS_FOR_CONSUMERGROUPID_8B230D50 = + "Failed to rewrite consensus subscription progress for consumerGroupId={}, topicName={}"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONCOMMITMANAGER_FAILED_TO_QUERY_COMMIT_31E47F21 = + "ConsensusSubscriptionCommitManager: failed to query commit progress from ConfigNode for " + + "consumerGroupId={}, topicName={}, regionId={}, status={}"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONCOMMITMANAGER_FAILED_TO_QUERY_COMMIT_16CFDCD9 = + "ConsensusSubscriptionCommitManager: failed to query commit progress from ConfigNode for " + + "consumerGroupId={}, topicName={}, regionId={}, starting from 0"; + public static final String PIPE_LOG_FAILED_TO_SERIALIZE_COMMITTED_REGION_PROGRESS_0D8D2129 = + "Failed to serialize committed region progress {}"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONCOMMITSTATE_IGNORE_MAPPING_WITHOUT_3E66A74D = + "ConsensusSubscriptionCommitState: ignore mapping without writer identity, writerId={}, " + + "writerProgress={}"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONCOMMITSTATE_DUPLICATE_OUTSTANDING_MAPPING_B5B34891 = + "ConsensusSubscriptionCommitState: duplicate outstanding mapping for slot={}, previous={}, " + + "current={}"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONCOMMITSTATE_OUTSTANDING_SIZE_EXCEEDS_1463BF02 = + "ConsensusSubscriptionCommitState: outstanding size ({}) exceeds threshold ({}), consumers " + + "may not be committing. committed=({},{}), writerNodeId={}"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONCOMMITSTATE_MISSING_WRITER_IDENTITY_01040357 = + "ConsensusSubscriptionCommitState: missing writer identity for commit, writerId={}, " + + "writerProgress={}"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONCOMMITSTATE_UNKNOWN_KEY_FOR_COMMIT_5F699CFD = + "ConsensusSubscriptionCommitState: unknown key ({},{},{}) for commit"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONCOMMITSTATE_MISSING_WRITER_IDENTITY_BB10A3B1 = + "ConsensusSubscriptionCommitState: missing writer identity for direct commit, writerId={}, " + + "writerProgress={}"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONCOMMITSTATE_REJECT_DIRECT_COMMIT_WITHOUT_5B975E49 = + "ConsensusSubscriptionCommitState: reject direct commit without outstanding mapping for " + + "({},{},{})"; + public static final String PIPE_LOG_ISCONSENSUSBASEDTOPIC_CHECK_FOR_TOPIC_MODE_RESULT_19EFA0F9 = + "isConsensusBasedTopic check for topic [{}]: mode={}, result={}"; + public static final String PIPE_LOG_SET_IOTCONSENSUS_ONNEWPEERCREATED_CALLBACK_FOR_CONSENSUS_0766CE68 = + "Set IoTConsensus.onNewPeerCreated callback for consensus subscription auto-binding"; + public static final String PIPE_LOG_SET_IOTCONSENSUS_ONPEERREMOVED_CALLBACK_FOR_CONSENSUS_SUBSCRIPTION_21D4D6AC = + "Set IoTConsensus.onPeerRemoved callback for consensus subscription cleanup"; + public static final String PIPE_LOG_NEW_DATAREGION_CREATED_CHECKING_CONSUMER_GROUP_S_FOR_AUTO_787C16E9 = + "New DataRegion {} created, checking {} consumer group(s) for auto-binding, " + + "currentSearchIndex={}"; + public static final String PIPE_LOG_AUTO_BINDING_CONSENSUS_QUEUE_FOR_TOPIC_IN_GROUP_TO_NEW_REGION_86F21649 = + "Auto-binding consensus queue for topic [{}] in group [{}] to new region {} (database={}, " + + "tailStartSearchIndex={}, hasLocalPersistedState={}, committedRegionProgress={}, " + + "initialRuntimeVersion={}, initialActive={})"; + public static final String PIPE_LOG_DATAREGION_BEING_REMOVED_UNBINDING_ALL_CONSENSUS_SUBSCRIPTION_848A29F0 = + "DataRegion {} being removed, unbinding all consensus subscription queues"; + public static final String PIPE_LOG_SETTING_UP_CONSENSUS_SUBSCRIPTIONS_FOR_CONSUMER_GROUP_TOPICS_204374A2 = + "Setting up consensus subscriptions for consumer group [{}], topics={}, total consensus " + + "groups={}"; + public static final String PIPE_LOG_SETTING_UP_CONSENSUS_QUEUE_FOR_TOPIC_ISTABLETOPIC_ORDERMODE_4F1CDC66 = + "Setting up consensus queue for topic [{}]: isTableTopic={}, orderMode={}, config={}"; + public static final String PIPE_LOG_DISCOVERED_CONSENSUS_GROUP_S_FOR_TOPIC_IN_CONSUMER_GROUP_012EE420 = + "Discovered {} consensus group(s) for topic [{}] in consumer group [{}]: {}"; + public static final String PIPE_LOG_SKIPPING_REGION_DATABASE_FOR_TABLE_TOPIC_DATABASE_KEY_2DA27A84 = + "Skipping region {} (database={}) for table topic [{}] (DATABASE_KEY={})"; + public static final String PIPE_LOG_BINDING_CONSENSUS_PREFETCHING_QUEUE_FOR_TOPIC_IN_CONSUMER_45239EEA = + "Binding consensus prefetching queue for topic [{}] in consumer group [{}] to data region " + + "consensus group [{}] (database={}, tailStartSearchIndex={}, hasLocalPersistedState={}, " + + "committedRegionProgress={}, initialRuntimeVersion={}, initialActive={})"; + public static final String PIPE_LOG_TORE_DOWN_CONSENSUS_SUBSCRIPTION_FOR_TOPIC_IN_CONSUMER_GROUP_80B84227 = + "Tore down consensus subscription for topic [{}] in consumer group [{}]"; + public static final String PIPE_LOG_CHECKING_NEW_SUBSCRIPTIONS_IN_CONSUMER_GROUP_FOR_CONSENSUS_4A56D78A = + "Checking new subscriptions in consumer group [{}] for consensus-based topics: {}"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONSETUPHANDLER_IGNORE_STALE_RUNTIME_STATE_6C36B250 = + "ConsensusSubscriptionSetupHandler: ignore stale runtime state for region {}, " + + "incomingRuntimeVersion={}, currentRuntimeVersion={}, runtimeState={}"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONSETUPHANDLER_APPLYING_RUNTIME_STATE_1FB8937E = + "ConsensusSubscriptionSetupHandler: applying runtime state for region {}, preferred writer " + + "{} -> {}, runtimeVersion {} -> {}, runtimeState={}"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONSETUPHANDLER_REGION_PREFERRED_WRITER_46C1A894 = + "ConsensusSubscriptionSetupHandler: region {} preferred writer changed {} -> {}, " + + "runtimeVersion {} -> {}, runtimeState={} (route hint)"; + public static final String PIPE_LOG_FAILED_TO_CHECK_IF_TOPIC_IS_CONSENSUS_BASED_DEFAULTING_TO_ECCE1509 = + "Failed to check if topic [{}] is consensus-based, defaulting to false"; + public static final String PIPE_LOG_SKIPPING_SETUP_OF_CONSENSUS_BASED_SUBSCRIPTIONS_FOR_CONSUMER_A7B2C812 = + "Skipping setup of consensus-based subscriptions for consumer group [{}] because " + + "mode=consensus only supports data_region_consensus_protocol_class={}, but current " + + "configured value is {} (runtime consensus implementation: {})"; + public static final String PIPE_LOG_TOPIC_CONFIG_NOT_FOUND_FOR_TOPIC_CANNOT_SET_UP_CONSENSUS_A93339CE = + "Topic config not found for topic [{}], cannot set up consensus queue"; + public static final String PIPE_LOG_NO_LOCAL_IOTCONSENSUS_DATA_REGION_FOUND_FOR_TOPIC_IN_CONSUMER_6FD0600E = + "No local IoTConsensus data region found for topic [{}] in consumer group [{}]. Consensus " + + "subscription will be set up when a matching data region becomes available."; + public static final String PIPE_LOG_FAILED_TO_TEAR_DOWN_CONSENSUS_SUBSCRIPTION_FOR_TOPIC_IN_F59E8B7C = + "Failed to tear down consensus subscription for topic [{}] in consumer group [{}]"; + public static final String PIPE_LOG_FAILED_TO_AUTO_BIND_TOPIC_IN_GROUP_TO_NEW_REGION_5BFD0E7D = + "Failed to auto-bind topic [{}] in group [{}] to new region {}"; + public static final String PIPE_LOG_FAILED_TO_UNBIND_CONSENSUS_SUBSCRIPTION_QUEUES_FOR_REMOVED_7086F70A = + "Failed to unbind consensus subscription queues for removed region {}"; + public static final String PIPE_LOG_FAILED_TO_SET_UP_CONSENSUS_SUBSCRIPTION_FOR_TOPIC_IN_CONSUMER_1A30001B = + "Failed to set up consensus subscription for topic [{}] in consumer group [{}]"; + public static final String PIPE_LOG_CONSENSUSLOGTOTABLETCONVERTER_DESERIALIZED_MERGED_INSERTNODE_51FB8295 = + "ConsensusLogToTabletConverter: deserialized merged InsertNode for searchIndex={}, type={}, " + + "deviceId={}, searchNodeCount={}"; + public static final String PIPE_LOG_CONSENSUSLOGTOTABLETCONVERTER_SEARCHINDEX_CONTAINS_NON_INSERTNODE_CFA9FA49 = + "ConsensusLogToTabletConverter: searchIndex={} contains non-InsertNode PlanNode: {}"; + public static final String PIPE_LOG_CONSENSUSLOGTOTABLETCONVERTER_CONVERTING_INSERTNODE_TYPE_B80428A0 = + "ConsensusLogToTabletConverter: converting InsertNode type={}, deviceId={}"; + public static final String PIPE_LOG_UNSUPPORTED_INSERTNODE_TYPE_FOR_SUBSCRIPTION_E488EF74 = + "Unsupported InsertNode type for subscription: {}"; + public static final String PIPE_LOG_CONSENSUSLOGTOTABLETCONVERTER_FAILED_TO_DESERIALIZE_ICONSENSUSREQUEST_EC1F6BAD = + "ConsensusLogToTabletConverter: failed to deserialize IConsensusRequest (type={}) in " + + "searchIndex={}: {}"; + public static final String PIPE_LOG_INSERTNODE_TYPE_IS_NULL_SKIPPING_CONVERSION_A2F1ADF7 = + "InsertNode type is null, skipping conversion"; + public static final String PIPE_LOG_UNSUPPORTED_DATA_TYPE_C8929F11 = "Unsupported data type: {}"; + public static final String PIPE_LOG_UNSUPPORTED_DATA_TYPE_FOR_COPY_8AD25FE7 = + "Unsupported data type for copy: {}"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_PREFETCHING_QUEUE_IS_EMPTY_FOR_22836B5E = + "ConsensusPrefetchingQueue {}: prefetching queue is empty for consumerId={}, " + + "pendingEntriesSize={}, nextExpected={}, isClosed={}, prefetchInitialized={}, " + + "subtaskScheduled={}"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_POLLING_QUEUE_SIZE_CONSUMERID_FCA0AAD3 = + "ConsensusPrefetchingQueue {}: polling, queue size={}, consumerId={}"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_DRAINED_ENTRIES_FROM_PENDINGENTRIES_2D4E0BE7 = + "ConsensusPrefetchingQueue {}: drained {} entries from pendingEntries, first searchIndex={}, " + + "last searchIndex={}, nextExpected={}, prefetchingQueueSize={}"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_TIME_BASED_FLUSH_TABLETS_LINGERED_10A4EBA8 = + "ConsensusPrefetchingQueue {}: time-based flush, {} tablets lingered for {}ms " + + "(threshold={}ms)"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_GAP_DETECTED_EXPECTED_GOT_FILLING_70DD08B3 = + "ConsensusPrefetchingQueue {}: gap detected, expected={}, got={}. Filling {} entries from " + + "WAL."; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_ACCUMULATE_COMPLETE_BATCHSIZE_FA3F3B41 = + "ConsensusPrefetchingQueue {}: accumulate complete, batchSize={}, processed={}, skipped={}, " + + "lingerTablets={}, nextExpected={}"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_SUBSCRIPTION_WAL_READ_ENTRIES_14AA5096 = + "ConsensusPrefetchingQueue {}: subscription WAL read {} entries, nextExpectedSearchIndex={}"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_SUBSCRIPTION_WAL_EXHAUSTED_AT_E61AF763 = + "ConsensusPrefetchingQueue {}: subscription WAL exhausted at {} while current WAL is {}. " + + "Rolling WAL file to expose current-file entries."; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_SKIP_STALE_EVENT_WITH_SEARCHINDEX_07A09B36 = + "ConsensusPrefetchingQueue {}: skip stale event with searchIndex range [{}, {}], " + + "expectedSeekGeneration={}, currentSeekGeneration={}"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_ENQUEUED_EVENT_WITH_TABLETS_SEARCHINDEX_140FDDCB = + "ConsensusPrefetchingQueue {}: ENQUEUED event with {} tablets, searchIndex range [{}, {}], " + + "prefetchQueueSize={}"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_REJECT_WITHOUT_WRITER_PROGRESS_D84AA802 = + "ConsensusPrefetchingQueue {}: reject {} without writer progress, commitContext={}"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_REJECT_FOR_INACTIVE_QUEUE_COMMITCONTEXT_AE6D382C = + "ConsensusPrefetchingQueue {}: reject {} for inactive queue, commitContext={}, " + + "runtimeVersion={}"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_RECYCLED_TIMED_OUT_EVENT_BACK_5E58639C = + "ConsensusPrefetchingQueue {}: recycled timed-out event {} back to prefetching queue"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_INJECTED_WATERMARK_WATERMARKTIMESTAMP_BF373164 = + "ConsensusPrefetchingQueue {}: injected WATERMARK, watermarkTimestamp={}"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_CREATED_DORMANT_CONSUMERGROUPID_863BC6D6 = + "ConsensusPrefetchingQueue created (dormant): consumerGroupId={}, topicName={}, " + + "orderMode={}, consensusGroupId={}, fallbackCommittedRegionProgress={}, " + + "fallbackTailSearchIndex={}, initialRuntimeVersion={}, initialActive={}"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_PREFETCH_INITIALIZED_STARTSEARCHINDEX_69B53EE6 = + "ConsensusPrefetchingQueue {}: prefetch initialized, startSearchIndex={}, progressSource={}, " + + "recoveryWriterCount={}"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_PERIODIC_STATS_LAG_PENDINGDELTA_D75375D0 = + "ConsensusPrefetchingQueue {}: periodic stats, lag={}, pendingDelta={}, walDelta={}, " + + "pendingTotal={}, walTotal={}, pendingQueueSize={}, prefetchingQueueSize={}, " + + "inFlightEventsSize={}, realtimeWriterCount={}, walHasNext={}, isActive={}, " + + "subtaskScheduled={}"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_WAITING_MS_FOR_WAL_GAP_TO_BECOME_7D91C6C5 = + "ConsensusPrefetchingQueue {}: waiting {}ms for WAL gap [{}, {}) to become visible, " + + "currentNextExpected={}, currentWalIndex={}, seekGeneration={}"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_SEEKTOREGIONPROGRESS_WRITERCOUNT_3134A29B = + "ConsensusPrefetchingQueue {}: seekToRegionProgress writerCount={} -> {} searchIndex={}"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_SEEKAFTERREGIONPROGRESS_WRITERCOUNT_C6B26D20 = + "ConsensusPrefetchingQueue {}: seekAfterRegionProgress writerCount={} -> {} searchIndex={}"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_ABORTED_PENDING_SEEK_DURING_RUNTIME_F9928604 = + "ConsensusPrefetchingQueue {}: aborted pending seek({}) during runtime stop, restored " + + "prefetchInitialized {} -> {}, seekGeneration {} -> {}"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_FAILED_TO_SCHEDULE_SEEK_BECAUSE_9E407068 = + "ConsensusPrefetchingQueue {}: failed to schedule seek({}) because {}, restored " + + "prefetchInitialized {} -> {}, seekGeneration {} -> {}"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_SEEK_APPLIED_TO_SEARCHINDEX_WRITERCOUNT_FA2C4327 = + "ConsensusPrefetchingQueue {}: seek({}) applied to searchIndex={}, writerCount={}, " + + "seekGeneration={}"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_FLUSHING_LINGERING_TABLETS_DURING_4C4AF235 = + "ConsensusPrefetchingQueue {}: flushing {} lingering tablets during close"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_ISACTIVE_SET_TO_REGION_EC0AD7BA = + "ConsensusPrefetchingQueue {}: isActive set to {} (region={})"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_RUNTIMEACTIVEWRITERNODEIDS_EFFECTIVEACTIVEWRITERNODEIDS_246519D2 = + "ConsensusPrefetchingQueue {}: runtimeActiveWriterNodeIds={}, " + + "effectiveActiveWriterNodeIds={} (region={}, orderMode={}, preferredWriterNodeId={})"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_PREFERREDWRITERNODEID_SET_TO_EFFECTIVEACTIVEWRITERNODEIDS_B08E8180 = + "ConsensusPrefetchingQueue {}: preferredWriterNodeId set to {}, " + + "effectiveActiveWriterNodeIds={} (region={}, orderMode={})"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_ORDERMODE_SET_TO_EFFECTIVEACTIVEWRITERNODEIDS_CDD3C86E = + "ConsensusPrefetchingQueue {}: orderMode set to {}, effectiveActiveWriterNodeIds={} " + + "(region={}, preferredWriterNodeId={}, runtimeActiveWriterNodeIds={})"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_APPLIED_RUNTIMEVERSION_36E05B80 = + "ConsensusPrefetchingQueue {}: applied runtimeVersion {}"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_APPLIED_RUNTIMESTATE_PREFERREDWRITERNODEID_D845E9D6 = + "ConsensusPrefetchingQueue {}: applied runtimeState={}, preferredWriterNodeId={}"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_POLL_COMMITTED_EVENT_BROKEN_INVARIANT_E478FA3C = + "ConsensusPrefetchingQueue {} poll committed event {} (broken invariant), remove it"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_POLL_NON_POLLABLE_EVENT_BROKEN_E9551325 = + "ConsensusPrefetchingQueue {} poll non-pollable event {} (broken invariant), nack it"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_INTERRUPTED_WHILE_POLLING_B7CFF5FD = + "ConsensusPrefetchingQueue {} interrupted while polling"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_ERROR_READING_SUBSCRIPTION_WAL_A3888AC5 = + "ConsensusPrefetchingQueue {}: error reading subscription WAL"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_ERROR_CLOSING_SUBSCRIPTION_WAL_19711C01 = + "ConsensusPrefetchingQueue {}: error closing subscription WAL iterator"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_COMMIT_CONTEXT_DOES_NOT_EXIST_99B8A8F3 = + "ConsensusPrefetchingQueue {}: commit context {} does not exist for ack"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_EVENT_ALREADY_COMMITTED_AC34E829 = + "ConsensusPrefetchingQueue {}: event {} already committed"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_FAILED_TO_ADVANCE_COMMIT_FRONTIER_56E606C0 = + "ConsensusPrefetchingQueue {}: failed to advance commit frontier for {}"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_COMMIT_CONTEXT_DOES_NOT_EXIST_05F6C6E0 = + "ConsensusPrefetchingQueue {}: commit context {} does not exist for nack"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_SEEKTOREGIONPROGRESS_NOT_SUPPORTED_85477BAB = + "ConsensusPrefetchingQueue {}: seekToRegionProgress not supported (no WAL directory)"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_SEEKAFTERREGIONPROGRESS_NOT_SUPPORTED_55F36BE8 = + "ConsensusPrefetchingQueue {}: seekAfterRegionProgress not supported (no WAL directory)"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_FAILED_TO_READ_WAL_METADATA_FROM_A2ED50D1 = + "ConsensusPrefetchingQueue {}: failed to read WAL metadata from {} while computing seekToEnd " + + "frontier"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_ERROR_DURING_DEREGISTER_34C332E7 = + "ConsensusPrefetchingQueue {}: error during deregister"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_FAILED_TO_FLUSH_LINGERING_BATCH_F97D8AA7 = + "ConsensusPrefetchingQueue {}: failed to flush lingering batch during close, discarding it"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_PREFETCH_ROUND_FAILED_TYPE_MESSAGE_63BC909B = + "ConsensusPrefetchingQueue {}: prefetch round failed (type={}, message={})"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_POISON_MESSAGE_DETECTED_NACKCOUNT_3A9255FB = + "ConsensusPrefetchingQueue {}: poison message detected (nackCount={}), force-acking event {} " + + "to prevent infinite re-delivery"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_POISON_MESSAGE_DETECTED_DURING_23159F02 = + "ConsensusPrefetchingQueue {}: poison message detected during recycle (nackCount={}), " + + "force-acking event {}"; + public static final String PIPE_LOG_PROGRESSWALITERATOR_FAILED_TO_OPEN_NEAR_LIVE_WAL_FILE_RETRYING_5AEB94AC = + "ProgressWALIterator: failed to open near-live WAL file {}, retrying without blacklisting"; + public static final String PIPE_LOG_PROGRESSWALITERATOR_ERROR_READING_WAL_2DB46D41 = + "ProgressWALIterator: error reading WAL"; + public static final String PIPE_LOG_PROGRESSWALITERATOR_FAILED_TO_OPEN_WAL_FILE_SKIPPING_29CA1092 = + "ProgressWALIterator: failed to open WAL file {}, skipping"; + public static final String PIPE_LOG_PIPE_TERMINATE_EVENT_COMMITTED_FOR_HISTORICAL_TRANSFER_CREATIONTIME_9B807B28 = + "Pipe {}@{}: terminate event committed for historical transfer. creationTime: {}, " + + "shouldMark: {}. {}"; + public static final String PIPE_LOG_PIPE_HISTORICAL_SOURCE_HAS_SUPPLIED_ALL_EVENTS_EMITTING_8B58DE19 = + "Pipe {}@{}: historical source has supplied all events, emitting terminate event. {}"; + public static final String PIPE_LOG_PIPE_REALTIME_SOURCE_ON_DATA_REGION_LISTENTOTSFILE_LISTENTOINSERTNODE_A02E1552 = + "Pipe {}@{} {} realtime source on data region {} (listenToTsFile={}, listenToInsertNode={}, " + + "registeredSourceCount={}, tsFileSourceCount={}, insertNodeSourceCount={})."; + public static final String PIPE_LOG_INTERRUPTED_WHILE_WAITING_FOR_IN_FLIGHT_PUBLISHES_TO_FINISH_C8E3757B = + "Interrupted while waiting for in-flight publishes to finish when closing assigner on data " + + "region {}."; + public static final String PIPE_LOG_SCHEMAREGIONSTATEMACHINE_EXECUTE_READ_PLAN_FRAGMENTINSTANCE_F85A001F = + "SchemaRegionStateMachine[{}]: Execute read plan: FragmentInstance-{}"; + public static final String PIPE_LOG_CURRENT_NODE_NODEID_IS_NO_LONGER_THE_SCHEMA_REGION_LEADER_FD783B3C = + "Current node [nodeId: {}] is no longer the schema region leader [regionId: {}], the new " + + "leader is [nodeId:{}]"; + public static final String PIPE_LOG_CURRENT_NODE_NODEID_IS_NO_LONGER_THE_SCHEMA_REGION_LEADER_12E06F99 = + "Current node [nodeId: {}] is no longer the schema region leader [regionId: {}], start " + + "cleaning up related services."; + public static final String PIPE_LOG_CURRENT_NODE_NODEID_IS_NO_LONGER_THE_SCHEMA_REGION_LEADER_3092822E = + "Current node [nodeId: {}] is no longer the schema region leader [regionId: {}], all " + + "services on old leader are unavailable now."; + public static final String PIPE_LOG_CURRENT_NODE_NODEID_BECOMES_SCHEMA_REGION_LEADER_REGIONID_46C70A32 = + "Current node [nodeId: {}] becomes schema region leader [regionId: {}]"; + public static final String PIPE_LOG_CURRENT_NODE_NODEID_AS_SCHEMA_REGION_LEADER_REGIONID_IS_F00BFAC5 = + "Current node [nodeId: {}] as schema region leader [regionId: {}] is ready to work"; + public static final String PIPE_LOG_SCHEMA_REGION_LISTENING_QUEUE_LISTEN_TO_SNAPSHOT_FAILED_64845A44 = + "Schema Region Listening Queue Listen to snapshot failed, the historical data may not be " + + "transferred. snapshotPaths:{}"; + public static final String PIPE_LOG_WRITE_OPERATION_FAILED_BECAUSE_RETRYTIME_34EFBE99 = + "write operation failed because {}, retryTime: {}."; + public static final String PIPE_LOG_EXCEPTION_OCCURS_WHEN_TAKING_SNAPSHOT_FOR_IN_48CBDFCC = + "Exception occurs when taking snapshot for {}-{} in {}"; + public static final String PIPE_LOG_MEETS_ERROR_WHEN_GETTING_SNAPSHOT_FILES_FOR_9BFA76B9 = + "Meets error when getting snapshot files for {}-{}"; + public static final String PIPE_LOG_WRITE_OPERATION_STILL_FAILED_AFTER_RETRY_TIMES_BECAUSE_15EEA702 = + "write operation still failed after {} retry times, because {}."; + public static final String PIPE_LOG_NOW_TRY_TO_DELETE_DIRECTLY_DATABASEPATH_DELETEPATH_A427CD01 = + "now try to delete directly, databasePath: {}, deletePath:{}"; + public static final String PIPE_LOG_BATCH_FAILURE_IN_EXECUTING_A_INSERTTABLETNODE_DEVICE_STARTTIME_9A5A70F6 = + "Batch failure in executing a InsertTabletNode. device: {}, startTime: {}, measurements: {}, " + + "failing status: {}"; + public static final String PIPE_LOG_INSERT_ROW_FAILED_DEVICE_TIME_MEASUREMENTS_FAILING_STATUS_63054E8B = + "Insert row failed. device: {}, time: {}, measurements: {}, failing status: {}"; + public static final String PIPE_LOG_INSERT_TABLET_FAILED_DEVICE_STARTTIME_MEASUREMENTS_FAILING_B409B2C4 = + "Insert tablet failed. device: {}, startTime: {}, measurements: {}, failing status: {}"; + + // --------------------------------------------------------------------------- + // Additional exception messages + // --------------------------------------------------------------------------- + public static final String PIPE_EXCEPTION_UNSUPPORTED_SUBSCRIPTION_REQUEST_VERSION_D_1E7C211A = + "Unsupported subscription request version %d"; + public static final String PIPE_EXCEPTION_PAYLOAD_SIZE_S_BYTE_S_WILL_EXCEED_THE_THRESHOLD_S_BYTE_S_6043B3D8 = + "payload size %s byte(s) will exceed the threshold %s byte(s)"; + public static final String PIPE_EXCEPTION_INCONSISTENT_READ_LENGTH_BROKEN_INVARIANT_EXPECTED_S_ACTUAL_9203668A = + "inconsistent read length (broken invariant), expected: %s, actual: %s"; + public static final String PIPE_EXCEPTION_TIMEOUTEXCEPTION_WAITED_S_SECONDS_8B31A3A5 = + "TimeoutException: Waited %s seconds"; + public static final String PIPE_EXCEPTION_THE_SUBSCRIPTIONCONNECTORSUBTASKMANAGER_ONLY_SUPPORTS_SUBSCRIPTION_CEFFAAA9 = + "The SubscriptionConnectorSubtaskManager only supports subscription-sink."; + public static final String PIPE_EXCEPTION_FAILED_TO_CONSTRUCT_SUBSCRIPTION_SINK_BECAUSE_OF_S_OR_S_DBA27DC2 = + "Failed to construct subscription sink, because of %s or %s does not exist in pipe connector " + + "parameters"; + public static final String PIPE_EXCEPTION_FAILED_TO_GET_PENDINGQUEUE_NO_SUCH_SUBTASK_S_B445404A = + "Failed to get PendingQueue. No such subtask: %s"; + public static final String PIPE_EXCEPTION_INVALID_BASE64_URL_COMPONENT_LENGTH_F1F1B6BA = + "Invalid base64 url component length"; + public static final String PIPE_EXCEPTION_INVALID_CONSENSUS_SUBSCRIPTION_PROGRESS_REGION_COUNT_S_7CE4FD8E = + "Invalid consensus subscription progress region count %s"; + public static final String PIPE_EXCEPTION_INVALID_CONSENSUS_SUBSCRIPTION_PROGRESS_PAYLOAD_LENGTH_S_8C145986 = + "Invalid consensus subscription progress payload length %s"; + public static final String PIPE_EXCEPTION_MALFORMED_CONSENSUS_SUBSCRIPTION_PROGRESS_FILE_S_83042847 = + "Malformed consensus subscription progress file %s"; + public static final String PIPE_EXCEPTION_ILLEGAL_S_S_72D743AA = "Illegal %s=%s"; + public static final String PIPE_EXCEPTION_INTERRUPTED_WHILE_WAITING_FOR_SEEK_APPLICATION_7C7ECAF2 = + "Interrupted while waiting for seek application"; + public static final String PIPE_EXCEPTION_CONSENSUSPREFETCHINGQUEUE_S_CANNOT_RECOVER_FROM_NON_EMPTY_C1B367EF = + "ConsensusPrefetchingQueue %s: cannot recover from non-empty region progress without WAL " + + "access: %s"; + public static final String PIPE_EXCEPTION_CONSENSUSPREFETCHINGQUEUE_S_CANNOT_INITIALIZE_REPLAY_START_E02DE40E = + "ConsensusPrefetchingQueue %s: cannot initialize replay start from region progress %s: %s"; + public static final String PIPE_EXCEPTION_CONSENSUSPREFETCHINGQUEUE_S_CANNOT_SEEKTOREGIONPROGRESS_2746E514 = + "ConsensusPrefetchingQueue %s: cannot seekToRegionProgress %s: %s"; + public static final String PIPE_EXCEPTION_CONSENSUSPREFETCHINGQUEUE_S_CANNOT_SEEKAFTERREGIONPROGRESS_48A500C3 = + "ConsensusPrefetchingQueue %s: cannot seekAfterRegionProgress %s: %s"; + public static final String PIPE_EXCEPTION_CONSENSUSPREFETCHINGQUEUE_S_IS_CLOSING_WHILE_APPLYING_SEEK_2BB2B431 = + "ConsensusPrefetchingQueue %s is closing while applying seek"; + public static final String PIPE_EXCEPTION_CONSENSUSPREFETCHINGQUEUE_S_RUNTIME_STOPPED_BEFORE_SEEK_7BCB4F4B = + "ConsensusPrefetchingQueue %s runtime stopped before seek(%s) was applied"; + public static final String PIPE_EXCEPTION_CONSENSUSPREFETCHINGQUEUE_S_IS_CLOSING_BEFORE_SEEK_APPLIES_F893BB02 = + "ConsensusPrefetchingQueue %s is closing before seek applies"; + public static final String PIPE_EXCEPTION_NO_PRIVILEGE_FOR_SELECT_FOR_USER_S_AT_TABLE_S_S_84B0C299 = + "No privilege for SELECT for user %s at table %s.%s"; + public static final String PIPE_EXCEPTION_EXPECTED_BINARY_BYTE_OR_STRING_BUT_WAS_S_7976B10F = + "Expected Binary, byte[] or String, but was %s."; + public static final String PIPE_EXCEPTION_TIMEOUTEXCEPTION_WAITED_S_SECONDS_FOR_MEMORY_TO_PARSE_TSFILE_0E4EF8FD = + "TimeoutException: Waited %s seconds for memory to parse TsFile"; + public static final String PIPE_EXCEPTION_UNSUPPORTED_DATA_TYPE_S_FOR_COLUMN_S_9F870C01 = + "unsupported data type %s for column %s"; + public static final String PIPE_EXCEPTION_COLUMN_S_NOT_FOUND_0FA13581 = "column %s not found"; + public static final String PIPE_EXCEPTION_INSERTNODE_TYPE_S_IS_NOT_SUPPORTED_7DF82B58 = + "InsertNode type %s is not supported."; + public static final String PIPE_EXCEPTION_DATA_TYPE_S_IS_NOT_SUPPORTED_5D5C02E4 = + "Data type %s is not supported."; + public static final String PIPE_EXCEPTION_FORCEALLOCATEFORTABLET_FAILED_TO_ALLOCATE_BECAUSE_THERE_F878474D = + "forceAllocateForTablet: failed to allocate because there's too much memory for tablets, " + + "total memory size %d bytes, used memory for tablet size %d bytes, requested memory size %d " + + "bytes"; + public static final String PIPE_EXCEPTION_FORCEALLOCATEFORTSFILE_FAILED_TO_ALLOCATE_BECAUSE_THERE_6D614467 = + "forceAllocateForTsFile: failed to allocate because there's too much memory for tsfiles, " + + "total memory size %d bytes, used memory for tsfile size %d bytes, requested memory size %d " + + "bytes"; + public static final String PIPE_EXCEPTION_FORCEALLOCATE_FAILED_TO_ALLOCATE_MEMORY_AFTER_D_RETRIES_44EF7AE7 = + "forceAllocate: failed to allocate memory after %d retries, total memory size %d bytes, used " + + "memory size %d bytes, requested memory size %d bytes"; + public static final String PIPE_EXCEPTION_FORCERESIZE_FAILED_TO_ALLOCATE_MEMORY_AFTER_D_RETRIES_TOTAL_8C6948BC = + "forceResize: failed to allocate memory after %d retries, total memory size %d bytes, used " + + "memory size %d bytes, requested memory size %d bytes"; + public static final String PIPE_EXCEPTION_FAILED_TO_GET_HARDLINK_OR_COPIED_FILE_IN_PIPE_DIR_FOR_FILE_F009D86E = + "failed to get hardlink or copied file in pipe dir for file %s, it is not a tsfile, mod file " + + "or resource file"; + public static final String PIPE_EXCEPTION_PIPEPLANTOSTATEMENTVISITOR_DOES_NOT_SUPPORT_VISITING_GENERAL_452AAA60 = + "PipePlanToStatementVisitor does not support visiting general plan, PlanNode: %s"; + public static final String PIPE_EXCEPTION_AIRGAP_PAYLOAD_LENGTH_D_EXCEEDS_MAXIMUM_ALLOWED_D_CLOSING_D1712B3D = + "AirGap payload length (%d) exceeds maximum allowed (%d). Closing connection from %s"; + public static final String PIPE_EXCEPTION_DETECTED_SUSPICIOUS_NESTED_E_LANGUAGE_PREFIX_CLOSING_CONNECTION_69C76172 = + "Detected suspicious nested E-Language prefix. Closing connection from %s"; + public static final String PIPE_EXCEPTION_AUTO_CREATE_DATABASE_FAILED_S_STATUS_CODE_S_D8EB60FA = + "Auto create database failed: %s, status code: %s"; + public static final String PIPE_EXCEPTION_IOTCONSENSUSV2_PIPENAME_S_FAILED_TO_CREATE_RECEIVER_FILE_DD67E854 = + "IoTConsensusV2-PipeName-%s: Failed to create receiver file dir %s. Because parent system " + + "dir have been deleted due to system concurrently exit."; + public static final String PIPE_EXCEPTION_IOTCONSENSUSV2_PIPENAME_S_FAILED_TO_CREATE_RECEIVER_FILE_5ADC430A = + "IoTConsensusV2-PipeName-%s: Failed to create receiver file dir %s. May because authority or " + + "dir already exists etc."; + public static final String PIPE_EXCEPTION_IOTCONSENSUSV2_PIPENAME_S_FAILED_TO_CREATE_TSFILEWRITER_85EC8DD2 = + "IoTConsensusV2-PipeName-%s: Failed to create tsFileWriter-%d receiver file dir"; + public static final String PIPE_EXCEPTION_UNSUPPORTED_IOTCONSENSUSV2_REQUEST_VERSION_D_E1D94606 = + "Unsupported iotConsensusV2 request version %d"; + public static final String PIPE_EXCEPTION_CAN_NOT_EXECUTE_DELETE_STATEMENT_S_3563E8A3 = + "Can not execute delete statement: %s"; + public static final String PIPE_EXCEPTION_CAN_NOT_EXECUTE_LOAD_TSFILE_STATEMENT_S_8CC1A096 = + "Can not execute load TsFile statement: %s"; + public static final String PIPE_EXCEPTION_FAILED_TO_GET_PIPE_TASK_PROGRESS_INDEX_WITH_PIPE_NAME_S_CFE9DE7C = + "Failed to get pipe task progress index with pipe name: %s, consensus group id %s."; + public static final String PIPE_EXCEPTION_EXCEPTION_IN_PIPE_PROCESS_SUBTASK_S_LAST_EVENT_S_ROOT_CAUSE_95B49C24 = + "Exception in pipe process, subtask: %s, last event: %s, root cause: %s"; + public static final String PIPE_EXCEPTION_THE_VISIBILITY_OF_THE_PIPE_S_S_IS_NOT_COMPATIBLE_WITH_THE_30B8BF0A = + "The visibility of the pipe (%s, %s) is not compatible with the visibility of the source " + + "(%s, %s, %s), processor (%s, %s, %s), and connector (%s, %s, %s)."; + public static final String PIPE_EXCEPTION_DATA_TYPE_S_IS_NOT_SUPPORTED_WHEN_CONVERT_DATA_AT_CLIENT_405429CC = + "data type %s is not supported when convert data at client"; + public static final String PIPE_EXCEPTION_HANDSHAKE_ERROR_WITH_RECEIVER_S_S_CODE_D_MESSAGE_S_4ED82649 = + "Handshake error with receiver %s:%s, code: %d, message: %s."; + public static final String PIPE_EXCEPTION_THE_WEBSOCKET_SERVER_HAS_ALREADY_BEEN_CREATED_WITH_PORT_FFC420AE = + "The websocket server has already been created with port = %d. Please set the option " + + "cdc.port = %d."; + public static final String PIPE_EXCEPTION_NETWORK_ERROR_WHEN_TRANSFER_TSFILE_INSERTION_EVENT_S_703A2E9E = + "Network error when transfer tsFile insertion event: %s."; + public static final String PIPE_EXCEPTION_CANNOT_SEND_PIPE_DATA_TO_RECEIVER_S_S_BECAUSE_S_25143D54 = + "Cannot send pipe data to receiver %s:%s, because: %s."; + public static final String PIPE_EXCEPTION_NETWORK_ERROR_WHEN_TRANSFER_EVENT_S_BECAUSE_S_60A63AD7 = + "Network error when transfer event %s, because %s."; + public static final String PIPE_EXCEPTION_NETWORK_ERROR_WHEN_TRANSFER_TABLET_INSERTION_EVENT_S_BECAUSE_A6F87EF5 = + "Network error when transfer tablet insertion event %s, because %s."; + public static final String PIPE_EXCEPTION_NETWORK_ERROR_WHEN_TRANSFER_TSFILE_INSERTION_EVENT_S_BECAUSE_BDE61690 = + "Network error when transfer tsfile insertion event %s, because %s."; + public static final String PIPE_EXCEPTION_NETWORK_ERROR_WHEN_TRANSFER_TSFILE_EVENT_S_BECAUSE_S_F36D2A6B = + "Network error when transfer tsfile event %s, because %s."; + public static final String PIPE_EXCEPTION_FAILED_TO_TRANSFER_TABLET_INSERTION_EVENT_S_BECAUSE_S_9710318F = + "Failed to transfer tablet insertion event %s, because %s."; + public static final String PIPE_EXCEPTION_FAILED_TO_TRANSFER_TSFILE_INSERTION_EVENT_S_BECAUSE_S_21AD3263 = + "Failed to transfer tsfile insertion event %s, because %s."; + public static final String PIPE_EXCEPTION_NETWORK_ERROR_WHEN_TRANSFER_FILE_S_BECAUSE_S_3C673B7A = + "Network error when transfer file %s, because %s."; + public static final String PIPE_EXCEPTION_PARAMETERS_IN_SET_S_ARE_NOT_ALLOWED_IN_SKIPIF_AAF177AD = + "Parameters in set %s are not allowed in 'skipif'"; + public static final String PIPE_EXCEPTION_FAILED_TO_CHECK_PASSWORD_FOR_PIPE_S_0B1A5C73 = + "Failed to check password for pipe %s."; + public static final String PIPE_EXCEPTION_NETWORK_ERROR_WHEN_TRANSFER_DELETION_S_BECAUSE_S_3B250B4B = + "Network error when transfer deletion %s, because %s."; + public static final String PIPE_EXCEPTION_NETWORK_ERROR_WHEN_TRANSFER_TABLET_BATCH_BECAUSE_S_6BEC52E7 = + "Network error when transfer tablet batch, because %s."; + public static final String PIPE_EXCEPTION_NETWORK_ERROR_WHEN_TRANSFER_INSERT_NODE_TABLET_INSERTION_D993C7AB = + "Network error when transfer insert node tablet insertion event, because %s."; + public static final String PIPE_EXCEPTION_NETWORK_ERROR_WHEN_TRANSFER_RAW_TABLET_INSERTION_EVENT_BECAUSE_D8ACEC3C = + "Network error when transfer raw tablet insertion event, because %s."; + public static final String PIPE_EXCEPTION_NETWORK_ERROR_WHEN_SEAL_FILE_S_BECAUSE_S_DC87F263 = + "Network error when seal file %s, because %s."; + public static final String PIPE_EXCEPTION_NETWORK_ERROR_WHEN_TRANSFER_SCHEMA_REGION_WRITE_PLAN_S_BECAUSE_AEB210C7 = + "Network error when transfer schema region write plan %s, because %s."; + public static final String PIPE_EXCEPTION_NETWORK_ERROR_WHEN_SEAL_SNAPSHOT_FILE_S_S_AND_S_BECAUSE_5EF373E6 = + "Network error when seal snapshot file %s, %s and %s, because %s."; + public static final String PIPE_EXCEPTION_FAILED_TO_TRANSFER_SLICE_ORIGIN_REQ_S_S_SLICE_INDEX_D_SLICE_44E1CF32 = + "Failed to transfer slice. Origin req: %s-%s, slice index: %d, slice count: %d. Reason: %s"; + public static final String PIPE_EXCEPTION_THE_EXISTING_SERVER_WITH_TCP_PORT_S_AND_HTTPS_PORT_S_S_S_08C076F7 = + "The existing server with tcp port %s and https port %s's %s %s conflicts to the new %s %s, " + + "reject reusing."; + public static final String PIPE_EXCEPTION_INVALID_KEYSTORE_THE_SERVERPRIVATEKEY_IS_S_F5F3C02F = + "Invalid keyStore, the serverPrivateKey is %s"; + public static final String PIPE_EXCEPTION_THE_FOLDER_NODE_FOR_S_DOES_NOT_EXIST_CC0776AE = + "The folder node for %s does not exist."; + public static final String PIPE_EXCEPTION_THE_NODE_S_DOES_NOT_EXIST_52F98935 = + "The Node %s does not exist."; + public static final String PIPE_EXCEPTION_THE_EXISTING_SERVER_WITH_NODEURL_S_S_S_S_CONFLICTS_TO_THE_1C06A4F6 = + "The existing server with nodeUrl %s's %s %s conflicts to the new %s %s, reject reusing."; + public static final String PIPE_EXCEPTION_UNKNOWN_INSERTBASESTATEMENT_S_CONSTRUCTED_FROM_PIPETRANSFERTABLETINSERTNODEREQ_FF5ED1D7 = + "Unknown InsertBaseStatement %s constructed from PipeTransferTabletInsertNodeReq."; + public static final String PIPE_EXCEPTION_UNKNOWN_INSERTNODE_TYPE_S_WHEN_CONSTRUCTING_STATEMENT_FROM_4A055174 = + "Unknown InsertNode type %s when constructing statement from insert node."; + public static final String PIPE_EXCEPTION_UNKNOWN_INSERTBASESTATEMENT_S_CONSTRUCTED_FROM_PIPETRANSFERTABLETBINARYREQV2_06D274D2 = + "unknown InsertBaseStatement %s constructed from PipeTransferTabletBinaryReqV2."; + public static final String PIPE_EXCEPTION_UNKNOWN_INSERTBASESTATEMENT_S_CONSTRUCTED_FROM_PIPETRANSFERTABLETINSERTNODEREQV2_16F399B6 = + "Unknown InsertBaseStatement %s constructed from PipeTransferTabletInsertNodeReqV2."; + public static final String PIPE_EXCEPTION_FAILED_TO_CREATE_FILE_DIR_FOR_BATCH_S_8FCD9125 = + "Failed to create file dir for batch: %s"; + public static final String PIPE_EXCEPTION_FAILED_TO_CREATE_BATCH_FILE_DIR_BATCH_ID_S_EA8BE86C = + "Failed to create batch file dir. (Batch id = %s)"; + public static final String PIPE_EXCEPTION_PIPETREESTATEMENTTOPLANVISITOR_DOES_NOT_SUPPORT_VISITING_3A4A6524 = + "PipeTreeStatementToPlanVisitor does not support visiting general statement, Statement: %s"; + public static final String PIPE_EXCEPTION_PIPESTATEMENTTOPLANVISITOR_DOES_NOT_SUPPORT_VISITING_GENERAL_590C6BD7 = + "PipeStatementToPlanVisitor does not support visiting general statement, Statement: %s"; + public static final String PIPE_EXCEPTION_THE_PATH_PATTERN_S_IS_NOT_VALID_FOR_THE_SOURCE_ONLY_PREFIX_139F93D6 = + "The path pattern %s is not valid for the source. Only prefix or full path is allowed."; + public static final String PIPE_EXCEPTION_S_S_S_SHOULD_BE_LESS_THAN_OR_EQUAL_TO_S_S_S_0B9726E1 = + "%s (%s) [%s] should be less than or equal to %s (%s) [%s]."; + public static final String PIPE_EXCEPTION_PARAMETERS_IN_SET_S_ARE_NOT_ALLOWED_IN_REALTIME_LOOSE_RANGE_BACD2475 = + "Parameters in set %s are not allowed in 'realtime.loose-range'"; + public static final String PIPE_EXCEPTION_UNSUPPORTED_EVENT_TYPE_S_FOR_LOG_REALTIME_EXTRACTOR_S_961C5D2D = + "Unsupported event type %s for log realtime extractor %s"; + public static final String PIPE_EXCEPTION_UNSUPPORTED_EVENT_TYPE_S_FOR_HYBRID_REALTIME_EXTRACTOR_S_9C4F4C82 = + "Unsupported event type %s for hybrid realtime extractor %s"; + public static final String PIPE_EXCEPTION_UNSUPPORTED_STATE_S_FOR_HYBRID_REALTIME_EXTRACTOR_S_43BD62C2 = + "Unsupported state %s for hybrid realtime extractor %s"; + public static final String PIPE_EXCEPTION_UNSUPPORTED_EVENT_TYPE_S_FOR_HYBRID_REALTIME_EXTRACTOR_S_474BAAC2 = + "Unsupported event type %s for hybrid realtime extractor %s to supply."; + public static final String PIPE_EXCEPTION_PARAMETERS_IN_SET_S_ARE_NOT_ALLOWED_IN_HISTORY_LOOSE_RANGE_0F685D5C = + "Parameters in set %s are not allowed in 'history.loose-range'"; + public static final String PIPE_EXCEPTION_THE_AGGREGATOR_AND_OUTPUT_NAME_S_IS_INVALID_BC22CF92 = + "The aggregator and output name %s is invalid."; + public static final String PIPE_EXCEPTION_THE_NEEDED_INTERMEDIATE_VALUES_S_ARE_NOT_DEFINED_3FF0C52D = + "The needed intermediate values %s are not defined."; + public static final String PIPE_EXCEPTION_THE_PROCESSOR_S_IS_NOT_A_WINDOWING_PROCESSOR_EA5B59BA = + "The processor %s is not a windowing processor."; + public static final String PIPE_EXCEPTION_THE_AGGREGATE_PROCESSOR_DOES_NOT_SUPPORT_PROGRESSINDEXTYPE_35351D27 = + "The aggregate processor does not support progressIndexType %s"; + public static final String PIPE_EXCEPTION_THE_TYPE_S_IS_NOT_SUPPORTED_E1A6F05D = + "The type %s is not supported"; + public static final String PIPE_EXCEPTION_THE_OUTPUT_TABLET_DOES_NOT_SUPPORT_COLUMN_TYPE_S_62F3845C = + "The output tablet does not support column type %s"; + public static final String PIPE_EXCEPTION_THE_NEW_DATABASE_NAME_S_IS_INVALID_IT_SHOULD_NOT_CONTAIN_C3AB555E = + "The new database name %s is invalid, it should not contain '%s', should match the pattern " + + "%s, and the length should not exceed %d"; + public static final String PIPE_EXCEPTION_THE_TYPE_S_CANNOT_BE_CASTED_TO_BOOLEAN_F19CCF75 = + "The type %s cannot be casted to boolean."; + public static final String PIPE_EXCEPTION_THE_TYPE_S_CANNOT_BE_CASTED_TO_INT_659069CC = + "The type %s cannot be casted to int."; + public static final String PIPE_EXCEPTION_THE_TYPE_S_CANNOT_BE_CASTED_TO_LONG_2D206561 = + "The type %s cannot be casted to long."; + public static final String PIPE_EXCEPTION_THE_TYPE_S_CANNOT_BE_CASTED_TO_FLOAT_C15A8A95 = + "The type %s cannot be casted to float."; + public static final String PIPE_EXCEPTION_THE_TYPE_S_CANNOT_BE_CASTED_TO_DOUBLE_E577C0D7 = + "The type %s cannot be casted to double."; + public static final String PIPE_EXCEPTION_THE_TYPE_S_CANNOT_BE_CASTED_TO_STRING_34983FBD = + "The type %s cannot be casted to string."; + public static final String PIPE_EXCEPTION_UNABLE_TO_CREATE_IOTCONSENSUSV2_DELETION_DIR_AT_S_800EE360 = + "Unable to create iotConsensusV2 deletion dir at %s"; + public static final String PIPE_EXCEPTION_THE_TIMESERIES_S_USED_NEW_TYPE_S_IS_NOT_COMPATIBLE_WITH_455D4D4A = + "The timeseries %s used new type %s is not compatible with the existing one %s."; + public static final String PIPE_EXCEPTION_THERE_ARE_TWO_TYPES_OF_PLANNODE_IN_ONE_REQUEST_S_AND_S_30FB3EE5 = + "There are two types of PlanNode in one request: %s and %s"; + public static final String PIPE_EXCEPTION_THERE_ARE_TWO_TYPES_OF_PLANNODE_IN_ONE_REQUEST_S_AND_SEARCHNODE_F8B4D860 = + "There are two types of PlanNode in one request: %s and SearchNode"; + public static final String COMPLETE_PAGE_BODY_EXPECTED_ACTUAL_FMT = + "do not has a complete page body. Expected:%s. Actual:%s"; + public static final String UNCOMPRESS_PAGE_DATA_FAILED_FMT = + "Uncompress error! uncompress size: %scompressed size: %spage header: %s%s"; + public static final String FAILED_TO_CLOSE_LISTENING_QUEUE_FOR_SCHEMAREGION_BECAUSE_FMT = + "Failed to close listening queue for SchemaRegion %s, because %s"; + public static final String PIPE_SINK_HEARTBEAT_OR_TRANSFER_FAILED_FMT = + "PipeConnector: %s(id: %s) heartbeat failed, or encountered failure when transferring " + + "generic event. Failure: %s"; + public static final String FAILED_TO_ADD_ITEM_WITH_OPC_ERROR_CODE_FMT = + "Failed to add item %s, opc error code: 0x%s"; + public static final String FAILED_TO_WRITE_WITH_VALUE_AND_OPC_ERROR_CODE_FMT = + "Failed to write %s, value: %s, opc error code: 0x%s"; + public static final String NO_CERTIFICATE_FOUND = "No certificate found"; + public static final String CERTIFICATE_MISSING_APPLICATION_URI = + "Certificate is missing the application URI"; + public static final String NULL_VALUE = "null"; + public static final String INCREASE_REFERENCE_COUNT_ERROR_HOLDER_FMT = + "Increase reference count error. Holder Message: %s"; + public static final String DECREASE_REFERENCE_COUNT_ERROR_HOLDER_FMT = + "Decrease reference count error. Holder Message: %s"; + public static final String INCREASE_REFERENCE_COUNT_TSFILE_OR_MODFILE_ERROR_HOLDER_FMT = + "Increase reference count for TsFile %s or modFile %s error. Holder Message: %s"; + public static final String DECREASE_REFERENCE_COUNT_TSFILE_ERROR_HOLDER_FMT = + "Decrease reference count for TsFile %s error. Holder Message: %s"; + public static final String INCREASE_REFERENCE_COUNT_MTREE_OR_TLOG_ERROR_HOLDER_FMT = + "Increase reference count for mTree snapshot %s or tLog %s error. Holder Message: %s"; + public static final String DECREASE_REFERENCE_COUNT_MTREE_OR_TLOG_ERROR_HOLDER_FMT = + "Decrease reference count for mTree snapshot %s or tLog %s error. Holder Message: %s"; + public static final String CONSENSUS_PREFETCHING_QUEUE_CLOSING_BEFORE_SEEK_SCHEDULED_FMT = + "ConsensusPrefetchingQueue %s is closing before seek(%s) can be scheduled"; + public static final String CONSENSUS_PREFETCHING_QUEUE_RUNTIME_UNAVAILABLE_FOR_SEEK_FMT = + "ConsensusPrefetchingQueue %s cannot schedule seek(%s) because prefetch runtime is unavailable"; + public static final String ERROR_PROGID_INVALID_OR_UNREGISTERED_HRESULT_FMT = + "Error: ProgID is invalid or unregistered, (HRESULT=0x%s)"; + public static final String ERROR_RUNNING_OPC_CLIENT_FMT = "Error running opc client: %s: %s"; + public static final String ERROR_GETTING_OPC_CLIENT_FMT = "Error getting opc client: %s: %s"; + } diff --git a/iotdb-core/datanode/src/main/i18n/en/org/apache/iotdb/db/i18n/DataNodeQueryMessages.java b/iotdb-core/datanode/src/main/i18n/en/org/apache/iotdb/db/i18n/DataNodeQueryMessages.java index 964163ce14fbc..b56532fd25746 100644 --- a/iotdb-core/datanode/src/main/i18n/en/org/apache/iotdb/db/i18n/DataNodeQueryMessages.java +++ b/iotdb-core/datanode/src/main/i18n/en/org/apache/iotdb/db/i18n/DataNodeQueryMessages.java @@ -1431,5 +1431,2152 @@ public final class DataNodeQueryMessages { public static final String QUERY_EXECUTION_MISSING = "Query execution %s is missing during fetching device schema"; + // --- QueryEngine semantic messages (additional) --- + public static final String PREPARED_STATEMENT_S_DOES_NOT_EXIST = + "Prepared statement '%s' does not exist"; + public static final String CALL_INFERENCE_FUNCTION_SHOULD_NOT_CONTAIN_MORE_THAN_ONE_INPUT_COLUMN_FOUND_D_INPUT = + "Call inference function should not contain more than one input column, found [%d] input columns."; + public static final String DATA_TYPE_OF_TAG_COLUMN = + "Data type of tag column "; + public static final String IS_NOT_STRING = + " is not STRING"; + public static final String THE_SOURCE_PATHS_S_OF_VIEW_S_ARE_MULTIPLE = + "The source paths [%s] of view [%s] are multiple."; + public static final String ERROR_OCCURRED_DURING_INFERRING_UDF_DATA_TYPE_S = + "Error occurred during inferring UDF data type: %s"; + public static final String ERROR_OCCURRED_DURING_GETTING_UDF_ACCESS_STRATEGY_S = + "Error occurred during getting UDF access strategy: %s"; + public static final String UNSUPPORTED_COMPRESSION_S = + "unsupported compression: %s"; + public static final String TIMESERIES_CONDITION_AND_TIME_CONDITION_CANNOT_BE_USED_AT_THE_SAME_TIME = + "TIMESERIES condition and TIME condition cannot be used at the same time."; + public static final String LATEST_AND_ORDER_BY_TIMESERIES_CANNOT_BE_USED_AT_THE_SAME_TIME = + "LATEST and ORDER BY TIMESERIES cannot be used at the same time."; + public static final String DEVICE_CONDITION_AND_TIME_CONDITION_CANNOT_BE_USED_AT_THE_SAME_TIME = + "DEVICE condition and TIME condition cannot be used at the same time."; + public static final String TIME_CONDITION_AND_GROUP_BY_LEVEL_CANNOT_BE_USED_AT_THE_SAME_TIME = + "TIME condition and GROUP BY LEVEL cannot be used at the same time."; + public static final String CQ_AT_LEAST_ONE_OF_THE_PARAMETERS_EVERY_INTERVAL_AND_GROUP_BY_INTERVAL_NEEDS_TO_BE = + "CQ: At least one of the parameters `every_interval` and `group_by_interval` needs to be specified."; + public static final String CAN_NOT_USE_CHAR_DOLLAR_OR_INTO_ITEM_IN_ALTER_VIEW_STATEMENT = + "Can not use char '$' or into item in alter view statement."; + public static final String TIME_COLUMN_IS_NO_NEED_TO_APPEAR_IN_SELECT_CLAUSE_EXPLICITLY_IT_WILL_ALWAYS_BE_RETURNED = + "Time column is no need to appear in SELECT Clause explicitly, it will always be returned if possible"; + public static final String THE_SECOND_PARAMETER_TIME_INTERVAL_SHOULD_BE_A_POSITIVE_INTEGER = + "The second parameter time interval should be a positive integer."; + public static final String THE_THIRD_PARAMETER_TIME_SLIDINGSTEP_SHOULD_BE_A_POSITIVE_INTEGER = + "The third parameter time slidingStep should be a positive integer."; + public static final String CONSTANT_OPERAND_S_IS_NOT_ALLOWED_IN_GROUP_BY_VARIATION_THERE_SHOULD_BE_AN_EXPRESSION = + "Constant operand [%s] is not allowed in group by variation, there should be an expression"; + public static final String CONSTANT_OPERAND_S_IS_NOT_ALLOWED_IN_GROUP_BY_COUNT_THERE_SHOULD_BE_AN_EXPRESSION = + "Constant operand [%s] is not allowed in group by count, there should be an expression"; + public static final String ORDER_BY_SORT_KEY_S_IS_NOT_CONTAINED_IN_S = + "ORDER BY: sort key[%s] is not contained in '%s'"; + public static final String ORDER_BY_EXPRESSION_IS_NOT_SUPPORTED_FOR_CURRENT_STATEMENT_SUPPORTED_SORT_KEY = + "ORDER BY expression is not supported for current statement, supported sort key: "; + public static final String ONLY_FILL_PREVIOUS_SUPPORT_SPECIFYING_THE_TIME_DURATION_THRESHOLD = + "Only FILL(PREVIOUS) support specifying the time duration threshold."; + public static final String OUT_OF_RANGE_OFFSET_LT_OFFSETVALUE_GT_OFFSETVALUE_SHOULD_BE_INT64 = + "Out of range. OFFSET : OFFSETValue should be Int64."; + public static final String OUT_OF_RANGE_SOFFSET_LT_SOFFSETVALUE_GT_SOFFSETVALUE_SHOULD_BE_INT32 = + "Out of range. SOFFSET : SOFFSETValue should be Int32."; + public static final String FAILED_TO_PARSE_THE_TIMESTAMP = + "Failed to parse the timestamp: "; + public static final String CURRENT_SYSTEM_TIMESTAMP_PRECISION_IS_S = + "Current system timestamp precision is %s, "; + public static final String PLEASE_CHECK_WHETHER_THE_TIMESTAMP_S_IS_CORRECT = + "please check whether the timestamp %s is correct."; + public static final String LOAD_TSFILE_FORMAT_S_ERROR_PLEASE_INPUT_AUTOREGISTER_SGLEVEL_VERIFY = + "Load tsfile format %s error, please input AUTOREGISTER | SGLEVEL | VERIFY."; + public static final String S_IS_ILLEGAL_UNQUOTED_NODE_NAME_CAN_ONLY_CONSIST_OF_DIGITS_CHARACTERS_AND_UNDERSCORE_OR = + "%s is illegal, unquoted node name can only consist of digits, characters and underscore, or start or end with wildcard"; + public static final String S_IS_ILLEGAL_UNQUOTED_NODE_NAME_IN_SELECT_INTO_CLAUSE_CAN_ONLY_CONSIST_OF_DIGITS = + "%s is illegal, unquoted node name in select into clause can only consist of digits, characters, $, { and }"; + public static final String S_IS_ILLEGAL_IDENTIFIER_NOT_ENCLOSED_WITH_BACKTICKS_CAN_ONLY_CONSIST_OF_DIGITS = + "%s is illegal, identifier not enclosed with backticks can only consist of digits, characters and underscore."; + public static final String INPUT_TIME_FORMAT_S_ERROR = + "Input time format %s error. "; + public static final String INPUT_LIKE_YYYY_MM_DD_HH_MM_SS_YYYY_MM_DDTHH_MM_SS_OR = + "Input like yyyy-MM-dd HH:mm:ss, yyyy-MM-ddTHH:mm:ss or "; + public static final String REFER_TO_USER_DOCUMENT_FOR_MORE_INFO = + "refer to user document for more info."; + public static final String GRANT_OPTION_IS_DISABLED_PLEASE_CHECK_THE_PARAMETER_ENABLE_GRANT_OPTION = + "Grant Option is disabled, Please check the parameter enable_grant_option."; + public static final String S_CAN_ONLY_BE_SET_ON_PATH_ROOT_STAR_STAR = + "[%s] can only be set on path: root.**"; + public static final String PRIVILEGE_TYPE = + "Privilege type "; + public static final String IS_DEPRECATED_USE = + " is deprecated, use "; + public static final String TO_INSTEAD_IT = + " to instead it"; + public static final String INVALID_FUNCTION_EXPRESSION_ALL_THE_ARGUMENTS_ARE_CONSTANT_OPERANDS = + "Invalid function expression, all the arguments are constant operands: "; + public static final String ERROR_SIZE_OF_INPUT_EXPRESSIONS_EXPRESSION_S_ACTUAL_SIZE_S_EXPECTED_SIZE_S = + "Error size of input expressions. expression: %s, actual size: %s, expected size: %s."; + public static final String CAN_NOT_PARSE_S_TO_LONG_VALUE = + "Can not parse %s to long value"; + public static final String THERE_S_DUPLICATE_S_IN_TAG_OR_ATTRIBUTE_CLAUSE = + "There's duplicate [%s] in tag or attribute clause."; + public static final String NOT_SUPPORT_FOR_THIS_SQL_IN_CREATE_PIPE_PLEASE_ENTER_PIPE_NAME = + "Not support for this sql in CREATE PIPE, please enter pipe name."; + public static final String NOT_SUPPORT_FOR_THIS_SQL_IN_ALTER_PIPE_PLEASE_ENTER_PIPE_NAME = + "Not support for this sql in ALTER PIPE, please enter pipe name."; + public static final String NOT_SUPPORT_FOR_THIS_SQL_IN_CREATE_TOPIC_PLEASE_ENTER_TOPICNAME = + "Not support for this sql in CREATE TOPIC, please enter topicName."; + public static final String NOT_SUPPORT_FOR_THIS_SQL_IN_DROP_TOPIC_PLEASE_ENTER_TOPICNAME = + "Not support for this sql in DROP TOPIC, please enter topicName."; + public static final String NOT_SUPPORT_FOR_THIS_SQL_IN_DROP_SUBSCRIPTION_PLEASE_ENTER_SUBSCRIPTIONID = + "Not support for this sql in DROP SUBSCRIPTION, please enter subscriptionId."; + public static final String PLEASE_SET_THE_CORRECT_REQUEST_TYPE = + "Please set the correct request type: "; + public static final String WHEN_SETTING_THE_REQUEST_THE_UNIT_IS_INCORRECT_PLEASE_USE_SEC_MIN_HOUR_DAY_AS_THE_UNIT = + "When setting the request, the unit is incorrect. Please use 'sec', 'min', 'hour', 'day' as the unit"; + public static final String WHEN_SETTING_THE_SIZE_TIME_THE_UNIT_IS_INCORRECT_PLEASE_USE_B_K_M_G_P_T_AS_THE_UNIT = + "When setting the size/time, the unit is incorrect. Please use 'B', 'K', 'M', 'G', 'P', 'T' as the unit"; + public static final String WHEN_SETTING_THE_DISK_SIZE_THE_UNIT_IS_INCORRECT_PLEASE_USE_M_G_P_T_AS_THE_UNIT = + "When setting the disk size, the unit is incorrect. Please use 'M', 'G', 'P', 'T' as the unit"; + public static final String WINDOW_FUNCTION_E_G_HEAD_TAIL_COUNT_SHOULD_BE_SET_IN_VALUE_WHEN_KEY_IS_WINDOW_IN_CALL = + "Window Function(e.g. HEAD, TAIL, COUNT) should be set in value when key is 'WINDOW' in CALL INFERENCE"; + public static final String THE_OUTPUT_TYPE_OF_THE_EXPRESSION_IN_HAVING_CLAUSE_SHOULD_BE_BOOLEAN_ACTUAL_DATA_TYPE_S = + "The output type of the expression in HAVING clause should be BOOLEAN, actual data type: %s."; + public static final String IN = + " in "; + public static final String START_TIME_D_IS_GREATER_THAN_END_TIME_D = + "Start time %d is greater than end time %d"; + public static final String THE_COLUMN = + "The column '"; + public static final String DOES_NOT_EXIST_OR_IS_NOT_A_TAG_COLUMN = + "' does not exist or is not a tag column"; + public static final String THE_RIGHT_HAND_VALUE_OF_TIME_PREDICATE_MUST_BE_A_LONG = + "The right hand value of time predicate must be a long: "; + public static final String THE_OPERATOR_OF_TIME_PREDICATE_MUST_BE_LT_LT_EQ_GT_OR_GT_EQ = + "The operator of time predicate must be <, <=, >, or >=: "; + public static final String THE_RIGHT_HAND_VALUE_OF_TAG_PREDICATE_CANNOT_BE_NULL_WITH_EQ_OPERATOR_PLEASE_USE_IS_NULL = + "The right hand value of tag predicate cannot be null with '=' operator, please use 'IS NULL' instead"; + public static final String THE_RIGHT_HAND_VALUE_OF_TAG_PREDICATE_MUST_BE_A_STRING = + "The right hand value of tag predicate must be a string: "; + public static final String SELECT_INTO_PLACEHOLDER_CAN_ONLY_BE_USED_AT_THE_END_OF_THE_PATH = + "select into: placeholder `::` can only be used at the end of the path."; + public static final String SELECT_INTO_THE_I_OF_DOLLAR_I_SHOULD_BE_GREATER_THAN_0_AND_EQUAL_TO_OR_LESS_THAN_THE = + "select into: the i of ${i} should be greater than 0 and equal to or less than the length of queried path prefix."; + public static final String ALIAS_S_CAN_ONLY_BE_MATCHED_WITH_ONE_RESULT_COLUMN = + "alias '%s' can only be matched with one result column"; + public static final String RESULT_COLUMN_S_WITH_MORE_THAN_ONE_ALIAS_S_S = + "Result column %s with more than one alias[%s, %s]"; + public static final String THERE_ARE_TOO_MANY_CONJUNCTS_MORE_THAN_1000_IN_PREDICATE_AFTER_REWRITING_THIS_MAY_BE = + "There are too many conjuncts (more than 1000) in predicate after rewriting, this may be caused by too many devices in query, try to use ALIGN BY DEVICE"; + public static final String CASE_EXPRESSION_TEXT_AND_OTHER_TYPES_CANNOT_EXIST_AT_THE_SAME_TIME = + "CASE expression: TEXT and other types cannot exist at the same time"; + public static final String CASE_EXPRESSION_BOOLEAN_AND_OTHER_TYPES_CANNOT_EXIST_AT_THE_SAME_TIME = + "CASE expression: BOOLEAN and other types cannot exist at the same time"; + public static final String THE_EXPRESSION_IN_THE_WHEN_CLAUSE_MUST_RETURN_BOOLEAN_EXPRESSION_S_ACTUAL_DATA_TYPE_S = + "The expression in the WHEN clause must return BOOLEAN. expression: %s, actual data type: %s."; + public static final String INVALID_INPUT_EXPRESSION_DATA_TYPE_EXPRESSION_S_ACTUAL_DATA_TYPE_S_EXPECTED_DATA_TYPE_S = + "Invalid input expression data type. expression: %s, actual data type: %s, expected data type(s): %s."; + public static final String S_IN_ORDER_BY_CLAUSE_DOESN_T_EXIST = + "%s in order by clause doesn't exist."; + public static final String S_IN_ORDER_BY_CLAUSE_SHOULDN_T_REFER_TO_MORE_THAN_ONE_TIMESERIES = + "%s in order by clause shouldn't refer to more than one timeseries."; + public static final String THE_DATA_TYPE_OF_S_IS_NOT_COMPARABLE = + "The data type of %s is not comparable"; + public static final String GROUP_BY_LEVEL_THE_DATA_TYPES_OF_THE_SAME_OUTPUT_COLUMN_S_SHOULD_BE_THE_SAME = + "GROUP BY LEVEL: the data types of the same output column[%s] should be the same."; + public static final String CROSS_DEVICE_QUERIES_ARE_NOT_SUPPORTED_IN_ALIGN_BY_DEVICE_QUERIES = + "Cross-device queries are not supported in ALIGN BY DEVICE queries."; + public static final String VIEWS_OR_MEASUREMENT_ALIASES_REPRESENTING_THE_SAME_DATA_SOURCE = + "Views or measurement aliases representing the same data source "; + public static final String CANNOT_BE_QUERIED_CONCURRENTLY_IN_ALIGN_BY_DEVICE_QUERIES = + "cannot be queried concurrently in ALIGN BY DEVICE queries."; + public static final String THE_TYPE_OF_SQL_RESULT_COLUMN_S_IN_D_SHOULD_BE_NUMERIC_WHEN_INFERENCE = + "The type of SQL result column [%s in %d] should be numeric when inference"; + public static final String S_IN_ORDER_BY_CLAUSE_DOESN_T_EXIST_IN_THE_RESULT_OF_LAST_QUERY = + "%s in order by clause doesn't exist in the result of last query."; + public static final String S_IN_GROUP_BY_CLAUSE_DOESN_T_EXIST = + "%s in group by clause doesn't exist."; + public static final String S_IN_GROUP_BY_CLAUSE_SHOULDN_T_REFER_TO_MORE_THAN_ONE_TIMESERIES = + "%s in group by clause shouldn't refer to more than one timeseries."; + public static final String PLEASE_CHECK_THE_KEEP_CONDITION_S = + "Please check the keep condition ([%s]), "; + public static final String IT_NEED_TO_BE_A_CONSTANT_OR_A_COMPARE_EXPRESSION_CONSTRUCTED_BY_KEEP_AND_A_LONG_NUMBER = + "it need to be a constant or a compare expression constructed by 'keep' and a long number."; + public static final String THE_QUERY_TIME_RANGE_SHOULD_BE_SPECIFIED_IN_THE_GROUP_BY_TIME_CLAUSE = + "The query time range should be specified in the GROUP BY TIME clause."; + public static final String VIEW_PATH_S_OF_SOURCE_COLUMN_S_IS_ILLEGAL_PATH = + "View path %s of source column %s is illegal path"; + public static final String ALIGN_BY_DEVICE_THE_DATA_TYPES_OF_THE_SAME_MEASUREMENT_COLUMN_SHOULD_BE_THE_SAME_ACROSS = + "ALIGN BY DEVICE: the data types of the same measurement column should be the same across devices."; + public static final String ALIAS_S_CAN_ONLY_BE_MATCHED_WITH_ONE_TIME_SERIES = + "alias '%s' can only be matched with one time series"; + public static final String TAG_AND_ATTRIBUTE_SHOULDN_T_HAVE_THE_SAME_PROPERTY_KEY_S = + "Tag and attribute shouldn't have the same property key [%s]"; + public static final String S_IS_NOT_A_LEGAL_PROP = + "%s is not a legal prop."; + public static final String MEASUREMENT_UNDER_AN_ALIGNED_DEVICE_IS_NOT_ALLOWED_TO_HAVE_THE_SAME_MEASUREMENT_NAME = + "Measurement under an aligned device is not allowed to have the same measurement name"; + public static final String VALUE_FILTER_CAN_T_EXIST_IN_THE_CONDITION_OF_SHOW_COUNT_CLAUSE_ONLY_TIME_CONDITION = + "Value Filter can't exist in the condition of SHOW/COUNT clause, only time condition supported"; + public static final String TIME_CONDITION_CAN_T_BE_EMPTY_IN_THE_CONDITION_OF_SHOW_COUNT_CLAUSE = + "Time condition can't be empty in the condition of SHOW/COUNT clause"; + public static final String MEASUREMENT_UNDER_TEMPLATE_IS_NOT_ALLOWED_TO_HAVE_THE_SAME_MEASUREMENT_NAME = + "Measurement under template is not allowed to have the same measurement name"; + public static final String THE_SUFFIX_PATHS_CAN_ONLY_BE_MEASUREMENT_OR_ONE_LEVEL_WILDCARD = + "the suffix paths can only be measurement or one-level wildcard"; + public static final String AGGREGATION_RESULTS_CANNOT_BE_AS_INPUT_OF_THE_AGGREGATION_FUNCTION = + "Aggregation results cannot be as input of the aggregation function."; + public static final String INPUT_OF_S_IS_ILLEGAL = + "Input of '%s' is illegal."; + public static final String RAW_DATA_AND_AGGREGATION_RESULT_HYBRID_INPUT_OF_S_IS_NOT_SUPPORTED = + "Raw data and aggregation result hybrid input of '%s' is not supported."; + public static final String ONLY_WRITABLE_VIEW_TIMESERIES_ARE_SUPPORTED_IN_ALIGN_BY_DEVICE_QUERIES = + "Only writable view timeseries are supported in ALIGN BY DEVICE queries."; + public static final String INPUT_SERIES_OF_SCALAR_FUNCTION_DIFF_ONLY_SUPPORTS_NUMERIC_DATA_TYPES_INT32_INT64_FLOAT = + "Input series of Scalar function [DIFF] only supports numeric data types [INT32, INT64, FLOAT, DOUBLE]"; + public static final String ARGUMENT_EXCEPTION_THE_SCALAR_FUNCTION_SUBSTRING_NEEDS_AT_LEAST_ONE_ARGUMENT_IT_MUST_BE = + "Argument exception,the scalar function [SUBSTRING] needs at least one argument,it must be a signed integer"; + public static final String SYNTAX_ERROR_PLEASE_CHECK_THAT_THE_PARAMETERS_OF_THE_FUNCTION_ARE_CORRECT = + "Syntax error,please check that the parameters of the function are correct"; + public static final String UNSUPPORTED_DATA_TYPE_S_FOR_FUNCTION_SUBSTRING = + "Unsupported data type %s for function SUBSTRING."; + public static final String ARGUMENT_EXCEPTION_THE_SCALAR_FUNCTION_SUBSTRING_BEGINPOSITION_AND_LENGTH_MUST_BE = + "Argument exception,the scalar function [SUBSTRING] beginPosition and length must be greater than 0"; + public static final String INPUT_SERIES_OF_SCALAR_FUNCTION_ROUND_ONLY_SUPPORTS_NUMERIC_DATA_TYPES_INT32_INT64_FLOAT = + "Input series of Scalar function [ROUND] only supports numeric data types [INT32, INT64, FLOAT, DOUBLE]"; + public static final String UNSUPPORTED_DATA_TYPE_S_FOR_FUNCTION_REPLACE = + "Unsupported data type %s for function REPLACE."; + public static final String TIMESERIES_UNDER_THIS_DEVICE_ISS_ALIGNED_PLEASE_USE_CREATESTIMESERIES_OR_CHANGE_DEVICE = + "TimeSeries under this device is%s aligned, please use create%sTimeSeries or change device. (Path: %s)"; + public static final String NOT = + " not"; + public static final String ALIGNED = + "Aligned"; + public static final String AUTO_CREATE_OR_VERIFY_SCHEMA_ERROR_DETAIL_S = + "Auto create or verify schema error. Detail: %s."; + public static final String THE_FILE_S_IS_NOT_A_VALID_TSFILE_PLEASE_CHECK_THE_INPUT_FILE = + "The file %s is not a valid tsfile. Please check the input file."; + public static final String AUTO_CREATE_OR_VERIFY_SCHEMA_ERROR_WHEN_EXECUTING_STATEMENT_S_DETAIL_S = + "Auto create or verify schema error when executing statement %s. Detail: %s."; + public static final String TTL_VALUE_MUST_BE_INF_OR_A_LONG_LITERAL_BUT_NOW_IS = + "ttl value must be 'INF' or a long literal, but now is: "; + public static final String COLUMNS_IN_TABLE_SHALL_NOT_SHARE_THE_SAME_NAME_S = + "Columns in table shall not share the same name: '%s'."; + public static final String THE_DUPLICATED_SOURCE_MEASUREMENT_S_IS_UNSUPPORTED_YET = + "The duplicated source measurement %s is unsupported yet."; + public static final String THE_LENGTH_OF_DATABASE_NAME_SHALL_NOT_EXCEED = + "the length of database name shall not exceed "; + public static final String THE_DATABASE_NAME_CAN_ONLY_CONTAIN_ENGLISH_OR_CHINESE_CHARACTERS_NUMBERS_BACKTICKS_AND = + "the database name can only contain english or chinese characters, numbers, backticks and underscores."; + public static final String IS_CURRENTLY_NOT_ALLOWED = + "' is currently not allowed."; + public static final String VALUE_MUST_BE_A_LONGLITERAL_BUT_NOW_IS = + " value must be a LongLiteral, but now is "; + public static final String VALUE = + ", value: "; + public static final String VALUE_MUST_BE_EQUAL_TO_OR_GREATER_THAN_0_BUT_NOW_IS = + " value must be equal to or greater than 0, but now is: "; + public static final String VALUE_MUST_BE_LOWER_THAN = + " value must be lower than "; + public static final String BUT_NOW_IS = + ", but now is: "; + public static final String FAILED_TO_CREATE_PIPE_S_SETTING_S_IS_NOT_ALLOWED = + "Failed to create pipe %s, setting %s is not allowed."; + public static final String FAILED_TO_S_PIPE_S_IN_IOTDB_SOURCE_PASSWORD_MUST_BE_SET_WHEN_THE_USERNAME_IS_SPECIFIED = + "Failed to %s pipe %s, in iotdb-source, password must be set when the username is specified."; + public static final String ALTER = + "alter"; + public static final String CREATE = + "create"; + public static final String FAILED_TO_S_PIPE_S_IN_WRITE_BACK_SINK_PASSWORD_MUST_BE_SET_WHEN_THE_USERNAME_IS = + "Failed to %s pipe %s, in write-back-sink, password must be set when the username is specified."; + public static final String FAILED_TO_ALTER_PIPE_S_MODIFYING_S_IS_NOT_ALLOWED = + "Failed to alter pipe %s, modifying %s is not allowed."; + public static final String FAILED_TO_ALTER_PIPE_THE_SOURCE_PLUGIN_OF_THE_PIPE_CANNOT_BE_CHANGED_FROM_S_TO_S = + "Failed to alter pipe, the source plugin of the pipe cannot be changed from %s to %s"; + public static final String FAILED_TO_ALTER_PIPE_S_IN_IOTDB_SOURCE_PASSWORD_MUST_BE_SET_WHEN_THE_USERNAME_IS = + "Failed to alter pipe %s, in iotdb-source, password must be set when the username is specified."; + public static final String FAILED_TO_ALTER_PIPE_S_IN_WRITE_BACK_SINK_PASSWORD_MUST_BE_SET_WHEN_THE_USERNAME_IS = + "Failed to alter pipe %s, in write-back-sink, password must be set when the username is specified."; + public static final String PREPARED_STATEMENT_S_ALREADY_EXISTS = + "Prepared statement '%s' already exists"; + public static final String INSUFFICIENT_MEMORY_FOR_PREPAREDSTATEMENT_S = + "Insufficient memory for PreparedStatement '%s'. "; + public static final String PLEASE_DEALLOCATE_SOME_PREPAREDSTATEMENTS_AND_TRY_AGAIN = + "Please deallocate some PreparedStatements and try again."; + public static final String THE_TABLE = + "The table "; + public static final String IS_A_BASE_TABLE_DOES_NOT_SUPPORT_SHOW_CREATE_VIEW = + " is a base table, does not support show create view."; + public static final String THE_PARAMETERS = + "The parameters '"; + public static final String MUST_BE_CONSISTENT_ACROSS_THE_ENTIRE_CLUSTER_AND_ONLY_ONE_CAN_BE_SET_AT_A_TIME = + "' must be consistent across the entire cluster and only one can be set at a time."; + public static final String CANNOT_INSERT_INTO_MULTIPLE_DATABASES_WITHIN_ONE_STATEMENT_PLEASE_SPLIT_THEM_MANUALLY = + "Cannot insert into multiple databases within one statement, please split them manually"; + public static final String THE_MEASUREMENTLIST_S_SIZE_D_IS_NOT_CONSISTENT_WITH_THE_VALUELIST_S_SIZE_D = + "the measurementList's size %d is not consistent with the valueList's size %d"; + public static final String THE_MEASUREMENTLIST_S_SIZE_D_IS_NOT_CONSISTENT_WITH_THE_COLUMNLIST_S_SIZE_D = + "the measurementList's size %d is not consistent with the columnList's size %d"; + public static final String MEASUREMENT_CONTAINS_NULL_OR_EMPTY_STRING = + "Measurement contains null or empty string: "; + public static final String CAN_T_BE_USED_IN_GROUP_BY_TAG_IT_WILL_BE_SUPPORTED_IN_THE_FUTURE = + " can't be used in group by tag. It will be supported in the future."; + public static final String COMMON_QUERIES_AND_AGGREGATED_QUERIES_ARE_NOT_ALLOWED_TO_APPEAR_AT_THE_SAME_TIME = + "Common queries and aggregated queries are not allowed to appear at the same time"; + public static final String EXPRESSION_OF_HAVING_CLAUSE_CAN_NOT_BE_USED_IN_NONAGGREGATIONQUERY = + "Expression of HAVING clause can not be used in NonAggregationQuery"; + public static final String SORTING_BY_DEVICE_IS_ONLY_SUPPORTED_IN_ALIGN_BY_DEVICE_QUERIES = + "Sorting by device is only supported in ALIGN BY DEVICE queries."; + public static final String CQ_EVERY_INTERVAL_D_SHOULD_NOT_BE_LOWER_THAN_THE_CONTINUOUS_QUERY_MINIMUM_EVERY_INTERVAL = + "CQ: Every interval [%d] should not be lower than the `continuous_query_minimum_every_interval` [%d] configured."; + public static final String CQ_THE_START_TIME_OFFSET_SHOULD_BE_GREATER_THAN_END_TIME_OFFSET = + "CQ: The start time offset should be greater than end time offset."; + public static final String CQ_THE_START_TIME_OFFSET_SHOULD_BE_GREATER_THAN_OR_EQUAL_TO_EVERY_INTERVAL = + "CQ: The start time offset should be greater than or equal to every interval."; + public static final String CQ_SPECIFYING_TIME_RANGE_IN_GROUP_BY_TIME_CLAUSE_IS_PROHIBITED = + "CQ: Specifying time range in GROUP BY TIME clause is prohibited."; + public static final String CANNOT_CREATE_VIEWS_USING_DATA_SOURCES_WITH_CALCULATED_EXPRESSIONS_WHILE_USING_INTO_ITEM = + "Cannot create views using data sources with calculated expressions while using into item."; + public static final String TREE_DEVICE_VIEW_WITH_MULTIPLE_DATABASES = + "Tree device view with multiple databases("; + public static final String IS_UNSUPPORTED_YET = + ") is unsupported yet."; + public static final String COMPLEX_ASOF_MAIN_JOIN_EXPRESSION_S_IS_NOT_SUPPORTED = + "Complex ASOF main join expression [%s] is not supported"; + public static final String UNEXPECTED_DESCRIPTOR_TYPE = + "Unexpected descriptor type: "; + public static final String WHEN_CLAUSE_OPERAND_TYPE_MUST_MATCH_CASE_OPERAND_TYPE_S_VS_S = + "WHEN clause operand type must match CASE operand type: %s vs %s"; + public static final String ALL_RESULT_TYPES_MUST_BE_THE_SAME_S = + "All result types must be the same: %s"; + public static final String DEFAULT_RESULT_TYPE_MUST_BE_THE_SAME_AS_WHEN_RESULT_TYPES_S_VS_S = + "Default result type must be the same as WHEN result types: %s vs %s"; + public static final String ALL_OPERANDS_MUST_HAVE_THE_SAME_TYPE_S = + "All operands must have the same type: %s"; + public static final String TO = + " to "; + public static final String SCALAR_FUNCTION = + "Scalar function "; + public static final String ONLY_SUPPORTS_ONE_NUMERIC_DATA_TYPES_INT32_INT64_FLOAT_DOUBLE_AND_ONE_BOOLEAN = + " only supports one numeric data types [INT32, INT64, FLOAT, DOUBLE] and one boolean"; + public static final String ONLY_SUPPORTS_TWO_NUMERIC_DATA_TYPES_INT32_INT64_FLOAT_DOUBLE = + " only supports two numeric data types [INT32, INT64, FLOAT, DOUBLE]"; + public static final String ONLY_ACCEPTS_TWO_OR_THREE_ARGUMENTS_AND_THEY_MUST_BE_TEXT_OR_STRING_DATA_TYPE = + " only accepts two or three arguments and they must be text or string data type."; + public static final String ONLY_ACCEPTS_TWO_OR_THREE_ARGUMENTS_AND_FIRST_MUST_BE_TEXT_OR_STRING_DATA_TYPE_SECOND = + " only accepts two or three arguments and first must be text or string data type, second and third must be numeric data types [INT32, INT64]"; + public static final String ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_TEXT_OR_STRING_OR_BLOB_OR_OBJECT_DATA_TYPE = + " only accepts one argument and it must be text or string or blob or object data type."; + public static final String ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_TEXT_OR_STRING_DATA_TYPE = + " only accepts one argument and it must be text or string data type."; + public static final String ONLY_ACCEPTS_ONE_OR_TWO_ARGUMENTS_AND_THEY_MUST_BE_TEXT_OR_STRING_DATA_TYPE = + " only accepts one or two arguments and they must be text or string data type."; + public static final String ONLY_ACCEPTS_TWO_ARGUMENTS_AND_THEY_MUST_BE_TEXT_OR_STRING_DATA_TYPE = + " only accepts two arguments and they must be text or string data type."; + public static final String ONLY_ACCEPTS_TWO_OR_MORE_ARGUMENTS_AND_THEY_MUST_BE_TEXT_OR_STRING_DATA_TYPE = + " only accepts two or more arguments and they must be text or string data type."; + public static final String ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_DOUBLE_FLOAT_INT32_OR_INT64_DATA_TYPE = + " only accepts one argument and it must be Double, Float, Int32 or Int64 data type."; + public static final String ACCEPTS_NO_ARGUMENT = + " accepts no argument."; + public static final String ONLY_ACCEPTS_TWO_OR_THREE_ARGUMENTS_AND_THE_SECOND_AND_THIRD_MUST_BE_TIMESTAMP_DATA_TYPE = + " only accepts two or three arguments and the second and third must be TimeStamp data type."; + public static final String MUST_HAVE_AT_LEAST_TWO_ARGUMENTS_AND_FIRST_ARGUMENT_PATTERN_MUST_BE_TEXT_OR_STRING_TYPE = + " must have at least two arguments, and first argument pattern must be TEXT or STRING type."; + public static final String MUST_HAVE_AT_LEAST_TWO_ARGUMENTS_AND_ALL_TYPE_MUST_BE_THE_SAME = + " must have at least two arguments, and all type must be the same."; + public static final String SCALAR_FUNCTION_S_ONLY_ACCEPTS_TWO_ARGUMENTS_AND_THEY_MUST_BE_INT32_OR_INT64_DATA_TYPE = + "Scalar function %s only accepts two arguments and they must be Int32 or Int64 data type."; + public static final String SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_INT32_OR_INT64_DATA_TYPE = + "Scalar function %s only accepts one argument and it must be Int32 or Int64 data type."; + public static final String SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_TEXT_STRING_OR_BLOB_DATA_TYPE = + "Scalar function %s only accepts one argument and it must be TEXT, STRING, or BLOB data type."; + public static final String SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_TEXT_OR_STRING_DATA_TYPE = + "Scalar function %s only accepts one argument and it must be TEXT or STRING data type."; + public static final String SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_TEXT_STRING_OR_BLOB_DATA_TYPE_2 = + "Scalar function %s only accepts one argument and it must be TEXT, STRING, or BlOB data type."; + public static final String SCALAR_FUNCTION_S_ONLY_ACCEPTS_TWO_ARGUMENTS_FIRST_ARGUMENT_MUST_BE_TEXT_STRING_OR_BLOB = + "Scalar function %s only accepts two arguments, first argument must be TEXT, STRING, or BlOB type, second argument must be STRING OR TEXT type."; + public static final String SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_INT32_DATA_TYPE = + "Scalar function %s only accepts one argument and it must be Int32 data type."; + public static final String SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_BLOB_DATA_TYPE = + "Scalar function %s only accepts one argument and it must be BLOB data type."; + public static final String SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_INT64_DATA_TYPE = + "Scalar function %s only accepts one argument and it must be Int64 data type."; + public static final String SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_FLOAT_DATA_TYPE = + "Scalar function %s only accepts one argument and it must be Float data type."; + public static final String SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_DOUBLE_DATA_TYPE = + "Scalar function %s only accepts one argument and it must be Double data type."; + public static final String SCALAR_FUNCTION_S_ONLY_ACCEPTS_THREE_ARGUMENTS_FIRST_ARGUMENT_MUST_BE_BLOB_TYPE = + "Scalar function %s only accepts three arguments, first argument must be BlOB type, "; + public static final String SECOND_ARGUMENT_MUST_BE_INT32_OR_INT64_TYPE_THIRD_ARGUMENT_MUST_BE_BLOB_TYPE = + "second argument must be int32 or int64 type, third argument must be BLOB type."; + public static final String AGGREGATE_FUNCTIONS_S_SHOULD_ONLY_HAVE_ONE_ARGUMENT = + "Aggregate functions [%s] should only have one argument"; + public static final String AGGREGATE_FUNCTIONS_S_ONLY_SUPPORT_NUMERIC_DATA_TYPES_INT32_INT64_FLOAT_DOUBLE = + "Aggregate functions [%s] only support numeric data types [INT32, INT64, FLOAT, DOUBLE]"; + public static final String ERROR_SIZE_OF_INPUT_EXPRESSIONS_EXPRESSION_S_ACTUAL_SIZE_S_EXPECTED_SIZE_2 = + "Error size of input expressions. expression: %s, actual size: %s, expected size: [2]."; + public static final String AGGREGATE_FUNCTIONS_S_ONLY_SUPPORT_NUMERIC_DATA_TYPES_INT32_INT64_FLOAT_DOUBLE_TIMESTAMP = + "Aggregate functions [%s] only support numeric data types [INT32, INT64, FLOAT, DOUBLE, TIMESTAMP]"; + public static final String ERROR_SIZE_OF_INPUT_EXPRESSIONS_EXPRESSION_S_ACTUAL_SIZE_S_EXPECTED_SIZE_1 = + "Error size of input expressions. expression: %s, actual size: %s, expected size: [1]."; + public static final String AGGREGATE_FUNCTIONS_S_SHOULD_ONLY_HAVE_ONE_BOOLEAN_EXPRESSION_AS_ARGUMENT = + "Aggregate functions [%s] should only have one boolean expression as argument"; + public static final String AGGREGATE_FUNCTIONS_S_SHOULD_ONLY_HAVE_ONE_OR_TWO_ARGUMENTS = + "Aggregate functions [%s] should only have one or two arguments"; + public static final String SECOND_ARGUMENT_OF_AGGREGATE_FUNCTIONS_S_SHOULD_BE_ORDERABLE = + "Second argument of Aggregate functions [%s] should be orderable"; + public static final String AGGREGATE_FUNCTIONS_S_SHOULD_ONLY_HAVE_TWO_OR_THREE_ARGUMENTS = + "Aggregate functions [%s] should only have two or three arguments"; + public static final String AGGREGATE_FUNCTIONS_S_SHOULD_ONLY_HAVE_TWO_ARGUMENTS = + "Aggregate functions [%s] should only have two arguments"; + public static final String SECOND_ARGUMENT_OF_AGGREGATE_FUNCTIONS_S_SHOULD_BE_NUMBERIC_TYPE_AND_DO_NOT_USE = + "Second argument of Aggregate functions [%s] should be numberic type and do not use expression"; + public static final String AGGREGATION_FUNCTIONS_S_SHOULD_ONLY_HAVE_THREE_ARGUMENTS = + "Aggregation functions [%s] should only have three arguments"; + public static final String AGGREGATION_FUNCTIONS_S_SHOULD_ONLY_HAVE_TWO_OR_THREE_ARGUMENTS = + "Aggregation functions [%s] should only have two or three arguments"; + public static final String AGGREGATION_FUNCTIONS_S_SHOULD_HAVE_VALUE_COLUMN_AS_NUMERIC_TYPE_INT32_INT64_FLOAT = + "Aggregation functions [%s] should have value column as numeric type [INT32, INT64, FLOAT, DOUBLE, TIMESTAMP]"; + public static final String AGGREGATION_FUNCTIONS_S_SHOULD_HAVE_PERCENTAGE_AS_DECIMAL_TYPE = + "Aggregation functions [%s] should have percentage as decimal type"; + public static final String AGGREGATION_FUNCTIONS_S_DO_NOT_SUPPORT_WEIGHT_AS_S_TYPE = + "Aggregation functions [%s] do not support weight as %s type"; + public static final String WINDOW_FUNCTION_S_SHOULD_ONLY_HAVE_ONE_ARGUMENT = + "Window function [%s] should only have one argument"; + public static final String WINDOW_FUNCTION_NTH_VALUE_SHOULD_ONLY_HAVE_TWO_ARGUMENT_AND_SECOND_ARGUMENT_MUST_BE = + "Window function [nth_value] should only have two argument, and second argument must be integer type"; + public static final String WINDOW_FUNCTION_S_SHOULD_ONLY_HAVE_ONE_TO_THREE_ARGUMENT = + "Window function [%s] should only have one to three argument"; + public static final String WINDOW_FUNCTION_S_S_SECOND_ARGUMENT_MUST_BE_INTEGER_TYPE = + "Window function [%s]'s second argument must be integer type"; + public static final String UPDATE_ATTRIBUTE_SHALL_SPECIFY_A_ATTRIBUTE_ONLY_ONCE = + "Update attribute shall specify a attribute only once."; + public static final String CANNOT_BE_RESOLVED = + "cannot be resolved"; + public static final String IS_NOT_AN_ATTRIBUTE_OR_TAG_COLUMN = + "is not an attribute or tag column"; + public static final String UPDATE_S_ATTRIBUTE_VALUE_MUST_BE_STRING_TEXT_OR_NULL = + "Update's attribute value must be STRING, TEXT or null."; + public static final String MULTIPLE_COLUMNS_FOUND_WITH_TIME_CATEGORY_IN_TABLE_SCHEMA = + "Multiple columns found with TIME category in table schema"; + public static final String INSERT_COLUMN_NAME_DOES_NOT_EXIST_IN_TARGET_TABLE_S = + "Insert column name does not exist in target table: %s"; + public static final String INSERT_COLUMN_NAME_IS_SPECIFIED_MORE_THAN_ONCE_S = + "Insert column name is specified more than once: %s"; + public static final String INSERT_QUERY_HAS_MISMATCHED_COLUMN_TYPES_TABLE_S_QUERY_S = + "Insert query has mismatched column types: Table: [%s], Query: [%s]"; + public static final String WITH_QUERY_NAME_S_SPECIFIED_MORE_THAN_ONCE = + "WITH query name '%s' specified more than once"; + public static final String WITH_TABLE_NAME_IS_REFERENCED_IN_THE_BASE_RELATION_OF_RECURSION = + "WITH table name is referenced in the base relation of recursion"; + public static final String MULTIPLE_RECURSIVE_REFERENCES_IN_THE_STEP_RELATION_OF_RECURSION = + "multiple recursive references in the step relation of recursion"; + public static final String FETCH_FIRST_LIMIT_CLAUSE_IN_THE_STEP_RELATION_OF_RECURSION = + "FETCH FIRST / LIMIT clause in the step relation of recursion"; + public static final String RECURSIVE_REFERENCE_OUTSIDE_OF_FROM_CLAUSE_OF_THE_STEP_RELATION_OF_RECURSION = + "recursive reference outside of FROM clause of the step relation of recursion"; + public static final String IMMEDIATE_WITH_CLAUSE_IN_RECURSIVE_QUERY_IS_NOT_SUPPORTED = + "immediate WITH clause in recursive query is not supported"; + public static final String IMMEDIATE_FILL_CLAUSE_IN_RECURSIVE_QUERY_IS_NOT_SUPPORTED = + "immediate FILL clause in recursive query is not supported"; + public static final String IMMEDIATE_ORDER_BY_CLAUSE_IN_RECURSIVE_QUERY_IS_NOT_SUPPORTED = + "immediate ORDER BY clause in recursive query is not supported"; + public static final String IMMEDIATE_OFFSET_CLAUSE_IN_RECURSIVE_QUERY_IS_NOT_SUPPORTED = + "immediate OFFSET clause in recursive query is not supported"; + public static final String IMMEDIATE_FETCH_FIRST_LIMIT_CLAUSE_IN_RECURSIVE_QUERY_IS_NOT_SUPPORT = + "immediate FETCH FIRST / LIMIT clause in recursive query is not support"; + public static final String BASE_AND_STEP_RELATIONS_OF_RECURSION_HAVE_DIFFERENT_NUMBER_OF_FIELDS_S_S = + "base and step relations of recursion have different number of fields: %s, %s"; + public static final String RECURSION_STEP_RELATION_OUTPUT_TYPE_S_IS_NOT_COERCIBLE_TO_RECURSION_BASE_RELATION_OUTPUT = + "recursion step relation output type (%s) is not coercible to recursion base relation output type (%s) at column %s"; + public static final String CANNOT_NEST_WINDOW_FUNCTIONS_OR_ROW_PATTERN_MEASURES_INSIDE_WINDOW_FUNCTION_ARGUMENTS = + "Cannot nest window functions or row pattern measures inside window function arguments"; + public static final String DISTINCT_IN_WINDOW_FUNCTION_PARAMETERS_NOT_YET_SUPPORTED_S = + "DISTINCT in window function parameters not yet supported: %s"; + public static final String S_FUNCTION_REQUIRES_AN_ORDER_BY_WINDOW_CLAUSE = + "%s function requires an ORDER BY window clause"; + public static final String CANNOT_SPECIFY_WINDOW_FRAME_FOR_S_FUNCTION = + "Cannot specify window frame for %s function"; + public static final String WINDOW_NAME_S_SPECIFIED_MORE_THAN_ONCE = + "WINDOW name '%s' specified more than once"; + public static final String CANNOT_RESOLVE_WINDOW_NAME_S = + "Cannot resolve WINDOW name %s"; + public static final String WINDOW_SPECIFICATION_WITH_NAMED_WINDOW_REFERENCE_CANNOT_SPECIFY_PARTITION_BY = + "WINDOW specification with named WINDOW reference cannot specify PARTITION BY"; + public static final String CANNOT_SPECIFY_ORDER_BY_IF_REFERENCED_NAMED_WINDOW_SPECIFIES_ORDER_BY = + "Cannot specify ORDER BY if referenced named WINDOW specifies ORDER BY"; + public static final String CANNOT_REFERENCE_NAMED_WINDOW_CONTAINING_FRAME_SPECIFICATION = + "Cannot reference named WINDOW containing frame specification"; + public static final String WHERE_CLAUSE_MUST_EVALUATE_TO_A_BOOLEAN_ACTUAL_TYPE_S = + "WHERE clause must evaluate to a boolean: actual type %s"; + public static final String MULTIPLE_DIFFERENT_COLUMNS_IN_THE_SAME_EXPRESSION_ARE_NOT_SUPPORTED = + "Multiple different COLUMNS in the same expression are not supported"; + public static final String NO_MATCHING_COLUMNS_FOUND_THAT_MATCH_REGEX_S = + "No matching columns found that match regex '%s'"; + public static final String S_ARE_NOT_SUPPORTED_NOW = + "%s are not supported now"; + public static final String UNABLE_TO_RESOLVE_REFERENCE_S = + "Unable to resolve reference %s"; + public static final String IDENTIFIERCHAINBASIS_GET_GETBASISTYPE_EQ_EQ_FIELD_OR_TARGET_EXPRESSION_ISN_T_A = + "identifierChainBasis.get().getBasisType == FIELD or target expression isn't a QualifiedName"; + public static final String SELECT_STAR_FROM_OUTER_SCOPE_TABLE_NOT_SUPPORTED_WITH_ANONYMOUS_COLUMNS = + "SELECT * from outer scope table not supported with anonymous columns"; + public static final String DISTINCT_CAN_ONLY_BE_APPLIED_TO_COMPARABLE_TYPES_ACTUAL_S = + "DISTINCT can only be applied to comparable types (actual: %s)"; + public static final String DISTINCT_CAN_ONLY_BE_APPLIED_TO_COMPARABLE_TYPES_ACTUAL_S_S = + "DISTINCT can only be applied to comparable types (actual: %s): %s"; + public static final String GROUP_BY_POSITION_S_IS_NOT_IN_SELECT_LIST = + "GROUP BY position %s is not in select list"; + public static final String GROUP_BY_EXPRESSION_MUST_BE_A_COLUMN_REFERENCE_S = + "GROUP BY expression must be a column reference: %s"; + public static final String S_IS_NOT_COMPARABLE_AND_THEREFORE_CANNOT_BE_USED_IN_GROUP_BY = + "%s is not comparable, and therefore cannot be used in GROUP BY"; + public static final String GROUP_BY_HAS_MORE_THAN_S_GROUPING_SETS = + "GROUP BY has more than %s grouping sets"; + public static final String HAVING_CLAUSE_MUST_EVALUATE_TO_A_BOOLEAN_ACTUAL_TYPE_S = + "HAVING clause must evaluate to a boolean: actual type %s"; + public static final String S_QUERY_HAS_DIFFERENT_NUMBER_OF_FIELDS_D_D = + "%s query has different number of fields: %d, %d"; + public static final String COLUMN_D_IN_S_QUERY_HAS_INCOMPATIBLE_TYPES_S_S = + "column %d in %s query has incompatible types: %s, %s"; + public static final String TYPE_S_IS_NOT_COMPARABLE_AND_THEREFORE_CANNOT_BE_USED_IN_SS = + "Type %s is not comparable and therefore cannot be used in %s%s"; + public static final String DISTINCT = + " DISTINCT"; + public static final String AMBIGUOUS_COLUMN_S_IN_ROW_PATTERN_INPUT_RELATION = + "ambiguous column: %s in row pattern input relation"; + public static final String S_IS_NOT_COMPARABLE_AND_THEREFORE_CANNOT_BE_USED_IN_PARTITION_BY = + "%s is not comparable, and therefore cannot be used in PARTITION BY"; + public static final String S_IS_NOT_ORDERABLE_AND_THEREFORE_CANNOT_BE_USED_IN_ORDER_BY = + "%s is not orderable, and therefore cannot be used in ORDER BY"; + public static final String EXPRESSION_DEFINING_A_LABEL_MUST_BE_BOOLEAN_ACTUAL_TYPE_S = + "Expression defining a label must be boolean (actual type: %s)"; + public static final String VALUES_ROWS_HAVE_MISMATCHED_SIZES_S_VS_S = + "Values rows have mismatched sizes: %s vs %s"; + public static final String TYPE_OF_ROW_D_COLUMN_D_IS_MISMATCHED_EXPECTED_S_ACTUAL_S = + "Type of row %d column %d is mismatched, expected: %s, actual: %s"; + public static final String TYPE_OF_ROW_D_IS_MISMATCHED_EXPECTED_S_ACTUAL_S = + "Type of row %d is mismatched, expected: %s, actual: %s"; + public static final String COLUMN_ALIAS_LIST_HAS_S_ENTRIES_BUT_S_HAS_S_COLUMNS_AVAILABLE = + "Column alias list has %s entries but '%s' has %s columns available"; + public static final String JOIN_ON_CLAUSE_MUST_EVALUATE_TO_A_BOOLEAN_ACTUAL_TYPE_S = + "JOIN ON clause must evaluate to a boolean: actual type %s"; + public static final String ASOF_MAIN_JOIN_EXPRESSION_MUST_EVALUATE_TO_A_BOOLEAN_ACTUAL_TYPE_S = + "ASOF main JOIN expression must evaluate to a boolean: actual type %s"; + public static final String LEFT_CHILD_TYPE_OF_ASOF_MAIN_JOIN_EXPRESSION_MUST_BE_TIMESTAMP_ACTUAL_TYPE_S = + "left child type of ASOF main JOIN expression must be TIMESTAMP: actual type %s"; + public static final String RIGHT_CHILD_TYPE_OF_ASOF_MAIN_JOIN_EXPRESSION_MUST_BE_TIMESTAMP_ACTUAL_TYPE_S = + "right child type of ASOF main JOIN expression must be TIMESTAMP: actual type %s"; + public static final String COLUMN_S_APPEARS_MULTIPLE_TIMES_IN_USING_CLAUSE = + "Column '%s' appears multiple times in USING clause"; + public static final String COLUMN_S_IS_MISSING_FROM_LEFT_SIDE_OF_JOIN = + "Column '%s' is missing from left side of join"; + public static final String COLUMN_S_IS_MISSING_FROM_RIGHT_SIDE_OF_JOIN = + "Column '%s' is missing from right side of join"; + public static final String COLUMN_TYPES_OF_LEFT_AND_RIGHT_SIDE_ARE_DIFFERENT_LEFT_IS_S_RIGHT_IS_S = + "Column Types of left and right side are different: left is %s, right is %s"; + public static final String CANNOT_INFER_TIME_COLUMN_FOR_S_FILL_THERE_EXISTS_NO_COLUMN_WHOSE_TYPE_IS_TIMESTAMP = + "Cannot infer TIME_COLUMN for %s FILL, there exists no column whose type is TIMESTAMP"; + public static final String S_FILL_TIME_COLUMN_POSITION_S_IS_NOT_IN_SELECT_LIST = + "%s FILL TIME_COLUMN position %s is not in select list"; + public static final String TYPE_OF_TIME_COLUMN_FOR_S_FILL_SHOULD_ONLY_BE_TIMESTAMP_BUT_TYPE_OF_THE_COLUMN_YOU = + "Type of TIME_COLUMN for %s FILL should only be TIMESTAMP, but type of the column you specify is %s"; + public static final String S_FILL_FILL_GROUP_POSITION_S_IS_NOT_IN_SELECT_LIST = + "%s FILL FILL_GROUP position %s is not in select list"; + public static final String TYPE_S_IS_NOT_ORDERABLE_AND_THEREFORE_CANNOT_BE_USED_IN_FILL_GROUP_S = + "Type %s is not orderable, and therefore cannot be used in FILL_GROUP: %s"; + public static final String ORDER_BY_POSITION_S_IS_NOT_IN_SELECT_LIST = + "ORDER BY position %s is not in select list"; + public static final String TYPE_S_IS_NOT_ORDERABLE_AND_THEREFORE_CANNOT_BE_USED_IN_ORDER_BY_S = + "Type %s is not orderable, and therefore cannot be used in ORDER BY: %s"; + public static final String OFFSET_ROW_COUNT_MUST_BE_GREATER_OR_EQUAL_TO_0_ACTUAL_VALUE_S = + "OFFSET row count must be greater or equal to 0 (actual value: %s)"; + public static final String LIMIT_ROW_COUNT_MUST_BE_GREATER_OR_EQUAL_TO_0_ACTUAL_VALUE_S = + "LIMIT row count must be greater or equal to 0 (actual value: %s)"; + public static final String NON_CONSTANT_PARAMETER_VALUE_FOR_S_S = + "Non constant parameter value for %s: %s"; + public static final String PARAMETER_VALUE_PROVIDED_FOR_S_IS_NULL_S = + "Parameter value provided for %s is NULL: %s"; + public static final String RECURSIVE_REFERENCE_IN_LEFT_SOURCE_OF_S_JOIN = + "recursive reference in left source of %s join"; + public static final String RECURSIVE_REFERENCE_IN_RIGHT_SOURCE_OF_S_JOIN = + "recursive reference in right source of %s join"; + public static final String RECURSIVE_REFERENCE_IN_RIGHT_RELATION_OF_EXCEPT_S = + "recursive reference in right relation of EXCEPT %s"; + public static final String DISTINCT_2 = + "DISTINCT"; + public static final String ALL = + "ALL"; + public static final String RECURSIVE_REFERENCE_IN_LEFT_RELATION_OF_EXCEPT_ALL = + "recursive reference in left relation of EXCEPT ALL"; + public static final String FOR_SELECT_DISTINCT_ORDER_BY_EXPRESSIONS_MUST_APPEAR_IN_SELECT_LIST = + "For SELECT DISTINCT, ORDER BY expressions must appear in select list"; + public static final String IS_CURRENTLY_NOT_ALLOWED_2 = + " is currently not allowed."; + public static final String DUPLICATE_PROPERTY_S = + "Duplicate property: %s"; + public static final String TTL_VALUE_MUST_BE_A_INF_OR_A_LONGLITERAL_BUT_NOW_IS = + "TTL' value must be a 'INF' or a LongLiteral, but now is: "; + public static final String COLUMN_NAME_NOT_SPECIFIED_AT_POSITION_S = + "Column name not specified at position %s"; + public static final String COLUMN_NAME_S_SPECIFIED_MORE_THAN_ONCE = + "Column name '%s' specified more than once"; + public static final String COLUMN_ALIAS_LIST_HAS_S_ENTRIES_BUT_RELATION_HAS_S_COLUMNS = + "Column alias list has %s entries but relation has %s columns"; + public static final String TABLE_FUNCTION_S_SPECIFIES_REQUIRED_COLUMNS_FROM_TABLE_ARGUMENT_S_WHICH_CANNOT_BE_FOUND = + "Table function %s specifies required columns from table argument %s which cannot be found"; + public static final String TABLE_FUNCTION_S_SPECIFIES_EMPTY_LIST_OF_REQUIRED_COLUMNS_FROM_TABLE_ARGUMENT_S = + "Table function %s specifies empty list of required columns from table argument %s"; + public static final String TABLE_FUNCTION_S_SPECIFIES_NEGATIVE_INDEX_OF_REQUIRED_COLUMN_FROM_TABLE_ARGUMENT_S = + "Table function %s specifies negative index of required column from table argument %s"; + public static final String INDEX_S_OF_REQUIRED_COLUMN_FROM_TABLE_ARGUMENT_S_IS_OUT_OF_BOUNDS_FOR_TABLE_WITH_S = + "Index %s of required column from table argument %s is out of bounds for table with %s columns"; + public static final String TABLE_FUNCTION_S_DOES_NOT_SPECIFY_REQUIRED_INPUT_COLUMNS_FROM_TABLE_ARGUMENT_S = + "Table function %s does not specify required input columns from table argument %s"; + public static final String TOO_MANY_ARGUMENTS_EXPECTED_AT_MOST_S_ARGUMENTS_GOT_S_ARGUMENTS = + "Too many arguments. Expected at most %s arguments, got %s arguments"; + public static final String ALL_ARGUMENTS_MUST_BE_PASSED_BY_NAME_OR_ALL_MUST_BE_PASSED_POSITIONALLY = + "All arguments must be passed by name or all must be passed positionally"; + public static final String UNEXPECTED_ARGUMENT_NAME_S = + "Unexpected argument name: %s"; + public static final String UNEXPECTED_TABLE_FUNCTION_ARGUMENT_TYPE_S = + "Unexpected table function argument type: %s"; + public static final String INVALID_ARGUMENT_S_EXPECTED_TABLE_ARGUMENT_GOT_S = + "Invalid argument %s. Expected table argument, got %s"; + public static final String INVALID_ARGUMENT_S_EXPECTED_SCALAR_ARGUMENT_GOT_S = + "Invalid argument %s. Expected scalar argument, got %s"; + public static final String INVALID_ARGUMENT_S_PARTITIONING_CAN_NOT_BE_SPECIFIED_FOR_TABLE_ARGUMENT_WITH_ROW = + "Invalid argument %s. Partitioning can not be specified for table argument with row semantics"; + public static final String INVALID_ARGUMENT_S_ORDERING_CAN_NOT_BE_SPECIFIED_FOR_TABLE_ARGUMENT_WITH_ROW_SEMANTICS = + "Invalid argument %s. Ordering can not be specified for table argument with row semantics"; + public static final String INVALID_SCALAR_ARGUMENT_S_EXPECTED_TYPE_S_GOT_S = + "Invalid scalar argument '%s'. Expected type %s, got %s"; + public static final String INVALID_SCALAR_ARGUMENT_S_S = + "Invalid scalar argument %s, %s"; + public static final String MISSING_REQUIRED_ARGUMENT_S = + "Missing required argument: %s"; + public static final String EXPECTED_COLUMN_REFERENCE_ACTUAL_S = + "Expected column reference. Actual: %s"; + public static final String COLUMN_S_IS_NOT_PRESENT_IN_THE_INPUT_RELATION = + "Column %s is not present in the input relation"; + public static final String S_CANNOT_CONTAIN_AGGREGATIONS_WINDOW_FUNCTIONS_OR_GROUPING_OPERATIONS_S = + "%s cannot contain aggregations, window functions or grouping operations: %s"; + public static final String S_MUST_BE_AN_AGGREGATE_EXPRESSION_OR_APPEAR_IN_GROUP_BY_CLAUSE = + "'%s' must be an aggregate expression or appear in GROUP BY clause"; + public static final String SUBQUERY_USES_S_WHICH_MUST_APPEAR_IN_GROUP_BY_CLAUSE = + "Subquery uses '%s' which must appear in GROUP BY clause"; + public static final String CANNOT_NEST_AGGREGATIONS_INSIDE_AGGREGATION_S_S = + "Cannot nest aggregations inside aggregation '%s': %s"; + public static final String UNION_PATTERN_VARIABLE_NAME_S_IS_A_DUPLICATE_OF_PRIMARY_PATTERN_VARIABLE_NAME = + "union pattern variable name: %s is a duplicate of primary pattern variable name"; + public static final String UNION_PATTERN_VARIABLE_NAME_S_IS_DECLARED_TWICE = + "union pattern variable name: %s is declared twice"; + public static final String SUBSET_ELEMENT_S_IS_NOT_A_PRIMARY_PATTERN_VARIABLE = + "subset element: %s is not a primary pattern variable"; + public static final String DEFINED_VARIABLE_S_IS_NOT_A_PRIMARY_PATTERN_VARIABLE = + "defined variable: %s is not a primary pattern variable"; + public static final String PATTERN_VARIABLE_WITH_NAME_S_IS_DEFINED_TWICE = + "pattern variable with name: %s is defined twice"; + public static final String FINAL_SEMANTICS_IS_NOT_SUPPORTED_IN_DEFINE_CLAUSE = + "FINAL semantics is not supported in DEFINE clause"; + public static final String PATTERN_QUANTIFIER_LOWER_BOUND_MUST_BE_GREATER_THAN_OR_EQUAL_TO_0 = + "Pattern quantifier lower bound must be greater than or equal to 0"; + public static final String PATTERN_QUANTIFIER_LOWER_BOUND_MUST_NOT_EXCEED = + "Pattern quantifier lower bound must not exceed "; + public static final String PATTERN_QUANTIFIER_UPPER_BOUND_MUST_BE_GREATER_THAN_OR_EQUAL_TO_1 = + "Pattern quantifier upper bound must be greater than or equal to 1"; + public static final String PATTERN_QUANTIFIER_UPPER_BOUND_MUST_NOT_EXCEED = + "Pattern quantifier upper bound must not exceed "; + public static final String PATTERN_QUANTIFIER_LOWER_BOUND_MUST_NOT_EXCEED_UPPER_BOUND = + "Pattern quantifier lower bound must not exceed upper bound"; + public static final String S_IS_NOT_A_PRIMARY_OR_UNION_PATTERN_VARIABLE = + "%s is not a primary or union pattern variable"; + public static final String NESTED_ROW_PATTERN_RECOGNITION_IN_ROW_PATTERN_RECOGNITION = + "nested row pattern recognition in row pattern recognition"; + public static final String PATTERN_EXCLUSION_SYNTAX_IS_NOT_ALLOWED_WHEN_ALL_ROWS_PER_MATCH_WITH_UNMATCHED_ROWS_IS = + "Pattern exclusion syntax is not allowed when ALL ROWS PER MATCH WITH UNMATCHED ROWS is specified"; + public static final String COLUMN_S_CANNOT_BE_RESOLVED = + "Column '%s' cannot be resolved"; + public static final String REFERENCE_TO_COLUMN_S_FROM_OUTER_SCOPE_NOT_ALLOWED_IN_THIS_CONTEXT = + "Reference to column '%s' from outer scope not allowed in this context"; + public static final String COLUMN_S_PREFIXED_WITH_LABEL_S_CANNOT_BE_RESOLVED = + "Column %s prefixed with label %s cannot be resolved"; + public static final String EXPRESSION_S_IS_NOT_OF_TYPE_ROW = + "Expression %s is not of type ROW"; + public static final String AMBIGUOUS_ROW_FIELD_REFERENCE_S = + "Ambiguous row field reference: %s"; + public static final String TYPES_ARE_NOT_COMPARABLE_WITH_NULLIF_S_VS_S = + "Types are not comparable with NULLIF: %s vs %s"; + public static final String CASE_OPERAND_TYPE_DOES_NOT_MATCH_WHEN_CLAUSE_OPERAND_TYPE_S_VS_S = + "CASE operand type does not match WHEN clause operand type: %s vs %s"; + public static final String UNARY_OPERATOR_CANNOT_BY_APPLIED_TO_S_TYPE = + "Unary '+' operator cannot by applied to %s type"; + public static final String LEFT_SIDE_OF_LIKE_EXPRESSION_MUST_EVALUATE_TO_TEXT_OR_STRING_TYPE_ACTUAL_S = + "Left side of LIKE expression must evaluate to TEXT or STRING Type (actual: %s)"; + public static final String PATTERN_FOR_LIKE_EXPRESSION_MUST_EVALUATE_TO_TEXT_OR_STRING_TYPE_ACTUAL_S = + "Pattern for LIKE expression must evaluate to TEXT or STRING Type (actual: %s)"; + public static final String ESCAPE_FOR_LIKE_EXPRESSION_MUST_EVALUATE_TO_TEXT_OR_STRING_TYPE_ACTUAL_S = + "Escape for LIKE expression must evaluate to TEXT or STRING Type (actual: %s)"; + public static final String LABEL_STAR_SYNTAX_IS_ONLY_SUPPORTED_AS_THE_ONLY_ARGUMENT_OF_ROW_PATTERN_COUNT_FUNCTION = + "label.* syntax is only supported as the only argument of row pattern count function"; + public static final String CANNOT_USE_DISTINCT_WITH_AGGREGATE_FUNCTION_IN_PATTERN_RECOGNITION_CONTEXT = + "Cannot use DISTINCT with aggregate function in pattern recognition context"; + public static final String S_SEMANTICS_IS_NOT_SUPPORTED_OUT_OF_PATTERN_RECOGNITION_CONTEXT = + "%s semantics is not supported out of pattern recognition context"; + public static final String S_SEMANTICS_IS_SUPPORTED_ONLY_FOR_FIRST_LAST_AND_AGGREGATION_FUNCTIONS_ACTUAL_S = + "%s semantics is supported only for FIRST(), LAST() and aggregation functions. Actual: %s"; + public static final String THE_SECOND_ARGUMENT_OF_S_FUNCTION_MUST_BE_ACTUAL_TIME_NAME = + "The second argument of %s function must be actual time name"; + public static final String THE_THIRD_ARGUMENT_OF_S_FUNCTION_MUST_BE_ACTUAL_TIME_NAME = + "The third argument of %s function must be actual time name"; + public static final String TOO_MANY_ARGUMENTS_FOR_FUNCTION_CALL_S = + "Too many arguments for function call %s()"; + public static final String S_IS_NOT_A_PRIMARY_PATTERN_VARIABLE_OR_SUBSET_NAME = + "%s is not a primary pattern variable or subset name"; + public static final String MISSING_VALID_TIME_COLUMN_THE_TABLE_MUST_CONTAIN_EITHER_A_COLUMN_WITH_THE_TIME_CATEGORY = + "Missing valid time column. The table must contain either a column with the TIME category or at least one TIMESTAMP column."; + public static final String CLASSIFIER_PATTERN_RECOGNITION_FUNCTION_TAKES_NO_ARGUMENTS_OR_1_ARGUMENT = + "CLASSIFIER pattern recognition function takes no arguments or 1 argument"; + public static final String CLASSIFIER_FUNCTION_ARGUMENT_SHOULD_BE_PRIMARY_PATTERN_VARIABLE_OR_SUBSET_NAME_ACTUAL_S = + "CLASSIFIER function argument should be primary pattern variable or subset name. Actual: %s"; + public static final String CANNOT_USE_DISTINCT_WITH_S_PATTERN_RECOGNITION_FUNCTION = + "Cannot use DISTINCT with %s pattern recognition function"; + public static final String S_SEMANTICS_IS_NOT_SUPPORTED_WITH_S_PATTERN_RECOGNITION_FUNCTION = + "%s semantics is not supported with %s pattern recognition function"; + public static final String S_PATTERN_RECOGNITION_FUNCTION_REQUIRES_1_OR_2_ARGUMENTS = + "%s pattern recognition function requires 1 or 2 arguments"; + public static final String S_PATTERN_RECOGNITION_NAVIGATION_FUNCTION_REQUIRES_A_NUMBER_AS_THE_SECOND_ARGUMENT = + "%s pattern recognition navigation function requires a number as the second argument"; + public static final String S_PATTERN_RECOGNITION_NAVIGATION_FUNCTION_REQUIRES_A_NON_NEGATIVE_NUMBER_AS_THE_SECOND = + "%s pattern recognition navigation function requires a non-negative number as the second argument (actual: %s)"; + public static final String THE_SECOND_ARGUMENT_OF_S_PATTERN_RECOGNITION_NAVIGATION_FUNCTION_MUST_NOT_EXCEED_S = + "The second argument of %s pattern recognition navigation function must not exceed %s (actual: %s)"; + public static final String CANNOT_NEST_S_PATTERN_NAVIGATION_FUNCTION_INSIDE_S_PATTERN_NAVIGATION_FUNCTION = + "Cannot nest %s pattern navigation function inside %s pattern navigation function"; + public static final String CANNOT_NEST_MULTIPLE_PATTERN_NAVIGATION_FUNCTIONS_INSIDE_S_PATTERN_NAVIGATION_FUNCTION = + "Cannot nest multiple pattern navigation functions inside %s pattern navigation function"; + public static final String IMMEDIATE_NESTING_IS_REQUIRED_FOR_PATTERN_NAVIGATION_FUNCTIONS = + "Immediate nesting is required for pattern navigation functions"; + public static final String ALL_LABELS_AND_CLASSIFIERS_INSIDE_THE_CALL_TO_S_MUST_MATCH = + "All labels and classifiers inside the call to '%s' must match"; + public static final String ALL_AGGREGATE_FUNCTION_ARGUMENTS_MUST_APPLY_TO_ROWS_MATCHED_WITH_THE_SAME_LABEL = + "All aggregate function arguments must apply to rows matched with the same label"; + public static final String CANNOT_NEST_S_AGGREGATE_FUNCTION_INSIDE_S_FUNCTION = + "Cannot nest %s aggregate function inside %s function"; + public static final String CANNOT_NEST_S_PATTERN_NAVIGATION_FUNCTION_INSIDE_S_FUNCTION = + "Cannot nest %s pattern navigation function inside %s function"; + public static final String INVALID_PARAMETER_INDEX_S_MAX_VALUE_IS_S = + "Invalid parameter index %s, max value is %s"; + public static final String CANNOT_CHECK_IF_S_IS_BETWEEN_S_AND_S = + "Cannot check if %s is BETWEEN %s and %s"; + public static final String S_IS_NOT_COMPARABLE_AND_THEREFORE_CANNOT_BE_USED_IN_WINDOW_FUNCTION_PARTITION_BY = + "%s is not comparable, and therefore cannot be used in window function PARTITION BY"; + public static final String S_IS_NOT_ORDERABLE_AND_THEREFORE_CANNOT_BE_USED_IN_WINDOW_FUNCTION_ORDER_BY = + "%s is not orderable, and therefore cannot be used in window function ORDER BY"; + public static final String WINDOW_FRAME_STARTING_FROM_CURRENT_ROW_CANNOT_END_WITH_PRECEDING = + "Window frame starting from CURRENT ROW cannot end with PRECEDING"; + public static final String WINDOW_FRAME_STARTING_FROM_FOLLOWING_CANNOT_END_WITH_PRECEDING = + "Window frame starting from FOLLOWING cannot end with PRECEDING"; + public static final String WINDOW_FRAME_STARTING_FROM_FOLLOWING_CANNOT_END_WITH_CURRENT_ROW = + "Window frame starting from FOLLOWING cannot end with CURRENT ROW"; + public static final String WINDOW_FRAME_ROWS_START_VALUE_TYPE_MUST_BE_EXACT_NUMERIC_TYPE_WITH_SCALE_0_ACTUAL_S = + "Window frame ROWS start value type must be exact numeric type with scale 0 (actual %s)"; + public static final String WINDOW_FRAME_ROWS_END_VALUE_TYPE_MUST_BE_EXACT_NUMERIC_TYPE_WITH_SCALE_0_ACTUAL_S = + "Window frame ROWS end value type must be exact numeric type with scale 0 (actual %s)"; + public static final String WINDOW_FRAME_OF_TYPE_GROUPS_PRECEDING_OR_FOLLOWING_REQUIRES_ORDER_BY = + "Window frame of type GROUPS PRECEDING or FOLLOWING requires ORDER BY"; + public static final String WINDOW_FRAME_GROUPS_START_VALUE_TYPE_MUST_BE_EXACT_NUMERIC_TYPE_WITH_SCALE_0_ACTUAL_S = + "Window frame GROUPS start value type must be exact numeric type with scale 0 (actual %s)"; + public static final String WINDOW_FRAME_OF_TYPE_RANGE_PRECEDING_OR_FOLLOWING_REQUIRES_ORDER_BY = + "Window frame of type RANGE PRECEDING or FOLLOWING requires ORDER BY"; + public static final String WINDOW_FRAME_OF_TYPE_RANGE_PRECEDING_OR_FOLLOWING_REQUIRES_SINGLE_SORT_ITEM_IN_ORDER_BY = + "Window frame of type RANGE PRECEDING or FOLLOWING requires single sort item in ORDER BY (actual: %s)"; + public static final String WINDOW_FRAME_OF_TYPE_RANGE_PRECEDING_OR_FOLLOWING_REQUIRES_THAT_SORT_ITEM_TYPE_BE = + "Window frame of type RANGE PRECEDING or FOLLOWING requires that sort item type be numeric, datetime or interval (actual: %s)"; + public static final String WINDOW_FRAME_RANGE_VALUE_TYPE_S_NOT_COMPATIBLE_WITH_SORT_ITEM_TYPE_S = + "Window frame RANGE value type (%s) not compatible with sort item type (%s)"; + public static final String TYPE_S_MUST_BE_ORDERABLE_IN_ORDER_TO_BE_USED_IN_QUANTIFIED_COMPARISON = + "Type [%s] must be orderable in order to be used in quantified comparison"; + public static final String TYPE_S_MUST_BE_COMPARABLE_IN_ORDER_TO_BE_USED_IN_QUANTIFIED_COMPARISON = + "Type [%s] must be comparable in order to be used in quantified comparison"; + public static final String NOT_YET_IMPLEMENTED_S = + "not yet implemented: %s"; + public static final String S_MUST_EVALUATE_TO_A_S_ACTUAL_S = + "%s must evaluate to a %s (actual: %s)"; + public static final String S_MUST_BE_THE_SAME_TYPE_OR_COERCIBLE_TO_A_COMMON_TYPE_CANNOT_FIND_COMMON_TYPE_BETWEEN_S = + "%s must be the same type or coercible to a common type. Cannot find common type between %s and %s, all types (without duplicates): %s"; + public static final String PATTERN_RECOGNITION_FUNCTION_NAME_MUST_NOT_BE_QUALIFIED = + "Pattern recognition function name must not be qualified: "; + public static final String PATTERN_RECOGNITION_FUNCTION_NAME_MUST_NOT_BE_DELIMITED = + "Pattern recognition function name must not be delimited: "; + public static final String PATTERN_RECOGNITION_FUNCTION_NAMES_CANNOT_BE_LAST_OR_FIRST_USE_RPR_LAST_OR_RPR_FIRST = + "Pattern recognition function names cannot be LAST or FIRST, use RPR_LAST or RPR_FIRST instead."; + public static final String PARAMETER_NODE_MUST_HAVE_A_LOCATION = + "Parameter node must have a location"; + public static final String INVALID_NUMBER_OF_PARAMETERS_EXPECTED_D_GOT_D = + "Invalid number of parameters: expected %d, got %d"; + public static final String CANNOT_INSERT_IDENTIFIER_S_PLEASE_USE_STRING_LITERAL = + "Cannot insert identifier %s, please use string literal"; + public static final String EXPRESSIONS_AND_COLUMNS_DO_NOT_MATCH_EXPRESSIONS_SIZE = + "expressions and columns do not match, expressions size: "; + public static final String COLUMNS_SIZE = + ", columns size: "; + public static final String TIMECOLUMNINDEX_OUT_OF_BOUND_D_D = + "TimeColumnIndex out of bound: %d-%d"; + public static final String INCONSISTENT_NUMBERS_OF_NON_TIME_COLUMN_NAMES_AND_VALUES_D_D = + "Inconsistent numbers of non-time column names and values: %d-%d"; + public static final String IS_NOT_SUPPORTED_FOR_PROPERTY_VALUE_OF_SET_CONFIGURATION = + " is not supported for property value of 'set configuration'. "; + public static final String NOTE_THAT_THE_SYNTAX_FOR_SET_CONFIGURATION_IN_THE_TREE_MODEL_IS_NOT_EXACTLY_THE_SAME_AS = + "Note that the syntax for 'set configuration' in the tree model is not exactly the same as that in the table model."; + public static final String UNSUPPORTED_COPY_TO_FORMAT_S_SUPPORTED_FORMATS_S = + "Unsupported COPY TO format '%s'. Supported formats: %s"; + public static final String SIMULTANEOUS_SETTING_OF_MONTHLY_AND_NON_MONTHLY_INTERVALS_IS_NOT_SUPPORTED = + "Simultaneous setting of monthly and non-monthly intervals is not supported."; + public static final String DON_T_NEED_TO_SPECIFY_TIME_COLUMN_WHILE_EITHER_TIME_BOUND_OR_FILL_GROUP_PARAMETER_IS_NOT = + "Don't need to specify TIME_COLUMN while either TIME_BOUND or FILL_GROUP parameter is not specified"; + public static final String MONTH_OR_YEAR_INTERVAL_IN_TOLERANCE_IS_NOT_SUPPORTED_NOW = + "Month or year interval in tolerance is not supported now."; + public static final String ASOF_JOIN_DOES_NOT_SUPPORT_S_TYPE_NOW = + "ASOF JOIN does not support %s type now"; + public static final String THE_SECOND_ARGUMENT_OF_APPROX_COUNT_DISTINCT_FUNCTION_MUST_BE_A_LITERAL = + "The second argument of 'approx_count_distinct' function must be a literal"; + public static final String THE_SECOND_AND_THIRD_ARGUMENT_OF_APPROX_MOST_FREQUENT_FUNCTION_MUST_BE_POSITIVE_INTEGER = + "The second and third argument of 'approx_most_frequent' function must be positive integer literal"; + public static final String THE_SECOND_ARGUMENT_OF_APPROX_PERCENTILE_FUNCTION_PERCENTAGE_MUST_BE_A_DOUBLE_LITERAL = + "The second argument of 'approx_percentile' function percentage must be a double literal"; + public static final String THE_THIRD_ARGUMENT_OF_APPROX_PERCENTILE_FUNCTION_PERCENTAGE_MUST_BE_A_DOUBLE_LITERAL = + "The third argument of 'approx_percentile' function percentage must be a double literal"; + public static final String INCONSISTENT_COLUMN_CATEGORY_OF_COLUMN_S_S_S = + "Inconsistent column category of column %s: %s/%s"; + public static final String COLUMN = + "Column "; + public static final String DOES_NOT_EXISTS_OR_FAILS_TO_BE = + " does not exists or fails to be "; + public static final String CREATED = + "created"; + public static final String INCOMPATIBLE_DATA_TYPE_OF_COLUMN_S_S_S = + "Incompatible data type of column %s: %s/%s"; + public static final String INLIST_LITERAL_FOR_TIMESTAMP_CAN_ONLY_BE_LONGLITERAL_DOUBLELITERAL_AND_GENERICLITERAL = + "InList Literal for TIMESTAMP can only be LongLiteral, DoubleLiteral and GenericLiteral, current is "; + public static final String THE_TIME_FIELD_COLUMNS_ARE_CURRENTLY_NOT_ALLOWED_IN_DEVICES_RELATED_OPERATIONS = + "The TIME/FIELD columns are currently not allowed in devices related operations"; + public static final String UNKNOWN_COLUMN_CATEGORY_FOR_S_CANNOT_AUTO_CREATE_COLUMN = + "Unknown column category for %s. Cannot auto create column."; + public static final String UNKNOWN_COLUMN_DATA_TYPE_FOR_S_CANNOT_AUTO_CREATE_COLUMN = + "Unknown column data type for %s. Cannot auto create column."; + public static final String WRONG_CATEGORY_AT_COLUMN_S = + "Wrong category at column %s."; + public static final String MISSING_COLUMNS_S = + "Missing columns %s."; + public static final String DATATYPE_OF_TAG_COLUMN_SHOULD_ONLY_BE_STRING_CURRENT_IS = + "DataType of TAG Column should only be STRING, current is "; + public static final String DATATYPE_OF_ATTRIBUTE_COLUMN_SHOULD_ONLY_BE_STRING_CURRENT_IS = + "DataType of ATTRIBUTE Column should only be STRING, current is "; + public static final String DECORRELATION_FOR_LIMIT_WITH_ROW_COUNT_GREATER_THAN_1_IS_NOT_SUPPORTED_YET = + "Decorrelation for LIMIT with row count greater than 1 is not supported yet"; + public static final String GIVEN_CORRELATED_SUBQUERY_IS_NOT_SUPPORTED = + "Given correlated subquery is not supported"; + public static final String GIVEN_QUERIED_DATABASE_S_IS_NOT_EXIST = + "Given queried database: %s is not exist!"; + + // --- QueryEngine log messages (additional) --- + public static final String INITIALIZED_SHARED_MEMORYBLOCK_COORDINATOR_WITH_ALL_AVAILABLE_MEMORY_ARG_BYTES = + "Initialized shared MemoryBlock 'Coordinator' with all available memory: {} bytes"; + public static final String ERROR_OCCURRED_DURING_EXECUTING_UDAF_PLEASE_CHECK_WHETHER_THE_IMPLEMENTATION_OF_UDF_IS = + "Error occurred during executing UDAF, please check whether the implementation of UDF is correct according to the udf-api description."; + public static final String PROCESSGETTSBLOCKREQUEST_SEQUENCE_ID_IN_ARG_ARG = + "[ProcessGetTsBlockRequest] sequence ID in [{}, {})"; + public static final String RECEIVED_ACKNOWLEDGEDATABLOCKEVENT_FOR_TSBLOCKS_WHOSE_SEQUENCE_ID_ARE_IN_ARG_ARG_FROM = + "Received AcknowledgeDataBlockEvent for TsBlocks whose sequence ID are in [{}, {}) from {}."; + public static final String RECEIVED_ACK_EVENT_BUT_TARGET_FRAGMENTINSTANCE_ARG_IS_NOT_FOUND = + "received ACK event but target FragmentInstance[{}] is not found."; + public static final String CLOSED_SOURCE_HANDLE_OF_SHUFFLESINKHANDLE_ARG_CHANNEL_INDEX_ARG = + "Closed source handle of ShuffleSinkHandle {}, channel index: {}."; + public static final String RECEIVED_CLOSESINKCHANNELEVENT_BUT_TARGET_FRAGMENTINSTANCE_ARG_IS_NOT_FOUND = + "received CloseSinkChannelEvent but target FragmentInstance[{}] is not found."; + public static final String NEW_DATA_BLOCK_EVENT_RECEIVED_FOR_PLAN_NODE_ARG_OF_ARG_FROM_ARG = + "New data block event received, for plan node {} of {} from {}."; + public static final String RECEIVED_NEWDATABLOCKEVENT_BUT_THE_DOWNSTREAM_FRAGMENTINSTANCE_ARG_IS_NOT_FOUND = + "received NewDataBlockEvent but the downstream FragmentInstance[{}] is not found"; + public static final String END_OF_DATA_BLOCK_EVENT_RECEIVED_FOR_PLAN_NODE_ARG_OF_ARG_FROM_ARG = + "End of data block event received, for plan node {} of {} from {}."; + public static final String RECEIVED_ONENDOFDATABLOCKEVENT_BUT_THE_DOWNSTREAM_FRAGMENTINSTANCE_ARG_IS_NOT_FOUND = + "received onEndOfDataBlockEvent but the downstream FragmentInstance[{}] is not found"; + public static final String CREATE_SOURCE_HANDLE_FROM_ARG_FOR_PLAN_NODE_ARG_OF_ARG = + "Create source handle from {} for plan node {} of {}"; + public static final String THE_TASK_ARG_IS_ABORTED_ALL_OTHER_TASKS_IN_THE_SAME_QUERY_WILL_BE_CANCELLED = + "The task {} is aborted. All other tasks in the same query will be cancelled"; + public static final String DRIVERTASKTIMEOUT_CURRENT_TIME_IS_ARG_DDL_OF_TASK_IS_ARG = + "[DriverTaskTimeout] Current time is {}, ddl of task is {}"; + public static final String EXECUTOR_ARG_EXITS_BECAUSE_IT_S_INTERRUPTED_WE_WILL_PRODUCE_ANOTHER_THREAD_TO_REPLACE = + "Executor {} exits because it's interrupted. We will produce another thread to replace."; + public static final String CANNOT_RESERVE_ARG_MAX_ARG_BYTES_MEMORY_FROM_MEMORYPOOL_FOR_PLANNODEIDARG = + "Cannot reserve {}(Max: {}) bytes memory from MemoryPool for planNodeId{}"; + public static final String BLOCKED_RESERVE_REQUEST_ARG_BYTES_MEMORY_FOR_PLANNODEIDARG = + "Blocked reserve request: {} bytes memory for planNodeId{}"; + public static final String FAILED_TO_DO_THE_INITIALIZATION_FOR_DRIVER_ARG = + "Failed to do the initialization for driver {} "; + public static final String FAILED_TO_ACQUIRE_THE_READ_LOCK_OF_DATAREGION_ARG_FOR_ARG_TIMES = + "Failed to acquire the read lock of DataRegion-{} for {} times"; + public static final String INTERRUPTED_WHEN_AWAIT_ON_ALLDRIVERSCLOSED_FRAGMENTINSTANCE_ID_IS_ARG = + "Interrupted when await on allDriversClosed, FragmentInstance Id is {}"; + public static final String RELEASE_TVLIST_OWNED_BY_QUERY_ALLOCATE_SIZE_ARG_RELEASE_SIZE_ARG = + "Release TVList owned by query: allocate size {}, release size {}"; + public static final String TVLIST_ARG_IS_RELEASED_BY_THE_QUERY_FRAGMENTINSTANCE_ID_IS_ARG = + "TVList {} is released by the query, FragmentInstance Id is {}"; + public static final String MEMORYNOTENOUGHEXCEPTION_WHEN_TRANSFERRING_TVLIST_OWNERSHIP_FROM_QUERY_ARG_TO_ANOTHER = + "MemoryNotEnoughException when transferring TVList ownership from query {} to another query {}."; + public static final String UNEXPECTED_EXCEPTION_WHEN_TRANSFERRING_TVLIST_OWNERSHIP_FROM_QUERY_ARG_TO_ANOTHER_QUERY = + "Unexpected Exception when transferring TVList ownership from query {} to another query {}."; + public static final String TVLIST_ARG_IS_NOW_OWNED_BY_ANOTHER_QUERY_FRAGMENTINSTANCE_ID_IS_ARG = + "TVList {} is now owned by another query, FragmentInstance Id is {}"; + public static final String GETTSBLOCKFROMQUEUE_TSBLOCK_ARG_SIZE_ARG = + "[GetTsBlockFromQueue] TsBlock:{} size:{}"; + public static final String RECEIVENEWTSBLOCKNOTIFICATION_ARG_ARG_EACH_SIZE_IS_ARG = + "[ReceiveNewTsBlockNotification] [{}, {}), each size is: {}"; + public static final String STARTPULLTSBLOCKSFROMREMOTE_ARG_ARG_ARG_ARG = + "[StartPullTsBlocksFromRemote] {}-{} [{}, {}) "; + public static final String SENDCLOSESINKCHANNELEVENT_TO_SHUFFLESINKHANDLE_ARG_INDEX_ARG = + "[SendCloseSinkChannelEvent] to [ShuffleSinkHandle: {}, index: {}])."; + public static final String SINKCHANNEL_STILL_RECEIVE_GETTING_TSBLOCK_REQUEST_AFTER_BEING_ABORTED_ARG_OR_CLOSED_ARG = + "SinkChannel still receive getting TsBlock request after being aborted={} or closed={}"; + public static final String NOTIFYNEWTSBLOCK_ARG_ARG_TO_ARG_ARG = + "[NotifyNewTsBlock] [{}, {}) to {}.{}"; + public static final String PLAINSHUFFLESTRATEGY_NEEDS_TO_DO_NOTHING_CURRENT_CHANNEL_INDEX_IS_ARG = + "PlainShuffleStrategy needs to do nothing, current channel index is {}"; + public static final String LAYERROWWINDOWREADER_INDEX_OVERFLOW_BEGININDEX_ARG_ENDINDEX_ARG_WINDOWSIZE_ARG = + "LayerRowWindowReader index overflow. beginIndex: {}, endIndex: {}, windowSize: {}."; + public static final String CONSUMEMEMORY_CONSUME_ARG_CURRENT_REMAINING_MEMORY_ARG = + "[ConsumeMemory] consume: {}, current remaining memory: {}"; + public static final String RELEASEMEMORY_RELEASE_ARG_CURRENT_REMAINING_MEMORY_ARG = + "[ReleaseMemory] release: {}, current remaining memory: {}"; + public static final String MAXBYTESONEHANDLECANRESERVE_FOR_EXCHANGEOPERATOR_IS_ARG_EXCHANGESUMNUM_IS_ARG = + "MaxBytesOneHandleCanReserve for ExchangeOperator is {}, exchangeSumNum is {}."; + public static final String STATE_TRACKER_STARTS = + "state tracker starts"; + public static final String DISPATCH_WRITE_FAILED_STATUS_ARG_CODE_ARG_MESSAGE_ARG_NODE_ARG = + "Dispatch write failed. status: {}, code: {}, message: {}, node {}"; + public static final String CAN_T_EXECUTE_REQUEST_ON_NODE_ARG_IN_SECOND_TRY_ERROR_MSG_IS_ARG = + "can't execute request on node {} in second try, error msg is {}."; + public static final String CAN_T_EXECUTE_REQUEST_ON_NODE_ARG_ERROR_MSG_IS_ARG_AND_WE_TRY_TO_RECONNECT_THIS_NODE = + "can't execute request on node {}, error msg is {}, and we try to reconnect this node."; + public static final String WRITE_LOCALLY_FAILED_TSSTATUS_ARG_MESSAGE_ARG = + "write locally failed. TSStatus: {}, message: {}"; + public static final String DISPATCH_WRITE_FAILED_MESSAGE_ARG_NODE_ARG = + "dispatch write failed. message: {}, node {}"; + public static final String DISPATCH_WRITE_FAILED_STATUS_ARG_CODE_ARG_MESSAGE_ARG_NODE_ARG_2 = + "dispatch write failed. status: {}, code: {}, message: {}, node {}"; + public static final String LOGICAL_PLAN_IS_ARG = + "logical plan is: \n {}"; + public static final String DISTRIBUTION_PLAN_DONE_FRAGMENT_INSTANCE_COUNT_IS_ARG_DETAILS_IS_ARG = + "distribution plan done. Fragment instance count is {}, details is: \n {}"; + public static final String FAILED_TO_CHECK_TABLE_SCHEMA_WILL_SKIP_BECAUSE_SKIPFAILEDTABLESCHEMACHECK_IS_SET_TO_TRUE = + "Failed to check table schema, will skip because skipFailedTableSchemaCheck is set to true, message: {}"; + public static final String FAILED_TO_CHECK_IF_DEVICE_ARG_IS_DELETED_BY_MODS_WILL_SEE_IT_AS_NOT_DELETED = + "Failed to check if device {} is deleted by mods. Will see it as not deleted."; + public static final String COLUMN_ARG_IN_TABLE_ARG_IS_NOT_FOUND_IN_IOTDB_WHILE_LOADING_TSFILE = + "Column {} in table {} is not found in IoTDB while loading TsFile."; + public static final String DEVICE_ARG_IS_NOT_IN_THE_TSFILEDEVICE2ISALIGNED_CACHE_ARG = + "Device {} is not in the tsFileDevice2IsAligned cache {}."; + public static final String LOADTSFILEANALYZER_CURRENT_DATANODE_IS_READ_ONLY_WILL_TRY_TO_CONVERT_TO_TABLETS_AND = + "LoadTsFileAnalyzer: Current datanode is read only, will try to convert to tablets and insert later."; + public static final String LOAD_ANALYSIS_STAGE_ARG_ARG_TSFILES_HAVE_BEEN_ANALYZED_PROGRESS_ARG_PERCENT = + "Load - Analysis Stage: {}/{} tsfiles have been analyzed, progress: {}%"; + public static final String THE_FILE_ARG_IS_NOT_A_VALID_TSFILE_PLEASE_CHECK_THE_INPUT_FILE = + "The file {} is not a valid tsfile. Please check the input file."; + public static final String TSFILE_ARG_IS_A_ARG_MODEL_FILE = + "TsFile {} is a {}-model file."; + public static final String LOAD_FAILED_TO_CONVERT_MINI_TSFILE_ARG_TO_TABLETS_FROM_STATEMENT_ARG_STATUS_ARG = + "Load: Failed to convert mini tsfile {} to tablets from statement {}. Status: {}."; + public static final String LOAD_FAILED_TO_CONVERT_TO_TABLETS_FROM_STATEMENT_ARG_BECAUSE_FAILED_TO_READ_MODEL_INFO = + "Load: Failed to convert to tablets from statement {} because failed to read model info from file, message: {}."; + public static final String LOAD_FAILED_TO_CONVERT_TO_TABLETS_FROM_STATEMENT_ARG_STATUS_IS_NULL = + "Load: Failed to convert to tablets from statement {}. Status is null."; + public static final String LOAD_FAILED_TO_CONVERT_TO_TABLETS_FROM_STATEMENT_ARG_STATUS_ARG = + "Load: Failed to convert to tablets from statement {}. Status: {}"; + public static final String LOAD_FAILED_TO_CONVERT_TO_TABLETS_FROM_STATEMENT_ARG_BECAUSE_EXCEPTION_ARG = + "Load: Failed to convert to tablets from statement {} because exception: {}"; + public static final String FAILED_TO_CHECK_IF_DEVICE_ARG_TIMESERIES_ARG_IS_DELETED_BY_MODS_WILL_SEE_IT_AS_NOT = + "Failed to check if device {}, timeseries {} is deleted by mods. Will see it as not deleted."; + public static final String CREATE_DATABASE_ERROR_STATEMENT_ARG_RESULT_STATUS_IS_ARG = + "Create database error, statement: {}, result status is: {}"; + public static final String MEASUREMENT_ARGARGARG_DATATYPE_NOT_MATCH_TSFILE_ARG_IOTDB_ARG = + "Measurement {}{}{} datatype not match, TsFile: {}, IoTDB: {}"; + public static final String ENCODING_TYPE_NOT_MATCH_MEASUREMENT_ARGARGARG = + "Encoding type not match, measurement: {}{}{}, "; + public static final String TSFILE_ENCODING_ARG_IOTDB_ENCODING_ARG = + "TsFile encoding: {}, IoTDB encoding: {}"; + public static final String COMPRESSOR_NOT_MATCH_MEASUREMENT_ARGARGARG = + "Compressor not match, measurement: {}{}{}, "; + public static final String TSFILE_COMPRESSOR_ARG_IOTDB_COMPRESSOR_ARG = + "TsFile compressor: {}, IoTDB compressor: {}"; + public static final String ARG_CACHE_FAILED_TO_CREATE_DATABASE_ARG = + "[{} Cache] failed to create database {}"; + public static final String ARG_CACHE_MISS_WHEN_SEARCH_DEVICE_ARG = + "[{} Cache] miss when search device {}"; + public static final String ARG_CACHE_HIT_WHEN_SEARCH_DEVICE_ARG = + "[{} Cache] hit when search device {}"; + public static final String UNEXPECTED_ERROR_WHEN_GETREGIONREPLICASET_STATUS_ARG_REGIONMAP_ARG = + "Unexpected error when getRegionReplicaSet: status {}, regionMap: {}"; + public static final String ARG_CACHE_MISS_WHEN_SEARCH_DATABASE_ARG = + "[{} Cache] miss when search database {}"; + public static final String ARG_CACHE_MISS_WHEN_SEARCH_TIME_PARTITION_ARG = + "[{} Cache] miss when search time partition {}"; + public static final String FAILURES_HAPPENED_DURING_RUNNING_CONFIGEXECUTION_WHEN_EXECUTING_ARG_MESSAGE_ARG_STATUS = + "Failures happened during running ConfigExecution when executing {}, message: {}, status: {}"; + public static final String FAILURES_HAPPENED_DURING_RUNNING_CONFIGEXECUTION_WHEN_EXECUTING_ARG = + "Failures happened during running ConfigExecution when executing {}."; + public static final String FAILED_TO_EXECUTE_CREATE_DATABASE_ARG_IN_CONFIG_NODE_STATUS_IS_ARG = + "Failed to execute create database {} in config node, status is {}."; + public static final String FAILED_TO_EXECUTE_ALTER_DATABASE_ARG_IN_CONFIG_NODE_STATUS_IS_ARG = + "Failed to execute alter database {} in config node, status is {}."; + public static final String FAILED_TO_EXECUTE_DELETE_DATABASE_ARG_IN_CONFIG_NODE_STATUS_IS_ARG = + "Failed to execute delete database {} in config node, status is {}."; + public static final String FAILED_TO_CREATE_FUNCTION_WHEN_TRY_TO_CREATE_ARG_ARG_INSTANCE_FIRST = + "Failed to create function when try to create {}({}) instance first."; + public static final String FAILED_TO_GET_EXECUTABLE_FOR_TRIGGER_ARG_USING_URI_ARG = + "Failed to get executable for Trigger({}) using URI: {}."; + public static final String FAILED_TO_CREATE_TRIGGER_WHEN_TRY_TO_CREATE_TRIGGER_ARG_INSTANCE_FIRST = + "Failed to create trigger when try to create trigger({}) instance first."; + public static final String ARG_FAILED_TO_CREATE_TRIGGER_ARG_TSSTATUS_IS_ARG = + "[{}] Failed to create trigger {}. TSStatus is {}"; + public static final String FAILED_TO_GET_EXECUTABLE_FOR_PIPEPLUGIN_ARG_USING_URI_ARG = + "Failed to get executable for PipePlugin({}) using URI: {}."; + public static final String FAILED_TO_CREATE_PIPEPLUGIN_ARG_BECAUSE_THIS_PLUGIN_IS_NOT_DESIGNED_FOR_ARG_MODEL = + "Failed to create PipePlugin({}) because this plugin is not designed for {} model."; + public static final String FAILED_TO_CREATE_FUNCTION_WHEN_TRY_TO_CREATE_PIPEPLUGIN_ARG_INSTANCE_FIRST = + "Failed to create function when try to create PipePlugin({}) instance first."; + public static final String FAILED_TO_CREATE_PIPEPLUGIN_ARG_ARG_BECAUSE_ARG = + "Failed to create PipePlugin {}({}) because {}"; + public static final String ARG_FAILED_TO_DROP_PIPE_PLUGIN_ARG = + "[{}] Failed to drop pipe plugin {}."; + public static final String FAILED_TO_EXECUTE_ARG_ARG_IN_CONFIG_NODE_STATUS_IS_ARG = + "Failed to execute {} {} in config node, status is {}."; + public static final String FAILED_TO_EXECUTE_ALTER_VIEW_ARG_BY_PIPE_STATUS_IS_ARG = + "Failed to execute alter view {} by pipe, status is {}."; + public static final String THE_DATANODE_TO_BE_REMOVED_IS_NOT_IN_THE_CLUSTER_OR_THE_INPUT_FORMAT_IS_INCORRECT = + "The DataNode to be removed is not in the cluster, or the input format is incorrect."; + public static final String SUBMIT_REMOVE_DATANODE_REQUEST_SUCCESSFULLY_BUT_THE_PROCESS_MAY_FAIL = + "Submit remove-datanode request successfully, but the process may fail. "; + public static final String MORE_DETAILS_ARE_SHOWN_IN_THE_LOGS_OF_CONFIGNODE_LEADER_AND_REMOVED_DATANODE = + "more details are shown in the logs of confignode-leader and removed-datanode, "; + public static final String AND_AFTER_THE_PROCESS_OF_REMOVING_DATANODE_ENDS_SUCCESSFULLY = + "and after the process of removing datanode ends successfully, "; + public static final String YOU_ARE_SUPPOSED_TO_DELETE_DIRECTORY_AND_DATA_OF_THE_REMOVED_DATANODE_MANUALLY = + "you are supposed to delete directory and data of the removed-datanode manually"; + public static final String THE_CONFIGNODE_TO_BE_REMOVED_IS_NOT_IN_THE_CLUSTER_OR_THE_INPUT_FORMAT_IS_INCORRECT = + "The ConfigNode to be removed is not in the cluster, or the input format is incorrect."; + public static final String FAILED_TO_DROP_DATABASE_ARG_BECAUSE_IT_DOESN_T_EXIST = + "Failed to DROP DATABASE {}, because it doesn't exist"; + public static final String FAILED_TO_ALLOCATE_ARG_BYTES_FROM_SHARED_MEMORYBLOCK_ARG_FOR_PREPAREDSTATEMENT_ARG = + "Failed to allocate {} bytes from shared MemoryBlock '{}' for PreparedStatement '{}'"; + public static final String ALLOCATED_ARG_BYTES_FOR_PREPAREDSTATEMENT_ARG_FROM_SHARED_MEMORYBLOCK_ARG = + "Allocated {} bytes for PreparedStatement '{}' from shared MemoryBlock '{}'. "; + public static final String RELEASED_ARG_BYTES_FROM_SHARED_MEMORYBLOCK_ARG_FOR_PREPAREDSTATEMENT = + "Released {} bytes from shared MemoryBlock '{}' for PreparedStatement. "; + public static final String ATTEMPTED_TO_RELEASE_MEMORY_FROM_SHARED_MEMORYBLOCK_ARG_BUT_IT_IS_RELEASED = + "Attempted to release memory from shared MemoryBlock '{}' but it is released"; + public static final String RELEASED_ARG_PREPAREDSTATEMENT_S_ARG_BYTES_TOTAL_FOR_SESSION_ARG = + "Released {} PreparedStatement(s) ({} bytes total) for session {}"; + public static final String THE_PREFIX_OF_SOURCEKEY_IS_NOT_SOURCE_PLEASE_CHECK_THE_PARAMETERS_PASSED_IN_ARG = + "The prefix of sourceKey is not 'source.'. Please check the parameters passed in: {}"; + public static final String LOADTSFILESCHEDULER_REGION_MIGRATION_WAS_DETECTED_DURING_LOADING_TSFILE_ARG_WILL_CONVERT = + "LoadTsFileScheduler: Region migration was detected during loading TsFile {}, will convert to insertion to avoid data loss"; + public static final String LOAD_TSFILE_ARG_SUCCESSFULLY_LOAD_PROCESS_ARG_ARG = + "Load TsFile {} Successfully, load process [{}/{}]"; + public static final String CAN_NOT_LOAD_TSFILE_ARG_LOAD_PROCESS_ARG_ARG = + "Can not Load TsFile {}, load process [{}/{}]"; + public static final String LOAD_TSFILE_S_FAILED_WILL_TRY_TO_CONVERT_TO_TABLETS_AND_INSERT_FAILED_TSFILES_ARG = + "Load TsFile(s) failed, will try to convert to tablets and insert. Failed TsFiles: {}"; + public static final String DISPATCH_TSFILEDATA_ERROR_WHEN_PARSING_TSFILE_S = + "Dispatch TsFileData error when parsing TsFile %s."; + public static final String PARSE_OR_SEND_TSFILE_S_ERROR = + "Parse or send TsFile %s error."; + public static final String DISPATCH_ONE_PIECE_TO_REPLICASET_ARG_ERROR_RESULT_STATUS_CODE_ARG = + "Dispatch one piece to ReplicaSet {} error. Result status code {}. "; + public static final String RESULT_STATUS_MESSAGE_ARG_DISPATCH_PIECE_NODE_ERROR_PERCENT_NARG = + "Result status message {}. Dispatch piece node error:%n{}"; + public static final String SUB_STATUS_CODE_ARG_SUB_STATUS_MESSAGE_ARG = + "Sub status code {}. Sub status message {}."; + public static final String WAIT_FOR_LOADING_S_TIME_OUT = + "Wait for loading %s time out."; + public static final String DISPATCH_LOAD_COMMAND_ARG_OF_TSFILE_ARG_ERROR_TO_REPLICASETS_ARG_ERROR = + "Dispatch load command {} of TsFile {} error to replicaSets {} error. "; + public static final String RESULT_STATUS_CODE_ARG_RESULT_STATUS_MESSAGE_ARG = + "Result status code {}. Result status message {}."; + public static final String DISPATCH_TSFILE_S_ERROR_TO_LOCAL_ERROR_RESULT_STATUS_CODE_S = + "Dispatch tsFile %s error to local error. Result status code %s. "; + public static final String RESULT_STATUS_MESSAGE_S = + "Result status message %s."; + public static final String LOAD_SUCCESSFULLY_CONVERTED_TSFILE_ARG_INTO_TABLETS_AND_INSERTED = + "Load: Successfully converted TsFile {} into tablets and inserted."; + public static final String LOAD_FAILED_TO_CONVERT_TO_TABLETS_FROM_TSFILE_ARG_STATUS_ARG = + "Load: Failed to convert to tablets from TsFile {}. Status: {}"; + public static final String LOAD_FAILED_TO_CONVERT_TO_TABLETS_FROM_TSFILE_ARG_EXCEPTION_ARG = + "Load: Failed to convert to tablets from TsFile {}. Exception: {}"; + public static final String DISPATCH_PIECE_NODE_ARG_OF_TSFILE_ARG_ERROR = + "Dispatch piece node {} of TsFile {} error."; + public static final String CANNOT_DISPATCH_LOADCOMMAND_FOR_LOAD_OPERATION_ARG = + "Cannot dispatch LoadCommand for load operation {}"; + public static final String LOAD_REMOTE_PROCEDURE_CALL_CONNECTION_TIMEOUT_IS_ADJUSTED_TO_ARG_MS_ARG_MINS = + "Load remote procedure call connection timeout is adjusted to {} ms ({} mins)"; + public static final String DATA_TYPE_OF_ARG_ARG_IS_NOT_CONSISTENT = + "data type of {}.{} is not consistent, "; + public static final String REGISTERED_TYPE_ARG_INSERTING_TIMESTAMP_ARG_VALUE_ARG = + "registered type {}, inserting timestamp {}, value {}"; + public static final String TIMES_ARRAY_IS_NULL_OR_TOO_SMALL_TIMES_LENGTH_ARG_ROWSIZE_ARG_DEVICEID_ARG = + "Times array is null or too small. times.length={}, rowSize={}, deviceId={}"; + public static final String SERIALIZE_DATA_OF_TSFILE_S_ERROR_SKIP_TSFILEDATA_S = + "Serialize data of TsFile %s error, skip TsFileData %s"; + public static final String FAIL_TO_MATERIALIZE_CTE_BECAUSE_THE_DATA_SIZE_EXCEEDED_MEMORY_OR_THE_ROW_COUNT_THRESHOLD = + "Fail to materialize CTE because the data size exceeded memory or the row count threshold"; + public static final String UNEXPECTED_FAILURE_WHEN_HANDLING_PARSING_ERROR_THIS_IS_LIKELY_A_BUG_IN_THE = + "Unexpected failure when handling parsing error. This is likely a bug in the implementation"; + public static final String AND_EXPRESSION_ENCOUNTERED_DURING_TAG_DETERMINED_CHECKING_WILL_BE_CLASSIFIED_INTO_FUZZY = + "And expression encountered during tag-determined checking, will be classified into fuzzy expression. Sql: {}"; + public static final String LOGICAL_EXPRESSION_TYPE_ENCOUNTERED_IN_NOT_EXPRESSION_CHILD_DURING_TAG_DETERMINED = + "Logical expression type encountered in not expression child during tag-determined checking, will be classified into fuzzy expression. Sql: {}"; + public static final String VALIDATING_DEVICE_SCHEMA_ARG_ARG_AND_OTHER_ARG_DEVICES = + "Validating device schema {}.{} and other {} devices"; + public static final String ILLEGAL_TABLEID_ARG_FOUND_IN_CACHE_WHEN_INVALIDATING_BY_PATH_ARG_INVALIDATE_IT_ANYWAY = + "Illegal tableID {} found in cache when invalidating by path {}, invalidate it anyway"; + public static final String ILLEGAL_DEVICEID_ARG_FOUND_IN_CACHE_WHEN_INVALIDATING_BY_PATH_ARG_INVALIDATE_IT_ANYWAY = + "Illegal deviceID {} found in cache when invalidating by path {}, invalidate it anyway"; + public static final String RULE_S_BEFORE_S_AFTER_S = + "Rule: %s\nBefore:\n%s\nAfter:\n%s"; + private DataNodeQueryMessages() {} + // --------------------------------------------------------------------------- + // Additional exception messages + // --------------------------------------------------------------------------- + public static final String QUERY_EXCEPTION_FAILED_TO_SERIALIZE_INTERMEDIATE_RESULT_FOR_MAXBYACCUMULATOR_2F18B6E7 = + "Failed to serialize intermediate result for MaxByAccumulator."; + public static final String QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_IN_AGGREGATION_AVG_S_D1DAD6A6 = + "Unsupported data type in aggregation AVG : %s"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_IN_MINVALUE_S_BC092694 = + "Unsupported data type in MinValue: %s"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_IN_LASTVALUE_S_02ECF8E4 = + "Unsupported data type in LastValue: %s"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_IN_EXTREME_S_84B651D3 = + "Unsupported data type in Extreme: %s"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_IN_FIRSTVALUE_S_97025F25 = + "Unsupported data type in FirstValue: %s"; + public static final String QUERY_EXCEPTION_ERROR_OCCURRED_DURING_EXECUTING_UDAF_S_S_PLEASE_CHECK_WHETHER_9E9D20C6 = + "Error occurred during executing UDAF#%s: %s, please check whether the implementation of UDF " + + "is correct according to the udf-api description."; + public static final String QUERY_EXCEPTION_UNSUPPORTED_EXPRESSION_TYPE_S_FD6F5B7C = + "unsupported expression type: %s"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_IN_MAXVALUE_S_521AC345 = + "Unsupported data type in MaxValue: %s"; + public static final String QUERY_EXCEPTION_THERE_IS_NOT_ENOUGH_CPU_TO_EXECUTE_CURRENT_FRAGMENT_INSTANCE_E7719FB8 = + "There is not enough cpu to execute current fragment instance"; + public static final String QUERY_EXCEPTION_THERE_IS_NO_ENOUGH_MEMORY_TO_EXECUTE_CURRENT_FRAGMENT_INSTANCE_CB632843 = + "There is no enough memory to execute current fragment instance"; + public static final String QUERY_EXCEPTION_PLANNODE_RELATED_MEMORY_IS_NOT_ZERO_WHEN_TRYING_TO_DEREGISTER_E01109C5 = + "PlanNode related memory is not zero when trying to deregister FI from query memory pool. " + + "QueryId is : %s, FragmentInstanceId is : %s, Non-zero PlanNode related memory is : %s."; + public static final String QUERY_EXCEPTION_QUERY_IS_ABORTED_SINCE_IT_REQUESTS_MORE_MEMORY_THAN_CAN_D77C2921 = + "Query is aborted since it requests more memory than can be allocated, bytesToReserve: %sB, " + + "maxBytesCanReserve: %sB"; + public static final String QUERY_EXCEPTION_RELATEDMEMORYRESERVED_CAN_T_BE_NULL_WHEN_FREEING_MEMORY_C80009F2 = + "RelatedMemoryReserved can't be null when freeing memory"; + public static final String QUERY_EXCEPTION_INTERRUPTED_BY_92FAED2D = "Interrupted By"; + public static final String QUERY_EXCEPTION_DRIVER_WAS_INTERRUPTED_737358E4 = + "Driver was interrupted"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_QUERY_DATA_SOURCE_TYPE_S_7424E63F = + "Unsupported query data source type: %s"; + public static final String QUERY_EXCEPTION_REPEATED_RPC_CALL_DETECTED_FOR_FRAGMENTINSTANCE_S_REJECT_BF609A26 = + "Repeated RPC call detected for FragmentInstance %s, reject the duplicated dispatch."; + public static final String QUERY_EXCEPTION_QUERY_HAS_EXECUTED_MORE_THAN_SMS_AND_NOW_IS_IN_FLUSHING_4BF7535B = + "Query has executed more than %sms, and now is in flushing state"; + public static final String QUERY_EXCEPTION_THE_QUERYCONTEXT_DOES_NOT_SUPPORT_ROW_LEVEL_FILTERING_D4CD0678 = + "the QueryContext does not support row level filtering"; + public static final String QUERY_EXCEPTION_S_IS_NOT_VIEW_B5840A3C = "%s is not view."; + public static final String QUERY_EXCEPTION_THE_TIMESERIES_S_USED_NEW_TYPE_S_IS_NOT_COMPATIBLE_WITH_455D4D4A = + "The timeseries %s used new type %s is not compatible with the existing one %s."; + public static final String QUERY_EXCEPTION_ALL_CACHED_PAGES_SHOULD_BE_CONSUMED_FIRST_UNSEQPAGEREADERS_55898EFB = + "all cached pages should be consumed first unSeqPageReaders.isEmpty() is %s firstPageReader " + + "!= null is %s mergeReader.hasNextTimeValuePair() = %s"; + public static final String QUERY_EXCEPTION_NOT_SUPPORT_THIS_TYPE_OF_AGGREGATION_WINDOW_S_604F93D0 = + "Not support this type of aggregation window :%s"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_IN_EQUAL_EVENT_AGGREGATION_S_5076ACFE = + "Unsupported data type in equal event aggregation : %s"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_IN_VARIATION_EVENT_AGGREGATION_S_47341532 = + "Unsupported data type in variation event aggregation : %s"; + public static final String QUERY_EXCEPTION_THE_OPERATOR_CANNOT_CONTINUE_UNTIL_THE_LAST_WRITE_OPERATION_1F241343 = + "The operator cannot continue until the last write operation is done."; + public static final String QUERY_EXCEPTION_DATA_TYPE_S_IS_NOT_SUPPORTED_5D5C02E4 = + "Data type %s is not supported."; + public static final String QUERY_EXCEPTION_DATA_TYPE_S_IS_NOT_SUPPORTED_WHEN_CONVERT_DATA_AT_CLIENT_405429CC = + "data type %s is not supported when convert data at client"; + public static final String QUERY_EXCEPTION_CHILD_SIZE_OF_INNERTIMEJOINOPERATOR_SHOULD_BE_LARGER_THAN_4E7CF105 = + "Child size of InnerTimeJoinOperator should be larger than 1."; + public static final String QUERY_EXCEPTION_THE_OPERATOR_CANNOT_CONTINUE_UNTIL_THE_FORECAST_EXECUTION_AF8A3145 = + "The operator cannot continue until the forecast execution is done."; + public static final String QUERY_EXCEPTION_RESULT_TYPE_MISMATCH_FOR_ATTRIBUTE_S_EXPECTED_S_ACTUAL_S_E5637B91 = + "Result type mismatch for attribute '%s', expected %s, actual %s"; + public static final String QUERY_EXCEPTION_DEVICE_ENTRIES_OF_INDEX_S_IS_EMPTY_BCFB0644 = + "Device entries of index %s is empty"; + public static final String QUERY_EXCEPTION_SHOULD_NOT_CALL_GETRESULTDATATYPES_METHOD_IN_DEVICEITERATORSCANOPERATOR_E915A153 = + "Should not call getResultDataTypes() method in DeviceIteratorScanOperator"; + public static final String QUERY_EXCEPTION_UNEXPECTED_COLUMN_CATEGORY_S_6E60A44E = + "Unexpected column category: %s"; + public static final String QUERY_EXCEPTION_DEVICE_ENTRIES_OF_INDEX_S_IN_TABLESCANOPERATOR_IS_EMPTY_FDEB574F = + "Device entries of index %s in TableScanOperator is empty"; + public static final String QUERY_EXCEPTION_MULTILEVELPRIORITYQUEUE_DOES_NOT_SUPPORT_ACCESS_ELEMENT_02FE5AC9 = + "MultilevelPriorityQueue does not support access element by get."; + public static final String QUERY_EXCEPTION_ASCENDING_IS_NOT_SUPPORTED_WHEN_SLIDING_STEP_CONTAINS_MONTH_3446C0DC = + "Ascending is not supported when sliding step contains month."; + public static final String QUERY_EXCEPTION_THIS_OPERATION_IS_NOT_SUPPORTED_IN_SCHEMAMEASUREMENTNODE_93A81AE3 = + "This operation is not supported in SchemaMeasurementNode."; + public static final String QUERY_EXCEPTION_REMOVE_CHILD_OPERATION_IS_NOT_SUPPORTED_IN_SCHEMAMEASUREMENTNODE_940D080F = + "Remove child operation is not supported in SchemaMeasurementNode."; + public static final String QUERY_EXCEPTION_DO_NOT_SUPPORT_CREATE_COLUMNBUILDER_WITH_DATA_TYPE_S_1672578A = + "Do not support create ColumnBuilder with data type %s"; + public static final String QUERY_EXCEPTION_INVALID_CONSTANT_OPERAND_S_939F3B8D = + "Invalid constant operand: %s"; + public static final String QUERY_EXCEPTION_THE_DATA_TYPE_OF_THE_STATE_WINDOW_STRATEGY_IS_NOT_VALID_DFFBF210 = + "The data type of the state window strategy is not valid."; + public static final String QUERY_EXCEPTION_STATEWINDOWACCESSSTRATEGY_DOES_NOT_SUPPORT_PURE_CONSTANT_B09D811B = + "StateWindowAccessStrategy does not support pure constant input."; + public static final String QUERY_EXCEPTION_UNEXPECTED_ACCESS_STRATEGY_S_92EA9D64 = + "Unexpected access strategy: %s"; + public static final String QUERY_EXCEPTION_STATEWINDOWACCESSSTRATEGY_ONLY_SUPPORT_ONE_INPUT_SERIES_6856E52C = + "StateWindowAccessStrategy only support one input series for now."; + public static final String QUERY_EXCEPTION_UNSUPPORTED_SOURCE_DATATYPE_S_EA03E121 = + "Unsupported source dataType: %s"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_TARGET_DATATYPE_S_8DEFDAE6 = + "Unsupported target dataType: %s"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_STATEMENT_TYPE_S_FBCA7305 = + "Unsupported statement type: %s"; + public static final String QUERY_EXCEPTION_IDENTITYSINKNODE_SHOULD_ONLY_HAVE_ONE_CHILD_IN_TABLE_MODEL_5E995EB3 = + "IdentitySinkNode should only have one child in table model."; + public static final String QUERY_EXCEPTION_TREE_DB_NAME_SHOULD_AT_LEAST_BE_TWO_LEVEL_S_772B6832 = + "tree db name should at least be two level: %s"; + public static final String QUERY_EXCEPTION_PUSHDOWNOFFSET_SHOULD_NOT_BE_SET_WHEN_ISPUSHLIMITTOEACHDEVICE_9B6D5144 = + "PushDownOffset should not be set when isPushLimitToEachDevice is true."; + public static final String QUERY_EXCEPTION_DEVICE_ENTRIES_OF_INDEX_S_IN_S_IS_EMPTY_68D1DB60 = + "Device entries of index %s in %s is empty"; + public static final String QUERY_EXCEPTION_THE_AGGREGATIONTREEDEVICEVIEWSCANNODE_SHOULD_HAS_BEEN_TRANSFERRED_76A35037 = + "The AggregationTreeDeviceViewScanNode should has been transferred to its child class node"; + public static final String QUERY_EXCEPTION_GROUPING_KEY_MUST_BE_ID_OR_ATTRIBUTE_IN_AGGREGATIONTABLESCAN_7B592AE6 = + "grouping key must be ID or Attribute in AggregationTableScan"; + public static final String QUERY_EXCEPTION_CANNOT_FIND_COLUMN_S_IN_CHILD_S_OUTPUT_10FBE4C8 = + "Cannot find column [%s] in child's output"; + public static final String QUERY_EXCEPTION_DESCRIPTOR_S_INPUT_EXPRESSION_MUST_BE_TIMESERIESOPERAND_F4F66475 = + "descriptor's input expression must be TimeSeriesOperand/TimestampOperand, current is %s"; + public static final String QUERY_EXCEPTION_AGGREGATIONMERGESORTNODE_WITHOUT_ORDER_BY_DEVICE_SHOULD_7AED85D1 = + "AggregationMergeSortNode without order by device should not appear here"; + public static final String QUERY_EXCEPTION_UNEXPECTED_PLANNODE_IN_GETOUTPUTCOLUMNTYPESOFTIMEJOINNODE_00FAAEED = + "Unexpected PlanNode in getOutputColumnTypesOfTimeJoinNode, type: %s"; + public static final String QUERY_EXCEPTION_THE_SIZE_OF_MEASUREMENTLIST_AND_TIMESERIESSCHEMAINFOLIST_A6649661 = + "The size of measurementList and timeseriesSchemaInfoList should be equal in aligned path."; + public static final String QUERY_EXCEPTION_THE_PLANNODE_IS_NULL_DURING_LOCAL_EXECUTION_MAYBE_CAUSED_C5B942CA = + "The planNode is null during local execution, maybe caused by closing of the current dataNode"; + public static final String QUERY_EXCEPTION_THERE_IS_NOT_ENOUGH_MEMORY_TO_EXECUTE_CURRENT_FRAGMENT_INSTANCE_6071A581 = + "There is not enough memory to execute current fragment instance, current remaining free " + + "memory is %dB, estimated memory usage for current fragment instance is %dB"; + public static final String QUERY_EXCEPTION_BYTES_TO_RESERVE_FROM_FREE_MEMORY_FOR_OPERATORS_SHOULD_BE_4DC404D5 = + "Bytes to reserve from free memory for operators should be larger than 0"; + public static final String QUERY_EXCEPTION_THERE_IS_NOT_ENOUGH_MEMORY_FOR_QUERY_S_THE_CONTEXTHOLDER_546CDD02 = + "There is not enough memory for Query %s, the contextHolder is %s,current remaining free " + + "memory is %dB, already reserved memory for this context in total is %dB, the memory " + + "requested this time is %dB"; + public static final String QUERY_EXCEPTION_BYTES_TO_RELEASE_TO_FREE_MEMORY_FOR_OPERATORS_SHOULD_BE_3E5B0CB1 = + "Bytes to release to free memory for operators should be larger than 0"; + public static final String QUERY_EXCEPTION_INVALID_AGGREGATION_EXPRESSION_S_B28EB91B = + "Invalid Aggregation Expression: %s"; + public static final String QUERY_EXCEPTION_ILLEGAL_DEVICE_PATH_S_IN_AGGREGATIONPUSHDOWN_RULE_60D5F633 = + "Illegal device path: %s in AggregationPushDown rule."; + public static final String QUERY_EXCEPTION_AGGREGATION_DESCRIPTORS_WITH_NON_ALIGNED_TEMPLATE_ARE_NOT_6D3C7C0F = + "Aggregation descriptors with non aligned template are not supported"; + public static final String QUERY_EXCEPTION_FRAGMENTINSTANCE_S_IS_FAILED_S_MAY_BE_CAUSED_BY_DN_RESTARTING_45D7D52A = + "FragmentInstance[%s] is failed. %s, may be caused by DN restarting."; + public static final String QUERY_EXCEPTION_FRAGMENTINSTANCE_S_IS_FAILED_S_566B0005 = + "FragmentInstance[%s] is failed. %s"; + public static final String QUERY_EXCEPTION_LINE_S_S_S_7CA5F0E1 = "line %s:%s %s"; + public static final String QUERY_EXCEPTION_MISSING_OR_INVALID_COLUMN_CATEGORIES_FOR_TABLE_INSERTION_5DF990B9 = + "Missing or invalid column categories for table insertion"; + public static final String QUERY_EXCEPTION_THE_NAME_OF_A_MEASUREMENT_IN_SCHEMA_TEMPLATE_SHALL_NOT_BE_937264BD = + "The name of a measurement in schema template shall not be null."; + public static final String QUERY_EXCEPTION_UNSUPPORTED_COLUMNCATEGORY_S_1260CFFD = + "Unsupported ColumnCategory: %s"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_RAWEXPRESSION_TYPE_S_CDBBD685 = + "unsupported rawExpression type: %s"; + public static final String QUERY_EXCEPTION_AN_ERROR_OCCURRED_WHEN_EXECUTING_GETSCHEMAPARTITION_S_A0156043 = + "An error occurred when executing getSchemaPartition():%s"; + public static final String QUERY_EXCEPTION_AN_ERROR_OCCURRED_WHEN_EXECUTING_GETORCREATESCHEMAPARTITION_4D22BE9B = + "An error occurred when executing getOrCreateSchemaPartition():%s"; + public static final String QUERY_EXCEPTION_AN_ERROR_OCCURRED_WHEN_EXECUTING_GETSCHEMANODEMANAGEMENTPARTITION_84AC8509 = + "An error occurred when executing getSchemaNodeManagementPartition():%s"; + public static final String QUERY_EXCEPTION_AN_ERROR_OCCURRED_WHEN_EXECUTING_GETDATAPARTITION_S_D21A0011 = + "An error occurred when executing getDataPartition():%s"; + public static final String QUERY_EXCEPTION_AN_ERROR_OCCURRED_WHEN_EXECUTING_GETORCREATEDATAPARTITION_2EB2EBBE = + "An error occurred when executing getOrCreateDataPartition():%s"; + public static final String QUERY_EXCEPTION_THE_TYPE_OF_INPUT_EXPRESSION_S_IS_UNKNOWN_841AC714 = + "The type of input expression %s is unknown"; + public static final String QUERY_EXCEPTION_MEET_ERROR_WHEN_ANALYZING_THE_QUERY_STATEMENT_S_AD732908 = + "Meet error when analyzing the query statement: %s"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_EXPRESSION_TYPE_FOR_SOURCE_EXPRESSION_S_FB5583E7 = + "unsupported expression type for source expression: %s"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_EXPRESSION_TYPE_S_737846D6 = + "Unsupported Expression Type: %s"; + public static final String QUERY_EXCEPTION_UNKNOWN_EXPRESSION_TYPE_S_PERHAPS_IT_HAS_NON_EXISTENT_MEASUREMENT_B6705F86 = + "Unknown expression type: %s, perhaps it has non existent measurement."; + public static final String QUERY_EXCEPTION_UNSUPPORTED_EXPRESSION_TYPE_IN_TRANSFORMTOVIEWEXPRESSIONVISITOR_0871FB56 = + "Unsupported expression type in TransformToViewExpressionVisitor: %s"; + public static final String QUERY_EXCEPTION_CAN_NOT_CONSTRUCT_EXPRESSION_USING_NON_VIEW_PATH_IN_TRANSFORMVIEWPATH_A9CCB5B1 = + "Can not construct expression using non view path in transformViewPath!"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_EXPRESSION_TYPE_S_7C6F99A9 = + "Unsupported expression type %s"; + public static final String QUERY_EXCEPTION_S_CANNOT_BE_CAST_TO_S_DABC2DA0 = + "\"%s\" cannot be cast to [%s]"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_S_4CB21D47 = + "Unsupported data type %s"; + public static final String QUERY_EXCEPTION_MEASUREMENT_S_DOES_NOT_EXIST_23D2B5BE = + "Measurement %s does not exist"; + public static final String QUERY_EXCEPTION_INVALID_SCALAR_FUNCTION_S_4DC1ED95 = + "Invalid scalar function [%s]."; + public static final String QUERY_EXCEPTION_FETCH_SCHEMA_FAILED_BECAUSE_S_BE584DCE = + "Fetch Schema failed, because %s"; + public static final String QUERY_EXCEPTION_FETCH_SCHEMA_FAILED_S_1C7B0050 = + "Fetch Schema failed: %s"; + public static final String QUERY_EXCEPTION_FAILED_TO_VALIDATE_SCHEMA_FOR_TABLE_S_S_D7031B7B = + "Failed to validate schema for table {%s, %s}"; + public static final String QUERY_EXCEPTION_THE_DATABASE_S_DOES_NOT_EXIST_PLEASE_ENABLE_ENABLE_AUTO_B6683D0E = + "The database %s does not exist, please enable 'enable_auto_create_schema' to enable auto " + + "creation."; + public static final String QUERY_EXCEPTION_AUTO_CREATE_DATABASE_FAILED_S_STATUS_CODE_S_D8EB60FA = + "Auto create database failed: %s, status code: %s"; + public static final String QUERY_EXCEPTION_TAG_COLUMN_S_IN_TSFILE_IS_NOT_FOUND_IN_IOTDB_TABLE_S_12E8C1EF = + "Tag column %s in TsFile is not found in IoTDB table %s"; + public static final String QUERY_EXCEPTION_DUPLICATED_MEASUREMENTS_S_IN_DEVICE_S_438713CD = + "Duplicated measurements %s in device %s."; + public static final String QUERY_EXCEPTION_DATABASE_LEVEL_D_IS_LONGER_THAN_DEVICE_S_9B34DD2F = + "Database level %d is longer than device %s."; + public static final String QUERY_EXCEPTION_CREATE_DATABASE_ERROR_STATEMENT_S_RESULT_STATUS_IS_S_5C4AFD58 = + "Create database error, statement: %s, result status is: %s"; + public static final String QUERY_EXCEPTION_DEVICE_S_DOES_NOT_EXIST_IN_IOTDB_AND_CAN_NOT_BE_CREATED_5171DE45 = + "Device %s does not exist in IoTDB and can not be created. Please check weather " + + "auto-create-schema is enabled."; + public static final String QUERY_EXCEPTION_DEVICE_S_IN_TSFILE_IS_S_BUT_IN_IOTDB_IS_S_350D5903 = + "Device %s in TsFile is %s, but in IoTDB is %s."; + public static final String QUERY_EXCEPTION_MEASUREMENT_S_DOES_NOT_EXIST_IN_IOTDB_AND_CAN_NOT_BE_CREATED_B1F446A5 = + "Measurement %s does not exist in IoTDB and can not be created. Please check weather " + + "auto-create-schema is enabled."; + public static final String QUERY_EXCEPTION_AN_ERROR_OCCURRED_WHEN_EXECUTING_GETDEVICETODATABASE_S_CCA611CC = + "An error occurred when executing getDeviceToDatabase():%s"; + public static final String QUERY_EXCEPTION_FAILED_TO_GET_REPLICASET_OF_CONSENSUS_GROUPS_IDS_S_CC30C7A6 = + "Failed to get replicaSet of consensus groups[ids= %s]"; + public static final String QUERY_EXCEPTION_AN_ERROR_OCCURRED_WHEN_EXECUTING_GETREGIONREPLICASET_S_370D5526 = + "An error occurred when executing getRegionReplicaSet():%s"; + public static final String QUERY_EXCEPTION_SUBSCRIPTION_IS_NOT_ENABLED_7F43DCBB = + "Subscription is not enabled."; + public static final String QUERY_EXCEPTION_FAILED_TO_CREATE_UDF_S_THE_GIVEN_FUNCTION_NAME_CONFLICTS_6FBB1136 = + "Failed to create UDF [%s], the given function name conflicts with the built-in function " + + "name."; + public static final String QUERY_EXCEPTION_THE_SCHEME_OF_URI_IS_NOT_SET_PLEASE_SPECIFY_THE_SCHEME_OF_225DFB9E = + "The scheme of URI is not set, please specify the scheme of URI."; + public static final String QUERY_EXCEPTION_FAILED_TO_GET_EXECUTABLE_FOR_UDF_S_PLEASE_CHECK_THE_URI_F4D87A1E = + "Failed to get executable for UDF '%s', please check the URI."; + public static final String QUERY_EXCEPTION_FAILED_TO_CREATE_FUNCTION_S_BECAUSE_THERE_IS_DUPLICATE_ARGUMENT_7905BC09 = + "Failed to create function '%s', because there is duplicate argument name '%s'."; + public static final String QUERY_EXCEPTION_FAILED_TO_CREATE_FUNCTION_S_BECAUSE_THERE_IS_AN_ARGUMENT_E7A0B1D6 = + "Failed to create function '%s', because there is an argument with OBJECT type '%s'."; + public static final String QUERY_EXCEPTION_FAILED_TO_LOAD_CLASS_S_BECAUSE_IT_S_NOT_FOUND_IN_JAR_FILE_E467D08D = + "Failed to load class '%s', because it's not found in jar file or is invalid: %s"; + public static final String QUERY_EXCEPTION_BUILT_IN_FUNCTION_S_CAN_NOT_BE_DEREGISTERED_1CC7D3C3 = + "Built-in function %s can not be deregistered."; + public static final String QUERY_EXCEPTION_FAILED_TO_GET_EXECUTABLE_FOR_TRIGGER_S_PLEASE_CHECK_THE_DA49134A = + "Failed to get executable for Trigger '%s', please check the URI."; + public static final String QUERY_EXCEPTION_FAILED_TO_CREATE_PIPE_PLUGIN_BECAUSE_THE_URI_IS_EMPTY_7FCB6EF4 = + "Failed to create pipe plugin, because the URI is empty."; + public static final String QUERY_EXCEPTION_FAILED_TO_GET_EXECUTABLE_FOR_PIPEPLUGIN_S_PLEASE_CHECK_THE_FAC5DCB7 = + "Failed to get executable for PipePlugin %s, please check the URI."; + public static final String QUERY_EXCEPTION_FAILED_TO_CREATE_PIPEPLUGIN_S_BECAUSE_THIS_PLUGIN_IS_NOT_F5A284B4 = + "Failed to create PipePlugin '%s', because this plugin is not designed for %s model."; + public static final String QUERY_EXCEPTION_NOT_ALL_SG_IS_READY_9F51CF3E = "not all sg is ready"; + public static final String QUERY_EXCEPTION_CANNOT_START_REPAIR_TASK_BECAUSE_COMPACTION_IS_NOT_ENABLED_975C8DCD = + "cannot start repair task because compaction is not enabled"; + public static final String QUERY_EXCEPTION_PLEASE_ENSURE_YOUR_INPUT_QUERYID_IS_CORRECT_D86C841E = + "Please ensure your input is correct"; + public static final String QUERY_EXCEPTION_DUPLICATED_MEASUREMENT_S_IN_DEVICE_TEMPLATE_ALTER_REQUEST_963FE4A6 = + "Duplicated measurement [%s] in device template alter request"; + public static final String QUERY_EXCEPTION_FAILED_TO_CREATE_PIPE_S_BECAUSE_TSFILE_IS_CONFIGURED_WITH_2F8CD704 = + "Failed to create Pipe %s because TSFile is configured with encryption, which prohibits the " + + "use of Pipe"; + public static final String QUERY_EXCEPTION_FAILED_TO_CREATE_PIPE_S_PIPE_NAME_STARTING_WITH_S_ARE_NOT_201FE8C3 = + "Failed to create pipe %s, pipe name starting with \"%s\" are not allowed to be created."; + public static final String QUERY_EXCEPTION_FAILED_TO_ALTER_PIPE_S_PIPE_NAME_STARTING_WITH_S_ARE_NOT_03D99ECF = + "Failed to alter pipe %s, pipe name starting with \"%s\" are not allowed to be altered."; + public static final String QUERY_EXCEPTION_FAILED_TO_GET_PIPE_INFO_FROM_CONFIG_NODE_STATUS_IS_S_FE797D7B = + "Failed to get pipe info from config node, status is %s."; + public static final String QUERY_EXCEPTION_FAILED_TO_ALTER_PIPE_S_PIPE_NOT_FOUND_IN_SYSTEM_63B5D3CC = + "Failed to alter pipe %s, pipe not found in system."; + public static final String QUERY_EXCEPTION_FAILED_TO_ALTER_PIPE_S_BECAUSE_S_A1823289 = + "Failed to alter pipe %s, because %s"; + public static final String QUERY_EXCEPTION_FAILED_TO_START_PIPE_S_PIPE_NAME_STARTING_WITH_S_ARE_NOT_F16D488F = + "Failed to start pipe %s, pipe name starting with \"%s\" are not allowed to be started."; + public static final String QUERY_EXCEPTION_FAILED_TO_DROP_PIPE_S_PIPE_NAME_STARTING_WITH_S_ARE_NOT_840E238B = + "Failed to drop pipe %s, pipe name starting with \"%s\" are not allowed to be dropped."; + public static final String QUERY_EXCEPTION_FAILED_TO_STOP_PIPE_S_PIPE_NAME_STARTING_WITH_S_ARE_NOT_C78DFC3D = + "Failed to stop pipe %s, pipe name starting with \"%s\" are not allowed to be stopped."; + public static final String QUERY_EXCEPTION_UNKNOWN_DATABASE_S_5AB61128 = "Unknown database %s"; + public static final String QUERY_EXCEPTION_DATABASE_S_DOESN_T_EXIST_5A8EE8CA = + "Database %s doesn't exist"; + public static final String QUERY_EXCEPTION_DATABASE_S_ALREADY_EXISTS_D8BE5332 = + "Database %s already exists"; + public static final String QUERY_EXCEPTION_DATA_TYPE_CANNOT_BE_NULL_EXECUTING_THE_STATEMENT_THAT_ALTER_4C959B2F = + "Data type cannot be null executing the statement that alter timeseries %s set data type"; + public static final String QUERY_EXCEPTION_NO_CURRENT_SESSION_AVAILABLE_FOR_PREPARE_STATEMENT_36717E9B = + "No current session available for PREPARE statement"; + public static final String QUERY_EXCEPTION_NO_CURRENT_SESSION_AVAILABLE_FOR_DEALLOCATE_STATEMENT_1EA5DE79 = + "No current session available for DEALLOCATE statement"; + public static final String QUERY_EXCEPTION_TSFILE_S_IS_LOADING_BY_ANOTHER_SCHEDULER_55077B82 = + "TsFile %s is loading by another scheduler."; + public static final String QUERY_EXCEPTION_SERIALIZE_PROGRESS_INDEX_ERROR_ISFIRSTPHASESUCCESS_S_UUID_690F0419 = + "Serialize Progress Index error, isFirstPhaseSuccess: %s, uuid: %s, tsFile: %s"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_TSFILEDATATYPE_S_374475FA = + "Unsupported TsFileDataType %s."; + public static final String QUERY_EXCEPTION_UNKNOWN_SORT_KEY_S_37965711 = "Unknown sort key %s"; + public static final String QUERY_EXCEPTION_CAN_NOT_FIND_S_ON_THIS_MACHINE_NOTICE_THAT_LOAD_CAN_ONLY_B7886C0E = + "Can not find %s on this machine, notice that load can only handle files on this machine."; + public static final String QUERY_EXCEPTION_LOAD_TSFILE_SOURCE_PATH_S_IS_OUTSIDE_ALLOWED_DIRECTORIES_85A6019F = + "Load TsFile source path %s is outside allowed directories %s."; + public static final String QUERY_EXCEPTION_FAILED_TO_RESOLVE_CANONICAL_PATH_FOR_LOAD_TSFILE_SOURCE_09CC9AC6 = + "Failed to resolve canonical path for Load TsFile source %s: %s"; + public static final String QUERY_EXCEPTION_DATA_TYPE_IS_NOT_CONSISTENT_INPUT_S_REGISTERED_S_AE9DBDC0 = + "data type is not consistent, input %s, registered %s"; + public static final String QUERY_EXCEPTION_REGIONREPLICASET_IS_INVALID_S_1C2671AD = + "regionReplicaSet is invalid: %s"; + public static final String QUERY_EXCEPTION_PLANNODE_SHOULD_BE_IWRITEPLANNODE_IN_WRITE_OPERATION_S_36501D8A = + "PlanNode should be IWritePlanNode in WRITE operation:%s"; + public static final String QUERY_EXCEPTION_SIZE_OF_DEVICES_AND_ITS_CHILDREN_IN_DEVICEVIEWNODE_SHOULD_10709A84 = + "size of devices and its children in DeviceViewNode should be same"; + public static final String QUERY_EXCEPTION_IN_NON_CROSS_DATA_REGION_DEVICE_VIEW_SITUATION_EACH_DEVICE_3A76445B = + "In non-cross data region device-view situation, each device should only have on data " + + "partition."; + public static final String QUERY_EXCEPTION_IN_NON_CROSS_DATA_REGION_AGGREGATION_DEVICE_VIEW_SITUATION_557AE5D2 = + "In non-cross data region aggregation device-view situation, each rewrite child node of " + + "DeviceView should only be one."; + public static final String QUERY_EXCEPTION_ALL_CHILD_NODES_OF_INNERTIMEJOINNODE_SHOULD_BE_SERIESSOURCENODE_B92B181D = + "All child nodes of InnerTimeJoinNode should be SeriesSourceNode"; + public static final String QUERY_EXCEPTION_YOU_SHOULD_NEVER_SEE_CONTINUOUSSAMESEARCHINDEXSEPARATORNODE_F380A4B6 = + "You should never see ContinuousSameSearchIndexSeparatorNode in this function, because " + + "ContinuousSameSearchIndexSeparatorNode should never be used in network transmission."; + public static final String QUERY_EXCEPTION_AGGREGATIONTREEDEVICEVIEWSCANNODE_SHOULD_NOT_BE_DESERIALIZED_11788F1B = + "AggregationTreeDeviceViewScanNode should not be deserialized"; + public static final String QUERY_EXCEPTION_CONTINUOUSSAMESEARCHINDEXSEPARATORNODE_NOT_SUPPORT_MERGE_FD194976 = + "ContinuousSameSearchIndexSeparatorNode not support merge"; + public static final String QUERY_EXCEPTION_DELETEDATANODES_WHICH_START_TIME_OR_END_TIME_ARE_NOT_SAME_F396951C = + "DeleteDataNodes which start time or end time are not same cannot be merged"; + public static final String QUERY_EXCEPTION_NO_CHILD_IS_ALLOWED_FOR_ALIGNEDSERIESAGGREGATIONSCANNODE_41654FE2 = + "no child is allowed for AlignedSeriesAggregationScanNode"; + public static final String QUERY_EXCEPTION_DEVICES_IN_TSFILE_S_IS_EMPTY_THIS_SHOULD_NOT_HAPPEN_HERE_BC1BE63C = + "Devices in TsFile %s is empty, this should not happen here."; + public static final String QUERY_EXCEPTION_DEVICEMERGENODE_SHOULD_HAVE_ONLY_ONE_LOCAL_CHILD_IN_SINGLE_D1A2E6CF = + "DeviceMergeNode should have only one local child in single data region."; + public static final String QUERY_EXCEPTION_GETOUTPUTCOLUMNNAMES_OF_CREATEMULTITIMESERIESNODE_IS_NOT_9D02257A = + "getOutputColumnNames of CreateMultiTimeSeriesNode is not implemented"; + public static final String QUERY_EXCEPTION_GETOUTPUTCOLUMNNAMES_OF_ALTERLOGICALVIEWNODE_IS_NOT_IMPLEMENTED_D2294789 = + "getOutputColumnNames of AlterLogicalViewNode is not implemented"; + public static final String QUERY_EXCEPTION_THE_DATABASE_S_IS_READ_ONLY_CB6732CE = + "The database '%s' is read-only."; + public static final String QUERY_EXCEPTION_THE_DATABASE_S_CAN_ONLY_BE_QUERIED_BY_AUDIT_ADMIN_4A510F66 = + "The database '%s' can only be queried by AUDIT admin."; + public static final String QUERY_EXCEPTION_UNEXPECTED_WINDOW_FRAME_TYPE_S_F06F81B8 = + "unexpected window frame type: %s"; + public static final String QUERY_EXCEPTION_SIZE_OF_COLUMN_NAMES_AND_COLUMN_DATA_TYPES_DO_NOT_MATCH_9333D273 = + "Size of column names and column data types do not match"; + public static final String QUERY_EXCEPTION_FAILED_TO_FETCH_FRAGMENT_INSTANCE_STATISTICS_45176795 = + "Failed to fetch fragment instance statistics"; + public static final String QUERY_EXCEPTION_UNABLE_TO_REMOVE_FIRST_NODE_WHEN_A_NODE_HAS_MULTIPLE_CHILDREN_FB6E81C5 = + "Unable to remove first node when a node has multiple children, use removeAll instead"; + public static final String QUERY_EXCEPTION_UNABLE_TO_REPLACE_FIRST_NODE_WHEN_A_NODE_HAS_MULTIPLE_CHILDREN_2C3D0E9E = + "Unable to replace first node when a node has multiple children, use replaceAll instead"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_EXPRESSION_IN_EXTRACTGLOBALTIMEPREDICATE_S_083B1BFA = + "Unsupported expression in extractGlobalTimePredicate: %s"; + public static final String QUERY_EXCEPTION_NOT_A_VALID_IR_EXPRESSION_S_03C41ADD = + "Not a valid IR expression: %s"; + public static final String QUERY_EXCEPTION_UNKNOWN_ALIGNEDDEVICEENTRY_TYPE_S_370A0039 = + "Unknown AlignedDeviceEntry Type: %s"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_SELECTITEM_TYPE_S_4B0B155A = + "Unsupported SelectItem type: %s"; + public static final String QUERY_EXCEPTION_THIS_VISITOR_ONLY_SUPPORTED_PROCESS_OF_EXPRESSION_7CEB79CB = + "This Visitor only supported process of Expression"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_GROUPING_ELEMENT_TYPE_S_B3C526E6 = + "Unsupported grouping element type: %s"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_JOIN_CRITERIA_S_311289C1 = + "Unsupported join criteria: %s"; + public static final String QUERY_EXCEPTION_DUPLICATE_ARGUMENT_SPECIFICATION_FOR_NAME_S_F804F3DC = + "Duplicate argument specification for name: %s"; + public static final String QUERY_EXCEPTION_FORECASTTABLEFUNCTION_MUST_CONTAIN_FORECASTTABLEFUNCTION_DA5828E9 = + "ForecastTableFunction must contain ForecastTableFunction.TIMECOL_PARAMETER_NAME"; + public static final String QUERY_EXCEPTION_UNEXPECTED_ARGUMENT_SPECIFICATION_S_830154B1 = + "Unexpected argument specification: %s"; + public static final String QUERY_EXCEPTION_UNEXPECTED_PARTITIONBY_EXPRESSION_S_8D74EB2D = + "Unexpected partitionBy expression: %s"; + public static final String QUERY_EXCEPTION_UNEXPECTED_ORDERBY_EXPRESSION_S_9301B69E = + "Unexpected orderBy expression: %s"; + public static final String QUERY_EXCEPTION_AGGREGATION_ANALYSIS_NOT_YET_IMPLEMENTED_FOR_S_38B64170 = + "aggregation analysis not yet implemented for: %s"; + public static final String QUERY_EXCEPTION_UNEXPECTED_VALUE_LIST_TYPE_FOR_INPREDICATE_S_3D50B78B = + "Unexpected value list type for InPredicate: %s"; + public static final String QUERY_EXCEPTION_UNEXPECTED_COMPARISON_TYPE_S_5D101FCB = + "Unexpected comparison type: %s"; + public static final String QUERY_EXCEPTION_ZERO_LENGTH_DELIMITED_IDENTIFIER_NOT_ALLOWED_00C9ADEC = + "Zero-length delimited identifier not allowed"; + public static final String QUERY_EXCEPTION_BACKQUOTED_IDENTIFIERS_ARE_NOT_SUPPORTED_USE_DOUBLE_QUOTES_78BC7EE3 = + "backquoted identifiers are not supported; use double quotes to quote identifiers"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_UNBOUNDED_TYPE_S_2D943211 = + "Unsupported unbounded type: %s"; + public static final String QUERY_EXCEPTION_ONLY_SUPPORT_MEASUREMENT_COLUMN_IN_FILTER_S_140800D9 = + "Only support measurement column in filter: %s"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_COMPARISON_OPERATOR_S_8357E642 = + "Unsupported comparison operator %s"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_EXTRACT_COMPARISON_OPERATOR_S_38A9CDFA = + "Unsupported extract comparison operator %s"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_LOGICAL_OPERATOR_S_FDC60986 = + "Unsupported logical operator %s"; + public static final String QUERY_EXCEPTION_S_IS_NOT_SUPPORTED_IN_VALUE_PUSH_DOWN_DD54E38A = + "%s is not supported in value push down"; + public static final String QUERY_EXCEPTION_SHOULD_NOT_REACH_HERE_BEFORE_PREDICATECOMBINEINTOTABLESCANCHECKER_C591ED7D = + "Should not reach here before PredicateCombineIntoTableScanChecker support Extract push-down " + + "in third child"; + public static final String QUERY_EXCEPTION_COLUMNSCHEMA_OF_SYMBOL_S_ISN_T_SAVED_IN_SCHEMAMAP_3A172EBC = + "ColumnSchema of Symbol %s isn't saved in schemaMap"; + public static final String QUERY_EXCEPTION_SHOULD_NEVER_RETURN_NULL_IN_PREDICATECOMBINEINTOTABLESCANCHECKER_2A687052 = + "Should never return null in PredicateCombineIntoTableScanChecker."; + public static final String QUERY_EXCEPTION_EITHER_LEFT_OR_RIGHT_OPERAND_OF_COMPARISONEXPRESSION_SHOULD_FC89CE57 = + "Either left or right operand of ComparisonExpression should have time column."; + public static final String QUERY_EXCEPTION_SHOULD_NOT_REACH_HERE_BEFORE_GLOBALTIMEPREDICATEEXTRACTVISITOR_3ECC819B = + "Should not reach here before GlobalTimePredicateExtractVisitor support Extract push-down in " + + "second child"; + public static final String QUERY_EXCEPTION_SHOULD_NOT_REACH_HERE_BEFORE_GLOBALTIMEPREDICATEEXTRACTVISITOR_FB8489E8 = + "Should not reach here before GlobalTimePredicateExtractVisitor support Extract push-down in " + + "third child"; + public static final String QUERY_EXCEPTION_THREE_OPERAND_OF_BETWEEN_EXPRESSION_SHOULD_HAVE_TIME_COLUMN_25ED881D = + "Three operand of between expression should have time column."; + public static final String QUERY_EXCEPTION_FETCH_TABLE_DEVICE_SCHEMA_FAILED_BECAUSE_S_20B7D6C2 = + "Fetch Table Device Schema failed because %s"; + public static final String QUERY_EXCEPTION_THE_SCHEMA_FILTER_TYPE_S_IS_NOT_SUPPORTED_200D1E0B = + "The schema filter type %s is not supported"; + public static final String QUERY_EXCEPTION_AUTO_CREATE_TABLE_SUCCEED_BUT_CANNOT_GET_TABLE_SCHEMA_IN_74985A8E = + "auto create table succeed, but cannot get table schema in current node's " + + "DataNodeTableCache, may be caused by concurrently auto creating table"; + public static final String QUERY_EXCEPTION_CAN_NOT_CREATE_TABLE_BECAUSE_INCOMING_TABLE_HAS_NO_LESS_D3D33555 = + "Can not create table because incoming table has no less tag columns than existing table, " + + "and the existing tag columns are not the prefix of the incoming tag columns. Existing tag " + + "column: %s, index in existing table: %s, index in incoming table: %s"; + public static final String QUERY_EXCEPTION_CAN_NOT_CREATE_TABLE_BECAUSE_EXISTING_TABLE_HAS_MORE_TAG_8364B675 = + "Can not create table because existing table has more tag columns than incoming table, and " + + "the incoming tag columns are not the prefix of the existing tag columns. Incoming tag " + + "column: %s, index in existing table: %s, index in incoming table: %s"; + public static final String QUERY_EXCEPTION_AUTO_ADD_TABLE_COLUMN_FAILED_S_S_02F3DD19 = + "Auto add table column failed: %s.%s"; + public static final String QUERY_EXCEPTION_CANNOT_CREATE_COLUMN_S_CATEGORY_IS_NOT_PROVIDED_E5410BD3 = + "Cannot create column %s category is not provided"; + public static final String QUERY_EXCEPTION_CANNOT_CREATE_COLUMN_S_DATATYPE_IS_NOT_PROVIDED_2A7D27FA = + "Cannot create column %s datatype is not provided"; + public static final String QUERY_EXCEPTION_UNKNOWN_COLUMNCATEGORY_FOR_ADDING_COLUMN_S_ED1BF7FA = + "Unknown ColumnCategory for adding column: %s"; + public static final String QUERY_EXCEPTION_VISIT_NOT_IMPLEMENTED_FOR_S_1A798A4D = + "visit() not implemented for %s"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_FOR_SCALAR_SUBQUERY_RESULT_S_4381E489 = + "Unsupported data type for scalar subquery result: %s"; + public static final String QUERY_EXCEPTION_TOPKNODE_MUST_BE_APPEARED_AFTER_PUSHLIMITOFFSETINTOTABLESCAN_844A065D = + "TopKNode must be appeared after PushLimitOffsetIntoTableScan"; + public static final String QUERY_EXCEPTION_TABLE_MODEL_CAN_ONLY_PROCESS_DATA_ONLY_IN_ONE_DATABASE_YET_AB8C1EF5 = + "Table model can only process data only in one database yet!"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_JOIN_TYPE_IN_PREDICATE_PUSH_DOWN_S_4493D86C = + "Unsupported join type in predicate push down: %s"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_PLAN_NODE_S_72DD2270 = + "Unsupported plan node %s"; + public static final String QUERY_EXCEPTION_AN_ERROR_OCCURRED_WHEN_EXECUTING_GETREADABLEDATAREGIONS_A884A6BB = + "An error occurred when executing getReadableDataRegions():%s"; + public static final String QUERY_EXCEPTION_AN_ERROR_OCCURRED_WHEN_EXECUTING_GETREADABLEDATANODELOCATIONS_54CBD60D = + "An error occurred when executing getReadableDataNodeLocations():%s"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_QUANTIFIED_COMPARISON_S_C3700430 = + "Unsupported quantified comparison: %s"; + public static final String QUERY_EXCEPTION_UNEXPECTED_QUANTIFIEDCOMPARISON_S_F13E4EB2 = + "Unexpected quantifiedComparison: %s"; + public static final String QUERY_EXCEPTION_UNEXPECTED_QUANTIFIER_S_62214B74 = + "Unexpected Quantifier: %s"; + public static final String QUERY_EXCEPTION_THIS_OPTIMIZER_SHOULD_BE_USED_BEFORE_OPTIMIZER_OF_PUSHAGGREGATIONINTOTABLESCAN_9F6016E3 = + "This optimizer should be used before optimizer of PushAggregationIntoTableScan"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_VALUEPOINTER_TYPE_S_4147FFFB = + "Unsupported ValuePointer type: %s"; + public static final String QUERY_EXCEPTION_SYMBOL_S_IS_NOT_EXIST_IN_FETYPEPROVIDER_WITH_S_5CBBFB8B = + "Symbol: %s is not exist in feTypeProvider with %s"; + public static final String QUERY_EXCEPTION_RIGHT_JOIN_SHOULD_BE_TRANSFORMED_TO_LEFT_JOIN_IN_PREVIOUS_D6B56B1F = + "RIGHT Join should be transformed to LEFT Join in previous process"; + public static final String QUERY_EXCEPTION_NO_AVAILABLE_DATANODES_MAY_BE_THE_CLUSTER_IS_CLOSING_E13B8C50 = + "No available dataNodes, may be the cluster is closing"; + public static final String QUERY_EXCEPTION_SHOULD_NEVER_REACH_HERE_CHILD_ORDERING_S_PREGROUPEDSYMBOLS_79A94AB5 = + "Should never reach here. Child ordering: %s. PreGroupedSymbols: %s"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_TO_SERIALIZE_S_484DAAAF = + "Unsupported to serialize: %s"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_TO_DESERIALIZE_S_4641CD63 = + "Unsupported to deserialize: %s"; + public static final String QUERY_EXCEPTION_INSERT_INTO_TABLE_COLUMNS_S_SIZE_SHOULD_BE_SAME_AS_QUERY_E7437397 = + "insert into table columns's size should be same as query result"; + public static final String QUERY_EXCEPTION_THE_TABLEDEVICEFETCHNODE_S_CLONE_METHOD_SHALL_NOT_BE_CALLED_977C41FD = + "The TableDeviceFetchNode's clone() method shall not be called."; + public static final String QUERY_EXCEPTION_UNKNOWN_TABLESCANNODE_TYPE_S_6246EF1E = + "Unknown TableScanNode type: %s"; + public static final String QUERY_EXCEPTION_UNEXPECTED_SETOPERATION_NODE_TYPE_S_3AE3EECA = + "unexpected setOperation node type: %s"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_PATTERN_QUANTIFIER_TYPE_S_4ED427E9 = + "unsupported pattern quantifier type: %s"; + public static final String FAILED_TO_CREATE_PIPE_PLUGIN_PREFIX_FMT = + "Failed to create pipe plugin %s. "; + public static final String FAILED_TO_CREATE_PIPE_PREFIX_FMT = "Failed to create pipe %s, "; + public static final String STATE_ABORTED = "ABORTED"; + public static final String STATE_CLOSED = "CLOSED"; + public static final String LOCAL_SINK_CHANNEL_STATE_IS_WITH_STATE_FMT = + "LocalSinkChannel state is %s."; + public static final String UNKNOWN_READ_TYPE_FMT = "unknown read type [%s]"; + public static final String DESERIALIZE_CONSENSUSGROUPID_FAILED_WITH_REASON_FMT = + "Deserialize ConsensusGroupId failed: %s"; + public static final String CANNOT_ALTER_TEMPLATE_TIMESERIES_TEMPLATE_ALREADY_SET_FMT = + "Cannot alter template timeseries [%s] since device template [%s] already set on path [%s]."; + public static final String PATH_HAS_NOT_BEEN_SET_ANY_TEMPLATE_FMT = + "Path [%s] has not been set any template."; + public static final String FAILED_TO_FETCH_SCHEMA_BECAUSE_OF_UNRECOGNIZED_DATA = + "Failed to fetch schema because of unrecognized data"; + public static final String ALIGNMENT_ALIGNED = "aligned"; + public static final String ALIGNMENT_NOT_ALIGNED = "not aligned"; + public static final String TREE_MODEL_DATABASE_NAME_MUST_START_WITH_ROOT = + "the database name in tree model must start with 'root.'."; + public static final String DATABASE_NAME_LENGTH_SHALL_NOT_EXCEED_FMT = + "the length of database name shall not exceed %d"; + public static final String MODEL_TABLE = "table"; + public static final String MODEL_TREE = "tree"; + public static final String NO_SYMBOL_MAPPING_FOR_NODE_FMT = + "No symbol mapping for node '%s' (%s)"; + public static final String NO_MAPPING_FOR_EXPRESSION_WITH_IDENTITY_FMT = + "No mapping for expression: %s (%s)"; + public static final String UNEXPECTED_QUANTIFIED_COMPARISON_FMT = + "Unexpected quantified comparison: '%s %s'"; + public static final String TABLE_HAS_NO_PREFIX_FMT = "Table %s has no prefix!"; + public static final String ANALYSIS_DOES_NOT_CONTAIN_INFORMATION_FOR_NODE_FMT = + "Analysis does not contain information for node: %s"; + public static final String AUTO_CREATE_TABLE_FAILED = "Auto create table failed."; + public static final String AUTO_CREATE_TABLE_COLUMN_FAILED = "Auto create table column failed."; + public static final String AUTO_ADD_TABLE_COLUMN_FAILED_WITH_COLUMNS_FMT = + "Auto add table column failed: %s.%s, %s"; + public static final String QUERY_STATEMENT_NOT_ALLOWED_IN_BATCH_FMT = + "Query statement not allowed in batch: [%s]"; + public static final String TABLE_LOST_UNEXPECTED_FMT = + "Table %s in the database %s is lost unexpected."; + public static final String LOAD_FILE_CROSSES_PARTITIONS_FMT = + "The data of file %s crosses partitions"; + public static final String LOAD_FILE_CROSSES_PARTITIONS = + "The data of file crosses partitions"; + public static final String REGION_REPLICA_SET_CHANGED_DURING_LOAD_FMT = + "Region replica set changed from %s to %s during loading TsFile, maybe due to region migration"; + public static final String REGION_REPLICA_SET_CHANGED_DURING_LOAD = + "Region replica set changed during loading TsFile, maybe due to region migration"; + public static final String OUT_OF_TTL_FMT = + "Insertion time [%s] is less than ttl time bound [%s]"; + public static final String DRIVER_TASK_ABORTED_FMT = "DriverTask %s is aborted by %s"; + public static final String DRIVER_TASK_ABORTED_BY_TIMEOUT = "timeout"; + public static final String DRIVER_TASK_ABORTED_BY_FRAGMENT_ABORT_CALLED = "called"; + public static final String DRIVER_TASK_ABORTED_BY_QUERY_CASCADING_ABORTED = + "query cascading aborted"; + public static final String DRIVER_TASK_ABORTED_BY_ALREADY_BEING_CANCELLED = + "already being cancelled"; + public static final String DRIVER_TASK_ABORTED_BY_INTERNAL_ERROR_SCHEDULED = + "internal error scheduled"; + public static final String DRIVER_TASK_ABORTED_BY_MEMORY_NOT_ENOUGH = + "Memory is not enough to execute the query task."; + public static final String ROOT_FRAGMENT_INSTANCE_PLACEMENT_ERROR_FMT = + "Root FragmentInstance placement error: %s"; + public static final String ALL_REPLICA_CANNOT_BE_REACHED_FMT = + "All replica cannot be reached:%s"; + public static final String LOAD_READ_ONLY_MESSAGE = + "Current system mode is read only, does not support load file"; + public static final String QUERY_KILLED_BY_OTHERS = "Query was killed by others"; + public static final String QUERY_TIMEOUT_EXCEPTION_MESSAGE = + "Current query is time out, query start time is %d, ddl is %d, current time is %d, " + + "please check your statement or modify timeout parameter."; + public static final String NON_RESERVED_CAN_ONLY_CONTAIN_TOKENS_FOUND_NESTED_RULE = + "nonReserved can only contain tokens. Found nested rule: "; + + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String MESSAGE_FAILED_FETCH_STATE_HAS_RETRIED_ARG_TIMES_E7572C66 = "Failed to fetch state, has retried %s times"; + public static final String MESSAGE_IGNORED_CONFIG_ITEMS_FE28ADBC = "ignored config items: "; + public static final String MESSAGE_BECAUSE_THEY_IMMUTABLE_UNDEFINED_07C04F65 = " because they are immutable or undefined."; + public static final String MESSAGE_LOAD_ARG_PIECE_ERROR_1ST_PHASE_BECAUSE_F3D9672C = "Load %s piece error in 1st phase. Because "; + public static final String MESSAGE_LOAD_ARG_ERROR_SECOND_PHASE_BECAUSE_ARG_FIRST_PHASE_ARG_CBA980FC = "Load %s error in second phase. Because %s, first phase is %s"; + public static final String MESSAGE_SUCCESS_260CA9DD = "success"; + public static final String MESSAGE_FAILED_26934EB3 = "failed"; + public static final String MESSAGE_AUDIT_PERMISSION_NEEDED_ALTER_ENCODING_COMPRESSOR_DATABASE_ARG_CC06994D = "'AUDIT' permission is needed to alter the encoding and compressor of database %s"; + public static final String EXCEPTION_QUERYID_IS_NULL_056E92E4 = "queryId is null"; + public static final String EXCEPTION_EXPECTED_TWO_IDS_BUT_GOT_COLON_ARG_020F9D13 = "Expected two ids but got: %s"; + public static final String EXCEPTION_ID_IS_NULL_9D5D27B1 = "id is null"; + public static final String EXCEPTION_NAME_IS_NULL_C8B35959 = "name is null"; + public static final String EXCEPTION_EXPECTEDPARTS_MUST_BE_AT_LEAST_1_B867DB08 = "expectedParts must be at least 1"; + public static final String EXCEPTION_INVALID_ARG_ARG_2946DBE5 = "Invalid %s %s"; + public static final String EXCEPTION_ID_IS_EMPTY_28C94FC0 = "id is empty"; + public static final String EXCEPTION_EXECUTOR_IS_NULL_7FBE03A4 = "executor is null"; + public static final String EXCEPTION_INITIALSTATE_IS_NULL_8992A39F = "initialState is null"; + public static final String EXCEPTION_TERMINALSTATES_IS_NULL_E0FC2A93 = "terminalStates is null"; + public static final String EXCEPTION_EXPECTEDSTATE_IS_NULL_5E8C2F32 = "expectedState is null"; + public static final String EXCEPTION_CURRENTSTATE_IS_NULL_AEDB20DB = "currentState is null"; + public static final String EXCEPTION_STATECHANGELISTENER_IS_NULL_635AE7D2 = "stateChangeListener is null"; + public static final String EXCEPTION_ARG_CANNOT_TRANSITION_FROM_ARG_TO_ARG_8C680D30 = "%s cannot transition from %s to %s"; + public static final String EXCEPTION_CANNOT_FIRE_STATE_CHANGE_EVENT_WHILE_HOLDING_THE_LOCK_35243BC4 = "Cannot fire state change event while holding the lock"; + public static final String EXCEPTION_CANNOT_NOTIFY_WHILE_HOLDING_THE_LOCK_15625D48 = "Cannot notify while holding the lock"; + public static final String EXCEPTION_CANNOT_WAIT_FOR_STATE_CHANGE_WHILE_HOLDING_THE_LOCK_CBD9F784 = "Cannot wait for state change while holding the lock"; + public static final String EXCEPTION_DONESTATE_IS_NULL_D88F77E5 = "doneState is null"; + public static final String EXCEPTION_DONESTATE_ARG_IS_NOT_A_DONE_STATE_8724C618 = "doneState %s is not a done state"; + public static final String EXCEPTION_DATANODEID_SHOULD_BE_INIT_FIRST_13B19A85 = "DataNodeId should be init first!"; + public static final String EXCEPTION_LENGTH_OF_INPUT_COLUMN_LEFT_BRACKET_RIGHT_BRACKET_FOR_MAXBY_SLASH_MINBY_SHOULD_B_1F3F2F1C = "Length of input Column[] for MaxBy/MinBy should be 3"; + public static final String EXCEPTION_PARTIALRESULT_OF_MAXBY_SLASH_MINBY_SHOULD_BE_1_BF0078F4 = "partialResult of MaxBy/MinBy should be 1"; + public static final String EXCEPTION_PARTIALRESULT_OF_MAXVALUE_SHOULD_BE_1_659B6D42 = "partialResult of MaxValue should be 1"; + public static final String EXCEPTION_PARTIALRESULT_OF_AVG_SHOULD_BE_2_7A8C375E = "partialResult of Avg should be 2"; + public static final String EXCEPTION_PARTIALRESULT_OF_MINVALUE_SHOULD_BE_1_C9DAF94D = "partialResult of MinValue should be 1"; + public static final String EXCEPTION_PARTIALRESULT_OF_LASTVALUE_SHOULD_BE_2_68963ECE = "partialResult of LastValue should be 2"; + public static final String EXCEPTION_PARTIALRESULT_OF_MINTIME_SHOULD_BE_1_B7EFE10B = "partialResult of MinTime should be 1"; + public static final String EXCEPTION_PARTIALRESULT_OF_COUNT_SHOULD_BE_1_972B9219 = "partialResult of Count should be 1"; + public static final String EXCEPTION_PARTIALRESULT_OF_FIRSTVALUE_SHOULD_BE_2_3FB20C54 = "partialResult of FirstValue should be 2"; + public static final String EXCEPTION_PARTIALRESULT_OF_COUNT_IF_SHOULD_BE_1_70D01652 = "partialResult of count_if should be 1"; + public static final String EXCEPTION_STEP_IN_SERIESAGGREGATESCANOPERATOR_AND_RAWDATAAGGREGATEOPERATOR_CAN_ONLY_PROCES_5575BD95 = "Step in SeriesAggregateScanOperator and RawDataAggregateOperator can only process raw input"; + public static final String EXCEPTION_RAWDATAAGGREGATEOPERATOR_CAN_ONLY_PROCESS_ONE_TSBLOCK_INPUT_DOT_5ABCB8C0 = "RawDataAggregateOperator can only process one tsBlock input."; + public static final String EXCEPTION_STEP_IN_AGGREGATEOPERATOR_CANNOT_PROCESS_RAW_INPUT_22620F61 = "Step in AggregateOperator cannot process raw input"; + public static final String EXCEPTION_FINAL_OUTPUT_CAN_ONLY_BE_SINGLE_COLUMN_6D82F9E0 = "Final output can only be single column"; + public static final String EXCEPTION_PARTIALRESULT_OF_SUM_SHOULD_BE_1_40E85216 = "partialResult of Sum should be 1"; + public static final String EXCEPTION_INPUT_OF_SUM_SHOULD_BE_1_D5C11EC8 = "input of Sum should be 1"; + public static final String EXCEPTION_PARTIALRESULT_OF_UDAF_SHOULD_BE_1_E094029D = "partialResult of UDAF should be 1"; + public static final String EXCEPTION_PARTIALRESULT_OF_EXTREMEVALUE_SHOULD_BE_1_A7713D8A = "partialResult of ExtremeValue should be 1"; + public static final String EXCEPTION_WRONG_INPUTDATATYPES_SIZE_DOT_675FF289 = "Wrong inputDataTypes size."; + public static final String EXCEPTION_INPUT_OF_COUNT_SHOULD_BE_1_C7EEEC46 = "input of Count should be 1"; + public static final String EXCEPTION_PARTIALRESULT_OF_MAXTIME_SHOULD_BE_1_877F7EAC = "partialResult of MaxTime should be 1"; + public static final String EXCEPTION_LOCALMEMORYMANAGER_IS_NULL_DOT_69FE497A = "localMemoryManager is null."; + public static final String EXCEPTION_TSBLOCKSERDEFACTORY_IS_NULL_DOT_32EB5BD2 = "tsBlockSerdeFactory is null."; + public static final String EXCEPTION_EXECUTORSERVICE_IS_NULL_DOT_7B057909 = "executorService is null."; + public static final String EXCEPTION_MPPDATAEXCHANGESERVICECLIENTMANAGER_IS_NULL_DOT_F31E746C = "mppDataExchangeServiceClientManager is null."; + public static final String EXCEPTION_SHAREDTSBLOCKQUEUE_IS_FULL_87493E26 = "SharedTsBlockQueue is full"; + public static final String EXCEPTION_FRAGMENT_INSTANCE_ID_CANNOT_BE_NULL_4BE84F40 = "fragment instance ID cannot be null"; + public static final String EXCEPTION_PLANNODE_ID_CANNOT_BE_NULL_F91303CD = "PlanNode ID cannot be null"; + public static final String EXCEPTION_LOCAL_MEMORY_MANAGER_CANNOT_BE_NULL_54701481 = "local memory manager cannot be null"; + public static final String EXCEPTION_EXECUTORSERVICE_CAN_NOT_BE_NULL_DOT_220C966B = "ExecutorService can not be null."; + public static final String EXCEPTION_TSBLOCK_CANNOT_BE_NULL_E7EA3BDA = "TsBlock cannot be null"; + public static final String EXCEPTION_BYTESTORESERVE_SHOULD_BE_GREATER_THAN_ZERO_DOT_56D15DE0 = "bytesToReserve should be greater than zero."; + public static final String EXCEPTION_MAXBYTESCANRESERVE_SHOULD_BE_GREATER_THAN_ZERO_DOT_E9F7D365 = "maxBytesCanReserve should be greater than zero."; + public static final String EXCEPTION_MAX_BYTES_SHOULD_BE_GREATER_THAN_ZERO_COLON_ARG_EA1FB495 = "max bytes should be greater than zero: %d"; + public static final String EXCEPTION_MAX_BYTES_PER_FI_SHOULD_BE_IN_LEFT_PAREN_0_COMMA_MAXBYTES_RIGHT_BRACKET_DOT_MAXB_4D37C457 = "max bytes per FI should be in (0,maxBytes]. maxBytesPerFI: %d, maxBytes: %d"; + public static final String EXCEPTION_BYTESTORESERVE_SHOULD_BE_IN_LEFT_PAREN_0_COMMA_MAXBYTESPERFI_RIGHT_BRACKET_DOT_M_0753BB69 = "bytesToReserve should be in (0,maxBytesPerFI]. maxBytesPerFI: %d, bytesToReserve: %d"; + public static final String EXCEPTION_INVALID_FUTURE_TYPE_14507EF5 = "invalid future type "; + public static final String EXCEPTION_QUERYID_CANNOT_BE_NULL_861D7663 = "queryId cannot be null"; + public static final String EXCEPTION_FRAGMENTINSTANCEID_CANNOT_BE_NULL_C722F460 = "fragmentInstanceId cannot be null"; + public static final String EXCEPTION_PLANNODEID_CANNOT_BE_NULL_4533C72B = "planNodeId cannot be null"; + public static final String EXCEPTION_ID_CAN_NOT_BE_NULL_DOT_BDD2AD7D = "id can not be null."; + public static final String EXCEPTION_QUERYID_CAN_NOT_BE_NULL_DOT_16639DBE = "queryId can not be null."; + public static final String EXCEPTION_FRAGMENTINSTANCEID_CAN_NOT_BE_NULL_DOT_E88CF18B = "fragmentInstanceId can not be null."; + public static final String EXCEPTION_PLANNODEID_CAN_NOT_BE_NULL_DOT_44027620 = "planNodeId can not be null."; + public static final String EXCEPTION_THE_FUTURE_TO_BE_CANCELLED_CAN_NOT_BE_NULL_DOT_73CE402A = "The future to be cancelled can not be null."; + public static final String EXCEPTION_LOCK_IS_NOT_REENTRANT_7967C13E = "Lock is not reentrant"; + public static final String EXCEPTION_CURRENT_THREAD_DOES_NOT_HOLD_LOCK_68FFB1D9 = "Current thread does not hold lock"; + public static final String EXCEPTION_ROOT_OPERATOR_SHOULD_NOT_BE_NULL_F4890A7A = "root Operator should not be null"; + public static final String EXCEPTION_SINK_SHOULD_NOT_BE_NULL_3CC4F006 = "Sink should not be null"; + public static final String EXCEPTION_INITIALCOUNT_SHOULDN_QUOTE_T_BE_NULL_HERE_8B333953 = "initialCount shouldn't be null here"; + public static final String EXCEPTION_COUNT_SHOULDN_QUOTE_T_BE_NULL_HERE_1EBA9339 = "count shouldn't be null here"; + public static final String EXCEPTION_TASKID_IS_NULL_E1221EB2 = "taskId is null"; + public static final String EXCEPTION_INSTANCEID_IS_NULL_343234DC = "instanceId is null"; + public static final String EXCEPTION_FRAGMENTINSTANCEID_IS_NULL_4D371DB4 = "fragmentInstanceId is null"; + public static final String EXCEPTION_CURRENT_STATE_IS_ALREADY_DONE_19FC56DC = "Current state is already done"; + public static final String EXCEPTION_SUPPRESSED_IS_NULL_F4CD280B = "suppressed is null"; + public static final String EXCEPTION_STACK_IS_NULL_6844D421 = "stack is null"; + public static final String EXCEPTION_ARG_IS_A_NON_MINUS_DONE_FAILURE_STATE_B167E915 = "%s is a non-done failure state"; + public static final String EXCEPTION_WARNINGCODE_IS_NULL_3CCAE5B7 = "warningCode is null"; + public static final String EXCEPTION_MESSAGE_IS_NULL_D2D078AA = "message is null"; + public static final String EXCEPTION_WARNING_IS_NULL_E5A7C3C1 = "warning is null"; + public static final String EXCEPTION_NO_FIRST_FILE_F5F2E276 = "no first file"; + public static final String EXCEPTION_NO_FIRST_CHUNK_7DCEB14C = "no first chunk"; + public static final String EXCEPTION_CAN_QUOTE_T_INIT_NULL_CHUNKMETA_15C12BEE = "Can't init null chunkMeta"; + public static final String EXCEPTION_OPERATORCONTEXT_IS_NULL_D15B1EDB = "operatorContext is null"; + public static final String EXCEPTION_CHILD_OPERATOR_IS_NULL_8860113C = "child operator is null"; + public static final String EXCEPTION_GROUPBYTIMEPARAMETER_CANNOT_BE_NULL_IN_SLIDINGWINDOWAGGREGATIONOPERATOR_BA42E30D = "GroupByTimeParameter cannot be null in SlidingWindowAggregationOperator"; + public static final String EXCEPTION_REMAININGINPUTLOCATIONS_IS_NULL_CEBBA2C1 = "remainingInputLocations is null"; + public static final String EXCEPTION_LAST_QUERY_RESULT_SHOULD_ONLY_HAVE_ONE_RECORD_EDFEE635 = "last query result should only have one record"; + public static final String EXCEPTION_OUTPUTPATHS_SHOULDN_QUOTE_T_BE_NULL_BF3F5FB4 = "outputPaths shouldn't be null"; + public static final String EXCEPTION_CHILD_SIZE_OF_INNERTIMEJOINOPERATOR_SHOULD_BE_LARGER_THAN_1_37EB7D74 = "child size of InnerTimeJoinOperator should be larger than 1"; + public static final String EXCEPTION_CHILD_SIZE_OF_VERTICALLYCONCATOPERATOR_SHOULD_BE_LARGER_THAN_0_14A2513A = "child size of VerticallyConcatOperator should be larger than 0"; + public static final String EXCEPTION_CHILD_SIZE_OF_TIMEJOINOPERATOR_SHOULD_BE_LARGER_THAN_0_EDED9CB8 = "child size of TimeJoinOperator should be larger than 0"; + public static final String EXCEPTION_DATASTORE_IS_NULL_D9972B2E = "dataStore is null"; + public static final String EXCEPTION_LASTVALUESCACHERESULTS_SHOULDN_QUOTE_T_BE_NULL_HERE_0DCD5841 = "lastValuesCacheResults shouldn't be null here"; + public static final String EXCEPTION_ACCUMULATOR_SHOULD_BE_LASTDESCACCUMULATOR_WHEN_REACH_HERE_CE38F96A = "Accumulator should be LastDescAccumulator when reach here"; + public static final String EXCEPTION_DRIVERTASK_TO_BE_PUSHED_IS_NULL_7581A0E3 = "DriverTask to be pushed is null"; + public static final String EXCEPTION_DRIVERTASK_IS_NULL_A13D4AF9 = "driverTask is null"; + public static final String EXCEPTION_SELECTED_LEVEL_CAN_NOT_EQUAL_TO_MINUS_1_1DA93B14 = "selected level can not equal to -1"; + public static final String EXCEPTION_RESULT_DRIVERTASK_CANNOT_BE_NULL_30A06DB1 = "result driverTask cannot be null"; + public static final String EXCEPTION_DRIVERTASKQUEUE_IS_NULL_7C3C8B7B = "driverTaskQueue is null"; + public static final String EXCEPTION_MAXDRIVERSPERTASK_IS_NULL_8408F9B7 = "maxDriversPerTask is null"; + public static final String EXCEPTION_QUEUE_CAN_NOT_BE_NULL_DOT_9BB286B1 = "queue can not be null."; + public static final String EXCEPTION_SOURCEHANDLELISTENER_CAN_NOT_BE_NULL_DOT_01817F52 = "sourceHandleListener can not be null."; + public static final String EXCEPTION_LOCALFRAGMENTINSTANCEID_CAN_NOT_BE_NULL_DOT_37F5917D = "localFragmentInstanceId can not be null."; + public static final String EXCEPTION_LOCALPLANNODEID_CAN_NOT_BE_NULL_DOT_44A34A33 = "localPlanNodeId can not be null."; + public static final String EXCEPTION_START_SEQUENCE_ID_SHOULD_BE_GREATER_THAN_OR_EQUAL_TO_ZERO_DOT_START_SEQUENCE_ID__D3C0AAB7 = "Start sequence ID should be greater than or equal to zero. Start sequence ID: "; + public static final String EXCEPTION_COMMA_END_SEQUENCE_ID_COLON_DB1AF173 = ", end sequence ID: "; + public static final String EXCEPTION_END_SEQUENCE_ID_SHOULD_BE_GREATER_THAN_THE_START_SEQUENCE_ID_DOT_START_SEQUENCE__DF1AA2A1 = "End sequence ID should be greater than the start sequence ID. Start sequence ID: "; + public static final String EXCEPTION_RESERVED_BYTES_SHOULD_BE_GREATER_THAN_ZERO_DOT_64086BE5 = "Reserved bytes should be greater than zero."; + public static final String EXCEPTION_REMOTEENDPOINT_CAN_NOT_BE_NULL_DOT_DE2B5885 = "remoteEndpoint can not be null."; + public static final String EXCEPTION_REMOTEFRAGMENTINSTANCEID_CAN_NOT_BE_NULL_DOT_C2449A29 = "remoteFragmentInstanceId can not be null."; + public static final String EXCEPTION_LOCALMEMORYMANAGER_CAN_NOT_BE_NULL_DOT_7A46C6CE = "localMemoryManager can not be null."; + public static final String EXCEPTION_EXECUTORSERVICE_CAN_NOT_BE_NULL_DOT_BC459BD4 = "executorService can not be null."; + public static final String EXCEPTION_SERDE_CAN_NOT_BE_NULL_DOT_D46F66E7 = "serde can not be null."; + public static final String EXCEPTION_DOT_9D9B854A = "."; + public static final String EXCEPTION_START_SEQUENCE_ID_SHOULD_BE_GREATER_THAN_OR_EQUAL_TO_ZERO_COMMA_BUT_WAS_COLON_4D2D708E = "Start sequence ID should be greater than or equal to zero, but was: "; + public static final String EXCEPTION_REMOTEENDPOINT_CAN_NOT_BE_NULL_DOT_83488ACF = "remoteEndPoint can not be null."; + public static final String EXCEPTION_REMOTEPLANNODEID_CAN_NOT_BE_NULL_DOT_03956DE2 = "remotePlanNodeId can not be null."; + public static final String EXCEPTION_SINKLISTENER_CAN_NOT_BE_NULL_DOT_32C9E7C0 = "sinkListener can not be null."; + public static final String EXCEPTION_TSBLOCKS_IS_NULL_02287FD8 = "tsBlocks is null"; + public static final String EXCEPTION_DOWNSTREAMCHANNELLIST_CAN_NOT_BE_NULL_DOT_417AD5A3 = "downStreamChannelList can not be null."; + public static final String EXCEPTION_DOWNSTREAMCHANNELINDEX_CAN_NOT_BE_NULL_DOT_A1D5A266 = "downStreamChannelIndex can not be null."; + public static final String EXCEPTION_STEP_IN_SLIDINGWINDOWAGGREGATIONOPERATOR_CAN_ONLY_PROCESS_PARTIAL_RESULT_E221A2C5 = "Step in SlidingWindowAggregationOperator can only process partial result"; + public static final String EXCEPTION_SLIDINGWINDOWAGGREGATIONOPERATOR_CAN_ONLY_PROCESS_ONE_TSBLOCK_INPUT_DOT_7B9FCAB7 = "SlidingWindowAggregationOperator can only process one tsBlock input."; + public static final String EXCEPTION_IS_NULL_97AAF381 = " is null"; + public static final String EXCEPTION_MPP_DATA_EXCHANGE_MANAGER_SHOULD_NOT_BE_NULL_44D7141E = "MPP_DATA_EXCHANGE_MANAGER should not be null"; + public static final String EXCEPTION_ROOTOPERATOR_IS_NULL_050A1E79 = "rootOperator is null"; + public static final String EXCEPTION_DRIVERCONTEXT_IS_NULL_4FEBE55F = "driverContext is null"; + public static final String EXCEPTION_QUERY_CONTEXT_CANNOT_BE_NULL_C4809234 = "Query context cannot be null"; + public static final String EXCEPTION_DESCRIPTOR_QUOTE_S_INPUT_EXPRESSION_SIZE_IS_NOT_1_DA4BED50 = "descriptor's input expression size is not 1"; + public static final String EXCEPTION_GROUPBYLEVEL_DESCRIPTORLIST_CANNOT_BE_EMPTY_34604314 = "GroupByLevel descriptorList cannot be empty"; + public static final String EXCEPTION_GROUPBYTAG_TAG_KEYS_CANNOT_BE_EMPTY_5D649624 = "GroupByTag tag keys cannot be empty"; + public static final String EXCEPTION_GROUPBYTAG_AGGREGATION_DESCRIPTORS_CANNOT_BE_EMPTY_82EC14EB = "GroupByTag aggregation descriptors cannot be empty"; + public static final String EXCEPTION_AGGREGATION_DESCRIPTORLIST_CANNOT_BE_EMPTY_490C1740 = "Aggregation descriptorList cannot be empty"; + public static final String EXCEPTION_PUSH_DOWN_PREDICATE_IS_NOT_SUPPORTED_YET_178F04A1 = "Push down predicate is not supported yet"; + public static final String EXCEPTION_SINK_IS_NULL_E33854B4 = "sink is null"; + public static final String EXCEPTION_THERE_MUST_BE_AT_MOST_ONE_SINKNODE_A965AFE7 = "There must be at most one SinkNode"; + public static final String EXCEPTION_QUERY_CONTEXT_CANNOT_BE_NULL_DOT_2D3369FE = "Query context cannot be null."; + public static final String EXCEPTION_UNEXPECTED_NODE_TYPE_COLON_41FBCBF3 = "Unexpected node type: "; + public static final String EXCEPTION_TEMPLATEDINFO_SHOULD_NOT_BE_NULL_B5898568 = "TemplatedInfo should not be null"; + public static final String EXCEPTION_RESULTHANDLE_IN_COORDINATOR_SHOULD_BE_INIT_FIRSTLY_DOT_0F44159B = "ResultHandle in Coordinator should be init firstly."; + public static final String EXCEPTION_EXPRESSION_IS_NOT_ANALYZED_COLON_ARG_7D34C49A = "Expression is not analyzed: %s"; + public static final String EXCEPTION_PATH_QUOTE_ARG_QUOTE_IS_NOT_ANALYZED_IN_GROUPBYLEVELHELPER_DOT_BCEE9D39 = "path '%s' is not analyzed in GroupByLevelHelper."; + public static final String EXCEPTION_SYMBOL_IS_NULL_AE539B31 = "symbol is null"; + public static final String EXCEPTION_NO_TYPE_FOUND_FOR_SYMBOL_QUOTE_ARG_QUOTE_IN_TYPEPROVIDER_F4DD9DF7 = "no type found for symbol '%s' in TypeProvider"; + public static final String EXCEPTION_OUTPUT_COLUMN_QUOTE_ARG_QUOTE_IS_NOT_STORED_IN_ARG_2DE3176D = "output column '%s' is not stored in %s"; + public static final String EXCEPTION_PATTERNSTRING_CANNOT_BE_NULL_8A2903F8 = "patternString cannot be null"; + public static final String EXCEPTION_THE_LENGTH_OF_CASEWHENTHENEXPRESSION_QUOTE_S_WHENTHENLIST_MUST_GREATER_THAN_0_069775ED = "the length of CaseWhenThenExpression's whenThenList must greater than 0"; + public static final String EXCEPTION_QUERYCONTEXT_IS_NULL_C2344379 = "QueryContext is null"; + public static final String EXCEPTION_PREDICATE_LEFT_BRACKET_ARG_RIGHT_BRACKET_SHOULD_BE_SIMPLIFIED_IN_PREVIOUS_STEP_9262C154 = "Predicate [%s] should be simplified in previous step"; + public static final String EMPTY_MESSAGE = ""; + public static final String EXCEPTION_SEMICOLON_0FAEF84A = "; "; + public static final String EXCEPTION_THE_TSBLOCK_SHOULD_NOT_BE_NULL_WHEN_CONSTRUCTING_MEMORYSOURCEHANDLE_8D205293 = "the TsBlock should not be null when constructing MemorySourceHandle"; + public static final String EXCEPTION_THE_TIME_ORDER_IS_NOT_SPECIFIED_DOT_624A7526 = "The time order is not specified."; + public static final String EXCEPTION_THE_TIMESERIES_ORDER_IS_NOT_SPECIFIED_DOT_68EE3875 = "The timeseries order is not specified."; + public static final String EXCEPTION_THE_DEVICE_ORDER_IS_NOT_SPECIFIED_DOT_D3FB9559 = "The device order is not specified."; + public static final String EXCEPTION_SLASH_BC35AB27 = "/"; + public static final String EXCEPTION_INFORMATIONSCHEMATABLESCANNODE_MUST_HAVE_REGIONREPLICASET_0411DBCB = "InformationSchemaTableScanNode must have regionReplicaSet"; + public static final String EXCEPTION_EACH_INFORMATIONSCHEMATABLESCANNODE_HAVE_ONLY_ONE_DATANODELOCATION_FA3E82C4 = "each InformationSchemaTableScanNode have only one DataNodeLocation"; + public static final String EXCEPTION_CHILD_OF_EXCHANGENODE_MUST_BE_MULTICHILDRENSINKNODE_1BF715FD = "child of ExchangeNode must be MultiChildrenSinkNode"; + public static final String EXCEPTION_SIZE_OF_SOURCELOCATIONS_SHOULD_BE_LARGER_THAN_0_2EC41A23 = "size of sourceLocations should be larger than 0"; + public static final String EXCEPTION_INDEX_IS_NOT_VALID_2AB4FB3A = "index is not valid"; + public static final String EXCEPTION_LINES_OF_BOX_STRING_SHOULD_BE_GREATER_THAN_0_5DB8C047 = "Lines of box string should be greater than 0"; + public static final String EXCEPTION_WRONG_NUMBER_OF_NEW_CHILDREN_817AF800 = "wrong number of new children"; + public static final String EXCEPTION_TRANSLATIONS_IS_NULL_37D62ADC = "translations is null"; + public static final String EXCEPTION_ROOT_IS_NULL_ECC8987D = "root is null"; + public static final String EXCEPTION_SYMBOLHINT_IS_NULL_CE874C40 = "symbolHint is null"; + public static final String EXCEPTION_TYPE_IS_NULL_16A3D3EB = "type is null"; + public static final String EXCEPTION_SYMBOLHINT_NOT_IN_SYMBOLS_MAP_B0D67E43 = "symbolHint not in symbols map"; + public static final String EXCEPTION_PLANNERCONTEXT_IS_NULL_B7C7DE50 = "plannerContext is null"; + public static final String EXCEPTION_OBJECTS_IS_NULL_819EE879 = "objects is null"; + public static final String EXCEPTION_TYPES_IS_NULL_E4B2309D = "types is null"; + public static final String EXCEPTION_OBJECTS_AND_TYPES_DO_NOT_HAVE_THE_SAME_SIZE_8B51E17B = "objects and types do not have the same size"; + public static final String EXCEPTION_OUTERCONTEXT_IS_NULL_031CD366 = "outerContext is null"; + public static final String EXCEPTION_SCOPE_IS_NULL_4F364BA2 = "scope is null"; + public static final String EXCEPTION_ANALYSIS_IS_NULL_66666A58 = "analysis is null"; + public static final String EXCEPTION_FIELDSYMBOLS_IS_NULL_5130E49C = "fieldSymbols is null"; + public static final String EXCEPTION_ASTTOSYMBOLS_IS_NULL_80B3970F = "astToSymbols is null"; + public static final String EXCEPTION_TOO_FEW_PARAMETER_VALUES_2F7358C6 = "Too few parameter values"; + public static final String EXCEPTION_SYMBOLALLOCATOR_IS_NULL_E2BE1908 = "symbolAllocator is null"; + public static final String EXCEPTION_QUERYCONTEXT_IS_NULL_761DB539 = "queryContext is null"; + public static final String EXCEPTION_SESSION_IS_NULL_6CF0F47D = "session is null"; + public static final String EXCEPTION_RECURSIVESUBQUERIES_IS_NULL_6AD8A180 = "recursiveSubqueries is null"; + public static final String EXCEPTION_PREDICATEWITHUNCORRELATEDSCALARSUBQUERYRECONSTRUCTOR_IS_NULL_B264FEBC = "predicateWithUncorrelatedScalarSubqueryReconstructor is null"; + public static final String EXCEPTION_ONLY_SUPPORT_ONE_GROUPINGSET_NOW_A1277FA4 = "Only support one groupingSet now"; + public static final String EXCEPTION_EXPRESSION_IS_NULL_16C079B5 = "expression is null"; + public static final String EXCEPTION_EXPRESSIONTYPES_IS_NULL_4107A4A2 = "expressionTypes is null"; + public static final String EXCEPTION_TYPE_NOT_FOUND_FOR_EXPRESSION_COLON_ARG_C26C9237 = "Type not found for expression: %s"; + public static final String EXCEPTION_VALUE_REACH_HERE_MUST_BE_EXPRESSION_C7CA1971 = "Value reach here must be Expression"; + public static final String EXCEPTION_PLAN_IS_NULL_717C9DF7 = "plan is null"; + public static final String EXCEPTION_LOOKUP_IS_NULL_B8FD7E65 = "lookup is null"; + public static final String EXCEPTION_CONSUMER_IS_NULL_B6207072 = "consumer is null"; + public static final String EXCEPTION_FIELDMAPPINGS_IS_NULL_C3681969 = "fieldMappings is null"; + public static final String EXCEPTION_NO_FIELD_MINUS_GREATER_THAN_SYMBOL_MAPPING_FOR_FIELD_ARG_698FDF06 = "No field->symbol mapping for field %s"; + public static final String EXCEPTION_FOR_NOW_COMMA_ONLY_SINGLE_COLUMN_SUBQUERIES_ARE_SUPPORTED_AD9593BE = "For now, only single column subqueries are supported"; + public static final String EXCEPTION_FOR_NOW_COMMA_ONLY_SINGLE_COLUMN_SUBQUERIES_ARE_SUPPORTED_DOT_068B1A66 = "For now, only single column subqueries are supported."; + public static final String EXCEPTION_CLUSTER_IS_EMPTY_22299EED = "Cluster is empty"; + public static final String EXCEPTION_CLUSTER_CONTAINS_EXPRESSIONS_THAT_ARE_NOT_EQUIVALENT_TO_EACH_OTHER_7AD9A0E3 = "Cluster contains expressions that are not equivalent to each other"; + public static final String EXCEPTION_WARNINGCOLLECTOR_IS_NULL_7A524A68 = "warningCollector is null"; + public static final String EXCEPTION_MEASURES_IS_NULL_EC9D2431 = "measures is null"; + public static final String EXCEPTION_MEASUREOUTPUTS_IS_NULL_923F7C4B = "measureOutputs is null"; + public static final String EXCEPTION_SKIPTOPOSITION_IS_NULL_EFBA10CA = "skipToPosition is null"; + public static final String EXCEPTION_PATTERN_IS_NULL_AC4E239A = "pattern is null"; + public static final String EXCEPTION_VARIABLEDEFINITIONS_IS_NULL_5F7B8ED4 = "variableDefinitions is null"; + public static final String EXCEPTION_NO_RELATIONS_SPECIFIED_FOR_UNION_70CE42C4 = "No relations specified for UNION"; + public static final String EXCEPTION_NO_RELATIONS_SPECIFIED_FOR_INTERSECT_76B0ED3B = "No relations specified for intersect"; + public static final String EXCEPTION_NO_RELATIONS_SPECIFIED_FOR_EXCEPT_C8E4B4AA = "No relations specified for except"; + public static final String EXCEPTION_NODE_IS_NULL_C1479F4A = "node is null"; + public static final String EXCEPTION_EXPRESSIONS_MUST_BE_IN_THE_SAME_LOCAL_SCOPE_CCAD793E = "Expressions must be in the same local scope"; + public static final String EXCEPTION_WHERE_IS_NULL_A1A3FCBC = "where is null"; + public static final String EXCEPTION_SKIPONLY_IS_NULL_80DB0703 = "skipOnly is null"; + public static final String EXCEPTION_UNABLE_TO_REMOVE_PLAN_NODE_AS_IT_CONTAINS_0_OR_MORE_THAN_1_CHILDREN_6F26E194 = "Unable to remove plan node as it contains 0 or more than 1 children"; + public static final String EXCEPTION_FIELDS_IS_NULL_DE209DBF = "fields is null"; + public static final String EXCEPTION_CANNOT_RESOLVE_SYMBOL_ARG_79F76FA6 = "Cannot resolve symbol %s"; + public static final String EXCEPTION_COLUMNREFERENCES_IS_NULL_124955C5 = "columnReferences is null"; + public static final String EXCEPTION_SCOPEEQUALITIES_IS_NULL_22388B2C = "scopeEqualities is null"; + public static final String EXCEPTION_SCOPECOMPLEMENTEQUALITIES_IS_NULL_B9080FC7 = "scopeComplementEqualities is null"; + public static final String EXCEPTION_SCOPESTRADDLINGEQUALITIES_IS_NULL_F6B979AE = "scopeStraddlingEqualities is null"; + public static final String EXCEPTION_SYMBOLTYPES_IS_NULL_DD16EA83 = "symbolTypes is null"; + public static final String EXCEPTION_EXPRESSION_CANNOT_BE_NULL_EFF1A99C = "expression cannot be null"; + public static final String EXCEPTION_TYPE_CANNOT_BE_NULL_97A0A8D3 = "type cannot be null"; + public static final String EXCEPTION_NO_TYPE_FOR_COLON_ARG_9E34AD76 = "No type for: %s"; + public static final String EXCEPTION_CONDITION_MUST_BE_BOOLEAN_COLON_ARG_806C2960 = "Condition must be boolean: %s"; + public static final String EXCEPTION_TYPES_MUST_BE_EQUAL_COLON_ARG_VS_ARG_098424AD = "Types must be equal: %s vs %s"; + public static final String EXCEPTION_ELEMENTS_IS_NULL_3451C1DA = "elements is null"; + public static final String EXCEPTION_PREDICATE_IS_NULL_22E687A9 = "predicate is null"; + public static final String EXCEPTION_MAPPER_IS_NULL_1D7789D1 = "mapper is null"; + public static final String EXCEPTION_FUNCTION_IS_NULL_E0FA4B62 = "function is null"; + public static final String EXCEPTION_N_MUST_BE_GREATER_THAN_OR_EQUAL_TO_ZERO_C4CE8BF0 = "n must be greater than or equal to zero"; + public static final String EXCEPTION_LOOKUPTYPE_IS_NULL_190054FA = "lookupType is null"; + public static final String EXCEPTION_OPERATORTYPE_IS_NULL_CEA6E3D3 = "operatorType is null"; + public static final String EXCEPTION_ARGUMENTTYPES_IS_NULL_1E377BFD = "argumentTypes is null"; + public static final String EXCEPTION_RETURNTYPE_IS_NULL_07C7C6A5 = "returnType is null"; + public static final String EXCEPTION_TABLE_IS_NULL_8DDD9098 = "table is null"; + public static final String EXCEPTION_COLUMNS_IS_NULL_6C8F32B3 = "columns is null"; + public static final String EXCEPTION_COMMENT_IS_NULL_0AD46118 = "comment is null"; + public static final String EXCEPTION_STATEMENTANALYZERFACTORY_IS_NULL_D309BAB5 = "statementAnalyzerFactory is null"; + public static final String EXCEPTION_FIELD_IS_NULL_80E8CE23 = "field is null"; + public static final String EXCEPTION_PARAMETERS_IS_NULL_418C7892 = "parameters is null"; + public static final String EXCEPTION_TABLEREFERENCE_IS_NULL_C02D3A8F = "tableReference is null"; + public static final String EXCEPTION_QUERY_IS_NULL_689B7978 = "query is null"; + public static final String EXCEPTION_RECURSIVEREFERENCE_IS_NULL_24B9D5DC = "recursiveReference is null"; + public static final String EXCEPTION_ROOT_STATEMENT_IS_ANALYSIS_IS_NULL_36BCD4D1 = "root statement is analysis is null"; + public static final String EXCEPTION_ACCESSCONTROL_IS_NULL_F534EBDD = "accessControl is null"; + public static final String EXCEPTION_IDENTITY_IS_NULL_846265BA = "identity is null"; + public static final String EXCEPTION_HANDLE_IS_NULL_E82FA480 = "handle is null"; + public static final String EXCEPTION_TABLENAME_IS_NULL_20708596 = "tableName is null"; + public static final String EXCEPTION_COLUMNNAME_IS_NULL_81635BA6 = "columnName is null"; + public static final String EXCEPTION_AUTHORIZATION_IS_NULL_7CCA692F = "authorization is null"; + public static final String EXCEPTION_VALUETYPE_IS_NULL_A8582B5F = "valueType is null"; + public static final String EXCEPTION_VALUECOERCION_IS_NULL_E1A004BF = "valueCoercion is null"; + public static final String EXCEPTION_SUBQUERYCOERCION_IS_NULL_33646290 = "subqueryCoercion is null"; + public static final String EXCEPTION_PARTITIONBY_IS_NULL_84791B6B = "partitionBy is null"; + public static final String EXCEPTION_ORDERBY_IS_NULL_AA2494DE = "orderBy is null"; + public static final String EXCEPTION_FRAME_IS_NULL_5A92D609 = "frame is null"; + public static final String EXCEPTION_ATLEAST_IS_NULL_2FE8D701 = "atLeast is null"; + public static final String EXCEPTION_ATMOST_IS_NULL_778B3B3A = "atMost is null"; + public static final String EXCEPTION_FILLEDVALUE_IS_NULL_1FA907D6 = "filledValue is null"; + public static final String EXCEPTION_FIELDREFERENCE_IS_NULL_0B07EA50 = "fieldReference is null"; + public static final String EXCEPTION_QUERY_IS_NOT_REGISTERED_AS_EXPANDABLE_FAAD8FC9 = "query is not registered as expandable"; + public static final String EXCEPTION_EXPRESSION_NOT_ANALYZED_COLON_ARG_D397B665 = "Expression not analyzed: %s"; + public static final String EXCEPTION_EXPRESSION_IS_NOT_A_COLUMN_REFERENCE_COLON_ARG_7957E705 = "Expression is not a column reference: %s"; + public static final String EXCEPTION_EXPECTED_JOIN_FIELDS_FOR_LEFT_AND_RIGHT_TO_HAVE_THE_SAME_SIZE_21BFD449 = "Expected join fields for left and right to have the same size"; + public static final String EXCEPTION_NO_COLUMNS_GIVEN_TO_INSERT_52C42E47 = "No columns given to insert"; + public static final String EXCEPTION_MISSING_FILLANALYSIS_FOR_NODE_ARG_7E5B19A4 = "missing FillAnalysis for node %s"; + public static final String EXCEPTION_MISSING_OFFSET_VALUE_FOR_NODE_ARG_4B107520 = "missing OFFSET value for node %s"; + public static final String EXCEPTION_MISSING_LIMIT_VALUE_FOR_NODE_ARG_DD5FD777 = "missing LIMIT value for node %s"; + public static final String EXCEPTION_MISSING_RANGE_FOR_QUANTIFIER_ARG_03461228 = "missing range for quantifier %s"; + public static final String EXCEPTION_MISSING_UNDEFINED_LABELS_FOR_ARG_CA615EC2 = "missing undefined labels for %s"; + public static final String EXCEPTION_NO_FIELD_FOR_97419CB1 = "No Field for "; + public static final String EXCEPTION_RELATIONID_IS_NULL_C4683108 = "relationId is null"; + public static final String EXCEPTION_FIELDINDEX_MUST_BE_NON_MINUS_NEGATIVE_COMMA_GOT_COLON_ARG_09C2C06D = "fieldIndex must be non-negative, got: %s"; + public static final String EXCEPTION_TYPEMANAGER_IS_NULL_12A72016 = "typeManager is null"; + public static final String EXCEPTION_NODES_IS_NULL_7AB3C1D7 = "nodes is null"; + public static final String EXCEPTION_CLAZZ_IS_NULL_7F710E3E = "clazz is null"; + public static final String EXCEPTION_GROUPBYEXPRESSIONS_IS_NULL_BFDC07D2 = "groupByExpressions is null"; + public static final String EXCEPTION_SOURCESCOPE_IS_NULL_4B3626A7 = "sourceScope is null"; + public static final String EXCEPTION_ORDERBYSCOPE_IS_NULL_A6017E73 = "orderByScope is null"; + public static final String EXCEPTION_NO_FIELD_FOR_E99DCE9A = "No field for "; + public static final String EXCEPTION_INVALID_PARAMETER_NUMBER_ARG_COMMA_MAX_VALUES_IS_ARG_B3F5C4E8 = "Invalid parameter number %s, max values is %s"; + public static final String EXCEPTION_GROUPING_FIELD_ARG_SHOULD_ORIGINATE_FROM_ARG_6DBBCE6B = "Grouping field %s should originate from %s"; + public static final String EXCEPTION_ALLLABELS_IS_NULL_9F240FB5 = "allLabels is null"; + public static final String EXCEPTION_DESCRIPTOR_IS_NULL_E6EC1F14 = "descriptor is null"; + public static final String EXCEPTION_ARGUMENTS_IS_NULL_B1F6D4F2 = "arguments is null"; + public static final String EXCEPTION_MODE_IS_NULL_54A948DB = "mode is null"; + public static final String EXCEPTION_LABELS_IS_NULL_F4FBBECE = "labels is null"; + public static final String EXCEPTION_MATCHNUMBERCALLS_IS_NULL_EC08D0D0 = "matchNumberCalls is null"; + public static final String EXCEPTION_CLASSIFIERCALLS_IS_NULL_92AA8B77 = "classifierCalls is null"; + public static final String EXCEPTION_LABEL_IS_NULL_B21FE26B = "label is null"; + public static final String EXCEPTION_NAVIGATION_IS_NULL_3D0CBEE1 = "navigation is null"; + public static final String EXCEPTION_ANCHOR_IS_NULL_4AF93E60 = "anchor is null"; + public static final String EXCEPTION_FIELD_CANNOT_BE_NULL_09155004 = "field cannot be null"; + public static final String EXCEPTION_FIELD_QUOTE_ARG_QUOTE_NOT_FOUND_1BC2FDED = "Field '%s' not found"; + public static final String EXCEPTION_PARENT_IS_NULL_ED81BAD8 = "parent is null"; + public static final String EXCEPTION_RELATION_IS_NULL_890596ED = "relation is null"; + public static final String EXCEPTION_NAMEDQUERIES_IS_NULL_AFDE9A4A = "namedQueries is null"; + public static final String EXCEPTION_TABLES_IS_NULL_2012309E = "tables is null"; + public static final String EXCEPTION_RELATIONTYPE_IS_NULL_62DDF9C1 = "relationType is null"; + public static final String EXCEPTION_BASISTYPE_IS_NULL_33E4F842 = "basisType is null"; + public static final String EXCEPTION_PARENT_IS_ALREADY_SET_835DE0A5 = "parent is already set"; + public static final String EXCEPTION_QUERY_QUOTE_ARG_QUOTE_IS_ALREADY_ADDED_F3D47DBD = "Query '%s' is already added"; + public static final String EXCEPTION_MISSING_SCOPE_D573869F = "missing scope"; + public static final String EXCEPTION_MISSING_RELATIONTYPE_679D3CFA = "missing relationType"; + public static final String EXCEPTION_SUBQUERYINPREDICATES_IS_NULL_5A37F1C8 = "subqueryInPredicates is null"; + public static final String EXCEPTION_SUBQUERIES_IS_NULL_0D5EA053 = "subqueries is null"; + public static final String EXCEPTION_EXISTSSUBQUERIES_IS_NULL_5EA140F5 = "existsSubqueries is null"; + public static final String EXCEPTION_QUANTIFIEDCOMPARISONS_IS_NULL_A30F5121 = "quantifiedComparisons is null"; + public static final String EXCEPTION_WINDOWFUNCTIONS_IS_NULL_D77C3CD5 = "windowFunctions is null"; + public static final String EXCEPTION_ORIGINTABLE_IS_NULL_18AC52C3 = "originTable is null"; + public static final String EXCEPTION_RELATIONALIAS_IS_NULL_C363AD25 = "relationAlias is null"; + public static final String EXCEPTION_ORIGINCOLUMNNAME_IS_NULL_98607162 = "originColumnName is null"; + public static final String EXCEPTION_METADATA_IS_NULL_6F8F9BA0 = "metadata is null"; + public static final String EXCEPTION_CONTEXT_IS_NULL_E329B664 = "context is null"; + public static final String EXCEPTION_GETRESOLVEDWINDOW_IS_NULL_2438758C = "getResolvedWindow is null"; + public static final String EXCEPTION_GETPREANALYZEDTYPE_IS_NULL_FBB2EC7D = "getPreanalyzedType is null"; + public static final String EXCEPTION_BASESCOPE_IS_NULL_ABE8F618 = "baseScope is null"; + public static final String EXCEPTION_PATTERNRECOGNITIONCONTEXT_IS_NULL_59C665F1 = "patternRecognitionContext is null"; + public static final String EXCEPTION_CORRELATIONSUPPORT_IS_NULL_E0D669BF = "correlationSupport is null"; + public static final String EXCEPTION_FUNCTIONINPUTTYPES_IS_NULL_3030658F = "functionInputTypes is null"; + public static final String EXCEPTION_COLUMN_IS_NULL_0C404041 = "column is null"; + public static final String EXCEPTION_EXPRESSION_NOT_YET_ANALYZED_COLON_ARG_0F4F19B7 = "Expression not yet analyzed: %s"; + public static final String EXCEPTION_ARG_ALREADY_KNOWN_TO_REFER_TO_ARG_8C8B4F24 = "%s already known to refer to %s"; + public static final String EXCEPTION_NO_RESOLVED_WINDOW_FOR_COLON_AED19667 = "no resolved window for: "; + public static final String EXCEPTION_NO_LABEL_AVAILABLE_8508CE32 = "no label available"; + public static final String EXCEPTION_REWRITES_IS_NULL_4E5AD77A = "rewrites is null"; + public static final String EXCEPTION_STATEMENT_REWRITE_RETURNED_NULL_AB1E89EA = "Statement rewrite returned null"; + public static final String EXCEPTION_ATN_IS_NULL_48BE0D3E = "atn is null"; + public static final String EXCEPTION_LEXER_IS_NULL_88834E18 = "lexer is null"; + public static final String EXCEPTION_PARSER_IS_NULL_AE8E5D6F = "parser is null"; + public static final String EXCEPTION_LEXER_ATN_MISMATCH_COLON_EXPECTED_ARG_COMMA_FOUND_ARG_8ED22CF1 = "Lexer ATN mismatch: expected %s, found %s"; + public static final String EXCEPTION_PARSER_ATN_MISMATCH_COLON_EXPECTED_ARG_COMMA_FOUND_ARG_FF75D61B = "Parser ATN mismatch: expected %s, found %s"; + public static final String EXCEPTION_INITIALIZER_IS_NULL_2EEC3764 = "initializer is null"; + public static final String EXCEPTION_TERMINALNODE_IS_NULL_578F27FD = "terminalNode is null"; + public static final String EXCEPTION_PARSERRULECONTEXT_IS_NULL_9E0DD3B5 = "parserRuleContext is null"; + public static final String EXCEPTION_TOKEN_IS_NULL_43094C56 = "token is null"; + public static final String EXCEPTION_VALUE_IS_NULL_192F6BFF = "value is null"; + public static final String EXCEPTION_LOCATION_IS_NULL_F134D388 = "location is null"; + public static final String EXCEPTION_TOPIC_NAME_CAN_NOT_BE_NULL_EA4ED0BF = "topic name can not be null"; + public static final String EXCEPTION_SOURCE_NAME_IS_NULL_287E475D = "source name is null"; + public static final String EXCEPTION_TARGET_NAME_IS_NULL_A5F701C6 = "target name is null"; + public static final String EXCEPTION_DBNAME_IS_NULL_4521C4EE = "dbName is null"; + public static final String EXCEPTION_PROPERTIES_IS_NULL_57B88B49 = "properties is null"; + public static final String EXCEPTION_TARGET_IS_NULL_240F0372 = "target is null"; + public static final String EXCEPTION_INDEXNAME_IS_NULL_2525299C = "indexName is null"; + public static final String EXCEPTION_COLUMNLIST_IS_NULL_DADE6825 = "columnList is null"; + public static final String EXCEPTION_SIZE_OF_COLUMNLIST_SHOULD_BE_LARGER_THAN_1_7EB80E55 = "size of columnList should be larger than 1"; + public static final String EXCEPTION_ASSIGNMENTS_IS_NULL_1FD6142D = "assignments is null"; + public static final String EXCEPTION_PIPE_NAME_CAN_NOT_BE_NULL_14570979 = "pipe name can not be null"; + public static final String EXCEPTION_SQL_IS_NULL_BEDB2B7A = "sql is null"; + public static final String EXCEPTION_SERVICENAME_IS_NULL_1009BA39 = "serviceName is null"; + public static final String EXCEPTION_CANNOT_GET_NON_MINUS_DEFAULT_VALUE_OF_PROPERTY_ARG_SINCE_ITS_VALUE_IS_SET_TO_DEF_E7D3185F = "Cannot get non-default value of property %s since its value is set to DEFAULT"; + public static final String EXCEPTION_STATEMENTNAME_IS_NULL_C03BB8D4 = "statementName is null"; + public static final String EXCEPTION_CATALOGNAME_IS_NULL_2E3C3C6B = "catalogName is null"; + public static final String EXCEPTION_SOURCE_IS_NULL_45946547 = "source is null"; + public static final String EXCEPTION_SUBSCRIPTION_ID_CAN_NOT_BE_NULL_0CDFFD7D = "subscription id can not be null"; + public static final String EXCEPTION_DB_IS_NULL_E1AD1B58 = "db is null"; + public static final String EXCEPTION_TOPIC_ATTRIBUTES_CAN_NOT_BE_NULL_791A8FED = "topic attributes can not be null"; + public static final String EXCEPTION_EXTRACTOR_SLASH_SOURCE_ATTRIBUTES_CAN_NOT_BE_NULL_2B3A656B = "extractor/source attributes can not be null"; + public static final String EXCEPTION_PROCESSOR_ATTRIBUTES_CAN_NOT_BE_NULL_FFF91008 = "processor attributes can not be null"; + public static final String EXCEPTION_CONNECTOR_ATTRIBUTES_CAN_NOT_BE_NULL_7AF2F613 = "connector attributes can not be null"; + public static final String EXCEPTION_CLASSNAME_IS_NULL_3902B37C = "className is null"; + public static final String EXCEPTION_PLUGIN_NAME_CAN_NOT_BE_NULL_92F0F4D6 = "plugin name can not be null"; + public static final String EXCEPTION_CLASS_NAME_CAN_NOT_BE_NULL_1D276677 = "class name can not be null"; + public static final String EXCEPTION_URI_CAN_NOT_BE_NULL_B3535EDC = "uri can not be null"; + public static final String EXCEPTION_STATEMENT_IS_NULL_693A0622 = "statement is null"; + public static final String EXCEPTION_UDFNAME_IS_NULL_83E9039B = "udfName is null"; + public static final String EXCEPTION_URISTRING_IS_NULL_E7458C6A = "uriString is null"; + public static final String EXCEPTION_FILEPATH_IS_NULL_84CE8A66 = "filePath is null"; + public static final String EXCEPTION_DETAILS_IS_NULL_8EDEEA03 = "details is null"; + public static final String EXCEPTION_COLUMNCATEGORY_IS_NULL_0075924B = "columnCategory is null"; + public static final String EXCEPTION_ARGUMENTNAME_IS_NULL_7F8F665F = "argumentName is null"; + public static final String EXCEPTION_PASSEDARGUMENTS_IS_NULL_98D8CB1F = "passedArguments is null"; + public static final String EXCEPTION_TABLEARGUMENTANALYSES_IS_NULL_C8724E40 = "tableArgumentAnalyses is null"; + public static final String EXCEPTION_ARGUMENT_IS_NULL_0CBBD22B = "argument is null"; + public static final String EXCEPTION_TABLEARGUMENTANALYSIS_IS_NULL_CF9F0E25 = "tableArgumentAnalysis is null"; + public static final String EXCEPTION_RULE_IS_NULL_5387C8CC = "rule is null"; + public static final String EXCEPTION_CANNOT_MERGE_STATS_FOR_DIFFERENT_RULES_COLON_ARG_AND_ARG_F0A5D5E6 = "Cannot merge stats for different rules: %s and %s"; + public static final String EXCEPTION_SCALAR_SUBQUERY_RESULT_SHOULD_ONLY_HAVE_ONE_COLUMN_DOT_893F76CB = "Scalar Subquery result should only have one column."; + public static final String EXCEPTION_SCALAR_SUBQUERY_RESULT_SHOULD_ONLY_HAVE_ONE_ROW_DOT_F9007BBC = "Scalar Subquery result should only have one row."; + public static final String EXCEPTION_SCALAR_SUBQUERY_RESULT_SHOULD_NOT_GET_NULL_DATATYPE_OR_NULL_COLUMN_DOT_616056F4 = "Scalar Subquery result should not get null dataType or null column."; + public static final String EXCEPTION_OPERATOR_IS_NULL_F5BB9F59 = "operator is null"; + public static final String EXCEPTION_EXPRESSIONS_IS_NULL_C44D9384 = "expressions is null"; + public static final String EXCEPTION_CORRELATION_IS_NULL_F8327EAD = "correlation is null"; + public static final String EXCEPTION_CORRELATEDPREDICATES_IS_NULL_5FCB8011 = "correlatedPredicates is null"; + public static final String EXCEPTION_GROUPING_KEYS_WERE_CORRELATED_EE1C8406 = "grouping keys were correlated"; + public static final String EXCEPTION_EXPECTED_CONSTANT_SYMBOLS_TO_CONTAIN_ALL_CORRELATED_SYMBOLS_LOCAL_EQUIVALENTS_E20CB055 = "Expected constant symbols to contain all correlated symbols local equivalents"; + public static final String EXCEPTION_EXPECTED_SYMBOLS_TO_PROPAGATE_TO_CONTAIN_ALL_CONSTANT_SYMBOLS_C9D876E4 = "Expected symbols to propagate to contain all constant symbols"; + public static final String EXCEPTION_CARDINALITYRANGE_IS_NULL_8FDEE0B4 = "cardinalityRange is null"; + public static final String EXCEPTION_METADATAEXPRESSIONS_IS_NULL_3752914C = "metadataExpressions is null"; + public static final String EXCEPTION_EXPRESSIONSCANPUSHDOWN_IS_NULL_DC8DFEB3 = "expressionsCanPushDown is null"; + public static final String EXCEPTION_EXPRESSIONSCANNOTPUSHDOWN_IS_NULL_63BC9AF9 = "expressionsCannotPushDown is null"; + public static final String EXCEPTION_FILTER_PREDICATE_OF_FILTERNODE_IS_NULL_C3964179 = "Filter predicate of FilterNode is null"; + public static final String EXCEPTION_UNSUPPORTED_JOIN_TYPE_COLON_ARG_9FB6751B = "Unsupported join type: %s"; + public static final String EXCEPTION_UNIQUEID_IN_PREDICATE_IS_NOT_YET_SUPPORTED_7B5D2EAF = "UniqueId in predicate is not yet supported"; + public static final String EXCEPTION_MAPPERPROVIDER_IS_NULL_472725D5 = "mapperProvider is null"; + public static final String EXCEPTION_CORRELATIONMAPPING_IS_NULL_9D595C82 = "correlationMapping is null"; + public static final String EXCEPTION_MAPPINGS_IS_NULL_23BD9025 = "mappings is null"; + public static final String EXCEPTION_AGGREGATE_WITH_ORDER_BY_DOES_NOT_SUPPORT_PARTIAL_AGGREGATION_D5BDD21F = "Aggregate with ORDER BY does not support partial aggregation"; + public static final String EXCEPTION_LEFTEFFECTIVEPREDICATE_MUST_ONLY_CONTAIN_SYMBOLS_FROM_LEFTSYMBOLS_DB3259B8 = "leftEffectivePredicate must only contain symbols from leftSymbols"; + public static final String EXCEPTION_RIGHTEFFECTIVEPREDICATE_MUST_ONLY_CONTAIN_SYMBOLS_FROM_RIGHTSYMBOLS_4B97238D = "rightEffectivePredicate must only contain symbols from rightSymbols"; + public static final String EXCEPTION_OUTEREFFECTIVEPREDICATE_MUST_ONLY_CONTAIN_SYMBOLS_FROM_OUTERSYMBOLS_99FC2AA9 = "outerEffectivePredicate must only contain symbols from outerSymbols"; + public static final String EXCEPTION_INNEREFFECTIVEPREDICATE_MUST_ONLY_CONTAIN_SYMBOLS_FROM_INNERSYMBOLS_ECB7C6A2 = "innerEffectivePredicate must only contain symbols from innerSymbols"; + public static final String EXCEPTION_IDALLOCATOR_IS_NULL_752B308D = "idAllocator is null"; + public static final String EXCEPTION_PLANOPTIMIZERSSTATSCOLLECTOR_IS_NULL_9DA4B0CC = "planOptimizersStatsCollector is null"; + public static final String EXCEPTION_SUBQUERY_RESULT_TYPE_MUST_BE_ORDERABLE_82AF0EFA = "Subquery result type must be orderable"; + public static final String EXCEPTION_ALL_THE_NON_CORRELATED_SUBQUERIES_SHOULD_BE_REWRITTEN_AT_THIS_POINT_B4614541 = "All the non correlated subqueries should be rewritten at this point"; + public static final String EXCEPTION_CHANGEDPLANNODES_IS_NULL_5ECBDE28 = "changedPlanNodes is null"; + public static final String EXCEPTION_MAPPINGFUNCTION_IS_NULL_212D6109 = "mappingFunction is null"; + public static final String EXCEPTION_ROOT_NODE_MUST_RETURN_ONLY_ONE_FF42061C = "Root node must return only one"; + public static final String EXCEPTION_SIZE_OF_TOPKNODE_CAN_ONLY_BE_1_IN_LOGICAL_PLAN_DOT_DB32E3C5 = "Size of TopKNode can only be 1 in logical plan."; + public static final String EXCEPTION_THE_SIZE_OF_LEFT_CHILDREN_NODE_OF_JOINNODE_SHOULD_BE_1_F3437368 = "The size of left children node of JoinNode should be 1"; + public static final String EXCEPTION_THE_SIZE_OF_RIGHT_CHILDREN_NODE_OF_JOINNODE_SHOULD_BE_1_6BA167CF = "The size of right children node of JoinNode should be 1"; + public static final String EXCEPTION_THE_SIZE_OF_LEFT_CHILDREN_NODE_OF_SEMIJOINNODE_SHOULD_BE_1_FFEE3F41 = "The size of left children node of SemiJoinNode should be 1"; + public static final String EXCEPTION_THE_SIZE_OF_RIGHT_CHILDREN_NODE_OF_SEMIJOINNODE_SHOULD_BE_1_AE90C4B8 = "The size of right children node of SemiJoinNode should be 1"; + public static final String EXCEPTION_CHILDRENNODES_SHOULD_NOT_BE_NULL_DOT_0C93B063 = "childrenNodes should not be null."; + public static final String EXCEPTION_CHILDRENNODES_SHOULD_NOT_BE_EMPTY_DOT_E5555FD9 = "childrenNodes should not be empty."; + public static final String EXCEPTION_SIZE_OF_TOPKRANKINGNODE_CAN_ONLY_BE_1_IN_LOGICAL_PLAN_DOT_20D6A513 = "Size of TopKRankingNode can only be 1 in logical plan."; + public static final String EXCEPTION_STATS_IS_NULL_D3627E6A = "stats is null"; + public static final String EXCEPTION_USELEGACYRULES_IS_NULL_0AD13CAB = "useLegacyRules is null"; + public static final String EXCEPTION_RULES_IS_NULL_DF243716 = "rules is null"; + public static final String EXCEPTION_EXPECTED_CHILD_TO_BE_A_GROUP_REFERENCE_DOT_FOUND_COLON_EC01971C = "Expected child to be a group reference. Found: "; + public static final String EXCEPTION_TIMEOUT_HAS_TO_BE_A_NON_MINUS_NEGATIVE_NUMBER_LEFT_BRACKET_MILLISECONDS_RIGHT_BR_5201D8B3 = "Timeout has to be a non-negative number [milliseconds]"; + public static final String EXCEPTION_NODE_QUOTE_ARG_QUOTE_IS_NOT_A_GROUPREFERENCE_73C8C127 = "Node '%s' is not a GroupReference"; + public static final String EXCEPTION_MEMBER_IS_NULL_466D8670 = "member is null"; + public static final String EXCEPTION_INVALID_GROUP_COLON_ARG_C0BAD253 = "Invalid group: %s"; + public static final String EXCEPTION_ARG_COLON_TRANSFORMED_EXPRESSION_DOESN_QUOTE_T_PRODUCE_SAME_OUTPUTS_COLON_ARG_VS_F9BAF138 = "%s: transformed expression doesn't produce same outputs: %s vs %s"; + public static final String EXCEPTION_CANNOT_DELETE_GROUP_THAT_HAS_INCOMING_REFERENCES_83C9D700 = "Cannot delete group that has incoming references"; + public static final String EXCEPTION_REFERENCE_TO_REMOVE_NOT_FOUND_2EB93289 = "Reference to remove not found"; + public static final String EXCEPTION_TRANSFORMEDPLAN_IS_NULL_83B2099A = "transformedPlan is null"; + public static final String EXCEPTION_NEWCHILDREN_IS_NOT_EMPTY_170FCE18 = "newChildren is not empty"; + public static final String EXCEPTION_GROUPINGSETS_IS_NULL_8EE6D9BF = "groupingSets is null"; + public static final String EXCEPTION_PREGROUPEDSYMBOLS_IS_NULL_DC24FF7B = "preGroupedSymbols is null"; + public static final String EXCEPTION_GROUPING_COLUMNS_DOES_NOT_CONTAIN_GROUPID_COLUMN_83976C83 = "Grouping columns does not contain groupId column"; + public static final String EXCEPTION_ORDER_BY_DOES_NOT_SUPPORT_DISTRIBUTED_AGGREGATION_05109B26 = "ORDER BY does not support distributed aggregation"; + public static final String EXCEPTION_DATE_BIN_FUNCTION_MUST_BE_THE_LAST_GROUPINGKEY_EE955FF5 = "date_bin function must be the last GroupingKey"; + public static final String EXCEPTION_PRE_MINUS_GROUPED_SYMBOLS_MUST_BE_A_SUBSET_OF_THE_GROUPING_KEYS_AFC6C33D = "Pre-grouped symbols must be a subset of the grouping keys"; + public static final String EXCEPTION_EXPECTED_AGGREGATION_TO_HAVE_DISTINCT_INPUT_EC6AF059 = "Expected aggregation to have DISTINCT input"; + public static final String EXCEPTION_MISMATCHED_CHILD_LEFT_PAREN_ARG_RIGHT_PAREN_AND_PERMITTED_OUTPUTS_LEFT_PAREN_ARG_57801144 = "Mismatched child (%s) and permitted outputs (%s) sizes"; + public static final String EXCEPTION_MISSING_TYPE_FOR_EXPRESSION_3D66D302 = "missing type for expression"; + public static final String EXCEPTION_EXCEPTNODE_TRANSLATION_RESULT_HAS_NO_COUNT_SYMBOLS_8653930E = "ExceptNode translation result has no count symbols"; + public static final String EXCEPTION_UNEXPECTED_CORRELATED_JOIN_TYPE_COLON_ARG_27E8EC42 = "unexpected correlated join type: %s"; + public static final String EXCEPTION_CORRELATION_IN_ARG_JOIN_2F78ACC3 = "correlation in %s JOIN"; + public static final String EXCEPTION_PLANNODE_IS_NULL_49FBBFCF = "planNode is null"; + public static final String EXCEPTION_COUNTSYMBOLS_IS_NULL_416D96FB = "countSymbols is null"; + public static final String EXCEPTION_ROWNUMBERSYMBOL_IS_NULL_BA30E0AA = "rowNumberSymbol is null"; + public static final String EXCEPTION_CANNOT_SIMPLIFY_A_UNIONNODE_9D5B09A7 = "Cannot simplify a UnionNode"; + public static final String EXCEPTION_THE_SIZE_OF_MARKERS_SHOULD_BE_SAME_AS_THE_SIZE_OF_COUNT_OUTPUT_SYMBOLS_6DBDD287 = "the size of markers should be same as the size of count output symbols"; + public static final String EXCEPTION_ROWNUMBERSYMBOL_IS_EMPTY_34FE9565 = "rowNumberSymbol is empty"; + public static final String EXCEPTION_EXPECTED_SUBQUERY_OUTPUT_SYMBOLS_TO_BE_PRUNED_13B84182 = "Expected subquery output symbols to be pruned"; + public static final String EXCEPTION_TYPEANALYZER_IS_NULL_3106B188 = "typeAnalyzer is null"; + public static final String EXCEPTION_UNEXPECTED_CORRELATEDJOIN_TYPE_COLON_47A368C1 = "unexpected CorrelatedJoin type: "; + public static final String EXCEPTION_UNEXPECTED_NULL_LITERAL_WITHOUT_A_CAST_TO_BOOLEAN_D399CFCB = "Unexpected null literal without a cast to boolean"; + public static final String EXCEPTION_REWRITER_IS_NULL_B0D8CC88 = "rewriter is null"; + public static final String EXCEPTION_UNEXPECTED_NODE_TYPE_COLON_ARG_B1C0328F = "unexpected node type: %s"; + public static final String EXCEPTION_RESULT_IS_NULL_031E2F89 = "result is null"; + public static final String EXCEPTION_DISTINCT_NOT_SUPPORTED_0E97D0BB = "distinct not supported"; + public static final String EXCEPTION_EXPRESSION_IS_NOT_ANALYZED_LEFT_PAREN_ARG_RIGHT_PAREN_COLON_ARG_DAE760B6 = "Expression is not analyzed (%s): %s"; + public static final String EXCEPTION_SYMBOL_REFERENCES_ARE_NOT_ALLOWED_93779D6C = "symbol references are not allowed"; + public static final String EXCEPTION_EXPRESSION_INTERPRETER_RETURNED_AN_UNRESOLVED_EXPRESSION_5BCE9A51 = "Expression interpreter returned an unresolved expression"; + public static final String EXCEPTION_NULL_OPERAND_SHOULD_HAVE_BEEN_REMOVED_BY_RECURSIVE_COALESCE_PROCESSING_B6D4D443 = "Null operand should have been removed by recursive coalesce processing"; + public static final String EXCEPTION_NULL_VALUE_IS_EXPECTED_TO_BE_REPRESENTED_AS_NULL_COMMA_NOT_NULLLITERAL_9B96D25A = "Null value is expected to be represented as null, not NullLiteral"; + } diff --git a/iotdb-core/datanode/src/main/i18n/en/org/apache/iotdb/db/i18n/DataNodeSchemaMessages.java b/iotdb-core/datanode/src/main/i18n/en/org/apache/iotdb/db/i18n/DataNodeSchemaMessages.java index 9574ca9bc8aad..76ca18e1c2995 100644 --- a/iotdb-core/datanode/src/main/i18n/en/org/apache/iotdb/db/i18n/DataNodeSchemaMessages.java +++ b/iotdb-core/datanode/src/main/i18n/en/org/apache/iotdb/db/i18n/DataNodeSchemaMessages.java @@ -36,6 +36,8 @@ public final class DataNodeSchemaMessages { "SchemaRegion(id = {}) has been deleted, skiped"; public static final String FAILED_TO_GET_TABLE_FOR_TIMESERIES_COUNT = "Failed to get table {}.{} when calculating the time series number. Maybe the cluster is restarting or the table is being dropped."; + public static final String TREE_VIEW_TABLE_CANNOT_BE_WRITTEN_OR_DELETED = + "The table %s.%s is a view from tree, cannot be written or deleted from"; public static final String PEER_IS_SHUTTING_DOWN = "Peer is shutting down now."; public static final String SCHEMA_REGION_DUPLICATED = "SchemaRegion [%s] is duplicated between [%s] and [%s], and the former one has been recovered."; @@ -605,4 +607,121 @@ public final class DataNodeSchemaMessages { public static final String ILLEGAL_PATH_LOG = "illegal path {}"; private DataNodeSchemaMessages() {} + // --------------------------------------------------------------------------- + // Additional log messages + // --------------------------------------------------------------------------- + public static final String SCHEMA_LOG_FLUSHING_WORKING_MEMTABLE_ADD_CURRENT_QUERY_CONTEXT_TO_IMMUTABLE_7B7CD373 = + "Flushing/Working MemTable - add current query context to immutable TVList's query list"; + public static final String SCHEMA_LOG_FLUSHING_MEMTABLE_ADD_CURRENT_QUERY_CONTEXT_TO_MUTABLE_TVLIST_BEB0D766 = + "Flushing MemTable - add current query context to mutable TVList's query list"; + public static final String SCHEMA_LOG_WORKING_MEMTABLE_ADD_CURRENT_QUERY_CONTEXT_TO_MUTABLE_TVLIST_8C937414 = + "Working MemTable - add current query context to mutable TVList's query list when it's " + + "sorted or no other query on it"; + public static final String SCHEMA_LOG_WORKING_MEMTABLE_CLONE_MUTABLE_TVLIST_AND_REPLACE_OLD_TVLIST_FD1EAE22 = + "Working MemTable - clone mutable TVList and replace old TVList in working MemTable"; + public static final String PATH_DOES_NOT_START_WITH_FMT = "%s doesn't start with %s"; + public static final String ALIAS_DUPLICATED_FULLPATH_OTHER_MEASUREMENT_FMT = + "The alias is duplicated with the name or alias of other measurement, alias: %s, fullPath: %s, otherMeasurement: %s"; + public static final String TAG_ACTION_DELETE = "Delete"; + public static final String TAG_ACTION_UPSERT = "Upsert"; + public static final String TAG_ACTION_DROP = "Drop"; + public static final String TAG_ACTION_SET = "Set"; + public static final String TAG_ACTION_RENAME = "Rename"; + public static final String NESTED_LOGICAL_VIEW_UNSUPPORTED_FMT = + "The source of view [%s] is also a view! Nested view is unsupported! Please check it."; + public static final String GET_SCHEMA_AS_LOGICAL_VIEW_SCHEMA_UNSUPPORTED = + "Function getSchemaAsLogicalViewSchema is not supported in DeviceUsingTemplateSchemaCache."; + public static final String DEVICE_TEMPLATE_ALREADY_ACTIVATED_ON_PATH_FMT = + "Device Template has already been activated on path %s, there's no need to activate again."; + public static final String SOME_TASK_DELETING_TIMESERIES_FMT = + "Some task is deleting timeseries [%s]"; + public static final String PATH_ALREADY_EXIST_FMT = "Path [%s] already exist"; + public static final String MNODE_TYPE_MISMATCH_FMT = "MNode [%s] is not a %s."; + public static final String ALIAS_FOR_PATH_ALREADY_EXIST_FMT = + "Alias [%s] for Path [%s] already exist"; + public static final String DATABASE_NOT_SET_FOR_SERIES_PATH_FMT = + "%s for current seriesPath: [%s]"; + public static final String DATABASE_ALREADY_CREATED_AS_DATABASE_FMT = + "%s has already been created as database"; + public static final String SCHEMA_QUOTA_EXCEEDED_FMT = + "The current metadata capacity has exceeded the cluster quota. Please review your " + + "configuration on ConfigNode or delete some existing %s to comply with the quota."; + public static final String DATABASE_QUOTA_EXCEEDED_FMT = + "The current database number has exceeded the cluster quota. The maximum number of cluster " + + "databases allowed is %d, Please review your configuration database_limit_threshold " + + "or delete some existing database to comply with the quota."; + public static final String SERIES_OVERFLOW_FMT = + "Too many timeseries in memory without device template(current memory: %s, series num: %s). " + + "To optimize memory, DEVICE TEMPLATE is more recommended when devices have same time series."; + public static final String ILLEGAL_PARAMETER_FAILED_CREATE_TIMESERIES_FMT = + "%s. Failed to create timeseries for path %s"; + public static final String PATH_NOT_EXIST_WRONG_MESSAGE = "Path [%s] does not exist"; + public static final String SOURCE_PATH_NOT_EXIST_WRONG_MESSAGE = + "The source path [%s] of view [%s] does not exist."; + public static final String NORMAL_TIMESERIES_NOT_EXIST_WRONG_MESSAGE = + "Timeseries [%s] does not exist or is represented by device template"; + public static final String TEMPLATE_TIMESERIES_NOT_EXIST_WRONG_MESSAGE = + "Timeseries [%s] does not exist or is not represented by device template"; + public static final String VIEW_NOT_EXIST_WRONG_MESSAGE = "View [%s] does not exist"; + public static final String PATH_LIST_ELLIPSIS_SEPARATOR = " ... "; + public static final String REGISTERED_TYPE_STRING = "registered type"; + public static final String NULL_VALUE = "null"; + public static final String DATA_TYPE_MISMATCH_REGISTERED_TYPE_FMT = + "data type of %s.%s is not consistent, %s %s, inserting type %s, timestamp %s, value %s"; + public static final String DATA_TYPE_AND_VALUE_MISMATCH_FMT = + "data type and value of %s.%s is not consistent, inserting type %s, timestamp %s, value %s"; + public static final String SCHEMA_DIR_CREATION_FAILED_FMT = + "create database schema folder %s failed."; + public static final String MNODE_NOT_PINNED = "MNode has not been pinned."; + public static final String MNODE_NOT_CACHED = "MNode has not been cached or has been evicted."; + public static final String TEMPLATE_IS_IN_USE_ON_FMT = "Template is in use on %s"; + public static final String CANNOT_CREATE_TIMESERIES_TEMPLATE_SET_FMT = + "Cannot create timeseries [%s] since device template [%s] already set on path [%s]."; + public static final String CANNOT_SET_DEVICE_TEMPLATE_TIMESERIES_UNDER_PATH_FMT = + "Cannot set device template [%s] to path [%s] since there's timeseries under path [%s]."; + public static final String FAILED_CREATE_DUPLICATED_TEMPLATE_FMT = + "Failed to create duplicated template for path %s"; + public static final String TEMPLATE_ON_PATH_DIFFERENT_FROM_FMT = + "The template on %s is different from %s"; + public static final String UNDEFINED_TEMPLATE_NAME_FMT = "Undefined template name: %s"; + public static final String COLOSSAL_RECORD_FMT = + "Record of key [%s] is too large for SchemaFile to store, content size:%d"; + public static final String KEY_TOO_LARGE_FOR_INTERNAL_PAGE_FMT = + "Key [%s] is too large to store in a InternalPage as index entry."; + public static final String KEY_ALIAS_PAIR_TOO_LARGE_FMT = + "Key-Alias pair (%s, %s) is too large for SchemaFile to store."; + public static final String SEGMENT_OVERFLOW_FMT = "Segment overflow : %d"; + public static final String SEGMENT_NOT_ENOUGH_SPACE = "Segment not enough space"; + public static final String SEGMENT_NOT_ENOUGH_SPACE_AFTER_SPLIT_FMT = + "Segment not enough space even after split and compact to insert: %s"; + public static final String SEGMENT_NOT_FOUND_FMT = "Segment(index:%d) not found in page(index:%d)."; + public static final String SEGMENT_IS_NOT_LAST_FMT = + "Segment(index:%d) is not the last segment within the page"; + public static final String NO_SPLITTABLE_SEGMENT_FOUND_FMT = + "No splittable segment found in page [%s]"; + public static final String PBTREE_FILE_LOG_CORRUPTED_FMT = + "PBTreeFileLog [%s] corrupted for [%s]."; + public static final String RECORD_DUPLICATED_FMT = "Segment has duplicated record key : %s"; + public static final String PBTREE_FILE_NOT_EXISTS_FMT = "PBTree file [%s] not exists."; + public static final String SCHEMA_PAGE_OVERFLOW_FMT = + "Page [%s] in pbtree file runs out of space or contains too many segments."; + public static final String SOURCE_PATH_DELETED_FMT = "The source path [%s] is deleted"; + public static final String BROKEN_VIEW_UNMATCHED_FMT = + "View is broken! The source path [%s] maps to unmatched %s path(s): %s."; + public static final String INSERT_NON_WRITABLE_VIEW_FMT = + "Can not insert data to a view which is not alias series. (View path: %s)"; + public static final String INSERT_NON_WRITABLE_VIEW = + "Can not insert data to a view which is not alias series."; + public static final String DATABASE_NOT_SET = "Database is not set"; + public static final String DUPLICATE_INSERTION_WRONG_MESSAGE = + "Insertion is illegal because measurement [%s] under device [%s] is duplicate."; + public static final String VIEW_IS_UNSUPPORTED_FMT = "View unsupported, because: %s"; + public static final String VIEW_CONTAINS_AGGREGATION_FUNCTION_FMT = + "This view contains aggregation function(s) named [%s]"; + public static final String EXCEPTION_OPERATORCONTEXT_IS_NULL_D15B1EDB = "operatorContext is null"; + public static final String EXCEPTION_CHILD_OPERATOR_IS_NULL_8860113C = "child operator is null"; + public static final String EXCEPTION_DOT_9D9B854A = "."; + public static final String EMPTY_MESSAGE = ""; + public static final String EXCEPTION_COMMA_50AD1C01 = ", "; + } diff --git a/iotdb-core/datanode/src/main/i18n/en/org/apache/iotdb/db/i18n/StorageEngineMessages.java b/iotdb-core/datanode/src/main/i18n/en/org/apache/iotdb/db/i18n/StorageEngineMessages.java index cb90fac0b068c..b9c81b1d8aa2d 100644 --- a/iotdb-core/datanode/src/main/i18n/en/org/apache/iotdb/db/i18n/StorageEngineMessages.java +++ b/iotdb-core/datanode/src/main/i18n/en/org/apache/iotdb/db/i18n/StorageEngineMessages.java @@ -495,6 +495,22 @@ private StorageEngineMessages() {} public static final String FAILED_TO_CREATE_TARGET_DIR = "Failed to create target directory "; public static final String FAILED_LOAD_ACTIVE_LISTENING_DIRS = "Failed to load active listening dirs"; public static final String INVALID_PARAMETER = "Invalid parameter '"; + public static final String INVALID_PARAMETER_FOR_LOAD_TSFILE_COMMAND = + "Invalid parameter '%s' for LOAD TSFILE command."; + public static final String LOAD_TSFILE_DATABASE_KEY_AND_NAME_CANNOT_COEXIST = + "The parameter key '%s' and '%s' cannot co-exist."; + public static final String DATABASE_LEVEL_LESS_THAN_MINIMUM = + "Given database level %d is less than the minimum value %d, please input a valid database level."; + public static final String DATABASE_LEVEL_NOT_VALID_INTEGER = + "Given database level %s is not a valid integer, please input a valid database level."; + public static final String ON_SUCCESS_VALUE_NOT_SUPPORTED = + "Given on-success value '%s' is not supported, please input a valid on-success value."; + public static final String PARAMETER_VALUE_NOT_SUPPORTED_BOOLEAN = + "Given %s value '%s' is not supported, please input a valid boolean value."; + public static final String TABLET_CONVERSION_THRESHOLD_NON_NEGATIVE = + "Tablet conversion threshold must be a non-negative long value."; + public static final String TABLET_CONVERSION_THRESHOLD_NOT_VALID_LONG = + "Tablet conversion threshold '%s' is not a valid long value."; public static final String UTILITY_CLASS = "Utility class"; public static final String TSFILE_DATA_BYTE_ARRAY_SIZE_MISMATCH = "TsFileData byte array read error, size mismatch."; public static final String UNKNOWN_TSFILE_DATA_TYPE = "Unknown TsFileData type: "; @@ -531,4 +547,928 @@ private StorageEngineMessages() {} public static final String FAILED_TO_FIND_DATA_REGION = "Failed to create state machine for consensus group %s, because data region does not exist"; public static final String DATA_REGION_IS_NULL = "Data region is null"; + // --------------------------------------------------------------------------- + // Additional log messages + // --------------------------------------------------------------------------- + public static final String STORAGE_LOG_STORAGE_ENGINE_RECOVER_COST_S_C8AEE9D9 = + "Storage Engine recover cost: {}s."; + public static final String STORAGE_LOG_DATA_REGIONS_HAVE_BEEN_RECOVERED_D5BD3A80 = + "Data regions have been recovered {}/{}"; + public static final String STORAGE_LOG_TSFILE_RESOURCE_RECOVER_COST_S_41F074E0 = + "TsFile Resource recover cost: {}s."; + public static final String STORAGE_LOG_CONSTRUCT_A_DATA_REGION_INSTANCE_THE_DATABASE_IS_THREAD_17A16BDF = + "construct a data region instance, the database is {}, Thread is {}"; + public static final String STORAGE_LOG_DATAREGION_NOT_FOUND_ON_THIS_DATANODE_WHEN_WRITING_PIECE_E5B5A888 = + "DataRegion {} not found on this DataNode when writing piece nodeof TsFile {} (maybe due to " + + "region migration), will skip."; + public static final String STORAGE_LOG_IO_ERROR_WHEN_WRITING_PIECE_NODE_OF_TSFILE_TO_DATAREGION_946738F2 = + "IO error when writing piece node of TsFile {} to DataRegion {}."; + public static final String STORAGE_LOG_EXCEPTION_OCCURRED_WHEN_WRITING_PIECE_NODE_OF_TSFILE_TO_9EDD09BD = + "Exception occurred when writing piece node of TsFile {} to DataRegion {}."; + public static final String STORAGE_LOG_FAILED_TO_RECOVER_DATA_REGION_804B162D = + "Failed to recover data region {}[{}]"; + public static final String STORAGE_LOG_ERROR_OCCURS_WHEN_DELETING_DATA_REGION_8C07B7A0 = + "Error occurs when deleting data region {}-{}"; + public static final String STORAGE_LOG_NEXT_LOAD_CLEANUP_TASK_IS_NOT_READY_TO_RUN_WAIT_FOR_AT_LEAST_CBE0023F = + "Next load cleanup task {} is not ready to run, wait for at least {} ms ({}s)."; + public static final String STORAGE_LOG_WRITER_FOR_PARTITION_IS_ALREADY_WRITING_CHUNK_GROUP_FOR_903B1D66 = + "Writer {} for partition {} is already writing chunk group for device {}, but the last " + + "device is {}. "; + public static final String STORAGE_LOG_CAN_NOT_CREATE_MODIFICATIONFILE_FOR_WRITING_17D14C11 = + "Can not create ModificationFile {} for writing."; + public static final String STORAGE_LOG_SKIP_RECOVERING_DATA_REGION_WHEN_CONSENSUS_PROTOCOL_IS_RATIS_43A6A699 = + "Skip recovering data region {}[{}] when consensus protocol is ratis and storage engine is " + + "not ready."; + public static final String STORAGE_LOG_WON_T_INSERT_TABLET_BECAUSE_C2DC8032 = + "Won't insert tablet {}, because {}"; + public static final String STORAGE_LOG_TIMESTAMP_MEASUREMENTID_IDEVICEID_04A5AE37 = + "timestamp {}, measurementId {}, ideviceId {}"; + public static final String STORAGE_LOG_DELETION_SKIPPED_FILE_TIME_DD653236 = + "[Deletion] {} skipped {}, file time [{}, {}]"; + public static final String STORAGE_LOG_DEVICE_IS_DEVICETABLE_IS_TABLEDELETIONENTRY_GETPREDICATE_E84489E9 = + "device is {}, deviceTable is {}, tableDeletionEntry.getPredicate().matches(device) is {}"; + public static final String STORAGE_LOG_TABLENAME_IS_MATCHSIZE_IS_ONLYONETABLE_IS_E20FAFAE = + "tableName is {}, matchSize is {}, onlyOneTable is {}"; + public static final String STORAGE_LOG_TABLENAME_IS_DEVICE_IS_DELETIONSTARTTIME_IS_DELETIONENDTIME_B881E677 = + "tableName is {}, device is {}, deletionStartTime is {}, deletionEndTime is {}, " + + "fileStartTime is {}, fileEndTime is {}"; + public static final String STORAGE_LOG_DELETE_TSFILERESOURCE_IS_29F5A98C = + "delete tsFileResource is {}"; + public static final String STORAGE_LOG_DELETETSFILECOMPLETELY_EXECUTE_SUCCESSFUL_ALL_TSFILE_ARE_D81FE0D7 = + "deleteTsFileCompletely execute successful, all tsfile are deleted successfully"; + public static final String STORAGE_LOG_DELETION_DELETION_WRITTEN_INTO_MODS_FILE_F5E26D2A = + "[Deletion] Deletion {} written into mods file:{}."; + public static final String STORAGE_LOG_DATABASE_SYSTEM_DIRECTORY_DOESN_T_EXIST_CREATE_IT_9C0E7C68 = + "Database system Directory {} doesn't exist, create it"; + public static final String STORAGE_LOG_DATA_REGION_DIRECTORY_DOESN_T_EXIST_CREATE_IT_EFB0AE77 = + "Data region directory {} doesn't exist, create it"; + public static final String STORAGE_LOG_THE_TSFILES_OF_DATA_REGION_HAS_RECOVERED_E17384CF = + "The TsFiles of data region {}[{}] has recovered {}/{}."; + public static final String STORAGE_LOG_THE_TSFILES_OF_DATA_REGION_HAS_RECOVERED_COMPLETELY_0D79FC83 = + "The TsFiles of data region {}[{}] has recovered completely {}/{}."; + public static final String STORAGE_LOG_THE_DATA_REGION_IS_CREATED_SUCCESSFULLY_B991F1D4 = + "The data region {}[{}] is created successfully"; + public static final String STORAGE_LOG_THE_DATA_REGION_IS_RECOVERED_SUCCESSFULLY_5AAFF7B7 = + "The data region {}[{}] is recovered successfully"; + public static final String STORAGE_LOG_WON_T_INSERT_TABLET_BECAUSE_REGION_IS_DELETED_34D893A7 = + "Won't insert tablet {}, because region is deleted"; + public static final String STORAGE_LOG_ASYNC_CLOSE_TSFILE_FILE_START_TIME_FILE_END_TIME_65020832 = + "Async close tsfile: {}, file start time: {}, file end time: {}"; + public static final String STORAGE_LOG_WILL_CLOSE_ALL_FILES_FOR_DELETING_DATA_FOLDER_93A5B15E = + "{} will close all files for deleting data folder {}"; + public static final String STORAGE_LOG_WILL_CLOSE_ALL_FILES_FOR_DELETING_DATA_FILES_7768D429 = + "{} will close all files for deleting data files"; + public static final String STORAGE_LOG_EXCEED_SEQUENCE_MEMTABLE_FLUSH_INTERVAL_SO_FLUSH_WORKING_23513D66 = + "Exceed sequence memtable flush interval, so flush working memtable of time partition {} in " + + "database {}[{}]"; + public static final String STORAGE_LOG_EXCEED_UNSEQUENCE_MEMTABLE_FLUSH_INTERVAL_SO_FLUSH_WORKING_BADB0B75 = + "Exceed unsequence memtable flush interval, so flush working memtable of time partition {} " + + "in database {}[{}]"; + public static final String STORAGE_LOG_START_TO_WAIT_TSFILES_TO_CLOSE_SEQ_FILES_UNSEQ_FILES_441F7130 = + "Start to wait TsFiles to close, seq files: {}, unseq files: {}"; + public static final String STORAGE_LOG_ASYNC_FORCE_CLOSE_ALL_FILES_IN_DATABASE_076AB4B9 = + "async force close all files in database: {}"; + public static final String STORAGE_LOG_FORCE_CLOSE_ALL_PROCESSORS_IN_DATABASE_68C9EB60 = + "force close all processors in database: {}"; + public static final String STORAGE_LOG_WILL_DELETE_DATA_FILES_DIRECTLY_FOR_DELETING_DATA_BETWEEN_289DD3BF = + "{} will delete data files directly for deleting data between {} and {}"; + public static final String STORAGE_LOG_DELETION_DELETION_IS_WRITTEN_INTO_MOD_FILES_DDCDF0AD = + "[Deletion] Deletion {} is written into {} mod files"; + public static final String STORAGE_LOG_TTL_START_TTL_AND_MODIFICATION_CHECKING_A37AB173 = + "[TTL] {}-{} Start ttl and modification checking."; + public static final String STORAGE_LOG_TTL_TOTALLY_SELECT_ALL_OUTDATED_FILES_AND_PARTIAL_OUTDATED_5246BD61 = + "[TTL] {}-{} Totally select {} all-outdated files and {} partial-outdated files."; + public static final String STORAGE_LOG_WON_T_LOAD_TSFILE_BECAUSE_REGION_IS_DELETED_0E72E8D0 = + "Won't load TsFile {}, because region is deleted"; + public static final String STORAGE_LOG_TSFILE_MUST_BE_RENAMED_TO_FOR_LOADING_INTO_THE_UNSEQUENCE_70321619 = + "TsFile {} must be renamed to {} for loading into the unsequence list."; + public static final String STORAGE_LOG_LOAD_TSFILE_IN_UNSEQUENCE_LIST_MOVE_FILE_FROM_TO_21E11AEB = + "Load tsfile in unsequence list, move file from {} to {}"; + public static final String STORAGE_LOG_MOVE_TSFILE_TO_TARGET_DIR_SUCCESSFULLY_57288783 = + "Move tsfile {} to target dir {} successfully."; + public static final String STORAGE_LOG_WON_T_INSERT_TABLETS_BECAUSE_REGION_IS_DELETED_48E9720F = + "Won't insert tablets {}, because region is deleted"; + public static final String STORAGE_LOG_HAS_SPENT_S_TO_WAIT_FOR_CLOSING_ALL_TSFILES_6C3EE4CE = + "{} has spent {}s to wait for closing all TsFiles."; + public static final String STORAGE_LOG_SSEQ_FILES_UNSEQ_FILES_918AEB2A = + "Sseq files: {}, unseq files: {}"; + public static final String STORAGE_LOG_UNRECOGNIZED_LASTCACHELOADSTRATEGY_FALL_BACK_TO_CLEAN_ALL_C200F32D = + "Unrecognized LastCacheLoadStrategy: {}, fall back to CLEAN_ALL"; + public static final String STORAGE_LOG_FILE_RENAMING_FAILED_WHEN_LOADING_TSFILE_ORIGIN_TARGET_28E43D85 = + "File renaming failed when loading tsfile. Origin: {}, Target: {}"; + public static final String STORAGE_LOG_FILE_RENAMING_FAILED_WHEN_LOADING_RESOURCE_FILE_ORIGIN_TARGET_9C22DDF3 = + "File renaming failed when loading .resource file. Origin: {}, Target: {}"; + public static final String STORAGE_LOG_FILE_RENAMING_FAILED_WHEN_LOADING_MOD_FILE_ORIGIN_TARGET_18A212F3 = + "File renaming failed when loading .mod file. Origin: {}, Target: {}"; + public static final String STORAGE_LOG_EXCEPTION_OCCURS_WHEN_DELETING_DATA_REGION_FOLDER_FOR_8ABCF5D1 = + "Exception occurs when deleting data region folder for {}-{}"; + public static final String STORAGE_LOG_FAIL_TO_RECOVER_UNSEALED_TSFILE_SKIP_IT_CA576205 = + "Fail to recover unsealed TsFile {}, skip it."; + public static final String STORAGE_LOG_REMOTE_REQUEST_CONFIG_NODE_FAILED_THAT_JUDGMENT_IF_TABLE_25FE3602 = + "Remote request config node failed that judgment if table is exist, occur exception. {}"; + public static final String STORAGE_LOG_DUE_TSTABLE_IS_NULL_TABLE_SCHEMA_CAN_T_BE_GOT_LEADER_NODE_C3EF524D = + "Due tsTable is null, table schema can't be got, leader node occur special situation need to " + + "resolve."; + public static final String STORAGE_LOG_DISK_SPACE_IS_INSUFFICIENT_WHEN_CREATING_TSFILE_PROCESSOR_4032BAF0 = + "disk space is insufficient when creating TsFile processor, change system mode to read-only"; + public static final String STORAGE_LOG_MEET_IOEXCEPTION_WHEN_CREATING_TSFILEPROCESSOR_CHANGE_SYSTEM_4337F729 = + "meet IOException when creating TsFileProcessor, change system mode to error"; + public static final String STORAGE_LOG_CLOSEFILENODECONDITION_ERROR_OCCURS_WHILE_WAITING_FOR_CLOSING_F33B72A6 = + "CloseFileNodeCondition error occurs while waiting for closing the storage group {}"; + public static final String STORAGE_LOG_CLOSEFILENODECONDITION_ERROR_OCCURS_WHILE_WAITING_FOR_CLOSING_C4B97CC0 = + "CloseFileNodeCondition error occurs while waiting for closing tsfile processors of {}"; + public static final String STORAGE_LOG_FAILED_TO_APPEND_THE_TSFILE_TO_DATABASE_PROCESSOR_BECAUSE_670341AE = + "Failed to append the tsfile {} to database processor {} because the disk space is " + + "insufficient."; + public static final String STORAGE_LOG_GET_TIMESERIES_METADATA_IN_FILE_FROM_CACHE_36652729 = + "Get timeseries: {}.{} metadata in file: {} from cache: {}."; + public static final String STORAGE_LOG_TIMESERIESMETADATACACHE_SIZE_E31733D3 = + "TimeSeriesMetadataCache size = {}"; + public static final String STORAGE_LOG_FLUSH_TASK_OF_DATABASE_MEMTABLE_IS_CREATED_FLUSHING_TO_FILE_E44B3AA0 = + "flush task of database {} memtable is created, flushing to file {}."; + public static final String STORAGE_LOG_DATABASE_MEMTABLE_FLUSHING_INTO_FILE_DATA_SORT_TIME_COST_3D39AA17 = + "Database {} memtable flushing into file {}: data sort time cost {} ms."; + public static final String STORAGE_LOG_DATABASE_MEMTABLE_FLUSHING_TO_FILE_STARTS_TO_ENCODING_DATA_6A89F32E = + "Database {} memtable flushing to file {} starts to encoding data."; + public static final String STORAGE_LOG_DATABASE_MEMTABLE_FLUSHING_TO_FILE_START_IO_CB72C2DA = + "Database {} memtable flushing to file {} start io."; + public static final String STORAGE_LOG_FLUSHING_A_MEMTABLE_TO_FILE_IN_DATABASE_IO_COST_MS_2306578A = + "flushing a memtable to file {} in database {}, io cost {}ms"; + public static final String STORAGE_LOG_DATABASE_MEMTABLE_FLUSHING_TO_FILE_ENCODING_TASK_IS_INTERRUPTED_9D7BF4EF = + "Database {} memtable flushing to file {}, encoding task is interrupted."; + public static final String STORAGE_LOG_DATABASE_MEMTABLE_IO_TASK_MEETS_ERROR_EC383D33 = + "Database {} memtable {}, io task meets error."; + public static final String STORAGE_LOG_OLD_RATIO_FILE_DOESN_T_EXIST_FORCE_CREATE_RATIO_FILE_74EDD7DB = + "Old ratio file {} doesn't exist, force create ratio file {}"; + public static final String STORAGE_LOG_COMPRESSION_RATIO_FILE_UPDATED_PREVIOUS_CURRENT_7A9EEDF8 = + "Compression ratio file updated, previous: {}, current: {}"; + public static final String STORAGE_LOG_AFTER_RESTORING_FROM_COMPRESSION_RATIO_FILE_TOTAL_MEMORY_D5ACB1C4 = + "After restoring from compression ratio file, total memory size = {}, total disk size = {}"; + public static final String STORAGE_LOG_THE_COMPRESSION_RATIO_IS_NEGATIVE_CURRENT_MEMTABLESIZE_TOTALMEMTABLESIZE_8C3DD017 = + "The compression ratio is negative, current memTableSize: {}, totalMemTableSize: {}"; + public static final String STORAGE_LOG_REBOOT_WAL_DELETE_THREAD_SUCCESSFULLY_CURRENT_PERIOD_IS_44B69C7A = + "Reboot wal delete thread successfully, current period is {} ms"; + public static final String STORAGE_LOG_WAL_DISK_USAGE_IS_LARGER_THAN_THE_WAL_THROTTLE_THRESHOLD_2396FFCC = + "WAL disk usage {} is larger than the wal_throttle_threshold_in_byte * 0.8 {}, please check " + + "your write load, iot consensus and the pipe module. It's better to allocate more disk for " + + "WAL."; + public static final String STORAGE_LOG_FLUSH_A_WORKING_MEMTABLE_IN_ASYNC_CLOSE_TSFILE_MEMTABLE_00158706 = + "{}: flush a working memtable in async close tsfile {}, memtable size: {}, tsfile size: {}, " + + "plan index: [{}, {}], progress index: {}"; + public static final String STORAGE_LOG_FLUSH_A_NOTIFYFLUSHMEMTABLE_IN_ASYNC_CLOSE_TSFILE_TSFILE_48D1E75A = + "{}: flush a NotifyFlushMemTable in async close tsfile {}, tsfile size: {}"; + public static final String STORAGE_LOG_MEMTABLE_SIGNAL_IS_ADDED_INTO_THE_FLUSHING_MEMTABLE_QUEUE_5D9DA8DB = + "{}: {} Memtable (signal = {}) is added into the flushing Memtable, queue size = {}"; + public static final String STORAGE_LOG_MEMTABLE_SIGNAL_IS_REMOVED_FROM_THE_QUEUE_LEFT_DFDB97D2 = + "{}: {} memtable (signal={}) is removed from the queue. {} left."; + public static final String STORAGE_LOG_MEM_CONTROL_FLUSH_FINISHED_TRY_TO_RESET_SYSTEM_MEM_COST_3CD8399C = + "[mem control] {}: {} flush finished, try to reset system mem cost, flushing memtable list " + + "size: {}"; + public static final String STORAGE_LOG_FLUSH_FINISHED_REMOVE_A_MEMTABLE_FROM_FLUSHING_LIST_FLUSHING_08A00750 = + "{}: {} flush finished, remove a memtable from flushing list, flushing memtable list size: {}"; + public static final String STORAGE_LOG_RELEASED_A_MEMTABLE_SIGNAL_FLUSHINGMEMTABLES_SIZE_6D22169F = + "{}: {} released a memtable (signal={}), flushingMemtables size ={}"; + public static final String STORAGE_LOG_TRY_GET_LOCK_TO_RELEASE_A_MEMTABLE_SIGNAL_B9098E21 = + "{}: {} try get lock to release a memtable (signal={})"; + public static final String STORAGE_LOG_FLUSHINGMEMTABLES_IS_EMPTY_AND_WILL_CLOSE_THE_FILE_22A07A5C = + "{}: {} flushingMemtables is empty and will close the file"; + public static final String STORAGE_LOG_TRY_TO_GET_FLUSHINGMEMTABLES_LOCK_F91EA27F = + "{}: {} try to get flushingMemtables lock."; + public static final String STORAGE_LOG_RELEASE_FLUSHQUERYLOCK_6DF2C0FC = + "{}: {} release flushQueryLock"; + public static final String STORAGE_LOG_DELETION_DELETION_WITH_IN_WORKMEMTABLE_POINTS_DELETED_00EA995A = + "[Deletion] Deletion with {} in workMemTable, {} points deleted"; + public static final String STORAGE_LOG_SYNC_CLOSE_FILE_WILL_FIRSTLY_ASYNC_CLOSE_IT_34588A7D = + "Sync close file: {}, will firstly async close it"; + public static final String STORAGE_LOG_ASYNC_FLUSH_A_MEMTABLE_TO_TSFILE_00ED383A = + "Async flush a memtable to tsfile: {}"; + public static final String STORAGE_LOG_THIS_NORMAL_MEMTABLE_IS_EMPTY_SKIP_FLUSH_6C195557 = + "This normal memtable is empty, skip flush. {}: {}"; + public static final String STORAGE_LOG_IS_CLOSED_DURING_FLUSH_ABANDON_FLUSH_TASK_DD47632F = + "{}: {} is closed during flush, abandon flush task"; + public static final String STORAGE_LOG_THE_COMPRESSION_RATIO_OF_TSFILE_IS_TOTALMEMTABLESIZE_THE_8CE66BE3 = + "The compression ratio of tsfile {} is {}, totalMemTableSize: {}, the file size: {}"; + public static final String STORAGE_LOG_STORAGE_GROUP_CLOSE_AND_REMOVE_EMPTY_FILE_72D42293 = + "Storage group {} close and remove empty file {}"; + public static final String STORAGE_LOG_PUT_THE_MEMTABLE_SIGNAL_OUT_OF_FLUSHINGMEMTABLES_BUT_IT_D78AF257 = + "{}: {} put the memtable (signal={}) out of flushingMemtables but it is not in the queue."; + public static final String STORAGE_LOG_MEET_ERROR_WHEN_FLUSH_FILEMETADATA_TO_RETRY_IT_AGAIN_DAAF298C = + "{} meet error when flush FileMetadata to {}, retry it again"; + public static final String STORAGE_LOG_ASYNC_CLOSE_FAILED_BECAUSE_C5B63B78 = + "{}: {} async close failed, because"; + public static final String STORAGE_LOG_ADD_A_MEMTABLE_INTO_FLUSHING_LIST_FAILED_30FA8E58 = + "{}: {} add a memtable into flushing list failed"; + public static final String STORAGE_LOG_MEET_ERROR_WHEN_FLUSHING_A_MEMTABLE_CHANGE_SYSTEM_MODE_TO_0C6D5025 = + "{}: {} meet error when flushing a memtable, change system mode to error"; + public static final String STORAGE_LOG_IOTASK_MEETS_ERROR_TRUNCATE_THE_CORRUPTED_DATA_E9041D54 = + "{}: {} IOTask meets error, truncate the corrupted data"; + public static final String STORAGE_LOG_TRUNCATE_CORRUPTED_DATA_MEETS_ERROR_3757A85E = + "{}: {} Truncate corrupted data meets error"; + public static final String STORAGE_LOG_RELEASE_RESOURCE_MEETS_ERROR_B62CBC3A = + "{}: {} Release resource meets error"; + public static final String STORAGE_LOG_MEET_ERROR_WHEN_WRITING_INTO_MODIFICATIONFILE_FILE_OF_63B5E24A = + "Meet error when writing into ModificationFile file of {} "; + public static final String STORAGE_LOG_MARKING_OR_ENDING_FILE_MEET_ERROR_5653B904 = + "{}: {} marking or ending file meet error"; + public static final String STORAGE_LOG_TRUNCATE_CORRUPTED_DATA_MEETS_ERROR_8F721CC1 = + "{}: {} truncate corrupted data meets error"; + public static final String STORAGE_LOG_MEET_ERROR_WHEN_FLUSH_FILEMETADATA_TO_CHANGE_SYSTEM_MODE_0BC79DA5 = + "{} meet error when flush FileMetadata to {}, change system mode to error"; + public static final String STORAGE_LOG_UPDATE_COMPRESSION_RATIO_FAILED_8A076DFC = + "{}: {} update compression ratio failed"; + public static final String STORAGE_LOG_GET_READONLYMEMCHUNK_HAS_ERROR_2366DE2A = + "{}: {} get ReadOnlyMemChunk has error"; + public static final String STORAGE_LOG_FAILED_TO_TRANSFER_TVLIST_MEMORY_OWNER_TO_QUERY_ENGINE_0DFA506D = + "Failed to transfer tvlist memory owner to query engine, {}"; + public static final String STORAGE_LOG_THE_FORMAT_OF_MAX_POINT_NUMBER_IS_NOT_CORRECT_USING_DEFAULT_1B78AF69 = + "The format of MAX_POINT_NUMBER {} is not correct. Using default float precision."; + public static final String STORAGE_LOG_THE_MAX_POINT_NUMBER_SHOULDN_T_BE_LESS_THAN_0_USING_DEFAULT_12745217 = + "The MAX_POINT_NUMBER shouldn't be less than 0. Using default float precision {}."; + public static final String STORAGE_LOG_FAIL_TO_READ_MOD_FILE_EXPECTING_OFFSET_ACTUALLY_SKIPPED_8B96B670 = + "Fail to read Mod file {}, expecting offset {}, actually skipped {}"; + public static final String STORAGE_LOG_AFTER_THE_MOD_FILE_IS_SETTLED_THE_FILE_SIZE_IS_STILL_GREATER_FA454979 = + "After the mod file is settled, the file size is still greater than 1M,the size of the file " + + "before settle is {},after settled the file size is {}"; + public static final String STORAGE_LOG_THE_START_TIME_OF_IS_GREATER_THAN_END_TIME_44DD784A = + "{} {} the start time of {} is greater than end time"; + public static final String STORAGE_LOG_THERE_IS_NO_DATA_IN_THE_FILE_F480954E = + "{} {} there is no data in the file"; + public static final String STORAGE_LOG_CHUNK_START_OFFSET_IS_INCONSISTENT_WITH_THE_VALUE_IN_THE_E1E7AF07 = + "{} chunk start offset is inconsistent with the value in the metadata."; + public static final String STORAGE_LOG_TIME_RANGES_OVERLAP_BETWEEN_PAGES_2A131465 = + "{} {} time ranges overlap between pages."; + public static final String STORAGE_LOG_THE_TIMESTAMP_IN_THE_PAGE_IS_REPEATED_OR_NOT_INCREMENTAL_04627FDA = + "{} {} the timestamp in the page is repeated or not incremental."; + public static final String STORAGE_LOG_THE_START_TIME_IN_PAGE_IS_DIFFERENT_FROM_THAT_IN_PAGE_HEADER_C23CE8D4 = + "{} {} the start time in page is different from that in page header."; + public static final String STORAGE_LOG_THE_END_TIME_IN_PAGE_IS_DIFFERENT_FROM_THAT_IN_PAGE_HEADER_5E363FAB = + "{} {} the end time in page is different from that in page header."; + public static final String STORAGE_LOG_DEVICE_ID_IS_NULL_OR_EMPTY_635DD75C = + "{} {} device id is null or empty."; + public static final String STORAGE_LOG_DEVICE_IS_OVERLAPPED_BETWEEN_AND_END_TIME_IN_IS_START_TIME_BA49D2AA = + "Device {} is overlapped between {} and {}, end time in {} is {}, start time in {} is {}"; + public static final String STORAGE_LOG_PATH_FILE_IS_NOT_SATISFIED_BECAUSE_OF_NO_DEVICE_8BB15136 = + "Path: {} file {} is not satisfied because of no device!"; + public static final String STORAGE_LOG_PATH_FILE_IS_NOT_SATISFIED_BECAUSE_OF_TIME_FILTER_71121709 = + "Path: {} file {} is not satisfied because of time filter!"; + public static final String STORAGE_LOG_STARTTIME_OF_TSFILERESOURCE_IS_GREATER_THAN_ITS_ENDTIME_BC6CC591 = + "startTime[{}] of TsFileResource[{}] is greater than its endTime[{}]"; + public static final String STORAGE_LOG_MEET_ERROR_WHEN_GETSTARTTIME_OF_IN_FILE_D7F27B92 = + "meet error when getStartTime of {} in file {}"; + public static final String STORAGE_LOG_MEET_ERROR_WHEN_GETENDTIME_OF_IN_FILE_350DA42F = + "meet error when getEndTime of {} in file {}"; + public static final String STORAGE_LOG_CANNOT_SERIALIZE_TSFILERESOURCE_WHEN_UPDATING_PLAN_INDEX_69665DD5 = + "Cannot serialize TsFileResource {} when updating plan index {}-{}"; + public static final String STORAGE_LOG_DATAREGIONSYSDIR_HAS_EXISTED_FILEPATH_53009475 = + "DataRegionSysDir has existed,filePath:{}"; + public static final String STORAGE_LOG_FILETIMEINDEX_LOG_FILE_CREATE_FILED_FILEPATH_D675FBD5 = + "FileTimeIndex log file create filed,filePath:{}"; + public static final String STORAGE_LOG_CAN_T_READ_FILE_FROM_DISK_F5625609 = + "Can't read file {} from disk "; + public static final String STORAGE_LOG_FAILED_TO_GET_DEVICES_FROM_TSFILE_F94CF47B = + "Failed to get devices from tsfile: {}"; + public static final String STORAGE_LOG_TABLEDISKUSAGEINDEX_WORKER_THREAD_WAS_INTERRUPTED_UNEXPECTEDLY_A21172AB = + "TableDiskUsageIndex worker thread was interrupted unexpectedly while waiting for operations."; + public static final String STORAGE_LOG_SKIP_ADDING_OPERATION_TO_QUEUE_BECAUSE_TABLEDISKUSAGEINDEX_4A606B40 = + "Skip adding operation {} to queue because TableDiskUsageIndex has been stopped."; + public static final String STORAGE_LOG_ATTEMPT_TO_DECREASE_ACTIVEREADERNUM_WHEN_IT_IS_ALREADY_0_73756CBB = + "Attempt to decrease activeReaderNum when it is already 0. This may indicate an incorrect " + + "reader lifecycle management."; + public static final String STORAGE_LOG_FAILED_TO_DELETE_OLD_VERSION_TABLE_SIZE_INDEX_FILE_05930C4A = + "Failed to delete old version table size index file {}"; + public static final String STORAGE_LOG_FAILED_TO_READ_TABLE_TSFILE_SIZE_INDEX_AFTER_POSITION_AND_74251AF3 = + "Failed to read table tsfile size index {} after position: {} and {} after position: {}"; + public static final String STORAGE_LOG_COMPACTIONSCHEDULETASKWORKER_COMPACTION_SCHEDULE_IS_INTERRUPTED_9EF702D1 = + "[CompactionScheduleTaskWorker-{}] compaction schedule is interrupted, isStopByUser: {}"; + public static final String STORAGE_LOG_COMPACTIONSCHEDULETASKWORKER_FAILED_TO_EXECUTE_COMPACTION_4F302761 = + "[CompactionScheduleTaskWorker-{}] Failed to execute compaction schedule task"; + public static final String STORAGE_LOG_COMPACTIONSCHEDULETASKWORKER_FAILED_TO_EXECUTE_COMPACTION_E571F6E3 = + "[CompactionScheduleTaskWorker-{}] Failed to execute compaction schedule task and cannot " + + "recover"; + public static final String STORAGE_LOG_COMPACTION_SCHEDULE_TASK_THREAD_POOL_CAN_NOT_BE_CLOSED_IN_27D38188 = + "compaction schedule task thread pool can not be closed in {} ms"; + public static final String STORAGE_LOG_TTLCHECKTASK_TTL_CHECKER_IS_INTERRUPTED_ISSTOPPEDBYUSER_B1E45A2E = + "[TTLCheckTask-{}] TTL checker is interrupted, isStoppedByUser: {}"; + public static final String STORAGE_LOG_TTLCHECKTASK_FAILED_TO_EXECUTE_TTL_CHECK_AND_CANNOT_RECOVER_6F4E4A13 = + "[TTLCheckTask-{}] Failed to execute ttl check and cannot recover"; + public static final String STORAGE_LOG_COMPACTION_TASK_START_CHECK_FAILED_BECAUSE_DISK_FREE_RATIO_9D2BE2FE = + "Compaction task start check failed because disk free ratio is less than " + + "disk_space_warning_threshold"; + public static final String STORAGE_LOG_MEET_ERROR_WHEN_ADDING_TASK_TO_COMPACTION_WAITING_QUEUE_84AA345D = + "meet error when adding task-{} to compaction waiting queue: {}"; + public static final String STORAGE_LOG_SETTLE_COMPLETES_FILE_PATH_THE_REMAINING_FILE_TO_BE_SETTLED_32DF95A7 = + "Settle completes, file path:{} , the remaining file to be settled num: {}"; + public static final String STORAGE_LOG_THE_TSFILE_SHOULD_BE_SEALED_WHEN_SETTLING_8DBD716A = + "The tsFile {} should be sealed when settling."; + public static final String STORAGE_LOG_MEET_ERROR_WHEN_SETTLING_FILE_CBA0F9D7 = + "meet error when settling file:{}"; + public static final String STORAGE_LOG_MEET_ERROR_WHEN_READ_TSFILE_RESOURCE_FILE_IT_MAY_BE_REPAIRED_A8A514C6 = + "Meet error when read tsfile resource file {}, it may be repaired after reboot"; + public static final String STORAGE_LOG_FILE_HAS_UNSORTED_DATA_1B118A14 = + "File {} has unsorted data: "; + public static final String STORAGE_LOG_FILE_HAS_WRONG_TIME_STATISTICS_4E63345E = + "File {} has wrong time statistics: "; + public static final String STORAGE_LOG_DEVICE_HAS_OVERLAPPED_DATA_START_TIME_IN_CURRENT_FILE_IS_F4F29A22 = + "Device {} has overlapped data, start time in current file {} is {}, end time in previous " + + "file {} is {}"; + public static final String STORAGE_LOG_REPAIR_DATA_LOG_IS_NOT_COMPLETE_TIME_PARTITION_IS_D9D4F01F = + "[{}][{}]Repair data log is not complete, time partition is {}."; + public static final String STORAGE_LOG_REPAIRSCHEDULER_RECOVER_UNFINISHED_REPAIR_SCHEDULE_TASK_7C5B6D5F = + "[RepairScheduler] recover unfinished repair schedule task from log file: {}"; + public static final String STORAGE_LOG_REPAIRSCHEDULER_SKIP_REPAIR_TIME_PARTITION_BECAUSE_IT_IS_BDD35739 = + "[RepairScheduler][{}][{}] skip repair time partition {} because it is repaired"; + public static final String STORAGE_LOG_REPAIRSCHEDULER_SUBMIT_A_REPAIR_TIME_PARTITION_SCAN_TASK_0E98F12C = + "[RepairScheduler] submit a repair time partition scan task {}-{}-{}"; + public static final String STORAGE_LOG_REPAIRSCHEDULER_FAILED_TO_PARSE_REPAIR_LOG_FILE_142D2568 = + "[RepairScheduler] Failed to parse repair log file {}"; + public static final String STORAGE_LOG_REPAIRSCHEDULER_FAILED_TO_RECORD_REPAIR_TASK_START_TIME_95552D7E = + "[RepairScheduler] Failed to record repair task start time in log file {}"; + public static final String STORAGE_LOG_REPAIRSCHEDULER_FAILED_TO_CLOSE_REPAIR_LOGGER_EC191F6B = + "[RepairScheduler] Failed to close repair logger {}"; + public static final String STORAGE_LOG_REPAIRSCHEDULER_START_SCAN_REPAIR_TIME_PARTITION_1D6789DB = + "[RepairScheduler][{}][{}] start scan repair time partition {}"; + public static final String STORAGE_LOG_REPAIRSCHEDULER_CANNOT_SCAN_SOURCE_FILES_IN_BECAUSE_ALLOWCOMPACTION_5E644A6D = + "[RepairScheduler] cannot scan source files in {} because 'allowCompaction' is false"; + public static final String STORAGE_LOG_REPAIRSCHEDULER_NEED_TO_REPAIR_BECAUSE_IT_HAS_INTERNAL_UNSORTED_C1596DC3 = + "[RepairScheduler] {} need to repair because it has internal unsorted data"; + public static final String STORAGE_LOG_REPAIRSCHEDULER_NEED_TO_REPAIR_BECAUSE_IT_IS_OVERLAPPED_F1AC0C78 = + "[RepairScheduler] {} need to repair because it is overlapped with other files"; + public static final String STORAGE_LOG_REPAIRSCHEDULER_TIME_PARTITION_HAS_BEEN_REPAIRED_PROGRESS_697FEA22 = + "[RepairScheduler][{}][{}] time partition {} has been repaired, progress: {}/{}"; + public static final String STORAGE_LOG_REPAIRSCHEDULER_FAILED_TO_RECORD_REPAIR_LOG_FOR_TIME_PARTITION_11251247 = + "[RepairScheduler][{}][{}] failed to record repair log for time partition {}"; + public static final String STORAGE_LOG_COMPACTION_TMP_TARGET_TSFILE_MAY_BE_DELETED_AFTER_COMPACTION_0BFFA73F = + "{} [Compaction] Tmp target tsfile {} may be deleted after compaction."; + public static final String STORAGE_LOG_COMPACTION_DELETE_TSFILE_A97320DB = + "{} [Compaction] delete TsFile {}"; + public static final String STORAGE_LOG_COMPACTION_DELETE_FILE_FAILED_FILE_PATH_IS_6E1D2670 = + "[Compaction] delete file failed, file path is {}"; + public static final String STORAGE_LOG_COMPACTION_RECOVER_FAILED_TO_RECOVER_COMPACTION_TASKINFO_24424402 = + "{} [Compaction][Recover] Failed to recover compaction. TaskInfo: {}, Exception: {}"; + public static final String STORAGE_LOG_FAILED_TO_PASS_COMPACTION_VALIDATION_SOURCE_SEQ_FILES_SOURCE_BF5A4525 = + "Failed to pass compaction validation, source seq files: {}, source unseq files: {}, target " + + "files: {}"; + public static final String STORAGE_LOG_FAILED_TO_PASS_COMPACTION_OVERLAP_VALIDATION_SOURCE_SEQ_9CFDC149 = + "Failed to pass compaction overlap validation, source seq files: {}, source unseq files: {}, " + + "target files: {}"; + public static final String STORAGE_LOG_COMPACTION_TASK_INTERRUPTED_E31121C0 = + "{}-{} [Compaction] {} task interrupted"; + public static final String STORAGE_LOG_COMPACTION_TASK_MEETS_ERROR_1002C659 = + "{}-{} [Compaction] {} task meets error: {}."; + public static final String STORAGE_LOG_UNEXPECTED_CHUNK_TYPE_DETECTED_WHEN_READING_NON_ALIGNED_1C0E4674 = + "Unexpected chunk type detected when reading non-aligned chunk reader. The chunk metadata " + + "indicates a non-aligned chunk, but the actual chunk read from tsfile is a value chunk of " + + "aligned series. tsFile={}, device={}, measurement={}, offsetOfChunkHeader={}"; + public static final String STORAGE_LOG_INNERSPACECOMPACTIONTASK_START_TO_RENAME_MODS_FILE_7C036CBD = + "{}-{} [InnerSpaceCompactionTask] start to rename mods file"; + public static final String STORAGE_LOG_REPAIRUNSORTEDFILECOMPACTIONTASK_CAN_NOT_REPAIR_UNSORTED_48124B0C = + "[RepairUnsortedFileCompactionTask] Can not repair unsorted file {} because the required " + + "memory to repair is greater than the total compaction memory budget"; + public static final String STORAGE_LOG_COMPACTION_INNERSPACECOMPACTION_TASK_STARTS_WITH_FILES_TOTAL_934B562F = + "{}-{} [Compaction] {} InnerSpaceCompaction task starts with {} files, total file size is {} " + + "MB, estimated memory cost is {} MB"; + public static final String STORAGE_LOG_COMPACTION_COMPACTION_WITH_SELECTED_FILES_SKIPPED_FILES_ACC66872 = + "{}-{} [Compaction] compaction with selected files {}, skipped files {}"; + public static final String STORAGE_LOG_COMPACTION_INNERSPACECOMPACTION_TASK_FINISHES_SUCCESSFULLY_08475DE4 = + "{}-{} [Compaction] {} InnerSpaceCompaction task finishes successfully, target files are " + + "{},time cost is {} s, compaction speed is {} MB/s, {}"; + public static final String STORAGE_LOG_COMPACTION_INSERTIONCROSSSPACECOMPACTION_TASK_STARTS_WITH_A315B8C6 = + "{}-{} [Compaction] InsertionCrossSpaceCompaction task starts with unseq file {}, nearest " + + "seq files are {}, target file name timestamp is {}, file size is {} MB."; + public static final String STORAGE_LOG_COMPACTION_INSERTIONCROSSSPACECOMPACTION_TASK_FINISHES_SUCCESSFULLY_69360DD0 = + "{}-{} [Compaction] InsertionCrossSpaceCompaction task finishes successfully, target file is " + + "{},time cost is {} s."; + public static final String STORAGE_LOG_INSERTIONCROSSSPACECOMPACTIONTASK_FAILED_TO_GENERATE_TARGET_B03E4C67 = + "{}-{} [InsertionCrossSpaceCompactionTask] failed to generate target file name, source unseq " + + "file is {}"; + public static final String STORAGE_LOG_SETTLE_TASK_DELETES_FULLY_DIRTY_TSFILE_SUCCESSFULLY_18D81225 = + "Settle task deletes fully_dirty tsfile {} successfully."; + public static final String STORAGE_LOG_COMPACTION_SETTLE_COMPACTION_FILE_LIST_IS_EMPTY_END_IT_56CF079D = + "{}-{} [Compaction] Settle compaction file list is empty, end it"; + public static final String STORAGE_LOG_COMPACTION_SETTLECOMPACTION_TASK_STARTS_WITH_FULLY_DIRTY_0962C95A = + "{}-{} [Compaction] SettleCompaction task starts with {} fully_dirty files and {} " + + "partially_dirty files. Fully_dirty files : {}, partially_dirty files : {} . Fully_dirty " + + "files size is {} MB, partially_dirty file size is {} MB. Memory cost is {} MB."; + public static final String STORAGE_LOG_COMPACTION_SETTLECOMPACTION_TASK_FINISHES_SUCCESSFULLY_TIME_2BD3839A = + "{}-{} [Compaction] SettleCompaction task finishes successfully, time cost is {} " + + "s.Fully_dirty files num is {}."; + public static final String STORAGE_LOG_COMPACTION_SETTLECOMPACTION_TASK_FINISHES_SUCCESSFULLY_TIME_4FEB0F56 = + "{}-{} [Compaction] SettleCompaction task finishes successfully, time cost is {} s, " + + "compaction speed is {} MB/s.Fully_dirty files num is {} and partially_dirty files num is {}."; + public static final String STORAGE_LOG_COMPACTION_SETTLECOMPACTION_TASK_FINISHES_WITH_SOME_ERROR_A8A15439 = + "{}-{} [Compaction] SettleCompaction task finishes with some error, time cost is {} " + + "s.Fully_dirty files num is {} and there are {} files fail to delete."; + public static final String STORAGE_LOG_COMPACTION_START_TO_SETTLE_PARTIALLY_DIRTY_FILES_TOTAL_FILE_BAC113C4 = + "{}-{} [Compaction] Start to settle {} {} partially_dirty files, total file size is {} MB"; + public static final String STORAGE_LOG_COMPACTION_FINISH_TO_SETTLE_PARTIALLY_DIRTY_FILES_SUCCESSFULLY_9ACFD5C0 = + "{}-{} [Compaction] Finish to settle {} {} partially_dirty files successfully , target file " + + "is {},time cost is {} s, compaction speed is {} MB/s, {}"; + public static final String STORAGE_LOG_COMPACTION_RECOVER_START_TO_RECOVER_SETTLE_COMPACTION_C342241D = + "{}-{} [Compaction][Recover] Start to recover settle compaction."; + public static final String STORAGE_LOG_COMPACTION_RECOVER_FINISH_TO_RECOVER_SETTLE_COMPACTION_SUCCESSFULLY_714EF642 = + "{}-{} [Compaction][Recover] Finish to recover settle compaction successfully."; + public static final String STORAGE_LOG_COMPACTION_RECOVER_COMPACTION_LOG_IS_DF6FD183 = + "{}-{} [Compaction][Recover] compaction log is {}"; + public static final String STORAGE_LOG_SETTLE_TASK_FAIL_TO_DELETE_FULLY_DIRTY_TSFILE_B7DAEA8D = + "Settle task fail to delete fully_dirty tsfile {}."; + public static final String STORAGE_LOG_COMPACTION_CROSS_SPACE_COMPACTION_FILE_LIST_IS_EMPTY_END_B8044743 = + "{}-{} [Compaction] Cross space compaction file list is empty, end it"; + public static final String STORAGE_LOG_COMPACTION_CROSSSPACECOMPACTION_TASK_STARTS_WITH_SEQ_FILES_8CDCBE0F = + "{}-{} [Compaction] CrossSpaceCompaction task starts with {} seq files and {} unsequence " + + "files. Sequence files : {}, unsequence files : {} . Sequence files size is {} MB, " + + "unsequence file size is {} MB, total size is {} MB"; + public static final String STORAGE_LOG_COMPACTION_CROSSSPACECOMPACTION_TASK_FINISHES_SUCCESSFULLY_D7F1B1FD = + "{}-{} [Compaction] CrossSpaceCompaction task finishes successfully, time cost is {} s, " + + "compaction speed is {} MB/s, {}"; + public static final String STORAGE_LOG_COMPACTION_RECOVER_RECOVER_COMPACTION_IN_DATA_REGION_DIR_ABD144CC = + "{} [Compaction][Recover] recover compaction in data region dir {}"; + public static final String STORAGE_LOG_COMPACTION_RECOVER_RECOVER_COMPACTION_IN_TIME_PARTITION_FA2FC44D = + "{} [Compaction][Recover] recover compaction in time partition dir {}"; + public static final String STORAGE_LOG_RECOVER_MODS_FILE_ERROR_ON_DELETE_ORIGIN_FILE_OR_RENAME_7033152A = + "recover mods file error on delete origin file or rename mods settle,"; + public static final String STORAGE_LOG_COMPACTION_RECOVER_COMPACTION_LOG_IS_0C57C7DA = + "{} [Compaction][Recover] compaction log is {}"; + public static final String STORAGE_LOG_COMPACTION_RECOVER_COMPACTION_LOG_FILE_EXISTS_START_TO_RECOVER_74836930 = + "{} [Compaction][Recover] compaction log file {} exists, start to recover it"; + public static final String STORAGE_LOG_COMPACTION_RECOVER_INCOMPLETE_LOG_FILE_ABORT_RECOVER_46472E7C = + "{} [Compaction][Recover] incomplete log file, abort recover"; + public static final String STORAGE_LOG_COMPACTION_RECOVER_RECOVER_COMPACTION_SUCCESSFULLY_DELETE_8451AEFB = + "{} [Compaction][Recover] Recover compaction successfully, delete log file {}"; + public static final String STORAGE_LOG_COMPACTION_RECOVER_ALL_SOURCE_FILES_EXISTS_DELETE_ALL_TARGET_79954E60 = + "{} [Compaction][Recover] all source files exists, delete all target files."; + public static final String STORAGE_LOG_COMPACTION_RECOVER_EXCEPTION_OCCURS_WHILE_DELETING_LOG_FILE_49A24E1D = + "{} [Compaction][Recover] Exception occurs while deleting log file {}"; + public static final String STORAGE_LOG_COMPACTION_RECOVER_FAILED_TO_REMOVE_TARGET_FILE_35A1E718 = + "{} [Compaction][Recover] failed to remove target file {}"; + public static final String STORAGE_LOG_COMPACTION_RECOVER_EXCEPTION_OCCURS_WHILE_DELETING_COMPACTION_218A56FB = + "{} [Compaction][Recover] Exception occurs while deleting compaction mods file"; + public static final String STORAGE_LOG_COMPACTION_EXCEPTIONHANDLER_TARGET_FILE_IS_NOT_COMPLETE_865ADA73 = + "{} [Compaction][ExceptionHandler] target file {} is not complete, and some source files is " + + "lost, do nothing."; + public static final String STORAGE_LOG_COMPACTION_RECOVER_FAILED_TO_REMOVE_FILE_EXCEPTION_67CEA8E7 = + "{} [Compaction][Recover] failed to remove file {}, exception: {}"; + public static final String STORAGE_LOG_COMPACTION_EXCEPTIONHANDLER_SPACE_COMPACTION_START_HANDLING_1B55549F = + "{} [Compaction][ExceptionHandler] {} space compaction start handling exception, source " + + "seqFiles is {}, source unseqFiles is {}."; + public static final String STORAGE_LOG_COMPACTION_EXCEPTIONHANDLER_FAIL_TO_HANDLE_SPACE_COMPACTION_B21F170F = + "[Compaction][ExceptionHandler] Fail to handle {} space compaction exception, storage group " + + "is {}"; + public static final String STORAGE_LOG_COMPACTION_EXCEPTIONHANDLER_EXCEPTION_OCCURS_WHEN_HANDLING_B6C9751E = + "[Compaction][ExceptionHandler] exception occurs when handling exception in {} space " + + "compaction. storage group is {}"; + public static final String STORAGE_LOG_COMPACTION_EXCEPTION_FAIL_TO_DELETE_TARGET_TSFILE_WHEN_HANDLING_DC19DC8A = + "{} [Compaction][Exception] fail to delete target tsfile {} when handling exception"; + public static final String STORAGE_LOG_COMPACTION_EXCEPTIONHANDLER_TARGET_FILE_IS_NOT_COMPLETE_91E81106 = + "{} [Compaction][ExceptionHandler] target file {} is not complete, and some source files {} " + + "is lost, do nothing."; + public static final String STORAGE_LOG_BATCH_COMPACTION_CURRENT_DEVICE_IS_FIRST_BATCH_COMPACTED_34910754 = + "[Batch Compaction] current device is {}, first batch compacted time chunk is {}"; + public static final String STORAGE_LOG_ADD_TSFILE_CURRENT_SELECT_FILE_NUM_IS_SIZE_IS_17E21BC9 = + "Add tsfile {}, current select file num is {}, size is {}"; + public static final String STORAGE_LOG_SELECTING_CROSS_COMPACTION_TASK_RESOURCES_FROM_SEQFILE_UNSEQFILES_F4E1ABEB = + "Selecting cross compaction task resources from {} seqFile, {} unseqFiles"; + public static final String STORAGE_LOG_SELECTING_INSERTION_CROSS_COMPACTION_TASK_RESOURCES_FROM_ECB186D1 = + "Selecting insertion cross compaction task resources from {} seqFile, {} unseqFiles"; + public static final String STORAGE_LOG_ADDING_A_NEW_UNSEQFILE_AND_SEQFILES_AS_CANDIDATES_NEW_COST_07DD0A10 = + "Adding a new unseqFile {} and seqFiles {} as candidates, new cost {}, total cost {}"; + public static final String STORAGE_LOG_SELECT_ONE_VALID_SEQ_FILE_FOR_NONOVERLAP_UNSEQ_FILE_TO_COMPACT_456668F1 = + "Select one valid seq file {} for nonOverlap unseq file to compact with."; + public static final String STORAGE_LOG_TOTAL_SOURCE_FILES_SEQFILES_UNSEQFILES_CANDIDATE_SOURCE_7511ED9E = + "{} [{}] Total source files: {} seqFiles, {} unseqFiles. Candidate source files: {} " + + "seqFiles, {} unseqFiles. Cannot select any files because they do not meet the conditions or " + + "may be occupied by other compaction threads."; + public static final String STORAGE_LOG_TOTAL_SOURCE_FILES_SEQFILES_UNSEQFILES_CANDIDATE_SOURCE_B8B01FC4 = + "{} [{}] Total source files: {} seqFiles, {} unseqFiles. Candidate source files: {} " + + "seqFiles, {} unseqFiles. Selected source files: {} seqFiles, {} unseqFiles, estimated " + + "memory cost {} MB, total selected file size is {} MB, total selected seq file size is {} " + + "MB, total selected unseq file size is {} MB, time consumption {}ms."; + public static final String STORAGE_LOG_CANNOT_SELECT_FILE_FOR_SETTLE_COMPACTION_08C958D3 = + "{}-{} cannot select file for settle compaction"; + public static final String STORAGE_LOG_HAS_NULL_CHUNK_METADATA_FILE_IS_819E4A49 = + "{} has null chunk metadata, file is {}"; + public static final String STORAGE_LOG_MODIFICATIONS_SIZE_IS_FOR_FILE_PATH_EED7FD92 = + "Modifications size is {} for file Path: {} "; + public static final String STORAGE_LOG_AN_ERROR_OCCURRED_WHEN_TRUNCATING_MODIFICATIONS_TO_SIZE_F8A0D6D5 = + "An error occurred when truncating modifications[{}] to size {}."; + public static final String STORAGE_LOG_FAIL_TO_FSYNC_WAL_NODE_S_CHECKPOINT_WRITER_CHANGE_SYSTEM_6E1EE226 = + "Fail to fsync wal node-{}'s checkpoint writer, change system mode to error."; + public static final String STORAGE_LOG_FAIL_TO_ROLL_WAL_NODE_S_CHECKPOINT_WRITER_CHANGE_SYSTEM_791DDAB7 = + "Fail to roll wal node-{}'s checkpoint writer, change system mode to error."; + public static final String STORAGE_LOG_UNEXPECTED_ERROR_WHEN_LOADING_A_WAL_SEGMENT_IN_45B42CCF = + "Unexpected error when loading a wal segment {} in {}@{}"; + public static final String STORAGE_LOG_MEET_ERROR_WHEN_READING_CHECKPOINT_FILE_SKIP_BROKEN_CHECKPOINTS_DADF9E9D = + "Meet error when reading checkpoint file {}, skip broken checkpoints"; + public static final String STORAGE_LOG_FAILED_TO_SCAN_WAL_FILE_FOR_SEARCHABLE_REQUEST_METADATA_9B4B0198 = + "Failed to scan WAL file {} for searchable request metadata"; + public static final String STORAGE_LOG_WAL_NODE_LOGS_INSERTROWNODE_THE_SEARCH_INDEX_IS_027450AC = + "WAL node-{} logs insertRowNode, the search index is {}."; + public static final String STORAGE_LOG_WAL_NODE_LOGS_INSERTROWSNODE_THE_SEARCH_INDEX_IS_1AF72E25 = + "WAL node-{} logs insertRowsNode, the search index is {}."; + public static final String STORAGE_LOG_WAL_NODE_LOGS_INSERTTABLETNODE_THE_SEARCH_INDEX_IS_CF9A3600 = + "WAL node-{} logs insertTabletNode, the search index is {}."; + public static final String STORAGE_LOG_WAL_NODE_LOGS_DELETEDATANODE_THE_SEARCH_INDEX_IS_6E49BC54 = + "WAL node-{} logs deleteDataNode, the search index is {}."; + public static final String STORAGE_LOG_WAL_NODE_LOGS_RELATIONALDELETEDATANODE_THE_SEARCH_INDEX_33258B30 = + "WAL node-{} logs relationalDeleteDataNode, the search index is {}."; + public static final String STORAGE_LOG_WAL_NODE_NO_WAL_FILE_OR_WAL_FILE_NUMBER_LESS_THAN_OR_EQUAL_3C65641C = + "wal node-{}:no wal file or wal file number less than or equal to one was found"; + public static final String STORAGE_LOG_EFFECTIVE_INFORMATION_RATIO_IS_ACTIVE_MEMTABLES_COST_IS_D9A13DD2 = + "Effective information ratio is {}, active memTables cost is {}, total cost is {}"; + public static final String STORAGE_LOG_SUCCESSFULLY_DELETE_OUTDATED_WAL_FILES_FOR_WAL_NODE_C141C741 = + "Successfully delete {} outdated wal files for wal node-{}"; + public static final String STORAGE_LOG_UPDATE_FILE_TO_SEARCH_FAILED_THE_NEXT_SEARCH_INDEX_IS_F3DC95F3 = + "update file to search failed, the next search index is {}"; + public static final String STORAGE_LOG_SEARCHINDEX_RESULT_FILES_6151DCEB = + "searchIndex: {}, result: {}, files: {}, "; + public static final String STORAGE_LOG_FAIL_TO_DELETE_OUTDATED_WAL_FILE_OF_WAL_NODE_1B1F2AF2 = + "Fail to delete outdated wal file {} of wal node-{}."; + public static final String STORAGE_LOG_WAL_NODE_FLUSHES_MEMTABLE_TO_TSFILE_BECAUSE_EFFECTIVE_INFORMATION_8CC86239 = + "WAL node-{} flushes memTable-{} to TsFile {} because Effective information ratio {} is " + + "below wal min effective info ratio {}, memTable size is {}."; + public static final String STORAGE_LOG_WAL_NODE_SNAPSHOTS_MEMTABLE_TO_WAL_FILES_BECAUSE_EFFECTIVE_0A1304ED = + "WAL node-{} snapshots memTable-{} to wal files because Effective information ratio {} is " + + "below wal min effective info ratio {}, memTable size is {}."; + public static final String STORAGE_LOG_TIMEOUT_WHEN_WAITING_FOR_NEXT_WAL_ENTRY_READY_EXECUTE_ROLLWALFILE_FEE9700E = + "timeout when waiting for next WAL entry ready, execute rollWALFile. Current search index in " + + "wal buffer is {}, and next target index is {}"; + public static final String STORAGE_LOG_THE_SEARCH_INDEX_OF_NEXT_WAL_ENTRY_SHOULD_BE_BUT_ACTUALLY_177BF8AF = + "The search index of next WAL entry should be {}, but actually it's {}"; + public static final String STORAGE_LOG_SKIP_FROM_TO_IT_S_A_DANGEROUS_OPERATION_BECAUSE_INSERT_PLAN_9283DC91 = + "Skip from {} to {}, it's a dangerous operation because insert plan {} may have been lost."; + public static final String STORAGE_LOG_FAIL_TO_READ_WAL_FROM_WAL_FILE_SKIP_THIS_FILE_06A3B079 = + "Fail to read wal from wal file {}, skip this file."; + public static final String STORAGE_LOG_FAIL_TO_TRIGGER_ROLLING_WAL_NODE_S_WAL_FILE_LOG_WRITER_D1E595DC = + "Fail to trigger rolling wal node-{}'s wal file log writer."; + public static final String STORAGE_LOG_FAIL_TO_FIND_TSFILE_RECOVER_PERFORMER_FOR_WAL_ENTRY_IN_TSFILE_ED4EF3E7 = + "Fail to find TsFile recover performer for wal entry in TsFile {}"; + public static final String STORAGE_LOG_SUCCESSFULLY_RECOVER_WAL_NODE_IN_THE_DIRECTORY_ADD_THIS_FA6ADE22 = + "Successfully recover WAL node in the directory {}, add this node to WALManger."; + public static final String STORAGE_LOG_SUCCESSFULLY_RECOVER_WAL_NODE_IN_THE_DIRECTORY_SO_DELETE_A17892D9 = + "Successfully recover WAL node in the directory {}, so delete these wal files."; + public static final String STORAGE_LOG_FAIL_TO_READ_MEMTABLE_IDS_FROM_THE_WAL_FILE_OF_WAL_NODE_5325B5AB = + "Fail to read memTable ids from the wal file {} of wal node: {}"; + public static final String STORAGE_LOG_FAIL_TO_READ_MEMTABLE_IDS_FROM_THE_WAL_FILE_OF_WAL_NODE_FBCE8D93 = + "Fail to read memTable ids from the wal file {} of wal node."; + public static final String STORAGE_LOG_DATA_REGIONS_HAVE_SUBMITTED_ALL_UNSEALED_TSFILES_START_RECOVERING_208E6A26 = + "Data regions have submitted all unsealed TsFiles, start recovering TsFiles in each wal node."; + public static final String STORAGE_LOG_FAIL_TO_ADD_RECOVER_PERFORMER_FOR_FILE_54746E05 = + "Fail to add recover performer for file {}"; + public static final String STORAGE_LOG_BUFFER_CAPACITY_IS_LIMIT_IS_POSITION_IS_911625D8 = + "buffer capacity is: {}, limit is: {}, position is: {}"; + public static final String STORAGE_LOG_HANDLE_CLOSE_SIGNAL_FOR_WAL_NODE_THERE_ARE_ENTRIES_LEFT_393393D0 = + "Handle close signal for wal node-{}, there are {} entries left."; + public static final String STORAGE_LOG_SYNC_WAL_BUFFER_FORCEFLAG_BUFFER_USED_C2A75C99 = + "Sync wal buffer, forceFlag: {}, buffer used: {} / {} = {}%"; + public static final String STORAGE_LOG_FAIL_TO_WRITE_WALENTRY_INTO_WAL_NODE_BECAUSE_THIS_NODE_IS_5D45E73F = + "Fail to write WALEntry into wal node-{} because this node is closed. It's ok to see this " + + "log during data region deletion."; + public static final String STORAGE_LOG_INTERRUPTED_WHEN_WAITING_FOR_TAKING_WALENTRY_FROM_BLOCKING_0765C068 = + "Interrupted when waiting for taking WALEntry from blocking queue to serialize."; + public static final String STORAGE_LOG_FAIL_TO_READ_MEMTABLE_IDS_FROM_THE_WAL_FILE_OF_WAL_NODE_54B0056E = + "Fail to read memTable ids from the wal file {} of wal node {}: {}"; + public static final String STORAGE_LOG_FAIL_TO_READ_MEMTABLE_IDS_FROM_THE_WAL_FILE_OF_WAL_NODE_D5287E27 = + "Fail to read memTable ids from the wal file {} of wal node {}."; + public static final String STORAGE_LOG_FAIL_TO_SERIALIZE_WALENTRY_TO_WAL_NODE_S_BUFFER_DISCARD_F0948835 = + "Fail to serialize WALEntry to wal node-{}'s buffer, discard it."; + public static final String STORAGE_LOG_FAIL_TO_SYNC_WAL_NODE_S_BUFFER_CHANGE_SYSTEM_MODE_TO_ERROR_8C379D57 = + "Fail to sync wal node-{}'s buffer, change system mode to error."; + public static final String STORAGE_LOG_FAIL_TO_ROLL_WAL_NODE_S_LOG_WRITER_CHANGE_SYSTEM_MODE_TO_A384AA54 = + "Fail to roll wal node-{}'s log writer, change system mode to error."; + public static final String STORAGE_LOG_FAIL_TO_FSYNC_WAL_NODE_S_LOG_WRITER_CHANGE_SYSTEM_MODE_TO_7930160B = + "Fail to fsync wal node-{}'s log writer, change system mode to error."; + public static final String STORAGE_LOG_FAIL_TO_CREATE_WAL_NODE_ALLOCATION_STRATEGY_BECAUSE_ALL_72801644 = + "Fail to create wal node allocation strategy because all disks of wal folders are full."; + public static final String STORAGE_LOG_THIS_TSFILE_ISN_T_CRASHED_NO_NEED_TO_REDO_WAL_LOG_A017A0F0 = + "This TsFile {} isn't crashed, no need to redo wal log."; + public static final String STORAGE_LOG_CANNOT_DESERIALIZE_RESOURCE_FILE_OF_TRY_TO_RECONSTRUCT_IT_F82299C6 = + "Cannot deserialize .resource file of {}, try to reconstruct it."; + public static final String STORAGE_LOG_TRY_TO_RELEASE_MEMORY_FROM_A_MEMORY_BLOCK_WHICH_HAS_NOT_874E7A08 = + "Try to release memory from a memory block {} which has not released all memory"; + public static final String STORAGE_LOG_TRY_TO_SHRINK_A_NEGATIVE_MEMORY_SIZE_FROM_MEMORY_BLOCK_60501B13 = + "Try to shrink a negative memory size {} from memory block {}"; + public static final String STORAGE_LOG_LOAD_FORCE_RESIZED_LOADTSFILEMEMORYBLOCK_WITH_MEMORY_FROM_33AC288A = + "Load: Force resized LoadTsFileMemoryBlock with memory from query engine, size added: {}, " + + "new size: {}"; + public static final String STORAGE_LOG_LOAD_QUERY_ENGINE_S_MEMORY_IS_NOT_SUFFICIENT_ALLOCATED_MEMORYBLOCK_44D5B5FB = + "Load: Query engine's memory is not sufficient, allocated MemoryBlock from " + + "DataCacheMemoryBlock, size: {}"; + public static final String STORAGE_LOG_LOAD_QUERY_ENGINE_S_MEMORY_IS_NOT_SUFFICIENT_FORCE_RESIZED_9F85F4CA = + "Load: Query engine's memory is not sufficient, force resized LoadTsFileMemoryBlock with " + + "memory from DataCacheMemoryBlock, size added: {}, new size: {}"; + public static final String STORAGE_LOG_CREATE_DATA_CACHE_MEMORY_BLOCK_ALLOCATE_MEMORY_5F3E041D = + "Create Data Cache Memory Block {}, allocate memory {}"; + public static final String STORAGE_LOG_LOAD_ATTEMPTING_TO_RELEASE_MORE_MEMORY_THAN_ALLOCATED_0E737996 = + "Load: Attempting to release more memory ({}) than allocated ({})"; + public static final String STORAGE_LOG_LOAD_FAILED_TO_SETTOTALMEMORYSIZEINBYTES_MEMORY_BLOCK_TO_DBE9BE56 = + "Load: Failed to setTotalMemorySizeInBytes memory block {} to {} bytes, current memory usage " + + "{} bytes"; + public static final String STORAGE_LOG_DATA_TYPE_CONVERSION_FOR_LOADTSFILESTATEMENT_IS_SUCCESSFUL_99016326 = + "Data type conversion for LoadTsFileStatement {} is successful."; + public static final String STORAGE_LOG_FAILED_TO_CONVERT_DATA_TYPE_FOR_LOADTSFILESTATEMENT_5D132E57 = + "Failed to convert data type for LoadTsFileStatement: {}."; + public static final String STORAGE_LOG_FAILED_TO_CONVERT_DATA_TYPE_FOR_LOADTSFILESTATEMENT_STATUS_F0311707 = + "Failed to convert data type for LoadTsFileStatement: {}, status code is {}."; + public static final String STORAGE_LOG_FAILED_TO_CONVERT_DATA_TYPES_FOR_TABLE_MODEL_STATEMENT_CB574D44 = + "Failed to convert data types for table model statement {}."; + public static final String STORAGE_LOG_FAILED_TO_CONVERT_DATA_TYPES_FOR_TREE_MODEL_STATEMENT_5C2869D6 = + "Failed to convert data types for tree model statement {}."; + public static final String STORAGE_LOG_LOAD_INSERTING_TABLET_TO_CASTING_TYPE_FROM_TO_AE808A8B = + "Load: Inserting tablet to {}.{}. Casting type from {} to {}."; + public static final String STORAGE_LOG_TRY_TO_LOAD_TSFILE_V3_INTO_CURRENT_VERSION_V4_FILE_PATH_B8D38E22 = + "try to load TsFile V3 into current version (V4), file path: {}"; + public static final String STORAGE_LOG_THE_FILE_S_VERSION_NUMBER_IS_HIGHER_THAN_CURRENT_FILE_PATH_6D17349F = + "the file's Version Number is higher than current, file path: {}"; + public static final String STORAGE_LOG_FAILED_TO_FIND_MOUNT_POINT_SKIP_REGISTER_IT_TO_MAP_33F38542 = + "Failed to find mount point {}, skip register it to map"; + public static final String STORAGE_LOG_EXCEPTION_OCCURS_WHEN_READING_DATA_DIR_S_MOUNT_POINT_9421E685 = + "Exception occurs when reading data dir's mount point {}"; + public static final String STORAGE_LOG_EXCEPTION_OCCURS_WHEN_READING_TARGET_FILE_S_MOUNT_POINT_47567945 = + "Exception occurs when reading target file's mount point {}"; + public static final String STORAGE_LOG_REJECTING_AUTO_LOAD_TSFILE_ISGENERATEDBYPIPE_DUE_TO_MEMORY_9A60DF29 = + "Rejecting auto load tsfile {} (isGeneratedByPipe = {}) due to memory constraints, will " + + "retry later."; + public static final String STORAGE_LOG_REJECTING_AUTO_LOAD_TSFILE_ISGENERATEDBYPIPE_DUE_TO_THE_16FA5F18 = + "Rejecting auto load tsfile {} (isGeneratedByPipe = {}) due to the system is read only, will " + + "retry later."; + public static final String STORAGE_LOG_REJECTING_AUTO_LOAD_TSFILE_ISGENERATEDBYPIPE_DUE_TO_TIME_E18630DE = + "Rejecting auto load tsfile {} (isGeneratedByPipe = {}) due to time out to wait for " + + "procedure return, will retry later."; + public static final String STORAGE_LOG_REJECTING_AUTO_LOAD_TSFILE_ISGENERATEDBYPIPE_DUE_TO_THE_5F811A8B = + "Rejecting auto load tsfile {} (isGeneratedByPipe = {}) due to the datanode is not enough, " + + "will retry later."; + public static final String STORAGE_LOG_REJECTING_AUTO_LOAD_TSFILE_ISGENERATEDBYPIPE_DUE_TO_FAIL_F59307B8 = + "Rejecting auto load tsfile {} (isGeneratedByPipe = {}) due to fail to connect to any config " + + "node, will retry later."; + public static final String STORAGE_LOG_REJECTING_AUTO_LOAD_TSFILE_ISGENERATEDBYPIPE_DUE_TO_CURRENT_264E12EE = + "Rejecting auto load tsfile {} (isGeneratedByPipe = {}) due to current query is time out, " + + "will retry later."; + public static final String STORAGE_LOG_SUCCESSFULLY_AUTO_LOAD_TSFILE_ISGENERATEDBYPIPE_ADB5FEC9 = + "Successfully auto load tsfile {} (isGeneratedByPipe = {})"; + public static final String STORAGE_LOG_ERROR_OCCURRED_DURING_CREATING_FAIL_DIRECTORY_FOR_ACTIVE_7D3BEB38 = + "Error occurred during creating fail directory {} for active load."; + public static final String STORAGE_LOG_FAILED_TO_AUTO_LOAD_TSFILE_ISGENERATEDBYPIPE_STATUS_FILE_F43E9EF7 = + "Failed to auto load tsfile {} (isGeneratedByPipe = {}), status: {}. File will be moved to " + + "fail directory."; + public static final String STORAGE_LOG_FAILED_TO_AUTO_LOAD_TSFILE_ISGENERATEDBYPIPE_DUE_TO_FILE_5EE1FA08 = + "Failed to auto load tsfile {} (isGeneratedByPipe = {}) due to file not found, will skip " + + "this file."; + public static final String STORAGE_LOG_FAILED_TO_AUTO_LOAD_TSFILE_ISGENERATEDBYPIPE_BECAUSE_OF_07946D74 = + "Failed to auto load tsfile {} (isGeneratedByPipe = {}) because of an unexpected exception. " + + "File will be moved to fail directory."; + public static final String STORAGE_LOG_ERROR_OCCURRED_DURING_HOT_RELOAD_ACTIVE_LOAD_DIRS_CURRENT_673AFC0F = + "Error occurred during hot reload active load dirs. Current active load listening dirs: {}."; + public static final String STORAGE_LOG_CURRENT_DIR_PATH_IS_NOT_READABLE_SKIP_SCANNING_THIS_DIR_9C8B7E00 = + "Current dir path is not readable: {}.Skip scanning this dir. Please check the permission."; + public static final String STORAGE_LOG_CURRENT_DIR_PATH_IS_NOT_WRITABLE_SKIP_SCANNING_THIS_DIR_4885E78F = + "Current dir path is not writable: {}.Skip scanning this dir. Please check the permission."; + public static final String STORAGE_LOG_ERROR_OCCURRED_DURING_CHECKING_R_W_PERMISSION_OF_DIR_SKIP_3EC7FC7D = + "Error occurred during checking r/w permission of dir: {}. Skip scanning this dir."; + public static final String STORAGE_LOG_REPORT_DATABASE_STATUS_TO_THE_SYSTEM_AFTER_ADDING_CURRENT_8982BBD7 = + "Report database Status to the system. After adding {}, current sg mem cost is {}."; + public static final String STORAGE_LOG_THE_TOTAL_DATABASE_MEM_COSTS_ARE_TOO_LARGE_CALL_FOR_FLUSHING_26AD8CDF = + "The total database mem costs are too large, call for flushing. Current sg cost is {}"; + public static final String STORAGE_LOG_SG_RELEASED_MEMORY_DELTA_BUT_STILL_EXCEEDING_FLUSH_PROPORTION_DB68D9D5 = + "SG ({}) released memory (delta: {}) but still exceeding flush proportion (totalSgMemCost: " + + "{}), call flush."; + public static final String STORAGE_LOG_SG_RELEASED_MEMORY_DELTA_SYSTEM_IS_IN_NORMAL_STATUS_TOTALSGMEMCOST_600A4A8D = + "SG ({}) released memory (delta: {}), system is in normal status (totalSgMemCost: {})."; + public static final String STORAGE_LOG_CHANGE_SYSTEM_TO_REJECT_STATUS_TRIGGERED_BY_LOGICAL_SG_MEM_6F9BCBD3 = + "Change system to reject status. Triggered by: logical SG ({}), mem cost delta ({}), " + + "totalSgMemCost ({}), REJECT_THRESHOLD ({})"; + public static final String STORAGE_LOG_SG_RELEASED_MEMORY_DELTA_SET_SYSTEM_TO_NORMAL_STATUS_TOTALSGMEMCOST_0F714668 = + "SG ({}) released memory (delta: {}), set system to normal status (totalSgMemCost: {})."; + public static final String STORAGE_LOG_SG_RELEASED_MEMORY_DELTA_BUT_SYSTEM_IS_STILL_IN_REJECT_STATUS_AD5E475C = + "SG ({}) released memory (delta: {}), but system is still in reject status (totalSgMemCost: " + + "{})."; + public static final String STORAGE_LOG_DEGRADE_LASTFLUSHTIMEMAP_OF_OLD_TIMEPARTITIONINFO_MEM_SIZE_BED053EE = + "[{}]degrade LastFlushTimeMap of old TimePartitionInfo-{}, mem size is {}, remaining mem " + + "cost is {}"; + public static final String STORAGE_LOG_LIMIT_OF_ARRAY_DEQUE_SIZE_UPDATED_05DBA95E = + "limit of {} array deque size updated: {} -> {}"; + public static final String STORAGE_LOG_LIMITUPDATETHRESHOLD_OF_PRIMITIVEARRAYMANAGER_UPDATED_394801AE = + "limitUpdateThreshold of PrimitiveArrayManager updated: {} -> {}"; + public static final String STORAGE_LOG_CREATE_FOLDER_FAILED_IS_THE_FOLDER_EXISTED_18E29D51 = + "create folder {} failed. Is the folder existed: {}"; + public static final String STORAGE_LOG_CAN_T_FIND_STRATEGY_FOR_MULT_DIRECTORIES_A06406EC = + "Can't find strategy {} for mult-directories."; + + // --------------------------------------------------------------------------- + // Additional exception messages + // --------------------------------------------------------------------------- + public static final String STORAGE_EXCEPTION_SYSTEM_REJECTED_OVER_SMS_94CEF932 = + "System rejected over %sms"; + public static final String STORAGE_EXCEPTION_FAILED_TO_CREATE_TSFILEWRITERMANAGER_FOR_UUID_S_BECAUSE_A0D68950 = + "Failed to create TsFileWriterManager for uuid %s because of insufficient disk space."; + public static final String STORAGE_EXCEPTION_STORAGE_ALLOCATION_FAILED_FOR_S_TIER_D_E2C94F74 = + "Storage allocation failed for %s (tier %d)"; + public static final String STORAGE_EXCEPTION_DATA_REGION_S_S_IS_DOWN_BECAUSE_THE_TIME_OF_TSFILE_S_IS_1F732E71 = + "data region %s[%s] is down, because the time of tsfile %s is larger than system current " + + "time, file time is %d while system current time is %d, please check it."; + public static final String STORAGE_EXCEPTION_UNABLE_TO_CONTINUE_WRITING_DATA_BECAUSE_THE_SPACE_ALLOCATED_9A5FB99E = + "Unable to continue writing data, because the space allocated to the database %s has already " + + "used the upper limit"; + public static final String STORAGE_EXCEPTION_FAILED_TO_CREATE_TSFILEPROCESSOR_FOR_DATABASE_S_TIMEPARTITIONID_0CD885BB = + "Failed to create TsFileProcessor for database %s, timePartitionId %s"; + public static final String STORAGE_EXCEPTION_DELETE_FAILED_PLEASE_DO_NOT_DELETE_UNTIL_THE_OLD_FILES_SETTLED_6C9F17CC = + "Delete failed. Please do not delete until the old files settled."; + public static final String STORAGE_EXCEPTION_MULTIPLE_ERRORS_OCCURRED_WHILE_WRITING_MOD_FILES_SEE_LOGS_529D7145 = + "Multiple errors occurred while writing mod files, see logs for details."; + public static final String STORAGE_EXCEPTION_MEET_ERROR_WHEN_SETTLING_FILE_S_4D6ECCEE = + "Meet error when settling file: %s"; + public static final String STORAGE_EXCEPTION_PEER_IS_INACTIVE_AND_NOT_READY_TO_WRITE_REQUEST_S_DATANODE_EDFE5AEF = + "Peer is inactive and not ready to write request, %s, DataNode Id: %s"; + public static final String STORAGE_EXCEPTION_TSFILE_VALIDATE_FAILED_S_3CDE0677 = + "tsfile validate failed, %s"; + public static final String STORAGE_EXCEPTION_FILE_RENAMING_FAILED_WHEN_LOADING_TSFILE_ORIGIN_S_TARGET_37BDA16F = + "File renaming failed when loading tsfile. Origin: %s, Target: %s, because %s"; + public static final String STORAGE_EXCEPTION_FILE_RENAMING_FAILED_WHEN_LOADING_RESOURCE_FILE_ORIGIN_S_9622AA6D = + "File renaming failed when loading .resource file. Origin: %s, Target: %s, because %s"; + public static final String STORAGE_EXCEPTION_FILE_RENAMING_FAILED_WHEN_LOADING_MOD_FILE_ORIGIN_S_TARGET_EEB4EDE7 = + "File renaming failed when loading .mod file. Origin: %s, Target: %s, because %s"; + public static final String STORAGE_EXCEPTION_TOTAL_ALLOCATED_MEMORY_FOR_DIRECT_BUFFER_WILL_BE_S_WHICH_FD7DC149 = + "Total allocated memory for direct buffer will be %s, which is greater than limit mem cost: " + + "%s"; + public static final String STORAGE_EXCEPTION_S_ALREADY_EXISTS_AND_IS_NOT_EMPTY_CF0BD6A4 = + "%s already exists and is not empty"; + public static final String STORAGE_EXCEPTION_S_S_WRITE_WAL_FAILED_S_5A7E61FB = + "%s: %s write WAL failed: %s"; + public static final String STORAGE_EXCEPTION_MEMORY_NOT_ENOUGH_TO_CLONE_THE_TVLIST_DURING_FLUSH_PHASE_75C90725 = + "Memory not enough to clone the tvlist during flush phase"; + public static final String STORAGE_EXCEPTION_DATA_TYPE_S_IS_NOT_SUPPORTED_5D5C02E4 = + "Data type %s is not supported."; + public static final String STORAGE_EXCEPTION_CURINDEX_D_IS_NOT_EQUAL_TO_CURSEQINDEX_D_6B9B1134 = + "curIndex %d is not equal to curSeqIndex %d"; + public static final String STORAGE_EXCEPTION_CURINDEX_D_IS_NOT_EQUAL_TO_CURUNSEQINDEX_D_AB32F71D = + "curIndex %d is not equal to curUnSeqIndex %d"; + public static final String STORAGE_EXCEPTION_PAGEID_IN_SHAREDTIMEDATABUFFER_SHOULD_BE_INCREMENTAL_A5E6C4EE = + "PageId in SharedTimeDataBuffer should be incremental."; + public static final String STORAGE_EXCEPTION_CAN_T_READ_FILE_S_S_FROM_DISK_9D5066C0 = + "Can't read file %s%s from disk"; + public static final String STORAGE_EXCEPTION_SHOULD_NOT_GET_PROGRESS_INDEX_FROM_A_UNCLOSING_TSFILERESOURCE_129FD925 = + "Should not get progress index from a unclosing TsFileResource."; + public static final String STORAGE_EXCEPTION_DIRECTORY_CREATION_FAILED_S_PERMISSION_DENIED_OR_PARENT_2855777B = + "Directory creation failed: %s (Permission denied or parent not writable)"; + public static final String STORAGE_EXCEPTION_FAILED_TO_GET_DEVICES_FROM_TSFILE_S_S_412EEA1A = + "Failed to get devices from tsfile: %s%s"; + public static final String STORAGE_EXCEPTION_UNSUPPORTED_RECORD_TYPE_IN_FILE_S_TYPE_S_DADEE641 = + "Unsupported record type in file: %s, type: %s"; + public static final String STORAGE_EXCEPTION_CORRESPONDING_MEMORY_ESTIMATOR_FOR_S_PERFORMER_OF_S_SPACE_D543D3EF = + "Corresponding memory estimator for %s performer of %s space compaction is not existed."; + public static final String STORAGE_EXCEPTION_HAS_BEEN_WAITING_OVER_S_SECONDS_FOR_ALL_SUB_COMPACTION_TASKS_76BD45D6 = + "Has been waiting over %s seconds for all sub compaction tasks to finish."; + public static final String STORAGE_EXCEPTION_HAS_BEEN_WAITING_OVER_S_SECONDS_FOR_ALL_COMPACTION_TASKS_87E1B82E = + "Has been waiting over %s seconds for all compaction tasks to finish."; + public static final String STORAGE_EXCEPTION_EXCEPTION_TO_PARSE_THE_TSFILE_S_IN_SETTLING_D40564AD = + "Exception to parse the tsfile: %s in settling"; + public static final String STORAGE_EXCEPTION_THESE_DEVICES_S_DO_NOT_EXIST_IN_THE_TSFILE_5A03F30D = + "These devices (%s) do not exist in the tsfile"; + public static final String STORAGE_EXCEPTION_CANNOT_SET_SINGLE_TYPE_OF_SOURCE_FILES_TO_THIS_KIND_OF_PERFORMER_6B422172 = + "Cannot set single type of source files to this kind of performer"; + public static final String STORAGE_EXCEPTION_CANNOT_SET_BOTH_SEQ_FILES_AND_UNSEQ_FILES_TO_THIS_KIND_OF_F68F629E = + "Cannot set both seq files and unseq files to this kind of performer"; + public static final String STORAGE_EXCEPTION_THIS_TABLENAME_IS_S_MERGE_TABLENAME_IS_S_4B05FA97 = + "this.tableName is %s merge tableName is %s"; + public static final String STORAGE_EXCEPTION_S_S_COMPACTION_ABORT_7D0CB1E5 = + "%s-%s [Compaction] abort"; + public static final String STORAGE_EXCEPTION_FAILED_TO_PASS_COMPACTION_VALIDATION_RESOURCES_FILE_OR_TSFILE_4B78731F = + "Failed to pass compaction validation, .resources file or tsfile data is wrong"; + public static final String STORAGE_EXCEPTION_FAILED_TO_DELETE_EMPTY_TARGET_FILE_S_324EF900 = + "failed to delete empty target file %s"; + public static final String STORAGE_EXCEPTION_TARGET_FILE_IS_NOT_COMPLETED_S_E65150DB = + "Target file is not completed. %s"; + public static final String STORAGE_EXCEPTION_DOES_NOT_SUPPORT_THIS_METHOD_IN_READPOINTCROSSCOMPACTIONWRITER_D024F312 = + "Does not support this method in ReadPointCrossCompactionWriter"; + public static final String STORAGE_EXCEPTION_UNKNOWN_COMPACTION_LOG_LINE_S_C0A9DC05 = + "unknown compaction log line: %s"; + public static final String STORAGE_EXCEPTION_PATH_S_CANNOT_BE_PARSED_INTO_FILE_INFO_631C48C8 = + "Path %s cannot be parsed into file info"; + public static final String STORAGE_EXCEPTION_STRING_S_IS_NOT_A_LEGAL_FILE_INFO_STRING_0CBEAB8E = + "String %s is not a legal file info string"; + public static final String STORAGE_EXCEPTION_UNSUPPORTED_DATA_TYPE_S_D16A1E9A = + "Unsupported data type: %s"; + public static final String STORAGE_EXCEPTION_DO_NOT_HAVE_A_COMPLETE_PAGE_BODY_EXPECTED_S_ACTUAL_S_3A05EF8F = + "do not have a complete page body. Expected:%s. Actual:%s"; + public static final String STORAGE_EXCEPTION_COMPACTION_COMPACTION_FOR_TARGET_FILE_S_ABORT_46ECFF41 = + "[Compaction] compaction for target file %s abort"; + public static final String STORAGE_EXCEPTION_COMPACTIONTASKSUMMARY_FOR_FASTCOMPACTIONPERFORMER_SHOULD_F5710AA8 = + "CompactionTaskSummary for FastCompactionPerformer should be FastCompactionTaskSummary"; + public static final String STORAGE_EXCEPTION_COMPACTION_COMPACTION_FOR_TARGET_FILES_S_ABORT_AFC87906 = + "[Compaction] compaction for target files %s abort"; + public static final String STORAGE_EXCEPTION_ILLEGAL_COMPACTION_PERFORMER_FOR_UNSEQ_INNER_COMPACTION_50D566DF = + "Illegal compaction performer for unseq inner compaction %s"; + public static final String STORAGE_EXCEPTION_ILLEGAL_COMPACTION_PERFORMER_FOR_SEQ_INNER_COMPACTION_S_2C2F1F66 = + "Illegal compaction performer for seq inner compaction %s"; + public static final String STORAGE_EXCEPTION_ILLEGAL_COMPACTION_PERFORMER_FOR_CROSS_COMPACTION_S_17C6E05D = + "Illegal compaction performer for cross compaction %s"; + public static final String STORAGE_EXCEPTION_SOURCE_FILE_S_IS_DELETED_D2ED7D90 = + "source file %s is deleted"; + public static final String STORAGE_EXCEPTION_S_S_EXCEEDS_SHORT_RANGE_1DF75A2D = + "%s %s exceeds short range"; + public static final String STORAGE_EXCEPTION_THE_ELEMENT_SIZE_OF_WALENTRY_S_IS_LARGER_THAN_THE_TOTAL_E494520D = + "The element size of WALEntry %s is larger than the total memory size of wal buffer queue %s"; + public static final String STORAGE_EXCEPTION_FAIL_TO_GET_WAL_FILE_BY_VERSIONID_S_AND_FILES_S_9CB045F4 = + "Fail to get wal file by versionId=%s and files=%s."; + public static final String STORAGE_EXCEPTION_CANNOT_MAKE_OTHER_CHECKPOINT_TYPES_IN_THE_WAL_BUFFER_TYPE_E9053BC1 = + "Cannot make other checkpoint types in the wal buffer, type is %s"; + public static final String STORAGE_EXCEPTION_FAILED_RECOVER_THE_RESOURCE_FILE_S_S_S_E35EF7D5 = + "Failed recover the resource file: %s%s%s"; + public static final String STORAGE_EXCEPTION_THE_INITIAL_LIMITED_MEMORY_SIZE_D_IS_LESS_THAN_THE_MINIMUM_FC044302 = + "The initial limited memory size %d is less than the minimum memory size %d"; + public static final String STORAGE_EXCEPTION_SETTOTALMEMORYSIZEINBYTES_IS_NOT_SUPPORTED_FOR_LOADTSFILEDATACACHEMEMORYBLOCK_DFAB2A2A = + "setTotalMemorySizeInBytes is not supported for LoadTsFileDataCacheMemoryBlock"; + public static final String STORAGE_EXCEPTION_FORCEALLOCATE_FAILED_TO_ALLOCATE_MEMORY_FROM_QUERY_ENGINE_F91D5959 = + "forceAllocate: failed to allocate memory from query engine after %s retries, total query " + + "memory %s bytes, current available memory for load %s bytes, current load used memory size " + + "%s bytes, load requested memory size %s bytes"; + public static final String STORAGE_EXCEPTION_LOAD_INVALID_MEMORY_SIZE_D_BYTES_MUST_BE_POSITIVE_D6586ED3 = + "Load: Invalid memory size %d bytes, must be positive"; + public static final String STORAGE_EXCEPTION_LOAD_INVALID_MEMORY_SIZE_D_BYTES_MUST_BE_NON_NEGATIVE_A0146353 = + "Load: Invalid memory size %d bytes, must be non-negative"; + public static final String STORAGE_EXCEPTION_MAGIC_STRING_CHECK_ERROR_WHEN_PARSING_TSFILE_S_EA3D68E3 = + "Magic String check error when parsing TsFile %s."; + public static final String STORAGE_EXCEPTION_EMPTY_NONALIGNED_CHUNK_OR_TIME_CHUNK_WITH_OFFSET_D_IN_TSFILE_B1E462C9 = + "Empty Nonaligned Chunk or Time Chunk with offset %d in TsFile %s."; + public static final String STORAGE_EXCEPTION_TIME_PARTITION_SLOTS_SIZE_IS_GREATER_THAN_S_D076F78E = + "Time partition slots size is greater than %s"; + public static final String STORAGE_EXCEPTION_CONSUME_ALIGNED_CHUNK_DATA_ERROR_NEXT_CHUNK_OFFSET_D_CHUNKDATA_D896FAE2 = + "Consume aligned chunk data error, next chunk offset: %d, chunkData: %s"; + public static final String STORAGE_EXCEPTION_CONSUME_CHUNKDATA_ERROR_CHUNK_OFFSET_D_MEASUREMENT_S_CHUNKDATA_4A1F1EE1 = + "Consume chunkData error, chunk offset: %d, measurement: %s, chunkData: %s"; + public static final String STORAGE_EXCEPTION_TOTAL_DATABASE_MEMCOST_S_IS_OVER_THAN_MEMORYSIZEFORWRITING_C63E4D72 = + "Total database MemCost %s is over than memorySizeForWriting %s"; + public static final String STORAGE_EXCEPTION_REQUIRED_FILE_NUM_D_IS_GREATER_THAN_THE_MAX_FILE_NUM_D_FOR_AB6DE95B = + "Required file num %d is greater than the max file num %d for compaction."; + public static final String STORAGE_EXCEPTION_FAILED_TO_ALLOCATE_D_FILES_FOR_COMPACTION_AFTER_D_SECONDS_C701F750 = + "Failed to allocate %d files for compaction after %d seconds, max file num for compaction " + + "module is %d, %d files is used."; + public static final String STORAGE_EXCEPTION_FAILED_TO_ALLOCATE_D_FILES_FOR_COMPACTION_MAX_FILE_NUM_FOR_9B954F8C = + "Failed to allocate %d files for compaction, max file num for compaction module is %d, %d " + + "files is used."; + public static final String STORAGE_EXCEPTION_REQUIRED_MEMORY_COST_D_BYTES_IS_GREATER_THAN_THE_TOTAL_MEMORY_444D8FE4 = + "Required memory cost %d bytes is greater than the total memory budget for compaction %d " + + "bytes"; + public static final String STORAGE_EXCEPTION_FAILED_TO_ALLOCATE_D_BYTES_MEMORY_FOR_COMPACTION_TOTAL_MEMORY_33BE3C71 = + "Failed to allocate %d bytes memory for compaction, total memory budget for compaction " + + "module is %d bytes, %d bytes is used"; + public static final String STORAGE_EXCEPTION_NUMBER_OF_REQUESTS_EXCEEDED_WAIT_SMS_30F0842F = + "number of requests exceeded - wait %sms"; + public static final String STORAGE_EXCEPTION_REQUEST_SIZE_LIMIT_EXCEEDED_WAIT_SMS_11C1E549 = + "request size limit exceeded - wait %sms"; + public static final String STORAGE_EXCEPTION_NUMBER_OF_WRITE_REQUESTS_EXCEEDED_WAIT_SMS_D11F94D2 = + "number of write requests exceeded - wait %sms"; + public static final String STORAGE_EXCEPTION_WRITE_SIZE_LIMIT_EXCEEDED_WAIT_SMS_AA3796DC = + "write size limit exceeded - wait %sms"; + public static final String STORAGE_EXCEPTION_NUMBER_OF_READ_REQUESTS_EXCEEDED_WAIT_SMS_C92D6C43 = + "number of read requests exceeded - wait %sms"; + public static final String STORAGE_EXCEPTION_READ_SIZE_LIMIT_EXCEEDED_WAIT_SMS_E19598BA = + "read size limit exceeded - wait %sms"; + public static final String STORAGE_EXCEPTION_UNABLE_TO_CREATE_DIRECTORY_S_BECAUSE_THERE_IS_FILE_UNDER_1C59ACFC = + "Unable to create directory %s because there is file under the path, please check " + + "configuration and restart."; + public static final String STORAGE_EXCEPTION_UNABLE_TO_CREATE_DIRECTORY_S_PLEASE_CHECK_CONFIGURATION_BA580B67 = + "Unable to create directory %s, please check configuration and restart."; + public static final String STORAGE_EXCEPTION_CONFLICT_IS_DETECTED_IN_DIRECTORY_S_WHICH_MAY_BE_BEING_USED_CB5C77FC = + "Conflict is detected in directory %s, which may be being used by another IoTDB " + + "(ProcessId=%s). Please check configuration and restart."; + public static final String COMPACTION_INNER_SPACE = "inner"; + public static final String COMPACTION_CROSS_SPACE = "cross"; + public static final String DEVICE_DOES_NOT_EXIST_IN_RESOURCE_FILE_FMT = + "%s does not exist in the resource file"; + public static final String TARGET_FILE_SMALLER_THAN_MAGIC_STRING_AND_VERSION_NUMBER_SIZE_FMT = + "target file %s is smaller than magic string and version number size"; + public static final String CURRENT_POINT_TIMESTAMP_SHOULD_BE_LATER_FMT = + "Timestamp of the current point of %s is %s, which should be later than the last time %s"; + public static final String DEVICE_TIME_RANGE_VERIFICATION_FAILED_FMT = + "The device(%s)'s time range verification failed. %s"; + public static final String CURRENT_DEVICE_TIME_RANGE_MISMATCH_FMT = + "The time range of current device is %s, which should equals actual device time range %s"; + public static final String CURRENT_TIMESERIES_METADATA_MISMATCH_FMT = + "Current timeseriesMetadata is %s, which should equals actual time range %s"; + public static final String CURRENT_CHUNK_METADATA_MISMATCH_FMT = + "Current chunkMetadata is %s, which should equals actual chunk time range %s"; + public static final String CURRENT_PAGE_TIME_RANGE_MISMATCH_FMT = + "Current page is %s, which should contains actual page data time range %s"; + public static final String COMPACTION_VALIDATION_SEQUENCE_FILES_HAS_OVERLAP_FMT = + "Failed to pass compaction validation, sequence files has overlap, file is %s"; + public static final String TSFILE_CANNOT_TRANSIT_TO_COMPACTING_FMT = + "TsFile %s cannot transit to COMPACTING. its status: %s"; + public static final String CURRENT_PAGE_CANNOT_BE_ALIGNED_WITH_TIME_CHUNK_FMT = + "Current page %s cannot be aligned with time chunk %s, page index is %s"; + public static final String CURRENT_CHUNK_CANNOT_BE_ALIGNED_WITH_TIME_CHUNK_FMT = + "Current chunk %s cannot be aligned with time chunk: %s, all time chunk in first batch is %s"; + public static final String WAL_NODE_CLOSED_FMT = "wal node-%s has been closed"; + public static final String BROKEN_WAL_FILE_FMT = "Broken wal file %s, size %d"; + public static final String TSFILE_READER_CLOSED_BECAUSE_NO_REFERENCE = + "{} TsFileReader is closed because of no reference."; + public static final String CLOSED_TSFILE_READER_CLOSED = + "{} closedTsFileReader is closed."; + public static final String UNCLOSED_TSFILE_READER_CLOSED = + "{} unclosedTsFileReader is closed."; + + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String MESSAGE_NO_LOAD_TSFILE_UUID_ARG_RECORDED_EXECUTE_LOAD_COMMAND_ARG_66722D80 = "No load TsFile uuid %s recorded for execute load command %s."; + public static final String EXCEPTION_NON_MINUS_ALIGNED_CHUNK_ONLY_HAS_ONE_MEASUREMENT_COMMA_BUT_MEASUREMENTINDEX_IS_E1A87F80 = "Non-aligned chunk only has one measurement, but measurementIndex is "; + } diff --git a/iotdb-core/datanode/src/main/i18n/zh/org/apache/iotdb/db/i18n/DataNodeMiscMessages.java b/iotdb-core/datanode/src/main/i18n/zh/org/apache/iotdb/db/i18n/DataNodeMiscMessages.java index 14e9b3f2c0000..11d76f07761a3 100644 --- a/iotdb-core/datanode/src/main/i18n/zh/org/apache/iotdb/db/i18n/DataNodeMiscMessages.java +++ b/iotdb-core/datanode/src/main/i18n/zh/org/apache/iotdb/db/i18n/DataNodeMiscMessages.java @@ -37,11 +37,45 @@ public final class DataNodeMiscMessages { public static final String REMOVE_PEER_FOR_REGION_SUCCEED = "removePeer %s for region %s 成功"; public static final String DELETE_PEER_FROM_CONSENSUS_GROUP_SUCCEED = - "deletePeer 从共识组 %s成功"; + "从共识组 %s 删除 peer 成功"; public static final String DELETE_REGION_ERROR = "deleteRegion %s 错误,%s"; public static final String DELETE_REGION_SUCCEED = "deleteRegion %s 成功"; + public static final String START_TO_ADD_PEER_FOR_REGION = + "{}, 开始将 addPeer {} 添加到 region {}"; + public static final String EXECUTED_ADD_PEER_FOR_REGION_ERROR = + "{}, 执行 addPeer {} 于 region {} 时出错"; + public static final String REGION_MIGRATE_UNEXPECTED_EXCEPTION = + "发生意外异常"; + public static final String ADD_PEER_FOR_REGION_ERROR_FMT = + "%s, 为 region 执行 AddPeer 出错,peerId:%s,regionId:%s"; + public static final String SUCCEED_TO_ADD_PEER_FOR_REGION = + "{}, 成功将 addPeer {} 添加到 region {}"; + public static final String START_TO_REMOVE_PEER_FOR_REGION = + "{}, 开始执行 removePeer {},目标 region {}"; + public static final String EXECUTED_REMOVE_PEER_FOR_REGION_ERROR_RETRY_TIMES = + "{}, 执行 removePeer {} 于 region {} 时出错,重试次数:{}"; + public static final String REMOVE_PEER_FOR_REGION_ERROR_AFTER_MAX_RETRY_TIMES_FMT = + "%s, 为 region 执行 RemovePeer 达到最大重试次数后仍出错,peerId:%s,regionId:%s"; + public static final String SUCCEED_TO_REMOVE_PEER_FOR_REGION = + "{}, 成功移除 removePeer {},region {}"; + public static final String START_TO_DELETE_PEER_FOR_REGION = + "{}, 开始执行 deletePeer {},region {}"; + public static final String DELETE_PEER_ERROR_WITH_ERROR_MESSAGE_FMT = + "deletePeer 出错,regionId:%s,错误信息:%s"; + public static final String DELETE_PEER_ERROR_WITH_REGION_ID = + "{}, deletePeer 出错,regionId:{}"; + public static final String DELETE_PEER_FOR_REGION_ERROR_EXCEPTION_FMT = + "deletePeer 于 region:%s 出错,异常:%s"; + public static final String SUCCEED_TO_DELETE_PEER_FROM_CONSENSUS_GROUP = + "{}, 成功从共识组删除 deletePeer {}"; + public static final String START_TO_DELETE_REGION_FOR_DATANODE = + "{}, 开始删除 deleteRegion {},DataNode {}"; + public static final String DELETE_REGION_ERROR_LOG = + "{}, deleteRegion {} 出错"; + public static final String SUCCEED_TO_DELETE_REGION = + "{}, deleteRegion {} 成功"; public static final String ERROR_PROCESSING_DATA_REGION = "处理数据 region 出错:{}"; public static final String FAILED_TO_PROCESS_TSFILE = @@ -932,6 +966,22 @@ private DataNodeMiscMessages() {} public static final String INVALID_PUSH_SINGLE_PIPE_META_REQ = "无效的 TPushSinglePipeMetaReq"; public static final String INVALID_PARAM = "无效参数"; public static final String INVALID_PARAMETERS_CHECK_USER_GUIDE = "参数无效,请查看用户指南。"; + public static final String AGGREGATE_MIN_MAX_VALUE_ONLY_SUPPORT_ALLOWED_TYPES = + "聚合函数 [MIN_VALUE, MAX_VALUE] 仅支持数据类型 [INT32, INT64, FLOAT, DOUBLE, STRING, DATE, TIMESTAMP]"; + public static final String AGGREGATE_AVG_SUM_STDDEV_ONLY_SUPPORT_NUMERIC_TYPES = + "聚合函数 [AVG, SUM, EXTREME, STDDEV, STDDEV_POP, STDDEV_SAMP, VARIANCE, VAR_POP, VAR_SAMP] 仅支持数值类型 [INT32, INT64, FLOAT, DOUBLE]"; + public static final String AGGREGATE_SKEWNESS_KURTOSIS_ONLY_SUPPORT_NUMERIC_TYPES = + "聚合函数 [SKEWNESS, KURTOSIS] 仅支持数值类型 [INT32, INT64, FLOAT, DOUBLE, TIMESTAMP]"; + public static final String AGGREGATE_FUNCTION_INPUT_SERIES_ONLY_SUPPORTS_BOOLEAN = + "聚合函数 [%s] 的输入序列仅支持数据类型 [BOOLEAN]"; + public static final String AGGREGATE_CORR_COVAR_REGR_ONLY_SUPPORT_NUMERIC_TYPES = + "聚合函数 [CORR, COVAR_POP, COVAR_SAMP, REGR_SLOPE, REGR_INTERCEPT] 仅支持数值类型 [INT32, INT64, FLOAT, DOUBLE, TIMESTAMP]"; + public static final String CHECK_AGGREGATION_KEEP_CONDITION = + "请检查聚合函数 [%s] 的输入 keep 条件"; + public static final String AGGREGATION_KEEP_CONDITION_REQUIREMENT = + "聚合函数 [%s] 的 keep 条件必须是常量,或由 keep 和 long 类型数字构成的比较表达式"; + public static final String DATABASE_NAME_IS_TREE_MODEL_DATABASE = + "数据库名称 %s 是树模型数据库,不允许设置到客户端会话中。"; public static final String INVALID_REQUEST = "无效请求 "; public static final String PREPARED_STMT_NOT_SUPPORTED_FOR_TREE = "Tree 模型不支持 PreparedStatement"; public static final String FILE_LENGTH_LARGER_THAN_MAX = "文件长度超过 max_object_file_size_in_bytes"; @@ -982,4 +1032,388 @@ private DataNodeMiscMessages() {} public static final String GET_TREE_UDF = "获取树模型 UDF: {}"; public static final String GET_TABLE_UDF = "获取表模型 UDF: {}"; public static final String GET_TRIGGER = "获取触发器: {}"; + // --------------------------------------------------------------------------- + // 补充日志消息 + // --------------------------------------------------------------------------- + public static final String MISC_LOG_DELAYANALYZER_CALCULATED_SAFE_WATERMARK_CURRENTTIME_P_DELAY_74E1214C = + "[DelayAnalyzer] 已计算安全水位线:{}(当前时间:{},P{} 延迟:{}ms)"; + public static final String MISC_LOG_LOGIN_LOCK_MANAGER_INITIALIZED_WITH_IP_LEVEL_ATTEMPTS_USER_57AE7966 = + "登录锁管理器已初始化:IP 级尝试次数={},用户级尝试次数={},锁定时间={} 分钟"; + public static final String MISC_LOG_USER_ID_LOCKED_DUE_TO_FAILED_ATTEMPTS_743CFB3A = + "用户 ID '{}' 因连续失败 {} 次而被锁定"; + public static final String MISC_LOG_USER_LEVEL_ATTEMPTS_AUTO_ENABLED_WITH_DEFAULT_1000_BECAUSE_FAB86B7D = + "用户级尝试次数已自动启用并使用默认值 1000,因为 IP 级已启用(设置为 {})"; + public static final String MISC_LOG_INVALID_LOCK_TIME_VALUE_RESET_TO_DEFAULT_10_MINUTES_8DCE21EF = + "无效的锁定时间值({}),重置为默认值(10 分钟)"; + public static final String MISC_LOG_SUCCESSFULLY_WAITED_FOR_PIPE_TO_FINISH_FBDF5157 = + "已成功等待 Pipe {} 完成。"; + public static final String MISC_LOG_DATANODE_EXITS_JVM_MEMORY_USAGE_BE69D1F5 = + "DataNode 退出。JVM 内存使用情况:{}"; + public static final String MISC_LOG_FAILED_TO_REPORT_DATANODE_S_SHUTDOWN_TO_CONFIGNODE_THE_CLUSTER_E6727497 = + "无法向 ConfigNode 上报 DataNode 关闭状态。集群在接下来的几秒内仍会将当前 DataNode 视为 Running。"; + public static final String MISC_LOG_SOMETHING_WRONG_HAPPENED_WHILE_CALLING_CONSENSUS_LAYER_S_8B8FBB16 = + "调用共识层的 triggerSnapshot API 时发生错误。"; + public static final String MISC_LOG_THE_ADDREGIONPEERTASK_HAS_ALREADY_BEEN_SUBMITTED_AND_WILL_4D398F73 = + "{} AddRegionPeerTask {} 已提交,不会重复提交。"; + public static final String MISC_LOG_THE_REMOVEREGIONPEER_HAS_ALREADY_BEEN_SUBMITTED_AND_WILL_6754D9FB = + "{} RemoveRegionPeer {} 已提交,不会重复提交。"; + public static final String MISC_LOG_THE_DELETEOLDREGIONPEERTASK_HAS_ALREADY_BEEN_SUBMITTED_AND_75815D37 = + "{} DeleteOldRegionPeerTask {} 已提交,不会重复提交。"; + public static final String MISC_LOG_RESET_PEER_LIST_FAIL_THIS_DATANODE_NOT_CONTAINS_PEER_OF_6539945C = + "重置 peer 列表失败,该 DataNode 不包含共识组 {} 的 peer,可能是创建本地 peer 失败导致。"; + public static final String MISC_LOG_SUBMIT_ADDREGIONPEERTASK_ERROR_FOR_REGION_4E999BA9 = + "{}, 提交 AddRegionPeerTask 失败,Region:{}"; + public static final String MISC_LOG_SUBMIT_REMOVEREGIONPEER_TASK_ERROR_FOR_REGION_200E7F68 = + "{}, 提交 RemoveRegionPeer 任务失败,Region:{}"; + public static final String MISC_LOG_SUBMIT_DELETEOLDREGIONPEERTASK_ERROR_FOR_REGION_460C308A = + "{}, 提交 DeleteOldRegionPeerTask 失败,Region:{}"; + public static final String MISC_LOG_GET_TRIGGER_EXECUTOR_1727D243 = "获取触发器执行器:{}"; + public static final String MISC_LOG_SUCCESSFULLY_PULL_SYSTEM_CONFIGURATIONS_FROM_CONFIGNODE_C8E04BF8 = + "成功从 ConfigNode-leader 拉取系统配置,耗时 {} ms"; + public static final String MISC_LOG_SUCCESSFULLY_REGISTER_TO_THE_CLUSTER_WHICH_TAKES_MS_ED479CA7 = + "成功注册到集群:{},耗时 {} ms。"; + public static final String MISC_LOG_RESTART_REQUEST_TO_CLUSTER_IS_ACCEPTED_WHICH_TAKES_MS_E8305E02 = + "向集群发送的重启请求已被接受:{},耗时 {} ms。"; + public static final String MISC_LOG_SCHEMAREGION_CONSENSUS_START_SUCCESSFULLY_WHICH_TAKES_MS_3D1B8523 = + "SchemaRegion 共识启动成功,耗时 {} ms。"; + public static final String MISC_LOG_DATAREGION_CONSENSUS_START_SUCCESSFULLY_WHICH_TAKES_MS_2B2DB4CB = + "DataRegion 共识启动成功,耗时 {} ms。"; + public static final String MISC_LOG_IOTDB_DATANODE_IS_SETTING_UP_SOME_DATABASES_MAY_NOT_BE_READY_961523F0 = + "IoTDB DataNode 正在初始化,部分数据库可能尚未就绪,请等待几秒。"; + public static final String MISC_LOG_SUCCESSFULLY_REGISTERED_ALL_THE_TRIGGERS_WHICH_TAKES_MS_246178BB = + "成功注册所有 trigger,耗时 {} ms。"; + public static final String MISC_LOG_PREPARE_EXTERNAL_SERVICE_RESOURCES_SUCCESSFULLY_WHICH_TAKES_00E62CB0 = + "成功准备 external-service 资源,耗时 {} ms。"; + public static final String MISC_LOG_CANNOT_SEND_RESTART_REQUEST_TO_THE_CONFIGNODE_LEADER_BECAUSE_AB17D41A = + "无法向 ConfigNode-leader 发送重启请求,原因:{}"; + public static final String MISC_LOG_CANNOT_PULL_SYSTEM_CONFIGURATIONS_FROM_CONFIGNODE_LEADER_FE630DAE = + "重试 {} 次后仍无法从 ConfigNode-leader 拉取系统配置。"; + public static final String MISC_LOG_CANNOT_SEND_RESTART_DATANODE_REQUEST_TO_CONFIGNODE_LEADER_4F50C19F = + "重试 {} 次后仍无法向 ConfigNode-leader 发送重启 DataNode 请求。"; + public static final String MISC_LOG_TOTALLY_FIND_TSFILES_TO_BE_SETTLED_DB47A63C = + "共找到 {} 个待 settle 的 TsFile。"; + public static final String MISC_LOG_SYSTEM_PROPERTIES_FILE_HAS_BEEN_MOVED_SUCCESSFULLY_4445A448 = + "system.properties 文件已成功移动:{} -> {}"; + public static final String MISC_LOG_SERIALIZE_MUTABLE_SYSTEM_PROPERTIES_SUCCESSFULLY_WHICH_TAKES_4656A206 = + "成功序列化 mutable system properties,耗时 {} ms。"; + public static final String MISC_LOG_SYSTEMPROPERTIES_NORMALIZE_FROM_TO_FOR_COMPATIBILITY_BE1C725F = + "[SystemProperties] 为兼容性将 {} 从 {} 规范化为 {}。"; + public static final String MISC_LOG_DO_NOT_UPGRADE_IOTDB_FROM_V0_9_OR_LOWER_VERSION_TO_V1_0_9878EC88 = + "请勿将 IoTDB 从 v0.9 或更低版本直接升级到 v1.0!请先升级到 v0.10"; + public static final String MISC_LOG_CANNOT_FIND_IOTDB_HOME_OR_IOTDB_CONF_ENVIRONMENT_VARIABLE_BE01B2FE = + "加载配置文件 {} 时找不到 IOTDB_HOME 或 IOTDB_CONF 环境变量,使用默认配置"; + public static final String MISC_LOG_COULDN_T_LOAD_THE_CONFIGURATION_FROM_ANY_OF_THE_KNOWN_SOURCES_EE3ED103 = + "无法从任何已知来源加载配置 {}。"; + public static final String MISC_LOG_THE_PARAMETER_DN_MAX_CONNECTION_FOR_INTERNAL_SERVICE_IS_D2F24BEB = + "参数 dn_max_connection_for_internal_service 已过期。请将其重命名为 " + + "dn_max_client_count_for_each_node_in_client_manager。"; + public static final String MISC_LOG_PARTITION_TABLE_RECOVER_WORKER_NUM_SHOULD_BE_GREATER_THAN_74A2512B = + "partition_table_recover_worker_num 应大于 0,但当前值为 {},忽略该值并使用默认值 {}"; + public static final String MISC_LOG_PARTITION_TABLE_RECOVER_MAX_READ_MEGABYTES_PER_SECOND_SHOULD_42BCDFBC = + "partition_table_recover_max_read_megabytes_per_second 应大于 0,但当前值为 {},忽略该值并使用默认值 {}"; + public static final String MISC_LOG_THE_THROTTLE_THRESHOLD_PARAMS_IS_DEPRECATED_PLEASE_USE_AA0E8EC7 = + "throttle threshold 参数 {} 已废弃,请使用 {}"; + public static final String MISC_LOG_FAILED_TO_PARSE_QUERY_SAMPLE_THROUGHPUT_BYTES_PER_SEC_TO_00144244 = + "无法将 query_sample_throughput_bytes_per_sec {} 解析为整数"; + public static final String MISC_LOG_THE_PARAMETER_DN_TARGET_CONFIG_NODE_LIST_HAS_BEEN_ABANDONED_6C0DE50B = + "参数 dn_target_config_node_list 已废弃,仅会使用第一个 ConfigNode 地址加入集群。请改用 " + + "dn_seed_config_node。"; + public static final String MISC_LOG_FAILED_TO_RELOAD_PROPERTIES_FROM_REJECT_DATANODE_STARTUP_74E66EEC = + "无法从 {} 重新加载 properties,拒绝启动 DataNode。"; + public static final String MISC_LOG_CONFIGNODES_ARE_SET_IN_WRONG_FORMAT_PLEASE_SET_THEM_LIKE_18E97679 = + "ConfigNodes 格式错误,请按 127.0.0.1:10710 的格式设置"; + public static final String MISC_LOG_INITIAL_ALLOCATEMEMORYFORWRITE_B90EC7D9 = + "初始 allocateMemoryForWrite = {}"; + public static final String MISC_LOG_INITIAL_ALLOCATEMEMORYFORREAD_07FB30F0 = + "初始 allocateMemoryForRead = {}"; + public static final String MISC_LOG_INITIAL_ALLOCATEMEMORYFORSCHEMA_965D4CE3 = + "初始 allocateMemoryForSchema = {}"; + public static final String MISC_LOG_INITIAL_ALLOCATEMEMORYFORCONSENSUS_18B40138 = + "初始 allocateMemoryForConsensus = {}"; + public static final String MISC_LOG_INITIAL_ALLOCATEMEMORYFORPIPE_616F9713 = + "初始 allocateMemoryForPipe = {}"; + public static final String MISC_LOG_ALLOCATEMEMORYFORSCHEMAREGION_3BE141E8 = + "分配 allocateMemoryForSchemaRegion = {}"; + public static final String MISC_LOG_ALLOCATEMEMORYFORSCHEMACACHE_61BFCE7D = + "分配 allocateMemoryForSchemaCache = {}"; + public static final String MISC_LOG_ALLOCATEMEMORYFORPARTITIONCACHE_809AA695 = + "分配 allocateMemoryForPartitionCache = {}"; + public static final String MISC_LOG_THE_PARAMETER_STORAGE_QUERY_SCHEMA_CONSENSUS_FREE_MEMORY_51C9A377 = + "参数 storage_query_schema_consensus_free_memory_proportion 自 v1.2.3 起已废弃,请改用 " + + "datanode_memory_proportion。"; + public static final String MISC_LOG_THE_SUM_OF_REJECT_PROPORTION_WAL_BUFFER_QUEUE_PROPORTION_185B1C49 = + "reject_proportion、wal_buffer_queue_proportion 和 device_path_cache_proportion 的总和过大,使用默认值 " + + "0.8、0.1 和 0.05。"; + public static final String MISC_LOG_THE_VALUE_OF_STORAGE_ENGINE_MEMORY_PROPORTION_IS_ILLEGAL_22CA9433 = + "storage_engine_memory_proportion 的值非法,使用默认值 8:2。"; + public static final String MISC_LOG_THE_VALUE_OF_WRITE_MEMORY_PROPORTION_IS_ILLEGAL_USE_DEFAULT_EE4FA112 = + "write_memory_proportion 的值非法,使用默认值 19:1。"; + public static final String MISC_LOG_SET_LOADTSFILESPILTPARTITIONMAXSIZE_FROM_TO_560BA8F7 = + "将 loadTsFileSpiltPartitionMaxSize 从 {} 设置为 {}"; + public static final String MISC_LOG_LOADTSFILESTATEMENTSPLITTHRESHOLD_CHANGED_FROM_TO_1CB90529 = + "loadTsFileStatementSplitThreshold 已从 {} 改为 {}"; + public static final String MISC_LOG_LOADTSFILESUBSTATEMENTBATCHSIZE_CHANGED_FROM_TO_D4EF3D07 = + "loadTsFileSubStatementBatchSize 已从 {} 改为 {}"; + public static final String MISC_LOG_CANNOT_FIND_GIVEN_DIRECTORY_STRATEGY_USING_THE_DEFAULT_VALUE_7997B145 = + "找不到指定的目录策略 {},使用默认值"; + public static final String MISC_LOG_CONFIG_PROPERTY_BOOLEAN_STRING_INFER_TYPE_CAN_ONLY_BE_BOOLEAN_2FA3AFC5 = + "配置项 boolean_string_infer_type 只能是 BOOLEAN 或 TEXT,实际为 {}"; + public static final String MISC_LOG_CONFIG_PROPERTY_FLOATING_STRING_INFER_TYPE_CAN_ONLY_BE_FLOAT_8041EAC4 = + "配置项 floating_string_infer_type 只能是 FLOAT、DOUBLE 或 TEXT,实际为 {}"; + public static final String MISC_LOG_CONFIG_PROPERTY_NAN_STRING_INFER_TYPE_CAN_ONLY_BE_FLOAT_61F60E0E = + "配置项 nan_string_infer_type 只能是 FLOAT、DOUBLE 或 TEXT,实际为 {}"; + public static final String MISC_LOG_ILLEGAL_DEFAULTDATABASELEVEL_SHOULD_1_USE_DEFAULT_VALUE_97F43732 = + "非法的 defaultDatabaseLevel:{},应 >= 1,使用默认值 1"; + public static final String MISC_LOG_INVALID_LOADTSFILESTATEMENTSPLITTHRESHOLD_VALUE_USING_DEFAULT_45EA7FBF = + "无效的 loadTsFileStatementSplitThreshold 值:{}。使用默认值:10"; + public static final String MISC_LOG_INVALID_LOADTSFILESUBSTATEMENTBATCHSIZE_VALUE_USING_DEFAULT_5C285109 = + "无效的 loadTsFileSubStatementBatchSize 值:{}。使用默认值:10"; + public static final String MISC_LOG_FAILED_TO_UPDATE_THE_VALUE_OF_METRIC_BECAUSE_OF_CONNECTION_B0FC4929 = + "因连接失败无法更新 metric 值,原因:"; + public static final String MISC_LOG_FAILED_TO_UPDATE_THE_VALUE_OF_METRIC_BECAUSE_OF_INTERNAL_E5C64806 = + "因内部错误无法更新 metric 值,原因:"; + public static final String MISC_LOG_FAILED_TO_STOP_EXTERNAL_SERVICE_S_BECAUSE_S_IT_WILL_BE_DROP_B2909C1E = + "无法停止 External Service %s,原因:%s。将强制丢弃该服务"; + public static final String MISC_LOG_CHANGEREGIONLEADER_START_CHANGE_THE_LEADER_OF_REGIONGROUP_248A99AD = + "[ChangeRegionLeader] 开始将 RegionGroup:{} 的 leader 切换到 DataNode:{}"; + public static final String MISC_LOG_SUCCESSFULLY_SUBMIT_ADDREGIONPEER_TASK_FOR_REGION_TARGET_64183781 = + "成功提交 addRegionPeer 任务,Region:{},目标 DataNode:{}"; + public static final String MISC_LOG_SUCCESSFULLY_SUBMIT_REMOVEREGIONPEER_TASK_FOR_REGION_DATANODE_9B74B948 = + "成功提交 removeRegionPeer 任务,Region:{},待移除 DataNode:{}"; + public static final String MISC_LOG_SUCCESSFULLY_SUBMIT_DELETEOLDREGIONPEER_TASK_FOR_REGION_3F3BB495 = + "成功提交 deleteOldRegionPeer 任务,Region:{},待移除 DataNode:{}"; + public static final String MISC_LOG_START_TO_CREATENEWREGIONPEER_TO_REGION_6DCE04AD = + "{}, 开始创建 createNewRegionPeer {},目标 Region {}"; + public static final String MISC_LOG_SUCCEED_TO_CREATENEWREGIONPEER_FOR_REGION_FDF176E3 = + "{}, createNewRegionPeer {} 创建成功,Region {}"; + public static final String MISC_LOG_EXECUTING_SYSTEM_EXIT_0_IN_STOPANDCLEARDATANODE_RPC_METHOD_647927C6 = + "stopAndClearDataNode RPC 方法将在 30 秒后执行 system.exit(0)"; + public static final String MISC_LOG_ERROR_OCCURRED_WHEN_PULLING_COMMIT_PROGRESS_48C12E4B = + "拉取提交进度时发生错误"; + public static final String MISC_LOG_ERROR_OCCURRED_WHEN_RECEIVING_SUBSCRIPTION_PROGRESS_BROADCAST_94B2CF10 = + "接收订阅进度广播时发生错误"; + public static final String MISC_LOG_ERROR_OCCURRED_WHEN_PUSHING_SUBSCRIPTION_RUNTIME_STATE_D4E71CE3 = + "推送订阅运行时状态时发生错误"; + public static final String MISC_LOG_FAILED_TO_PROCESS_CONSENSUS_SUBSCRIPTION_ROUTE_UPDATE_80D73E2B = + "处理共识订阅路由更新失败"; + public static final String MISC_LOG_THE_AVAILABLE_DISK_SPACE_IS_THE_TOTAL_DISK_SPACE_IS_AND_4506856F = + "可用磁盘空间:{},总磁盘空间:{},剩余磁盘使用率:{} 小于 disk_space_warning_threshold:{},系统将设置为只读!"; + public static final String MISC_LOG_CHANGEREGIONLEADER_FAILED_TO_CHANGE_THE_LEADER_OF_REGIONGROUP_F1A1DC14 = + "[ChangeRegionLeader] 切换 RegionGroup:{} 的 leader 失败"; + public static final String MISC_LOG_ERROR_OCCURRED_WHEN_CREATING_TRIGGER_INSTANCE_FOR_TRIGGER_5A8F8890 = + "创建 trigger:{} 的 trigger instance 时发生错误。原因:{}。"; + public static final String MISC_LOG_ERROR_OCCURRED_DURING_ACTIVE_TRIGGER_INSTANCE_FOR_TRIGGER_7731ECF2 = + "激活 trigger:{} 的 trigger instance 时发生错误。原因:{}。"; + public static final String MISC_LOG_ERROR_OCCURRED_WHEN_TRY_TO_INACTIVE_TRIGGER_INSTANCE_FOR_FA93D7E7 = + "停用 trigger:{} 的 trigger instance 时发生错误。原因:{}。 "; + public static final String MISC_LOG_ERROR_OCCURRED_WHEN_DROPPING_TRIGGER_INSTANCE_FOR_TRIGGER_23B94EBE = + "删除 trigger:{} 的 trigger instance 时发生错误。原因:{}。"; + public static final String MISC_LOG_ERROR_OCCURRED_WHEN_UPDATING_LOCATION_FOR_TRIGGER_THE_CAUSE_1C076D98 = + "更新 trigger:{} 的 Location 时发生错误。原因:{}。"; + public static final String MISC_LOG_CREATENEWREGIONPEER_ERROR_PEERS_REGIONID_ERRORMESSAGE_2EDAE3C8 = + "{}, CreateNewRegionPeer 出错,peers:{},RegionId:{},错误信息"; + public static final String MISC_LOG_FAILED_TO_SERIALIZE_DATABASESCOPEDDATAPARTITIONTABLE_FOR_2EFDD270 = + "无法序列化数据库 {} 的 DatabaseScopedDataPartitionTable"; + public static final String MISC_LOG_ERROR_OCCURRED_WHEN_TRYING_TO_FIRE_TRIGGER_ON_TENDPOINT_BFCBA56E = + "尝试触发 trigger({}) 到 TEndPoint:{} 时发生错误,原因:{}"; + public static final String MISC_LOG_FAILED_TO_UPDATE_LOCATION_OF_STATEFUL_TRIGGER_THROUGH_CONFIG_E6777439 = + "无法通过 config node 更新 stateful trigger({}) 的 location。原因:{}。"; + public static final String MISC_LOG_TRIGGER_WAS_FIRED_WITH_WRONG_EVENT_43D89454 = + "Trigger {} 触发了错误的事件 {}"; + public static final String MISC_LOG_DOES_NOT_EXIST_SKIP_IT_EFB94454 = "{} 不存在,跳过。"; + public static final String MISC_LOG_ERROR_WHEN_PARSE_TAG_AND_ATTRIBUTES_FILE_OF_NODE_PATH_D1492217 = + "解析节点路径 {} 的 tag 和 attributes 文件时发生错误"; + public static final String MISC_LOG_TOTALLY_FIND_TSFILES_TO_BE_SETTLED_INCLUDING_TSFILES_TO_522BCA28 = + "共找到 {} 个待 settle 的 TsFile,其中 {} 个待恢复。"; + public static final String MISC_LOG_FINISH_SETTLING_SUCCESSFULLY_FOR_TSFILE_C8BF06D7 = + "TsFile {} settle 成功"; + public static final String MISC_LOG_MEET_ERROR_WHILE_SETTLING_THE_TSFILE_A3515E1A = + "settle TsFile {} 时遇到错误"; + public static final String MISC_LOG_FINISH_SETTLING_TSFILES_MEET_ERRORS_6B564B68 = + "settle 完成,{} 个 TsFile 遇到错误。"; + public static final String MISC_LOG_THE_TSFILE_SHOULD_BE_SEALED_WHEN_REWRITTING_8B631F6C = + "重写 TsFile {} 时,该文件应处于 sealed 状态。"; + public static final String MISC_LOG_MEET_ERROR_WHEN_READING_SETTLE_LOG_LOG_PATH_2B076234 = + "读取 settle log 时遇到错误,日志路径:{}"; + + // --------------------------------------------------------------------------- + // 补充异常消息 + // --------------------------------------------------------------------------- + public static final String MISC_EXCEPTION_CANNOT_LOAD_FILE_S_BECAUSE_THE_FILE_HAS_CRASHED_6C180DF9 = + "无法加载文件 %s,因为该文件已损坏。"; + public static final String MISC_EXCEPTION_THE_VERSION_OF_THIS_TSFILE_IS_TOO_LOW_PLEASE_UPGRADE_IT_19CC276C = + "该 TsFile 版本过低,请升级到版本 4。"; + public static final String MISC_EXCEPTION_TSFILE_REWRITE_PROCESS_CANNOT_PROCEED_AT_POSITION_SBECAUSE_3763D32F = + "TsFile 重写流程无法在位置 %s 继续,原因:%s"; + public static final String MISC_EXCEPTION_DATA_TYPE_S_IS_NOT_SUPPORTED_5D5C02E4 = + "不支持数据类型 %s。"; + public static final String MISC_EXCEPTION_WINDOW_SIZE_MUST_BE_BETWEEN_D_AND_D_GOT_D_3559BE09 = + "窗口大小必须在 %d 和 %d 之间,当前为 %d"; + public static final String MISC_EXCEPTION_CONFIDENCE_LEVEL_MUST_BE_BETWEEN_0_AND_1_GOT_F_2CDA358E = + "置信度必须在 0 到 1 之间,当前为 %f"; + public static final String MISC_EXCEPTION_PERCENTILE_MUST_BE_BETWEEN_0_AND_1_GOT_F_DE6B1311 = + "百分位必须在 0 到 1 之间,当前为 %f"; + public static final String MISC_EXCEPTION_IRREGULAR_DATA_DIR_STRUCTURE_THERE_SHOULD_BE_A_SEQUENCE_95B4D431 = + "数据目录结构不规范。data 目录 %s 下应包含 sequence 和 unsequence 目录"; + public static final String MISC_EXCEPTION_IRREGULAR_DATA_DIR_STRUCTURE_THERE_SHOULD_BE_DATABASE_DIRECTORIES_10C36DC2 = + "数据目录结构不规范。sequence/unsequence 目录 %s 下应包含数据库目录"; + public static final String MISC_EXCEPTION_IRREGULAR_DATA_DIR_STRUCTURE_THERE_SHOULD_BE_DATAREGION_6BCDBFA1 = + "数据目录结构不规范。数据库目录 %s 下应包含 dataRegion 目录"; + public static final String MISC_EXCEPTION_IRREGULAR_DATA_DIR_STRUCTURE_THERE_SHOULD_BE_TIMEINTERVAL_8D074700 = + "数据目录结构不规范。数据库目录 %s 下应包含 timeInterval 目录"; + public static final String MISC_EXCEPTION_IRREGULAR_DATA_DIR_STRUCTURE_THERE_SHOULD_BE_TSFILES_UNDER_6381FDA5 = + "数据目录结构不规范。timeInterval 目录 %s 下应包含 TsFile"; + public static final String MISC_EXCEPTION_USER_S_DOES_NOT_EXIST_0CE725D8 = "用户 %s 不存在"; + public static final String MISC_EXCEPTION_DATA_TYPE_IS_NOT_CONSISTENT_INPUT_S_REGISTERED_S_AE9DBDC0 = + "数据类型不一致,输入:%s,注册类型:%s"; + public static final String MISC_EXCEPTION_DATA_TYPE_IS_NOT_CONSISTENT_INPUT_S_REGISTERED_S_BECAUSE_50C4BF31 = + "数据类型不一致,输入:%s,注册类型:%s,原因:%s"; + public static final String MISC_EXCEPTION_DATA_TYPE_S_IS_NOT_SUPPORTED_WHEN_CONVERT_DATA_AT_CLIENT_405429CC = + "客户端转换数据时不支持数据类型 %s"; + public static final String MISC_EXCEPTION_DEVICEID_SHOULD_NOT_BE_EMPTY_IN_GETTTL_METHOD_IN_TIMEFILTERFORDEVICETTL_8A501A45 = + "TimeFilterForDeviceTTL 的 getTTL 方法中 deviceID 不能为空"; + public static final String MISC_EXCEPTION_FAILED_TO_DECOMPRESS_COMPRESSEDBUFFER_56398D3E = + "解压 compressedBuffer 失败"; + public static final String MISC_EXCEPTION_ENCODING_S_DOES_NOT_SUPPORT_S_58301155 = + "encoding %s 不支持 %s"; + public static final String MISC_EXCEPTION_STORAGEENGINE_FAILED_TO_STOP_BECAUSE_OF_S_84D26574 = + "StorageEngine 停止失败,原因:%s。"; + public static final String MISC_EXCEPTION_THE_FILE_LENGTH_S_IS_NOT_EQUAL_TO_THE_OFFSET_S_73905F07 = + "文件长度 %s 不等于 offset %s"; + public static final String MISC_EXCEPTION_THE_REMOVE_DATANODE_SCRIPT_HAS_BEEN_DEPRECATED_PLEASE_CONNECT_F91DF360 = + "remove-datanode 脚本已废弃。请连接 CLI 并使用 SQL:remove datanode [datanode_id]。"; + public static final String MISC_EXCEPTION_CANNOT_PULL_SYSTEM_CONFIGURATIONS_FROM_CONFIGNODE_LEADER_BAD295DC = + "无法从 ConfigNode-leader 拉取系统配置。请检查 iotdb-system.properties 中的 dn_seed_config_node 是否正确或存活。"; + public static final String MISC_EXCEPTION_CANNOT_REGISTER_INTO_THE_CLUSTER_PLEASE_CHECK_WHETHER_THE_D8B29F58 = + "无法注册到集群。请检查 iotdb-system.properties 中的 dn_seed_config_node 是否正确或存活。"; + public static final String MISC_EXCEPTION_CANNOT_SEND_RESTART_DATANODE_REQUEST_TO_CONFIGNODE_LEADER_368BE214 = + "无法向 ConfigNode-leader 发送重启 DataNode 请求。请检查 iotdb-system.properties 中的 dn_seed_config_node 是否正确或存活。"; + public static final String MISC_EXCEPTION_FAIL_TO_GET_SG_OF_THIS_TSFILE_WHILE_PARSING_THE_FILE_PATH_9EADADE1 = + "解析文件路径时无法获取该 TsFile 的 sg。"; + public static final String MISC_EXCEPTION_CONFIGURING_THE_DATA_DIRECTORIES_AS_CROSS_DISK_DIRECTORIES_FC0A3875 = + "RatisConsensus 下不支持将 data directories 配置为跨磁盘目录(后续版本将支持)。"; + public static final String MISC_EXCEPTION_CONFIGURING_THE_WALMODE_AS_DISABLE_IS_NOT_SUPPORTED_UNDER_49298819 = + "IoTConsensus 和 IoTConsensusV2 stream mode 下不支持将 WALMode 配置为 disable"; + public static final String MISC_EXCEPTION_ENCRYPTTYPE_IS_NOT_UNENCRYPTED_BUT_USER_ENCRYPT_TOKEN_IS_F828C20B = + "encryptType 不是 UNENCRYPTED,但未设置 user_encrypt_token。请在环境变量中设置。"; + public static final String MISC_EXCEPTION_USER_ENCRYPT_TOKEN_HINT_SHOULD_NOT_INCLUDE_USER_ENCRYPT_50531D40 = + "user_encrypt_token_hint 不应包含 user_encrypt_token,请检查环境变量。"; + public static final String MISC_EXCEPTION_USER_ENCRYPT_TOKEN_HINT_SHOULD_NOT_INCLUDE_THE_REVERSE_OF_39B2D35C = + "user_encrypt_token_hint 不应包含 user_encrypt_token 的反转字符串,请检查环境变量。"; + public static final String MISC_EXCEPTION_RESTART_SYSTEM_AFTER_NOT_STORING_KEY_BUT_USER_ENCRYPT_TOKEN_61CCF9A2 = + "未存储密钥后重启系统,但未设置 user_encrypt_token。请在重启前通过环境变量设置。token hint 信息:%s"; + public static final String MISC_EXCEPTION_CHANGING_ENCRYPT_TYPE_OR_KEY_FOR_TSFILE_ENCRYPTION_AFTER_0668F74E = + "首次启动后不允许修改 TsFile 加密类型或密钥。token hint 信息:%s"; + public static final String MISC_EXCEPTION_FAIL_TO_RELOAD_CONFIG_FILE_S_BECAUSE_S_93CCAB8D = + "无法重新加载配置文件 %s,原因:%s"; + public static final String MISC_EXCEPTION_EACH_SUBSECTION_OF_CONFIGURATION_ITEM_UDF_READER_TRANSFORMER_97CA8962 = + "配置项 udf_reader_transformer_collector_memory_proportion 的每个子项都应为整数,当前为 %s"; + public static final String MISC_EXCEPTION_EACH_SUBSECTION_OF_CONFIGURATION_ITEM_CHUNKMETA_CHUNK_TIMESERIESMETA_77A43CE2 = + "配置项 chunkmeta_chunk_timeseriesmeta_free_memory_proportion 的每个子项都应为整数,当前为 %s"; + public static final String MISC_EXCEPTION_ILLEGAL_DEFAULTDATABASELEVEL_D_SHOULD_1_03088B38 = + "非法的 defaultDatabaseLevel:%d,应 >= 1"; + public static final String MISC_EXCEPTION_LOADTSFILESPILTPARTITIONMAXSIZE_SHOULD_BE_GREATER_THAN_OR_95B4DB23 = + "loadTsFileSpiltPartitionMaxSize 应大于或等于 0"; + public static final String MISC_EXCEPTION_REMOVING_IS_ONLY_ALLOWED_IN_AN_ENVIRONMENT_WHERE_THE_DATANODE_5A3E1FEA = + "只有在 DataNode 已成功启动的环境中才允许移除。请检查它是否已在 ConfigNode 上移除,或是否误删了 system.properties 文件。"; + public static final String MISC_EXCEPTION_STATEMENTID_SDOESN_T_EXIST_IN_THIS_SESSION_S_BD5B4733 = + "StatementId:%s 在会话 %s 中不存在"; + public static final String MISC_EXCEPTION_INTERNALCLIENTSESSION_SHOULD_NEVER_CALL_PREPARE_STATEMENT_CCAB3CDC = + "InternalClientSession 不应调用 PREPARE statement 方法。"; + public static final String MISC_EXCEPTION_STATEMENTID_S_DOESN_T_EXIST_IN_THIS_SESSION_S_4AA25E49 = + "StatementId:%s 在会话 %s 中不存在"; + public static final String MISC_EXCEPTION_MQTT_CLIENT_SESSION_DOES_NOT_SUPPORT_PREPARE_STATEMENT_B42FBC65 = + "MQTT client session 不支持 PREPARE statement。"; + public static final String MISC_EXCEPTION_DATAREGIONLIST_SIZE_SHOULD_ONLY_BE_1_NOW_CURRENT_SIZE_IS_282E453C = + "dataRegionList.size() 当前只能为 1,当前大小为 %s"; + public static final String MISC_EXCEPTION_PARAMETER_WINDOWSIZE_D_SHOULD_BE_POSITIVE_D95CBF33 = + "参数 windowSize(%d) 应为正数。"; + public static final String MISC_EXCEPTION_PARAMETER_SLIDINGSTEP_D_SHOULD_BE_POSITIVE_C0C25C2C = + "参数 slidingStep(%d) 应为正数。"; + public static final String MISC_EXCEPTION_PARAMETER_TIMEINTERVAL_D_SHOULD_BE_POSITIVE_53A6CE3B = + "参数 timeInterval(%d) 应为正数。"; + public static final String MISC_EXCEPTION_FAILED_TO_REFLECT_TRIGGER_INSTANCE_WITH_CLASSNAME_S_BECAUSE_C0CC44E2 = + "无法反射 className(%s) 对应的 trigger instance,原因:%s"; + public static final String MISC_EXCEPTION_S_IS_NOT_ALLOWED_ONLY_SUPPORT_S_862A4D86 = + "%s 不允许,仅支持 %s"; + public static final String MISC_EXCEPTION_S_IS_NOT_ALLOWED_ONLY_SUPPORT_S_1B06E0B7 = + " %s 不允许,仅支持 %s"; + public static final String PARAMETER_CANNOT_BE_MODIFIED_AFTER_FIRST_STARTUP_FMT = + "%s 首次启动后不能修改"; + public static final String UNSUPPORTED_INVOCATION_BY_DATANODE = + "DataNode 不支持调用此方法"; + public static final String UNSUPPORTED_INVOCATION_BY_DATANODE_USE_SUBMIT_LOAD_CONFIGURATION_TASK = + "DataNode 不支持调用此方法,请改用 submitLoadConfigurationTask"; + public static final String INVALID_REQUEST_FROM_CONFIG_NODE_FMT = + "来自 ConfigNode 的无效请求 %s。"; + public static final String INVALID_METHOD_NAME_FMT = "无效的方法名:'%s'"; + public static final String DATA_PARTITION_TABLE_GENERATION_IN_PROGRESS_FMT = + "DataPartitionTable 生成中:%.1f%%"; + public static final String DATA_PARTITION_TABLE_GENERATION_WITH_TASK_ID_IN_PROGRESS_FMT = + "任务 ID 为 %s 的 DataPartitionTable 生成中:%.1f%%"; + public static final String DATA_PARTITION_TABLE_GENERATION_COMPLETED_STATS = + "DataPartitionTable 生成成功完成。已处理:{},失败:{}"; + public static final String DATA_PARTITION_TABLE_GENERATION_ALREADY_IN_PROGRESS_FMT = + "DataPartitionTable 生成任务已在进行中:%.1f%%"; + public static final String DATA_PARTITION_TABLE_GENERATION_COMPLETED_SUCCESSFULLY = + "DataPartitionTable 生成成功完成"; + public static final String DATA_PARTITION_TABLE_GENERATION_FAILED_FMT = + "DataPartitionTable 生成失败:%s"; + public static final String BATCH_PROCESS_FAILED_FMT = "批处理失败:%s"; + public static final String STORAGE_GROUP_NOT_READY_FMT = + "存储组 %s 可能尚未就绪,请稍后重试"; + public static final String BAD_NODE_URL_FORMAT_FMT = + "节点 url %s 格式错误,应为 {IP/DomainName}:{Port}"; + public static final String INCONSISTENT_DATA_TYPES_FMT = + "数据类型不一致,已有数据类型:%s,传入数据类型:%s"; + public static final String CREATE_SYSTEM_DIRECTORY_FAILED = "创建系统目录失败!"; + public static final String DATABASE_READ_ONLY_NON_QUERY = + "数据库为只读状态,当前不接受非查询操作"; + public static final String AINODE_CONNECTION_FAILED_FMT = + "连接 AINode 失败,原因:[%s],请检查 AINode 的状态。"; + public static final String AINODE_CLIENT_REFRESH_FROM_CONFIG_NODE_FAILED = + "[AINodeClient] 从 ConfigNode 刷新失败:{}"; + + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String MESSAGE_DB_34B9E556 = " 所属数据库:"; + public static final String MESSAGE_MESSAGE_CECB319D = " 在 "; + public static final String MESSAGE_MESSAGE_57992626 = " 在 "; + public static final String MESSAGE_REGION_ARG_STATE_ARG_EXECUTED_SUCCEED_F78C5849 = + "Region:%s,状态:%s,执行成功"; + public static final String MESSAGE_FAILED_CREATE_EXTERNAL_SERVICE_ARG_IT_ALREADY_EXISTS_50AE69DF = + "创建 External Service %s 失败,该服务已存在!"; + public static final String MESSAGE_FAILED_START_EXTERNAL_SERVICE_ARG_BECAUSE_IT_NOT_EXISTED_29D6D3F2 = + "启动 External Service %s 失败,原因:该服务不存在!"; + public static final String MESSAGE_FAILED_START_EXTERNAL_SERVICE_ARG_BECAUSE_ITS_INSTANCE_CAN_NOT_F5A6C198 = + "启动 External Service %s 失败,原因:其实例无法成功构造。异常:%s"; + public static final String MESSAGE_FAILED_STOP_EXTERNAL_SERVICE_ARG_BECAUSE_IT_NOT_EXISTED_3CCCDA42 = + "停止 External Service %s 失败,原因:该服务不存在!"; + public static final String MESSAGE_FAILED_DROP_EXTERNAL_SERVICE_ARG_BECAUSE_IT_NOT_EXISTED_FDD11F17 = + "删除 External Service %s 失败,原因:该服务不存在!"; + public static final String MESSAGE_FAILED_DROP_EXTERNAL_SERVICE_ARG_BECAUSE_IT_BUILT_59858F3F = + "删除 External Service %s 失败,原因:该服务是内置服务!"; + public static final String MESSAGE_FAILED_DROP_EXTERNAL_SERVICE_ARG_BECAUSE_IT_RUNNING_89B38F80 = + "删除 External Service %s 失败,原因:该服务正在运行!"; + public static final String MESSAGE_CHANGEREGIONLEADER_SUCCESSFULLY_CHANGE_LEADER_REGIONGROUP_462797B4 = + "[ChangeRegionLeader] 成功切换 RegionGroup 的 leader:"; + public static final String MESSAGE_MESSAGE_3501C7E6 = " 到 "; + public static final String MESSAGE_EXECUTEFASTLASTDATAQUERYFORONEPREFIXPATH_DOS_NOT_SUPPORT_WILDCARDS_8E8F44F5 = "\"executeFastLastDataQueryForOnePrefixPath\" 不支持通配符。"; + public static final String MESSAGE_TEMPLATE_NULL_TRYING_ACTIVATE_TEMPLATE_MAY_TEMPLATE_BEING_UNSET_1CE92779 = + "尝试激活模板时模板为空,可能正在取消设置该模板。"; + public static final String MESSAGE_DOT_9D9B854A = "."; + public static final String MESSAGE_ERROR_OCCURRED_WHILE_PARSING_SQL_TO_PHYSICAL_PLAN_COLON_5C9F2C59 = + "将 SQL 解析为物理计划时发生错误:"; + public static final String MESSAGE_ERROR_OCCURRED_IN_READ_PROCESS_COLON_CD184195 = + "读取过程中发生错误:"; + public static final String MESSAGE_THE_READ_STATEMENT_IS_NOT_ALLOWED_IN_BATCH_COLON_D6A3D5EB = + "批处理中不允许读取语句:"; + public static final String MESSAGE_LEFT_BRACKET_ARG_RIGHT_BRACKET_EXCEPTION_OCCURRED_COLON_ARG_FAILED_DOT_909D8FFA = + "[%s] 发生异常:%s 失败。"; + public static final String EXCEPTION_SUFFIX_IS_NULL_6CC6B965 = "后缀不能为空"; + public static final String EXCEPTION_RUNTIMESTATE_D4D018BA = "runtimeState"; + public static final String EXCEPTION_STATEMENTNAME_IS_NULL_C03BB8D4 = "statementName 不能为空"; + public static final String EXCEPTION_SQL_IS_NULL_BEDB2B7A = "sql 不能为空"; + } diff --git a/iotdb-core/datanode/src/main/i18n/zh/org/apache/iotdb/db/i18n/DataNodePipeMessages.java b/iotdb-core/datanode/src/main/i18n/zh/org/apache/iotdb/db/i18n/DataNodePipeMessages.java index 131a83cf808d3..fffb2b1ebe9f0 100644 --- a/iotdb-core/datanode/src/main/i18n/zh/org/apache/iotdb/db/i18n/DataNodePipeMessages.java +++ b/iotdb-core/datanode/src/main/i18n/zh/org/apache/iotdb/db/i18n/DataNodePipeMessages.java @@ -812,6 +812,8 @@ public final class DataNodePipeMessages { public static final String REDIRECT_FILE_POSITION_TO = "Redirect file position to {}."; public static final String REDIRECT_TO_POSITION_IN_TRANSFERRING_TSFILE = "Redirect to position {} in transferring tsFile {}."; + public static final String NETWORK_FAILED_TO_RECEIVE_TSFILE_STATUS = + "网络接收 TsFile %s 失败,状态:%s"; public static final String SECURITY_DIR = "security dir: {}"; public static final String SECURITY_PKI_DIR = "security pki dir: {}"; public static final String SUCCESSFULLY_ADDED_ITEM = "成功 added item {}。"; @@ -847,8 +849,6 @@ public final class DataNodePipeMessages { + "Peeked event: {}, polled event: {}."; public static final String THE_FILE_IS_NOT_FOUND_MAY_ALREADY = "The file {} is not found, may already be deleted."; - public static final String NETWORK_FAILED_TO_RECEIVE_TSFILE_STATUS = - "网络接收 TsFile %s 失败,状态:%s"; public static final String THE_PIPE_WAS_DROPPED_SO_THE_EVENT = "The pipe {} was dropped so the event ack {} will be ignored."; public static final String THE_PIPE_WAS_DROPPED_SO_THE_EVENT_1 = @@ -1333,6 +1333,10 @@ public final class DataNodePipeMessages { // pipe – OpcUaServerBuilder // --------------------------------------------------------------------------- public static final String UNABLE_CREATE_SECURITY_DIR = "无法创建安全目录:"; + public static final String OPC_UA_SECURITY_DIR = + "安全目录:{}"; + public static final String OPC_UA_SECURITY_PKI_DIR = + "安全 PKI 目录:{}"; // --------------------------------------------------------------------------- // pipe – PipeDataNodePluginAgent @@ -1346,4 +1350,847 @@ public final class DataNodePipeMessages { "传输分片时 TPipeTransferResp 为空。"; private DataNodePipeMessages() {} + // --------------------------------------------------------------------------- + // 补充日志消息 + // --------------------------------------------------------------------------- + public static final String PIPE_LOG_SUBSCRIPTION_DETECT_DUPLICATED_PIPETSFILEINSERTIONEVENT_23A4740C = + "Subscription:检测到重复的 PipeTsFileInsertionEvent {},直接提交"; + public static final String PIPE_LOG_SUBSCRIPTION_PREFETCHING_QUEUE_BOUND_TO_TOPIC_FOR_CONSUMER_ECB64624 = + "Subscription:绑定到 topic [{}]、consumer group [{}] 的 prefetching queue 已完成,向客户端返回终止响应"; + public static final String PIPE_LOG_SUBSCRIPTION_PREFETCHING_QUEUE_BOUND_TO_TOPIC_FOR_CONSUMER_8F561EB2 = + "Subscription:绑定到 topic [{}]、consumer group [{}] 的 prefetching queue 已完成,回复客户端心跳请求"; + public static final String PIPE_LOG_SUBSCRIPTION_CREATE_PREFETCHING_QUEUE_BOUND_TO_TOPIC_FOR_E7F21F1E = + "Subscription:创建绑定到 topic [{}]、consumer group [{}] 的 prefetching queue"; + public static final String PIPE_LOG_SUBSCRIPTION_DROP_PREFETCHING_QUEUE_BOUND_TO_TOPIC_FOR_CONSUMER_21F313CB = + "Subscription:删除绑定到 topic [{}]、consumer group [{}] 的 prefetching queue"; + public static final String PIPE_LOG_SUBSCRIPTION_PREFETCHING_QUEUE_BOUND_TO_TOPIC_FOR_CONSUMER_03B89C51 = + "Subscription:绑定到 topic [{}]、consumer group [{}] 的 prefetching queue 仍然存在,请在关闭前解绑"; + public static final String PIPE_LOG_SUBSCRIPTION_PREFETCHING_QUEUE_BOUND_TO_TOPIC_FOR_CONSUMER_EA7D450B = + "Subscription:绑定到 topic [{}]、consumer group [{}] 的 prefetching queue 已关闭"; + public static final String PIPE_LOG_SUBSCRIPTION_PREFETCHING_QUEUE_BOUND_TO_TOPIC_FOR_CONSUMER_12E69B65 = + "Subscription:绑定到 topic [{}]、consumer group [{}] 的 prefetching queue 不存在"; + public static final String PIPE_LOG_SUBSCRIPTION_PREFETCHING_QUEUE_BOUND_TO_TOPIC_FOR_CONSUMER_C2735402 = + "Subscription:绑定到 topic [{}]、consumer group [{}] 的 prefetching queue 已存在"; + public static final String PIPE_LOG_SUBSCRIPTIONPREFETCHINGTABLETQUEUE_DETECTED_OUTDATED_POLL_C0001CCF = + "SubscriptionPrefetchingTabletQueue {} 检测到过期的 poll 请求,consumer {},commit context {},offset {}"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONBROKER_POLL_CALLED_CONSUMERID_TOPICNAMES_5F1F5175 = + "ConsensusSubscriptionBroker [{}]:调用 poll,consumerId={},topicNames={},queueCount={}," + + "maxBytes={}"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONBROKER_POLL_RESULT_CONSUMERID_EVENTSPOLLED_06412726 = + "ConsensusSubscriptionBroker [{}]:poll 结果,consumerId={},eventsPolled={},eventsNacked={}"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONBROKER_REFRESHED_OWNERSHIP_FOR_TOPIC_EB11CF64 = + "ConsensusSubscriptionBroker [{}]:刷新 topic [{}] 的 ownership,consumers={},regions={}," + + "generation={}"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONBROKER_STABLE_OWNERSHIP_POLL_ORDER_D40BB7D4 = + "ConsensusSubscriptionBroker [{}]:topic [{}] 的稳定 ownership poll 顺序,assignedQueueCount={}"; + public static final String PIPE_LOG_SUBSCRIPTION_CONSENSUS_PREFETCHING_QUEUE_FOR_TOPIC_REGION_B40792D9 = + "Subscription:topic [{}]、Region [{}]、consumer group [{}] 的 consensus prefetching queue 已存在,跳过"; + public static final String PIPE_LOG_SUBSCRIPTION_CREATE_CONSENSUS_PREFETCHING_QUEUE_BOUND_TO_0DBFC05E = + "Subscription:创建绑定到 topic [{}]、consumer group [{}] 的 consensus prefetching queue," + + "consensusGroupId={},fallbackCommittedRegionProgress={},tailStartSearchIndex={}," + + "initialRuntimeVersion={},initialActive={},totalRegionQueues={}"; + public static final String PIPE_LOG_SUBSCRIPTION_CLOSED_CONSENSUS_PREFETCHING_QUEUE_FOR_TOPIC_3A9DDEC5 = + "Subscription:由于 Region 移除,已关闭 topic [{}]、Region [{}]、consumer group [{}] 的 consensus " + + "prefetching queue"; + public static final String PIPE_LOG_SUBSCRIPTION_CONSENSUS_PREFETCHING_QUEUE_S_BOUND_TO_TOPIC_AB10ED07 = + "Subscription:绑定到 topic [{}]、consumer group [{}] 的 consensus prefetching queue 仍然存在,请在关闭前解绑"; + public static final String PIPE_LOG_SUBSCRIPTION_DROP_ALL_CONSENSUS_PREFETCHING_QUEUE_S_BOUND_FCC1B2C4 = + "Subscription:删除全部 {} 个绑定到 topic [{}]、consumer group [{}] 的 consensus prefetching queue"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONBROKER_NO_QUEUES_FOR_TOPIC_TO_COMMIT_7D8CC39D = + "ConsensusSubscriptionBroker [{}]:topic [{}] 没有可提交的 queue"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONBROKER_COMMIT_CONTEXT_NOT_FOUND_IN_46DF62A6 = + "ConsensusSubscriptionBroker [{}]:未找到 commit context {},已检查 {} 个 Region queue,topic [{}]"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONBROKER_NO_QUEUES_FOR_TOPIC_TO_SEEK_6307A90D = + "ConsensusSubscriptionBroker [{}]:topic [{}] 没有可执行 seek 的 queue"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONBROKER_UNSUPPORTED_SEEKTYPE_FOR_TOPIC_EDCA2CF2 = + "ConsensusSubscriptionBroker [{}]:不支持 seekType {},topic [{}]"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONBROKER_NO_QUEUES_FOR_TOPIC_TO_SEEK_9AC3890C = + "ConsensusSubscriptionBroker [{}]:topic [{}] 没有可执行 seek(topicProgress) 的 queue"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONBROKER_NO_QUEUES_FOR_TOPIC_TO_SEEKAFTER_C6D87BFD = + "ConsensusSubscriptionBroker [{}]:topic [{}] 没有可执行 seekAfter(topicProgress) 的 queue"; + public static final String PIPE_LOG_SUBSCRIPTION_CONSENSUS_PREFETCHING_QUEUES_BOUND_TO_TOPIC_63B37089 = + "Subscription:绑定到 topic [{}]、consumer group [{}] 的 consensus prefetching queue 不存在"; + public static final String PIPE_LOG_SUBSCRIPTIONPREFETCHINGTSFILEQUEUE_DETECTED_OUTDATED_POLL_7E0CE108 = + "SubscriptionPrefetchingTsFileQueue {} 检测到过期的 poll 请求,consumer {},commit context {},writing " + + "offset {}"; + public static final String PIPE_LOG_SUBSCRIPTION_SUBSCRIPTIONPREFETCHINGQUEUE_COMMIT_PIPETERMINATEEVENT_36529DC9 = + "Subscription:SubscriptionPrefetchingQueue {} 提交 PipeTerminateEvent {}"; + public static final String PIPE_LOG_SUBSCRIPTION_SUBSCRIPTIONPREFETCHINGQUEUE_IGNORE_ENRICHEDEVENT_95C6241C = + "Subscription:SubscriptionPrefetchingQueue {} 在 prefetch 期间忽略 EnrichedEvent {}。"; + public static final String PIPE_LOG_SUBSCRIPTION_SUBSCRIPTIONPREFETCHINGQUEUE_POLL_COMMITTED_8684FF17 = + "Subscription:SubscriptionPrefetchingQueue {} 从 prefetching queue poll 到已提交事件 {}(不变量被破坏)," + + "移除该事件"; + public static final String PIPE_LOG_SUBSCRIPTION_SUBSCRIPTIONPREFETCHINGQUEUE_POLL_NON_POLLABLE_644D5D6B = + "Subscription:SubscriptionPrefetchingQueue {} 从 prefetching queue poll 到不可 poll 事件 {}(不变量被破坏)," + + "执行 nack 并移除该事件"; + public static final String PIPE_LOG_SUBSCRIPTION_SUBSCRIPTIONPREFETCHINGQUEUE_INTERRUPTED_WHILE_F8923826 = + "Subscription:SubscriptionPrefetchingQueue {} 在 poll 事件期间被中断。"; + public static final String PIPE_LOG_SUBSCRIPTION_INCONSISTENT_HEARTBEAT_EVENT_WHEN_PEEKING_BROKEN_BFE1DF6E = + "Subscription:{} peeking 时 heartbeat event 不一致(不变量被破坏),期望 {},实际 {},放回队列"; + public static final String PIPE_LOG_SUBSCRIPTION_SUBSCRIPTIONPREFETCHINGQUEUE_ONLY_SUPPORT_PREFETCH_F3B33B30 = + "Subscription:SubscriptionPrefetchingQueue {} 仅支持 prefetch EnrichedEvent。忽略 {}。"; + public static final String PIPE_LOG_SUBSCRIPTION_SUBSCRIPTIONPREFETCHINGQUEUE_PREFETCH_TSFILEINSERTIONEVENT_19444D2C = + "Subscription:SubscriptionPrefetchingQueue {} 在 ToTabletIterator 非 null 时 prefetch " + + "TsFileInsertionEvent(不变量被破坏)。忽略 {}。"; + public static final String PIPE_LOG_FAILED_TO_INCREASE_REFERENCE_COUNT_FOR_WHEN_ON_RETRYABLE_4E10BE3B = + "为 {} 增加引用计数失败,发生在可重试 TabletInsertionEvent 上执行 {} 时"; + public static final String PIPE_LOG_EXCEPTION_OCCURRED_WHEN_ON_RETRYABLE_TABLETINSERTIONEVENT_2350D9F7 = + "执行 {} 时在可重试 TabletInsertionEvent {} 上发生异常"; + public static final String PIPE_LOG_SUBSCRIPTION_SUBSCRIPTION_COMMIT_CONTEXT_DOES_NOT_EXIST_0E4EF990 = + "Subscription:subscription commit context {} 不存在,可能已提交或发生了意外情况,prefetching queue:{}"; + public static final String PIPE_LOG_SUBSCRIPTION_SUBSCRIPTION_EVENT_IS_COMMITTED_SUBSCRIPTION_BEE17D7F = + "Subscription:subscription event {} 已提交,subscription commit context {},prefetching queue:{}"; + public static final String PIPE_LOG_SUBSCRIPTION_SUBSCRIPTION_EVENT_IS_NOT_COMMITTABLE_SUBSCRIPTION_8D03A10C = + "Subscription:subscription event {} 不可提交,subscription commit context {},prefetching queue:{}"; + public static final String PIPE_LOG_INCONSISTENT_CONSUMER_GROUP_WHEN_ACKING_EVENT_CURRENT_INCOMING_AEE3E90F = + "acking event 时 consumer group 不一致,当前:{},传入:{},consumer id:{},event commit context:{}," + + "prefetching queue:{},仍然提交。"; + public static final String PIPE_LOG_SUBSCRIPTION_SUBSCRIPTION_COMMIT_CONTEXT_DOES_NOT_EXIST_DE907E05 = + "Subscription:subscription commit context [{}] 不存在,可能已提交或发生了意外情况,prefetching queue:{}"; + public static final String PIPE_LOG_INCONSISTENT_CONSUMER_GROUP_WHEN_NACKING_EVENT_CURRENT_INCOMING_B0104C41 = + "nacking event 时 consumer group 不一致,当前:{},传入:{},consumer id:{},event commit context:{}," + + "prefetching queue:{},仍然提交。"; + public static final String PIPE_LOG_SUBSCRIPTION_SUBSCRIPTIONPREFETCHINGQUEUE_RECYCLE_EVENT_7B120BC3 = + "Subscription:SubscriptionPrefetchingQueue {} 回收处理中事件 {},执行 nack 并重新放入 prefetching queue"; + public static final String PIPE_LOG_SUBSCRIPTION_POISON_MESSAGE_DETECTED_NACKCOUNT_FORCE_ACKING_7528DD6B = + "Subscription:检测到 poison message(nackCount={}),对事件 {} 在 prefetching queue {} 中强制执行 ack"; + public static final String PIPE_LOG_SUBSCRIPTION_POISON_MESSAGE_DETECTED_NACKCOUNT_FORCE_ACKING_D984349C = + "Subscription:检测到 poison message(nackCount={}),对 eagerly pollable event {} 在 prefetching " + + "queue {} 中强制执行 ack"; + public static final String PIPE_LOG_SUBSCRIPTION_POISON_MESSAGE_DETECTED_NACKCOUNT_FORCE_ACKING_FEF0F0BF = + "Subscription:检测到 poison message(nackCount={}),对 pollable event {} 在 prefetching queue {} " + + "中强制执行 ack"; + public static final String PIPE_LOG_SUBSCRIPTION_UNKNOWN_PIPESUBSCRIBEREQUESTVERSION_RESPONSE_56E5D93F = + "Subscription:未知的 PipeSubscribeRequestVersion,响应状态 = {}。"; + public static final String PIPE_LOG_THE_SUBSCRIPTION_REQUEST_VERSION_IS_DIFFERENT_FROM_THE_CLIENT_324A125F = + "subscription 请求版本 {} 与客户端请求版本 {} 不同,receiver 将重置为客户端请求版本。"; + public static final String PIPE_LOG_SUBSCRIPTION_CONSENSUS_IS_A_NO_OP_ON_THIS_DATANODE_BECAUSE_28F7E92B = + "Subscription:consensus {} 在该 DataNode 上为空操作,因为本地 queue 不存在,consumerGroup={},topic={}"; + public static final String PIPE_LOG_SUBSCRIPTIONBROKERAGENT_REFRESHING_CONSENSUS_QUEUE_ORDER_1886704D = + "SubscriptionBrokerAgent:将 topic [{}] 的 consensus queue order-mode 刷新为 [{}]"; + public static final String PIPE_LOG_SUBSCRIPTION_UNBOUND_CONSENSUS_PREFETCHING_QUEUE_S_FOR_REMOVED_AC018742 = + "Subscription:已解绑 {} 个已移除 Region [{}] 的 consensus prefetching queue"; + public static final String PIPE_LOG_SUBSCRIPTIONBROKERAGENT_SETACTIVEFORREGION_REGIONID_ACTIVE_4AC3A2CB = + "SubscriptionBrokerAgent:setActiveForRegion regionId={},active={}"; + public static final String PIPE_LOG_SUBSCRIPTIONBROKERAGENT_SETACTIVEWRITERSFORREGION_REGIONID_48B39B3E = + "SubscriptionBrokerAgent:setActiveWritersForRegion regionId={},activeWriterNodeIds={}"; + public static final String PIPE_LOG_SUBSCRIPTIONBROKERAGENT_APPLYRUNTIMESTATEFORREGION_REGIONID_6D8C37A1 = + "SubscriptionBrokerAgent:applyRuntimeStateForRegion regionId={},runtimeState={}"; + public static final String PIPE_LOG_SUBSCRIPTION_FAILED_TO_PARSE_CONSENSUS_REGION_ID_FOR_COMMITTED_9F1A50EB = + "Subscription:解析 committed progress 的 consensus Region id {} 失败,topic={},consumerGroup={}"; + public static final String PIPE_LOG_SUBSCRIPTION_CONSENSUS_BROKER_BOUND_TO_CONSUMER_GROUP_DOES_E46FCDD9 = + "Subscription:绑定到 consumer group [{}] 的 consensus broker 不存在"; + public static final String PIPE_LOG_SUBSCRIPTION_PIPE_BROKER_BOUND_TO_CONSUMER_GROUP_DOES_NOT_E9B60B22 = + "Subscription:绑定到 consumer group [{}] 的 pipe broker 不存在"; + public static final String PIPE_LOG_SUBSCRIPTION_BROKER_BOUND_TO_CONSUMER_GROUP_DOES_NOT_EXIST_74CAD5BE = + "Subscription:绑定到 consumer group [{}] 的 broker 不存在"; + public static final String PIPE_LOG_SUBSCRIPTION_CONSUMER_GROUP_META_CHANGE_DETECTED_TOPICSUNSUBBYGROUP_F6DAF20A = + "Subscription:检测到 consumer group [{}] meta 变更,topicsUnsubByGroup={},newlySubscribedTopics={}"; + public static final String PIPE_LOG_EXCEPTION_OCCURRED_WHEN_HANDLING_SINGLE_CONSUMER_GROUP_META_10E7688C = + "处理 consumer group {} 的单个 consumer group meta 变更时发生异常"; + public static final String PIPE_LOG_SUBSCRIPTION_BROKER_BOUND_TO_CONSUMER_GROUP_HAS_ALREADY_0F37997F = + "Subscription:绑定到 consumer group [{}] 的 broker 已存在,本地 agent {} 上 consumer group meta 的创建时间与 " + + "coordinator {} 的 meta 不一致,删除该 broker"; + public static final String PIPE_LOG_SUBSCRIPTION_BROKER_BOUND_TO_CONSUMER_GROUP_DOES_NOT_EXISTED_9F09E4DE = + "Subscription:绑定到 consumer group [{}] 的 broker 不存在,但对应 consumer group meta 已存在于本地 agent,忽略该情况"; + public static final String PIPE_LOG_EXCEPTION_OCCURRED_WHEN_HANDLING_SINGLE_TOPIC_META_CHANGES_43434FC4 = + "处理 topic {} 的单个 topic meta 变更时发生异常"; + public static final String PIPE_LOG_PULLED_TOPIC_META_FROM_CONFIG_NODE_RECOVERING_5C4B1AEE = + "已从 ConfigNode 拉取 topic meta:{},正在恢复……"; + public static final String PIPE_LOG_INTERRUPTED_WHILE_SLEEPING_WILL_RETRY_TO_GET_TOPIC_META_976E4BE2 = + "休眠期间被中断,将重试从 ConfigNode 获取 topic meta。"; + public static final String PIPE_LOG_PULLED_CONSUMER_GROUP_META_FROM_CONFIG_NODE_RECOVERING_A85B948F = + "已从 ConfigNode 拉取 consumer group meta:{},正在恢复……"; + public static final String PIPE_LOG_INTERRUPTED_WHILE_SLEEPING_WILL_RETRY_TO_GET_CONSUMER_GROUP_7E161F39 = + "休眠期间被中断,将重试从 ConfigNode 获取 consumer group meta。"; + public static final String PIPE_LOG_FAILED_TO_GET_TOPIC_META_FROM_CONFIG_NODE_FOR_TIMES_WILL_E8D0B7F8 = + "从 ConfigNode 获取 topic meta 已失败 {} 次,最多将重试 {} 次。"; + public static final String PIPE_LOG_FAILED_TO_GET_CONSUMER_GROUP_META_FROM_CONFIG_NODE_FOR_TIMES_3E4C727C = + "从 ConfigNode 获取 consumer group meta 已失败 {} 次,最多将重试 {} 次。"; + public static final String PIPE_LOG_SUBSCRIPTION_CONSUMER_REFRESHED_OF_PROCESSOR_BUFFERED_COMMIT_8C7A352A = + "Subscription:consumer {} 已刷新 {} 个 processor-buffered commit context lease,共 {} 个"; + public static final String PIPE_LOG_SUBSCRIPTION_CONSUMER_POLL_SUCCESSFULLY_WITH_REQUEST_6BC8BFED = + "Subscription:consumer {} poll {} 成功,请求:{}"; + public static final String PIPE_LOG_SUBSCRIPTION_CONSUMER_COMMIT_NACK_FULL_COMMIT_CONTEXTS_CFC18359 = + "Subscription:consumer {} commit(nack:{})完整 commit context:{}"; + public static final String PIPE_LOG_SUBSCRIPTION_CONSUMER_COMMIT_NACK_FULL_REQUESTED_COMMIT_1E67E8A3 = + "Subscription:consumer {} commit(nack:{})完整请求 commit context:{},完整接受 commit context:{}," + + "完整过期已取消订阅 commit context:{}"; + public static final String PIPE_LOG_SUBSCRIPTION_REMOVE_CONSUMER_CONFIG_WHEN_HANDLING_EXIT_3827D0E8 = + "Subscription:处理退出时移除 consumer config {}"; + public static final String PIPE_LOG_SUBSCRIPTION_CONSUMER_IS_INACTIVE_FOR_MS_EXCEEDING_TIMEOUT_36E06B11 = + "Subscription:consumer {} 已非活跃 {} ms,超过超时阈值 {} ms,在服务端关闭该 consumer。"; + public static final String PIPE_LOG_SUBSCRIPTION_THE_CONSUMER_HAS_ALREADY_EXISTED_WHEN_HANDSHAKING_3761AD81 = + "Subscription:握手时 consumer {} 已存在,跳过 consumer 创建。"; + public static final String PIPE_LOG_SUBSCRIPTION_CONSUMER_HANDSHAKE_SUCCESSFULLY_DATA_NODE_ID_58DA6A5F = + "Subscription:consumer {} 握手成功,data node id:{}"; + public static final String PIPE_LOG_SUBSCRIPTION_CONSUMER_UNSUBSCRIBE_SUCCESSFULLY_AA5E0AA9 = + "Subscription:consumer {} 取消订阅 {} 成功"; + public static final String PIPE_LOG_SUBSCRIPTION_CONSUMER_COMMIT_NACK_ACCEPTED_SUCCESSFULLY_58D1C111 = + "Subscription:consumer {} commit(nack:{})accepted 成功,summary:{}"; + public static final String PIPE_LOG_SUBSCRIPTION_CONSUMER_SEEK_TOPIC_TO_TOPICPROGRESS_REGIONCOUNT_41702313 = + "Subscription:consumer {} 将 topic {} seek 到 topicProgress(regionCount={})"; + public static final String PIPE_LOG_SUBSCRIPTION_CONSUMER_SEEKAFTER_TOPIC_TO_TOPICPROGRESS_REGIONCOUNT_838584F8 = + "Subscription:consumer {} 将 topic {} seekAfter 到 topicProgress(regionCount={})"; + public static final String PIPE_LOG_SUBSCRIPTION_CONSUMER_SEEK_TOPIC_WITH_SEEKTYPE_799FF449 = + "Subscription:consumer {} 对 topic {} 使用 seekType={} 执行 seek"; + public static final String PIPE_LOG_SUBSCRIPTION_UNSUBSCRIBE_ALL_SUBSCRIBED_TOPICS_BEFORE_CLOSE_BFB787AE = + "Subscription:取消订阅全部已订阅 topic {},然后关闭 consumer {}"; + public static final String PIPE_LOG_SUBSCRIPTION_THE_CONSUMER_DOES_NOT_EXISTED_WHEN_CLOSING_CCB63DCB = + "Subscription:关闭时 consumer {} 不存在,跳过删除 consumer。"; + public static final String PIPE_LOG_SUBSCRIPTION_CONSUMER_UNSUBSCRIBE_COMPLETED_TOPICS_SUCCESSFULLY_44BAFF55 = + "Subscription:consumer {} 取消订阅 {}(已完成 topic)成功"; + public static final String PIPE_LOG_SUBSCRIPTION_FAILED_TO_CLOSE_TIMED_OUT_CONSUMER_AFTER_MS_89CC11F1 = + "Subscription:consumer {} 非活跃 {} ms 后,关闭超时 consumer 失败"; + public static final String PIPE_LOG_SUBSCRIPTION_DETECT_STALE_CONSUMER_CONFIG_WHEN_HANDSHAKING_B0196DB8 = + "Subscription:握手时检测到过期 consumer config,将清理过期 consumer config {},并将 consumer config 设置为传入的 " + + "consumer config {}。"; + public static final String PIPE_LOG_SUBSCRIPTION_MISSING_CONSUMER_CONFIG_WHEN_HANDLING_HEARTBEAT_B9EFB1CC = + "Subscription:处理心跳请求时缺少 consumer config:{}"; + public static final String PIPE_LOG_EXCEPTION_OCCURRED_WHEN_FETCH_ENDPOINTS_FOR_CONSUMER_IN_325B571A = + "在 ConfigNode 中获取 consumer {} 的 endpoints 时发生异常"; + public static final String PIPE_LOG_SUBSCRIPTION_MISSING_CONSUMER_CONFIG_WHEN_HANDLING_PIPESUBSCRIBESUBSCRIBEREQ_DF466A30 = + "Subscription:处理 PipeSubscribeSubscribeReq 时缺少 consumer config:{}"; + public static final String PIPE_LOG_SUBSCRIPTION_MISSING_CONSUMER_CONFIG_WHEN_HANDLING_PIPESUBSCRIBEUNSUBSCRIBEREQ_673CE701 = + "Subscription:处理 PipeSubscribeUnsubscribeReq 时缺少 consumer config:{}"; + public static final String PIPE_LOG_SUBSCRIPTION_MISSING_CONSUMER_CONFIG_WHEN_HANDLING_PIPESUBSCRIBEPOLLREQ_6BB9292B = + "Subscription:处理 PipeSubscribePollReq 时缺少 consumer config:{}"; + public static final String PIPE_LOG_SUBSCRIPTION_CONSUMER_POLL_NULL_RESPONSE_FOR_EVENT_OUTDATED_4CF7FAAA = + "Subscription:consumer {} 针对事件 {} poll 到 null 响应(outdated:{}),请求:{}"; + public static final String PIPE_LOG_SUBSCRIPTION_CONSUMER_POLL_FOR_EVENT_OUTDATED_FAILED_WITH_0BEFF244 = + "Subscription:consumer {} poll {} 失败,event={}(outdated:{}),请求:{}"; + public static final String PIPE_LOG_SUBSCRIPTION_MISSING_CONSUMER_CONFIG_WHEN_HANDLING_PIPESUBSCRIBECOMMITREQ_76B28EBB = + "Subscription:处理 PipeSubscribeCommitReq 时缺少 consumer config:{}"; + public static final String PIPE_LOG_SUBSCRIPTION_CONSUMER_COMMIT_NACK_PARTIALLY_ACCEPTED_REQUESTED_87D0C038 = + "Subscription:consumer {} commit(nack:{})部分 accepted,请求 summary:{},accepted summary:{}," + + "过期已取消订阅 summary:{}"; + public static final String PIPE_LOG_SUBSCRIPTION_MISSING_CONSUMER_CONFIG_WHEN_HANDLING_PIPESUBSCRIBECLOSEREQ_717660F8 = + "Subscription:处理 PipeSubscribeCloseReq 时缺少 consumer config:{}"; + public static final String PIPE_LOG_EXCEPTION_OCCURRED_WHEN_SEEKING_WITH_REQUEST_6B581543 = + "使用请求 {} 执行 seek 时发生异常"; + public static final String PIPE_LOG_SUBSCRIPTION_MISSING_CONSUMER_CONFIG_WHEN_HANDLING_SUBSCRIPTION_B85D47A4 = + "Subscription:处理 subscription seek 请求时缺少 consumer config:{}"; + public static final String PIPE_LOG_UNEXPECTED_STATUS_CODE_WHEN_CREATING_CONSUMER_IN_CONFIG_5D2E1B97 = + "收到非预期状态码 {},在 ConfigNode 中创建 consumer {} 时"; + public static final String PIPE_LOG_UNEXPECTED_STATUS_CODE_WHEN_CLOSING_CONSUMER_IN_CONFIG_NODE_0C2E0CE6 = + "收到非预期状态码 {},在 ConfigNode 中关闭 consumer {} 时"; + public static final String PIPE_LOG_UNEXPECTED_STATUS_CODE_WHEN_SUBSCRIBING_TOPICS_FOR_CONSUMER_8676DA8A = + "收到非预期状态码 {},在 ConfigNode 中订阅 topic {} 给 consumer {} 时"; + public static final String PIPE_LOG_EXCEPTION_OCCURRED_WHEN_SUBSCRIBING_TOPICS_FOR_CONSUMER_E5D72F10 = + "在 ConfigNode 中订阅 topic {} 给 consumer {} 时发生异常"; + public static final String PIPE_LOG_UNEXPECTED_STATUS_CODE_WHEN_UNSUBSCRIBING_TOPICS_FOR_CONSUMER_EFC771F0 = + "收到非预期状态码 {},在 ConfigNode 中为 topic {} 取消 consumer {} 的订阅时"; + public static final String PIPE_LOG_EXCEPTION_OCCURRED_WHEN_UNSUBSCRIBING_TOPICS_FOR_CONSUMER_FE4B3CEE = + "在 ConfigNode 中为 topic {} 取消 consumer {} 的订阅时发生异常"; + public static final String PIPE_LOG_SUBSCRIPTION_CONSUMER_POLL_EXCESSIVE_PAYLOAD_FOR_EVENT_OUTDATED_2BFF690B = + "Subscription:consumer {} poll 到过大的 payload {},event={}(outdated:{}),请求:{},参数配置或 payload " + + "控制可能出现意外情况……"; + public static final String PIPE_LOG_FAILED_TO_UNBIND_FROM_SUBSCRIPTION_PREFETCHING_QUEUE_METRICS_6614388C = + "解绑 subscription prefetching queue metrics 失败,prefetching queue map 非空"; + public static final String PIPE_LOG_FAILED_TO_DEREGISTER_SUBSCRIPTION_PREFETCHING_QUEUE_METRICS_F08479A7 = + "注销 subscription prefetching queue metrics 失败,SubscriptionPrefetchingQueue({}) 不存在"; + public static final String PIPE_LOG_FAILED_TO_MARK_TRANSFER_EVENT_RATE_SUBSCRIPTIONPREFETCHINGQUEUE_7DEF95B5 = + "标记传输事件速率失败,SubscriptionPrefetchingQueue({}) 不存在"; + public static final String PIPE_LOG_FAILED_TO_UNBIND_FROM_CONSENSUS_SUBSCRIPTION_PREFETCHING_A8F920D9 = + "解绑 consensus subscription prefetching queue metrics 失败,queue map 非空"; + public static final String PIPE_LOG_FAILED_TO_DEREGISTER_CONSENSUS_SUBSCRIPTION_PREFETCHING_8B180091 = + "注销 consensus subscription prefetching queue metrics 失败,ConsensusPrefetchingQueue({}) 不存在"; + public static final String PIPE_LOG_FAILED_TO_MARK_TRANSFER_EVENT_RATE_CONSENSUSPREFETCHINGQUEUE_FE9B91C3 = + "标记传输事件速率失败,ConsensusPrefetchingQueue({}) 不存在"; + public static final String PIPE_LOG_SUBSCRIPTIONEVENTTSFILERESPONSE_IS_EMPTY_WHEN_FETCHING_NEXT_DFD60DF1 = + "获取下一响应时 SubscriptionEventTsFileResponse {} 为空(不变量被破坏)"; + public static final String PIPE_LOG_SUBSCRIPTIONEVENTTSFILERESPONSE_IS_NOT_EMPTY_WHEN_INITIALIZING_C9DE83C9 = + "初始化时 SubscriptionEventTsFileResponse {} 非空(不变量被破坏)"; + public static final String PIPE_LOG_SUBSCRIPTIONEVENTTSFILERESPONSE_IS_EMPTY_WHEN_GENERATING_B8D03E93 = + "生成下一响应时 SubscriptionEventTsFileResponse {} 为空(不变量被破坏)"; + public static final String PIPE_LOG_SUBSCRIPTIONEVENTTABLETRESPONSE_WAIT_FOR_RESOURCE_ENOUGH_9926289F = + "SubscriptionEventTabletResponse {} 等待足够资源以解析 tablets {} 秒。"; + public static final String PIPE_LOG_SUBSCRIPTIONEVENTTABLETRESPONSE_IS_EMPTY_WHEN_FETCHING_NEXT_4464E3F2 = + "获取下一响应时 SubscriptionEventTabletResponse {} 为空(不变量被破坏)"; + public static final String PIPE_LOG_SUBSCRIPTIONEVENTTABLETRESPONSE_IS_NOT_EMPTY_WHEN_INITIALIZING_88F075C9 = + "初始化时 SubscriptionEventTabletResponse {} 非空(不变量被破坏)"; + public static final String PIPE_LOG_DETECT_LARGE_TABLETS_WITH_BYTE_S_CURRENT_TABLETS_SIZE_BYTE_4D472E38 = + "检测到大 tablets,大小 {} byte(s),当前 tablets 大小 {} byte(s)"; + public static final String PIPE_LOG_SUBSCRIPTIONEVENTBINARYCACHE_ALLOCATEDMEMORYBLOCK_HAS_SHRUNK_08F23ADE = + "SubscriptionEventBinaryCache.allocatedMemoryBlock 已从 {} 缩小到 {}。"; + public static final String PIPE_LOG_SUBSCRIPTIONEVENTBINARYCACHE_ALLOCATEDMEMORYBLOCK_HAS_EXPANDED_52A971D9 = + "SubscriptionEventBinaryCache.allocatedMemoryBlock 已从 {} 扩大到 {}。"; + public static final String PIPE_LOG_SUBSCRIPTIONEVENTBINARYCACHE_RAISED_AN_EXCEPTION_WHILE_SERIALIZING_F3B698CB = + "SubscriptionEventBinaryCache 序列化 CachedSubscriptionPollResponse 时抛出异常:{}"; + public static final String PIPE_LOG_SUBSCRIPTION_SOMETHING_UNEXPECTED_HAPPENED_WHEN_SERIALIZING_5467B7B6 = + "Subscription:序列化 CachedSubscriptionPollResponse 时发生意外情况:{}"; + public static final String PIPE_LOG_HAS_BEEN_ITERATED_TIMES_CURRENT_TSFILEINSERTIONEVENT_0939C298 = + "{} 已被迭代 {} 次,当前 TsFileInsertionEvent {}"; + public static final String PIPE_LOG_SUBSCRIPTIONPIPETABLETEVENTBATCH_ONLY_SUPPORT_CONVERT_PIPEINSERTNODETABLETINSERTIONEVENT_B888B8AA = + "SubscriptionPipeTabletEventBatch {} 仅支持将 PipeInsertNodeTabletInsertionEvent 或 " + + "PipeRawTabletInsertionEvent 转换为 tablet。忽略 {}。"; + public static final String PIPE_LOG_SUBSCRIPTIONPIPETABLETEVENTBATCH_UNEXPECTED_TABLET_INSERTION_8FB1B507 = + "SubscriptionPipeTabletEventBatch:非预期 tablet insertion event {},跳过该事件。"; + public static final String PIPE_LOG_SUBSCRIPTIONPIPETABLETEVENTBATCH_FAILED_TO_INCREASE_THE_595722D8 = + "SubscriptionPipeTabletEventBatch:增加事件 {} 的引用计数失败,跳过该事件。"; + public static final String PIPE_LOG_SUBSCRIPTIONPIPETABLETEVENTBATCH_OVERRIDE_NON_NULL_CURRENTTABLETINSERTIONEVENTSITERATOR_2633B158 = + "SubscriptionPipeTabletEventBatch {} 迭代时覆盖非 null 的 " + + "currentTabletInsertionEventsIterator(不变量被破坏)。"; + public static final String PIPE_LOG_SUBSCRIPTIONPIPETABLETEVENTBATCH_IGNORE_ENRICHEDEVENT_WHEN_E6BAEACE = + "SubscriptionPipeTabletEventBatch {} 迭代时忽略 EnrichedEvent {}(不变量被破坏)。"; + public static final String PIPE_LOG_SUBSCRIPTIONPIPETSFILEEVENTBATCH_IGNORE_TSFILEINSERTIONEVENT_88189024 = + "SubscriptionPipeTsFileEventBatch {} 批处理时忽略 TsFileInsertionEvent {}。"; + public static final String PIPE_LOG_SUBSCRIPTIONPIPEEVENTBATCH_IGNORE_ENRICHEDEVENT_WHEN_BATCHING_E69BE90D = + "SubscriptionPipeEventBatch {} 批处理时忽略 EnrichedEvent {}。"; + public static final String PIPE_LOG_CONSENSUS_PREFETCH_EXECUTOR_IS_SHUTDOWN_SKIP_REGISTERING_83E36171 = + "Consensus prefetch executor 已关闭,跳过注册 {}"; + public static final String PIPE_LOG_CONSENSUS_PREFETCH_SUBTASK_IS_ALREADY_REGISTERED_419FE7AD = + "Consensus prefetch subtask {} 已注册"; + public static final String PIPE_LOG_CONSENSUS_PREFETCH_WORKER_LOOP_EXITS_ABNORMALLY_531EE564 = + "Consensus prefetch worker loop 异常退出"; + public static final String PIPE_LOG_FAILED_TO_CLOSE_SINK_AFTER_FAILED_TO_INITIALIZE_SINK_IGNORE_CF2E3D90 = + "sink 初始化失败后关闭 sink 失败。忽略该异常。"; + public static final String PIPE_LOG_CONSENSUSPREFETCHSUBTASK_UNEXPECTED_ERROR_WHILE_DRIVING_D361F4C2 = + "ConsensusPrefetchSubtask {}:驱动 queue {} 时发生非预期错误"; + public static final String PIPE_LOG_SUBSCRIPTIONSINKSUBTASK_FOR_CONSENSUS_TOPIC_FAILED_UNEXPECTEDLY_FC41B565 = + "consensus topic [{}] 的 SubscriptionSinkSubtask 意外失败,跳过自动重新提交"; + public static final String PIPE_LOG_FAILED_TO_BROADCAST_SUBSCRIPTION_PROGRESS_TO_DATANODE_AT_7024F5B2 = + "向 DataNode {} 广播 subscription progress 失败,地址 {}:{}"; + public static final String PIPE_LOG_FAILED_TO_BROADCAST_SUBSCRIPTION_PROGRESS_FOR_REGION_DE9074BD = + "广播 Region {} 的 subscription progress 失败:{}"; + public static final String PIPE_LOG_RECEIVED_SUBSCRIPTION_PROGRESS_BROADCAST_CONSUMERGROUPID_CDAEF839 = + "收到 subscription progress 广播:consumerGroupId={},topicName={},regionId={},physicalTime={}," + + "localSeq={}"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONCOMMITSTATE_IDEMPOTENT_RE_COMMIT_FOR_30464FC4 = + "ConsensusSubscriptionCommitState:幂等重新提交 ({},{},{})"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONCOMMITSTATE_IDEMPOTENT_DIRECT_COMMIT_B093AC01 = + "ConsensusSubscriptionCommitState:幂等直接提交 ({},{},{})"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONCOMMITMANAGER_RECOVERED_COMMITTEDREGIONPROGRESS_F6B92C6B = + "ConsensusSubscriptionCommitManager:已从 ConfigNode 恢复 committedRegionProgress={}," + + "consumerGroupId={},topicName={},regionId={}"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONCOMMITMANAGER_CANNOT_COMMIT_FOR_UNKNOWN_751BD2A9 = + "ConsensusSubscriptionCommitManager:无法提交未知状态,consumerGroupId={},topicName={},regionId={}," + + "writerId={},writerProgress={}"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONCOMMITMANAGER_CANNOT_DIRECT_COMMIT_D6AD7D96 = + "ConsensusSubscriptionCommitManager:无法直接提交未知状态,consumerGroupId={},topicName={},regionId={}," + + "writerId={},writerProgress={}"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONCOMMITMANAGER_CANNOT_RESET_UNKNOWN_C469052F = + "ConsensusSubscriptionCommitManager:无法重置未知状态,consumerGroupId={},topicName={},regionId={}"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONCOMMITMANAGER_IGNORE_BROADCAST_WITHOUT_211DE477 = + "ConsensusSubscriptionCommitManager:忽略缺少 writer 标识的广播,consumerGroupId={},topicName={}," + + "regionId={},writerId={},writerProgress={}"; + public static final String PIPE_LOG_SKIP_MALFORMED_CONSENSUS_SUBSCRIPTION_PROGRESS_FILE_NAME_BB4D75F0 = + "跳过格式错误的 consensus subscription progress 文件名 {}"; + public static final String PIPE_LOG_FAILED_TO_RECOVER_CONSENSUS_SUBSCRIPTION_PROGRESS_FOR_CONSUMERGROUPID_DF30716B = + "恢复 consensus subscription progress 失败,consumerGroupId={},topicName={}"; + public static final String PIPE_LOG_FAILED_TO_DELETE_CONSENSUS_SUBSCRIPTION_PROGRESS_FILE_51C57096 = + "删除 consensus subscription progress 文件 {} 失败"; + public static final String PIPE_LOG_FAILED_TO_PERSIST_CONSENSUS_SUBSCRIPTION_PROGRESS_FOR_CONSUMERGROUPID_4EA71236 = + "持久化 consensus subscription progress 失败,consumerGroupId={},topicName={},regionId={}"; + public static final String PIPE_LOG_FAILED_TO_REWRITE_CONSENSUS_SUBSCRIPTION_PROGRESS_FOR_CONSUMERGROUPID_8B230D50 = + "重写 consensus subscription progress 失败,consumerGroupId={},topicName={}"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONCOMMITMANAGER_FAILED_TO_QUERY_COMMIT_31E47F21 = + "ConsensusSubscriptionCommitManager:从 ConfigNode 查询提交进度失败,consumerGroupId={}," + + "topicName={},regionId={},状态={}"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONCOMMITMANAGER_FAILED_TO_QUERY_COMMIT_16CFDCD9 = + "ConsensusSubscriptionCommitManager:从 ConfigNode 查询提交进度失败,consumerGroupId={}," + + "topicName={},regionId={},从 0 开始"; + public static final String PIPE_LOG_FAILED_TO_SERIALIZE_COMMITTED_REGION_PROGRESS_0D8D2129 = + "序列化 committed region progress {} 失败"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONCOMMITSTATE_IGNORE_MAPPING_WITHOUT_3E66A74D = + "ConsensusSubscriptionCommitState:忽略缺少 writer 标识的 mapping,writerId={},writerProgress={}"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONCOMMITSTATE_DUPLICATE_OUTSTANDING_MAPPING_B5B34891 = + "ConsensusSubscriptionCommitState:slot={} 存在重复 outstanding mapping,前值={},当前值={}"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONCOMMITSTATE_OUTSTANDING_SIZE_EXCEEDS_1463BF02 = + "ConsensusSubscriptionCommitState:outstanding size({})超过阈值({}),consumers 可能未提交。" + + "committed=({},{}), writerNodeId={}"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONCOMMITSTATE_MISSING_WRITER_IDENTITY_01040357 = + "ConsensusSubscriptionCommitState:commit 缺少 writer 标识,writerId={},writerProgress={}"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONCOMMITSTATE_UNKNOWN_KEY_FOR_COMMIT_5F699CFD = + "ConsensusSubscriptionCommitState:commit 的 key ({},{},{}) 未知"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONCOMMITSTATE_MISSING_WRITER_IDENTITY_BB10A3B1 = + "ConsensusSubscriptionCommitState:direct commit 缺少 writer 标识,writerId={},writerProgress={}"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONCOMMITSTATE_REJECT_DIRECT_COMMIT_WITHOUT_5B975E49 = + "ConsensusSubscriptionCommitState:拒绝 direct commit,({},{},{}) 缺少 outstanding mapping"; + public static final String PIPE_LOG_ISCONSENSUSBASEDTOPIC_CHECK_FOR_TOPIC_MODE_RESULT_19EFA0F9 = + "isConsensusBasedTopic 检查 topic [{}]:模式={},结果={}"; + public static final String PIPE_LOG_SET_IOTCONSENSUS_ONNEWPEERCREATED_CALLBACK_FOR_CONSENSUS_0766CE68 = + "设置 IoTConsensus.onNewPeerCreated 回调,用于 consensus subscription 自动绑定"; + public static final String PIPE_LOG_SET_IOTCONSENSUS_ONPEERREMOVED_CALLBACK_FOR_CONSENSUS_SUBSCRIPTION_21D4D6AC = + "设置 IoTConsensus.onPeerRemoved 回调,用于 consensus subscription 清理"; + public static final String PIPE_LOG_NEW_DATAREGION_CREATED_CHECKING_CONSUMER_GROUP_S_FOR_AUTO_787C16E9 = + "新 DataRegion {} 已创建,正在检查 {} 个 consumer group 以执行自动绑定,currentSearchIndex={}"; + public static final String PIPE_LOG_AUTO_BINDING_CONSENSUS_QUEUE_FOR_TOPIC_IN_GROUP_TO_NEW_REGION_86F21649 = + "为 topic [{}]、group [{}] 自动绑定 consensus queue 到新 Region {}(database={}," + + "tailStartSearchIndex={},hasLocalPersistedState={},committedRegionProgress={}," + + "initialRuntimeVersion={},initialActive={})"; + public static final String PIPE_LOG_DATAREGION_BEING_REMOVED_UNBINDING_ALL_CONSENSUS_SUBSCRIPTION_848A29F0 = + "DataRegion {} 正在被移除,解绑全部 consensus subscription queue"; + public static final String PIPE_LOG_SETTING_UP_CONSENSUS_SUBSCRIPTIONS_FOR_CONSUMER_GROUP_TOPICS_204374A2 = + "正在为 consumer group [{}] 设置 consensus subscription,topics={},consensus group 总数={}"; + public static final String PIPE_LOG_SETTING_UP_CONSENSUS_QUEUE_FOR_TOPIC_ISTABLETOPIC_ORDERMODE_4F1CDC66 = + "正在为 topic [{}] 设置 consensus queue:isTableTopic={},orderMode={},config={}"; + public static final String PIPE_LOG_DISCOVERED_CONSENSUS_GROUP_S_FOR_TOPIC_IN_CONSUMER_GROUP_012EE420 = + "发现 {} 个 consensus group,topic [{}],consumer group [{}]:{}"; + public static final String PIPE_LOG_SKIPPING_REGION_DATABASE_FOR_TABLE_TOPIC_DATABASE_KEY_2DA27A84 = + "跳过 Region {}(database={}),table topic [{}](DATABASE_KEY={})"; + public static final String PIPE_LOG_BINDING_CONSENSUS_PREFETCHING_QUEUE_FOR_TOPIC_IN_CONSUMER_45239EEA = + "将 topic [{}]、consumer group [{}] 的 consensus prefetching queue 绑定到 data region consensus " + + "group [{}](database={},tailStartSearchIndex={},hasLocalPersistedState={}," + + "committedRegionProgress={},initialRuntimeVersion={},initialActive={})"; + public static final String PIPE_LOG_TORE_DOWN_CONSENSUS_SUBSCRIPTION_FOR_TOPIC_IN_CONSUMER_GROUP_80B84227 = + "已拆除 topic [{}]、consumer group [{}] 的 consensus subscription"; + public static final String PIPE_LOG_CHECKING_NEW_SUBSCRIPTIONS_IN_CONSUMER_GROUP_FOR_CONSENSUS_4A56D78A = + "正在检查 consumer group [{}] 中 consensus-based topic 的新 subscription:{}"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONSETUPHANDLER_IGNORE_STALE_RUNTIME_STATE_6C36B250 = + "ConsensusSubscriptionSetupHandler:忽略 Region {} 的过期 runtime state,incomingRuntimeVersion={}," + + "currentRuntimeVersion={},runtimeState={}"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONSETUPHANDLER_APPLYING_RUNTIME_STATE_1FB8937E = + "ConsensusSubscriptionSetupHandler:应用 Region {} 的 runtime state,preferred writer {} -> {}," + + "runtimeVersion {} -> {},runtimeState={}"; + public static final String PIPE_LOG_CONSENSUSSUBSCRIPTIONSETUPHANDLER_REGION_PREFERRED_WRITER_46C1A894 = + "ConsensusSubscriptionSetupHandler:Region {} 的 preferred writer 已变更 {} -> {},runtimeVersion " + + "{} -> {},runtimeState={}(route hint)"; + public static final String PIPE_LOG_FAILED_TO_CHECK_IF_TOPIC_IS_CONSENSUS_BASED_DEFAULTING_TO_ECCE1509 = + "检查 topic [{}] 是否为 consensus-based 失败,默认设为 false"; + public static final String PIPE_LOG_SKIPPING_SETUP_OF_CONSENSUS_BASED_SUBSCRIPTIONS_FOR_CONSUMER_A7B2C812 = + "跳过 consumer group [{}] 的 consensus-based subscription 设置,因为 mode=consensus 仅支持 " + + "data_region_consensus_protocol_class={},但当前配置值为 {}(运行时 consensus 实现:{})"; + public static final String PIPE_LOG_TOPIC_CONFIG_NOT_FOUND_FOR_TOPIC_CANNOT_SET_UP_CONSENSUS_A93339CE = + "未找到 topic [{}] 的配置,无法设置 consensus queue"; + public static final String PIPE_LOG_NO_LOCAL_IOTCONSENSUS_DATA_REGION_FOUND_FOR_TOPIC_IN_CONSUMER_6FD0600E = + "topic [{}] 在 consumer group [{}] 中没有本地 IoTConsensus data region。匹配的 data region 可用后将设置 " + + "consensus subscription。"; + public static final String PIPE_LOG_FAILED_TO_TEAR_DOWN_CONSENSUS_SUBSCRIPTION_FOR_TOPIC_IN_F59E8B7C = + "拆除 topic [{}]、consumer group [{}] 的 consensus subscription 失败"; + public static final String PIPE_LOG_FAILED_TO_AUTO_BIND_TOPIC_IN_GROUP_TO_NEW_REGION_5BFD0E7D = + "将 topic [{}]、group [{}] 自动绑定到新 Region {} 失败"; + public static final String PIPE_LOG_FAILED_TO_UNBIND_CONSENSUS_SUBSCRIPTION_QUEUES_FOR_REMOVED_7086F70A = + "解绑已移除 Region {} 的 consensus subscription queue 失败"; + public static final String PIPE_LOG_FAILED_TO_SET_UP_CONSENSUS_SUBSCRIPTION_FOR_TOPIC_IN_CONSUMER_1A30001B = + "为 topic [{}]、consumer group [{}] 设置 consensus subscription 失败"; + public static final String PIPE_LOG_CONSENSUSLOGTOTABLETCONVERTER_DESERIALIZED_MERGED_INSERTNODE_51FB8295 = + "ConsensusLogToTabletConverter:已反序列化合并的 InsertNode,searchIndex={},type={},deviceId={}," + + "searchNodeCount={}"; + public static final String PIPE_LOG_CONSENSUSLOGTOTABLETCONVERTER_SEARCHINDEX_CONTAINS_NON_INSERTNODE_CFA9FA49 = + "ConsensusLogToTabletConverter:searchIndex={} 包含非 InsertNode PlanNode:{}"; + public static final String PIPE_LOG_CONSENSUSLOGTOTABLETCONVERTER_CONVERTING_INSERTNODE_TYPE_B80428A0 = + "ConsensusLogToTabletConverter:正在转换 InsertNode,type={},deviceId={}"; + public static final String PIPE_LOG_UNSUPPORTED_INSERTNODE_TYPE_FOR_SUBSCRIPTION_E488EF74 = + "不支持用于 subscription 的 InsertNode 类型:{}"; + public static final String PIPE_LOG_CONSENSUSLOGTOTABLETCONVERTER_FAILED_TO_DESERIALIZE_ICONSENSUSREQUEST_EC1F6BAD = + "ConsensusLogToTabletConverter:反序列化 IConsensusRequest 失败(type={}),searchIndex={}:{}"; + public static final String PIPE_LOG_INSERTNODE_TYPE_IS_NULL_SKIPPING_CONVERSION_A2F1ADF7 = + "InsertNode 类型为 null,跳过转换"; + public static final String PIPE_LOG_UNSUPPORTED_DATA_TYPE_C8929F11 = + "不支持的数据类型:{}"; + public static final String PIPE_LOG_UNSUPPORTED_DATA_TYPE_FOR_COPY_8AD25FE7 = + "copy 不支持的数据类型:{}"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_PREFETCHING_QUEUE_IS_EMPTY_FOR_22836B5E = + "ConsensusPrefetchingQueue {}:consumerId={} 的 prefetching queue 为空,pendingEntriesSize={}," + + "nextExpected={},isClosed={},prefetchInitialized={},subtaskScheduled={}"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_POLLING_QUEUE_SIZE_CONSUMERID_FCA0AAD3 = + "ConsensusPrefetchingQueue {}:正在 poll,queue size={},consumerId={}"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_DRAINED_ENTRIES_FROM_PENDINGENTRIES_2D4E0BE7 = + "ConsensusPrefetchingQueue {}:从 pendingEntries drain 出 {} 个条目,first searchIndex={},last " + + "searchIndex={},nextExpected={},prefetchingQueueSize={}"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_TIME_BASED_FLUSH_TABLETS_LINGERED_10A4EBA8 = + "ConsensusPrefetchingQueue {}:基于时间触发 flush,{} 个 tablet 滞留 {}ms(阈值={}ms)"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_GAP_DETECTED_EXPECTED_GOT_FILLING_70DD08B3 = + "ConsensusPrefetchingQueue {}:检测到缺口,期望={},实际={}。从 WAL 填充 {} 个条目。"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_ACCUMULATE_COMPLETE_BATCHSIZE_FA3F3B41 = + "ConsensusPrefetchingQueue {}:累积完成,batchSize={},processed={},skipped={},lingerTablets={}," + + "nextExpected={}"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_SUBSCRIPTION_WAL_READ_ENTRIES_14AA5096 = + "ConsensusPrefetchingQueue {}:subscription WAL 读取 {} 个条目,nextExpectedSearchIndex={}"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_SUBSCRIPTION_WAL_EXHAUSTED_AT_E61AF763 = + "ConsensusPrefetchingQueue {}:subscription WAL 在 {} 耗尽,当前 WAL 为 {}。滚动 WAL 文件以暴露当前文件条目。"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_SKIP_STALE_EVENT_WITH_SEARCHINDEX_07A09B36 = + "ConsensusPrefetchingQueue {}:跳过过期事件,searchIndex 范围 [{}, {}],expectedSeekGeneration={}," + + "currentSeekGeneration={}"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_ENQUEUED_EVENT_WITH_TABLETS_SEARCHINDEX_140FDDCB = + "ConsensusPrefetchingQueue {}:已入队包含 {} 个 tablet 的事件,searchIndex 范围 [{}, {}]," + + "prefetchQueueSize={}"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_REJECT_WITHOUT_WRITER_PROGRESS_D84AA802 = + "ConsensusPrefetchingQueue {}:拒绝缺少 writer progress 的 {},commitContext={}"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_REJECT_FOR_INACTIVE_QUEUE_COMMITCONTEXT_AE6D382C = + "ConsensusPrefetchingQueue {}:因 queue 非活跃而拒绝 {},commitContext={},runtimeVersion={}"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_RECYCLED_TIMED_OUT_EVENT_BACK_5E58639C = + "ConsensusPrefetchingQueue {}:将超时事件 {} 回收到 prefetching queue"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_INJECTED_WATERMARK_WATERMARKTIMESTAMP_BF373164 = + "ConsensusPrefetchingQueue {}:已注入 WATERMARK,watermarkTimestamp={}"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_CREATED_DORMANT_CONSUMERGROUPID_863BC6D6 = + "ConsensusPrefetchingQueue 已创建(dormant):consumerGroupId={},topicName={},orderMode={}," + + "consensusGroupId={},fallbackCommittedRegionProgress={},fallbackTailSearchIndex={}," + + "initialRuntimeVersion={},initialActive={}"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_PREFETCH_INITIALIZED_STARTSEARCHINDEX_69B53EE6 = + "ConsensusPrefetchingQueue {}:prefetch 已初始化,startSearchIndex={},progressSource={}," + + "recoveryWriterCount={}"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_PERIODIC_STATS_LAG_PENDINGDELTA_D75375D0 = + "ConsensusPrefetchingQueue {}:周期统计,lag={},pendingDelta={},walDelta={},pendingTotal={}," + + "walTotal={},pendingQueueSize={},prefetchingQueueSize={},inFlightEventsSize={}," + + "realtimeWriterCount={},walHasNext={},isActive={},subtaskScheduled={}"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_WAITING_MS_FOR_WAL_GAP_TO_BECOME_7D91C6C5 = + "ConsensusPrefetchingQueue {}:等待 {}ms,使 WAL 缺口 [{}, {}) 可见,currentNextExpected={}," + + "currentWalIndex={},seekGeneration={}"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_SEEKTOREGIONPROGRESS_WRITERCOUNT_3134A29B = + "ConsensusPrefetchingQueue {}:seekToRegionProgress writerCount={} -> {},searchIndex={}"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_SEEKAFTERREGIONPROGRESS_WRITERCOUNT_C6B26D20 = + "ConsensusPrefetchingQueue {}:seekAfterRegionProgress writerCount={} -> {},searchIndex={}"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_ABORTED_PENDING_SEEK_DURING_RUNTIME_F9928604 = + "ConsensusPrefetchingQueue {}:运行时停止期间中止待处理 seek({}),恢复 prefetchInitialized {} -> " + + "{},seekGeneration {} -> {}"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_FAILED_TO_SCHEDULE_SEEK_BECAUSE_9E407068 = + "ConsensusPrefetchingQueue {}:调度 seek({}) 失败,原因:{},恢复 prefetchInitialized {} -> {}," + + "seekGeneration {} -> {}"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_SEEK_APPLIED_TO_SEARCHINDEX_WRITERCOUNT_FA2C4327 = + "ConsensusPrefetchingQueue {}:seek({}) 已应用到 searchIndex={},writerCount={},seekGeneration={}"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_FLUSHING_LINGERING_TABLETS_DURING_4C4AF235 = + "ConsensusPrefetchingQueue {}:关闭期间 flush {} 个滞留 tablet"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_ISACTIVE_SET_TO_REGION_EC0AD7BA = + "ConsensusPrefetchingQueue {}:isActive 设置为 {}(region={})"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_RUNTIMEACTIVEWRITERNODEIDS_EFFECTIVEACTIVEWRITERNODEIDS_246519D2 = + "ConsensusPrefetchingQueue {}:runtimeActiveWriterNodeIds={}," + + "effectiveActiveWriterNodeIds={}(region={},orderMode={},preferredWriterNodeId={})"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_PREFERREDWRITERNODEID_SET_TO_EFFECTIVEACTIVEWRITERNODEIDS_B08E8180 = + "ConsensusPrefetchingQueue {}:preferredWriterNodeId 设置为 {}," + + "effectiveActiveWriterNodeIds={}(region={},orderMode={})"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_ORDERMODE_SET_TO_EFFECTIVEACTIVEWRITERNODEIDS_CDD3C86E = + "ConsensusPrefetchingQueue {}:orderMode 设置为 {},effectiveActiveWriterNodeIds={}(region={}," + + "preferredWriterNodeId={},runtimeActiveWriterNodeIds={})"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_APPLIED_RUNTIMEVERSION_36E05B80 = + "ConsensusPrefetchingQueue {}:已应用 runtimeVersion {}"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_APPLIED_RUNTIMESTATE_PREFERREDWRITERNODEID_D845E9D6 = + "ConsensusPrefetchingQueue {}:已应用 runtimeState={},preferredWriterNodeId={}"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_POLL_COMMITTED_EVENT_BROKEN_INVARIANT_E478FA3C = + "ConsensusPrefetchingQueue {} poll 到已提交事件 {}(不变量被破坏),移除该事件"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_POLL_NON_POLLABLE_EVENT_BROKEN_E9551325 = + "ConsensusPrefetchingQueue {} poll 到不可 poll 事件 {}(不变量被破坏),执行 nack"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_INTERRUPTED_WHILE_POLLING_B7CFF5FD = + "ConsensusPrefetchingQueue {} 在 polling 期间被中断"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_ERROR_READING_SUBSCRIPTION_WAL_A3888AC5 = + "ConsensusPrefetchingQueue {}:读取 subscription WAL 出错"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_ERROR_CLOSING_SUBSCRIPTION_WAL_19711C01 = + "ConsensusPrefetchingQueue {}:关闭 subscription WAL iterator 出错"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_COMMIT_CONTEXT_DOES_NOT_EXIST_99B8A8F3 = + "ConsensusPrefetchingQueue {}:ack 的 commit context {} 不存在"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_EVENT_ALREADY_COMMITTED_AC34E829 = + "ConsensusPrefetchingQueue {}:事件 {} 已提交"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_FAILED_TO_ADVANCE_COMMIT_FRONTIER_56E606C0 = + "ConsensusPrefetchingQueue {}:推进 {} 的 commit frontier 失败"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_COMMIT_CONTEXT_DOES_NOT_EXIST_05F6C6E0 = + "ConsensusPrefetchingQueue {}:nack 的 commit context {} 不存在"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_SEEKTOREGIONPROGRESS_NOT_SUPPORTED_85477BAB = + "ConsensusPrefetchingQueue {}:不支持 seekToRegionProgress(没有 WAL 目录)"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_SEEKAFTERREGIONPROGRESS_NOT_SUPPORTED_55F36BE8 = + "ConsensusPrefetchingQueue {}:不支持 seekAfterRegionProgress(没有 WAL 目录)"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_FAILED_TO_READ_WAL_METADATA_FROM_A2ED50D1 = + "ConsensusPrefetchingQueue {}:计算 seekToEnd frontier 时,从 {} 读取 WAL metadata 失败"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_ERROR_DURING_DEREGISTER_34C332E7 = + "ConsensusPrefetchingQueue {}:注销期间出错"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_FAILED_TO_FLUSH_LINGERING_BATCH_F97D8AA7 = + "ConsensusPrefetchingQueue {}:关闭期间 flush 滞留 batch 失败,丢弃该 batch"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_PREFETCH_ROUND_FAILED_TYPE_MESSAGE_63BC909B = + "ConsensusPrefetchingQueue {}:prefetch 轮次失败(type={},message={})"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_POISON_MESSAGE_DETECTED_NACKCOUNT_3A9255FB = + "ConsensusPrefetchingQueue {}:检测到 poison message(nackCount={}),为避免无限重复投递,对事件 {} 强制执行 ack"; + public static final String PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_POISON_MESSAGE_DETECTED_DURING_23159F02 = + "ConsensusPrefetchingQueue {}:recycle 期间检测到 poison message(nackCount={}),对事件 {} 强制执行 ack"; + public static final String PIPE_LOG_PROGRESSWALITERATOR_FAILED_TO_OPEN_NEAR_LIVE_WAL_FILE_RETRYING_5AEB94AC = + "ProgressWALIterator:打开 near-live WAL 文件 {} 失败,不加入黑名单并重试"; + public static final String PIPE_LOG_PROGRESSWALITERATOR_ERROR_READING_WAL_2DB46D41 = + "ProgressWALIterator:读取 WAL 出错"; + public static final String PIPE_LOG_PROGRESSWALITERATOR_FAILED_TO_OPEN_WAL_FILE_SKIPPING_29CA1092 = + "ProgressWALIterator:打开 WAL 文件 {} 失败,跳过该文件"; + public static final String PIPE_LOG_PIPE_TERMINATE_EVENT_COMMITTED_FOR_HISTORICAL_TRANSFER_CREATIONTIME_9B807B28 = + "Pipe {}@{}:历史传输的终止事件已提交。creationTime:{},shouldMark:{}。{}"; + public static final String PIPE_LOG_PIPE_HISTORICAL_SOURCE_HAS_SUPPLIED_ALL_EVENTS_EMITTING_8B58DE19 = + "Pipe {}@{}:历史 source 已提供全部事件,正在发出终止事件。{}"; + public static final String PIPE_LOG_PIPE_REALTIME_SOURCE_ON_DATA_REGION_LISTENTOTSFILE_LISTENTOINSERTNODE_A02E1552 = + "Pipe {}@{} {}:DataRegion {} 上的实时 source(listenToTsFile={},listenToInsertNode={}," + + "registeredSourceCount={},tsFileSourceCount={},insertNodeSourceCount={})。"; + public static final String PIPE_LOG_INTERRUPTED_WHILE_WAITING_FOR_IN_FLIGHT_PUBLISHES_TO_FINISH_C8E3757B = + "关闭 DataRegion {} 上的 assigner 时,等待处理中 publish 完成期间被中断。"; + public static final String PIPE_LOG_SCHEMAREGIONSTATEMACHINE_EXECUTE_READ_PLAN_FRAGMENTINSTANCE_F85A001F = + "SchemaRegionStateMachine[{}]:执行读 plan:FragmentInstance-{}"; + public static final String PIPE_LOG_CURRENT_NODE_NODEID_IS_NO_LONGER_THE_SCHEMA_REGION_LEADER_FD783B3C = + "当前节点 [nodeId:{}] 不再是 schema region leader [regionId:{}],新 leader 为 [nodeId:{}]"; + public static final String PIPE_LOG_CURRENT_NODE_NODEID_IS_NO_LONGER_THE_SCHEMA_REGION_LEADER_12E06F99 = + "当前节点 [nodeId:{}] 不再是 schema region leader [regionId:{}],开始清理相关服务。"; + public static final String PIPE_LOG_CURRENT_NODE_NODEID_IS_NO_LONGER_THE_SCHEMA_REGION_LEADER_3092822E = + "当前节点 [nodeId:{}] 不再是 schema region leader [regionId:{}],旧 leader 上的全部服务当前不可用。"; + public static final String PIPE_LOG_CURRENT_NODE_NODEID_BECOMES_SCHEMA_REGION_LEADER_REGIONID_46C70A32 = + "当前节点 [nodeId:{}] 成为 schema region leader [regionId:{}]"; + public static final String PIPE_LOG_CURRENT_NODE_NODEID_AS_SCHEMA_REGION_LEADER_REGIONID_IS_F00BFAC5 = + "当前节点 [nodeId:{}] 作为 schema region leader [regionId:{}] 已准备好工作"; + public static final String PIPE_LOG_SCHEMA_REGION_LISTENING_QUEUE_LISTEN_TO_SNAPSHOT_FAILED_64845A44 = + "Schema Region Listening Queue 监听 snapshot 失败,历史数据可能无法传输。snapshotPaths:{}"; + public static final String PIPE_LOG_WRITE_OPERATION_FAILED_BECAUSE_RETRYTIME_34EFBE99 = + "写入操作失败,原因:{},重试次数:{}。"; + public static final String PIPE_LOG_EXCEPTION_OCCURS_WHEN_TAKING_SNAPSHOT_FOR_IN_48CBDFCC = + "为 {}-{} 在 {} 中执行 snapshot 时发生异常"; + public static final String PIPE_LOG_MEETS_ERROR_WHEN_GETTING_SNAPSHOT_FILES_FOR_9BFA76B9 = + "获取 {}-{} 的 snapshot 文件时出错"; + public static final String PIPE_LOG_WRITE_OPERATION_STILL_FAILED_AFTER_RETRY_TIMES_BECAUSE_15EEA702 = + "写入操作在重试 {} 次后仍失败,原因:{}。"; + public static final String PIPE_LOG_NOW_TRY_TO_DELETE_DIRECTLY_DATABASEPATH_DELETEPATH_A427CD01 = + "现在尝试直接删除,databasePath:{},deletePath:{}"; + public static final String PIPE_LOG_BATCH_FAILURE_IN_EXECUTING_A_INSERTTABLETNODE_DEVICE_STARTTIME_9A5A70F6 = + "批量执行 InsertTabletNode 失败。device:{},startTime:{},measurements:{},失败状态:{}"; + public static final String PIPE_LOG_INSERT_ROW_FAILED_DEVICE_TIME_MEASUREMENTS_FAILING_STATUS_63054E8B = + "插入行失败。device:{},time:{},measurements:{},失败状态:{}"; + public static final String PIPE_LOG_INSERT_TABLET_FAILED_DEVICE_STARTTIME_MEASUREMENTS_FAILING_B409B2C4 = + "插入 tablet 失败。device:{},startTime:{},measurements:{},失败状态:{}"; + + // --------------------------------------------------------------------------- + // 补充异常消息 + // --------------------------------------------------------------------------- + public static final String PIPE_EXCEPTION_UNSUPPORTED_SUBSCRIPTION_REQUEST_VERSION_D_1E7C211A = + "不支持的 subscription 请求版本 %d"; + public static final String PIPE_EXCEPTION_PAYLOAD_SIZE_S_BYTE_S_WILL_EXCEED_THE_THRESHOLD_S_BYTE_S_6043B3D8 = + "payload 大小 %s byte(s) 将超过阈值 %s byte(s)"; + public static final String PIPE_EXCEPTION_INCONSISTENT_READ_LENGTH_BROKEN_INVARIANT_EXPECTED_S_ACTUAL_9203668A = + "读取长度不一致(不变量被破坏),期望:%s,实际:%s"; + public static final String PIPE_EXCEPTION_TIMEOUTEXCEPTION_WAITED_S_SECONDS_8B31A3A5 = + "TimeoutException:等待 %s 秒"; + public static final String PIPE_EXCEPTION_THE_SUBSCRIPTIONCONNECTORSUBTASKMANAGER_ONLY_SUPPORTS_SUBSCRIPTION_CEFFAAA9 = + "SubscriptionConnectorSubtaskManager 仅支持 subscription-sink。"; + public static final String PIPE_EXCEPTION_FAILED_TO_CONSTRUCT_SUBSCRIPTION_SINK_BECAUSE_OF_S_OR_S_DBA27DC2 = + "构造 subscription sink 失败,原因:pipe connector 参数中不存在 %s 或 %s"; + public static final String PIPE_EXCEPTION_FAILED_TO_GET_PENDINGQUEUE_NO_SUCH_SUBTASK_S_B445404A = + "获取 PendingQueue 失败。不存在该 subtask:%s"; + public static final String PIPE_EXCEPTION_INVALID_BASE64_URL_COMPONENT_LENGTH_F1F1B6BA = + "无效的 base64 URL component 长度"; + public static final String PIPE_EXCEPTION_INVALID_CONSENSUS_SUBSCRIPTION_PROGRESS_REGION_COUNT_S_7CE4FD8E = + "无效的 consensus subscription progress Region 数量 %s"; + public static final String PIPE_EXCEPTION_INVALID_CONSENSUS_SUBSCRIPTION_PROGRESS_PAYLOAD_LENGTH_S_8C145986 = + "无效的 consensus subscription progress payload 长度 %s"; + public static final String PIPE_EXCEPTION_MALFORMED_CONSENSUS_SUBSCRIPTION_PROGRESS_FILE_S_83042847 = + "格式错误的 consensus subscription progress 文件 %s"; + public static final String PIPE_EXCEPTION_ILLEGAL_S_S_72D743AA = + "非法的 %s=%s"; + public static final String PIPE_EXCEPTION_INTERRUPTED_WHILE_WAITING_FOR_SEEK_APPLICATION_7C7ECAF2 = + "等待 seek 应用时被中断"; + public static final String PIPE_EXCEPTION_CONSENSUSPREFETCHINGQUEUE_S_CANNOT_RECOVER_FROM_NON_EMPTY_C1B367EF = + "ConsensusPrefetchingQueue %s:无法在没有 WAL 访问权限的情况下,从非空 Region progress 恢复:%s"; + public static final String PIPE_EXCEPTION_CONSENSUSPREFETCHINGQUEUE_S_CANNOT_INITIALIZE_REPLAY_START_E02DE40E = + "ConsensusPrefetchingQueue %s:无法根据 region progress %s 初始化 replay 起点:%s"; + public static final String PIPE_EXCEPTION_CONSENSUSPREFETCHINGQUEUE_S_CANNOT_SEEKTOREGIONPROGRESS_2746E514 = + "ConsensusPrefetchingQueue %s:无法执行 seekToRegionProgress %s:%s"; + public static final String PIPE_EXCEPTION_CONSENSUSPREFETCHINGQUEUE_S_CANNOT_SEEKAFTERREGIONPROGRESS_48A500C3 = + "ConsensusPrefetchingQueue %s:无法执行 seekAfterRegionProgress %s:%s"; + public static final String PIPE_EXCEPTION_CONSENSUSPREFETCHINGQUEUE_S_IS_CLOSING_WHILE_APPLYING_SEEK_2BB2B431 = + "ConsensusPrefetchingQueue %s 正在应用 seek 时关闭"; + public static final String PIPE_EXCEPTION_CONSENSUSPREFETCHINGQUEUE_S_RUNTIME_STOPPED_BEFORE_SEEK_7BCB4F4B = + "ConsensusPrefetchingQueue %s 运行时在应用 seek(%s) 前已停止"; + public static final String PIPE_EXCEPTION_CONSENSUSPREFETCHINGQUEUE_S_IS_CLOSING_BEFORE_SEEK_APPLIES_F893BB02 = + "ConsensusPrefetchingQueue %s 在 seek 应用前正在关闭"; + public static final String PIPE_EXCEPTION_NO_PRIVILEGE_FOR_SELECT_FOR_USER_S_AT_TABLE_S_S_84B0C299 = + "用户 %s 对表 %s.%s 没有 SELECT 权限"; + public static final String PIPE_EXCEPTION_EXPECTED_BINARY_BYTE_OR_STRING_BUT_WAS_S_7976B10F = + "期望 Binary、byte[] 或 String,实际为 %s。"; + public static final String PIPE_EXCEPTION_TIMEOUTEXCEPTION_WAITED_S_SECONDS_FOR_MEMORY_TO_PARSE_TSFILE_0E4EF8FD = + "TimeoutException:等待 %s 秒以获取解析 TsFile 所需内存"; + public static final String PIPE_EXCEPTION_UNSUPPORTED_DATA_TYPE_S_FOR_COLUMN_S_9F870C01 = + "数据类型 %s 不支持用于列 %s"; + public static final String PIPE_EXCEPTION_COLUMN_S_NOT_FOUND_0FA13581 = + "未找到列 %s"; + public static final String PIPE_EXCEPTION_INSERTNODE_TYPE_S_IS_NOT_SUPPORTED_7DF82B58 = + "不支持 InsertNode 类型 %s。"; + public static final String PIPE_EXCEPTION_DATA_TYPE_S_IS_NOT_SUPPORTED_5D5C02E4 = + "不支持数据类型 %s。"; + public static final String PIPE_EXCEPTION_FORCEALLOCATEFORTABLET_FAILED_TO_ALLOCATE_BECAUSE_THERE_F878474D = + "forceAllocateForTablet:分配失败,原因:tablet 占用内存过多,总内存大小 %d bytes,tablet 已用内存大小 %d bytes,请求内存大小 %d " + + "bytes"; + public static final String PIPE_EXCEPTION_FORCEALLOCATEFORTSFILE_FAILED_TO_ALLOCATE_BECAUSE_THERE_6D614467 = + "forceAllocateForTsFile:分配失败,原因:tsfile 占用内存过多,总内存大小 %d bytes,tsfile 已用内存大小 %d bytes,请求内存大小 %d " + + "bytes"; + public static final String PIPE_EXCEPTION_FORCEALLOCATE_FAILED_TO_ALLOCATE_MEMORY_AFTER_D_RETRIES_44EF7AE7 = + "forceAllocate:重试 %d 次后仍无法分配内存,总内存大小 %d bytes,已用内存大小 %d bytes,请求内存大小 %d bytes"; + public static final String PIPE_EXCEPTION_FORCERESIZE_FAILED_TO_ALLOCATE_MEMORY_AFTER_D_RETRIES_TOTAL_8C6948BC = + "forceResize:重试 %d 次后仍无法分配内存,总内存大小 %d bytes,已用内存大小 %d bytes,请求内存大小 %d bytes"; + public static final String PIPE_EXCEPTION_FAILED_TO_GET_HARDLINK_OR_COPIED_FILE_IN_PIPE_DIR_FOR_FILE_F009D86E = + "获取 pipe 目录中文件 %s 的 hardlink 或复制文件失败;该文件不是 tsfile、mod 文件或 resource 文件"; + public static final String PIPE_EXCEPTION_PIPEPLANTOSTATEMENTVISITOR_DOES_NOT_SUPPORT_VISITING_GENERAL_452AAA60 = + "PipePlanToStatementVisitor 不支持访问通用 plan,PlanNode:%s"; + public static final String PIPE_EXCEPTION_AIRGAP_PAYLOAD_LENGTH_D_EXCEEDS_MAXIMUM_ALLOWED_D_CLOSING_D1712B3D = + "AirGap payload 长度(%d)超过最大允许值(%d)。关闭来自 %s 的连接"; + public static final String PIPE_EXCEPTION_DETECTED_SUSPICIOUS_NESTED_E_LANGUAGE_PREFIX_CLOSING_CONNECTION_69C76172 = + "检测到可疑的嵌套 E-Language 前缀。关闭来自 %s 的连接"; + public static final String PIPE_EXCEPTION_AUTO_CREATE_DATABASE_FAILED_S_STATUS_CODE_S_D8EB60FA = + "自动创建数据库失败:%s,状态码:%s"; + public static final String PIPE_EXCEPTION_IOTCONSENSUSV2_PIPENAME_S_FAILED_TO_CREATE_RECEIVER_FILE_DD67E854 = + "IoTConsensusV2-PipeName-%s:创建 receiver 文件目录 %s 失败。原因:父级系统目录因系统并发退出而被删除。"; + public static final String PIPE_EXCEPTION_IOTCONSENSUSV2_PIPENAME_S_FAILED_TO_CREATE_RECEIVER_FILE_5ADC430A = + "IoTConsensusV2-PipeName-%s:创建 receiver 文件目录 %s 失败。原因可能是权限不足、目录已存在等。"; + public static final String PIPE_EXCEPTION_IOTCONSENSUSV2_PIPENAME_S_FAILED_TO_CREATE_TSFILEWRITER_85EC8DD2 = + "IoTConsensusV2-PipeName-%s:创建 tsFileWriter-%d receiver 文件目录失败"; + public static final String PIPE_EXCEPTION_UNSUPPORTED_IOTCONSENSUSV2_REQUEST_VERSION_D_E1D94606 = + "不支持的 iotConsensusV2 请求版本 %d"; + public static final String PIPE_EXCEPTION_CAN_NOT_EXECUTE_DELETE_STATEMENT_S_3563E8A3 = + "无法执行删除语句:%s"; + public static final String PIPE_EXCEPTION_CAN_NOT_EXECUTE_LOAD_TSFILE_STATEMENT_S_8CC1A096 = + "无法执行加载 TsFile 语句:%s"; + public static final String PIPE_EXCEPTION_FAILED_TO_GET_PIPE_TASK_PROGRESS_INDEX_WITH_PIPE_NAME_S_CFE9DE7C = + "获取 pipe 任务进度索引失败,pipe 名称:%s,共识组 ID:%s。"; + public static final String PIPE_EXCEPTION_EXCEPTION_IN_PIPE_PROCESS_SUBTASK_S_LAST_EVENT_S_ROOT_CAUSE_95B49C24 = + "pipe 处理发生异常,subtask:%s,最后一个 event:%s,根因:%s"; + public static final String PIPE_EXCEPTION_THE_VISIBILITY_OF_THE_PIPE_S_S_IS_NOT_COMPATIBLE_WITH_THE_30B8BF0A = + "pipe(%s,%s)的可见性与 source(%s,%s,%s)、processor(%s,%s,%s)和 connector(%s,%s,%s)的可见性不兼容。"; + public static final String PIPE_EXCEPTION_DATA_TYPE_S_IS_NOT_SUPPORTED_WHEN_CONVERT_DATA_AT_CLIENT_405429CC = + "客户端转换数据时不支持数据类型 %s"; + public static final String PIPE_EXCEPTION_HANDSHAKE_ERROR_WITH_RECEIVER_S_S_CODE_D_MESSAGE_S_4ED82649 = + "receiver %s:%s 握手错误,code:%d,message:%s。"; + public static final String PIPE_EXCEPTION_THE_WEBSOCKET_SERVER_HAS_ALREADY_BEEN_CREATED_WITH_PORT_FFC420AE = + "WebSocket server 已使用端口 %d 创建。请将 cdc.port 选项设置为 %d。"; + public static final String PIPE_EXCEPTION_NETWORK_ERROR_WHEN_TRANSFER_TSFILE_INSERTION_EVENT_S_703A2E9E = + "传输 tsFile insertion event 时发生网络错误:%s。"; + public static final String PIPE_EXCEPTION_CANNOT_SEND_PIPE_DATA_TO_RECEIVER_S_S_BECAUSE_S_25143D54 = + "无法向 receiver %s:%s 发送 pipe data,原因:%s。"; + public static final String PIPE_EXCEPTION_NETWORK_ERROR_WHEN_TRANSFER_EVENT_S_BECAUSE_S_60A63AD7 = + "传输 event %s 时发生网络错误,原因:%s。"; + public static final String PIPE_EXCEPTION_NETWORK_ERROR_WHEN_TRANSFER_TABLET_INSERTION_EVENT_S_BECAUSE_A6F87EF5 = + "传输 tablet insertion event %s 时发生网络错误,原因:%s。"; + public static final String PIPE_EXCEPTION_NETWORK_ERROR_WHEN_TRANSFER_TSFILE_INSERTION_EVENT_S_BECAUSE_BDE61690 = + "传输 tsfile insertion event %s 时发生网络错误,原因:%s。"; + public static final String PIPE_EXCEPTION_NETWORK_ERROR_WHEN_TRANSFER_TSFILE_EVENT_S_BECAUSE_S_F36D2A6B = + "传输 tsfile event %s 时发生网络错误,原因:%s。"; + public static final String PIPE_EXCEPTION_FAILED_TO_TRANSFER_TABLET_INSERTION_EVENT_S_BECAUSE_S_9710318F = + "传输 tablet insertion event %s 失败,原因:%s。"; + public static final String PIPE_EXCEPTION_FAILED_TO_TRANSFER_TSFILE_INSERTION_EVENT_S_BECAUSE_S_21AD3263 = + "传输 tsfile insertion event %s 失败,原因:%s。"; + public static final String PIPE_EXCEPTION_NETWORK_ERROR_WHEN_TRANSFER_FILE_S_BECAUSE_S_3C673B7A = + "传输文件 %s 时发生网络错误,原因:%s。"; + public static final String PIPE_EXCEPTION_PARAMETERS_IN_SET_S_ARE_NOT_ALLOWED_IN_SKIPIF_AAF177AD = + "集合 %s 中的参数不允许出现在 'skipif' 中"; + public static final String PIPE_EXCEPTION_FAILED_TO_CHECK_PASSWORD_FOR_PIPE_S_0B1A5C73 = + "检查 pipe %s 的密码失败。"; + public static final String PIPE_EXCEPTION_NETWORK_ERROR_WHEN_TRANSFER_DELETION_S_BECAUSE_S_3B250B4B = + "传输 deletion %s 时发生网络错误,原因:%s。"; + public static final String PIPE_EXCEPTION_NETWORK_ERROR_WHEN_TRANSFER_TABLET_BATCH_BECAUSE_S_6BEC52E7 = + "传输 tablet batch 时发生网络错误,原因:%s。"; + public static final String PIPE_EXCEPTION_NETWORK_ERROR_WHEN_TRANSFER_INSERT_NODE_TABLET_INSERTION_D993C7AB = + "传输 insert node tablet insertion event 时发生网络错误,原因:%s。"; + public static final String PIPE_EXCEPTION_NETWORK_ERROR_WHEN_TRANSFER_RAW_TABLET_INSERTION_EVENT_BECAUSE_D8ACEC3C = + "传输 raw tablet insertion event 时发生网络错误,原因:%s。"; + public static final String PIPE_EXCEPTION_NETWORK_ERROR_WHEN_SEAL_FILE_S_BECAUSE_S_DC87F263 = + "seal 文件 %s 时发生网络错误,原因:%s。"; + public static final String PIPE_EXCEPTION_NETWORK_ERROR_WHEN_TRANSFER_SCHEMA_REGION_WRITE_PLAN_S_BECAUSE_AEB210C7 = + "传输 schema region write plan %s 时发生网络错误,原因:%s。"; + public static final String PIPE_EXCEPTION_NETWORK_ERROR_WHEN_SEAL_SNAPSHOT_FILE_S_S_AND_S_BECAUSE_5EF373E6 = + "seal snapshot 文件 %s、%s 和 %s 时发生网络错误,原因:%s。"; + public static final String PIPE_EXCEPTION_FAILED_TO_TRANSFER_SLICE_ORIGIN_REQ_S_S_SLICE_INDEX_D_SLICE_44E1CF32 = + "传输 slice 失败。Origin req:%s-%s,slice index:%d,slice count:%d。原因:%s"; + public static final String PIPE_EXCEPTION_THE_EXISTING_SERVER_WITH_TCP_PORT_S_AND_HTTPS_PORT_S_S_S_08C076F7 = + "现有 server 的 tcp port %s 和 https port %s 的 %s %s 与新的 %s %s 冲突,拒绝复用。"; + public static final String PIPE_EXCEPTION_INVALID_KEYSTORE_THE_SERVERPRIVATEKEY_IS_S_F5F3C02F = + "无效的 keyStore,serverPrivateKey 为 %s"; + public static final String PIPE_EXCEPTION_THE_FOLDER_NODE_FOR_S_DOES_NOT_EXIST_CC0776AE = + "路径 %s 的 folder node 不存在。"; + public static final String PIPE_EXCEPTION_THE_NODE_S_DOES_NOT_EXIST_52F98935 = + "Node %s 不存在。"; + public static final String PIPE_EXCEPTION_THE_EXISTING_SERVER_WITH_NODEURL_S_S_S_S_CONFLICTS_TO_THE_1C06A4F6 = + "现有 server 的 nodeUrl %s 的 %s %s 与新的 %s %s 冲突,拒绝复用。"; + public static final String PIPE_EXCEPTION_UNKNOWN_INSERTBASESTATEMENT_S_CONSTRUCTED_FROM_PIPETRANSFERTABLETINSERTNODEREQ_FF5ED1D7 = + "由 PipeTransferTabletInsertNodeReq 构造出的 InsertBaseStatement %s 未知。"; + public static final String PIPE_EXCEPTION_UNKNOWN_INSERTNODE_TYPE_S_WHEN_CONSTRUCTING_STATEMENT_FROM_4A055174 = + "根据 insert node 构造 statement 时遇到未知 InsertNode 类型 %s。"; + public static final String PIPE_EXCEPTION_UNKNOWN_INSERTBASESTATEMENT_S_CONSTRUCTED_FROM_PIPETRANSFERTABLETBINARYREQV2_06D274D2 = + "由 PipeTransferTabletBinaryReqV2 构造出的 InsertBaseStatement %s 未知。"; + public static final String PIPE_EXCEPTION_UNKNOWN_INSERTBASESTATEMENT_S_CONSTRUCTED_FROM_PIPETRANSFERTABLETINSERTNODEREQV2_16F399B6 = + "由 PipeTransferTabletInsertNodeReqV2 构造出的 InsertBaseStatement %s 未知。"; + public static final String PIPE_EXCEPTION_FAILED_TO_CREATE_FILE_DIR_FOR_BATCH_S_8FCD9125 = + "为 batch %s 创建文件目录失败"; + public static final String PIPE_EXCEPTION_FAILED_TO_CREATE_BATCH_FILE_DIR_BATCH_ID_S_EA8BE86C = + "创建 batch 文件目录失败。(Batch id = %s)"; + public static final String PIPE_EXCEPTION_PIPETREESTATEMENTTOPLANVISITOR_DOES_NOT_SUPPORT_VISITING_3A4A6524 = + "PipeTreeStatementToPlanVisitor 不支持访问通用 statement,Statement:%s"; + public static final String PIPE_EXCEPTION_PIPESTATEMENTTOPLANVISITOR_DOES_NOT_SUPPORT_VISITING_GENERAL_590C6BD7 = + "PipeStatementToPlanVisitor 不支持访问通用 statement,Statement:%s"; + public static final String PIPE_EXCEPTION_THE_PATH_PATTERN_S_IS_NOT_VALID_FOR_THE_SOURCE_ONLY_PREFIX_139F93D6 = + "source 的 path pattern %s 无效。只允许 prefix 或 full path。"; + public static final String PIPE_EXCEPTION_S_S_S_SHOULD_BE_LESS_THAN_OR_EQUAL_TO_S_S_S_0B9726E1 = + "%s(%s)[%s] 应小于或等于 %s(%s)[%s]。"; + public static final String PIPE_EXCEPTION_PARAMETERS_IN_SET_S_ARE_NOT_ALLOWED_IN_REALTIME_LOOSE_RANGE_BACD2475 = + "集合 %s 中的参数不允许出现在 'realtime.loose-range' 中"; + public static final String PIPE_EXCEPTION_UNSUPPORTED_EVENT_TYPE_S_FOR_LOG_REALTIME_EXTRACTOR_S_961C5D2D = + "event type %s 不支持用于 log realtime extractor %s"; + public static final String PIPE_EXCEPTION_UNSUPPORTED_EVENT_TYPE_S_FOR_HYBRID_REALTIME_EXTRACTOR_S_9C4F4C82 = + "event type %s 不支持用于 hybrid realtime extractor %s"; + public static final String PIPE_EXCEPTION_UNSUPPORTED_STATE_S_FOR_HYBRID_REALTIME_EXTRACTOR_S_43BD62C2 = + "state %s 不支持用于 hybrid realtime extractor %s"; + public static final String PIPE_EXCEPTION_UNSUPPORTED_EVENT_TYPE_S_FOR_HYBRID_REALTIME_EXTRACTOR_S_474BAAC2 = + "event type %s 不支持由 hybrid realtime extractor %s 提供。"; + public static final String PIPE_EXCEPTION_PARAMETERS_IN_SET_S_ARE_NOT_ALLOWED_IN_HISTORY_LOOSE_RANGE_0F685D5C = + "集合 %s 中的参数不允许出现在 'history.loose-range' 中"; + public static final String PIPE_EXCEPTION_THE_AGGREGATOR_AND_OUTPUT_NAME_S_IS_INVALID_BC22CF92 = + "aggregator 和 output name %s 无效。"; + public static final String PIPE_EXCEPTION_THE_NEEDED_INTERMEDIATE_VALUES_S_ARE_NOT_DEFINED_3FF0C52D = + "所需 intermediate values %s 未定义。"; + public static final String PIPE_EXCEPTION_THE_PROCESSOR_S_IS_NOT_A_WINDOWING_PROCESSOR_EA5B59BA = + "processor %s 不是 windowing processor。"; + public static final String PIPE_EXCEPTION_THE_AGGREGATE_PROCESSOR_DOES_NOT_SUPPORT_PROGRESSINDEXTYPE_35351D27 = + "aggregate processor 不支持 progressIndexType %s"; + public static final String PIPE_EXCEPTION_THE_TYPE_S_IS_NOT_SUPPORTED_E1A6F05D = + "不支持类型 %s"; + public static final String PIPE_EXCEPTION_THE_OUTPUT_TABLET_DOES_NOT_SUPPORT_COLUMN_TYPE_S_62F3845C = + "output tablet 不支持 column type %s"; + public static final String PIPE_EXCEPTION_THE_NEW_DATABASE_NAME_S_IS_INVALID_IT_SHOULD_NOT_CONTAIN_C3AB555E = + "新数据库名 %s 无效:不能包含 '%s',必须匹配 pattern %s,且长度不能超过 %d"; + public static final String PIPE_EXCEPTION_THE_TYPE_S_CANNOT_BE_CASTED_TO_BOOLEAN_F19CCF75 = + "类型 %s 无法转换为 boolean。"; + public static final String PIPE_EXCEPTION_THE_TYPE_S_CANNOT_BE_CASTED_TO_INT_659069CC = + "类型 %s 无法转换为 int。"; + public static final String PIPE_EXCEPTION_THE_TYPE_S_CANNOT_BE_CASTED_TO_LONG_2D206561 = + "类型 %s 无法转换为 long。"; + public static final String PIPE_EXCEPTION_THE_TYPE_S_CANNOT_BE_CASTED_TO_FLOAT_C15A8A95 = + "类型 %s 无法转换为 float。"; + public static final String PIPE_EXCEPTION_THE_TYPE_S_CANNOT_BE_CASTED_TO_DOUBLE_E577C0D7 = + "类型 %s 无法转换为 double。"; + public static final String PIPE_EXCEPTION_THE_TYPE_S_CANNOT_BE_CASTED_TO_STRING_34983FBD = + "类型 %s 无法转换为 string。"; + public static final String PIPE_EXCEPTION_UNABLE_TO_CREATE_IOTCONSENSUSV2_DELETION_DIR_AT_S_800EE360 = + "无法在 %s 创建 iotConsensusV2 deletion dir"; + public static final String PIPE_EXCEPTION_THE_TIMESERIES_S_USED_NEW_TYPE_S_IS_NOT_COMPATIBLE_WITH_455D4D4A = + "timeseries %s 使用的新类型 %s 与现有类型 %s 不兼容。"; + public static final String PIPE_EXCEPTION_THERE_ARE_TWO_TYPES_OF_PLANNODE_IN_ONE_REQUEST_S_AND_S_30FB3EE5 = + "同一请求中存在两种 PlanNode 类型:%s 和 %s"; + public static final String PIPE_EXCEPTION_THERE_ARE_TWO_TYPES_OF_PLANNODE_IN_ONE_REQUEST_S_AND_SEARCHNODE_F8B4D860 = + "同一请求中存在两种 PlanNode 类型:%s 和 SearchNode"; + public static final String COMPLETE_PAGE_BODY_EXPECTED_ACTUAL_FMT = + "page body 不完整。期望:%s。实际:%s"; + public static final String UNCOMPRESS_PAGE_DATA_FAILED_FMT = + "解压失败!解压后大小:%s,压缩后大小:%s,page header:%s%s"; + public static final String FAILED_TO_CLOSE_LISTENING_QUEUE_FOR_SCHEMAREGION_BECAUSE_FMT = + "关闭 SchemaRegion %s 的监听队列失败,原因:%s"; + public static final String PIPE_SINK_HEARTBEAT_OR_TRANSFER_FAILED_FMT = + "PipeConnector:%s(id:%s) heartbeat 失败,或传输 generic event 时遇到错误。失败原因:%s"; + public static final String FAILED_TO_ADD_ITEM_WITH_OPC_ERROR_CODE_FMT = + "添加 item %s 失败,opc 错误码:0x%s"; + public static final String FAILED_TO_WRITE_WITH_VALUE_AND_OPC_ERROR_CODE_FMT = + "写入 %s 失败,值:%s,opc 错误码:0x%s"; + public static final String NO_CERTIFICATE_FOUND = + "未找到证书"; + public static final String CERTIFICATE_MISSING_APPLICATION_URI = + "证书缺少 application URI"; + public static final String NULL_VALUE = + "null"; + public static final String INCREASE_REFERENCE_COUNT_ERROR_HOLDER_FMT = + "增加引用计数出错。Holder Message:%s"; + public static final String DECREASE_REFERENCE_COUNT_ERROR_HOLDER_FMT = + "减少引用计数出错。Holder Message:%s"; + public static final String INCREASE_REFERENCE_COUNT_TSFILE_OR_MODFILE_ERROR_HOLDER_FMT = + "为 TsFile %s 或 modFile %s 增加引用计数出错。Holder Message:%s"; + public static final String DECREASE_REFERENCE_COUNT_TSFILE_ERROR_HOLDER_FMT = + "为 TsFile %s 减少引用计数出错。Holder Message:%s"; + public static final String INCREASE_REFERENCE_COUNT_MTREE_OR_TLOG_ERROR_HOLDER_FMT = + "为 mTree 快照 %s 或 tLog %s 增加引用计数出错。Holder Message:%s"; + public static final String DECREASE_REFERENCE_COUNT_MTREE_OR_TLOG_ERROR_HOLDER_FMT = + "为 mTree 快照 %s 或 tLog %s 减少引用计数出错。Holder Message:%s"; + public static final String CONSENSUS_PREFETCHING_QUEUE_CLOSING_BEFORE_SEEK_SCHEDULED_FMT = + "ConsensusPrefetchingQueue %s 正在关闭,无法调度 seek(%s)"; + public static final String CONSENSUS_PREFETCHING_QUEUE_RUNTIME_UNAVAILABLE_FOR_SEEK_FMT = + "ConsensusPrefetchingQueue %s 无法调度 seek(%s),因为 prefetch runtime 不可用"; + public static final String ERROR_PROGID_INVALID_OR_UNREGISTERED_HRESULT_FMT = + "错误:ProgID 无效或未注册,(HRESULT=0x%s)"; + public static final String ERROR_RUNNING_OPC_CLIENT_FMT = + "运行 opc client 出错:%s:%s"; + public static final String ERROR_GETTING_OPC_CLIENT_FMT = + "获取 opc client 出错:%s:%s"; + } diff --git a/iotdb-core/datanode/src/main/i18n/zh/org/apache/iotdb/db/i18n/DataNodeQueryMessages.java b/iotdb-core/datanode/src/main/i18n/zh/org/apache/iotdb/db/i18n/DataNodeQueryMessages.java index ae020f8c5a31f..5a5c769b7d1f6 100644 --- a/iotdb-core/datanode/src/main/i18n/zh/org/apache/iotdb/db/i18n/DataNodeQueryMessages.java +++ b/iotdb-core/datanode/src/main/i18n/zh/org/apache/iotdb/db/i18n/DataNodeQueryMessages.java @@ -240,7 +240,7 @@ public final class DataNodeQueryMessages { // --- Plan --- public static final String TOPOLOGY_LATEST_VIEW_FROM_CONFIG_NODE = - "[拓扑] 来自 ConfigNode 的最新视图:{}"; + "[拓扑] ConfigNode 返回的本节点({})最新视图:{}"; public static final String EXPIRED_QUERIES_INFO_CLEAR_THREAD_IS_SUCCESSFULLY_STARTED = "过期查询信息清理线程已成功启动。"; public static final String COST_MS = @@ -1204,27 +1204,27 @@ public final class DataNodeQueryMessages { public static final String FAILED_TO_SEND_ACK_DATA_BLOCK_EVENT = "发送数据块确认事件 [{}, {}) 失败,尝试次数:{}"; public static final String SEND_CLOSE_SINK_CHANNEL_EVENT_FAILED = - "[发送关闭SinkChannel事件] 到 [ShuffleSinkHandle: {}, 索引: {}] 失败。"; + "[发送关闭 SinkChannel 事件] 到 [ShuffleSinkHandle: {}, 索引: {}] 失败。"; public static final String LOCAL_SINK_CHANNEL_STATE_IS = "LocalSinkChannel 状态为 ."; public static final String SCH_LISTENER_ON_FINISH = - "[ScH监听器完成]"; + "[ScH 监听器完成]"; public static final String SCH_LISTENER_ALREADY_RELEASED = - "[ScH监听器已释放]"; + "[ScH 监听器已释放]"; public static final String SCH_LISTENER_ON_ABORT = - "[ScH监听器中止]"; + "[ScH 监听器中止]"; public static final String SHUFFLE_SINK_HANDLE_LISTENER_ON_FINISH = - "[ShuffleSinkHandle监听器完成]"; + "[ShuffleSinkHandle 监听器完成]"; public static final String SHUFFLE_SINK_HANDLE_LISTENER_ON_END_OF_TSBLOCKS = - "[ShuffleSinkHandle监听器TsBlock结束]"; + "[ShuffleSinkHandle 监听器 TsBlock 结束]"; public static final String SHUFFLE_SINK_HANDLE_LISTENER_ON_ABORT = - "[ShuffleSinkHandle监听器中止]"; + "[ShuffleSinkHandle 监听器中止]"; public static final String SKH_LISTENER_ON_FINISH = - "[SkH监听器完成]"; + "[SkH 监听器完成]"; public static final String SKH_LISTENER_ON_END_OF_TSBLOCKS = - "[SkH监听器TsBlock结束]"; + "[SkH 监听器 TsBlock 结束]"; public static final String SKH_LISTENER_ON_ABORT = - "[SkH监听器中止]"; + "[SkH 监听器中止]"; public static final String CLOSE_SHUFFLE_SINK_HANDLE = "关闭 ShuffleSinkHandle: {}"; public static final String GET_SHARED_TSBLOCK_QUEUE_FROM_LOCAL_SOURCE_HANDLE = @@ -1238,11 +1238,11 @@ public final class DataNodeQueryMessages { public static final String GET_SHARED_TSBLOCK_QUEUE_FROM_LOCAL_SINK_HANDLE = "从本地 Sink 句柄获取 SharedTsBlockQueue"; public static final String START_FORCE_RELEASE_FI_DATA_EXCHANGE_RESOURCE = - "[开始强制释放FI数据交换资源]"; + "[开始强制释放 FI 数据交换资源]"; public static final String CLOSE_SOURCE_HANDLE = - "[关闭SourceHandle] {}"; + "[关闭 SourceHandle] {}"; public static final String END_FORCE_RELEASE_FI_DATA_EXCHANGE_RESOURCE = - "[结束强制释放FI数据交换资源]"; + "[结束强制释放 FI 数据交换资源]"; public static final String CREATE_LOCAL_SINK_HANDLE_TO_PLAN_NODE = "为计划节点 {} 的 {} 创建本地 Sink 句柄,目标 {}"; public static final String CREATE_SINK_HANDLE_TO_PLAN_NODE = @@ -1250,69 +1250,69 @@ public final class DataNodeQueryMessages { public static final String CREATE_LOCAL_SOURCE_HANDLE_FROM = "从 {} 为计划节点 {} 的 {} 创建本地 Source 句柄"; public static final String GET_SERIALIZED_TSBLOCK = - "[获取序列化TsBlock] TsBlock:{}"; + "[获取序列化 TsBlock] TsBlock:{}"; public static final String START_ABORT_LOCAL_SOURCE_HANDLE = - "[开始中止LocalSourceHandle]"; + "[开始中止 LocalSourceHandle]"; public static final String END_ABORT_LOCAL_SOURCE_HANDLE = - "[结束中止LocalSourceHandle]"; + "[结束中止 LocalSourceHandle]"; public static final String START_CLOSE_LOCAL_SOURCE_HANDLE = - "[开始关闭LocalSourceHandle]"; + "[开始关闭 LocalSourceHandle]"; public static final String END_CLOSE_LOCAL_SOURCE_HANDLE = - "[结束关闭LocalSourceHandle]"; + "[结束关闭 LocalSourceHandle]"; public static final String START_SET_NO_MORE_TSBLOCKS = - "[开始设置无更多TsBlock]"; + "[开始设置无更多 TsBlock]"; public static final String START_ABORT_SINK_CHANNEL = - "[开始中止SinkChannel]"; + "[开始中止 SinkChannel]"; public static final String END_ABORT_SINK_CHANNEL = - "[结束中止SinkChannel]"; + "[结束中止 SinkChannel]"; public static final String START_CLOSE_SINK_CHANNEL = - "[开始关闭SinkChannel]"; + "[开始关闭 SinkChannel]"; public static final String END_CLOSE_SINK_CHANNEL = - "[结束关闭SinkChannel]"; + "[结束关闭 SinkChannel]"; public static final String ACK_TSBLOCK = - "[确认TsBlock] {}."; + "[确认 TsBlock] {}."; public static final String NOTIFY_NO_MORE_TSBLOCK = - "[通知无更多TsBlock]"; + "[通知无更多 TsBlock]"; public static final String START_SEND_TSBLOCK_ON_LOCAL = - "[开始在本地发送TsBlock]"; + "[开始在本地发送 TsBlock]"; public static final String START_SET_NO_MORE_TSBLOCKS_ON_LOCAL = - "[开始在本地设置无更多TsBlock]"; + "[开始在本地设置无更多 TsBlock]"; public static final String END_SET_NO_MORE_TSBLOCKS_ON_LOCAL = - "[结束在本地设置无更多TsBlock]"; + "[结束在本地设置无更多 TsBlock]"; public static final String START_ABORT_LOCAL_SINK_CHANNEL = - "[开始中止LocalSinkChannel]"; + "[开始中止 LocalSinkChannel]"; public static final String END_ABORT_LOCAL_SINK_CHANNEL = - "[结束中止LocalSinkChannel]"; + "[结束中止 LocalSinkChannel]"; public static final String START_CLOSE_LOCAL_SINK_CHANNEL = - "[开始关闭LocalSinkChannel]"; + "[开始关闭 LocalSinkChannel]"; public static final String END_CLOSE_LOCAL_SINK_CHANNEL = - "[结束关闭LocalSinkChannel]"; + "[结束关闭 LocalSinkChannel]"; public static final String GET_TSBLOCK_FROM_BUFFER = - "[从缓冲区获取TsBlock] sequenceId:{}, size:{}"; + "[从缓冲区获取 TsBlock] sequenceId:{}, size:{}"; public static final String WAIT_FOR_MORE_TSBLOCK = - "[等待更多TsBlock]"; + "[等待更多 TsBlock]"; public static final String RECEIVE_NO_MORE_TSBLOCK_EVENT = - "[收到无更多TsBlock事件]"; + "[收到无更多 TsBlock 事件]"; public static final String END_PULL_TSBLOCKS_FROM_REMOTE = - "[结束从远端拉取TsBlock] 数量:{}"; + "[结束从远端拉取 TsBlock] 数量:{}"; public static final String PUT_TSBLOCKS_INTO_BUFFER = - "[将TsBlock放入缓冲区]"; + "[将 TsBlock 放入缓冲区]"; public static final String SEND_ACK_TSBLOCK = - "[发送确认TsBlock] [{}, {})."; + "[发送确认 TsBlock] [{}, {})."; public static final String START_ABORT_SHUFFLE_SINK_HANDLE = - "[开始中止ShuffleSinkHandle]"; + "[开始中止 ShuffleSinkHandle]"; public static final String END_ABORT_SHUFFLE_SINK_HANDLE = - "[结束中止ShuffleSinkHandle]"; + "[结束中止 ShuffleSinkHandle]"; public static final String START_CLOSE_SHUFFLE_SINK_HANDLE = - "[开始关闭ShuffleSinkHandle]"; + "[开始关闭 ShuffleSinkHandle]"; public static final String END_CLOSE_SHUFFLE_SINK_HANDLE = - "[结束关闭ShuffleSinkHandle]"; + "[结束关闭 ShuffleSinkHandle]"; public static final String SIGNAL_NO_MORE_TSBLOCK_ON_QUEUE = - "[队列信号无更多TsBlock]"; + "[队列信号无更多 TsBlock]"; public static final String QUEUE_DESTROYED_WHEN_SET_NO_MORE_TSBLOCKS = "调用 setNoMoreTsBlocks 时队列已被销毁。"; public static final String ADD_TSBLOCK = - "[添加TsBlock] TsBlock:{}"; + "[添加 TsBlock] TsBlock:{}"; // --- Plan (additional debug) --- @@ -1431,5 +1431,2931 @@ public final class DataNodeQueryMessages { public static final String QUERY_EXECUTION_MISSING = "查询执行实体 %s 在拉取元数据期间丢失"; + // --- QueryEngine semantic messages (additional) --- + public static final String PREPARED_STATEMENT_S_DOES_NOT_EXIST = + "预编译语句 '%s' 不存在"; + public static final String CALL_INFERENCE_FUNCTION_SHOULD_NOT_CONTAIN_MORE_THAN_ONE_INPUT_COLUMN_FOUND_D_INPUT = + + "CALL INFERENCE 函数不能包含超过一列输入,实际发现 [%d] 列输入。"; + public static final String DATA_TYPE_OF_TAG_COLUMN = + "数据类型 的 tag 列 "; + public static final String IS_NOT_STRING = + " 为 不 STRING"; + public static final String THE_SOURCE_PATHS_S_OF_VIEW_S_ARE_MULTIPLE = + + + "源路径 [%s] 对应的视图 [%s] 有多个。"; + public static final String ERROR_OCCURRED_DURING_INFERRING_UDF_DATA_TYPE_S = + + "推断 UDF 数据类型时发生错误:%s"; + public static final String ERROR_OCCURRED_DURING_GETTING_UDF_ACCESS_STRATEGY_S = + + "获取 UDF 访问策略时发生错误:%s"; + public static final String UNSUPPORTED_COMPRESSION_S = + + "不支持压缩方式:%s"; + public static final String TIMESERIES_CONDITION_AND_TIME_CONDITION_CANNOT_BE_USED_AT_THE_SAME_TIME = + "TIMESERIES 条件和 TIME 条件不能同时使用。"; + public static final String LATEST_AND_ORDER_BY_TIMESERIES_CANNOT_BE_USED_AT_THE_SAME_TIME = + + + "LATEST 和 ORDER BY TIMESERIES 不能同时使用。"; + public static final String DEVICE_CONDITION_AND_TIME_CONDITION_CANNOT_BE_USED_AT_THE_SAME_TIME = + "DEVICE 条件和 TIME 条件不能同时使用。"; + public static final String TIME_CONDITION_AND_GROUP_BY_LEVEL_CANNOT_BE_USED_AT_THE_SAME_TIME = + + + "TIME 条件和 GROUP BY LEVEL 不能同时使用。"; + public static final String CQ_AT_LEAST_ONE_OF_THE_PARAMETERS_EVERY_INTERVAL_AND_GROUP_BY_INTERVAL_NEEDS_TO_BE = + + "CQ: 参数 `every_interval` 和 `group_by_interval` 至少需要指定一个。"; + public static final String CAN_NOT_USE_CHAR_DOLLAR_OR_INTO_ITEM_IN_ALTER_VIEW_STATEMENT = + + + "不能在 ALTER VIEW 语句中使用字符 '$' 或 INTO 项。"; + public static final String TIME_COLUMN_IS_NO_NEED_TO_APPEAR_IN_SELECT_CLAUSE_EXPLICITLY_IT_WILL_ALWAYS_BE_RETURNED = + + + "时间列无需在 SELECT 子句中显式出现;只要可能,它总会被返回。"; + public static final String THE_SECOND_PARAMETER_TIME_INTERVAL_SHOULD_BE_A_POSITIVE_INTEGER = + + + "第二个参数时间间隔应为正整数。"; + public static final String THE_THIRD_PARAMETER_TIME_SLIDINGSTEP_SHOULD_BE_A_POSITIVE_INTEGER = + + + "第三个参数时间 slidingStep 应为正整数。"; + public static final String CONSTANT_OPERAND_S_IS_NOT_ALLOWED_IN_GROUP_BY_VARIATION_THERE_SHOULD_BE_AN_EXPRESSION = + + "GROUP BY VARIATION 中不允许使用常量操作数 [%s],应使用表达式"; + public static final String CONSTANT_OPERAND_S_IS_NOT_ALLOWED_IN_GROUP_BY_COUNT_THERE_SHOULD_BE_AN_EXPRESSION = + + "GROUP BY COUNT 中不允许使用常量操作数 [%s],应使用表达式"; + public static final String ORDER_BY_SORT_KEY_S_IS_NOT_CONTAINED_IN_S = + + + "ORDER BY:排序键[%s] 不包含在 '%s' 中"; + public static final String ORDER_BY_EXPRESSION_IS_NOT_SUPPORTED_FOR_CURRENT_STATEMENT_SUPPORTED_SORT_KEY = + + + "当前语句不支持 ORDER BY 表达式,支持的排序键:"; + public static final String ONLY_FILL_PREVIOUS_SUPPORT_SPECIFYING_THE_TIME_DURATION_THRESHOLD = + "只有 FILL(PREVIOUS) 支持指定时间持续阈值。"; + public static final String OUT_OF_RANGE_OFFSET_LT_OFFSETVALUE_GT_OFFSETVALUE_SHOULD_BE_INT64 = + + "超出范围。OFFSET :OFFSETValue 应为 Int64。"; + public static final String OUT_OF_RANGE_SOFFSET_LT_SOFFSETVALUE_GT_SOFFSETVALUE_SHOULD_BE_INT32 = + + "超出范围。SOFFSET :SOFFSETValue 应为 Int32。"; + public static final String FAILED_TO_PARSE_THE_TIMESTAMP = + + "解析时间戳失败:"; + public static final String CURRENT_SYSTEM_TIMESTAMP_PRECISION_IS_S = + + + "当前系统时间戳精度为 %s,"; + public static final String PLEASE_CHECK_WHETHER_THE_TIMESTAMP_S_IS_CORRECT = + + "请检查时间戳 %s 是否正确。"; + public static final String LOAD_TSFILE_FORMAT_S_ERROR_PLEASE_INPUT_AUTOREGISTER_SGLEVEL_VERIFY = + + + "加载 TsFile 的格式 %s 错误,请输入 AUTOREGISTER | SGLEVEL | VERIFY。"; + public static final String S_IS_ILLEGAL_UNQUOTED_NODE_NAME_CAN_ONLY_CONSIST_OF_DIGITS_CHARACTERS_AND_UNDERSCORE_OR = + + "%s 非法,未引用的节点名只能由数字、字符和下划线组成,或以通配符开头或结尾"; + public static final String S_IS_ILLEGAL_UNQUOTED_NODE_NAME_IN_SELECT_INTO_CLAUSE_CAN_ONLY_CONSIST_OF_DIGITS = + + + "%s 非法,SELECT INTO 子句中的未引用节点名只能由数字、字符、$、{ 和 } 组成"; + public static final String S_IS_ILLEGAL_IDENTIFIER_NOT_ENCLOSED_WITH_BACKTICKS_CAN_ONLY_CONSIST_OF_DIGITS = + + "%s 非法,未用反引号括起的标识符只能由数字、字符和下划线组成。"; + public static final String INPUT_TIME_FORMAT_S_ERROR = + + "输入时间格式 %s 错误。 "; + public static final String INPUT_LIKE_YYYY_MM_DD_HH_MM_SS_YYYY_MM_DDTHH_MM_SS_OR = + + "请输入类似 yyyy-MM-dd HH:mm:ss、yyyy-MM-ddTHH:mm:ss 或 "; + public static final String REFER_TO_USER_DOCUMENT_FOR_MORE_INFO = + + "更多信息请参阅用户文档。"; + public static final String GRANT_OPTION_IS_DISABLED_PLEASE_CHECK_THE_PARAMETER_ENABLE_GRANT_OPTION = + "Grant Option 已禁用,请检查参数 enable_grant_option。"; + public static final String S_CAN_ONLY_BE_SET_ON_PATH_ROOT_STAR_STAR = + + "[%s] 只能设置在路径 root.** 上"; + public static final String PRIVILEGE_TYPE = + + "权限类型 "; + public static final String IS_DEPRECATED_USE = + + " 已弃用,请使用 "; + public static final String TO_INSTEAD_IT = + + " 替代它"; + public static final String INVALID_FUNCTION_EXPRESSION_ALL_THE_ARGUMENTS_ARE_CONSTANT_OPERANDS = + + "无效的函数表达式,所有参数都是常量操作数:"; + public static final String ERROR_SIZE_OF_INPUT_EXPRESSIONS_EXPRESSION_S_ACTUAL_SIZE_S_EXPECTED_SIZE_S = + + "输入表达式数量错误。表达式:%s,实际数量:%s,期望数量:%s。"; + public static final String CAN_NOT_PARSE_S_TO_LONG_VALUE = + + "无法将 %s 解析为 long 值"; + public static final String THERE_S_DUPLICATE_S_IN_TAG_OR_ATTRIBUTE_CLAUSE = + + "标签或属性子句中存在重复项 [%s]。"; + public static final String NOT_SUPPORT_FOR_THIS_SQL_IN_CREATE_PIPE_PLEASE_ENTER_PIPE_NAME = + + "CREATE PIPE 中不支持该 SQL,请输入 pipe 名称。"; + public static final String NOT_SUPPORT_FOR_THIS_SQL_IN_ALTER_PIPE_PLEASE_ENTER_PIPE_NAME = + + "ALTER PIPE 中不支持该 SQL,请输入 pipe 名称。"; + public static final String NOT_SUPPORT_FOR_THIS_SQL_IN_CREATE_TOPIC_PLEASE_ENTER_TOPICNAME = + + "CREATE TOPIC 中不支持该 SQL,请输入 topicName。"; + public static final String NOT_SUPPORT_FOR_THIS_SQL_IN_DROP_TOPIC_PLEASE_ENTER_TOPICNAME = + + "DROP TOPIC 中不支持该 SQL,请输入 topicName。"; + public static final String NOT_SUPPORT_FOR_THIS_SQL_IN_DROP_SUBSCRIPTION_PLEASE_ENTER_SUBSCRIPTIONID = + + "DROP SUBSCRIPTION 中不支持该 SQL,请输入 subscriptionId。"; + public static final String PLEASE_SET_THE_CORRECT_REQUEST_TYPE = + + "请设置正确的请求类型:"; + public static final String WHEN_SETTING_THE_REQUEST_THE_UNIT_IS_INCORRECT_PLEASE_USE_SEC_MIN_HOUR_DAY_AS_THE_UNIT = + + "设置请求时单位不正确。请使用 'sec'、'min'、'hour'、'day' 作为单位"; + public static final String WHEN_SETTING_THE_SIZE_TIME_THE_UNIT_IS_INCORRECT_PLEASE_USE_B_K_M_G_P_T_AS_THE_UNIT = + + + "设置大小/时间时单位不正确。请使用 'B'、'K'、'M'、'G'、'P'、'T' 作为单位"; + public static final String WHEN_SETTING_THE_DISK_SIZE_THE_UNIT_IS_INCORRECT_PLEASE_USE_M_G_P_T_AS_THE_UNIT = + + "设置磁盘大小时单位不正确。请使用 'M'、'G'、'P'、'T' 作为单位"; + public static final String WINDOW_FUNCTION_E_G_HEAD_TAIL_COUNT_SHOULD_BE_SET_IN_VALUE_WHEN_KEY_IS_WINDOW_IN_CALL = + + + "CALL INFERENCE 中 key 为 'WINDOW' 时,应在值中设置窗口函数(例如 HEAD、TAIL、COUNT)"; + public static final String THE_OUTPUT_TYPE_OF_THE_EXPRESSION_IN_HAVING_CLAUSE_SHOULD_BE_BOOLEAN_ACTUAL_DATA_TYPE_S = + + "HAVING 子句中表达式的输出类型应为 BOOLEAN,实际数据类型:%s。"; + public static final String IN = + " 在 "; + public static final String START_TIME_D_IS_GREATER_THAN_END_TIME_D = + + "开始时间 %d 大于结束时间 %d"; + public static final String THE_COLUMN = + "列 '"; + public static final String DOES_NOT_EXIST_OR_IS_NOT_A_TAG_COLUMN = + + "' 不存在或不是标签列"; + public static final String THE_RIGHT_HAND_VALUE_OF_TIME_PREDICATE_MUST_BE_A_LONG = + + "时间谓词的右值必须为 long:"; + public static final String THE_OPERATOR_OF_TIME_PREDICATE_MUST_BE_LT_LT_EQ_GT_OR_GT_EQ = + + "时间谓词的操作符必须为 <、<=、> 或 >=:"; + public static final String THE_RIGHT_HAND_VALUE_OF_TAG_PREDICATE_CANNOT_BE_NULL_WITH_EQ_OPERATOR_PLEASE_USE_IS_NULL = + + + "使用 '=' 操作符时,标签谓词的右值不能为 null,请改用 'IS NULL'"; + public static final String THE_RIGHT_HAND_VALUE_OF_TAG_PREDICATE_MUST_BE_A_STRING = + + "标签谓词的右值必须为字符串:"; + public static final String SELECT_INTO_PLACEHOLDER_CAN_ONLY_BE_USED_AT_THE_END_OF_THE_PATH = + + + "SELECT INTO:占位符 `::` 只能用于路径末尾。"; + public static final String SELECT_INTO_THE_I_OF_DOLLAR_I_SHOULD_BE_GREATER_THAN_0_AND_EQUAL_TO_OR_LESS_THAN_THE = + + + "SELECT INTO:${i} 中的 i 必须大于 0,且不超过查询路径前缀长度。"; + public static final String ALIAS_S_CAN_ONLY_BE_MATCHED_WITH_ONE_RESULT_COLUMN = + + "别名 '%s' 只能匹配一个结果列"; + public static final String RESULT_COLUMN_S_WITH_MORE_THAN_ONE_ALIAS_S_S = + + "结果列 %s 有多个别名[%s, %s]"; + public static final String THERE_ARE_TOO_MANY_CONJUNCTS_MORE_THAN_1000_IN_PREDICATE_AFTER_REWRITING_THIS_MAY_BE = + + + "谓词重写后的合取项过多(超过 1000 个),可能是查询中的设备过多导致,请尝试使用 ALIGN BY DEVICE"; + public static final String CASE_EXPRESSION_TEXT_AND_OTHER_TYPES_CANNOT_EXIST_AT_THE_SAME_TIME = + + "CASE 表达式:TEXT 不能与其他类型同时存在。"; + public static final String CASE_EXPRESSION_BOOLEAN_AND_OTHER_TYPES_CANNOT_EXIST_AT_THE_SAME_TIME = + + "CASE 表达式:BOOLEAN 不能与其他类型同时存在。"; + public static final String THE_EXPRESSION_IN_THE_WHEN_CLAUSE_MUST_RETURN_BOOLEAN_EXPRESSION_S_ACTUAL_DATA_TYPE_S = + + "WHEN子句中的表达式必须返回 BOOLEAN。表达式:%s,实际数据类型:%s。"; + public static final String INVALID_INPUT_EXPRESSION_DATA_TYPE_EXPRESSION_S_ACTUAL_DATA_TYPE_S_EXPECTED_DATA_TYPE_S = + + "无效的输入表达式数据类型。表达式:%s,实际数据类型:%s,期望数据类型:%s。"; + public static final String S_IN_ORDER_BY_CLAUSE_DOESN_T_EXIST = + + "%s 在 ORDER BY 子句中不存在。"; + public static final String S_IN_ORDER_BY_CLAUSE_SHOULDN_T_REFER_TO_MORE_THAN_ONE_TIMESERIES = + + "%s 在 ORDER BY 子句中不应引用多个时间序列。"; + public static final String THE_DATA_TYPE_OF_S_IS_NOT_COMPARABLE = + + "%s 的数据类型不可比较"; + public static final String GROUP_BY_LEVEL_THE_DATA_TYPES_OF_THE_SAME_OUTPUT_COLUMN_S_SHOULD_BE_THE_SAME = + + "GROUP_BY_LEVEL: 同一输出列[%s]的数据类型必须一致。"; + public static final String CROSS_DEVICE_QUERIES_ARE_NOT_SUPPORTED_IN_ALIGN_BY_DEVICE_QUERIES = + + "ALIGN_BY_DEVICE 查询不支持跨设备查询。"; + public static final String VIEWS_OR_MEASUREMENT_ALIASES_REPRESENTING_THE_SAME_DATA_SOURCE = + + "表示同一数据源的视图或测点别名 "; + public static final String CANNOT_BE_QUERIED_CONCURRENTLY_IN_ALIGN_BY_DEVICE_QUERIES = + + + "不能在 ALIGN BY DEVICE 查询中同时查询。"; + public static final String THE_TYPE_OF_SQL_RESULT_COLUMN_S_IN_D_SHOULD_BE_NUMERIC_WHEN_INFERENCE = + + "SQL 结果列 [%s 位于 %d] 的类型在 inference 时必须为数值类型。"; + public static final String S_IN_ORDER_BY_CLAUSE_DOESN_T_EXIST_IN_THE_RESULT_OF_LAST_QUERY = + + "%s 在 LAST 查询结果的 ORDER BY 子句中不存在。"; + public static final String S_IN_GROUP_BY_CLAUSE_DOESN_T_EXIST = + + "%s 在 GROUP BY 子句中不存在。"; + public static final String S_IN_GROUP_BY_CLAUSE_SHOULDN_T_REFER_TO_MORE_THAN_ONE_TIMESERIES = + + "%s 在 GROUP BY 子句中不应引用多个时间序列。"; + public static final String PLEASE_CHECK_THE_KEEP_CONDITION_S = + + "请检查 keep 条件([%s]),"; + public static final String IT_NEED_TO_BE_A_CONSTANT_OR_A_COMPARE_EXPRESSION_CONSTRUCTED_BY_KEEP_AND_A_LONG_NUMBER = + + "它必须是常量,或由 'keep' 和 long 数字构造的比较表达式。"; + public static final String THE_QUERY_TIME_RANGE_SHOULD_BE_SPECIFIED_IN_THE_GROUP_BY_TIME_CLAUSE = + + "查询时间范围必须在 GROUP_BY_TIME 子句中指定。"; + public static final String VIEW_PATH_S_OF_SOURCE_COLUMN_S_IS_ILLEGAL_PATH = + + "源列 %s 的视图路径 %s 是非法路径"; + public static final String ALIGN_BY_DEVICE_THE_DATA_TYPES_OF_THE_SAME_MEASUREMENT_COLUMN_SHOULD_BE_THE_SAME_ACROSS = + + + "ALIGN BY DEVICE:不同设备中同名测点列的数据类型必须一致。"; + public static final String ALIAS_S_CAN_ONLY_BE_MATCHED_WITH_ONE_TIME_SERIES = + + "别名 '%s' 只能匹配一个时间序列"; + public static final String TAG_AND_ATTRIBUTE_SHOULDN_T_HAVE_THE_SAME_PROPERTY_KEY_S = + + "标签和属性不应拥有相同的属性键 [%s]"; + public static final String S_IS_NOT_A_LEGAL_PROP = + + "%s 不是合法属性。"; + public static final String MEASUREMENT_UNDER_AN_ALIGNED_DEVICE_IS_NOT_ALLOWED_TO_HAVE_THE_SAME_MEASUREMENT_NAME = + + "对齐设备下的测点不允许使用相同的测点名称"; + public static final String VALUE_FILTER_CAN_T_EXIST_IN_THE_CONDITION_OF_SHOW_COUNT_CLAUSE_ONLY_TIME_CONDITION = + + "SHOW/COUNT 子句条件中不能存在值过滤器,仅支持时间条件。"; + public static final String TIME_CONDITION_CAN_T_BE_EMPTY_IN_THE_CONDITION_OF_SHOW_COUNT_CLAUSE = + + "SHOW/COUNT 子句条件中的时间条件不能为空。"; + public static final String MEASUREMENT_UNDER_TEMPLATE_IS_NOT_ALLOWED_TO_HAVE_THE_SAME_MEASUREMENT_NAME = + + "模板下的测点不允许使用相同的测点名称"; + public static final String THE_SUFFIX_PATHS_CAN_ONLY_BE_MEASUREMENT_OR_ONE_LEVEL_WILDCARD = + + + "后缀路径只能是测点或一级通配符。"; + public static final String AGGREGATION_RESULTS_CANNOT_BE_AS_INPUT_OF_THE_AGGREGATION_FUNCTION = + + "聚合结果不能作为聚合函数的输入。"; + public static final String INPUT_OF_S_IS_ILLEGAL = + + "'%s' 的输入非法。"; + public static final String RAW_DATA_AND_AGGREGATION_RESULT_HYBRID_INPUT_OF_S_IS_NOT_SUPPORTED = + + "不支持 '%s' 的原始数据和聚合结果混合输入。"; + public static final String ONLY_WRITABLE_VIEW_TIMESERIES_ARE_SUPPORTED_IN_ALIGN_BY_DEVICE_QUERIES = + + "ALIGN_BY_DEVICE 查询仅支持可写视图时间序列。"; + public static final String INPUT_SERIES_OF_SCALAR_FUNCTION_DIFF_ONLY_SUPPORTS_NUMERIC_DATA_TYPES_INT32_INT64_FLOAT = + + "标量函数 [DIFF] 的输入序列仅支持数值数据类型 [INT32, INT64, FLOAT, DOUBLE]"; + public static final String ARGUMENT_EXCEPTION_THE_SCALAR_FUNCTION_SUBSTRING_NEEDS_AT_LEAST_ONE_ARGUMENT_IT_MUST_BE = + + "参数异常,标量函数 [SUBSTRING] 至少需要一个参数,且必须为有符号整数。"; + public static final String SYNTAX_ERROR_PLEASE_CHECK_THAT_THE_PARAMETERS_OF_THE_FUNCTION_ARE_CORRECT = + + "语法错误,请检查函数参数是否正确。"; + public static final String UNSUPPORTED_DATA_TYPE_S_FOR_FUNCTION_SUBSTRING = + + "函数 SUBSTRING 不支持数据类型 %s。"; + public static final String ARGUMENT_EXCEPTION_THE_SCALAR_FUNCTION_SUBSTRING_BEGINPOSITION_AND_LENGTH_MUST_BE = + + "参数异常,标量函数 [SUBSTRING] 的 beginPosition 和长度必须大于 0。"; + public static final String INPUT_SERIES_OF_SCALAR_FUNCTION_ROUND_ONLY_SUPPORTS_NUMERIC_DATA_TYPES_INT32_INT64_FLOAT = + + "标量函数 [ROUND] 的输入序列仅支持数值数据类型 [INT32, INT64, FLOAT, DOUBLE]"; + public static final String UNSUPPORTED_DATA_TYPE_S_FOR_FUNCTION_REPLACE = + + "函数 REPLACE 不支持数据类型 %s。"; + public static final String TIMESERIES_UNDER_THIS_DEVICE_ISS_ALIGNED_PLEASE_USE_CREATESTIMESERIES_OR_CHANGE_DEVICE = + + "该设备下的时间序列%s对齐,请使用 create%sTimeSeries 或更改设备。(路径:%s)"; + public static final String NOT = + + "未"; + public static final String ALIGNED = + "Aligned"; + public static final String AUTO_CREATE_OR_VERIFY_SCHEMA_ERROR_DETAIL_S = + + "自动创建或校验 schema 失败。详情:%s。"; + public static final String THE_FILE_S_IS_NOT_A_VALID_TSFILE_PLEASE_CHECK_THE_INPUT_FILE = + + "文件 %s 不是有效的 TsFile。请检查输入文件。"; + public static final String AUTO_CREATE_OR_VERIFY_SCHEMA_ERROR_WHEN_EXECUTING_STATEMENT_S_DETAIL_S = + + "执行语句 %s 时自动创建或校验 schema 失败。详情:%s。"; + public static final String TTL_VALUE_MUST_BE_INF_OR_A_LONG_LITERAL_BUT_NOW_IS = + + "ttl 值必须为 'INF' 或 long 字面量,当前为:"; + public static final String COLUMNS_IN_TABLE_SHALL_NOT_SHARE_THE_SAME_NAME_S = + + "表中的列不应重名:'%s'。"; + public static final String THE_DUPLICATED_SOURCE_MEASUREMENT_S_IS_UNSUPPORTED_YET = + + "暂不支持重复的源测点 %s。"; + public static final String THE_LENGTH_OF_DATABASE_NAME_SHALL_NOT_EXCEED = + + "数据库名称长度不得超过 "; + public static final String THE_DATABASE_NAME_CAN_ONLY_CONTAIN_ENGLISH_OR_CHINESE_CHARACTERS_NUMBERS_BACKTICKS_AND = + + "数据库名称只能包含英文或中文字符、数字、反引号和下划线。"; + public static final String IS_CURRENTLY_NOT_ALLOWED = + + "' 当前不允许。"; + public static final String VALUE_MUST_BE_A_LONGLITERAL_BUT_NOW_IS = + + " 值必须为 LongLiteral,当前为 "; + public static final String VALUE = + + ",值:"; + public static final String VALUE_MUST_BE_EQUAL_TO_OR_GREATER_THAN_0_BUT_NOW_IS = + + " 值必须大于等于 0,当前为:"; + public static final String VALUE_MUST_BE_LOWER_THAN = + + " 值必须小于 "; + public static final String BUT_NOW_IS = + + ",当前为:"; + public static final String FAILED_TO_CREATE_PIPE_S_SETTING_S_IS_NOT_ALLOWED = + + "创建 pipe %s 失败:不允许设置 %s。"; + public static final String FAILED_TO_S_PIPE_S_IN_IOTDB_SOURCE_PASSWORD_MUST_BE_SET_WHEN_THE_USERNAME_IS_SPECIFIED = + + "执行 %s pipe %s 失败:iotdb-source 中指定 username 时必须设置 password。"; + public static final String ALTER = + "修改"; + public static final String CREATE = + "创建"; + public static final String FAILED_TO_S_PIPE_S_IN_WRITE_BACK_SINK_PASSWORD_MUST_BE_SET_WHEN_THE_USERNAME_IS = + + "执行 %s pipe %s 失败:write-back-sink 中指定 username 时必须设置 password。"; + public static final String FAILED_TO_ALTER_PIPE_S_MODIFYING_S_IS_NOT_ALLOWED = + + "修改 pipe %s 失败:不允许修改 %s。"; + public static final String FAILED_TO_ALTER_PIPE_THE_SOURCE_PLUGIN_OF_THE_PIPE_CANNOT_BE_CHANGED_FROM_S_TO_S = + + + "修改 pipe 失败,pipe 的源插件不能从 %s 改为 %s"; + public static final String FAILED_TO_ALTER_PIPE_S_IN_IOTDB_SOURCE_PASSWORD_MUST_BE_SET_WHEN_THE_USERNAME_IS = + + "alter pipe %s 失败:iotdb-source 中指定 username 时必须设置 password。"; + public static final String FAILED_TO_ALTER_PIPE_S_IN_WRITE_BACK_SINK_PASSWORD_MUST_BE_SET_WHEN_THE_USERNAME_IS = + + "alter pipe %s 失败:write-back-sink 中指定 username 时必须设置 password。"; + public static final String PREPARED_STATEMENT_S_ALREADY_EXISTS = + + "预编译语句 '%s' 已存在。"; + public static final String INSUFFICIENT_MEMORY_FOR_PREPAREDSTATEMENT_S = + "PreparedStatement '%s' 内存不足。"; + public static final String PLEASE_DEALLOCATE_SOME_PREPAREDSTATEMENTS_AND_TRY_AGAIN = + "请释放部分 PreparedStatement 后重试。"; + public static final String THE_TABLE = + "表 "; + public static final String IS_A_BASE_TABLE_DOES_NOT_SUPPORT_SHOW_CREATE_VIEW = + + " 是基础表,不支持 SHOW CREATE VIEW。"; + public static final String THE_PARAMETERS = + "参数 '"; + public static final String MUST_BE_CONSISTENT_ACROSS_THE_ENTIRE_CLUSTER_AND_ONLY_ONE_CAN_BE_SET_AT_A_TIME = + + "' 必须在整个集群中保持一致,且同一时间只能设置一个。"; + public static final String CANNOT_INSERT_INTO_MULTIPLE_DATABASES_WITHIN_ONE_STATEMENT_PLEASE_SPLIT_THEM_MANUALLY = + "不能在一条语句中写入多个数据库,请手动拆分。"; + public static final String THE_MEASUREMENTLIST_S_SIZE_D_IS_NOT_CONSISTENT_WITH_THE_VALUELIST_S_SIZE_D = + "measurementList 的大小 %d 与 valueList 的大小 %d 不一致"; + public static final String THE_MEASUREMENTLIST_S_SIZE_D_IS_NOT_CONSISTENT_WITH_THE_COLUMNLIST_S_SIZE_D = + "measurementList 的大小 %d 与 columnList 的大小 %d 不一致"; + public static final String MEASUREMENT_CONTAINS_NULL_OR_EMPTY_STRING = + + "测点包含 null 或空字符串:"; + public static final String CAN_T_BE_USED_IN_GROUP_BY_TAG_IT_WILL_BE_SUPPORTED_IN_THE_FUTURE = + + " 不能用于按 tag 分组,未来版本将支持。"; + public static final String COMMON_QUERIES_AND_AGGREGATED_QUERIES_ARE_NOT_ALLOWED_TO_APPEAR_AT_THE_SAME_TIME = + + "普通查询和聚合查询不允许同时出现"; + public static final String EXPRESSION_OF_HAVING_CLAUSE_CAN_NOT_BE_USED_IN_NONAGGREGATIONQUERY = + "HAVING 子句中的表达式不能用于 NonAggregationQuery"; + public static final String SORTING_BY_DEVICE_IS_ONLY_SUPPORTED_IN_ALIGN_BY_DEVICE_QUERIES = + + "仅 ALIGN_BY_DEVICE 查询支持按设备排序。"; + public static final String CQ_EVERY_INTERVAL_D_SHOULD_NOT_BE_LOWER_THAN_THE_CONTINUOUS_QUERY_MINIMUM_EVERY_INTERVAL = + + "CQ:every interval [%d] 不应小于配置项 `continuous_query_minimum_every_interval` [%d]。"; + public static final String CQ_THE_START_TIME_OFFSET_SHOULD_BE_GREATER_THAN_END_TIME_OFFSET = + + "CQ:开始时间偏移量应大于结束时间偏移量。"; + public static final String CQ_THE_START_TIME_OFFSET_SHOULD_BE_GREATER_THAN_OR_EQUAL_TO_EVERY_INTERVAL = + + "CQ:开始时间偏移量应大于或等于 every interval。"; + public static final String CQ_SPECIFYING_TIME_RANGE_IN_GROUP_BY_TIME_CLAUSE_IS_PROHIBITED = + + "CQ: 禁止在 GROUP_BY_TIME 子句中指定时间范围。"; + public static final String CANNOT_CREATE_VIEWS_USING_DATA_SOURCES_WITH_CALCULATED_EXPRESSIONS_WHILE_USING_INTO_ITEM = + + + "使用 INTO 项时,不能通过带计算表达式的数据源创建视图。"; + public static final String TREE_DEVICE_VIEW_WITH_MULTIPLE_DATABASES = + + "包含多个数据库的树设备视图("; + public static final String IS_UNSUPPORTED_YET = + + ")暂不支持。"; + public static final String COMPLEX_ASOF_MAIN_JOIN_EXPRESSION_S_IS_NOT_SUPPORTED = + + "不支持复杂的 ASOF 主 JOIN 表达式 [%s]"; + public static final String UNEXPECTED_DESCRIPTOR_TYPE = + + "意外的描述符类型:"; + public static final String WHEN_CLAUSE_OPERAND_TYPE_MUST_MATCH_CASE_OPERAND_TYPE_S_VS_S = + + "WHEN子句操作数类型必须匹配 CASE 操作数类型:%s vs %s"; + public static final String ALL_RESULT_TYPES_MUST_BE_THE_SAME_S = + + "所有结果类型必须一致:%s"; + public static final String DEFAULT_RESULT_TYPE_MUST_BE_THE_SAME_AS_WHEN_RESULT_TYPES_S_VS_S = + + "默认结果类型必须与 WHEN结果类型一致:%s vs %s"; + public static final String ALL_OPERANDS_MUST_HAVE_THE_SAME_TYPE_S = + + "所有操作数必须具有相同类型:%s"; + public static final String TO = + + " 到 "; + public static final String SCALAR_FUNCTION = + "标量函数 "; + public static final String ONLY_SUPPORTS_ONE_NUMERIC_DATA_TYPES_INT32_INT64_FLOAT_DOUBLE_AND_ONE_BOOLEAN = + + " 仅支持一个数值数据类型 [INT32, INT64, FLOAT, DOUBLE] 和一个 boolean"; + public static final String ONLY_SUPPORTS_TWO_NUMERIC_DATA_TYPES_INT32_INT64_FLOAT_DOUBLE = + + " 仅支持两个数值数据类型 [INT32, INT64, FLOAT, DOUBLE]"; + public static final String ONLY_ACCEPTS_TWO_OR_THREE_ARGUMENTS_AND_THEY_MUST_BE_TEXT_OR_STRING_DATA_TYPE = + + " 仅接受两个或三个参数,且参数必须为 TEXT 或 STRING 数据类型。"; + public static final String ONLY_ACCEPTS_TWO_OR_THREE_ARGUMENTS_AND_FIRST_MUST_BE_TEXT_OR_STRING_DATA_TYPE_SECOND = + + " 仅接受两个或三个参数,第一个参数必须为 TEXT 或 STRING 数据类型,第二和第三个参数必须为数值数据类型 [INT32, INT64]"; + public static final String ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_TEXT_OR_STRING_OR_BLOB_OR_OBJECT_DATA_TYPE = + + " 仅接受一个参数,且参数必须为 TEXT、STRING、BLOB 或 OBJECT 数据类型。"; + public static final String ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_TEXT_OR_STRING_DATA_TYPE = + " 仅接受一个参数,且参数必须为 text 或 string 数据类型。"; + public static final String ONLY_ACCEPTS_ONE_OR_TWO_ARGUMENTS_AND_THEY_MUST_BE_TEXT_OR_STRING_DATA_TYPE = + " 仅接受一个或两个参数,且参数必须为 text 或 string 数据类型。"; + public static final String ONLY_ACCEPTS_TWO_ARGUMENTS_AND_THEY_MUST_BE_TEXT_OR_STRING_DATA_TYPE = + " 仅接受两个参数,且参数必须为 text 或 string 数据类型。"; + public static final String ONLY_ACCEPTS_TWO_OR_MORE_ARGUMENTS_AND_THEY_MUST_BE_TEXT_OR_STRING_DATA_TYPE = + + " 仅接受两个或更多参数,且参数必须为 TEXT 或 STRING 数据类型。"; + public static final String ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_DOUBLE_FLOAT_INT32_OR_INT64_DATA_TYPE = + " 仅接受一个参数,且参数必须为 Double、Float、Int32 或 Int64 数据类型。"; + public static final String ACCEPTS_NO_ARGUMENT = + " 不接受参数。"; + public static final String ONLY_ACCEPTS_TWO_OR_THREE_ARGUMENTS_AND_THE_SECOND_AND_THIRD_MUST_BE_TIMESTAMP_DATA_TYPE = + " 仅接受两个或三个参数,且第二、第三个参数必须为 TIMESTAMP 数据类型。"; + public static final String MUST_HAVE_AT_LEAST_TWO_ARGUMENTS_AND_FIRST_ARGUMENT_PATTERN_MUST_BE_TEXT_OR_STRING_TYPE = + + + " 必须至少有两个参数,且第一个模式参数必须为 TEXT 或 STRING 类型。"; + public static final String MUST_HAVE_AT_LEAST_TWO_ARGUMENTS_AND_ALL_TYPE_MUST_BE_THE_SAME = + + " 必须至少有两个参数,且所有类型必须一致。"; + public static final String SCALAR_FUNCTION_S_ONLY_ACCEPTS_TWO_ARGUMENTS_AND_THEY_MUST_BE_INT32_OR_INT64_DATA_TYPE = + + "标量函数 %s 仅接受两个参数,且参数必须为 Int32 或 Int64 数据类型。"; + public static final String SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_INT32_OR_INT64_DATA_TYPE = + + "标量函数 %s 仅接受一个参数,且参数必须为 Int32 或 Int64 数据类型。"; + public static final String SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_TEXT_STRING_OR_BLOB_DATA_TYPE = + + "标量函数 %s 仅接受一个参数,且参数必须为 TEXT、STRING 或 BLOB 数据类型。"; + public static final String SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_TEXT_OR_STRING_DATA_TYPE = + + "标量函数 %s 仅接受一个参数,且参数必须为 TEXT 或 STRING 数据类型。"; + public static final String SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_TEXT_STRING_OR_BLOB_DATA_TYPE_2 = + + "标量函数 %s 仅接受一个参数,且参数必须为 TEXT、STRING 或 BLOB 数据类型。"; + public static final String SCALAR_FUNCTION_S_ONLY_ACCEPTS_TWO_ARGUMENTS_FIRST_ARGUMENT_MUST_BE_TEXT_STRING_OR_BLOB = + + "标量函数 %s 仅接受两个参数,第一个参数必须为 TEXT、STRING 或 BLOB 类型,第二个参数必须为 STRING 或 TEXT 类型。"; + public static final String SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_INT32_DATA_TYPE = + + "标量函数 %s 仅接受一个参数,且参数必须为 Int32 数据类型。"; + public static final String SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_BLOB_DATA_TYPE = + + "标量函数 %s 仅接受一个参数,且参数必须为 BLOB 数据类型。"; + public static final String SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_INT64_DATA_TYPE = + + "标量函数 %s 仅接受一个参数,且参数必须为 Int64 数据类型。"; + public static final String SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_FLOAT_DATA_TYPE = + + "标量函数 %s 仅接受一个参数,且参数必须为 Float 数据类型。"; + public static final String SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_DOUBLE_DATA_TYPE = + + "标量函数 %s 仅接受一个参数,且参数必须为 Double 数据类型。"; + public static final String SCALAR_FUNCTION_S_ONLY_ACCEPTS_THREE_ARGUMENTS_FIRST_ARGUMENT_MUST_BE_BLOB_TYPE = + + "标量函数 %s 仅接受三个参数,第一个参数必须为 BLOB 类型,"; + public static final String SECOND_ARGUMENT_MUST_BE_INT32_OR_INT64_TYPE_THIRD_ARGUMENT_MUST_BE_BLOB_TYPE = + + "第二个参数必须为 int32 或 int64 类型,第三个参数必须为 BLOB 类型。"; + public static final String AGGREGATE_FUNCTIONS_S_SHOULD_ONLY_HAVE_ONE_ARGUMENT = + + "聚合函数 [%s] 只能有一个参数"; + public static final String AGGREGATE_FUNCTIONS_S_ONLY_SUPPORT_NUMERIC_DATA_TYPES_INT32_INT64_FLOAT_DOUBLE = + + "聚合函数 [%s] 仅支持数值数据类型 [INT32, INT64, FLOAT, DOUBLE]"; + public static final String ERROR_SIZE_OF_INPUT_EXPRESSIONS_EXPRESSION_S_ACTUAL_SIZE_S_EXPECTED_SIZE_2 = + + "输入表达式数量错误。表达式:%s,实际数量:%s,期望数量:[2]。"; + public static final String AGGREGATE_FUNCTIONS_S_ONLY_SUPPORT_NUMERIC_DATA_TYPES_INT32_INT64_FLOAT_DOUBLE_TIMESTAMP = + + "聚合函数 [%s] 仅支持数值数据类型 [INT32, INT64, FLOAT, DOUBLE, TIMESTAMP]"; + public static final String ERROR_SIZE_OF_INPUT_EXPRESSIONS_EXPRESSION_S_ACTUAL_SIZE_S_EXPECTED_SIZE_1 = + + "输入表达式数量错误。表达式:%s,实际数量:%s,期望数量:[1]。"; + public static final String AGGREGATE_FUNCTIONS_S_SHOULD_ONLY_HAVE_ONE_BOOLEAN_EXPRESSION_AS_ARGUMENT = + + "聚合函数 [%s] 只能有一个 boolean 表达式作为参数"; + public static final String AGGREGATE_FUNCTIONS_S_SHOULD_ONLY_HAVE_ONE_OR_TWO_ARGUMENTS = + + "聚合函数 [%s] 只能有一个或两个参数"; + public static final String SECOND_ARGUMENT_OF_AGGREGATE_FUNCTIONS_S_SHOULD_BE_ORDERABLE = + + "聚合函数 [%s] 的第二个参数应可排序"; + public static final String AGGREGATE_FUNCTIONS_S_SHOULD_ONLY_HAVE_TWO_OR_THREE_ARGUMENTS = + + "聚合函数 [%s] 只能有两个或三个参数"; + public static final String AGGREGATE_FUNCTIONS_S_SHOULD_ONLY_HAVE_TWO_ARGUMENTS = + + "聚合函数 [%s] 只能有两个参数"; + public static final String SECOND_ARGUMENT_OF_AGGREGATE_FUNCTIONS_S_SHOULD_BE_NUMBERIC_TYPE_AND_DO_NOT_USE = + + "聚合函数 [%s] 的第二个参数应为数值类型,且不能使用表达式"; + public static final String AGGREGATION_FUNCTIONS_S_SHOULD_ONLY_HAVE_THREE_ARGUMENTS = + + "聚合函数 [%s] 只能有三个参数"; + public static final String AGGREGATION_FUNCTIONS_S_SHOULD_ONLY_HAVE_TWO_OR_THREE_ARGUMENTS = + + "聚合函数 [%s] 只能有两个或三个参数"; + public static final String AGGREGATION_FUNCTIONS_S_SHOULD_HAVE_VALUE_COLUMN_AS_NUMERIC_TYPE_INT32_INT64_FLOAT = + + "聚合函数 [%s] 的值列应为数值类型 [INT32, INT64, FLOAT, DOUBLE, TIMESTAMP]"; + public static final String AGGREGATION_FUNCTIONS_S_SHOULD_HAVE_PERCENTAGE_AS_DECIMAL_TYPE = + + + "聚合函数 [%s] 的百分比应为小数类型"; + public static final String AGGREGATION_FUNCTIONS_S_DO_NOT_SUPPORT_WEIGHT_AS_S_TYPE = + + + "聚合函数 [%s] 不支持 %s 类型的权重"; + public static final String WINDOW_FUNCTION_S_SHOULD_ONLY_HAVE_ONE_ARGUMENT = + + "窗口函数 [%s] 只能有一个参数"; + public static final String WINDOW_FUNCTION_NTH_VALUE_SHOULD_ONLY_HAVE_TWO_ARGUMENT_AND_SECOND_ARGUMENT_MUST_BE = + + "窗口函数 [nth_value] 只能有两个参数,且第二个参数必须为 integer 类型"; + public static final String WINDOW_FUNCTION_S_SHOULD_ONLY_HAVE_ONE_TO_THREE_ARGUMENT = + + "窗口函数 [%s] 只能有一到三个参数"; + public static final String WINDOW_FUNCTION_S_S_SECOND_ARGUMENT_MUST_BE_INTEGER_TYPE = + + "窗口函数 [%s] 的第二个参数必须为 integer 类型"; + public static final String UPDATE_ATTRIBUTE_SHALL_SPECIFY_A_ATTRIBUTE_ONLY_ONCE = + "UPDATE 属性只能指定一次。"; + public static final String CANNOT_BE_RESOLVED = + "无法解析"; + public static final String IS_NOT_AN_ATTRIBUTE_OR_TAG_COLUMN = + "不是属性列或标签列"; + public static final String UPDATE_S_ATTRIBUTE_VALUE_MUST_BE_STRING_TEXT_OR_NULL = + "UPDATE 的属性值必须为 STRING、TEXT 或 null。"; + public static final String MULTIPLE_COLUMNS_FOUND_WITH_TIME_CATEGORY_IN_TABLE_SCHEMA = + + "表 schema 中发现多个 TIME 类别列。"; + public static final String INSERT_COLUMN_NAME_DOES_NOT_EXIST_IN_TARGET_TABLE_S = + + "插入列名在目标表中不存在:%s"; + public static final String INSERT_COLUMN_NAME_IS_SPECIFIED_MORE_THAN_ONCE_S = + + "插入列名被指定多次:%s"; + public static final String INSERT_QUERY_HAS_MISMATCHED_COLUMN_TYPES_TABLE_S_QUERY_S = + + "插入查询的列类型不匹配:表:[%s],查询:[%s]"; + public static final String WITH_QUERY_NAME_S_SPECIFIED_MORE_THAN_ONCE = + + "WITH查询名称 '%s' 被指定多次。"; + public static final String WITH_TABLE_NAME_IS_REFERENCED_IN_THE_BASE_RELATION_OF_RECURSION = + + + "递归的基础关系中引用了 WITH 表名。"; + public static final String MULTIPLE_RECURSIVE_REFERENCES_IN_THE_STEP_RELATION_OF_RECURSION = + + "递归的步骤关系中存在多个递归引用"; + public static final String FETCH_FIRST_LIMIT_CLAUSE_IN_THE_STEP_RELATION_OF_RECURSION = + + "递归的步骤关系中存在 FETCH FIRST / LIMIT 子句"; + public static final String RECURSIVE_REFERENCE_OUTSIDE_OF_FROM_CLAUSE_OF_THE_STEP_RELATION_OF_RECURSION = + + + "递归的步骤关系中,FROM 子句外存在递归引用。"; + public static final String IMMEDIATE_WITH_CLAUSE_IN_RECURSIVE_QUERY_IS_NOT_SUPPORTED = + + "递归查询不支持直接使用 WITH子句。"; + public static final String IMMEDIATE_FILL_CLAUSE_IN_RECURSIVE_QUERY_IS_NOT_SUPPORTED = + + "递归查询不支持直接使用 FILL 子句"; + public static final String IMMEDIATE_ORDER_BY_CLAUSE_IN_RECURSIVE_QUERY_IS_NOT_SUPPORTED = + + "递归查询不支持直接使用 ORDER_BY 子句。"; + public static final String IMMEDIATE_OFFSET_CLAUSE_IN_RECURSIVE_QUERY_IS_NOT_SUPPORTED = + + "递归查询不支持直接使用 OFFSET 子句"; + public static final String IMMEDIATE_FETCH_FIRST_LIMIT_CLAUSE_IN_RECURSIVE_QUERY_IS_NOT_SUPPORT = + + "递归查询不支持直接使用 FETCH FIRST / LIMIT 子句"; + public static final String BASE_AND_STEP_RELATIONS_OF_RECURSION_HAVE_DIFFERENT_NUMBER_OF_FIELDS_S_S = + + "递归的基础关系和步骤关系字段数量不同:%s,%s"; + public static final String RECURSION_STEP_RELATION_OUTPUT_TYPE_S_IS_NOT_COERCIBLE_TO_RECURSION_BASE_RELATION_OUTPUT = + + "递归步骤关系的输出类型(%s)无法强制转换为递归基础关系在列 %s 上的输出类型(%s)"; + public static final String CANNOT_NEST_WINDOW_FUNCTIONS_OR_ROW_PATTERN_MEASURES_INSIDE_WINDOW_FUNCTION_ARGUMENTS = + + "不能在窗口函数参数中嵌套窗口函数或行模式度量"; + public static final String DISTINCT_IN_WINDOW_FUNCTION_PARAMETERS_NOT_YET_SUPPORTED_S = + + "暂不支持窗口函数参数中的 DISTINCT:%s"; + public static final String S_FUNCTION_REQUIRES_AN_ORDER_BY_WINDOW_CLAUSE = + + "%s 函数需要 ORDER_BY 窗口子句。"; + public static final String CANNOT_SPECIFY_WINDOW_FRAME_FOR_S_FUNCTION = + + "不能为 %s 函数指定窗口框架"; + public static final String WINDOW_NAME_S_SPECIFIED_MORE_THAN_ONCE = + + "WINDOW 名称 '%s' 被指定多次"; + public static final String CANNOT_RESOLVE_WINDOW_NAME_S = + + "无法解析 WINDOW 名称 %s"; + public static final String WINDOW_SPECIFICATION_WITH_NAMED_WINDOW_REFERENCE_CANNOT_SPECIFY_PARTITION_BY = + + "带命名 WINDOW 引用的 WINDOW 规范不能指定 PARTITION_BY。"; + public static final String CANNOT_SPECIFY_ORDER_BY_IF_REFERENCED_NAMED_WINDOW_SPECIFIES_ORDER_BY = + + "引用的命名 WINDOW 已指定 ORDER_BY 时,不能再指定 ORDER_BY。"; + public static final String CANNOT_REFERENCE_NAMED_WINDOW_CONTAINING_FRAME_SPECIFICATION = + + "不能引用包含框架规范的命名 WINDOW"; + public static final String WHERE_CLAUSE_MUST_EVALUATE_TO_A_BOOLEAN_ACTUAL_TYPE_S = + + "WHERE 子句必须计算为 boolean:实际类型 %s"; + public static final String MULTIPLE_DIFFERENT_COLUMNS_IN_THE_SAME_EXPRESSION_ARE_NOT_SUPPORTED = + + "不支持同一表达式中存在多个不同的 COLUMNS"; + public static final String NO_MATCHING_COLUMNS_FOUND_THAT_MATCH_REGEX_S = + + "没有匹配 regex '%s' 的列。"; + public static final String S_ARE_NOT_SUPPORTED_NOW = + + "目前不支持 %s"; + public static final String UNABLE_TO_RESOLVE_REFERENCE_S = + + "无法解析引用 %s。"; + public static final String IDENTIFIERCHAINBASIS_GET_GETBASISTYPE_EQ_EQ_FIELD_OR_TARGET_EXPRESSION_ISN_T_A = + + "identifierChainBasis.get().getBasisType == FIELD 或目标表达式不是 QualifiedName"; + public static final String SELECT_STAR_FROM_OUTER_SCOPE_TABLE_NOT_SUPPORTED_WITH_ANONYMOUS_COLUMNS = + + + "存在匿名列时,不支持从外层作用域表执行 SELECT *"; + public static final String DISTINCT_CAN_ONLY_BE_APPLIED_TO_COMPARABLE_TYPES_ACTUAL_S = + + "DISTINCT 只能应用于可比较类型(实际:%s)"; + public static final String DISTINCT_CAN_ONLY_BE_APPLIED_TO_COMPARABLE_TYPES_ACTUAL_S_S = + + "DISTINCT 只能应用于可比较类型(实际:%s):%s"; + public static final String GROUP_BY_POSITION_S_IS_NOT_IN_SELECT_LIST = + + "GROUP_BY 位置 %s 不在 select 列表中。"; + public static final String GROUP_BY_EXPRESSION_MUST_BE_A_COLUMN_REFERENCE_S = + + "GROUP_BY 表达式必须为列引用:%s"; + public static final String S_IS_NOT_COMPARABLE_AND_THEREFORE_CANNOT_BE_USED_IN_GROUP_BY = + + "%s 不可比较,因此不能用于 GROUP_BY。"; + public static final String GROUP_BY_HAS_MORE_THAN_S_GROUPING_SETS = + + "GROUP BY 包含超过 %s 个 grouping sets"; + public static final String HAVING_CLAUSE_MUST_EVALUATE_TO_A_BOOLEAN_ACTUAL_TYPE_S = + + "HAVING 子句必须计算为 boolean:实际类型 %s"; + public static final String S_QUERY_HAS_DIFFERENT_NUMBER_OF_FIELDS_D_D = + + "%s 查询的字段数量不同:%d,%d"; + public static final String COLUMN_D_IN_S_QUERY_HAS_INCOMPATIBLE_TYPES_S_S = + + + "列 %d 在 %s 查询中类型不兼容:%s,%s"; + public static final String TYPE_S_IS_NOT_COMPARABLE_AND_THEREFORE_CANNOT_BE_USED_IN_SS = + + "类型 %s 不可比较,因此不能用于 %s%s。"; + public static final String DISTINCT = + " DISTINCT"; + public static final String AMBIGUOUS_COLUMN_S_IN_ROW_PATTERN_INPUT_RELATION = + + "行模式输入关系中的列存在歧义:%s"; + public static final String S_IS_NOT_COMPARABLE_AND_THEREFORE_CANNOT_BE_USED_IN_PARTITION_BY = + + "%s 不可比较,因此不能用于 PARTITION_BY。"; + public static final String S_IS_NOT_ORDERABLE_AND_THEREFORE_CANNOT_BE_USED_IN_ORDER_BY = + + "%s 不可排序,因此不能用于 ORDER_BY。"; + public static final String EXPRESSION_DEFINING_A_LABEL_MUST_BE_BOOLEAN_ACTUAL_TYPE_S = + + "定义标签的表达式必须为 boolean(实际类型:%s)"; + public static final String VALUES_ROWS_HAVE_MISMATCHED_SIZES_S_VS_S = + + "VALUES 行大小不匹配:%s vs %s"; + public static final String TYPE_OF_ROW_D_COLUMN_D_IS_MISMATCHED_EXPECTED_S_ACTUAL_S = + + "第 %d 行第 %d 列的类型不匹配,期望:%s,实际:%s"; + public static final String TYPE_OF_ROW_D_IS_MISMATCHED_EXPECTED_S_ACTUAL_S = + + "第 %d 行的类型不匹配,期望:%s,实际:%s"; + public static final String COLUMN_ALIAS_LIST_HAS_S_ENTRIES_BUT_S_HAS_S_COLUMNS_AVAILABLE = + + "列别名列表有 %s 个条目,但 '%s' 有 %s 个可用列"; + public static final String JOIN_ON_CLAUSE_MUST_EVALUATE_TO_A_BOOLEAN_ACTUAL_TYPE_S = + + "JOIN_ON 子句必须计算为 boolean:实际类型 %s"; + public static final String ASOF_MAIN_JOIN_EXPRESSION_MUST_EVALUATE_TO_A_BOOLEAN_ACTUAL_TYPE_S = + + "ASOF 主 JOIN 表达式必须计算为 boolean:实际类型 %s"; + public static final String LEFT_CHILD_TYPE_OF_ASOF_MAIN_JOIN_EXPRESSION_MUST_BE_TIMESTAMP_ACTUAL_TYPE_S = + + "ASOF 主 JOIN 表达式的左子节点类型必须为 TIMESTAMP:实际类型 %s"; + public static final String RIGHT_CHILD_TYPE_OF_ASOF_MAIN_JOIN_EXPRESSION_MUST_BE_TIMESTAMP_ACTUAL_TYPE_S = + + "ASOF 主 JOIN 表达式的右子节点类型必须为 TIMESTAMP:实际类型 %s"; + public static final String COLUMN_S_APPEARS_MULTIPLE_TIMES_IN_USING_CLAUSE = + + "USING子句中列 '%s' 出现多次。"; + public static final String COLUMN_S_IS_MISSING_FROM_LEFT_SIDE_OF_JOIN = + + "JOIN 左侧缺少列 '%s'"; + public static final String COLUMN_S_IS_MISSING_FROM_RIGHT_SIDE_OF_JOIN = + + "JOIN 右侧缺少列 '%s'"; + public static final String COLUMN_TYPES_OF_LEFT_AND_RIGHT_SIDE_ARE_DIFFERENT_LEFT_IS_S_RIGHT_IS_S = + + "左右两侧的列类型不同:左侧为 %s,右侧为 %s"; + public static final String CANNOT_INFER_TIME_COLUMN_FOR_S_FILL_THERE_EXISTS_NO_COLUMN_WHOSE_TYPE_IS_TIMESTAMP = + + "无法为 %s FILL 推断 TIME_COLUMN,未找到 TIMESTAMP 类型的列。"; + public static final String S_FILL_TIME_COLUMN_POSITION_S_IS_NOT_IN_SELECT_LIST = + + "%s FILL TIME_COLUMN 位置 %s 不在 select 列表中"; + public static final String TYPE_OF_TIME_COLUMN_FOR_S_FILL_SHOULD_ONLY_BE_TIMESTAMP_BUT_TYPE_OF_THE_COLUMN_YOU = + + "用于 %s FILL 的 TIME_COLUMN 类型只能是 TIMESTAMP,但你指定的列类型为 %s"; + public static final String S_FILL_FILL_GROUP_POSITION_S_IS_NOT_IN_SELECT_LIST = + + "%s FILL FILL_GROUP 位置 %s 不在 select 列表中"; + public static final String TYPE_S_IS_NOT_ORDERABLE_AND_THEREFORE_CANNOT_BE_USED_IN_FILL_GROUP_S = + + "类型 %s 不可排序,因此不能用于 FILL_GROUP:%s"; + public static final String ORDER_BY_POSITION_S_IS_NOT_IN_SELECT_LIST = + + "ORDER_BY 位置 %s 不在 select 列表中。"; + public static final String TYPE_S_IS_NOT_ORDERABLE_AND_THEREFORE_CANNOT_BE_USED_IN_ORDER_BY_S = + + "类型 %s 不可排序,因此不能用于 ORDER_BY:%s"; + public static final String OFFSET_ROW_COUNT_MUST_BE_GREATER_OR_EQUAL_TO_0_ACTUAL_VALUE_S = + + "OFFSET 行数必须大于或等于 0(实际值:%s)"; + public static final String LIMIT_ROW_COUNT_MUST_BE_GREATER_OR_EQUAL_TO_0_ACTUAL_VALUE_S = + + "LIMIT 行数必须大于或等于 0(实际值:%s)"; + public static final String NON_CONSTANT_PARAMETER_VALUE_FOR_S_S = + + "%s 的参数值不是常量:%s"; + public static final String PARAMETER_VALUE_PROVIDED_FOR_S_IS_NULL_S = + + "为 %s 提供的参数值为 NULL:%s"; + public static final String RECURSIVE_REFERENCE_IN_LEFT_SOURCE_OF_S_JOIN = + + + "%s join 的左侧源中存在递归引用"; + public static final String RECURSIVE_REFERENCE_IN_RIGHT_SOURCE_OF_S_JOIN = + + + "%s join 的右侧源中存在递归引用"; + public static final String RECURSIVE_REFERENCE_IN_RIGHT_RELATION_OF_EXCEPT_S = + + "EXCEPT %s 的右侧关系中存在递归引用"; + public static final String DISTINCT_2 = + "DISTINCT"; + public static final String ALL = + "ALL"; + public static final String RECURSIVE_REFERENCE_IN_LEFT_RELATION_OF_EXCEPT_ALL = + + "EXCEPT ALL 的左侧关系中存在递归引用"; + public static final String FOR_SELECT_DISTINCT_ORDER_BY_EXPRESSIONS_MUST_APPEAR_IN_SELECT_LIST = + + "对于 SELECT DISTINCT,排序表达式必须出现在 select 列表中。"; + public static final String IS_CURRENTLY_NOT_ALLOWED_2 = + + " 当前不允许。"; + public static final String DUPLICATE_PROPERTY_S = + + "重复属性:%s"; + public static final String TTL_VALUE_MUST_BE_A_INF_OR_A_LONGLITERAL_BUT_NOW_IS = + + "TTL' 值必须为 'INF' 或 LongLiteral,当前为:"; + public static final String COLUMN_NAME_NOT_SPECIFIED_AT_POSITION_S = + + "位置 %s 未指定列名"; + public static final String COLUMN_NAME_S_SPECIFIED_MORE_THAN_ONCE = + + "列名 '%s' 被指定多次"; + public static final String COLUMN_ALIAS_LIST_HAS_S_ENTRIES_BUT_RELATION_HAS_S_COLUMNS = + + "列别名列表有 %s 个条目,但关系有 %s 个列"; + public static final String TABLE_FUNCTION_S_SPECIFIES_REQUIRED_COLUMNS_FROM_TABLE_ARGUMENT_S_WHICH_CANNOT_BE_FOUND = + + "表函数 %s 指定了来自表参数 %s 的必需列,但无法找到。"; + public static final String TABLE_FUNCTION_S_SPECIFIES_EMPTY_LIST_OF_REQUIRED_COLUMNS_FROM_TABLE_ARGUMENT_S = + + "表函数 %s 指定了来自表参数 %s 的必需列空列表。"; + public static final String TABLE_FUNCTION_S_SPECIFIES_NEGATIVE_INDEX_OF_REQUIRED_COLUMN_FROM_TABLE_ARGUMENT_S = + + "表函数 %s 指定了来自表参数 %s 的必需列负索引。"; + public static final String INDEX_S_OF_REQUIRED_COLUMN_FROM_TABLE_ARGUMENT_S_IS_OUT_OF_BOUNDS_FOR_TABLE_WITH_S = + + "必需列索引 %s 越界,来自表参数 %s,该表有 %s 列。"; + public static final String TABLE_FUNCTION_S_DOES_NOT_SPECIFY_REQUIRED_INPUT_COLUMNS_FROM_TABLE_ARGUMENT_S = + + "表函数 %s 未指定来自表参数 %s 的必需输入列。"; + public static final String TOO_MANY_ARGUMENTS_EXPECTED_AT_MOST_S_ARGUMENTS_GOT_S_ARGUMENTS = + + "参数过多。最多期望 %s 个参数,实际得到 %s 个参数"; + public static final String ALL_ARGUMENTS_MUST_BE_PASSED_BY_NAME_OR_ALL_MUST_BE_PASSED_POSITIONALLY = + + "所有参数必须全部按名称传递,或全部按位置传递"; + public static final String UNEXPECTED_ARGUMENT_NAME_S = + + "意外的参数名:%s"; + public static final String UNEXPECTED_TABLE_FUNCTION_ARGUMENT_TYPE_S = + + "意外的表函数参数类型:%s"; + public static final String INVALID_ARGUMENT_S_EXPECTED_TABLE_ARGUMENT_GOT_S = + + "无效参数 %s。期望表参数,实际为 %s"; + public static final String INVALID_ARGUMENT_S_EXPECTED_SCALAR_ARGUMENT_GOT_S = + + "无效参数 %s。期望标量参数,实际为 %s"; + public static final String INVALID_ARGUMENT_S_PARTITIONING_CAN_NOT_BE_SPECIFIED_FOR_TABLE_ARGUMENT_WITH_ROW = + + "无效参数 %s。不能为 row 语义的表参数指定 Partitioning"; + public static final String INVALID_ARGUMENT_S_ORDERING_CAN_NOT_BE_SPECIFIED_FOR_TABLE_ARGUMENT_WITH_ROW_SEMANTICS = + + "无效参数 %s。不能为 row 语义的表参数指定 Ordering"; + public static final String INVALID_SCALAR_ARGUMENT_S_EXPECTED_TYPE_S_GOT_S = + + "无效标量参数 '%s'。期望类型 %s,实际为 %s"; + public static final String INVALID_SCALAR_ARGUMENT_S_S = + + "无效标量参数 %s,%s"; + public static final String MISSING_REQUIRED_ARGUMENT_S = + + "缺少必需参数:%s"; + public static final String EXPECTED_COLUMN_REFERENCE_ACTUAL_S = + + "期望列引用。实际:%s"; + public static final String COLUMN_S_IS_NOT_PRESENT_IN_THE_INPUT_RELATION = + + "输入关系中不存在列 %s"; + public static final String S_CANNOT_CONTAIN_AGGREGATIONS_WINDOW_FUNCTIONS_OR_GROUPING_OPERATIONS_S = + + "%s 不能包含聚合、窗口函数或分组操作:%s"; + public static final String S_MUST_BE_AN_AGGREGATE_EXPRESSION_OR_APPEAR_IN_GROUP_BY_CLAUSE = + + "'%s' 必须是聚合表达式,或出现在 GROUP_BY 子句中。"; + public static final String SUBQUERY_USES_S_WHICH_MUST_APPEAR_IN_GROUP_BY_CLAUSE = + + "子查询使用了 '%s',该列必须出现在 GROUP_BY 子句中。"; + public static final String CANNOT_NEST_AGGREGATIONS_INSIDE_AGGREGATION_S_S = + + "不能在聚合 '%s' 中嵌套聚合:%s"; + public static final String UNION_PATTERN_VARIABLE_NAME_S_IS_A_DUPLICATE_OF_PRIMARY_PATTERN_VARIABLE_NAME = + + "union 模式变量名 %s 与主模式变量名重复"; + public static final String UNION_PATTERN_VARIABLE_NAME_S_IS_DECLARED_TWICE = + + "union 模式变量名 %s 被声明了两次"; + public static final String SUBSET_ELEMENT_S_IS_NOT_A_PRIMARY_PATTERN_VARIABLE = + + "subset 元素 %s 不是主模式变量"; + public static final String DEFINED_VARIABLE_S_IS_NOT_A_PRIMARY_PATTERN_VARIABLE = + + "定义的变量 %s 不是主模式变量"; + public static final String PATTERN_VARIABLE_WITH_NAME_S_IS_DEFINED_TWICE = + + "名称为 %s 的模式变量被定义了两次"; + public static final String FINAL_SEMANTICS_IS_NOT_SUPPORTED_IN_DEFINE_CLAUSE = + + "DEFINE 子句中不支持 FINAL 语义"; + public static final String PATTERN_QUANTIFIER_LOWER_BOUND_MUST_BE_GREATER_THAN_OR_EQUAL_TO_0 = + + "模式量词下界必须大于或等于 0"; + public static final String PATTERN_QUANTIFIER_LOWER_BOUND_MUST_NOT_EXCEED = + + "模式量词下界不得超过 "; + public static final String PATTERN_QUANTIFIER_UPPER_BOUND_MUST_BE_GREATER_THAN_OR_EQUAL_TO_1 = + + "模式量词上界必须大于或等于 1"; + public static final String PATTERN_QUANTIFIER_UPPER_BOUND_MUST_NOT_EXCEED = + + "模式量词上界不得超过 "; + public static final String PATTERN_QUANTIFIER_LOWER_BOUND_MUST_NOT_EXCEED_UPPER_BOUND = + + "模式量词下界不得超过上界"; + public static final String S_IS_NOT_A_PRIMARY_OR_UNION_PATTERN_VARIABLE = + + "%s 不是主模式变量或 union 模式变量"; + public static final String NESTED_ROW_PATTERN_RECOGNITION_IN_ROW_PATTERN_RECOGNITION = + + "行模式识别中嵌套了行模式识别"; + public static final String PATTERN_EXCLUSION_SYNTAX_IS_NOT_ALLOWED_WHEN_ALL_ROWS_PER_MATCH_WITH_UNMATCHED_ROWS_IS = + + "指定 ALL_ROWS_PER_MATCH_WITH_UNMATCHED_ROWS 时,不允许使用模式排除语法。"; + public static final String COLUMN_S_CANNOT_BE_RESOLVED = + + "无法解析列 '%s'"; + public static final String REFERENCE_TO_COLUMN_S_FROM_OUTER_SCOPE_NOT_ALLOWED_IN_THIS_CONTEXT = + + "不允许在当前上下文中引用外层作用域的列 '%s'。"; + public static final String COLUMN_S_PREFIXED_WITH_LABEL_S_CANNOT_BE_RESOLVED = + + "无法解析带标签前缀 %s 的列 %s"; + public static final String EXPRESSION_S_IS_NOT_OF_TYPE_ROW = + + "表达式 %s 不是 ROW 类型"; + public static final String AMBIGUOUS_ROW_FIELD_REFERENCE_S = + + "行字段引用存在歧义:%s"; + public static final String TYPES_ARE_NOT_COMPARABLE_WITH_NULLIF_S_VS_S = + + "NULLIF 中的类型不可比较:%s vs %s"; + public static final String CASE_OPERAND_TYPE_DOES_NOT_MATCH_WHEN_CLAUSE_OPERAND_TYPE_S_VS_S = + + "CASE 操作数类型与 WHEN子句操作数类型不匹配:%s vs %s"; + public static final String UNARY_OPERATOR_CANNOT_BY_APPLIED_TO_S_TYPE = + + "一元 '+' 操作符不能应用于 %s 类型"; + public static final String LEFT_SIDE_OF_LIKE_EXPRESSION_MUST_EVALUATE_TO_TEXT_OR_STRING_TYPE_ACTUAL_S = + + "LIKE 表达式左侧必须计算为 TEXT 或 STRING 类型(实际:%s)"; + public static final String PATTERN_FOR_LIKE_EXPRESSION_MUST_EVALUATE_TO_TEXT_OR_STRING_TYPE_ACTUAL_S = + + + "LIKE 表达式的模式必须计算为 TEXT 或 STRING 类型(实际:%s)"; + public static final String ESCAPE_FOR_LIKE_EXPRESSION_MUST_EVALUATE_TO_TEXT_OR_STRING_TYPE_ACTUAL_S = + + "LIKE 表达式的 escape 必须计算为 TEXT 或 STRING 类型(实际:%s)"; + public static final String LABEL_STAR_SYNTAX_IS_ONLY_SUPPORTED_AS_THE_ONLY_ARGUMENT_OF_ROW_PATTERN_COUNT_FUNCTION = + + "label.* 语法仅支持作为行模式 count 函数的唯一参数"; + public static final String CANNOT_USE_DISTINCT_WITH_AGGREGATE_FUNCTION_IN_PATTERN_RECOGNITION_CONTEXT = + + "不能在模式识别上下文中将 DISTINCT 与聚合函数一起使用"; + public static final String S_SEMANTICS_IS_NOT_SUPPORTED_OUT_OF_PATTERN_RECOGNITION_CONTEXT = + + "模式识别上下文外不支持 %s 语义"; + public static final String S_SEMANTICS_IS_SUPPORTED_ONLY_FOR_FIRST_LAST_AND_AGGREGATION_FUNCTIONS_ACTUAL_S = + + "%s 语义仅支持 FIRST()、LAST() 和聚合函数。实际值:%s"; + public static final String THE_SECOND_ARGUMENT_OF_S_FUNCTION_MUST_BE_ACTUAL_TIME_NAME = + + "%s 函数的第二个参数必须为实际时间名称"; + public static final String THE_THIRD_ARGUMENT_OF_S_FUNCTION_MUST_BE_ACTUAL_TIME_NAME = + + "%s 函数的第三个参数必须为实际时间名称"; + public static final String TOO_MANY_ARGUMENTS_FOR_FUNCTION_CALL_S = + + "函数调用 %s() 的参数过多"; + public static final String S_IS_NOT_A_PRIMARY_PATTERN_VARIABLE_OR_SUBSET_NAME = + "%s 为 不 主模式变量或子集名称"; + public static final String MISSING_VALID_TIME_COLUMN_THE_TABLE_MUST_CONTAIN_EITHER_A_COLUMN_WITH_THE_TIME_CATEGORY = + + "缺少有效时间列。表必须包含一个 TIME 类别列,或至少一个 TIMESTAMP 列。"; + public static final String CLASSIFIER_PATTERN_RECOGNITION_FUNCTION_TAKES_NO_ARGUMENTS_OR_1_ARGUMENT = + + "CLASSIFIER 模式识别函数不接受参数或只接受 1 个参数"; + public static final String CLASSIFIER_FUNCTION_ARGUMENT_SHOULD_BE_PRIMARY_PATTERN_VARIABLE_OR_SUBSET_NAME_ACTUAL_S = + + "CLASSIFIER 函数参数应为主模式变量或子集名称。实际:%s"; + public static final String CANNOT_USE_DISTINCT_WITH_S_PATTERN_RECOGNITION_FUNCTION = + + "不能将 DISTINCT 与 %s 模式识别函数一起使用"; + public static final String S_SEMANTICS_IS_NOT_SUPPORTED_WITH_S_PATTERN_RECOGNITION_FUNCTION = + + "%s 语义不支持与 %s 模式识别函数一起使用"; + public static final String S_PATTERN_RECOGNITION_FUNCTION_REQUIRES_1_OR_2_ARGUMENTS = + + "%s 模式识别函数需要 1 或 2 个参数。"; + public static final String S_PATTERN_RECOGNITION_NAVIGATION_FUNCTION_REQUIRES_A_NUMBER_AS_THE_SECOND_ARGUMENT = + + "%s 模式识别导航函数需要第二个参数为数字。"; + public static final String S_PATTERN_RECOGNITION_NAVIGATION_FUNCTION_REQUIRES_A_NON_NEGATIVE_NUMBER_AS_THE_SECOND = + + "%s 模式识别导航函数需要第二个参数为非负数(实际:%s)。"; + public static final String THE_SECOND_ARGUMENT_OF_S_PATTERN_RECOGNITION_NAVIGATION_FUNCTION_MUST_NOT_EXCEED_S = + + "%s 模式识别导航函数的第二个参数不得超过 %s(实际:%s)"; + public static final String CANNOT_NEST_S_PATTERN_NAVIGATION_FUNCTION_INSIDE_S_PATTERN_NAVIGATION_FUNCTION = + + "不能在 %s 模式导航函数中嵌套 %s 模式导航函数"; + public static final String CANNOT_NEST_MULTIPLE_PATTERN_NAVIGATION_FUNCTIONS_INSIDE_S_PATTERN_NAVIGATION_FUNCTION = + + "不能在 %s 模式导航函数中嵌套多个模式导航函数"; + public static final String IMMEDIATE_NESTING_IS_REQUIRED_FOR_PATTERN_NAVIGATION_FUNCTIONS = + + "模式导航函数需要直接嵌套。"; + public static final String ALL_LABELS_AND_CLASSIFIERS_INSIDE_THE_CALL_TO_S_MUST_MATCH = + + "调用 '%s' 内的所有标签和 classifier 必须匹配"; + public static final String ALL_AGGREGATE_FUNCTION_ARGUMENTS_MUST_APPLY_TO_ROWS_MATCHED_WITH_THE_SAME_LABEL = + + "所有聚合函数参数都必须应用于匹配相同标签的行"; + public static final String CANNOT_NEST_S_AGGREGATE_FUNCTION_INSIDE_S_FUNCTION = + + "不能在 %s 函数中嵌套 %s 聚合函数"; + public static final String CANNOT_NEST_S_PATTERN_NAVIGATION_FUNCTION_INSIDE_S_FUNCTION = + + "不能在 %s 函数中嵌套 %s 模式导航函数"; + public static final String INVALID_PARAMETER_INDEX_S_MAX_VALUE_IS_S = + + "无效的参数索引 %s,最大值为 %s"; + public static final String CANNOT_CHECK_IF_S_IS_BETWEEN_S_AND_S = + + "无法判断 %s 是否位于 %s 和 %s 之间。"; + public static final String S_IS_NOT_COMPARABLE_AND_THEREFORE_CANNOT_BE_USED_IN_WINDOW_FUNCTION_PARTITION_BY = + + "%s 不可比较,因此不能用于窗口函数 PARTITION_BY。"; + public static final String S_IS_NOT_ORDERABLE_AND_THEREFORE_CANNOT_BE_USED_IN_WINDOW_FUNCTION_ORDER_BY = + + "%s 不可排序,因此不能用于窗口函数 ORDER_BY。"; + public static final String WINDOW_FRAME_STARTING_FROM_CURRENT_ROW_CANNOT_END_WITH_PRECEDING = + + "从 CURRENT_ROW 开始的窗口框架不能以 PRECEDING 结束。"; + public static final String WINDOW_FRAME_STARTING_FROM_FOLLOWING_CANNOT_END_WITH_PRECEDING = + + "从 FOLLOWING 开始的窗口框架不能以 PRECEDING 结束"; + public static final String WINDOW_FRAME_STARTING_FROM_FOLLOWING_CANNOT_END_WITH_CURRENT_ROW = + + "从 FOLLOWING 开始的窗口框架不能以 CURRENT_ROW 结束。"; + public static final String WINDOW_FRAME_ROWS_START_VALUE_TYPE_MUST_BE_EXACT_NUMERIC_TYPE_WITH_SCALE_0_ACTUAL_S = + + "窗口框架 ROWS 起始值类型必须是 scale 为 0 的精确数值类型(实际 %s)"; + public static final String WINDOW_FRAME_ROWS_END_VALUE_TYPE_MUST_BE_EXACT_NUMERIC_TYPE_WITH_SCALE_0_ACTUAL_S = + + "窗口框架 ROWS 结束值类型必须是 scale 为 0 的精确数值类型(实际 %s)"; + public static final String WINDOW_FRAME_OF_TYPE_GROUPS_PRECEDING_OR_FOLLOWING_REQUIRES_ORDER_BY = + + "GROUPS PRECEDING 或 FOLLOWING 类型的窗口框架需要 ORDER_BY。"; + public static final String WINDOW_FRAME_GROUPS_START_VALUE_TYPE_MUST_BE_EXACT_NUMERIC_TYPE_WITH_SCALE_0_ACTUAL_S = + + "窗口框架 GROUPS 起始值类型必须是 scale 为 0 的精确数值类型(实际 %s)"; + public static final String WINDOW_FRAME_OF_TYPE_RANGE_PRECEDING_OR_FOLLOWING_REQUIRES_ORDER_BY = + + "RANGE PRECEDING 或 FOLLOWING 类型的窗口框架需要 ORDER_BY。"; + public static final String WINDOW_FRAME_OF_TYPE_RANGE_PRECEDING_OR_FOLLOWING_REQUIRES_SINGLE_SORT_ITEM_IN_ORDER_BY = + + "RANGE PRECEDING 或 FOLLOWING 类型的窗口框架需要 ORDER_BY 中只有一个排序项(实际:%s)。"; + public static final String WINDOW_FRAME_OF_TYPE_RANGE_PRECEDING_OR_FOLLOWING_REQUIRES_THAT_SORT_ITEM_TYPE_BE = + + "RANGE PRECEDING 或 FOLLOWING 类型的窗口框架要求排序项类型为 numeric、datetime 或 interval(实际:%s)"; + public static final String WINDOW_FRAME_RANGE_VALUE_TYPE_S_NOT_COMPATIBLE_WITH_SORT_ITEM_TYPE_S = + + "窗口框架 RANGE 值类型(%s)与排序项类型(%s)不兼容"; + public static final String TYPE_S_MUST_BE_ORDERABLE_IN_ORDER_TO_BE_USED_IN_QUANTIFIED_COMPARISON = + + "类型 [%s] 必须可排序,才能用于量化比较。"; + public static final String TYPE_S_MUST_BE_COMPARABLE_IN_ORDER_TO_BE_USED_IN_QUANTIFIED_COMPARISON = + + "类型 [%s] 必须可比较,才能用于量化比较。"; + public static final String NOT_YET_IMPLEMENTED_S = + + "尚未实现:%s"; + public static final String S_MUST_EVALUATE_TO_A_S_ACTUAL_S = + + "%s 必须计算为 %s(实际:%s)"; + public static final String S_MUST_BE_THE_SAME_TYPE_OR_COERCIBLE_TO_A_COMMON_TYPE_CANNOT_FIND_COMMON_TYPE_BETWEEN_S = + "%s 必须为相同类型,或可强制转换为公共类型。无法在 %s 和 %s 之间找到公共类型,所有类型(去重后):%s"; + public static final String PATTERN_RECOGNITION_FUNCTION_NAME_MUST_NOT_BE_QUALIFIED = + + "模式识别函数名不得有限定符:"; + public static final String PATTERN_RECOGNITION_FUNCTION_NAME_MUST_NOT_BE_DELIMITED = + + "模式识别函数名不得被分隔:"; + public static final String PATTERN_RECOGNITION_FUNCTION_NAMES_CANNOT_BE_LAST_OR_FIRST_USE_RPR_LAST_OR_RPR_FIRST = + + "模式识别函数名不能为 LAST 或 FIRST,请改用 RPR_LAST 或 RPR_FIRST。"; + public static final String PARAMETER_NODE_MUST_HAVE_A_LOCATION = + "参数节点必须包含位置信息"; + public static final String INVALID_NUMBER_OF_PARAMETERS_EXPECTED_D_GOT_D = + + "参数数量无效:期望 %d,实际得到 %d"; + public static final String CANNOT_INSERT_IDENTIFIER_S_PLEASE_USE_STRING_LITERAL = + + "不能插入标识符 %s,请使用字符串字面量"; + public static final String EXPRESSIONS_AND_COLUMNS_DO_NOT_MATCH_EXPRESSIONS_SIZE = + + "表达式和列不匹配,表达式数量:"; + public static final String COLUMNS_SIZE = + + ",列数量:"; + public static final String TIMECOLUMNINDEX_OUT_OF_BOUND_D_D = + "timeColumnIndex 越界:%d-%d"; + public static final String INCONSISTENT_NUMBERS_OF_NON_TIME_COLUMN_NAMES_AND_VALUES_D_D = + + "非时间列名称和值的数量不一致:%d-%d"; + public static final String IS_NOT_SUPPORTED_FOR_PROPERTY_VALUE_OF_SET_CONFIGURATION = + + " 不支持作为 'set configuration' 的属性值。"; + public static final String NOTE_THAT_THE_SYNTAX_FOR_SET_CONFIGURATION_IN_THE_TREE_MODEL_IS_NOT_EXACTLY_THE_SAME_AS = + + "注意:树模型中的 'set configuration' 语法与表模型中的语法并不完全相同。"; + public static final String UNSUPPORTED_COPY_TO_FORMAT_S_SUPPORTED_FORMATS_S = + + "不支持 COPY_TO 格式 '%s'。支持的格式:%s"; + public static final String SIMULTANEOUS_SETTING_OF_MONTHLY_AND_NON_MONTHLY_INTERVALS_IS_NOT_SUPPORTED = + "不支持同时设置月级和非月级时间间隔。"; + public static final String DON_T_NEED_TO_SPECIFY_TIME_COLUMN_WHILE_EITHER_TIME_BOUND_OR_FILL_GROUP_PARAMETER_IS_NOT = + "未指定 TIME_BOUND 或 FILL_GROUP 参数时,无需指定 TIME_COLUMN"; + public static final String MONTH_OR_YEAR_INTERVAL_IN_TOLERANCE_IS_NOT_SUPPORTED_NOW = + "目前不支持在 tolerance 中使用月或年时间间隔。"; + public static final String ASOF_JOIN_DOES_NOT_SUPPORT_S_TYPE_NOW = + + "ASOF JOIN 目前不支持 %s 类型"; + public static final String THE_SECOND_ARGUMENT_OF_APPROX_COUNT_DISTINCT_FUNCTION_MUST_BE_A_LITERAL = + + "'approx_count_distinct' 函数的第二个参数必须为字面量"; + public static final String THE_SECOND_AND_THIRD_ARGUMENT_OF_APPROX_MOST_FREQUENT_FUNCTION_MUST_BE_POSITIVE_INTEGER = + + "'approx_most_frequent' 函数的第二和第三个参数必须为正整数字面量"; + public static final String THE_SECOND_ARGUMENT_OF_APPROX_PERCENTILE_FUNCTION_PERCENTAGE_MUST_BE_A_DOUBLE_LITERAL = + + "'approx_percentile' 函数 percentage 的第二个参数必须为 double 字面量"; + public static final String THE_THIRD_ARGUMENT_OF_APPROX_PERCENTILE_FUNCTION_PERCENTAGE_MUST_BE_A_DOUBLE_LITERAL = + + "'approx_percentile' 函数 percentage 的第三个参数必须为 double 字面量"; + public static final String INCONSISTENT_COLUMN_CATEGORY_OF_COLUMN_S_S_S = + + "列 %s 的类别不一致:%s/%s"; + public static final String COLUMN = + "列 "; + public static final String DOES_NOT_EXISTS_OR_FAILS_TO_BE = + " 不存在或无法被 "; + public static final String CREATED = + + "已创建"; + public static final String INCOMPATIBLE_DATA_TYPE_OF_COLUMN_S_S_S = + + "列 %s 的数据类型不兼容:%s/%s"; + public static final String INLIST_LITERAL_FOR_TIMESTAMP_CAN_ONLY_BE_LONGLITERAL_DOUBLELITERAL_AND_GENERICLITERAL = + "TIMESTAMP 的 InList literal 只能是 LongLiteral、DoubleLiteral 或 GenericLiteral,当前为 "; + public static final String THE_TIME_FIELD_COLUMNS_ARE_CURRENTLY_NOT_ALLOWED_IN_DEVICES_RELATED_OPERATIONS = + + "设备相关操作中当前不允许使用 TIME/FIELD 列"; + public static final String UNKNOWN_COLUMN_CATEGORY_FOR_S_CANNOT_AUTO_CREATE_COLUMN = + "列 %s 的类别未知,无法自动创建列。"; + public static final String UNKNOWN_COLUMN_DATA_TYPE_FOR_S_CANNOT_AUTO_CREATE_COLUMN = + + "%s 的列数据类型未知,无法自动创建列。"; + public static final String WRONG_CATEGORY_AT_COLUMN_S = + "列 %s 的类别错误。"; + public static final String MISSING_COLUMNS_S = + "缺少列 %s。"; + public static final String DATATYPE_OF_TAG_COLUMN_SHOULD_ONLY_BE_STRING_CURRENT_IS = + "TAG 列的数据类型只能是 STRING,当前为 "; + public static final String DATATYPE_OF_ATTRIBUTE_COLUMN_SHOULD_ONLY_BE_STRING_CURRENT_IS = + "ATTRIBUTE 列的数据类型只能是 STRING,当前为 "; + public static final String DECORRELATION_FOR_LIMIT_WITH_ROW_COUNT_GREATER_THAN_1_IS_NOT_SUPPORTED_YET = + + "暂不支持行数大于 1 的 LIMIT 去关联"; + public static final String GIVEN_CORRELATED_SUBQUERY_IS_NOT_SUPPORTED = + + "不支持给定的关联子查询"; + public static final String GIVEN_QUERIED_DATABASE_S_IS_NOT_EXIST = + "查询的数据库 %s 不存在!"; + + // --- QueryEngine log messages (additional) --- + public static final String INITIALIZED_SHARED_MEMORYBLOCK_COORDINATOR_WITH_ALL_AVAILABLE_MEMORY_ARG_BYTES = + "已使用全部可用内存初始化共享 MemoryBlock 'Coordinator':{} 字节"; + public static final String ERROR_OCCURRED_DURING_EXECUTING_UDAF_PLEASE_CHECK_WHETHER_THE_IMPLEMENTATION_OF_UDF_IS = + "执行 UDAF 时发生错误,请根据 udf-api 描述检查 UDF 实现是否正确。"; + public static final String PROCESSGETTSBLOCKREQUEST_SEQUENCE_ID_IN_ARG_ARG = + + "[ProcessGetTsBlockRequest] sequence ID 位于 [{}, {})"; + public static final String RECEIVED_ACKNOWLEDGEDATABLOCKEVENT_FOR_TSBLOCKS_WHOSE_SEQUENCE_ID_ARE_IN_ARG_ARG_FROM = + + "已从 {} 收到 TsBlock 的 AcknowledgeDataBlockEvent,其 sequence ID 位于 [{}, {})。"; + public static final String RECEIVED_ACK_EVENT_BUT_TARGET_FRAGMENTINSTANCE_ARG_IS_NOT_FOUND = + + "已收到 ACK event,但目标 FragmentInstance[{}] 未找到。"; + public static final String CLOSED_SOURCE_HANDLE_OF_SHUFFLESINKHANDLE_ARG_CHANNEL_INDEX_ARG = + + "已关闭 ShuffleSinkHandle {} 的 source handle,channel index:{}。"; + public static final String RECEIVED_CLOSESINKCHANNELEVENT_BUT_TARGET_FRAGMENTINSTANCE_ARG_IS_NOT_FOUND = + + "已收到 CloseSinkChannelEvent,但目标 FragmentInstance[{}] 未找到。"; + public static final String NEW_DATA_BLOCK_EVENT_RECEIVED_FOR_PLAN_NODE_ARG_OF_ARG_FROM_ARG = + + "已收到新的 data block event,对应 plan node {}、{},来自 {}。"; + public static final String RECEIVED_NEWDATABLOCKEVENT_BUT_THE_DOWNSTREAM_FRAGMENTINSTANCE_ARG_IS_NOT_FOUND = + + "已收到 NewDataBlockEvent,但下游 FragmentInstance[{}] 未找到。"; + public static final String END_OF_DATA_BLOCK_EVENT_RECEIVED_FOR_PLAN_NODE_ARG_OF_ARG_FROM_ARG = + + "已收到数据块结束事件,对应计划节点 {}、{},来自 {}。"; + public static final String RECEIVED_ONENDOFDATABLOCKEVENT_BUT_THE_DOWNSTREAM_FRAGMENTINSTANCE_ARG_IS_NOT_FOUND = + + "已收到 onEndOfDataBlockEvent,但下游 FragmentInstance[{}] 未找到。"; + public static final String CREATE_SOURCE_HANDLE_FROM_ARG_FOR_PLAN_NODE_ARG_OF_ARG = + + "从 {} 为 plan node {}({})创建 source handle"; + public static final String THE_TASK_ARG_IS_ABORTED_ALL_OTHER_TASKS_IN_THE_SAME_QUERY_WILL_BE_CANCELLED = + "任务 {} 已中止,同一查询中的其他任务也将被取消"; + public static final String DRIVERTASKTIMEOUT_CURRENT_TIME_IS_ARG_DDL_OF_TASK_IS_ARG = + "[DriverTaskTimeout] 当前时间为 {},任务 ddl 为 {}"; + public static final String EXECUTOR_ARG_EXITS_BECAUSE_IT_S_INTERRUPTED_WE_WILL_PRODUCE_ANOTHER_THREAD_TO_REPLACE = + + "Executor {} 因中断退出。将创建另一个线程进行替换。"; + public static final String CANNOT_RESERVE_ARG_MAX_ARG_BYTES_MEMORY_FROM_MEMORYPOOL_FOR_PLANNODEIDARG = + "无法从 MemoryPool 预留 {} 字节内存(最大:{}),planNodeId{}"; + public static final String BLOCKED_RESERVE_REQUEST_ARG_BYTES_MEMORY_FOR_PLANNODEIDARG = + + "预留请求被阻塞:为 planNodeId{} 预留 {} 字节内存"; + public static final String FAILED_TO_DO_THE_INITIALIZATION_FOR_DRIVER_ARG = + + "driver {} 初始化失败 "; + public static final String FAILED_TO_ACQUIRE_THE_READ_LOCK_OF_DATAREGION_ARG_FOR_ARG_TIMES = + + "获取 DataRegion-{} 的读锁失败,尝试次数 {}。"; + public static final String INTERRUPTED_WHEN_AWAIT_ON_ALLDRIVERSCLOSED_FRAGMENTINSTANCE_ID_IS_ARG = + "等待 allDriversClosed 时被中断,FragmentInstance Id 为 {}"; + public static final String RELEASE_TVLIST_OWNED_BY_QUERY_ALLOCATE_SIZE_ARG_RELEASE_SIZE_ARG = + + "释放查询拥有的 TVList:分配大小 {},释放大小 {}。"; + public static final String TVLIST_ARG_IS_RELEASED_BY_THE_QUERY_FRAGMENTINSTANCE_ID_IS_ARG = + + "查询已释放 TVList {},FragmentInstance Id 为 {}。"; + public static final String MEMORYNOTENOUGHEXCEPTION_WHEN_TRANSFERRING_TVLIST_OWNERSHIP_FROM_QUERY_ARG_TO_ANOTHER = + "将 TVList ownership 从查询 {} 转移到另一个查询 {} 时发生 MemoryNotEnoughException。"; + public static final String UNEXPECTED_EXCEPTION_WHEN_TRANSFERRING_TVLIST_OWNERSHIP_FROM_QUERY_ARG_TO_ANOTHER_QUERY = + + "将 TVList ownership 从查询 {} 转移到另一个查询 {} 时发生意外异常。"; + public static final String TVLIST_ARG_IS_NOW_OWNED_BY_ANOTHER_QUERY_FRAGMENTINSTANCE_ID_IS_ARG = + + "TVList {} 现在由另一个查询持有,FragmentInstance Id 为 {}。"; + public static final String GETTSBLOCKFROMQUEUE_TSBLOCK_ARG_SIZE_ARG = + + "[GetTsBlockFromQueue] TsBlock:{} 大小:{}"; + public static final String RECEIVENEWTSBLOCKNOTIFICATION_ARG_ARG_EACH_SIZE_IS_ARG = + + "[ReceiveNewTsBlockNotification] [{}, {}),每个大小为:{}"; + public static final String STARTPULLTSBLOCKSFROMREMOTE_ARG_ARG_ARG_ARG = + "[StartPullTsBlocksFromRemote] {}-{} [{}, {}) "; + public static final String SENDCLOSESINKCHANNELEVENT_TO_SHUFFLESINKHANDLE_ARG_INDEX_ARG = + "[SendCloseSinkChannelEvent] 到 [ShuffleSinkHandle: {}, index: {}])."; + public static final String SINKCHANNEL_STILL_RECEIVE_GETTING_TSBLOCK_REQUEST_AFTER_BEING_ABORTED_ARG_OR_CLOSED_ARG = + + "SinkChannel 在 aborted={} 或 closed={} 后仍收到获取 TsBlock 请求。"; + public static final String NOTIFYNEWTSBLOCK_ARG_ARG_TO_ARG_ARG = + "[NotifyNewTsBlock] [{}, {}) 到 {}.{}"; + public static final String PLAINSHUFFLESTRATEGY_NEEDS_TO_DO_NOTHING_CURRENT_CHANNEL_INDEX_IS_ARG = + + "PlainShuffleStrategy 无需操作,当前 channel index 为 {}。"; + public static final String LAYERROWWINDOWREADER_INDEX_OVERFLOW_BEGININDEX_ARG_ENDINDEX_ARG_WINDOWSIZE_ARG = + + "LayerRowWindowReader 索引溢出。beginIndex:{},endIndex:{},windowSize:{}。"; + public static final String CONSUMEMEMORY_CONSUME_ARG_CURRENT_REMAINING_MEMORY_ARG = + + "[ConsumeMemory] 消耗:{},当前剩余内存:{}"; + public static final String RELEASEMEMORY_RELEASE_ARG_CURRENT_REMAINING_MEMORY_ARG = + + "[ReleaseMemory] 释放:{},当前剩余内存:{}"; + public static final String MAXBYTESONEHANDLECANRESERVE_FOR_EXCHANGEOPERATOR_IS_ARG_EXCHANGESUMNUM_IS_ARG = + + "ExchangeOperator 的 MaxBytesOneHandleCanReserve 为 {},exchangeSumNum 为 {}。"; + public static final String STATE_TRACKER_STARTS = + "状态跟踪器启动"; + public static final String DISPATCH_WRITE_FAILED_STATUS_ARG_CODE_ARG_MESSAGE_ARG_NODE_ARG = + + "分发写入失败。状态:{},code:{},消息:{},节点 {}。"; + public static final String CAN_T_EXECUTE_REQUEST_ON_NODE_ARG_IN_SECOND_TRY_ERROR_MSG_IS_ARG = + + "第二次尝试在节点 {} 执行请求失败,错误消息为 {}。"; + public static final String CAN_T_EXECUTE_REQUEST_ON_NODE_ARG_ERROR_MSG_IS_ARG_AND_WE_TRY_TO_RECONNECT_THIS_NODE = + + "在节点 {} 执行请求失败,错误消息为 {},将尝试重连该节点。"; + public static final String WRITE_LOCALLY_FAILED_TSSTATUS_ARG_MESSAGE_ARG = + + "本地写入失败。TSStatus:{},消息:{}。"; + public static final String DISPATCH_WRITE_FAILED_MESSAGE_ARG_NODE_ARG = + + "分发写入失败。消息:{},节点 {}。"; + public static final String DISPATCH_WRITE_FAILED_STATUS_ARG_CODE_ARG_MESSAGE_ARG_NODE_ARG_2 = + + "分发写入失败。状态:{},code:{},消息:{},节点 {}。"; + public static final String LOGICAL_PLAN_IS_ARG = + + "逻辑计划为:\n {}"; + public static final String DISTRIBUTION_PLAN_DONE_FRAGMENT_INSTANCE_COUNT_IS_ARG_DETAILS_IS_ARG = + + "分布式计划完成。FragmentInstance 数量为 {},详情:\n {}"; + public static final String FAILED_TO_CHECK_TABLE_SCHEMA_WILL_SKIP_BECAUSE_SKIPFAILEDTABLESCHEMACHECK_IS_SET_TO_TRUE = + "检查表元数据失败,但由于 skipFailedTableSchemaCheck 设置为 true,将跳过该检查,消息:{}"; + public static final String FAILED_TO_CHECK_IF_DEVICE_ARG_IS_DELETED_BY_MODS_WILL_SEE_IT_AS_NOT_DELETED = + + "检查设备 {} 是否被 mods 删除失败,将视为未删除。"; + public static final String COLUMN_ARG_IN_TABLE_ARG_IS_NOT_FOUND_IN_IOTDB_WHILE_LOADING_TSFILE = + + "加载 TsFile 时,表 {} 中的列 {} 在 IoTDB 中未找到。"; + public static final String DEVICE_ARG_IS_NOT_IN_THE_TSFILEDEVICE2ISALIGNED_CACHE_ARG = + + "设备 {} 不在 tsFileDevice2IsAligned 缓存 {} 中。"; + public static final String LOADTSFILEANALYZER_CURRENT_DATANODE_IS_READ_ONLY_WILL_TRY_TO_CONVERT_TO_TABLETS_AND = + + "LoadTsFileAnalyzer: 当前 DataNode 为只读,将尝试转换为 tablet 后再插入。"; + public static final String LOAD_ANALYSIS_STAGE_ARG_ARG_TSFILES_HAVE_BEEN_ANALYZED_PROGRESS_ARG_PERCENT = + + "加载 - 分析阶段:已分析 {}/{} 个 TsFile,进度:{}%"; + public static final String THE_FILE_ARG_IS_NOT_A_VALID_TSFILE_PLEASE_CHECK_THE_INPUT_FILE = + + "文件 {} 不是有效的 TsFile,请检查输入文件。"; + public static final String TSFILE_ARG_IS_A_ARG_MODEL_FILE = + + "TsFile {} 是 {}-model 文件。"; + public static final String LOAD_FAILED_TO_CONVERT_MINI_TSFILE_ARG_TO_TABLETS_FROM_STATEMENT_ARG_STATUS_ARG = + + "加载:无法从 statement {} 将 mini TsFile {} 转换为 tablet。状态:{}。"; + public static final String LOAD_FAILED_TO_CONVERT_TO_TABLETS_FROM_STATEMENT_ARG_BECAUSE_FAILED_TO_READ_MODEL_INFO = + + "加载:无法从 statement {} 转换为 tablet,原因是从文件读取 model info 失败,消息:{}。"; + public static final String LOAD_FAILED_TO_CONVERT_TO_TABLETS_FROM_STATEMENT_ARG_STATUS_IS_NULL = + + "加载:无法从 statement {} 转换为 tablet。状态为 null。"; + public static final String LOAD_FAILED_TO_CONVERT_TO_TABLETS_FROM_STATEMENT_ARG_STATUS_ARG = + + "加载:无法从 statement {} 转换为 tablet。状态:{}"; + public static final String LOAD_FAILED_TO_CONVERT_TO_TABLETS_FROM_STATEMENT_ARG_BECAUSE_EXCEPTION_ARG = + + "加载:无法从 statement {} 转换为 tablet,原因是异常:{}"; + public static final String FAILED_TO_CHECK_IF_DEVICE_ARG_TIMESERIES_ARG_IS_DELETED_BY_MODS_WILL_SEE_IT_AS_NOT = + + "检查设备 {}、timeseries {} 是否被 mods 删除失败,将视为未删除。"; + public static final String CREATE_DATABASE_ERROR_STATEMENT_ARG_RESULT_STATUS_IS_ARG = + + + "创建数据库错误,statement:{},结果状态为:{}。"; + public static final String MEASUREMENT_ARGARGARG_DATATYPE_NOT_MATCH_TSFILE_ARG_IOTDB_ARG = + + "测点 {}{}{} 的数据类型不匹配,TsFile:{},IoTDB:{}"; + public static final String ENCODING_TYPE_NOT_MATCH_MEASUREMENT_ARGARGARG = + + "编码类型不匹配,测点:{}{}{},"; + public static final String TSFILE_ENCODING_ARG_IOTDB_ENCODING_ARG = + + "TsFile 编码:{},IoTDB 编码:{}"; + public static final String COMPRESSOR_NOT_MATCH_MEASUREMENT_ARGARGARG = + + "压缩器不匹配,测点:{}{}{},"; + public static final String TSFILE_COMPRESSOR_ARG_IOTDB_COMPRESSOR_ARG = + + "TsFile 压缩器:{},IoTDB 压缩器:{}"; + public static final String ARG_CACHE_FAILED_TO_CREATE_DATABASE_ARG = + + "[{} Cache] 创建数据库 {} 失败"; + public static final String ARG_CACHE_MISS_WHEN_SEARCH_DEVICE_ARG = + + "[{} Cache] 搜索设备 {} 时未命中"; + public static final String ARG_CACHE_HIT_WHEN_SEARCH_DEVICE_ARG = + + "[{} Cache] 搜索设备 {} 时命中"; + public static final String UNEXPECTED_ERROR_WHEN_GETREGIONREPLICASET_STATUS_ARG_REGIONMAP_ARG = + + "执行 getRegionReplicaSet 时发生意外错误:状态 {},regionMap:{}"; + public static final String ARG_CACHE_MISS_WHEN_SEARCH_DATABASE_ARG = + + "[{} Cache] 搜索数据库 {} 时未命中"; + public static final String ARG_CACHE_MISS_WHEN_SEARCH_TIME_PARTITION_ARG = + + "[{} Cache] 搜索时间分区 {} 时未命中"; + public static final String FAILURES_HAPPENED_DURING_RUNNING_CONFIGEXECUTION_WHEN_EXECUTING_ARG_MESSAGE_ARG_STATUS = + + "执行 {} 的 ConfigExecution 期间发生失败,消息:{},状态:{}"; + public static final String FAILURES_HAPPENED_DURING_RUNNING_CONFIGEXECUTION_WHEN_EXECUTING_ARG = + + "执行 {} 的 ConfigExecution 期间发生失败。"; + public static final String FAILED_TO_EXECUTE_CREATE_DATABASE_ARG_IN_CONFIG_NODE_STATUS_IS_ARG = + + "在 config node 中执行 create database {} 失败,状态为 {}。"; + public static final String FAILED_TO_EXECUTE_ALTER_DATABASE_ARG_IN_CONFIG_NODE_STATUS_IS_ARG = + + "在 config node 中执行 alter database {} 失败,状态为 {}。"; + public static final String FAILED_TO_EXECUTE_DELETE_DATABASE_ARG_IN_CONFIG_NODE_STATUS_IS_ARG = + + "在 config node 中执行 delete database {} 失败,状态为 {}。"; + public static final String FAILED_TO_CREATE_FUNCTION_WHEN_TRY_TO_CREATE_ARG_ARG_INSTANCE_FIRST = + + "尝试先创建 {}({}) 实例时,创建函数失败。"; + public static final String FAILED_TO_GET_EXECUTABLE_FOR_TRIGGER_ARG_USING_URI_ARG = + "无法获取 Trigger({}) 的可执行文件,URI:{}。"; + public static final String FAILED_TO_CREATE_TRIGGER_WHEN_TRY_TO_CREATE_TRIGGER_ARG_INSTANCE_FIRST = + + "尝试先创建 trigger({}) 实例时,创建 trigger 失败。"; + public static final String ARG_FAILED_TO_CREATE_TRIGGER_ARG_TSSTATUS_IS_ARG = + + "[{}] 创建 trigger {} 失败。TSStatus 为 {}"; + public static final String FAILED_TO_GET_EXECUTABLE_FOR_PIPEPLUGIN_ARG_USING_URI_ARG = + "无法获取 PipePlugin({}) 的可执行文件,URI:{}。"; + public static final String FAILED_TO_CREATE_PIPEPLUGIN_ARG_BECAUSE_THIS_PLUGIN_IS_NOT_DESIGNED_FOR_ARG_MODEL = + + + "创建 PipePlugin({}) 失败:该插件不是为 {} model 设计的。"; + public static final String FAILED_TO_CREATE_FUNCTION_WHEN_TRY_TO_CREATE_PIPEPLUGIN_ARG_INSTANCE_FIRST = + + "尝试先创建 PipePlugin({}) 实例时,创建函数失败。"; + public static final String FAILED_TO_CREATE_PIPEPLUGIN_ARG_ARG_BECAUSE_ARG = + + "创建 PipePlugin {}({}) 失败,原因:{}"; + public static final String ARG_FAILED_TO_DROP_PIPE_PLUGIN_ARG = + + "[{}] 删除 pipe plugin {} 失败。"; + public static final String FAILED_TO_EXECUTE_ARG_ARG_IN_CONFIG_NODE_STATUS_IS_ARG = + + "在 config node 中执行 {} {} 失败,状态为 {}。"; + public static final String FAILED_TO_EXECUTE_ALTER_VIEW_ARG_BY_PIPE_STATUS_IS_ARG = + + "通过 pipe 执行 alter view {} 失败,状态为 {}。"; + public static final String THE_DATANODE_TO_BE_REMOVED_IS_NOT_IN_THE_CLUSTER_OR_THE_INPUT_FORMAT_IS_INCORRECT = + + "要移除的 DataNode 不在集群中,或输入格式不正确。"; + public static final String SUBMIT_REMOVE_DATANODE_REQUEST_SUCCESSFULLY_BUT_THE_PROCESS_MAY_FAIL = + + "remove-DataNode 请求已提交成功,但流程可能失败。 "; + public static final String MORE_DETAILS_ARE_SHOWN_IN_THE_LOGS_OF_CONFIGNODE_LEADER_AND_REMOVED_DATANODE = + + "更多详情见 ConfigNode-leader 和 removed-DataNode 的日志, "; + public static final String AND_AFTER_THE_PROCESS_OF_REMOVING_DATANODE_ENDS_SUCCESSFULLY = + + "remove DataNode 流程成功结束后, "; + public static final String YOU_ARE_SUPPOSED_TO_DELETE_DIRECTORY_AND_DATA_OF_THE_REMOVED_DATANODE_MANUALLY = + + "需要手动删除已移除 DataNode 的目录和数据"; + public static final String THE_CONFIGNODE_TO_BE_REMOVED_IS_NOT_IN_THE_CLUSTER_OR_THE_INPUT_FORMAT_IS_INCORRECT = + + "要移除的 ConfigNode 不在集群中,或输入格式不正确。"; + public static final String FAILED_TO_DROP_DATABASE_ARG_BECAUSE_IT_DOESN_T_EXIST = + + "DROP DATABASE {} 失败:数据库不存在。"; + public static final String FAILED_TO_ALLOCATE_ARG_BYTES_FROM_SHARED_MEMORYBLOCK_ARG_FOR_PREPAREDSTATEMENT_ARG = + + "无法从共享 MemoryBlock '{}' 为 PreparedStatement '{}' 分配 {} 字节"; + public static final String ALLOCATED_ARG_BYTES_FOR_PREPAREDSTATEMENT_ARG_FROM_SHARED_MEMORYBLOCK_ARG = + + "已从共享 MemoryBlock '{}' 为 PreparedStatement '{}' 分配 {} 字节。 "; + public static final String RELEASED_ARG_BYTES_FROM_SHARED_MEMORYBLOCK_ARG_FOR_PREPAREDSTATEMENT = + + "已从共享 MemoryBlock '{}' 为 PreparedStatement 释放 {} 字节。 "; + public static final String ATTEMPTED_TO_RELEASE_MEMORY_FROM_SHARED_MEMORYBLOCK_ARG_BUT_IT_IS_RELEASED = + + "尝试从共享 MemoryBlock '{}' 释放内存,但它已释放"; + public static final String RELEASED_ARG_PREPAREDSTATEMENT_S_ARG_BYTES_TOTAL_FOR_SESSION_ARG = + + "已为 session {} 释放 {} 个 PreparedStatement(共 {} 字节)"; + public static final String THE_PREFIX_OF_SOURCEKEY_IS_NOT_SOURCE_PLEASE_CHECK_THE_PARAMETERS_PASSED_IN_ARG = + + "sourceKey 前缀不是 'source.',请检查传入参数:{}"; + public static final String LOADTSFILESCHEDULER_REGION_MIGRATION_WAS_DETECTED_DURING_LOADING_TSFILE_ARG_WILL_CONVERT = + + + "LoadTsFileScheduler:加载 TsFile {} 期间检测到 Region 迁移,将转换为 insertion 以避免数据丢失。"; + public static final String LOAD_TSFILE_ARG_SUCCESSFULLY_LOAD_PROCESS_ARG_ARG = + "成功加载 TsFile {},加载进度 [{}/{}]"; + public static final String CAN_NOT_LOAD_TSFILE_ARG_LOAD_PROCESS_ARG_ARG = + + "无法加载 TsFile {},加载进度 [{}/{}]。"; + public static final String LOAD_TSFILE_S_FAILED_WILL_TRY_TO_CONVERT_TO_TABLETS_AND_INSERT_FAILED_TSFILES_ARG = + + "加载 TsFile 失败,将尝试转换为 tablet 并写入。失败的 TsFile:{}"; + public static final String DISPATCH_TSFILEDATA_ERROR_WHEN_PARSING_TSFILE_S = + + "解析 TsFile %s 时分发 TsFileData 出错。"; + public static final String PARSE_OR_SEND_TSFILE_S_ERROR = + + "解析或发送 TsFile %s 出错。"; + public static final String DISPATCH_ONE_PIECE_TO_REPLICASET_ARG_ERROR_RESULT_STATUS_CODE_ARG = + + "分发 TsFile 片段到 ReplicaSet {} 出错。结果状态码 {}。 "; + public static final String RESULT_STATUS_MESSAGE_ARG_DISPATCH_PIECE_NODE_ERROR_PERCENT_NARG = + + "结果状态消息 {}。分发片段节点出错:%n{}"; + public static final String SUB_STATUS_CODE_ARG_SUB_STATUS_MESSAGE_ARG = + + "子状态码 {}。子状态消息 {}。"; + public static final String WAIT_FOR_LOADING_S_TIME_OUT = + + "等待加载 %s 超时。"; + public static final String DISPATCH_LOAD_COMMAND_ARG_OF_TSFILE_ARG_ERROR_TO_REPLICASETS_ARG_ERROR = + + "分发加载命令 {}(TsFile {})到 replicaSets {} 时出错。 "; + public static final String RESULT_STATUS_CODE_ARG_RESULT_STATUS_MESSAGE_ARG = + + "结果状态码 {}。结果状态消息 {}。"; + public static final String DISPATCH_TSFILE_S_ERROR_TO_LOCAL_ERROR_RESULT_STATUS_CODE_S = + + "向本地分发 tsFile %s 时出错。结果状态码 %s。 "; + public static final String RESULT_STATUS_MESSAGE_S = + + "结果状态消息 %s。"; + public static final String LOAD_SUCCESSFULLY_CONVERTED_TSFILE_ARG_INTO_TABLETS_AND_INSERTED = + + "加载:已成功将 TsFile {} 转换为 tablet 并插入。"; + public static final String LOAD_FAILED_TO_CONVERT_TO_TABLETS_FROM_TSFILE_ARG_STATUS_ARG = + + "加载:无法从 TsFile {} 转换为 tablet。状态:{}"; + public static final String LOAD_FAILED_TO_CONVERT_TO_TABLETS_FROM_TSFILE_ARG_EXCEPTION_ARG = + + "加载:无法从 TsFile {} 转换为 tablet。异常:{}"; + public static final String DISPATCH_PIECE_NODE_ARG_OF_TSFILE_ARG_ERROR = + + "分发片段节点 {}(TsFile {})出错。"; + public static final String CANNOT_DISPATCH_LOADCOMMAND_FOR_LOAD_OPERATION_ARG = + + "无法为加载操作 {} 分发 LoadCommand"; + public static final String LOAD_REMOTE_PROCEDURE_CALL_CONNECTION_TIMEOUT_IS_ADJUSTED_TO_ARG_MS_ARG_MINS = + + "加载远程过程调用连接超时已调整为 {} ms({} mins)"; + public static final String DATA_TYPE_OF_ARG_ARG_IS_NOT_CONSISTENT = + + "{}.{} 的数据类型不一致, "; + public static final String REGISTERED_TYPE_ARG_INSERTING_TIMESTAMP_ARG_VALUE_ARG = + + "已注册类型 {},正在插入时间戳 {},值 {}"; + public static final String TIMES_ARRAY_IS_NULL_OR_TOO_SMALL_TIMES_LENGTH_ARG_ROWSIZE_ARG_DEVICEID_ARG = + + "Times 数组为 null 或过小。times.length={},rowSize={},deviceId={}"; + public static final String SERIALIZE_DATA_OF_TSFILE_S_ERROR_SKIP_TSFILEDATA_S = + + "序列化 TsFile %s 的数据出错,跳过 TsFileData %s。"; + public static final String FAIL_TO_MATERIALIZE_CTE_BECAUSE_THE_DATA_SIZE_EXCEEDED_MEMORY_OR_THE_ROW_COUNT_THRESHOLD = + + "物化 CTE 失败:数据大小超过内存限制或行数阈值。"; + public static final String UNEXPECTED_FAILURE_WHEN_HANDLING_PARSING_ERROR_THIS_IS_LIKELY_A_BUG_IN_THE = + + "处理解析错误时出现意外失败,这很可能是实现缺陷。"; + public static final String AND_EXPRESSION_ENCOUNTERED_DURING_TAG_DETERMINED_CHECKING_WILL_BE_CLASSIFIED_INTO_FUZZY = + + "tag-determined 检查期间遇到 AND表达式,将归类为模糊表达式。Sql:{}"; + public static final String LOGICAL_EXPRESSION_TYPE_ENCOUNTERED_IN_NOT_EXPRESSION_CHILD_DURING_TAG_DETERMINED = + + "tag-determined 检查期间在 NOT表达式子节点中遇到逻辑表达式类型,将归类为模糊表达式。Sql:{}"; + public static final String VALIDATING_DEVICE_SCHEMA_ARG_ARG_AND_OTHER_ARG_DEVICES = + + "正在校验设备元数据 {}.{} 和其他 {} 个设备"; + public static final String ILLEGAL_TABLEID_ARG_FOUND_IN_CACHE_WHEN_INVALIDATING_BY_PATH_ARG_INVALIDATE_IT_ANYWAY = + "发现非法 tableID {},按路径 {} 失效 cache 时仍将使其失效"; + public static final String ILLEGAL_DEVICEID_ARG_FOUND_IN_CACHE_WHEN_INVALIDATING_BY_PATH_ARG_INVALIDATE_IT_ANYWAY = + "发现非法 deviceID {},按路径 {} 失效 cache 时仍将使其失效"; + public static final String RULE_S_BEFORE_S_AFTER_S = + + "规则:%s\n之前:\n%s\n之后:\n%s"; + private DataNodeQueryMessages() {} + // --------------------------------------------------------------------------- + // 补充异常消息 + // --------------------------------------------------------------------------- + public static final String QUERY_EXCEPTION_FAILED_TO_SERIALIZE_INTERMEDIATE_RESULT_FOR_MAXBYACCUMULATOR_2F18B6E7 = + + "无法序列化 MaxByAccumulator 的中间结果。"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_IN_AGGREGATION_AVG_S_D1DAD6A6 = + + + "聚合 AVG 不支持数据类型:%s"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_IN_MINVALUE_S_BC092694 = + + "MinValue 不支持数据类型:%s"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_IN_LASTVALUE_S_02ECF8E4 = + + "LastValue 不支持数据类型:%s"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_IN_EXTREME_S_84B651D3 = + + "Extreme 不支持数据类型:%s"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_IN_FIRSTVALUE_S_97025F25 = + + "FirstValue 不支持数据类型:%s"; + public static final String QUERY_EXCEPTION_ERROR_OCCURRED_DURING_EXECUTING_UDAF_S_S_PLEASE_CHECK_WHETHER_9E9D20C6 = + + "执行 UDAF#%s 时出错:%s,请根据 udf-api 描述检查 UDF 实现是否正确。"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_EXPRESSION_TYPE_S_FD6F5B7C = + + "不支持的表达式类型:%s"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_IN_MAXVALUE_S_521AC345 = + + "MaxValue 不支持数据类型:%s"; + public static final String QUERY_EXCEPTION_THERE_IS_NOT_ENOUGH_CPU_TO_EXECUTE_CURRENT_FRAGMENT_INSTANCE_E7719FB8 = + + "没有足够 CPU 执行当前 fragment instance。"; + public static final String QUERY_EXCEPTION_THERE_IS_NO_ENOUGH_MEMORY_TO_EXECUTE_CURRENT_FRAGMENT_INSTANCE_CB632843 = + + "没有足够内存执行当前 fragment instance。"; + public static final String QUERY_EXCEPTION_PLANNODE_RELATED_MEMORY_IS_NOT_ZERO_WHEN_TRYING_TO_DEREGISTER_E01109C5 = + + + "尝试从查询内存池注销 FI 时,PlanNode 相关内存不为 0。QueryId 为:%s,FragmentInstanceId 为:%s,非零 PlanNode 相关内存为:%s。"; + public static final String QUERY_EXCEPTION_QUERY_IS_ABORTED_SINCE_IT_REQUESTS_MORE_MEMORY_THAN_CAN_D77C2921 = + + + "查询已中止,因为其请求的内存超过可分配上限,bytesToReserve:%sB,maxBytesCanReserve:%sB"; + public static final String QUERY_EXCEPTION_RELATEDMEMORYRESERVED_CAN_T_BE_NULL_WHEN_FREEING_MEMORY_C80009F2 = + "释放内存时 RelatedMemoryReserved 不能为 null"; + public static final String QUERY_EXCEPTION_INTERRUPTED_BY_92FAED2D = + "被中断,原因:"; + public static final String QUERY_EXCEPTION_DRIVER_WAS_INTERRUPTED_737358E4 = + + "Driver 已中断"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_QUERY_DATA_SOURCE_TYPE_S_7424E63F = + + "不支持的查询数据源类型:%s"; + public static final String QUERY_EXCEPTION_REPEATED_RPC_CALL_DETECTED_FOR_FRAGMENTINSTANCE_S_REJECT_BF609A26 = + + "检测到 FragmentInstance %s 的重复 RPC 调用,拒绝重复分发。"; + public static final String QUERY_EXCEPTION_QUERY_HAS_EXECUTED_MORE_THAN_SMS_AND_NOW_IS_IN_FLUSHING_4BF7535B = + + "查询已执行超过 %sms,目前处于 flushing 状态"; + public static final String QUERY_EXCEPTION_THE_QUERYCONTEXT_DOES_NOT_SUPPORT_ROW_LEVEL_FILTERING_D4CD0678 = + + "QueryContext 不支持行级过滤"; + public static final String QUERY_EXCEPTION_S_IS_NOT_VIEW_B5840A3C = + "%s 不是视图。"; + public static final String QUERY_EXCEPTION_THE_TIMESERIES_S_USED_NEW_TYPE_S_IS_NOT_COMPATIBLE_WITH_455D4D4A = + + "时间序列 %s 使用的新类型 %s 与现有类型 %s 不兼容。"; + public static final String QUERY_EXCEPTION_ALL_CACHED_PAGES_SHOULD_BE_CONSUMED_FIRST_UNSEQPAGEREADERS_55898EFB = + + "应先消费所有缓存页,unSeqPageReaders.isEmpty() 为 %s,firstPageReader != null 为 %s,mergeReader.hasNextTimeValuePair() = %s"; + public static final String QUERY_EXCEPTION_NOT_SUPPORT_THIS_TYPE_OF_AGGREGATION_WINDOW_S_604F93D0 = + + "不支持此类聚合窗口:%s"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_IN_EQUAL_EVENT_AGGREGATION_S_5076ACFE = + + + "equal event aggregation 不支持数据类型:%s"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_IN_VARIATION_EVENT_AGGREGATION_S_47341532 = + + + "variation event aggregation 不支持数据类型:%s"; + public static final String QUERY_EXCEPTION_THE_OPERATOR_CANNOT_CONTINUE_UNTIL_THE_LAST_WRITE_OPERATION_1F241343 = + + "上一次写操作完成前,operator 不能继续。"; + public static final String QUERY_EXCEPTION_DATA_TYPE_S_IS_NOT_SUPPORTED_5D5C02E4 = + + "不支持数据类型 %s。"; + public static final String QUERY_EXCEPTION_DATA_TYPE_S_IS_NOT_SUPPORTED_WHEN_CONVERT_DATA_AT_CLIENT_405429CC = + + "客户端转换数据时不支持数据类型 %s"; + public static final String QUERY_EXCEPTION_CHILD_SIZE_OF_INNERTIMEJOINOPERATOR_SHOULD_BE_LARGER_THAN_4E7CF105 = + + "InnerTimeJoinOperator 的子节点数量应大于 1。"; + public static final String QUERY_EXCEPTION_THE_OPERATOR_CANNOT_CONTINUE_UNTIL_THE_FORECAST_EXECUTION_AF8A3145 = + + "forecast 执行完成前,operator 不能继续。"; + public static final String QUERY_EXCEPTION_RESULT_TYPE_MISMATCH_FOR_ATTRIBUTE_S_EXPECTED_S_ACTUAL_S_E5637B91 = + + "属性 '%s' 的结果类型不匹配,期望 %s,实际 %s"; + public static final String QUERY_EXCEPTION_DEVICE_ENTRIES_OF_INDEX_S_IS_EMPTY_BCFB0644 = + + "索引 %s 的设备条目为空。"; + public static final String QUERY_EXCEPTION_SHOULD_NOT_CALL_GETRESULTDATATYPES_METHOD_IN_DEVICEITERATORSCANOPERATOR_E915A153 = + + "不应在 DeviceIteratorScanOperator 中调用 getResultDataTypes() 方法"; + public static final String QUERY_EXCEPTION_UNEXPECTED_COLUMN_CATEGORY_S_6E60A44E = + + "意外的列类别:%s"; + public static final String QUERY_EXCEPTION_DEVICE_ENTRIES_OF_INDEX_S_IN_TABLESCANOPERATOR_IS_EMPTY_FDEB574F = + + "TableScanOperator 中索引 %s 的设备条目为空。"; + public static final String QUERY_EXCEPTION_MULTILEVELPRIORITYQUEUE_DOES_NOT_SUPPORT_ACCESS_ELEMENT_02FE5AC9 = + + "MultilevelPriorityQueue 不支持随机访问元素。"; + public static final String QUERY_EXCEPTION_ASCENDING_IS_NOT_SUPPORTED_WHEN_SLIDING_STEP_CONTAINS_MONTH_3446C0DC = + + "sliding step 包含月份时不支持升序。"; + public static final String QUERY_EXCEPTION_THIS_OPERATION_IS_NOT_SUPPORTED_IN_SCHEMAMEASUREMENTNODE_93A81AE3 = + + "SchemaMeasurementNode 不支持此操作。"; + public static final String QUERY_EXCEPTION_REMOVE_CHILD_OPERATION_IS_NOT_SUPPORTED_IN_SCHEMAMEASUREMENTNODE_940D080F = + "SchemaMeasurementNode 不支持 removeChild 操作。"; + public static final String QUERY_EXCEPTION_DO_NOT_SUPPORT_CREATE_COLUMNBUILDER_WITH_DATA_TYPE_S_1672578A = + "不支持使用数据类型 %s 创建 ColumnBuilder"; + public static final String QUERY_EXCEPTION_INVALID_CONSTANT_OPERAND_S_939F3B8D = + "无效的 constant operand:%s"; + public static final String QUERY_EXCEPTION_THE_DATA_TYPE_OF_THE_STATE_WINDOW_STRATEGY_IS_NOT_VALID_DFFBF210 = + + "state window strategy 的数据类型无效。"; + public static final String QUERY_EXCEPTION_STATEWINDOWACCESSSTRATEGY_DOES_NOT_SUPPORT_PURE_CONSTANT_B09D811B = + + "StateWindowAccessStrategy 不支持纯常量输入。"; + public static final String QUERY_EXCEPTION_UNEXPECTED_ACCESS_STRATEGY_S_92EA9D64 = + "意外的访问策略:%s"; + public static final String QUERY_EXCEPTION_STATEWINDOWACCESSSTRATEGY_ONLY_SUPPORT_ONE_INPUT_SERIES_6856E52C = + + "StateWindowAccessStrategy 目前仅支持一个输入序列。"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_SOURCE_DATATYPE_S_EA03E121 = + + "不支持的源 dataType:%s"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_TARGET_DATATYPE_S_8DEFDAE6 = + + "不支持的目标 dataType:%s"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_STATEMENT_TYPE_S_FBCA7305 = + + "不支持的语句类型:%s"; + public static final String QUERY_EXCEPTION_IDENTITYSINKNODE_SHOULD_ONLY_HAVE_ONE_CHILD_IN_TABLE_MODEL_5E995EB3 = + + "表模型中 IdentitySinkNode 只能有一个子节点。"; + public static final String QUERY_EXCEPTION_TREE_DB_NAME_SHOULD_AT_LEAST_BE_TWO_LEVEL_S_772B6832 = + + "树模型数据库名称至少应有两级:%s"; + public static final String QUERY_EXCEPTION_PUSHDOWNOFFSET_SHOULD_NOT_BE_SET_WHEN_ISPUSHLIMITTOEACHDEVICE_9B6D5144 = + + "isPushLimitToEachDevice 为 true 时不应设置 PushDownOffset。"; + public static final String QUERY_EXCEPTION_DEVICE_ENTRIES_OF_INDEX_S_IN_S_IS_EMPTY_68D1DB60 = + + "索引 %s 在 %s 中的设备条目为空。"; + public static final String QUERY_EXCEPTION_THE_AGGREGATIONTREEDEVICEVIEWSCANNODE_SHOULD_HAS_BEEN_TRANSFERRED_76A35037 = + + "AggregationTreeDeviceViewScanNode 应已转换为其子类节点"; + public static final String QUERY_EXCEPTION_GROUPING_KEY_MUST_BE_ID_OR_ATTRIBUTE_IN_AGGREGATIONTABLESCAN_7B592AE6 = + + "AggregationTableScan 中的 grouping key 必须为 ID 或 Attribute"; + public static final String QUERY_EXCEPTION_CANNOT_FIND_COLUMN_S_IN_CHILD_S_OUTPUT_10FBE4C8 = + + "无法在子节点输出中找到列 [%s]。"; + public static final String QUERY_EXCEPTION_DESCRIPTOR_S_INPUT_EXPRESSION_MUST_BE_TIMESERIESOPERAND_F4F66475 = + + "descriptor 的输入表达式必须是 TimeSeriesOperand/TimestampOperand,当前为 %s。"; + public static final String QUERY_EXCEPTION_AGGREGATIONMERGESORTNODE_WITHOUT_ORDER_BY_DEVICE_SHOULD_7AED85D1 = + + "不应在此处出现没有 ORDER BY DEVICE 的 AggregationMergeSortNode"; + public static final String QUERY_EXCEPTION_UNEXPECTED_PLANNODE_IN_GETOUTPUTCOLUMNTYPESOFTIMEJOINNODE_00FAAEED = + + "getOutputColumnTypesOfTimeJoinNode 中出现意外 PlanNode,类型:%s"; + public static final String QUERY_EXCEPTION_THE_SIZE_OF_MEASUREMENTLIST_AND_TIMESERIESSCHEMAINFOLIST_A6649661 = + + "对齐路径中 measurementList 和 timeseriesSchemaInfoList 的大小应相等。"; + public static final String QUERY_EXCEPTION_THE_PLANNODE_IS_NULL_DURING_LOCAL_EXECUTION_MAYBE_CAUSED_C5B942CA = + "local execution 期间 planNode 为 null,可能是当前 DataNode 关闭导致"; + public static final String QUERY_EXCEPTION_THERE_IS_NOT_ENOUGH_MEMORY_TO_EXECUTE_CURRENT_FRAGMENT_INSTANCE_6071A581 = + + "没有足够内存执行当前 fragment instance,当前剩余空闲内存为 %dB,当前 fragment instance 预计内存使用量为 %dB。"; + public static final String QUERY_EXCEPTION_BYTES_TO_RESERVE_FROM_FREE_MEMORY_FOR_OPERATORS_SHOULD_BE_4DC404D5 = + + "为 operator 从空闲内存预留的字节数必须大于 0。"; + public static final String QUERY_EXCEPTION_THERE_IS_NOT_ENOUGH_MEMORY_FOR_QUERY_S_THE_CONTEXTHOLDER_546CDD02 = + + "Query %s 内存不足,contextHolder 为 %s,当前剩余空闲内存为 %dB,该 context 已预留总内存为 %dB,本次请求内存为 %dB。"; + public static final String QUERY_EXCEPTION_BYTES_TO_RELEASE_TO_FREE_MEMORY_FOR_OPERATORS_SHOULD_BE_3E5B0CB1 = + + "为 operator 释放到空闲内存的字节数必须大于 0。"; + public static final String QUERY_EXCEPTION_INVALID_AGGREGATION_EXPRESSION_S_B28EB91B = + + "无效的聚合表达式:%s"; + public static final String QUERY_EXCEPTION_ILLEGAL_DEVICE_PATH_S_IN_AGGREGATIONPUSHDOWN_RULE_60D5F633 = + + "AggregationPushDown rule 中存在非法设备路径:%s。"; + public static final String QUERY_EXCEPTION_AGGREGATION_DESCRIPTORS_WITH_NON_ALIGNED_TEMPLATE_ARE_NOT_6D3C7C0F = + + "不支持带有非对齐模板的聚合描述符"; + public static final String QUERY_EXCEPTION_FRAGMENTINSTANCE_S_IS_FAILED_S_MAY_BE_CAUSED_BY_DN_RESTARTING_45D7D52A = + + "FragmentInstance[%s] 失败。%s,可能由 DN 重启导致。"; + public static final String QUERY_EXCEPTION_FRAGMENTINSTANCE_S_IS_FAILED_S_566B0005 = + + "FragmentInstance[%s] 失败。%s"; + public static final String QUERY_EXCEPTION_LINE_S_S_S_7CA5F0E1 = + "行 %s:%s %s"; + public static final String QUERY_EXCEPTION_MISSING_OR_INVALID_COLUMN_CATEGORIES_FOR_TABLE_INSERTION_5DF990B9 = + + "表插入缺少列类别或列类别无效"; + public static final String QUERY_EXCEPTION_THE_NAME_OF_A_MEASUREMENT_IN_SCHEMA_TEMPLATE_SHALL_NOT_BE_937264BD = + + "schema template 中的测点名称不得为 null。"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_COLUMNCATEGORY_S_1260CFFD = + "不支持的 ColumnCategory:%s"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_RAWEXPRESSION_TYPE_S_CDBBD685 = + + "不支持的 rawExpression 类型:%s"; + public static final String QUERY_EXCEPTION_AN_ERROR_OCCURRED_WHEN_EXECUTING_GETSCHEMAPARTITION_S_A0156043 = + + "执行 getSchemaPartition() 时发生错误:%s"; + public static final String QUERY_EXCEPTION_AN_ERROR_OCCURRED_WHEN_EXECUTING_GETORCREATESCHEMAPARTITION_4D22BE9B = + + "执行 getOrCreateSchemaPartition() 时发生错误:%s"; + public static final String QUERY_EXCEPTION_AN_ERROR_OCCURRED_WHEN_EXECUTING_GETSCHEMANODEMANAGEMENTPARTITION_84AC8509 = + + "执行 getSchemaNodeManagementPartition() 时发生错误:%s"; + public static final String QUERY_EXCEPTION_AN_ERROR_OCCURRED_WHEN_EXECUTING_GETDATAPARTITION_S_D21A0011 = + + "执行 getDataPartition() 时发生错误:%s"; + public static final String QUERY_EXCEPTION_AN_ERROR_OCCURRED_WHEN_EXECUTING_GETORCREATEDATAPARTITION_2EB2EBBE = + + "执行 getOrCreateDataPartition() 时发生错误:%s"; + public static final String QUERY_EXCEPTION_THE_TYPE_OF_INPUT_EXPRESSION_S_IS_UNKNOWN_841AC714 = + + "输入表达式 %s 的类型未知"; + public static final String QUERY_EXCEPTION_MEET_ERROR_WHEN_ANALYZING_THE_QUERY_STATEMENT_S_AD732908 = + + "分析查询语句时遇到错误:%s"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_EXPRESSION_TYPE_FOR_SOURCE_EXPRESSION_S_FB5583E7 = + + "源表达式不支持的表达式类型:%s"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_EXPRESSION_TYPE_S_737846D6 = + "不支持的 Expression Type:%s"; + public static final String QUERY_EXCEPTION_UNKNOWN_EXPRESSION_TYPE_S_PERHAPS_IT_HAS_NON_EXISTENT_MEASUREMENT_B6705F86 = + + "未知表达式类型:%s,可能存在不存在的测点。"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_EXPRESSION_TYPE_IN_TRANSFORMTOVIEWEXPRESSIONVISITOR_0871FB56 = + + "TransformToViewExpressionVisitor 中不支持的表达式类型:%s"; + public static final String QUERY_EXCEPTION_CAN_NOT_CONSTRUCT_EXPRESSION_USING_NON_VIEW_PATH_IN_TRANSFORMVIEWPATH_A9CCB5B1 = + + + "无法在 transformViewPath 中使用非视图路径构造表达式!"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_EXPRESSION_TYPE_S_7C6F99A9 = + + "不支持的表达式类型 %s"; + public static final String QUERY_EXCEPTION_S_CANNOT_BE_CAST_TO_S_DABC2DA0 = + + "\"%s\" 无法转换为 [%s]"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_S_4CB21D47 = "不支持的数据类型 %s"; + public static final String QUERY_EXCEPTION_MEASUREMENT_S_DOES_NOT_EXIST_23D2B5BE = + "Measurement %s 不存在"; + public static final String QUERY_EXCEPTION_INVALID_SCALAR_FUNCTION_S_4DC1ED95 = + + "无效的标量函数 [%s]。"; + public static final String QUERY_EXCEPTION_FETCH_SCHEMA_FAILED_BECAUSE_S_BE584DCE = + + "获取 Schema 失败,原因:%s"; + public static final String QUERY_EXCEPTION_FETCH_SCHEMA_FAILED_S_1C7B0050 = + + "获取 Schema 失败:%s"; + public static final String QUERY_EXCEPTION_FAILED_TO_VALIDATE_SCHEMA_FOR_TABLE_S_S_D7031B7B = + "无法校验表 {%s, %s} 的 schema"; + public static final String QUERY_EXCEPTION_THE_DATABASE_S_DOES_NOT_EXIST_PLEASE_ENABLE_ENABLE_AUTO_B6683D0E = + + "数据库 %s 不存在,请启用 'enable_auto_create_schema' 以允许自动创建。"; + public static final String QUERY_EXCEPTION_AUTO_CREATE_DATABASE_FAILED_S_STATUS_CODE_S_D8EB60FA = + + "自动创建数据库失败:%s,状态码:%s"; + public static final String QUERY_EXCEPTION_TAG_COLUMN_S_IN_TSFILE_IS_NOT_FOUND_IN_IOTDB_TABLE_S_12E8C1EF = + + "TsFile 中的 tag 列 %s 在 IoTDB 表 %s 中未找到。"; + public static final String QUERY_EXCEPTION_DUPLICATED_MEASUREMENTS_S_IN_DEVICE_S_438713CD = + + "设备 %s 中存在重复测点 %s。"; + public static final String QUERY_EXCEPTION_DATABASE_LEVEL_D_IS_LONGER_THAN_DEVICE_S_9B34DD2F = + + + "数据库级别 %d 长于设备 %s。"; + public static final String QUERY_EXCEPTION_CREATE_DATABASE_ERROR_STATEMENT_S_RESULT_STATUS_IS_S_5C4AFD58 = + + + "创建数据库错误,statement:%s,结果状态为:%s"; + public static final String QUERY_EXCEPTION_DEVICE_S_DOES_NOT_EXIST_IN_IOTDB_AND_CAN_NOT_BE_CREATED_5171DE45 = + + + "设备 %s 在 IoTDB 中不存在且无法创建。请检查是否已启用 auto-create-schema。"; + public static final String QUERY_EXCEPTION_DEVICE_S_IN_TSFILE_IS_S_BUT_IN_IOTDB_IS_S_350D5903 = + + "TsFile 中设备 %s 为 %s,但 IoTDB 中为 %s。"; + public static final String QUERY_EXCEPTION_MEASUREMENT_S_DOES_NOT_EXIST_IN_IOTDB_AND_CAN_NOT_BE_CREATED_B1F446A5 = + + + "测点 %s 在 IoTDB 中不存在且无法创建。请检查是否已启用 auto-create-schema。"; + public static final String QUERY_EXCEPTION_AN_ERROR_OCCURRED_WHEN_EXECUTING_GETDEVICETODATABASE_S_CCA611CC = + "执行 getDeviceToDatabase() 时发生错误:%s"; + public static final String QUERY_EXCEPTION_FAILED_TO_GET_REPLICASET_OF_CONSENSUS_GROUPS_IDS_S_CC30C7A6 = + + "无法获取 consensus group 的 replicaSet[ids= %s]。"; + public static final String QUERY_EXCEPTION_AN_ERROR_OCCURRED_WHEN_EXECUTING_GETREGIONREPLICASET_S_370D5526 = + + "执行 getRegionReplicaSet() 时发生错误:%s"; + public static final String QUERY_EXCEPTION_SUBSCRIPTION_IS_NOT_ENABLED_7F43DCBB = + + "Subscription 未启用。"; + public static final String QUERY_EXCEPTION_FAILED_TO_CREATE_UDF_S_THE_GIVEN_FUNCTION_NAME_CONFLICTS_6FBB1136 = + "无法创建 UDF [%s],给定函数名与内置函数名冲突。"; + public static final String QUERY_EXCEPTION_THE_SCHEME_OF_URI_IS_NOT_SET_PLEASE_SPECIFY_THE_SCHEME_OF_225DFB9E = + + "URI scheme 未设置,请指定 URI scheme。"; + public static final String QUERY_EXCEPTION_FAILED_TO_GET_EXECUTABLE_FOR_UDF_S_PLEASE_CHECK_THE_URI_F4D87A1E = + + "无法获取 UDF '%s' 的可执行文件,请检查 URI。"; + public static final String QUERY_EXCEPTION_FAILED_TO_CREATE_FUNCTION_S_BECAUSE_THERE_IS_DUPLICATE_ARGUMENT_7905BC09 = + + "无法创建函数 '%s':存在重复的参数名 '%s'。"; + public static final String QUERY_EXCEPTION_FAILED_TO_CREATE_FUNCTION_S_BECAUSE_THERE_IS_AN_ARGUMENT_E7A0B1D6 = + + "无法创建函数 '%s':存在 OBJECT 类型参数 '%s'。"; + public static final String QUERY_EXCEPTION_FAILED_TO_LOAD_CLASS_S_BECAUSE_IT_S_NOT_FOUND_IN_JAR_FILE_E467D08D = + "无法加载 class '%s',原因:jar 文件中未找到该 class 或其无效:%s"; + public static final String QUERY_EXCEPTION_BUILT_IN_FUNCTION_S_CAN_NOT_BE_DEREGISTERED_1CC7D3C3 = + + "内置函数 %s 不能注销。"; + public static final String QUERY_EXCEPTION_FAILED_TO_GET_EXECUTABLE_FOR_TRIGGER_S_PLEASE_CHECK_THE_DA49134A = + + "无法获取 Trigger '%s' 的可执行文件,请检查 URI。"; + public static final String QUERY_EXCEPTION_FAILED_TO_CREATE_PIPE_PLUGIN_BECAUSE_THE_URI_IS_EMPTY_7FCB6EF4 = + + "无法创建 pipe plugin:URI 为空。"; + public static final String QUERY_EXCEPTION_FAILED_TO_GET_EXECUTABLE_FOR_PIPEPLUGIN_S_PLEASE_CHECK_THE_FAC5DCB7 = + + "无法获取 PipePlugin %s 的可执行文件,请检查 URI。"; + public static final String QUERY_EXCEPTION_FAILED_TO_CREATE_PIPEPLUGIN_S_BECAUSE_THIS_PLUGIN_IS_NOT_F5A284B4 = + "无法创建 PipePlugin '%s',原因:该插件不是为 %s 模型设计的。"; + public static final String QUERY_EXCEPTION_NOT_ALL_SG_IS_READY_9F51CF3E = + "并非所有 sg 都已就绪"; + public static final String QUERY_EXCEPTION_CANNOT_START_REPAIR_TASK_BECAUSE_COMPACTION_IS_NOT_ENABLED_975C8DCD = + + "无法启动 repair task:compaction 未启用。"; + public static final String QUERY_EXCEPTION_PLEASE_ENSURE_YOUR_INPUT_QUERYID_IS_CORRECT_D86C841E = + + "请确保输入的 正确"; + public static final String QUERY_EXCEPTION_DUPLICATED_MEASUREMENT_S_IN_DEVICE_TEMPLATE_ALTER_REQUEST_963FE4A6 = + + "device template alter 请求中 measurement [%s] 重复。"; + public static final String QUERY_EXCEPTION_FAILED_TO_CREATE_PIPE_S_BECAUSE_TSFILE_IS_CONFIGURED_WITH_2F8CD704 = + "无法创建 Pipe %s,原因:TsFile 配置了加密,禁止使用 Pipe"; + public static final String QUERY_EXCEPTION_FAILED_TO_CREATE_PIPE_S_PIPE_NAME_STARTING_WITH_S_ARE_NOT_201FE8C3 = + "无法创建 pipe %s,不允许创建以 \"%s\" 开头的 pipe。"; + public static final String QUERY_EXCEPTION_FAILED_TO_ALTER_PIPE_S_PIPE_NAME_STARTING_WITH_S_ARE_NOT_03D99ECF = + "无法修改 pipe %s,不允许修改以 \"%s\" 开头的 pipe。"; + public static final String QUERY_EXCEPTION_FAILED_TO_GET_PIPE_INFO_FROM_CONFIG_NODE_STATUS_IS_S_FE797D7B = + + "无法从 config node 获取 pipe info,状态为 %s。"; + public static final String QUERY_EXCEPTION_FAILED_TO_ALTER_PIPE_S_PIPE_NOT_FOUND_IN_SYSTEM_63B5D3CC = + + "修改 pipe %s 失败:系统中未找到该 pipe。"; + public static final String QUERY_EXCEPTION_FAILED_TO_ALTER_PIPE_S_BECAUSE_S_A1823289 = + "无法修改 pipe %s, 原因:%s"; + public static final String QUERY_EXCEPTION_FAILED_TO_START_PIPE_S_PIPE_NAME_STARTING_WITH_S_ARE_NOT_F16D488F = + "无法启动 pipe %s,不允许启动名称以 \"%s\" 开头的 pipe。"; + public static final String QUERY_EXCEPTION_FAILED_TO_DROP_PIPE_S_PIPE_NAME_STARTING_WITH_S_ARE_NOT_840E238B = + "无法删除 pipe %s,不允许删除以 \"%s\" 开头的 pipe。"; + public static final String QUERY_EXCEPTION_FAILED_TO_STOP_PIPE_S_PIPE_NAME_STARTING_WITH_S_ARE_NOT_C78DFC3D = + "无法停止 pipe %s,不允许停止名称以 \"%s\" 开头的 pipe。"; + public static final String QUERY_EXCEPTION_UNKNOWN_DATABASE_S_5AB61128 = "未知的数据库 %s"; + public static final String QUERY_EXCEPTION_DATABASE_S_DOESN_T_EXIST_5A8EE8CA = + + "数据库 %s 不存在。"; + public static final String QUERY_EXCEPTION_DATABASE_S_ALREADY_EXISTS_D8BE5332 = "数据库 %s 已存在"; + public static final String QUERY_EXCEPTION_DATA_TYPE_CANNOT_BE_NULL_EXECUTING_THE_STATEMENT_THAT_ALTER_4C959B2F = + + "执行修改时间序列 %s 数据类型的语句时,数据类型不能为 null"; + public static final String QUERY_EXCEPTION_NO_CURRENT_SESSION_AVAILABLE_FOR_PREPARE_STATEMENT_36717E9B = + + "没有可用于 PREPARE 语句的当前 session。"; + public static final String QUERY_EXCEPTION_NO_CURRENT_SESSION_AVAILABLE_FOR_DEALLOCATE_STATEMENT_1EA5DE79 = + + "没有可用于 DEALLOCATE 语句的当前 session。"; + public static final String QUERY_EXCEPTION_TSFILE_S_IS_LOADING_BY_ANOTHER_SCHEDULER_55077B82 = + + "TsFile %s 正在由另一个 scheduler 加载。"; + public static final String QUERY_EXCEPTION_SERIALIZE_PROGRESS_INDEX_ERROR_ISFIRSTPHASESUCCESS_S_UUID_690F0419 = + "序列化 Progress Index 出错,isFirstPhaseSuccess:%s,uuid:%s,TsFile:%s"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_TSFILEDATATYPE_S_374475FA = + "不支持的 TsFileDataType %s。"; + public static final String QUERY_EXCEPTION_UNKNOWN_SORT_KEY_S_37965711 = "未知 sort key %s"; + public static final String QUERY_EXCEPTION_CAN_NOT_FIND_S_ON_THIS_MACHINE_NOTICE_THAT_LOAD_CAN_ONLY_B7886C0E = + "无法在本机找到 %s。注意,load 只能处理本机文件。"; + public static final String QUERY_EXCEPTION_LOAD_TSFILE_SOURCE_PATH_S_IS_OUTSIDE_ALLOWED_DIRECTORIES_85A6019F = + + "加载 TsFile 的源路径 %s 位于允许目录 %s 之外。"; + public static final String QUERY_EXCEPTION_FAILED_TO_RESOLVE_CANONICAL_PATH_FOR_LOAD_TSFILE_SOURCE_09CC9AC6 = + "无法解析 load TsFile source %s 的 canonical path:%s"; + public static final String QUERY_EXCEPTION_DATA_TYPE_IS_NOT_CONSISTENT_INPUT_S_REGISTERED_S_AE9DBDC0 = + + "数据类型不一致,输入 %s,已注册 %s"; + public static final String QUERY_EXCEPTION_REGIONREPLICASET_IS_INVALID_S_1C2671AD = + + "regionReplicaSet 无效:%s"; + public static final String QUERY_EXCEPTION_PLANNODE_SHOULD_BE_IWRITEPLANNODE_IN_WRITE_OPERATION_S_36501D8A = + + "写操作中的 PlanNode 应为 IWritePlanNode:%s"; + public static final String QUERY_EXCEPTION_SIZE_OF_DEVICES_AND_ITS_CHILDREN_IN_DEVICEVIEWNODE_SHOULD_10709A84 = + + "DeviceViewNode 中 devices 及其 children 的大小应一致"; + public static final String QUERY_EXCEPTION_IN_NON_CROSS_DATA_REGION_DEVICE_VIEW_SITUATION_EACH_DEVICE_3A76445B = + + "在非跨 data region 的 device-view 场景中,每个设备应只有一个 data partition。"; + public static final String QUERY_EXCEPTION_IN_NON_CROSS_DATA_REGION_AGGREGATION_DEVICE_VIEW_SITUATION_557AE5D2 = + + "在非跨 data region 的 aggregation device-view 场景下,DeviceView 的每个重写子节点都只能有一个。"; + public static final String QUERY_EXCEPTION_ALL_CHILD_NODES_OF_INNERTIMEJOINNODE_SHOULD_BE_SERIESSOURCENODE_B92B181D = + + "InnerTimeJoinNode 的所有子节点都应为 SeriesSourceNode"; + public static final String QUERY_EXCEPTION_YOU_SHOULD_NEVER_SEE_CONTINUOUSSAMESEARCHINDEXSEPARATORNODE_F380A4B6 = + + "不应在该函数中看到 ContinuousSameSearchIndexSeparatorNode,因为 ContinuousSameSearchIndexSeparatorNode 不应用于网络传输。"; + public static final String QUERY_EXCEPTION_AGGREGATIONTREEDEVICEVIEWSCANNODE_SHOULD_NOT_BE_DESERIALIZED_11788F1B = + + "AggregationTreeDeviceViewScanNode 不应被反序列化"; + public static final String QUERY_EXCEPTION_CONTINUOUSSAMESEARCHINDEXSEPARATORNODE_NOT_SUPPORT_MERGE_FD194976 = + + "ContinuousSameSearchIndexSeparatorNode 不支持 merge"; + public static final String QUERY_EXCEPTION_DELETEDATANODES_WHICH_START_TIME_OR_END_TIME_ARE_NOT_SAME_F396951C = + + "开始时间或结束时间不同的 DeleteDataNodes 不能合并"; + public static final String QUERY_EXCEPTION_NO_CHILD_IS_ALLOWED_FOR_ALIGNEDSERIESAGGREGATIONSCANNODE_41654FE2 = + + "AlignedSeriesAggregationScanNode 不允许有子节点"; + public static final String QUERY_EXCEPTION_DEVICES_IN_TSFILE_S_IS_EMPTY_THIS_SHOULD_NOT_HAPPEN_HERE_BC1BE63C = + + "TsFile %s 中的设备为空,这里不应发生该情况。"; + public static final String QUERY_EXCEPTION_DEVICEMERGENODE_SHOULD_HAVE_ONLY_ONE_LOCAL_CHILD_IN_SINGLE_D1A2E6CF = + + "单 data region 中 DeviceMergeNode 只能有一个 local child。"; + public static final String QUERY_EXCEPTION_GETOUTPUTCOLUMNNAMES_OF_CREATEMULTITIMESERIESNODE_IS_NOT_9D02257A = + + "CreateMultiTimeSeriesNode 的 getOutputColumnNames 尚未实现"; + public static final String QUERY_EXCEPTION_GETOUTPUTCOLUMNNAMES_OF_ALTERLOGICALVIEWNODE_IS_NOT_IMPLEMENTED_D2294789 = + + "AlterLogicalViewNode 的 getOutputColumnNames 尚未实现"; + public static final String QUERY_EXCEPTION_THE_DATABASE_S_IS_READ_ONLY_CB6732CE = + + "数据库 '%s' 为只读。"; + public static final String QUERY_EXCEPTION_THE_DATABASE_S_CAN_ONLY_BE_QUERIED_BY_AUDIT_ADMIN_4A510F66 = + + "数据库 '%s' 仅允许 AUDIT admin 查询。"; + public static final String QUERY_EXCEPTION_UNEXPECTED_WINDOW_FRAME_TYPE_S_F06F81B8 = + + "意外的窗口框架类型:%s"; + public static final String QUERY_EXCEPTION_SIZE_OF_COLUMN_NAMES_AND_COLUMN_DATA_TYPES_DO_NOT_MATCH_9333D273 = + + "列名和列数据类型的数量不匹配"; + public static final String QUERY_EXCEPTION_FAILED_TO_FETCH_FRAGMENT_INSTANCE_STATISTICS_45176795 = + "无法获取 fragment instance statistics"; + public static final String QUERY_EXCEPTION_UNABLE_TO_REMOVE_FIRST_NODE_WHEN_A_NODE_HAS_MULTIPLE_CHILDREN_FB6E81C5 = + "节点有多个 child 时无法移除 first node,请改用 removeAll"; + public static final String QUERY_EXCEPTION_UNABLE_TO_REPLACE_FIRST_NODE_WHEN_A_NODE_HAS_MULTIPLE_CHILDREN_2C3D0E9E = + "节点有多个 child 时无法替换 first node,请改用 replaceAll"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_EXPRESSION_IN_EXTRACTGLOBALTIMEPREDICATE_S_083B1BFA = + + "extractGlobalTimePredicate 中不支持的表达式:%s"; + public static final String QUERY_EXCEPTION_NOT_A_VALID_IR_EXPRESSION_S_03C41ADD = + + "不是有效的 IR 表达式:%s"; + public static final String QUERY_EXCEPTION_UNKNOWN_ALIGNEDDEVICEENTRY_TYPE_S_370A0039 = + "未知的 AlignedDeviceEntry Type:%s"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_SELECTITEM_TYPE_S_4B0B155A = + "不支持的 SelectItem type:%s"; + public static final String QUERY_EXCEPTION_THIS_VISITOR_ONLY_SUPPORTED_PROCESS_OF_EXPRESSION_7CEB79CB = + + "该 Visitor 仅支持处理 Expression"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_GROUPING_ELEMENT_TYPE_S_B3C526E6 = + "不支持的 grouping element type:%s"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_JOIN_CRITERIA_S_311289C1 = + "不支持的 join criteria:%s"; + public static final String QUERY_EXCEPTION_DUPLICATE_ARGUMENT_SPECIFICATION_FOR_NAME_S_F804F3DC = + + "名称存在重复的参数规范:%s"; + public static final String QUERY_EXCEPTION_FORECASTTABLEFUNCTION_MUST_CONTAIN_FORECASTTABLEFUNCTION_DA5828E9 = + "ForecastTableFunction 必须包含 ForecastTableFunction.TIMECOL_PARAMETER_NAME"; + public static final String QUERY_EXCEPTION_UNEXPECTED_ARGUMENT_SPECIFICATION_S_830154B1 = + + "意外的参数规范:%s"; + public static final String QUERY_EXCEPTION_UNEXPECTED_PARTITIONBY_EXPRESSION_S_8D74EB2D = + "意外的 partitionBy 表达式:%s"; + public static final String QUERY_EXCEPTION_UNEXPECTED_ORDERBY_EXPRESSION_S_9301B69E = + "意外的 orderBy 表达式:%s"; + public static final String QUERY_EXCEPTION_AGGREGATION_ANALYSIS_NOT_YET_IMPLEMENTED_FOR_S_38B64170 = + + "尚未实现 %s 的聚合分析"; + public static final String QUERY_EXCEPTION_UNEXPECTED_VALUE_LIST_TYPE_FOR_INPREDICATE_S_3D50B78B = + "InPredicate 的值列表类型意外:%s"; + public static final String QUERY_EXCEPTION_UNEXPECTED_COMPARISON_TYPE_S_5D101FCB = + "意外的比较类型:%s"; + public static final String QUERY_EXCEPTION_ZERO_LENGTH_DELIMITED_IDENTIFIER_NOT_ALLOWED_00C9ADEC = + "不允许使用零长度分隔标识符"; + public static final String QUERY_EXCEPTION_BACKQUOTED_IDENTIFIERS_ARE_NOT_SUPPORTED_USE_DOUBLE_QUOTES_78BC7EE3 = + "不支持反引号标识符;请使用双引号引用标识符"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_UNBOUNDED_TYPE_S_2D943211 = + "不支持的 unbounded type:%s"; + public static final String QUERY_EXCEPTION_ONLY_SUPPORT_MEASUREMENT_COLUMN_IN_FILTER_S_140800D9 = + "过滤条件中仅支持测点列:%s"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_COMPARISON_OPERATOR_S_8357E642 = + "不支持的 comparison operator %s"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_EXTRACT_COMPARISON_OPERATOR_S_38A9CDFA = + "不支持的 extract comparison operator %s"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_LOGICAL_OPERATOR_S_FDC60986 = + "不支持的 logical operator %s"; + public static final String QUERY_EXCEPTION_S_IS_NOT_SUPPORTED_IN_VALUE_PUSH_DOWN_DD54E38A = + "值下推中不支持 %s"; + public static final String QUERY_EXCEPTION_SHOULD_NOT_REACH_HERE_BEFORE_PREDICATECOMBINEINTOTABLESCANCHECKER_C591ED7D = + "PredicateCombineIntoTableScanChecker 支持第三个子节点的 Extract push-down 前,不应执行到这里"; + public static final String QUERY_EXCEPTION_COLUMNSCHEMA_OF_SYMBOL_S_ISN_T_SAVED_IN_SCHEMAMAP_3A172EBC = + "Symbol %s 的 ColumnSchema 未保存在 schemaMap 中"; + public static final String QUERY_EXCEPTION_SHOULD_NEVER_RETURN_NULL_IN_PREDICATECOMBINEINTOTABLESCANCHECKER_2A687052 = + "PredicateCombineIntoTableScanChecker 不应返回 null。"; + public static final String QUERY_EXCEPTION_EITHER_LEFT_OR_RIGHT_OPERAND_OF_COMPARISONEXPRESSION_SHOULD_FC89CE57 = + "ComparisonExpression 的左操作数或右操作数应包含时间列。"; + public static final String QUERY_EXCEPTION_SHOULD_NOT_REACH_HERE_BEFORE_GLOBALTIMEPREDICATEEXTRACTVISITOR_3ECC819B = + "GlobalTimePredicateExtractVisitor 支持第二个子节点的 Extract push-down 前,不应执行到这里"; + public static final String QUERY_EXCEPTION_SHOULD_NOT_REACH_HERE_BEFORE_GLOBALTIMEPREDICATEEXTRACTVISITOR_FB8489E8 = + "GlobalTimePredicateExtractVisitor 支持第三个子节点的 Extract push-down 前,不应执行到这里"; + public static final String QUERY_EXCEPTION_THREE_OPERAND_OF_BETWEEN_EXPRESSION_SHOULD_HAVE_TIME_COLUMN_25ED881D = + "范围表达式的三个操作数都应包含时间列。"; + public static final String QUERY_EXCEPTION_FETCH_TABLE_DEVICE_SCHEMA_FAILED_BECAUSE_S_20B7D6C2 = + + "获取 Table Device Schema 失败,原因:%s"; + public static final String QUERY_EXCEPTION_THE_SCHEMA_FILTER_TYPE_S_IS_NOT_SUPPORTED_200D1E0B = + "不支持 schema filter 类型 %s"; + public static final String QUERY_EXCEPTION_AUTO_CREATE_TABLE_SUCCEED_BUT_CANNOT_GET_TABLE_SCHEMA_IN_74985A8E = + "auto create table 成功,但无法从当前节点的 DataNodeTableCache 获取 table schema,可能是并发 " + + "auto creating table 导致"; + public static final String QUERY_EXCEPTION_CAN_NOT_CREATE_TABLE_BECAUSE_INCOMING_TABLE_HAS_NO_LESS_D3D33555 = + + "无法创建表:传入表的 tag 列不少于现有表,且现有 tag 列不是传入 tag 列的前缀。现有 tag 列:%s,现有表索引:%s,传入表索引:%s"; + public static final String QUERY_EXCEPTION_CAN_NOT_CREATE_TABLE_BECAUSE_EXISTING_TABLE_HAS_MORE_TAG_8364B675 = + + "无法创建表:现有表的 tag 列多于传入表,且传入 tag 列不是现有 tag 列的前缀。传入 tag 列:%s,现有表索引:%s,传入表索引:%s"; + public static final String QUERY_EXCEPTION_AUTO_ADD_TABLE_COLUMN_FAILED_S_S_02F3DD19 = + + "自动添加表列失败:%s.%s"; + public static final String QUERY_EXCEPTION_CANNOT_CREATE_COLUMN_S_CATEGORY_IS_NOT_PROVIDED_E5410BD3 = + + "无法创建列 %s:未提供 category。"; + public static final String QUERY_EXCEPTION_CANNOT_CREATE_COLUMN_S_DATATYPE_IS_NOT_PROVIDED_2A7D27FA = + + "无法创建列 %s:未提供 datatype。"; + public static final String QUERY_EXCEPTION_UNKNOWN_COLUMNCATEGORY_FOR_ADDING_COLUMN_S_ED1BF7FA = + "添加 column 时遇到未知 ColumnCategory:%s"; + public static final String QUERY_EXCEPTION_VISIT_NOT_IMPLEMENTED_FOR_S_1A798A4D = + + "visit() 尚未为 %s 实现"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_FOR_SCALAR_SUBQUERY_RESULT_S_4381E489 = + + "不支持标量子查询结果的数据类型:%s"; + public static final String QUERY_EXCEPTION_TOPKNODE_MUST_BE_APPEARED_AFTER_PUSHLIMITOFFSETINTOTABLESCAN_844A065D = + + "TopKNode 必须出现在 PushLimitOffsetIntoTableScan 之后"; + public static final String QUERY_EXCEPTION_TABLE_MODEL_CAN_ONLY_PROCESS_DATA_ONLY_IN_ONE_DATABASE_YET_AB8C1EF5 = + + "表模型目前只能处理单个数据库中的数据!"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_JOIN_TYPE_IN_PREDICATE_PUSH_DOWN_S_4493D86C = + + "predicate push down 中不支持的 join 类型:%s"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_PLAN_NODE_S_72DD2270 = "不支持的 plan node %s"; + public static final String QUERY_EXCEPTION_AN_ERROR_OCCURRED_WHEN_EXECUTING_GETREADABLEDATAREGIONS_A884A6BB = + "执行 getReadableDataRegions() 时发生错误:%s"; + public static final String QUERY_EXCEPTION_AN_ERROR_OCCURRED_WHEN_EXECUTING_GETREADABLEDATANODELOCATIONS_54CBD60D = + "执行 getReadableDataNodeLocations() 时发生错误:%s"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_QUANTIFIED_COMPARISON_S_C3700430 = + "不支持的 quantified comparison:%s"; + public static final String QUERY_EXCEPTION_UNEXPECTED_QUANTIFIEDCOMPARISON_S_F13E4EB2 = + "意外的 quantifiedComparison:%s"; + public static final String QUERY_EXCEPTION_UNEXPECTED_QUANTIFIER_S_62214B74 = + "意外的 Quantifier:%s"; + public static final String QUERY_EXCEPTION_THIS_OPTIMIZER_SHOULD_BE_USED_BEFORE_OPTIMIZER_OF_PUSHAGGREGATIONINTOTABLESCAN_9F6016E3 = + "该优化器应在 PushAggregationIntoTableScan 优化器之前使用"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_VALUEPOINTER_TYPE_S_4147FFFB = + "不支持的 ValuePointer type:%s"; + public static final String QUERY_EXCEPTION_SYMBOL_S_IS_NOT_EXIST_IN_FETYPEPROVIDER_WITH_S_5CBBFB8B = + + "Symbol:%s 不存在于 feTypeProvider,附带信息:%s"; + public static final String QUERY_EXCEPTION_RIGHT_JOIN_SHOULD_BE_TRANSFORMED_TO_LEFT_JOIN_IN_PREVIOUS_D6B56B1F = + + "RIGHT Join 应在前一处理阶段转换为 LEFT Join"; + public static final String QUERY_EXCEPTION_NO_AVAILABLE_DATANODES_MAY_BE_THE_CLUSTER_IS_CLOSING_E13B8C50 = + + "没有可用 DataNode,集群可能正在关闭"; + public static final String QUERY_EXCEPTION_SHOULD_NEVER_REACH_HERE_CHILD_ORDERING_S_PREGROUPEDSYMBOLS_79A94AB5 = + + "不应执行到这里。Child ordering:%s。PreGroupedSymbols:%s"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_TO_SERIALIZE_S_484DAAAF = + "不支持 serialize:%s"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_TO_DESERIALIZE_S_4641CD63 = + "不支持 deserialize:%s"; + public static final String QUERY_EXCEPTION_INSERT_INTO_TABLE_COLUMNS_S_SIZE_SHOULD_BE_SAME_AS_QUERY_E7437397 = + + "INSERT INTO 表列的数量应与查询结果一致"; + public static final String QUERY_EXCEPTION_THE_TABLEDEVICEFETCHNODE_S_CLONE_METHOD_SHALL_NOT_BE_CALLED_977C41FD = + + "不应调用 TableDeviceFetchNode 的 clone() 方法。"; + public static final String QUERY_EXCEPTION_UNKNOWN_TABLESCANNODE_TYPE_S_6246EF1E = + + "未知的 TableScanNode 类型:%s"; + public static final String QUERY_EXCEPTION_UNEXPECTED_SETOPERATION_NODE_TYPE_S_3AE3EECA = + + "意外的 setOperation 节点类型:%s"; + public static final String QUERY_EXCEPTION_UNSUPPORTED_PATTERN_QUANTIFIER_TYPE_S_4ED427E9 = + + "不支持的模式量词类型:%s"; + public static final String FAILED_TO_CREATE_PIPE_PLUGIN_PREFIX_FMT = + + "创建 pipe plugin %s 失败。 "; + public static final String FAILED_TO_CREATE_PIPE_PREFIX_FMT = "创建 pipe %s 失败,"; + public static final String STATE_ABORTED = "已中止"; + public static final String STATE_CLOSED = "已关闭"; + public static final String LOCAL_SINK_CHANNEL_STATE_IS_WITH_STATE_FMT = + "LocalSinkChannel 状态为 %s。"; + public static final String UNKNOWN_READ_TYPE_FMT = "未知的读取类型 [%s]"; + public static final String DESERIALIZE_CONSENSUSGROUPID_FAILED_WITH_REASON_FMT = + "反序列化 ConsensusGroupId 失败:%s"; + public static final String CANNOT_ALTER_TEMPLATE_TIMESERIES_TEMPLATE_ALREADY_SET_FMT = + "无法修改模板时间序列 [%s],因为设备模板 [%s] 已设置在路径 [%s] 上。"; + public static final String PATH_HAS_NOT_BEEN_SET_ANY_TEMPLATE_FMT = + "路径 [%s] 未设置任何模板。"; + public static final String FAILED_TO_FETCH_SCHEMA_BECAUSE_OF_UNRECOGNIZED_DATA = + "由于存在无法识别的数据,获取 schema 失败"; + public static final String ALIGNMENT_ALIGNED = "对齐"; + public static final String ALIGNMENT_NOT_ALIGNED = "非对齐"; + public static final String TREE_MODEL_DATABASE_NAME_MUST_START_WITH_ROOT = + "树模型中的数据库名必须以 'root.' 开头。"; + public static final String DATABASE_NAME_LENGTH_SHALL_NOT_EXCEED_FMT = + "数据库名长度不能超过 %d"; + public static final String MODEL_TABLE = "表"; + public static final String MODEL_TREE = "树"; + public static final String NO_SYMBOL_MAPPING_FOR_NODE_FMT = + "节点 '%s' (%s) 没有 symbol 映射"; + public static final String NO_MAPPING_FOR_EXPRESSION_WITH_IDENTITY_FMT = + "表达式没有映射:%s (%s)"; + public static final String UNEXPECTED_QUANTIFIED_COMPARISON_FMT = + "意外的 quantified comparison:'%s %s'"; + public static final String TABLE_HAS_NO_PREFIX_FMT = "表 %s 没有前缀!"; + public static final String ANALYSIS_DOES_NOT_CONTAIN_INFORMATION_FOR_NODE_FMT = + "Analysis 不包含节点信息:%s"; + public static final String AUTO_CREATE_TABLE_FAILED = "自动创建表失败。"; + public static final String AUTO_CREATE_TABLE_COLUMN_FAILED = "自动创建表列失败。"; + public static final String AUTO_ADD_TABLE_COLUMN_FAILED_WITH_COLUMNS_FMT = + "自动添加表列失败:%s.%s,%s"; + public static final String QUERY_STATEMENT_NOT_ALLOWED_IN_BATCH_FMT = + "批处理中不允许查询语句:[%s]"; + public static final String TABLE_LOST_UNEXPECTED_FMT = + "数据库 %s 中的表 %s 意外丢失。"; + public static final String LOAD_FILE_CROSSES_PARTITIONS_FMT = + "文件 %s 的数据跨越了分区"; + public static final String LOAD_FILE_CROSSES_PARTITIONS = "文件数据跨越了分区"; + public static final String REGION_REPLICA_SET_CHANGED_DURING_LOAD_FMT = + "加载 TsFile 期间 Region 副本集从 %s 变为 %s,可能是 region migration 导致"; + public static final String REGION_REPLICA_SET_CHANGED_DURING_LOAD = + "加载 TsFile 期间 Region 副本集发生变化,可能是 region migration 导致"; + public static final String OUT_OF_TTL_FMT = + "插入时间 [%s] 小于 ttl 时间下界 [%s]"; + public static final String DRIVER_TASK_ABORTED_FMT = "DriverTask %s 被 %s 中止"; + public static final String DRIVER_TASK_ABORTED_BY_TIMEOUT = "超时"; + public static final String DRIVER_TASK_ABORTED_BY_FRAGMENT_ABORT_CALLED = "被调用中止"; + public static final String DRIVER_TASK_ABORTED_BY_QUERY_CASCADING_ABORTED = + "查询级联中止"; + public static final String DRIVER_TASK_ABORTED_BY_ALREADY_BEING_CANCELLED = + "已经在取消中"; + public static final String DRIVER_TASK_ABORTED_BY_INTERNAL_ERROR_SCHEDULED = + "内部错误调度"; + public static final String DRIVER_TASK_ABORTED_BY_MEMORY_NOT_ENOUGH = + "内存不足,无法执行查询任务。"; + public static final String ROOT_FRAGMENT_INSTANCE_PLACEMENT_ERROR_FMT = + "Root FragmentInstance 放置错误:%s"; + public static final String ALL_REPLICA_CANNOT_BE_REACHED_FMT = + "所有副本均不可达:%s"; + public static final String LOAD_READ_ONLY_MESSAGE = + "当前系统模式为只读,不支持加载文件"; + public static final String QUERY_KILLED_BY_OTHERS = "查询被其他操作终止"; + public static final String QUERY_TIMEOUT_EXCEPTION_MESSAGE = + "当前查询超时,查询开始时间为 %d,ddl 为 %d,当前时间为 %d,请检查语句或修改超时参数。"; + public static final String NON_RESERVED_CAN_ONLY_CONTAIN_TOKENS_FOUND_NESTED_RULE = + "nonReserved 只能包含 token,发现嵌套规则:"; + + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String MESSAGE_FAILED_FETCH_STATE_HAS_RETRIED_ARG_TIMES_E7572C66 = + "获取 state 失败,已重试 %s 次"; + public static final String MESSAGE_IGNORED_CONFIG_ITEMS_FE28ADBC = + "已忽略配置项:"; + public static final String MESSAGE_BECAUSE_THEY_IMMUTABLE_UNDEFINED_07C04F65 = + + ",因为它们不可变或未定义。"; + public static final String MESSAGE_LOAD_ARG_PIECE_ERROR_1ST_PHASE_BECAUSE_F3D9672C = + + "第一阶段加载 %s 片段出错。原因:"; + public static final String MESSAGE_LOAD_ARG_ERROR_SECOND_PHASE_BECAUSE_ARG_FIRST_PHASE_ARG_CBA980FC = + + "第二阶段加载 %s 出错。原因:%s,第一阶段为 %s"; + public static final String MESSAGE_SUCCESS_260CA9DD = + "成功"; + public static final String MESSAGE_FAILED_26934EB3 = + "失败"; + public static final String MESSAGE_AUDIT_PERMISSION_NEEDED_ALTER_ENCODING_COMPRESSOR_DATABASE_ARG_CC06994D = + + "修改数据库 %s 的 encoding 和 compressor 需要 AUDIT 权限"; + public static final String EXCEPTION_QUERYID_IS_NULL_056E92E4 = "queryId 不能为空"; + public static final String EXCEPTION_EXPECTED_TWO_IDS_BUT_GOT_COLON_ARG_020F9D13 = + "期望两个 id,实际得到:%s"; + public static final String EXCEPTION_ID_IS_NULL_9D5D27B1 = "id 不能为空"; + public static final String EXCEPTION_NAME_IS_NULL_C8B35959 = "name 不能为空"; + public static final String EXCEPTION_EXPECTEDPARTS_MUST_BE_AT_LEAST_1_B867DB08 = "expectedParts 必须至少为 1"; + public static final String EXCEPTION_INVALID_ARG_ARG_2946DBE5 = "无效的 %s %s"; + public static final String EXCEPTION_ID_IS_EMPTY_28C94FC0 = + "id 为空"; + public static final String EXCEPTION_EXECUTOR_IS_NULL_7FBE03A4 = "executor 不能为空"; + public static final String EXCEPTION_INITIALSTATE_IS_NULL_8992A39F = "initialState 不能为空"; + public static final String EXCEPTION_TERMINALSTATES_IS_NULL_E0FC2A93 = "terminalStates 不能为空"; + public static final String EXCEPTION_EXPECTEDSTATE_IS_NULL_5E8C2F32 = "expectedState 不能为空"; + public static final String EXCEPTION_CURRENTSTATE_IS_NULL_AEDB20DB = "currentState 不能为空"; + public static final String EXCEPTION_STATECHANGELISTENER_IS_NULL_635AE7D2 = "stateChangeListener 不能为空"; + public static final String EXCEPTION_ARG_CANNOT_TRANSITION_FROM_ARG_TO_ARG_8C680D30 = "%s 无法从 %s 转换到 %s"; + public static final String EXCEPTION_CANNOT_FIRE_STATE_CHANGE_EVENT_WHILE_HOLDING_THE_LOCK_35243BC4 = + "持有锁时无法触发状态变更事件。"; + public static final String EXCEPTION_CANNOT_NOTIFY_WHILE_HOLDING_THE_LOCK_15625D48 = + "持有锁时无法通知。"; + public static final String EXCEPTION_CANNOT_WAIT_FOR_STATE_CHANGE_WHILE_HOLDING_THE_LOCK_CBD9F784 = + "持有锁时无法等待状态变更。"; + public static final String EXCEPTION_DONESTATE_IS_NULL_D88F77E5 = "doneState 不能为空"; + public static final String EXCEPTION_DONESTATE_ARG_IS_NOT_A_DONE_STATE_8724C618 = + "doneState %s 不是完成状态"; + public static final String EXCEPTION_DATANODEID_SHOULD_BE_INIT_FIRST_13B19A85 = + "DataNodeId 应先初始化!"; + public static final String EXCEPTION_LENGTH_OF_INPUT_COLUMN_LEFT_BRACKET_RIGHT_BRACKET_FOR_MAXBY_SLASH_MINBY_SHOULD_B_1F3F2F1C = + "MaxBy/MinBy 的输入 Column[] 长度应为 3"; + public static final String EXCEPTION_PARTIALRESULT_OF_MAXBY_SLASH_MINBY_SHOULD_BE_1_BF0078F4 = "MaxBy/MinBy 的 partialResult 应为 1"; + public static final String EXCEPTION_PARTIALRESULT_OF_MAXVALUE_SHOULD_BE_1_659B6D42 = + "MaxValue 的 partialResult 应为 1"; + public static final String EXCEPTION_PARTIALRESULT_OF_AVG_SHOULD_BE_2_7A8C375E = + "Avg 的 partialResult 应为 2"; + public static final String EXCEPTION_PARTIALRESULT_OF_MINVALUE_SHOULD_BE_1_C9DAF94D = + "MinValue 的 partialResult 应为 1"; + public static final String EXCEPTION_PARTIALRESULT_OF_LASTVALUE_SHOULD_BE_2_68963ECE = + "LastValue 的 partialResult 应为 2"; + public static final String EXCEPTION_PARTIALRESULT_OF_MINTIME_SHOULD_BE_1_B7EFE10B = + "MinTime 的 partialResult 应为 1"; + public static final String EXCEPTION_PARTIALRESULT_OF_COUNT_SHOULD_BE_1_972B9219 = + "Count 的 partialResult 应为 1"; + public static final String EXCEPTION_PARTIALRESULT_OF_FIRSTVALUE_SHOULD_BE_2_3FB20C54 = + "FirstValue 的 partialResult 应为 2"; + public static final String EXCEPTION_PARTIALRESULT_OF_COUNT_IF_SHOULD_BE_1_70D01652 = + "count_if 的 partialResult 应为 1"; + public static final String EXCEPTION_STEP_IN_SERIESAGGREGATESCANOPERATOR_AND_RAWDATAAGGREGATEOPERATOR_CAN_ONLY_PROCES_5575BD95 = + "SeriesAggregateScanOperator 和 RawDataAggregateOperator 中的 Step 只能处理原始输入。"; + public static final String EXCEPTION_RAWDATAAGGREGATEOPERATOR_CAN_ONLY_PROCESS_ONE_TSBLOCK_INPUT_DOT_5ABCB8C0 = + "RawDataAggregateOperator 只能处理一个 TsBlock 输入。"; + public static final String EXCEPTION_STEP_IN_AGGREGATEOPERATOR_CANNOT_PROCESS_RAW_INPUT_22620F61 = + "AggregateOperator 中的 Step 不能处理原始输入。"; + public static final String EXCEPTION_FINAL_OUTPUT_CAN_ONLY_BE_SINGLE_COLUMN_6D82F9E0 = "最终输出只能是单列"; + public static final String EXCEPTION_PARTIALRESULT_OF_SUM_SHOULD_BE_1_40E85216 = + "Sum 的 partialResult 应为 1"; + public static final String EXCEPTION_INPUT_OF_SUM_SHOULD_BE_1_D5C11EC8 = + "Sum 的输入应为 1"; + public static final String EXCEPTION_PARTIALRESULT_OF_UDAF_SHOULD_BE_1_E094029D = + "UDAF 的 partialResult 应为 1"; + public static final String EXCEPTION_PARTIALRESULT_OF_EXTREMEVALUE_SHOULD_BE_1_A7713D8A = + "ExtremeValue 的 partialResult 应为 1"; + public static final String EXCEPTION_WRONG_INPUTDATATYPES_SIZE_DOT_675FF289 = "inputDataTypes 大小错误。"; + public static final String EXCEPTION_INPUT_OF_COUNT_SHOULD_BE_1_C7EEEC46 = + "Count 的输入应为 1"; + public static final String EXCEPTION_PARTIALRESULT_OF_MAXTIME_SHOULD_BE_1_877F7EAC = + "MaxTime 的 partialResult 应为 1"; + public static final String EXCEPTION_LOCALMEMORYMANAGER_IS_NULL_DOT_69FE497A = "localMemoryManager 不能为空."; + public static final String EXCEPTION_TSBLOCKSERDEFACTORY_IS_NULL_DOT_32EB5BD2 = "tsBlockSerdeFactory 不能为空."; + public static final String EXCEPTION_EXECUTORSERVICE_IS_NULL_DOT_7B057909 = "executorService 不能为空."; + public static final String EXCEPTION_MPPDATAEXCHANGESERVICECLIENTMANAGER_IS_NULL_DOT_F31E746C = "mppDataExchangeServiceClientManager 不能为空."; + public static final String EXCEPTION_SHAREDTSBLOCKQUEUE_IS_FULL_87493E26 = "SharedTsBlockQueue 已满"; + public static final String EXCEPTION_FRAGMENT_INSTANCE_ID_CANNOT_BE_NULL_4BE84F40 = "FragmentInstance ID 不能为空"; + public static final String EXCEPTION_PLANNODE_ID_CANNOT_BE_NULL_F91303CD = "PlanNode ID 不能为空"; + public static final String EXCEPTION_LOCAL_MEMORY_MANAGER_CANNOT_BE_NULL_54701481 = "本地内存管理器不能为空"; + public static final String EXCEPTION_EXECUTORSERVICE_CAN_NOT_BE_NULL_DOT_220C966B = + "ExecutorService 不能为空"; + public static final String EXCEPTION_TSBLOCK_CANNOT_BE_NULL_E7EA3BDA = "TsBlock 不能为空"; + public static final String EXCEPTION_BYTESTORESERVE_SHOULD_BE_GREATER_THAN_ZERO_DOT_56D15DE0 = + "bytesToReserve 应大于 0"; + public static final String EXCEPTION_MAXBYTESCANRESERVE_SHOULD_BE_GREATER_THAN_ZERO_DOT_E9F7D365 = + "maxBytesCanReserve 应大于 0"; + public static final String EXCEPTION_MAX_BYTES_SHOULD_BE_GREATER_THAN_ZERO_COLON_ARG_EA1FB495 = "max bytes 应大于 0:%d"; + public static final String EXCEPTION_MAX_BYTES_PER_FI_SHOULD_BE_IN_LEFT_PAREN_0_COMMA_MAXBYTES_RIGHT_BRACKET_DOT_MAXB_4D37C457 = "max bytes per FI 应在 (0,maxBytes] 范围内。maxBytesPerFI:%d,maxBytes:%d"; + public static final String EXCEPTION_BYTESTORESERVE_SHOULD_BE_IN_LEFT_PAREN_0_COMMA_MAXBYTESPERFI_RIGHT_BRACKET_DOT_M_0753BB69 = "bytesToReserve 应在 (0,maxBytesPerFI] 范围内。maxBytesPerFI:%d,bytesToReserve:%d"; + public static final String EXCEPTION_INVALID_FUTURE_TYPE_14507EF5 = "无效的 future type "; + public static final String EXCEPTION_QUERYID_CANNOT_BE_NULL_861D7663 = "queryId 不能为空"; + public static final String EXCEPTION_FRAGMENTINSTANCEID_CANNOT_BE_NULL_C722F460 = "fragmentInstanceId 不能为空"; + public static final String EXCEPTION_PLANNODEID_CANNOT_BE_NULL_4533C72B = "planNodeId 不能为空"; + public static final String EXCEPTION_ID_CAN_NOT_BE_NULL_DOT_BDD2AD7D = + "id 不能为空"; + public static final String EXCEPTION_QUERYID_CAN_NOT_BE_NULL_DOT_16639DBE = + "queryId 不能为空"; + public static final String EXCEPTION_FRAGMENTINSTANCEID_CAN_NOT_BE_NULL_DOT_E88CF18B = + "fragmentInstanceId 不能为空"; + public static final String EXCEPTION_PLANNODEID_CAN_NOT_BE_NULL_DOT_44027620 = + "planNodeId 不能为空"; + public static final String EXCEPTION_THE_FUTURE_TO_BE_CANCELLED_CAN_NOT_BE_NULL_DOT_73CE402A = + "待取消的 future 不能为空。"; + public static final String EXCEPTION_LOCK_IS_NOT_REENTRANT_7967C13E = "锁不可重入"; + public static final String EXCEPTION_CURRENT_THREAD_DOES_NOT_HOLD_LOCK_68FFB1D9 = "当前线程未持有锁"; + public static final String EXCEPTION_ROOT_OPERATOR_SHOULD_NOT_BE_NULL_F4890A7A = "root Operator 不能为空"; + public static final String EXCEPTION_SINK_SHOULD_NOT_BE_NULL_3CC4F006 = "Sink 不能为空"; + public static final String EXCEPTION_INITIALCOUNT_SHOULDN_QUOTE_T_BE_NULL_HERE_8B333953 = + "initialCount 在此处不能为空"; + public static final String EXCEPTION_COUNT_SHOULDN_QUOTE_T_BE_NULL_HERE_1EBA9339 = + "count 在此处不能为空"; + public static final String EXCEPTION_TASKID_IS_NULL_E1221EB2 = "taskId 不能为空"; + public static final String EXCEPTION_INSTANCEID_IS_NULL_343234DC = "instanceId 不能为空"; + public static final String EXCEPTION_FRAGMENTINSTANCEID_IS_NULL_4D371DB4 = "fragmentInstanceId 不能为空"; + public static final String EXCEPTION_CURRENT_STATE_IS_ALREADY_DONE_19FC56DC = "当前状态已完成"; + public static final String EXCEPTION_SUPPRESSED_IS_NULL_F4CD280B = "suppressed 不能为空"; + public static final String EXCEPTION_STACK_IS_NULL_6844D421 = "stack 不能为空"; + public static final String EXCEPTION_ARG_IS_A_NON_MINUS_DONE_FAILURE_STATE_B167E915 = "%s 是未完成的失败状态"; + public static final String EXCEPTION_WARNINGCODE_IS_NULL_3CCAE5B7 = "warningCode 不能为空"; + public static final String EXCEPTION_MESSAGE_IS_NULL_D2D078AA = "message 不能为空"; + public static final String EXCEPTION_WARNING_IS_NULL_E5A7C3C1 = "warning 不能为空"; + public static final String EXCEPTION_NO_FIRST_FILE_F5F2E276 = "没有第一个文件"; + public static final String EXCEPTION_NO_FIRST_CHUNK_7DCEB14C = "没有第一个 chunk"; + public static final String EXCEPTION_CAN_QUOTE_T_INIT_NULL_CHUNKMETA_15C12BEE = "不能用 null chunkMeta 初始化"; + public static final String EXCEPTION_OPERATORCONTEXT_IS_NULL_D15B1EDB = "operatorContext 不能为空"; + public static final String EXCEPTION_CHILD_OPERATOR_IS_NULL_8860113C = "child operator 不能为空"; + public static final String EXCEPTION_GROUPBYTIMEPARAMETER_CANNOT_BE_NULL_IN_SLIDINGWINDOWAGGREGATIONOPERATOR_BA42E30D = + "SlidingWindowAggregationOperator 中的 GroupByTimeParameter 不能为空。"; + public static final String EXCEPTION_REMAININGINPUTLOCATIONS_IS_NULL_CEBBA2C1 = "remainingInputLocations 不能为空"; + public static final String EXCEPTION_LAST_QUERY_RESULT_SHOULD_ONLY_HAVE_ONE_RECORD_EDFEE635 = "last 查询结果只能有一条记录"; + public static final String EXCEPTION_OUTPUTPATHS_SHOULDN_QUOTE_T_BE_NULL_BF3F5FB4 = "outputPaths 不能为空"; + public static final String EXCEPTION_CHILD_SIZE_OF_INNERTIMEJOINOPERATOR_SHOULD_BE_LARGER_THAN_1_37EB7D74 = + "InnerTimeJoinOperator 的子节点数量应大于 1"; + public static final String EXCEPTION_CHILD_SIZE_OF_VERTICALLYCONCATOPERATOR_SHOULD_BE_LARGER_THAN_0_14A2513A = + "VerticallyConcatOperator 的子节点数量应大于 0"; + public static final String EXCEPTION_CHILD_SIZE_OF_TIMEJOINOPERATOR_SHOULD_BE_LARGER_THAN_0_EDED9CB8 = + "TimeJoinOperator 的子节点数量应大于 0"; + public static final String EXCEPTION_DATASTORE_IS_NULL_D9972B2E = "dataStore 不能为空"; + public static final String EXCEPTION_LASTVALUESCACHERESULTS_SHOULDN_QUOTE_T_BE_NULL_HERE_0DCD5841 = + "lastValuesCacheResults 在此处不能为空"; + public static final String EXCEPTION_ACCUMULATOR_SHOULD_BE_LASTDESCACCUMULATOR_WHEN_REACH_HERE_CE38F96A = "执行到这里时 Accumulator 应为 LastDescAccumulator"; + public static final String EXCEPTION_DRIVERTASK_TO_BE_PUSHED_IS_NULL_7581A0E3 = "待推送的 DriverTask 不能为空"; + public static final String EXCEPTION_DRIVERTASK_IS_NULL_A13D4AF9 = "driverTask 不能为空"; + public static final String EXCEPTION_SELECTED_LEVEL_CAN_NOT_EQUAL_TO_MINUS_1_1DA93B14 = + "selected level 不能等于 -1。"; + public static final String EXCEPTION_RESULT_DRIVERTASK_CANNOT_BE_NULL_30A06DB1 = "结果 DriverTask 不能为空"; + public static final String EXCEPTION_DRIVERTASKQUEUE_IS_NULL_7C3C8B7B = "driverTaskQueue 不能为空"; + public static final String EXCEPTION_MAXDRIVERSPERTASK_IS_NULL_8408F9B7 = "maxDriversPerTask 不能为空"; + public static final String EXCEPTION_QUEUE_CAN_NOT_BE_NULL_DOT_9BB286B1 = + "queue 不能为空"; + public static final String EXCEPTION_SOURCEHANDLELISTENER_CAN_NOT_BE_NULL_DOT_01817F52 = + "sourceHandleListener 不能为空"; + public static final String EXCEPTION_LOCALFRAGMENTINSTANCEID_CAN_NOT_BE_NULL_DOT_37F5917D = + "localFragmentInstanceId 不能为空"; + public static final String EXCEPTION_LOCALPLANNODEID_CAN_NOT_BE_NULL_DOT_44A34A33 = + "localPlanNodeId 不能为空"; + public static final String EXCEPTION_START_SEQUENCE_ID_SHOULD_BE_GREATER_THAN_OR_EQUAL_TO_ZERO_DOT_START_SEQUENCE_ID__D3C0AAB7 = + "开始序列 ID 必须大于等于 0。开始序列 ID:"; + public static final String EXCEPTION_COMMA_END_SEQUENCE_ID_COLON_DB1AF173 = ",结束序列 ID:"; + public static final String EXCEPTION_END_SEQUENCE_ID_SHOULD_BE_GREATER_THAN_THE_START_SEQUENCE_ID_DOT_START_SEQUENCE__DF1AA2A1 = "结束序列 ID 应大于开始序列 ID。开始序列 ID:"; + public static final String EXCEPTION_RESERVED_BYTES_SHOULD_BE_GREATER_THAN_ZERO_DOT_64086BE5 = + "Reserved bytes 应大于 0"; + public static final String EXCEPTION_REMOTEENDPOINT_CAN_NOT_BE_NULL_DOT_DE2B5885 = + "remoteEndpoint 不能为空"; + public static final String EXCEPTION_REMOTEFRAGMENTINSTANCEID_CAN_NOT_BE_NULL_DOT_C2449A29 = + "remoteFragmentInstanceId 不能为空"; + public static final String EXCEPTION_LOCALMEMORYMANAGER_CAN_NOT_BE_NULL_DOT_7A46C6CE = + "localMemoryManager 不能为空"; + public static final String EXCEPTION_EXECUTORSERVICE_CAN_NOT_BE_NULL_DOT_BC459BD4 = + "executorService 不能为空"; + public static final String EXCEPTION_SERDE_CAN_NOT_BE_NULL_DOT_D46F66E7 = + "serde 不能为空"; + public static final String EXCEPTION_DOT_9D9B854A = "."; + public static final String EXCEPTION_START_SEQUENCE_ID_SHOULD_BE_GREATER_THAN_OR_EQUAL_TO_ZERO_COMMA_BUT_WAS_COLON_4D2D708E = + "开始序列 ID 必须大于等于 0,实际值:"; + public static final String EXCEPTION_REMOTEENDPOINT_CAN_NOT_BE_NULL_DOT_83488ACF = + "remoteEndPoint 不能为空"; + public static final String EXCEPTION_REMOTEPLANNODEID_CAN_NOT_BE_NULL_DOT_03956DE2 = + "remotePlanNodeId 不能为空"; + public static final String EXCEPTION_SINKLISTENER_CAN_NOT_BE_NULL_DOT_32C9E7C0 = + "sinkListener 不能为空"; + public static final String EXCEPTION_TSBLOCKS_IS_NULL_02287FD8 = "tsBlocks 不能为空"; + public static final String EXCEPTION_DOWNSTREAMCHANNELLIST_CAN_NOT_BE_NULL_DOT_417AD5A3 = + "downStreamChannelList 不能为空"; + public static final String EXCEPTION_DOWNSTREAMCHANNELINDEX_CAN_NOT_BE_NULL_DOT_A1D5A266 = + "downStreamChannelIndex 不能为空"; + public static final String EXCEPTION_STEP_IN_SLIDINGWINDOWAGGREGATIONOPERATOR_CAN_ONLY_PROCESS_PARTIAL_RESULT_E221A2C5 = "SlidingWindowAggregationOperator 中的 Step 只能处理部分结果"; + public static final String EXCEPTION_SLIDINGWINDOWAGGREGATIONOPERATOR_CAN_ONLY_PROCESS_ONE_TSBLOCK_INPUT_DOT_7B9FCAB7 = "SlidingWindowAggregationOperator 只能处理一个 TsBlock 输入。"; + public static final String EXCEPTION_IS_NULL_97AAF381 = " 不能为空"; + public static final String EXCEPTION_MPP_DATA_EXCHANGE_MANAGER_SHOULD_NOT_BE_NULL_44D7141E = "MPP_DATA_EXCHANGE_MANAGER 不能为空"; + public static final String EXCEPTION_ROOTOPERATOR_IS_NULL_050A1E79 = "rootOperator 不能为空"; + public static final String EXCEPTION_DRIVERCONTEXT_IS_NULL_4FEBE55F = "driverContext 不能为空"; + public static final String EXCEPTION_QUERY_CONTEXT_CANNOT_BE_NULL_C4809234 = "查询上下文不能为空"; + public static final String EXCEPTION_DESCRIPTOR_QUOTE_S_INPUT_EXPRESSION_SIZE_IS_NOT_1_DA4BED50 = "descriptor 的输入表达式大小不是 1"; + public static final String EXCEPTION_GROUPBYLEVEL_DESCRIPTORLIST_CANNOT_BE_EMPTY_34604314 = "GroupByLevel descriptorList 不能为空"; + public static final String EXCEPTION_GROUPBYTAG_TAG_KEYS_CANNOT_BE_EMPTY_5D649624 = "GroupByTag tag keys 不能为空"; + public static final String EXCEPTION_GROUPBYTAG_AGGREGATION_DESCRIPTORS_CANNOT_BE_EMPTY_82EC14EB = "GroupByTag aggregation descriptors 不能为空"; + public static final String EXCEPTION_AGGREGATION_DESCRIPTORLIST_CANNOT_BE_EMPTY_490C1740 = "Aggregation descriptorList 不能为空"; + public static final String EXCEPTION_PUSH_DOWN_PREDICATE_IS_NOT_SUPPORTED_YET_178F04A1 = "暂不支持 push down predicate"; + public static final String EXCEPTION_SINK_IS_NULL_E33854B4 = "sink 不能为空"; + public static final String EXCEPTION_THERE_MUST_BE_AT_MOST_ONE_SINKNODE_A965AFE7 = "最多只能有一个 SinkNode"; + public static final String EXCEPTION_QUERY_CONTEXT_CANNOT_BE_NULL_DOT_2D3369FE = "查询上下文不能为空。"; + public static final String EXCEPTION_UNEXPECTED_NODE_TYPE_COLON_41FBCBF3 = "意外的节点类型:"; + public static final String EXCEPTION_TEMPLATEDINFO_SHOULD_NOT_BE_NULL_B5898568 = "TemplatedInfo 不能为空"; + public static final String EXCEPTION_RESULTHANDLE_IN_COORDINATOR_SHOULD_BE_INIT_FIRSTLY_DOT_0F44159B = "Coordinator 中的 ResultHandle 应先初始化。"; + public static final String EXCEPTION_EXPRESSION_IS_NOT_ANALYZED_COLON_ARG_7D34C49A = "表达式尚未分析:%s"; + public static final String EXCEPTION_PATH_QUOTE_ARG_QUOTE_IS_NOT_ANALYZED_IN_GROUPBYLEVELHELPER_DOT_BCEE9D39 = "路径 '%s' 未在 GroupByLevelHelper 中分析。"; + public static final String EXCEPTION_SYMBOL_IS_NULL_AE539B31 = "symbol 不能为空"; + public static final String EXCEPTION_NO_TYPE_FOUND_FOR_SYMBOL_QUOTE_ARG_QUOTE_IN_TYPEPROVIDER_F4DD9DF7 = "TypeProvider 中未找到 symbol '%s' 的类型"; + public static final String EXCEPTION_OUTPUT_COLUMN_QUOTE_ARG_QUOTE_IS_NOT_STORED_IN_ARG_2DE3176D = "输出列 '%s' 未存储在 %s 中"; + public static final String EXCEPTION_PATTERNSTRING_CANNOT_BE_NULL_8A2903F8 = "patternString 不能为空"; + public static final String EXCEPTION_THE_LENGTH_OF_CASEWHENTHENEXPRESSION_QUOTE_S_WHENTHENLIST_MUST_GREATER_THAN_0_069775ED = "CaseWhenThenExpression 的 whenThenList 长度必须大于 0"; + public static final String EXCEPTION_QUERYCONTEXT_IS_NULL_C2344379 = "QueryContext 不能为空"; + public static final String EXCEPTION_PREDICATE_LEFT_BRACKET_ARG_RIGHT_BRACKET_SHOULD_BE_SIMPLIFIED_IN_PREVIOUS_STEP_9262C154 = "谓词 [%s] 应在前一步中简化"; + public static final String EMPTY_MESSAGE = ""; + public static final String EXCEPTION_SEMICOLON_0FAEF84A = "; "; + public static final String EXCEPTION_THE_TSBLOCK_SHOULD_NOT_BE_NULL_WHEN_CONSTRUCTING_MEMORYSOURCEHANDLE_8D205293 = + "构造 MemorySourceHandle 时 TsBlock 不能为空。"; + public static final String EXCEPTION_THE_TIME_ORDER_IS_NOT_SPECIFIED_DOT_624A7526 = "未指定时间顺序。"; + public static final String EXCEPTION_THE_TIMESERIES_ORDER_IS_NOT_SPECIFIED_DOT_68EE3875 = "未指定时间序列顺序。"; + public static final String EXCEPTION_THE_DEVICE_ORDER_IS_NOT_SPECIFIED_DOT_D3FB9559 = "未指定设备顺序。"; + public static final String EXCEPTION_SLASH_BC35AB27 = "/"; + public static final String EXCEPTION_INFORMATIONSCHEMATABLESCANNODE_MUST_HAVE_REGIONREPLICASET_0411DBCB = "InformationSchemaTableScanNode 必须包含 regionReplicaSet"; + public static final String EXCEPTION_EACH_INFORMATIONSCHEMATABLESCANNODE_HAVE_ONLY_ONE_DATANODELOCATION_FA3E82C4 = "每个 InformationSchemaTableScanNode 只能有一个 DataNodeLocation"; + public static final String EXCEPTION_CHILD_OF_EXCHANGENODE_MUST_BE_MULTICHILDRENSINKNODE_1BF715FD = + "ExchangeNode 的子节点必须是 MultiChildrenSinkNode。"; + public static final String EXCEPTION_SIZE_OF_SOURCELOCATIONS_SHOULD_BE_LARGER_THAN_0_2EC41A23 = "sourceLocations 的大小应大于 0"; + public static final String EXCEPTION_INDEX_IS_NOT_VALID_2AB4FB3A = "索引无效"; + public static final String EXCEPTION_LINES_OF_BOX_STRING_SHOULD_BE_GREATER_THAN_0_5DB8C047 = "box string 的行数应大于 0"; + public static final String EXCEPTION_WRONG_NUMBER_OF_NEW_CHILDREN_817AF800 = "新子节点数量错误"; + public static final String EXCEPTION_TRANSLATIONS_IS_NULL_37D62ADC = "translations 不能为空"; + public static final String EXCEPTION_ROOT_IS_NULL_ECC8987D = "root 不能为空"; + public static final String EXCEPTION_SYMBOLHINT_IS_NULL_CE874C40 = "symbolHint 不能为空"; + public static final String EXCEPTION_TYPE_IS_NULL_16A3D3EB = "type 不能为空"; + public static final String EXCEPTION_SYMBOLHINT_NOT_IN_SYMBOLS_MAP_B0D67E43 = "symbolHint 不在 symbols map 中"; + public static final String EXCEPTION_PLANNERCONTEXT_IS_NULL_B7C7DE50 = "plannerContext 不能为空"; + public static final String EXCEPTION_OBJECTS_IS_NULL_819EE879 = "objects 不能为空"; + public static final String EXCEPTION_TYPES_IS_NULL_E4B2309D = "types 不能为空"; + public static final String EXCEPTION_OBJECTS_AND_TYPES_DO_NOT_HAVE_THE_SAME_SIZE_8B51E17B = + "objects 与 types 的大小不一致。"; + public static final String EXCEPTION_OUTERCONTEXT_IS_NULL_031CD366 = "outerContext 不能为空"; + public static final String EXCEPTION_SCOPE_IS_NULL_4F364BA2 = "scope 不能为空"; + public static final String EXCEPTION_ANALYSIS_IS_NULL_66666A58 = "analysis 不能为空"; + public static final String EXCEPTION_FIELDSYMBOLS_IS_NULL_5130E49C = "fieldSymbols 不能为空"; + public static final String EXCEPTION_ASTTOSYMBOLS_IS_NULL_80B3970F = "astToSymbols 不能为空"; + public static final String EXCEPTION_TOO_FEW_PARAMETER_VALUES_2F7358C6 = "参数值过少"; + public static final String EXCEPTION_SYMBOLALLOCATOR_IS_NULL_E2BE1908 = "symbolAllocator 不能为空"; + public static final String EXCEPTION_QUERYCONTEXT_IS_NULL_761DB539 = "queryContext 不能为空"; + public static final String EXCEPTION_SESSION_IS_NULL_6CF0F47D = "session 不能为空"; + public static final String EXCEPTION_RECURSIVESUBQUERIES_IS_NULL_6AD8A180 = "recursiveSubqueries 不能为空"; + public static final String EXCEPTION_PREDICATEWITHUNCORRELATEDSCALARSUBQUERYRECONSTRUCTOR_IS_NULL_B264FEBC = "predicateWithUncorrelatedScalarSubqueryReconstructor 不能为空"; + public static final String EXCEPTION_ONLY_SUPPORT_ONE_GROUPINGSET_NOW_A1277FA4 = "目前仅支持一个 groupingSet"; + public static final String EXCEPTION_EXPRESSION_IS_NULL_16C079B5 = "expression 不能为空"; + public static final String EXCEPTION_EXPRESSIONTYPES_IS_NULL_4107A4A2 = "expressionTypes 不能为空"; + public static final String EXCEPTION_TYPE_NOT_FOUND_FOR_EXPRESSION_COLON_ARG_C26C9237 = "未找到表达式的类型:%s"; + public static final String EXCEPTION_VALUE_REACH_HERE_MUST_BE_EXPRESSION_C7CA1971 = "执行到这里时值必须为表达式"; + public static final String EXCEPTION_PLAN_IS_NULL_717C9DF7 = "plan 不能为空"; + public static final String EXCEPTION_LOOKUP_IS_NULL_B8FD7E65 = "lookup 不能为空"; + public static final String EXCEPTION_CONSUMER_IS_NULL_B6207072 = "consumer 不能为空"; + public static final String EXCEPTION_FIELDMAPPINGS_IS_NULL_C3681969 = "fieldMappings 不能为空"; + public static final String EXCEPTION_NO_FIELD_MINUS_GREATER_THAN_SYMBOL_MAPPING_FOR_FIELD_ARG_698FDF06 = "字段 %s 没有 field->symbol 映射"; + public static final String EXCEPTION_FOR_NOW_COMMA_ONLY_SINGLE_COLUMN_SUBQUERIES_ARE_SUPPORTED_AD9593BE = "目前仅支持单列子查询"; + public static final String EXCEPTION_FOR_NOW_COMMA_ONLY_SINGLE_COLUMN_SUBQUERIES_ARE_SUPPORTED_DOT_068B1A66 = "目前仅支持单列子查询。"; + public static final String EXCEPTION_CLUSTER_IS_EMPTY_22299EED = + "Cluster 为空"; + public static final String EXCEPTION_CLUSTER_CONTAINS_EXPRESSIONS_THAT_ARE_NOT_EQUIVALENT_TO_EACH_OTHER_7AD9A0E3 = + "Cluster 包含彼此不等价的表达式。"; + public static final String EXCEPTION_WARNINGCOLLECTOR_IS_NULL_7A524A68 = "warningCollector 不能为空"; + public static final String EXCEPTION_MEASURES_IS_NULL_EC9D2431 = "measures 不能为空"; + public static final String EXCEPTION_MEASUREOUTPUTS_IS_NULL_923F7C4B = "measureOutputs 不能为空"; + public static final String EXCEPTION_SKIPTOPOSITION_IS_NULL_EFBA10CA = "skipToPosition 不能为空"; + public static final String EXCEPTION_PATTERN_IS_NULL_AC4E239A = "pattern 不能为空"; + public static final String EXCEPTION_VARIABLEDEFINITIONS_IS_NULL_5F7B8ED4 = "variableDefinitions 不能为空"; + public static final String EXCEPTION_NO_RELATIONS_SPECIFIED_FOR_UNION_70CE42C4 = "未为 UNION 指定关系"; + public static final String EXCEPTION_NO_RELATIONS_SPECIFIED_FOR_INTERSECT_76B0ED3B = "未为 INTERSECT 指定关系"; + public static final String EXCEPTION_NO_RELATIONS_SPECIFIED_FOR_EXCEPT_C8E4B4AA = "未为 EXCEPT 指定关系"; + public static final String EXCEPTION_NODE_IS_NULL_C1479F4A = "node 不能为空"; + public static final String EXCEPTION_EXPRESSIONS_MUST_BE_IN_THE_SAME_LOCAL_SCOPE_CCAD793E = + "表达式必须位于同一局部作用域。"; + public static final String EXCEPTION_WHERE_IS_NULL_A1A3FCBC = "WHERE 不能为空"; + public static final String EXCEPTION_SKIPONLY_IS_NULL_80DB0703 = "skipOnly 不能为空"; + public static final String EXCEPTION_UNABLE_TO_REMOVE_PLAN_NODE_AS_IT_CONTAINS_0_OR_MORE_THAN_1_CHILDREN_6F26E194 = + "无法移除 plan node:其子节点数量为 0 或大于 1。"; + public static final String EXCEPTION_FIELDS_IS_NULL_DE209DBF = "fields 不能为空"; + public static final String EXCEPTION_CANNOT_RESOLVE_SYMBOL_ARG_79F76FA6 = "无法解析 symbol %s"; + public static final String EXCEPTION_COLUMNREFERENCES_IS_NULL_124955C5 = "columnReferences 不能为空"; + public static final String EXCEPTION_SCOPEEQUALITIES_IS_NULL_22388B2C = "scopeEqualities 不能为空"; + public static final String EXCEPTION_SCOPECOMPLEMENTEQUALITIES_IS_NULL_B9080FC7 = "scopeComplementEqualities 不能为空"; + public static final String EXCEPTION_SCOPESTRADDLINGEQUALITIES_IS_NULL_F6B979AE = "scopeStraddlingEqualities 不能为空"; + public static final String EXCEPTION_SYMBOLTYPES_IS_NULL_DD16EA83 = "symbolTypes 不能为空"; + public static final String EXCEPTION_EXPRESSION_CANNOT_BE_NULL_EFF1A99C = "表达式不能为空"; + public static final String EXCEPTION_TYPE_CANNOT_BE_NULL_97A0A8D3 = "类型不能为空"; + public static final String EXCEPTION_NO_TYPE_FOR_COLON_ARG_9E34AD76 = "没有对应类型:%s"; + public static final String EXCEPTION_CONDITION_MUST_BE_BOOLEAN_COLON_ARG_806C2960 = "条件必须为 boolean:%s"; + public static final String EXCEPTION_TYPES_MUST_BE_EQUAL_COLON_ARG_VS_ARG_098424AD = "Types 必须为 equal: %s vs %s"; + public static final String EXCEPTION_ELEMENTS_IS_NULL_3451C1DA = "elements 不能为空"; + public static final String EXCEPTION_PREDICATE_IS_NULL_22E687A9 = "predicate 不能为空"; + public static final String EXCEPTION_MAPPER_IS_NULL_1D7789D1 = "mapper 不能为空"; + public static final String EXCEPTION_FUNCTION_IS_NULL_E0FA4B62 = "function 不能为空"; + public static final String EXCEPTION_N_MUST_BE_GREATER_THAN_OR_EQUAL_TO_ZERO_C4CE8BF0 = "n 必须大于或等于 0"; + public static final String EXCEPTION_LOOKUPTYPE_IS_NULL_190054FA = "lookupType 不能为空"; + public static final String EXCEPTION_OPERATORTYPE_IS_NULL_CEA6E3D3 = "operatorType 不能为空"; + public static final String EXCEPTION_ARGUMENTTYPES_IS_NULL_1E377BFD = "argumentTypes 不能为空"; + public static final String EXCEPTION_RETURNTYPE_IS_NULL_07C7C6A5 = "returnType 不能为空"; + public static final String EXCEPTION_TABLE_IS_NULL_8DDD9098 = "table 不能为空"; + public static final String EXCEPTION_COLUMNS_IS_NULL_6C8F32B3 = "columns 不能为空"; + public static final String EXCEPTION_COMMENT_IS_NULL_0AD46118 = "comment 不能为空"; + public static final String EXCEPTION_STATEMENTANALYZERFACTORY_IS_NULL_D309BAB5 = "statementAnalyzerFactory 不能为空"; + public static final String EXCEPTION_FIELD_IS_NULL_80E8CE23 = "field 不能为空"; + public static final String EXCEPTION_PARAMETERS_IS_NULL_418C7892 = "parameters 不能为空"; + public static final String EXCEPTION_TABLEREFERENCE_IS_NULL_C02D3A8F = "tableReference 不能为空"; + public static final String EXCEPTION_QUERY_IS_NULL_689B7978 = "query 不能为空"; + public static final String EXCEPTION_RECURSIVEREFERENCE_IS_NULL_24B9D5DC = "recursiveReference 不能为空"; + public static final String EXCEPTION_ROOT_STATEMENT_IS_ANALYSIS_IS_NULL_36BCD4D1 = + "根语句的分析结果不能为空。"; + public static final String EXCEPTION_ACCESSCONTROL_IS_NULL_F534EBDD = "accessControl 不能为空"; + public static final String EXCEPTION_IDENTITY_IS_NULL_846265BA = "identity 不能为空"; + public static final String EXCEPTION_HANDLE_IS_NULL_E82FA480 = "handle 不能为空"; + public static final String EXCEPTION_TABLENAME_IS_NULL_20708596 = "tableName 不能为空"; + public static final String EXCEPTION_COLUMNNAME_IS_NULL_81635BA6 = "columnName 不能为空"; + public static final String EXCEPTION_AUTHORIZATION_IS_NULL_7CCA692F = "authorization 不能为空"; + public static final String EXCEPTION_VALUETYPE_IS_NULL_A8582B5F = "valueType 不能为空"; + public static final String EXCEPTION_VALUECOERCION_IS_NULL_E1A004BF = "valueCoercion 不能为空"; + public static final String EXCEPTION_SUBQUERYCOERCION_IS_NULL_33646290 = "subqueryCoercion 不能为空"; + public static final String EXCEPTION_PARTITIONBY_IS_NULL_84791B6B = "partitionBy 不能为空"; + public static final String EXCEPTION_ORDERBY_IS_NULL_AA2494DE = "orderBy 不能为空"; + public static final String EXCEPTION_FRAME_IS_NULL_5A92D609 = "frame 不能为空"; + public static final String EXCEPTION_ATLEAST_IS_NULL_2FE8D701 = "atLeast 不能为空"; + public static final String EXCEPTION_ATMOST_IS_NULL_778B3B3A = "atMost 不能为空"; + public static final String EXCEPTION_FILLEDVALUE_IS_NULL_1FA907D6 = "filledValue 不能为空"; + public static final String EXCEPTION_FIELDREFERENCE_IS_NULL_0B07EA50 = "fieldReference 不能为空"; + public static final String EXCEPTION_QUERY_IS_NOT_REGISTERED_AS_EXPANDABLE_FAAD8FC9 = "查询未注册为可扩展"; + public static final String EXCEPTION_EXPRESSION_NOT_ANALYZED_COLON_ARG_D397B665 = "表达式尚未分析:%s"; + public static final String EXCEPTION_EXPRESSION_IS_NOT_A_COLUMN_REFERENCE_COLON_ARG_7957E705 = "表达式不是列引用:%s"; + public static final String EXCEPTION_EXPECTED_JOIN_FIELDS_FOR_LEFT_AND_RIGHT_TO_HAVE_THE_SAME_SIZE_21BFD449 = + "期望左右 join fields 大小一致。"; + public static final String EXCEPTION_NO_COLUMNS_GIVEN_TO_INSERT_52C42E47 = "未给出要插入的列"; + public static final String EXCEPTION_MISSING_FILLANALYSIS_FOR_NODE_ARG_7E5B19A4 = "节点 %s 缺少 FillAnalysis"; + public static final String EXCEPTION_MISSING_OFFSET_VALUE_FOR_NODE_ARG_4B107520 = "节点 %s 缺少 OFFSET 值"; + public static final String EXCEPTION_MISSING_LIMIT_VALUE_FOR_NODE_ARG_DD5FD777 = "节点 %s 缺少 LIMIT 值"; + public static final String EXCEPTION_MISSING_RANGE_FOR_QUANTIFIER_ARG_03461228 = "量词 %s 缺少范围"; + public static final String EXCEPTION_MISSING_UNDEFINED_LABELS_FOR_ARG_CA615EC2 = "%s 缺少未定义标签"; + public static final String EXCEPTION_NO_FIELD_FOR_97419CB1 = "没有对应的 Field:"; + public static final String EXCEPTION_RELATIONID_IS_NULL_C4683108 = "relationId 不能为空"; + public static final String EXCEPTION_FIELDINDEX_MUST_BE_NON_MINUS_NEGATIVE_COMMA_GOT_COLON_ARG_09C2C06D = "fieldIndex 必须为非负数,实际为:%s"; + public static final String EXCEPTION_TYPEMANAGER_IS_NULL_12A72016 = "typeManager 不能为空"; + public static final String EXCEPTION_NODES_IS_NULL_7AB3C1D7 = "nodes 不能为空"; + public static final String EXCEPTION_CLAZZ_IS_NULL_7F710E3E = "clazz 不能为空"; + public static final String EXCEPTION_GROUPBYEXPRESSIONS_IS_NULL_BFDC07D2 = "groupByExpressions 不能为空"; + public static final String EXCEPTION_SOURCESCOPE_IS_NULL_4B3626A7 = "sourceScope 不能为空"; + public static final String EXCEPTION_ORDERBYSCOPE_IS_NULL_A6017E73 = "orderByScope 不能为空"; + public static final String EXCEPTION_NO_FIELD_FOR_E99DCE9A = "没有对应的 field:"; + public static final String EXCEPTION_INVALID_PARAMETER_NUMBER_ARG_COMMA_MAX_VALUES_IS_ARG_B3F5C4E8 = + "无效的参数数量 %s,最大值为 %s。"; + public static final String EXCEPTION_GROUPING_FIELD_ARG_SHOULD_ORIGINATE_FROM_ARG_6DBBCE6B = + "Grouping field %s 应来源于 %s。"; + public static final String EXCEPTION_ALLLABELS_IS_NULL_9F240FB5 = "allLabels 不能为空"; + public static final String EXCEPTION_DESCRIPTOR_IS_NULL_E6EC1F14 = "descriptor 不能为空"; + public static final String EXCEPTION_ARGUMENTS_IS_NULL_B1F6D4F2 = "arguments 不能为空"; + public static final String EXCEPTION_MODE_IS_NULL_54A948DB = "mode 不能为空"; + public static final String EXCEPTION_LABELS_IS_NULL_F4FBBECE = "labels 不能为空"; + public static final String EXCEPTION_MATCHNUMBERCALLS_IS_NULL_EC08D0D0 = "matchNumberCalls 不能为空"; + public static final String EXCEPTION_CLASSIFIERCALLS_IS_NULL_92AA8B77 = "classifierCalls 不能为空"; + public static final String EXCEPTION_LABEL_IS_NULL_B21FE26B = "label 不能为空"; + public static final String EXCEPTION_NAVIGATION_IS_NULL_3D0CBEE1 = "navigation 不能为空"; + public static final String EXCEPTION_ANCHOR_IS_NULL_4AF93E60 = "anchor 不能为空"; + public static final String EXCEPTION_FIELD_CANNOT_BE_NULL_09155004 = "字段不能为空"; + public static final String EXCEPTION_FIELD_QUOTE_ARG_QUOTE_NOT_FOUND_1BC2FDED = "未找到 Field '%s'"; + public static final String EXCEPTION_PARENT_IS_NULL_ED81BAD8 = "parent 不能为空"; + public static final String EXCEPTION_RELATION_IS_NULL_890596ED = "relation 不能为空"; + public static final String EXCEPTION_NAMEDQUERIES_IS_NULL_AFDE9A4A = "namedQueries 不能为空"; + public static final String EXCEPTION_TABLES_IS_NULL_2012309E = "tables 不能为空"; + public static final String EXCEPTION_RELATIONTYPE_IS_NULL_62DDF9C1 = "relationType 不能为空"; + public static final String EXCEPTION_BASISTYPE_IS_NULL_33E4F842 = "basisType 不能为空"; + public static final String EXCEPTION_PARENT_IS_ALREADY_SET_835DE0A5 = "parent 已设置"; + public static final String EXCEPTION_QUERY_QUOTE_ARG_QUOTE_IS_ALREADY_ADDED_F3D47DBD = "Query '%s' 已添加"; + public static final String EXCEPTION_MISSING_SCOPE_D573869F = "缺少 scope"; + public static final String EXCEPTION_MISSING_RELATIONTYPE_679D3CFA = "缺少 relationType"; + public static final String EXCEPTION_SUBQUERYINPREDICATES_IS_NULL_5A37F1C8 = "subqueryInPredicates 不能为空"; + public static final String EXCEPTION_SUBQUERIES_IS_NULL_0D5EA053 = "subqueries 不能为空"; + public static final String EXCEPTION_EXISTSSUBQUERIES_IS_NULL_5EA140F5 = "existsSubqueries 不能为空"; + public static final String EXCEPTION_QUANTIFIEDCOMPARISONS_IS_NULL_A30F5121 = "quantifiedComparisons 不能为空"; + public static final String EXCEPTION_WINDOWFUNCTIONS_IS_NULL_D77C3CD5 = "windowFunctions 不能为空"; + public static final String EXCEPTION_ORIGINTABLE_IS_NULL_18AC52C3 = "originTable 不能为空"; + public static final String EXCEPTION_RELATIONALIAS_IS_NULL_C363AD25 = "relationAlias 不能为空"; + public static final String EXCEPTION_ORIGINCOLUMNNAME_IS_NULL_98607162 = "originColumnName 不能为空"; + public static final String EXCEPTION_METADATA_IS_NULL_6F8F9BA0 = "metadata 不能为空"; + public static final String EXCEPTION_CONTEXT_IS_NULL_E329B664 = "context 不能为空"; + public static final String EXCEPTION_GETRESOLVEDWINDOW_IS_NULL_2438758C = "getResolvedWindow 不能为空"; + public static final String EXCEPTION_GETPREANALYZEDTYPE_IS_NULL_FBB2EC7D = "getPreanalyzedType 不能为空"; + public static final String EXCEPTION_BASESCOPE_IS_NULL_ABE8F618 = "baseScope 不能为空"; + public static final String EXCEPTION_PATTERNRECOGNITIONCONTEXT_IS_NULL_59C665F1 = "patternRecognitionContext 不能为空"; + public static final String EXCEPTION_CORRELATIONSUPPORT_IS_NULL_E0D669BF = "correlationSupport 不能为空"; + public static final String EXCEPTION_FUNCTIONINPUTTYPES_IS_NULL_3030658F = "functionInputTypes 不能为空"; + public static final String EXCEPTION_COLUMN_IS_NULL_0C404041 = "column 不能为空"; + public static final String EXCEPTION_EXPRESSION_NOT_YET_ANALYZED_COLON_ARG_0F4F19B7 = "表达式尚未分析:%s"; + public static final String EXCEPTION_ARG_ALREADY_KNOWN_TO_REFER_TO_ARG_8C8B4F24 = + "%s 已知引用 %s。"; + public static final String EXCEPTION_NO_RESOLVED_WINDOW_FOR_COLON_AED19667 = "没有 resolved window:"; + public static final String EXCEPTION_NO_LABEL_AVAILABLE_8508CE32 = "没有可用 label"; + public static final String EXCEPTION_REWRITES_IS_NULL_4E5AD77A = "rewrites 不能为空"; + public static final String EXCEPTION_STATEMENT_REWRITE_RETURNED_NULL_AB1E89EA = "Statement rewrite 返回了 null"; + public static final String EXCEPTION_ATN_IS_NULL_48BE0D3E = "atn 不能为空"; + public static final String EXCEPTION_LEXER_IS_NULL_88834E18 = "lexer 不能为空"; + public static final String EXCEPTION_PARSER_IS_NULL_AE8E5D6F = "parser 不能为空"; + public static final String EXCEPTION_LEXER_ATN_MISMATCH_COLON_EXPECTED_ARG_COMMA_FOUND_ARG_8ED22CF1 = + "Lexer ATN 不匹配:期望 %s,实际 %s。"; + public static final String EXCEPTION_PARSER_ATN_MISMATCH_COLON_EXPECTED_ARG_COMMA_FOUND_ARG_FF75D61B = + "Parser ATN 不匹配:期望 %s,实际 %s。"; + public static final String EXCEPTION_INITIALIZER_IS_NULL_2EEC3764 = "initializer 不能为空"; + public static final String EXCEPTION_TERMINALNODE_IS_NULL_578F27FD = "terminalNode 不能为空"; + public static final String EXCEPTION_PARSERRULECONTEXT_IS_NULL_9E0DD3B5 = "parserRuleContext 不能为空"; + public static final String EXCEPTION_TOKEN_IS_NULL_43094C56 = "token 不能为空"; + public static final String EXCEPTION_VALUE_IS_NULL_192F6BFF = "值不能为空"; + public static final String EXCEPTION_LOCATION_IS_NULL_F134D388 = "location 不能为空"; + public static final String EXCEPTION_TOPIC_NAME_CAN_NOT_BE_NULL_EA4ED0BF = + "topic name 不能为空"; + public static final String EXCEPTION_SOURCE_NAME_IS_NULL_287E475D = "source name 不能为空"; + public static final String EXCEPTION_TARGET_NAME_IS_NULL_A5F701C6 = "target name 不能为空"; + public static final String EXCEPTION_DBNAME_IS_NULL_4521C4EE = "dbName 不能为空"; + public static final String EXCEPTION_PROPERTIES_IS_NULL_57B88B49 = "properties 不能为空"; + public static final String EXCEPTION_TARGET_IS_NULL_240F0372 = "target 不能为空"; + public static final String EXCEPTION_INDEXNAME_IS_NULL_2525299C = "indexName 不能为空"; + public static final String EXCEPTION_COLUMNLIST_IS_NULL_DADE6825 = "columnList 不能为空"; + public static final String EXCEPTION_SIZE_OF_COLUMNLIST_SHOULD_BE_LARGER_THAN_1_7EB80E55 = "columnList 的大小应大于 1"; + public static final String EXCEPTION_ASSIGNMENTS_IS_NULL_1FD6142D = "assignments 不能为空"; + public static final String EXCEPTION_PIPE_NAME_CAN_NOT_BE_NULL_14570979 = + "pipe name 不能为空"; + public static final String EXCEPTION_SQL_IS_NULL_BEDB2B7A = "sql 不能为空"; + public static final String EXCEPTION_SERVICENAME_IS_NULL_1009BA39 = "serviceName 不能为空"; + public static final String EXCEPTION_CANNOT_GET_NON_MINUS_DEFAULT_VALUE_OF_PROPERTY_ARG_SINCE_ITS_VALUE_IS_SET_TO_DEF_E7D3185F = + "无法获取属性 %s 的非默认值,因为其值已设置为 DEFAULT。"; + public static final String EXCEPTION_STATEMENTNAME_IS_NULL_C03BB8D4 = "statementName 不能为空"; + public static final String EXCEPTION_CATALOGNAME_IS_NULL_2E3C3C6B = "catalogName 不能为空"; + public static final String EXCEPTION_SOURCE_IS_NULL_45946547 = "source 不能为空"; + public static final String EXCEPTION_SUBSCRIPTION_ID_CAN_NOT_BE_NULL_0CDFFD7D = + "subscription id 不能为空"; + public static final String EXCEPTION_DB_IS_NULL_E1AD1B58 = "db 不能为空"; + public static final String EXCEPTION_TOPIC_ATTRIBUTES_CAN_NOT_BE_NULL_791A8FED = + "topic attributes 不能为空"; + public static final String EXCEPTION_EXTRACTOR_SLASH_SOURCE_ATTRIBUTES_CAN_NOT_BE_NULL_2B3A656B = + "extractor/source attributes 不能为空"; + public static final String EXCEPTION_PROCESSOR_ATTRIBUTES_CAN_NOT_BE_NULL_FFF91008 = + "processor attributes 不能为空"; + public static final String EXCEPTION_CONNECTOR_ATTRIBUTES_CAN_NOT_BE_NULL_7AF2F613 = + "connector attributes 不能为空"; + public static final String EXCEPTION_CLASSNAME_IS_NULL_3902B37C = "className 不能为空"; + public static final String EXCEPTION_PLUGIN_NAME_CAN_NOT_BE_NULL_92F0F4D6 = + "plugin name 不能为空"; + public static final String EXCEPTION_CLASS_NAME_CAN_NOT_BE_NULL_1D276677 = + "class name 不能为空"; + public static final String EXCEPTION_URI_CAN_NOT_BE_NULL_B3535EDC = + "uri 不能为空"; + public static final String EXCEPTION_STATEMENT_IS_NULL_693A0622 = "statement 不能为空"; + public static final String EXCEPTION_UDFNAME_IS_NULL_83E9039B = "udfName 不能为空"; + public static final String EXCEPTION_URISTRING_IS_NULL_E7458C6A = "uriString 不能为空"; + public static final String EXCEPTION_FILEPATH_IS_NULL_84CE8A66 = "filePath 不能为空"; + public static final String EXCEPTION_DETAILS_IS_NULL_8EDEEA03 = "details 不能为空"; + public static final String EXCEPTION_COLUMNCATEGORY_IS_NULL_0075924B = "columnCategory 不能为空"; + public static final String EXCEPTION_ARGUMENTNAME_IS_NULL_7F8F665F = "argumentName 不能为空"; + public static final String EXCEPTION_PASSEDARGUMENTS_IS_NULL_98D8CB1F = "passedArguments 不能为空"; + public static final String EXCEPTION_TABLEARGUMENTANALYSES_IS_NULL_C8724E40 = "tableArgumentAnalyses 不能为空"; + public static final String EXCEPTION_ARGUMENT_IS_NULL_0CBBD22B = "argument 不能为空"; + public static final String EXCEPTION_TABLEARGUMENTANALYSIS_IS_NULL_CF9F0E25 = "tableArgumentAnalysis 不能为空"; + public static final String EXCEPTION_RULE_IS_NULL_5387C8CC = "rule 不能为空"; + public static final String EXCEPTION_CANNOT_MERGE_STATS_FOR_DIFFERENT_RULES_COLON_ARG_AND_ARG_F0A5D5E6 = + "无法合并不同规则的统计信息:%s 和 %s。"; + public static final String EXCEPTION_SCALAR_SUBQUERY_RESULT_SHOULD_ONLY_HAVE_ONE_COLUMN_DOT_893F76CB = "Scalar Subquery 结果只能有一列。"; + public static final String EXCEPTION_SCALAR_SUBQUERY_RESULT_SHOULD_ONLY_HAVE_ONE_ROW_DOT_F9007BBC = "Scalar Subquery 结果只能有一行。"; + public static final String EXCEPTION_SCALAR_SUBQUERY_RESULT_SHOULD_NOT_GET_NULL_DATATYPE_OR_NULL_COLUMN_DOT_616056F4 = + "Scalar Subquery 结果不应得到 null dataType 或 null 列。"; + public static final String EXCEPTION_OPERATOR_IS_NULL_F5BB9F59 = "operator 不能为空"; + public static final String EXCEPTION_EXPRESSIONS_IS_NULL_C44D9384 = "expressions 不能为空"; + public static final String EXCEPTION_CORRELATION_IS_NULL_F8327EAD = "correlation 不能为空"; + public static final String EXCEPTION_CORRELATEDPREDICATES_IS_NULL_5FCB8011 = "correlatedPredicates 不能为空"; + public static final String EXCEPTION_GROUPING_KEYS_WERE_CORRELATED_EE1C8406 = "分组键存在关联"; + public static final String EXCEPTION_EXPECTED_CONSTANT_SYMBOLS_TO_CONTAIN_ALL_CORRELATED_SYMBOLS_LOCAL_EQUIVALENTS_E20CB055 = "期望常量符号包含所有关联符号的本地等价符号"; + public static final String EXCEPTION_EXPECTED_SYMBOLS_TO_PROPAGATE_TO_CONTAIN_ALL_CONSTANT_SYMBOLS_C9D876E4 = "期望要传播的符号包含所有常量符号"; + public static final String EXCEPTION_CARDINALITYRANGE_IS_NULL_8FDEE0B4 = "cardinalityRange 不能为空"; + public static final String EXCEPTION_METADATAEXPRESSIONS_IS_NULL_3752914C = "metadataExpressions 不能为空"; + public static final String EXCEPTION_EXPRESSIONSCANPUSHDOWN_IS_NULL_DC8DFEB3 = "expressionsCanPushDown 不能为空"; + public static final String EXCEPTION_EXPRESSIONSCANNOTPUSHDOWN_IS_NULL_63BC9AF9 = "expressionsCannotPushDown 不能为空"; + public static final String EXCEPTION_FILTER_PREDICATE_OF_FILTERNODE_IS_NULL_C3964179 = + "FilterNode 的过滤谓词为空。"; + public static final String EXCEPTION_UNSUPPORTED_JOIN_TYPE_COLON_ARG_9FB6751B = "不支持的 join type: %s"; + public static final String EXCEPTION_UNIQUEID_IN_PREDICATE_IS_NOT_YET_SUPPORTED_7B5D2EAF = "predicate 中暂不支持 UniqueId"; + public static final String EXCEPTION_MAPPERPROVIDER_IS_NULL_472725D5 = "mapperProvider 不能为空"; + public static final String EXCEPTION_CORRELATIONMAPPING_IS_NULL_9D595C82 = "correlationMapping 不能为空"; + public static final String EXCEPTION_MAPPINGS_IS_NULL_23BD9025 = "mappings 不能为空"; + public static final String EXCEPTION_AGGREGATE_WITH_ORDER_BY_DOES_NOT_SUPPORT_PARTIAL_AGGREGATION_D5BDD21F = "带 ORDER BY 的聚合不支持部分聚合"; + public static final String EXCEPTION_LEFTEFFECTIVEPREDICATE_MUST_ONLY_CONTAIN_SYMBOLS_FROM_LEFTSYMBOLS_DB3259B8 = + "leftEffectivePredicate 只能包含 leftSymbols 中的 symbols。"; + public static final String EXCEPTION_RIGHTEFFECTIVEPREDICATE_MUST_ONLY_CONTAIN_SYMBOLS_FROM_RIGHTSYMBOLS_4B97238D = + "rightEffectivePredicate 只能包含 rightSymbols 中的 symbols。"; + public static final String EXCEPTION_OUTEREFFECTIVEPREDICATE_MUST_ONLY_CONTAIN_SYMBOLS_FROM_OUTERSYMBOLS_99FC2AA9 = + "outerEffectivePredicate 只能包含 outerSymbols 中的 symbols。"; + public static final String EXCEPTION_INNEREFFECTIVEPREDICATE_MUST_ONLY_CONTAIN_SYMBOLS_FROM_INNERSYMBOLS_ECB7C6A2 = + "innerEffectivePredicate 只能包含 innerSymbols 中的 symbols。"; + public static final String EXCEPTION_IDALLOCATOR_IS_NULL_752B308D = "idAllocator 不能为空"; + public static final String EXCEPTION_PLANOPTIMIZERSSTATSCOLLECTOR_IS_NULL_9DA4B0CC = "planOptimizersStatsCollector 不能为空"; + public static final String EXCEPTION_SUBQUERY_RESULT_TYPE_MUST_BE_ORDERABLE_82AF0EFA = "子查询结果类型必须可排序"; + public static final String EXCEPTION_ALL_THE_NON_CORRELATED_SUBQUERIES_SHOULD_BE_REWRITTEN_AT_THIS_POINT_B4614541 = "执行到这里时,所有非关联子查询都应已被重写"; + public static final String EXCEPTION_CHANGEDPLANNODES_IS_NULL_5ECBDE28 = "changedPlanNodes 不能为空"; + public static final String EXCEPTION_MAPPINGFUNCTION_IS_NULL_212D6109 = "mappingFunction 不能为空"; + public static final String EXCEPTION_ROOT_NODE_MUST_RETURN_ONLY_ONE_FF42061C = "根节点只能返回一个结果"; + public static final String EXCEPTION_SIZE_OF_TOPKNODE_CAN_ONLY_BE_1_IN_LOGICAL_PLAN_DOT_DB32E3C5 = "逻辑计划中的 TopKNode 大小只能为 1。"; + public static final String EXCEPTION_THE_SIZE_OF_LEFT_CHILDREN_NODE_OF_JOINNODE_SHOULD_BE_1_F3437368 = "JoinNode 的左子节点数量应为 1"; + public static final String EXCEPTION_THE_SIZE_OF_RIGHT_CHILDREN_NODE_OF_JOINNODE_SHOULD_BE_1_6BA167CF = "JoinNode 的右子节点数量应为 1"; + public static final String EXCEPTION_THE_SIZE_OF_LEFT_CHILDREN_NODE_OF_SEMIJOINNODE_SHOULD_BE_1_FFEE3F41 = "SemiJoinNode 的左子节点数量应为 1"; + public static final String EXCEPTION_THE_SIZE_OF_RIGHT_CHILDREN_NODE_OF_SEMIJOINNODE_SHOULD_BE_1_AE90C4B8 = "SemiJoinNode 的右子节点数量应为 1"; + public static final String EXCEPTION_CHILDRENNODES_SHOULD_NOT_BE_NULL_DOT_0C93B063 = "childrenNodes 不能为空."; + public static final String EXCEPTION_CHILDRENNODES_SHOULD_NOT_BE_EMPTY_DOT_E5555FD9 = "childrenNodes 不能为空。"; + public static final String EXCEPTION_SIZE_OF_TOPKRANKINGNODE_CAN_ONLY_BE_1_IN_LOGICAL_PLAN_DOT_20D6A513 = "逻辑计划中的 TopKRankingNode 大小只能为 1。"; + public static final String EXCEPTION_STATS_IS_NULL_D3627E6A = "stats 不能为空"; + public static final String EXCEPTION_USELEGACYRULES_IS_NULL_0AD13CAB = "useLegacyRules 不能为空"; + public static final String EXCEPTION_RULES_IS_NULL_DF243716 = "rules 不能为空"; + public static final String EXCEPTION_EXPECTED_CHILD_TO_BE_A_GROUP_REFERENCE_DOT_FOUND_COLON_EC01971C = + "期望子节点为 group reference。实际:"; + public static final String EXCEPTION_TIMEOUT_HAS_TO_BE_A_NON_MINUS_NEGATIVE_NUMBER_LEFT_BRACKET_MILLISECONDS_RIGHT_BR_5201D8B3 = "Timeout 必须为非负数 [milliseconds]"; + public static final String EXCEPTION_NODE_QUOTE_ARG_QUOTE_IS_NOT_A_GROUPREFERENCE_73C8C127 = "节点 '%s' 不是 GroupReference"; + public static final String EXCEPTION_MEMBER_IS_NULL_466D8670 = "member 不能为空"; + public static final String EXCEPTION_INVALID_GROUP_COLON_ARG_C0BAD253 = "无效的 group: %s"; + public static final String EXCEPTION_ARG_COLON_TRANSFORMED_EXPRESSION_DOESN_QUOTE_T_PRODUCE_SAME_OUTPUTS_COLON_ARG_VS_F9BAF138 = "%s:转换后的表达式产生的输出不同:%s vs %s"; + public static final String EXCEPTION_CANNOT_DELETE_GROUP_THAT_HAS_INCOMING_REFERENCES_83C9D700 = + "无法删除存在传入引用的 group。"; + public static final String EXCEPTION_REFERENCE_TO_REMOVE_NOT_FOUND_2EB93289 = + "未找到待移除的引用。"; + public static final String EXCEPTION_TRANSFORMEDPLAN_IS_NULL_83B2099A = "transformedPlan 不能为空"; + public static final String EXCEPTION_NEWCHILDREN_IS_NOT_EMPTY_170FCE18 = "newChildren 非空"; + public static final String EXCEPTION_GROUPINGSETS_IS_NULL_8EE6D9BF = "groupingSets 不能为空"; + public static final String EXCEPTION_PREGROUPEDSYMBOLS_IS_NULL_DC24FF7B = "preGroupedSymbols 不能为空"; + public static final String EXCEPTION_GROUPING_COLUMNS_DOES_NOT_CONTAIN_GROUPID_COLUMN_83976C83 = "分组列不包含 groupId 列"; + public static final String EXCEPTION_ORDER_BY_DOES_NOT_SUPPORT_DISTRIBUTED_AGGREGATION_05109B26 = "ORDER BY 不支持分布式聚合"; + public static final String EXCEPTION_DATE_BIN_FUNCTION_MUST_BE_THE_LAST_GROUPINGKEY_EE955FF5 = + "date_bin 函数必须是最后一个 GroupingKey。"; + public static final String EXCEPTION_PRE_MINUS_GROUPED_SYMBOLS_MUST_BE_A_SUBSET_OF_THE_GROUPING_KEYS_AFC6C33D = + "预分组符号必须是分组键的子集。"; + public static final String EXCEPTION_EXPECTED_AGGREGATION_TO_HAVE_DISTINCT_INPUT_EC6AF059 = "期望聚合包含 DISTINCT 输入"; + public static final String EXCEPTION_MISMATCHED_CHILD_LEFT_PAREN_ARG_RIGHT_PAREN_AND_PERMITTED_OUTPUTS_LEFT_PAREN_ARG_57801144 = "子节点 (%s) 与允许输出 (%s) 的大小不匹配"; + public static final String EXCEPTION_MISSING_TYPE_FOR_EXPRESSION_3D66D302 = "缺少表达式类型"; + public static final String EXCEPTION_EXCEPTNODE_TRANSLATION_RESULT_HAS_NO_COUNT_SYMBOLS_8653930E = "ExceptNode 翻译结果中没有计数符号"; + public static final String EXCEPTION_UNEXPECTED_CORRELATED_JOIN_TYPE_COLON_ARG_27E8EC42 = "意外的 correlated join 类型:%s"; + public static final String EXCEPTION_CORRELATION_IN_ARG_JOIN_2F78ACC3 = "%s JOIN 中的关联"; + public static final String EXCEPTION_PLANNODE_IS_NULL_49FBBFCF = "planNode 不能为空"; + public static final String EXCEPTION_COUNTSYMBOLS_IS_NULL_416D96FB = "countSymbols 不能为空"; + public static final String EXCEPTION_ROWNUMBERSYMBOL_IS_NULL_BA30E0AA = "rowNumberSymbol 不能为空"; + public static final String EXCEPTION_CANNOT_SIMPLIFY_A_UNIONNODE_9D5B09A7 = "无法简化 UnionNode"; + public static final String EXCEPTION_THE_SIZE_OF_MARKERS_SHOULD_BE_SAME_AS_THE_SIZE_OF_COUNT_OUTPUT_SYMBOLS_6DBDD287 = "markers 的数量应与计数输出符号的数量相同"; + public static final String EXCEPTION_ROWNUMBERSYMBOL_IS_EMPTY_34FE9565 = + "rowNumberSymbol 为空"; + public static final String EXCEPTION_EXPECTED_SUBQUERY_OUTPUT_SYMBOLS_TO_BE_PRUNED_13B84182 = "期望子查询输出符号已被剪枝"; + public static final String EXCEPTION_TYPEANALYZER_IS_NULL_3106B188 = "typeAnalyzer 不能为空"; + public static final String EXCEPTION_UNEXPECTED_CORRELATEDJOIN_TYPE_COLON_47A368C1 = "意外的 CorrelatedJoin 类型:"; + public static final String EXCEPTION_UNEXPECTED_NULL_LITERAL_WITHOUT_A_CAST_TO_BOOLEAN_D399CFCB = "意外的 null 字面量,未 cast 为 boolean"; + public static final String EXCEPTION_REWRITER_IS_NULL_B0D8CC88 = "rewriter 不能为空"; + public static final String EXCEPTION_UNEXPECTED_NODE_TYPE_COLON_ARG_B1C0328F = "意外的节点类型:%s"; + public static final String EXCEPTION_RESULT_IS_NULL_031E2F89 = "结果不能为空"; + public static final String EXCEPTION_DISTINCT_NOT_SUPPORTED_0E97D0BB = "不支持 distinct"; + public static final String EXCEPTION_EXPRESSION_IS_NOT_ANALYZED_LEFT_PAREN_ARG_RIGHT_PAREN_COLON_ARG_DAE760B6 = "Expression 尚未分析(%s):%s"; + public static final String EXCEPTION_SYMBOL_REFERENCES_ARE_NOT_ALLOWED_93779D6C = "不允许使用 symbol references"; + public static final String EXCEPTION_EXPRESSION_INTERPRETER_RETURNED_AN_UNRESOLVED_EXPRESSION_5BCE9A51 = "表达式解释器返回了未解析的表达式"; + public static final String EXCEPTION_NULL_OPERAND_SHOULD_HAVE_BEEN_REMOVED_BY_RECURSIVE_COALESCE_PROCESSING_B6D4D443 = "空操作数应已在递归 coalesce 处理中移除"; + public static final String EXCEPTION_NULL_VALUE_IS_EXPECTED_TO_BE_REPRESENTED_AS_NULL_COMMA_NOT_NULLLITERAL_9B96D25A = "空值应表示为 null,而不是 NullLiteral"; + } diff --git a/iotdb-core/datanode/src/main/i18n/zh/org/apache/iotdb/db/i18n/DataNodeSchemaMessages.java b/iotdb-core/datanode/src/main/i18n/zh/org/apache/iotdb/db/i18n/DataNodeSchemaMessages.java index 7737026640942..cbf8461713013 100644 --- a/iotdb-core/datanode/src/main/i18n/zh/org/apache/iotdb/db/i18n/DataNodeSchemaMessages.java +++ b/iotdb-core/datanode/src/main/i18n/zh/org/apache/iotdb/db/i18n/DataNodeSchemaMessages.java @@ -35,6 +35,8 @@ public final class DataNodeSchemaMessages { "SchemaRegion(id = {}) 已被删除,已跳过"; public static final String FAILED_TO_GET_TABLE_FOR_TIMESERIES_COUNT = "计算时间序列数量时获取表 {}.{} 失败,可能是集群正在重启或表正在被删除。"; + public static final String TREE_VIEW_TABLE_CANNOT_BE_WRITTEN_OR_DELETED = + "表 %s.%s 是树模型视图,不能写入或删除"; public static final String PEER_IS_SHUTTING_DOWN = "节点正在关闭中。"; public static final String SCHEMA_REGION_DUPLICATED = "SchemaRegion [%s] 在 [%s] 和 [%s] 之间重复,前者已被恢复。"; @@ -414,7 +416,7 @@ public final class DataNodeSchemaMessages { public static final String TIMESERIES_TYPE_NOT_COMPATIBLE = "时间序列 %s 使用的新类型 %s 与已有类型 %s 不兼容"; public static final String ALIAS_DUPLICATED = - "别名与其他测量的名称或别名重复,别名:"; + "别名与其他测点的名称或别名重复,别名:"; public static final String LOGICAL_VIEW_NODE_TYPE_ERROR = "newMNode 的类型不是 LogicalViewMNode!实际类型为 "; public static final String TEMPLATE_SHOULD_MOUNTED_ON_ANCESTOR = @@ -596,4 +598,118 @@ public final class DataNodeSchemaMessages { public static final String ILLEGAL_PATH_LOG = "非法路径 {}"; private DataNodeSchemaMessages() {} + // --------------------------------------------------------------------------- + // 补充日志消息 + // --------------------------------------------------------------------------- + public static final String SCHEMA_LOG_FLUSHING_WORKING_MEMTABLE_ADD_CURRENT_QUERY_CONTEXT_TO_IMMUTABLE_7B7CD373 = + "Flushing/Working MemTable - 将当前查询上下文添加到 immutable TVList 的查询列表"; + public static final String SCHEMA_LOG_FLUSHING_MEMTABLE_ADD_CURRENT_QUERY_CONTEXT_TO_MUTABLE_TVLIST_BEB0D766 = + "Flushing MemTable - 将当前查询上下文添加到 mutable TVList 的查询列表"; + public static final String SCHEMA_LOG_WORKING_MEMTABLE_ADD_CURRENT_QUERY_CONTEXT_TO_MUTABLE_TVLIST_8C937414 = + "Working MemTable - 当其已排序或没有其他查询时,将当前查询上下文添加到 mutable TVList 的查询列表"; + public static final String SCHEMA_LOG_WORKING_MEMTABLE_CLONE_MUTABLE_TVLIST_AND_REPLACE_OLD_TVLIST_FD1EAE22 = + "Working MemTable - 克隆 mutable TVList 并替换 working MemTable 中的旧 TVList"; + public static final String PATH_DOES_NOT_START_WITH_FMT = "%s 不是以 %s 开头"; + public static final String ALIAS_DUPLICATED_FULLPATH_OTHER_MEASUREMENT_FMT = + "别名与其他测点的名称或别名重复,别名:%s,完整路径:%s,其他测点:%s"; + public static final String TAG_ACTION_DELETE = "删除"; + public static final String TAG_ACTION_UPSERT = "更新插入"; + public static final String TAG_ACTION_DROP = "移除"; + public static final String TAG_ACTION_SET = "设置"; + public static final String TAG_ACTION_RENAME = "重命名"; + public static final String NESTED_LOGICAL_VIEW_UNSUPPORTED_FMT = + "视图 [%s] 的源也是一个视图!不支持嵌套视图,请检查。"; + public static final String GET_SCHEMA_AS_LOGICAL_VIEW_SCHEMA_UNSUPPORTED = + "DeviceUsingTemplateSchemaCache 不支持函数 getSchemaAsLogicalViewSchema。"; + public static final String DEVICE_TEMPLATE_ALREADY_ACTIVATED_ON_PATH_FMT = + "路径 %s 上的设备模板已经被激活,无需重复激活。"; + public static final String SOME_TASK_DELETING_TIMESERIES_FMT = + "某个任务正在删除时间序列 [%s]"; + public static final String PATH_ALREADY_EXIST_FMT = "路径 [%s] 已存在"; + public static final String MNODE_TYPE_MISMATCH_FMT = "MNode [%s] 不是 %s。"; + public static final String ALIAS_FOR_PATH_ALREADY_EXIST_FMT = + "别名 [%s] 对应路径 [%s] 已存在"; + public static final String DATABASE_NOT_SET_FOR_SERIES_PATH_FMT = + "%s,当前 seriesPath:[%s]"; + public static final String DATABASE_ALREADY_CREATED_AS_DATABASE_FMT = + "%s 已被创建为数据库"; + public static final String SCHEMA_QUOTA_EXCEEDED_FMT = + "当前元数据容量已超过集群配额。请检查 ConfigNode 上的配置,或删除一些已有的 %s 以满足配额限制。"; + public static final String DATABASE_QUOTA_EXCEEDED_FMT = + "当前数据库数量已超过集群配额。集群允许的最大数据库数量为 %d,请检查 ConfigNode 上的 " + + "database_limit_threshold 配置,或删除一些已有数据库以满足配额限制。"; + public static final String SERIES_OVERFLOW_FMT = + "未使用设备模板的内存时间序列过多(当前内存:%s,序列数量:%s)。为优化内存,当设备具有相同时间序列时,更推荐使用设备模板。"; + public static final String ILLEGAL_PARAMETER_FAILED_CREATE_TIMESERIES_FMT = + "%s。为路径 %s 创建时间序列失败"; + public static final String PATH_NOT_EXIST_WRONG_MESSAGE = "路径 [%s] 不存在"; + public static final String SOURCE_PATH_NOT_EXIST_WRONG_MESSAGE = + "源路径 [%s] 对应视图 [%s] 不存在。"; + public static final String NORMAL_TIMESERIES_NOT_EXIST_WRONG_MESSAGE = + "时间序列 [%s] 不存在或由设备模板表示"; + public static final String TEMPLATE_TIMESERIES_NOT_EXIST_WRONG_MESSAGE = + "时间序列 [%s] 不存在或不是由设备模板表示"; + public static final String VIEW_NOT_EXIST_WRONG_MESSAGE = "视图 [%s] 不存在"; + public static final String PATH_LIST_ELLIPSIS_SEPARATOR = " ... "; + public static final String REGISTERED_TYPE_STRING = "注册类型"; + public static final String NULL_VALUE = "null"; + public static final String DATA_TYPE_MISMATCH_REGISTERED_TYPE_FMT = + "%s.%s 的数据类型不一致,%s %s,插入类型 %s,时间戳 %s,值 %s"; + public static final String DATA_TYPE_AND_VALUE_MISMATCH_FMT = + "%s.%s 的数据类型和值不一致,插入类型 %s,时间戳 %s,值 %s"; + public static final String SCHEMA_DIR_CREATION_FAILED_FMT = + "创建数据库 schema 文件夹 %s 失败。"; + public static final String MNODE_NOT_PINNED = "MNode 尚未被固定。"; + public static final String MNODE_NOT_CACHED = "MNode 尚未被缓存或已被淘汰。"; + public static final String TEMPLATE_IS_IN_USE_ON_FMT = "模板正在 %s 上使用"; + public static final String CANNOT_CREATE_TIMESERIES_TEMPLATE_SET_FMT = + "无法创建时间序列 [%s],因为设备模板 [%s] 已设置在路径 [%s] 上。"; + public static final String CANNOT_SET_DEVICE_TEMPLATE_TIMESERIES_UNDER_PATH_FMT = + "无法将设备模板 [%s] 设置到路径 [%s],因为路径 [%s] 下已有时间序列。"; + public static final String FAILED_CREATE_DUPLICATED_TEMPLATE_FMT = + "为路径 %s 创建重复模板失败"; + public static final String TEMPLATE_ON_PATH_DIFFERENT_FROM_FMT = + "%s 上的模板与 %s 不同"; + public static final String UNDEFINED_TEMPLATE_NAME_FMT = "未定义的模板名:%s"; + public static final String COLOSSAL_RECORD_FMT = + "key [%s] 的记录过大,SchemaFile 无法存储,内容大小:%d"; + public static final String KEY_TOO_LARGE_FOR_INTERNAL_PAGE_FMT = + "Key [%s] 过大,无法作为索引项存储在 InternalPage 中。"; + public static final String KEY_ALIAS_PAIR_TOO_LARGE_FMT = + "Key-Alias 对 (%s, %s) 过大,SchemaFile 无法存储。"; + public static final String SEGMENT_OVERFLOW_FMT = "Segment 溢出:%d"; + public static final String SEGMENT_NOT_ENOUGH_SPACE = "Segment 空间不足"; + public static final String SEGMENT_NOT_ENOUGH_SPACE_AFTER_SPLIT_FMT = + "Segment 即使 split 和 compact 后仍没有足够空间插入:%s"; + public static final String SEGMENT_NOT_FOUND_FMT = + "Segment(index:%d) 在 page(index:%d) 中未找到。"; + public static final String SEGMENT_IS_NOT_LAST_FMT = + "Segment(index:%d) 不是 page 中的最后一个 segment"; + public static final String NO_SPLITTABLE_SEGMENT_FOUND_FMT = + "在 page [%s] 中未找到可 split 的 segment"; + public static final String PBTREE_FILE_LOG_CORRUPTED_FMT = + "PBTreeFileLog [%s] 因 [%s] 损坏。"; + public static final String RECORD_DUPLICATED_FMT = "Segment 存在重复 record key:%s"; + public static final String PBTREE_FILE_NOT_EXISTS_FMT = "PBTree 文件 [%s] 不存在。"; + public static final String SCHEMA_PAGE_OVERFLOW_FMT = + "pbtree 文件中的 Page [%s] 空间耗尽或包含过多 segment。"; + public static final String SOURCE_PATH_DELETED_FMT = "源路径 [%s] 已被删除"; + public static final String BROKEN_VIEW_UNMATCHED_FMT = + "视图已损坏!源路径 [%s] 映射到不匹配的 %s 个路径:%s。"; + public static final String INSERT_NON_WRITABLE_VIEW_FMT = + "无法向不是别名序列的视图插入数据。(视图路径:%s)"; + public static final String INSERT_NON_WRITABLE_VIEW = + "无法向不是别名序列的视图插入数据。"; + public static final String DATABASE_NOT_SET = "未设置数据库"; + public static final String DUPLICATE_INSERTION_WRONG_MESSAGE = + "插入非法,因为设备 [%s] 下的测点 [%s] 重复。"; + public static final String VIEW_IS_UNSUPPORTED_FMT = "视图不受支持,原因:%s"; + public static final String VIEW_CONTAINS_AGGREGATION_FUNCTION_FMT = + "该视图包含名为 [%s] 的聚合函数"; + public static final String EXCEPTION_OPERATORCONTEXT_IS_NULL_D15B1EDB = "operatorContext 不能为空"; + public static final String EXCEPTION_CHILD_OPERATOR_IS_NULL_8860113C = "child operator 不能为空"; + public static final String EXCEPTION_DOT_9D9B854A = "."; + public static final String EMPTY_MESSAGE = ""; + public static final String EXCEPTION_COMMA_50AD1C01 = ", "; + } diff --git a/iotdb-core/datanode/src/main/i18n/zh/org/apache/iotdb/db/i18n/StorageEngineMessages.java b/iotdb-core/datanode/src/main/i18n/zh/org/apache/iotdb/db/i18n/StorageEngineMessages.java index e488c40067ea9..e1d592a7d6cd4 100644 --- a/iotdb-core/datanode/src/main/i18n/zh/org/apache/iotdb/db/i18n/StorageEngineMessages.java +++ b/iotdb-core/datanode/src/main/i18n/zh/org/apache/iotdb/db/i18n/StorageEngineMessages.java @@ -495,6 +495,22 @@ private StorageEngineMessages() {} public static final String FAILED_TO_CREATE_TARGET_DIR = "创建目标目录失败: "; public static final String FAILED_LOAD_ACTIVE_LISTENING_DIRS = "加载 Active 监听目录失败"; public static final String INVALID_PARAMETER = "无效的参数 '"; + public static final String INVALID_PARAMETER_FOR_LOAD_TSFILE_COMMAND = + "LOAD TSFILE 命令中的参数 '%s' 无效。"; + public static final String LOAD_TSFILE_DATABASE_KEY_AND_NAME_CANNOT_COEXIST = + "参数键 '%s' 和 '%s' 不能同时存在。"; + public static final String DATABASE_LEVEL_LESS_THAN_MINIMUM = + "给定的数据库层级 %d 小于最小值 %d,请输入有效的数据库层级。"; + public static final String DATABASE_LEVEL_NOT_VALID_INTEGER = + "给定的数据库层级 %s 不是有效整数,请输入有效的数据库层级。"; + public static final String ON_SUCCESS_VALUE_NOT_SUPPORTED = + "给定的参数值 '%s' 不受支持,请输入有效值。"; + public static final String PARAMETER_VALUE_NOT_SUPPORTED_BOOLEAN = + "给定的 %s 值 '%s' 不受支持,请输入有效的布尔值。"; + public static final String TABLET_CONVERSION_THRESHOLD_NON_NEGATIVE = + "tablet 转换阈值必须是非负 long 值。"; + public static final String TABLET_CONVERSION_THRESHOLD_NOT_VALID_LONG = + "tablet 转换阈值 '%s' 不是有效的 long 值。"; public static final String UTILITY_CLASS = "工具类"; public static final String TSFILE_DATA_BYTE_ARRAY_SIZE_MISMATCH = "TsFileData 字节数组读取错误,大小不匹配。"; public static final String UNKNOWN_TSFILE_DATA_TYPE = "未知的 TsFileData 类型: "; @@ -531,4 +547,857 @@ private StorageEngineMessages() {} public static final String FAILED_TO_FIND_DATA_REGION = "共识组 %s 底层状态机创建失败, 因为 DataRegion 没找到。"; public static final String DATA_REGION_IS_NULL = "Data region 是空"; + // --------------------------------------------------------------------------- + // 补充日志消息 + // --------------------------------------------------------------------------- + public static final String STORAGE_LOG_STORAGE_ENGINE_RECOVER_COST_S_C8AEE9D9 = + "存储引擎恢复耗时:{}s。"; + public static final String STORAGE_LOG_DATA_REGIONS_HAVE_BEEN_RECOVERED_D5BD3A80 = + "DataRegion 已恢复 {}/{}"; + public static final String STORAGE_LOG_TSFILE_RESOURCE_RECOVER_COST_S_41F074E0 = + "TsFileResource 恢复耗时:{}s。"; + public static final String STORAGE_LOG_CONSTRUCT_A_DATA_REGION_INSTANCE_THE_DATABASE_IS_THREAD_17A16BDF = + "构造 DataRegion 实例,database 为 {},线程为 {}"; + public static final String STORAGE_LOG_DATAREGION_NOT_FOUND_ON_THIS_DATANODE_WHEN_WRITING_PIECE_E5B5A888 = + "DataRegion {} 在该 DataNode 上未找到,写入 TsFile {} 的片段节点时将跳过(可能由于 Region 迁移)。"; + public static final String STORAGE_LOG_IO_ERROR_WHEN_WRITING_PIECE_NODE_OF_TSFILE_TO_DATAREGION_946738F2 = + "将 TsFile {} 的片段节点写入 DataRegion {} 时发生 IO 错误。"; + public static final String STORAGE_LOG_EXCEPTION_OCCURRED_WHEN_WRITING_PIECE_NODE_OF_TSFILE_TO_9EDD09BD = + "将 TsFile {} 的片段节点写入 DataRegion {} 时发生异常。"; + public static final String STORAGE_LOG_FAILED_TO_RECOVER_DATA_REGION_804B162D = + "无法恢复 data Region {}[{}]"; + public static final String STORAGE_LOG_ERROR_OCCURS_WHEN_DELETING_DATA_REGION_8C07B7A0 = + "删除 DataRegion {}-{} 时发生错误"; + public static final String STORAGE_LOG_NEXT_LOAD_CLEANUP_TASK_IS_NOT_READY_TO_RUN_WAIT_FOR_AT_LEAST_CBE0023F = + "下一个 Load 清理任务 {} 尚未就绪,至少等待 {} ms({}s)。"; + public static final String STORAGE_LOG_WRITER_FOR_PARTITION_IS_ALREADY_WRITING_CHUNK_GROUP_FOR_903B1D66 = + "Writer {} 已在 partition {} 上为 device {} 写入 chunk group,但上一个 device 为 {}。"; + public static final String STORAGE_LOG_CAN_NOT_CREATE_MODIFICATIONFILE_FOR_WRITING_17D14C11 = + "无法创建用于写入的 ModificationFile {}。"; + public static final String STORAGE_LOG_SKIP_RECOVERING_DATA_REGION_WHEN_CONSENSUS_PROTOCOL_IS_RATIS_43A6A699 = + "共识协议为 Ratis 且存储引擎未就绪时,跳过恢复 DataRegion {}[{}]。"; + public static final String STORAGE_LOG_WON_T_INSERT_TABLET_BECAUSE_C2DC8032 = + "不会插入 tablet {},原因:{}"; + public static final String STORAGE_LOG_TIMESTAMP_MEASUREMENTID_IDEVICEID_04A5AE37 = + "时间戳 {}, measurementId {}, ideviceId {}"; + public static final String STORAGE_LOG_DELETION_SKIPPED_FILE_TIME_DD653236 = + "[Deletion] {} 跳过 {},文件时间 [{}, {}]"; + public static final String STORAGE_LOG_DEVICE_IS_DEVICETABLE_IS_TABLEDELETIONENTRY_GETPREDICATE_E84489E9 = + "device 为 {},deviceTable 为 {},tableDeletionEntry.getPredicate().matches(device) 为 {}"; + public static final String STORAGE_LOG_TABLENAME_IS_MATCHSIZE_IS_ONLYONETABLE_IS_E20FAFAE = + "tableName 为 {},matchSize 为 {},onlyOneTable 为 {}"; + public static final String STORAGE_LOG_TABLENAME_IS_DEVICE_IS_DELETIONSTARTTIME_IS_DELETIONENDTIME_B881E677 = + "tableName 为 {},device 为 {},deletionStartTime 为 {},deletionEndTime 为 {},fileStartTime 为 {}," + + "fileEndTime 为 {}"; + public static final String STORAGE_LOG_DELETE_TSFILERESOURCE_IS_29F5A98C = "是否删除 TsFileResource:{}"; + public static final String STORAGE_LOG_DELETETSFILECOMPLETELY_EXECUTE_SUCCESSFUL_ALL_TSFILE_ARE_D81FE0D7 = + "deleteTsFileCompletely 执行成功,所有 TsFile 均已成功删除"; + public static final String STORAGE_LOG_DELETION_DELETION_WRITTEN_INTO_MODS_FILE_F5E26D2A = + "[Deletion] 删除记录 {} 已写入 mods 文件:{}。"; + public static final String STORAGE_LOG_DATABASE_SYSTEM_DIRECTORY_DOESN_T_EXIST_CREATE_IT_9C0E7C68 = + "数据库系统目录 {} 不存在,正在创建"; + public static final String STORAGE_LOG_DATA_REGION_DIRECTORY_DOESN_T_EXIST_CREATE_IT_EFB0AE77 = + "DataRegion 目录 {} 不存在,正在创建"; + public static final String STORAGE_LOG_THE_TSFILES_OF_DATA_REGION_HAS_RECOVERED_E17384CF = + "DataRegion {}[{}] 的 TsFiles 已恢复 {}/{}。"; + public static final String STORAGE_LOG_THE_TSFILES_OF_DATA_REGION_HAS_RECOVERED_COMPLETELY_0D79FC83 = + "DataRegion {}[{}] 的 TsFiles 已完全恢复 {}/{}。"; + public static final String STORAGE_LOG_THE_DATA_REGION_IS_CREATED_SUCCESSFULLY_B991F1D4 = + "DataRegion {}[{}] 创建成功"; + public static final String STORAGE_LOG_THE_DATA_REGION_IS_RECOVERED_SUCCESSFULLY_5AAFF7B7 = + "DataRegion {}[{}] 恢复成功"; + public static final String STORAGE_LOG_WON_T_INSERT_TABLET_BECAUSE_REGION_IS_DELETED_34D893A7 = + "不会插入 tablet {},原因:Region 已删除"; + public static final String STORAGE_LOG_ASYNC_CLOSE_TSFILE_FILE_START_TIME_FILE_END_TIME_65020832 = + "异步关闭 TsFile:{},文件开始时间:{},文件结束时间:{}"; + public static final String STORAGE_LOG_WILL_CLOSE_ALL_FILES_FOR_DELETING_DATA_FOLDER_93A5B15E = + "{} 将关闭所有文件以删除数据目录 {}"; + public static final String STORAGE_LOG_WILL_CLOSE_ALL_FILES_FOR_DELETING_DATA_FILES_7768D429 = + "{} 将关闭所有文件以删除数据文件"; + public static final String STORAGE_LOG_EXCEED_SEQUENCE_MEMTABLE_FLUSH_INTERVAL_SO_FLUSH_WORKING_23513D66 = + "超过顺序 memtable 刷写间隔,因此刷写时间分区 {} 的工作 memtable,数据库为 {}[{}]"; + public static final String STORAGE_LOG_EXCEED_UNSEQUENCE_MEMTABLE_FLUSH_INTERVAL_SO_FLUSH_WORKING_BADB0B75 = + "超过乱序 memtable 刷写间隔,因此刷写时间分区 {} 的工作 memtable,数据库为 {}[{}]"; + public static final String STORAGE_LOG_START_TO_WAIT_TSFILES_TO_CLOSE_SEQ_FILES_UNSEQ_FILES_441F7130 = + "开始等待 TsFile 关闭,seq 文件:{},unseq 文件:{}"; + public static final String STORAGE_LOG_ASYNC_FORCE_CLOSE_ALL_FILES_IN_DATABASE_076AB4B9 = + "异步强制关闭数据库中的所有文件:{}"; + public static final String STORAGE_LOG_FORCE_CLOSE_ALL_PROCESSORS_IN_DATABASE_68C9EB60 = + "强制关闭数据库中的所有 processor:{}"; + public static final String STORAGE_LOG_WILL_DELETE_DATA_FILES_DIRECTLY_FOR_DELETING_DATA_BETWEEN_289DD3BF = + "{} 将直接删除数据文件,用于删除 {} 到 {} 之间的数据"; + public static final String STORAGE_LOG_DELETION_DELETION_IS_WRITTEN_INTO_MOD_FILES_DDCDF0AD = + "[Deletion] 删除记录 {} 已写入 {} 个 mod 文件"; + public static final String STORAGE_LOG_TTL_START_TTL_AND_MODIFICATION_CHECKING_A37AB173 = + "[TTL] {}-{} 开始 TTL 和修改检查。"; + public static final String STORAGE_LOG_TTL_TOTALLY_SELECT_ALL_OUTDATED_FILES_AND_PARTIAL_OUTDATED_5246BD61 = + "[TTL] {}-{} 共选择 {} 个全量过期文件和 {} 个部分过期文件。"; + public static final String STORAGE_LOG_WON_T_LOAD_TSFILE_BECAUSE_REGION_IS_DELETED_0E72E8D0 = + "不会加载 TsFile {},原因:Region 已删除"; + public static final String STORAGE_LOG_TSFILE_MUST_BE_RENAMED_TO_FOR_LOADING_INTO_THE_UNSEQUENCE_70321619 = + "TsFile {} 必须重命名为 {} 才能加载到乱序列表。"; + public static final String STORAGE_LOG_LOAD_TSFILE_IN_UNSEQUENCE_LIST_MOVE_FILE_FROM_TO_21E11AEB = + "将 TsFile 加载到乱序列表,将文件从 {} 移动到 {}"; + public static final String STORAGE_LOG_MOVE_TSFILE_TO_TARGET_DIR_SUCCESSFULLY_57288783 = + "成功将 TsFile {} 移动到目标目录 {}。"; + public static final String STORAGE_LOG_WON_T_INSERT_TABLETS_BECAUSE_REGION_IS_DELETED_48E9720F = + "不会插入 tablets {},原因:Region 已删除"; + public static final String STORAGE_LOG_HAS_SPENT_S_TO_WAIT_FOR_CLOSING_ALL_TSFILES_6C3EE4CE = + "{} 已花费 {}s 等待关闭所有 TsFile。"; + public static final String STORAGE_LOG_SSEQ_FILES_UNSEQ_FILES_918AEB2A = + "Sseq 文件:{}, unseq 文件:{}"; + public static final String STORAGE_LOG_UNRECOGNIZED_LASTCACHELOADSTRATEGY_FALL_BACK_TO_CLEAN_ALL_C200F32D = + "无法识别的 LastCacheLoadStrategy:{},回退到 CLEAN_ALL"; + public static final String STORAGE_LOG_FILE_RENAMING_FAILED_WHEN_LOADING_TSFILE_ORIGIN_TARGET_28E43D85 = + "加载 TsFile 时重命名文件失败。源:{},目标:{}"; + public static final String STORAGE_LOG_FILE_RENAMING_FAILED_WHEN_LOADING_RESOURCE_FILE_ORIGIN_TARGET_9C22DDF3 = + "加载 .resource 文件时重命名文件失败。源:{},目标:{}"; + public static final String STORAGE_LOG_FILE_RENAMING_FAILED_WHEN_LOADING_MOD_FILE_ORIGIN_TARGET_18A212F3 = + "加载 .mod 文件时重命名文件失败。源:{},目标:{}"; + public static final String STORAGE_LOG_EXCEPTION_OCCURS_WHEN_DELETING_DATA_REGION_FOLDER_FOR_8ABCF5D1 = + "删除 {}-{} 的 DataRegion 目录时发生异常"; + public static final String STORAGE_LOG_FAIL_TO_RECOVER_UNSEALED_TSFILE_SKIP_IT_CA576205 = + "无法恢复 unsealed TsFile {},跳过该文件。"; + public static final String STORAGE_LOG_REMOTE_REQUEST_CONFIG_NODE_FAILED_THAT_JUDGMENT_IF_TABLE_25FE3602 = + "向 ConfigNode 远程请求判断表是否存在失败,发生异常:{}"; + public static final String STORAGE_LOG_DUE_TSTABLE_IS_NULL_TABLE_SCHEMA_CAN_T_BE_GOT_LEADER_NODE_C3EF524D = + "由于 tsTable 为 null,无法获取表 schema,leader 节点发生特殊情况,需要处理。"; + public static final String STORAGE_LOG_DISK_SPACE_IS_INSUFFICIENT_WHEN_CREATING_TSFILE_PROCESSOR_4032BAF0 = + "创建 TsFile processor 时磁盘空间不足,将系统模式切换为只读"; + public static final String STORAGE_LOG_MEET_IOEXCEPTION_WHEN_CREATING_TSFILEPROCESSOR_CHANGE_SYSTEM_4337F729 = + "创建 TsFileProcessor 时遇到 IOException,将系统模式切换为错误状态"; + public static final String STORAGE_LOG_CLOSEFILENODECONDITION_ERROR_OCCURS_WHILE_WAITING_FOR_CLOSING_F33B72A6 = + "等待关闭 storage group {} 时 CloseFileNodeCondition 发生错误"; + public static final String STORAGE_LOG_CLOSEFILENODECONDITION_ERROR_OCCURS_WHILE_WAITING_FOR_CLOSING_C4B97CC0 = + "等待关闭 {} 的 TsFile processors 时 CloseFileNodeCondition 发生错误"; + public static final String STORAGE_LOG_FAILED_TO_APPEND_THE_TSFILE_TO_DATABASE_PROCESSOR_BECAUSE_670341AE = + "无法将 TsFile {} 追加到数据库 processor {},原因:磁盘空间不足。"; + public static final String STORAGE_LOG_GET_TIMESERIES_METADATA_IN_FILE_FROM_CACHE_36652729 = + "获取时间序列:{}.{} 的元数据,文件:{},缓存:{}。"; + public static final String STORAGE_LOG_TIMESERIESMETADATACACHE_SIZE_E31733D3 = + "TimeSeriesMetadataCache 大小 = {}"; + public static final String STORAGE_LOG_FLUSH_TASK_OF_DATABASE_MEMTABLE_IS_CREATED_FLUSHING_TO_FILE_E44B3AA0 = + "数据库 {} memtable 的 flush 任务已创建,正在刷写到文件 {}。"; + public static final String STORAGE_LOG_DATABASE_MEMTABLE_FLUSHING_INTO_FILE_DATA_SORT_TIME_COST_3D39AA17 = + "数据库 {} memtable 刷写到文件 {}:数据排序耗时 {} ms。"; + public static final String STORAGE_LOG_DATABASE_MEMTABLE_FLUSHING_TO_FILE_STARTS_TO_ENCODING_DATA_6A89F32E = + "数据库 {} memtable 刷写到文件 {},开始编码数据。"; + public static final String STORAGE_LOG_DATABASE_MEMTABLE_FLUSHING_TO_FILE_START_IO_CB72C2DA = + "数据库 {} memtable 刷写到文件 {},开始 IO。"; + public static final String STORAGE_LOG_FLUSHING_A_MEMTABLE_TO_FILE_IN_DATABASE_IO_COST_MS_2306578A = + "正在将 memtable flush 到文件 {},数据库 {},IO 耗时 {}ms"; + public static final String STORAGE_LOG_DATABASE_MEMTABLE_FLUSHING_TO_FILE_ENCODING_TASK_IS_INTERRUPTED_9D7BF4EF = + "数据库 {} memtable 刷写到文件 {},编码任务被中断。"; + public static final String STORAGE_LOG_DATABASE_MEMTABLE_IO_TASK_MEETS_ERROR_EC383D33 = + "数据库 {} memtable {} 的 IO 任务发生错误。"; + public static final String STORAGE_LOG_OLD_RATIO_FILE_DOESN_T_EXIST_FORCE_CREATE_RATIO_FILE_74EDD7DB = + "旧压缩率文件 {} 不存在,强制创建压缩率文件 {}"; + public static final String STORAGE_LOG_COMPRESSION_RATIO_FILE_UPDATED_PREVIOUS_CURRENT_7A9EEDF8 = + "压缩率文件已更新,更新前:{},更新后:{}"; + public static final String STORAGE_LOG_AFTER_RESTORING_FROM_COMPRESSION_RATIO_FILE_TOTAL_MEMORY_D5ACB1C4 = + "从压缩率文件恢复后,总内存大小 = {},总磁盘大小 = {}"; + public static final String STORAGE_LOG_THE_COMPRESSION_RATIO_IS_NEGATIVE_CURRENT_MEMTABLESIZE_TOTALMEMTABLESIZE_8C3DD017 = + "压缩率为负数,当前 memTableSize:{},totalMemTableSize:{}"; + public static final String STORAGE_LOG_REBOOT_WAL_DELETE_THREAD_SUCCESSFULLY_CURRENT_PERIOD_IS_44B69C7A = + "重启 WAL 删除线程成功,当前周期为 {} ms"; + public static final String STORAGE_LOG_WAL_DISK_USAGE_IS_LARGER_THAN_THE_WAL_THROTTLE_THRESHOLD_2396FFCC = + "WAL 磁盘使用量 {} 大于 wal_throttle_threshold_in_byte * 0.8 {},请检查" + + "写入负载、IoT consensus 和 pipe 模块。建议为 WAL 分配更多磁盘空间。"; + public static final String STORAGE_LOG_FLUSH_A_WORKING_MEMTABLE_IN_ASYNC_CLOSE_TSFILE_MEMTABLE_00158706 = + "{}:在异步关闭 TsFile {} 时 flush 工作 memtable,memtable 大小:{},TsFile 大小:{},plan index:[{}, {}],progress index:{}"; + public static final String STORAGE_LOG_FLUSH_A_NOTIFYFLUSHMEMTABLE_IN_ASYNC_CLOSE_TSFILE_TSFILE_48D1E75A = + "{}:在异步关闭 TsFile {} 时 flush NotifyFlushMemTable,TsFile 大小:{}"; + public static final String STORAGE_LOG_MEMTABLE_SIGNAL_IS_ADDED_INTO_THE_FLUSHING_MEMTABLE_QUEUE_5D9DA8DB = + "{}:{} MemTable (signal = {}) 已加入 flushing MemTable,队列大小 = {}"; + public static final String STORAGE_LOG_MEMTABLE_SIGNAL_IS_REMOVED_FROM_THE_QUEUE_LEFT_DFDB97D2 = + "{}:{} memtable (signal={}) 已从队列移除。剩余 {} 个。"; + public static final String STORAGE_LOG_MEM_CONTROL_FLUSH_FINISHED_TRY_TO_RESET_SYSTEM_MEM_COST_3CD8399C = + "[mem control] {}:{} flush 完成,尝试重置系统内存开销,flushing memtable 列表大小:{}"; + public static final String STORAGE_LOG_FLUSH_FINISHED_REMOVE_A_MEMTABLE_FROM_FLUSHING_LIST_FLUSHING_08A00750 = + "{}:{} flush 完成,从刷写列表移除一个 MemTable,flushing MemTable 列表大小:{}"; + public static final String STORAGE_LOG_RELEASED_A_MEMTABLE_SIGNAL_FLUSHINGMEMTABLES_SIZE_6D22169F = + "{}:{} 已释放 memtable (signal={}),flushingMemtables size ={}"; + public static final String STORAGE_LOG_TRY_GET_LOCK_TO_RELEASE_A_MEMTABLE_SIGNAL_B9098E21 = + "{}:{} 尝试获取锁以释放 memtable (signal={})"; + public static final String STORAGE_LOG_FLUSHINGMEMTABLES_IS_EMPTY_AND_WILL_CLOSE_THE_FILE_22A07A5C = + "{}:{} flushingMemtables 为空,将关闭该文件"; + public static final String STORAGE_LOG_TRY_TO_GET_FLUSHINGMEMTABLES_LOCK_F91EA27F = + "{}:{} 尝试获取 flushingMemtables 锁。"; + public static final String STORAGE_LOG_RELEASE_FLUSHQUERYLOCK_6DF2C0FC = + "{}:{} 释放 flushQueryLock"; + public static final String STORAGE_LOG_DELETION_DELETION_WITH_IN_WORKMEMTABLE_POINTS_DELETED_00EA995A = + "[Deletion] workMemTable 中 Deletion 涉及 {},已删除 {} 个点"; + public static final String STORAGE_LOG_SYNC_CLOSE_FILE_WILL_FIRSTLY_ASYNC_CLOSE_IT_34588A7D = + "同步关闭文件:{},将先异步关闭它"; + public static final String STORAGE_LOG_ASYNC_FLUSH_A_MEMTABLE_TO_TSFILE_00ED383A = + "异步 flush memtable 到 TsFile:{}"; + public static final String STORAGE_LOG_THIS_NORMAL_MEMTABLE_IS_EMPTY_SKIP_FLUSH_6C195557 = + "该普通 MemTable 为空,跳过 flush。{}:{}"; + public static final String STORAGE_LOG_IS_CLOSED_DURING_FLUSH_ABANDON_FLUSH_TASK_DD47632F = + "{}:{} 在 flush 期间已关闭,放弃 flush 任务"; + public static final String STORAGE_LOG_THE_COMPRESSION_RATIO_OF_TSFILE_IS_TOTALMEMTABLESIZE_THE_8CE66BE3 = + "TsFile {} 的压缩率为 {},totalMemTableSize:{},文件大小:{}"; + public static final String STORAGE_LOG_STORAGE_GROUP_CLOSE_AND_REMOVE_EMPTY_FILE_72D42293 = + "Storage group {} 关闭并移除空文件 {}"; + public static final String STORAGE_LOG_PUT_THE_MEMTABLE_SIGNAL_OUT_OF_FLUSHINGMEMTABLES_BUT_IT_D78AF257 = + "{}:{} 将 memtable (signal={}) 从 flushingMemtables 移出,但它不在队列中。"; + public static final String STORAGE_LOG_MEET_ERROR_WHEN_FLUSH_FILEMETADATA_TO_RETRY_IT_AGAIN_DAAF298C = + "{} 将 FileMetadata flush 到 {} 时遇到错误,将重试"; + public static final String STORAGE_LOG_ASYNC_CLOSE_FAILED_BECAUSE_C5B63B78 = + "{}:{} 异步关闭失败,原因:"; + public static final String STORAGE_LOG_ADD_A_MEMTABLE_INTO_FLUSHING_LIST_FAILED_30FA8E58 = + "{}:{} 添加 memtable 到刷写列表失败"; + public static final String STORAGE_LOG_MEET_ERROR_WHEN_FLUSHING_A_MEMTABLE_CHANGE_SYSTEM_MODE_TO_0C6D5025 = + "{}:{} flush memtable 时遇到错误,将系统模式切换为错误状态"; + public static final String STORAGE_LOG_IOTASK_MEETS_ERROR_TRUNCATE_THE_CORRUPTED_DATA_E9041D54 = + "{}:{} IO 任务出错,截断损坏数据"; + public static final String STORAGE_LOG_TRUNCATE_CORRUPTED_DATA_MEETS_ERROR_3757A85E = + "{}:{} 截断损坏数据时出错"; + public static final String STORAGE_LOG_RELEASE_RESOURCE_MEETS_ERROR_B62CBC3A = + "{}:{} 释放资源时出错"; + public static final String STORAGE_LOG_MEET_ERROR_WHEN_WRITING_INTO_MODIFICATIONFILE_FILE_OF_63B5E24A = + "写入 {} 的 ModificationFile 时发生错误 "; + public static final String STORAGE_LOG_MARKING_OR_ENDING_FILE_MEET_ERROR_5653B904 = + "{}:{} marking 或 ending 文件时遇到错误"; + public static final String STORAGE_LOG_TRUNCATE_CORRUPTED_DATA_MEETS_ERROR_8F721CC1 = + "{}:{} 截断损坏数据时出错"; + public static final String STORAGE_LOG_MEET_ERROR_WHEN_FLUSH_FILEMETADATA_TO_CHANGE_SYSTEM_MODE_0BC79DA5 = + "{} 将 FileMetadata flush 到 {} 时遇到错误,将系统模式切换为错误状态"; + public static final String STORAGE_LOG_UPDATE_COMPRESSION_RATIO_FAILED_8A076DFC = + "{}:{} 更新 compression ratio 失败"; + public static final String STORAGE_LOG_GET_READONLYMEMCHUNK_HAS_ERROR_2366DE2A = + "{}:{} 获取 ReadOnlyMemChunk 时出错"; + public static final String STORAGE_LOG_FAILED_TO_TRANSFER_TVLIST_MEMORY_OWNER_TO_QUERY_ENGINE_0DFA506D = + "无法将 TVList 内存所有者转移到查询引擎,{}"; + public static final String STORAGE_LOG_THE_FORMAT_OF_MAX_POINT_NUMBER_IS_NOT_CORRECT_USING_DEFAULT_1B78AF69 = + "MAX_POINT_NUMBER {} 的格式不正确。使用默认浮点精度。"; + public static final String STORAGE_LOG_THE_MAX_POINT_NUMBER_SHOULDN_T_BE_LESS_THAN_0_USING_DEFAULT_12745217 = + "MAX_POINT_NUMBER 不应小于 0。使用默认浮点精度 {}。"; + public static final String STORAGE_LOG_FAIL_TO_READ_MOD_FILE_EXPECTING_OFFSET_ACTUALLY_SKIPPED_8B96B670 = + "无法读取 Mod 文件 {},期望偏移量 {},实际跳过 {}"; + public static final String STORAGE_LOG_AFTER_THE_MOD_FILE_IS_SETTLED_THE_FILE_SIZE_IS_STILL_GREATER_FA454979 = + "mod 文件 settle 后文件大小仍大于 1M,settle 前文件大小为 {},settle 后文件大小为 {}"; + public static final String STORAGE_LOG_THE_START_TIME_OF_IS_GREATER_THAN_END_TIME_44DD784A = + "{} {} {} 的开始时间大于结束时间"; + public static final String STORAGE_LOG_THERE_IS_NO_DATA_IN_THE_FILE_F480954E = + "{} {} 文件中没有数据"; + public static final String STORAGE_LOG_CHUNK_START_OFFSET_IS_INCONSISTENT_WITH_THE_VALUE_IN_THE_E1E7AF07 = + "{} chunk 起始偏移量与元数据中的值不一致。"; + public static final String STORAGE_LOG_TIME_RANGES_OVERLAP_BETWEEN_PAGES_2A131465 = + "{} {} page 之间的时间范围重叠。"; + public static final String STORAGE_LOG_THE_TIMESTAMP_IN_THE_PAGE_IS_REPEATED_OR_NOT_INCREMENTAL_04627FDA = + "{} {} page 中的时间戳重复或未递增。"; + public static final String STORAGE_LOG_THE_START_TIME_IN_PAGE_IS_DIFFERENT_FROM_THAT_IN_PAGE_HEADER_C23CE8D4 = + "{} {} page 中的开始时间与 page header 中的值不同。"; + public static final String STORAGE_LOG_THE_END_TIME_IN_PAGE_IS_DIFFERENT_FROM_THAT_IN_PAGE_HEADER_5E363FAB = + "{} {} page 中的结束时间与 page header 中的值不同。"; + public static final String STORAGE_LOG_DEVICE_ID_IS_NULL_OR_EMPTY_635DD75C = + "{} {} device id 为 null 或空。"; + public static final String STORAGE_LOG_DEVICE_IS_OVERLAPPED_BETWEEN_AND_END_TIME_IN_IS_START_TIME_BA49D2AA = + "设备 {} 在 {} 和 {} 之间重叠,{} 中结束时间为 {},{} 中开始时间为 {}"; + public static final String STORAGE_LOG_PATH_FILE_IS_NOT_SATISFIED_BECAUSE_OF_NO_DEVICE_8BB15136 = + "Path:{} 文件 {} 不满足条件,原因:没有设备!"; + public static final String STORAGE_LOG_PATH_FILE_IS_NOT_SATISFIED_BECAUSE_OF_TIME_FILTER_71121709 = + "Path:{} 文件 {} 不满足条件,原因:时间过滤条件!"; + public static final String STORAGE_LOG_STARTTIME_OF_TSFILERESOURCE_IS_GREATER_THAN_ITS_ENDTIME_BC6CC591 = + "startTime[{}](TsFileResource[{}])大于其 endTime[{}]"; + public static final String STORAGE_LOG_MEET_ERROR_WHEN_GETSTARTTIME_OF_IN_FILE_D7F27B92 = + "获取 {} 的 getStartTime 时遇到错误,文件 {}"; + public static final String STORAGE_LOG_MEET_ERROR_WHEN_GETENDTIME_OF_IN_FILE_350DA42F = + "获取 {} 的 getEndTime 时遇到错误,文件 {}"; + public static final String STORAGE_LOG_CANNOT_SERIALIZE_TSFILERESOURCE_WHEN_UPDATING_PLAN_INDEX_69665DD5 = + "无法序列化 TsFileResource {},更新 plan index {}-{} 时"; + public static final String STORAGE_LOG_DATAREGIONSYSDIR_HAS_EXISTED_FILEPATH_53009475 = + "DataRegionSysDir 已存在,FilePath:{}"; + public static final String STORAGE_LOG_FILETIMEINDEX_LOG_FILE_CREATE_FILED_FILEPATH_D675FBD5 = + "FileTimeIndex log 文件创建失败,FilePath:{}"; + public static final String STORAGE_LOG_CAN_T_READ_FILE_FROM_DISK_F5625609 = + "无法从磁盘读取文件 {}"; + public static final String STORAGE_LOG_FAILED_TO_GET_DEVICES_FROM_TSFILE_F94CF47B = + "无法从 TsFile 获取 devices:{}"; + public static final String STORAGE_LOG_TABLEDISKUSAGEINDEX_WORKER_THREAD_WAS_INTERRUPTED_UNEXPECTEDLY_A21172AB = + "TableDiskUsageIndex worker thread 等待 operations 时意外中断。"; + public static final String STORAGE_LOG_SKIP_ADDING_OPERATION_TO_QUEUE_BECAUSE_TABLEDISKUSAGEINDEX_4A606B40 = + "跳过向 queue 添加 operation {},原因:TableDiskUsageIndex 已停止。"; + public static final String STORAGE_LOG_ATTEMPT_TO_DECREASE_ACTIVEREADERNUM_WHEN_IT_IS_ALREADY_0_73756CBB = + "activeReaderNum 已经为 0 时仍尝试减少它。这可能表示 reader lifecycle management 不正确。"; + public static final String STORAGE_LOG_FAILED_TO_DELETE_OLD_VERSION_TABLE_SIZE_INDEX_FILE_05930C4A = + "无法删除旧版本 table size index 文件 {}"; + public static final String STORAGE_LOG_FAILED_TO_READ_TABLE_TSFILE_SIZE_INDEX_AFTER_POSITION_AND_74251AF3 = + "无法读取 table TsFile size index {} 在 position:{} 之后的数据,以及 {} 在 position:{} 之后的数据"; + public static final String STORAGE_LOG_COMPACTIONSCHEDULETASKWORKER_COMPACTION_SCHEDULE_IS_INTERRUPTED_9EF702D1 = + "[CompactionScheduleTaskWorker-{}] compaction schedule 是被中断, isStopByUser:{}"; + public static final String STORAGE_LOG_COMPACTIONSCHEDULETASKWORKER_FAILED_TO_EXECUTE_COMPACTION_4F302761 = + "[CompactionScheduleTaskWorker-{}] 无法执行 compaction schedule 任务"; + public static final String STORAGE_LOG_COMPACTIONSCHEDULETASKWORKER_FAILED_TO_EXECUTE_COMPACTION_E571F6E3 = + "[CompactionScheduleTaskWorker-{}] 无法执行 compaction schedule 任务且无法恢复"; + public static final String STORAGE_LOG_COMPACTION_SCHEDULE_TASK_THREAD_POOL_CAN_NOT_BE_CLOSED_IN_27D38188 = + "compaction schedule 任务线程池无法在 {} ms 内关闭"; + public static final String STORAGE_LOG_TTLCHECKTASK_TTL_CHECKER_IS_INTERRUPTED_ISSTOPPEDBYUSER_B1E45A2E = + "[TTLCheckTask-{}] TTL checker 被中断,isStoppedByUser:{}"; + public static final String STORAGE_LOG_TTLCHECKTASK_FAILED_TO_EXECUTE_TTL_CHECK_AND_CANNOT_RECOVER_6F4E4A13 = + "[TTLCheckTask-{}] 无法执行 TTL 检查,且无法恢复"; + public static final String STORAGE_LOG_COMPACTION_TASK_START_CHECK_FAILED_BECAUSE_DISK_FREE_RATIO_9D2BE2FE = + "Compaction 任务启动检查失败,原因:磁盘空闲比例小于 disk_space_warning_threshold"; + public static final String STORAGE_LOG_MEET_ERROR_WHEN_ADDING_TASK_TO_COMPACTION_WAITING_QUEUE_84AA345D = + "向 compaction waiting queue 添加任务-{} 时遇到错误:{}"; + public static final String STORAGE_LOG_SETTLE_COMPLETES_FILE_PATH_THE_REMAINING_FILE_TO_BE_SETTLED_32DF95A7 = + "Settle 完成,文件路径:{},剩余待 settle 文件数:{}"; + public static final String STORAGE_LOG_THE_TSFILE_SHOULD_BE_SEALED_WHEN_SETTLING_8DBD716A = + "settling 时 TsFile {} 应已封闭。"; + public static final String STORAGE_LOG_MEET_ERROR_WHEN_SETTLING_FILE_CBA0F9D7 = + "settling 文件时遇到错误:{}"; + public static final String STORAGE_LOG_MEET_ERROR_WHEN_READ_TSFILE_RESOURCE_FILE_IT_MAY_BE_REPAIRED_A8A514C6 = + "读取 TsFile resource 文件 {} 时发生错误,重启后可能会被修复"; + public static final String STORAGE_LOG_FILE_HAS_UNSORTED_DATA_1B118A14 = + "文件 {} 存在未排序数据:"; + public static final String STORAGE_LOG_FILE_HAS_WRONG_TIME_STATISTICS_4E63345E = + "文件 {} 存在错误的时间统计信息:"; + public static final String STORAGE_LOG_DEVICE_HAS_OVERLAPPED_DATA_START_TIME_IN_CURRENT_FILE_IS_F4F29A22 = + "设备 {} 存在重叠数据,当前文件 {} 中开始时间为 {},前一个文件 {} 中结束时间为 {}"; + public static final String STORAGE_LOG_REPAIR_DATA_LOG_IS_NOT_COMPLETE_TIME_PARTITION_IS_D9D4F01F = + "[{}][{}] 修复数据日志不完整,时间分区为 {}。"; + public static final String STORAGE_LOG_REPAIRSCHEDULER_RECOVER_UNFINISHED_REPAIR_SCHEDULE_TASK_7C5B6D5F = + "[RepairScheduler] 从日志文件恢复未完成的修复调度任务:{}"; + public static final String STORAGE_LOG_REPAIRSCHEDULER_SKIP_REPAIR_TIME_PARTITION_BECAUSE_IT_IS_BDD35739 = + "[RepairScheduler][{}][{}] 跳过修复时间分区 {},原因:它已修复"; + public static final String STORAGE_LOG_REPAIRSCHEDULER_SUBMIT_A_REPAIR_TIME_PARTITION_SCAN_TASK_0E98F12C = + "[RepairScheduler] 提交修复时间分区扫描任务 {}-{}-{}"; + public static final String STORAGE_LOG_REPAIRSCHEDULER_FAILED_TO_PARSE_REPAIR_LOG_FILE_142D2568 = + "[RepairScheduler] 无法解析修复日志文件 {}"; + public static final String STORAGE_LOG_REPAIRSCHEDULER_FAILED_TO_RECORD_REPAIR_TASK_START_TIME_95552D7E = + "[RepairScheduler] 无法在日志文件 {} 中记录修复任务开始时间"; + public static final String STORAGE_LOG_REPAIRSCHEDULER_FAILED_TO_CLOSE_REPAIR_LOGGER_EC191F6B = + "[RepairScheduler] 无法关闭修复 logger {}"; + public static final String STORAGE_LOG_REPAIRSCHEDULER_START_SCAN_REPAIR_TIME_PARTITION_1D6789DB = + "[RepairScheduler][{}][{}] 开始扫描修复时间分区 {}"; + public static final String STORAGE_LOG_REPAIRSCHEDULER_CANNOT_SCAN_SOURCE_FILES_IN_BECAUSE_ALLOWCOMPACTION_5E644A6D = + "[RepairScheduler] 无法扫描 {} 中的 source 文件,原因:'allowCompaction' 为 false"; + public static final String STORAGE_LOG_REPAIRSCHEDULER_NEED_TO_REPAIR_BECAUSE_IT_HAS_INTERNAL_UNSORTED_C1596DC3 = + "[RepairScheduler] {} 需要修复,原因:存在内部未排序数据"; + public static final String STORAGE_LOG_REPAIRSCHEDULER_NEED_TO_REPAIR_BECAUSE_IT_IS_OVERLAPPED_F1AC0C78 = + "[RepairScheduler] {} 需要修复,原因:与其他文件重叠"; + public static final String STORAGE_LOG_REPAIRSCHEDULER_TIME_PARTITION_HAS_BEEN_REPAIRED_PROGRESS_697FEA22 = + "[RepairScheduler][{}][{}] 时间分区 {} 已修复,进度:{}/{}"; + public static final String STORAGE_LOG_REPAIRSCHEDULER_FAILED_TO_RECORD_REPAIR_LOG_FOR_TIME_PARTITION_11251247 = + "[RepairScheduler][{}][{}] 无法记录时间分区 {} 的修复日志"; + public static final String STORAGE_LOG_COMPACTION_TMP_TARGET_TSFILE_MAY_BE_DELETED_AFTER_COMPACTION_0BFFA73F = + "{} [Compaction] Tmp target TsFile {} 可能已在 compaction 后删除。"; + public static final String STORAGE_LOG_COMPACTION_DELETE_TSFILE_A97320DB = + "{} [Compaction] 删除 TsFile {}"; + public static final String STORAGE_LOG_COMPACTION_DELETE_FILE_FAILED_FILE_PATH_IS_6E1D2670 = + "[Compaction] 删除文件失败,文件路径为 {}"; + public static final String STORAGE_LOG_COMPACTION_RECOVER_FAILED_TO_RECOVER_COMPACTION_TASKINFO_24424402 = + "{} [Compaction][Recover] 无法恢复 compaction。taskInfo:{},异常:{}"; + public static final String STORAGE_LOG_FAILED_TO_PASS_COMPACTION_VALIDATION_SOURCE_SEQ_FILES_SOURCE_BF5A4525 = + "无法通过 compaction validation, source seq 文件:{}, source unseq 文件:{}, target 文件:{}"; + public static final String STORAGE_LOG_FAILED_TO_PASS_COMPACTION_OVERLAP_VALIDATION_SOURCE_SEQ_9CFDC149 = + "无法通过 compaction overlap validation, source seq 文件:{}, source unseq 文件:{}, target 文件:{}"; + public static final String STORAGE_LOG_COMPACTION_TASK_INTERRUPTED_E31121C0 = + "{}-{} [Compaction] {} 任务 被中断"; + public static final String STORAGE_LOG_COMPACTION_TASK_MEETS_ERROR_1002C659 = + "{}-{} [Compaction] {} 任务发生错误:{}。"; + public static final String STORAGE_LOG_UNEXPECTED_CHUNK_TYPE_DETECTED_WHEN_READING_NON_ALIGNED_1C0E4674 = + "读取 non-aligned chunk reader 时检测到异常 chunk type。chunk metadata 表示 non-aligned chunk,但从 TsFile 实际读取的是 aligned series 的 value chunk。TsFile={},device={},measurement={},offsetOfChunkHeader={}"; + public static final String STORAGE_LOG_INNERSPACECOMPACTIONTASK_START_TO_RENAME_MODS_FILE_7C036CBD = + "{}-{} [InnerSpaceCompactionTask] 开始重命名 mods 文件"; + public static final String STORAGE_LOG_REPAIRUNSORTEDFILECOMPACTIONTASK_CAN_NOT_REPAIR_UNSORTED_48124B0C = + "[RepairUnsortedFileCompactionTask] 无法修复 unsorted 文件 {},原因:所需修复内存大于 total compaction 内存预算"; + public static final String STORAGE_LOG_COMPACTION_INNERSPACECOMPACTION_TASK_STARTS_WITH_FILES_TOTAL_934B562F = + "{}-{} [Compaction] {} InnerSpaceCompaction 任务启动,文件数 {},总文件大小为 {} MB,估算内存开销为 {} MB"; + public static final String STORAGE_LOG_COMPACTION_COMPACTION_WITH_SELECTED_FILES_SKIPPED_FILES_ACC66872 = + "{}-{} [Compaction] 对选中文件 {}、跳过文件 {} 执行 compaction"; + public static final String STORAGE_LOG_COMPACTION_INNERSPACECOMPACTION_TASK_FINISHES_SUCCESSFULLY_08475DE4 = + "{}-{} [Compaction] {} InnerSpaceCompaction 任务 finishes 成功, target 文件 是{},time cost 是{} s, " + + "compaction speed 是{} MB/s, {}"; + public static final String STORAGE_LOG_COMPACTION_INSERTIONCROSSSPACECOMPACTION_TASK_STARTS_WITH_A315B8C6 = + "{}-{} [Compaction] InsertionCrossSpaceCompaction 任务启动,unseq 文件 {},nearest seq 文件为 {},target 文件名 timestamp 为 {},文件大小为 {} MB。"; + public static final String STORAGE_LOG_COMPACTION_INSERTIONCROSSSPACECOMPACTION_TASK_FINISHES_SUCCESSFULLY_69360DD0 = + "{}-{} [Compaction] InsertionCrossSpaceCompaction 任务 finishes 成功, target 文件 是{},time cost " + + "是{} s."; + public static final String STORAGE_LOG_INSERTIONCROSSSPACECOMPACTIONTASK_FAILED_TO_GENERATE_TARGET_B03E4C67 = + "{}-{} [InsertionCrossSpaceCompactionTask] 无法生成 target 文件 name, source unseq 文件 是{}"; + public static final String STORAGE_LOG_SETTLE_TASK_DELETES_FULLY_DIRTY_TSFILE_SUCCESSFULLY_18D81225 = + "Settle 任务 deletes fully_dirty TsFile {} 成功."; + public static final String STORAGE_LOG_COMPACTION_SETTLE_COMPACTION_FILE_LIST_IS_EMPTY_END_IT_56CF079D = + "{}-{} [Compaction] Settle compaction 文件 list 为空, end it"; + public static final String STORAGE_LOG_COMPACTION_SETTLECOMPACTION_TASK_STARTS_WITH_FULLY_DIRTY_0962C95A = + "{}-{} [Compaction] SettleCompaction 任务启动,fully_dirty 文件 {} 个,partially_dirty 文件 {} 个。Fully_dirty 文件:{},partially_dirty 文件:{}。Fully_dirty 文件大小为 {} MB,partially_dirty 文件大小为 {} MB。内存开销为 {} MB。"; + public static final String STORAGE_LOG_COMPACTION_SETTLECOMPACTION_TASK_FINISHES_SUCCESSFULLY_TIME_2BD3839A = + "{}-{} [Compaction] SettleCompaction 任务 finishes 成功, time cost 是{} s.Fully_dirty 文件 num 是{}."; + public static final String STORAGE_LOG_COMPACTION_SETTLECOMPACTION_TASK_FINISHES_SUCCESSFULLY_TIME_4FEB0F56 = + "{}-{} [Compaction] SettleCompaction 任务成功结束,time cost 为 {} s,compaction speed 为 {} MB/s。Fully_dirty 文件数为 {},partially_dirty 文件数为 {}。"; + public static final String STORAGE_LOG_COMPACTION_SETTLECOMPACTION_TASK_FINISHES_WITH_SOME_ERROR_A8A15439 = + "{}-{} [Compaction] SettleCompaction 任务结束但存在错误,time cost 为 {} s。Fully_dirty 文件数为 {},有 {} 个文件删除失败。"; + public static final String STORAGE_LOG_COMPACTION_START_TO_SETTLE_PARTIALLY_DIRTY_FILES_TOTAL_FILE_BAC113C4 = + "{}-{} [Compaction] 开始 settle {} {} partially_dirty 文件, total 文件 size 是{} MB"; + public static final String STORAGE_LOG_COMPACTION_FINISH_TO_SETTLE_PARTIALLY_DIRTY_FILES_SUCCESSFULLY_9ACFD5C0 = + "{}-{} [Compaction] 成功 settle {} {} 个 partially_dirty 文件,target 文件为 {},time cost 为 {} s,compaction speed 为 {} MB/s,{}"; + public static final String STORAGE_LOG_COMPACTION_RECOVER_START_TO_RECOVER_SETTLE_COMPACTION_C342241D = + "{}-{} [Compaction][Recover] 开始恢复 settle compaction."; + public static final String STORAGE_LOG_COMPACTION_RECOVER_FINISH_TO_RECOVER_SETTLE_COMPACTION_SUCCESSFULLY_714EF642 = + "{}-{} [Compaction][Recover] 成功恢复 settle compaction。"; + public static final String STORAGE_LOG_COMPACTION_RECOVER_COMPACTION_LOG_IS_DF6FD183 = + "{}-{} [Compaction][Recover] compaction log 是{}"; + public static final String STORAGE_LOG_SETTLE_TASK_FAIL_TO_DELETE_FULLY_DIRTY_TSFILE_B7DAEA8D = + "Settle 任务 无法删除 fully_dirty TsFile {}."; + public static final String STORAGE_LOG_COMPACTION_CROSS_SPACE_COMPACTION_FILE_LIST_IS_EMPTY_END_B8044743 = + "{}-{} [Compaction] Cross space compaction 文件 list 为空, end it"; + public static final String STORAGE_LOG_COMPACTION_CROSSSPACECOMPACTION_TASK_STARTS_WITH_SEQ_FILES_8CDCBE0F = + "{}-{} [Compaction] CrossSpaceCompaction 任务启动,seq 文件 {} 个、unsequence 文件 {} 个。Sequence 文件:{},unsequence 文件:{}。Sequence 文件大小为 {} MB,unsequence 文件大小为 {} MB,总大小为 {} MB"; + public static final String STORAGE_LOG_COMPACTION_CROSSSPACECOMPACTION_TASK_FINISHES_SUCCESSFULLY_D7F1B1FD = + "{}-{} [Compaction] CrossSpaceCompaction 任务 finishes 成功, time cost 是{} s, compaction speed " + + "是{} MB/s, {}"; + public static final String STORAGE_LOG_COMPACTION_RECOVER_RECOVER_COMPACTION_IN_DATA_REGION_DIR_ABD144CC = + "{} [Compaction][Recover] 在 data region dir {} 中恢复 compaction"; + public static final String STORAGE_LOG_COMPACTION_RECOVER_RECOVER_COMPACTION_IN_TIME_PARTITION_FA2FC44D = + "{} [Compaction][Recover] 在 time partition dir {} 中恢复 compaction"; + public static final String STORAGE_LOG_RECOVER_MODS_FILE_ERROR_ON_DELETE_ORIGIN_FILE_OR_RENAME_7033152A = + "恢复 mods 文件时出错,操作为删除源文件或重命名 mods settle,"; + public static final String STORAGE_LOG_COMPACTION_RECOVER_COMPACTION_LOG_IS_0C57C7DA = + "{} [Compaction][Recover] compaction log 是{}"; + public static final String STORAGE_LOG_COMPACTION_RECOVER_COMPACTION_LOG_FILE_EXISTS_START_TO_RECOVER_74836930 = + "{} [Compaction][Recover] compaction log 文件 {} 存在,开始恢复"; + public static final String STORAGE_LOG_COMPACTION_RECOVER_INCOMPLETE_LOG_FILE_ABORT_RECOVER_46472E7C = + "{} [Compaction][Recover] 日志文件不完整,中止恢复"; + public static final String STORAGE_LOG_COMPACTION_RECOVER_RECOVER_COMPACTION_SUCCESSFULLY_DELETE_8451AEFB = + "{} [Compaction][Recover] 恢复 compaction 成功, 删除 log 文件 {}"; + public static final String STORAGE_LOG_COMPACTION_RECOVER_ALL_SOURCE_FILES_EXISTS_DELETE_ALL_TARGET_79954E60 = + "{} [Compaction][Recover] 所有源文件均存在,删除所有目标文件。"; + public static final String STORAGE_LOG_COMPACTION_RECOVER_EXCEPTION_OCCURS_WHILE_DELETING_LOG_FILE_49A24E1D = + "{} [Compaction][Recover] 删除 log 文件 {} 时发生异常"; + public static final String STORAGE_LOG_COMPACTION_RECOVER_FAILED_TO_REMOVE_TARGET_FILE_35A1E718 = + "{} [Compaction][Recover] 无法移除目标文件 {}"; + public static final String STORAGE_LOG_COMPACTION_RECOVER_EXCEPTION_OCCURS_WHILE_DELETING_COMPACTION_218A56FB = + "{} [Compaction][Recover] 删除 compaction mods 文件时发生异常"; + public static final String STORAGE_LOG_COMPACTION_EXCEPTIONHANDLER_TARGET_FILE_IS_NOT_COMPLETE_865ADA73 = + "{} [Compaction][ExceptionHandler] 目标文件 {} 未完成,且部分源文件已丢失,不执行处理。"; + public static final String STORAGE_LOG_COMPACTION_RECOVER_FAILED_TO_REMOVE_FILE_EXCEPTION_67CEA8E7 = + "{} [Compaction][Recover] 无法移除文件 {},异常:{}"; + public static final String STORAGE_LOG_COMPACTION_EXCEPTIONHANDLER_SPACE_COMPACTION_START_HANDLING_1B55549F = + "{} [Compaction][ExceptionHandler] {} space compaction 开始处理异常,源 " + + "seq 文件为{},源 unseq 文件为{}。"; + public static final String STORAGE_LOG_COMPACTION_EXCEPTIONHANDLER_FAIL_TO_HANDLE_SPACE_COMPACTION_B21F170F = + "[Compaction][ExceptionHandler] 无法处理 {} space compaction 异常,storage group 为{}"; + public static final String STORAGE_LOG_COMPACTION_EXCEPTIONHANDLER_EXCEPTION_OCCURS_WHEN_HANDLING_B6C9751E = + "[Compaction][ExceptionHandler] 处理 {} space compaction 异常时发生异常。storage group 为 {}"; + public static final String STORAGE_LOG_COMPACTION_EXCEPTION_FAIL_TO_DELETE_TARGET_TSFILE_WHEN_HANDLING_DC19DC8A = + "{} [Compaction][异常] 处理异常时无法删除目标 TsFile {}"; + public static final String STORAGE_LOG_COMPACTION_EXCEPTIONHANDLER_TARGET_FILE_IS_NOT_COMPLETE_91E81106 = + "{} [Compaction][ExceptionHandler] 目标文件 {} 未完成,且部分源文件 {} 已丢失,不执行处理。"; + public static final String STORAGE_LOG_BATCH_COMPACTION_CURRENT_DEVICE_IS_FIRST_BATCH_COMPACTED_34910754 = + "[Batch Compaction] 当前设备为 {},首批已压缩的 time chunk 为 {}"; + public static final String STORAGE_LOG_ADD_TSFILE_CURRENT_SELECT_FILE_NUM_IS_SIZE_IS_17E21BC9 = + "添加 TsFile {},当前选择的文件数为 {},大小为 {}"; + public static final String STORAGE_LOG_SELECTING_CROSS_COMPACTION_TASK_RESOURCES_FROM_SEQFILE_UNSEQFILES_F4E1ABEB = + "从 {} 个 seq 文件、{} 个 unseq 文件中选择 cross compaction 任务资源"; + public static final String STORAGE_LOG_SELECTING_INSERTION_CROSS_COMPACTION_TASK_RESOURCES_FROM_ECB186D1 = + "从 {} 个 seq 文件、{} 个 unseq 文件中选择 insertion cross compaction 任务资源"; + public static final String STORAGE_LOG_ADDING_A_NEW_UNSEQFILE_AND_SEQFILES_AS_CANDIDATES_NEW_COST_07DD0A10 = + "新增 unseqFile {} 和 seqFiles {} 作为候选,新增开销 {},总开销 {}"; + public static final String STORAGE_LOG_SELECT_ONE_VALID_SEQ_FILE_FOR_NONOVERLAP_UNSEQ_FILE_TO_COMPACT_456668F1 = + "选择一个有效 seq 文件 {} 与 nonOverlap unseq 文件进行 compaction。"; + public static final String STORAGE_LOG_TOTAL_SOURCE_FILES_SEQFILES_UNSEQFILES_CANDIDATE_SOURCE_7511ED9E = + "{} [{}] 源文件总数:{} seqFiles,{} unseqFiles。候选源文件:{} seqFiles,{} unseqFiles。无法选择任何文件,原因:它们不满足条件或可能被其他 compaction 线程占用。"; + public static final String STORAGE_LOG_TOTAL_SOURCE_FILES_SEQFILES_UNSEQFILES_CANDIDATE_SOURCE_B8B01FC4 = + "{} [{}] 源文件总数:{} seq 文件,{} unseq 文件。候选源文件:{} seq 文件,{} " + + "unseq 文件。已选择源文件:{} seq 文件,{} unseq 文件,预计内存开销 {} MB,已选择文件总大小为 {} MB,已选择 seq 文件总大小为 {} MB,已选择 unseq 文件总大小" + + "为 {} MB,耗时 {}ms。"; + public static final String STORAGE_LOG_CANNOT_SELECT_FILE_FOR_SETTLE_COMPACTION_08C958D3 = + "{}-{} 无法选择用于 settle compaction 的文件"; + public static final String STORAGE_LOG_HAS_NULL_CHUNK_METADATA_FILE_IS_819E4A49 = + "{} 存在 null chunk metadata,文件为 {}"; + public static final String STORAGE_LOG_MODIFICATIONS_SIZE_IS_FOR_FILE_PATH_EED7FD92 = + "Modifications 大小为 {},文件路径:{}"; + public static final String STORAGE_LOG_AN_ERROR_OCCURRED_WHEN_TRUNCATING_MODIFICATIONS_TO_SIZE_F8A0D6D5 = + "截断 modifications[{}] 到大小 {} 时发生错误。"; + public static final String STORAGE_LOG_FAIL_TO_FSYNC_WAL_NODE_S_CHECKPOINT_WRITER_CHANGE_SYSTEM_6E1EE226 = + "无法 fsync wal node-{} 的 checkpoint writer,将系统模式切换为错误状态。"; + public static final String STORAGE_LOG_FAIL_TO_ROLL_WAL_NODE_S_CHECKPOINT_WRITER_CHANGE_SYSTEM_791DDAB7 = + "无法滚动 wal node-{} 的 checkpoint writer,将系统模式切换为错误状态。"; + public static final String STORAGE_LOG_UNEXPECTED_ERROR_WHEN_LOADING_A_WAL_SEGMENT_IN_45B42CCF = + "加载 wal segment {} 时在 {}@{} 发生异常错误。"; + public static final String STORAGE_LOG_MEET_ERROR_WHEN_READING_CHECKPOINT_FILE_SKIP_BROKEN_CHECKPOINTS_DADF9E9D = + "读取 checkpoint 文件 {} 时遇到错误,跳过损坏的 checkpoints"; + public static final String STORAGE_LOG_FAILED_TO_SCAN_WAL_FILE_FOR_SEARCHABLE_REQUEST_METADATA_9B4B0198 = + "无法为可搜索请求元数据扫描 WAL 文件 {}"; + public static final String STORAGE_LOG_WAL_NODE_LOGS_INSERTROWNODE_THE_SEARCH_INDEX_IS_027450AC = + "WAL node-{} 记录 insertRowNode,search index 为 {}。"; + public static final String STORAGE_LOG_WAL_NODE_LOGS_INSERTROWSNODE_THE_SEARCH_INDEX_IS_1AF72E25 = + "WAL node-{} 记录 insertRowsNode,search index 为 {}。"; + public static final String STORAGE_LOG_WAL_NODE_LOGS_INSERTTABLETNODE_THE_SEARCH_INDEX_IS_CF9A3600 = + "WAL node-{} 记录 insertTabletNode,search index 为 {}。"; + public static final String STORAGE_LOG_WAL_NODE_LOGS_DELETEDATANODE_THE_SEARCH_INDEX_IS_6E49BC54 = + "WAL node-{} 记录 deleteDataNode,search index 为 {}。"; + public static final String STORAGE_LOG_WAL_NODE_LOGS_RELATIONALDELETEDATANODE_THE_SEARCH_INDEX_33258B30 = + "WAL node-{} 记录 relationalDeleteDataNode,search index 为 {}。"; + public static final String STORAGE_LOG_WAL_NODE_NO_WAL_FILE_OR_WAL_FILE_NUMBER_LESS_THAN_OR_EQUAL_3C65641C = + "wal node-{}:未找到 wal 文件,或 wal 文件数量小于等于 1"; + public static final String STORAGE_LOG_EFFECTIVE_INFORMATION_RATIO_IS_ACTIVE_MEMTABLES_COST_IS_D9A13DD2 = + "有效信息比例为 {},活跃 memTable 开销为 {},总开销为 {}"; + public static final String STORAGE_LOG_SUCCESSFULLY_DELETE_OUTDATED_WAL_FILES_FOR_WAL_NODE_C141C741 = + "成功删除 {} 个 wal node-{} 的过期 wal 文件"; + public static final String STORAGE_LOG_UPDATE_FILE_TO_SEARCH_FAILED_THE_NEXT_SEARCH_INDEX_IS_F3DC95F3 = + "更新待搜索文件失败,下一个 search index 为 {}"; + public static final String STORAGE_LOG_SEARCHINDEX_RESULT_FILES_6151DCEB = + "searchIndex:{},结果:{},文件:{},"; + public static final String STORAGE_LOG_FAIL_TO_DELETE_OUTDATED_WAL_FILE_OF_WAL_NODE_1B1F2AF2 = + "无法删除过期 wal 文件 {},所属 wal node-{}。"; + public static final String STORAGE_LOG_WAL_NODE_FLUSHES_MEMTABLE_TO_TSFILE_BECAUSE_EFFECTIVE_INFORMATION_8CC86239 = + "WAL node-{} 将 memTable-{} flush 到 TsFile {},原因:有效信息比例 {} 低于 wal min effective info ratio {},memTable 大小为 {}。"; + public static final String STORAGE_LOG_WAL_NODE_SNAPSHOTS_MEMTABLE_TO_WAL_FILES_BECAUSE_EFFECTIVE_0A1304ED = + "WAL node-{} 将 memTable-{} snapshot 到 wal 文件,原因:有效信息比例 {} 低于 wal min effective info ratio {},memTable 大小为 {}。"; + public static final String STORAGE_LOG_TIMEOUT_WHEN_WAITING_FOR_NEXT_WAL_ENTRY_READY_EXECUTE_ROLLWALFILE_FEE9700E = + "等待下一个 WAL entry 就绪超时,执行 rollWALFile。当前 wal buffer 中 search index 为 {},下一个目标 index 为 {}"; + public static final String STORAGE_LOG_THE_SEARCH_INDEX_OF_NEXT_WAL_ENTRY_SHOULD_BE_BUT_ACTUALLY_177BF8AF = + "下一个 WAL entry 的 search index 应为 {},实际为 {}"; + public static final String STORAGE_LOG_SKIP_FROM_TO_IT_S_A_DANGEROUS_OPERATION_BECAUSE_INSERT_PLAN_9283DC91 = + "跳过从 {} 到 {},这是危险操作,原因:insert plan {} 可能已丢失。"; + public static final String STORAGE_LOG_FAIL_TO_READ_WAL_FROM_WAL_FILE_SKIP_THIS_FILE_06A3B079 = + "无法从 wal 文件 {} 读取 WAL,跳过该文件。"; + public static final String STORAGE_LOG_FAIL_TO_TRIGGER_ROLLING_WAL_NODE_S_WAL_FILE_LOG_WRITER_D1E595DC = + "无法触发 rolling wal node-{} 的 wal 文件 log writer。"; + public static final String STORAGE_LOG_FAIL_TO_FIND_TSFILE_RECOVER_PERFORMER_FOR_WAL_ENTRY_IN_TSFILE_ED4EF3E7 = + "无法在 TsFile {} 中为 wal entry 找到 TsFile 恢复 performer"; + public static final String STORAGE_LOG_SUCCESSFULLY_RECOVER_WAL_NODE_IN_THE_DIRECTORY_ADD_THIS_FA6ADE22 = + "成功恢复目录 {} 中的 WAL node,并将该节点添加到 WALManger。"; + public static final String STORAGE_LOG_SUCCESSFULLY_RECOVER_WAL_NODE_IN_THE_DIRECTORY_SO_DELETE_A17892D9 = + "成功恢复目录 {} 中的 WAL node,因此删除这些 wal 文件。"; + public static final String STORAGE_LOG_FAIL_TO_READ_MEMTABLE_IDS_FROM_THE_WAL_FILE_OF_WAL_NODE_5325B5AB = + "无法从 wal 文件 {} 读取 memTable ids,wal node:{}"; + public static final String STORAGE_LOG_FAIL_TO_READ_MEMTABLE_IDS_FROM_THE_WAL_FILE_OF_WAL_NODE_FBCE8D93 = + "无法从 wal 文件 {} 读取 wal node 的 memTable ids。"; + public static final String STORAGE_LOG_DATA_REGIONS_HAVE_SUBMITTED_ALL_UNSEALED_TSFILES_START_RECOVERING_208E6A26 = + "DataRegions 已提交所有未封闭 TsFiles,开始在各 wal node 中恢复 TsFiles。"; + public static final String STORAGE_LOG_FAIL_TO_ADD_RECOVER_PERFORMER_FOR_FILE_54746E05 = + "无法为文件 {} 添加恢复 performer"; + public static final String STORAGE_LOG_BUFFER_CAPACITY_IS_LIMIT_IS_POSITION_IS_911625D8 = + "buffer capacity 为:{},limit 为:{},position 为:{}"; + public static final String STORAGE_LOG_HANDLE_CLOSE_SIGNAL_FOR_WAL_NODE_THERE_ARE_ENTRIES_LEFT_393393D0 = + "处理 wal node-{} 的关闭信号,剩余 {} 个 entry。"; + public static final String STORAGE_LOG_SYNC_WAL_BUFFER_FORCEFLAG_BUFFER_USED_C2A75C99 = + "同步 wal buffer,forceFlag:{},buffer 已使用:{} / {} = {}%"; + public static final String STORAGE_LOG_FAIL_TO_WRITE_WALENTRY_INTO_WAL_NODE_BECAUSE_THIS_NODE_IS_5D45E73F = + "无法将 WALEntry 写入 wal node-{},原因:该节点已关闭。data Region 删除期间看到此日志是正常的。"; + public static final String STORAGE_LOG_INTERRUPTED_WHEN_WAITING_FOR_TAKING_WALENTRY_FROM_BLOCKING_0765C068 = + "等待从 blocking queue 获取 WALEntry 进行序列化时被中断。"; + public static final String STORAGE_LOG_FAIL_TO_READ_MEMTABLE_IDS_FROM_THE_WAL_FILE_OF_WAL_NODE_54B0056E = + "无法从 wal 文件 {} 读取 memTable ids,wal node {}:{}"; + public static final String STORAGE_LOG_FAIL_TO_READ_MEMTABLE_IDS_FROM_THE_WAL_FILE_OF_WAL_NODE_D5287E27 = + "无法从 wal 文件 {} 读取 memTable ids,wal node {}。"; + public static final String STORAGE_LOG_FAIL_TO_SERIALIZE_WALENTRY_TO_WAL_NODE_S_BUFFER_DISCARD_F0948835 = + "无法将 WALEntry 序列化到 wal node-{} 的 buffer,丢弃该条目。"; + public static final String STORAGE_LOG_FAIL_TO_SYNC_WAL_NODE_S_BUFFER_CHANGE_SYSTEM_MODE_TO_ERROR_8C379D57 = + "无法同步 wal node-{} 的 buffer,将系统模式切换为错误状态。"; + public static final String STORAGE_LOG_FAIL_TO_ROLL_WAL_NODE_S_LOG_WRITER_CHANGE_SYSTEM_MODE_TO_A384AA54 = + "无法滚动 wal node-{} 的 log writer,将系统模式切换为错误状态。"; + public static final String STORAGE_LOG_FAIL_TO_FSYNC_WAL_NODE_S_LOG_WRITER_CHANGE_SYSTEM_MODE_TO_7930160B = + "无法 fsync wal node-{} 的 log writer,将系统模式切换为错误状态。"; + public static final String STORAGE_LOG_FAIL_TO_CREATE_WAL_NODE_ALLOCATION_STRATEGY_BECAUSE_ALL_72801644 = + "所有 wal 目录磁盘已满,无法创建 WAL node allocation strategy。"; + public static final String STORAGE_LOG_THIS_TSFILE_ISN_T_CRASHED_NO_NEED_TO_REDO_WAL_LOG_A017A0F0 = + "该 TsFile {} 未崩溃,无需重做 wal log。"; + public static final String STORAGE_LOG_CANNOT_DESERIALIZE_RESOURCE_FILE_OF_TRY_TO_RECONSTRUCT_IT_F82299C6 = + "无法反序列化 {} 的 .resource 文件,尝试重建。"; + public static final String STORAGE_LOG_TRY_TO_RELEASE_MEMORY_FROM_A_MEMORY_BLOCK_WHICH_HAS_NOT_874E7A08 = + "尝试从内存块 {} 释放内存,但该内存块尚未释放全部内存"; + public static final String STORAGE_LOG_TRY_TO_SHRINK_A_NEGATIVE_MEMORY_SIZE_FROM_MEMORY_BLOCK_60501B13 = + "尝试缩减负数内存大小 {},内存块 {}"; + public static final String STORAGE_LOG_LOAD_FORCE_RESIZED_LOADTSFILEMEMORYBLOCK_WITH_MEMORY_FROM_33AC288A = + "Load:使用查询引擎的内存强制调整 LoadTsFileMemoryBlock,增加大小:{},新大小:{}"; + public static final String STORAGE_LOG_LOAD_QUERY_ENGINE_S_MEMORY_IS_NOT_SUFFICIENT_ALLOCATED_MEMORYBLOCK_44D5B5FB = + "Load:查询引擎内存不足,已从 DataCacheMemoryBlock 分配 MemoryBlock,大小:{}"; + public static final String STORAGE_LOG_LOAD_QUERY_ENGINE_S_MEMORY_IS_NOT_SUFFICIENT_FORCE_RESIZED_9F85F4CA = + "Load:查询引擎内存不足,已使用 DataCacheMemoryBlock 的内存强制调整 LoadTsFileMemoryBlock,增加大小:{},新大小:{}"; + public static final String STORAGE_LOG_CREATE_DATA_CACHE_MEMORY_BLOCK_ALLOCATE_MEMORY_5F3E041D = + "创建 Data Cache 内存块 {},分配内存 {}"; + public static final String STORAGE_LOG_LOAD_ATTEMPTING_TO_RELEASE_MORE_MEMORY_THAN_ALLOCATED_0E737996 = + "Load:尝试释放的内存 ({}) 大于已分配内存 ({})"; + public static final String STORAGE_LOG_LOAD_FAILED_TO_SETTOTALMEMORYSIZEINBYTES_MEMORY_BLOCK_TO_DBE9BE56 = + "Load:无法将内存块 {} 的 TotalMemorySizeInBytes 设置为 {} 字节,当前内存使用量为 {} 字节"; + public static final String STORAGE_LOG_DATA_TYPE_CONVERSION_FOR_LOADTSFILESTATEMENT_IS_SUCCESSFUL_99016326 = + "LoadTsFileStatement {} 的数据类型转换成功。"; + public static final String STORAGE_LOG_FAILED_TO_CONVERT_DATA_TYPE_FOR_LOADTSFILESTATEMENT_5D132E57 = + "无法转换 LoadTsFileStatement 的数据类型:{}。"; + public static final String STORAGE_LOG_FAILED_TO_CONVERT_DATA_TYPE_FOR_LOADTSFILESTATEMENT_STATUS_F0311707 = + "无法转换 LoadTsFileStatement 的数据类型:{},状态码为 {}。"; + public static final String STORAGE_LOG_FAILED_TO_CONVERT_DATA_TYPES_FOR_TABLE_MODEL_STATEMENT_CB574D44 = + "无法转换表模型语句 {} 的数据类型。"; + public static final String STORAGE_LOG_FAILED_TO_CONVERT_DATA_TYPES_FOR_TREE_MODEL_STATEMENT_5C2869D6 = + "无法转换树模型语句 {} 的数据类型。"; + public static final String STORAGE_LOG_LOAD_INSERTING_TABLET_TO_CASTING_TYPE_FROM_TO_AE808A8B = + "Load:正在向 {}.{} 插入 tablet。将类型从 {} 转换为 {}。"; + public static final String STORAGE_LOG_TRY_TO_LOAD_TSFILE_V3_INTO_CURRENT_VERSION_V4_FILE_PATH_B8D38E22 = + "尝试将 TsFile V3 加载到当前版本 (V4),文件路径:{}"; + public static final String STORAGE_LOG_THE_FILE_S_VERSION_NUMBER_IS_HIGHER_THAN_CURRENT_FILE_PATH_6D17349F = + "文件版本号高于当前版本,文件路径:{}"; + public static final String STORAGE_LOG_FAILED_TO_FIND_MOUNT_POINT_SKIP_REGISTER_IT_TO_MAP_33F38542 = + "无法找到 mount point {},跳过注册到 map"; + public static final String STORAGE_LOG_EXCEPTION_OCCURS_WHEN_READING_DATA_DIR_S_MOUNT_POINT_9421E685 = + "读取 data dir 的挂载点 {} 时发生异常"; + public static final String STORAGE_LOG_EXCEPTION_OCCURS_WHEN_READING_TARGET_FILE_S_MOUNT_POINT_47567945 = + "读取目标文件的挂载点 {} 时发生异常"; + public static final String STORAGE_LOG_REJECTING_AUTO_LOAD_TSFILE_ISGENERATEDBYPIPE_DUE_TO_MEMORY_9A60DF29 = + "拒绝自动加载 TsFile {} (isGeneratedByPipe = {}),原因:内存受限,稍后重试。"; + public static final String STORAGE_LOG_REJECTING_AUTO_LOAD_TSFILE_ISGENERATEDBYPIPE_DUE_TO_THE_16FA5F18 = + "拒绝自动加载 TsFile {} (isGeneratedByPipe = {}),原因:system 为只读模式,稍后重试。"; + public static final String STORAGE_LOG_REJECTING_AUTO_LOAD_TSFILE_ISGENERATEDBYPIPE_DUE_TO_TIME_E18630DE = + "拒绝自动加载 TsFile {} (isGeneratedByPipe = {}),原因:等待 procedure return 超时,稍后重试。"; + public static final String STORAGE_LOG_REJECTING_AUTO_LOAD_TSFILE_ISGENERATEDBYPIPE_DUE_TO_THE_5F811A8B = + "拒绝自动加载 TsFile {} (isGeneratedByPipe = {}),原因:DataNode 数量不足,稍后重试。"; + public static final String STORAGE_LOG_REJECTING_AUTO_LOAD_TSFILE_ISGENERATEDBYPIPE_DUE_TO_FAIL_F59307B8 = + "拒绝自动加载 TsFile {} (isGeneratedByPipe = {}),原因:无法连接任何 config node,稍后重试。"; + public static final String STORAGE_LOG_REJECTING_AUTO_LOAD_TSFILE_ISGENERATEDBYPIPE_DUE_TO_CURRENT_264E12EE = + "拒绝自动加载 TsFile {} (isGeneratedByPipe = {}),原因:当前查询已超时,稍后重试。"; + public static final String STORAGE_LOG_SUCCESSFULLY_AUTO_LOAD_TSFILE_ISGENERATEDBYPIPE_ADB5FEC9 = + "成功自动加载 TsFile {} (isGeneratedByPipe = {})"; + public static final String STORAGE_LOG_ERROR_OCCURRED_DURING_CREATING_FAIL_DIRECTORY_FOR_ACTIVE_7D3BEB38 = + "为 active load 创建失败目录 {} 时发生错误。"; + public static final String STORAGE_LOG_FAILED_TO_AUTO_LOAD_TSFILE_ISGENERATEDBYPIPE_STATUS_FILE_F43E9EF7 = + "自动加载 TsFile {} (isGeneratedByPipe = {}) 失败,状态:{}。文件将被移动到失败目录。"; + public static final String STORAGE_LOG_FAILED_TO_AUTO_LOAD_TSFILE_ISGENERATEDBYPIPE_DUE_TO_FILE_5EE1FA08 = + "无法自动加载 TsFile {} (isGeneratedByPipe = {}),原因:文件未找到,将跳过该文件。"; + public static final String STORAGE_LOG_FAILED_TO_AUTO_LOAD_TSFILE_ISGENERATEDBYPIPE_BECAUSE_OF_07946D74 = + "自动加载 TsFile {} (isGeneratedByPipe = {}) 失败,原因:发生未知异常。文件将被移动到失败目录。"; + public static final String STORAGE_LOG_ERROR_OCCURRED_DURING_HOT_RELOAD_ACTIVE_LOAD_DIRS_CURRENT_673AFC0F = + "热重载 active load 目录时发生错误。当前 active load 监听目录:{}。"; + public static final String STORAGE_LOG_CURRENT_DIR_PATH_IS_NOT_READABLE_SKIP_SCANNING_THIS_DIR_9C8B7E00 = + "当前目录路径不可读:{}。跳过扫描该目录。请检查权限。"; + public static final String STORAGE_LOG_CURRENT_DIR_PATH_IS_NOT_WRITABLE_SKIP_SCANNING_THIS_DIR_4885E78F = + "当前目录路径不可写:{}。跳过扫描该目录。请检查权限。"; + public static final String STORAGE_LOG_ERROR_OCCURRED_DURING_CHECKING_R_W_PERMISSION_OF_DIR_SKIP_3EC7FC7D = + "检查目录 {} 的 r/w 权限时发生错误。跳过扫描该目录。"; + public static final String STORAGE_LOG_REPORT_DATABASE_STATUS_TO_THE_SYSTEM_AFTER_ADDING_CURRENT_8982BBD7 = + "向系统报告数据库状态。添加 {} 后,当前 sg 内存开销为 {}。"; + public static final String STORAGE_LOG_THE_TOTAL_DATABASE_MEM_COSTS_ARE_TOO_LARGE_CALL_FOR_FLUSHING_26AD8CDF = + "数据库总内存开销过大,调用 flush。当前 sg 开销为 {}"; + public static final String STORAGE_LOG_SG_RELEASED_MEMORY_DELTA_BUT_STILL_EXCEEDING_FLUSH_PROPORTION_DB68D9D5 = + "SG ({}) 已释放内存 (delta:{}),但仍超过 flush 比例 (totalSgMemCost:{}),调用 flush。"; + public static final String STORAGE_LOG_SG_RELEASED_MEMORY_DELTA_SYSTEM_IS_IN_NORMAL_STATUS_TOTALSGMEMCOST_600A4A8D = + "SG ({}) 已释放内存 (delta:{}),系统处于正常状态 (totalSgMemCost:{})。"; + public static final String STORAGE_LOG_CHANGE_SYSTEM_TO_REJECT_STATUS_TRIGGERED_BY_LOGICAL_SG_MEM_6F9BCBD3 = + "将系统切换为拒绝状态。触发原因:logical SG ({}),内存开销增量 ({}),totalSgMemCost ({}),REJECT_THRESHOLD ({})"; + public static final String STORAGE_LOG_SG_RELEASED_MEMORY_DELTA_SET_SYSTEM_TO_NORMAL_STATUS_TOTALSGMEMCOST_0F714668 = + "SG ({}) 已释放内存 (delta:{}),将系统设置为正常状态 (totalSgMemCost:{})。"; + public static final String STORAGE_LOG_SG_RELEASED_MEMORY_DELTA_BUT_SYSTEM_IS_STILL_IN_REJECT_STATUS_AD5E475C = + "SG ({}) 已释放内存 (delta:{}),但系统仍处于拒绝状态 (totalSgMemCost:{})。"; + public static final String STORAGE_LOG_DEGRADE_LASTFLUSHTIMEMAP_OF_OLD_TIMEPARTITIONINFO_MEM_SIZE_BED053EE = + "[{}] 降级旧 TimePartitionInfo-{} 的 LastFlushTimeMap,内存大小为 {},剩余内存开销为 {}"; + public static final String STORAGE_LOG_LIMIT_OF_ARRAY_DEQUE_SIZE_UPDATED_05DBA95E = + "{} array deque 大小限制已更新:{} -> {}"; + public static final String STORAGE_LOG_LIMITUPDATETHRESHOLD_OF_PRIMITIVEARRAYMANAGER_UPDATED_394801AE = + "PrimitiveArrayManager 的 limitUpdateThreshold 已更新:{} -> {}"; + public static final String STORAGE_LOG_CREATE_FOLDER_FAILED_IS_THE_FOLDER_EXISTED_18E29D51 = + "创建目录 {} 失败。目录是否已存在:{}"; + public static final String STORAGE_LOG_CAN_T_FIND_STRATEGY_FOR_MULT_DIRECTORIES_A06406EC = + "无法为 mult-directories 找到 strategy {}。"; + + // --------------------------------------------------------------------------- + // 补充异常消息 + // --------------------------------------------------------------------------- + public static final String STORAGE_EXCEPTION_SYSTEM_REJECTED_OVER_SMS_94CEF932 = + "系统拒绝,等待超过 %sms"; + public static final String STORAGE_EXCEPTION_FAILED_TO_CREATE_TSFILEWRITERMANAGER_FOR_UUID_S_BECAUSE_A0D68950 = + "磁盘空间不足,无法为 uuid %s 创建 TsFileWriterManager。"; + public static final String STORAGE_EXCEPTION_STORAGE_ALLOCATION_FAILED_FOR_S_TIER_D_E2C94F74 = + "%s (tier %d) 的存储分配失败"; + public static final String STORAGE_EXCEPTION_DATA_REGION_S_S_IS_DOWN_BECAUSE_THE_TIME_OF_TSFILE_S_IS_1F732E71 = + "data region %s[%s] 已下线,原因:TsFile %s 的时间大于系统当前时间,文件时间为 %d,系统当前时间为 %d,请检查。"; + public static final String STORAGE_EXCEPTION_UNABLE_TO_CONTINUE_WRITING_DATA_BECAUSE_THE_SPACE_ALLOCATED_9A5FB99E = + "无法继续写入数据,数据库 %s 已分配空间已达到上限"; + public static final String STORAGE_EXCEPTION_FAILED_TO_CREATE_TSFILEPROCESSOR_FOR_DATABASE_S_TIMEPARTITIONID_0CD885BB = + "无法为数据库 %s、timePartitionId %s 创建 TsFileProcessor"; + public static final String STORAGE_EXCEPTION_DELETE_FAILED_PLEASE_DO_NOT_DELETE_UNTIL_THE_OLD_FILES_SETTLED_6C9F17CC = + "删除失败。请勿删除,直到旧文件 settle 完成。"; + public static final String STORAGE_EXCEPTION_MULTIPLE_ERRORS_OCCURRED_WHILE_WRITING_MOD_FILES_SEE_LOGS_529D7145 = + "写入 mod 文件时发生多个错误,详情见日志。"; + public static final String STORAGE_EXCEPTION_MEET_ERROR_WHEN_SETTLING_FILE_S_4D6ECCEE = + "settling 文件时遇到错误:%s"; + public static final String STORAGE_EXCEPTION_PEER_IS_INACTIVE_AND_NOT_READY_TO_WRITE_REQUEST_S_DATANODE_EDFE5AEF = + "Peer 处于 inactive 状态且尚未准备好写入请求,%s,DataNode Id:%s"; + public static final String STORAGE_EXCEPTION_TSFILE_VALIDATE_FAILED_S_3CDE0677 = + "TsFile validation 失败,%s"; + public static final String STORAGE_EXCEPTION_FILE_RENAMING_FAILED_WHEN_LOADING_TSFILE_ORIGIN_S_TARGET_37BDA16F = + "加载 TsFile 时重命名文件失败。Origin:%s,Target:%s,原因:%s"; + public static final String STORAGE_EXCEPTION_FILE_RENAMING_FAILED_WHEN_LOADING_RESOURCE_FILE_ORIGIN_S_9622AA6D = + "加载 .resource 文件时重命名文件失败。Origin:%s,Target:%s,原因:%s"; + public static final String STORAGE_EXCEPTION_FILE_RENAMING_FAILED_WHEN_LOADING_MOD_FILE_ORIGIN_S_TARGET_EEB4EDE7 = + "加载 .mod 文件时重命名文件失败。Origin:%s,Target:%s,原因:%s"; + public static final String STORAGE_EXCEPTION_TOTAL_ALLOCATED_MEMORY_FOR_DIRECT_BUFFER_WILL_BE_S_WHICH_FD7DC149 = + "direct buffer 总分配内存将达到 %s,大于 limit mem cost:%s"; + public static final String STORAGE_EXCEPTION_S_ALREADY_EXISTS_AND_IS_NOT_EMPTY_CF0BD6A4 = + "%s 已存在且非空"; + public static final String STORAGE_EXCEPTION_S_S_WRITE_WAL_FAILED_S_5A7E61FB = + "%s:%s 写入 WAL 失败:%s"; + public static final String STORAGE_EXCEPTION_MEMORY_NOT_ENOUGH_TO_CLONE_THE_TVLIST_DURING_FLUSH_PHASE_75C90725 = + "flush 阶段克隆 tvlist 的内存不足"; + public static final String STORAGE_EXCEPTION_DATA_TYPE_S_IS_NOT_SUPPORTED_5D5C02E4 = + "不支持 Data type %s。"; + public static final String STORAGE_EXCEPTION_CURINDEX_D_IS_NOT_EQUAL_TO_CURSEQINDEX_D_6B9B1134 = + "curIndex %d 不等于 curSeqIndex %d"; + public static final String STORAGE_EXCEPTION_CURINDEX_D_IS_NOT_EQUAL_TO_CURUNSEQINDEX_D_AB32F71D = + "curIndex %d 不等于 curUnSeqIndex %d"; + public static final String STORAGE_EXCEPTION_PAGEID_IN_SHAREDTIMEDATABUFFER_SHOULD_BE_INCREMENTAL_A5E6C4EE = + "SharedTimeDataBuffer 中的 PageId 应递增。"; + public static final String STORAGE_EXCEPTION_CAN_T_READ_FILE_S_S_FROM_DISK_9D5066C0 = + "无法从磁盘读取文件 %s%s"; + public static final String STORAGE_EXCEPTION_SHOULD_NOT_GET_PROGRESS_INDEX_FROM_A_UNCLOSING_TSFILERESOURCE_129FD925 = + "不应从未关闭的 TsFileResource 获取 progress index。"; + public static final String STORAGE_EXCEPTION_DIRECTORY_CREATION_FAILED_S_PERMISSION_DENIED_OR_PARENT_2855777B = + "目录创建失败:%s (权限被拒绝或父目录不可写)"; + public static final String STORAGE_EXCEPTION_FAILED_TO_GET_DEVICES_FROM_TSFILE_S_S_412EEA1A = + "无法从 TsFile 获取 devices:%s%s"; + public static final String STORAGE_EXCEPTION_UNSUPPORTED_RECORD_TYPE_IN_FILE_S_TYPE_S_DADEE641 = + "文件 %s 中存在不支持的 record type,type:%s"; + public static final String STORAGE_EXCEPTION_CORRESPONDING_MEMORY_ESTIMATOR_FOR_S_PERFORMER_OF_S_SPACE_D543D3EF = + "%s performer 的 %s space compaction 对应内存估算器不存在。"; + public static final String STORAGE_EXCEPTION_HAS_BEEN_WAITING_OVER_S_SECONDS_FOR_ALL_SUB_COMPACTION_TASKS_76BD45D6 = + "等待所有 sub compaction 任务完成已超过 %s 秒。"; + public static final String STORAGE_EXCEPTION_HAS_BEEN_WAITING_OVER_S_SECONDS_FOR_ALL_COMPACTION_TASKS_87E1B82E = + "等待所有 compaction 任务完成已超过 %s 秒。"; + public static final String STORAGE_EXCEPTION_EXCEPTION_TO_PARSE_THE_TSFILE_S_IN_SETTLING_D40564AD = + "settling 过程中解析 TsFile 失败:%s"; + public static final String STORAGE_EXCEPTION_THESE_DEVICES_S_DO_NOT_EXIST_IN_THE_TSFILE_5A03F30D = + "这些 devices (%s) 在 TsFile 中不存在"; + public static final String STORAGE_EXCEPTION_CANNOT_SET_SINGLE_TYPE_OF_SOURCE_FILES_TO_THIS_KIND_OF_PERFORMER_6B422172 = + "无法将单一类型的源文件设置给此类 performer"; + public static final String STORAGE_EXCEPTION_CANNOT_SET_BOTH_SEQ_FILES_AND_UNSEQ_FILES_TO_THIS_KIND_OF_F68F629E = + "无法将 seq 文件和 unseq 文件同时设置给此类 performer"; + public static final String STORAGE_EXCEPTION_THIS_TABLENAME_IS_S_MERGE_TABLENAME_IS_S_4B05FA97 = + "当前 tableName 为 %s,merge tableName 为 %s"; + public static final String STORAGE_EXCEPTION_S_S_COMPACTION_ABORT_7D0CB1E5 = + "%s-%s [Compaction] 中止"; + public static final String STORAGE_EXCEPTION_FAILED_TO_PASS_COMPACTION_VALIDATION_RESOURCES_FILE_OR_TSFILE_4B78731F = + "无法通过 compaction validation,.resources 文件或 TsFile 数据错误"; + public static final String STORAGE_EXCEPTION_FAILED_TO_DELETE_EMPTY_TARGET_FILE_S_324EF900 = + "无法删除 empty target 文件 %s"; + public static final String STORAGE_EXCEPTION_TARGET_FILE_IS_NOT_COMPLETED_S_E65150DB = + "Target 文件未完成。%s"; + public static final String STORAGE_EXCEPTION_DOES_NOT_SUPPORT_THIS_METHOD_IN_READPOINTCROSSCOMPACTIONWRITER_D024F312 = + "ReadPointCrossCompactionWriter 不支持此方法"; + public static final String STORAGE_EXCEPTION_UNKNOWN_COMPACTION_LOG_LINE_S_C0A9DC05 = + "未知的 compaction 日志行:%s"; + public static final String STORAGE_EXCEPTION_PATH_S_CANNOT_BE_PARSED_INTO_FILE_INFO_631C48C8 = + "Path %s 无法解析为文件信息"; + public static final String STORAGE_EXCEPTION_STRING_S_IS_NOT_A_LEGAL_FILE_INFO_STRING_0CBEAB8E = + "String %s 不是合法的文件信息字符串"; + public static final String STORAGE_EXCEPTION_UNSUPPORTED_DATA_TYPE_S_D16A1E9A = + "不支持的数据类型:%s"; + public static final String STORAGE_EXCEPTION_DO_NOT_HAVE_A_COMPLETE_PAGE_BODY_EXPECTED_S_ACTUAL_S_3A05EF8F = + "没有完整的 page body。期望:%s。实际:%s"; + public static final String STORAGE_EXCEPTION_COMPACTION_COMPACTION_FOR_TARGET_FILE_S_ABORT_46ECFF41 = + "[Compaction] target 文件 %s 的 compaction 中止"; + public static final String STORAGE_EXCEPTION_COMPACTIONTASKSUMMARY_FOR_FASTCOMPACTIONPERFORMER_SHOULD_F5710AA8 = + "FastCompactionPerformer 的 CompactionTaskSummary 应为 FastCompactionTaskSummary"; + public static final String STORAGE_EXCEPTION_COMPACTION_COMPACTION_FOR_TARGET_FILES_S_ABORT_AFC87906 = + "[Compaction] target 文件 %s 的 compaction 中止"; + public static final String STORAGE_EXCEPTION_ILLEGAL_COMPACTION_PERFORMER_FOR_UNSEQ_INNER_COMPACTION_50D566DF = + "非法的 unseq inner compaction performer %s"; + public static final String STORAGE_EXCEPTION_ILLEGAL_COMPACTION_PERFORMER_FOR_SEQ_INNER_COMPACTION_S_2C2F1F66 = + "非法的 seq inner compaction performer %s"; + public static final String STORAGE_EXCEPTION_ILLEGAL_COMPACTION_PERFORMER_FOR_CROSS_COMPACTION_S_17C6E05D = + "非法的 cross compaction performer %s"; + public static final String STORAGE_EXCEPTION_SOURCE_FILE_S_IS_DELETED_D2ED7D90 = + "源文件 %s 已删除"; + public static final String STORAGE_EXCEPTION_S_S_EXCEEDS_SHORT_RANGE_1DF75A2D = + "%s %s 超出 short 范围"; + public static final String STORAGE_EXCEPTION_THE_ELEMENT_SIZE_OF_WALENTRY_S_IS_LARGER_THAN_THE_TOTAL_E494520D = + "WALEntry %s 的元素大小大于 wal buffer queue 的总内存大小 %s"; + public static final String STORAGE_EXCEPTION_FAIL_TO_GET_WAL_FILE_BY_VERSIONID_S_AND_FILES_S_9CB045F4 = + "无法通过 versionId=%s 和 files=%s 获取 wal 文件。"; + public static final String STORAGE_EXCEPTION_CANNOT_MAKE_OTHER_CHECKPOINT_TYPES_IN_THE_WAL_BUFFER_TYPE_E9053BC1 = + "无法在 wal buffer 中创建其他 checkpoint 类型,type 为 %s"; + public static final String STORAGE_EXCEPTION_FAILED_RECOVER_THE_RESOURCE_FILE_S_S_S_E35EF7D5 = + "恢复 resource 文件失败:%s%s%s"; + public static final String STORAGE_EXCEPTION_THE_INITIAL_LIMITED_MEMORY_SIZE_D_IS_LESS_THAN_THE_MINIMUM_FC044302 = + "初始限制内存大小 %d 小于最小内存大小 %d"; + public static final String STORAGE_EXCEPTION_SETTOTALMEMORYSIZEINBYTES_IS_NOT_SUPPORTED_FOR_LOADTSFILEDATACACHEMEMORYBLOCK_DFAB2A2A = + "LoadTsFileDataCacheMemoryBlock 不支持 setTotalMemorySizeInBytes"; + public static final String STORAGE_EXCEPTION_FORCEALLOCATE_FAILED_TO_ALLOCATE_MEMORY_FROM_QUERY_ENGINE_F91D5959 = + "forceAllocate:重试 %s 次后仍无法从查询引擎分配内存,查询总内存 %s 字节,Load 当前可用内存 %s 字节,当前 Load 已使用内存大小 %s 字节,Load 请求的内存大小 %s 字节"; + public static final String STORAGE_EXCEPTION_LOAD_INVALID_MEMORY_SIZE_D_BYTES_MUST_BE_POSITIVE_D6586ED3 = + "Load:无效内存大小 %d 字节,必须为正数"; + public static final String STORAGE_EXCEPTION_LOAD_INVALID_MEMORY_SIZE_D_BYTES_MUST_BE_NON_NEGATIVE_A0146353 = + "Load:无效内存大小 %d 字节,必须为非负数"; + public static final String STORAGE_EXCEPTION_MAGIC_STRING_CHECK_ERROR_WHEN_PARSING_TSFILE_S_EA3D68E3 = + "解析 TsFile %s 时 Magic String 检查错误。"; + public static final String STORAGE_EXCEPTION_EMPTY_NONALIGNED_CHUNK_OR_TIME_CHUNK_WITH_OFFSET_D_IN_TSFILE_B1E462C9 = + "offset 为 %d 的 Nonaligned Chunk 或 Time Chunk 为空,TsFile 为 %s。"; + public static final String STORAGE_EXCEPTION_TIME_PARTITION_SLOTS_SIZE_IS_GREATER_THAN_S_D076F78E = + "Time partition slots size 大于 %s"; + public static final String STORAGE_EXCEPTION_CONSUME_ALIGNED_CHUNK_DATA_ERROR_NEXT_CHUNK_OFFSET_D_CHUNKDATA_D896FAE2 = + "消费 aligned chunk 数据出错,下一个 chunk 偏移量:%d,chunkData:%s"; + public static final String STORAGE_EXCEPTION_CONSUME_CHUNKDATA_ERROR_CHUNK_OFFSET_D_MEASUREMENT_S_CHUNKDATA_4A1F1EE1 = + "消费 chunkData 出错,chunk 偏移量:%d,measurement:%s,chunkData:%s"; + public static final String STORAGE_EXCEPTION_TOTAL_DATABASE_MEMCOST_S_IS_OVER_THAN_MEMORYSIZEFORWRITING_C63E4D72 = + "数据库总 MemCost %s 超过 MemorySizeForWriting %s"; + public static final String STORAGE_EXCEPTION_REQUIRED_FILE_NUM_D_IS_GREATER_THAN_THE_MAX_FILE_NUM_D_FOR_AB6DE95B = + "所需文件数 %d 大于 compaction 最大文件数 %d。"; + public static final String STORAGE_EXCEPTION_FAILED_TO_ALLOCATE_D_FILES_FOR_COMPACTION_AFTER_D_SECONDS_C701F750 = + "无法为 compaction 分配 %d 个文件,等待 %d 秒后仍失败,compaction 模块最大文件数为 %d,已使用 %d 个文件。"; + public static final String STORAGE_EXCEPTION_FAILED_TO_ALLOCATE_D_FILES_FOR_COMPACTION_MAX_FILE_NUM_FOR_9B954F8C = + "无法为 compaction 分配 %d 个文件,compaction 模块最大文件数为 %d,已使用 %d 个文件。"; + public static final String STORAGE_EXCEPTION_REQUIRED_MEMORY_COST_D_BYTES_IS_GREATER_THAN_THE_TOTAL_MEMORY_444D8FE4 = + "所需内存开销 %d 字节大于 compaction 总内存预算 %d 字节"; + public static final String STORAGE_EXCEPTION_FAILED_TO_ALLOCATE_D_BYTES_MEMORY_FOR_COMPACTION_TOTAL_MEMORY_33BE3C71 = + "无法为 compaction 分配 %d 字节内存,compaction 模块总内存预算为 %d 字节,已使用 %d 字节"; + public static final String STORAGE_EXCEPTION_NUMBER_OF_REQUESTS_EXCEEDED_WAIT_SMS_30F0842F = + "请求数量超限 - 等待 %sms"; + public static final String STORAGE_EXCEPTION_REQUEST_SIZE_LIMIT_EXCEEDED_WAIT_SMS_11C1E549 = + "请求大小超限 - 等待 %sms"; + public static final String STORAGE_EXCEPTION_NUMBER_OF_WRITE_REQUESTS_EXCEEDED_WAIT_SMS_D11F94D2 = + "写入请求数量超限 - 等待 %sms"; + public static final String STORAGE_EXCEPTION_WRITE_SIZE_LIMIT_EXCEEDED_WAIT_SMS_AA3796DC = + "写入大小超限 - 等待 %sms"; + public static final String STORAGE_EXCEPTION_NUMBER_OF_READ_REQUESTS_EXCEEDED_WAIT_SMS_C92D6C43 = + "读取请求数量超限 - 等待 %sms"; + public static final String STORAGE_EXCEPTION_READ_SIZE_LIMIT_EXCEEDED_WAIT_SMS_E19598BA = + "读取大小超限 - 等待 %sms"; + public static final String STORAGE_EXCEPTION_UNABLE_TO_CREATE_DIRECTORY_S_BECAUSE_THERE_IS_FILE_UNDER_1C59ACFC = + "无法创建目录 %s,原因:该路径下存在文件,请检查配置并重启。"; + public static final String STORAGE_EXCEPTION_UNABLE_TO_CREATE_DIRECTORY_S_PLEASE_CHECK_CONFIGURATION_BA580B67 = + "无法创建目录 %s,请检查配置并重启。"; + public static final String STORAGE_EXCEPTION_CONFLICT_IS_DETECTED_IN_DIRECTORY_S_WHICH_MAY_BE_BEING_USED_CB5C77FC = + "目录 %s 检测到冲突,可能正被另一个 IoTDB 使用 (ProcessId=%s)。请检查配置并重启。"; + public static final String COMPACTION_INNER_SPACE = "内部"; + public static final String COMPACTION_CROSS_SPACE = "跨空间"; + public static final String DEVICE_DOES_NOT_EXIST_IN_RESOURCE_FILE_FMT = + "%s 在资源文件中不存在"; + public static final String TARGET_FILE_SMALLER_THAN_MAGIC_STRING_AND_VERSION_NUMBER_SIZE_FMT = + "目标文件 %s 小于 magic string 和版本号大小"; + public static final String CURRENT_POINT_TIMESTAMP_SHOULD_BE_LATER_FMT = + "%s 的当前点时间戳为 %s,应晚于最后时间 %s"; + public static final String DEVICE_TIME_RANGE_VERIFICATION_FAILED_FMT = + "设备(%s) 的时间范围校验失败。%s"; + public static final String CURRENT_DEVICE_TIME_RANGE_MISMATCH_FMT = + "当前设备时间范围为 %s,应等于实际设备时间范围 %s"; + public static final String CURRENT_TIMESERIES_METADATA_MISMATCH_FMT = + "当前 timeseriesMetadata 为 %s,应等于实际时间范围 %s"; + public static final String CURRENT_CHUNK_METADATA_MISMATCH_FMT = + "当前 chunkMetadata 为 %s,应等于实际 chunk 时间范围 %s"; + public static final String CURRENT_PAGE_TIME_RANGE_MISMATCH_FMT = + "当前 page 为 %s,应包含实际 page 数据时间范围 %s"; + public static final String COMPACTION_VALIDATION_SEQUENCE_FILES_HAS_OVERLAP_FMT = + "未通过 compaction 校验,顺序文件存在重叠,文件为 %s"; + public static final String TSFILE_CANNOT_TRANSIT_TO_COMPACTING_FMT = + "TsFile %s 无法转换为 COMPACTING,当前状态:%s"; + public static final String CURRENT_PAGE_CANNOT_BE_ALIGNED_WITH_TIME_CHUNK_FMT = + "当前 page %s 无法与 time chunk %s 对齐,page index 为 %s"; + public static final String CURRENT_CHUNK_CANNOT_BE_ALIGNED_WITH_TIME_CHUNK_FMT = + "当前 chunk %s 无法与 time chunk:%s 对齐,第一批中的所有 time chunk 为 %s"; + public static final String WAL_NODE_CLOSED_FMT = "wal node-%s 已关闭"; + public static final String BROKEN_WAL_FILE_FMT = "WAL 文件 %s 损坏,大小为 %d"; + public static final String TSFILE_READER_CLOSED_BECAUSE_NO_REFERENCE = + "{} TsFileReader 因没有引用已关闭。"; + public static final String CLOSED_TSFILE_READER_CLOSED = + "{} closedTsFileReader 已关闭。"; + public static final String UNCLOSED_TSFILE_READER_CLOSED = + "{} unclosedTsFileReader 已关闭。"; + + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String MESSAGE_NO_LOAD_TSFILE_UUID_ARG_RECORDED_EXECUTE_LOAD_COMMAND_ARG_66722D80 = "未记录 Load TsFile uuid %s,执行 Load 命令为 %s。"; + public static final String EXCEPTION_NON_MINUS_ALIGNED_CHUNK_ONLY_HAS_ONE_MEASUREMENT_COMMA_BUT_MEASUREMENTINDEX_IS_E1A87F80 = "非对齐 chunk 只有一个 measurement,但 measurementIndex 为 "; + } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/auth/AuthorityChecker.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/auth/AuthorityChecker.java index 164baa4f1981f..646f093ba5746 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/auth/AuthorityChecker.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/auth/AuthorityChecker.java @@ -39,6 +39,7 @@ import org.apache.iotdb.confignode.rpc.thrift.TRoleResp; import org.apache.iotdb.confignode.rpc.thrift.TTablePrivilege; import org.apache.iotdb.confignode.rpc.thrift.TUserResp; +import org.apache.iotdb.db.i18n.DataNodeMiscMessages; import org.apache.iotdb.db.pipe.source.dataregion.realtime.listener.PipeInsertionDataNodeListener; import org.apache.iotdb.db.protocol.session.IClientSession; import org.apache.iotdb.db.queryengine.common.header.DatasetHeader; @@ -262,7 +263,11 @@ public static TSStatus getGrantOptTSStatus( return hasPermission ? SUCCEED : new TSStatus(TSStatusCode.NOT_HAS_PRIVILEGE_GRANTOPT.getStatusCode()) - .setMessage(NO_GRANT_OPT_PERMISSION_PROMOTION + neededPrivilege + " ON DB:" + database); + .setMessage( + NO_GRANT_OPT_PERMISSION_PROMOTION + + neededPrivilege + + DataNodeMiscMessages.MESSAGE_DB_34B9E556 + + database); } public static TSStatus getGrantOptTSStatus( @@ -273,9 +278,9 @@ public static TSStatus getGrantOptTSStatus( .setMessage( NO_GRANT_OPT_PERMISSION_PROMOTION + neededPrivilege - + " ON " + + DataNodeMiscMessages.MESSAGE_MESSAGE_CECB319D + database - + "." + + DataNodeMiscMessages.MESSAGE_DOT_9D9B854A + table); } @@ -284,7 +289,11 @@ public static TSStatus getTSStatus( return hasPermission ? SUCCEED : new TSStatus(TSStatusCode.NO_PERMISSION.getStatusCode()) - .setMessage(NO_PERMISSION_PROMOTION + neededPrivilege + " ON DB:" + database); + .setMessage( + NO_PERMISSION_PROMOTION + + neededPrivilege + + DataNodeMiscMessages.MESSAGE_DB_34B9E556 + + database); } public static TSStatus getTSStatus( @@ -293,7 +302,12 @@ public static TSStatus getTSStatus( ? SUCCEED : new TSStatus(TSStatusCode.NO_PERMISSION.getStatusCode()) .setMessage( - NO_PERMISSION_PROMOTION + neededPrivilege + " ON " + database + "." + table); + NO_PERMISSION_PROMOTION + + neededPrivilege + + DataNodeMiscMessages.MESSAGE_MESSAGE_CECB319D + + database + + DataNodeMiscMessages.MESSAGE_DOT_9D9B854A + + table); } public static TSStatus getTSStatus( @@ -301,7 +315,11 @@ public static TSStatus getTSStatus( return hasPermission ? SUCCEED : new TSStatus(TSStatusCode.NO_PERMISSION.getStatusCode()) - .setMessage(NO_PERMISSION_PROMOTION + neededPrivilege + " on " + path); + .setMessage( + NO_PERMISSION_PROMOTION + + neededPrivilege + + DataNodeMiscMessages.MESSAGE_MESSAGE_57992626 + + path); } public static TSStatus getTSStatus( diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/auth/ClusterAuthorityFetcher.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/auth/ClusterAuthorityFetcher.java index 641ead173d2be..d308d597c9693 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/auth/ClusterAuthorityFetcher.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/auth/ClusterAuthorityFetcher.java @@ -607,7 +607,9 @@ public User getUser(String userName, final boolean force) { } if (user == null && force) { throw new IoTDBRuntimeException( - "User " + userName + " does not exist", TSStatusCode.USER_NOT_EXIST.getStatusCode()); + String.format( + DataNodeMiscMessages.MISC_EXCEPTION_USER_S_DOES_NOT_EXIST_0CE725D8, userName), + TSStatusCode.USER_NOT_EXIST.getStatusCode()); } return user; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/auth/LoginLockManager.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/auth/LoginLockManager.java index 6015d1d538f91..ce29f035352a0 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/auth/LoginLockManager.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/auth/LoginLockManager.java @@ -85,7 +85,8 @@ public LoginLockManager( if (this.failedLoginAttempts > 1) { this.failedLoginAttemptsPerUser = 1000; LOGGER.warn( - "User-level attempts auto-enabled with default 1000 because IP-level is enabled (set to {})", + DataNodeMiscMessages + .MISC_LOG_USER_LEVEL_ATTEMPTS_AUTO_ENABLED_WITH_DEFAULT_1000_BECAUSE_FAB86B7D, this.failedLoginAttempts); } } else { @@ -96,12 +97,15 @@ public LoginLockManager( this.passwordLockTimeMinutes = passwordLockTimeMinutes >= 1 ? passwordLockTimeMinutes : 10; if (passwordLockTimeMinutes < 1) { LOGGER.warn( - "Invalid lock time value ({}), reset to default (10 minutes)", passwordLockTimeMinutes); + DataNodeMiscMessages + .MISC_LOG_INVALID_LOCK_TIME_VALUE_RESET_TO_DEFAULT_10_MINUTES_8DCE21EF, + passwordLockTimeMinutes); } // Log final effective configuration LOGGER.info( - "Login lock manager initialized with: IP-level attempts={}, User-level attempts={}, Lock time={} minutes", + DataNodeMiscMessages + .MISC_LOG_LOGIN_LOCK_MANAGER_INITIALIZED_WITH_IP_LEVEL_ATTEMPTS_USER_57AE7966, this.failedLoginAttempts == -1 ? "disabled" : this.failedLoginAttempts, this.failedLoginAttemptsPerUser == -1 ? "disabled" : this.failedLoginAttemptsPerUser, this.passwordLockTimeMinutes); @@ -238,7 +242,7 @@ public void recordFailure(long userId, String ip) { int failCountUser = existing.getFailureCount(); if (failCountUser >= failedLoginAttemptsPerUser) { LOGGER.info( - "User ID '{}' locked due to {} failed attempts", + DataNodeMiscMessages.MISC_LOG_USER_ID_LOCKED_DUE_TO_FAILED_ATTEMPTS_743CFB3A, userId, failedLoginAttemptsPerUser); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/DataNodeMemoryConfig.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/DataNodeMemoryConfig.java index 7982eff927b87..0d27854ecc011 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/DataNodeMemoryConfig.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/DataNodeMemoryConfig.java @@ -152,8 +152,8 @@ public void init(TrimProperties properties) { properties.getProperty("storage_query_schema_consensus_free_memory_proportion"); if (memoryAllocateProportion != null) { LOGGER.warn( - "The parameter storage_query_schema_consensus_free_memory_proportion is deprecated since v1.2.3, " - + "please use datanode_memory_proportion instead."); + DataNodeMiscMessages + .MISC_LOG_THE_PARAMETER_STORAGE_QUERY_SCHEMA_CONSENSUS_FREE_MEMORY_51C9A377); } } @@ -206,18 +206,20 @@ public void init(TrimProperties properties) { onHeapMemoryManager.getOrCreateMemoryManager("Consensus", consensusMemorySize); pipeMemoryManager = onHeapMemoryManager.getOrCreateMemoryManager("Pipe", pipeMemorySize); LOGGER.info( - "initial allocateMemoryForWrite = {}", + DataNodeMiscMessages.MISC_LOG_INITIAL_ALLOCATEMEMORYFORWRITE_B90EC7D9, storageEngineMemoryManager.getTotalMemorySizeInBytes()); LOGGER.info( - "initial allocateMemoryForRead = {}", queryEngineMemoryManager.getTotalMemorySizeInBytes()); + DataNodeMiscMessages.MISC_LOG_INITIAL_ALLOCATEMEMORYFORREAD_07FB30F0, + queryEngineMemoryManager.getTotalMemorySizeInBytes()); LOGGER.info( - "initial allocateMemoryForSchema = {}", + DataNodeMiscMessages.MISC_LOG_INITIAL_ALLOCATEMEMORYFORSCHEMA_965D4CE3, schemaEngineMemoryManager.getTotalMemorySizeInBytes()); LOGGER.info( - "initial allocateMemoryForConsensus = {}", + DataNodeMiscMessages.MISC_LOG_INITIAL_ALLOCATEMEMORYFORCONSENSUS_18B40138, consensusMemoryManager.getTotalMemorySizeInBytes()); LOGGER.info( - "initial allocateMemoryForPipe = {}", pipeMemoryManager.getTotalMemorySizeInBytes()); + DataNodeMiscMessages.MISC_LOG_INITIAL_ALLOCATEMEMORYFORPIPE_616F9713, + pipeMemoryManager.getTotalMemorySizeInBytes()); initSchemaMemoryAllocate(schemaEngineMemoryManager, properties); initStorageEngineAllocate(storageEngineMemoryManager, properties); @@ -280,12 +282,13 @@ private void initSchemaMemoryAllocate( PARTITION_CACHE, schemaMemoryTotal * schemaMemoryProportion[2] / proportionSum); LOGGER.info( - "allocateMemoryForSchemaRegion = {}", + DataNodeMiscMessages.MISC_LOG_ALLOCATEMEMORYFORSCHEMAREGION_3BE141E8, schemaRegionMemoryManager.getTotalMemorySizeInBytes()); LOGGER.info( - "allocateMemoryForSchemaCache = {}", schemaCacheMemoryManager.getTotalMemorySizeInBytes()); + DataNodeMiscMessages.MISC_LOG_ALLOCATEMEMORYFORSCHEMACACHE_61BFCE7D, + schemaCacheMemoryManager.getTotalMemorySizeInBytes()); LOGGER.info( - "allocateMemoryForPartitionCache = {}", + DataNodeMiscMessages.MISC_LOG_ALLOCATEMEMORYFORPARTITIONCACHE_809AA695, partitionCacheMemoryManager.getTotalMemorySizeInBytes()); } @@ -306,7 +309,8 @@ private void initStorageEngineAllocate( if (rejectProportion + walBufferQueueProportion + devicePathCacheProportion >= 1) { LOGGER.warn( - "The sum of reject_proportion, wal_buffer_queue_proportion and device_path_cache_proportion is too large, use default values 0.8, 0.1 and 0.05."); + DataNodeMiscMessages + .MISC_LOG_THE_SUM_OF_REJECT_PROPORTION_WAL_BUFFER_QUEUE_PROPORTION_185B1C49); } else { setRejectProportion(rejectProportion); setWalBufferQueueProportion(walBufferQueueProportion); @@ -333,7 +337,8 @@ private void initStorageEngineAllocate( int proportionValue = Integer.parseInt(proportion.trim()); if (proportionValue <= 0) { LOGGER.warn( - "The value of storage_engine_memory_proportion is illegal, use default value 8:2 ."); + DataNodeMiscMessages + .MISC_LOG_THE_VALUE_OF_STORAGE_ENGINE_MEMORY_PROPORTION_IS_ILLEGAL_22CA9433); return; } storageEngineMemoryProportion += proportionValue; @@ -356,7 +361,8 @@ private void initStorageEngineAllocate( writeMemoryProportion += proportionValue; if (proportionValue <= 0) { LOGGER.warn( - "The value of write_memory_proportion is illegal, use default value 19:1 ."); + DataNodeMiscMessages + .MISC_LOG_THE_VALUE_OF_WRITE_MEMORY_PROPORTION_IS_ILLEGAL_USE_DEFAULT_EE4FA112); return; } } @@ -461,9 +467,10 @@ private void initQueryEngineMemoryAllocate( maxMemoryAvailable * Integer.parseInt(proportions[6].trim()) / proportionSum; } catch (Exception e) { throw new IllegalArgumentException( - "Each subsection of configuration item chunkmeta_chunk_timeseriesmeta_free_memory_proportion" - + " should be an integer, which is " - + queryMemoryAllocateProportion, + String.format( + DataNodeMiscMessages + .MISC_EXCEPTION_EACH_SUBSECTION_OF_CONFIGURATION_ITEM_CHUNKMETA_CHUNK_TIMESERIESMETA_77A43CE2, + queryMemoryAllocateProportion), e); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java index fec40a151509e..acb530b855667 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java @@ -1489,7 +1489,8 @@ void confirmMultiDirStrategy() { Class.forName(multiDirStrategyClassName); } catch (ClassNotFoundException e) { logger.warn( - "Cannot find given directory strategy {}, using the default value", + DataNodeMiscMessages + .MISC_LOG_CANNOT_FIND_GIVEN_DIRECTORY_STRATEGY_USING_THE_DEFAULT_VALUE_7997B145, getMultiDirStrategyClassName(), e); setMultiDirStrategyClassName(MULTI_DIR_STRATEGY_PREFIX + DEFAULT_MULTI_DIR_STRATEGY); @@ -2374,7 +2375,8 @@ public TSDataType getBooleanStringInferType() { public void setBooleanStringInferType(TSDataType booleanStringInferType) { if (booleanStringInferType != TSDataType.BOOLEAN && booleanStringInferType != TSDataType.TEXT) { logger.warn( - "Config Property boolean_string_infer_type can only be BOOLEAN or TEXT but is {}", + DataNodeMiscMessages + .MISC_LOG_CONFIG_PROPERTY_BOOLEAN_STRING_INFER_TYPE_CAN_ONLY_BE_BOOLEAN_2FA3AFC5, booleanStringInferType); return; } @@ -2398,7 +2400,8 @@ public void setFloatingStringInferType(TSDataType floatingNumberStringInferType) && floatingNumberStringInferType != TSDataType.FLOAT && floatingNumberStringInferType != TSDataType.TEXT) { logger.warn( - "Config Property floating_string_infer_type can only be FLOAT, DOUBLE or TEXT but is {}", + DataNodeMiscMessages + .MISC_LOG_CONFIG_PROPERTY_FLOATING_STRING_INFER_TYPE_CAN_ONLY_BE_FLOAT_8041EAC4, floatingNumberStringInferType); return; } @@ -2414,7 +2417,8 @@ public void setNanStringInferType(TSDataType nanStringInferType) { && nanStringInferType != TSDataType.FLOAT && nanStringInferType != TSDataType.TEXT) { logger.warn( - "Config Property nan_string_infer_type can only be FLOAT, DOUBLE or TEXT but is {}", + DataNodeMiscMessages + .MISC_LOG_CONFIG_PROPERTY_NAN_STRING_INFER_TYPE_CAN_ONLY_BE_FLOAT_61F60E0E, nanStringInferType); return; } @@ -2429,12 +2433,16 @@ void setDefaultDatabaseLevel(int defaultDatabaseLevel, boolean startUp) { if (defaultDatabaseLevel < 1) { if (startUp) { logger.warn( - "Illegal defaultDatabaseLevel: {}, should >= 1, use default value 1", + DataNodeMiscMessages + .MISC_LOG_ILLEGAL_DEFAULTDATABASELEVEL_SHOULD_1_USE_DEFAULT_VALUE_97F43732, defaultDatabaseLevel); defaultDatabaseLevel = 1; } else { throw new IllegalArgumentException( - String.format("Illegal defaultDatabaseLevel: %d, should >= 1", defaultDatabaseLevel)); + String.format( + DataNodeMiscMessages + .MISC_EXCEPTION_ILLEGAL_DEFAULTDATABASELEVEL_D_SHOULD_1_03088B38, + defaultDatabaseLevel)); } } this.defaultDatabaseLevel = defaultDatabaseLevel; @@ -4188,7 +4196,8 @@ public int getLoadTsFileSpiltPartitionMaxSize() { public void setLoadTsFileSpiltPartitionMaxSize(int loadTsFileSpiltPartitionMaxSize) { if (loadTsFileSpiltPartitionMaxSize <= 0) { throw new IllegalArgumentException( - "loadTsFileSpiltPartitionMaxSize should be greater than or equal to 0"); + DataNodeMiscMessages + .MISC_EXCEPTION_LOADTSFILESPILTPARTITIONMAXSIZE_SHOULD_BE_GREATER_THAN_OR_95B4DB23); } if (this.loadTsFileSpiltPartitionMaxSize == loadTsFileSpiltPartitionMaxSize) { @@ -4196,7 +4205,7 @@ public void setLoadTsFileSpiltPartitionMaxSize(int loadTsFileSpiltPartitionMaxSi } logger.info( - "Set loadTsFileSpiltPartitionMaxSize from {} to {}", + DataNodeMiscMessages.MISC_LOG_SET_LOADTSFILESPILTPARTITIONMAXSIZE_FROM_TO_560BA8F7, this.loadTsFileSpiltPartitionMaxSize, loadTsFileSpiltPartitionMaxSize); this.loadTsFileSpiltPartitionMaxSize = loadTsFileSpiltPartitionMaxSize; @@ -4209,13 +4218,14 @@ public int getLoadTsFileStatementSplitThreshold() { public void setLoadTsFileStatementSplitThreshold(final int loadTsFileStatementSplitThreshold) { if (loadTsFileStatementSplitThreshold < 0) { logger.warn( - "Invalid loadTsFileStatementSplitThreshold value: {}. Using default value: 10", + DataNodeMiscMessages + .MISC_LOG_INVALID_LOADTSFILESTATEMENTSPLITTHRESHOLD_VALUE_USING_DEFAULT_45EA7FBF, loadTsFileStatementSplitThreshold); return; } if (this.loadTsFileStatementSplitThreshold != loadTsFileStatementSplitThreshold) { logger.info( - "loadTsFileStatementSplitThreshold changed from {} to {}", + DataNodeMiscMessages.MISC_LOG_LOADTSFILESTATEMENTSPLITTHRESHOLD_CHANGED_FROM_TO_1CB90529, this.loadTsFileStatementSplitThreshold, loadTsFileStatementSplitThreshold); } @@ -4229,13 +4239,14 @@ public int getLoadTsFileSubStatementBatchSize() { public void setLoadTsFileSubStatementBatchSize(final int loadTsFileSubStatementBatchSize) { if (loadTsFileSubStatementBatchSize <= 0) { logger.warn( - "Invalid loadTsFileSubStatementBatchSize value: {}. Using default value: 10", + DataNodeMiscMessages + .MISC_LOG_INVALID_LOADTSFILESUBSTATEMENTBATCHSIZE_VALUE_USING_DEFAULT_5C285109, loadTsFileSubStatementBatchSize); return; } if (this.loadTsFileSubStatementBatchSize != loadTsFileSubStatementBatchSize) { logger.info( - "loadTsFileSubStatementBatchSize changed from {} to {}", + DataNodeMiscMessages.MISC_LOG_LOADTSFILESUBSTATEMENTBATCHSIZE_CHANGED_FROM_TO_D4EF3D07, this.loadTsFileSubStatementBatchSize, loadTsFileSubStatementBatchSize); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBDescriptor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBDescriptor.java index df4e42a87d692..36c2fc0288aba 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBDescriptor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBDescriptor.java @@ -150,7 +150,8 @@ protected IoTDBDescriptor() { loadProperties(trimProperties); } catch (Exception e) { LOGGER.error( - "Failed to reload properties from {}, reject DataNode startup.", + DataNodeMiscMessages + .MISC_LOG_FAILED_TO_RELOAD_PROPERTIES_FROM_REJECT_DATANODE_STARTUP_74E66EEC, loader.getClass().getName(), e); System.exit(-1); @@ -193,8 +194,8 @@ public static URL getPropsUrl(String configFileName) { return uri; } LOGGER.warn( - "Cannot find IOTDB_HOME or IOTDB_CONF environment variable when loading " - + "config file {}, use default configuration", + DataNodeMiscMessages + .MISC_LOG_CANNOT_FIND_IOTDB_HOME_OR_IOTDB_CONF_ENVIRONMENT_VARIABLE_BE01B2FE, configFileName); // update all data seriesPath conf.updatePath(); @@ -252,7 +253,8 @@ private void loadProps() { } } else { LOGGER.warn( - "Couldn't load the configuration {} from any of the known sources.", + DataNodeMiscMessages + .MISC_LOG_COULDN_T_LOAD_THE_CONFIGURATION_FROM_ANY_OF_THE_KNOWN_SOURCES_EE3ED103, CommonConfig.SYSTEM_CONFIG_NAME); } } @@ -284,7 +286,8 @@ public void loadProperties(TrimProperties properties) throws BadNodeUrlException conf.setMaxClientNumForEachNode( Integer.parseInt(properties.getProperty("dn_max_connection_for_internal_service"))); LOGGER.warn( - "The parameter dn_max_connection_for_internal_service is out of date. Please rename it to dn_max_client_count_for_each_node_in_client_manager."); + DataNodeMiscMessages + .MISC_LOG_THE_PARAMETER_DN_MAX_CONNECTION_FOR_INTERNAL_SERVICE_IS_D2F24BEB); } conf.setMaxClientNumForEachNode( Integer.parseInt( @@ -1148,8 +1151,8 @@ public void loadProperties(TrimProperties properties) throws BadNodeUrlException String.valueOf(conf.getPartitionTableRecoverWorkerNum()))); if (partitionTableRecoverWorkerNum <= 0) { LOGGER.warn( - "partition_table_recover_worker_num should be greater than 0, " - + "but current value is {}, ignore that and use the default value {}", + DataNodeMiscMessages + .MISC_LOG_PARTITION_TABLE_RECOVER_WORKER_NUM_SHOULD_BE_GREATER_THAN_74A2512B, partitionTableRecoverWorkerNum, conf.getPartitionTableRecoverWorkerNum()); partitionTableRecoverWorkerNum = conf.getPartitionTableRecoverWorkerNum(); @@ -1162,8 +1165,8 @@ public void loadProperties(TrimProperties properties) throws BadNodeUrlException String.valueOf(conf.getPartitionTableRecoverMaxReadMBsPerSecond()))); if (partitionTableRecoverMaxReadMBsPerSecond <= 0) { LOGGER.warn( - "partition_table_recover_max_read_megabytes_per_second should be greater than 0, " - + "but current value is {}, ignore that and use the default value {}", + DataNodeMiscMessages + .MISC_LOG_PARTITION_TABLE_RECOVER_MAX_READ_MEGABYTES_PER_SECOND_SHOULD_42BCDFBC, partitionTableRecoverMaxReadMBsPerSecond, conf.getPartitionTableRecoverMaxReadMBsPerSecond()); partitionTableRecoverMaxReadMBsPerSecond = conf.getPartitionTableRecoverMaxReadMBsPerSecond(); @@ -1784,7 +1787,8 @@ private String getWalThrottleThreshold(TrimProperties prop) throws IOException { String old_throttleThreshold = prop.getProperty(DEFAULT_WAL_THRESHOLD_NAME[0], null); if (old_throttleThreshold != null) { LOGGER.warn( - "The throttle threshold params: {} is deprecated, please use {}", + DataNodeMiscMessages + .MISC_LOG_THE_THROTTLE_THRESHOLD_PARAMS_IS_DEPRECATED_PLEASE_USE_AA0E8EC7, DEFAULT_WAL_THRESHOLD_NAME[0], DEFAULT_WAL_THRESHOLD_NAME[1]); return old_throttleThreshold; @@ -2341,7 +2345,8 @@ private void loadQuerySampleThroughput(TrimProperties properties) throws IOExcep commonDescriptor.getConfig().setQuerySamplingRateLimit(rateLimit); } catch (Exception e) { LOGGER.warn( - "Failed to parse query_sample_throughput_bytes_per_sec {} to integer", + DataNodeMiscMessages + .MISC_LOG_FAILED_TO_PARSE_QUERY_SAMPLE_THROUGHPUT_BYTES_PER_SEC_TO_00144244, querySamplingRateLimitNumber); } } @@ -2382,7 +2387,10 @@ public synchronized void loadHotModifiedProps() throws QueryProcessException { } catch (Exception e) { LOGGER.warn(DataNodeMiscMessages.FAIL_RELOAD_CONFIG_FILE, url, e); throw new QueryProcessException( - String.format("Fail to reload config file %s because %s", url, e.getMessage())); + String.format( + DataNodeMiscMessages.MISC_EXCEPTION_FAIL_TO_RELOAD_CONFIG_FILE_S_BECAUSE_S_93CCAB8D, + url, + e.getMessage())); } finally { ConfigurationFileUtils.releaseDefault(); } @@ -2713,9 +2721,10 @@ private void loadUDFProps(TrimProperties properties) { maxMemoryAvailable * Integer.parseInt(proportions[2].trim()) / proportionSum); } catch (Exception e) { throw new RuntimeException( - "Each subsection of configuration item udf_reader_transformer_collector_memory_proportion" - + " should be an integer, which is " - + readerTransformerCollectorMemoryProportion, + String.format( + DataNodeMiscMessages + .MISC_EXCEPTION_EACH_SUBSECTION_OF_CONFIGURATION_ITEM_UDF_READER_TRANSFORMER_97CA8962, + readerTransformerCollectorMemoryProportion), e); } } @@ -2819,9 +2828,8 @@ public void loadClusterProps(TrimProperties properties) throws IOException { if (configNodeUrls == null) { configNodeUrls = properties.getProperty(IoTDBConstant.DN_TARGET_CONFIG_NODE_LIST); LOGGER.warn( - "The parameter dn_target_config_node_list has been abandoned, " - + "only the first ConfigNode address will be used to join in the cluster. " - + "Please use dn_seed_config_node instead."); + DataNodeMiscMessages + .MISC_LOG_THE_PARAMETER_DN_TARGET_CONFIG_NODE_LIST_HAS_BEEN_ABANDONED_6C0DE50B); } if (configNodeUrls != null) { try { @@ -2829,7 +2837,9 @@ public void loadClusterProps(TrimProperties properties) throws IOException { conf.setSeedConfigNode(NodeUrlUtils.parseTEndPointUrls(configNodeUrls).get(0)); } catch (BadNodeUrlException e) { LOGGER.error( - "ConfigNodes are set in wrong format, please set them like 127.0.0.1:10710", e); + DataNodeMiscMessages + .MISC_LOG_CONFIGNODES_ARE_SET_IN_WRONG_FORMAT_PLEASE_SET_THEM_LIKE_18E97679, + e); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBStartCheck.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBStartCheck.java index 89acffa553863..ffc22191679ec 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBStartCheck.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBStartCheck.java @@ -173,7 +173,8 @@ public void checkDirectory() throws ConfigurationException, IOException { if (config.getDataRegionConsensusProtocolClass().equals(ConsensusFactory.RATIS_CONSENSUS)) { if (DirectoryChecker.getInstance().isCrossDisk(config.getDataDirs())) { throw new ConfigurationException( - "Configuring the data directories as cross-disk directories is not supported under RatisConsensus(it will be supported in a later version)."); + DataNodeMiscMessages + .MISC_EXCEPTION_CONFIGURING_THE_DATA_DIRECTORIES_AS_CROSS_DISK_DIRECTORIES_FC0A3875); } } // check system dir @@ -207,7 +208,7 @@ public static void checkOldSystemConfig() throws IOException { FileUtils.copyFile(oldPropertiesFile, correctPropertiesFile); FileUtils.delete(oldPropertiesFile); logger.info( - "system.properties file has been moved successfully: {} -> {}", + DataNodeMiscMessages.MISC_LOG_SYSTEM_PROPERTIES_FILE_HAS_BEEN_MOVED_SUCCESSFULLY_4445A448, oldPropertiesFile.getAbsolutePath(), correctPropertiesFile.getAbsolutePath()); } @@ -235,14 +236,15 @@ public void checkSystemConfig() throws ConfigurationException, IOException { .equals(ConsensusFactory.IOT_CONSENSUS_V2_STREAM_MODE))) && config.getWalMode().equals(WALMode.DISABLE)) { throw new ConfigurationException( - "Configuring the WALMode as disable is not supported under IoTConsensus and IoTConsensusV2 stream mode"); + DataNodeMiscMessages + .MISC_EXCEPTION_CONFIGURING_THE_WALMODE_AS_DISABLE_IS_NOT_SUPPORTED_UNDER_49298819); } } else { // check whether upgrading from <=v0.9 if (!properties.containsKey(IOTDB_VERSION_STRING)) { logger.error( - "DO NOT UPGRADE IoTDB from v0.9 or lower version to v1.0!" - + " Please upgrade to v0.10 first"); + DataNodeMiscMessages + .MISC_LOG_DO_NOT_UPGRADE_IOTDB_FROM_V0_9_OR_LOWER_VERSION_TO_V1_0_9878EC88); System.exit(-1); } String versionString = properties.getProperty(IOTDB_VERSION_STRING); @@ -301,7 +303,8 @@ private void checkImmutableSystemProperties() throws IOException { properties.setProperty(DATA_REGION_CONSENSUS_PROTOCOL, dataRegionConsensusProtocolClass); needRewriteConsensusProtocol = true; logger.warn( - "[SystemProperties] Normalize {} from {} to {} for compatibility.", + DataNodeMiscMessages + .MISC_LOG_SYSTEMPROPERTIES_NORMALIZE_FROM_TO_FOR_COMPATIBILITY_BE1C725F, DATA_REGION_CONSENSUS_PROTOCOL, persistedDataRegionConsensusProtocolClass, dataRegionConsensusProtocolClass); @@ -318,7 +321,8 @@ private void throwException(String parameter, Object badValue) throws Configurat parameter, String.valueOf(badValue), properties.getProperty(parameter), - parameter + "can't be modified after first startup"); + String.format( + DataNodeMiscMessages.PARAMETER_CANNOT_BE_MODIFIED_AFTER_FIRST_STARTUP_FMT, parameter)); } public void serializeDataNodeId(int dataNodeId) throws IOException { @@ -337,7 +341,8 @@ public void serializeEncryptMagicString() throws IOException { String token = System.getenv("user_encrypt_token"); if (token == null || token.trim().isEmpty()) { throw new EncryptException( - "encryptType is not UNENCRYPTED, but user_encrypt_token is not set. Please set it in the environment variable."); + DataNodeMiscMessages + .MISC_EXCEPTION_ENCRYPTTYPE_IS_NOT_UNENCRYPTED_BUT_USER_ENCRYPT_TOKEN_IS_F828C20B); } String tokenHint = System.getenv("user_encrypt_token_hint"); if (tokenHint != null && !tokenHint.trim().isEmpty()) { @@ -345,13 +350,15 @@ public void serializeEncryptMagicString() throws IOException { // For example, it could not include user_encrypt_token. if (tokenHint.toLowerCase().contains(token.toLowerCase())) { throw new EncryptException( - "user_encrypt_token_hint should not include user_encrypt_token, please check it in your environment variable."); + DataNodeMiscMessages + .MISC_EXCEPTION_USER_ENCRYPT_TOKEN_HINT_SHOULD_NOT_INCLUDE_USER_ENCRYPT_50531D40); } if (tokenHint .toLowerCase() .contains(new StringBuilder(token.toLowerCase()).reverse().toString())) { throw new EncryptException( - "user_encrypt_token_hint should not include the reverse of user_encrypt_token, please check it in your environment variable."); + DataNodeMiscMessages + .MISC_EXCEPTION_USER_ENCRYPT_TOKEN_HINT_SHOULD_NOT_INCLUDE_THE_REVERSE_OF_39B2D35C); } } } @@ -393,7 +400,8 @@ public void serializeMutableSystemPropertiesIfNecessary() throws IOException { } long endTime = System.currentTimeMillis(); logger.info( - "Serialize mutable system properties successfully, which takes {} ms.", + DataNodeMiscMessages + .MISC_LOG_SERIALIZE_MUTABLE_SYSTEM_PROPERTIES_SUCCESSFULLY_WHICH_TAKES_4656A206, (endTime - startTime)); } @@ -418,8 +426,10 @@ public void checkEncryptMagicString() throws IOException, ConfigurationException String token = System.getenv("user_encrypt_token"); if (token == null || token.trim().isEmpty()) { throw new EncryptException( - "restart system after not storing key, but user_encrypt_token is not set. Please set it in the environment variable before restart. Here is your token hint info: " - + CommonDescriptor.getInstance().getConfig().getUserEncryptTokenHint()); + String.format( + DataNodeMiscMessages + .MISC_EXCEPTION_RESTART_SYSTEM_AFTER_NOT_STORING_KEY_BUT_USER_ENCRYPT_TOKEN_61CCF9A2, + CommonDescriptor.getInstance().getConfig().getUserEncryptTokenHint())); } TSFileDescriptor.getInstance().getConfig().setEncryptKeyFromToken(token); String encryptMagicString = properties.getProperty(ENCRYPT_MAGIC_STRING); @@ -431,8 +441,10 @@ public void checkEncryptMagicString() throws IOException, ConfigurationException if (!Objects.equals(decryptedMagicString, magicString)) { logger.error(DataNodeMiscMessages.ENCRYPT_MAGIC_STRING_NOT_MATCHED); throw new ConfigurationException( - "Changing encrypt type or key for tsfile encryption after first start is not permitted. Here is your token hint info: " - + CommonDescriptor.getInstance().getConfig().getUserEncryptTokenHint()); + String.format( + DataNodeMiscMessages + .MISC_EXCEPTION_CHANGING_ENCRYPT_TYPE_OR_KEY_FOR_TSFILE_ENCRYPTION_AFTER_0668F74E, + CommonDescriptor.getInstance().getConfig().getUserEncryptTokenHint())); } } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/rest/IoTDBRestServiceDescriptor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/rest/IoTDBRestServiceDescriptor.java index 2e4ed0c28a6d0..d185efecacdff 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/rest/IoTDBRestServiceDescriptor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/rest/IoTDBRestServiceDescriptor.java @@ -134,8 +134,8 @@ public URL getPropsUrl(String configName) { return uri; } logger.warn( - "Cannot find IOTDB_HOME or IOTDB_CONF environment variable when loading " - + "config file {}, use default configuration", + DataNodeMiscMessages + .MISC_LOG_CANNOT_FIND_IOTDB_HOME_OR_IOTDB_CONF_ENVIRONMENT_VARIABLE_BE01B2FE, configName); // update all data seriesPath return null; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/consensus/statemachine/dataregion/DataExecutionVisitor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/consensus/statemachine/dataregion/DataExecutionVisitor.java index ab1d93144e233..bd48ed25ae759 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/consensus/statemachine/dataregion/DataExecutionVisitor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/consensus/statemachine/dataregion/DataExecutionVisitor.java @@ -31,6 +31,7 @@ import org.apache.iotdb.db.exception.query.OutOfTTLException; import org.apache.iotdb.db.exception.runtime.TableLostRuntimeException; import org.apache.iotdb.db.i18n.DataNodeMiscMessages; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; import org.apache.iotdb.db.queryengine.plan.planner.plan.node.PlanVisitor; import org.apache.iotdb.db.queryengine.plan.planner.plan.node.pipe.PipeEnrichedDeleteDataNode; import org.apache.iotdb.db.queryengine.plan.planner.plan.node.pipe.PipeEnrichedInsertNode; @@ -113,7 +114,8 @@ public TSStatus visitInsertTablet(final InsertTabletNode node, final DataRegion return RpcUtils.getStatus(e.getErrorCode(), e.getMessage()); } catch (final BatchProcessException e) { LOGGER.warn( - "Batch failure in executing a InsertTabletNode. device: {}, startTime: {}, measurements: {}, failing status: {}", + DataNodePipeMessages + .PIPE_LOG_BATCH_FAILURE_IN_EXECUTING_A_INSERTTABLETNODE_DEVICE_STARTTIME_9A5A70F6, node.getTargetPath(), node.getTimes()[0], node.getMeasurements(), @@ -152,7 +154,8 @@ public TSStatus visitInsertRows(InsertRowsNode node, DataRegion dataRegion) { firstStatus = failedEntry.getValue(); } LOGGER.warn( - "Insert row failed. device: {}, time: {}, measurements: {}, failing status: {}", + DataNodePipeMessages + .PIPE_LOG_INSERT_ROW_FAILED_DEVICE_TIME_MEASUREMENTS_FAILING_STATUS_63054E8B, insertRowNode.getTargetPath(), insertRowNode.getTime(), insertRowNode.getMeasurements(), @@ -189,7 +192,8 @@ public TSStatus visitInsertMultiTablets(InsertMultiTabletsNode node, DataRegion firstStatus = failedEntry.getValue(); } LOGGER.warn( - "Insert tablet failed. device: {}, startTime: {}, measurements: {}, failing status: {}", + DataNodePipeMessages + .PIPE_LOG_INSERT_TABLET_FAILED_DEVICE_STARTTIME_MEASUREMENTS_FAILING_B409B2C4, insertTabletNode.getTargetPath(), insertTabletNode.getTimes()[0], insertTabletNode.getMeasurements(), @@ -226,7 +230,8 @@ public TSStatus visitInsertRowsOfOneDevice( firstStatus = failedEntry.getValue(); } LOGGER.warn( - "Insert row failed. device: {}, time: {}, measurements: {}, failing status: {}", + DataNodePipeMessages + .PIPE_LOG_INSERT_ROW_FAILED_DEVICE_TIME_MEASUREMENTS_FAILING_STATUS_63054E8B, insertRowNode.getTargetPath(), insertRowNode.getTime(), insertRowNode.getMeasurements(), @@ -257,7 +262,8 @@ public TSStatus visitDeleteData(DeleteDataNode node, DataRegion dataRegion) { if (path.matchFullPath(databaseToDelete) || path.getFullPath().equals(databaseToDelete.getFullPath())) { LOGGER.info( - "now try to delete directly, databasePath: {}, deletePath:{}", + DataNodePipeMessages + .PIPE_LOG_NOW_TRY_TO_DELETE_DIRECTLY_DATABASEPATH_DELETEPATH_A427CD01, databaseToDelete.getFullPath(), path.getFullPath()); dataRegion.deleteDataDirectly(databaseToDelete, node); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/consensus/statemachine/dataregion/DataRegionStateMachine.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/consensus/statemachine/dataregion/DataRegionStateMachine.java index 2de1ec9fdc0ce..98e97c2a42953 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/consensus/statemachine/dataregion/DataRegionStateMachine.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/consensus/statemachine/dataregion/DataRegionStateMachine.java @@ -31,6 +31,7 @@ import org.apache.iotdb.db.conf.IoTDBDescriptor; import org.apache.iotdb.db.consensus.statemachine.BaseStateMachine; import org.apache.iotdb.db.i18n.DataNodeMiscMessages; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; import org.apache.iotdb.db.i18n.StorageEngineMessages; import org.apache.iotdb.db.pipe.agent.PipeDataNodeAgent; import org.apache.iotdb.db.queryengine.execution.fragment.FragmentInstanceManager; @@ -93,7 +94,7 @@ public boolean takeSnapshot(File snapshotDir) { return snapshotTaker.takeFullSnapshot(snapshotDir.getAbsolutePath(), true); } catch (Exception e) { logger.error( - "Exception occurs when taking snapshot for {}-{} in {}", + DataNodePipeMessages.PIPE_LOG_EXCEPTION_OCCURS_WHEN_TAKING_SNAPSHOT_FOR_IN_48CBDFCC, region.getDatabaseName(), region.getDataRegionIdString(), snapshotDir, @@ -109,7 +110,7 @@ public boolean takeSnapshot(File snapshotDir, String snapshotTmpId, String snaps .takeFullSnapshot(snapshotDir.getAbsolutePath(), snapshotTmpId, snapshotId, true); } catch (Exception e) { logger.error( - "Exception occurs when taking snapshot for {}-{} in {}", + DataNodePipeMessages.PIPE_LOG_EXCEPTION_OCCURS_WHEN_TAKING_SNAPSHOT_FOR_IN_48CBDFCC, region.getDatabaseName(), region.getDataRegionIdString(), snapshotDir, @@ -171,8 +172,10 @@ protected PlanNode grabPlanNode(IndexedConsensusRequest indexedRequest) { } else { throw new IllegalArgumentException( String.format( - "There are two types of PlanNode in one request: %s and %s", - onlyOne.getClass(), planNode.getClass())); + DataNodePipeMessages + .PIPE_EXCEPTION_THERE_ARE_TWO_TYPES_OF_PLANNODE_IN_ONE_REQUEST_S_AND_S_30FB3EE5, + onlyOne.getClass(), + planNode.getClass())); } } } @@ -180,7 +183,8 @@ protected PlanNode grabPlanNode(IndexedConsensusRequest indexedRequest) { if (!searchNodes.isEmpty()) { throw new IllegalArgumentException( String.format( - "There are two types of PlanNode in one request: %s and SearchNode", + DataNodePipeMessages + .PIPE_EXCEPTION_THERE_ARE_TWO_TYPES_OF_PLANNODE_IN_ONE_REQUEST_S_AND_SEARCHNODE_F8B4D860, onlyOne.getClass())); } return onlyOne; @@ -199,7 +203,7 @@ public List getSnapshotFiles(File latestSnapshotRootDir) { .getSnapshotFileInfo(); } catch (IOException e) { logger.error( - "Meets error when getting snapshot files for {}-{}", + DataNodePipeMessages.PIPE_LOG_MEETS_ERROR_WHEN_GETTING_SNAPSHOT_FILES_FOR_9BFA76B9, region.getDatabaseName(), region.getDataRegionIdString(), e); @@ -227,10 +231,13 @@ protected TSStatus write(PlanNode planNode) { if (needRetry(result.getCode())) { retryTime++; logger.debug( - "write operation failed because {}, retryTime: {}.", result.getCode(), retryTime); + DataNodePipeMessages.PIPE_LOG_WRITE_OPERATION_FAILED_BECAUSE_RETRYTIME_34EFBE99, + result.getCode(), + retryTime); if (retryTime == MAX_WRITE_RETRY_TIMES) { logger.error( - "write operation still failed after {} retry times, because {}.", + DataNodePipeMessages + .PIPE_LOG_WRITE_OPERATION_STILL_FAILED_AFTER_RETRY_TIMES_BECAUSE_15EEA702, MAX_WRITE_RETRY_TIMES, result.getCode()); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/consensus/statemachine/schemaregion/SchemaExecutionVisitor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/consensus/statemachine/schemaregion/SchemaExecutionVisitor.java index 9e512a9c64541..a77b0895e4c0b 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/consensus/statemachine/schemaregion/SchemaExecutionVisitor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/consensus/statemachine/schemaregion/SchemaExecutionVisitor.java @@ -33,6 +33,8 @@ import org.apache.iotdb.db.exception.metadata.MeasurementAlreadyExistException; import org.apache.iotdb.db.exception.metadata.template.TemplateIsInUseException; import org.apache.iotdb.db.i18n.DataNodeMiscMessages; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; +import org.apache.iotdb.db.i18n.DataNodeSchemaMessages; import org.apache.iotdb.db.pipe.agent.PipeDataNodeAgent; import org.apache.iotdb.db.pipe.source.schemaregion.SchemaRegionListeningQueue; import org.apache.iotdb.db.queryengine.plan.planner.plan.node.PlanVisitor; @@ -441,7 +443,8 @@ public TSStatus visitAlterTimeSeries( measurementPath.getMeasurementSchema().getType(), node.getDataType())) { throw new MetadataException( String.format( - "The timeseries %s used new type %s is not compatible with the existing one %s.", + DataNodePipeMessages + .PIPE_EXCEPTION_THE_TIMESERIES_S_USED_NEW_TYPE_S_IS_NOT_COMPATIBLE_WITH_455D4D4A, node.getPath().getFullPath(), node.getDataType(), node.getPath().getMeasurementSchema().getType())); @@ -468,7 +471,8 @@ public TSStatus visitActivateTemplate( if (Objects.isNull(template)) { return new TSStatus(TSStatusCode.UNDEFINED_TEMPLATE.getStatusCode()) .setMessage( - "The template is null when trying to activate template, may be the template is being unset."); + DataNodeMiscMessages + .MESSAGE_TEMPLATE_NULL_TRYING_ACTIVATE_TEMPLATE_MAY_TEMPLATE_BEING_UNSET_1CE92779); } schemaRegion.activateSchemaTemplate(node, template); return RpcUtils.getStatus(TSStatusCode.SUCCESS_STATUS); @@ -490,7 +494,8 @@ public TSStatus visitBatchActivateTemplate( if (Objects.isNull(template)) { return new TSStatus(TSStatusCode.UNDEFINED_TEMPLATE.getStatusCode()) .setMessage( - "The template is null when trying to activate template, may be the template is being unset."); + DataNodeMiscMessages + .MESSAGE_TEMPLATE_NULL_TRYING_ACTIVATE_TEMPLATE_MAY_TEMPLATE_BEING_UNSET_1CE92779); } try { schemaRegion.activateSchemaTemplate( @@ -525,7 +530,8 @@ public TSStatus visitInternalBatchActivateTemplate( if (Objects.isNull(template)) { return new TSStatus(TSStatusCode.UNDEFINED_TEMPLATE.getStatusCode()) .setMessage( - "The template is null when trying to activate template, may be the template is being unset."); + DataNodeMiscMessages + .MESSAGE_TEMPLATE_NULL_TRYING_ACTIVATE_TEMPLATE_MAY_TEMPLATE_BEING_UNSET_1CE92779); } try { schemaRegion.activateSchemaTemplate( @@ -535,7 +541,7 @@ public TSStatus visitInternalBatchActivateTemplate( } catch (final TemplateIsInUseException e) { logger.info( String.format( - "Device Template has already been activated on path %s, there's no need to activate again.", + DataNodeSchemaMessages.DEVICE_TEMPLATE_ALREADY_ACTIVATED_ON_PATH_FMT, entry.getKey())); } catch (final MetadataException e) { logMetaDataException(e); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/consensus/statemachine/schemaregion/SchemaRegionStateMachine.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/consensus/statemachine/schemaregion/SchemaRegionStateMachine.java index edab5862d11e8..a8e9ccbe29c6f 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/consensus/statemachine/schemaregion/SchemaRegionStateMachine.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/consensus/statemachine/schemaregion/SchemaRegionStateMachine.java @@ -28,6 +28,7 @@ import org.apache.iotdb.consensus.ratis.utils.Utils; import org.apache.iotdb.db.conf.IoTDBDescriptor; import org.apache.iotdb.db.consensus.statemachine.BaseStateMachine; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; import org.apache.iotdb.db.pipe.agent.PipeDataNodeAgent; import org.apache.iotdb.db.pipe.source.schemaregion.SchemaRegionListeningQueue; import org.apache.iotdb.db.queryengine.execution.fragment.FragmentInstanceManager; @@ -73,8 +74,8 @@ public void stop() { public void notifyLeaderChanged(final ConsensusGroupId groupId, final int newLeaderId) { if (newLeaderId != IoTDBDescriptor.getInstance().getConfig().getDataNodeId()) { logger.info( - "Current node [nodeId: {}] is no longer the schema region leader [regionId: {}], " - + "the new leader is [nodeId:{}]", + DataNodePipeMessages + .PIPE_LOG_CURRENT_NODE_NODEID_IS_NO_LONGER_THE_SCHEMA_REGION_LEADER_FD783B3C, IoTDBDescriptor.getInstance().getConfig().getDataNodeId(), schemaRegion.getSchemaRegionId(), newLeaderId); @@ -85,8 +86,8 @@ public void notifyLeaderChanged(final ConsensusGroupId groupId, final int newLea public void notifyNotLeader() { final int dataNodeId = IoTDBDescriptor.getInstance().getConfig().getDataNodeId(); logger.info( - "Current node [nodeId: {}] is no longer the schema region leader [regionId: {}], " - + "start cleaning up related services.", + DataNodePipeMessages + .PIPE_LOG_CURRENT_NODE_NODEID_IS_NO_LONGER_THE_SCHEMA_REGION_LEADER_12E06F99, dataNodeId, schemaRegion.getSchemaRegionId()); @@ -95,8 +96,8 @@ public void notifyNotLeader() { GeneralRegionAttributeSecurityService.getInstance().stopBroadcast(schemaRegion); logger.info( - "Current node [nodeId: {}] is no longer the schema region leader [regionId: {}], " - + "all services on old leader are unavailable now.", + DataNodePipeMessages + .PIPE_LOG_CURRENT_NODE_NODEID_IS_NO_LONGER_THE_SCHEMA_REGION_LEADER_3092822E, dataNodeId, schemaRegion.getSchemaRegionId()); } @@ -104,7 +105,8 @@ public void notifyNotLeader() { @Override public void notifyLeaderReady() { logger.info( - "Current node [nodeId: {}] becomes schema region leader [regionId: {}]", + DataNodePipeMessages + .PIPE_LOG_CURRENT_NODE_NODEID_BECOMES_SCHEMA_REGION_LEADER_REGIONID_46C70A32, IoTDBDescriptor.getInstance().getConfig().getDataNodeId(), schemaRegion.getSchemaRegionId()); @@ -113,7 +115,8 @@ public void notifyLeaderReady() { GeneralRegionAttributeSecurityService.getInstance().startBroadcast(schemaRegion); logger.info( - "Current node [nodeId: {}] as schema region leader [regionId: {}] is ready to work", + DataNodePipeMessages + .PIPE_LOG_CURRENT_NODE_NODEID_AS_SCHEMA_REGION_LEADER_REGIONID_IS_F00BFAC5, IoTDBDescriptor.getInstance().getConfig().getDataNodeId(), schemaRegion.getSchemaRegionId()); } @@ -158,7 +161,8 @@ public void listen2Snapshot4PipeListener(final boolean isTmp) { if (Objects.isNull(snapshotPaths) || Objects.isNull(snapshotPaths.get(0))) { if (listener.isOpened()) { logger.warn( - "Schema Region Listening Queue Listen to snapshot failed, the historical data may not be transferred. snapshotPaths:{}", + DataNodePipeMessages + .PIPE_LOG_SCHEMA_REGION_LISTENING_QUEUE_LISTEN_TO_SNAPSHOT_FAILED_64845A44, snapshotPaths); } return; @@ -202,7 +206,8 @@ public DataSet read(final IConsensusRequest request) { return null; } logger.debug( - "SchemaRegionStateMachine[{}]: Execute read plan: FragmentInstance-{}", + DataNodePipeMessages + .PIPE_LOG_SCHEMAREGIONSTATEMACHINE_EXECUTE_READ_PLAN_FRAGMENTINSTANCE_F85A001F, schemaRegion.getSchemaRegionId(), fragmentInstance.getId()); return QUERY_INSTANCE_MANAGER.execSchemaQueryFragmentInstance(fragmentInstance, schemaRegion); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/BadNodeUrlFormatException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/BadNodeUrlFormatException.java index e4b93390bbe63..add634e4c3c5f 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/BadNodeUrlFormatException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/BadNodeUrlFormatException.java @@ -19,10 +19,10 @@ package org.apache.iotdb.db.exception; +import org.apache.iotdb.db.i18n.DataNodeMiscMessages; + public class BadNodeUrlFormatException extends Exception { public BadNodeUrlFormatException(String nodeUrl) { - super( - String.format( - "Node url %s has bad format, which should be " + "{IP/DomainName}:{Port}", nodeUrl)); + super(String.format(DataNodeMiscMessages.BAD_NODE_URL_FORMAT_FMT, nodeUrl)); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/BatchProcessException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/BatchProcessException.java index 1e51440da3be8..9f5aa3dfc1977 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/BatchProcessException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/BatchProcessException.java @@ -21,6 +21,7 @@ import org.apache.iotdb.calc.exception.QueryProcessException; import org.apache.iotdb.common.rpc.thrift.TSStatus; +import org.apache.iotdb.db.i18n.DataNodeMiscMessages; import java.util.Arrays; @@ -29,7 +30,9 @@ public class BatchProcessException extends QueryProcessException { private final TSStatus[] failingStatus; public BatchProcessException(TSStatus[] failingStatus) { - super("Batch process failed:" + Arrays.toString(failingStatus)); + super( + String.format( + DataNodeMiscMessages.BATCH_PROCESS_FAILED_FMT, Arrays.toString(failingStatus))); this.failingStatus = failingStatus; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/DataTypeInconsistentException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/DataTypeInconsistentException.java index 40f519abff436..d848c70d8b23b 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/DataTypeInconsistentException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/DataTypeInconsistentException.java @@ -19,13 +19,13 @@ package org.apache.iotdb.db.exception; +import org.apache.iotdb.db.i18n.DataNodeMiscMessages; + import org.apache.tsfile.enums.TSDataType; public class DataTypeInconsistentException extends WriteProcessException { public DataTypeInconsistentException(TSDataType existing, TSDataType incoming) { - super( - String.format( - "Inconsistent data types, existing data type: %s, incoming: %s", existing, incoming)); + super(String.format(DataNodeMiscMessages.INCONSISTENT_DATA_TYPES_FMT, existing, incoming)); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/QueryInBatchStatementException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/QueryInBatchStatementException.java index 825d9c4fed730..23fef227ce4ec 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/QueryInBatchStatementException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/QueryInBatchStatementException.java @@ -20,6 +20,7 @@ package org.apache.iotdb.db.exception; import org.apache.iotdb.commons.exception.IoTDBException; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.rpc.TSStatusCode; public class QueryInBatchStatementException extends IoTDBException { @@ -28,7 +29,7 @@ public class QueryInBatchStatementException extends IoTDBException { public QueryInBatchStatementException(String statement) { super( - String.format("Query statement not allowed in batch: [%s]", statement), + String.format(DataNodeQueryMessages.QUERY_STATEMENT_NOT_ALLOWED_IN_BATCH_FMT, statement), TSStatusCode.QUERY_NOT_ALLOWED.getStatusCode()); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/StorageEngineReadonlyException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/StorageEngineReadonlyException.java index 1d272280e94fd..e681948dc00fa 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/StorageEngineReadonlyException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/StorageEngineReadonlyException.java @@ -18,13 +18,13 @@ */ package org.apache.iotdb.db.exception; +import org.apache.iotdb.db.i18n.DataNodeMiscMessages; import org.apache.iotdb.rpc.TSStatusCode; /** the exception when writing to a read-only system */ public class StorageEngineReadonlyException extends StorageEngineException { - public static final String ERROR_MESSAGE = - "Database is read-only, and does not accept non-query operation now"; + public static final String ERROR_MESSAGE = DataNodeMiscMessages.DATABASE_READ_ONLY_NON_QUERY; public StorageEngineReadonlyException() { super(ERROR_MESSAGE, TSStatusCode.SYSTEM_READ_ONLY.getStatusCode()); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/StorageGroupNotReadyException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/StorageGroupNotReadyException.java index 36a0d1bf77c01..5534943594534 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/StorageGroupNotReadyException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/StorageGroupNotReadyException.java @@ -19,9 +19,11 @@ package org.apache.iotdb.db.exception; +import org.apache.iotdb.db.i18n.DataNodeMiscMessages; + public class StorageGroupNotReadyException extends StorageEngineException { public StorageGroupNotReadyException(String storageGroup, int errorCode) { - super("the sg " + storageGroup + " may not ready now, please wait and retry later", errorCode); + super(String.format(DataNodeMiscMessages.STORAGE_GROUP_NOT_READY_FMT, storageGroup), errorCode); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/ainode/AINodeConnectionException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/ainode/AINodeConnectionException.java index 2d13d08c9afba..58e48ec836831 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/ainode/AINodeConnectionException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/ainode/AINodeConnectionException.java @@ -20,13 +20,13 @@ package org.apache.iotdb.db.exception.ainode; import org.apache.iotdb.commons.exception.IoTDBRuntimeException; +import org.apache.iotdb.db.i18n.DataNodeMiscMessages; import static org.apache.iotdb.rpc.TSStatusCode.CAN_NOT_CONNECT_AINODE; public class AINodeConnectionException extends IoTDBRuntimeException { - private static final String message = - "Failed to connect to AINode because [%s], please check the status of your AINode."; + private static final String message = DataNodeMiscMessages.AINODE_CONNECTION_FAILED_FMT; public AINodeConnectionException(Exception e) { super(String.format(message, e.toString()), CAN_NOT_CONNECT_AINODE.getStatusCode()); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/load/LoadReadOnlyException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/load/LoadReadOnlyException.java index d10c859092907..7020a9b80c27a 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/load/LoadReadOnlyException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/load/LoadReadOnlyException.java @@ -20,12 +20,12 @@ package org.apache.iotdb.db.exception.load; import org.apache.iotdb.commons.exception.IoTDBException; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.rpc.TSStatusCode; public class LoadReadOnlyException extends IoTDBException { - public static final String MESSAGE = - "Current system mode is read only, does not support load file"; + public static final String MESSAGE = DataNodeQueryMessages.LOAD_READ_ONLY_MESSAGE; public LoadReadOnlyException() { super(MESSAGE, TSStatusCode.SYSTEM_READ_ONLY.getStatusCode()); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/load/PartitionViolationException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/load/PartitionViolationException.java index ffb47633e51ef..b048dc7397a04 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/load/PartitionViolationException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/load/PartitionViolationException.java @@ -19,13 +19,15 @@ package org.apache.iotdb.db.exception.load; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; + public class PartitionViolationException extends LoadFileException { public PartitionViolationException(String file) { - super(String.format("The data of file %s crosses partitions", file)); + super(String.format(DataNodeQueryMessages.LOAD_FILE_CROSSES_PARTITIONS_FMT, file)); } public PartitionViolationException() { - super("The data of file crosses partitions"); + super(DataNodeQueryMessages.LOAD_FILE_CROSSES_PARTITIONS); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/load/RegionReplicaSetChangedException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/load/RegionReplicaSetChangedException.java index e362c0b66349a..7c5ca6ab8250a 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/load/RegionReplicaSetChangedException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/load/RegionReplicaSetChangedException.java @@ -20,17 +20,17 @@ package org.apache.iotdb.db.exception.load; import org.apache.iotdb.common.rpc.thrift.TRegionReplicaSet; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; public class RegionReplicaSetChangedException extends LoadFileException { public RegionReplicaSetChangedException(TRegionReplicaSet original, TRegionReplicaSet current) { super( String.format( - "Region replica set changed from %s to %s during loading TsFile, maybe due to region migration", - original, current)); + DataNodeQueryMessages.REGION_REPLICA_SET_CHANGED_DURING_LOAD_FMT, original, current)); } public RegionReplicaSetChangedException() { - super("Region replica set changed during loading TsFile, maybe due to region migration"); + super(DataNodeQueryMessages.REGION_REPLICA_SET_CHANGED_DURING_LOAD); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/AliasAlreadyExistException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/AliasAlreadyExistException.java index 9b8dcd7ca698f..0576c402bf59e 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/AliasAlreadyExistException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/AliasAlreadyExistException.java @@ -21,6 +21,7 @@ package org.apache.iotdb.db.exception.metadata; import org.apache.iotdb.commons.exception.MetadataException; +import org.apache.iotdb.db.i18n.DataNodeSchemaMessages; import org.apache.iotdb.rpc.TSStatusCode; public class AliasAlreadyExistException extends MetadataException { @@ -29,7 +30,7 @@ public class AliasAlreadyExistException extends MetadataException { public AliasAlreadyExistException(String path, String alias) { super( - String.format("Alias [%s] for Path [%s] already exist", alias, path), + String.format(DataNodeSchemaMessages.ALIAS_FOR_PATH_ALREADY_EXIST_FMT, alias, path), TSStatusCode.ALIAS_ALREADY_EXIST.getStatusCode(), true); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/DataTypeMismatchException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/DataTypeMismatchException.java index 12a04e1d282c3..6aa52de977e09 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/DataTypeMismatchException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/DataTypeMismatchException.java @@ -20,13 +20,14 @@ package org.apache.iotdb.db.exception.metadata; import org.apache.iotdb.commons.exception.MetadataException; +import org.apache.iotdb.db.i18n.DataNodeSchemaMessages; import org.apache.tsfile.enums.TSDataType; public class DataTypeMismatchException extends MetadataException { // NOTICE: DO NOT CHANGE THIS STRING, IT IS USED IN THE ERROR HANDLING OF PIPE - public static final String REGISTERED_TYPE_STRING = "registered type"; + public static final String REGISTERED_TYPE_STRING = DataNodeSchemaMessages.REGISTERED_TYPE_STRING; public DataTypeMismatchException( String deviceName, @@ -37,28 +38,26 @@ public DataTypeMismatchException( Object value) { super( String.format( - "data type of %s.%s is not consistent, " - + "%s %s, inserting type %s, timestamp %s, value %s", + DataNodeSchemaMessages.DATA_TYPE_MISMATCH_REGISTERED_TYPE_FMT, deviceName, measurementName, REGISTERED_TYPE_STRING, typeInSchema, insertType, time, - value == null ? "null" : processValue(value.toString()))); + value == null ? DataNodeSchemaMessages.NULL_VALUE : processValue(value.toString()))); } public DataTypeMismatchException( String deviceName, String measurementName, TSDataType insertType, long time, Object value) { super( String.format( - "data type and value of %s.%s is not consistent, " - + "inserting type %s, timestamp %s, value %s", + DataNodeSchemaMessages.DATA_TYPE_AND_VALUE_MISMATCH_FMT, deviceName, measurementName, insertType, time, - value == null ? "null" : processValue(value.toString()))); + value == null ? DataNodeSchemaMessages.NULL_VALUE : processValue(value.toString()))); } private static String processValue(String value) { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/DatabaseAlreadySetException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/DatabaseAlreadySetException.java index 71ba387f7e596..372435a64a2c4 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/DatabaseAlreadySetException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/DatabaseAlreadySetException.java @@ -20,6 +20,7 @@ package org.apache.iotdb.db.exception.metadata; import org.apache.iotdb.commons.exception.MetadataException; +import org.apache.iotdb.db.i18n.DataNodeSchemaMessages; import org.apache.iotdb.rpc.TSStatusCode; public class DatabaseAlreadySetException extends MetadataException { @@ -28,7 +29,7 @@ public class DatabaseAlreadySetException extends MetadataException { public DatabaseAlreadySetException(final String path) { super( - String.format("%s has already been created as database", path), + String.format(DataNodeSchemaMessages.DATABASE_ALREADY_CREATED_AS_DATABASE_FMT, path), TSStatusCode.DATABASE_ALREADY_EXISTS.getStatusCode()); storageGroupPath = path; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/DatabaseNotSetException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/DatabaseNotSetException.java index afd63cce5c7a7..68c400573a200 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/DatabaseNotSetException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/DatabaseNotSetException.java @@ -20,17 +20,19 @@ package org.apache.iotdb.db.exception.metadata; import org.apache.iotdb.commons.exception.MetadataException; +import org.apache.iotdb.db.i18n.DataNodeSchemaMessages; import org.apache.iotdb.rpc.TSStatusCode; public class DatabaseNotSetException extends MetadataException { private static final long serialVersionUID = 3739300272099030533L; - public static final String DATABASE_NOT_SET = "Database is not set"; + public static final String DATABASE_NOT_SET = DataNodeSchemaMessages.DATABASE_NOT_SET; public DatabaseNotSetException(String path) { super( - String.format("%s for current seriesPath: [%s]", DATABASE_NOT_SET, path), + String.format( + DataNodeSchemaMessages.DATABASE_NOT_SET_FOR_SERIES_PATH_FMT, DATABASE_NOT_SET, path), TSStatusCode.DATABASE_NOT_EXIST.getStatusCode()); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/DuplicateInsertException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/DuplicateInsertException.java index be55fdf810e2c..c0cfa008f3894 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/DuplicateInsertException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/DuplicateInsertException.java @@ -20,12 +20,13 @@ package org.apache.iotdb.db.exception.metadata; import org.apache.iotdb.commons.exception.MetadataException; +import org.apache.iotdb.db.i18n.DataNodeSchemaMessages; import org.apache.iotdb.rpc.TSStatusCode; public class DuplicateInsertException extends MetadataException { private static final String DUPLICATE_INSERTION_WRONG_MESSAGE = - "Insertion is illegal because measurement [%s] under device [%s] is duplicate."; + DataNodeSchemaMessages.DUPLICATE_INSERTION_WRONG_MESSAGE; public DuplicateInsertException(String device, String measurement) { super( diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/IllegalParameterOfPathException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/IllegalParameterOfPathException.java index 9ae6e79f40689..fa3e6a4aa8b90 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/IllegalParameterOfPathException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/IllegalParameterOfPathException.java @@ -20,13 +20,15 @@ package org.apache.iotdb.db.exception.metadata; import org.apache.iotdb.commons.exception.MetadataException; +import org.apache.iotdb.db.i18n.DataNodeSchemaMessages; import org.apache.iotdb.rpc.TSStatusCode; public class IllegalParameterOfPathException extends MetadataException { public IllegalParameterOfPathException(String msg, String path) { super( - String.format("%s. Failed to create timeseries for path %s", msg, path), + String.format( + DataNodeSchemaMessages.ILLEGAL_PARAMETER_FAILED_CREATE_TIMESERIES_FMT, msg, path), TSStatusCode.ILLEGAL_PARAMETER.getStatusCode(), true); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/MNodeTypeMismatchException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/MNodeTypeMismatchException.java index 814d579e16e03..ecac1fdef8a1c 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/MNodeTypeMismatchException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/MNodeTypeMismatchException.java @@ -21,12 +21,15 @@ import org.apache.iotdb.commons.exception.MetadataException; import org.apache.iotdb.commons.schema.SchemaConstant; +import org.apache.iotdb.db.i18n.DataNodeSchemaMessages; public class MNodeTypeMismatchException extends MetadataException { public MNodeTypeMismatchException(String path, byte expectedType) { super( String.format( - "MNode [%s] is not a %s.", path, SchemaConstant.getMNodeTypeName(expectedType))); + DataNodeSchemaMessages.MNODE_TYPE_MISMATCH_FMT, + path, + SchemaConstant.getMNodeTypeName(expectedType))); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/MeasurementAlreadyExistException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/MeasurementAlreadyExistException.java index a3d5adabac8bc..0e1481c0fd73c 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/MeasurementAlreadyExistException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/MeasurementAlreadyExistException.java @@ -22,6 +22,7 @@ import org.apache.iotdb.commons.exception.MetadataException; import org.apache.iotdb.commons.path.MeasurementPath; +import org.apache.iotdb.db.i18n.DataNodeSchemaMessages; import org.apache.iotdb.rpc.TSStatusCode; public class MeasurementAlreadyExistException extends MetadataException { @@ -30,7 +31,7 @@ public class MeasurementAlreadyExistException extends MetadataException { public MeasurementAlreadyExistException(String path, MeasurementPath measurementPath) { super( - String.format("Path [%s] already exist", path), + String.format(DataNodeSchemaMessages.PATH_ALREADY_EXIST_FMT, path), TSStatusCode.TIMESERIES_ALREADY_EXIST.getStatusCode(), true); this.measurementPath = measurementPath; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/MeasurementInBlackListException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/MeasurementInBlackListException.java index d6dd5c3cabfed..207214b029824 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/MeasurementInBlackListException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/MeasurementInBlackListException.java @@ -22,6 +22,7 @@ import org.apache.iotdb.commons.exception.MetadataException; import org.apache.iotdb.commons.path.PartialPath; +import org.apache.iotdb.db.i18n.DataNodeSchemaMessages; import org.apache.iotdb.rpc.TSStatusCode; public class MeasurementInBlackListException extends MetadataException { @@ -30,7 +31,7 @@ public class MeasurementInBlackListException extends MetadataException { public MeasurementInBlackListException(PartialPath path) { super( - String.format("Some task is deleting timeseries [%s]", path), + String.format(DataNodeSchemaMessages.SOME_TASK_DELETING_TIMESERIES_FMT, path), TSStatusCode.TIMESERIES_IN_BLACK_LIST.getStatusCode()); this.path = path; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/PathAlreadyExistException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/PathAlreadyExistException.java index 5da3c957cba98..62833060108aa 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/PathAlreadyExistException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/PathAlreadyExistException.java @@ -21,6 +21,7 @@ package org.apache.iotdb.db.exception.metadata; import org.apache.iotdb.commons.exception.MetadataException; +import org.apache.iotdb.db.i18n.DataNodeSchemaMessages; import org.apache.iotdb.rpc.TSStatusCode; public class PathAlreadyExistException extends MetadataException { @@ -29,7 +30,7 @@ public class PathAlreadyExistException extends MetadataException { public PathAlreadyExistException(String path) { super( - String.format("Path [%s] already exist", path), + String.format(DataNodeSchemaMessages.PATH_ALREADY_EXIST_FMT, path), TSStatusCode.PATH_ALREADY_EXIST.getStatusCode(), true); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/PathNotExistException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/PathNotExistException.java index e04ccd0f1e921..b7692c191e473 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/PathNotExistException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/PathNotExistException.java @@ -20,21 +20,23 @@ package org.apache.iotdb.db.exception.metadata; import org.apache.iotdb.commons.exception.MetadataException; +import org.apache.iotdb.db.i18n.DataNodeSchemaMessages; import org.apache.iotdb.rpc.TSStatusCode; import java.util.List; public class PathNotExistException extends MetadataException { - private static final String PATH_NOT_EXIST_WRONG_MESSAGE = "Path [%s] does not exist"; + private static final String PATH_NOT_EXIST_WRONG_MESSAGE = + DataNodeSchemaMessages.PATH_NOT_EXIST_WRONG_MESSAGE; private static final String SOURCE_PATH_NOT_EXIST_WRONG_MESSAGE = - "The source path [%s] of view [%s] does not exist."; + DataNodeSchemaMessages.SOURCE_PATH_NOT_EXIST_WRONG_MESSAGE; private static final String NORMAL_TIMESERIES_NOT_EXIST_WRONG_MESSAGE = - "Timeseries [%s] does not exist or is represented by device template"; + DataNodeSchemaMessages.NORMAL_TIMESERIES_NOT_EXIST_WRONG_MESSAGE; private static final String TEMPLATE_TIMESERIES_NOT_EXIST_WRONG_MESSAGE = - "Timeseries [%s] does not exist or is not represented by device template"; + DataNodeSchemaMessages.TEMPLATE_TIMESERIES_NOT_EXIST_WRONG_MESSAGE; public PathNotExistException(String sourcePath, String viewPath) { super( @@ -61,7 +63,9 @@ public PathNotExistException(List paths) { PATH_NOT_EXIST_WRONG_MESSAGE, paths.size() == 1 ? paths.get(0) - : paths.get(0) + " ... " + paths.get(paths.size() - 1)), + : paths.get(0) + + DataNodeSchemaMessages.PATH_LIST_ELLIPSIS_SEPARATOR + + paths.get(paths.size() - 1)), TSStatusCode.PATH_NOT_EXIST.getStatusCode()); } @@ -73,7 +77,9 @@ public PathNotExistException(List paths, boolean isTemplateSeries) { : NORMAL_TIMESERIES_NOT_EXIST_WRONG_MESSAGE, paths.size() == 1 ? paths.get(0) - : paths.get(0) + " ... " + paths.get(paths.size() - 1)), + : paths.get(0) + + DataNodeSchemaMessages.PATH_LIST_ELLIPSIS_SEPARATOR + + paths.get(paths.size() - 1)), TSStatusCode.PATH_NOT_EXIST.getStatusCode()); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/SchemaDirCreationFailureException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/SchemaDirCreationFailureException.java index 150f73f079883..2f72bfa63ecd6 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/SchemaDirCreationFailureException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/SchemaDirCreationFailureException.java @@ -20,10 +20,11 @@ package org.apache.iotdb.db.exception.metadata; import org.apache.iotdb.commons.exception.MetadataException; +import org.apache.iotdb.db.i18n.DataNodeSchemaMessages; public class SchemaDirCreationFailureException extends MetadataException { public SchemaDirCreationFailureException(String dirPath) { - super(String.format("create database schema folder %s failed.", dirPath)); + super(String.format(DataNodeSchemaMessages.SCHEMA_DIR_CREATION_FAILED_FMT, dirPath)); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/SchemaQuotaExceededException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/SchemaQuotaExceededException.java index 52d401bcc66e2..47f30df3fe6f9 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/SchemaQuotaExceededException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/SchemaQuotaExceededException.java @@ -21,6 +21,7 @@ import org.apache.iotdb.commons.exception.MetadataException; import org.apache.iotdb.commons.schema.ClusterSchemaQuotaLevel; +import org.apache.iotdb.db.i18n.DataNodeSchemaMessages; import org.apache.iotdb.rpc.TSStatusCode; public class SchemaQuotaExceededException extends MetadataException { @@ -28,22 +29,14 @@ public class SchemaQuotaExceededException extends MetadataException { // used for timeseries/device limit public SchemaQuotaExceededException(ClusterSchemaQuotaLevel level) { super( - String.format( - "The current metadata capacity has exceeded the cluster quota. " - + "Please review your configuration on ConfigNode or delete some existing %s to comply with the quota.", - level), + String.format(DataNodeSchemaMessages.SCHEMA_QUOTA_EXCEEDED_FMT, level), TSStatusCode.SCHEMA_QUOTA_EXCEEDED.getStatusCode()); } // used for database limit public SchemaQuotaExceededException(long limit) { super( - String.format( - "The current database number has exceeded the cluster quota. " - + "The maximum number of cluster databases allowed is %d, " - + "Please review your configuration database_limit_threshold " - + "or delete some existing database to comply with the quota.", - limit), + String.format(DataNodeSchemaMessages.DATABASE_QUOTA_EXCEEDED_FMT, limit), TSStatusCode.SCHEMA_QUOTA_EXCEEDED.getStatusCode()); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/SeriesOverflowException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/SeriesOverflowException.java index 72dd6b75cce05..9bb60df907fd2 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/SeriesOverflowException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/SeriesOverflowException.java @@ -21,15 +21,14 @@ package org.apache.iotdb.db.exception.metadata; import org.apache.iotdb.commons.exception.MetadataException; +import org.apache.iotdb.db.i18n.DataNodeSchemaMessages; import org.apache.iotdb.rpc.TSStatusCode; public class SeriesOverflowException extends MetadataException { public SeriesOverflowException(long memoryUsage, long seriesNum) { super( - String.format( - "Too many timeseries in memory without device template(current memory: %s, series num: %s). To optimize memory, DEVICE TEMPLATE is more recommended when devices have same time series.", - memoryUsage, seriesNum), + String.format(DataNodeSchemaMessages.SERIES_OVERFLOW_FMT, memoryUsage, seriesNum), TSStatusCode.SERIES_OVERFLOW.getStatusCode()); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/cache/MNodeNotCachedException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/cache/MNodeNotCachedException.java index f3e3719e3e37e..4899833fa0b61 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/cache/MNodeNotCachedException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/cache/MNodeNotCachedException.java @@ -20,10 +20,11 @@ package org.apache.iotdb.db.exception.metadata.cache; import org.apache.iotdb.commons.exception.MetadataException; +import org.apache.iotdb.db.i18n.DataNodeSchemaMessages; public class MNodeNotCachedException extends MetadataException { public MNodeNotCachedException() { - super("MNode has not been cached or has been evicted."); + super(DataNodeSchemaMessages.MNODE_NOT_CACHED); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/cache/MNodeNotPinnedException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/cache/MNodeNotPinnedException.java index 29a4ab058956e..d7a48e25e17c9 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/cache/MNodeNotPinnedException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/cache/MNodeNotPinnedException.java @@ -20,10 +20,11 @@ package org.apache.iotdb.db.exception.metadata.cache; import org.apache.iotdb.commons.exception.MetadataException; +import org.apache.iotdb.db.i18n.DataNodeSchemaMessages; public class MNodeNotPinnedException extends MetadataException { public MNodeNotPinnedException() { - super("MNode has not been pinned."); + super(DataNodeSchemaMessages.MNODE_NOT_PINNED); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/schemafile/ColossalRecordException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/schemafile/ColossalRecordException.java index cbe4e63919186..a85cf55c47ce2 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/schemafile/ColossalRecordException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/schemafile/ColossalRecordException.java @@ -21,6 +21,7 @@ package org.apache.iotdb.db.exception.metadata.schemafile; import org.apache.iotdb.commons.exception.MetadataException; +import org.apache.iotdb.db.i18n.DataNodeSchemaMessages; import org.apache.iotdb.db.schemaengine.schemaregion.mtree.impl.pbtree.schemafile.ISegment; import org.apache.iotdb.rpc.TSStatusCode; @@ -32,22 +33,21 @@ public class ColossalRecordException extends MetadataException { public ColossalRecordException(String key, int size) { super( - String.format( - "Record of key [%s] is too large for SchemaFile to store, content size:%d", key, size), + String.format(DataNodeSchemaMessages.COLOSSAL_RECORD_FMT, key, size), TSStatusCode.OVERSIZE_RECORD.getStatusCode(), true); } public ColossalRecordException(String key) { super( - String.format("Key [%s] is too large to store in a InternalPage as index entry.", key), + String.format(DataNodeSchemaMessages.KEY_TOO_LARGE_FOR_INTERNAL_PAGE_FMT, key), TSStatusCode.OVERSIZE_RECORD.getStatusCode(), true); } public ColossalRecordException(String key, String alias) { super( - String.format("Key-Alias pair (%s, %s) is too large for SchemaFile to store.", key, alias), + String.format(DataNodeSchemaMessages.KEY_ALIAS_PAIR_TOO_LARGE_FMT, key, alias), TSStatusCode.OVERSIZE_RECORD.getStatusCode(), true); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/schemafile/RecordDuplicatedException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/schemafile/RecordDuplicatedException.java index 8a233ffc42ec8..68f52776409e2 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/schemafile/RecordDuplicatedException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/schemafile/RecordDuplicatedException.java @@ -21,13 +21,14 @@ package org.apache.iotdb.db.exception.metadata.schemafile; import org.apache.iotdb.commons.exception.MetadataException; +import org.apache.iotdb.db.i18n.DataNodeSchemaMessages; import org.apache.iotdb.rpc.TSStatusCode; public class RecordDuplicatedException extends MetadataException { public RecordDuplicatedException(String recordKey) { super( - String.format("Segment has duplicated record key : %s", recordKey), + String.format(DataNodeSchemaMessages.RECORD_DUPLICATED_FMT, recordKey), TSStatusCode.RECORD_DUPLICATED.getStatusCode(), true); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/schemafile/SchemaFileLogCorruptedException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/schemafile/SchemaFileLogCorruptedException.java index 826de03c7963b..2600c9e3877e6 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/schemafile/SchemaFileLogCorruptedException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/schemafile/SchemaFileLogCorruptedException.java @@ -21,13 +21,14 @@ package org.apache.iotdb.db.exception.metadata.schemafile; import org.apache.iotdb.commons.exception.MetadataException; +import org.apache.iotdb.db.i18n.DataNodeSchemaMessages; import org.apache.iotdb.rpc.TSStatusCode; public class SchemaFileLogCorruptedException extends MetadataException { public SchemaFileLogCorruptedException(String fileName, String reason) { super( - String.format("PBTreeFileLog [%s] corrupted for [%s].", fileName, reason), + String.format(DataNodeSchemaMessages.PBTREE_FILE_LOG_CORRUPTED_FMT, fileName, reason), TSStatusCode.PBTREE_FILE_REDO_LOG_BROKEN.getStatusCode(), true); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/schemafile/SchemaFileNotExists.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/schemafile/SchemaFileNotExists.java index 60fb0c48c4377..46469a7ce3269 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/schemafile/SchemaFileNotExists.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/schemafile/SchemaFileNotExists.java @@ -21,13 +21,14 @@ package org.apache.iotdb.db.exception.metadata.schemafile; import org.apache.iotdb.commons.exception.MetadataException; +import org.apache.iotdb.db.i18n.DataNodeSchemaMessages; import org.apache.iotdb.rpc.TSStatusCode; public class SchemaFileNotExists extends MetadataException { public SchemaFileNotExists(String fileName) { super( - String.format("PBTree file [%s] not exists.", fileName), + String.format(DataNodeSchemaMessages.PBTREE_FILE_NOT_EXISTS_FMT, fileName), TSStatusCode.PBTREE_FILE_NOT_EXISTS.getStatusCode(), true); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/schemafile/SchemaPageOverflowException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/schemafile/SchemaPageOverflowException.java index c858d83d8cf6f..574bf30d3b2ef 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/schemafile/SchemaPageOverflowException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/schemafile/SchemaPageOverflowException.java @@ -21,14 +21,14 @@ package org.apache.iotdb.db.exception.metadata.schemafile; import org.apache.iotdb.commons.exception.MetadataException; +import org.apache.iotdb.db.i18n.DataNodeSchemaMessages; import org.apache.iotdb.rpc.TSStatusCode; public class SchemaPageOverflowException extends MetadataException { public SchemaPageOverflowException(int pageIndex) { super( - String.format( - "Page [%s] in pbtree file runs out of space or contains too many segments.", pageIndex), + String.format(DataNodeSchemaMessages.SCHEMA_PAGE_OVERFLOW_FMT, pageIndex), TSStatusCode.PAGE_OUT_OF_SPACE.getStatusCode(), true); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/schemafile/SegmentNotFoundException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/schemafile/SegmentNotFoundException.java index 0b475543c918c..91d20bf103a38 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/schemafile/SegmentNotFoundException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/schemafile/SegmentNotFoundException.java @@ -21,20 +21,21 @@ package org.apache.iotdb.db.exception.metadata.schemafile; import org.apache.iotdb.commons.exception.MetadataException; +import org.apache.iotdb.db.i18n.DataNodeSchemaMessages; import org.apache.iotdb.rpc.TSStatusCode; public class SegmentNotFoundException extends MetadataException { public SegmentNotFoundException(int pageIndex, short segIndex) { super( - String.format("Segment(index:%d) not found in page(index:%d).", segIndex, pageIndex), + String.format(DataNodeSchemaMessages.SEGMENT_NOT_FOUND_FMT, segIndex, pageIndex), TSStatusCode.SEGMENT_NOT_FOUND.getStatusCode(), true); } public SegmentNotFoundException(short segIndex) { super( - String.format("Segment(index:%d) is not the last segment within the page", segIndex), + String.format(DataNodeSchemaMessages.SEGMENT_IS_NOT_LAST_FMT, segIndex), TSStatusCode.SEGMENT_NOT_FOUND.getStatusCode(), true); } @@ -45,7 +46,7 @@ public SegmentNotFoundException(String reason) { public SegmentNotFoundException(int pid) { super( - String.format("No splittable segment found in page [%s]", pid), + String.format(DataNodeSchemaMessages.NO_SPLITTABLE_SEGMENT_FOUND_FMT, pid), TSStatusCode.SEGMENT_NOT_FOUND.getStatusCode(), true); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/schemafile/SegmentOverflowException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/schemafile/SegmentOverflowException.java index ee25943e69cd5..deced7e22ef59 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/schemafile/SegmentOverflowException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/schemafile/SegmentOverflowException.java @@ -21,24 +21,28 @@ package org.apache.iotdb.db.exception.metadata.schemafile; import org.apache.iotdb.commons.exception.MetadataException; +import org.apache.iotdb.db.i18n.DataNodeSchemaMessages; import org.apache.iotdb.rpc.TSStatusCode; public class SegmentOverflowException extends MetadataException { public SegmentOverflowException(int tarIndex) { super( - String.format("Segment overflow : %d", tarIndex), + String.format(DataNodeSchemaMessages.SEGMENT_OVERFLOW_FMT, tarIndex), TSStatusCode.SEGMENT_OUT_OF_SPACE.getStatusCode(), true); } public SegmentOverflowException() { - super("Segment not enough space", TSStatusCode.SEGMENT_OUT_OF_SPACE.getStatusCode(), true); + super( + DataNodeSchemaMessages.SEGMENT_NOT_ENOUGH_SPACE, + TSStatusCode.SEGMENT_OUT_OF_SPACE.getStatusCode(), + true); } public SegmentOverflowException(String key) { super( - String.format("Segment not enough space even after split and compact to insert: %s", key), + String.format(DataNodeSchemaMessages.SEGMENT_NOT_ENOUGH_SPACE_AFTER_SPLIT_FMT, key), TSStatusCode.SEGMENT_OUT_OF_SPACE.getStatusCode(), true); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/template/DifferentTemplateException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/template/DifferentTemplateException.java index 9da6480dc6d18..11e376b8a396d 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/template/DifferentTemplateException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/template/DifferentTemplateException.java @@ -21,13 +21,15 @@ package org.apache.iotdb.db.exception.metadata.template; import org.apache.iotdb.commons.exception.MetadataException; +import org.apache.iotdb.db.i18n.DataNodeSchemaMessages; import org.apache.iotdb.rpc.TSStatusCode; public class DifferentTemplateException extends MetadataException { public DifferentTemplateException(String path, String templateName) { super( - String.format("The template on %s is different from %s", path, templateName), + String.format( + DataNodeSchemaMessages.TEMPLATE_ON_PATH_DIFFERENT_FROM_FMT, path, templateName), TSStatusCode.DIFFERENT_TEMPLATE.getStatusCode(), true); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/template/DuplicatedTemplateException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/template/DuplicatedTemplateException.java index a87211655e41a..7364e028387c1 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/template/DuplicatedTemplateException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/template/DuplicatedTemplateException.java @@ -20,12 +20,13 @@ package org.apache.iotdb.db.exception.metadata.template; import org.apache.iotdb.commons.exception.MetadataException; +import org.apache.iotdb.db.i18n.DataNodeSchemaMessages; import org.apache.iotdb.rpc.TSStatusCode; public class DuplicatedTemplateException extends MetadataException { public DuplicatedTemplateException(String path) { super( - String.format("Failed to create duplicated template for path %s", path), + String.format(DataNodeSchemaMessages.FAILED_CREATE_DUPLICATED_TEMPLATE_FMT, path), TSStatusCode.DUPLICATED_TEMPLATE.getStatusCode(), true); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/template/TemplateIncompatibleException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/template/TemplateIncompatibleException.java index cc39a3b50b22b..4aeab075bd043 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/template/TemplateIncompatibleException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/template/TemplateIncompatibleException.java @@ -22,6 +22,7 @@ import org.apache.iotdb.commons.exception.MetadataException; import org.apache.iotdb.commons.path.PartialPath; +import org.apache.iotdb.db.i18n.DataNodeSchemaMessages; import org.apache.iotdb.rpc.TSStatusCode; public class TemplateIncompatibleException extends MetadataException { @@ -30,8 +31,10 @@ public TemplateIncompatibleException( String path, String templateName, PartialPath templateSetPath) { super( String.format( - "Cannot create timeseries [%s] since device template [%s] already set on path [%s].", - path, templateName, templateSetPath), + DataNodeSchemaMessages.CANNOT_CREATE_TIMESERIES_TEMPLATE_SET_FMT, + path, + templateName, + templateSetPath), TSStatusCode.TEMPLATE_INCOMPATIBLE.getStatusCode(), true); } @@ -39,9 +42,10 @@ public TemplateIncompatibleException( public TemplateIncompatibleException(String templateName, PartialPath templateSetPath) { super( String.format( - "Cannot set device template [%s] to path [%s] " - + "since there's timeseries under path [%s].", - templateName, templateSetPath, templateSetPath), + DataNodeSchemaMessages.CANNOT_SET_DEVICE_TEMPLATE_TIMESERIES_UNDER_PATH_FMT, + templateName, + templateSetPath, + templateSetPath), TSStatusCode.TEMPLATE_INCOMPATIBLE.getStatusCode(), true); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/template/TemplateIsInUseException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/template/TemplateIsInUseException.java index b16959714607d..d5799276403de 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/template/TemplateIsInUseException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/template/TemplateIsInUseException.java @@ -21,11 +21,15 @@ package org.apache.iotdb.db.exception.metadata.template; import org.apache.iotdb.commons.exception.MetadataException; +import org.apache.iotdb.db.i18n.DataNodeSchemaMessages; import org.apache.iotdb.rpc.TSStatusCode; public class TemplateIsInUseException extends MetadataException { public TemplateIsInUseException(String path) { - super("Template is in use on " + path, TSStatusCode.TEMPLATE_IS_IN_USE.getStatusCode(), true); + super( + String.format(DataNodeSchemaMessages.TEMPLATE_IS_IN_USE_ON_FMT, path), + TSStatusCode.TEMPLATE_IS_IN_USE.getStatusCode(), + true); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/template/UndefinedTemplateException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/template/UndefinedTemplateException.java index 672a75cef12e5..35f185ac760f9 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/template/UndefinedTemplateException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/template/UndefinedTemplateException.java @@ -20,12 +20,13 @@ package org.apache.iotdb.db.exception.metadata.template; import org.apache.iotdb.commons.exception.MetadataException; +import org.apache.iotdb.db.i18n.DataNodeSchemaMessages; import org.apache.iotdb.rpc.TSStatusCode; public class UndefinedTemplateException extends MetadataException { public UndefinedTemplateException(String path) { super( - String.format("Undefined template name: %s", path), + String.format(DataNodeSchemaMessages.UNDEFINED_TEMPLATE_NAME_FMT, path), TSStatusCode.UNDEFINED_TEMPLATE.getStatusCode(), true); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/view/BrokenViewException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/view/BrokenViewException.java index fe7eccb8dbd9f..171a235336705 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/view/BrokenViewException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/view/BrokenViewException.java @@ -21,19 +21,22 @@ import org.apache.iotdb.commons.exception.MetadataException; import org.apache.iotdb.commons.path.MeasurementPath; +import org.apache.iotdb.db.i18n.DataNodeSchemaMessages; import java.util.List; public class BrokenViewException extends MetadataException { public BrokenViewException(String sourcePath) { - super(String.format("The source path [%s] is deleted", sourcePath)); + super(String.format(DataNodeSchemaMessages.SOURCE_PATH_DELETED_FMT, sourcePath)); } public BrokenViewException(String sourcePath, List matchedPaths) { super( String.format( - "View is broken! The source path [%s] maps to unmatched %s path(s): %s.", - sourcePath, matchedPaths.size(), matchedPaths)); + DataNodeSchemaMessages.BROKEN_VIEW_UNMATCHED_FMT, + sourcePath, + matchedPaths.size(), + matchedPaths)); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/view/InsertNonWritableViewException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/view/InsertNonWritableViewException.java index cec8d52dd9cd7..2f030f7a138be 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/view/InsertNonWritableViewException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/view/InsertNonWritableViewException.java @@ -20,15 +20,14 @@ package org.apache.iotdb.db.exception.metadata.view; import org.apache.iotdb.commons.exception.MetadataException; +import org.apache.iotdb.db.i18n.DataNodeSchemaMessages; public class InsertNonWritableViewException extends MetadataException { public InsertNonWritableViewException(String path) { - super( - String.format( - "Can not insert data to a view which is not alias series. (View path: %s)", path)); + super(String.format(DataNodeSchemaMessages.INSERT_NON_WRITABLE_VIEW_FMT, path)); } public InsertNonWritableViewException() { - super("Can not insert data to a view which is not alias series."); + super(DataNodeSchemaMessages.INSERT_NON_WRITABLE_VIEW); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/view/UnsupportedViewException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/view/UnsupportedViewException.java index 4f8f333b6b61c..023697cdddea4 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/view/UnsupportedViewException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/view/UnsupportedViewException.java @@ -20,11 +20,12 @@ package org.apache.iotdb.db.exception.metadata.view; import org.apache.iotdb.commons.exception.MetadataException; +import org.apache.iotdb.db.i18n.DataNodeSchemaMessages; import org.apache.iotdb.rpc.TSStatusCode; public class UnsupportedViewException extends MetadataException { - private static final String VIEW_IS_UNSUPPORTED = "View unsupported, because: %s"; + private static final String VIEW_IS_UNSUPPORTED = DataNodeSchemaMessages.VIEW_IS_UNSUPPORTED_FMT; public UnsupportedViewException(String message) { super( diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/view/ViewContainsAggregationException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/view/ViewContainsAggregationException.java index 291e9dab0ea9f..3af50035e149b 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/view/ViewContainsAggregationException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/view/ViewContainsAggregationException.java @@ -19,10 +19,12 @@ package org.apache.iotdb.db.exception.metadata.view; +import org.apache.iotdb.db.i18n.DataNodeSchemaMessages; + public class ViewContainsAggregationException extends UnsupportedViewException { private static final String VIEW_CONTAINS_AGGREGATION_FUNCTION = - "This view contains aggregation function(s) named [%s]"; + DataNodeSchemaMessages.VIEW_CONTAINS_AGGREGATION_FUNCTION_FMT; public ViewContainsAggregationException(String namesOfAggregationFunctions) { super(String.format(VIEW_CONTAINS_AGGREGATION_FUNCTION, namesOfAggregationFunctions), true); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/view/ViewNotExistException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/view/ViewNotExistException.java index dfa92696dc6ea..bbaa09aa6c40f 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/view/ViewNotExistException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/metadata/view/ViewNotExistException.java @@ -20,13 +20,15 @@ package org.apache.iotdb.db.exception.metadata.view; import org.apache.iotdb.commons.exception.MetadataException; +import org.apache.iotdb.db.i18n.DataNodeSchemaMessages; import org.apache.iotdb.rpc.TSStatusCode; import java.util.List; public class ViewNotExistException extends MetadataException { - private static final String VIEW_NOT_EXIST_WRONG_MESSAGE = "View [%s] does not exist"; + private static final String VIEW_NOT_EXIST_WRONG_MESSAGE = + DataNodeSchemaMessages.VIEW_NOT_EXIST_WRONG_MESSAGE; public ViewNotExistException(String path) { super( @@ -40,7 +42,9 @@ public ViewNotExistException(List paths) { VIEW_NOT_EXIST_WRONG_MESSAGE, paths.size() == 1 ? paths.get(0) - : paths.get(0) + " ... " + paths.get(paths.size() - 1)), + : paths.get(0) + + DataNodeSchemaMessages.PATH_LIST_ELLIPSIS_SEPARATOR + + paths.get(paths.size() - 1)), TSStatusCode.PATH_NOT_EXIST.getStatusCode()); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/query/KilledByOthersException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/query/KilledByOthersException.java index 3843c92eaea1c..9db694df7d22d 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/query/KilledByOthersException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/query/KilledByOthersException.java @@ -21,12 +21,13 @@ package org.apache.iotdb.db.exception.query; import org.apache.iotdb.commons.exception.IoTDBException; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.rpc.TSStatusCode; public class KilledByOthersException extends IoTDBException { private static final long serialVersionUID = -6027957067833327712L; - public static final String MESSAGE = "Query was killed by others"; + public static final String MESSAGE = DataNodeQueryMessages.QUERY_KILLED_BY_OTHERS; public KilledByOthersException() { super(MESSAGE, TSStatusCode.QUERY_WAS_KILLED.getStatusCode(), true); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/query/OutOfTTLException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/query/OutOfTTLException.java index 16c058f100e29..fb53bf803c12e 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/query/OutOfTTLException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/query/OutOfTTLException.java @@ -22,6 +22,7 @@ import org.apache.iotdb.commons.queryengine.utils.DateTimeUtils; import org.apache.iotdb.db.exception.WriteProcessException; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.rpc.TSStatusCode; public class OutOfTTLException extends WriteProcessException { @@ -31,7 +32,7 @@ public class OutOfTTLException extends WriteProcessException { public OutOfTTLException(long insertionTime, long timeLowerBound) { super( String.format( - "Insertion time [%s] is less than ttl time bound [%s]", + DataNodeQueryMessages.OUT_OF_TTL_FMT, DateTimeUtils.convertLongToDate(insertionTime), DateTimeUtils.convertLongToDate(timeLowerBound)), TSStatusCode.OUT_OF_TTL.getStatusCode(), diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/query/QueryTimeoutRuntimeException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/query/QueryTimeoutRuntimeException.java index b333f287a21f8..3e9022f0a3f47 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/query/QueryTimeoutRuntimeException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/query/QueryTimeoutRuntimeException.java @@ -20,13 +20,14 @@ package org.apache.iotdb.db.exception.query; import org.apache.iotdb.commons.exception.IoTDBRuntimeException; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import static org.apache.iotdb.rpc.TSStatusCode.QUERY_TIMEOUT; /** This class is used to throw run time exception when query is time out. */ public class QueryTimeoutRuntimeException extends IoTDBRuntimeException { public static final String QUERY_TIMEOUT_EXCEPTION_MESSAGE = - "Current query is time out, query start time is %d, ddl is %d, current time is %d, please check your statement or modify timeout parameter."; + DataNodeQueryMessages.QUERY_TIMEOUT_EXCEPTION_MESSAGE; public QueryTimeoutRuntimeException(long startTime, long currentTime, long timeout) { super( diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/runtime/StorageEngineFailureException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/runtime/StorageEngineFailureException.java index aab283c2d927b..b7883a24a2e0e 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/runtime/StorageEngineFailureException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/runtime/StorageEngineFailureException.java @@ -19,12 +19,14 @@ package org.apache.iotdb.db.exception.runtime; +import org.apache.iotdb.db.i18n.DataNodeMiscMessages; + public class StorageEngineFailureException extends RuntimeException { private static final long serialVersionUID = -1197701024139022020L; public StorageEngineFailureException(Throwable e) { - super("Create system directory failed! ", e); + super(DataNodeMiscMessages.CREATE_SYSTEM_DIRECTORY_FAILED, e); } public StorageEngineFailureException(String message, Throwable e) { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/runtime/TableLostRuntimeException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/runtime/TableLostRuntimeException.java index 572be2f097454..96ab322776005 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/runtime/TableLostRuntimeException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/runtime/TableLostRuntimeException.java @@ -20,13 +20,14 @@ package org.apache.iotdb.db.exception.runtime; import org.apache.iotdb.commons.exception.IoTDBRuntimeException; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.rpc.TSStatusCode; public class TableLostRuntimeException extends IoTDBRuntimeException { public TableLostRuntimeException(final String databaseName, final String tableName) { super( - String.format("Table %s in the database %s is lost unexpected.", tableName, databaseName), + String.format(DataNodeQueryMessages.TABLE_LOST_UNEXPECTED_FMT, tableName, databaseName), TSStatusCode.TABLE_IS_LOST.getStatusCode()); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/partition/DataPartitionTableGenerator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/partition/DataPartitionTableGenerator.java index 65d08b9985d00..ed85dda076175 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/partition/DataPartitionTableGenerator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/partition/DataPartitionTableGenerator.java @@ -201,7 +201,7 @@ private void generateDataPartitionTableByMemory() { status = TaskStatus.COMPLETED; LOG.info( - "DataPartitionTable generation completed successfully. Processed: {}, Failed: {}", + DataNodeMiscMessages.DATA_PARTITION_TABLE_GENERATION_COMPLETED_STATS, processedTimePartitions.get(), failedTimePartitions.get()); } catch (Exception e) { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/agent/plugin/dataregion/PipeDataRegionPluginAgent.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/agent/plugin/dataregion/PipeDataRegionPluginAgent.java index 60103e078fbec..fd035828fb424 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/agent/plugin/dataregion/PipeDataRegionPluginAgent.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/agent/plugin/dataregion/PipeDataRegionPluginAgent.java @@ -27,6 +27,7 @@ import org.apache.iotdb.commons.pipe.agent.plugin.meta.PipePluginMetaKeeper; import org.apache.iotdb.commons.pipe.datastructure.visibility.Visibility; import org.apache.iotdb.commons.pipe.datastructure.visibility.VisibilityUtils; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; import org.apache.iotdb.pipe.api.PipeConnector; import org.apache.iotdb.pipe.api.PipeExtractor; import org.apache.iotdb.pipe.api.PipeProcessor; @@ -85,7 +86,8 @@ public void validate( pipeVisibility, sourceVisibility, processorVisibility, connectorVisibility)) { throw new PipeParameterNotValidException( String.format( - "The visibility of the pipe (%s, %s) is not compatible with the visibility of the source (%s, %s, %s), processor (%s, %s, %s), and connector (%s, %s, %s).", + DataNodePipeMessages + .PIPE_EXCEPTION_THE_VISIBILITY_OF_THE_PIPE_S_S_IS_NOT_COMPATIBLE_WITH_THE_30B8BF0A, pipeName, pipeVisibility, sourceAttributes, diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/agent/runtime/PipeAgentLauncher.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/agent/runtime/PipeAgentLauncher.java index 4f573fc60ac50..cde729a2e5118 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/agent/runtime/PipeAgentLauncher.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/agent/runtime/PipeAgentLauncher.java @@ -183,11 +183,7 @@ public static synchronized void launchPipeTaskAgent() { .collect(Collectors.toList())); } catch (Exception | Error e) { // Ignore unexpected exceptions to ensure that DataNode can start normally - LOGGER.info( - "Failed to get pipe task meta from config node. Ignore the exception, " - + "because config node may not be ready yet, and " - + "meta will be pushed by config node later.", - e); + LOGGER.info(DataNodePipeMessages.FAILED_TO_GET_PIPE_TASK_META_FROM, e); } } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/agent/task/PipeDataNodeTaskAgent.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/agent/task/PipeDataNodeTaskAgent.java index dd15422dba163..84bb8477dbeee 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/agent/task/PipeDataNodeTaskAgent.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/agent/task/PipeDataNodeTaskAgent.java @@ -295,10 +295,11 @@ private void closeSchemaRegionListeningQueueIfNecessary( schemaRegionId, new PipeOperateSchemaQueueNode(new PlanNodeId(""), false)); } catch (final ConsensusException e) { throw new PipeException( - DataNodePipeMessages.FAILED_TO_CLOSE_LISTENING_QUEUE_FOR_SCHEMAREGION - + schemaRegionId - + ", because " - + e.getMessage(), + String.format( + DataNodePipeMessages + .FAILED_TO_CLOSE_LISTENING_QUEUE_FOR_SCHEMAREGION_BECAUSE_FMT, + schemaRegionId, + e.getMessage()), e); } }); @@ -651,8 +652,10 @@ public ProgressIndex getPipeTaskProgressIndex(final String pipeName, final int c if (!tryReadLockWithTimeOut(10)) { throw new PipeException( String.format( - "Failed to get pipe task progress index with pipe name: %s, consensus group id %s.", - pipeName, consensusGroupId)); + DataNodePipeMessages + .PIPE_EXCEPTION_FAILED_TO_GET_PIPE_TASK_PROGRESS_INDEX_WITH_PIPE_NAME_S_CFE9DE7C, + pipeName, + consensusGroupId)); } try { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/agent/task/stage/PipeTaskSourceStage.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/agent/task/stage/PipeTaskSourceStage.java index 5f774ceb379b7..460fad472d12c 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/agent/task/stage/PipeTaskSourceStage.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/agent/task/stage/PipeTaskSourceStage.java @@ -26,6 +26,7 @@ import org.apache.iotdb.commons.pipe.agent.task.stage.PipeTaskStage; import org.apache.iotdb.commons.pipe.config.plugin.configuraion.PipeTaskRuntimeConfiguration; import org.apache.iotdb.commons.pipe.config.plugin.env.PipeTaskSourceRuntimeEnvironment; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; import org.apache.iotdb.db.pipe.agent.PipeDataNodeAgent; import org.apache.iotdb.db.storageengine.StorageEngine; import org.apache.iotdb.pipe.api.PipeExtractor; @@ -69,9 +70,7 @@ public PipeTaskSourceStage( try { pipeExtractor.close(); } catch (Exception closeException) { - LOGGER.warn( - "Failed to close source after failed to initialize source. " + "Ignore this exception.", - closeException); + LOGGER.warn(DataNodePipeMessages.FAILED_TO_CLOSE_SOURCE_AFTER_FAILED_TO, closeException); } throw new PipeException(e.getMessage(), e); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/agent/task/subtask/processor/PipeProcessorSubtask.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/agent/task/subtask/processor/PipeProcessorSubtask.java index fe9737b0d7d35..15cae5928e618 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/agent/task/subtask/processor/PipeProcessorSubtask.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/agent/task/subtask/processor/PipeProcessorSubtask.java @@ -259,7 +259,8 @@ protected boolean executeOnce() throws Exception { if (!isClosed.get()) { throw new PipeException( String.format( - "Exception in pipe process, subtask: %s, last event: %s, root cause: %s", + DataNodePipeMessages + .PIPE_EXCEPTION_EXCEPTION_IN_PIPE_PROCESS_SUBTASK_S_LAST_EVENT_S_ROOT_CAUSE_95B49C24, taskID, lastEvent instanceof EnrichedEvent ? ((EnrichedEvent) lastEvent).coreReportMessage() diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/agent/task/subtask/sink/PipeSinkSubtask.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/agent/task/subtask/sink/PipeSinkSubtask.java index 90d325f6d238e..aeaabc4ee08fc 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/agent/task/subtask/sink/PipeSinkSubtask.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/agent/task/subtask/sink/PipeSinkSubtask.java @@ -153,13 +153,11 @@ private void transferHeartbeatEvent(final PipeHeartbeatEvent event) { outputPipeSink.transfer(event); } catch (final Exception e) { throw new PipeConnectionException( - DataNodePipeMessages.PIPECONNECTOR - + outputPipeSink.getClass().getName() - + "(id: " - + taskID - + ")" - + " heartbeat failed, or encountered failure when transferring generic event. Failure: " - + e.getMessage(), + String.format( + DataNodePipeMessages.PIPE_SINK_HEARTBEAT_OR_TRANSFER_FAILED_FMT, + outputPipeSink.getClass().getName(), + taskID, + e.getMessage()), e); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/agent/task/subtask/sink/PipeSinkSubtaskManager.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/agent/task/subtask/sink/PipeSinkSubtaskManager.java index 01552eec5ae3a..455afcbd188be 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/agent/task/subtask/sink/PipeSinkSubtaskManager.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/agent/task/subtask/sink/PipeSinkSubtaskManager.java @@ -167,9 +167,7 @@ public synchronized String register( pipeSink.close(); } catch (final Exception closeException) { LOGGER.warn( - "Failed to close connector after failed to initialize connector. " - + "Ignore this exception.", - closeException); + DataNodePipeMessages.FAILED_TO_CLOSE_CONNECTOR_AFTER_FAILED_TO, closeException); } throw new PipeException( DataNodePipeMessages.FAILED_TO_CONSTRUCT_PIPECONNECTOR_BECAUSE_OF + e.getMessage(), diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/consensus/deletion/DeletionResourceManager.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/consensus/deletion/DeletionResourceManager.java index d2292dae0ad27..f06ea4f11bfa9 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/consensus/deletion/DeletionResourceManager.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/consensus/deletion/DeletionResourceManager.java @@ -93,7 +93,10 @@ private void initAndRecover() throws IOException { LOGGER.warn( DataNodePipeMessages.UNABLE_TO_CREATE_IOTCONSENSUSV2_DELETION_DIR_AT, storageDir); throw new IOException( - String.format("Unable to create iotConsensusV2 deletion dir at %s", storageDir)); + String.format( + DataNodePipeMessages + .PIPE_EXCEPTION_UNABLE_TO_CREATE_IOTCONSENSUSV2_DELETION_DIR_AT_S_800EE360, + storageDir)); } } try (Stream pathStream = Files.walk(Paths.get(storageDir.getPath()), 1)) { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/row/PipeRow.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/row/PipeRow.java index b0897ed396ae1..808fb69bcaa07 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/row/PipeRow.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/row/PipeRow.java @@ -19,6 +19,7 @@ package org.apache.iotdb.db.pipe.event.common.row; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; import org.apache.iotdb.pipe.api.access.Row; import org.apache.iotdb.pipe.api.exception.PipeParameterNotValidException; import org.apache.iotdb.pipe.api.type.Type; @@ -140,8 +141,9 @@ public Object getObject(final int columnIndex) { default: throw new UnsupportedOperationException( String.format( - "unsupported data type %s for column %s", - getDataType(columnIndex), columnNameStringList[columnIndex])); + DataNodePipeMessages.PIPE_EXCEPTION_UNSUPPORTED_DATA_TYPE_S_FOR_COLUMN_S_9F870C01, + getDataType(columnIndex), + columnNameStringList[columnIndex])); } } @@ -171,7 +173,9 @@ public int getColumnIndex(final Path columnName) throws PipeParameterNotValidExc } } throw new PipeParameterNotValidException( - String.format("column %s not found", columnName.getFullPath())); + String.format( + DataNodePipeMessages.PIPE_EXCEPTION_COLUMN_S_NOT_FOUND_0FA13581, + columnName.getFullPath())); } @Override diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/schema/PipeSchemaRegionSnapshotEvent.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/schema/PipeSchemaRegionSnapshotEvent.java index 71aae4c3614d2..3a9c705cb0f20 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/schema/PipeSchemaRegionSnapshotEvent.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/schema/PipeSchemaRegionSnapshotEvent.java @@ -176,8 +176,10 @@ public boolean internallyIncreaseResourceReferenceCount(final String holderMessa } catch (final Exception e) { LOGGER.warn( String.format( - "Increase reference count for mTree snapshot %s or tLog %s error. Holder Message: %s", - mTreeSnapshotPath, tagLogSnapshotPath, holderMessage), + DataNodePipeMessages.INCREASE_REFERENCE_COUNT_MTREE_OR_TLOG_ERROR_HOLDER_FMT, + mTreeSnapshotPath, + tagLogSnapshotPath, + holderMessage), e); return false; } @@ -197,8 +199,10 @@ public boolean internallyDecreaseResourceReferenceCount(final String holderMessa } catch (final Exception e) { LOGGER.warn( String.format( - "Decrease reference count for mTree snapshot %s or tLog %s error. Holder Message: %s", - mTreeSnapshotPath, tagLogSnapshotPath, holderMessage), + DataNodePipeMessages.DECREASE_REFERENCE_COUNT_MTREE_OR_TLOG_ERROR_HOLDER_FMT, + mTreeSnapshotPath, + tagLogSnapshotPath, + holderMessage), e); return false; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tablet/PipeInsertNodeTabletInsertionEvent.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tablet/PipeInsertNodeTabletInsertionEvent.java index 3413f16144fea..5e505eb65bc94 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tablet/PipeInsertNodeTabletInsertionEvent.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tablet/PipeInsertNodeTabletInsertionEvent.java @@ -193,7 +193,9 @@ public boolean internallyIncreaseResourceReferenceCount(final String holderMessa return true; } catch (final Exception e) { LOGGER.warn( - String.format("Increase reference count error. Holder Message: %s", holderMessage), e); + String.format( + DataNodePipeMessages.INCREASE_REFERENCE_COUNT_ERROR_HOLDER_FMT, holderMessage), + e); return false; } } @@ -210,7 +212,9 @@ public boolean internallyDecreaseResourceReferenceCount(final String holderMessa return true; } catch (final Exception e) { LOGGER.warn( - String.format("Decrease reference count error. Holder Message: %s", holderMessage), e); + String.format( + DataNodePipeMessages.DECREASE_REFERENCE_COUNT_ERROR_HOLDER_FMT, holderMessage), + e); return false; } finally { if (Objects.nonNull(pipeName)) { @@ -316,8 +320,11 @@ private void checkTableName(final String tableName) { } else { throw new AccessDeniedException( String.format( - "No privilege for SELECT for user %s at table %s.%s", - userName, tableModelDatabaseName, tableName)); + DataNodePipeMessages + .PIPE_EXCEPTION_NO_PRIVILEGE_FOR_SELECT_FOR_USER_S_AT_TABLE_S_S_84B0C299, + userName, + tableModelDatabaseName, + tableName)); } } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tablet/PipeTabletUtils.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tablet/PipeTabletUtils.java index 097d936176d93..1e6a5e2cadf44 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tablet/PipeTabletUtils.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tablet/PipeTabletUtils.java @@ -244,6 +244,8 @@ private static Binary toBinary(final Object value) { return new Binary(((String) value).getBytes(TSFileConfig.STRING_CHARSET)); } throw new IllegalArgumentException( - String.format("Expected Binary, byte[] or String, but was %s.", value.getClass())); + String.format( + DataNodePipeMessages.PIPE_EXCEPTION_EXPECTED_BINARY_BYTE_OR_STRING_BUT_WAS_S_7976B10F, + value.getClass())); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tablet/parser/TabletInsertionEventParser.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tablet/parser/TabletInsertionEventParser.java index 6903504129385..fe1709d3e2d7e 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tablet/parser/TabletInsertionEventParser.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tablet/parser/TabletInsertionEventParser.java @@ -558,7 +558,8 @@ private static Object filterValueColumnsByRowIndexList( } default: throw new UnSupportedDataTypeException( - String.format("Data type %s is not supported.", type)); + String.format( + DataNodePipeMessages.PIPE_EXCEPTION_DATA_TYPE_S_IS_NOT_SUPPORTED_5D5C02E4, type)); } } @@ -603,7 +604,8 @@ private void fillNullValue( break; default: throw new UnSupportedDataTypeException( - String.format("Data type %s is not supported.", type)); + String.format( + DataNodePipeMessages.PIPE_EXCEPTION_DATA_TYPE_S_IS_NOT_SUPPORTED_5D5C02E4, type)); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tablet/parser/TabletInsertionEventTablePatternParser.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tablet/parser/TabletInsertionEventTablePatternParser.java index 4b2a34964e854..14708aa4be95e 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tablet/parser/TabletInsertionEventTablePatternParser.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tablet/parser/TabletInsertionEventTablePatternParser.java @@ -66,7 +66,9 @@ public TabletInsertionEventTablePatternParser( parse((RelationalInsertTabletNode) insertNode); } else { throw new UnSupportedDataTypeException( - String.format("InsertNode type %s is not supported.", insertNode.getClass().getName())); + String.format( + DataNodePipeMessages.PIPE_EXCEPTION_INSERTNODE_TYPE_S_IS_NOT_SUPPORTED_7DF82B58, + insertNode.getClass().getName())); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tablet/parser/TabletInsertionEventTreePatternParser.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tablet/parser/TabletInsertionEventTreePatternParser.java index 9655175759e96..df4924f019613 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tablet/parser/TabletInsertionEventTreePatternParser.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tablet/parser/TabletInsertionEventTreePatternParser.java @@ -28,6 +28,7 @@ import org.apache.iotdb.commons.pipe.event.EnrichedEvent; import org.apache.iotdb.commons.utils.TestOnly; import org.apache.iotdb.db.auth.AuthorityChecker; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; import org.apache.iotdb.db.pipe.event.common.row.PipeRow; import org.apache.iotdb.db.pipe.event.common.row.PipeRowCollector; import org.apache.iotdb.db.pipe.event.common.tablet.PipeTabletCollector; @@ -72,7 +73,9 @@ public TabletInsertionEventTreePatternParser( parse((InsertTabletNode) insertNode); } else { throw new UnSupportedDataTypeException( - String.format("InsertNode type %s is not supported.", insertNode.getClass().getName())); + String.format( + DataNodePipeMessages.PIPE_EXCEPTION_INSERTNODE_TYPE_S_IS_NOT_SUPPORTED_7DF82B58, + insertNode.getClass().getName())); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/terminate/PipeTerminateEvent.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/terminate/PipeTerminateEvent.java index 12385c52b0665..337e25f9fdcfd 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/terminate/PipeTerminateEvent.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/terminate/PipeTerminateEvent.java @@ -29,6 +29,7 @@ import org.apache.iotdb.commons.pipe.datastructure.pattern.TreePattern; import org.apache.iotdb.commons.pipe.event.EnrichedEvent; import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; import org.apache.iotdb.db.pipe.agent.PipeDataNodeAgent; import org.apache.iotdb.db.pipe.agent.task.PipeDataNodeTask; import org.apache.iotdb.db.pipe.event.common.tsfile.PipeTsFileInsertionEvent; @@ -161,7 +162,8 @@ public void markCompleted() { snapshotAndClearHistoricalTransferSummary(pipeName, creationTime, dataRegionId); if (Objects.nonNull(summary)) { LOGGER.info( - "Pipe {}@{}: terminate event committed for historical transfer. creationTime: {}, shouldMark: {}. {}", + DataNodePipeMessages + .PIPE_LOG_PIPE_TERMINATE_EVENT_COMMITTED_FOR_HISTORICAL_TRANSFER_CREATIONTIME_9B807B28, pipeName, dataRegionId, creationTime, diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tsfile/PipeTsFileInsertionEvent.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tsfile/PipeTsFileInsertionEvent.java index 6d4c3580bd281..70b6725da05ec 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tsfile/PipeTsFileInsertionEvent.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tsfile/PipeTsFileInsertionEvent.java @@ -388,8 +388,10 @@ public boolean internallyIncreaseResourceReferenceCount(final String holderMessa } catch (final Exception e) { LOGGER.warn( String.format( - "Increase reference count for TsFile %s or modFile %s error. Holder Message: %s", - tsFile, modFile, holderMessage), + DataNodePipeMessages.INCREASE_REFERENCE_COUNT_TSFILE_OR_MODFILE_ERROR_HOLDER_FMT, + tsFile, + modFile, + holderMessage), e); return false; } finally { @@ -412,8 +414,9 @@ public boolean internallyDecreaseResourceReferenceCount(final String holderMessa } catch (final Exception e) { LOGGER.warn( String.format( - "Decrease reference count for TsFile %s error. Holder Message: %s", - tsFile.getPath(), holderMessage), + DataNodePipeMessages.DECREASE_REFERENCE_COUNT_TSFILE_ERROR_HOLDER_FMT, + tsFile.getPath(), + holderMessage), e); return false; } finally { @@ -542,8 +545,11 @@ public void throwIfNoPrivilege() { } else { throw new AccessDeniedException( String.format( - "No privilege for SELECT for user %s at table %s.%s", - userName, tableModelDatabaseName, table)); + DataNodePipeMessages + .PIPE_EXCEPTION_NO_PRIVILEGE_FOR_SELECT_FOR_USER_S_AT_TABLE_S_S_84B0C299, + userName, + tableModelDatabaseName, + table)); } } } @@ -817,7 +823,9 @@ private void waitForResourceEnough4Parsing(final long timeoutMs) throws Interrup // should contain 'TimeoutException' in exception message throw new PipeRuntimeOutOfMemoryCriticalException( String.format( - "TimeoutException: Waited %s seconds for memory to parse TsFile", waitTimeSeconds)); + DataNodePipeMessages + .PIPE_EXCEPTION_TIMEOUTEXCEPTION_WAITED_S_SECONDS_FOR_MEMORY_TO_PARSE_TSFILE_0E4EF8FD, + waitTimeSeconds)); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tsfile/parser/scan/SinglePageWholeChunkReader.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tsfile/parser/scan/SinglePageWholeChunkReader.java index 4d8b35bac4a26..7b8c547292302 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tsfile/parser/scan/SinglePageWholeChunkReader.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tsfile/parser/scan/SinglePageWholeChunkReader.java @@ -294,10 +294,10 @@ public static ByteBuffer readCompressedPageData(PageHeader pageHeader, ByteBuffe // doesn't have a complete page body if (compressedPageBodyLength > chunkBuffer.remaining()) { throw new IOException( - DataNodePipeMessages.DO_NOT_HAS_A_COMPLETE_PAGE_BODY - + compressedPageBodyLength - + ". Actual:" - + chunkBuffer.remaining()); + String.format( + DataNodePipeMessages.COMPLETE_PAGE_BODY_EXPECTED_ACTUAL_FMT, + compressedPageBodyLength, + chunkBuffer.remaining())); } chunkBuffer.get(compressedPageBody); return ByteBuffer.wrap(compressedPageBody); @@ -316,13 +316,12 @@ public static ByteBuffer uncompressPageData( compressedPageData.array(), 0, compressedPageBodyLength, uncompressedPageData.array(), 0); } catch (Exception e) { throw new IOException( - DataNodePipeMessages.UNCOMPRESS_ERROR_UNCOMPRESS_SIZE - + pageHeader.getUncompressedSize() - + "compressed size: " - + pageHeader.getCompressedSize() - + "page header: " - + pageHeader - + e.getMessage(), + String.format( + DataNodePipeMessages.UNCOMPRESS_PAGE_DATA_FAILED_FMT, + pageHeader.getUncompressedSize(), + pageHeader.getCompressedSize(), + pageHeader, + e.getMessage()), e); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tsfile/parser/table/TsFileInsertionEventTableParser.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tsfile/parser/table/TsFileInsertionEventTableParser.java index 8ecdcc0cec5e9..1aa7140bb75d3 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tsfile/parser/table/TsFileInsertionEventTableParser.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tsfile/parser/table/TsFileInsertionEventTableParser.java @@ -188,7 +188,8 @@ private boolean hasTablePrivilege(final String tableName) { if (!skipIfNoPrivileges) { throw new AccessDeniedException( String.format( - "No privilege for SELECT for user %s at table %s.%s", + DataNodePipeMessages + .PIPE_EXCEPTION_NO_PRIVILEGE_FOR_SELECT_FOR_USER_S_AT_TABLE_S_S_84B0C299, entity.getUsername(), sourceEvent.getTableModelDatabaseName(), tableName)); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/processor/aggregate/AggregateProcessor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/processor/aggregate/AggregateProcessor.java index b584db153d0ee..2be8061f2dd18 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/processor/aggregate/AggregateProcessor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/processor/aggregate/AggregateProcessor.java @@ -298,7 +298,9 @@ public void customize( if (!aggregatorName2OutputNameMap.isEmpty()) { throw new PipeException( String.format( - "The aggregator and output name %s is invalid.", aggregatorName2OutputNameMap)); + DataNodePipeMessages + .PIPE_EXCEPTION_THE_AGGREGATOR_AND_OUTPUT_NAME_S_IS_INVALID_BC22CF92, + aggregatorName2OutputNameMap)); } intermediateResultName2OperatorSupplierMap.keySet().retainAll(declaredIntermediateResultSet); @@ -306,7 +308,9 @@ public void customize( if (!declaredIntermediateResultSet.isEmpty()) { throw new PipeException( String.format( - "The needed intermediate values %s are not defined.", declaredIntermediateResultSet)); + DataNodePipeMessages + .PIPE_EXCEPTION_THE_NEEDED_INTERMEDIATE_VALUES_S_ARE_NOT_DEFINED_3FF0C52D, + declaredIntermediateResultSet)); } // Set up column name strings @@ -325,7 +329,10 @@ public void customize( agent.getConfiguredProcessor(processorName, parameters, configuration); if (!(windowProcessor instanceof AbstractWindowingProcessor)) { throw new PipeException( - String.format("The processor %s is not a windowing processor.", processorName)); + String.format( + DataNodePipeMessages + .PIPE_EXCEPTION_THE_PROCESSOR_S_IS_NOT_A_WINDOWING_PROCESSOR_EA5B59BA, + processorName)); } windowingProcessor = (AbstractWindowingProcessor) windowProcessor; @@ -348,7 +355,9 @@ public void customize( if (!(index instanceof TimeWindowStateProgressIndex)) { throw new PipeException( String.format( - "The aggregate processor does not support progressIndexType %s", index.getType())); + DataNodePipeMessages + .PIPE_EXCEPTION_THE_AGGREGATE_PROCESSOR_DOES_NOT_SUPPORT_PROGRESSINDEXTYPE_35351D27, + index.getType())); } final TimeWindowStateProgressIndex timeWindowStateProgressIndex = @@ -507,7 +516,9 @@ private Map> processRow( break; default: throw new UnsupportedOperationException( - String.format("The type %s is not supported", row.getDataType(index))); + String.format( + DataNodePipeMessages.PIPE_EXCEPTION_THE_TYPE_S_IS_NOT_SUPPORTED_E1A6F05D, + row.getDataType(index))); } if (Objects.nonNull(result)) { collectWindowOutputs(result.getLeft(), timeSeries, rowCollector); @@ -695,7 +706,8 @@ public void collectWindowOutputs( default: throw new UnsupportedOperationException( String.format( - "The output tablet does not support column type %s", + DataNodePipeMessages + .PIPE_EXCEPTION_THE_OUTPUT_TABLET_DOES_NOT_SUPPORT_COLUMN_TYPE_S_62F3845C, valueColumnTypes[columnIndex])); } } @@ -745,7 +757,8 @@ public void collectWindowOutputs( default: throw new UnsupportedOperationException( String.format( - "The output tablet does not support column type %s", + DataNodePipeMessages + .PIPE_EXCEPTION_THE_OUTPUT_TABLET_DOES_NOT_SUPPORT_COLUMN_TYPE_S_62F3845C, valueColumnTypes[columnIndex])); } } else { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/processor/aggregate/operator/intermediateresult/CustomizedReadableIntermediateResults.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/processor/aggregate/operator/intermediateresult/CustomizedReadableIntermediateResults.java index c915bcbc17418..0a39312e69f7d 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/processor/aggregate/operator/intermediateresult/CustomizedReadableIntermediateResults.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/processor/aggregate/operator/intermediateresult/CustomizedReadableIntermediateResults.java @@ -20,6 +20,7 @@ package org.apache.iotdb.db.pipe.processor.aggregate.operator.intermediateresult; import org.apache.iotdb.commons.conf.CommonDescriptor; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; import org.apache.iotdb.pipe.api.type.Binary; import org.apache.iotdb.rpc.RpcUtils; @@ -46,7 +47,9 @@ public boolean getBoolean(final String key) { return (boolean) typeResultPair.getRight(); } throw new UnsupportedOperationException( - String.format("The type %s cannot be casted to boolean.", typeResultPair.getLeft())); + String.format( + DataNodePipeMessages.PIPE_EXCEPTION_THE_TYPE_S_CANNOT_BE_CASTED_TO_BOOLEAN_F19CCF75, + typeResultPair.getLeft())); } public int getInt(final String key) { @@ -72,7 +75,9 @@ public int getInt(final String key) { case STRING: default: throw new UnsupportedOperationException( - String.format("The type %s cannot be casted to int.", typeResultPair.getLeft())); + String.format( + DataNodePipeMessages.PIPE_EXCEPTION_THE_TYPE_S_CANNOT_BE_CASTED_TO_INT_659069CC, + typeResultPair.getLeft())); } } @@ -99,7 +104,9 @@ public long getLong(final String key) { case BLOB: default: throw new UnsupportedOperationException( - String.format("The type %s cannot be casted to long.", typeResultPair.getLeft())); + String.format( + DataNodePipeMessages.PIPE_EXCEPTION_THE_TYPE_S_CANNOT_BE_CASTED_TO_LONG_2D206561, + typeResultPair.getLeft())); } } @@ -126,7 +133,9 @@ public float getFloat(final String key) { case STRING: default: throw new UnsupportedOperationException( - String.format("The type %s cannot be casted to float.", typeResultPair.getLeft())); + String.format( + DataNodePipeMessages.PIPE_EXCEPTION_THE_TYPE_S_CANNOT_BE_CASTED_TO_FLOAT_C15A8A95, + typeResultPair.getLeft())); } } @@ -153,7 +162,9 @@ public double getDouble(final String key) { case BLOB: default: throw new UnsupportedOperationException( - String.format("The type %s cannot be casted to double.", typeResultPair.getLeft())); + String.format( + DataNodePipeMessages.PIPE_EXCEPTION_THE_TYPE_S_CANNOT_BE_CASTED_TO_DOUBLE_E577C0D7, + typeResultPair.getLeft())); } } @@ -190,7 +201,9 @@ public String getString(final String key) { return BytesUtils.parseBlobByteArrayToString(((Binary) value).getValues()); default: throw new UnsupportedOperationException( - String.format("The type %s cannot be casted to string.", typeResultPair.getLeft())); + String.format( + DataNodePipeMessages.PIPE_EXCEPTION_THE_TYPE_S_CANNOT_BE_CASTED_TO_STRING_34983FBD, + typeResultPair.getLeft())); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/processor/schemachange/RenameDatabaseProcessor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/processor/schemachange/RenameDatabaseProcessor.java index b1757d5087c1e..7ff38785697a3 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/processor/schemachange/RenameDatabaseProcessor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/processor/schemachange/RenameDatabaseProcessor.java @@ -20,6 +20,7 @@ package org.apache.iotdb.db.pipe.processor.schemachange; import org.apache.iotdb.db.conf.IoTDBConfig; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; import org.apache.iotdb.db.pipe.event.common.PipeInsertionEvent; import org.apache.iotdb.db.queryengine.plan.execution.config.TableConfigTaskVisitor; import org.apache.iotdb.pipe.api.PipeProcessor; @@ -54,8 +55,8 @@ public void validate(PipeParameterValidator validator) throws Exception { } catch (final Exception e) { throw new PipeException( String.format( - "The new database name %s is invalid, it should not contain '%s', " - + "should match the pattern %s, and the length should not exceed %d", + DataNodePipeMessages + .PIPE_EXCEPTION_THE_NEW_DATABASE_NAME_S_IS_INVALID_IT_SHOULD_NOT_CONTAIN_C3AB555E, newDatabaseName, PATH_SEPARATOR, IoTDBConfig.DATABASE_PATTERN, diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/processor/twostage/plugin/TwoStageCountProcessor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/processor/twostage/plugin/TwoStageCountProcessor.java index e9f40b69fa628..22f7c0c1a9367 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/processor/twostage/plugin/TwoStageCountProcessor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/processor/twostage/plugin/TwoStageCountProcessor.java @@ -163,8 +163,7 @@ public void customize(PipeParameters parameters, PipeProcessorRuntimeConfigurati Objects.isNull(localCountState) ? 0 : Long.parseLong(localCountState.toString())); } LOGGER.info( - "TwoStageCountProcessor customized by thread {}: pipeName={}, creationTime={}, regionId={}, outputSeries={}, " - + "localCommitProgressIndex={}, localCount={}", + DataNodePipeMessages.TWOSTAGECOUNTPROCESSOR_CUSTOMIZED_BY_THREAD_PIPENAME_CREATIONTIME_RE, Thread.currentThread().getName(), pipeName, creationTime, diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/protocol/airgap/IoTDBAirGapReceiver.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/protocol/airgap/IoTDBAirGapReceiver.java index 825ff4c5eac2c..1b8012d8ab9c0 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/protocol/airgap/IoTDBAirGapReceiver.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/protocol/airgap/IoTDBAirGapReceiver.java @@ -231,8 +231,11 @@ byte[] readData(final InputStream inputStream) throws IOException { if (length > maxLength) { throw new IOException( String.format( - "AirGap payload length (%d) exceeds maximum allowed (%d). Closing connection from %s", - length, maxLength, socket.getRemoteSocketAddress())); + DataNodePipeMessages + .PIPE_EXCEPTION_AIRGAP_PAYLOAD_LENGTH_D_EXCEEDS_MAXIMUM_ALLOWED_D_CLOSING_D1712B3D, + length, + maxLength, + socket.getRemoteSocketAddress())); } final byte[] resultBuffer = new byte[length]; @@ -264,7 +267,8 @@ private int readLength(final InputStream inputStream, final boolean isELanguage) if (isELanguage) { throw new IOException( String.format( - "Detected suspicious nested E-Language prefix. Closing connection from %s", + DataNodePipeMessages + .PIPE_EXCEPTION_DETECTED_SUSPICIOUS_NESTED_E_LANGUAGE_PREFIX_CLOSING_CONNECTION_69C76172, socket.getRemoteSocketAddress())); } isELanguagePayload = true; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/protocol/iotconsensusv2/IoTConsensusV2Receiver.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/protocol/iotconsensusv2/IoTConsensusV2Receiver.java index 7d01318c82ede..e185a424947e8 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/protocol/iotconsensusv2/IoTConsensusV2Receiver.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/protocol/iotconsensusv2/IoTConsensusV2Receiver.java @@ -668,8 +668,7 @@ private TIoTConsensusV2TransferResp checkNonFinalFileSeal( + "The original file has length %s, but receiver file has length %s.", fileName, fileLength, writingFileWriter.length())); LOGGER.warn( - "IoTConsensusV2-PipeName-{}: Failed to seal file {} when check non final seal, because the length of file is not correct. " - + "The original file has length {}, but receiver file has length {}.", + DataNodePipeMessages.IOTCONSENSUSV2_PIPENAME_FAILED_TO_SEAL_FILE_WHEN_1, consensusPipeName, fileName, fileLength, @@ -716,8 +715,7 @@ private void updateWritePointCountMetrics( // we will read the actual point count from the TsFile. if (LOGGER.isDebugEnabled()) { LOGGER.debug( - "IoTConsensusV2-PipeName-{}: The point count of TsFile {} is not given by sender, " - + "will read actual point count from TsFile.", + DataNodePipeMessages.IOTCONSENSUSV2_PIPENAME_THE_POINT_COUNT_OF_TSFILE, consensusPipeName, tsFileAbsolutePath); } @@ -771,8 +769,7 @@ private boolean isWritingFileNonAvailable(IoTConsensusV2TsFileWriter tsFileWrite writingFile != null && writingFile.exists() && writingFileWriter != null; if (!isWritingFileAvailable) { LOGGER.info( - "IoTConsensusV2-PipeName-{}: Writing file {} is not available. " - + "Writing file is null: {}, writing file exists: {}, writing file writer is null: {}.", + DataNodePipeMessages.IOTCONSENSUSV2_PIPENAME_WRITING_FILE_IS_NOT_AVAILABLE, consensusPipeName, writingFile, writingFile == null, @@ -811,8 +808,7 @@ private TIoTConsensusV2TransferResp checkFinalFileSeal( + "The original file has length %s, but receiver file has length %s.", fileName, fileLength, writingFileWriter.length())); LOGGER.warn( - "IoTConsensusV2-PipeName-{}: Failed to seal file {} when check final seal file, because the length of file is not correct. " - + "The original file has length {}, but receiver file has length {}.", + DataNodePipeMessages.IOTCONSENSUSV2_PIPENAME_FAILED_TO_SEAL_FILE_WHEN, consensusPipeName, fileName, fileLength, @@ -872,8 +868,7 @@ private void updateWritingFileIfNeeded( } LOGGER.info( - "IoTConsensusV2-PipeName-{}: Writing file {} is not existed or name is not correct, try to create it. " - + "Current writing file is {}.", + DataNodePipeMessages.IOTCONSENSUSV2_PIPENAME_WRITING_FILE_IS_NOT_EXISTED, consensusPipeName, fileName, tsFileWriter.getWritingFile() == null ? "null" : tsFileWriter.getWritingFile().getPath()); @@ -943,8 +938,10 @@ private void initiateTsFileBufferFolder(List receiverBaseDirsName) throw newReceiverDir.getPath()); throw new IOException( String.format( - "IoTConsensusV2-PipeName-%s: Failed to create receiver file dir %s. Because parent system dir have been deleted due to system concurrently exit.", - consensusPipeName, newReceiverDir.getPath())); + DataNodePipeMessages + .PIPE_EXCEPTION_IOTCONSENSUSV2_PIPENAME_S_FAILED_TO_CREATE_RECEIVER_FILE_DD67E854, + consensusPipeName, + newReceiverDir.getPath())); } // Remove exists dir deleteFileOrDirectoryIfExists( @@ -957,8 +954,10 @@ private void initiateTsFileBufferFolder(List receiverBaseDirsName) throw newReceiverDir.getPath()); throw new IOException( String.format( - "IoTConsensusV2-PipeName-%s: Failed to create receiver file dir %s. May because authority or dir already exists etc.", - consensusPipeName, newReceiverDir.getPath())); + DataNodePipeMessages + .PIPE_EXCEPTION_IOTCONSENSUSV2_PIPENAME_S_FAILED_TO_CREATE_RECEIVER_FILE_5ADC430A, + consensusPipeName, + newReceiverDir.getPath())); } this.receiveDirs.add(newReceiverDir.getPath()); } @@ -1152,8 +1151,10 @@ public void rollToNextWritingPath() throws IOException, DiskSpaceInsufficientExc if (folderManager == null) { throw new IOException( String.format( - "IoTConsensusV2-PipeName-%s: Failed to create tsFileWriter-%d receiver file dir", - consensusPipeName, index)); + DataNodePipeMessages + .PIPE_EXCEPTION_IOTCONSENSUSV2_PIPENAME_S_FAILED_TO_CREATE_TSFILEWRITER_85EC8DD2, + consensusPipeName, + index)); } this.localWritingDir = folderManager.getNextWithRetry( @@ -1192,8 +1193,10 @@ public void rollToNextWritingPath() throws IOException, DiskSpaceInsufficientExc if (this.localWritingDir == null) { throw new IOException( String.format( - "IoTConsensusV2-PipeName-%s: Failed to create tsFileWriter-%d receiver file dir", - consensusPipeName, index)); + DataNodePipeMessages + .PIPE_EXCEPTION_IOTCONSENSUSV2_PIPENAME_S_FAILED_TO_CREATE_TSFILEWRITER_85EC8DD2, + consensusPipeName, + index)); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/protocol/iotconsensusv2/IoTConsensusV2ReceiverAgent.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/protocol/iotconsensusv2/IoTConsensusV2ReceiverAgent.java index 35cc8a5957357..9c9d1339f5066 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/protocol/iotconsensusv2/IoTConsensusV2ReceiverAgent.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/protocol/iotconsensusv2/IoTConsensusV2ReceiverAgent.java @@ -164,8 +164,7 @@ private IoTConsensusV2Receiver getReceiver( final byte receiverThreadLocalVersion = receiverReference.get().getVersion().getVersion(); if (receiverThreadLocalVersion != reqVersion) { LOGGER.warn( - "The iotConsensusV2 request version {} is different from the sender request version {}," - + " the receiver will be reset to the sender request version.", + DataNodePipeMessages.THE_IOTCONSENSUSV2_REQUEST_VERSION_IS_DIFFERENT_FROM, receiverThreadLocalVersion, reqVersion); receiverReference.set(null); @@ -199,7 +198,10 @@ private IoTConsensusV2Receiver internalSetAndGetReceiver( LOGGER.info(DataNodePipeMessages.RECEIVER_IS_READY, consensusPipeName); } else { throw new UnsupportedOperationException( - String.format("Unsupported iotConsensusV2 request version %d", reqVersion)); + String.format( + DataNodePipeMessages + .PIPE_EXCEPTION_UNSUPPORTED_IOTCONSENSUSV2_REQUEST_VERSION_D_E1D94606, + reqVersion)); } } else { waitUntilReceiverGetInitiated(receiverReference); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/protocol/legacy/IoTDBLegacyPipeReceiverAgent.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/protocol/legacy/IoTDBLegacyPipeReceiverAgent.java index c4c3986259f55..18da2be76c5c9 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/protocol/legacy/IoTDBLegacyPipeReceiverAgent.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/protocol/legacy/IoTDBLegacyPipeReceiverAgent.java @@ -360,7 +360,7 @@ private static File resolveFileInFileDataDir(final String fileDir, final String if (Objects.nonNull(illegalError)) { throw new IOException( String.format(PipeMessages.ILLEGAL_FILENAME_PATH_TRAVERSAL, fileName) - + ", " + + PipeMessages.EXCEPTION_COMMA_50AD1C01 + illegalError); } @@ -377,17 +377,10 @@ private IndexCheckResult checkStartIndexValid(final File file, final long startI } // compare and check if (localIndex < 0 && startIndex != 0) { - LOGGER.error( - "The start index {} of data sync is not valid. " - + "The file is not exist and start index should equal to 0).", - startIndex); + LOGGER.error(DataNodePipeMessages.THE_START_INDEX_OF_DATA_SYNC_IS, startIndex); return new IndexCheckResult(false, "0"); } else if (localIndex >= 0 && localIndex != startIndex) { - LOGGER.error( - "The start index {} of data sync is not valid. " - + "The start index of the file should equal to {}.", - startIndex, - localIndex); + LOGGER.error(DataNodePipeMessages.THE_START_INDEX_OF_DATA_SYNC_IS_1, startIndex, localIndex); return new IndexCheckResult(false, String.valueOf(localIndex)); } return new IndexCheckResult(true, "0"); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/protocol/legacy/loader/DeletionLoader.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/protocol/legacy/loader/DeletionLoader.java index ad991483e45bc..fe0c6e8c754db 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/protocol/legacy/loader/DeletionLoader.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/protocol/legacy/loader/DeletionLoader.java @@ -83,7 +83,9 @@ public void load() throws PipeException { LOGGER.error(DataNodePipeMessages.DELETE_ERROR_STATEMENT, deletion, statement); LOGGER.error(DataNodePipeMessages.DELETE_RESULT_STATUS, result.status); throw new LoadFileException( - String.format("Can not execute delete statement: %s", statement)); + String.format( + DataNodePipeMessages.PIPE_EXCEPTION_CAN_NOT_EXECUTE_DELETE_STATEMENT_S_3563E8A3, + statement)); } } catch (Exception e) { throw new PipeException(e.getMessage()); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/protocol/legacy/loader/TsFileLoader.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/protocol/legacy/loader/TsFileLoader.java index 66574bf341ddd..0635778272087 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/protocol/legacy/loader/TsFileLoader.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/protocol/legacy/loader/TsFileLoader.java @@ -86,7 +86,10 @@ public void load() { LOGGER.error(DataNodePipeMessages.LOAD_TSFILE_ERROR_STATEMENT, tsFile.getPath(), statement); LOGGER.error(DataNodePipeMessages.LOAD_TSFILE_RESULT_STATUS, result.status); throw new LoadFileException( - String.format("Can not execute load TsFile statement: %s", statement)); + String.format( + DataNodePipeMessages + .PIPE_EXCEPTION_CAN_NOT_EXECUTE_LOAD_TSFILE_STATEMENT_S_8CC1A096, + statement)); } } catch (Exception e) { throw new PipeException(e.getMessage()); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/protocol/thrift/IoTDBDataNodeReceiver.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/protocol/thrift/IoTDBDataNodeReceiver.java index e6c8ddefc997e..a74ba48fab632 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/protocol/thrift/IoTDBDataNodeReceiver.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/protocol/thrift/IoTDBDataNodeReceiver.java @@ -1109,8 +1109,10 @@ private void autoCreateDatabaseIfNecessary(final String database) { && statusCode != TSStatusCode.DATABASE_ALREADY_EXISTS.getStatusCode()) { throw new PipeException( String.format( - "Auto create database failed: %s, status code: %s", - database, result.getStatusCode())); + DataNodePipeMessages + .PIPE_EXCEPTION_AUTO_CREATE_DATABASE_FAILED_S_STATUS_CODE_S_D8EB60FA, + database, + result.getStatusCode())); } } catch (final ExecutionException | InterruptedException e) { if (e instanceof InterruptedException) { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/visitor/PipePlanToStatementVisitor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/visitor/PipePlanToStatementVisitor.java index dd0ccf373cdb1..6158c19bb9950 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/visitor/PipePlanToStatementVisitor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/visitor/PipePlanToStatementVisitor.java @@ -24,6 +24,7 @@ import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.PlanNode; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.QualifiedName; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Table; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; import org.apache.iotdb.db.queryengine.plan.planner.plan.node.PlanVisitor; import org.apache.iotdb.db.queryengine.plan.planner.plan.node.metadata.write.ActivateTemplateNode; import org.apache.iotdb.db.queryengine.plan.planner.plan.node.metadata.write.AlterTimeSeriesNode; @@ -78,7 +79,8 @@ public class PipePlanToStatementVisitor implements PlanVisitor { public Statement visitPlan(final PlanNode node, final Void context) { throw new UnsupportedOperationException( String.format( - "PipePlanToStatementVisitor does not support visiting general plan, PlanNode: %s", + DataNodePipeMessages + .PIPE_EXCEPTION_PIPEPLANTOSTATEMENTVISITOR_DOES_NOT_SUPPORT_VISITING_GENERAL_452AAA60, node)); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/resource/memory/PipeMemoryManager.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/resource/memory/PipeMemoryManager.java index c99efe5e3da3e..eb5e6b9ff0ad6 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/resource/memory/PipeMemoryManager.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/resource/memory/PipeMemoryManager.java @@ -171,8 +171,8 @@ public PipeTabletMemoryBlock forceAllocateForTabletWithRetry(long tabletSizeInBy if (!isHardEnough4TabletParsing()) { throw new PipeRuntimeOutOfMemoryCriticalException( String.format( - "forceAllocateForTablet: failed to allocate because there's too much memory for tablets, " - + "total memory size %d bytes, used memory for tablet size %d bytes, requested memory size %d bytes", + DataNodePipeMessages + .PIPE_EXCEPTION_FORCEALLOCATEFORTABLET_FAILED_TO_ALLOCATE_BECAUSE_THERE_F878474D, getTotalNonFloatingMemorySizeInBytes(), usedMemorySizeInBytesOfTablets, tabletSizeInBytes)); @@ -216,8 +216,8 @@ public PipeTsFileMemoryBlock forceAllocateForTsFileWithRetry(long tsFileSizeInBy if (!isHardEnough4TsFileSlicing()) { throw new PipeRuntimeOutOfMemoryCriticalException( String.format( - "forceAllocateForTsFile: failed to allocate because there's too much memory for tsfiles, " - + "total memory size %d bytes, used memory for tsfile size %d bytes, requested memory size %d bytes", + DataNodePipeMessages + .PIPE_EXCEPTION_FORCEALLOCATEFORTSFILE_FAILED_TO_ALLOCATE_BECAUSE_THERE_6D614467, getTotalNonFloatingMemorySizeInBytes(), usedMemorySizeInBytesOfTsFiles, tsFileSizeInBytes)); @@ -303,9 +303,8 @@ private PipeMemoryBlock forceAllocateWithRetry(long sizeInBytes, PipeMemoryBlock throw new PipeRuntimeOutOfMemoryCriticalException( String.format( - "forceAllocate: failed to allocate memory after %d retries, " - + "total memory size %d bytes, used memory size %d bytes, " - + "requested memory size %d bytes", + DataNodePipeMessages + .PIPE_EXCEPTION_FORCEALLOCATE_FAILED_TO_ALLOCATE_MEMORY_AFTER_D_RETRIES_44EF7AE7, memoryAllocateMaxRetries, getTotalNonFloatingMemorySizeInBytes(), memoryBlock.getUsedMemoryInBytes(), @@ -382,9 +381,8 @@ public synchronized void resize( if (force) { throw new PipeRuntimeOutOfMemoryCriticalException( String.format( - "forceResize: failed to allocate memory after %d retries, " - + "total memory size %d bytes, used memory size %d bytes, " - + "requested memory size %d bytes", + DataNodePipeMessages + .PIPE_EXCEPTION_FORCERESIZE_FAILED_TO_ALLOCATE_MEMORY_AFTER_D_RETRIES_TOTAL_8C6948BC, memoryAllocateMaxRetries, getTotalNonFloatingMemorySizeInBytes(), memoryBlock.getUsedMemoryInBytes(), @@ -446,10 +444,7 @@ public synchronized PipeMemoryBlock tryAllocate( if (getTotalNonFloatingMemorySizeInBytes() - memoryBlock.getUsedMemoryInBytes() >= sizeToAllocateInBytes) { LOGGER.info( - "tryAllocate: allocated memory, " - + "total memory size {} bytes, used memory size {} bytes, " - + "original requested memory size {} bytes, " - + "actual requested memory size {} bytes", + DataNodePipeMessages.TRYALLOCATE_ALLOCATED_MEMORY_TOTAL_MEMORY_SIZE_BYTES, getTotalNonFloatingMemorySizeInBytes(), memoryBlock.getUsedMemoryInBytes(), sizeInBytes, @@ -465,10 +460,7 @@ public synchronized PipeMemoryBlock tryAllocate( if (tryShrinkUntilFreeMemorySatisfy(sizeToAllocateInBytes)) { LOGGER.info( - "tryAllocate: allocated memory, " - + "total memory size {} bytes, used memory size {} bytes, " - + "original requested memory size {} bytes, " - + "actual requested memory size {} bytes", + DataNodePipeMessages.TRYALLOCATE_ALLOCATED_MEMORY_TOTAL_MEMORY_SIZE_BYTES, getTotalNonFloatingMemorySizeInBytes(), memoryBlock.getUsedMemoryInBytes(), sizeInBytes, @@ -476,9 +468,7 @@ public synchronized PipeMemoryBlock tryAllocate( return registerMemoryBlock(sizeToAllocateInBytes); } else { LOGGER.warn( - "tryAllocate: failed to allocate memory, " - + "total memory size {} bytes, used memory size {} bytes, " - + "requested memory size {} bytes", + DataNodePipeMessages.TRYALLOCATE_FAILED_TO_ALLOCATE_MEMORY_TOTAL_MEMORY, getTotalNonFloatingMemorySizeInBytes(), memoryBlock.getUsedMemoryInBytes(), sizeInBytes); @@ -580,8 +570,8 @@ public synchronized void tryExpandAllAndCheckConsistency() { allocatedBlocks.stream().mapToLong(PipeMemoryBlock::getMemoryUsageInBytes).sum(); if (blockSum != memoryBlock.getUsedMemoryInBytes()) { LOGGER.debug( - "tryExpandAllAndCheckConsistency: memory usage is not consistent with allocated blocks," - + " usedMemorySizeInBytes is {} but sum of all blocks is {}", + DataNodePipeMessages + .TRYEXPANDALLANDCHECKCONSISTENCY_MEMORY_USAGE_IS_NOT_CONSISTENT_WITH, memoryBlock.getUsedMemoryInBytes(), blockSum); } @@ -593,8 +583,7 @@ public synchronized void tryExpandAllAndCheckConsistency() { .sum(); if (tabletBlockSum != usedMemorySizeInBytesOfTablets) { LOGGER.debug( - "tryExpandAllAndCheckConsistency: memory usage of tablets is not consistent with allocated blocks," - + " usedMemorySizeInBytesOfTablets is {} but sum of all tablet blocks is {}", + DataNodePipeMessages.TRYEXPANDALLANDCHECKCONSISTENCY_MEMORY_USAGE_OF_TABLETS_IS_NOT, usedMemorySizeInBytesOfTablets, tabletBlockSum); } @@ -606,8 +595,7 @@ public synchronized void tryExpandAllAndCheckConsistency() { .sum(); if (tsFileBlockSum != usedMemorySizeInBytesOfTsFiles) { LOGGER.debug( - "tryExpandAllAndCheckConsistency: memory usage of tsfiles is not consistent with allocated blocks," - + " usedMemorySizeInBytesOfTsFiles is {} but sum of all tsfile blocks is {}", + DataNodePipeMessages.TRYEXPANDALLANDCHECKCONSISTENCY_MEMORY_USAGE_OF_TSFILES_IS_NOT, usedMemorySizeInBytesOfTsFiles, tsFileBlockSum); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/resource/tsfile/PipeTsFileResourceManager.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/resource/tsfile/PipeTsFileResourceManager.java index 90cd17539f67b..02e27baf2ee6b 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/resource/tsfile/PipeTsFileResourceManager.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/resource/tsfile/PipeTsFileResourceManager.java @@ -170,8 +170,8 @@ public static File getHardlinkOrCopiedFileInPipeDir( } catch (final Exception e) { throw new IOException( String.format( - "failed to get hardlink or copied file in pipe dir " - + "for file %s, it is not a tsfile, mod file or resource file", + DataNodePipeMessages + .PIPE_EXCEPTION_FAILED_TO_GET_HARDLINK_OR_COPIED_FILE_IN_PIPE_DIR_FOR_FILE_F009D86E, file.getPath()), e); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/client/IoTDBDataNodeAsyncClientManager.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/client/IoTDBDataNodeAsyncClientManager.java index 5c38c3a85402f..f86e61a1dc946 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/client/IoTDBDataNodeAsyncClientManager.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/client/IoTDBDataNodeAsyncClientManager.java @@ -251,7 +251,8 @@ public void onComplete(final TPipeTransferResp response) { exception.set( new PipeConnectionException( String.format( - "Handshake error with receiver %s:%s, code: %d, message: %s.", + DataNodePipeMessages + .PIPE_EXCEPTION_HANDSHAKE_ERROR_WITH_RECEIVER_S_S_CODE_D_MESSAGE_S_4ED82649, targetNodeUrl.getIp(), targetNodeUrl.getPort(), response.getStatus().getCode(), diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/payload/evolvable/batch/PipeTabletEventPlainBatch.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/payload/evolvable/batch/PipeTabletEventPlainBatch.java index b32479e2f1a21..3d76dd857d9ea 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/payload/evolvable/batch/PipeTabletEventPlainBatch.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/payload/evolvable/batch/PipeTabletEventPlainBatch.java @@ -20,6 +20,7 @@ package org.apache.iotdb.db.pipe.sink.payload.evolvable.batch; import org.apache.iotdb.commons.pipe.event.EnrichedEvent; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; import org.apache.iotdb.db.pipe.event.common.tablet.PipeInsertNodeTabletInsertionEvent; import org.apache.iotdb.db.pipe.event.common.tablet.PipeRawTabletInsertionEvent; import org.apache.iotdb.db.pipe.resource.memory.PipeMemoryWeightUtil; @@ -303,7 +304,9 @@ private static Object copyValueList( return copiedBinaryValues; default: throw new UnSupportedDataTypeException( - String.format("Data type %s is not supported.", dataType)); + String.format( + DataNodePipeMessages.PIPE_EXCEPTION_DATA_TYPE_S_IS_NOT_SUPPORTED_5D5C02E4, + dataType)); } } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/payload/evolvable/request/PipeTransferTabletBatchReq.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/payload/evolvable/request/PipeTransferTabletBatchReq.java index ede3370f5b0d1..a52b3b48a5bd3 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/payload/evolvable/request/PipeTransferTabletBatchReq.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/payload/evolvable/request/PipeTransferTabletBatchReq.java @@ -22,6 +22,7 @@ import org.apache.iotdb.commons.pipe.sink.payload.thrift.request.IoTDBSinkRequestVersion; import org.apache.iotdb.commons.pipe.sink.payload.thrift.request.PipeRequestType; import org.apache.iotdb.commons.utils.TestOnly; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; import org.apache.iotdb.db.pipe.event.common.tablet.PipeTabletUtils.TabletStringInternPool; import org.apache.iotdb.db.queryengine.plan.planner.plan.PlanFragment; import org.apache.iotdb.db.queryengine.plan.planner.plan.node.write.InsertNode; @@ -75,7 +76,8 @@ public Pair constructStatement } else { throw new UnsupportedOperationException( String.format( - "Unknown InsertBaseStatement %s constructed from PipeTransferTabletInsertNodeReq.", + DataNodePipeMessages + .PIPE_EXCEPTION_UNKNOWN_INSERTBASESTATEMENT_S_CONSTRUCTED_FROM_PIPETRANSFERTABLETINSERTNODEREQ_FF5ED1D7, statement)); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/payload/evolvable/request/PipeTransferTabletBatchReqV2.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/payload/evolvable/request/PipeTransferTabletBatchReqV2.java index e7278158876f2..6c4607518b4e7 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/payload/evolvable/request/PipeTransferTabletBatchReqV2.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/payload/evolvable/request/PipeTransferTabletBatchReqV2.java @@ -22,6 +22,7 @@ import org.apache.iotdb.commons.pipe.sink.payload.thrift.request.IoTDBSinkRequestVersion; import org.apache.iotdb.commons.pipe.sink.payload.thrift.request.PipeRequestType; import org.apache.iotdb.commons.utils.TestOnly; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; import org.apache.iotdb.db.pipe.event.common.tablet.PipeTabletUtils.TabletStringInternPool; import org.apache.iotdb.db.queryengine.plan.planner.plan.PlanFragment; import org.apache.iotdb.db.queryengine.plan.planner.plan.node.write.InsertNode; @@ -85,7 +86,8 @@ public List constructStatements() { } else { throw new UnsupportedOperationException( String.format( - "unknown InsertBaseStatement %s constructed from PipeTransferTabletBinaryReqV2.", + DataNodePipeMessages + .PIPE_EXCEPTION_UNKNOWN_INSERTBASESTATEMENT_S_CONSTRUCTED_FROM_PIPETRANSFERTABLETBINARYREQV2_06D274D2, insertNodeReq)); } continue; @@ -109,7 +111,8 @@ public List constructStatements() { } else { throw new UnsupportedOperationException( String.format( - "Unknown InsertBaseStatement %s constructed from PipeTransferTabletInsertNodeReqV2.", + DataNodePipeMessages + .PIPE_EXCEPTION_UNKNOWN_INSERTBASESTATEMENT_S_CONSTRUCTED_FROM_PIPETRANSFERTABLETINSERTNODEREQV2_16F399B6, statement)); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/payload/evolvable/request/PipeTransferTabletBinaryReq.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/payload/evolvable/request/PipeTransferTabletBinaryReq.java index 93d79146a018e..b31816c1fcd6a 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/payload/evolvable/request/PipeTransferTabletBinaryReq.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/payload/evolvable/request/PipeTransferTabletBinaryReq.java @@ -22,6 +22,7 @@ import org.apache.iotdb.commons.pipe.sink.payload.thrift.request.IoTDBSinkRequestVersion; import org.apache.iotdb.commons.pipe.sink.payload.thrift.request.PipeRequestType; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.PlanNode; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; import org.apache.iotdb.db.pipe.receiver.protocol.thrift.IoTDBDataNodeReceiver; import org.apache.iotdb.db.queryengine.plan.planner.plan.node.write.InsertNode; import org.apache.iotdb.db.queryengine.plan.planner.plan.node.write.InsertRowNode; @@ -60,7 +61,8 @@ public InsertBaseStatement constructStatement() { || insertNode instanceof InsertRowsNode)) { throw new UnsupportedOperationException( String.format( - "Unknown InsertNode type %s when constructing statement from insert node.", + DataNodePipeMessages + .PIPE_EXCEPTION_UNKNOWN_INSERTNODE_TYPE_S_WHEN_CONSTRUCTING_STATEMENT_FROM_4A055174, insertNode)); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/payload/evolvable/request/PipeTransferTabletBinaryReqV2.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/payload/evolvable/request/PipeTransferTabletBinaryReqV2.java index 75501fe0f22e0..2788033be2d04 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/payload/evolvable/request/PipeTransferTabletBinaryReqV2.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/payload/evolvable/request/PipeTransferTabletBinaryReqV2.java @@ -22,6 +22,7 @@ import org.apache.iotdb.commons.pipe.sink.payload.thrift.request.IoTDBSinkRequestVersion; import org.apache.iotdb.commons.pipe.sink.payload.thrift.request.PipeRequestType; import org.apache.iotdb.commons.utils.PathUtils; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; import org.apache.iotdb.db.pipe.receiver.protocol.thrift.IoTDBDataNodeReceiver; import org.apache.iotdb.db.queryengine.plan.planner.plan.node.write.InsertNode; import org.apache.iotdb.db.queryengine.plan.planner.plan.node.write.InsertRowNode; @@ -60,7 +61,8 @@ public InsertBaseStatement constructStatement() { || insertNode instanceof InsertRowsNode)) { throw new UnsupportedOperationException( String.format( - "Unknown InsertNode type %s when constructing statement from insert node.", + DataNodePipeMessages + .PIPE_EXCEPTION_UNKNOWN_INSERTNODE_TYPE_S_WHEN_CONSTRUCTING_STATEMENT_FROM_4A055174, insertNode)); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/payload/evolvable/request/PipeTransferTabletInsertNodeReq.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/payload/evolvable/request/PipeTransferTabletInsertNodeReq.java index 46646baf08ca0..bc42630d79b4d 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/payload/evolvable/request/PipeTransferTabletInsertNodeReq.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/payload/evolvable/request/PipeTransferTabletInsertNodeReq.java @@ -21,6 +21,7 @@ import org.apache.iotdb.commons.pipe.sink.payload.thrift.request.IoTDBSinkRequestVersion; import org.apache.iotdb.commons.pipe.sink.payload.thrift.request.PipeRequestType; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; import org.apache.iotdb.db.pipe.receiver.protocol.thrift.IoTDBDataNodeReceiver; import org.apache.iotdb.db.queryengine.plan.planner.plan.PlanFragment; import org.apache.iotdb.db.queryengine.plan.planner.plan.node.write.InsertNode; @@ -56,7 +57,8 @@ public InsertBaseStatement constructStatement() { || insertNode instanceof InsertRowsNode)) { throw new UnsupportedOperationException( String.format( - "Unknown InsertNode type %s when constructing statement from insert node.", + DataNodePipeMessages + .PIPE_EXCEPTION_UNKNOWN_INSERTNODE_TYPE_S_WHEN_CONSTRUCTING_STATEMENT_FROM_4A055174, insertNode)); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/payload/evolvable/request/PipeTransferTabletInsertNodeReqV2.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/payload/evolvable/request/PipeTransferTabletInsertNodeReqV2.java index e39330b5b0e25..b9d5eb7de85bf 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/payload/evolvable/request/PipeTransferTabletInsertNodeReqV2.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/payload/evolvable/request/PipeTransferTabletInsertNodeReqV2.java @@ -22,6 +22,7 @@ import org.apache.iotdb.commons.pipe.sink.payload.thrift.request.IoTDBSinkRequestVersion; import org.apache.iotdb.commons.pipe.sink.payload.thrift.request.PipeRequestType; import org.apache.iotdb.commons.utils.PathUtils; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; import org.apache.iotdb.db.pipe.receiver.protocol.thrift.IoTDBDataNodeReceiver; import org.apache.iotdb.db.queryengine.plan.planner.plan.PlanFragment; import org.apache.iotdb.db.queryengine.plan.planner.plan.node.write.InsertNode; @@ -60,7 +61,8 @@ public InsertBaseStatement constructStatement() { || insertNode instanceof InsertRowsNode)) { throw new UnsupportedOperationException( String.format( - "Unknown InsertNode type %s when constructing statement from insert node.", + DataNodePipeMessages + .PIPE_EXCEPTION_UNKNOWN_INSERTNODE_TYPE_S_WHEN_CONSTRUCTING_STATEMENT_FROM_4A055174, insertNode)); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/airgap/IoTDBDataRegionAirGapSink.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/airgap/IoTDBDataRegionAirGapSink.java index 4f2dab1bfa895..f082a35218246 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/airgap/IoTDBDataRegionAirGapSink.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/airgap/IoTDBDataRegionAirGapSink.java @@ -113,9 +113,8 @@ public void transfer(final TabletInsertionEvent tabletInsertionEvent) throws Exc if (!(tabletInsertionEvent instanceof PipeInsertNodeTabletInsertionEvent) && !(tabletInsertionEvent instanceof PipeRawTabletInsertionEvent)) { LOGGER.warn( - "IoTDBDataRegionAirGapConnector only support " - + "PipeInsertNodeTabletInsertionEvent and PipeRawTabletInsertionEvent. " - + "Ignore {}.", + DataNodePipeMessages + .IOTDBDATAREGIONAIRGAPCONNECTOR_ONLY_SUPPORT_PIPEINSERTNODETABLETINSERTIONEVENT_A, tabletInsertionEvent); return; } @@ -140,8 +139,10 @@ public void transfer(final TabletInsertionEvent tabletInsertionEvent) throws Exc throw new PipeConnectionException( String.format( - "Network error when transfer tablet insertion event %s, because %s.", - ((EnrichedEvent) tabletInsertionEvent).coreReportMessage(), e.getMessage()), + DataNodePipeMessages + .PIPE_EXCEPTION_NETWORK_ERROR_WHEN_TRANSFER_TABLET_INSERTION_EVENT_S_BECAUSE_A6F87EF5, + ((EnrichedEvent) tabletInsertionEvent).coreReportMessage(), + e.getMessage()), e); } finally { socket.setSoTimeout(PIPE_CONFIG.getPipeSinkTransferTimeoutMs()); @@ -179,7 +180,8 @@ public void transfer(final TsFileInsertionEvent tsFileInsertionEvent) throws Exc throw new PipeConnectionException( String.format( - "Network error when transfer tsfile insertion event %s, because %s.", + DataNodePipeMessages + .PIPE_EXCEPTION_NETWORK_ERROR_WHEN_TRANSFER_TSFILE_INSERTION_EVENT_S_BECAUSE_BDE61690, ((PipeTsFileInsertionEvent) tsFileInsertionEvent).coreReportMessage(), e.getMessage()), e); @@ -199,8 +201,10 @@ public void transfer(final Event event) throws Exception { throw new PipeConnectionException( String.format( - "Network error when transfer tsfile event %s, because %s.", - ((EnrichedEvent) event).coreReportMessage(), e.getMessage()), + DataNodePipeMessages + .PIPE_EXCEPTION_NETWORK_ERROR_WHEN_TRANSFER_TSFILE_EVENT_S_BECAUSE_S_F36D2A6B, + ((EnrichedEvent) event).coreReportMessage(), + e.getMessage()), e); } return; @@ -225,8 +229,10 @@ public void transfer(final Event event) throws Exception { throw new PipeConnectionException( String.format( - "Network error when transfer tsfile event %s, because %s.", - ((EnrichedEvent) event).coreReportMessage(), e.getMessage()), + DataNodePipeMessages + .PIPE_EXCEPTION_NETWORK_ERROR_WHEN_TRANSFER_TSFILE_EVENT_S_BECAUSE_S_F36D2A6B, + ((EnrichedEvent) event).coreReportMessage(), + e.getMessage()), e); } } @@ -241,7 +247,7 @@ private void doTransferWrapper(final AirGapSocket socket) } else if (batch instanceof PipeTabletEventTsFileBatch) { doTransfer(socket, (PipeTabletEventTsFileBatch) batch); } else { - LOGGER.warn("Unsupported batch type {}.", batch.getClass()); + LOGGER.warn(DataNodePipeMessages.UNSUPPORTED_BATCH_TYPE, batch.getClass()); } batch.decreaseEventsReferenceCount(IoTDBDataRegionAirGapSink.class.getName(), true); batch.onSuccess(); @@ -281,10 +287,9 @@ private void doTransfer( return null; }); } catch (final NoSuchFileException e) { - LOGGER.info("The file {} is not found, may already be deleted.", dbTsFile); + LOGGER.info(DataNodePipeMessages.THE_FILE_IS_NOT_FOUND_MAY_ALREADY, dbTsFile); } catch (final Exception e) { - LOGGER.warn( - "Failed to delete batch file {}, this file should be deleted manually later", dbTsFile); + LOGGER.warn(DataNodePipeMessages.FAILED_TO_DELETE_BATCH_FILE_THIS_FILE, dbTsFile); } } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/airgap/IoTDBSchemaRegionAirGapSink.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/airgap/IoTDBSchemaRegionAirGapSink.java index a67654ea9d8c5..8f93777d79605 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/airgap/IoTDBSchemaRegionAirGapSink.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/airgap/IoTDBSchemaRegionAirGapSink.java @@ -83,8 +83,10 @@ public void transfer(final Event event) throws Exception { throw new PipeConnectionException( String.format( - "Network error when transfer event %s, because %s.", - ((EnrichedEvent) event).coreReportMessage(), e.getMessage()), + DataNodePipeMessages + .PIPE_EXCEPTION_NETWORK_ERROR_WHEN_TRANSFER_EVENT_S_BECAUSE_S_60A63AD7, + ((EnrichedEvent) event).coreReportMessage(), + e.getMessage()), e); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/iotconsensusv2/IoTConsensusV2SyncSink.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/iotconsensusv2/IoTConsensusV2SyncSink.java index 481e340a739f3..7f82ce8e9a9a0 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/iotconsensusv2/IoTConsensusV2SyncSink.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/iotconsensusv2/IoTConsensusV2SyncSink.java @@ -148,8 +148,10 @@ public void transfer(final TabletInsertionEvent tabletInsertionEvent) throws Exc } catch (final Exception e) { throw new PipeRuntimeSinkRetryTimesConfigurableException( String.format( - "Failed to transfer tablet insertion event %s, because %s.", - tabletInsertionEvent, e.getMessage()), + DataNodePipeMessages + .PIPE_EXCEPTION_FAILED_TO_TRANSFER_TABLET_INSERTION_EVENT_S_BECAUSE_S_9710318F, + tabletInsertionEvent, + e.getMessage()), Integer.MAX_VALUE); } } @@ -171,8 +173,10 @@ public void transfer(final TsFileInsertionEvent tsFileInsertionEvent) throws Exc } catch (Exception e) { throw new PipeRuntimeSinkRetryTimesConfigurableException( String.format( - "Failed to transfer tsfile insertion event %s, because %s.", - tsFileInsertionEvent, e.getMessage()), + DataNodePipeMessages + .PIPE_EXCEPTION_FAILED_TO_TRANSFER_TSFILE_INSERTION_EVENT_S_BECAUSE_S_21AD3263, + tsFileInsertionEvent, + e.getMessage()), Integer.MAX_VALUE); } } @@ -472,7 +476,10 @@ protected void transferFilePieces( } catch (Exception e) { throw new PipeRuntimeSinkRetryTimesConfigurableException( String.format( - "Network error when transfer file %s, because %s.", file, e.getMessage()), + DataNodePipeMessages + .PIPE_EXCEPTION_NETWORK_ERROR_WHEN_TRANSFER_FILE_S_BECAUSE_S_3C673B7A, + file, + e.getMessage()), Integer.MAX_VALUE); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/iotconsensusv2/payload/builder/IoTConsensusV2TransferBatchReqBuilder.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/iotconsensusv2/payload/builder/IoTConsensusV2TransferBatchReqBuilder.java index 677c77e0540f5..d8fece99a3e20 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/iotconsensusv2/payload/builder/IoTConsensusV2TransferBatchReqBuilder.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/iotconsensusv2/payload/builder/IoTConsensusV2TransferBatchReqBuilder.java @@ -118,8 +118,7 @@ protected IoTConsensusV2TransferBatchReqBuilder( if (getMaxBatchSizeInBytes() != requestMaxBatchSizeInBytes) { LOGGER.info( - "IoTConsensusV2TransferBatchReqBuilder: the max batch size is adjusted from {} to {} due to the " - + "memory restriction", + DataNodePipeMessages.IOTCONSENSUSV2TRANSFERBATCHREQBUILDER_THE_MAX_BATCH_SIZE_IS_ADJUSTED, requestMaxBatchSizeInBytes, getMaxBatchSizeInBytes()); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/legacy/IoTDBLegacyPipeSink.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/legacy/IoTDBLegacyPipeSink.java index c0a9eb6a79d65..57782e04a470e 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/legacy/IoTDBLegacyPipeSink.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/legacy/IoTDBLegacyPipeSink.java @@ -298,8 +298,8 @@ public void transfer(final TabletInsertionEvent tabletInsertionEvent) throws Exc doTransferWrapper((PipeRawTabletInsertionEvent) tabletInsertionEvent); } else { throw new NotImplementedException( - "IoTDBLegacyPipeConnector only support " - + "PipeInsertNodeInsertionEvent and PipeTabletInsertionEvent."); + DataNodePipeMessages + .IOTDBLEGACYPIPECONNECTOR_ONLY_SUPPORT_PIPEINSERTNODEINSERTIONEVENT_AND_PIPETABLE); } } @@ -322,7 +322,8 @@ public void transfer(final TsFileInsertionEvent tsFileInsertionEvent) throws Exc } catch (final TException e) { throw new PipeConnectionException( String.format( - "Network error when transfer tsFile insertion event: %s.", + DataNodePipeMessages + .PIPE_EXCEPTION_NETWORK_ERROR_WHEN_TRANSFER_TSFILE_INSERTION_EVENT_S_703A2E9E, ((PipeTsFileInsertionEvent) tsFileInsertionEvent).coreReportMessage()), e); } @@ -450,8 +451,11 @@ private void transportSingleFilePieceByPiece(final File file) throws IOException } catch (final TException e) { throw new PipeConnectionException( String.format( - "Cannot send pipe data to receiver %s:%s, because: %s.", - ipAddress, port, e.getMessage()), + DataNodePipeMessages + .PIPE_EXCEPTION_CANNOT_SEND_PIPE_DATA_TO_RECEIVER_S_S_BECAUSE_S_25143D54, + ipAddress, + port, + e.getMessage()), e); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/opcda/OpcDaServerHandle.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/opcda/OpcDaServerHandle.java index d5d62f915f2ff..76eebecbb453d 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/opcda/OpcDaServerHandle.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/opcda/OpcDaServerHandle.java @@ -183,9 +183,9 @@ static String getClsIDFromProgID(final String progID) { return clsidStr; } else { throw new PipeException( - DataNodePipeMessages.ERROR_PROGID_IS_INVALID_OR_UNREGISTERED_HRESULT - + Integer.toHexString(hr.intValue()) - + ")"); + String.format( + DataNodePipeMessages.ERROR_PROGID_INVALID_OR_UNREGISTERED_HRESULT_FMT, + Integer.toHexString(hr.intValue()))); } } @@ -244,10 +244,10 @@ private void addItem(final String itemId, final TSDataType type) { LOGGER.debug(DataNodePipeMessages.SUCCESSFULLY_ADDED_ITEM, itemId); } else { throw new PipeException( - DataNodePipeMessages.FAILED_TO_ADD_ITEM - + itemId - + ", opc error code: 0x" - + Integer.toHexString(itemError)); + String.format( + DataNodePipeMessages.FAILED_TO_ADD_ITEM_WITH_OPC_ERROR_CODE_FMT, + itemId, + Integer.toHexString(itemError))); } } finally { Ole32.INSTANCE.CoTaskMemFree(pErrors); @@ -291,12 +291,11 @@ private void writeData(final String itemId, final Variant.VARIANT value) { try { if (itemError != WinError.S_OK.intValue()) { throw new PipeException( - DataNodePipeMessages.FAILED_TO_WRITE - + itemId - + ", value: " - + value - + ", opc error code: 0x" - + Integer.toHexString(itemError)); + String.format( + DataNodePipeMessages.FAILED_TO_WRITE_WITH_VALUE_AND_OPC_ERROR_CODE_FMT, + itemId, + value, + Integer.toHexString(itemError))); } } finally { Ole32.INSTANCE.CoTaskMemFree(pErrors); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/opcua/OpcUaSink.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/opcua/OpcUaSink.java index a4daf16610ce6..9ad0d81ddbec6 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/opcua/OpcUaSink.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/opcua/OpcUaSink.java @@ -501,9 +501,8 @@ public static void transferByTablet( if (!(tabletInsertionEvent instanceof PipeInsertNodeTabletInsertionEvent) && !(tabletInsertionEvent instanceof PipeRawTabletInsertionEvent)) { logger.warn( - "This Connector only support " - + "PipeInsertNodeTabletInsertionEvent and PipeRawTabletInsertionEvent. " - + "Ignore {}.", + DataNodePipeMessages + .THIS_CONNECTOR_ONLY_SUPPORT_PIPEINSERTNODETABLETINSERTIONEVENT_AND_PIPERAWTABLET, tabletInsertionEvent); return; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/opcua/client/ClientRunner.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/opcua/client/ClientRunner.java index 2047e4fbe5919..dc68e0d2b969b 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/opcua/client/ClientRunner.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/opcua/client/ClientRunner.java @@ -117,18 +117,18 @@ public void run() { configurableUaClient.run(client); } catch (final Exception e) { throw new PipeException( - DataNodePipeMessages.ERROR_RUNNING_OPC_CLIENT - + e.getClass().getSimpleName() - + ": " - + e.getMessage(), + String.format( + DataNodePipeMessages.ERROR_RUNNING_OPC_CLIENT_FMT, + e.getClass().getSimpleName(), + e.getMessage()), e); } } catch (final Exception e) { throw new PipeException( - DataNodePipeMessages.ERROR_GETTING_OPC_CLIENT - + e.getClass().getSimpleName() - + ": " - + e.getMessage(), + String.format( + DataNodePipeMessages.ERROR_GETTING_OPC_CLIENT_FMT, + e.getClass().getSimpleName(), + e.getMessage()), e); } } @@ -161,8 +161,13 @@ private void checkEquals(final String attrName, Object thisAttr, Object thatAttr } throw new PipeException( String.format( - "The existing server with nodeUrl %s's %s %s conflicts to the new %s %s, reject reusing.", - configurableUaClient.getNodeUrl(), attrName, thisAttr, attrName, thatAttr)); + DataNodePipeMessages + .PIPE_EXCEPTION_THE_EXISTING_SERVER_WITH_NODEURL_S_S_S_S_CONFLICTS_TO_THE_1C06A4F6, + configurableUaClient.getNodeUrl(), + attrName, + thisAttr, + attrName, + thatAttr)); } } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/opcua/server/OpcUaKeyStoreLoader.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/opcua/server/OpcUaKeyStoreLoader.java index 5fd6e5501cabf..26fa208443091 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/opcua/server/OpcUaKeyStoreLoader.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/opcua/server/OpcUaKeyStoreLoader.java @@ -121,8 +121,12 @@ OpcUaKeyStoreLoader load(final Path baseDir, final char[] password) throws Excep serverKeyPair = new KeyPair(serverPublicKey, (PrivateKey) serverPrivateKey); } else { throw new Exception( - "Invalid keyStore, the serverPrivateKey is " - + (serverPrivateKey != null ? serverPrivateKey.getClass().getSimpleName() : "null")); + String.format( + DataNodePipeMessages + .PIPE_EXCEPTION_INVALID_KEYSTORE_THE_SERVERPRIVATEKEY_IS_S_F5F3C02F, + (serverPrivateKey != null + ? serverPrivateKey.getClass().getSimpleName() + : DataNodePipeMessages.NULL_VALUE))); } return this; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/opcua/server/OpcUaNameSpace.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/opcua/server/OpcUaNameSpace.java index 58df22a20f495..4b7bac5a1d2d9 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/opcua/server/OpcUaNameSpace.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/opcua/server/OpcUaNameSpace.java @@ -262,7 +262,8 @@ private void transferTabletRowForClientServerModel( () -> new PipeRuntimeCriticalException( String.format( - "The folder node for %s does not exist.", + DataNodePipeMessages + .PIPE_EXCEPTION_THE_FOLDER_NODE_FOR_S_DOES_NOT_EXIST_CC0776AE, Arrays.toString(segments)))); } } @@ -376,7 +377,10 @@ private UaVariableNode addNode( .orElseThrow( () -> new PipeRuntimeCriticalException( - String.format("The Node %s does not exist.", nodeId))); + String.format( + DataNodePipeMessages + .PIPE_EXCEPTION_THE_NODE_S_DOES_NOT_EXIST_52F98935, + nodeId))); } return measurementNode; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/opcua/server/OpcUaServerBuilder.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/opcua/server/OpcUaServerBuilder.java index 297805162a914..6ac50c959f5f2 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/opcua/server/OpcUaServerBuilder.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/opcua/server/OpcUaServerBuilder.java @@ -143,9 +143,9 @@ public OpcUaServer build() throws Exception { final File pkiDir = securityDir.resolve("pki").toFile(); LoggerFactory.getLogger(OpcUaServerBuilder.class) - .info("Security dir: {}", securityDir.toAbsolutePath()); + .info(DataNodePipeMessages.OPC_UA_SECURITY_DIR, securityDir.toAbsolutePath()); LoggerFactory.getLogger(OpcUaServerBuilder.class) - .info("Security pki dir: {}", pkiDir.getAbsolutePath()); + .info(DataNodePipeMessages.OPC_UA_SECURITY_PKI_DIR, pkiDir.getAbsolutePath()); final OpcUaKeyStoreLoader loader = new OpcUaKeyStoreLoader().load(securityDir, password.toCharArray()); @@ -187,7 +187,8 @@ public OpcUaServer build() throws Exception { .orElseThrow( () -> new UaRuntimeException( - StatusCodes.Bad_ConfigurationError, "No certificate found")); + StatusCodes.Bad_ConfigurationError, + DataNodePipeMessages.NO_CERTIFICATE_FOUND)); final String applicationUri = CertificateUtil.getSanUri(certificate) @@ -195,7 +196,7 @@ public OpcUaServer build() throws Exception { () -> new UaRuntimeException( StatusCodes.Bad_ConfigurationError, - "Certificate is missing the application URI")); + DataNodePipeMessages.CERTIFICATE_MISSING_APPLICATION_URI)); final Set endpointConfigurations = createEndpointConfigurations(certificate, tcpBindPort, httpsBindPort); @@ -346,8 +347,14 @@ private void checkEquals(final String attrName, Object thisAttr, Object thatAttr } throw new PipeException( String.format( - "The existing server with tcp port %s and https port %s's %s %s conflicts to the new %s %s, reject reusing.", - tcpBindPort, httpsBindPort, attrName, thisAttr, attrName, thatAttr)); + DataNodePipeMessages + .PIPE_EXCEPTION_THE_EXISTING_SERVER_WITH_TCP_PORT_S_AND_HTTPS_PORT_S_S_S_08C076F7, + tcpBindPort, + httpsBindPort, + attrName, + thisAttr, + attrName, + thatAttr)); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/thrift/async/IoTDBDataRegionAsyncSink.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/thrift/async/IoTDBDataRegionAsyncSink.java index b8b169b1f6abe..212f11719a7b5 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/thrift/async/IoTDBDataRegionAsyncSink.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/thrift/async/IoTDBDataRegionAsyncSink.java @@ -219,8 +219,8 @@ public void transfer(final TabletInsertionEvent tabletInsertionEvent) throws Exc if (!(tabletInsertionEvent instanceof PipeInsertNodeTabletInsertionEvent) && !(tabletInsertionEvent instanceof PipeRawTabletInsertionEvent)) { LOGGER.warn( - "IoTDBThriftAsyncConnector only support PipeInsertNodeTabletInsertionEvent and PipeRawTabletInsertionEvent. " - + "Current event: {}.", + DataNodePipeMessages + .IOTDBTHRIFTASYNCCONNECTOR_ONLY_SUPPORT_PIPEINSERTNODETABLETINSERTIONEVENT_AND_PI, tabletInsertionEvent); return; } @@ -610,10 +610,7 @@ private void transferQueuedEventsIfNecessary(final boolean forced) { retryEventQueueEventCounter.decreaseEventCount(polledEvent); if (polledEvent != peekedEvent) { LOGGER.error( - "The event polled from the queue is not the same as the event peeked from the queue. " - + "Peeked event: {}, polled event: {}.", - peekedEvent, - polledEvent); + DataNodePipeMessages.THE_EVENT_POLLED_FROM_THE_QUEUE_IS, peekedEvent, polledEvent); } if (polledEvent != null && LOGGER.isDebugEnabled()) { LOGGER.debug(DataNodePipeMessages.POLLED_EVENT_FROM_RETRY_QUEUE, polledEvent); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/thrift/async/handler/PipeTransferTrackableHandler.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/thrift/async/handler/PipeTransferTrackableHandler.java index d543e736743ff..4232278fb192c 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/thrift/async/handler/PipeTransferTrackableHandler.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/thrift/async/handler/PipeTransferTrackableHandler.java @@ -207,7 +207,8 @@ public void onComplete(final TPipeTransferResp response) { shouldReturnSelf, new PipeConnectionException( String.format( - "Failed to transfer slice. Origin req: %s-%s, slice index: %d, slice count: %d. Reason: %s", + DataNodePipeMessages + .PIPE_EXCEPTION_FAILED_TO_TRANSFER_SLICE_ORIGIN_REQ_S_S_SLICE_INDEX_D_SLICE_44E1CF32, originalReq.getVersion(), originalReq.getType(), sliceIndex, diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/thrift/async/handler/PipeTransferTsFileHandler.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/thrift/async/handler/PipeTransferTsFileHandler.java index 3fa5e557a208e..6e6f374a9ae98 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/thrift/async/handler/PipeTransferTsFileHandler.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/thrift/async/handler/PipeTransferTsFileHandler.java @@ -520,7 +520,9 @@ private void waitForResourceEnough4Slicing(final long timeoutMs) throws Interrup if (waitTimeSeconds * 1000 > timeoutMs) { // should contain 'TimeoutException' in exception message throw new PipeException( - String.format("TimeoutException: Waited %s seconds", waitTimeSeconds)); + String.format( + DataNodePipeMessages.PIPE_EXCEPTION_TIMEOUTEXCEPTION_WAITED_S_SECONDS_8B31A3A5, + waitTimeSeconds)); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/thrift/sync/IoTDBDataRegionSyncSink.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/thrift/sync/IoTDBDataRegionSyncSink.java index eb7d39864c433..72703aa57f24d 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/thrift/sync/IoTDBDataRegionSyncSink.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/thrift/sync/IoTDBDataRegionSyncSink.java @@ -134,9 +134,8 @@ public void transfer(final TabletInsertionEvent tabletInsertionEvent) throws Exc if (!(tabletInsertionEvent instanceof PipeInsertNodeTabletInsertionEvent) && !(tabletInsertionEvent instanceof PipeRawTabletInsertionEvent)) { LOGGER.warn( - "IoTDBThriftSyncConnector only support " - + "PipeInsertNodeTabletInsertionEvent and PipeRawTabletInsertionEvent. " - + "Ignore {}.", + DataNodePipeMessages + .IOTDBTHRIFTSYNCCONNECTOR_ONLY_SUPPORT_PIPEINSERTNODETABLETINSERTIONEVENT_AND_PIP, tabletInsertionEvent); return; } @@ -155,8 +154,10 @@ public void transfer(final TabletInsertionEvent tabletInsertionEvent) throws Exc } catch (final Exception e) { throw new PipeConnectionException( String.format( - "Failed to transfer tablet insertion event %s, because %s.", - ((EnrichedEvent) tabletInsertionEvent).coreReportMessage(), e.getMessage()), + DataNodePipeMessages + .PIPE_EXCEPTION_FAILED_TO_TRANSFER_TABLET_INSERTION_EVENT_S_BECAUSE_S_9710318F, + ((EnrichedEvent) tabletInsertionEvent).coreReportMessage(), + e.getMessage()), e); } } @@ -182,7 +183,8 @@ public void transfer(final TsFileInsertionEvent tsFileInsertionEvent) throws Exc } catch (final Exception e) { throw new PipeConnectionException( String.format( - "Failed to transfer tsfile insertion event %s, because %s.", + DataNodePipeMessages + .PIPE_EXCEPTION_FAILED_TO_TRANSFER_TSFILE_INSERTION_EVENT_S_BECAUSE_S_21AD3263, ((PipeTsFileInsertionEvent) tsFileInsertionEvent).coreReportMessage(), e.getMessage()), e); @@ -242,8 +244,10 @@ private void doTransfer(final PipeDeleteDataNodeEvent pipeDeleteDataNodeEvent) clientAndStatus.setRight(false); throw new PipeConnectionException( String.format( - "Network error when transfer deletion %s, because %s.", - pipeDeleteDataNodeEvent.getDeleteDataNode().getType(), e.getMessage()), + DataNodePipeMessages + .PIPE_EXCEPTION_NETWORK_ERROR_WHEN_TRANSFER_DELETION_S_BECAUSE_S_3B250B4B, + pipeDeleteDataNodeEvent.getDeleteDataNode().getType(), + e.getMessage()), e); } @@ -314,7 +318,10 @@ private void doTransfer( } catch (final Exception e) { clientAndStatus.setRight(false); throw new PipeConnectionException( - String.format("Network error when transfer tablet batch, because %s.", e.getMessage()), + String.format( + DataNodePipeMessages + .PIPE_EXCEPTION_NETWORK_ERROR_WHEN_TRANSFER_TABLET_BATCH_BECAUSE_S_6BEC52E7, + e.getMessage()), e); } @@ -401,7 +408,8 @@ private void doTransfer( } throw new PipeConnectionException( String.format( - "Network error when transfer insert node tablet insertion event, because %s.", + DataNodePipeMessages + .PIPE_EXCEPTION_NETWORK_ERROR_WHEN_TRANSFER_INSERT_NODE_TABLET_INSERTION_D993C7AB, e.getMessage()), e); } @@ -464,7 +472,8 @@ private void doTransfer(final PipeRawTabletInsertionEvent pipeRawTabletInsertion clientAndStatus.setRight(false); throw new PipeConnectionException( String.format( - "Network error when transfer raw tablet insertion event, because %s.", + DataNodePipeMessages + .PIPE_EXCEPTION_NETWORK_ERROR_WHEN_TRANSFER_RAW_TABLET_INSERTION_EVENT_BECAUSE_D8ACEC3C, e.getMessage()), e); } @@ -549,7 +558,11 @@ private void doTransfer( clientAndStatus.setRight(false); clientManager.adjustTimeoutIfNecessary(e); throw new PipeConnectionException( - String.format("Network error when seal file %s, because %s.", tsFile, e.getMessage()), + String.format( + DataNodePipeMessages + .PIPE_EXCEPTION_NETWORK_ERROR_WHEN_SEAL_FILE_S_BECAUSE_S_DC87F263, + tsFile, + e.getMessage()), e); } } else { @@ -575,7 +588,11 @@ private void doTransfer( clientAndStatus.setRight(false); clientManager.adjustTimeoutIfNecessary(e); throw new PipeConnectionException( - String.format("Network error when seal file %s, because %s.", tsFile, e.getMessage()), + String.format( + DataNodePipeMessages + .PIPE_EXCEPTION_NETWORK_ERROR_WHEN_SEAL_FILE_S_BECAUSE_S_DC87F263, + tsFile, + e.getMessage()), e); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/thrift/sync/IoTDBSchemaRegionSink.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/thrift/sync/IoTDBSchemaRegionSink.java index aa84702e6f104..62db61651454f 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/thrift/sync/IoTDBSchemaRegionSink.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/thrift/sync/IoTDBSchemaRegionSink.java @@ -116,8 +116,10 @@ private void doTransfer(final PipeSchemaRegionWritePlanEvent pipeSchemaRegionWri clientAndStatus.setRight(false); throw new PipeConnectionException( String.format( - "Network error when transfer schema region write plan %s, because %s.", - pipeSchemaRegionWritePlanEvent.getPlanNode().getType(), e.getMessage()), + DataNodePipeMessages + .PIPE_EXCEPTION_NETWORK_ERROR_WHEN_TRANSFER_SCHEMA_REGION_WRITE_PLAN_S_BECAUSE_AEB210C7, + pipeSchemaRegionWritePlanEvent.getPlanNode().getType(), + e.getMessage()), e); } @@ -212,8 +214,12 @@ private void doTransfer(final PipeSchemaRegionSnapshotEvent snapshotEvent) clientAndStatus.setRight(false); throw new PipeConnectionException( String.format( - "Network error when seal snapshot file %s, %s and %s, because %s.", - mTreeSnapshotFile, tagLogSnapshotFile, attributeSnapshotFile, e.getMessage()), + DataNodePipeMessages + .PIPE_EXCEPTION_NETWORK_ERROR_WHEN_SEAL_SNAPSHOT_FILE_S_S_AND_S_BECAUSE_5EF373E6, + mTreeSnapshotFile, + tagLogSnapshotFile, + attributeSnapshotFile, + e.getMessage()), e); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/websocket/WebSocketSink.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/websocket/WebSocketSink.java index 06eab035b4e15..17c375614cbbb 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/websocket/WebSocketSink.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/websocket/WebSocketSink.java @@ -67,9 +67,10 @@ public void validate(PipeParameterValidator validator) throws Exception { if (server.getPort() != port) { throw new PipeException( String.format( - "The websocket server has already been created with port = %d. " - + "Please set the option cdc.port = %d.", - server.getPort(), server.getPort())); + DataNodePipeMessages + .PIPE_EXCEPTION_THE_WEBSOCKET_SERVER_HAS_ALREADY_BEEN_CREATED_WITH_PORT_FFC420AE, + server.getPort(), + server.getPort())); } } @@ -103,8 +104,8 @@ public void transfer(final TabletInsertionEvent tabletInsertionEvent) { if (!(tabletInsertionEvent instanceof PipeInsertNodeTabletInsertionEvent) && !(tabletInsertionEvent instanceof PipeRawTabletInsertionEvent)) { LOGGER.warn( - "WebsocketConnector only support PipeInsertNodeTabletInsertionEvent and PipeRawTabletInsertionEvent. " - + "Current event: {}.", + DataNodePipeMessages + .WEBSOCKETCONNECTOR_ONLY_SUPPORT_PIPEINSERTNODETABLETINSERTIONEVENT_AND_PIPERAWTA, tabletInsertionEvent); return; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/writeback/WriteBackSink.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/writeback/WriteBackSink.java index 9bec114ede1c0..a5fa8e4bb1a96 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/writeback/WriteBackSink.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/writeback/WriteBackSink.java @@ -184,7 +184,10 @@ public void customize( skipIfNoPrivileges = skipIfOptionSet.remove(CONNECTOR_IOTDB_SKIP_IF_NO_PRIVILEGES); if (!skipIfOptionSet.isEmpty()) { throw new PipeParameterNotValidException( - String.format("Parameters in set %s are not allowed in 'skipif'", skipIfOptionSet)); + String.format( + DataNodePipeMessages + .PIPE_EXCEPTION_PARAMETERS_IN_SET_S_ARE_NOT_ALLOWED_IN_SKIPIF_AAF177AD, + skipIfOptionSet)); } useEventUserName = @@ -211,7 +214,9 @@ public void customize( .getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()) { throw new PipePasswordCheckException( - String.format("Failed to check password for pipe %s.", environment.getPipeName())); + String.format( + DataNodePipeMessages.PIPE_EXCEPTION_FAILED_TO_CHECK_PASSWORD_FOR_PIPE_S_0B1A5C73, + environment.getPipeName())); } } @@ -231,9 +236,8 @@ public void transfer(final TabletInsertionEvent tabletInsertionEvent) throws Exc if (!(tabletInsertionEvent instanceof PipeInsertNodeTabletInsertionEvent) && !(tabletInsertionEvent instanceof PipeRawTabletInsertionEvent)) { LOGGER.warn( - "WriteBackSink only support " - + "PipeInsertNodeTabletInsertionEvent and PipeRawTabletInsertionEvent. " - + "Ignore {}.", + DataNodePipeMessages + .WRITEBACKSINK_ONLY_SUPPORT_PIPEINSERTNODETABLETINSERTIONEVENT_AND_PIPERAWTABLETI, tabletInsertionEvent); return; } @@ -493,8 +497,10 @@ private void autoCreateDatabaseIfNecessary(final String database) { && statusCode != TSStatusCode.DATABASE_ALREADY_EXISTS.getStatusCode()) { throw new PipeException( String.format( - "Auto create database failed: %s, status code: %s", - database, result.getStatusCode())); + DataNodePipeMessages + .PIPE_EXCEPTION_AUTO_CREATE_DATABASE_FAILED_S_STATUS_CODE_S_D8EB60FA, + database, + result.getStatusCode())); } } catch (final ExecutionException | InterruptedException e) { if (e instanceof InterruptedException) { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/util/TabletStatementConverter.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/util/TabletStatementConverter.java index 773d40e99d1f7..73215ccf96f36 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/util/TabletStatementConverter.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/util/TabletStatementConverter.java @@ -23,6 +23,7 @@ import org.apache.iotdb.commons.path.PartialPath; import org.apache.iotdb.commons.schema.table.column.TsTableColumnCategory; import org.apache.iotdb.commons.utils.PathUtils; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; import org.apache.iotdb.db.pipe.event.common.tablet.PipeTabletUtils.TabletStringInternPool; import org.apache.iotdb.db.pipe.resource.memory.InsertNodeMemoryEstimator; import org.apache.iotdb.db.queryengine.plan.analyze.cache.schema.DataNodeDevicePathCache; @@ -503,7 +504,10 @@ private static Pair readValuesFromBufferWithMemory( break; default: throw new UnSupportedDataTypeException( - String.format("data type %s is not supported when convert data at client", types[i])); + String.format( + DataNodePipeMessages + .PIPE_EXCEPTION_DATA_TYPE_S_IS_NOT_SUPPORTED_WHEN_CONVERT_DATA_AT_CLIENT_405429CC, + types[i])); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/util/builder/PipeTsFileBuilder.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/util/builder/PipeTsFileBuilder.java index f84c1fe63f17a..c34f1fa96b4a3 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/util/builder/PipeTsFileBuilder.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/util/builder/PipeTsFileBuilder.java @@ -65,7 +65,9 @@ public PipeTsFileBuilder(final AtomicLong currentBatchId, final AtomicLong tsFil this.batchFileBaseDir = getNextBaseDir(); } catch (final Exception e) { throw new PipeException( - String.format("Failed to create file dir for batch: %s", e.getMessage())); + String.format( + DataNodePipeMessages.PIPE_EXCEPTION_FAILED_TO_CREATE_FILE_DIR_FOR_BATCH_S_8FCD9125, + e.getMessage())); } } @@ -107,7 +109,10 @@ private File getNextBaseDir() throws DiskSpaceInsufficientException { return baseDir; } throw new PipeException( - String.format("Failed to create batch file dir. (Batch id = %s)", currentBatchId.get())); + String.format( + DataNodePipeMessages + .PIPE_EXCEPTION_FAILED_TO_CREATE_BATCH_FILE_DIR_BATCH_ID_S_EA8BE86C, + currentBatchId.get())); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/util/sorter/PipeInsertEventSorter.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/util/sorter/PipeInsertEventSorter.java index 55c7a3ea788c3..db81b83a7d61a 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/util/sorter/PipeInsertEventSorter.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/util/sorter/PipeInsertEventSorter.java @@ -19,6 +19,7 @@ package org.apache.iotdb.db.pipe.sink.util.sorter; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; import org.apache.iotdb.db.pipe.event.common.tablet.PipeTabletUtils; import org.apache.iotdb.db.queryengine.plan.statement.crud.InsertTabletStatement; @@ -197,7 +198,9 @@ protected Object reorderValueListAndBitMap( return deDuplicatedBinaryValues; default: throw new UnSupportedDataTypeException( - String.format("Data type %s is not supported.", dataType)); + String.format( + DataNodePipeMessages.PIPE_EXCEPTION_DATA_TYPE_S_IS_NOT_SUPPORTED_5D5C02E4, + dataType)); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/source/dataregion/IoTDBDataRegionSource.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/source/dataregion/IoTDBDataRegionSource.java index 813d55e4ef508..cbbc68f8d3e16 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/source/dataregion/IoTDBDataRegionSource.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/source/dataregion/IoTDBDataRegionSource.java @@ -320,7 +320,8 @@ private void validatePattern(final TreePattern treePattern) { && (((IoTDBTreePatternOperations) treePattern).isPrefixOrFullPath()))) { throw new IllegalArgumentException( String.format( - "The path pattern %s is not valid for the source. Only prefix or full path is allowed.", + DataNodePipeMessages + .PIPE_EXCEPTION_THE_PATH_PATTERN_S_IS_NOT_VALID_FOR_THE_SOURCE_ONLY_PREFIX_139F93D6, treePattern)); } } @@ -573,7 +574,9 @@ protected void login(final @Nonnull String password) { .getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()) { throw new PipePasswordCheckException( - String.format("Failed to check password for pipe %s.", pipeName)); + String.format( + DataNodePipeMessages.PIPE_EXCEPTION_FAILED_TO_CHECK_PASSWORD_FOR_PIPE_S_0B1A5C73, + pipeName)); } } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/source/dataregion/historical/PipeHistoricalDataRegionTsFileAndDeletionSource.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/source/dataregion/historical/PipeHistoricalDataRegionTsFileAndDeletionSource.java index e71d80a61a6bc..8265229cc3356 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/source/dataregion/historical/PipeHistoricalDataRegionTsFileAndDeletionSource.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/source/dataregion/historical/PipeHistoricalDataRegionTsFileAndDeletionSource.java @@ -213,7 +213,8 @@ public void validate(final PipeParameterValidator validator) { if (!sloppyOptionSet.isEmpty()) { throw new PipeParameterNotValidException( String.format( - "Parameters in set %s are not allowed in 'history.loose-range'", + DataNodePipeMessages + .PIPE_EXCEPTION_PARAMETERS_IN_SET_S_ARE_NOT_ALLOWED_IN_HISTORY_LOOSE_RANGE_0F685D5C, sloppyOptionSet)); } } @@ -240,7 +241,8 @@ public void validate(final PipeParameterValidator validator) { if (historicalDataExtractionStartTime > historicalDataExtractionEndTime) { throw new PipeParameterNotValidException( String.format( - "%s (%s) [%s] should be less than or equal to %s (%s) [%s].", + DataNodePipeMessages + .PIPE_EXCEPTION_S_S_S_SHOULD_BE_LESS_THAN_OR_EQUAL_TO_S_S_S_0B9726E1, SOURCE_START_TIME_KEY, EXTRACTOR_START_TIME_KEY, historicalDataExtractionStartTime, @@ -289,7 +291,8 @@ public void validate(final PipeParameterValidator validator) { if (historicalDataExtractionStartTime > historicalDataExtractionEndTime) { throw new PipeParameterNotValidException( String.format( - "%s (%s) [%s] should be less than or equal to %s (%s) [%s].", + DataNodePipeMessages + .PIPE_EXCEPTION_S_S_S_SHOULD_BE_LESS_THAN_OR_EQUAL_TO_S_S_S_0B9726E1, EXTRACTOR_HISTORY_START_TIME_KEY, SOURCE_HISTORY_START_TIME_KEY, historicalDataExtractionStartTime, @@ -567,8 +570,7 @@ private void extractTsFiles( final int originalSequenceTsFileCount = tsFileManager.size(true); final int originalUnSequenceTsFileCount = tsFileManager.size(false); LOGGER.info( - "Pipe {}@{}: start to extract historical TsFile, original sequence file count {}, " - + "original unSequence file count {}, start progress index {}", + DataNodePipeMessages.PIPE_START_TO_EXTRACT_HISTORICAL_TSFILE_ORIGINAL, pipeName, dataRegionId, originalSequenceTsFileCount, @@ -662,8 +664,7 @@ && mayTsFileResourceOverlappedWithPattern(resource))) extractedHistoricalTsFileCount = filteredTsFileResources2TableNames.size(); LOGGER.info( - "Pipe {}@{}: finish to extract historical TsFile, extracted sequence file count {}/{}, " - + "extracted unsequence file count {}/{}, extracted file count {}/{}, took {} ms", + DataNodePipeMessages.PIPE_FINISH_TO_EXTRACT_HISTORICAL_TSFILE_EXTRACTED, pipeName, dataRegionId, sequenceTsFileResources2TableNames.size(), @@ -857,7 +858,8 @@ private Event supplyTerminateEvent() { PipeTerminateEvent.snapshotHistoricalTransferSummary(pipeName, creationTime, dataRegionId); if (Objects.nonNull(historicalTransferSummary)) { LOGGER.info( - "Pipe {}@{}: historical source has supplied all events, emitting terminate event. {}", + DataNodePipeMessages + .PIPE_LOG_PIPE_HISTORICAL_SOURCE_HAS_SUPPLIED_ALL_EVENTS_EMITTING_8B58DE19, pipeName, dataRegionId, historicalTransferSummary.toReportMessage()); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/source/dataregion/realtime/PipeRealtimeDataRegionHybridSource.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/source/dataregion/realtime/PipeRealtimeDataRegionHybridSource.java index c219acbc69743..9179d07172967 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/source/dataregion/realtime/PipeRealtimeDataRegionHybridSource.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/source/dataregion/realtime/PipeRealtimeDataRegionHybridSource.java @@ -63,8 +63,10 @@ protected void doExtract(final PipeRealtimeEvent event) { } else { throw new UnsupportedOperationException( String.format( - "Unsupported event type %s for hybrid realtime extractor %s", - eventToExtract.getClass(), this)); + DataNodePipeMessages + .PIPE_EXCEPTION_UNSUPPORTED_EVENT_TYPE_S_FOR_HYBRID_REALTIME_EXTRACTOR_S_9C4F4C82, + eventToExtract.getClass(), + this)); } } @@ -123,8 +125,10 @@ private void extractTabletInsertion(final PipeRealtimeEvent event) { default: throw new UnsupportedOperationException( String.format( - "Unsupported state %s for hybrid realtime extractor %s", - state, PipeRealtimeDataRegionHybridSource.class.getName())); + DataNodePipeMessages + .PIPE_EXCEPTION_UNSUPPORTED_STATE_S_FOR_HYBRID_REALTIME_EXTRACTOR_S_43BD62C2, + state, + PipeRealtimeDataRegionHybridSource.class.getName())); } } @@ -170,8 +174,10 @@ private void extractTsFileInsertion(final PipeRealtimeEvent event) { default: throw new UnsupportedOperationException( String.format( - "Unsupported state %s for hybrid realtime extractor %s", - state, PipeRealtimeDataRegionHybridSource.class.getName())); + DataNodePipeMessages + .PIPE_EXCEPTION_UNSUPPORTED_STATE_S_FOR_HYBRID_REALTIME_EXTRACTOR_S_43BD62C2, + state, + PipeRealtimeDataRegionHybridSource.class.getName())); } } @@ -234,8 +240,10 @@ public Event supply() { } else { throw new UnsupportedOperationException( String.format( - "Unsupported event type %s for hybrid realtime extractor %s to supply.", - eventToSupply.getClass(), this)); + DataNodePipeMessages + .PIPE_EXCEPTION_UNSUPPORTED_EVENT_TYPE_S_FOR_HYBRID_REALTIME_EXTRACTOR_S_474BAAC2, + eventToSupply.getClass(), + this)); } realtimeEvent.decreaseReferenceCount( @@ -262,10 +270,7 @@ private Event supplyTabletInsertion(final PipeRealtimeEvent event) { // this event is not reliable anymore. but the data represented by this event // has been carried by the following tsfile event, so we can just discard this event. event.getTsFileEpoch().migrateState(this, s -> TsFileEpoch.State.USING_BOTH); - LOGGER.warn( - "Discard tablet event {} because it is not reliable anymore. " - + "Change the state of TsFileEpoch to USING_BOTH.", - event); + LOGGER.warn(DataNodePipeMessages.DISCARD_TABLET_EVENT_BECAUSE_IT_IS_NOT, event); return null; } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/source/dataregion/realtime/PipeRealtimeDataRegionLogSource.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/source/dataregion/realtime/PipeRealtimeDataRegionLogSource.java index 2835da02d8372..a90441bae2b10 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/source/dataregion/realtime/PipeRealtimeDataRegionLogSource.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/source/dataregion/realtime/PipeRealtimeDataRegionLogSource.java @@ -56,8 +56,10 @@ protected void doExtract(final PipeRealtimeEvent event) { } else { throw new UnsupportedOperationException( String.format( - "Unsupported event type %s for log realtime extractor %s", - eventToExtract.getClass(), this)); + DataNodePipeMessages + .PIPE_EXCEPTION_UNSUPPORTED_EVENT_TYPE_S_FOR_LOG_REALTIME_EXTRACTOR_S_961C5D2D, + eventToExtract.getClass(), + this)); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/source/dataregion/realtime/PipeRealtimeDataRegionSource.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/source/dataregion/realtime/PipeRealtimeDataRegionSource.java index b13b204001651..62136877fc1b0 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/source/dataregion/realtime/PipeRealtimeDataRegionSource.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/source/dataregion/realtime/PipeRealtimeDataRegionSource.java @@ -166,7 +166,8 @@ public void validate(final PipeParameterValidator validator) throws Exception { if (realtimeDataExtractionStartTime > realtimeDataExtractionEndTime) { throw new PipeParameterNotValidException( String.format( - "%s (%s) [%s] should be less than or equal to %s (%s) [%s].", + DataNodePipeMessages + .PIPE_EXCEPTION_S_S_S_SHOULD_BE_LESS_THAN_OR_EQUAL_TO_S_S_S_0B9726E1, SOURCE_START_TIME_KEY, EXTRACTOR_START_TIME_KEY, realtimeDataExtractionStartTime, @@ -203,7 +204,9 @@ public void validate(final PipeParameterValidator validator) throws Exception { if (!sloppyOptionSet.isEmpty()) { throw new PipeParameterNotValidException( String.format( - "Parameters in set %s are not allowed in 'realtime.loose-range'", sloppyOptionSet)); + DataNodePipeMessages + .PIPE_EXCEPTION_PARAMETERS_IN_SET_S_ARE_NOT_ALLOWED_IN_REALTIME_LOOSE_RANGE_BACD2475, + sloppyOptionSet)); } } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/source/dataregion/realtime/assigner/PipeDataRegionAssigner.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/source/dataregion/realtime/assigner/PipeDataRegionAssigner.java index 90466ba3389d7..6e40be3d324bb 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/source/dataregion/realtime/assigner/PipeDataRegionAssigner.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/source/dataregion/realtime/assigner/PipeDataRegionAssigner.java @@ -299,7 +299,8 @@ public synchronized void close() { } catch (final InterruptedException e) { interrupted = true; LOGGER.warn( - "Interrupted while waiting for in-flight publishes to finish when closing assigner on data region {}.", + DataNodePipeMessages + .PIPE_LOG_INTERRUPTED_WHILE_WAITING_FOR_IN_FLIGHT_PUBLISHES_TO_FINISH_C8E3757B, dataRegionId); } } @@ -331,7 +332,8 @@ public int getPipeHeartbeatEventCount() { private void logSourceAssignmentChange( final String action, final PipeRealtimeDataRegionSource source) { LOGGER.info( - "Pipe {}@{} {} realtime source on data region {} (listenToTsFile={}, listenToInsertNode={}, registeredSourceCount={}, tsFileSourceCount={}, insertNodeSourceCount={}).", + DataNodePipeMessages + .PIPE_LOG_PIPE_REALTIME_SOURCE_ON_DATA_REGION_LISTENTOTSFILE_LISTENTOINSERTNODE_A02E1552, source.getPipeName(), source.getCreationTime(), action, diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/source/schemaregion/IoTDBSchemaRegionSource.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/source/schemaregion/IoTDBSchemaRegionSource.java index 783be38cdbdab..ecb27f1b26646 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/source/schemaregion/IoTDBSchemaRegionSource.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/source/schemaregion/IoTDBSchemaRegionSource.java @@ -171,7 +171,9 @@ protected void login(final @Nonnull String password) { .getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()) { throw new PipePasswordCheckException( - String.format("Failed to check password for pipe %s.", pipeName)); + String.format( + DataNodePipeMessages.PIPE_EXCEPTION_FAILED_TO_CHECK_PASSWORD_FOR_PIPE_S_0B1A5C73, + pipeName)); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/source/schemaregion/PipeTableStatementToPlanVisitor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/source/schemaregion/PipeTableStatementToPlanVisitor.java index 86ad46268afe3..bda2c684a2a66 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/source/schemaregion/PipeTableStatementToPlanVisitor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/source/schemaregion/PipeTableStatementToPlanVisitor.java @@ -22,6 +22,7 @@ import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.PlanNode; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.PlanNodeId; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Node; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; import org.apache.iotdb.db.queryengine.plan.relational.planner.node.schema.CreateOrUpdateTableDeviceNode; import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.AstVisitor; import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.CreateOrUpdateDevice; @@ -31,7 +32,8 @@ public class PipeTableStatementToPlanVisitor implements AstVisitor queryIds = statementIdToQueryId.get(statementId); if (queryIds == null) { throw new IllegalStateException( - "StatementId: " + statementId + " doesn't exist in this session " + this); + String.format( + DataNodeMiscMessages + .MISC_EXCEPTION_STATEMENTID_S_DOESN_T_EXIST_IN_THIS_SESSION_S_4AA25E49, + statementId, + this)); } queryIds.add(queryId); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/session/IClientSession.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/session/IClientSession.java index 51e12379cd4e2..bac4b15e342dd 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/session/IClientSession.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/session/IClientSession.java @@ -25,6 +25,7 @@ import org.apache.iotdb.commons.queryengine.common.SqlDialect; import org.apache.iotdb.commons.utils.CommonDateTimeUtils; import org.apache.iotdb.commons.utils.PathUtils; +import org.apache.iotdb.db.i18n.DataNodeMiscMessages; import org.apache.iotdb.rpc.subscription.annotation.TableModel; import org.apache.iotdb.service.rpc.thrift.TSConnectionInfo; import org.apache.iotdb.service.rpc.thrift.TSConnectionType; @@ -193,9 +194,7 @@ public void setDatabaseName(@Nullable String databaseName) { this.databaseName = databaseName; if (Objects.nonNull(databaseName) && !PathUtils.isTableModelDatabase(databaseName)) { throw new SemanticException( - "The database name " - + databaseName - + " is a tree model database, which is not allowed to set in the client session."); + String.format(DataNodeMiscMessages.DATABASE_NAME_IS_TREE_MODEL_DATABASE, databaseName)); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/session/InternalClientSession.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/session/InternalClientSession.java index d6cdfa63a323c..460ec9319f2dc 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/session/InternalClientSession.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/session/InternalClientSession.java @@ -19,6 +19,7 @@ package org.apache.iotdb.db.protocol.session; +import org.apache.iotdb.db.i18n.DataNodeMiscMessages; import org.apache.iotdb.service.rpc.thrift.TSConnectionType; import java.util.Collections; @@ -80,7 +81,11 @@ public void addQueryId(Long statementId, long queryId) { Set queryIds = statementIdToQueryId.get(statementId); if (queryIds == null) { throw new IllegalStateException( - "StatementId: " + statementId + "doesn't exist in this session " + this); + String.format( + DataNodeMiscMessages + .MISC_EXCEPTION_STATEMENTID_SDOESN_T_EXIST_IN_THIS_SESSION_S_BD5B4733, + statementId, + this)); } queryIds.add(queryId); } @@ -93,19 +98,22 @@ public void removeQueryId(Long statementId, Long queryId) { @Override public void addPreparedStatement(String statementName, PreparedStatementInfo info) { throw new UnsupportedOperationException( - "InternalClientSession should never call PREPARE statement methods."); + DataNodeMiscMessages + .MISC_EXCEPTION_INTERNALCLIENTSESSION_SHOULD_NEVER_CALL_PREPARE_STATEMENT_CCAB3CDC); } @Override public PreparedStatementInfo removePreparedStatement(String statementName) { throw new UnsupportedOperationException( - "InternalClientSession should never call PREPARE statement methods."); + DataNodeMiscMessages + .MISC_EXCEPTION_INTERNALCLIENTSESSION_SHOULD_NEVER_CALL_PREPARE_STATEMENT_CCAB3CDC); } @Override public PreparedStatementInfo getPreparedStatement(String statementName) { throw new UnsupportedOperationException( - "InternalClientSession should never call PREPARE statement methods."); + DataNodeMiscMessages + .MISC_EXCEPTION_INTERNALCLIENTSESSION_SHOULD_NEVER_CALL_PREPARE_STATEMENT_CCAB3CDC); } @Override diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/session/MqttClientSession.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/session/MqttClientSession.java index 85672852be2c8..65e2c9a5b5d49 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/session/MqttClientSession.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/session/MqttClientSession.java @@ -19,6 +19,7 @@ package org.apache.iotdb.db.protocol.session; +import org.apache.iotdb.db.i18n.DataNodeMiscMessages; import org.apache.iotdb.service.rpc.thrift.TSConnectionType; import java.util.Collections; @@ -84,19 +85,22 @@ public void removeQueryId(Long statementId, Long queryId) { @Override public void addPreparedStatement(String statementName, PreparedStatementInfo info) { throw new UnsupportedOperationException( - "MQTT client session does not support PREPARE statement."); + DataNodeMiscMessages + .MISC_EXCEPTION_MQTT_CLIENT_SESSION_DOES_NOT_SUPPORT_PREPARE_STATEMENT_B42FBC65); } @Override public PreparedStatementInfo removePreparedStatement(String statementName) { throw new UnsupportedOperationException( - "MQTT client session does not support PREPARE statement."); + DataNodeMiscMessages + .MISC_EXCEPTION_MQTT_CLIENT_SESSION_DOES_NOT_SUPPORT_PREPARE_STATEMENT_B42FBC65); } @Override public PreparedStatementInfo getPreparedStatement(String statementName) { throw new UnsupportedOperationException( - "MQTT client session does not support PREPARE statement."); + DataNodeMiscMessages + .MISC_EXCEPTION_MQTT_CLIENT_SESSION_DOES_NOT_SUPPORT_PREPARE_STATEMENT_B42FBC65); } @Override diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/session/PreparedStatementInfo.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/session/PreparedStatementInfo.java index 0eb544bf68e61..12217729321a3 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/session/PreparedStatementInfo.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/session/PreparedStatementInfo.java @@ -20,6 +20,7 @@ package org.apache.iotdb.db.protocol.session; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Statement; +import org.apache.iotdb.db.i18n.DataNodeMiscMessages; import java.util.Objects; @@ -37,16 +38,20 @@ public class PreparedStatementInfo { private final long memorySizeInBytes; // Memory size allocated for this PreparedStatement public PreparedStatementInfo(String statementName, Statement sql, long memorySizeInBytes) { - this.statementName = requireNonNull(statementName, "statementName is null"); - this.sql = requireNonNull(sql, "sql is null"); + this.statementName = + requireNonNull( + statementName, DataNodeMiscMessages.EXCEPTION_STATEMENTNAME_IS_NULL_C03BB8D4); + this.sql = requireNonNull(sql, DataNodeMiscMessages.EXCEPTION_SQL_IS_NULL_BEDB2B7A); this.createTime = System.currentTimeMillis(); this.memorySizeInBytes = memorySizeInBytes; } public PreparedStatementInfo( String statementName, Statement sql, long createTime, long memorySizeInBytes) { - this.statementName = requireNonNull(statementName, "statementName is null"); - this.sql = requireNonNull(sql, "sql is null"); + this.statementName = + requireNonNull( + statementName, DataNodeMiscMessages.EXCEPTION_STATEMENTNAME_IS_NULL_C03BB8D4); + this.sql = requireNonNull(sql, DataNodeMiscMessages.EXCEPTION_SQL_IS_NULL_BEDB2B7A); this.createTime = createTime; this.memorySizeInBytes = memorySizeInBytes; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/thrift/ProcessorWithMetrics.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/thrift/ProcessorWithMetrics.java index 0ebc995114372..36bebb9d9ec59 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/thrift/ProcessorWithMetrics.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/thrift/ProcessorWithMetrics.java @@ -22,6 +22,7 @@ import org.apache.iotdb.commons.service.metric.MetricService; import org.apache.iotdb.commons.service.metric.enums.Metric; import org.apache.iotdb.commons.service.metric.enums.Tag; +import org.apache.iotdb.db.i18n.DataNodeMiscMessages; import org.apache.iotdb.metrics.utils.MetricLevel; import org.apache.iotdb.service.rpc.thrift.IClientRPCService.Iface; import org.apache.iotdb.service.rpc.thrift.IClientRPCService.Processor; @@ -55,7 +56,8 @@ public void process(TProtocol in, TProtocol out) throws TException { in.readMessageEnd(); TApplicationException x = new TApplicationException( - TApplicationException.UNKNOWN_METHOD, "Invalid method name: '" + msg.name + "'"); + TApplicationException.UNKNOWN_METHOD, + String.format(DataNodeMiscMessages.INVALID_METHOD_NAME_FMT, msg.name)); out.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid)); x.write(out); out.writeMessageEnd(); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/thrift/impl/ClientRPCServiceImpl.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/thrift/impl/ClientRPCServiceImpl.java index 54ac31ce7f774..337b92d1657bd 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/thrift/impl/ClientRPCServiceImpl.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/thrift/impl/ClientRPCServiceImpl.java @@ -1043,7 +1043,10 @@ private List executeGroupByQueryInternal( int dataRegionSize = dataRegionList.size(); if (dataRegionSize != 1) { throw new IllegalArgumentException( - "dataRegionList.size() should only be 1 now, current size is " + dataRegionSize); + String.format( + DataNodeMiscMessages + .MISC_EXCEPTION_DATAREGIONLIST_SIZE_SHOULD_ONLY_BE_1_NOW_CURRENT_SIZE_IS_282E453C, + dataRegionSize)); } Filter timeFilter = TimeFilterApi.between(startTime, endTime - 1); @@ -1185,7 +1188,8 @@ public TSExecuteStatementResp executeFastLastDataQueryForOnePrefixPath( RpcUtils.getTSExecuteStatementResp( new TSStatus(TSStatusCode.SEMANTIC_ERROR.getStatusCode()) .setMessage( - "The \"executeFastLastDataQueryForOnePrefixPath\" dos not support wildcards.")); + DataNodeMiscMessages + .MESSAGE_EXECUTEFASTLASTDATAQUERYFORONEPREFIXPATH_DOS_NOT_SUPPORT_WILDCARDS_8E8F44F5)); } final Map>>> resultMap = diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/thrift/impl/DataNodeInternalRPCServiceImpl.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/thrift/impl/DataNodeInternalRPCServiceImpl.java index 7890802f36243..df64fc502320b 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/thrift/impl/DataNodeInternalRPCServiceImpl.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/thrift/impl/DataNodeInternalRPCServiceImpl.java @@ -1478,7 +1478,7 @@ public TPushTopicMetaResp pushSingleTopicMeta(TPushSingleTopicMetaReq req) { TopicMeta.deserialize(ByteBuffer.wrap(req.getTopicMeta()))); } else { throw new SubscriptionException( - DataNodeMiscMessages.INVALID_REQUEST + req + " from config node."); + String.format(DataNodeMiscMessages.INVALID_REQUEST_FROM_CONFIG_NODE_FMT, req)); } return exceptionMessage == null @@ -1594,7 +1594,7 @@ public TPushConsumerGroupMetaResp pushSingleConsumerGroupMeta( ConsumerGroupMeta.deserialize(ByteBuffer.wrap(req.getConsumerGroupMeta()))); } else { throw new SubscriptionException( - DataNodeMiscMessages.INVALID_REQUEST + req + " from config node."); + String.format(DataNodeMiscMessages.INVALID_REQUEST_FROM_CONFIG_NODE_FMT, req)); } return exceptionMessage == null @@ -1619,7 +1619,8 @@ public TPullCommitProgressResp pullCommitProgress(TPullCommitProgressReq req) { return new TPullCommitProgressResp(new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode())) .setCommitRegionProgress(regionProgress); } catch (Exception e) { - LOGGER.warn("Error occurred when pulling commit progress", e); + LOGGER.warn( + DataNodeMiscMessages.MISC_LOG_ERROR_OCCURRED_WHEN_PULLING_COMMIT_PROGRESS_48C12E4B, e); return new TPullCommitProgressResp( RpcUtils.getStatus(TSStatusCode.EXECUTE_STATEMENT_ERROR, e.getMessage())); } @@ -1638,7 +1639,10 @@ public TSStatus syncSubscriptionProgress(TSyncSubscriptionProgressReq req) { req.getLocalSeq()); return new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode()); } catch (Exception e) { - LOGGER.warn("Error occurred when receiving subscription progress broadcast", e); + LOGGER.warn( + DataNodeMiscMessages + .MISC_LOG_ERROR_OCCURRED_WHEN_RECEIVING_SUBSCRIPTION_PROGRESS_BROADCAST_94B2CF10, + e); return RpcUtils.getStatus(TSStatusCode.EXECUTE_STATEMENT_ERROR, e.getMessage()); } } @@ -1657,7 +1661,10 @@ public TSStatus pushSubscriptionRuntime(TPushSubscriptionRuntimeReq req) { } return new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode()); } catch (Exception e) { - LOGGER.warn("Error occurred when pushing subscription runtime state", e); + LOGGER.warn( + DataNodeMiscMessages + .MISC_LOG_ERROR_OCCURRED_WHEN_PUSHING_SUBSCRIPTION_RUNTIME_STATE_D4E71CE3, + e); return RpcUtils.getStatus(TSStatusCode.EXECUTE_STATEMENT_ERROR, e.getMessage()); } } @@ -2386,7 +2393,10 @@ public TSStatus updateRegionCache(TRegionRouteReq req) { ConsensusSubscriptionSetupHandler.onRegionRouteChanged( req.getRegionRouteMap(), req.getTimestamp()); } catch (final Exception e) { - LOGGER.warn("Failed to process consensus subscription route update", e); + LOGGER.warn( + DataNodeMiscMessages + .MISC_LOG_FAILED_TO_PROCESS_CONSENSUS_SUBSCRIPTION_ROUTE_UPDATE_80D73E2B, + e); } return RpcUtils.getStatus(TSStatusCode.SUCCESS_STATUS); } else { @@ -2501,10 +2511,8 @@ private void sampleDiskLoad(TLoadSample loadSample) { // Reset NodeStatus if necessary if (freeDiskRatio < commonConfig.getDiskSpaceWarningThreshold()) { LOGGER.warn( - "The available disk space is : {}, " - + "the total disk space is : {}, " - + "and the remaining disk usage ratio: {} is " - + "less than disk_space_warning_threshold: {}, set system to readonly!", + DataNodeMiscMessages + .MISC_LOG_THE_AVAILABLE_DISK_SPACE_IS_THE_TOTAL_DISK_SPACE_IS_AND_4506856F, RamUsageEstimator.humanReadableUnits((long) availableDisk), RamUsageEstimator.humanReadableUnits((long) totalDisk), freeDiskRatio, @@ -2838,7 +2846,8 @@ public TRegionLeaderChangeResp changeRegionLeader(TRegionLeaderChangeReq req) { } LOGGER.info( - "[ChangeRegionLeader] Start change the leader of RegionGroup: {} to DataNode: {}", + DataNodeMiscMessages + .MISC_LOG_CHANGEREGIONLEADER_START_CHANGE_THE_LEADER_OF_REGIONGROUP_248A99AD, regionId, req.getNewLeaderNode().getDataNodeId()); resp.setStatus(transferLeader(regionId, newLeaderPeer)); @@ -2860,16 +2869,20 @@ private TSStatus transferLeader(ConsensusGroupId regionId, Peer newLeaderPeer) { } } catch (ConsensusException e) { LOGGER.warn( - "[ChangeRegionLeader] Failed to change the leader of RegionGroup: {}", regionId, e); + DataNodeMiscMessages + .MISC_LOG_CHANGEREGIONLEADER_FAILED_TO_CHANGE_THE_LEADER_OF_REGIONGROUP_F1A1DC14, + regionId, + e); status.setCode(TSStatusCode.REGION_LEADER_CHANGE_ERROR.getStatusCode()); status.setMessage(e.getMessage()); return status; } status.setMessage( - "[ChangeRegionLeader] Successfully change the leader of RegionGroup: " + DataNodeMiscMessages + .MESSAGE_CHANGEREGIONLEADER_SUCCESSFULLY_CHANGE_LEADER_REGIONGROUP_462797B4 + regionId - + " to " + + DataNodeMiscMessages.MESSAGE_MESSAGE_3501C7E6 + newLeaderPeer.getNodeId()); return status; } @@ -2921,7 +2934,8 @@ public TSStatus addRegionPeer(TMaintainPeerReq req) { TSStatus status = new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode()); if (submitSucceed) { LOGGER.info( - "Successfully submit addRegionPeer task for region: {}, target DataNode: {}", + DataNodeMiscMessages + .MISC_LOG_SUCCESSFULLY_SUBMIT_ADDREGIONPEER_TASK_FOR_REGION_TARGET_64183781, regionId, selectedDataNodeIP); return status; @@ -2943,7 +2957,8 @@ public TSStatus removeRegionPeer(TMaintainPeerReq req) { TSStatus status = new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode()); if (submitSucceed) { LOGGER.info( - "Successfully submit removeRegionPeer task for region: {}, DataNode to be removed: {}", + DataNodeMiscMessages + .MISC_LOG_SUCCESSFULLY_SUBMIT_REMOVEREGIONPEER_TASK_FOR_REGION_DATANODE_9B74B948, regionId, selectedDataNodeIP); return status; @@ -2965,7 +2980,8 @@ public TSStatus deleteOldRegionPeer(TMaintainPeerReq req) { TSStatus status = new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode()); if (submitSucceed) { LOGGER.info( - "Successfully submit deleteOldRegionPeer task for region: {}, DataNode to be removed: {}", + DataNodeMiscMessages + .MISC_LOG_SUCCESSFULLY_SUBMIT_DELETEOLDREGIONPEER_TASK_FOR_REGION_3F3BB495, regionId, selectedDataNodeIP); return status; @@ -3038,7 +3054,8 @@ public TSStatus createTriggerInstance(TCreateTriggerInstanceReq req) { TriggerManagementService.getInstance().register(triggerInformation, req.jarFile); } catch (Exception e) { LOGGER.warn( - "Error occurred when creating trigger instance for trigger: {}. The cause is {}.", + DataNodeMiscMessages + .MISC_LOG_ERROR_OCCURRED_WHEN_CREATING_TRIGGER_INSTANCE_FOR_TRIGGER_5A8F8890, triggerInformation.getTriggerName(), e); return new TSStatus(TSStatusCode.CREATE_TRIGGER_INSTANCE_ERROR.getStatusCode()) @@ -3053,7 +3070,8 @@ public TSStatus activeTriggerInstance(TActiveTriggerInstanceReq req) { TriggerManagementService.getInstance().activeTrigger(req.triggerName); } catch (Exception e) { LOGGER.warn( - "Error occurred during active trigger instance for trigger: {}. The cause is {}.", + DataNodeMiscMessages + .MISC_LOG_ERROR_OCCURRED_DURING_ACTIVE_TRIGGER_INSTANCE_FOR_TRIGGER_7731ECF2, req.triggerName, e); return new TSStatus(TSStatusCode.ACTIVE_TRIGGER_INSTANCE_ERROR.getStatusCode()) @@ -3068,7 +3086,8 @@ public TSStatus inactiveTriggerInstance(TInactiveTriggerInstanceReq req) { TriggerManagementService.getInstance().inactiveTrigger(req.triggerName); } catch (Exception e) { LOGGER.warn( - "Error occurred when try to inactive trigger instance for trigger: {}. The cause is {}. ", + DataNodeMiscMessages + .MISC_LOG_ERROR_OCCURRED_WHEN_TRY_TO_INACTIVE_TRIGGER_INSTANCE_FOR_FA93D7E7, req.triggerName, e); return new TSStatus(TSStatusCode.EXECUTE_STATEMENT_ERROR.getStatusCode()) @@ -3084,7 +3103,8 @@ public TSStatus dropTriggerInstance(TDropTriggerInstanceReq req) { TriggerManagementService.getInstance().dropTrigger(req.triggerName, req.needToDeleteJarFile); } catch (Exception e) { LOGGER.warn( - "Error occurred when dropping trigger instance for trigger: {}. The cause is {}.", + DataNodeMiscMessages + .MISC_LOG_ERROR_OCCURRED_WHEN_DROPPING_TRIGGER_INSTANCE_FOR_TRIGGER_23B94EBE, req.triggerName, e); return new TSStatus(TSStatusCode.DROP_TRIGGER_INSTANCE_ERROR.getStatusCode()) @@ -3100,7 +3120,8 @@ public TSStatus updateTriggerLocation(TUpdateTriggerLocationReq req) { .updateLocationOfStatefulTrigger(req.triggerName, req.newLocation); } catch (Exception e) { LOGGER.warn( - "Error occurred when updating Location for trigger: {}. The cause is {}.", + DataNodeMiscMessages + .MISC_LOG_ERROR_OCCURRED_WHEN_UPDATING_LOCATION_FOR_TRIGGER_THE_CAUSE_1C076D98, req.triggerName, e); return new TSStatus(TSStatusCode.UPDATE_TRIGGER_LOCATION_ERROR.getStatusCode()) @@ -3190,7 +3211,7 @@ private boolean isSucceed(TSStatus status) { private TSStatus createNewRegionPeer(ConsensusGroupId regionId, List peers) { LOGGER.info( - "{}, Start to createNewRegionPeer {} to region {}", + DataNodeMiscMessages.MISC_LOG_START_TO_CREATENEWREGIONPEER_TO_REGION_6DCE04AD, REGION_MIGRATE_PROCESS, peers, regionId); @@ -3218,7 +3239,8 @@ private TSStatus createNewRegionPeer(ConsensusGroupId regionId, List peers } catch (ConsensusException e) { if (!(e instanceof ConsensusGroupAlreadyExistException)) { LOGGER.warn( - "{}, CreateNewRegionPeer error, peers: {}, regionId: {}, errorMessage", + DataNodeMiscMessages + .MISC_LOG_CREATENEWREGIONPEER_ERROR_PEERS_REGIONID_ERRORMESSAGE_2EDAE3C8, REGION_MIGRATE_PROCESS, peers, regionId, @@ -3229,7 +3251,7 @@ private TSStatus createNewRegionPeer(ConsensusGroupId regionId, List peers } } LOGGER.info( - "{}, Succeed to createNewRegionPeer {} for region {}", + DataNodeMiscMessages.MISC_LOG_SUCCEED_TO_CREATENEWREGIONPEER_FOR_REGION_FDF176E3, REGION_MIGRATE_PROCESS, peers, regionId); @@ -3270,7 +3292,8 @@ public TSStatus stopAndClearDataNode() { LOGGER.warn(DataNodeMiscMessages.INTERRUPTED_STOP_AND_CLEAR); } finally { LOGGER.info( - "Executing system.exit(0) in stopAndClearDataNode RPC method after 30 seconds"); + DataNodeMiscMessages + .MISC_LOG_EXECUTING_SYSTEM_EXIT_0_IN_STOPANDCLEARDATANODE_RPC_METHOD_647927C6); System.exit(0); } }) @@ -3380,7 +3403,7 @@ public TGenerateDataPartitionTableResp generateDataPartitionTable( resp.setErrorCode(DataPartitionTableGeneratorState.IN_PROGRESS.getCode()); resp.setMessage( String.format( - "DataPartitionTable generation is already in the progress: %.1f%%", + DataNodeMiscMessages.DATA_PARTITION_TABLE_GENERATION_ALREADY_IN_PROGRESS_FMT, currentGenerator.getProgress() * 100)); resp.setStatus(RpcUtils.getStatus(TSStatusCode.INTERNAL_SERVER_ERROR)); return resp; @@ -3500,19 +3523,20 @@ private void parseGenerationStatus(Object resp) { resp, DataPartitionTableGeneratorState.IN_PROGRESS.getCode(), String.format( - "DataPartitionTable generation in progress: %.1f%%", + DataNodeMiscMessages.DATA_PARTITION_TABLE_GENERATION_IN_PROGRESS_FMT, currentGenerator.getProgress() * 100), RpcUtils.getStatus(TSStatusCode.SUCCESS_STATUS)); LOGGER.info( String.format( - "DataPartitionTable generation with task ID: %s in progress: %.1f%%", - currentTaskId, currentGenerator.getProgress() * 100)); + DataNodeMiscMessages.DATA_PARTITION_TABLE_GENERATION_WITH_TASK_ID_IN_PROGRESS_FMT, + currentTaskId, + currentGenerator.getProgress() * 100)); break; case COMPLETED: setResponseFields( resp, DataPartitionTableGeneratorState.SUCCESS.getCode(), - "DataPartitionTable generation completed successfully", + DataNodeMiscMessages.DATA_PARTITION_TABLE_GENERATION_COMPLETED_SUCCESSFULLY, RpcUtils.getStatus(TSStatusCode.SUCCESS_STATUS)); LOGGER.info(DataNodeMiscMessages.DATA_PARTITION_TABLE_COMPLETED, currentTaskId); break; @@ -3520,7 +3544,9 @@ private void parseGenerationStatus(Object resp) { setResponseFields( resp, DataPartitionTableGeneratorState.FAILED.getCode(), - "DataPartitionTable generation failed: " + currentGenerator.getErrorMessage(), + String.format( + DataNodeMiscMessages.DATA_PARTITION_TABLE_GENERATION_FAILED_FMT, + currentGenerator.getErrorMessage()), RpcUtils.getStatus(TSStatusCode.INTERNAL_SERVER_ERROR)); LOGGER.info(DataNodeMiscMessages.DATA_PARTITION_TABLE_FAILED, currentTaskId); break; @@ -3630,7 +3656,8 @@ private List serializeDatabaseScopedTableList( result.add(ByteBuffer.wrap(baos.getBuf(), 0, baos.size())); } catch (IOException | TException e) { LOGGER.error( - "Failed to serialize DatabaseScopedDataPartitionTable for database: {}", + DataNodeMiscMessages + .MISC_LOG_FAILED_TO_SERIALIZE_DATABASESCOPEDDATAPARTITIONTABLE_FOR_2EFDD270, table.getDatabase(), e); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/common/PlanFragmentId.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/common/PlanFragmentId.java index 63a82874d7885..fb4bffef7e7a0 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/common/PlanFragmentId.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/common/PlanFragmentId.java @@ -19,6 +19,8 @@ package org.apache.iotdb.db.queryengine.common; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; + import org.apache.tsfile.utils.ReadWriteIOUtils; import java.io.DataOutputStream; @@ -43,7 +45,10 @@ public static PlanFragmentId valueOf(String stageId) { } public static PlanFragmentId valueOf(List ids) { - checkArgument(ids.size() == 2, "Expected two ids but got: %s", ids); + checkArgument( + ids.size() == 2, + DataNodeQueryMessages.EXCEPTION_EXPECTED_TWO_IDS_BUT_GOT_COLON_ARG_020F9D13, + ids); return new PlanFragmentId(new QueryId(ids.get(0)), Integer.parseInt(ids.get(1))); } @@ -52,7 +57,8 @@ public PlanFragmentId(String queryId, int id) { } public PlanFragmentId(QueryId queryId, int id) { - this.queryId = requireNonNull(queryId, "queryId is null"); + this.queryId = + requireNonNull(queryId, DataNodeQueryMessages.EXCEPTION_QUERYID_IS_NULL_056E92E4); this.id = id; this.nextFragmentInstanceId = 0; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/common/QueryId.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/common/QueryId.java index 0946d6a09f4c7..147fdd6e13bf5 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/common/QueryId.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/common/QueryId.java @@ -21,6 +21,7 @@ import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.PlanNodeId; import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.tsfile.utils.ReadWriteIOUtils; @@ -97,12 +98,18 @@ public boolean equals(Object obj) { } public static List parseDottedId(String id, int expectedParts, String name) { - requireNonNull(id, "id is null"); - checkArgument(expectedParts > 0, "expectedParts must be at least 1"); - requireNonNull(name, "name is null"); + requireNonNull(id, DataNodeQueryMessages.EXCEPTION_ID_IS_NULL_9D5D27B1); + checkArgument( + expectedParts > 0, + DataNodeQueryMessages.EXCEPTION_EXPECTEDPARTS_MUST_BE_AT_LEAST_1_B867DB08); + requireNonNull(name, DataNodeQueryMessages.EXCEPTION_NAME_IS_NULL_C8B35959); List ids = Arrays.asList(id.split("\\.")); - checkArgument(ids.size() == expectedParts, "Invalid %s %s", name, id); + checkArgument( + ids.size() == expectedParts, + DataNodeQueryMessages.EXCEPTION_INVALID_ARG_ARG_2946DBE5, + name, + id); for (String part : ids) { checkArgument(!part.isEmpty(), INVALID_ID_ERROR_MSG, id); @@ -137,8 +144,8 @@ private static boolean isValidId(String id) { } public static String validateId(String id) { - requireNonNull(id, "id is null"); - checkArgument(!id.isEmpty(), "id is empty"); + requireNonNull(id, DataNodeQueryMessages.EXCEPTION_ID_IS_NULL_9D5D27B1); + checkArgument(!id.isEmpty(), DataNodeQueryMessages.EXCEPTION_ID_IS_EMPTY_28C94FC0); checkArgument(isValidId(id), INVALID_ID_ERROR_MSG, id); return id; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/common/schematree/ClusterSchemaTree.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/common/schematree/ClusterSchemaTree.java index f822ef397ac79..632c86cc2b6d8 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/common/schematree/ClusterSchemaTree.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/common/schematree/ClusterSchemaTree.java @@ -255,7 +255,7 @@ public void computeSourceOfLogicalView( } else if (measurementPathList.size() > 1) { throw new SemanticException( String.format( - "The source paths [%s] of view [%s] are multiple.", + DataNodeQueryMessages.THE_SOURCE_PATHS_S_OF_VIEW_S_ARE_MULTIPLE, fullPath.getFullPath(), schemaComputation .getDevicePath() diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/common/schematree/node/SchemaMeasurementNode.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/common/schematree/node/SchemaMeasurementNode.java index 6f5bd07f08f05..295454d9ea7ba 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/common/schematree/node/SchemaMeasurementNode.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/common/schematree/node/SchemaMeasurementNode.java @@ -20,6 +20,7 @@ package org.apache.iotdb.db.queryengine.common.schematree.node; import org.apache.iotdb.commons.schema.view.LogicalViewSchema; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.common.schematree.IMeasurementSchemaInfo; import org.apache.tsfile.utils.RamUsageEstimator; @@ -119,13 +120,15 @@ public SchemaNode getChild(String name) { @Override public void replaceChild(String name, SchemaNode newChild) { throw new UnsupportedOperationException( - "This operation is not supported in SchemaMeasurementNode."); + DataNodeQueryMessages + .QUERY_EXCEPTION_THIS_OPERATION_IS_NOT_SUPPORTED_IN_SCHEMAMEASUREMENTNODE_93A81AE3); } @Override public void removeChild(String name) { throw new UnsupportedOperationException( - "Remove child operation is not supported in SchemaMeasurementNode."); + DataNodeQueryMessages + .QUERY_EXCEPTION_REMOVE_CHILD_OPERATION_IS_NOT_SUPPORTED_IN_SCHEMAMEASUREMENTNODE_940D080F); } @Override diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/FutureStateChange.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/FutureStateChange.java index 69687e6d8b0ee..1797fb9fe6b1c 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/FutureStateChange.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/FutureStateChange.java @@ -19,6 +19,8 @@ package org.apache.iotdb.db.queryengine.execution; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; + import com.google.common.collect.ImmutableSet; import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.SettableFuture; @@ -66,7 +68,7 @@ public void complete(T newState, Executor executor) { } private void fireStateChange(T newState, Executor executor) { - requireNonNull(executor, "executor is null"); + requireNonNull(executor, DataNodeQueryMessages.EXCEPTION_EXECUTOR_IS_NULL_7FBE03A4); Set> futures; synchronized (listeners) { futures = ImmutableSet.copyOf(listeners); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/QueryIdGenerator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/QueryIdGenerator.java index 6c33790e88dbb..e4afcd18120cb 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/QueryIdGenerator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/QueryIdGenerator.java @@ -19,6 +19,7 @@ package org.apache.iotdb.db.queryengine.execution; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.common.QueryId; import javax.annotation.concurrent.GuardedBy; @@ -56,7 +57,8 @@ public class QueryIdGenerator { private int counter; public QueryIdGenerator(int dataNode) { - checkArgument(dataNode != -1, "DataNodeId should be init first!"); + checkArgument( + dataNode != -1, DataNodeQueryMessages.EXCEPTION_DATANODEID_SHOULD_BE_INIT_FIRST_13B19A85); this.dataNodeId = String.valueOf(dataNode); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/QueryStateMachine.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/QueryStateMachine.java index 19d0fb38749d1..e83b21979ea27 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/QueryStateMachine.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/QueryStateMachine.java @@ -22,6 +22,7 @@ import org.apache.iotdb.common.rpc.thrift.TSStatus; import org.apache.iotdb.commons.exception.IoTDBException; import org.apache.iotdb.commons.exception.IoTDBRuntimeException; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.common.QueryId; import org.apache.iotdb.db.queryengine.plan.execution.QueryExecution; import org.apache.iotdb.rpc.RpcUtils; @@ -132,8 +133,11 @@ public void transitionToFailed(TSStatus failureStatus) { } private boolean transitionToDoneState(QueryState doneState) { - requireNonNull(doneState, "doneState is null"); - checkArgument(doneState.isDone(), "doneState %s is not a done state", doneState); + requireNonNull(doneState, DataNodeQueryMessages.EXCEPTION_DONESTATE_IS_NULL_D88F77E5); + checkArgument( + doneState.isDone(), + DataNodeQueryMessages.EXCEPTION_DONESTATE_ARG_IS_NOT_A_DONE_STATE_8724C618, + doneState); return queryState.setIf(doneState, currentState -> !currentState.isDone()); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/StateMachine.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/StateMachine.java index 25f5ec1d02e4f..565b1e18cb53c 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/StateMachine.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/StateMachine.java @@ -87,11 +87,15 @@ public StateMachine(String name, Executor executor, T initialState) { * @param terminalStates the terminal states */ public StateMachine(String name, Executor executor, T initialState, Iterable terminalStates) { - this.name = requireNonNull(name, "name is null"); - this.executor = requireNonNull(executor, "executor is null"); - this.state = requireNonNull(initialState, "initialState is null"); + this.name = requireNonNull(name, DataNodeQueryMessages.EXCEPTION_NAME_IS_NULL_C8B35959); + this.executor = + requireNonNull(executor, DataNodeQueryMessages.EXCEPTION_EXECUTOR_IS_NULL_7FBE03A4); + this.state = + requireNonNull(initialState, DataNodeQueryMessages.EXCEPTION_INITIALSTATE_IS_NULL_8992A39F); this.terminalStates = - ImmutableSet.copyOf(requireNonNull(terminalStates, "terminalStates is null")); + ImmutableSet.copyOf( + requireNonNull( + terminalStates, DataNodeQueryMessages.EXCEPTION_TERMINALSTATES_IS_NULL_E0FC2A93)); } // State changes are atomic and state is volatile, so a direct read is safe here @@ -111,7 +115,7 @@ public T set(T newState) { T oldState = trySet(newState); checkState( oldState.equals(newState) || !isTerminalState(oldState), - "%s cannot transition from %s to %s", + DataNodeQueryMessages.EXCEPTION_ARG_CANNOT_TRANSITION_FROM_ARG_TO_ARG_8C680D30, name, state, newState); @@ -193,7 +197,7 @@ public boolean setIf(T newState, Predicate predicate) { */ public boolean compareAndSet(T expectedState, T newState) { checkState(!Thread.holdsLock(lock), LOCK_HELD_ERROR_MSG); - requireNonNull(expectedState, "expectedState is null"); + requireNonNull(expectedState, DataNodeQueryMessages.EXCEPTION_EXPECTEDSTATE_IS_NULL_5E8C2F32); requireNonNull(newState, STATE_IS_NULL); FutureStateChange oldFutureStateChange; @@ -209,7 +213,11 @@ public boolean compareAndSet(T expectedState, T newState) { } checkState( - !isTerminalState(state), "%s cannot transition from %s to %s", name, state, newState); + !isTerminalState(state), + DataNodeQueryMessages.EXCEPTION_ARG_CANNOT_TRANSITION_FROM_ARG_TO_ARG_8C680D30, + name, + state, + newState); state = newState; @@ -232,13 +240,18 @@ private void fireStateChanged( T newState, FutureStateChange futureStateChange, List> stateChangeListeners) { - checkState(!Thread.holdsLock(lock), "Cannot fire state change event while holding the lock"); + checkState( + !Thread.holdsLock(lock), + DataNodeQueryMessages + .EXCEPTION_CANNOT_FIRE_STATE_CHANGE_EVENT_WHILE_HOLDING_THE_LOCK_35243BC4); requireNonNull(newState, STATE_IS_NULL); // always fire listener callbacks from a different thread safeExecute( () -> { - checkState(!Thread.holdsLock(lock), "Cannot notify while holding the lock"); + checkState( + !Thread.holdsLock(lock), + DataNodeQueryMessages.EXCEPTION_CANNOT_NOTIFY_WHILE_HOLDING_THE_LOCK_15625D48); try { futureStateChange.complete(newState); } catch (Throwable e) { @@ -264,8 +277,11 @@ private void fireStateChangedListener(T newState, StateChangeListener stateCh * currentState)}. */ public ListenableFuture getStateChange(T currentState) { - checkState(!Thread.holdsLock(lock), "Cannot wait for state change while holding the lock"); - requireNonNull(currentState, "currentState is null"); + checkState( + !Thread.holdsLock(lock), + DataNodeQueryMessages + .EXCEPTION_CANNOT_WAIT_FOR_STATE_CHANGE_WHILE_HOLDING_THE_LOCK_CBD9F784); + requireNonNull(currentState, DataNodeQueryMessages.EXCEPTION_CURRENTSTATE_IS_NULL_AEDB20DB); synchronized (lock) { // return a completed future if the state has already changed, or we are in a terminal state @@ -285,7 +301,8 @@ public ListenableFuture getStateChange(T currentState) { * execution. The listener is notified immediately of the current state. */ public void addStateChangeListener(StateChangeListener stateChangeListener) { - requireNonNull(stateChangeListener, "stateChangeListener is null"); + requireNonNull( + stateChangeListener, DataNodeQueryMessages.EXCEPTION_STATECHANGELISTENER_IS_NULL_635AE7D2); T currentState; synchronized (lock) { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/AccumulatorFactory.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/AccumulatorFactory.java index 46e76783cf9fe..6f626a0269c8b 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/AccumulatorFactory.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/AccumulatorFactory.java @@ -97,32 +97,46 @@ public static Accumulator createBuiltinMultiInputAccumulator( TAggregationType aggregationType, List inputDataTypes) { switch (aggregationType) { case MAX_BY: - checkState(inputDataTypes.size() == 2, "Wrong inputDataTypes size."); + checkState( + inputDataTypes.size() == 2, + DataNodeQueryMessages.EXCEPTION_WRONG_INPUTDATATYPES_SIZE_DOT_675FF289); return new MaxByAccumulator(inputDataTypes.get(0), inputDataTypes.get(1)); case MIN_BY: - checkState(inputDataTypes.size() == 2, "Wrong inputDataTypes size."); + checkState( + inputDataTypes.size() == 2, + DataNodeQueryMessages.EXCEPTION_WRONG_INPUTDATATYPES_SIZE_DOT_675FF289); return new MinByAccumulator(inputDataTypes.get(0), inputDataTypes.get(1)); case CORR: - checkState(inputDataTypes.size() == 2, "Wrong inputDataTypes size."); + checkState( + inputDataTypes.size() == 2, + DataNodeQueryMessages.EXCEPTION_WRONG_INPUTDATATYPES_SIZE_DOT_675FF289); return new CorrelationAccumulator( new TSDataType[] {inputDataTypes.get(0), inputDataTypes.get(1)}); case COVAR_POP: - checkState(inputDataTypes.size() == 2, "Wrong inputDataTypes size."); + checkState( + inputDataTypes.size() == 2, + DataNodeQueryMessages.EXCEPTION_WRONG_INPUTDATATYPES_SIZE_DOT_675FF289); return new CovarianceAccumulator( new TSDataType[] {inputDataTypes.get(0), inputDataTypes.get(1)}, CovarianceAccumulator.CovarianceType.COVAR_POP); case COVAR_SAMP: - checkState(inputDataTypes.size() == 2, "Wrong inputDataTypes size."); + checkState( + inputDataTypes.size() == 2, + DataNodeQueryMessages.EXCEPTION_WRONG_INPUTDATATYPES_SIZE_DOT_675FF289); return new CovarianceAccumulator( new TSDataType[] {inputDataTypes.get(0), inputDataTypes.get(1)}, CovarianceAccumulator.CovarianceType.COVAR_SAMP); case REGR_SLOPE: - checkState(inputDataTypes.size() == 2, "Wrong inputDataTypes size."); + checkState( + inputDataTypes.size() == 2, + DataNodeQueryMessages.EXCEPTION_WRONG_INPUTDATATYPES_SIZE_DOT_675FF289); return new RegressionAccumulator( new TSDataType[] {inputDataTypes.get(0), inputDataTypes.get(1)}, RegressionAccumulator.RegressionType.REGR_SLOPE); case REGR_INTERCEPT: - checkState(inputDataTypes.size() == 2, "Wrong inputDataTypes size."); + checkState( + inputDataTypes.size() == 2, + DataNodeQueryMessages.EXCEPTION_WRONG_INPUTDATATYPES_SIZE_DOT_675FF289); return new RegressionAccumulator( new TSDataType[] {inputDataTypes.get(0), inputDataTypes.get(1)}, RegressionAccumulator.RegressionType.REGR_INTERCEPT); @@ -266,7 +280,9 @@ public static KeepEvaluator initKeepEvaluator(Expression keepExpression) { return keep -> keep != constant; default: throw new IllegalArgumentException( - "unsupported expression type: " + keepExpression.getExpressionType()); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_EXPRESSION_TYPE_S_FD6F5B7C, + keepExpression.getExpressionType())); } } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/AvgAccumulator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/AvgAccumulator.java index cfd77c61ba524..27da8f412efc5 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/AvgAccumulator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/AvgAccumulator.java @@ -20,6 +20,7 @@ package org.apache.iotdb.db.queryengine.execution.aggregation; import org.apache.iotdb.calc.execution.aggregation.Accumulator; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; @@ -66,14 +67,19 @@ public void addInput(Column[] columns, BitMap bitMap) { case TIMESTAMP: default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in aggregation AVG : %s", seriesDataType)); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_IN_AGGREGATION_AVG_S_D1DAD6A6, + seriesDataType)); } } // partialResult should be like: | countValue1 | sumValue1 | @Override public void addIntermediate(Column[] partialResult) { - checkArgument(partialResult.length == 2, "partialResult of Avg should be 2"); + checkArgument( + partialResult.length == 2, + DataNodeQueryMessages.EXCEPTION_PARTIALRESULT_OF_AVG_SHOULD_BE_2_7A8C375E); if (partialResult[0].isNull(0)) { return; } @@ -87,7 +93,9 @@ public void addIntermediate(Column[] partialResult) { @Override public void removeIntermediate(Column[] input) { - checkArgument(input.length == 2, "partialResult of Avg should be 2"); + checkArgument( + input.length == 2, + DataNodeQueryMessages.EXCEPTION_PARTIALRESULT_OF_AVG_SHOULD_BE_2_7A8C375E); if (input[0].isNull(0)) { return; } @@ -129,7 +137,9 @@ public void setFinal(Column finalResult) { @Override public void outputIntermediate(ColumnBuilder[] columnBuilders) { - checkArgument(columnBuilders.length == 2, "partialResult of Avg should be 2"); + checkArgument( + columnBuilders.length == 2, + DataNodeQueryMessages.EXCEPTION_PARTIALRESULT_OF_AVG_SHOULD_BE_2_7A8C375E); if (!initResult) { columnBuilders[0].appendNull(); columnBuilders[1].appendNull(); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/CountAccumulator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/CountAccumulator.java index a8f352da11572..38851f62d0c08 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/CountAccumulator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/CountAccumulator.java @@ -20,6 +20,7 @@ package org.apache.iotdb.db.queryengine.execution.aggregation; import org.apache.iotdb.calc.execution.aggregation.Accumulator; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; @@ -59,7 +60,9 @@ public void addInput(Column[] columns, BitMap bitMap) { // partialResult should be like: | partialCountValue1 | @Override public void addIntermediate(Column[] partialResult) { - checkArgument(partialResult.length == 1, "partialResult of Count should be 1"); + checkArgument( + partialResult.length == 1, + DataNodeQueryMessages.EXCEPTION_PARTIALRESULT_OF_COUNT_SHOULD_BE_1_972B9219); if (partialResult[0].isNull(0)) { return; } @@ -68,7 +71,8 @@ public void addIntermediate(Column[] partialResult) { @Override public void removeIntermediate(Column[] input) { - checkArgument(input.length == 1, "input of Count should be 1"); + checkArgument( + input.length == 1, DataNodeQueryMessages.EXCEPTION_INPUT_OF_COUNT_SHOULD_BE_1_C7EEEC46); if (input[0].isNull(0)) { return; } @@ -95,7 +99,9 @@ public void setFinal(Column finalResult) { // columnBuilder should be single in countAccumulator @Override public void outputIntermediate(ColumnBuilder[] columnBuilders) { - checkArgument(columnBuilders.length == 1, "partialResult of Count should be 1"); + checkArgument( + columnBuilders.length == 1, + DataNodeQueryMessages.EXCEPTION_PARTIALRESULT_OF_COUNT_SHOULD_BE_1_972B9219); columnBuilders[0].writeLong(countValue); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/CountIfAccumulator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/CountIfAccumulator.java index c0ae7d101d7c3..25ae28d9c52ab 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/CountIfAccumulator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/CountIfAccumulator.java @@ -20,6 +20,7 @@ package org.apache.iotdb.db.queryengine.execution.aggregation; import org.apache.iotdb.calc.execution.aggregation.Accumulator; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; @@ -85,7 +86,9 @@ public void addInput(Column[] columns, BitMap bitMap) { @Override public void addIntermediate(Column[] partialResult) { - checkArgument(partialResult.length == 1, "partialResult of count_if should be 1"); + checkArgument( + partialResult.length == 1, + DataNodeQueryMessages.EXCEPTION_PARTIALRESULT_OF_COUNT_IF_SHOULD_BE_1_70D01652); if (partialResult[0].isNull(0)) { return; } @@ -108,7 +111,9 @@ public void setFinal(Column finalResult) { @Override public void outputIntermediate(ColumnBuilder[] columnBuilders) { - checkArgument(columnBuilders.length == 1, "partialResult of count_if should be 1"); + checkArgument( + columnBuilders.length == 1, + DataNodeQueryMessages.EXCEPTION_PARTIALRESULT_OF_COUNT_IF_SHOULD_BE_1_70D01652); // judge whether the last data point segment need to count if (lastPointIsSatisfy && keepEvaluator.apply(keep)) { countValue++; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/CountTimeAccumulator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/CountTimeAccumulator.java index 980a6a5a922e2..897e98da2edf8 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/CountTimeAccumulator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/CountTimeAccumulator.java @@ -20,6 +20,7 @@ package org.apache.iotdb.db.queryengine.execution.aggregation; import org.apache.iotdb.calc.execution.aggregation.Accumulator; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; @@ -55,7 +56,9 @@ public void addInput(Column[] columns, BitMap bitMap) { // partialResult should be like: | partialCountValue1 | @Override public void addIntermediate(Column[] partialResult) { - checkArgument(partialResult.length == 1, "partialResult of Count should be 1"); + checkArgument( + partialResult.length == 1, + DataNodeQueryMessages.EXCEPTION_PARTIALRESULT_OF_COUNT_SHOULD_BE_1_972B9219); if (partialResult[0].isNull(0)) { return; } @@ -82,7 +85,9 @@ public void setFinal(Column finalResult) { // columnBuilder should be single in countAccumulator @Override public void outputIntermediate(ColumnBuilder[] columnBuilders) { - checkArgument(columnBuilders.length == 1, "partialResult of Count should be 1"); + checkArgument( + columnBuilders.length == 1, + DataNodeQueryMessages.EXCEPTION_PARTIALRESULT_OF_COUNT_SHOULD_BE_1_972B9219); columnBuilders[0].writeLong(countValue); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/ExtremeAccumulator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/ExtremeAccumulator.java index f99e01e8d5a59..2f6f3ce2e5413 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/ExtremeAccumulator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/ExtremeAccumulator.java @@ -20,6 +20,7 @@ package org.apache.iotdb.db.queryengine.execution.aggregation; import org.apache.iotdb.calc.execution.aggregation.Accumulator; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; @@ -66,14 +67,18 @@ public void addInput(Column[] columns, BitMap bitMap) { case TIMESTAMP: default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in Extreme: %s", seriesDataType)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_IN_EXTREME_S_84B651D3, + seriesDataType)); } } // partialResult should be like: | PartialExtremeValue | @Override public void addIntermediate(Column[] partialResult) { - checkArgument(partialResult.length == 1, "partialResult of ExtremeValue should be 1"); + checkArgument( + partialResult.length == 1, + DataNodeQueryMessages.EXCEPTION_PARTIALRESULT_OF_EXTREMEVALUE_SHOULD_BE_1_A7713D8A); if (partialResult[0].isNull(0)) { return; } @@ -99,7 +104,9 @@ public void addIntermediate(Column[] partialResult) { case TIMESTAMP: default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in Extreme: %s", seriesDataType)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_IN_EXTREME_S_84B651D3, + seriesDataType)); } } @@ -134,7 +141,9 @@ public void addStatistics(Statistics statistics) { case TIMESTAMP: default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in Extreme: %s", seriesDataType)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_IN_EXTREME_S_84B651D3, + seriesDataType)); } } @@ -166,14 +175,18 @@ public void setFinal(Column finalResult) { case TIMESTAMP: default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in Extreme: %s", seriesDataType)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_IN_EXTREME_S_84B651D3, + seriesDataType)); } } // columnBuilder should be single in ExtremeAccumulator @Override public void outputIntermediate(ColumnBuilder[] columnBuilders) { - checkArgument(columnBuilders.length == 1, "partialResult of ExtremeValue should be 1"); + checkArgument( + columnBuilders.length == 1, + DataNodeQueryMessages.EXCEPTION_PARTIALRESULT_OF_EXTREMEVALUE_SHOULD_BE_1_A7713D8A); if (!initResult) { columnBuilders[0].appendNull(); return; @@ -200,7 +213,9 @@ public void outputIntermediate(ColumnBuilder[] columnBuilders) { case TIMESTAMP: default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in Extreme: %s", seriesDataType)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_IN_EXTREME_S_84B651D3, + seriesDataType)); } } @@ -232,7 +247,9 @@ public void outputFinal(ColumnBuilder columnBuilder) { case TIMESTAMP: default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in Extreme: %s", seriesDataType)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_IN_EXTREME_S_84B651D3, + seriesDataType)); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/FirstValueAccumulator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/FirstValueAccumulator.java index 6da27015bdae0..899a33d43c1f0 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/FirstValueAccumulator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/FirstValueAccumulator.java @@ -20,6 +20,7 @@ package org.apache.iotdb.db.queryengine.execution.aggregation; import org.apache.iotdb.calc.execution.aggregation.Accumulator; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; @@ -76,14 +77,19 @@ public void addInput(Column[] columns, BitMap bitMap) { return; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in FirstValue: %s", seriesDataType)); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_IN_FIRSTVALUE_S_97025F25, + seriesDataType)); } } // partialResult should be like: | FirstValue | MinTime | @Override public void addIntermediate(Column[] partialResult) { - checkArgument(partialResult.length == 2, "partialResult of FirstValue should be 2"); + checkArgument( + partialResult.length == 2, + DataNodeQueryMessages.EXCEPTION_PARTIALRESULT_OF_FIRSTVALUE_SHOULD_BE_2_3FB20C54); if (partialResult[0].isNull(0)) { return; } @@ -113,7 +119,10 @@ public void addIntermediate(Column[] partialResult) { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in FirstValue: %s", seriesDataType)); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_IN_FIRSTVALUE_S_97025F25, + seriesDataType)); } } @@ -166,7 +175,10 @@ public void addStatistics(Statistics statistics) { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in FirstValue: %s", seriesDataType)); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_IN_FIRSTVALUE_S_97025F25, + seriesDataType)); } } @@ -202,7 +214,10 @@ public void setFinal(Column finalResult) { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in FirstValue: %s", seriesDataType)); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_IN_FIRSTVALUE_S_97025F25, + seriesDataType)); } } } @@ -210,7 +225,9 @@ public void setFinal(Column finalResult) { // columnBuilder should be double in FirstValueAccumulator @Override public void outputIntermediate(ColumnBuilder[] columnBuilders) { - checkArgument(columnBuilders.length == 2, "partialResult of FirstValue should be 2"); + checkArgument( + columnBuilders.length == 2, + DataNodeQueryMessages.EXCEPTION_PARTIALRESULT_OF_FIRSTVALUE_SHOULD_BE_2_3FB20C54); if (!hasCandidateResult) { columnBuilders[0].appendNull(); columnBuilders[1].appendNull(); @@ -242,7 +259,9 @@ public void outputIntermediate(ColumnBuilder[] columnBuilders) { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in Extreme: %s", seriesDataType)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_IN_EXTREME_S_84B651D3, + seriesDataType)); } columnBuilders[1].writeLong(minTime); } @@ -279,7 +298,9 @@ public void outputFinal(ColumnBuilder columnBuilder) { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in Extreme: %s", seriesDataType)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_IN_EXTREME_S_84B651D3, + seriesDataType)); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/LastValueAccumulator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/LastValueAccumulator.java index b20b3d3ded059..3c04e6093a62b 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/LastValueAccumulator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/LastValueAccumulator.java @@ -20,6 +20,7 @@ package org.apache.iotdb.db.queryengine.execution.aggregation; import org.apache.iotdb.calc.execution.aggregation.Accumulator; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; @@ -76,14 +77,18 @@ public void addInput(Column[] columns, BitMap bitMap) { return; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in LastValue: %s", seriesDataType)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_IN_LASTVALUE_S_02ECF8E4, + seriesDataType)); } } // partialResult should be like: | LastValue | MaxTime | @Override public void addIntermediate(Column[] partialResult) { - checkArgument(partialResult.length == 2, "partialResult of LastValue should be 2"); + checkArgument( + partialResult.length == 2, + DataNodeQueryMessages.EXCEPTION_PARTIALRESULT_OF_LASTVALUE_SHOULD_BE_2_68963ECE); if (partialResult[0].isNull(0)) { return; } @@ -113,7 +118,9 @@ public void addIntermediate(Column[] partialResult) { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in LastValue: %s", seriesDataType)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_IN_LASTVALUE_S_02ECF8E4, + seriesDataType)); } } @@ -166,7 +173,9 @@ public void addStatistics(Statistics statistics) { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in LastValue: %s", seriesDataType)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_IN_LASTVALUE_S_02ECF8E4, + seriesDataType)); } } @@ -202,7 +211,10 @@ public void setFinal(Column finalResult) { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in LastValue: %s", seriesDataType)); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_IN_LASTVALUE_S_02ECF8E4, + seriesDataType)); } } } @@ -210,7 +222,9 @@ public void setFinal(Column finalResult) { // columnBuilder should be double in LastValueAccumulator @Override public void outputIntermediate(ColumnBuilder[] columnBuilders) { - checkArgument(columnBuilders.length == 2, "partialResult of LastValue should be 2"); + checkArgument( + columnBuilders.length == 2, + DataNodeQueryMessages.EXCEPTION_PARTIALRESULT_OF_LASTVALUE_SHOULD_BE_2_68963ECE); if (!initResult) { columnBuilders[0].appendNull(); columnBuilders[1].appendNull(); @@ -242,7 +256,9 @@ public void outputIntermediate(ColumnBuilder[] columnBuilders) { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in Extreme: %s", seriesDataType)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_IN_EXTREME_S_84B651D3, + seriesDataType)); } columnBuilders[1].writeLong(maxTime); } @@ -279,7 +295,9 @@ public void outputFinal(ColumnBuilder columnBuilder) { break; default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in Extreme: %s", seriesDataType)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_IN_EXTREME_S_84B651D3, + seriesDataType)); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/MaxMinByBaseAccumulator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/MaxMinByBaseAccumulator.java index b03c1852e3d70..fad106ccf2857 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/MaxMinByBaseAccumulator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/MaxMinByBaseAccumulator.java @@ -20,6 +20,7 @@ package org.apache.iotdb.db.queryengine.execution.aggregation; import org.apache.iotdb.calc.execution.aggregation.Accumulator; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; @@ -68,7 +69,10 @@ protected MaxMinByBaseAccumulator(TSDataType xDataType, TSDataType yDataType) { // Column should be like: | Time | x | y | @Override public void addInput(Column[] column, BitMap bitMap) { - checkArgument(column.length == 3, "Length of input Column[] for MaxBy/MinBy should be 3"); + checkArgument( + column.length == 3, + DataNodeQueryMessages + .EXCEPTION_LENGTH_OF_INPUT_COLUMN_LEFT_BRACKET_RIGHT_BRACKET_FOR_MAXBY_SLASH_MINBY_SHOULD_B_1F3F2F1C); switch (yDataType) { case INT32: case DATE: @@ -99,7 +103,9 @@ public void addInput(Column[] column, BitMap bitMap) { // partialResult should be like: | partialMaxByBinary | @Override public void addIntermediate(Column[] partialResult) { - checkArgument(partialResult.length == 1, "partialResult of MaxBy/MinBy should be 1"); + checkArgument( + partialResult.length == 1, + DataNodeQueryMessages.EXCEPTION_PARTIALRESULT_OF_MAXBY_SLASH_MINBY_SHOULD_BE_1_BF0078F4); // Return if y is null. if (partialResult[0].isNull(0)) { return; @@ -126,7 +132,9 @@ public void setFinal(Column finalResult) { // columnBuilders should be like | TextIntermediateColumnBuilder | @Override public void outputIntermediate(ColumnBuilder[] columnBuilders) { - checkArgument(columnBuilders.length == 1, "partialResult of MaxValue should be 1"); + checkArgument( + columnBuilders.length == 1, + DataNodeQueryMessages.EXCEPTION_PARTIALRESULT_OF_MAXVALUE_SHOULD_BE_1_659B6D42); if (!initResult) { columnBuilders[0].appendNull(); return; @@ -364,7 +372,9 @@ private byte[] serialize() { } } catch (IOException e) { throw new UnsupportedOperationException( - "Failed to serialize intermediate result for MaxByAccumulator.", e); + DataNodeQueryMessages + .QUERY_EXCEPTION_FAILED_TO_SERIALIZE_INTERMEDIATE_RESULT_FOR_MAXBYACCUMULATOR_2F18B6E7, + e); } return byteArrayOutputStream.toByteArray(); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/MaxTimeAccumulator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/MaxTimeAccumulator.java index b6ae4b5b76133..492ad1383d840 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/MaxTimeAccumulator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/MaxTimeAccumulator.java @@ -20,6 +20,7 @@ package org.apache.iotdb.db.queryengine.execution.aggregation; import org.apache.iotdb.calc.execution.aggregation.Accumulator; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; @@ -54,7 +55,9 @@ public void addInput(Column[] columns, BitMap bitMap) { // partialResult should be like: | partialMaxTimeValue | @Override public void addIntermediate(Column[] partialResult) { - checkArgument(partialResult.length == 1, "partialResult of MaxTime should be 1"); + checkArgument( + partialResult.length == 1, + DataNodeQueryMessages.EXCEPTION_PARTIALRESULT_OF_MAXTIME_SHOULD_BE_1_877F7EAC); if (partialResult[0].isNull(0)) { return; } @@ -82,7 +85,9 @@ public void setFinal(Column finalResult) { // columnBuilder should be single in maxTimeAccumulator @Override public void outputIntermediate(ColumnBuilder[] columnBuilders) { - checkArgument(columnBuilders.length == 1, "partialResult of MaxTime should be 1"); + checkArgument( + columnBuilders.length == 1, + DataNodeQueryMessages.EXCEPTION_PARTIALRESULT_OF_MAXTIME_SHOULD_BE_1_877F7EAC); if (!initResult) { columnBuilders[0].appendNull(); } else { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/MaxValueAccumulator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/MaxValueAccumulator.java index 44097bd0c1a97..825c51c802430 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/MaxValueAccumulator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/MaxValueAccumulator.java @@ -20,6 +20,7 @@ package org.apache.iotdb.db.queryengine.execution.aggregation; import org.apache.iotdb.calc.execution.aggregation.Accumulator; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; @@ -70,14 +71,18 @@ public void addInput(Column[] columns, BitMap bitMap) { case BOOLEAN: default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MaxValue: %s", seriesDataType)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_IN_MAXVALUE_S_521AC345, + seriesDataType)); } } // partialResult should be like: | partialMaxValue1 | @Override public void addIntermediate(Column[] partialResult) { - checkArgument(partialResult.length == 1, "partialResult of MaxValue should be 1"); + checkArgument( + partialResult.length == 1, + DataNodeQueryMessages.EXCEPTION_PARTIALRESULT_OF_MAXVALUE_SHOULD_BE_1_659B6D42); if (partialResult[0].isNull(0)) { return; } @@ -105,7 +110,9 @@ public void addIntermediate(Column[] partialResult) { case BOOLEAN: default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MaxValue: %s", seriesDataType)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_IN_MAXVALUE_S_521AC345, + seriesDataType)); } } @@ -138,7 +145,9 @@ public void addStatistics(Statistics statistics) { case BOOLEAN: default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MaxValue: %s", seriesDataType)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_IN_MAXVALUE_S_521AC345, + seriesDataType)); } } @@ -173,14 +182,18 @@ public void setFinal(Column finalResult) { case BOOLEAN: default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MaxValue: %s", seriesDataType)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_IN_MAXVALUE_S_521AC345, + seriesDataType)); } } // columnBuilder should be single in countAccumulator @Override public void outputIntermediate(ColumnBuilder[] columnBuilders) { - checkArgument(columnBuilders.length == 1, "partialResult of MaxValue should be 1"); + checkArgument( + columnBuilders.length == 1, + DataNodeQueryMessages.EXCEPTION_PARTIALRESULT_OF_MAXVALUE_SHOULD_BE_1_659B6D42); if (!initResult) { columnBuilders[0].appendNull(); return; @@ -209,7 +222,9 @@ public void outputIntermediate(ColumnBuilder[] columnBuilders) { case BOOLEAN: default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MaxValue: %s", seriesDataType)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_IN_MAXVALUE_S_521AC345, + seriesDataType)); } } @@ -243,7 +258,9 @@ public void outputFinal(ColumnBuilder columnBuilder) { case BOOLEAN: default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MaxValue: %s", seriesDataType)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_IN_MAXVALUE_S_521AC345, + seriesDataType)); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/MinTimeAccumulator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/MinTimeAccumulator.java index e795eee64101d..7e0bd2806761c 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/MinTimeAccumulator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/MinTimeAccumulator.java @@ -20,6 +20,7 @@ package org.apache.iotdb.db.queryengine.execution.aggregation; import org.apache.iotdb.calc.execution.aggregation.Accumulator; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; @@ -55,7 +56,9 @@ public void addInput(Column[] columns, BitMap bitMap) { // partialResult should be like: | partialMinTimeValue | @Override public void addIntermediate(Column[] partialResult) { - checkArgument(partialResult.length == 1, "partialResult of MinTime should be 1"); + checkArgument( + partialResult.length == 1, + DataNodeQueryMessages.EXCEPTION_PARTIALRESULT_OF_MINTIME_SHOULD_BE_1_B7EFE10B); if (partialResult[0].isNull(0)) { return; } @@ -83,7 +86,9 @@ public void setFinal(Column finalResult) { // columnBuilder should be single in minTimeAccumulator @Override public void outputIntermediate(ColumnBuilder[] columnBuilders) { - checkArgument(columnBuilders.length == 1, "partialResult of MinTime should be 1"); + checkArgument( + columnBuilders.length == 1, + DataNodeQueryMessages.EXCEPTION_PARTIALRESULT_OF_MINTIME_SHOULD_BE_1_B7EFE10B); if (!hasCandidateResult) { columnBuilders[0].appendNull(); } else { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/MinValueAccumulator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/MinValueAccumulator.java index df0b69d34db9e..9d35b77fb0728 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/MinValueAccumulator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/MinValueAccumulator.java @@ -20,6 +20,7 @@ package org.apache.iotdb.db.queryengine.execution.aggregation; import org.apache.iotdb.calc.execution.aggregation.Accumulator; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; @@ -70,14 +71,18 @@ public void addInput(Column[] columns, BitMap bitMap) { case BOOLEAN: default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MinValue: %s", seriesDataType)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_IN_MINVALUE_S_BC092694, + seriesDataType)); } } // partialResult should be like: | partialMinValue1 | @Override public void addIntermediate(Column[] partialResult) { - checkArgument(partialResult.length == 1, "partialResult of MinValue should be 1"); + checkArgument( + partialResult.length == 1, + DataNodeQueryMessages.EXCEPTION_PARTIALRESULT_OF_MINVALUE_SHOULD_BE_1_C9DAF94D); if (partialResult[0].isNull(0)) { return; } @@ -105,7 +110,9 @@ public void addIntermediate(Column[] partialResult) { case BOOLEAN: default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MinValue: %s", seriesDataType)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_IN_MINVALUE_S_BC092694, + seriesDataType)); } } @@ -138,7 +145,9 @@ public void addStatistics(Statistics statistics) { case BOOLEAN: default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MinValue: %s", seriesDataType)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_IN_MINVALUE_S_BC092694, + seriesDataType)); } } @@ -173,14 +182,18 @@ public void setFinal(Column finalResult) { case BOOLEAN: default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MinValue: %s", seriesDataType)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_IN_MINVALUE_S_BC092694, + seriesDataType)); } } // columnBuilder should be single in MinValueAccumulator @Override public void outputIntermediate(ColumnBuilder[] columnBuilders) { - checkArgument(columnBuilders.length == 1, "partialResult of MinValue should be 1"); + checkArgument( + columnBuilders.length == 1, + DataNodeQueryMessages.EXCEPTION_PARTIALRESULT_OF_MINVALUE_SHOULD_BE_1_C9DAF94D); if (!initResult) { columnBuilders[0].appendNull(); return; @@ -209,7 +222,9 @@ public void outputIntermediate(ColumnBuilder[] columnBuilders) { case BOOLEAN: default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MinValue: %s", seriesDataType)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_IN_MINVALUE_S_BC092694, + seriesDataType)); } } @@ -243,7 +258,9 @@ public void outputFinal(ColumnBuilder columnBuilder) { case BOOLEAN: default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in MinValue: %s", seriesDataType)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_IN_MINVALUE_S_BC092694, + seriesDataType)); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/SumAccumulator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/SumAccumulator.java index fb2b59acc4942..66928b24f9593 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/SumAccumulator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/SumAccumulator.java @@ -20,6 +20,7 @@ package org.apache.iotdb.db.queryengine.execution.aggregation; import org.apache.iotdb.calc.execution.aggregation.Accumulator; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.tsfile.block.column.Column; import org.apache.tsfile.block.column.ColumnBuilder; @@ -66,14 +67,19 @@ public void addInput(Column[] columns, BitMap bitMap) { case STRING: default: throw new UnSupportedDataTypeException( - String.format("Unsupported data type in aggregation AVG : %s", seriesDataType)); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_IN_AGGREGATION_AVG_S_D1DAD6A6, + seriesDataType)); } } // partialResult should be like: | partialSumValue1 | @Override public void addIntermediate(Column[] partialResult) { - checkArgument(partialResult.length == 1, "partialResult of Sum should be 1"); + checkArgument( + partialResult.length == 1, + DataNodeQueryMessages.EXCEPTION_PARTIALRESULT_OF_SUM_SHOULD_BE_1_40E85216); if (partialResult[0].isNull(0)) { return; } @@ -83,7 +89,8 @@ public void addIntermediate(Column[] partialResult) { @Override public void removeIntermediate(Column[] input) { - checkArgument(input.length == 1, "input of Sum should be 1"); + checkArgument( + input.length == 1, DataNodeQueryMessages.EXCEPTION_INPUT_OF_SUM_SHOULD_BE_1_D5C11EC8); if (input[0].isNull(0)) { return; } @@ -117,7 +124,9 @@ public void setFinal(Column finalResult) { // columnBuilder should be single in countAccumulator @Override public void outputIntermediate(ColumnBuilder[] columnBuilders) { - checkArgument(columnBuilders.length == 1, "partialResult of Sum should be 1"); + checkArgument( + columnBuilders.length == 1, + DataNodeQueryMessages.EXCEPTION_PARTIALRESULT_OF_SUM_SHOULD_BE_1_40E85216); if (!initResult) { columnBuilders[0].appendNull(); } else { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/TreeAggregator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/TreeAggregator.java index 07b482bbdfb1f..0616187440fd2 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/TreeAggregator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/TreeAggregator.java @@ -22,6 +22,7 @@ import org.apache.iotdb.calc.execution.aggregation.Accumulator; import org.apache.iotdb.calc.metric.QueryExecutionMetricSet; import org.apache.iotdb.commons.queryengine.plan.planner.plan.parameter.InputLocation; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.planner.plan.parameter.AggregationStep; import org.apache.tsfile.block.column.Column; @@ -69,14 +70,16 @@ public void processTsBlock(TsBlock tsBlock, BitMap bitMap) { try { checkArgument( step.isInputRaw(), - "Step in SeriesAggregateScanOperator and RawDataAggregateOperator can only process raw input"); + DataNodeQueryMessages + .EXCEPTION_STEP_IN_SERIESAGGREGATESCANOPERATOR_AND_RAWDATAAGGREGATEOPERATOR_CAN_ONLY_PROCES_5575BD95); for (InputLocation[] inputLocations : inputLocationList) { Column[] timeAndValueColumn = new Column[1 + inputLocations.length]; timeAndValueColumn[0] = tsBlock.getTimeColumn(); for (int i = 0; i < inputLocations.length; i++) { checkArgument( inputLocations[i].getTsBlockIndex() == 0, - "RawDataAggregateOperator can only process one tsBlock input."); + DataNodeQueryMessages + .EXCEPTION_RAWDATAAGGREGATEOPERATOR_CAN_ONLY_PROCESS_ONE_TSBLOCK_INPUT_DOT_5ABCB8C0); int index = inputLocations[i].getValueColumnIndex(); // for count_time, time column is also its value column // for max_by, the input column can also be time column. @@ -95,9 +98,14 @@ public void processTsBlock(TsBlock tsBlock, BitMap bitMap) { public void processTsBlocks(TsBlock[] tsBlock) { long startTime = System.nanoTime(); try { - checkArgument(!step.isInputRaw(), "Step in AggregateOperator cannot process raw input"); + checkArgument( + !step.isInputRaw(), + DataNodeQueryMessages + .EXCEPTION_STEP_IN_AGGREGATEOPERATOR_CANNOT_PROCESS_RAW_INPUT_22620F61); if (step.isInputFinal()) { - checkArgument(inputLocationList.size() == 1, "Final output can only be single column"); + checkArgument( + inputLocationList.size() == 1, + DataNodeQueryMessages.EXCEPTION_FINAL_OUTPUT_CAN_ONLY_BE_SINGLE_COLUMN_6D82F9E0); Column finalResult = tsBlock[inputLocationList.get(0)[0].getTsBlockIndex()].getColumn( inputLocationList.get(0)[0].getValueColumnIndex()); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/UDAFAccumulator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/UDAFAccumulator.java index a9e567f8694c3..a4a8e1a81f90a 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/UDAFAccumulator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/UDAFAccumulator.java @@ -23,6 +23,7 @@ import org.apache.iotdb.calc.transformation.dag.udf.UDFParametersFactory; import org.apache.iotdb.commons.queryengine.plan.udf.UDFManagementService; import org.apache.iotdb.commons.udf.utils.UDFDataTypeTransformer; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.expression.Expression; import org.apache.iotdb.udf.api.State; import org.apache.iotdb.udf.api.UDAF; @@ -131,7 +132,9 @@ public void addInput(Column[] columns, BitMap bitMap) { @Override public void addIntermediate(Column[] partialResult) { - checkArgument(partialResult.length == 1, "partialResult of UDAF should be 1"); + checkArgument( + partialResult.length == 1, + DataNodeQueryMessages.EXCEPTION_PARTIALRESULT_OF_UDAF_SHOULD_BE_1_E094029D); State otherState = udaf.createState(); Binary otherStateBinary = partialResult[0].getBinary(0); @@ -156,7 +159,9 @@ public void setFinal(Column finalResult) { @Override public void outputIntermediate(ColumnBuilder[] columnBuilders) { - checkArgument(columnBuilders.length == 1, "partialResult of UDAF should be 1"); + checkArgument( + columnBuilders.length == 1, + DataNodeQueryMessages.EXCEPTION_PARTIALRESULT_OF_UDAF_SHOULD_BE_1_E094029D); byte[] bytes = state.serialize(); columnBuilders[0].writeBinary(new Binary(bytes)); @@ -170,7 +175,9 @@ public void outputFinal(ColumnBuilder columnBuilder) { @Override public void removeIntermediate(Column[] partialResult) { - checkArgument(partialResult.length == 1, "partialResult of UDAF should be 1"); + checkArgument( + partialResult.length == 1, + DataNodeQueryMessages.EXCEPTION_PARTIALRESULT_OF_UDAF_SHOULD_BE_1_E094029D); State removedState = udaf.createState(); Binary removedStateBinary = partialResult[0].getBinary(0); @@ -205,12 +212,15 @@ public TSDataType getFinalType() { private void onError(String methodName, Exception e) { LOGGER.warn( - "Error occurred during executing UDAF, please check whether the implementation of UDF is correct according to the udf-api description.", + DataNodeQueryMessages + .ERROR_OCCURRED_DURING_EXECUTING_UDAF_PLEASE_CHECK_WHETHER_THE_IMPLEMENTATION_OF_UDF_IS, e); throw new RuntimeException( String.format( - "Error occurred during executing UDAF#%s: %s, please check whether the implementation of UDF is correct according to the udf-api description.", - methodName, System.lineSeparator()) + DataNodeQueryMessages + .QUERY_EXCEPTION_ERROR_OCCURRED_DURING_EXECUTING_UDAF_S_S_PLEASE_CHECK_WHETHER_9E9D20C6, + methodName, + System.lineSeparator()) + e); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/slidingwindow/SlidingWindowAggregator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/slidingwindow/SlidingWindowAggregator.java index c34306ad83b62..6d4fbbfc65e4f 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/slidingwindow/SlidingWindowAggregator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/slidingwindow/SlidingWindowAggregator.java @@ -21,6 +21,7 @@ import org.apache.iotdb.calc.execution.aggregation.Accumulator; import org.apache.iotdb.commons.queryengine.plan.planner.plan.parameter.InputLocation; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.execution.aggregation.TreeAggregator; import org.apache.iotdb.db.queryengine.plan.planner.plan.parameter.AggregationStep; @@ -53,14 +54,16 @@ protected SlidingWindowAggregator( public void processTsBlock(TsBlock tsBlock) { checkArgument( step.isInputPartial(), - "Step in SlidingWindowAggregationOperator can only process partial result"); + DataNodeQueryMessages + .EXCEPTION_STEP_IN_SLIDINGWINDOWAGGREGATIONOPERATOR_CAN_ONLY_PROCESS_PARTIAL_RESULT_E221A2C5); Column timeColumn = tsBlock.getTimeColumn(); Column[] valueColumn = new Column[inputLocationList.get(0).length]; for (int i = 0; i < inputLocationList.get(0).length; i++) { InputLocation inputLocation = inputLocationList.get(0)[i]; checkArgument( inputLocation.getTsBlockIndex() == 0, - "SlidingWindowAggregationOperator can only process one tsBlock input."); + DataNodeQueryMessages + .EXCEPTION_SLIDINGWINDOWAGGREGATIONOPERATOR_CAN_ONLY_PROCESS_ONE_TSBLOCK_INPUT_DOT_7B9FCAB7); valueColumn[i] = tsBlock.getColumn(inputLocation.getValueColumnIndex()); } processPartialResult(new PartialAggregationResult(timeColumn, valueColumn)); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/timerangeiterator/AggrWindowIterator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/timerangeiterator/AggrWindowIterator.java index 5e82e01151b7f..19eb646ed11f5 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/timerangeiterator/AggrWindowIterator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/aggregation/timerangeiterator/AggrWindowIterator.java @@ -21,6 +21,7 @@ import org.apache.iotdb.commons.queryengine.utils.DateTimeUtils; import org.apache.iotdb.commons.queryengine.utils.TimestampPrecisionUtils; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.tsfile.read.common.TimeRange; import org.apache.tsfile.utils.TimeDuration; @@ -165,7 +166,8 @@ public boolean hasNextTimeRange() { if (slidingStep.containsMonth()) { // group by month doesn't support ascending. throw new UnsupportedOperationException( - "Ascending is not supported when sliding step contains month."); + DataNodeQueryMessages + .QUERY_EXCEPTION_ASCENDING_IS_NOT_SUPPORTED_WHEN_SLIDING_STEP_CONTAINS_MONTH_3446C0DC); } else { retStartTime = curStartTime - slidingStep.nonMonthDuration; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/driver/DataDriver.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/driver/DataDriver.java index 872d39901b3d3..6b129549b0921 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/driver/DataDriver.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/driver/DataDriver.java @@ -67,7 +67,9 @@ protected boolean init(SettableFuture blockedFuture) { } } catch (Throwable t) { LOGGER.error( - "Failed to do the initialization for driver {} ", driverContext.getDriverTaskID(), t); + DataNodeQueryMessages.FAILED_TO_DO_THE_INITIALIZATION_FOR_DRIVER_ARG, + driverContext.getDriverTaskID(), + t); driverContext.failed(t); blockedFuture.setException(t); throwIfUnchecked(t); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/driver/Driver.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/driver/Driver.java index d988e212a3a43..3d76cfd84f492 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/driver/Driver.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/driver/Driver.java @@ -24,6 +24,7 @@ import org.apache.iotdb.commons.exception.IoTDBRuntimeException; import org.apache.iotdb.commons.utils.FileUtils; import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.execution.exchange.sink.ISink; import org.apache.iotdb.db.queryengine.execution.operator.OperatorContext; import org.apache.iotdb.db.queryengine.execution.schedule.task.DriverTaskId; @@ -82,8 +83,9 @@ protected enum State { } protected Driver(Operator root, DriverContext driverContext) { - checkNotNull(root, "root Operator should not be null"); - checkNotNull(driverContext.getSink(), "Sink should not be null"); + checkNotNull(root, DataNodeQueryMessages.EXCEPTION_ROOT_OPERATOR_SHOULD_NOT_BE_NULL_F4890A7A); + checkNotNull( + driverContext.getSink(), DataNodeQueryMessages.EXCEPTION_SINK_SHOULD_NOT_BE_NULL_3CC4F006); this.driverContext = driverContext; this.root = root; this.sink = driverContext.getSink(); @@ -264,9 +266,12 @@ private ListenableFuture processInternal() { // Driver thread was interrupted which should only happen if the task is already finished. // If this becomes the actual cause of a failed query there is a bug in the task state // machine. - Exception exception = new Exception("Interrupted By"); + Exception exception = + new Exception(DataNodeQueryMessages.QUERY_EXCEPTION_INTERRUPTED_BY_92FAED2D); exception.setStackTrace(interrupterStack.toArray(new StackTraceElement[0])); - RuntimeException newException = new RuntimeException("Driver was interrupted", exception); + RuntimeException newException = + new RuntimeException( + DataNodeQueryMessages.QUERY_EXCEPTION_DRIVER_WAS_INTERRUPTED_737358E4, exception); newException.addSuppressed(actualCause); driverContext.failed(newException); throw newException; @@ -372,7 +377,7 @@ private Optional tryWithLock( throw new AssertionError(failure); } - verify(result != null, "result is null"); + verify(result != null, DataNodeQueryMessages.EXCEPTION_RESULT_IS_NULL_031E2F89); return Optional.of(result); } @@ -510,7 +515,9 @@ public boolean isHeldByCurrentThread() { } public boolean tryLock(boolean currentThreadInterruptionAllowed) { - checkState(!lock.isHeldByCurrentThread(), "Lock is not reentrant"); + checkState( + !lock.isHeldByCurrentThread(), + DataNodeQueryMessages.EXCEPTION_LOCK_IS_NOT_REENTRANT_7967C13E); boolean acquired = lock.tryLock(); if (acquired) { setOwner(currentThreadInterruptionAllowed); @@ -520,7 +527,9 @@ public boolean tryLock(boolean currentThreadInterruptionAllowed) { public boolean tryLock(long timeout, TimeUnit unit, boolean currentThreadInterruptionAllowed) throws InterruptedException { - checkState(!lock.isHeldByCurrentThread(), "Lock is not reentrant"); + checkState( + !lock.isHeldByCurrentThread(), + DataNodeQueryMessages.EXCEPTION_LOCK_IS_NOT_REENTRANT_7967C13E); boolean acquired = lock.tryLock(timeout, unit); if (acquired) { setOwner(currentThreadInterruptionAllowed); @@ -529,7 +538,9 @@ public boolean tryLock(long timeout, TimeUnit unit, boolean currentThreadInterru } private synchronized void setOwner(boolean interruptionAllowed) { - checkState(lock.isHeldByCurrentThread(), "Current thread does not hold lock"); + checkState( + lock.isHeldByCurrentThread(), + DataNodeQueryMessages.EXCEPTION_CURRENT_THREAD_DOES_NOT_HOLD_LOCK_68FFB1D9); currentOwner = Thread.currentThread(); currentOwnerInterruptionAllowed = interruptionAllowed; // NOTE: We do not use interrupted stack information to know that another @@ -540,7 +551,9 @@ private synchronized void setOwner(boolean interruptionAllowed) { } public synchronized void unlock() { - checkState(lock.isHeldByCurrentThread(), "Current thread does not hold lock"); + checkState( + lock.isHeldByCurrentThread(), + DataNodeQueryMessages.EXCEPTION_CURRENT_THREAD_DOES_NOT_HOLD_LOCK_68FFB1D9); currentOwner = null; currentOwnerInterruptionAllowed = false; lock.unlock(); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/exchange/MPPDataExchangeManager.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/exchange/MPPDataExchangeManager.java index 263d027e3e628..2d3447dee69fb 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/exchange/MPPDataExchangeManager.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/exchange/MPPDataExchangeManager.java @@ -107,7 +107,7 @@ public TGetDataBlockResponse getDataBlock(TGetDataBlockRequest req) throws TExce req.sourceFragmentInstanceId.instanceId))) { if (LOGGER.isDebugEnabled()) { LOGGER.debug( - "[ProcessGetTsBlockRequest] sequence ID in [{}, {})", + DataNodeQueryMessages.PROCESSGETTSBLOCKREQUEST_SEQUENCE_ID_IN_ARG_ARG, req.getStartSequenceId(), req.getEndSequenceId()); } @@ -150,7 +150,8 @@ public void onAcknowledgeDataBlockEvent(TAcknowledgeDataBlockEvent e) { e.sourceFragmentInstanceId.instanceId))) { if (LOGGER.isDebugEnabled()) { LOGGER.debug( - "Received AcknowledgeDataBlockEvent for TsBlocks whose sequence ID are in [{}, {}) from {}.", + DataNodeQueryMessages + .RECEIVED_ACKNOWLEDGEDATABLOCKEVENT_FOR_TSBLOCKS_WHOSE_SEQUENCE_ID_ARE_IN_ARG_ARG_FROM, e.getStartSequenceId(), e.getEndSequenceId(), e.getSourceFragmentInstanceId()); @@ -159,7 +160,8 @@ public void onAcknowledgeDataBlockEvent(TAcknowledgeDataBlockEvent e) { if (sinkHandle == null) { if (LOGGER.isDebugEnabled()) { LOGGER.debug( - "received ACK event but target FragmentInstance[{}] is not found.", + DataNodeQueryMessages + .RECEIVED_ACK_EVENT_BUT_TARGET_FRAGMENTINSTANCE_ARG_IS_NOT_FOUND, e.getSourceFragmentInstanceId()); } return; @@ -192,7 +194,7 @@ public void onCloseSinkChannelEvent(TCloseSinkChannelEvent e) throws TException e.sourceFragmentInstanceId.instanceId))) { if (LOGGER.isDebugEnabled()) { LOGGER.debug( - "Closed source handle of ShuffleSinkHandle {}, channel index: {}.", + DataNodeQueryMessages.CLOSED_SOURCE_HANDLE_OF_SHUFFLESINKHANDLE_ARG_CHANNEL_INDEX_ARG, e.getSourceFragmentInstanceId(), e.getIndex()); } @@ -201,7 +203,8 @@ public void onCloseSinkChannelEvent(TCloseSinkChannelEvent e) throws TException if (sinkHandle == null) { if (LOGGER.isDebugEnabled()) { LOGGER.debug( - "received CloseSinkChannelEvent but target FragmentInstance[{}] is not found.", + DataNodeQueryMessages + .RECEIVED_CLOSESINKCHANNELEVENT_BUT_TARGET_FRAGMENTINSTANCE_ARG_IS_NOT_FOUND, e.getSourceFragmentInstanceId()); } return; @@ -224,7 +227,7 @@ public void onNewDataBlockEvent(TNewDataBlockEvent e) throws TException { new SetThreadName(createFullIdFrom(e.targetFragmentInstanceId, e.targetPlanNodeId))) { if (LOGGER.isDebugEnabled()) { LOGGER.debug( - "New data block event received, for plan node {} of {} from {}.", + DataNodeQueryMessages.NEW_DATA_BLOCK_EVENT_RECEIVED_FOR_PLAN_NODE_ARG_OF_ARG_FROM_ARG, e.getTargetPlanNodeId(), e.getTargetFragmentInstanceId(), e.getSourceFragmentInstanceId()); @@ -244,7 +247,8 @@ public void onNewDataBlockEvent(TNewDataBlockEvent e) throws TException { // FragmentInstance may be finished, although the upstream is still working. if (LOGGER.isDebugEnabled()) { LOGGER.debug( - "received NewDataBlockEvent but the downstream FragmentInstance[{}] is not found", + DataNodeQueryMessages + .RECEIVED_NEWDATABLOCKEVENT_BUT_THE_DOWNSTREAM_FRAGMENTINSTANCE_ARG_IS_NOT_FOUND, e.getTargetFragmentInstanceId()); } return; @@ -265,7 +269,8 @@ public void onEndOfDataBlockEvent(TEndOfDataBlockEvent e) throws TException { new SetThreadName(createFullIdFrom(e.targetFragmentInstanceId, e.targetPlanNodeId))) { if (LOGGER.isDebugEnabled()) { LOGGER.debug( - "End of data block event received, for plan node {} of {} from {}.", + DataNodeQueryMessages + .END_OF_DATA_BLOCK_EVENT_RECEIVED_FOR_PLAN_NODE_ARG_OF_ARG_FROM_ARG, e.getTargetPlanNodeId(), e.getTargetFragmentInstanceId(), e.getSourceFragmentInstanceId()); @@ -281,7 +286,8 @@ public void onEndOfDataBlockEvent(TEndOfDataBlockEvent e) throws TException { if (sourceHandle == null || sourceHandle.isAborted() || sourceHandle.isFinished()) { if (LOGGER.isDebugEnabled()) { LOGGER.debug( - "received onEndOfDataBlockEvent but the downstream FragmentInstance[{}] is not found", + DataNodeQueryMessages + .RECEIVED_ONENDOFDATABLOCKEVENT_BUT_THE_DOWNSTREAM_FRAGMENTINSTANCE_ARG_IS_NOT_FOUND, e.getTargetFragmentInstanceId()); } return; @@ -590,13 +596,22 @@ public MPPDataExchangeManager( ExecutorService executorService, IClientManager mppDataExchangeServiceClientManager) { - this.localMemoryManager = Validate.notNull(localMemoryManager, "localMemoryManager is null."); + this.localMemoryManager = + Validate.notNull( + localMemoryManager, + DataNodeQueryMessages.EXCEPTION_LOCALMEMORYMANAGER_IS_NULL_DOT_69FE497A); this.tsBlockSerdeFactory = - Validate.notNull(tsBlockSerdeFactory, "tsBlockSerdeFactory is null."); - this.executorService = Validate.notNull(executorService, "executorService is null."); + Validate.notNull( + tsBlockSerdeFactory, + DataNodeQueryMessages.EXCEPTION_TSBLOCKSERDEFACTORY_IS_NULL_DOT_32EB5BD2); + this.executorService = + Validate.notNull( + executorService, DataNodeQueryMessages.EXCEPTION_EXECUTORSERVICE_IS_NULL_DOT_7B057909); this.mppDataExchangeServiceClientManager = Validate.notNull( - mppDataExchangeServiceClientManager, "mppDataExchangeServiceClientManager is null."); + mppDataExchangeServiceClientManager, + DataNodeQueryMessages + .EXCEPTION_MPPDATAEXCHANGESERVICECLIENTMANAGER_IS_NULL_DOT_F31E746C); sourceHandles = new ConcurrentHashMap<>(); shuffleSinkHandles = new ConcurrentHashMap<>(); } @@ -928,7 +943,7 @@ public ISourceHandle createSourceHandle( if (LOGGER.isDebugEnabled()) { LOGGER.debug( - "Create source handle from {} for plan node {} of {}", + DataNodeQueryMessages.CREATE_SOURCE_HANDLE_FROM_ARG_FOR_PLAN_NODE_ARG_OF_ARG, remoteFragmentInstanceId, localPlanNodeId, localFragmentInstanceId); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/exchange/SharedTsBlockQueue.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/exchange/SharedTsBlockQueue.java index b248e743f4fb3..5812d4e37cdd3 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/exchange/SharedTsBlockQueue.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/exchange/SharedTsBlockQueue.java @@ -109,13 +109,22 @@ public SharedTsBlockQueue( ExecutorService executorService, boolean isHighestPriority) { this.localFragmentInstanceId = - Validate.notNull(fragmentInstanceId, "fragment instance ID cannot be null"); + Validate.notNull( + fragmentInstanceId, + DataNodeQueryMessages.EXCEPTION_FRAGMENT_INSTANCE_ID_CANNOT_BE_NULL_4BE84F40); this.fullFragmentInstanceId = FragmentInstanceId.createFragmentInstanceIdFromTFragmentInstanceId(localFragmentInstanceId); - this.localPlanNodeId = Validate.notNull(planNodeId, "PlanNode ID cannot be null"); + this.localPlanNodeId = + Validate.notNull( + planNodeId, DataNodeQueryMessages.EXCEPTION_PLANNODE_ID_CANNOT_BE_NULL_F91303CD); this.localMemoryManager = - Validate.notNull(localMemoryManager, "local memory manager cannot be null"); - this.executorService = Validate.notNull(executorService, "ExecutorService can not be null."); + Validate.notNull( + localMemoryManager, + DataNodeQueryMessages.EXCEPTION_LOCAL_MEMORY_MANAGER_CANNOT_BE_NULL_54701481); + this.executorService = + Validate.notNull( + executorService, + DataNodeQueryMessages.EXCEPTION_EXECUTORSERVICE_CAN_NOT_BE_NULL_DOT_220C966B); this.isHighestPriority = isHighestPriority; } @@ -248,9 +257,10 @@ public ListenableFuture add(TsBlock tsBlock) { return immediateVoidFuture(); } - Validate.notNull(tsBlock, "TsBlock cannot be null"); + Validate.notNull(tsBlock, DataNodeQueryMessages.EXCEPTION_TSBLOCK_CANNOT_BE_NULL_E7EA3BDA); Validate.isTrue( - blockedOnMemory == null || blockedOnMemory.isDone(), "SharedTsBlockQueue is full"); + blockedOnMemory == null || blockedOnMemory.isDone(), + DataNodeQueryMessages.EXCEPTION_SHAREDTSBLOCKQUEUE_IS_FULL_87493E26); if (!alreadyRegistered) { localMemoryManager .getQueryPool() diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/exchange/sink/LocalSinkChannel.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/exchange/sink/LocalSinkChannel.java index ab2b1be6b05c0..90f213f40b408 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/exchange/sink/LocalSinkChannel.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/exchange/sink/LocalSinkChannel.java @@ -65,8 +65,12 @@ public class LocalSinkChannel implements ISinkChannel { + RamUsageEstimator.shallowSizeOfInstance(SharedTsBlockQueue.class); public LocalSinkChannel(SharedTsBlockQueue queue, SinkListener sinkListener) { - this.sinkListener = Validate.notNull(sinkListener, "sinkListener can not be null."); - this.queue = Validate.notNull(queue, "queue can not be null."); + this.sinkListener = + Validate.notNull( + sinkListener, + DataNodeQueryMessages.EXCEPTION_SINKLISTENER_CAN_NOT_BE_NULL_DOT_32C9E7C0); + this.queue = + Validate.notNull(queue, DataNodeQueryMessages.EXCEPTION_QUEUE_CAN_NOT_BE_NULL_DOT_9BB286B1); this.queue.setSinkChannel(this); blocked = queue.getCanAddTsBlock(); } @@ -76,9 +80,15 @@ public LocalSinkChannel( SharedTsBlockQueue queue, SinkListener sinkListener) { this.localFragmentInstanceId = - Validate.notNull(localFragmentInstanceId, "localFragmentInstanceId can not be null."); - this.sinkListener = Validate.notNull(sinkListener, "sinkListener can not be null."); - this.queue = Validate.notNull(queue, "queue can not be null."); + Validate.notNull( + localFragmentInstanceId, + DataNodeQueryMessages.EXCEPTION_LOCALFRAGMENTINSTANCEID_CAN_NOT_BE_NULL_DOT_37F5917D); + this.sinkListener = + Validate.notNull( + sinkListener, + DataNodeQueryMessages.EXCEPTION_SINKLISTENER_CAN_NOT_BE_NULL_DOT_32C9E7C0); + this.queue = + Validate.notNull(queue, DataNodeQueryMessages.EXCEPTION_QUEUE_CAN_NOT_BE_NULL_DOT_9BB286B1); this.queue.setSinkChannel(this); // SinkChannel can send data after SourceHandle asks it to blocked = queue.getCanAddTsBlock(); @@ -134,7 +144,7 @@ public void checkAndInvokeOnFinished() { public void send(TsBlock tsBlock) { long startTime = System.nanoTime(); try { - Validate.notNull(tsBlock, "tsBlocks is null"); + Validate.notNull(tsBlock, DataNodeQueryMessages.EXCEPTION_TSBLOCKS_IS_NULL_02287FD8); synchronized (this) { checkState(); if (closed) { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/exchange/sink/ShuffleSinkHandle.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/exchange/sink/ShuffleSinkHandle.java index 6b4c485d9b53a..11c9d4d36bfa6 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/exchange/sink/ShuffleSinkHandle.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/exchange/sink/ShuffleSinkHandle.java @@ -83,12 +83,21 @@ public ShuffleSinkHandle( ShuffleStrategyEnum shuffleStrategyEnum, MPPDataExchangeManager.SinkListener sinkListener) { this.localFragmentInstanceId = - Validate.notNull(localFragmentInstanceId, "localFragmentInstanceId can not be null."); + Validate.notNull( + localFragmentInstanceId, + DataNodeQueryMessages.EXCEPTION_LOCALFRAGMENTINSTANCEID_CAN_NOT_BE_NULL_DOT_37F5917D); this.downStreamChannelList = - Validate.notNull(downStreamChannelList, "downStreamChannelList can not be null."); + Validate.notNull( + downStreamChannelList, + DataNodeQueryMessages.EXCEPTION_DOWNSTREAMCHANNELLIST_CAN_NOT_BE_NULL_DOT_417AD5A3); this.downStreamChannelIndex = - Validate.notNull(downStreamChannelIndex, "downStreamChannelIndex can not be null."); - this.sinkListener = Validate.notNull(sinkListener, "sinkListener can not be null."); + Validate.notNull( + downStreamChannelIndex, + DataNodeQueryMessages.EXCEPTION_DOWNSTREAMCHANNELINDEX_CAN_NOT_BE_NULL_DOT_A1D5A266); + this.sinkListener = + Validate.notNull( + sinkListener, + DataNodeQueryMessages.EXCEPTION_SINKLISTENER_CAN_NOT_BE_NULL_DOT_32C9E7C0); this.channelNum = downStreamChannelList.size(); this.shuffleStrategy = getShuffleStrategy(shuffleStrategyEnum); this.hasSetNoMoreTsBlocks = new boolean[channelNum]; @@ -328,7 +337,8 @@ public void shuffle() { // do nothing if (LOGGER.isDebugEnabled()) { LOGGER.debug( - "PlainShuffleStrategy needs to do nothing, current channel index is {}", + DataNodeQueryMessages + .PLAINSHUFFLESTRATEGY_NEEDS_TO_DO_NOTHING_CURRENT_CHANNEL_INDEX_IS_ARG, downStreamChannelIndex.getCurrentIndex()); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/exchange/sink/SinkChannel.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/exchange/sink/SinkChannel.java index 1cf5254004fa0..ec6c9c680a1b5 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/exchange/sink/SinkChannel.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/exchange/sink/SinkChannel.java @@ -174,20 +174,42 @@ public SinkChannel( boolean isHighestPriority, IClientManager mppDataExchangeServiceClientManager) { - this.remoteEndpoint = Validate.notNull(remoteEndpoint, "remoteEndPoint can not be null."); + this.remoteEndpoint = + Validate.notNull( + remoteEndpoint, + DataNodeQueryMessages.EXCEPTION_REMOTEENDPOINT_CAN_NOT_BE_NULL_DOT_83488ACF); this.remoteFragmentInstanceId = - Validate.notNull(remoteFragmentInstanceId, "remoteFragmentInstanceId can not be null."); - this.remotePlanNodeId = Validate.notNull(remotePlanNodeId, "remotePlanNodeId can not be null."); - this.localPlanNodeId = Validate.notNull(localPlanNodeId, "localPlanNodeId can not be null."); + Validate.notNull( + remoteFragmentInstanceId, + DataNodeQueryMessages.EXCEPTION_REMOTEFRAGMENTINSTANCEID_CAN_NOT_BE_NULL_DOT_C2449A29); + this.remotePlanNodeId = + Validate.notNull( + remotePlanNodeId, + DataNodeQueryMessages.EXCEPTION_REMOTEPLANNODEID_CAN_NOT_BE_NULL_DOT_03956DE2); + this.localPlanNodeId = + Validate.notNull( + localPlanNodeId, + DataNodeQueryMessages.EXCEPTION_LOCALPLANNODEID_CAN_NOT_BE_NULL_DOT_44A34A33); this.localFragmentInstanceId = - Validate.notNull(localFragmentInstanceId, "localFragmentInstanceId can not be null."); + Validate.notNull( + localFragmentInstanceId, + DataNodeQueryMessages.EXCEPTION_LOCALFRAGMENTINSTANCEID_CAN_NOT_BE_NULL_DOT_37F5917D); this.fullFragmentInstanceId = FragmentInstanceId.createFragmentInstanceIdFromTFragmentInstanceId(localFragmentInstanceId); this.localMemoryManager = - Validate.notNull(localMemoryManager, "localMemoryManager can not be null."); - this.executorService = Validate.notNull(executorService, "executorService can not be null."); - this.serde = Validate.notNull(serde, "serde can not be null."); - this.sinkListener = Validate.notNull(sinkListener, "sinkListener can not be null."); + Validate.notNull( + localMemoryManager, + DataNodeQueryMessages.EXCEPTION_LOCALMEMORYMANAGER_CAN_NOT_BE_NULL_DOT_7A46C6CE); + this.executorService = + Validate.notNull( + executorService, + DataNodeQueryMessages.EXCEPTION_EXECUTORSERVICE_CAN_NOT_BE_NULL_DOT_BC459BD4); + this.serde = + Validate.notNull(serde, DataNodeQueryMessages.EXCEPTION_SERDE_CAN_NOT_BE_NULL_DOT_D46F66E7); + this.sinkListener = + Validate.notNull( + sinkListener, + DataNodeQueryMessages.EXCEPTION_SINKLISTENER_CAN_NOT_BE_NULL_DOT_32C9E7C0); this.isHighestPriority = isHighestPriority; this.mppDataExchangeServiceClientManager = mppDataExchangeServiceClientManager; this.retryIntervalInMs = DEFAULT_RETRY_INTERVAL_IN_MS; @@ -223,7 +245,7 @@ private void submitSendNewDataBlockEventTask(int startSequenceId, List blo public synchronized void send(TsBlock tsBlock) { long startTime = System.nanoTime(); try { - Validate.notNull(tsBlock, "tsBlocks is null"); + Validate.notNull(tsBlock, DataNodeQueryMessages.EXCEPTION_TSBLOCKS_IS_NULL_02287FD8); if (closed) { // SinkChannel may have been closed by its downstream SourceHandle return; @@ -376,7 +398,8 @@ public synchronized ByteBuffer getSerializedTsBlock(int sequenceId) throws IOExc if (aborted || closed) { if (LOGGER.isDebugEnabled()) { LOGGER.debug( - "SinkChannel still receive getting TsBlock request after being aborted={} or closed={}", + DataNodeQueryMessages + .SINKCHANNEL_STILL_RECEIVE_GETTING_TSBLOCK_REQUEST_AFTER_BEING_ABORTED_ARG_OR_CLOSED_ARG, aborted, closed); } @@ -521,9 +544,10 @@ class SendNewDataBlockEventTask implements Runnable { SendNewDataBlockEventTask(int startSequenceId, List blockSizes) { Validate.isTrue( startSequenceId >= 0, - "Start sequence ID should be greater than or equal to zero, but was: " + DataNodeQueryMessages + .EXCEPTION_START_SEQUENCE_ID_SHOULD_BE_GREATER_THAN_OR_EQUAL_TO_ZERO_COMMA_BUT_WAS_COLON_4D2D708E + startSequenceId - + "."); + + DataNodeQueryMessages.EXCEPTION_DOT_9D9B854A); this.startSequenceId = startSequenceId; this.blockSizes = Validate.notNull(blockSizes); } @@ -533,7 +557,7 @@ public void run() { try (SetThreadName sinkChannelName = new SetThreadName(threadName)) { if (LOGGER.isDebugEnabled()) { LOGGER.debug( - "[NotifyNewTsBlock] [{}, {}) to {}.{}", + DataNodeQueryMessages.NOTIFYNEWTSBLOCK_ARG_ARG_TO_ARG_ARG, startSequenceId, startSequenceId + blockSizes.size(), remoteFragmentInstanceId, diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/exchange/source/LocalSourceHandle.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/exchange/source/LocalSourceHandle.java index 58562733f8cea..544421712669a 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/exchange/source/LocalSourceHandle.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/exchange/source/LocalSourceHandle.java @@ -73,10 +73,13 @@ public class LocalSourceHandle implements ISourceHandle { public LocalSourceHandle( SharedTsBlockQueue queue, SourceHandleListener sourceHandleListener, String threadName) { - this.queue = Validate.notNull(queue, "queue can not be null."); + this.queue = + Validate.notNull(queue, DataNodeQueryMessages.EXCEPTION_QUEUE_CAN_NOT_BE_NULL_DOT_9BB286B1); this.queue.setSourceHandle(this); this.sourceHandleListener = - Validate.notNull(sourceHandleListener, "sourceHandleListener can not be null."); + Validate.notNull( + sourceHandleListener, + DataNodeQueryMessages.EXCEPTION_SOURCEHANDLELISTENER_CAN_NOT_BE_NULL_DOT_01817F52); this.threadName = threadName; } @@ -87,12 +90,20 @@ public LocalSourceHandle( SharedTsBlockQueue queue, SourceHandleListener sourceHandleListener) { this.localFragmentInstanceId = - Validate.notNull(localFragmentInstanceId, "localFragmentInstanceId can not be null."); - this.localPlanNodeId = Validate.notNull(localPlanNodeId, "localPlanNodeId can not be null."); - this.queue = Validate.notNull(queue, "queue can not be null."); + Validate.notNull( + localFragmentInstanceId, + DataNodeQueryMessages.EXCEPTION_LOCALFRAGMENTINSTANCEID_CAN_NOT_BE_NULL_DOT_37F5917D); + this.localPlanNodeId = + Validate.notNull( + localPlanNodeId, + DataNodeQueryMessages.EXCEPTION_LOCALPLANNODEID_CAN_NOT_BE_NULL_DOT_44A34A33); + this.queue = + Validate.notNull(queue, DataNodeQueryMessages.EXCEPTION_QUEUE_CAN_NOT_BE_NULL_DOT_9BB286B1); this.queue.setSourceHandle(this); this.sourceHandleListener = - Validate.notNull(sourceHandleListener, "sourceHandleListener can not be null."); + Validate.notNull( + sourceHandleListener, + DataNodeQueryMessages.EXCEPTION_SOURCEHANDLELISTENER_CAN_NOT_BE_NULL_DOT_01817F52); this.threadName = createFullIdFrom(localFragmentInstanceId, localPlanNodeId); } @@ -127,7 +138,9 @@ public TsBlock receive() { if (tsBlock != null) { if (LOGGER.isDebugEnabled()) { LOGGER.debug( - "[GetTsBlockFromQueue] TsBlock:{} size:{}", currSequenceId, tsBlock.getSizeInBytes()); + DataNodeQueryMessages.GETTSBLOCKFROMQUEUE_TSBLOCK_ARG_SIZE_ARG, + currSequenceId, + tsBlock.getSizeInBytes()); } currSequenceId++; } @@ -274,7 +287,9 @@ private void checkState() { } } throw new IllegalStateException( - DataNodeQueryMessages.LOCAL_SINK_CHANNEL_STATE_IS + (aborted ? "ABORTED" : "CLOSED")); + String.format( + DataNodeQueryMessages.LOCAL_SINK_CHANNEL_STATE_IS_WITH_STATE_FMT, + aborted ? DataNodeQueryMessages.STATE_ABORTED : DataNodeQueryMessages.STATE_CLOSED)); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/exchange/source/SourceHandle.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/exchange/source/SourceHandle.java index 762e0961ae8f4..4f90db0caed41 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/exchange/source/SourceHandle.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/exchange/source/SourceHandle.java @@ -171,21 +171,39 @@ public SourceHandle( boolean isHighestPriority, IClientManager mppDataExchangeServiceClientManager) { - this.remoteEndpoint = Validate.notNull(remoteEndpoint, "remoteEndpoint can not be null."); + this.remoteEndpoint = + Validate.notNull( + remoteEndpoint, + DataNodeQueryMessages.EXCEPTION_REMOTEENDPOINT_CAN_NOT_BE_NULL_DOT_DE2B5885); this.remoteFragmentInstanceId = - Validate.notNull(remoteFragmentInstanceId, "remoteFragmentInstanceId can not be null."); + Validate.notNull( + remoteFragmentInstanceId, + DataNodeQueryMessages.EXCEPTION_REMOTEFRAGMENTINSTANCEID_CAN_NOT_BE_NULL_DOT_C2449A29); this.localFragmentInstanceId = - Validate.notNull(localFragmentInstanceId, "localFragmentInstanceId can not be null."); + Validate.notNull( + localFragmentInstanceId, + DataNodeQueryMessages.EXCEPTION_LOCALFRAGMENTINSTANCEID_CAN_NOT_BE_NULL_DOT_37F5917D); this.fullFragmentInstanceId = FragmentInstanceId.createFragmentInstanceIdFromTFragmentInstanceId(localFragmentInstanceId); - this.localPlanNodeId = Validate.notNull(localPlanNodeId, "localPlanNodeId can not be null."); + this.localPlanNodeId = + Validate.notNull( + localPlanNodeId, + DataNodeQueryMessages.EXCEPTION_LOCALPLANNODEID_CAN_NOT_BE_NULL_DOT_44A34A33); this.indexOfUpstreamSinkHandle = indexOfUpstreamSinkHandle; this.localMemoryManager = - Validate.notNull(localMemoryManager, "localMemoryManager can not be null."); - this.executorService = Validate.notNull(executorService, "executorService can not be null."); - this.serde = Validate.notNull(serde, "serde can not be null."); + Validate.notNull( + localMemoryManager, + DataNodeQueryMessages.EXCEPTION_LOCALMEMORYMANAGER_CAN_NOT_BE_NULL_DOT_7A46C6CE); + this.executorService = + Validate.notNull( + executorService, + DataNodeQueryMessages.EXCEPTION_EXECUTORSERVICE_CAN_NOT_BE_NULL_DOT_BC459BD4); + this.serde = + Validate.notNull(serde, DataNodeQueryMessages.EXCEPTION_SERDE_CAN_NOT_BE_NULL_DOT_D46F66E7); this.sourceHandleListener = - Validate.notNull(sourceHandleListener, "sourceHandleListener can not be null."); + Validate.notNull( + sourceHandleListener, + DataNodeQueryMessages.EXCEPTION_SOURCEHANDLELISTENER_CAN_NOT_BE_NULL_DOT_01817F52); this.isHighestPriority = isHighestPriority; this.bufferRetainedSizeInBytes = 0L; this.mppDataExchangeServiceClientManager = mppDataExchangeServiceClientManager; @@ -368,7 +386,7 @@ public synchronized void updatePendingDataBlockInfo( int startSequenceId, List dataBlockSizes) { if (LOGGER.isDebugEnabled()) { LOGGER.debug( - "[ReceiveNewTsBlockNotification] [{}, {}), each size is: {}", + DataNodeQueryMessages.RECEIVENEWTSBLOCKNOTIFICATION_ARG_ARG_EACH_SIZE_IS_ARG, startSequenceId, startSequenceId + dataBlockSizes.size(), dataBlockSizes); @@ -561,17 +579,21 @@ class GetDataBlocksTask implements Runnable { GetDataBlocksTask(int startSequenceId, int endSequenceId, long reservedBytes) { Validate.isTrue( startSequenceId >= 0, - "Start sequence ID should be greater than or equal to zero. Start sequence ID: " + DataNodeQueryMessages + .EXCEPTION_START_SEQUENCE_ID_SHOULD_BE_GREATER_THAN_OR_EQUAL_TO_ZERO_DOT_START_SEQUENCE_ID__D3C0AAB7 + startSequenceId); this.startSequenceId = startSequenceId; Validate.isTrue( endSequenceId > startSequenceId, - "End sequence ID should be greater than the start sequence ID. Start sequence ID: " + DataNodeQueryMessages + .EXCEPTION_END_SEQUENCE_ID_SHOULD_BE_GREATER_THAN_THE_START_SEQUENCE_ID_DOT_START_SEQUENCE__DF1AA2A1 + startSequenceId - + ", end sequence ID: " + + DataNodeQueryMessages.EXCEPTION_COMMA_END_SEQUENCE_ID_COLON_DB1AF173 + endSequenceId); this.endSequenceId = endSequenceId; - Validate.isTrue(reservedBytes > 0L, "Reserved bytes should be greater than zero."); + Validate.isTrue( + reservedBytes > 0L, + DataNodeQueryMessages.EXCEPTION_RESERVED_BYTES_SHOULD_BE_GREATER_THAN_ZERO_DOT_64086BE5); this.reservedBytes = reservedBytes; } @@ -581,7 +603,7 @@ public void run() { try (SetThreadName sourceHandleName = new SetThreadName(threadName)) { if (LOGGER.isDebugEnabled()) { LOGGER.debug( - "[StartPullTsBlocksFromRemote] {}-{} [{}, {}) ", + DataNodeQueryMessages.STARTPULLTSBLOCKSFROMREMOTE_ARG_ARG_ARG_ARG, remoteFragmentInstanceId, indexOfUpstreamSinkHandle, startSequenceId, @@ -759,7 +781,7 @@ public void run() { try (SetThreadName sourceHandleName = new SetThreadName(threadName)) { if (LOGGER.isDebugEnabled()) { LOGGER.debug( - "[SendCloseSinkChannelEvent] to [ShuffleSinkHandle: {}, index: {}]).", + DataNodeQueryMessages.SENDCLOSESINKCHANNELEVENT_TO_SHUFFLESINKHANDLE_ARG_INDEX_ARG, remoteFragmentInstanceId, indexOfUpstreamSinkHandle); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/executor/RegionWriteExecutor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/executor/RegionWriteExecutor.java index 222e63614bddf..6fc521a7f724c 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/executor/RegionWriteExecutor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/executor/RegionWriteExecutor.java @@ -937,14 +937,17 @@ private RegionExecutionResult executeAlterTimeSeries( MeasurementPath measurementPath = schemaRegion.fetchMeasurementPath(node.getPath()); if (node.isAlterView() && !measurementPath.getMeasurementSchema().isLogicalView()) { throw new MetadataException( - String.format("%s is not view.", measurementPath.getFullPath())); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_S_IS_NOT_VIEW_B5840A3C, + measurementPath.getFullPath())); } if (node.getDataType() != null && !MetadataUtils.canAlter( measurementPath.getMeasurementSchema().getType(), node.getDataType())) { throw new MetadataException( String.format( - "The timeseries %s used new type %s is not compatible with the existing one %s.", + DataNodeQueryMessages + .QUERY_EXCEPTION_THE_TIMESERIES_S_USED_NEW_TYPE_S_IS_NOT_COMPATIBLE_WITH_455D4D4A, measurementPath.getFullPath(), node.getDataType(), measurementPath.getMeasurementSchema().getType())); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment/DataNodeQueryContext.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment/DataNodeQueryContext.java index 006dae117689f..ef6b60eec4dd2 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment/DataNodeQueryContext.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment/DataNodeQueryContext.java @@ -23,6 +23,7 @@ import org.apache.iotdb.commons.path.PartialPath; import org.apache.iotdb.commons.queryengine.plan.relational.metadata.QualifiedObjectName; import org.apache.iotdb.confignode.rpc.thrift.TTableInfo; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.protocol.client.ConfigNodeClient; import org.apache.iotdb.db.protocol.client.ConfigNodeClientManager; import org.apache.iotdb.db.protocol.client.ConfigNodeInfo; @@ -109,7 +110,9 @@ public Map> getDatabaseTableInfoMap() public void decreaseDeviceAndMayUpdateLastCache( QualifiedObjectName tableName, DeviceEntry deviceEntry, Integer initialCount) { - checkArgument(initialCount != null, "initialCount shouldn't be null here"); + checkArgument( + initialCount != null, + DataNodeQueryMessages.EXCEPTION_INITIALCOUNT_SHOULDN_QUOTE_T_BE_NULL_HERE_8B333953); Map>> deviceInfo = deviceCountAndMeasurementValues.computeIfAbsent(tableName, t -> new HashMap<>()); @@ -124,7 +127,8 @@ public void decreaseDeviceAndMayUpdateLastCache( public void addUnCachedDeviceIfAbsent( QualifiedObjectName tableName, DeviceEntry deviceEntry, Integer count) { - checkArgument(count != null, "count shouldn't be null here"); + checkArgument( + count != null, DataNodeQueryMessages.EXCEPTION_COUNT_SHOULDN_QUOTE_T_BE_NULL_HERE_1EBA9339); Map>> deviceInfo = deviceCountAndMeasurementValues.computeIfAbsent(tableName, t -> new HashMap<>()); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment/FragmentInstanceContext.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment/FragmentInstanceContext.java index 6bda6e9c14d6e..4e2bd681c4ccf 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment/FragmentInstanceContext.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment/FragmentInstanceContext.java @@ -826,7 +826,10 @@ public synchronized IQueryDataSource getSharedQueryDataSource() throws QueryProc break; default: throw new QueryProcessException( - "Unsupported query data source type: " + queryDataSourceType); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_UNSUPPORTED_QUERY_DATA_SOURCE_TYPE_S_7424E63F, + queryDataSourceType)); } } return sharedQueryDataSource; @@ -837,7 +840,7 @@ private IQueryDataSource getUnfinishedQueryDataSource() { // record warn log every 10 times retry if (initQueryDataSourceRetryCount % 10 == 0) { LOGGER.warn( - "Failed to acquire the read lock of DataRegion-{} for {} times", + DataNodeQueryMessages.FAILED_TO_ACQUIRE_THE_READ_LOCK_OF_DATAREGION_ARG_FOR_ARG_TIMES, dataRegion == null ? "UNKNOWN" : dataRegion.getDataRegionIdString(), initQueryDataSourceRetryCount); } @@ -937,7 +940,9 @@ public void releaseResourceWhenAllDriversAreClosed() { } catch (InterruptedException e) { Thread.currentThread().interrupt(); LOGGER.warn( - "Interrupted when await on allDriversClosed, FragmentInstance Id is {}", this.getId()); + DataNodeQueryMessages + .INTERRUPTED_WHEN_AWAIT_ON_ALLDRIVERSCLOSED_FRAGMENTINSTANCE_ID_IS_ARG, + this.getId()); } } long duration = System.nanoTime() - startTime; @@ -963,14 +968,16 @@ private void releaseTVListOwnedByQuery() { if (tvList.getOwnerQuery() == this) { if (tvList.getReservedMemoryBytes() != tvListRamSize) { LOGGER.warn( - "Release TVList owned by query: allocate size {}, release size {}", + DataNodeQueryMessages + .RELEASE_TVLIST_OWNED_BY_QUERY_ALLOCATE_SIZE_ARG_RELEASE_SIZE_ARG, tvList.getReservedMemoryBytes(), tvListRamSize); } if (queryContextSet.isEmpty()) { if (LOGGER.isDebugEnabled()) { LOGGER.debug( - "TVList {} is released by the query, FragmentInstance Id is {}", + DataNodeQueryMessages + .TVLIST_ARG_IS_RELEASED_BY_THE_QUERY_FRAGMENTINSTANCE_ID_IS_ARG, tvList, this.getId()); } @@ -990,12 +997,14 @@ private void releaseTVListOwnedByQuery() { .reserveMemoryVirtually(releasedBytes.left, releasedBytes.right); } catch (MemoryNotEnoughException ex) { LOGGER.warn( - "MemoryNotEnoughException when transferring TVList ownership from query {} to another query {}.", + DataNodeQueryMessages + .MEMORYNOTENOUGHEXCEPTION_WHEN_TRANSFERRING_TVLIST_OWNERSHIP_FROM_QUERY_ARG_TO_ANOTHER, this.getId(), queryContext.getId()); } catch (RuntimeException ex) { LOGGER.warn( - "Unexpected Exception when transferring TVList ownership from query {} to another query {}.", + DataNodeQueryMessages + .UNEXPECTED_EXCEPTION_WHEN_TRANSFERRING_TVLIST_OWNERSHIP_FROM_QUERY_ARG_TO_ANOTHER_QUERY, this.getId(), queryContext.getId(), ex); @@ -1003,7 +1012,8 @@ private void releaseTVListOwnedByQuery() { if (LOGGER.isDebugEnabled()) { LOGGER.debug( - "TVList {} is now owned by another query, FragmentInstance Id is {}", + DataNodeQueryMessages + .TVLIST_ARG_IS_NOW_OWNED_BY_ANOTHER_QUERY_FRAGMENTINSTANCE_ID_IS_ARG, tvList, queryContext.getId()); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment/FragmentInstanceFailureInfo.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment/FragmentInstanceFailureInfo.java index dfaf4aa1b485d..84465e4ca75de 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment/FragmentInstanceFailureInfo.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment/FragmentInstanceFailureInfo.java @@ -19,6 +19,8 @@ package org.apache.iotdb.db.queryengine.execution.fragment; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.PublicBAOS; import org.apache.tsfile.utils.ReadWriteIOUtils; @@ -56,8 +58,8 @@ public FragmentInstanceFailureInfo( FragmentInstanceFailureInfo cause, List suppressed, List stack) { - requireNonNull(suppressed, "suppressed is null"); - requireNonNull(stack, "stack is null"); + requireNonNull(suppressed, DataNodeQueryMessages.EXCEPTION_SUPPRESSED_IS_NULL_F4CD280B); + requireNonNull(stack, DataNodeQueryMessages.EXCEPTION_STACK_IS_NULL_6844D421); this.message = message; this.cause = cause; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment/FragmentInstanceManager.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment/FragmentInstanceManager.java index e5f3cbc7e0d58..45e586ea8a5b3 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment/FragmentInstanceManager.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment/FragmentInstanceManager.java @@ -271,7 +271,8 @@ private static void rejectIfRepeatedDispatch( if (!contextCreated) { throw new IoTDBRuntimeException( String.format( - "Repeated RPC call detected for FragmentInstance %s, reject the duplicated dispatch.", + DataNodeQueryMessages + .QUERY_EXCEPTION_REPEATED_RPC_CALL_DETECTED_FOR_FRAGMENTINSTANCE_S_REJECT_BF609A26, instanceId.getFullId()), TSStatusCode.REPEATED_RPC_CALL.getStatusCode()); } @@ -389,7 +390,7 @@ public FragmentInstanceInfo abortFragmentInstance(FragmentInstanceId fragmentIns /** Cancels a FragmentInstance. */ public FragmentInstanceInfo cancelTask(FragmentInstanceId instanceId, boolean hasThrowable) { logger.debug(DataNodeQueryMessages.CANCEL_FI); - requireNonNull(instanceId, "taskId is null"); + requireNonNull(instanceId, DataNodeQueryMessages.EXCEPTION_TASKID_IS_NULL_E1221EB2); FragmentInstanceContext context = instanceContext.remove(instanceId); if (context != null) { @@ -411,7 +412,7 @@ public FragmentInstanceInfo cancelTask(FragmentInstanceId instanceId, boolean ha * queried. */ public FragmentInstanceInfo getInstanceInfo(FragmentInstanceId instanceId) { - requireNonNull(instanceId, "instanceId is null"); + requireNonNull(instanceId, DataNodeQueryMessages.EXCEPTION_INSTANCEID_IS_NULL_343234DC); FragmentInstanceContext context = instanceContext.get(instanceId); if (context == null) { return null; @@ -421,7 +422,7 @@ public FragmentInstanceInfo getInstanceInfo(FragmentInstanceId instanceId) { public TFetchFragmentInstanceStatisticsResp getFragmentInstanceStatistics( FragmentInstanceId instanceId) { - requireNonNull(instanceId, "instanceId is null"); + requireNonNull(instanceId, DataNodeQueryMessages.EXCEPTION_INSTANCEID_IS_NULL_343234DC); // If the instance is still running, we directly get the statistics from instanceExecution FragmentInstanceExecution fragmentInstanceExecution = instanceExecution.get(instanceId); if (fragmentInstanceExecution != null) { @@ -470,9 +471,10 @@ private void cancelTimeoutFlushingInstances() { .getStateMachine() .failed( new QueryTimeoutException( - "Query has executed more than " - + execution.getTimeoutInMs() - + "ms, and now is in flushing state")); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_QUERY_HAS_EXECUTED_MORE_THAN_SMS_AND_NOW_IS_IN_FLUSHING_4BF7535B, + execution.getTimeoutInMs()))); } }); Coordinator.getInstance().cleanUpStaleQueries(); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment/FragmentInstanceStateMachine.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment/FragmentInstanceStateMachine.java index 54bdbe33c05c4..92fd00db3527b 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment/FragmentInstanceStateMachine.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment/FragmentInstanceStateMachine.java @@ -72,8 +72,12 @@ public class FragmentInstanceStateMachine { new ArrayList<>(); public FragmentInstanceStateMachine(FragmentInstanceId fragmentInstanceId, Executor executor) { - this.instanceId = requireNonNull(fragmentInstanceId, "fragmentInstanceId is null"); - this.executor = requireNonNull(executor, "executor is null"); + this.instanceId = + requireNonNull( + fragmentInstanceId, + DataNodeQueryMessages.EXCEPTION_FRAGMENTINSTANCEID_IS_NULL_4D371DB4); + this.executor = + requireNonNull(executor, DataNodeQueryMessages.EXCEPTION_EXECUTOR_IS_NULL_7FBE03A4); instanceState = new StateMachine<>( "FragmentInstance " + fragmentInstanceId, executor, RUNNING, TERMINAL_INSTANCE_STATES); @@ -101,8 +105,10 @@ public FragmentInstanceState getState() { public ListenableFuture getStateChange( FragmentInstanceState currentState) { - requireNonNull(currentState, "currentState is null"); - checkArgument(!currentState.isDone(), "Current state is already done"); + requireNonNull(currentState, DataNodeQueryMessages.EXCEPTION_CURRENTSTATE_IS_NULL_AEDB20DB); + checkArgument( + !currentState.isDone(), + DataNodeQueryMessages.EXCEPTION_CURRENT_STATE_IS_ALREADY_DONE_19FC56DC); ListenableFuture future = instanceState.getStateChange(currentState); FragmentInstanceState state = instanceState.get(); @@ -138,8 +144,11 @@ public void failed(Throwable cause) { } private void transitionToDoneState(FragmentInstanceState doneState) { - requireNonNull(doneState, "doneState is null"); - checkArgument(doneState.isDone(), "doneState %s is not a done state", doneState); + requireNonNull(doneState, DataNodeQueryMessages.EXCEPTION_DONESTATE_IS_NULL_D88F77E5); + checkArgument( + doneState.isDone(), + DataNodeQueryMessages.EXCEPTION_DONESTATE_ARG_IS_NOT_A_DONE_STATE_8724C618, + doneState); instanceState.setIf(doneState, currentState -> !currentState.isDone()); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment/FragmentState.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment/FragmentState.java index e28d1de674020..b8ed914922788 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment/FragmentState.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment/FragmentState.java @@ -19,6 +19,8 @@ package org.apache.iotdb.db.queryengine.execution.fragment; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; + import java.util.Set; import java.util.stream.Stream; @@ -55,7 +57,10 @@ public enum FragmentState { private final boolean failureState; FragmentState(boolean doneState, boolean failureState) { - checkArgument(!failureState || doneState, "%s is a non-done failure state", name()); + checkArgument( + !failureState || doneState, + DataNodeQueryMessages.EXCEPTION_ARG_IS_A_NON_MINUS_DONE_FAILURE_STATE_B167E915, + name()); this.doneState = doneState; this.failureState = failureState; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment/QueryContext.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment/QueryContext.java index 44a888266967f..a6f600c5f165b 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment/QueryContext.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment/QueryContext.java @@ -22,6 +22,7 @@ import org.apache.iotdb.commons.exception.IllegalPathException; import org.apache.iotdb.commons.path.AlignedPath; import org.apache.iotdb.commons.path.PatternTreeMap; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.storageengine.dataregion.modification.ModEntry; import org.apache.iotdb.db.storageengine.dataregion.modification.TableDeletionEntry; import org.apache.iotdb.db.storageengine.dataregion.tsfile.TsFileID; @@ -279,6 +280,7 @@ public void addTVListToSet(Set set) { public void addRowLevelFilteredCount(long count) { throw new UnsupportedOperationException( - "the QueryContext does not support row level filtering"); + DataNodeQueryMessages + .QUERY_EXCEPTION_THE_QUERYCONTEXT_DOES_NOT_SUPPORT_ROW_LEVEL_FILTERING_D4CD0678); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/memory/MemoryPool.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/memory/MemoryPool.java index 7ee5b035b1b6a..8e1c8d1319cfa 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/memory/MemoryPool.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/memory/MemoryPool.java @@ -68,12 +68,23 @@ private MemoryReservationFuture( String planNodeId, long bytesToReserve, long maxBytesCanReserve) { - this.queryId = Validate.notNull(queryId, "queryId cannot be null"); + this.queryId = + Validate.notNull( + queryId, DataNodeQueryMessages.EXCEPTION_QUERYID_CANNOT_BE_NULL_861D7663); this.fragmentInstanceId = - Validate.notNull(fragmentInstanceId, "fragmentInstanceId cannot be null"); - this.planNodeId = Validate.notNull(planNodeId, "planNodeId cannot be null"); - Validate.isTrue(bytesToReserve > 0L, "bytesToReserve should be greater than zero."); - Validate.isTrue(maxBytesCanReserve > 0L, "maxBytesCanReserve should be greater than zero."); + Validate.notNull( + fragmentInstanceId, + DataNodeQueryMessages.EXCEPTION_FRAGMENTINSTANCEID_CANNOT_BE_NULL_C722F460); + this.planNodeId = + Validate.notNull( + planNodeId, DataNodeQueryMessages.EXCEPTION_PLANNODEID_CANNOT_BE_NULL_4533C72B); + Validate.isTrue( + bytesToReserve > 0L, + DataNodeQueryMessages.EXCEPTION_BYTESTORESERVE_SHOULD_BE_GREATER_THAN_ZERO_DOT_56D15DE0); + Validate.isTrue( + maxBytesCanReserve > 0L, + DataNodeQueryMessages + .EXCEPTION_MAXBYTESCANRESERVE_SHOULD_BE_GREATER_THAN_ZERO_DOT_E9F7D365); this.bytesToReserve = bytesToReserve; this.maxBytesCanReserve = maxBytesCanReserve; } @@ -151,17 +162,18 @@ public long getReservedBytes() { new ConcurrentLinkedQueue<>(); public MemoryPool(String id, MemoryManager memoryManager, long maxBytesPerFragmentInstance) { - this.id = Validate.notNull(id, "id can not be null."); + this.id = Validate.notNull(id, DataNodeQueryMessages.EXCEPTION_ID_CAN_NOT_BE_NULL_DOT_BDD2AD7D); this.memoryBlock = memoryManager.exactAllocate(memoryManager.getName(), MemoryBlockType.DYNAMIC); Validate.isTrue( this.memoryBlock.getTotalMemorySizeInBytes() > 0L, - "max bytes should be greater than zero: %d", + DataNodeQueryMessages.EXCEPTION_MAX_BYTES_SHOULD_BE_GREATER_THAN_ZERO_COLON_ARG_EA1FB495, this.memoryBlock.getTotalMemorySizeInBytes()); Validate.isTrue( maxBytesPerFragmentInstance > 0L && maxBytesPerFragmentInstance <= this.memoryBlock.getTotalMemorySizeInBytes(), - "max bytes per FI should be in (0,maxBytes]. maxBytesPerFI: %d, maxBytes: %d", + DataNodeQueryMessages + .EXCEPTION_MAX_BYTES_PER_FI_SHOULD_BE_IN_LEFT_PAREN_0_COMMA_MAXBYTES_RIGHT_BRACKET_DOT_MAXB_4D37C457, maxBytesPerFragmentInstance, this.memoryBlock.getTotalMemorySizeInBytes()); this.maxBytesPerFragmentInstance = maxBytesPerFragmentInstance; @@ -243,8 +255,11 @@ public void deRegisterFragmentInstanceFromQueryMemoryMap( .collect(Collectors.toList()); throw new MemoryLeakException( String.format( - "PlanNode related memory is not zero when trying to deregister FI from query memory pool. QueryId is : %s, FragmentInstanceId is : %s, Non-zero PlanNode related memory is : %s.", - queryId, fragmentInstanceId, invalidEntryList)); + DataNodeQueryMessages + .QUERY_EXCEPTION_PLANNODE_RELATED_MEMORY_IS_NOT_ZERO_WHEN_TRYING_TO_DEREGISTER_E01109C5, + queryId, + fragmentInstanceId, + invalidEntryList)); } } } @@ -264,24 +279,31 @@ public MemoryReservationResult reserveWithPriority( long bytesToReserve, long maxBytesCanReserve, boolean isHighestPriority) { - Validate.notNull(queryId, "queryId can not be null."); - Validate.notNull(fragmentInstanceId, "fragmentInstanceId can not be null."); - Validate.notNull(planNodeId, "planNodeId can not be null."); + Validate.notNull(queryId, DataNodeQueryMessages.EXCEPTION_QUERYID_CAN_NOT_BE_NULL_DOT_16639DBE); + Validate.notNull( + fragmentInstanceId, + DataNodeQueryMessages.EXCEPTION_FRAGMENTINSTANCEID_CAN_NOT_BE_NULL_DOT_E88CF18B); + Validate.notNull( + planNodeId, DataNodeQueryMessages.EXCEPTION_PLANNODEID_CAN_NOT_BE_NULL_DOT_44027620); Validate.isTrue( bytesToReserve > 0L && bytesToReserve <= maxBytesPerFragmentInstance, - "bytesToReserve should be in (0,maxBytesPerFI]. maxBytesPerFI: %d, bytesToReserve: %d", + DataNodeQueryMessages + .EXCEPTION_BYTESTORESERVE_SHOULD_BE_IN_LEFT_PAREN_0_COMMA_MAXBYTESPERFI_RIGHT_BRACKET_DOT_M_0753BB69, maxBytesPerFragmentInstance, bytesToReserve); if (bytesToReserve > maxBytesCanReserve) { LOGGER.warn( - "Cannot reserve {}(Max: {}) bytes memory from MemoryPool for planNodeId{}", + DataNodeQueryMessages + .CANNOT_RESERVE_ARG_MAX_ARG_BYTES_MEMORY_FROM_MEMORYPOOL_FOR_PLANNODEIDARG, bytesToReserve, maxBytesCanReserve, planNodeId); throw new IllegalArgumentException( String.format( - "Query is aborted since it requests more memory than can be allocated, bytesToReserve: %sB, maxBytesCanReserve: %sB", - bytesToReserve, maxBytesCanReserve)); + DataNodeQueryMessages + .QUERY_EXCEPTION_QUERY_IS_ABORTED_SINCE_IT_REQUESTS_MORE_MEMORY_THAN_CAN_D77C2921, + bytesToReserve, + maxBytesCanReserve)); } if (tryReserve(queryId, fragmentInstanceId, planNodeId, bytesToReserve, maxBytesCanReserve)) { @@ -293,7 +315,9 @@ public MemoryReservationResult reserveWithPriority( return new MemoryReservationResult(immediateVoidFuture(), true, 0L); } LOGGER.debug( - "Blocked reserve request: {} bytes memory for planNodeId{}", bytesToReserve, planNodeId); + DataNodeQueryMessages.BLOCKED_RESERVE_REQUEST_ARG_BYTES_MEMORY_FOR_PLANNODEIDARG, + bytesToReserve, + planNodeId); ListenableFuture result = MemoryReservationFuture.create( queryId, fragmentInstanceId, planNodeId, bytesToReserve, maxBytesCanReserve); @@ -309,12 +333,16 @@ public boolean tryReserveForTest( String planNodeId, long bytesToReserve, long maxBytesCanReserve) { - Validate.notNull(queryId, "queryId can not be null."); - Validate.notNull(fragmentInstanceId, "fragmentInstanceId can not be null."); - Validate.notNull(planNodeId, "planNodeId can not be null."); + Validate.notNull(queryId, DataNodeQueryMessages.EXCEPTION_QUERYID_CAN_NOT_BE_NULL_DOT_16639DBE); + Validate.notNull( + fragmentInstanceId, + DataNodeQueryMessages.EXCEPTION_FRAGMENTINSTANCEID_CAN_NOT_BE_NULL_DOT_E88CF18B); + Validate.notNull( + planNodeId, DataNodeQueryMessages.EXCEPTION_PLANNODEID_CAN_NOT_BE_NULL_DOT_44027620); Validate.isTrue( bytesToReserve > 0L && bytesToReserve <= maxBytesPerFragmentInstance, - "bytesToReserve should be in (0,maxBytesPerFI]. maxBytesPerFI: %d, bytesToReserve: %d", + DataNodeQueryMessages + .EXCEPTION_BYTESTORESERVE_SHOULD_BE_IN_LEFT_PAREN_0_COMMA_MAXBYTESPERFI_RIGHT_BRACKET_DOT_M_0753BB69, maxBytesPerFragmentInstance, bytesToReserve); @@ -336,7 +364,9 @@ public boolean tryReserveForTest( */ @SuppressWarnings("squid:S2445") public synchronized long tryCancel(ListenableFuture future) { - Validate.notNull(future, "The future to be cancelled can not be null."); + Validate.notNull( + future, + DataNodeQueryMessages.EXCEPTION_THE_FUTURE_TO_BE_CANCELLED_CAN_NOT_BE_NULL_DOT_73CE402A); // add synchronized on the future to avoid that the future is concurrently completed by // MemoryPool.free() which may lead to memory leak. synchronized (future) { @@ -346,14 +376,15 @@ public synchronized long tryCancel(ListenableFuture future) { } Validate.isTrue( future instanceof MemoryReservationFuture, - "invalid future type " + future.getClass().getSimpleName()); + DataNodeQueryMessages.EXCEPTION_INVALID_FUTURE_TYPE_14507EF5 + + future.getClass().getSimpleName()); future.cancel(true); } return ((MemoryReservationFuture) future).getBytesToReserve(); } public void free(String queryId, String fragmentInstanceId, String planNodeId, long bytes) { - Validate.notNull(queryId, "queryId can not be null."); + Validate.notNull(queryId, DataNodeQueryMessages.EXCEPTION_QUERYID_CAN_NOT_BE_NULL_DOT_16639DBE); Validate.isTrue(bytes > 0L); try { @@ -371,7 +402,9 @@ public void free(String queryId, String fragmentInstanceId, String planNodeId, l }); } catch (NullPointerException e) { throw new IllegalArgumentException( - "RelatedMemoryReserved can't be null when freeing memory", e); + DataNodeQueryMessages + .QUERY_EXCEPTION_RELATEDMEMORYRESERVED_CAN_T_BE_NULL_WHEN_FREEING_MEMORY_C80009F2, + e); } memoryBlock.release(bytes); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/AbstractIntoOperator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/AbstractIntoOperator.java index 397ac2e9d61a5..54c650c0326c6 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/AbstractIntoOperator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/AbstractIntoOperator.java @@ -25,6 +25,7 @@ import org.apache.iotdb.commons.utils.TestOnly; import org.apache.iotdb.db.conf.IoTDBDescriptor; import org.apache.iotdb.db.exception.runtime.IntoProcessException; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.protocol.client.DataNodeInternalClient; import org.apache.iotdb.db.queryengine.execution.operator.OperatorContext; import org.apache.iotdb.rpc.TSStatusCode; @@ -170,7 +171,8 @@ protected void checkLastWriteOperation() { try { if (!writeOperationFuture.isDone()) { throw new IllegalStateException( - "The operator cannot continue until the last write operation is done."); + DataNodeQueryMessages + .QUERY_EXCEPTION_THE_OPERATOR_CANNOT_CONTINUE_UNTIL_THE_LAST_WRITE_OPERATION_1F241343); } TSStatus executionStatus = writeOperationFuture.get(); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/InsertTabletStatementGenerator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/InsertTabletStatementGenerator.java index 27d88438d4c7c..3784857e5f29a 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/InsertTabletStatementGenerator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/InsertTabletStatementGenerator.java @@ -21,6 +21,7 @@ import org.apache.iotdb.commons.path.PartialPath; import org.apache.iotdb.commons.queryengine.plan.planner.plan.parameter.InputLocation; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.statement.crud.InsertTabletStatement; import org.apache.tsfile.block.column.Column; @@ -98,7 +99,9 @@ public void reset() { break; default: throw new UnSupportedDataTypeException( - String.format("Data type %s is not supported.", dataTypes[i])); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_DATA_TYPE_S_IS_NOT_SUPPORTED_5D5C02E4, + dataTypes[i])); } } this.bitMaps = new BitMap[this.measurements.length]; @@ -149,7 +152,9 @@ public InsertTabletStatement constructInsertTabletStatement() { break; default: throw new UnSupportedDataTypeException( - String.format("Data type %s is not supported.", dataTypes[i])); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_DATA_TYPE_S_IS_NOT_SUPPORTED_5D5C02E4, + dataTypes[i])); } } } @@ -220,7 +225,8 @@ protected void processColumn( default: throw new UnSupportedDataTypeException( String.format( - "data type %s is not supported when convert data at client", + DataNodeQueryMessages + .QUERY_EXCEPTION_DATA_TYPE_S_IS_NOT_SUPPORTED_WHEN_CONVERT_DATA_AT_CLIENT_405429CC, valueColumn.getDataType())); } } @@ -279,7 +285,9 @@ private long getColumnsBytes() { default: throw new UnSupportedDataTypeException( String.format( - "data type %s is not supported when convert data at client", dataTypes[i])); + DataNodeQueryMessages + .QUERY_EXCEPTION_DATA_TYPE_S_IS_NOT_SUPPORTED_WHEN_CONVERT_DATA_AT_CLIENT_405429CC, + dataTypes[i])); } } return bytes; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/ProjectOperator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/ProjectOperator.java index 8d7346a1b76a4..aab37ca81afcd 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/ProjectOperator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/ProjectOperator.java @@ -22,6 +22,7 @@ import org.apache.iotdb.calc.execution.operator.Operator; import org.apache.iotdb.calc.execution.operator.process.ProcessOperator; import org.apache.iotdb.commons.queryengine.execution.MemoryEstimationHelper; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.execution.operator.OperatorContext; import com.google.common.util.concurrent.ListenableFuture; @@ -45,10 +46,15 @@ public class ProjectOperator implements ProcessOperator { public ProjectOperator( OperatorContext operatorContext, Operator child, List remainingColumnIndexList) { - this.operatorContext = requireNonNull(operatorContext, "operatorContext is null"); - this.child = requireNonNull(child, "child operator is null"); + this.operatorContext = + requireNonNull( + operatorContext, DataNodeQueryMessages.EXCEPTION_OPERATORCONTEXT_IS_NULL_D15B1EDB); + this.child = + requireNonNull(child, DataNodeQueryMessages.EXCEPTION_CHILD_OPERATOR_IS_NULL_8860113C); this.remainingColumnIndexList = - requireNonNull(remainingColumnIndexList, "remainingInputLocations is null"); + requireNonNull( + remainingColumnIndexList, + DataNodeQueryMessages.EXCEPTION_REMAININGINPUTLOCATIONS_IS_NULL_CEBBA2C1); } @Override diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/SlidingWindowAggregationOperator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/SlidingWindowAggregationOperator.java index 59d22ead36ee9..93e816a9d9f5e 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/SlidingWindowAggregationOperator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/SlidingWindowAggregationOperator.java @@ -21,6 +21,7 @@ import org.apache.iotdb.calc.execution.operator.Operator; import org.apache.iotdb.commons.queryengine.execution.MemoryEstimationHelper; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.execution.aggregation.TreeAggregator; import org.apache.iotdb.db.queryengine.execution.aggregation.slidingwindow.SlidingWindowAggregator; import org.apache.iotdb.db.queryengine.execution.aggregation.timerangeiterator.ITimeRangeIterator; @@ -67,7 +68,8 @@ public SlidingWindowAggregationOperator( super(operatorContext, aggregators, child, ascending, maxReturnSize); checkArgument( groupByTimeParameter != null, - "GroupByTimeParameter cannot be null in SlidingWindowAggregationOperator"); + DataNodeQueryMessages + .EXCEPTION_GROUPBYTIMEPARAMETER_CANNOT_BE_NULL_IN_SLIDINGWINDOWAGGREGATIONOPERATOR_BA42E30D); List dataTypes = new ArrayList<>(); if (outputEndTime) { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/TransformOperator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/TransformOperator.java index 6a713c183e23d..65a9928912058 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/TransformOperator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/TransformOperator.java @@ -29,6 +29,7 @@ import org.apache.iotdb.commons.udf.service.UDFClassLoaderManager; import org.apache.iotdb.commons.utils.TestOnly; import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.execution.operator.OperatorContext; import org.apache.iotdb.db.queryengine.plan.expression.Expression; import org.apache.iotdb.db.queryengine.transformation.api.LayerReader; @@ -355,7 +356,9 @@ protected YieldableState collectDataPoint(ColumnBuilder writer, long currentTime break; default: throw new UnSupportedDataTypeException( - String.format("Data type %s is not supported.", type)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_DATA_TYPE_S_IS_NOT_SUPPORTED_5D5C02E4, + type)); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/ai/InferenceOperator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/ai/InferenceOperator.java index 8db754768a34d..cdd90ec3d32b1 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/ai/InferenceOperator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/ai/InferenceOperator.java @@ -28,6 +28,7 @@ import org.apache.iotdb.commons.queryengine.execution.MemoryEstimationHelper; import org.apache.iotdb.db.exception.ainode.AINodeConnectionException; import org.apache.iotdb.db.exception.runtime.ModelInferenceProcessException; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.protocol.client.an.AINodeClient; import org.apache.iotdb.db.protocol.client.an.AINodeClientManager; import org.apache.iotdb.db.queryengine.execution.operator.OperatorContext; @@ -186,7 +187,8 @@ public TsBlock next() throws Exception { try { if (!inferenceExecutionFuture.isDone()) { throw new IllegalStateException( - "The operator cannot continue until the forecast execution is done."); + DataNodeQueryMessages + .QUERY_EXCEPTION_THE_OPERATOR_CANNOT_CONTINUE_UNTIL_THE_FORECAST_EXECUTION_AF8A3145); } TInferenceResp inferenceResp = inferenceExecutionFuture.get(); @@ -229,7 +231,8 @@ private void appendTsBlockToBuilder(TsBlock inputTsBlock) { if (inputTsBlock.getValueColumnCount() > 1) { throw new SemanticException( String.format( - "Call inference function should not contain more than one input column, found [%d] input columns.", + DataNodeQueryMessages + .CALL_INFERENCE_FUNCTION_SHOULD_NOT_CONTAIN_MORE_THAN_ONE_INPUT_COLUMN_FOUND_D_INPUT, inputTsBlock.getValueColumnCount())); } for (int columnIndex = 0; columnIndex < inputTsBlock.getValueColumnCount(); columnIndex++) { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/copyto/tsfile/CopyToTsFileOptions.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/copyto/tsfile/CopyToTsFileOptions.java index ec7e60f18adf5..17f2b689356cd 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/copyto/tsfile/CopyToTsFileOptions.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/copyto/tsfile/CopyToTsFileOptions.java @@ -181,7 +181,9 @@ public void check(List columnHeaders) { if (targetTagColumns.contains(columnHeader.getColumnName())) { if (columnHeader.getColumnType() != TSDataType.STRING) { throw new SemanticException( - "Data type of tag column " + columnHeader.getColumnName() + " is not STRING"); + DataNodeQueryMessages.DATA_TYPE_OF_TAG_COLUMN + + columnHeader.getColumnName() + + DataNodeQueryMessages.IS_NOT_STRING); } foundTagColumns++; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/join/FullOuterTimeJoinOperator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/join/FullOuterTimeJoinOperator.java index 915a89852eb69..3cf41dbd63edc 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/join/FullOuterTimeJoinOperator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/join/FullOuterTimeJoinOperator.java @@ -23,6 +23,7 @@ import org.apache.iotdb.calc.execution.operator.process.AbstractConsumeAllOperator; import org.apache.iotdb.commons.queryengine.execution.MemoryEstimationHelper; import org.apache.iotdb.commons.utils.TestOnly; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.execution.operator.OperatorContext; import org.apache.iotdb.db.queryengine.execution.operator.process.join.merge.ColumnMerger; import org.apache.iotdb.db.queryengine.execution.operator.process.join.merge.TimeComparator; @@ -88,7 +89,10 @@ public FullOuterTimeJoinOperator( List mergers, TimeComparator comparator) { super(operatorContext, children); - checkArgument(!children.isEmpty(), "child size of TimeJoinOperator should be larger than 0"); + checkArgument( + !children.isEmpty(), + DataNodeQueryMessages + .EXCEPTION_CHILD_SIZE_OF_TIMEJOINOPERATOR_SHOULD_BE_LARGER_THAN_0_EDED9CB8); this.inputIndex = new int[this.inputOperatorsCount]; this.shadowInputIndex = new int[this.inputOperatorsCount]; this.noMoreTsBlocks = new boolean[this.inputOperatorsCount]; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/join/HorizontallyConcatOperator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/join/HorizontallyConcatOperator.java index f9aaf444ac2fa..fa2d9f51a3569 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/join/HorizontallyConcatOperator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/join/HorizontallyConcatOperator.java @@ -22,6 +22,7 @@ import org.apache.iotdb.calc.execution.operator.Operator; import org.apache.iotdb.calc.execution.operator.process.AbstractConsumeAllOperator; import org.apache.iotdb.commons.queryengine.execution.MemoryEstimationHelper; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.execution.operator.OperatorContext; import org.apache.tsfile.block.column.Column; @@ -59,7 +60,9 @@ public HorizontallyConcatOperator( OperatorContext operatorContext, List children, List dataTypes) { super(operatorContext, children); checkArgument( - !children.isEmpty(), "child size of VerticallyConcatOperator should be larger than 0"); + !children.isEmpty(), + DataNodeQueryMessages + .EXCEPTION_CHILD_SIZE_OF_VERTICALLYCONCATOPERATOR_SHOULD_BE_LARGER_THAN_0_14A2513A); this.inputIndex = new int[this.inputOperatorsCount]; this.tsBlockBuilder = new TsBlockBuilder(dataTypes); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/join/InnerTimeJoinOperator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/join/InnerTimeJoinOperator.java index 3cb4c067b441b..e2ecfad359e5c 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/join/InnerTimeJoinOperator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/join/InnerTimeJoinOperator.java @@ -90,7 +90,9 @@ public InnerTimeJoinOperator( this.inputTsBlocks = new TsBlock[inputOperatorsCount]; this.canCallNext = new boolean[inputOperatorsCount]; checkArgument( - children.size() > 1, "child size of InnerTimeJoinOperator should be larger than 1"); + children.size() > 1, + DataNodeQueryMessages + .EXCEPTION_CHILD_SIZE_OF_INNERTIMEJOINOPERATOR_SHOULD_BE_LARGER_THAN_1_37EB7D74); this.inputIndex = new int[this.inputOperatorsCount]; this.resultBuilder = new TsBlockBuilder(dataTypes); this.comparator = comparator; @@ -247,7 +249,8 @@ private void cleanUpInputTsBlock() { private int[][] transformListToIntArray(List> lists) { if (lists.size() <= 1) { throw new IllegalStateException( - "Child size of InnerTimeJoinOperator should be larger than 1."); + DataNodeQueryMessages + .QUERY_EXCEPTION_CHILD_SIZE_OF_INNERTIMEJOINOPERATOR_SHOULD_BE_LARGER_THAN_4E7CF105); } int[][] res = new int[lists.size()][lists.get(0).size()]; for (int i = 0; i < res.length; i++) { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/last/AlignedUpdateViewPathLastCacheOperator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/last/AlignedUpdateViewPathLastCacheOperator.java index 26aa5b95078e3..57b18327c11ac 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/last/AlignedUpdateViewPathLastCacheOperator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/last/AlignedUpdateViewPathLastCacheOperator.java @@ -22,6 +22,7 @@ import org.apache.iotdb.calc.execution.operator.Operator; import org.apache.iotdb.commons.path.AlignedPath; import org.apache.iotdb.commons.path.MeasurementPath; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.execution.operator.OperatorContext; import org.apache.iotdb.db.queryengine.plan.relational.metadata.fetcher.cache.TreeDeviceSchemaCacheManager; @@ -55,7 +56,9 @@ public AlignedUpdateViewPathLastCacheOperator( needUpdateCache, needUpdateNullEntry, deviceInMultiRegion); - checkArgument(outputPaths != null, "outputPaths shouldn't be null"); + checkArgument( + outputPaths != null, + DataNodeQueryMessages.EXCEPTION_OUTPUTPATHS_SHOULDN_QUOTE_T_BE_NULL_BF3F5FB4); this.outputPaths = outputPaths; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/last/UpdateLastCacheOperator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/last/UpdateLastCacheOperator.java index 06a7dadb5b367..62468e0472c8c 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/last/UpdateLastCacheOperator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/last/UpdateLastCacheOperator.java @@ -22,6 +22,7 @@ import org.apache.iotdb.calc.execution.operator.Operator; import org.apache.iotdb.commons.path.MeasurementPath; import org.apache.iotdb.commons.queryengine.execution.MemoryEstimationHelper; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.execution.operator.OperatorContext; import org.apache.iotdb.db.queryengine.plan.relational.metadata.fetcher.cache.TreeDeviceSchemaCacheManager; @@ -94,7 +95,9 @@ public TsBlock next() throws Exception { return LAST_QUERY_EMPTY_TSBLOCK; } - checkArgument(res.getPositionCount() == 1, "last query result should only have one record"); + checkArgument( + res.getPositionCount() == 1, + DataNodeQueryMessages.EXCEPTION_LAST_QUERY_RESULT_SHOULD_ONLY_HAVE_ONE_RECORD_EDFEE635); // last value is null if (res.getColumn(0).isNull(0)) { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/schema/NodeManageMemoryMergeOperator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/schema/NodeManageMemoryMergeOperator.java index ad1ffc8e7430d..84ae7672e913e 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/schema/NodeManageMemoryMergeOperator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/schema/NodeManageMemoryMergeOperator.java @@ -26,6 +26,7 @@ import org.apache.iotdb.commons.schema.column.ColumnHeader; import org.apache.iotdb.commons.schema.column.ColumnHeaderConstant; import org.apache.iotdb.commons.schema.node.MNodeType; +import org.apache.iotdb.db.i18n.DataNodeSchemaMessages; import org.apache.iotdb.db.queryengine.execution.operator.OperatorContext; import com.google.common.util.concurrent.ListenableFuture; @@ -61,10 +62,13 @@ public class NodeManageMemoryMergeOperator implements ProcessOperator { public NodeManageMemoryMergeOperator( OperatorContext operatorContext, Set data, Operator child) { - this.operatorContext = requireNonNull(operatorContext, "operatorContext is null"); + this.operatorContext = + requireNonNull( + operatorContext, DataNodeSchemaMessages.EXCEPTION_OPERATORCONTEXT_IS_NULL_D15B1EDB); this.data = data; nameSet = data.stream().map(TSchemaNode::getNodeName).collect(Collectors.toSet()); - this.child = requireNonNull(child, "child operator is null"); + this.child = + requireNonNull(child, DataNodeSchemaMessages.EXCEPTION_CHILD_OPERATOR_IS_NULL_8860113C); isReadingMemory = true; this.outputDataTypes = ColumnHeaderConstant.showChildPathsColumnHeaders.stream() diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/schema/NodePathsConvertOperator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/schema/NodePathsConvertOperator.java index 36ff0c2160cd4..dbb92233d1b7e 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/schema/NodePathsConvertOperator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/schema/NodePathsConvertOperator.java @@ -57,8 +57,11 @@ public class NodePathsConvertOperator implements ProcessOperator { private final List outputDataTypes; public NodePathsConvertOperator(OperatorContext operatorContext, Operator child) { - this.operatorContext = requireNonNull(operatorContext, "operatorContext is null"); - this.child = requireNonNull(child, "child operator is null"); + this.operatorContext = + requireNonNull( + operatorContext, DataNodeQueryMessages.EXCEPTION_OPERATORCONTEXT_IS_NULL_D15B1EDB); + this.child = + requireNonNull(child, DataNodeQueryMessages.EXCEPTION_CHILD_OPERATOR_IS_NULL_8860113C); this.outputDataTypes = ColumnHeaderConstant.showChildNodesColumnHeaders.stream() .map(ColumnHeader::getColumnType) diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/schema/NodePathsCountOperator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/schema/NodePathsCountOperator.java index 2c4b91c7d4543..ff8c4e140355f 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/schema/NodePathsCountOperator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/schema/NodePathsCountOperator.java @@ -24,6 +24,7 @@ import org.apache.iotdb.commons.queryengine.execution.MemoryEstimationHelper; import org.apache.iotdb.commons.schema.column.ColumnHeader; import org.apache.iotdb.commons.schema.column.ColumnHeaderConstant; +import org.apache.iotdb.db.i18n.DataNodeSchemaMessages; import org.apache.iotdb.db.queryengine.execution.operator.OperatorContext; import com.google.common.util.concurrent.ListenableFuture; @@ -56,8 +57,11 @@ public class NodePathsCountOperator implements ProcessOperator { RamUsageEstimator.shallowSizeOfInstance(NodePathsCountOperator.class); public NodePathsCountOperator(OperatorContext operatorContext, Operator child) { - this.operatorContext = requireNonNull(operatorContext, "operatorContext is null"); - this.child = requireNonNull(child, "child operator is null"); + this.operatorContext = + requireNonNull( + operatorContext, DataNodeSchemaMessages.EXCEPTION_OPERATORCONTEXT_IS_NULL_D15B1EDB); + this.child = + requireNonNull(child, DataNodeSchemaMessages.EXCEPTION_CHILD_OPERATOR_IS_NULL_8860113C); this.isFinished = false; this.nodePaths = new HashSet<>(); this.outputDataTypes = diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/schema/SchemaQueryOrderByHeatOperator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/schema/SchemaQueryOrderByHeatOperator.java index 010c74d1261c5..c5cb23a0cb150 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/schema/SchemaQueryOrderByHeatOperator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/schema/SchemaQueryOrderByHeatOperator.java @@ -24,6 +24,7 @@ import org.apache.iotdb.commons.queryengine.execution.MemoryEstimationHelper; import org.apache.iotdb.commons.schema.column.ColumnHeader; import org.apache.iotdb.commons.schema.column.ColumnHeaderConstant; +import org.apache.iotdb.db.i18n.DataNodeSchemaMessages; import org.apache.iotdb.db.queryengine.execution.operator.OperatorContext; import com.google.common.util.concurrent.ListenableFuture; @@ -63,7 +64,9 @@ public class SchemaQueryOrderByHeatOperator implements ProcessOperator { private int currentIndex = 0; public SchemaQueryOrderByHeatOperator(OperatorContext operatorContext, List operators) { - this.operatorContext = requireNonNull(operatorContext, "operatorContext is null"); + this.operatorContext = + requireNonNull( + operatorContext, DataNodeSchemaMessages.EXCEPTION_OPERATORCONTEXT_IS_NULL_D15B1EDB); this.operators = operators; this.showTimeSeriesResult = new ArrayList<>(); this.lastQueryResult = new ArrayList<>(); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/schema/source/DeviceAttributeUpdater.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/schema/source/DeviceAttributeUpdater.java index 832d59fe42f14..9120444ba0d23 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/schema/source/DeviceAttributeUpdater.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/schema/source/DeviceAttributeUpdater.java @@ -25,6 +25,7 @@ import org.apache.iotdb.commons.schema.node.role.IDeviceMNode; import org.apache.iotdb.commons.schema.table.TsTable; import org.apache.iotdb.commons.schema.table.column.TsTableColumnSchema; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.schemaengine.schemaregion.mtree.impl.mem.mnode.IMemMNode; import org.apache.iotdb.db.schemaengine.schemaregion.mtree.impl.mem.mnode.info.TableDeviceInfo; @@ -116,12 +117,12 @@ protected void update() throws MetadataException { final Object o = resultColumns.get(j).isNull(i) ? null : resultColumns.get(j).getObject(i); if (Objects.nonNull(o) && !(o instanceof Binary)) { throw new MetadataException( - "Result type mismatch for attribute '" - + attributeNames.get(j) - + "', expected " - + Binary.class - + ", actual " - + o.getClass()); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_RESULT_TYPE_MISMATCH_FOR_ATTRIBUTE_S_EXPECTED_S_ACTUAL_S_E5637B91, + attributeNames.get(j), + Binary.class, + o.getClass())); } results[j] = o; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/FileLoaderUtils.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/FileLoaderUtils.java index 254c061187a43..954d60e5d0790 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/FileLoaderUtils.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/FileLoaderUtils.java @@ -22,6 +22,7 @@ import org.apache.iotdb.commons.path.AlignedFullPath; import org.apache.iotdb.commons.path.NonAlignedFullPath; import org.apache.iotdb.db.exception.ChunkTypeInconsistentException; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.execution.fragment.FragmentInstanceContext; import org.apache.iotdb.db.queryengine.execution.fragment.QueryContext; import org.apache.iotdb.db.queryengine.metric.SeriesScanCostMetricSet; @@ -461,7 +462,9 @@ public static List loadChunkMetadataList(ITimeSeriesMetadata tim public static List loadPageReaderList( IChunkMetadata chunkMetaData, Filter globalTimeFilter, List targetDataTypeList) throws IOException { - checkArgument(chunkMetaData != null, "Can't init null chunkMeta"); + checkArgument( + chunkMetaData != null, + DataNodeQueryMessages.EXCEPTION_CAN_QUOTE_T_INIT_NULL_CHUNKMETA_15C12BEE); IChunkLoader chunkLoader = chunkMetaData.getChunkLoader(); IChunkReader chunkReader; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/SeriesScanUtil.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/SeriesScanUtil.java index 6e6eb76905bc9..d8a1c80c4c055 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/SeriesScanUtil.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/SeriesScanUtil.java @@ -280,12 +280,12 @@ public Optional hasNextFile() throws IOException { || firstPageReader != null || mergeReader.hasNextTimeValuePair()) { throw new IllegalStateException( - "all cached pages should be consumed first unSeqPageReaders.isEmpty() is " - + unSeqPageReaders.isEmpty() - + " firstPageReader != null is " - + (firstPageReader != null) - + " mergeReader.hasNextTimeValuePair() = " - + mergeReader.hasNextTimeValuePair()); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_ALL_CACHED_PAGES_SHOULD_BE_CONSUMED_FIRST_UNSEQPAGEREADERS_55898EFB, + unSeqPageReaders.isEmpty(), + (firstPageReader != null), + mergeReader.hasNextTimeValuePair())); } if (firstChunkMetadata != null || !cachedChunkMetadata.isEmpty()) { @@ -325,7 +325,8 @@ private boolean currentFileOverlapped() { } public boolean canUseCurrentFileStatistics() { - checkState(firstTimeSeriesMetadata != null, "no first file"); + checkState( + firstTimeSeriesMetadata != null, DataNodeQueryMessages.EXCEPTION_NO_FIRST_FILE_F5F2E276); if (currentFileOverlapped() || firstTimeSeriesMetadata.isModified()) { return false; @@ -372,12 +373,12 @@ public Optional hasNextChunk() throws IOException { || firstPageReader != null || mergeReader.hasNextTimeValuePair()) { throw new IllegalStateException( - "all cached pages should be consumed first unSeqPageReaders.isEmpty() is " - + unSeqPageReaders.isEmpty() - + " firstPageReader != null is " - + (firstPageReader != null) - + " mergeReader.hasNextTimeValuePair() = " - + mergeReader.hasNextTimeValuePair()); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_ALL_CACHED_PAGES_SHOULD_BE_CONSUMED_FIRST_UNSEQPAGEREADERS_55898EFB, + unSeqPageReaders.isEmpty(), + (firstPageReader != null), + mergeReader.hasNextTimeValuePair())); } if (firstChunkMetadata != null) { @@ -503,7 +504,7 @@ private boolean currentChunkOverlapped() { } public boolean canUseCurrentChunkStatistics() { - checkState(firstChunkMetadata != null, "no first chunk"); + checkState(firstChunkMetadata != null, DataNodeQueryMessages.EXCEPTION_NO_FIRST_CHUNK_7DCEB14C); if (currentChunkOverlapped() || firstChunkMetadata.isModified()) { return false; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/AbstractTableScanOperator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/AbstractTableScanOperator.java index 52a21628f2a3b..296a886d40fd7 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/AbstractTableScanOperator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/AbstractTableScanOperator.java @@ -273,7 +273,10 @@ private void constructAlignedSeriesScanUtil() { if (this.deviceEntries.get(this.currentDeviceIndex) == null) { throw new IllegalStateException( - "Device entries of index " + this.currentDeviceIndex + " in TableScanOperator is empty"); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_DEVICE_ENTRIES_OF_INDEX_S_IN_TABLESCANOPERATOR_IS_EMPTY_FDEB574F, + this.currentDeviceIndex)); } DeviceEntry deviceEntry = this.deviceEntries.get(this.currentDeviceIndex); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/CteScanOperator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/CteScanOperator.java index c25fe15d93e81..0145b24e86e7b 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/CteScanOperator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/CteScanOperator.java @@ -56,7 +56,7 @@ public CteScanOperator( PlanNodeId sourceId, CteDataStore dataStore, QueryId queryId) { - requireNonNull(dataStore, "dataStore is null"); + requireNonNull(dataStore, DataNodeQueryMessages.EXCEPTION_DATASTORE_IS_NULL_D9972B2E); this.operatorContext = operatorContext; this.sourceId = sourceId; this.dataReader = new MemoryReader(dataStore, queryId); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/DeviceIteratorScanOperator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/DeviceIteratorScanOperator.java index ddd8abd0057e1..dea74163d0ddc 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/DeviceIteratorScanOperator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/DeviceIteratorScanOperator.java @@ -22,6 +22,7 @@ import org.apache.iotdb.calc.execution.operator.Operator; import org.apache.iotdb.calc.plan.planner.CommonOperatorUtils; import org.apache.iotdb.commons.queryengine.execution.MemoryEstimationHelper; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.execution.operator.OperatorContext; import org.apache.iotdb.db.queryengine.execution.operator.source.AbstractDataSourceOperator; import org.apache.iotdb.db.queryengine.plan.relational.metadata.DeviceEntry; @@ -110,7 +111,9 @@ private void constructCurrentDeviceOperatorTree() { } if (this.deviceEntries.get(this.currentDeviceIndex) == null) { throw new IllegalStateException( - "Device entries of index " + this.currentDeviceIndex + " is empty"); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_DEVICE_ENTRIES_OF_INDEX_S_IS_EMPTY_BCFB0644, + this.currentDeviceIndex)); } DeviceEntry deviceEntry = this.deviceEntries.get(this.currentDeviceIndex); @@ -163,7 +166,8 @@ public void close() throws Exception { @Override protected List getResultDataTypes() { throw new UnsupportedOperationException( - "Should not call getResultDataTypes() method in DeviceIteratorScanOperator"); + DataNodeQueryMessages + .QUERY_EXCEPTION_SHOULD_NOT_CALL_GETRESULTDATATYPES_METHOD_IN_DEVICEITERATORSCANOPERATOR_E915A153); } @Override diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/LastQueryAggTableScanOperator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/LastQueryAggTableScanOperator.java index 7a2d2e3a80633..dc95221f0a95e 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/LastQueryAggTableScanOperator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/LastQueryAggTableScanOperator.java @@ -163,7 +163,10 @@ private void processCurrentDevice() throws Exception { if (lastRowCacheResults != null) { buildResultUseLastRowCache(); } else { - checkState(lastValuesCacheResults != null, "lastValuesCacheResults shouldn't be null here"); + checkState( + lastValuesCacheResults != null, + DataNodeQueryMessages + .EXCEPTION_LASTVALUESCACHERESULTS_SHOULDN_QUOTE_T_BE_NULL_HERE_0DCD5841); buildResultUseLastValuesCache(); } return; @@ -502,7 +505,8 @@ private void buildResultUseLastValuesCache() { case FIELD: checkState( aggregator.getAccumulator() instanceof LastDescAccumulator, - "Accumulator should be LastDescAccumulator when reach here"); + DataNodeQueryMessages + .EXCEPTION_ACCUMULATOR_SHOULD_BE_LASTDESCACCUMULATOR_WHEN_REACH_HERE_CE38F96A); int measurementIdx = aggColumnsIndexArray[aggregatorInputChannels.get(channel)]; long lastTime = @@ -639,7 +643,8 @@ private void updateLastCacheUseLastValuesIfPossible() { case FIELD: checkState( tableAggregator.getAccumulator() instanceof LastDescAccumulator, - "Accumulator should be LastDescAccumulator when reach here"); + DataNodeQueryMessages + .EXCEPTION_ACCUMULATOR_SHOULD_BE_LASTDESCACCUMULATOR_WHEN_REACH_HERE_CE38F96A); LastDescAccumulator lastAccumulator = (LastDescAccumulator) tableAggregator.getAccumulator(); updateMeasurementList.add(schema.getName()); @@ -716,7 +721,10 @@ protected void updateResultTsBlock() { if (lastRowCacheResults != null) { updateLastCacheUseLastRowIfPossible(); } else { - checkState(lastValuesCacheResults != null, "lastValuesCacheResults shouldn't be null here"); + checkState( + lastValuesCacheResults != null, + DataNodeQueryMessages + .EXCEPTION_LASTVALUESCACHERESULTS_SHOULDN_QUOTE_T_BE_NULL_HERE_0DCD5841); updateLastCacheUseLastValuesIfPossible(); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/MeasurementToTableViewAdaptorUtils.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/MeasurementToTableViewAdaptorUtils.java index 73b4704ac963a..a464692832714 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/MeasurementToTableViewAdaptorUtils.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/MeasurementToTableViewAdaptorUtils.java @@ -20,6 +20,7 @@ package org.apache.iotdb.db.queryengine.execution.operator.source.relational; import org.apache.iotdb.commons.queryengine.plan.relational.metadata.ColumnSchema; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.relational.metadata.DeviceEntry; import org.apache.tsfile.block.column.Column; @@ -73,7 +74,9 @@ public static TsBlock toTableBlock( break; default: throw new IllegalArgumentException( - "Unexpected column category: " + columnSchemas.get(i).getColumnCategory()); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNEXPECTED_COLUMN_CATEGORY_S_6E60A44E, + columnSchemas.get(i).getColumnCategory())); } } return new TsBlock( diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/TreeNonAlignedDeviceViewAggregationScanOperator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/TreeNonAlignedDeviceViewAggregationScanOperator.java index e42ae8cbe8ebf..0e89c2c6cd077 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/TreeNonAlignedDeviceViewAggregationScanOperator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/TreeNonAlignedDeviceViewAggregationScanOperator.java @@ -21,6 +21,7 @@ import org.apache.iotdb.calc.execution.operator.Operator; import org.apache.iotdb.commons.queryengine.execution.MemoryEstimationHelper; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.execution.aggregation.timerangeiterator.ITableTimeRangeIterator; import org.apache.iotdb.db.queryengine.execution.operator.source.AbstractDataSourceOperator; import org.apache.iotdb.db.queryengine.plan.relational.metadata.DeviceEntry; @@ -186,7 +187,9 @@ private void constructCurrentDeviceOperatorTree() { } if (this.deviceEntries.get(this.currentDeviceIndex) == null) { throw new IllegalStateException( - "Device entries of index " + this.currentDeviceIndex + " is empty"); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_DEVICE_ENTRIES_OF_INDEX_S_IS_EMPTY_BCFB0644, + this.currentDeviceIndex)); } DeviceEntry deviceEntry = this.deviceEntries.get(this.currentDeviceIndex); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/window/WindowManagerFactory.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/window/WindowManagerFactory.java index ae4975dff9ad9..dc79a959b1fab 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/window/WindowManagerFactory.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/window/WindowManagerFactory.java @@ -19,6 +19,7 @@ package org.apache.iotdb.db.queryengine.execution.operator.window; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.execution.aggregation.timerangeiterator.ITimeRangeIterator; import org.apache.tsfile.write.UnSupportedDataTypeException; @@ -49,8 +50,10 @@ public static IWindowManager genWindowManager( return new CountWindowManager((CountWindowParameter) windowParameter); default: throw new IllegalArgumentException( - "Not support this type of aggregation window :" - + windowParameter.getWindowType().name()); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_NOT_SUPPORT_THIS_TYPE_OF_AGGREGATION_WINDOW_S_604F93D0, + windowParameter.getWindowType().name())); } } @@ -77,7 +80,8 @@ private static VariationWindowManager genEqualEventWindowManager( default: throw new UnSupportedDataTypeException( String.format( - "Unsupported data type in equal event aggregation : %s", + DataNodeQueryMessages + .QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_IN_EQUAL_EVENT_AGGREGATION_S_5076ACFE, eventWindowParameter.getDataType())); } } @@ -103,7 +107,8 @@ private static VariationWindowManager genVariationEventWindowManager( default: throw new UnSupportedDataTypeException( String.format( - "Unsupported data type in variation event aggregation : %s", + DataNodeQueryMessages + .QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_IN_VARIATION_EVENT_AGGREGATION_S_47341532, eventWindowParameter.getDataType())); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/schedule/AbstractDriverThread.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/schedule/AbstractDriverThread.java index e7964afef5e1b..4fb9e8a8cb5ca 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/schedule/AbstractDriverThread.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/schedule/AbstractDriverThread.java @@ -115,7 +115,8 @@ public void run() { // Unless we have been closed, we need to replace this thread if (!closed) { logger.warn( - "Executor {} exits because it's interrupted. We will produce another thread to replace.", + DataNodeQueryMessages + .EXECUTOR_ARG_EXITS_BECAUSE_IT_S_INTERRUPTED_WE_WILL_PRODUCE_ANOTHER_THREAD_TO_REPLACE, this.getName()); producer.produce(getName(), getThreadGroup(), queue, producer); } else { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/schedule/DriverScheduler.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/schedule/DriverScheduler.java index e6c8d248e2e47..cfe5fda53bfce 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/schedule/DriverScheduler.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/schedule/DriverScheduler.java @@ -249,13 +249,15 @@ public void submitDrivers( .getThrottleQuotaLimit() .checkCpu(sessionInfo.getUserName(), usedCpu.get())) { throw new CpuNotEnoughException( - "There is not enough cpu to execute current fragment instance"); + DataNodeQueryMessages + .QUERY_EXCEPTION_THERE_IS_NOT_ENOUGH_CPU_TO_EXECUTE_CURRENT_FRAGMENT_INSTANCE_E7719FB8); } if (!DataNodeThrottleQuotaManager.getInstance() .getThrottleQuotaLimit() .checkMemory(sessionInfo.getUserName(), estimatedMemory.get())) { throw new MemoryNotEnoughException( - "There is no enough memory to execute current fragment instance"); + DataNodeQueryMessages + .QUERY_EXCEPTION_THERE_IS_NO_ENOUGH_MEMORY_TO_EXECUTE_CURRENT_FRAGMENT_INSTANCE_CB632843); } } @@ -581,7 +583,8 @@ public void toAborted(DriverTask task) { return; } logger.info( - "The task {} is aborted. All other tasks in the same query will be cancelled", + DataNodeQueryMessages + .THE_TASK_ARG_IS_ABORTED_ALL_OTHER_TASKS_IN_THE_SAME_QUERY_WILL_BE_CANCELLED, task.getDriverTaskId()); } finally { task.unlock(); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/schedule/DriverTaskAbortedException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/schedule/DriverTaskAbortedException.java index 3fc00cd559b28..fb683db9962b9 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/schedule/DriverTaskAbortedException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/schedule/DriverTaskAbortedException.java @@ -19,21 +19,26 @@ package org.apache.iotdb.db.queryengine.execution.schedule; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.execution.driver.IDriver; /** A common exception to pass to {@link IDriver#failed(Throwable)}. */ public class DriverTaskAbortedException extends Exception { - public static final String BY_TIMEOUT = "timeout"; - public static final String BY_FRAGMENT_ABORT_CALLED = "called"; - public static final String BY_QUERY_CASCADING_ABORTED = "query cascading aborted"; - public static final String BY_ALREADY_BEING_CANCELLED = "already being cancelled"; - public static final String BY_INTERNAL_ERROR_SCHEDULED = "internal error scheduled"; + public static final String BY_TIMEOUT = DataNodeQueryMessages.DRIVER_TASK_ABORTED_BY_TIMEOUT; + public static final String BY_FRAGMENT_ABORT_CALLED = + DataNodeQueryMessages.DRIVER_TASK_ABORTED_BY_FRAGMENT_ABORT_CALLED; + public static final String BY_QUERY_CASCADING_ABORTED = + DataNodeQueryMessages.DRIVER_TASK_ABORTED_BY_QUERY_CASCADING_ABORTED; + public static final String BY_ALREADY_BEING_CANCELLED = + DataNodeQueryMessages.DRIVER_TASK_ABORTED_BY_ALREADY_BEING_CANCELLED; + public static final String BY_INTERNAL_ERROR_SCHEDULED = + DataNodeQueryMessages.DRIVER_TASK_ABORTED_BY_INTERNAL_ERROR_SCHEDULED; public static final String BY_MEMORY_NOT_ENOUGH = - "Memory is not enough to execute the query task."; + DataNodeQueryMessages.DRIVER_TASK_ABORTED_BY_MEMORY_NOT_ENOUGH; public DriverTaskAbortedException(String driverTaskName, String causeMsg) { - super(String.format("DriverTask %s is aborted by %s", driverTaskName, causeMsg)); + super(String.format(DataNodeQueryMessages.DRIVER_TASK_ABORTED_FMT, driverTaskName, causeMsg)); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/schedule/DriverTaskTimeoutSentinelThread.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/schedule/DriverTaskTimeoutSentinelThread.java index 3db80d3cca20e..ff29225baa8ea 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/schedule/DriverTaskTimeoutSentinelThread.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/schedule/DriverTaskTimeoutSentinelThread.java @@ -21,6 +21,7 @@ import org.apache.iotdb.calc.execution.schedule.queue.IndexedBlockingQueue; import org.apache.iotdb.commons.exception.QueryTimeoutException; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.execution.schedule.task.DriverTask; import org.slf4j.Logger; @@ -82,7 +83,7 @@ public void execute(DriverTask task) throws InterruptedException { task.unlock(); } LOGGER.warn( - "[DriverTaskTimeout] Current time is {}, ddl of task is {}", + DataNodeQueryMessages.DRIVERTASKTIMEOUT_CURRENT_TIME_IS_ARG_DDL_OF_TASK_IS_ARG, System.currentTimeMillis(), task.getDDL()); task.setAbortCause(new QueryTimeoutException()); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/schedule/queue/multilevelqueue/DriverTaskHandle.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/schedule/queue/multilevelqueue/DriverTaskHandle.java index d30784dcd6f99..6d65b6d4e8f26 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/schedule/queue/multilevelqueue/DriverTaskHandle.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/schedule/queue/multilevelqueue/DriverTaskHandle.java @@ -19,6 +19,8 @@ package org.apache.iotdb.db.queryengine.execution.schedule.queue.multilevelqueue; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; + import javax.annotation.concurrent.GuardedBy; import java.util.Objects; @@ -46,8 +48,12 @@ public DriverTaskHandle( MultilevelPriorityQueue driverTaskQueue, OptionalInt maxDriversPerTask) { this.driverTaskHandleId = driverTaskHandleId; - this.driverTaskQueue = requireNonNull(driverTaskQueue, "driverTaskQueue is null"); - this.maxDriversPerTask = requireNonNull(maxDriversPerTask, "maxDriversPerTask is null"); + this.driverTaskQueue = + requireNonNull( + driverTaskQueue, DataNodeQueryMessages.EXCEPTION_DRIVERTASKQUEUE_IS_NULL_7C3C8B7B); + this.maxDriversPerTask = + requireNonNull( + maxDriversPerTask, DataNodeQueryMessages.EXCEPTION_MAXDRIVERSPERTASK_IS_NULL_8408F9B7); } public synchronized Priority addScheduledTimeInNanos(long durationNanos) { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/schedule/queue/multilevelqueue/MultilevelPriorityQueue.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/schedule/queue/multilevelqueue/MultilevelPriorityQueue.java index ab32a65959bba..248d89f4bf7b0 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/schedule/queue/multilevelqueue/MultilevelPriorityQueue.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/schedule/queue/multilevelqueue/MultilevelPriorityQueue.java @@ -21,6 +21,7 @@ import org.apache.iotdb.calc.execution.schedule.queue.IndexedBlockingReserveQueue; import org.apache.iotdb.commons.utils.TestOnly; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.execution.schedule.task.DriverTask; import java.util.PriorityQueue; @@ -97,7 +98,8 @@ public MultilevelPriorityQueue( */ @Override public void pushToQueue(DriverTask task) { - checkArgument(task != null, "DriverTask to be pushed is null"); + checkArgument( + task != null, DataNodeQueryMessages.EXCEPTION_DRIVERTASK_TO_BE_PUSHED_IS_NULL_7581A0E3); // Push tasks with the highest priority(Currently, only ShowQuery related tasks) into // highestPriorityLevelQueue directly. if (task.isHighestPriority()) { @@ -145,7 +147,7 @@ protected DriverTask pollFirst() { @Override protected DriverTask remove(DriverTask driverTask) { - checkArgument(driverTask != null, "driverTask is null"); + checkArgument(driverTask != null, DataNodeQueryMessages.EXCEPTION_DRIVERTASK_IS_NULL_A13D4AF9); if (highestPriorityLevelQueue.remove(driverTask)) { return driverTask; } @@ -188,7 +190,8 @@ protected DriverTask get(DriverTask driverTask) { // We do not support get() for MultilevelPriorityQueue since it is inefficient and not // necessary. throw new UnsupportedOperationException( - "MultilevelPriorityQueue does not support access element by get."); + DataNodeQueryMessages + .QUERY_EXCEPTION_MULTILEVELPRIORITYQUEUE_DOES_NOT_SUPPORT_ACCESS_ELEMENT_02FE5AC9); } @Override @@ -230,9 +233,12 @@ private DriverTask chooseLevelAndTask() { // selected level == -1 means that the queue is empty and this method is only called when the // queue is not empty. - checkState(selectedLevel != -1, "selected level can not equal to -1"); + checkState( + selectedLevel != -1, + DataNodeQueryMessages.EXCEPTION_SELECTED_LEVEL_CAN_NOT_EQUAL_TO_MINUS_1_1DA93B14); DriverTask result = levelWaitingSplits[selectedLevel].poll(); - checkState(result != null, "result driverTask cannot be null"); + checkState( + result != null, DataNodeQueryMessages.EXCEPTION_RESULT_DRIVERTASK_CANNOT_BE_NULL_30A06DB1); return result; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/warnings/DefaultWarningCollector.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/warnings/DefaultWarningCollector.java index a8b01192a8aaa..74211e02e9801 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/warnings/DefaultWarningCollector.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/warnings/DefaultWarningCollector.java @@ -19,6 +19,8 @@ package org.apache.iotdb.db.queryengine.execution.warnings; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; + import com.google.common.collect.ImmutableList; import com.google.errorprone.annotations.concurrent.GuardedBy; @@ -43,7 +45,7 @@ public DefaultWarningCollector(int maxWarnings) { @Override public synchronized void add(IoTDBWarning warning) { - requireNonNull(warning, "warning is null"); + requireNonNull(warning, DataNodeQueryMessages.EXCEPTION_WARNING_IS_NULL_E5A7C3C1); if (warnings.size() < maxWarnings) { warnings.add(warning); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/warnings/IoTDBWarning.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/warnings/IoTDBWarning.java index 3baf29e733153..f3db0ab5a504f 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/warnings/IoTDBWarning.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/warnings/IoTDBWarning.java @@ -19,6 +19,8 @@ package org.apache.iotdb.db.queryengine.execution.warnings; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; + import java.util.Objects; import static java.lang.String.format; @@ -29,8 +31,10 @@ public final class IoTDBWarning { private final String message; public IoTDBWarning(WarningCode warningCode, String message) { - this.warningCode = requireNonNull(warningCode, "warningCode is null"); - this.message = requireNonNull(message, "message is null"); + this.warningCode = + requireNonNull(warningCode, DataNodeQueryMessages.EXCEPTION_WARNINGCODE_IS_NULL_3CCAE5B7); + this.message = + requireNonNull(message, DataNodeQueryMessages.EXCEPTION_MESSAGE_IS_NULL_D2D078AA); } public IoTDBWarning(WarningCodeSupplier warningCodeSupplier, String message) { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/warnings/WarningCode.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/warnings/WarningCode.java index 5f78a7331f9ed..6fd2765ae0827 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/warnings/WarningCode.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/warnings/WarningCode.java @@ -34,7 +34,7 @@ public WarningCode(int code, String name) { throw new IllegalArgumentException(DataNodeQueryMessages.CODE_IS_NEGATIVE); } this.code = code; - this.name = requireNonNull(name, "name is null"); + this.name = requireNonNull(name, DataNodeQueryMessages.EXCEPTION_NAME_IS_NULL_C8B35959); } public int getCode() { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/Coordinator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/Coordinator.java index bd1512aa428af..c067b70479a11 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/Coordinator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/Coordinator.java @@ -269,7 +269,8 @@ public class Coordinator { if (LOGGER.isDebugEnabled()) { LOGGER.debug( - "Initialized shared MemoryBlock 'Coordinator' with all available memory: {} bytes", + DataNodeQueryMessages + .INITIALIZED_SHARED_MEMORYBLOCK_COORDINATOR_WITH_ALL_AVAILABLE_MEMORY_ARG_BYTES, coordinatorMemoryBlock.getTotalMemorySizeInBytes()); } } @@ -710,7 +711,8 @@ private IQueryExecution createQueryExecutionForTableModel( PreparedStatementInfo preparedInfo = clientSession.getPreparedStatement(statementName); if (preparedInfo == null) { throw new SemanticException( - String.format("Prepared statement '%s' does not exist", statementName)); + String.format( + DataNodeQueryMessages.PREPARED_STATEMENT_S_DOES_NOT_EXIST, statementName)); } org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Statement resolvedSql = diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/Analysis.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/Analysis.java index be20d218e6a70..97c4819b32f51 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/Analysis.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/Analysis.java @@ -31,6 +31,7 @@ import org.apache.iotdb.commons.path.PartialPath; import org.apache.iotdb.commons.queryengine.common.NodeRef; import org.apache.iotdb.commons.schema.template.Template; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.common.DeviceContext; import org.apache.iotdb.db.queryengine.common.MPPQueryContext; import org.apache.iotdb.db.queryengine.common.TimeseriesContext; @@ -475,7 +476,10 @@ public TSDataType getType(final Expression expression) { } final TSDataType type = expressionTypes.get(NodeRef.of(expression)); - checkArgument(type != null, "Expression is not analyzed: %s", expression); + checkArgument( + type != null, + DataNodeQueryMessages.EXCEPTION_EXPRESSION_IS_NOT_ANALYZED_COLON_ARG_7D34C49A, + expression); return type; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/AnalyzeUtils.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/AnalyzeUtils.java index d00ee54428bf0..7bf8b660100d1 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/AnalyzeUtils.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/AnalyzeUtils.java @@ -454,7 +454,10 @@ private static TableDeletionEntry parsePredicate(Expression expression, TsTable tagPredicate = parseIsNull((IsNullPredicate) currExp, tagPredicate, table); } else { throw new SemanticException( - DataNodeQueryMessages.UNSUPPORTED_EXPRESSION + currExp + " in " + expression); + DataNodeQueryMessages.UNSUPPORTED_EXPRESSION + + currExp + + DataNodeQueryMessages.IN + + expression); } } if (tagPredicate != null) { @@ -463,8 +466,9 @@ private static TableDeletionEntry parsePredicate(Expression expression, TsTable if (timeRange.getStartTime() > timeRange.getEndTime()) { throw new SemanticException( String.format( - "Start time %d is greater than end time %d", - timeRange.getStartTime(), timeRange.getEndTime())); + DataNodeQueryMessages.START_TIME_D_IS_GREATER_THAN_END_TIME_D, + timeRange.getStartTime(), + timeRange.getEndTime())); } return new TableDeletionEntry(predicate, timeRange.toTsFileTimeRange()); @@ -489,7 +493,9 @@ private static IDPredicate parseIsNull( int tagColumnOrdinal = table.getTagColumnOrdinal(columnName); if (tagColumnOrdinal == -1) { throw new SemanticException( - "The column '" + columnName + "' does not exist or is not a tag column"); + DataNodeQueryMessages.THE_COLUMN + + columnName + + DataNodeQueryMessages.DOES_NOT_EXIST_OR_IS_NOT_A_TAG_COLUMN); } // the first segment is the table name, so + 1 @@ -527,7 +533,7 @@ private static IDPredicate parseComparison( rightHandValue = ((LongLiteral) right).getParsedValue(); } else { throw new SemanticException( - "The right hand value of time predicate must be a long: " + right); + DataNodeQueryMessages.THE_RIGHT_HAND_VALUE_OF_TIME_PREDICATE_MUST_BE_A_LONG + right); } switch (comparisonExpression.getOperator()) { @@ -551,7 +557,8 @@ private static IDPredicate parseComparison( case IS_DISTINCT_FROM: default: throw new SemanticException( - "The operator of time predicate must be <, <=, >, or >=: " + right); + DataNodeQueryMessages.THE_OPERATOR_OF_TIME_PREDICATE_MUST_BE_LT_LT_EQ_GT_OR_GT_EQ + + right); } return oldPredicate; @@ -561,7 +568,9 @@ private static IDPredicate parseComparison( int tagColumnOrdinal = table.getTagColumnOrdinal(columnName); if (tagColumnOrdinal == -1) { throw new SemanticException( - "The column '" + columnName + "' does not exist or is not a tag column"); + DataNodeQueryMessages.THE_COLUMN + + columnName + + DataNodeQueryMessages.DOES_NOT_EXIST_OR_IS_NOT_A_TAG_COLUMN); } IDPredicate newPredicate = getTagPredicate(comparisonExpression, right, tagColumnOrdinal); @@ -591,10 +600,11 @@ private static IDPredicate getTagPredicate( rightHandValue = ((StringLiteral) right).getValue(); } else if (right instanceof NullLiteral) { throw new SemanticException( - "The right hand value of tag predicate cannot be null with '=' operator, please use 'IS NULL' instead"); + DataNodeQueryMessages + .THE_RIGHT_HAND_VALUE_OF_TAG_PREDICATE_CANNOT_BE_NULL_WITH_EQ_OPERATOR_PLEASE_USE_IS_NULL); } else { throw new SemanticException( - "The right hand value of tag predicate must be a string: " + right); + DataNodeQueryMessages.THE_RIGHT_HAND_VALUE_OF_TAG_PREDICATE_MUST_BE_A_STRING + right); } // the first segment is the table name, so + 1 return new SegmentExactMatch(rightHandValue, tagColumnOrdinal + 1); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/AnalyzeVisitor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/AnalyzeVisitor.java index 22d5b0518ac55..9e67239d50dba 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/AnalyzeVisitor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/AnalyzeVisitor.java @@ -242,7 +242,9 @@ public AnalyzeVisitor(IPartitionFetcher partitionFetcher, ISchemaFetcher schemaF @Override public Analysis visitNode(StatementNode node, MPPQueryContext context) { throw new UnsupportedOperationException( - "Unsupported statement type: " + node.getClass().getName()); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_STATEMENT_TYPE_S_FBCA7305, + node.getClass().getName())); } @Override @@ -414,7 +416,10 @@ public Analysis visitQuery(QueryStatement queryStatement, MPPQueryContext contex } catch (StatementAnalyzeException e) { throw new StatementAnalyzeException( - "Meet error when analyzing the query statement: " + e.getMessage()); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_MEET_ERROR_WHEN_ANALYZING_THE_QUERY_STATEMENT_S_AD732908, + e.getMessage())); } return analysis; } @@ -1005,7 +1010,8 @@ private void analyzeHavingBase( if (outputType != TSDataType.BOOLEAN) { throw new SemanticException( String.format( - "The output type of the expression in HAVING clause should be BOOLEAN, actual data type: %s.", + DataNodeQueryMessages + .THE_OUTPUT_TYPE_OF_THE_EXPRESSION_IN_HAVING_CLAUSE_SHOULD_BE_BOOLEAN_ACTUAL_DATA_TYPE_S, outputType)); } @@ -1109,7 +1115,8 @@ private void analyzeHaving( if (outputType != TSDataType.BOOLEAN) { throw new SemanticException( String.format( - "The output type of the expression in HAVING clause should be BOOLEAN, actual data type: %s.", + DataNodeQueryMessages + .THE_OUTPUT_TYPE_OF_THE_EXPRESSION_IN_HAVING_CLAUSE_SHOULD_BE_BOOLEAN_ACTUAL_DATA_TYPE_S, outputType)); } analysis.setDeviceToAggregationExpressions(deviceToAggregationExpressions); @@ -1128,7 +1135,8 @@ private void checkDataTypeConsistencyInGroupByLevel( if (analysis.getType(rawAggregationExpression) != checkedDataType) { throw new SemanticException( String.format( - "GROUP BY LEVEL: the data types of the same output column[%s] should be the same.", + DataNodeQueryMessages + .GROUP_BY_LEVEL_THE_DATA_TYPES_OF_THE_SAME_OUTPUT_COLUMN_S_SHOULD_BE_THE_SAME, groupedAggregationExpression)); } } @@ -1457,7 +1465,8 @@ private void analyzeDeviceToSource(Analysis analysis, QueryStatement queryStatem } if (queriedDevices.size() > 1) { throw new SemanticException( - "Cross-device queries are not supported in ALIGN BY DEVICE queries."); + DataNodeQueryMessages + .CROSS_DEVICE_QUERIES_ARE_NOT_SUPPORTED_IN_ALIGN_BY_DEVICE_QUERIES); } outputDeviceToQueriedDevicesMap.put(deviceName, queriedDevices.iterator().next()); } @@ -1655,7 +1664,11 @@ private void analyzeDeviceViewInput(Analysis analysis, QueryStatement queryState for (String output : outputsUnderDevice) { int index = deviceViewOutputColumns.indexOf(output); checkState( - index >= 1, "output column '%s' is not stored in %s", output, deviceViewOutputColumns); + index >= 1, + DataNodeQueryMessages + .EXCEPTION_OUTPUT_COLUMN_QUOTE_ARG_QUOTE_IS_NOT_STORED_IN_ARG_2DE3176D, + output, + deviceViewOutputColumns); indexes.add(index); } deviceViewInputIndexesMap.put(deviceID, indexes); @@ -1670,8 +1683,8 @@ private void checkDeviceViewInputUniqueness(Set outputExpressionsUnd .collect(Collectors.toSet()); if (normalizedOutputExpressionsUnderDevice.size() < outputExpressionsUnderDevice.size()) { throw new SemanticException( - "Views or measurement aliases representing the same data source " - + "cannot be queried concurrently in ALIGN BY DEVICE queries."); + DataNodeQueryMessages.VIEWS_OR_MEASUREMENT_ALIASES_REPRESENTING_THE_SAME_DATA_SOURCE + + DataNodeQueryMessages.CANNOT_BE_QUERIED_CONCURRENTLY_IN_ALIGN_BY_DEVICE_QUERIES); } } @@ -1722,8 +1735,10 @@ private static void checkInputType( if (!inputDataType.isNumeric()) { throw new SemanticException( String.format( - "The type of SQL result column [%s in %d] should be numeric when inference", - inputDataType, i)); + DataNodeQueryMessages + .THE_TYPE_OF_SQL_RESULT_COLUMN_S_IN_D_SHOULD_BE_NUMERIC_WHEN_INFERENCE, + inputDataType, + i)); } } } @@ -1744,7 +1759,9 @@ private void analyzeLastOrderBy(Analysis analysis, QueryStatement queryStatement if (!lastQueryColumnNames.contains(sortKey.toUpperCase())) { throw new SemanticException( String.format( - "%s in order by clause doesn't exist in the result of last query.", sortKey)); + DataNodeQueryMessages + .S_IN_ORDER_BY_CLAUSE_DOESN_T_EXIST_IN_THE_RESULT_OF_LAST_QUERY, + sortKey)); } } } @@ -1763,14 +1780,16 @@ private void analyzeOrderByBase( if (expressions.isEmpty()) { throw new SemanticException( String.format( - "%s in order by clause doesn't exist.", expressionForItem.getExpressionString())); + DataNodeQueryMessages.S_IN_ORDER_BY_CLAUSE_DOESN_T_EXIST, + expressionForItem.getExpressionString())); } expressions = orderByExpressionAnalyzer.apply(expressions); if (expressions.size() > 1) { throw new SemanticException( String.format( - "%s in order by clause shouldn't refer to more than one timeseries.", + DataNodeQueryMessages + .S_IN_ORDER_BY_CLAUSE_SHOULDN_T_REFER_TO_MORE_THAN_ONE_TIMESERIES, expressionForItem.getExpressionString())); } @@ -1778,7 +1797,7 @@ private void analyzeOrderByBase( TSDataType dataType = analyzeExpressionType(analysis, orderByExpression); if (!dataType.isComparable()) { throw new SemanticException( - String.format("The data type of %s is not comparable", dataType)); + String.format(DataNodeQueryMessages.THE_DATA_TYPE_OF_S_IS_NOT_COMPARABLE, dataType)); } orderByExpressions.add(orderByExpression); } @@ -1852,12 +1871,13 @@ private void analyzeDeviceToGroupBy( if (groupByExpressionsOfOneDevice.isEmpty()) { throw new SemanticException( - String.format("%s in group by clause doesn't exist.", expression)); + String.format(DataNodeQueryMessages.S_IN_GROUP_BY_CLAUSE_DOESN_T_EXIST, expression)); } if (groupByExpressionsOfOneDevice.size() > 1) { throw new SemanticException( String.format( - "%s in group by clause shouldn't refer to more than one timeseries.", + DataNodeQueryMessages + .S_IN_GROUP_BY_CLAUSE_SHOULDN_T_REFER_TO_MORE_THAN_ONE_TIMESERIES, expression)); } deviceToGroupByExpression.put( @@ -1927,19 +1947,21 @@ private void analyzeDeviceToOrderBy( if (expressions.isEmpty()) { throw new SemanticException( String.format( - "%s in order by clause doesn't exist.", expressionForItem.getExpressionString())); + DataNodeQueryMessages.S_IN_ORDER_BY_CLAUSE_DOESN_T_EXIST, + expressionForItem.getExpressionString())); } if (expressions.size() > 1) { throw new SemanticException( String.format( - "%s in order by clause shouldn't refer to more than one timeseries.", + DataNodeQueryMessages + .S_IN_ORDER_BY_CLAUSE_SHOULDN_T_REFER_TO_MORE_THAN_ONE_TIMESERIES, expressionForItem.getExpressionString())); } expressionForItem = expressions.get(0); TSDataType dataType = analyzeExpressionType(analysis, expressionForItem); if (!dataType.isComparable()) { throw new SemanticException( - String.format("The data type of %s is not comparable", dataType)); + String.format(DataNodeQueryMessages.THE_DATA_TYPE_OF_S_IS_NOT_COMPARABLE, dataType)); } Expression deviceViewExpression = getMeasurementExpression(expressionForItem, analysis); @@ -1982,12 +2004,14 @@ private void analyzeGroupBy( if (expressions.isEmpty()) { throw new SemanticException( String.format( - "%s in group by clause doesn't exist.", groupByExpression.getExpressionString())); + DataNodeQueryMessages.S_IN_GROUP_BY_CLAUSE_DOESN_T_EXIST, + groupByExpression.getExpressionString())); } if (expressions.size() > 1) { throw new SemanticException( String.format( - "%s in group by clause shouldn't refer to more than one timeseries.", + DataNodeQueryMessages + .S_IN_GROUP_BY_CLAUSE_SHOULDN_T_REFER_TO_MORE_THAN_ONE_TIMESERIES, groupByExpression.getExpressionString())); } // Aggregation expression shouldn't exist in group by clause. @@ -2056,8 +2080,9 @@ private void checkGroupByConditionExpressionType( && rightExpression instanceof ConstantOperand)) { throw new SemanticException( String.format( - "Please check the keep condition ([%s]), " - + "it need to be a constant or a compare expression constructed by 'keep' and a long number.", + DataNodeQueryMessages.PLEASE_CHECK_THE_KEEP_CONDITION_S + + DataNodeQueryMessages + .IT_NEED_TO_BE_A_CONSTANT_OR_A_COMPARE_EXPRESSION_CONSTRUCTED_BY_KEEP_AND_A_LONG_NUMBER, keepExpression.getExpressionString())); } return; @@ -2065,8 +2090,9 @@ private void checkGroupByConditionExpressionType( if (!(keepExpression instanceof ConstantOperand)) { throw new SemanticException( String.format( - "Please check the keep condition ([%s]), " - + "it need to be a constant or a compare expression constructed by 'keep' and a long number.", + DataNodeQueryMessages.PLEASE_CHECK_THE_KEEP_CONDITION_S + + DataNodeQueryMessages + .IT_NEED_TO_BE_A_CONSTANT_OR_A_COMPARE_EXPRESSION_CONSTRUCTED_BY_KEEP_AND_A_LONG_NUMBER, keepExpression.getExpressionString())); } } @@ -2089,7 +2115,8 @@ static void analyzeGroupByTime(Analysis analysis, QueryStatement queryStatement) if (!queryStatement.isCqQueryBody() && (groupByTimeComponent.getStartTime() == 0 && groupByTimeComponent.getEndTime() == 0)) { throw new SemanticException( - "The query time range should be specified in the GROUP BY TIME clause."); + DataNodeQueryMessages + .THE_QUERY_TIME_RANGE_SHOULD_BE_SPECIFIED_IN_THE_GROUP_BY_TIME_CLAUSE); } GroupByTimeParameter groupByTimeParameter = new GroupByTimeParameter(groupByTimeComponent); analysis.setGroupByTimeParameter(groupByTimeParameter); @@ -2375,7 +2402,9 @@ private void analyzeInto( } catch (IllegalPathException e) { throw new SemanticException( String.format( - "View path %s of source column %s is illegal path", viewPath, sourceColumn)); + DataNodeQueryMessages.VIEW_PATH_S_OF_SOURCE_COLUMN_S_IS_ILLEGAL_PATH, + viewPath, + sourceColumn)); } } else { sourcePath = ((TimeSeriesOperand) sourceExpression).getPath(); @@ -2411,7 +2440,8 @@ private void checkDataTypeConsistencyInAlignByDevice( for (Expression expression : expressions) { if (analysis.getType(expression) != checkedDataType) { throw new SemanticException( - "ALIGN BY DEVICE: the data types of the same measurement column should be the same across devices."); + DataNodeQueryMessages + .ALIGN_BY_DEVICE_THE_DATA_TYPES_OF_THE_SAME_MEASUREMENT_COLUMN_SHOULD_BE_THE_SAME_ACROSS); } } } @@ -2420,7 +2450,8 @@ private void checkAliasUniqueness(String alias, Set aliasSet) { if (alias != null) { if (aliasSet.contains(alias)) { throw new SemanticException( - String.format("alias '%s' can only be matched with one time series", alias)); + String.format( + DataNodeQueryMessages.ALIAS_S_CAN_ONLY_BE_MATCHED_WITH_ONE_TIME_SERIES, alias)); } aliasSet.add(alias); } @@ -2431,7 +2462,8 @@ private void checkAliasUniqueness( Map> measurementToDeviceSelectExpressions) { if (alias != null && measurementToDeviceSelectExpressions.keySet().size() > 1) { throw new SemanticException( - String.format("alias '%s' can only be matched with one time series", alias)); + String.format( + DataNodeQueryMessages.ALIAS_S_CAN_ONLY_BE_MATCHED_WITH_ONE_TIME_SERIES, alias)); } } @@ -2515,7 +2547,9 @@ public Analysis visitCreateTimeseries( for (String tagKey : createTimeSeriesStatement.getTags().keySet()) { if (createTimeSeriesStatement.getAttributes().containsKey(tagKey)) { throw new SemanticException( - String.format("Tag and attribute shouldn't have the same property key [%s]", tagKey)); + String.format( + DataNodeQueryMessages.TAG_AND_ATTRIBUTE_SHOULDN_T_HAVE_THE_SAME_PROPERTY_KEY_S, + tagKey)); } } } @@ -2583,7 +2617,8 @@ private void analyzeSchemaProps(final Map props) { if (!ALLOWED_SCHEMA_PROPS.contains(lowerCaseKey)) { throw new SemanticException( new MetadataException( - String.format("%s is not a legal prop.", caseChangeEntry.getValue()))); + String.format( + DataNodeQueryMessages.S_IS_NOT_A_LEGAL_PROP, caseChangeEntry.getValue()))); } props.put(lowerCaseKey, props.remove(caseChangeEntry.getValue())); } @@ -2613,7 +2648,8 @@ public Analysis visitCreateAlignedTimeseries( Set measurementsSet = new HashSet<>(measurements); if (measurementsSet.size() < measurements.size()) { throw new SemanticException( - "Measurement under an aligned device is not allowed to have the same measurement name"); + DataNodeQueryMessages + .MEASUREMENT_UNDER_AN_ALIGNED_DEVICE_IS_NOT_ALLOWED_TO_HAVE_THE_SAME_MEASUREMENT_NAME); } Analysis analysis = new Analysis(); @@ -2734,7 +2770,7 @@ public Analysis visitAlterTimeSeries( throw new RuntimeException( new TemplateIncompatibleException( String.format( - "Cannot alter template timeseries [%s] since device template [%s] already set on path [%s].", + DataNodeQueryMessages.CANNOT_ALTER_TEMPLATE_TIMESERIES_TEMPLATE_ALREADY_SET_FMT, alterTimeSeriesStatement.getPath().getFullPath(), templateInfo.left.getName(), templateInfo.right))); @@ -3227,11 +3263,13 @@ private void analyzeGlobalTimeConditionInShowMetaData( PredicateUtils.extractGlobalTimePredicate(predicate, true, true); if (resultPair.right) { throw new SemanticException( - "Value Filter can't exist in the condition of SHOW/COUNT clause, only time condition supported"); + DataNodeQueryMessages + .VALUE_FILTER_CAN_T_EXIST_IN_THE_CONDITION_OF_SHOW_COUNT_CLAUSE_ONLY_TIME_CONDITION); } if (resultPair.left == null) { throw new SemanticException( - "Time condition can't be empty in the condition of SHOW/COUNT clause"); + DataNodeQueryMessages + .TIME_CONDITION_CAN_T_BE_EMPTY_IN_THE_CONDITION_OF_SHOW_COUNT_CLAUSE); } Expression globalTimePredicate = resultPair.left; globalTimePredicate = PredicateUtils.predicateRemoveNot(globalTimePredicate); @@ -3632,7 +3670,8 @@ public Analysis visitCreateSchemaTemplate( Set measurementsSet = new HashSet<>(measurements); if (measurementsSet.size() < measurements.size()) { throw new SemanticException( - "Measurement under template is not allowed to have the same measurement name"); + DataNodeQueryMessages + .MEASUREMENT_UNDER_TEMPLATE_IS_NOT_ALLOWED_TO_HAVE_THE_SAME_MEASUREMENT_NAME); } Analysis analysis = new Analysis(); analysis.setRealStatement(createTemplateStatement); @@ -3662,7 +3701,8 @@ public Analysis visitActivateTemplate( throw new StatementAnalyzeException( new MetadataException( String.format( - "Path [%s] has not been set any template.", activatePath.getFullPath()))); + DataNodeQueryMessages.PATH_HAS_NOT_BEEN_SET_ANY_TEMPLATE_FMT, + activatePath.getFullPath()))); } analysis.setTemplateSetInfo( new Pair<>(templateSetInfo.left, Collections.singletonList(templateSetInfo.right))); @@ -3693,7 +3733,8 @@ public Analysis visitBatchActivateTemplate( throw new StatementAnalyzeException( new MetadataException( String.format( - "Path [%s] has not been set any template.", devicePath.getFullPath()))); + DataNodeQueryMessages.PATH_HAS_NOT_BEEN_SET_ANY_TEMPLATE_FMT, + devicePath.getFullPath()))); } deviceTemplateSetInfoMap.put(devicePath, templateSetInfo); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/ClusterPartitionFetcher.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/ClusterPartitionFetcher.java index cba3f22773fe3..7bb7478950b9c 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/ClusterPartitionFetcher.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/ClusterPartitionFetcher.java @@ -123,7 +123,10 @@ public SchemaPartition getSchemaPartition( } } catch (final ClientManagerException | TException e) { throw new StatementAnalyzeException( - "An error occurred when executing getSchemaPartition():" + e.getMessage()); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_AN_ERROR_OCCURRED_WHEN_EXECUTING_GETSCHEMAPARTITION_S_A0156043, + e.getMessage())); } } if (!needAuditDB) { @@ -167,7 +170,10 @@ public SchemaPartition getOrCreateSchemaPartition( } } catch (final ClientManagerException | TException e) { throw new StatementAnalyzeException( - "An error occurred when executing getOrCreateSchemaPartition():" + e.getMessage()); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_AN_ERROR_OCCURRED_WHEN_EXECUTING_GETORCREATESCHEMAPARTITION_4D22BE9B, + e.getMessage())); } } return schemaPartition; @@ -189,7 +195,10 @@ public SchemaNodeManagementPartition getSchemaNodeManagementPartitionWithLevel( return parseSchemaNodeManagementPartitionResp(schemaNodeManagementResp); } catch (final ClientManagerException | TException e) { throw new StatementAnalyzeException( - "An error occurred when executing getSchemaNodeManagementPartition():" + e.getMessage()); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_AN_ERROR_OCCURRED_WHEN_EXECUTING_GETSCHEMANODEMANAGEMENTPARTITION_84AC8509, + e.getMessage())); } } @@ -208,12 +217,17 @@ public DataPartition getDataPartition( partitionCache.updateDataPartitionCache(dataPartitionTableResp.getDataPartitionTable()); } else { throw new StatementAnalyzeException( - "An error occurred when executing getDataPartition():" - + dataPartitionTableResp.getStatus().getMessage()); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_AN_ERROR_OCCURRED_WHEN_EXECUTING_GETDATAPARTITION_S_D21A0011, + dataPartitionTableResp.getStatus().getMessage())); } } catch (final ClientManagerException | TException e) { throw new StatementAnalyzeException( - "An error occurred when executing getDataPartition():" + e.getMessage()); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_AN_ERROR_OCCURRED_WHEN_EXECUTING_GETDATAPARTITION_S_D21A0011, + e.getMessage())); } } return dataPartition; @@ -234,12 +248,17 @@ public DataPartition getDataPartitionWithUnclosedTimeRange( return parseDataPartitionResp(dataPartitionTableResp); } else { throw new StatementAnalyzeException( - "An error occurred when executing getDataPartition():" - + dataPartitionTableResp.getStatus().getMessage()); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_AN_ERROR_OCCURRED_WHEN_EXECUTING_GETDATAPARTITION_S_D21A0011, + dataPartitionTableResp.getStatus().getMessage())); } } catch (final ClientManagerException | TException e) { throw new StatementAnalyzeException( - "An error occurred when executing getDataPartition():" + e.getMessage()); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_AN_ERROR_OCCURRED_WHEN_EXECUTING_GETDATAPARTITION_S_D21A0011, + e.getMessage())); } } @@ -259,12 +278,17 @@ public DataPartition getOrCreateDataPartition( partitionCache.updateDataPartitionCache(dataPartitionTableResp.getDataPartitionTable()); } else { throw new StatementAnalyzeException( - "An error occurred when executing getOrCreateDataPartition():" - + dataPartitionTableResp.getStatus().getMessage()); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_AN_ERROR_OCCURRED_WHEN_EXECUTING_GETORCREATEDATAPARTITION_2EB2EBBE, + dataPartitionTableResp.getStatus().getMessage())); } } catch (final ClientManagerException | TException e) { throw new StatementAnalyzeException( - "An error occurred when executing getOrCreateDataPartition():" + e.getMessage()); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_AN_ERROR_OCCURRED_WHEN_EXECUTING_GETORCREATEDATAPARTITION_2EB2EBBE, + e.getMessage())); } } return dataPartition; @@ -298,7 +322,10 @@ public DataPartition getOrCreateDataPartition( } } catch (final ClientManagerException | TException e) { throw new StatementAnalyzeException( - "An error occurred when executing getOrCreateDataPartition():" + e.getMessage()); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_AN_ERROR_OCCURRED_WHEN_EXECUTING_GETORCREATEDATAPARTITION_2EB2EBBE, + e.getMessage())); } return dataPartition; } @@ -371,7 +398,10 @@ private SchemaPartition getOrCreateSchemaPartition( return schemaPartition; } catch (final ClientManagerException | TException e) { throw new StatementAnalyzeException( - "An error occurred when executing getSchemaPartition():" + e.getMessage()); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_AN_ERROR_OCCURRED_WHEN_EXECUTING_GETSCHEMAPARTITION_S_A0156043, + e.getMessage())); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/ExpressionAnalyzer.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/ExpressionAnalyzer.java index 6483bb32fa135..acefb147daeca 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/ExpressionAnalyzer.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/ExpressionAnalyzer.java @@ -109,7 +109,7 @@ public static void checkIsAllMeasurement(Expression expression) { if (path.getNodes().length > 1 || path.getFullPath().equals(IoTDBConstant.MULTI_LEVEL_PATH_WILDCARD)) { throw new SemanticException( - "the suffix paths can only be measurement or one-level wildcard"); + DataNodeQueryMessages.THE_SUFFIX_PATHS_CAN_ONLY_BE_MEASUREMENT_OR_ONE_LEVEL_WILDCARD); } } else if (expression instanceof TimestampOperand || expression instanceof ConstantOperand @@ -185,7 +185,8 @@ public static ResultColumn.ColumnType identifyOutputColumnType( if (identifyOutputColumnType(inputExpression, false) == ResultColumn.ColumnType.AGGREGATION) { throw new SemanticException( - "Aggregation results cannot be as input of the aggregation function."); + DataNodeQueryMessages + .AGGREGATION_RESULTS_CANNOT_BE_AS_INPUT_OF_THE_AGGREGATION_FUNCTION); } } return ResultColumn.ColumnType.AGGREGATION; @@ -204,7 +205,7 @@ public static ResultColumn.ColumnType identifyOutputColumnType( if (checkedType == null) { throw new SemanticException( String.format( - "Input of '%s' is illegal.", + DataNodeQueryMessages.INPUT_OF_S_IS_ILLEGAL, ((FunctionExpression) expression).getFunctionName())); } for (int i = lastCheckedIndex; i < inputExpressions.size(); i++) { @@ -213,7 +214,8 @@ public static ResultColumn.ColumnType identifyOutputColumnType( if (columnType != ResultColumn.ColumnType.CONSTANT && columnType != checkedType) { throw new SemanticException( String.format( - "Raw data and aggregation result hybrid input of '%s' is not supported.", + DataNodeQueryMessages + .RAW_DATA_AND_AGGREGATION_RESULT_HYBRID_INPUT_OF_S_IS_NOT_SUPPORTED, ((FunctionExpression) expression).getFunctionName())); } } @@ -583,7 +585,10 @@ public static boolean checkIsNeedTransform(Expression expression) { public static IDeviceID getDeviceNameInSourceExpression(Expression expression) { if (!(expression instanceof TimeSeriesOperand)) { throw new IllegalArgumentException( - "unsupported expression type for source expression: " + expression.getExpressionType()); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_UNSUPPORTED_EXPRESSION_TYPE_FOR_SOURCE_EXPRESSION_S_FB5583E7, + expression.getExpressionType())); } return ((TimeSeriesOperand) expression).getPath().getIDeviceID(); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/ExpressionTypeAnalyzer.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/ExpressionTypeAnalyzer.java index 0f79ab7db6a2c..b74b68c50f274 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/ExpressionTypeAnalyzer.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/ExpressionTypeAnalyzer.java @@ -448,7 +448,8 @@ public TSDataType visitCaseWhenThenExpression( if (typeSet.contains(TSDataType.TEXT)) { if (typeSet.stream().anyMatch(tsDataType -> tsDataType != TSDataType.TEXT)) { throw new SemanticException( - "CASE expression: TEXT and other types cannot exist at the same time"); + DataNodeQueryMessages + .CASE_EXPRESSION_TEXT_AND_OTHER_TYPES_CANNOT_EXIST_AT_THE_SAME_TIME); } return setExpressionType(caseWhenThenExpression, TSDataType.TEXT); } @@ -456,7 +457,8 @@ public TSDataType visitCaseWhenThenExpression( if (typeSet.contains(TSDataType.BOOLEAN)) { if (typeSet.stream().anyMatch(tsDataType -> tsDataType != TSDataType.BOOLEAN)) { throw new SemanticException( - "CASE expression: BOOLEAN and other types cannot exist at the same time"); + DataNodeQueryMessages + .CASE_EXPRESSION_BOOLEAN_AND_OTHER_TYPES_CANNOT_EXIST_AT_THE_SAME_TIME); } return setExpressionType(caseWhenThenExpression, TSDataType.BOOLEAN); } @@ -472,8 +474,10 @@ public TSDataType visitWhenThenExpression( if (!whenType.equals(TSDataType.BOOLEAN)) { throw new SemanticException( String.format( - "The expression in the WHEN clause must return BOOLEAN. expression: %s, actual data type: %s.", - whenThenExpression.getWhen().getExpressionString(), whenType.name())); + DataNodeQueryMessages + .THE_EXPRESSION_IN_THE_WHEN_CLAUSE_MUST_RETURN_BOOLEAN_EXPRESSION_S_ACTUAL_DATA_TYPE_S, + whenThenExpression.getWhen().getExpressionString(), + whenType.name())); } TSDataType thenType = process(whenThenExpression.getThen(), context); return setExpressionType(whenThenExpression, thenType); @@ -493,8 +497,11 @@ private void checkInputExpressionDataType( } throw new SemanticException( String.format( - "Invalid input expression data type. expression: %s, actual data type: %s, expected data type(s): %s.", - expressionString, actual.name(), Arrays.toString(expected))); + DataNodeQueryMessages + .INVALID_INPUT_EXPRESSION_DATA_TYPE_EXPRESSION_S_ACTUAL_DATA_TYPE_S_EXPECTED_DATA_TYPE_S, + expressionString, + actual.name(), + Arrays.toString(expected))); } private boolean isExpressionDataTypeSatisfy(Expression input, TSDataType... expected) { @@ -505,7 +512,10 @@ private boolean isExpressionDataTypeSatisfy(Expression input, TSDataType... expe return true; } throw new IllegalStateException( - String.format("The type of input expression %s is unknown", input)); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_THE_TYPE_OF_INPUT_EXPRESSION_S_IS_UNKNOWN_841AC714, + input)); } for (TSDataType type : expected) { if (actual.equals(type)) { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/ExpressionUtils.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/ExpressionUtils.java index 1d9bb7838d5f9..9c7e3ce7a57b2 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/ExpressionUtils.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/ExpressionUtils.java @@ -20,6 +20,7 @@ package org.apache.iotdb.db.queryengine.plan.analyze; import org.apache.iotdb.commons.path.PartialPath; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.common.MPPQueryContext; import org.apache.iotdb.db.queryengine.plan.expression.Expression; import org.apache.iotdb.db.queryengine.plan.expression.ExpressionType; @@ -266,7 +267,9 @@ public static Expression reconstructBinaryExpression( break; default: throw new IllegalArgumentException( - "unsupported rawExpression type: " + rawExpression.getExpressionType()); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_RAWEXPRESSION_TYPE_S_CDBBD685, + rawExpression.getExpressionType())); } return cloneCommonFields(rawExpression, resultExpression); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/GroupByLevelHelper.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/GroupByLevelHelper.java index 5431aaf3b268a..1f7465bf1b870 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/GroupByLevelHelper.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/GroupByLevelHelper.java @@ -23,6 +23,7 @@ import org.apache.iotdb.commons.exception.SemanticException; import org.apache.iotdb.commons.path.MeasurementPath; import org.apache.iotdb.commons.path.PartialPath; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.expression.Expression; import org.apache.tsfile.utils.Pair; @@ -131,7 +132,8 @@ private void checkAliasAndUpdateAliasMap(String alias, String groupedExpressionS if (columnToAliasMap.get(groupedExpressionString) == null) { if (aliasToColumnMap.get(alias) != null) { throw new SemanticException( - String.format("alias '%s' can only be matched with one result column", alias)); + String.format( + DataNodeQueryMessages.ALIAS_S_CAN_ONLY_BE_MATCHED_WITH_ONE_RESULT_COLUMN, alias)); } else { columnToAliasMap.put(groupedExpressionString, alias); aliasToColumnMap.put(alias, groupedExpressionString); @@ -140,8 +142,10 @@ private void checkAliasAndUpdateAliasMap(String alias, String groupedExpressionS } else if (!columnToAliasMap.get(groupedExpressionString).equals(alias)) { throw new SemanticException( String.format( - "Result column %s with more than one alias[%s, %s]", - groupedExpressionString, columnToAliasMap.get(groupedExpressionString), alias)); + DataNodeQueryMessages.RESULT_COLUMN_S_WITH_MORE_THAN_ONE_ALIAS_S_S, + groupedExpressionString, + columnToAliasMap.get(groupedExpressionString), + alias)); } } @@ -218,7 +222,11 @@ public void put(PartialPath rawPath, PartialPath groupedPath) { public PartialPath get(PartialPath rawPath) { PartialPath groupedPath = map.get(new Pair<>(rawPath, rawPath.getMeasurementAlias())); - checkState(groupedPath != null, "path '%s' is not analyzed in GroupByLevelHelper.", rawPath); + checkState( + groupedPath != null, + DataNodeQueryMessages + .EXCEPTION_PATH_QUOTE_ARG_QUOTE_IS_NOT_ANALYZED_IN_GROUPBYLEVELHELPER_DOT_BCEE9D39, + rawPath); return groupedPath; } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/PredicateUtils.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/PredicateUtils.java index 246f43b16aee9..fc5e9329f8a1b 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/PredicateUtils.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/PredicateUtils.java @@ -24,6 +24,7 @@ import org.apache.iotdb.commons.path.PartialPath; import org.apache.iotdb.commons.queryengine.plan.relational.metadata.ColumnSchema; import org.apache.iotdb.commons.queryengine.plan.relational.planner.Symbol; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.expression.Expression; import org.apache.iotdb.db.queryengine.plan.expression.ExpressionFactory; import org.apache.iotdb.db.queryengine.plan.expression.ExpressionType; @@ -341,7 +342,8 @@ public static Expression combineConjuncts(List conjuncts) { if (conjuncts.size() > 1000) { throw new SemanticException( - "There are too many conjuncts (more than 1000) in predicate after rewriting, this may be caused by too many devices in query, try to use ALIGN BY DEVICE"); + DataNodeQueryMessages + .THERE_ARE_TOO_MANY_CONJUNCTS_MORE_THAN_1000_IN_PREDICATE_AFTER_REWRITING_THIS_MAY_BE); } return constructRightDeepTreeWithAnd(conjuncts); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/SelectIntoUtils.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/SelectIntoUtils.java index a2e94b588f304..91f9de13fcb80 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/SelectIntoUtils.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/SelectIntoUtils.java @@ -76,7 +76,8 @@ public static PartialPath constructTargetDevice( if (curNode.equals(DOUBLE_COLONS)) { if (nodeIndex != templateNodes.length - 1) { throw new SemanticException( - "select into: placeholder `::` can only be used at the end of the path."); + DataNodeQueryMessages + .SELECT_INTO_PLACEHOLDER_CAN_ONLY_BE_USED_AT_THE_END_OF_THE_PATH); } while (nodeIndex < sourceNodes.length) { targetNodes.add(sourceNodes[nodeIndex]); @@ -112,7 +113,8 @@ private static String applyLevelPlaceholder(String templateNode, String[] source } if (index < 1 || index >= sourceNodes.length) { throw new SemanticException( - "select into: the i of ${i} should be greater than 0 and equal to or less than the length of queried path prefix."); + DataNodeQueryMessages + .SELECT_INTO_THE_I_OF_DOLLAR_I_SHOULD_BE_GREATER_THAN_0_AND_EQUAL_TO_OR_LESS_THAN_THE); } resNode = matcher.replaceFirst(sourceNodes[index]); matcher = LEVELED_PATH_TEMPLATE_PATTERN.matcher(resNode); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/TemplatedAggregationAnalyze.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/TemplatedAggregationAnalyze.java index d504becba2671..e1bef50380fa3 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/TemplatedAggregationAnalyze.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/TemplatedAggregationAnalyze.java @@ -22,6 +22,7 @@ import org.apache.iotdb.commons.path.PartialPath; import org.apache.iotdb.commons.queryengine.common.NodeRef; import org.apache.iotdb.commons.schema.template.Template; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.common.MPPQueryContext; import org.apache.iotdb.db.queryengine.common.schematree.ISchemaTree; import org.apache.iotdb.db.queryengine.plan.expression.Expression; @@ -278,7 +279,8 @@ private static boolean analyzeHaving(Analysis analysis, QueryStatement queryStat if (outputType != TSDataType.BOOLEAN) { throw new SemanticException( String.format( - "The output type of the expression in HAVING clause should be BOOLEAN, actual data type: %s.", + DataNodeQueryMessages + .THE_OUTPUT_TYPE_OF_THE_EXPRESSION_IN_HAVING_CLAUSE_SHOULD_BE_BOOLEAN_ACTUAL_DATA_TYPE_S, outputType)); } analysis.setHavingExpression(havingExpression); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/TemplatedAnalyze.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/TemplatedAnalyze.java index b99a7bc20d273..f3eefda1446c4 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/TemplatedAnalyze.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/TemplatedAnalyze.java @@ -25,6 +25,7 @@ import org.apache.iotdb.commons.partition.DataPartitionQueryParam; import org.apache.iotdb.commons.path.PartialPath; import org.apache.iotdb.commons.schema.template.Template; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.common.MPPQueryContext; import org.apache.iotdb.db.queryengine.common.schematree.DeviceSchemaInfo; import org.apache.iotdb.db.queryengine.common.schematree.ISchemaTree; @@ -294,19 +295,21 @@ static void analyzeDeviceToOrderBy( if (expressions.isEmpty()) { throw new SemanticException( String.format( - "%s in order by clause doesn't exist.", expressionForItem.getExpressionString())); + DataNodeQueryMessages.S_IN_ORDER_BY_CLAUSE_DOESN_T_EXIST, + expressionForItem.getExpressionString())); } if (expressions.size() > 1) { throw new SemanticException( String.format( - "%s in order by clause shouldn't refer to more than one timeseries.", + DataNodeQueryMessages + .S_IN_ORDER_BY_CLAUSE_SHOULDN_T_REFER_TO_MORE_THAN_ONE_TIMESERIES, expressionForItem.getExpressionString())); } expressionForItem = expressions.get(0); TSDataType dataType = analyzeExpressionType(analysis, expressionForItem); if (!dataType.isComparable()) { throw new SemanticException( - String.format("The data type of %s is not comparable", dataType)); + String.format(DataNodeQueryMessages.THE_DATA_TYPE_OF_S_IS_NOT_COMPARABLE, dataType)); } Expression deviceViewExpression = getMeasurementExpression(expressionForItem, analysis); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/TypeProvider.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/TypeProvider.java index dcc2c5e41a3fa..d08bb6c6f3ce7 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/TypeProvider.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/TypeProvider.java @@ -22,6 +22,7 @@ import org.apache.iotdb.commons.queryengine.plan.analyze.ITableTypeProvider; import org.apache.iotdb.commons.queryengine.plan.relational.planner.Symbol; import org.apache.iotdb.commons.queryengine.plan.relational.utils.TypeUtil; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import com.google.common.collect.ImmutableMap; import org.apache.tsfile.enums.TSDataType; @@ -120,10 +121,14 @@ public TypeProvider( } public Type getTableModelType(Symbol symbol) { - requireNonNull(symbol, "symbol is null"); + requireNonNull(symbol, DataNodeQueryMessages.EXCEPTION_SYMBOL_IS_NULL_AE539B31); Type type = tableModelTypes.get(symbol); - checkArgument(type != null, "no type found for symbol '%s' in TypeProvider", symbol); + checkArgument( + type != null, + DataNodeQueryMessages + .EXCEPTION_NO_TYPE_FOUND_FOR_SYMBOL_QUOTE_ARG_QUOTE_IN_TYPEPROVIDER_F4DD9DF7, + symbol); return type; } @@ -133,7 +138,7 @@ public boolean isSymbolExist(Symbol symbol) { } public void putTableModelType(Symbol symbol, Type type) { - requireNonNull(symbol, "symbol is null"); + requireNonNull(symbol, DataNodeQueryMessages.EXCEPTION_SYMBOL_IS_NULL_AE539B31); tableModelTypes.put(symbol, type); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/cache/partition/PartitionCache.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/cache/partition/PartitionCache.java index 97121eb82e86e..dc896ceca812e 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/cache/partition/PartitionCache.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/cache/partition/PartitionCache.java @@ -345,7 +345,7 @@ private void createDatabaseAndUpdateCache( // Try to update cache by databases successfully created updateDatabaseCache(successFullyCreatedDatabase); logger.warn( - "[{} Cache] failed to create database {}", + DataNodeQueryMessages.ARG_CACHE_FAILED_TO_CREATE_DATABASE_ARG, CacheMetrics.DATABASE_CACHE_NAME, databaseName); throw new IoTDBRuntimeException(tsStatus.message, tsStatus.code); @@ -390,7 +390,9 @@ private void createDatabaseAndUpdateCache(final String database, final String us updateDatabaseCache(Collections.singleton(database)); } else { logger.warn( - "[{} Cache] failed to create database {}", CacheMetrics.DATABASE_CACHE_NAME, database); + DataNodeQueryMessages.ARG_CACHE_FAILED_TO_CREATE_DATABASE_ARG, + CacheMetrics.DATABASE_CACHE_NAME, + database); throw new IoTDBRuntimeException(tsStatus.message, tsStatus.code); } } finally { @@ -420,7 +422,7 @@ private void getDatabaseMap( if (null == databaseName) { if (logger.isDebugEnabled()) { logger.debug( - "[{} Cache] miss when search device {}", + DataNodeQueryMessages.ARG_CACHE_MISS_WHEN_SEARCH_DEVICE_ARG, CacheMetrics.DATABASE_CACHE_NAME, devicePath); } @@ -440,7 +442,9 @@ private void getDatabaseMap( } if (logger.isDebugEnabled()) { logger.debug( - "[{} Cache] hit when search device {}", CacheMetrics.DATABASE_CACHE_NAME, deviceIDs); + DataNodeQueryMessages.ARG_CACHE_HIT_WHEN_SEARCH_DEVICE_ARG, + CacheMetrics.DATABASE_CACHE_NAME, + deviceIDs); } cacheMetrics.record(status, CacheMetrics.DATABASE_CACHE_NAME); } finally { @@ -505,11 +509,18 @@ private void getDatabaseCacheResult( } } catch (MetadataException e) { throw new IoTDBRuntimeException( - "An error occurred when executing getDeviceToDatabase():" + e.getMessage(), + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_AN_ERROR_OCCURRED_WHEN_EXECUTING_GETDEVICETODATABASE_S_CCA611CC, + e.getMessage()), e.getErrorCode()); } catch (TException | ClientManagerException e) { throw new StatementAnalyzeException( - "An error occurred when executing getDeviceToDatabase():" + e.getMessage(), e); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_AN_ERROR_OCCURRED_WHEN_EXECUTING_GETDEVICETODATABASE_S_CCA611CC, + e.getMessage()), + e); } } } @@ -528,7 +539,10 @@ public void checkAndAutoCreateDatabase( } } catch (final TException | ClientManagerException e) { throw new StatementAnalyzeException( - "An error occurred when executing getDeviceToDatabase():" + e.getMessage()); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_AN_ERROR_OCCURRED_WHEN_EXECUTING_GETDEVICETODATABASE_S_CCA611CC, + e.getMessage())); } } } @@ -595,7 +609,8 @@ public List getRegionReplicaSet(List conse updateGroupIdToReplicaSetMap(resp.getTimestamp(), resp.getRegionRouteMap()); } else { logger.warn( - "Unexpected error when getRegionReplicaSet: status {}, regionMap: {}", + DataNodeQueryMessages + .UNEXPECTED_ERROR_WHEN_GETREGIONREPLICASET_STATUS_ARG_REGIONMAP_ARG, resp.getStatus(), resp.getRegionRouteMap()); } @@ -604,11 +619,17 @@ public List getRegionReplicaSet(List conse if (result.isEmpty()) { // failed to get RegionReplicaSet from configNode throw new RuntimeException( - "Failed to get replicaSet of consensus groups[ids= " + consensusGroupIds + "]"); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_FAILED_TO_GET_REPLICASET_OF_CONSENSUS_GROUPS_IDS_S_CC30C7A6, + consensusGroupIds)); } } catch (ClientManagerException | TException e) { throw new StatementAnalyzeException( - "An error occurred when executing getRegionReplicaSet():" + e.getMessage()); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_AN_ERROR_OCCURRED_WHEN_EXECUTING_GETREGIONREPLICASET_S_370D5526, + e.getMessage())); } } } finally { @@ -697,7 +718,7 @@ public SchemaPartition getSchemaPartition( // if database not find, then return cache miss. if (logger.isDebugEnabled()) { logger.debug( - "[{} Cache] miss when search database {}", + DataNodeQueryMessages.ARG_CACHE_MISS_WHEN_SEARCH_DATABASE_ARG, CacheMetrics.SCHEMA_PARTITION_CACHE_NAME, databaseName); } @@ -716,7 +737,7 @@ public SchemaPartition getSchemaPartition( // if one device not find, then return cache miss. if (logger.isDebugEnabled()) { logger.debug( - "[{} Cache] miss when search device {}", + DataNodeQueryMessages.ARG_CACHE_MISS_WHEN_SEARCH_DEVICE_ARG, CacheMetrics.SCHEMA_PARTITION_CACHE_NAME, device); } @@ -757,7 +778,7 @@ public SchemaPartition getSchemaPartition(String database) { // if database not find, then return cache miss. if (logger.isDebugEnabled()) { logger.debug( - "[{} Cache] miss when search database {}", + DataNodeQueryMessages.ARG_CACHE_MISS_WHEN_SEARCH_DATABASE_ARG, CacheMetrics.SCHEMA_PARTITION_CACHE_NAME, database); } @@ -864,7 +885,7 @@ public DataPartition getDataPartition( if (null == dataPartitionTable) { if (logger.isDebugEnabled()) { logger.debug( - "[{} Cache] miss when search database {}", + DataNodeQueryMessages.ARG_CACHE_MISS_WHEN_SEARCH_DATABASE_ARG, CacheMetrics.DATA_PARTITION_CACHE_NAME, databaseName); } @@ -888,7 +909,7 @@ public DataPartition getDataPartition( if (null == cachedSeriesPartitionTable) { if (logger.isDebugEnabled()) { logger.debug( - "[{} Cache] miss when search device {}", + DataNodeQueryMessages.ARG_CACHE_MISS_WHEN_SEARCH_DEVICE_ARG, CacheMetrics.DATA_PARTITION_CACHE_NAME, param.getDeviceID()); } @@ -911,7 +932,7 @@ public DataPartition getDataPartition( || null == timePartitionSlot) { if (logger.isDebugEnabled()) { logger.debug( - "[{} Cache] miss when search time partition {}", + DataNodeQueryMessages.ARG_CACHE_MISS_WHEN_SEARCH_TIME_PARTITION_ARG, CacheMetrics.DATA_PARTITION_CACHE_NAME, timePartitionSlot); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/load/LoadTsFileAnalyzer.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/load/LoadTsFileAnalyzer.java index e357b86e0c736..01455bb212d76 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/load/LoadTsFileAnalyzer.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/load/LoadTsFileAnalyzer.java @@ -264,7 +264,8 @@ private boolean checkBeforeAnalyzeFileByFile(IAnalysis analysis) { // check if the system is read only if (CommonDescriptor.getInstance().getConfig().isReadOnly()) { LOGGER.info( - "LoadTsFileAnalyzer: Current datanode is read only, will try to convert to tablets and insert later."); + DataNodeQueryMessages + .LOADTSFILEANALYZER_CURRENT_DATANODE_IS_READ_ONLY_WILL_TRY_TO_CONVERT_TO_TABLETS_AND); } return true; @@ -316,8 +317,11 @@ private boolean doAnalyzeFileByFile(IAnalysis analysis) { } if (LOGGER.isInfoEnabled()) { LOGGER.info( - "Load - Analysis Stage: {}/{} tsfiles have been analyzed, progress: {}%", - i + 1, tsfileNum, String.format("%.3f", (i + 1) * 100.00 / tsfileNum)); + DataNodeQueryMessages + .LOAD_ANALYSIS_STAGE_ARG_ARG_TSFILES_HAVE_BEEN_ANALYZED_PROGRESS_ARG_PERCENT, + i + 1, + tsfileNum, + String.format("%.3f", (i + 1) * 100.00 / tsfileNum)); } continue; } @@ -327,8 +331,11 @@ private boolean doAnalyzeFileByFile(IAnalysis analysis) { analyzeSingleTsFile(tsFile, i); if (LOGGER.isInfoEnabled()) { LOGGER.info( - "Load - Analysis Stage: {}/{} tsfiles have been analyzed, progress: {}%", - i + 1, tsfileNum, String.format("%.3f", (i + 1) * 100.00 / tsfileNum)); + DataNodeQueryMessages + .LOAD_ANALYSIS_STAGE_ARG_ARG_TSFILES_HAVE_BEEN_ANALYZED_PROGRESS_ARG_PERCENT, + i + 1, + tsfileNum, + String.format("%.3f", (i + 1) * 100.00 / tsfileNum)); } } catch (AuthException e) { setFailAnalysisForAuthException(analysis, e); @@ -340,10 +347,12 @@ private boolean doAnalyzeFileByFile(IAnalysis analysis) { return false; } catch (BufferUnderflowException e) { LOGGER.warn( - "The file {} is not a valid tsfile. Please check the input file.", tsFile.getPath(), e); + DataNodeQueryMessages.THE_FILE_ARG_IS_NOT_A_VALID_TSFILE_PLEASE_CHECK_THE_INPUT_FILE, + tsFile.getPath(), + e); throw new SemanticException( String.format( - "The file %s is not a valid tsfile. Please check the input file.", + DataNodeQueryMessages.THE_FILE_S_IS_NOT_A_VALID_TSFILE_PLEASE_CHECK_THE_INPUT_FILE, tsFile.getPath())); } catch (Exception e) { final String exceptionMessage = @@ -370,7 +379,9 @@ private void analyzeSingleTsFile(final File tsFile, int i) throws Exception { final Map tableSchemaMap = reader.getTableSchemaMap(); final boolean isTableModelFile = Objects.nonNull(tableSchemaMap) && !tableSchemaMap.isEmpty(); LOGGER.info( - "TsFile {} is a {}-model file.", tsFile.getPath(), isTableModelFile ? "table" : "tree"); + DataNodeQueryMessages.TSFILE_ARG_IS_A_ARG_MODEL_FILE, + tsFile.getPath(), + isTableModelFile ? "table" : "tree"); // can be reused when constructing tsfile resource final TsFileSequenceReaderTimeseriesMetadataIterator timeseriesMetadataIterator = @@ -461,7 +472,8 @@ private boolean handleSingleMiniFile(final int i) throws FileNotFoundException { if (status == null || !loadTsFileDataTypeConverter.isSuccessful(status)) { LOGGER.warn( - "Load: Failed to convert mini tsfile {} to tablets from statement {}. Status: {}.", + DataNodeQueryMessages + .LOAD_FAILED_TO_CONVERT_MINI_TSFILE_ARG_TO_TABLETS_FROM_STATEMENT_ARG_STATUS_ARG, tsFiles.get(i).getPath(), isTableModelStatement ? loadTsFileTableStatement : loadTsFileTreeStatement, status); @@ -696,7 +708,8 @@ private void executeTabletConversionOnException( getFileModelInfoBeforeTabletConversion(); } catch (Exception e1) { LOGGER.warn( - "Load: Failed to convert to tablets from statement {} because failed to read model info from file, message: {}.", + DataNodeQueryMessages + .LOAD_FAILED_TO_CONVERT_TO_TABLETS_FROM_STATEMENT_ARG_BECAUSE_FAILED_TO_READ_MODEL_INFO, isTableModelStatement ? loadTsFileTableStatement : loadTsFileTreeStatement, e1.getMessage()); analysis.setFailStatus( @@ -732,7 +745,8 @@ private void executeTabletConversionOnException( if (status == null) { LOGGER.warn( - "Load: Failed to convert to tablets from statement {}. Status is null.", + DataNodeQueryMessages + .LOAD_FAILED_TO_CONVERT_TO_TABLETS_FROM_STATEMENT_ARG_STATUS_IS_NULL, isTableModelStatement ? loadTsFileTableStatement : loadTsFileTreeStatement); analysis.setFailStatus( new TSStatus(TSStatusCode.LOAD_FILE_ERROR.getStatusCode()) @@ -740,7 +754,7 @@ private void executeTabletConversionOnException( break; } else if (!loadTsFileDataTypeConverter.isSuccessful(status)) { LOGGER.warn( - "Load: Failed to convert to tablets from statement {}. Status: {}", + DataNodeQueryMessages.LOAD_FAILED_TO_CONVERT_TO_TABLETS_FROM_STATEMENT_ARG_STATUS_ARG, isTableModelStatement ? loadTsFileTableStatement : loadTsFileTreeStatement, status); analysis.setFailStatus(status); @@ -748,7 +762,8 @@ private void executeTabletConversionOnException( } } catch (final Exception e2) { LOGGER.warn( - "Load: Failed to convert to tablets from statement {} because exception: {}", + DataNodeQueryMessages + .LOAD_FAILED_TO_CONVERT_TO_TABLETS_FROM_STATEMENT_ARG_BECAUSE_EXCEPTION_ARG, isTableModelStatement ? loadTsFileTableStatement : loadTsFileTreeStatement, e2.getMessage()); analysis.setFailStatus( diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/load/LoadTsFileTableSchemaCache.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/load/LoadTsFileTableSchemaCache.java index 92a56d29a5522..322a86acfd3b3 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/load/LoadTsFileTableSchemaCache.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/load/LoadTsFileTableSchemaCache.java @@ -153,7 +153,8 @@ public void autoCreateAndVerify(final IDeviceID device) throws LoadAnalyzeExcept } catch (final Exception e) { if (IoTDBDescriptor.getInstance().getConfig().isSkipFailedTableSchemaCheck()) { LOGGER.info( - "Failed to check table schema, will skip because skipFailedTableSchemaCheck is set to true, message: {}", + DataNodeQueryMessages + .FAILED_TO_CHECK_TABLE_SCHEMA_WILL_SKIP_BECAUSE_SKIPFAILEDTABLESCHEMACHECK_IS_SET_TO_TRUE, e.getMessage()); } else { throw e; @@ -173,7 +174,8 @@ public boolean isDeviceDeletedByMods(final IDeviceID device) { currentModifications, currentTimeIndex, device); } catch (final IllegalPathException e) { LOGGER.warn( - "Failed to check if device {} is deleted by mods. Will see it as not deleted.", + DataNodeQueryMessages + .FAILED_TO_CHECK_IF_DEVICE_ARG_IS_DELETED_BY_MODS_WILL_SEE_IT_AS_NOT_DELETED, device, e); return false; @@ -217,7 +219,8 @@ private void doAutoCreateAndVerify() throws SemanticException { } catch (Exception e) { LOGGER.warn(DataNodeQueryMessages.AUTO_CREATE_OR_VERIFY_SCHEMA_ERROR, e); throw new SemanticException( - String.format("Auto create or verify schema error. Detail: %s.", e.getMessage())); + String.format( + DataNodeQueryMessages.AUTO_CREATE_OR_VERIFY_SCHEMA_ERROR_DETAIL_S, e.getMessage())); } } @@ -318,8 +321,10 @@ public void createTableAndDatabaseIfNecessary(final String tableName) if (Objects.isNull(realSchema)) { throw new LoadAnalyzeException( String.format( - "Failed to validate schema for table {%s, %s}", - fileSchema.getTableName(), fileSchema)); + DataNodeQueryMessages + .QUERY_EXCEPTION_FAILED_TO_VALIDATE_SCHEMA_FOR_TABLE_S_S_D7031B7B, + fileSchema.getTableName(), + fileSchema)); } verifyTableDataTypeAndGenerateTagColumnMapper(fileSchema, realSchema); } @@ -336,9 +341,10 @@ private void autoCreateTableDatabaseIfAbsent(final String database) throws LoadA if (!IoTDBDescriptor.getInstance().getConfig().isAutoCreateSchemaEnabled()) { throw new LoadAnalyzeException( - "The database " - + database - + " does not exist, please enable 'enable_auto_create_schema' to enable auto creation."); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_THE_DATABASE_S_DOES_NOT_EXIST_PLEASE_ENABLE_ENABLE_AUTO_B6683D0E, + database)); } AuthorityChecker.getAccessControl() @@ -352,8 +358,10 @@ private void autoCreateTableDatabaseIfAbsent(final String database) throws LoadA if (result.getStatusCode().getStatusCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()) { throw new LoadAnalyzeException( String.format( - "Auto create database failed: %s, status code: %s", - database, result.getStatusCode())); + DataNodeQueryMessages + .QUERY_EXCEPTION_AUTO_CREATE_DATABASE_FAILED_S_STATUS_CODE_S_D8EB60FA, + database, + result.getStatusCode())); } } catch (final Exception e) { throw new LoadAnalyzeException( @@ -390,8 +398,10 @@ private void verifyTableDataTypeAndGenerateTagColumnMapper( } else { throw new LoadAnalyzeException( String.format( - "Tag column %s in TsFile is not found in IoTDB table %s", - fileColumn.getName(), realSchema.getTableName())); + DataNodeQueryMessages + .QUERY_EXCEPTION_TAG_COLUMN_S_IN_TSFILE_IS_NOT_FOUND_IN_IOTDB_TABLE_S_12E8C1EF, + fileColumn.getName(), + realSchema.getTableName())); } } else if (fileColumn.getColumnCategory() == TsTableColumnCategory.FIELD) { ColumnSchema realColumn = fieldColumnNameToSchema.get(fileColumn.getName()); @@ -411,7 +421,8 @@ private void verifyTableDataTypeAndGenerateTagColumnMapper( } } else if (LOGGER.isDebugEnabled() && realColumn == null) { LOGGER.debug( - "Column {} in table {} is not found in IoTDB while loading TsFile.", + DataNodeQueryMessages + .COLUMN_ARG_IN_TABLE_ARG_IS_NOT_FOUND_IN_IOTDB_WHILE_LOADING_TSFILE, fileColumn.getName(), realSchema.getTableName()); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/load/LoadTsFileTreeSchemaCache.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/load/LoadTsFileTreeSchemaCache.java index d0335d1b3bd64..87375b5dfd427 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/load/LoadTsFileTreeSchemaCache.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/load/LoadTsFileTreeSchemaCache.java @@ -25,6 +25,7 @@ import org.apache.iotdb.db.conf.IoTDBConfig; import org.apache.iotdb.db.conf.IoTDBDescriptor; import org.apache.iotdb.db.exception.load.LoadRuntimeOutOfMemoryException; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.storageengine.dataregion.modification.ModEntry; import org.apache.iotdb.db.storageengine.dataregion.modification.ModificationFile; import org.apache.iotdb.db.storageengine.dataregion.tsfile.TsFileResource; @@ -104,7 +105,7 @@ public Map> getDevice2TimeSeries() { public boolean getDeviceIsAligned(IDeviceID device) { if (!tsFileDevice2IsAligned.containsKey(device)) { LOGGER.warn( - "Device {} is not in the tsFileDevice2IsAligned cache {}.", + DataNodeQueryMessages.DEVICE_ARG_IS_NOT_IN_THE_TSFILEDEVICE2ISALIGNED_CACHE_ARG, device, tsFileDevice2IsAligned); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/load/TreeSchemaAutoCreatorAndVerifier.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/load/TreeSchemaAutoCreatorAndVerifier.java index bfebb7db0d783..460337307508e 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/load/TreeSchemaAutoCreatorAndVerifier.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/load/TreeSchemaAutoCreatorAndVerifier.java @@ -120,7 +120,8 @@ public void autoCreateAndVerify( } } catch (IllegalPathException e) { LOGGER.warn( - "Failed to check if device {} is deleted by mods. Will see it as not deleted.", + DataNodeQueryMessages + .FAILED_TO_CHECK_IF_DEVICE_ARG_IS_DELETED_BY_MODS_WILL_SEE_IT_AS_NOT_DELETED, device, e); } @@ -135,7 +136,8 @@ public void autoCreateAndVerify( // IllegalPathException. if (!timeseriesMetadata.getMeasurementId().isEmpty()) { LOGGER.warn( - "Failed to check if device {}, timeseries {} is deleted by mods. Will see it as not deleted.", + DataNodeQueryMessages + .FAILED_TO_CHECK_IF_DEVICE_ARG_TIMESERIES_ARG_IS_DELETED_BY_MODS_WILL_SEE_IT_AS_NOT, device, timeseriesMetadata.getMeasurementId(), e); @@ -248,8 +250,10 @@ private void handleException(Exception e, String statementString) throws Semanti LOGGER.warn(DataNodeQueryMessages.AUTO_CREATE_OR_VERIFY_SCHEMA_ERROR, e); throw new SemanticException( String.format( - "Auto create or verify schema error when executing statement %s. Detail: %s.", - statementString, e.getMessage())); + DataNodeQueryMessages + .AUTO_CREATE_OR_VERIFY_SCHEMA_ERROR_WHEN_EXECUTING_STATEMENT_S_DETAIL_S, + statementString, + e.getMessage())); } private void makeSureNoDuplicatedMeasurementsInDevices() throws LoadAnalyzeException { @@ -269,7 +273,11 @@ private void makeSureNoDuplicatedMeasurementsInDevices() throws LoadAnalyzeExcep if (existingSchema != null) { if (existingSchema.getType() != timeseriesSchema.getType()) { throw new LoadAnalyzeException( - String.format("Duplicated measurements %s in device %s.", measurement, device)); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_DUPLICATED_MEASUREMENTS_S_IN_DEVICE_S_438713CD, + measurement, + device)); } deviceHasDuplicates = true; hasDuplicates = true; @@ -304,7 +312,10 @@ private void autoCreateDatabase() if (devicePrefixNodes.length < databasePrefixNodesLength) { throw new LoadAnalyzeException( String.format( - "Database level %d is longer than device %s.", databasePrefixNodesLength, device)); + DataNodeQueryMessages + .QUERY_EXCEPTION_DATABASE_LEVEL_D_IS_LONGER_THAN_DEVICE_S_9B34DD2F, + databasePrefixNodesLength, + device)); } final String[] databasePrefixNodes = new String[databasePrefixNodesLength]; @@ -384,11 +395,15 @@ private void executeSetDatabaseStatement(Statement statement) // root.db.ss.a) conflicts with the created database. just do not throw exception here. && result.status.code != TSStatusCode.DATABASE_CONFLICT.getStatusCode()) { LOGGER.warn( - "Create database error, statement: {}, result status is: {}", statement, result.status); + DataNodeQueryMessages.CREATE_DATABASE_ERROR_STATEMENT_ARG_RESULT_STATUS_IS_ARG, + statement, + result.status); throw new LoadFileException( String.format( - "Create database error, statement: %s, result status is: %s", - statement, result.status)); + DataNodeQueryMessages + .QUERY_EXCEPTION_CREATE_DATABASE_ERROR_STATEMENT_S_RESULT_STATUS_IS_S_5C4AFD58, + statement, + result.status)); } } @@ -451,8 +466,8 @@ private void verifySchema(ISchemaTree schemaTree) if (iotdbDeviceSchemaInfo == null) { throw new LoadAnalyzeException( String.format( - "Device %s does not exist in IoTDB and can not be created. " - + "Please check weather auto-create-schema is enabled.", + DataNodeQueryMessages + .QUERY_EXCEPTION_DEVICE_S_DOES_NOT_EXIST_IN_IOTDB_AND_CAN_NOT_BE_CREATED_5171DE45, device)); } @@ -462,10 +477,15 @@ private void verifySchema(ISchemaTree schemaTree) if (isAlignedInTsFile != isAlignedInIoTDB) { throw new LoadAnalyzeTypeMismatchException( String.format( - "Device %s in TsFile is %s, but in IoTDB is %s.", + DataNodeQueryMessages + .QUERY_EXCEPTION_DEVICE_S_IN_TSFILE_IS_S_BUT_IN_IOTDB_IS_S_350D5903, device, - isAlignedInTsFile ? "aligned" : "not aligned", - isAlignedInIoTDB ? "aligned" : "not aligned")); + isAlignedInTsFile + ? DataNodeQueryMessages.ALIGNMENT_ALIGNED + : DataNodeQueryMessages.ALIGNMENT_NOT_ALIGNED, + isAlignedInIoTDB + ? DataNodeQueryMessages.ALIGNMENT_ALIGNED + : DataNodeQueryMessages.ALIGNMENT_NOT_ALIGNED)); } // check timeseries schema @@ -477,15 +497,15 @@ private void verifySchema(ISchemaTree schemaTree) if (iotdbSchema == null) { throw new LoadAnalyzeException( String.format( - "Measurement %s does not exist in IoTDB and can not be created. " - + "Please check weather auto-create-schema is enabled.", + DataNodeQueryMessages + .QUERY_EXCEPTION_MEASUREMENT_S_DOES_NOT_EXIST_IN_IOTDB_AND_CAN_NOT_BE_CREATED_B1F446A5, device + TsFileConstant.PATH_SEPARATOR + tsfileTimeseriesSchemas.get(i))); } // check datatype if (LOGGER.isDebugEnabled() && !tsFileSchema.getType().equals(iotdbSchema.getType())) { LOGGER.debug( - "Measurement {}{}{} datatype not match, TsFile: {}, IoTDB: {}", + DataNodeQueryMessages.MEASUREMENT_ARGARGARG_DATATYPE_NOT_MATCH_TSFILE_ARG_IOTDB_ARG, device, TsFileConstant.PATH_SEPARATOR, iotdbSchema.getMeasurementName(), @@ -498,8 +518,8 @@ private void verifySchema(ISchemaTree schemaTree) && !tsFileSchema.getEncodingType().equals(iotdbSchema.getEncodingType())) { // we allow a measurement to have different encodings in different chunks LOGGER.debug( - "Encoding type not match, measurement: {}{}{}, " - + "TsFile encoding: {}, IoTDB encoding: {}", + DataNodeQueryMessages.ENCODING_TYPE_NOT_MATCH_MEASUREMENT_ARGARGARG + + DataNodeQueryMessages.TSFILE_ENCODING_ARG_IOTDB_ENCODING_ARG, device, TsFileConstant.PATH_SEPARATOR, iotdbSchema.getMeasurementName(), @@ -512,8 +532,8 @@ private void verifySchema(ISchemaTree schemaTree) && !tsFileSchema.getCompressor().equals(iotdbSchema.getCompressor())) { // we allow a measurement to have different compressors in different chunks LOGGER.debug( - "Compressor not match, measurement: {}{}{}, " - + "TsFile compressor: {}, IoTDB compressor: {}", + DataNodeQueryMessages.COMPRESSOR_NOT_MATCH_MEASUREMENT_ARGARGARG + + DataNodeQueryMessages.TSFILE_COMPRESSOR_ARG_IOTDB_COMPRESSOR_ARG, device, TsFileConstant.PATH_SEPARATOR, iotdbSchema.getMeasurementName(), diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/schema/AutoCreateSchemaExecutor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/schema/AutoCreateSchemaExecutor.java index 8143277a19853..fe8695c859d8b 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/schema/AutoCreateSchemaExecutor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/schema/AutoCreateSchemaExecutor.java @@ -32,6 +32,7 @@ import org.apache.iotdb.db.conf.IoTDBConfig; import org.apache.iotdb.db.conf.IoTDBDescriptor; import org.apache.iotdb.db.exception.load.LoadAnalyzeTypeMismatchException; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.protocol.session.SessionManager; import org.apache.iotdb.db.queryengine.common.MPPQueryContext; import org.apache.iotdb.db.queryengine.common.schematree.ClusterSchemaTree; @@ -537,9 +538,14 @@ private List executeInternalCreateTimeSeriesStatement( throw new SemanticException( new LoadAnalyzeTypeMismatchException( String.format( - "TimeSeries under this device is%s aligned, please use create%sTimeSeries or change device. (Path: %s)", - !pair.getLeft() ? "" : " not", - !pair.getLeft() ? "Aligned" : "", + DataNodeQueryMessages + .TIMESERIES_UNDER_THIS_DEVICE_ISS_ALIGNED_PLEASE_USE_CREATESTIMESERIES_OR_CHANGE_DEVICE, + !pair.getLeft() + ? DataNodeQueryMessages.EMPTY_MESSAGE + : DataNodeQueryMessages.NOT, + !pair.getLeft() + ? DataNodeQueryMessages.ALIGNED + : DataNodeQueryMessages.EMPTY_MESSAGE, devicePath.getFullPath()))); } } else { @@ -552,7 +558,8 @@ private List executeInternalCreateTimeSeriesStatement( new MetadataException( failedCreationSet.stream() .map(TSStatus::toString) - .collect(Collectors.joining("; ")))); + .collect( + Collectors.joining(DataNodeQueryMessages.EXCEPTION_SEMICOLON_0FAEF84A)))); } return alreadyExistingMeasurements; @@ -598,7 +605,10 @@ private void internalActivateTemplate( } } if (!failedActivationSet.isEmpty()) { - throw new SemanticException(new MetadataException(String.join("; ", failedActivationSet))); + throw new SemanticException( + new MetadataException( + String.join( + DataNodeQueryMessages.EXCEPTION_SEMICOLON_0FAEF84A, failedActivationSet))); } } else { throw new SemanticException(new IoTDBException(status)); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/schema/ClusterSchemaFetchExecutor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/schema/ClusterSchemaFetchExecutor.java index e9b5da059558e..a5f0856d74fce 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/schema/ClusterSchemaFetchExecutor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/schema/ClusterSchemaFetchExecutor.java @@ -265,7 +265,9 @@ private ClusterSchemaTree executeSchemaFetchQuery( ExecutionResult executionResult = executionStatement(queryId, fetchStatement, context); if (executionResult.status.getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()) { throw new QuerySchemaFetchFailedException( - String.format("Fetch Schema failed, because %s", executionResult.status.getMessage()), + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_FETCH_SCHEMA_FAILED_BECAUSE_S_BE584DCE, + executionResult.status.getMessage()), executionResult.status.getCode()); } IQueryExecution queryExecution = coordinator.getQueryExecution(queryId); @@ -285,7 +287,10 @@ private ClusterSchemaTree executeSchemaFetchQuery( } catch (IoTDBException e) { t = e; throw new QuerySchemaFetchFailedException( - String.format("Fetch Schema failed: %s", e.getMessage()), e.getErrorCode()); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_FETCH_SCHEMA_FAILED_S_1C7B0050, + e.getMessage()), + e.getErrorCode()); } if (!tsBlock.isPresent() || tsBlock.get().isEmpty()) { break; @@ -348,7 +353,8 @@ private void parseFetchedData( } } else { throw new RuntimeException( - new MetadataException("Failed to fetch schema because of unrecognized data")); + new MetadataException( + DataNodeQueryMessages.FAILED_TO_FETCH_SCHEMA_BECAUSE_OF_UNRECOGNIZED_DATA)); } } catch (MemoryNotEnoughException e) { throw e; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/QueryExecution.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/QueryExecution.java index a5f96e3c6c0b3..9fc64f520178f 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/QueryExecution.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/QueryExecution.java @@ -289,7 +289,8 @@ public void doLogicalPlan() { this.logicalPlan = planner.doLogicalPlan(analysis, context); if (isQuery() && LOGGER.isDebugEnabled()) { LOGGER.debug( - "logical plan is: \n {}", PlanNodeUtil.nodeToString(this.logicalPlan.getRootNode())); + DataNodeQueryMessages.LOGICAL_PLAN_IS_ARG, + PlanNodeUtil.nodeToString(this.logicalPlan.getRootNode())); } // check timeout after building logical plan because it could be time-consuming in some cases. checkTimeOutForQuery(); @@ -307,7 +308,8 @@ public void doDistributedPlan() { if (LOGGER.isDebugEnabled() && isQuery()) { LOGGER.debug( - "distribution plan done. Fragment instance count is {}, details is: \n {}", + DataNodeQueryMessages + .DISTRIBUTION_PLAN_DONE_FRAGMENT_INSTANCE_COUNT_IS_ARG_DETAILS_IS_ARG, distributedPlan.getInstances().size(), printFragmentInstances(distributedPlan.getInstances())); } @@ -428,7 +430,10 @@ public synchronized boolean isActive() { * implemented with DataStreamManager) */ private Optional getResult(ISourceHandleSupplier dataSupplier) throws IoTDBException { - checkArgument(resultHandle != null, "ResultHandle in Coordinator should be init firstly."); + checkArgument( + resultHandle != null, + DataNodeQueryMessages + .EXCEPTION_RESULTHANDLE_IN_COORDINATOR_SHOULD_BE_INIT_FIRSTLY_DOT_0F44159B); // iterate until we get a non-nullable TsBlock or result is finished while (true) { try { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/ConfigExecution.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/ConfigExecution.java index 121601ef00eeb..8db661830d84f 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/ConfigExecution.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/ConfigExecution.java @@ -24,6 +24,7 @@ import org.apache.iotdb.commons.exception.IoTDBRuntimeException; import org.apache.iotdb.commons.queryengine.common.SqlDialect; import org.apache.iotdb.commons.utils.TestOnly; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.common.MPPQueryContext; import org.apache.iotdb.db.queryengine.common.header.DatasetHeader; import org.apache.iotdb.db.queryengine.execution.QueryStateMachine; @@ -191,13 +192,14 @@ private void fail(final Throwable cause) { if ((Objects.nonNull(status) && isUserException(status)) || userExceptionCodes.contains(errorCode)) { LOGGER.info( - "Failures happened during running ConfigExecution when executing {}, message: {}, status: {}", + DataNodeQueryMessages + .FAILURES_HAPPENED_DURING_RUNNING_CONFIGEXECUTION_WHEN_EXECUTING_ARG_MESSAGE_ARG_STATUS, Objects.nonNull(task) ? task.getClass().getSimpleName() : null, cause.getMessage(), errorCode); } else { LOGGER.warn( - "Failures happened during running ConfigExecution when executing {}.", + DataNodeQueryMessages.FAILURES_HAPPENED_DURING_RUNNING_CONFIGEXECUTION_WHEN_EXECUTING_ARG, Objects.nonNull(task) ? task.getClass().getSimpleName() : null, cause); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/TableConfigTaskVisitor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/TableConfigTaskVisitor.java index 827590e86a011..c769980dfab2e 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/TableConfigTaskVisitor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/TableConfigTaskVisitor.java @@ -315,7 +315,9 @@ public TableConfigTaskVisitor( @Override public IConfigTask visitNode(final Node node, final MPPQueryContext context) { throw new UnsupportedOperationException( - "Unsupported statement type: " + node.getClass().getName()); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_STATEMENT_TYPE_S_FBCA7305, + node.getClass().getName())); } @Override @@ -372,7 +374,7 @@ private IConfigTask visitDatabaseStatement( if (strValue.isPresent()) { if (!strValue.get().equalsIgnoreCase(TTL_INFINITE)) { throw new SemanticException( - "ttl value must be 'INF' or a long literal, but now is: " + value); + DataNodeQueryMessages.TTL_VALUE_MUST_BE_INF_OR_A_LONG_LITERAL_BUT_NOW_IS + value); } if (node.getType() == DatabaseSchemaStatement.DatabaseSchemaStatementType.ALTER) { schema.setTTL(Long.MAX_VALUE); @@ -620,7 +622,9 @@ private Pair parseTable4CreateTableOrView( if (table.getColumnSchema(columnName) != null) { throw new SemanticException( - String.format("Columns in table shall not share the same name: '%s'.", columnName)); + String.format( + DataNodeQueryMessages.COLUMNS_IN_TABLE_SHALL_NOT_SHARE_THE_SAME_NAME_S, + columnName)); } // allow the user create time column @@ -642,7 +646,7 @@ private Pair parseTable4CreateTableOrView( if (!sourceNameSet.add(TreeViewSchema.getSourceName(schema))) { throw new SemanticException( String.format( - "The duplicated source measurement %s is unsupported yet.", + DataNodeQueryMessages.THE_DUPLICATED_SOURCE_MEASUREMENT_S_IS_UNSUPPORTED_YET, TreeViewSchema.getSourceName(schema))); } table.addColumnSchema(schema); @@ -872,8 +876,10 @@ public static void validateDatabaseName(final String dbName) throws SemanticExce new IllegalPathException( dbName, dbName.length() > MAX_DATABASE_NAME_LENGTH - ? "the length of database name shall not exceed " + MAX_DATABASE_NAME_LENGTH - : "the database name can only contain english or chinese characters, numbers, backticks and underscores.")); + ? DataNodeQueryMessages.THE_LENGTH_OF_DATABASE_NAME_SHALL_NOT_EXCEED + + MAX_DATABASE_NAME_LENGTH + : DataNodeQueryMessages + .THE_DATABASE_NAME_CAN_ONLY_CONTAIN_ENGLISH_OR_CHINESE_CHARACTERS_NUMBERS_BACKTICKS_AND)); } } @@ -904,7 +910,7 @@ private Map convertPropertiesToMap( if (strValue.isPresent()) { if (!strValue.get().equalsIgnoreCase(TTL_INFINITE)) { throw new SemanticException( - "ttl value must be 'INF' or a long literal, but now is: " + value); + DataNodeQueryMessages.TTL_VALUE_MUST_BE_INF_OR_A_LONG_LITERAL_BUT_NOW_IS + value); } map.put(key, strValue.get().toUpperCase(Locale.ENGLISH)); continue; @@ -916,7 +922,9 @@ private Map convertPropertiesToMap( } } else { throw new SemanticException( - DataNodeQueryMessages.TABLE_PROPERTY + key + "' is currently not allowed."); + DataNodeQueryMessages.TABLE_PROPERTY + + key + + DataNodeQueryMessages.IS_CURRENTLY_NOT_ALLOWED); } } return map; @@ -1098,15 +1106,15 @@ private long parseLongFromLiteral(final Object value, final String name) { if (!(value instanceof LongLiteral)) { throw new SemanticException( name - + " value must be a LongLiteral, but now is " + + DataNodeQueryMessages.VALUE_MUST_BE_A_LONGLITERAL_BUT_NOW_IS + (Objects.nonNull(value) ? value.getClass().getSimpleName() : null) - + ", value: " + + DataNodeQueryMessages.VALUE + value); } final long parsedValue = ((LongLiteral) value).getParsedValue(); if (parsedValue < 0) { throw new SemanticException( - name + " value must be equal to or greater than 0, but now is: " + value); + name + DataNodeQueryMessages.VALUE_MUST_BE_EQUAL_TO_OR_GREATER_THAN_0_BUT_NOW_IS + value); } return parsedValue; } @@ -1115,18 +1123,22 @@ private int parseIntFromLiteral(final Object value, final String name) { if (!(value instanceof LongLiteral)) { throw new SemanticException( name - + " value must be a LongLiteral, but now is " + + DataNodeQueryMessages.VALUE_MUST_BE_A_LONGLITERAL_BUT_NOW_IS + (Objects.nonNull(value) ? value.getClass().getSimpleName() : null) - + ", value: " + + DataNodeQueryMessages.VALUE + value); } final long parsedValue = ((LongLiteral) value).getParsedValue(); if (parsedValue < 0) { throw new SemanticException( - name + " value must be equal to or greater than 0, but now is: " + value); + name + DataNodeQueryMessages.VALUE_MUST_BE_EQUAL_TO_OR_GREATER_THAN_0_BUT_NOW_IS + value); } else if (parsedValue > Integer.MAX_VALUE) { throw new SemanticException( - name + " value must be lower than " + Integer.MAX_VALUE + ", but now is: " + value); + name + + DataNodeQueryMessages.VALUE_MUST_BE_LOWER_THAN + + Integer.MAX_VALUE + + DataNodeQueryMessages.BUT_NOW_IS + + value); } return (int) parsedValue; } @@ -1142,14 +1154,16 @@ public IConfigTask visitCreatePipe(final CreatePipe node, final MPPQueryContext if (sourceAttribute.startsWith(SystemConstant.SYSTEM_PREFIX_KEY)) { throw new SemanticException( String.format( - "Failed to create pipe %s, setting %s is not allowed.", - node.getPipeName(), sourceAttribute)); + DataNodeQueryMessages.FAILED_TO_CREATE_PIPE_S_SETTING_S_IS_NOT_ALLOWED, + node.getPipeName(), + sourceAttribute)); } if (sourceAttribute.startsWith(SystemConstant.AUDIT_PREFIX_KEY)) { throw new SemanticException( String.format( - "Failed to create pipe %s, setting %s is not allowed.", - node.getPipeName(), sourceAttribute)); + DataNodeQueryMessages.FAILED_TO_CREATE_PIPE_S_SETTING_S_IS_NOT_ALLOWED, + node.getPipeName(), + sourceAttribute)); } } @@ -1205,8 +1219,10 @@ public static void checkAndEnrichSourceUser( PipeSourceConstant.SOURCE_IOTDB_PASSWORD_KEY)) { throw new SemanticException( String.format( - "Failed to %s pipe %s, in iotdb-source, password must be set when the username is specified.", - isAlter ? "alter" : "create", pipeName)); + DataNodeQueryMessages + .FAILED_TO_S_PIPE_S_IN_IOTDB_SOURCE_PASSWORD_MUST_BE_SET_WHEN_THE_USERNAME_IS_SPECIFIED, + isAlter ? DataNodeQueryMessages.ALTER : DataNodeQueryMessages.CREATE, + pipeName)); } } @@ -1273,8 +1289,10 @@ public static void checkAndEnrichSinkUser( PipeSinkConstant.CONNECTOR_IOTDB_PASSWORD_KEY, PipeSinkConstant.SINK_IOTDB_PASSWORD_KEY)) { throw new SemanticException( String.format( - "Failed to %s pipe %s, in write-back-sink, password must be set when the username is specified.", - isAlter ? "alter" : "create", pipeName)); + DataNodeQueryMessages + .FAILED_TO_S_PIPE_S_IN_WRITE_BACK_SINK_PASSWORD_MUST_BE_SET_WHEN_THE_USERNAME_IS, + isAlter ? DataNodeQueryMessages.ALTER : DataNodeQueryMessages.CREATE, + pipeName)); } } @@ -1291,14 +1309,16 @@ public IConfigTask visitAlterPipe(final AlterPipe node, final MPPQueryContext co if (extractorAttributeKey.startsWith(SystemConstant.SYSTEM_PREFIX_KEY)) { throw new SemanticException( String.format( - "Failed to alter pipe %s, modifying %s is not allowed.", - pipeName, extractorAttributeKey)); + DataNodeQueryMessages.FAILED_TO_ALTER_PIPE_S_MODIFYING_S_IS_NOT_ALLOWED, + pipeName, + extractorAttributeKey)); } if (extractorAttributeKey.startsWith(SystemConstant.AUDIT_PREFIX_KEY)) { throw new SemanticException( String.format( - "Failed to alter pipe %s, modifying %s is not allowed.", - pipeName, extractorAttributeKey)); + DataNodeQueryMessages.FAILED_TO_ALTER_PIPE_S_MODIFYING_S_IS_NOT_ALLOWED, + pipeName, + extractorAttributeKey)); } } // If the source is replaced, sql-dialect uses the current Alter Pipe sql-dialect. If it is diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/TreeConfigTaskVisitor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/TreeConfigTaskVisitor.java index 8b7792bca985a..4d5789636a091 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/TreeConfigTaskVisitor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/TreeConfigTaskVisitor.java @@ -247,7 +247,9 @@ public class TreeConfigTaskVisitor extends StatementVisitor setDatabase( new IllegalPathException( databaseName, TsFileConstant.PATH_ROOT.equals(databaseName) - ? "the database name in tree model must start with 'root.'." - : "the length of database name shall not exceed " + MAX_DATABASE_NAME_LENGTH); + ? DataNodeQueryMessages.TREE_MODEL_DATABASE_NAME_MUST_START_WITH_ROOT + : String.format( + DataNodeQueryMessages.DATABASE_NAME_LENGTH_SHALL_NOT_EXCEED_FMT, + MAX_DATABASE_NAME_LENGTH)); future.setException( new IoTDBException( illegalPathException.getMessage(), illegalPathException.getErrorCode())); @@ -465,7 +467,8 @@ public SettableFuture setDatabase( future.set(new ConfigTaskResult(TSStatusCode.SUCCESS_STATUS)); } else { LOGGER.warn( - "Failed to execute create database {} in config node, status is {}.", + DataNodeQueryMessages + .FAILED_TO_EXECUTE_CREATE_DATABASE_ARG_IN_CONFIG_NODE_STATUS_IS_ARG, databaseSchemaStatement.getDatabasePath(), tsStatus); future.setException(new IoTDBException(tsStatus)); @@ -496,7 +499,8 @@ public SettableFuture alterDatabase( if (TSStatusCode.SUCCESS_STATUS.getStatusCode() != tsStatus.getCode()) { if (databaseSchemaStatement.getEnablePrintExceptionLog()) { LOGGER.warn( - "Failed to execute alter database {} in config node, status is {}.", + DataNodeQueryMessages + .FAILED_TO_EXECUTE_ALTER_DATABASE_ARG_IN_CONFIG_NODE_STATUS_IS_ARG, databaseSchemaStatement.getDatabasePath(), tsStatus); } @@ -568,7 +572,8 @@ public SettableFuture deleteDatabase( final TSStatus tsStatus = client.deleteDatabases(req); if (TSStatusCode.SUCCESS_STATUS.getStatusCode() != tsStatus.getCode()) { LOGGER.warn( - "Failed to execute delete database {} in config node, status is {}.", + DataNodeQueryMessages + .FAILED_TO_EXECUTE_DELETE_DATABASE_ARG_IN_CONFIG_NODE_STATUS_IS_ARG, deleteDatabaseStatement.getPrefixPath(), tsStatus); if (tsStatus.getCode() == TSStatusCode.MULTIPLE_ERROR.getStatusCode()) { @@ -598,7 +603,8 @@ public SettableFuture createFunction( future.setException( new IoTDBException( String.format( - "Failed to create UDF [%s], the given function name conflicts with the built-in function name.", + DataNodeQueryMessages + .QUERY_EXCEPTION_FAILED_TO_CREATE_UDF_S_THE_GIVEN_FUNCTION_NAME_CONFLICTS_6FBB1136, udfName.toUpperCase()), TSStatusCode.UDF_ALREADY_EXISTS.getStatusCode())); return future; @@ -619,7 +625,8 @@ public SettableFuture createFunction( if (uri.getScheme() == null) { future.setException( new IoTDBException( - "The scheme of URI is not set, please specify the scheme of URI.", + DataNodeQueryMessages + .QUERY_EXCEPTION_THE_SCHEME_OF_URI_IS_NOT_SET_PLEASE_SPECIFY_THE_SCHEME_OF_225DFB9E, TSStatusCode.UDF_DOWNLOAD_ERROR.getStatusCode())); return future; } @@ -652,7 +659,10 @@ public SettableFuture createFunction( e); future.setException( new IoTDBException( - "Failed to get executable for UDF '" + udfName + "', please check the URI.", + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_FAILED_TO_GET_EXECUTABLE_FOR_UDF_S_PLEASE_CHECK_THE_URI_F4D87A1E, + udfName), TSStatusCode.TRIGGER_DOWNLOAD_ERROR.getStatusCode())); return future; } @@ -693,21 +703,21 @@ public SettableFuture createFunction( if (!argNames.add(specification.getName().toUpperCase())) { future.setException( new IoTDBException( - "Failed to create function '" - + udfName - + "', because there is duplicate argument name '" - + specification.getName() - + "'.", + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_FAILED_TO_CREATE_FUNCTION_S_BECAUSE_THERE_IS_DUPLICATE_ARGUMENT_7905BC09, + udfName, + specification.getName()), TSStatusCode.UDF_LOAD_CLASS_ERROR.getStatusCode())); return future; } else if (checkObjectScalarParameter(specification)) { future.setException( new IoTDBException( - "Failed to create function '" - + udfName - + "', because there is an argument with OBJECT type '" - + specification.getName() - + "'.", + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_FAILED_TO_CREATE_FUNCTION_S_BECAUSE_THERE_IS_AN_ARGUMENT_E7A0B1D6, + udfName, + specification.getName()), TSStatusCode.UDF_LOAD_CLASS_ERROR.getStatusCode())); return future; } @@ -722,16 +732,18 @@ public SettableFuture createFunction( | InvocationTargetException | ClassCastException e) { LOGGER.warn( - "Failed to create function when try to create {}({}) instance first.", + DataNodeQueryMessages + .FAILED_TO_CREATE_FUNCTION_WHEN_TRY_TO_CREATE_ARG_ARG_INSTANCE_FIRST, baseClazz.getSimpleName(), udfName, e); future.setException( new IoTDBException( - "Failed to load class '" - + className - + "', because it's not found in jar file or is invalid: " - + stringURI.orElse(null), + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_FAILED_TO_LOAD_CLASS_S_BECAUSE_IT_S_NOT_FOUND_IN_JAR_FILE_E467D08D, + className, + stringURI.orElse(null)), TSStatusCode.UDF_LOAD_CLASS_ERROR.getStatusCode())); return future; } @@ -763,7 +775,10 @@ public SettableFuture dropFunction(Model model, String udfName if (UDFManagementService.getInstance().checkIsBuiltInFunctionName(model, udfName)) { future.setException( new IoTDBException( - String.format("Built-in function %s can not be deregistered.", udfName.toUpperCase()), + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_BUILT_IN_FUNCTION_S_CAN_NOT_BE_DEREGISTERED_1CC7D3C3, + udfName.toUpperCase()), TSStatusCode.DROP_UDF_ERROR.getStatusCode())); return future; } @@ -842,7 +857,8 @@ public SettableFuture createTrigger( if (uri.getScheme() == null) { future.setException( new IoTDBException( - "The scheme of URI is not set, please specify the scheme of URI.", + DataNodeQueryMessages + .QUERY_EXCEPTION_THE_SCHEME_OF_URI_IS_NOT_SET_PLEASE_SPECIFY_THE_SCHEME_OF_225DFB9E, TSStatusCode.TRIGGER_DOWNLOAD_ERROR.getStatusCode())); return future; } @@ -871,15 +887,16 @@ public SettableFuture createTrigger( } } catch (IOException | URISyntaxException e) { LOGGER.warn( - "Failed to get executable for Trigger({}) using URI: {}.", + DataNodeQueryMessages.FAILED_TO_GET_EXECUTABLE_FOR_TRIGGER_ARG_USING_URI_ARG, createTriggerStatement.getTriggerName(), createTriggerStatement.getUriString(), e); future.setException( new IoTDBException( - "Failed to get executable for Trigger '" - + createTriggerStatement.getUriString() - + "', please check the URI.", + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_FAILED_TO_GET_EXECUTABLE_FOR_TRIGGER_S_PLEASE_CHECK_THE_DA49134A, + createTriggerStatement.getUriString()), TSStatusCode.TRIGGER_DOWNLOAD_ERROR.getStatusCode())); return future; } @@ -908,15 +925,17 @@ public SettableFuture createTrigger( | InvocationTargetException | ClassCastException e) { LOGGER.warn( - "Failed to create trigger when try to create trigger({}) instance first.", + DataNodeQueryMessages + .FAILED_TO_CREATE_TRIGGER_WHEN_TRY_TO_CREATE_TRIGGER_ARG_INSTANCE_FIRST, createTriggerStatement.getTriggerName(), e); future.setException( new IoTDBException( - "Failed to load class '" - + createTriggerStatement.getClassName() - + "', because it's not found in jar file or is invalid: " - + createTriggerStatement.getUriString(), + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_FAILED_TO_LOAD_CLASS_S_BECAUSE_IT_S_NOT_FOUND_IN_JAR_FILE_E467D08D, + createTriggerStatement.getClassName(), + createTriggerStatement.getUriString()), TSStatusCode.TRIGGER_LOAD_CLASS_ERROR.getStatusCode())); return future; } @@ -925,7 +944,7 @@ public SettableFuture createTrigger( if (TSStatusCode.SUCCESS_STATUS.getStatusCode() != executionStatus.getCode()) { LOGGER.warn( - "[{}] Failed to create trigger {}. TSStatus is {}", + DataNodeQueryMessages.ARG_FAILED_TO_CREATE_TRIGGER_ARG_TSSTATUS_IS_ARG, executionStatus, createTriggerStatement.getTriggerName(), executionStatus.message); @@ -991,7 +1010,9 @@ public SettableFuture createPipePlugin( if (Objects.nonNull(pathError)) { future.setException( new IoTDBException( - String.format("Failed to create pipe plugin %s. " + pathError, pluginName), + String.format( + DataNodeQueryMessages.FAILED_TO_CREATE_PIPE_PLUGIN_PREFIX_FMT + pathError, + pluginName), TSStatusCode.SEMANTIC_ERROR.getStatusCode())); return future; } @@ -999,7 +1020,8 @@ public SettableFuture createPipePlugin( if (uriString == null || uriString.isEmpty()) { future.setException( new IoTDBException( - "Failed to create pipe plugin, because the URI is empty.", + DataNodeQueryMessages + .QUERY_EXCEPTION_FAILED_TO_CREATE_PIPE_PLUGIN_BECAUSE_THE_URI_IS_EMPTY_7FCB6EF4, TSStatusCode.SEMANTIC_ERROR.getStatusCode())); return future; } @@ -1016,7 +1038,8 @@ public SettableFuture createPipePlugin( if (uri.getScheme() == null) { future.setException( new IoTDBException( - "The scheme of URI is not set, please specify the scheme of URI.", + DataNodeQueryMessages + .QUERY_EXCEPTION_THE_SCHEME_OF_URI_IS_NOT_SET_PLEASE_SPECIFY_THE_SCHEME_OF_225DFB9E, TSStatusCode.SEMANTIC_ERROR.getStatusCode())); return future; } @@ -1048,15 +1071,16 @@ public SettableFuture createPipePlugin( return future; } catch (final IOException e) { LOGGER.warn( - "Failed to get executable for PipePlugin({}) using URI: {}.", + DataNodeQueryMessages.FAILED_TO_GET_EXECUTABLE_FOR_PIPEPLUGIN_ARG_USING_URI_ARG, createPipePluginStatement.getPluginName(), createPipePluginStatement.getUriString(), e); future.setException( new IoTDBException( - "Failed to get executable for PipePlugin " - + createPipePluginStatement.getPluginName() - + ", please check the URI.", + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_FAILED_TO_GET_EXECUTABLE_FOR_PIPEPLUGIN_S_PLEASE_CHECK_THE_FAC5DCB7, + createPipePluginStatement.getPluginName()), TSStatusCode.SEMANTIC_ERROR.getStatusCode())); return future; } @@ -1070,16 +1094,19 @@ public SettableFuture createPipePlugin( final boolean isTableModel = createPipePluginStatement.isTableModel(); if (!VisibilityUtils.isCompatible(pluginVisibility, isTableModel)) { LOGGER.info( - "Failed to create PipePlugin({}) because this plugin is not designed for {} model.", + DataNodeQueryMessages + .FAILED_TO_CREATE_PIPEPLUGIN_ARG_BECAUSE_THIS_PLUGIN_IS_NOT_DESIGNED_FOR_ARG_MODEL, createPipePluginStatement.getPluginName(), - isTableModel ? "table" : "tree"); + isTableModel ? DataNodeQueryMessages.MODEL_TABLE : DataNodeQueryMessages.MODEL_TREE); future.setException( new IoTDBException( - "Failed to create PipePlugin '" - + createPipePluginStatement.getPluginName() - + "', because this plugin is not designed for " - + (isTableModel ? "table" : "tree") - + " model.", + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_FAILED_TO_CREATE_PIPEPLUGIN_S_BECAUSE_THIS_PLUGIN_IS_NOT_F5A284B4, + createPipePluginStatement.getPluginName(), + (isTableModel + ? DataNodeQueryMessages.MODEL_TABLE + : DataNodeQueryMessages.MODEL_TREE)), TSStatusCode.PIPE_PLUGIN_LOAD_CLASS_ERROR.getStatusCode())); return future; } @@ -1093,15 +1120,17 @@ public SettableFuture createPipePlugin( | InvocationTargetException | ClassCastException e) { LOGGER.warn( - "Failed to create function when try to create PipePlugin({}) instance first.", + DataNodeQueryMessages + .FAILED_TO_CREATE_FUNCTION_WHEN_TRY_TO_CREATE_PIPEPLUGIN_ARG_INSTANCE_FIRST, createPipePluginStatement.getPluginName(), e); future.setException( new IoTDBException( - "Failed to load class '" - + createPipePluginStatement.getClassName() - + "', because it's not found in jar file or is invalid: " - + createPipePluginStatement.getUriString(), + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_FAILED_TO_LOAD_CLASS_S_BECAUSE_IT_S_NOT_FOUND_IN_JAR_FILE_E467D08D, + createPipePluginStatement.getClassName(), + createPipePluginStatement.getUriString()), TSStatusCode.PIPE_PLUGIN_LOAD_CLASS_ERROR.getStatusCode())); return future; } @@ -1122,7 +1151,7 @@ public SettableFuture createPipePlugin( jarFileName.substring(jarFileName.lastIndexOf(".") + 1)))); if (TSStatusCode.SUCCESS_STATUS.getStatusCode() != executionStatus.getCode()) { LOGGER.warn( - "Failed to create PipePlugin {}({}) because {}", + DataNodeQueryMessages.FAILED_TO_CREATE_PIPEPLUGIN_ARG_ARG_BECAUSE_ARG, pluginName, className, executionStatus.getMessage()); @@ -1151,7 +1180,7 @@ public SettableFuture dropPipePlugin( if (TSStatusCode.SUCCESS_STATUS.getStatusCode() != executionStatus.getCode()) { if (TSStatusCode.PIPE_NOT_EXIST_ERROR.getStatusCode() != executionStatus.getCode()) { LOGGER.warn( - "[{}] Failed to drop pipe plugin {}.", + DataNodeQueryMessages.ARG_FAILED_TO_DROP_PIPE_PLUGIN_ARG, executionStatus, dropPipePluginStatement.getPluginName()); } @@ -1202,7 +1231,7 @@ public SettableFuture setTTL(SetTTLStatement setTTLStatement, // Get response or throw exception if (TSStatusCode.SUCCESS_STATUS.getStatusCode() != tsStatus.getCode()) { LOGGER.warn( - "Failed to execute {} {} in config node, status is {}.", + DataNodeQueryMessages.FAILED_TO_EXECUTE_ARG_ARG_IN_CONFIG_NODE_STATUS_IS_ARG, taskName, setTTLStatement.getPath(), tsStatus); @@ -1309,9 +1338,9 @@ public SettableFuture setConfiguration(TSetConfigurationReq re if (!ignoredConfigItems.isEmpty()) { warningTsStatus = new TSStatus(TSStatusCode.EXECUTE_STATEMENT_ERROR.getStatusCode()); warningTsStatus.setMessage( - "ignored config items: " + DataNodeQueryMessages.MESSAGE_IGNORED_CONFIG_ITEMS_FE28ADBC + ignoredConfigItems - + " because they are immutable or undefined."); + + DataNodeQueryMessages.MESSAGE_BECAUSE_THEY_IMMUTABLE_UNDEFINED_07C04F65); if (req.getConfigs().isEmpty()) { future.setException(new IoTDBException(warningTsStatus)); return future; @@ -1392,13 +1421,15 @@ public SettableFuture startRepairData(boolean onCluster) { if (!StorageEngine.getInstance().isReadyForNonReadWriteFunctions()) { future.setException( new IoTDBException( - "not all sg is ready", TSStatusCode.EXECUTE_STATEMENT_ERROR.getStatusCode())); + DataNodeQueryMessages.QUERY_EXCEPTION_NOT_ALL_SG_IS_READY_9F51CF3E, + TSStatusCode.EXECUTE_STATEMENT_ERROR.getStatusCode())); return future; } if (!CompactionTaskManager.getInstance().isInit()) { future.setException( new IoTDBException( - "cannot start repair task because compaction is not enabled", + DataNodeQueryMessages + .QUERY_EXCEPTION_CANNOT_START_REPAIR_TASK_BECAUSE_COMPACTION_IS_NOT_ENABLED_975C8DCD, TSStatusCode.EXECUTE_STATEMENT_ERROR.getStatusCode())); return future; } @@ -1547,7 +1578,8 @@ public SettableFuture killQuery(final KillQueryStatement killQ if (splits.length != 4 || ((dataNodeId = Integer.parseInt(splits[3])) < 0)) { future.setException( new IoTDBException( - "Please ensure your input is correct", + DataNodeQueryMessages + .QUERY_EXCEPTION_PLEASE_ENSURE_YOUR_INPUT_QUERYID_IS_CORRECT_D86C841E, TSStatusCode.SEMANTIC_ERROR.getStatusCode(), true)); return future; @@ -1555,7 +1587,8 @@ public SettableFuture killQuery(final KillQueryStatement killQ } catch (NumberFormatException e) { future.setException( new IoTDBException( - "Please ensure your input is correct", + DataNodeQueryMessages + .QUERY_EXCEPTION_PLEASE_ENSURE_YOUR_INPUT_QUERYID_IS_CORRECT_D86C841E, TSStatusCode.SEMANTIC_ERROR.getStatusCode(), true)); return future; @@ -2051,7 +2084,8 @@ public SettableFuture alterSchemaTemplate( future.setException( new MetadataException( String.format( - "Duplicated measurement [%s] in device template alter request", + DataNodeQueryMessages + .QUERY_EXCEPTION_DUPLICATED_MEASUREMENT_S_IN_DEVICE_TEMPLATE_ALTER_REQUEST_963FE4A6, duplicateMeasurement))); return future; } @@ -2171,7 +2205,8 @@ public SettableFuture createPipe( future.setException( new IoTDBException( String.format( - "Failed to create Pipe %s because TSFile is configured with encryption, which prohibits the use of Pipe", + DataNodeQueryMessages + .QUERY_EXCEPTION_FAILED_TO_CREATE_PIPE_S_BECAUSE_TSFILE_IS_CONFIGURED_WITH_2F8CD704, pipeName), TSStatusCode.PIPE_ERROR.getStatusCode())); return future; @@ -2182,8 +2217,10 @@ public SettableFuture createPipe( future.setException( new IoTDBException( String.format( - "Failed to create pipe %s, pipe name starting with \"%s\" are not allowed to be created.", - pipeName, PipeStaticMeta.SYSTEM_PIPE_PREFIX), + DataNodeQueryMessages + .QUERY_EXCEPTION_FAILED_TO_CREATE_PIPE_S_PIPE_NAME_STARTING_WITH_S_ARE_NOT_201FE8C3, + pipeName, + PipeStaticMeta.SYSTEM_PIPE_PREFIX), TSStatusCode.PIPE_ERROR.getStatusCode())); return future; } @@ -2192,7 +2229,8 @@ public SettableFuture createPipe( if (Objects.nonNull(pathError)) { future.setException( new IoTDBException( - String.format("Failed to create pipe %s, " + pathError, pipeName), + String.format( + DataNodeQueryMessages.FAILED_TO_CREATE_PIPE_PREFIX_FMT + pathError, pipeName), TSStatusCode.SEMANTIC_ERROR.getStatusCode())); return future; } @@ -2345,8 +2383,10 @@ public SettableFuture alterPipe(final AlterPipeStatement alter future.setException( new IoTDBException( String.format( - "Failed to alter pipe %s, pipe name starting with \"%s\" are not allowed to be altered.", - alterPipeStatement.getPipeName(), PipeStaticMeta.SYSTEM_PIPE_PREFIX), + DataNodeQueryMessages + .QUERY_EXCEPTION_FAILED_TO_ALTER_PIPE_S_PIPE_NAME_STARTING_WITH_S_ARE_NOT_03D99ECF, + alterPipeStatement.getPipeName(), + PipeStaticMeta.SYSTEM_PIPE_PREFIX), TSStatusCode.PIPE_ERROR.getStatusCode())); return future; } @@ -2360,7 +2400,8 @@ public SettableFuture alterPipe(final AlterPipeStatement alter future.setException( new IoTDBException( String.format( - "Failed to get pipe info from config node, status is %s.", + DataNodeQueryMessages + .QUERY_EXCEPTION_FAILED_TO_GET_PIPE_INFO_FROM_CONFIG_NODE_STATUS_IS_S_FE797D7B, getAllPipeInfoResp.getStatus()), TSStatusCode.PIPE_ERROR.getStatusCode())); return future; @@ -2381,7 +2422,8 @@ public SettableFuture alterPipe(final AlterPipeStatement alter future.setException( new IoTDBException( String.format( - "Failed to alter pipe %s, pipe not found in system.", + DataNodeQueryMessages + .QUERY_EXCEPTION_FAILED_TO_ALTER_PIPE_S_PIPE_NOT_FOUND_IN_SYSTEM_63B5D3CC, alterPipeStatement.getPipeName()), TSStatusCode.PIPE_ERROR.getStatusCode())); return future; @@ -2390,8 +2432,9 @@ public SettableFuture alterPipe(final AlterPipeStatement alter future.setException( new IoTDBException( String.format( - "Failed to alter pipe %s, because %s", - alterPipeStatement.getPipeName(), e.getMessage()), + DataNodeQueryMessages.QUERY_EXCEPTION_FAILED_TO_ALTER_PIPE_S_BECAUSE_S_A1823289, + alterPipeStatement.getPipeName(), + e.getMessage()), TSStatusCode.PIPE_ERROR.getStatusCode())); return future; } @@ -2546,8 +2589,10 @@ private static void checkIfSourcePluginChanged( if (!PipeDataNodeAgent.plugin().checkIfPluginSameType(oldPluginName, newPluginName)) { throw new SemanticException( String.format( - "Failed to alter pipe, the source plugin of the pipe cannot be changed from %s to %s", - oldPluginName, newPluginName)); + DataNodeQueryMessages + .FAILED_TO_ALTER_PIPE_THE_SOURCE_PLUGIN_OF_THE_PIPE_CANNOT_BE_CHANGED_FROM_S_TO_S, + oldPluginName, + newPluginName)); } } @@ -2556,7 +2601,8 @@ private static void checkSourceTypeWithException( if (checkSourceType(replacedSourceAttributes)) { throw new SemanticException( String.format( - "Failed to alter pipe %s, in iotdb-source, password must be set when the username is specified.", + DataNodeQueryMessages + .FAILED_TO_ALTER_PIPE_S_IN_IOTDB_SOURCE_PASSWORD_MUST_BE_SET_WHEN_THE_USERNAME_IS, pipeName)); } } @@ -2597,7 +2643,8 @@ private static void checkSinkTypeWithException( if (checkSinkType(sinkAttributes)) { throw new SemanticException( String.format( - "Failed to alter pipe %s, in write-back-sink, password must be set when the username is specified.", + DataNodeQueryMessages + .FAILED_TO_ALTER_PIPE_S_IN_WRITE_BACK_SINK_PASSWORD_MUST_BE_SET_WHEN_THE_USERNAME_IS, pipeName)); } } @@ -2624,8 +2671,10 @@ public SettableFuture startPipe(final StartPipeStatement start future.setException( new IoTDBException( String.format( - "Failed to start pipe %s, pipe name starting with \"%s\" are not allowed to be started.", - startPipeStatement.getPipeName(), PipeStaticMeta.SYSTEM_PIPE_PREFIX), + DataNodeQueryMessages + .QUERY_EXCEPTION_FAILED_TO_START_PIPE_S_PIPE_NAME_STARTING_WITH_S_ARE_NOT_F16D488F, + startPipeStatement.getPipeName(), + PipeStaticMeta.SYSTEM_PIPE_PREFIX), TSStatusCode.PIPE_ERROR.getStatusCode())); return future; } @@ -2657,8 +2706,10 @@ public SettableFuture dropPipe(final DropPipeStatement dropPip future.setException( new IoTDBException( String.format( - "Failed to drop pipe %s, pipe name starting with \"%s\" are not allowed to be dropped.", - dropPipeStatement.getPipeName(), PipeStaticMeta.SYSTEM_PIPE_PREFIX), + DataNodeQueryMessages + .QUERY_EXCEPTION_FAILED_TO_DROP_PIPE_S_PIPE_NAME_STARTING_WITH_S_ARE_NOT_840E238B, + dropPipeStatement.getPipeName(), + PipeStaticMeta.SYSTEM_PIPE_PREFIX), TSStatusCode.PIPE_ERROR.getStatusCode())); return future; } @@ -2691,8 +2742,10 @@ public SettableFuture stopPipe(final StopPipeStatement stopPip future.setException( new IoTDBException( String.format( - "Failed to stop pipe %s, pipe name starting with \"%s\" are not allowed to be stopped.", - stopPipeStatement.getPipeName(), PipeStaticMeta.SYSTEM_PIPE_PREFIX), + DataNodeQueryMessages + .QUERY_EXCEPTION_FAILED_TO_STOP_PIPE_S_PIPE_NAME_STARTING_WITH_S_ARE_NOT_C78DFC3D, + stopPipeStatement.getPipeName(), + PipeStaticMeta.SYSTEM_PIPE_PREFIX), TSStatusCode.PIPE_ERROR.getStatusCode())); return future; } @@ -3288,7 +3341,7 @@ public TSStatus alterLogicalViewByPipe( if (TSStatusCode.SUCCESS_STATUS.getStatusCode() != tsStatus.getCode()) { LOGGER.warn( - "Failed to execute alter view {} by pipe, status is {}.", + DataNodeQueryMessages.FAILED_TO_EXECUTE_ALTER_VIEW_ARG_BY_PIPE_STATUS_IS_ARG, viewPathToSourceMap, tsStatus); } @@ -3535,10 +3588,12 @@ public SettableFuture removeDataNode( if (nodeIds.size() != 1) { LOGGER.error( - "The DataNode to be removed is not in the cluster, or the input format is incorrect."); + DataNodeQueryMessages + .THE_DATANODE_TO_BE_REMOVED_IS_NOT_IN_THE_CLUSTER_OR_THE_INPUT_FORMAT_IS_INCORRECT); future.setException( new IOException( - "The DataNode to be removed is not in the cluster, or the input format is incorrect.")); + DataNodeQueryMessages + .THE_DATANODE_TO_BE_REMOVED_IS_NOT_IN_THE_CLUSTER_OR_THE_INPUT_FORMAT_IS_INCORRECT)); return future; } @@ -3576,10 +3631,13 @@ public SettableFuture removeDataNode( return future; } else { LOGGER.info( - "Submit remove-datanode request successfully, but the process may fail. " - + "more details are shown in the logs of confignode-leader and removed-datanode, " - + "and after the process of removing datanode ends successfully, " - + "you are supposed to delete directory and data of the removed-datanode manually"); + DataNodeQueryMessages + .SUBMIT_REMOVE_DATANODE_REQUEST_SUCCESSFULLY_BUT_THE_PROCESS_MAY_FAIL + + DataNodeQueryMessages + .MORE_DETAILS_ARE_SHOWN_IN_THE_LOGS_OF_CONFIGNODE_LEADER_AND_REMOVED_DATANODE + + DataNodeQueryMessages.AND_AFTER_THE_PROCESS_OF_REMOVING_DATANODE_ENDS_SUCCESSFULLY + + DataNodeQueryMessages + .YOU_ARE_SUPPOSED_TO_DELETE_DIRECTORY_AND_DATA_OF_THE_REMOVED_DATANODE_MANUALLY); future.set(new ConfigTaskResult(TSStatusCode.SUCCESS_STATUS)); } } catch (Exception e) { @@ -3608,10 +3666,12 @@ public SettableFuture removeConfigNode( .collect(Collectors.toList()); if (removeConfigNodeLocations.size() != 1) { LOGGER.error( - "The ConfigNode to be removed is not in the cluster, or the input format is incorrect."); + DataNodeQueryMessages + .THE_CONFIGNODE_TO_BE_REMOVED_IS_NOT_IN_THE_CLUSTER_OR_THE_INPUT_FORMAT_IS_INCORRECT); future.setException( new IOException( - "The ConfigNode to be removed is not in the cluster, or the input format is incorrect.")); + DataNodeQueryMessages + .THE_CONFIGNODE_TO_BE_REMOVED_IS_NOT_IN_THE_CLUSTER_OR_THE_INPUT_FORMAT_IS_INCORRECT)); return future; } @@ -4196,7 +4256,8 @@ public SettableFuture useDatabase( } else { future.setException( new IoTDBException( - String.format("Unknown database %s", database), + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNKNOWN_DATABASE_S_5AB61128, database), TSStatusCode.DATABASE_NOT_EXIST.getStatusCode())); unsetDatabaseIfNotExist(useDB.getDatabaseId().getValue(), clientSession); } @@ -4224,17 +4285,20 @@ public SettableFuture dropDatabase( future.set(new ConfigTaskResult(TSStatusCode.SUCCESS_STATUS)); } else { LOGGER.info( - "Failed to DROP DATABASE {}, because it doesn't exist", + DataNodeQueryMessages.FAILED_TO_DROP_DATABASE_ARG_BECAUSE_IT_DOESN_T_EXIST, dropDB.getDbName().getValue()); future.setException( new IoTDBException( - String.format("Database %s doesn't exist", dropDB.getDbName().getValue()), + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_DATABASE_S_DOESN_T_EXIST_5A8EE8CA, + dropDB.getDbName().getValue()), TSStatusCode.DATABASE_NOT_EXIST.getStatusCode())); } unsetDatabaseIfNotExist(dropDB.getDbName().getValue(), session); } else { LOGGER.warn( - "Failed to execute delete database {} in config node, status is {}.", + DataNodeQueryMessages + .FAILED_TO_EXECUTE_DELETE_DATABASE_ARG_IN_CONFIG_NODE_STATUS_IS_ARG, dropDB.getDbName().getValue(), tsStatus); future.setException(new IoTDBException(tsStatus)); @@ -4272,7 +4336,9 @@ public SettableFuture createDatabase( } else { future.setException( new IoTDBException( - String.format("Database %s already exists", databaseSchema.getName()), + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_DATABASE_S_ALREADY_EXISTS_D8BE5332, + databaseSchema.getName()), TSStatusCode.DATABASE_ALREADY_EXISTS.getStatusCode())); } } else { @@ -4303,7 +4369,9 @@ public SettableFuture alterDatabase( } else { future.setException( new IoTDBException( - String.format("Database %s doesn't exist", databaseSchema.getName()), + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_DATABASE_S_DOESN_T_EXIST_5A8EE8CA, + databaseSchema.getName()), TSStatusCode.DATABASE_NOT_EXIST.getStatusCode())); } unsetDatabaseIfNotExist( diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/AlterTimeSeriesTask.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/AlterTimeSeriesTask.java index 396911e698e11..c9b9861cf2459 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/AlterTimeSeriesTask.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/AlterTimeSeriesTask.java @@ -47,7 +47,8 @@ public ListenableFuture execute(final IConfigTaskExecutor conf if (alterTimeSeriesStatement.getDataType() == null) { throw new IllegalArgumentException( String.format( - "Data type cannot be null executing the statement that alter timeseries %s set data type", + DataNodeQueryMessages + .QUERY_EXCEPTION_DATA_TYPE_CANNOT_BE_NULL_EXECUTING_THE_STATEMENT_THAT_ALTER_4C959B2F, alterTimeSeriesStatement.getPath().getFullPath())); } return configTaskExecutor.alterTimeSeriesDataType(queryId, alterTimeSeriesStatement); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/relational/ShowCreateViewTask.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/relational/ShowCreateViewTask.java index 1882df8410b2c..d46f3e7774ded 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/relational/ShowCreateViewTask.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/relational/ShowCreateViewTask.java @@ -62,9 +62,9 @@ public static void buildTsBlock( final TsTable table, final SettableFuture future) { if (!TreeViewSchema.isTreeViewTable(table)) { throw new SemanticException( - "The table " + DataNodeQueryMessages.THE_TABLE + table.getTableName() - + " is a base table, does not support show create view."); + + DataNodeQueryMessages.IS_A_BASE_TABLE_DOES_NOT_SUPPORT_SHOW_CREATE_VIEW); } final List outputDataTypes = ColumnHeaderConstant.showCreateViewColumnHeaders.stream() diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/session/DeallocateTask.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/session/DeallocateTask.java index 973f7cfa1f2cc..6b83905f0a378 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/session/DeallocateTask.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/session/DeallocateTask.java @@ -19,6 +19,7 @@ package org.apache.iotdb.db.queryengine.plan.execution.config.session; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.protocol.session.IClientSession; import org.apache.iotdb.db.protocol.session.SessionManager; import org.apache.iotdb.db.queryengine.plan.execution.config.ConfigTaskResult; @@ -48,7 +49,9 @@ public ListenableFuture execute(IConfigTaskExecutor configTask IClientSession session = SessionManager.getInstance().getCurrSession(); if (session == null) { future.setException( - new IllegalStateException("No current session available for DEALLOCATE statement")); + new IllegalStateException( + DataNodeQueryMessages + .QUERY_EXCEPTION_NO_CURRENT_SESSION_AVAILABLE_FOR_DEALLOCATE_STATEMENT_1EA5DE79)); return future; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/session/PrepareTask.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/session/PrepareTask.java index 89295bed6677a..0d2cbe0a7137c 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/session/PrepareTask.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/session/PrepareTask.java @@ -20,6 +20,7 @@ package org.apache.iotdb.db.queryengine.plan.execution.config.session; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Statement; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.protocol.session.IClientSession; import org.apache.iotdb.db.protocol.session.SessionManager; import org.apache.iotdb.db.queryengine.plan.execution.config.ConfigTaskResult; @@ -52,7 +53,9 @@ public ListenableFuture execute(IConfigTaskExecutor configTask IClientSession session = SessionManager.getInstance().getCurrSession(); if (session == null) { future.setException( - new IllegalStateException("No current session available for PREPARE statement")); + new IllegalStateException( + DataNodeQueryMessages + .QUERY_EXCEPTION_NO_CURRENT_SESSION_AVAILABLE_FOR_PREPARE_STATEMENT_36717E9B)); return future; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/session/PreparedStatementHelper.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/session/PreparedStatementHelper.java index 6ac494a6a58cc..c91accfb9981f 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/session/PreparedStatementHelper.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/session/PreparedStatementHelper.java @@ -21,6 +21,7 @@ import org.apache.iotdb.commons.exception.SemanticException; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Statement; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.protocol.session.IClientSession; import org.apache.iotdb.db.protocol.session.PreparedStatementInfo; @@ -34,7 +35,7 @@ public static PreparedStatementInfo register( IClientSession session, String statementName, Statement sql) { if (session.getPreparedStatement(statementName) != null) { throw new SemanticException( - String.format("Prepared statement '%s' already exists", statementName)); + String.format(DataNodeQueryMessages.PREPARED_STATEMENT_S_ALREADY_EXISTS, statementName)); } long memorySizeInBytes = sql == null ? 0L : sql.ramBytesUsed(); @@ -52,7 +53,7 @@ public static void unregister(IClientSession session, String statementName) { PreparedStatementInfo removedInfo = session.removePreparedStatement(statementName); if (removedInfo == null) { throw new SemanticException( - String.format("Prepared statement '%s' does not exist", statementName)); + String.format(DataNodeQueryMessages.PREPARED_STATEMENT_S_DOES_NOT_EXIST, statementName)); } PreparedStatementMemoryManager.getInstance().release(removedInfo.getMemorySizeInBytes()); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/session/PreparedStatementMemoryManager.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/session/PreparedStatementMemoryManager.java index e0d318fce75b8..d6c3bb948f76e 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/session/PreparedStatementMemoryManager.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/session/PreparedStatementMemoryManager.java @@ -21,6 +21,7 @@ import org.apache.iotdb.commons.exception.SemanticException; import org.apache.iotdb.commons.memory.IMemoryBlock; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.protocol.session.IClientSession; import org.apache.iotdb.db.protocol.session.PreparedStatementInfo; import org.apache.iotdb.db.queryengine.plan.Coordinator; @@ -69,20 +70,22 @@ public void allocate(String statementName, long memorySizeInBytes) { boolean allocated = sharedMemoryBlock.allocate(memorySizeInBytes); if (!allocated) { LOGGER.warn( - "Failed to allocate {} bytes from shared MemoryBlock '{}' for PreparedStatement '{}'", + DataNodeQueryMessages + .FAILED_TO_ALLOCATE_ARG_BYTES_FROM_SHARED_MEMORYBLOCK_ARG_FOR_PREPAREDSTATEMENT_ARG, memorySizeInBytes, SHARED_MEMORY_BLOCK_NAME, statementName); throw new SemanticException( String.format( - "Insufficient memory for PreparedStatement '%s'. " - + "Please deallocate some PreparedStatements and try again.", + DataNodeQueryMessages.INSUFFICIENT_MEMORY_FOR_PREPAREDSTATEMENT_S + + DataNodeQueryMessages.PLEASE_DEALLOCATE_SOME_PREPAREDSTATEMENTS_AND_TRY_AGAIN, statementName)); } if (LOGGER.isDebugEnabled()) { LOGGER.debug( - "Allocated {} bytes for PreparedStatement '{}' from shared MemoryBlock '{}'. ", + DataNodeQueryMessages + .ALLOCATED_ARG_BYTES_FOR_PREPAREDSTATEMENT_ARG_FROM_SHARED_MEMORYBLOCK_ARG, memorySizeInBytes, statementName, SHARED_MEMORY_BLOCK_NAME); @@ -104,13 +107,15 @@ public void release(long memorySizeInBytes) { long releasedSize = sharedMemoryBlock.release(memorySizeInBytes); if (LOGGER.isDebugEnabled()) { LOGGER.debug( - "Released {} bytes from shared MemoryBlock '{}' for PreparedStatement. ", + DataNodeQueryMessages + .RELEASED_ARG_BYTES_FROM_SHARED_MEMORYBLOCK_ARG_FOR_PREPAREDSTATEMENT, releasedSize, SHARED_MEMORY_BLOCK_NAME); } } else { LOGGER.error( - "Attempted to release memory from shared MemoryBlock '{}' but it is released", + DataNodeQueryMessages + .ATTEMPTED_TO_RELEASE_MEMORY_FROM_SHARED_MEMORYBLOCK_ARG_BUT_IT_IS_RELEASED, SHARED_MEMORY_BLOCK_NAME); } } @@ -148,7 +153,7 @@ public void releaseAllForSession(IClientSession session) { if (releasedCount > 0 && LOGGER.isDebugEnabled()) { LOGGER.debug( - "Released {} PreparedStatement(s) ({} bytes total) for session {}", + DataNodeQueryMessages.RELEASED_ARG_PREPAREDSTATEMENT_S_ARG_BYTES_TOTAL_FOR_SESSION_ARG, releasedCount, totalReleasedBytes, session); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/sys/pipe/PipeFunctionSupport.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/sys/pipe/PipeFunctionSupport.java index e9fb09e875032..2f422afb3548a 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/sys/pipe/PipeFunctionSupport.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/sys/pipe/PipeFunctionSupport.java @@ -20,6 +20,7 @@ package org.apache.iotdb.db.queryengine.plan.execution.config.sys.pipe; import org.apache.iotdb.commons.pipe.config.constant.PipeSourceConstant; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.tsfile.utils.Pair; import org.slf4j.Logger; @@ -63,7 +64,8 @@ private static Pair getExtractorAttributesKeyAndValue( value = extractorAttributes.get(key); } catch (Exception e) { LOGGER.warn( - "The prefix of sourceKey is not 'source.'. Please check the parameters passed in: {}", + DataNodeQueryMessages + .THE_PREFIX_OF_SOURCEKEY_IS_NOT_SOURCE_PLEASE_CHECK_THE_PARAMETERS_PASSED_IN_ARG, sourceKey, e); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/memory/MemorySourceHandle.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/memory/MemorySourceHandle.java index 7702a77cbc3ed..7a4919446cf92 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/memory/MemorySourceHandle.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/memory/MemorySourceHandle.java @@ -20,6 +20,7 @@ package org.apache.iotdb.db.queryengine.plan.execution.memory; import org.apache.iotdb.commons.exception.IoTDBException; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.execution.exchange.source.ISourceHandle; import org.apache.iotdb.mpp.rpc.thrift.TFragmentInstanceId; import org.apache.iotdb.rpc.TSStatusCode; @@ -46,7 +47,10 @@ public class MemorySourceHandle implements ISourceHandle { RamUsageEstimator.shallowSizeOfInstance(MemorySourceHandle.class); public MemorySourceHandle(TsBlock result) { - Validate.notNull(result, "the TsBlock should not be null when constructing MemorySourceHandle"); + Validate.notNull( + result, + DataNodeQueryMessages + .EXCEPTION_THE_TSBLOCK_SHOULD_NOT_BE_NULL_WHEN_CONSTRUCTING_MEMORYSOURCEHANDLE_8D205293); this.result = result; this.hasNext = true; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/multi/builtin/BuiltInScalarFunctionHelperFactory.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/multi/builtin/BuiltInScalarFunctionHelperFactory.java index 80cf9d282769c..be6a5dbd04af3 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/multi/builtin/BuiltInScalarFunctionHelperFactory.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/multi/builtin/BuiltInScalarFunctionHelperFactory.java @@ -19,6 +19,7 @@ package org.apache.iotdb.db.queryengine.plan.expression.multi.builtin; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.expression.multi.builtin.helper.CastFunctionHelper; import org.apache.iotdb.db.queryengine.plan.expression.multi.builtin.helper.DiffFunctionHelper; import org.apache.iotdb.db.queryengine.plan.expression.multi.builtin.helper.ReplaceFunctionHelper; @@ -46,7 +47,9 @@ public static BuiltInScalarFunctionHelper createHelper(String functionName) { return new RoundFunctionHelper(); default: throw new IllegalArgumentException( - String.format("Invalid scalar function [%s].", functionName)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_INVALID_SCALAR_FUNCTION_S_4DC1ED95, + functionName)); } } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/multi/builtin/helper/DiffFunctionHelper.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/multi/builtin/helper/DiffFunctionHelper.java index 0c2c65d4af112..b9a3097277c34 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/multi/builtin/helper/DiffFunctionHelper.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/multi/builtin/helper/DiffFunctionHelper.java @@ -22,6 +22,7 @@ import org.apache.iotdb.calc.transformation.dag.column.ColumnTransformer; import org.apache.iotdb.calc.transformation.dag.column.unary.scalar.DiffFunctionColumnTransformer; import org.apache.iotdb.commons.exception.SemanticException; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.expression.multi.FunctionExpression; import org.apache.iotdb.db.queryengine.plan.expression.multi.builtin.BuiltInScalarFunctionHelper; import org.apache.iotdb.db.queryengine.transformation.api.LayerReader; @@ -40,7 +41,8 @@ public void checkBuiltInScalarFunctionInputDataType(TSDataType tsDataType) return; } throw new SemanticException( - "Input series of Scalar function [DIFF] only supports numeric data types [INT32, INT64, FLOAT, DOUBLE]"); + DataNodeQueryMessages + .INPUT_SERIES_OF_SCALAR_FUNCTION_DIFF_ONLY_SUPPORTS_NUMERIC_DATA_TYPES_INT32_INT64_FLOAT); } @Override diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/multi/builtin/helper/ReplaceFunctionHelper.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/multi/builtin/helper/ReplaceFunctionHelper.java index e73220600078e..227d285e5e51c 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/multi/builtin/helper/ReplaceFunctionHelper.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/multi/builtin/helper/ReplaceFunctionHelper.java @@ -45,7 +45,8 @@ public void checkBuiltInScalarFunctionInputDataType(TSDataType tsDataType) return; } throw new SemanticException( - String.format("Unsupported data type %s for function REPLACE.", tsDataType)); + String.format( + DataNodeQueryMessages.UNSUPPORTED_DATA_TYPE_S_FOR_FUNCTION_REPLACE, tsDataType)); } @Override diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/multi/builtin/helper/RoundFunctionHelper.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/multi/builtin/helper/RoundFunctionHelper.java index 80c74e37782d2..259c85173839d 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/multi/builtin/helper/RoundFunctionHelper.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/multi/builtin/helper/RoundFunctionHelper.java @@ -22,6 +22,7 @@ import org.apache.iotdb.calc.transformation.dag.column.ColumnTransformer; import org.apache.iotdb.calc.transformation.dag.column.unary.scalar.RoundFunctionColumnTransformer; import org.apache.iotdb.commons.exception.SemanticException; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.expression.multi.FunctionExpression; import org.apache.iotdb.db.queryengine.plan.expression.multi.builtin.BuiltInScalarFunctionHelper; import org.apache.iotdb.db.queryengine.transformation.api.LayerReader; @@ -51,7 +52,8 @@ public void checkBuiltInScalarFunctionInputDataType(TSDataType tsDataType) return; } throw new SemanticException( - "Input series of Scalar function [ROUND] only supports numeric data types [INT32, INT64, FLOAT, DOUBLE]"); + DataNodeQueryMessages + .INPUT_SERIES_OF_SCALAR_FUNCTION_ROUND_ONLY_SUPPORTS_NUMERIC_DATA_TYPES_INT32_INT64_FLOAT); } @Override diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/multi/builtin/helper/SubStringFunctionHelper.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/multi/builtin/helper/SubStringFunctionHelper.java index 04aa409391885..7471818bcd7a1 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/multi/builtin/helper/SubStringFunctionHelper.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/multi/builtin/helper/SubStringFunctionHelper.java @@ -21,6 +21,7 @@ import org.apache.iotdb.calc.transformation.dag.column.ColumnTransformer; import org.apache.iotdb.commons.exception.SemanticException; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.expression.multi.FunctionExpression; import org.apache.iotdb.db.queryengine.plan.expression.multi.builtin.BuiltInScalarFunctionHelper; import org.apache.iotdb.db.queryengine.transformation.api.LayerReader; @@ -52,11 +53,13 @@ public void checkBuiltInScalarFunctionInputSize(FunctionExpression functionExpre if (functionExpression.getFunctionAttributes().isEmpty() || functionExpression.getExpressions().size() != 1) { throw new SemanticException( - "Argument exception,the scalar function [SUBSTRING] needs at least one argument,it must be a signed integer"); + DataNodeQueryMessages + .ARGUMENT_EXCEPTION_THE_SCALAR_FUNCTION_SUBSTRING_NEEDS_AT_LEAST_ONE_ARGUMENT_IT_MUST_BE); } if (functionExpression.getExpressionString().contains(NULL_STRING)) { throw new SemanticException( - "Syntax error,please check that the parameters of the function are correct"); + DataNodeQueryMessages + .SYNTAX_ERROR_PLEASE_CHECK_THAT_THE_PARAMETERS_OF_THE_FUNCTION_ARE_CORRECT); } } @@ -67,7 +70,8 @@ public void checkBuiltInScalarFunctionInputDataType(TSDataType tsDataType) return; } throw new SemanticException( - String.format("Unsupported data type %s for function SUBSTRING.", tsDataType)); + String.format( + DataNodeQueryMessages.UNSUPPORTED_DATA_TYPE_S_FOR_FUNCTION_SUBSTRING, tsDataType)); } @Override @@ -85,7 +89,8 @@ public ColumnTransformer getBuiltInScalarFunctionColumnTransformer( int subStringStart = Integer.parseInt(functionAttributes.getOrDefault(SUBSTRING_START, "0")); if (subStringLength < 0 || subStringStart < 0) { throw new SemanticException( - "Argument exception,the scalar function [SUBSTRING] beginPosition and length must be greater than 0"); + DataNodeQueryMessages + .ARGUMENT_EXCEPTION_THE_SCALAR_FUNCTION_SUBSTRING_BEGINPOSITION_AND_LENGTH_MUST_BE); } return new SubStringFunctionColumnTransformer( @@ -105,7 +110,8 @@ public Transformer getBuiltInScalarFunctionTransformer( int subStringStart = Integer.parseInt(functionAttributes.getOrDefault(SUBSTRING_START, "0")); if (subStringLength < 0 || subStringStart < 0) { throw new SemanticException( - "Argument exception,the scalar function [SUBSTRING] beginPosition and length must be greater than 0"); + DataNodeQueryMessages + .ARGUMENT_EXCEPTION_THE_SCALAR_FUNCTION_SUBSTRING_BEGINPOSITION_AND_LENGTH_MUST_BE); } return new SubStringFunctionTransformer(layerReader, subStringStart, subStringLength); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/other/CaseWhenThenExpression.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/other/CaseWhenThenExpression.java index 60c7c2b8bcc91..9ec18926a56eb 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/other/CaseWhenThenExpression.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/other/CaseWhenThenExpression.java @@ -23,6 +23,7 @@ import org.apache.iotdb.commons.queryengine.common.NodeRef; import org.apache.iotdb.commons.queryengine.execution.MemoryEstimationHelper; import org.apache.iotdb.commons.queryengine.plan.planner.plan.parameter.InputLocation; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.expression.Expression; import org.apache.iotdb.db.queryengine.plan.expression.ExpressionType; import org.apache.iotdb.db.queryengine.plan.expression.binary.WhenThenExpression; @@ -62,7 +63,9 @@ public CaseWhenThenExpression( public CaseWhenThenExpression(ByteBuffer byteBuffer) { int len = ReadWriteIOUtils.readInt(byteBuffer); Validate.isTrue( - len > 0, "the length of CaseWhenThenExpression's whenThenList must greater than 0"); + len > 0, + DataNodeQueryMessages + .EXCEPTION_THE_LENGTH_OF_CASEWHENTHENEXPRESSION_QUOTE_S_WHENTHENLIST_MUST_GREATER_THAN_0_069775ED); for (int i = 0; i < len; i++) { Expression expression = Expression.deserialize(byteBuffer); this.whenThenExpressions.add((WhenThenExpression) expression); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/unary/RegularExpression.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/unary/RegularExpression.java index 9882388d17f96..db821492cf31b 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/unary/RegularExpression.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/unary/RegularExpression.java @@ -20,6 +20,7 @@ package org.apache.iotdb.db.queryengine.plan.expression.unary; import org.apache.iotdb.commons.queryengine.execution.MemoryEstimationHelper; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.expression.Expression; import org.apache.iotdb.db.queryengine.plan.expression.ExpressionType; import org.apache.iotdb.db.queryengine.plan.expression.visitor.ExpressionVisitor; @@ -62,7 +63,11 @@ public RegularExpression(ByteBuffer byteBuffer) { super(Expression.deserialize(byteBuffer)); patternString = ReadWriteIOUtils.readString(byteBuffer); isNot = ReadWriteIOUtils.readBool(byteBuffer); - pattern = Pattern.compile(Validate.notNull(patternString, "patternString cannot be null")); + pattern = + Pattern.compile( + Validate.notNull( + patternString, + DataNodeQueryMessages.EXCEPTION_PATTERNSTRING_CANNOT_BE_NULL_8A2903F8)); } public String getPatternString() { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/visitor/ColumnTransformerVisitor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/visitor/ColumnTransformerVisitor.java index 2f094fd820627..17871eda0b15d 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/visitor/ColumnTransformerVisitor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/visitor/ColumnTransformerVisitor.java @@ -52,6 +52,7 @@ import org.apache.iotdb.calc.transformation.dag.udf.UDTFExecutor; import org.apache.iotdb.commons.queryengine.common.NodeRef; import org.apache.iotdb.commons.queryengine.plan.planner.plan.parameter.InputLocation; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.analyze.TypeProvider; import org.apache.iotdb.db.queryengine.plan.expression.Expression; import org.apache.iotdb.db.queryengine.plan.expression.binary.BinaryExpression; @@ -99,7 +100,9 @@ public class ColumnTransformerVisitor public ColumnTransformer visitExpression( Expression expression, ColumnTransformerVisitorContext context) { throw new UnsupportedOperationException( - "Unsupported statement type: " + expression.getClass().getName()); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_STATEMENT_TYPE_S_FBCA7305, + expression.getClass().getName())); } @Override @@ -606,7 +609,8 @@ public TSDataType getType(Expression expression) { } throw new IllegalStateException( String.format( - "Unknown expression type: %s, perhaps it has non existent measurement.", + DataNodeQueryMessages + .QUERY_EXCEPTION_UNKNOWN_EXPRESSION_TYPE_S_PERHAPS_IT_HAS_NON_EXISTENT_MEASUREMENT_B6705F86, expression.getOutputSymbol())); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/visitor/ExpressionAnalyzeVisitor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/visitor/ExpressionAnalyzeVisitor.java index e31921d7c643d..a8d06eca2d1c1 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/visitor/ExpressionAnalyzeVisitor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/visitor/ExpressionAnalyzeVisitor.java @@ -19,6 +19,7 @@ package org.apache.iotdb.db.queryengine.plan.expression.visitor; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.expression.Expression; import java.util.List; @@ -28,7 +29,9 @@ public abstract class ExpressionAnalyzeVisitor extends ExpressionVisitor getResultsFromChild(Expression expression, C context) { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/visitor/IntermediateLayerVisitor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/visitor/IntermediateLayerVisitor.java index 2f2fd0ca78af8..90109818be8f8 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/visitor/IntermediateLayerVisitor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/visitor/IntermediateLayerVisitor.java @@ -94,7 +94,9 @@ public class IntermediateLayerVisitor public IntermediateLayer visitExpression( Expression expression, IntermediateLayerVisitorContext context) { throw new UnsupportedOperationException( - "Unsupported statement type: " + expression.getClass().getName()); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_STATEMENT_TYPE_S_FBCA7305, + expression.getClass().getName())); } @Override @@ -323,7 +325,9 @@ private Transformer getConcreteUnaryTransformer(Expression expression, LayerRead return new RegularTransformer(parentReader, regularExpression.getPattern()); default: throw new UnsupportedOperationException( - "Unsupported Expression Type: " + expression.getExpressionType()); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_EXPRESSION_TYPE_S_737846D6, + expression.getExpressionType())); } } @@ -361,7 +365,9 @@ private Transformer getConcreteBinaryTransformer( return new LogicOrTransformer(leftParentLayerReader, rightParentLayerReader); default: throw new UnsupportedOperationException( - "Unsupported Expression Type: " + expression.getExpressionType()); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_EXPRESSION_TYPE_S_737846D6, + expression.getExpressionType())); } } @@ -379,7 +385,9 @@ private Transformer getConcreteTernaryTransformer( betweenExpression.isNotBetween()); } throw new UnsupportedOperationException( - "Unsupported Expression Type: " + expression.getExpressionType()); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_EXPRESSION_TYPE_S_737846D6, + expression.getExpressionType())); } private UDFQueryTransformer getUdfTransformer( diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/visitor/TransformToViewExpressionVisitor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/visitor/TransformToViewExpressionVisitor.java index 27befb28c9066..5b7c39a791ac9 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/visitor/TransformToViewExpressionVisitor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/visitor/TransformToViewExpressionVisitor.java @@ -45,6 +45,7 @@ import org.apache.iotdb.commons.schema.view.viewExpression.unary.LogicNotViewExpression; import org.apache.iotdb.commons.schema.view.viewExpression.unary.NegationViewExpression; import org.apache.iotdb.commons.schema.view.viewExpression.unary.RegularViewExpression; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.expression.Expression; import org.apache.iotdb.db.queryengine.plan.expression.binary.AdditionExpression; import org.apache.iotdb.db.queryengine.plan.expression.binary.BinaryExpression; @@ -90,8 +91,10 @@ public ViewExpression process(Expression expression, Void context) { @Override public ViewExpression visitExpression(Expression expression, Void context) { throw new UnsupportedOperationException( - "Unsupported expression type in TransformToViewExpressionVisitor: " - + expression.getExpressionType()); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_UNSUPPORTED_EXPRESSION_TYPE_IN_TRANSFORMTOVIEWEXPRESSIONVISITOR_0871FB56, + expression.getExpressionType())); } // region leaf operand diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/visitor/cartesian/BindSchemaForExpressionVisitor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/visitor/cartesian/BindSchemaForExpressionVisitor.java index 6802023cc0d08..be869b5522590 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/visitor/cartesian/BindSchemaForExpressionVisitor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/visitor/cartesian/BindSchemaForExpressionVisitor.java @@ -24,6 +24,7 @@ import org.apache.iotdb.commons.path.PartialPath; import org.apache.iotdb.commons.schema.view.LogicalViewSchema; import org.apache.iotdb.commons.schema.view.viewExpression.ViewExpression; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.common.MPPQueryContext; import org.apache.iotdb.db.queryengine.common.schematree.ISchemaTree; import org.apache.iotdb.db.queryengine.plan.analyze.ExpressionUtils; @@ -147,7 +148,8 @@ public static Expression transformViewPath( IMeasurementSchema measurementSchema = measurementPath.getMeasurementSchema(); if (!measurementSchema.isLogicalView()) { throw new IllegalArgumentException( - "Can not construct expression using non view path in transformViewPath!"); + DataNodeQueryMessages + .QUERY_EXCEPTION_CAN_NOT_CONSTRUCT_EXPRESSION_USING_NON_VIEW_PATH_IN_TRANSFORMVIEWPATH_A9CCB5B1); } ViewExpression viewExpression = ((LogicalViewSchema) measurementSchema).getExpression(); @@ -163,7 +165,7 @@ public static class Context implements QueryContextProvider { public Context(final ISchemaTree schemaTree, final MPPQueryContext queryContext) { this.schemaTree = schemaTree; - Validate.notNull(queryContext, "QueryContext is null"); + Validate.notNull(queryContext, DataNodeQueryMessages.EXCEPTION_QUERYCONTEXT_IS_NULL_C2344379); this.queryContext = queryContext; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/visitor/cartesian/BindSchemaForPredicateVisitor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/visitor/cartesian/BindSchemaForPredicateVisitor.java index fcb426dd97a5a..ae60ec381df24 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/visitor/cartesian/BindSchemaForPredicateVisitor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/visitor/cartesian/BindSchemaForPredicateVisitor.java @@ -22,6 +22,7 @@ import org.apache.iotdb.calc.utils.constant.SqlConstant; import org.apache.iotdb.commons.path.MeasurementPath; import org.apache.iotdb.commons.path.PartialPath; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.common.MPPQueryContext; import org.apache.iotdb.db.queryengine.common.schematree.ISchemaTree; import org.apache.iotdb.db.queryengine.plan.expression.Expression; @@ -175,7 +176,7 @@ public Context( this.prefixPaths = prefixPaths; this.schemaTree = schemaTree; this.isRoot = isRoot; - Validate.notNull(queryContext, "QueryContext is null"); + Validate.notNull(queryContext, DataNodeQueryMessages.EXCEPTION_QUERYCONTEXT_IS_NULL_C2344379); this.queryContext = queryContext; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/visitor/cartesian/ConcatDeviceAndBindSchemaForExpressionVisitor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/visitor/cartesian/ConcatDeviceAndBindSchemaForExpressionVisitor.java index 309d4a741bcf1..038040666739c 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/visitor/cartesian/ConcatDeviceAndBindSchemaForExpressionVisitor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/visitor/cartesian/ConcatDeviceAndBindSchemaForExpressionVisitor.java @@ -23,6 +23,7 @@ import org.apache.iotdb.commons.exception.SemanticException; import org.apache.iotdb.commons.path.MeasurementPath; import org.apache.iotdb.commons.path.PartialPath; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.common.MPPQueryContext; import org.apache.iotdb.db.queryengine.common.schematree.ISchemaTree; import org.apache.iotdb.db.queryengine.plan.analyze.ExpressionUtils; @@ -119,7 +120,8 @@ public List visitTimeSeriesOperand( Expression replacedExpression = transformViewPath(measurementPath, context.getSchemaTree()); if (!(replacedExpression instanceof TimeSeriesOperand)) { throw new SemanticException( - "Only writable view timeseries are supported in ALIGN BY DEVICE queries."); + DataNodeQueryMessages + .ONLY_WRITABLE_VIEW_TIMESERIES_ARE_SUPPORTED_IN_ALIGN_BY_DEVICE_QUERIES); } replacedExpression.setViewPath(measurementPath); @@ -151,7 +153,7 @@ public Context( final MPPQueryContext queryContext) { this.devicePath = devicePath; this.schemaTree = schemaTree; - Validate.notNull(queryContext, "QueryContext is null"); + Validate.notNull(queryContext, DataNodeQueryMessages.EXCEPTION_QUERYCONTEXT_IS_NULL_C2344379); this.queryContext = queryContext; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/visitor/cartesian/ConcatDeviceAndBindSchemaForHavingVisitor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/visitor/cartesian/ConcatDeviceAndBindSchemaForHavingVisitor.java index 0ff52b29756a2..7f1a1b7133cdf 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/visitor/cartesian/ConcatDeviceAndBindSchemaForHavingVisitor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/visitor/cartesian/ConcatDeviceAndBindSchemaForHavingVisitor.java @@ -22,6 +22,7 @@ import org.apache.iotdb.commons.exception.SemanticException; import org.apache.iotdb.commons.path.MeasurementPath; import org.apache.iotdb.commons.path.PartialPath; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.analyze.ExpressionUtils; import org.apache.iotdb.db.queryengine.plan.expression.Expression; import org.apache.iotdb.db.queryengine.plan.expression.leaf.TimeSeriesOperand; @@ -66,7 +67,8 @@ public List visitTimeSeriesOperand( Expression replacedExpression = transformViewPath(measurementPath, context.getSchemaTree()); if (!(replacedExpression instanceof TimeSeriesOperand)) { throw new SemanticException( - "Only writable view timeseries are supported in ALIGN BY DEVICE queries."); + DataNodeQueryMessages + .ONLY_WRITABLE_VIEW_TIMESERIES_ARE_SUPPORTED_IN_ALIGN_BY_DEVICE_QUERIES); } replacedExpression.setViewPath(measurementPath); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/visitor/cartesian/ConcatDeviceAndBindSchemaForPredicateVisitor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/visitor/cartesian/ConcatDeviceAndBindSchemaForPredicateVisitor.java index ae28b0111d982..230b23dfb4d03 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/visitor/cartesian/ConcatDeviceAndBindSchemaForPredicateVisitor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/visitor/cartesian/ConcatDeviceAndBindSchemaForPredicateVisitor.java @@ -89,7 +89,8 @@ public List visitTimeSeriesOperand(TimeSeriesOperand predicate, Cont Expression replacedExpression = transformViewPath(measurementPath, context.getSchemaTree()); if (!(replacedExpression instanceof TimeSeriesOperand)) { throw new SemanticException( - "Only writable view timeseries are supported in ALIGN BY DEVICE queries."); + DataNodeQueryMessages + .ONLY_WRITABLE_VIEW_TIMESERIES_ARE_SUPPORTED_IN_ALIGN_BY_DEVICE_QUERIES); } replacedExpression.setViewPath(measurementPath); @@ -124,7 +125,7 @@ public Context( this.devicePath = devicePath; this.schemaTree = schemaTree; this.isWhere = isWhere; - Validate.notNull(queryContext, "QueryContext is null"); + Validate.notNull(queryContext, DataNodeQueryMessages.EXCEPTION_QUERYCONTEXT_IS_NULL_C2344379); this.queryContext = queryContext; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/visitor/cartesian/ConcatExpressionWithSuffixPathsVisitor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/visitor/cartesian/ConcatExpressionWithSuffixPathsVisitor.java index b92ca3918d216..4d9c3d2137d07 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/visitor/cartesian/ConcatExpressionWithSuffixPathsVisitor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/visitor/cartesian/ConcatExpressionWithSuffixPathsVisitor.java @@ -22,6 +22,7 @@ import org.apache.iotdb.calc.utils.constant.SqlConstant; import org.apache.iotdb.commons.path.PartialPath; import org.apache.iotdb.commons.path.PathPatternTree; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.common.MPPQueryContext; import org.apache.iotdb.db.queryengine.plan.expression.Expression; import org.apache.iotdb.db.queryengine.plan.expression.leaf.ConstantOperand; @@ -108,7 +109,7 @@ public Context( final MPPQueryContext queryContext) { this.prefixPaths = prefixPaths; this.patternTree = patternTree; - Validate.notNull(queryContext, "QueryContext is null"); + Validate.notNull(queryContext, DataNodeQueryMessages.EXCEPTION_QUERYCONTEXT_IS_NULL_C2344379); this.queryContext = queryContext; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/visitor/predicate/ConvertPredicateToFilterVisitor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/visitor/predicate/ConvertPredicateToFilterVisitor.java index dc979d2f29450..a2ff5ef6adbf8 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/visitor/predicate/ConvertPredicateToFilterVisitor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/visitor/predicate/ConvertPredicateToFilterVisitor.java @@ -356,7 +356,9 @@ private Filter constructFilterFromDouble( default: throw new UnsupportedOperationException( - String.format("Unsupported expression type %s", expressionType)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_EXPRESSION_TYPE_S_7C6F99A9, + expressionType)); } } @@ -375,7 +377,9 @@ public Filter constructFilterForGreaterThanMax( default: throw new UnsupportedOperationException( - String.format("Unsupported expression type %s", expressionType)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_EXPRESSION_TYPE_S_7C6F99A9, + expressionType)); } } @@ -393,7 +397,9 @@ public Filter constructFilterForLessThanMin(ExpressionType expressionType, int m default: throw new UnsupportedOperationException( - String.format("Unsupported expression type %s", expressionType)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_EXPRESSION_TYPE_S_7C6F99A9, + expressionType)); } } @@ -418,7 +424,9 @@ private > Filter constructValueFilter( return ValueFilterApi.ltEq(measurementIndex, value, dataType); default: throw new UnsupportedOperationException( - String.format("Unsupported expression type %s", expressionType)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_EXPRESSION_TYPE_S_7C6F99A9, + expressionType)); } } @@ -500,7 +508,10 @@ public static > T getValue(String valueString, TSDataTyp return (T) Boolean.FALSE; } else { throw new IllegalArgumentException( - String.format("\"%s\" cannot be cast to [%s]", valueString, dataType)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_S_CANNOT_BE_CAST_TO_S_DABC2DA0, + valueString, + dataType)); } case BLOB: return (T) new Binary(BaseEncoding.base16().decode(valueString)); @@ -511,11 +522,16 @@ public static > T getValue(String valueString, TSDataTyp return (T) DateTimeUtils.parseDateExpressionToInt(valueString); default: throw new UnsupportedOperationException( - String.format("Unsupported data type %s", dataType)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_S_4CB21D47, + dataType)); } } catch (NumberFormatException e) { throw new IllegalArgumentException( - String.format("\"%s\" cannot be cast to [%s]", valueString, dataType)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_S_CANNOT_BE_CAST_TO_S_DABC2DA0, + valueString, + dataType)); } } @@ -552,7 +568,9 @@ public int getMeasurementIndex(String measurement) { int measurementIndex = allMeasurements.indexOf(measurement); if (measurementIndex == -1) { throw new IllegalArgumentException( - String.format("Measurement %s does not exist", measurement)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_MEASUREMENT_S_DOES_NOT_EXIST_23D2B5BE, + measurement)); } return measurementIndex; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/visitor/predicate/ConvertPredicateToTimeFilterVisitor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/visitor/predicate/ConvertPredicateToTimeFilterVisitor.java index 40cb3ad000b7d..e573a7dcf225e 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/visitor/predicate/ConvertPredicateToTimeFilterVisitor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/visitor/predicate/ConvertPredicateToTimeFilterVisitor.java @@ -190,7 +190,9 @@ private Filter constructCompareFilter( return TimeFilterApi.ltEq(value); default: throw new UnsupportedOperationException( - String.format("Unsupported expression type %s", expressionType)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_EXPRESSION_TYPE_S_7C6F99A9, + expressionType)); } } @@ -226,7 +228,10 @@ public Filter visitBetweenExpression(BetweenExpression betweenExpression, Void c // 1 NOT BETWEEN time AND 0 => TRUE checkArgument( value <= maxValue, - String.format("Predicate [%s] should be simplified in previous step", betweenExpression)); + String.format( + DataNodeQueryMessages + .EXCEPTION_PREDICATE_LEFT_BRACKET_ARG_RIGHT_BRACKET_SHOULD_BE_SIMPLIFIED_IN_PREVIOUS_STEP_9262C154, + betweenExpression)); return isNot ? TimeFilterApi.gt(value) : TimeFilterApi.ltEq(value); } @@ -243,7 +248,10 @@ public Filter visitBetweenExpression(BetweenExpression betweenExpression, Void c // 1 NOT BETWEEN 0 AND time => time < 1 checkArgument( value >= minValue, - String.format("Predicate [%s] should be simplified in previous step", betweenExpression)); + String.format( + DataNodeQueryMessages + .EXCEPTION_PREDICATE_LEFT_BRACKET_ARG_RIGHT_BRACKET_SHOULD_BE_SIMPLIFIED_IN_PREVIOUS_STEP_9262C154, + betweenExpression)); return isNot ? TimeFilterApi.lt(value) : TimeFilterApi.gtEq(value); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/optimization/AggregationPushDown.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/optimization/AggregationPushDown.java index 48ca03c341e69..f852a267d2440 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/optimization/AggregationPushDown.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/optimization/AggregationPushDown.java @@ -152,7 +152,9 @@ private boolean cannotUseStatistics( } } else { throw new IllegalArgumentException( - String.format("Invalid Aggregation Expression: %s", expression.getExpressionString())); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_INVALID_AGGREGATION_EXPRESSION_S_B28EB91B, + expression.getExpressionString())); } } return false; @@ -178,7 +180,9 @@ private boolean cannotUseStatisticsForTemplate(Set aggregationExpres } } else { throw new IllegalArgumentException( - String.format("Invalid Aggregation Expression: %s", expression.getExpressionString())); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_INVALID_AGGREGATION_EXPRESSION_S_B28EB91B, + expression.getExpressionString())); } } return false; @@ -231,7 +235,9 @@ public PlanNode visitSingleDeviceView(SingleDeviceViewNode node, RewriterContext } catch (IllegalPathException e) { throw new IllegalStateException( String.format( - "Illegal device path: %s in AggregationPushDown rule.", node.getDevice())); + DataNodeQueryMessages + .QUERY_EXCEPTION_ILLEGAL_DEVICE_PATH_S_IN_AGGREGATIONPUSHDOWN_RULE_60D5F633, + node.getDevice())); } PlanNode rewrittenChild = node.getChild().accept(this, context); node.setChild(rewrittenChild); @@ -549,7 +555,8 @@ private List constructSourceNodeFromTemplateAggregationDescriptors( if (!context.analysis.getDeviceTemplate().isDirectAligned()) { throw new IllegalStateException( - "Aggregation descriptors with non aligned template are not supported"); + DataNodeQueryMessages + .QUERY_EXCEPTION_AGGREGATION_DESCRIPTORS_WITH_NON_ALIGNED_TEMPLATE_ARE_NOT_6D3C7C0F); } AlignedPath alignedPath = new AlignedPath(devicePath); alignedPath.setMeasurementList(measurementList); @@ -647,7 +654,8 @@ private static class RewriterContext { public RewriterContext(Analysis analysis, MPPQueryContext context, boolean isAlignByDevice) { this.analysis = analysis; - Validate.notNull(context, "Query context cannot be null."); + Validate.notNull( + context, DataNodeQueryMessages.EXCEPTION_QUERY_CONTEXT_CANNOT_BE_NULL_DOT_2D3369FE); this.context = context; this.isAlignByDevice = isAlignByDevice; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/optimization/PredicatePushDown.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/optimization/PredicatePushDown.java index b09d70792bae5..6c3ea558953b4 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/optimization/PredicatePushDown.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/optimization/PredicatePushDown.java @@ -211,7 +211,8 @@ private void extractPushDownConjunctsForEachChild( // find the push down predicate for each child for (PlanNode child : children) { checkArgument( - child instanceof SeriesScanSourceNode, "Unexpected node type: " + child.getClass()); + child instanceof SeriesScanSourceNode, + DataNodeQueryMessages.EXCEPTION_UNEXPECTED_NODE_TYPE_COLON_41FBCBF3 + child.getClass()); PartialPath sourcePath = ((SeriesScanSourceNode) child).getPartitionPath(); if (sourcePath instanceof MeasurementPath) { pushDownConjunctsForEachChild.add( @@ -286,7 +287,9 @@ public PlanNode visitAlignedSeriesScan(AlignedSeriesScanNode node, RewriterConte return visitSeriesScanSource(node, context); } TemplatedInfo templatedInfo = context.getTemplatedInfo(); - checkState(templatedInfo != null, "TemplatedInfo should not be null"); + checkState( + templatedInfo != null, + DataNodeQueryMessages.EXCEPTION_TEMPLATEDINFO_SHOULD_NOT_BE_NULL_B5898568); Expression inheritedPredicate = context.getInheritedPredicate(); if (context.enablePushDownUseTemplate() diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/ASTVisitor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/ASTVisitor.java index 49f79a6a923c0..0fbdcc14408af 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/ASTVisitor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/ASTVisitor.java @@ -578,7 +578,7 @@ public void parseAttributeClausesForCreateAlignedTimeSeries( props.remove(IoTDBConstant.COLUMN_TIMESERIES_COMPRESSION.toLowerCase()); } catch (Exception e) { throw new SemanticException( - String.format("unsupported compression: %s", compressionString)); + String.format(DataNodeQueryMessages.UNSUPPORTED_COMPRESSION_S, compressionString)); } } else { createAlignedTimeSeriesStatement.addCompressor(compressor); @@ -796,7 +796,8 @@ public Statement visitShowTimeseries(IoTDBSqlParser.ShowTimeseriesContext ctx) { if (ctx.timeseriesWhereClause() != null) { if (ctx.timeConditionClause() != null) { throw new SemanticException( - "TIMESERIES condition and TIME condition cannot be used at the same time."); + DataNodeQueryMessages + .TIMESERIES_CONDITION_AND_TIME_CONDITION_CANNOT_BE_USED_AT_THE_SAME_TIME); } SchemaFilter schemaFilter = parseTimeseriesWhereClause(ctx.timeseriesWhereClause()); showTimeSeriesStatement.setSchemaFilter(schemaFilter); @@ -810,7 +811,7 @@ public Statement visitShowTimeseries(IoTDBSqlParser.ShowTimeseriesContext ctx) { if (ctx.orderByTimeseriesClause() != null) { if (orderByHeat) { throw new SemanticException( - "LATEST and ORDER BY TIMESERIES cannot be used at the same time."); + DataNodeQueryMessages.LATEST_AND_ORDER_BY_TIMESERIES_CANNOT_BE_USED_AT_THE_SAME_TIME); } showTimeSeriesStatement.setTimeseriesOrdering( ctx.orderByTimeseriesClause().DESC() != null ? Ordering.DESC : Ordering.ASC); @@ -901,7 +902,8 @@ public Statement visitShowDevices(IoTDBSqlParser.ShowDevicesContext ctx) { if (ctx.devicesWhereClause() != null) { if (ctx.timeConditionClause() != null) { throw new SemanticException( - "DEVICE condition and TIME condition cannot be used at the same time."); + DataNodeQueryMessages + .DEVICE_CONDITION_AND_TIME_CONDITION_CANNOT_BE_USED_AT_THE_SAME_TIME); } showDevicesStatement.setSchemaFilter(parseDevicesWhereClause(ctx.devicesWhereClause())); } @@ -982,7 +984,8 @@ public Statement visitCountTimeseries(CountTimeseriesContext ctx) { if (ctx.INTEGER_LITERAL() != null) { if (ctx.timeConditionClause() != null) { throw new SemanticException( - "TIME condition and GROUP BY LEVEL cannot be used at the same time."); + DataNodeQueryMessages + .TIME_CONDITION_AND_GROUP_BY_LEVEL_CANNOT_BE_USED_AT_THE_SAME_TIME); } int level = Integer.parseInt(ctx.INTEGER_LITERAL().getText()); statement = new CountLevelTimeSeriesStatement(path, level); @@ -992,7 +995,8 @@ public Statement visitCountTimeseries(CountTimeseriesContext ctx) { if (ctx.timeseriesWhereClause() != null) { if (ctx.timeConditionClause() != null) { throw new SemanticException( - "TIMESERIES condition and TIME condition cannot be used at the same time."); + DataNodeQueryMessages + .TIMESERIES_CONDITION_AND_TIME_CONDITION_CANNOT_BE_USED_AT_THE_SAME_TIME); } SchemaFilter schemaFilter = parseTimeseriesWhereClause(ctx.timeseriesWhereClause()); if (statement instanceof CountTimeSeriesStatement) { @@ -1230,7 +1234,8 @@ public Statement visitCreateContinuousQuery(IoTDBSqlParser.CreateContinuousQuery QueryStatement queryStatement = statement.getQueryBodyStatement(); if (!queryStatement.isGroupByTime()) { throw new SemanticException( - "CQ: At least one of the parameters `every_interval` and `group_by_interval` needs to be specified."); + DataNodeQueryMessages + .CQ_AT_LEAST_ONE_OF_THE_PARAMETERS_EVERY_INTERVAL_AND_GROUP_BY_INTERVAL_NEEDS_TO_BE); } long interval = @@ -1255,7 +1260,8 @@ private void parseResampleClause( QueryStatement queryStatement = statement.getQueryBodyStatement(); if (!queryStatement.isGroupByTime()) { throw new SemanticException( - "CQ: At least one of the parameters `every_interval` and `group_by_interval` needs to be specified."); + DataNodeQueryMessages + .CQ_AT_LEAST_ONE_OF_THE_PARAMETERS_EVERY_INTERVAL_AND_GROUP_BY_INTERVAL_NEEDS_TO_BE); } statement.setEveryInterval( queryStatement.getGroupByTimeComponent().getInterval().getTotalDuration(currPrecision)); @@ -1371,7 +1377,8 @@ public Statement visitAlterLogicalView(IoTDBSqlParser.AlterLogicalViewContext ct intoItem -> { if (intoItem != null) { throw new SemanticException( - "Can not use char '$' or into item in alter view statement."); + DataNodeQueryMessages + .CAN_NOT_USE_CHAR_DOLLAR_OR_INTO_ITEM_IN_ALTER_VIEW_STATEMENT); } }); // parse source @@ -1806,7 +1813,8 @@ private SelectComponent parseSelectClause( // don't support pure time in select if (columnName.equals(ColumnHeaderConstant.TIME)) { throw new SemanticException( - "Time column is no need to appear in SELECT Clause explicitly, it will always be returned if possible"); + DataNodeQueryMessages + .TIME_COLUMN_IS_NO_NEED_TO_APPEAR_IN_SELECT_CLAUSE_EXPLICITLY_IT_WILL_ALWAYS_BE_RETURNED); } if (resultColumn.hasAlias()) { String alias = resultColumn.getAlias(); @@ -1905,7 +1913,7 @@ private GroupByTimeComponent parseGroupByTimeClause( if (groupByTimeComponent.getInterval().monthDuration == 0 && groupByTimeComponent.getInterval().nonMonthDuration == 0) { throw new SemanticException( - "The second parameter time interval should be a positive integer."); + DataNodeQueryMessages.THE_SECOND_PARAMETER_TIME_INTERVAL_SHOULD_BE_A_POSITIVE_INTEGER); } // parse sliding step @@ -1929,7 +1937,7 @@ private GroupByTimeComponent parseGroupByTimeClause( if (groupByTimeComponent.getSlidingStep().monthDuration == 0 && groupByTimeComponent.getSlidingStep().nonMonthDuration == 0) { throw new SemanticException( - "The third parameter time slidingStep should be a positive integer."); + DataNodeQueryMessages.THE_THIRD_PARAMETER_TIME_SLIDINGSTEP_SHOULD_BE_A_POSITIVE_INTEGER); } return groupByTimeComponent; } @@ -1969,7 +1977,8 @@ private GroupByComponent parseGroupByClause( if (expression.isConstantOperand()) { throw new SemanticException( String.format( - "Constant operand [%s] is not allowed in group by variation, there should be an expression", + DataNodeQueryMessages + .CONSTANT_OPERAND_S_IS_NOT_ALLOWED_IN_GROUP_BY_VARIATION_THERE_SHOULD_BE_AN_EXPRESSION, expression.getExpressionString())); } groupByVariationComponent.setControlColumnExpression(expression); @@ -2001,7 +2010,8 @@ private GroupByComponent parseGroupByClause( if (expression.isConstantOperand()) { throw new SemanticException( String.format( - "Constant operand [%s] is not allowed in group by count, there should be an expression", + DataNodeQueryMessages + .CONSTANT_OPERAND_S_IS_NOT_ALLOWED_IN_GROUP_BY_COUNT_THERE_SHOULD_BE_AN_EXPRESSION, expression.getExpressionString())); } groupByCountComponent.setControlColumnExpression(expression); @@ -2083,13 +2093,17 @@ private SortItem parseOrderByAttributeClause( String sortKey = ctx.sortKey().getText().toUpperCase(); if (!limitSet.contains(sortKey)) { throw new SemanticException( - String.format("ORDER BY: sort key[%s] is not contained in '%s'", sortKey, limitSet)); + String.format( + DataNodeQueryMessages.ORDER_BY_SORT_KEY_S_IS_NOT_CONTAINED_IN_S, + sortKey, + limitSet)); } return new SortItem(sortKey, ctx.DESC() != null ? Ordering.DESC : Ordering.ASC); } else { if (!allowExpression) { throw new SemanticException( - "ORDER BY expression is not supported for current statement, supported sort key: " + DataNodeQueryMessages + .ORDER_BY_EXPRESSION_IS_NOT_SUPPORTED_FOR_CURRENT_STATEMENT_SUPPORTED_SORT_KEY + limitSet.toString()); } Expression sortExpression = parseExpression(ctx.expression(), true); @@ -2118,7 +2132,8 @@ public FillComponent parseFillClause(IoTDBSqlParser.FillClauseContext ctx) { if (ctx.interval != null) { if (fillComponent.getFillPolicy() != FillPolicy.PREVIOUS) { throw new SemanticException( - "Only FILL(PREVIOUS) support specifying the time duration threshold."); + DataNodeQueryMessages + .ONLY_FILL_PREVIOUS_SUPPORT_SPECIFYING_THE_TIME_DURATION_THRESHOLD); } fillComponent.setTimeDurationThreshold( DataNodeDateTimeUtils.constructTimeDuration(ctx.interval.getText())); @@ -2166,7 +2181,7 @@ private long parseOffsetClause(IoTDBSqlParser.OffsetClauseContext ctx) { offset = Long.parseLong(ctx.INTEGER_LITERAL().getText()); } catch (NumberFormatException e) { throw new SemanticException( - "Out of range. OFFSET : OFFSETValue should be Int64."); + DataNodeQueryMessages.OUT_OF_RANGE_OFFSET_LT_OFFSETVALUE_GT_OFFSETVALUE_SHOULD_BE_INT64); } if (offset < 0) { throw new SemanticException(DataNodeQueryMessages.OFFSET_OFFSETVALUE_OFFSETVALUE_SHOULD_0); @@ -2195,7 +2210,8 @@ public int parseSOffsetClause(IoTDBSqlParser.SoffsetClauseContext ctx) { soffset = Integer.parseInt(ctx.INTEGER_LITERAL().getText()); } catch (NumberFormatException e) { throw new SemanticException( - "Out of range. SOFFSET : SOFFSETValue should be Int32."); + DataNodeQueryMessages + .OUT_OF_RANGE_SOFFSET_LT_SOFFSETVALUE_GT_SOFFSETVALUE_SHOULD_BE_INT32); } if (soffset < 0) { throw new SemanticException(DataNodeQueryMessages.SOFFSET_SOFFSETVALUE_SOFFSETVALUE_SHOULD_0); @@ -2313,10 +2329,10 @@ private long parseTimeValue(ConstantContext constant) { } catch (NumberFormatException e) { throw new SemanticException( String.format( - "Failed to parse the timestamp: " + DataNodeQueryMessages.FAILED_TO_PARSE_THE_TIMESTAMP + e.getMessage() - + "Current system timestamp precision is %s, " - + "please check whether the timestamp %s is correct.", + + DataNodeQueryMessages.CURRENT_SYSTEM_TIMESTAMP_PRECISION_IS_S + + DataNodeQueryMessages.PLEASE_CHECK_WHETHER_THE_TIMESTAMP_S_IS_CORRECT, TIMESTAMP_PRECISION, constant.INTEGER_LITERAL().getText())); } @@ -2386,7 +2402,8 @@ private void parseLoadFileAttributeClause( } else { throw new SemanticException( String.format( - "Load tsfile format %s error, please input AUTOREGISTER | SGLEVEL | VERIFY.", + DataNodeQueryMessages + .LOAD_TSFILE_FORMAT_S_ERROR_PLEASE_INPUT_AUTOREGISTER_SGLEVEL_VERIFY, ctx.getText())); } } @@ -2525,7 +2542,8 @@ private static void checkNodeName(String src) { if (!TsFileConstant.NODE_NAME_PATTERN.matcher(src).matches()) { throw new SemanticException( String.format( - "%s is illegal, unquoted node name can only consist of digits, characters and underscore, or start or end with wildcard", + DataNodeQueryMessages + .S_IS_ILLEGAL_UNQUOTED_NODE_NAME_CAN_ONLY_CONSIST_OF_DIGITS_CHARACTERS_AND_UNDERSCORE_OR, src)); } } @@ -2535,7 +2553,8 @@ private static void checkNodeNameInIntoPath(String src) { if (!NODE_NAME_IN_INTO_PATH_PATTERN.matcher(src).matches()) { throw new SemanticException( String.format( - "%s is illegal, unquoted node name in select into clause can only consist of digits, characters, $, { and }", + DataNodeQueryMessages + .S_IS_ILLEGAL_UNQUOTED_NODE_NAME_IN_SELECT_INTO_CLAUSE_CAN_ONLY_CONSIST_OF_DIGITS, src)); } } @@ -2544,7 +2563,8 @@ private static void checkIdentifier(String src) { if (!TsFileConstant.IDENTIFIER_PATTERN.matcher(src).matches() || PathUtils.isRealNumber(src)) { throw new SemanticException( String.format( - "%s is illegal, identifier not enclosed with backticks can only consist of digits, characters and underscore.", + DataNodeQueryMessages + .S_IS_ILLEGAL_IDENTIFIER_NOT_ENCLOSED_WITH_BACKTICKS_CAN_ONLY_CONSIST_OF_DIGITS, src)); } } @@ -2563,9 +2583,9 @@ public long parseDateTimeFormat(String timestampStr) { } catch (Exception e) { throw new SemanticException( String.format( - "Input time format %s error. " - + "Input like yyyy-MM-dd HH:mm:ss, yyyy-MM-ddTHH:mm:ss or " - + "refer to user document for more info.", + DataNodeQueryMessages.INPUT_TIME_FORMAT_S_ERROR + + DataNodeQueryMessages.INPUT_LIKE_YYYY_MM_DD_HH_MM_SS_YYYY_MM_DDTHH_MM_SS_OR + + DataNodeQueryMessages.REFER_TO_USER_DOCUMENT_FOR_MORE_INFO, timestampStr)); } } @@ -2582,9 +2602,9 @@ public static long parseDateTimeFormat(String timestampStr, long currentTime, Zo } catch (Exception e) { throw new SemanticException( String.format( - "Input time format %s error. " - + "Input like yyyy-MM-dd HH:mm:ss, yyyy-MM-ddTHH:mm:ss or " - + "refer to user document for more info.", + DataNodeQueryMessages.INPUT_TIME_FORMAT_S_ERROR + + DataNodeQueryMessages.INPUT_LIKE_YYYY_MM_DD_HH_MM_SS_YYYY_MM_DDTHH_MM_SS_OR + + DataNodeQueryMessages.REFER_TO_USER_DOCUMENT_FOR_MORE_INFO, timestampStr)); } } @@ -2740,7 +2760,8 @@ public Statement visitGrantUser(IoTDBSqlParser.GrantUserContext ctx) { if (!CommonDescriptor.getInstance().getConfig().getEnableGrantOption() && ctx.grantOpt() != null) { throw new SemanticException( - "Grant Option is disabled, Please check the parameter enable_grant_option."); + DataNodeQueryMessages + .GRANT_OPTION_IS_DISABLED_PLEASE_CHECK_THE_PARAMETER_ENABLE_GRANT_OPTION); } authorStatement.setGrantOpt(ctx.grantOpt() != null); @@ -2767,7 +2788,8 @@ public Statement visitGrantRole(IoTDBSqlParser.GrantRoleContext ctx) { if (!CommonDescriptor.getInstance().getConfig().getEnableGrantOption() && ctx.grantOpt() != null) { throw new SemanticException( - "Grant Option is disabled, Please check the parameter enable_grant_option."); + DataNodeQueryMessages + .GRANT_OPTION_IS_DISABLED_PLEASE_CHECK_THE_PARAMETER_ENABLE_GRANT_OPTION); } authorStatement.setGrantOpt(ctx.grantOpt() != null); return authorStatement; @@ -2847,7 +2869,8 @@ private void checkGrantRevokePrivileges(String[] privileges, List n && !(nodeNameList.size() == 1 && nodeNameList.contains(new PartialPath(ALL_RESULT_NODES)))) { throw new SemanticException( - String.format("[%s] can only be set on path: root.**", errorPrivilegeName)); + String.format( + DataNodeQueryMessages.S_CAN_ONLY_BE_SET_ON_PATH_ROOT_STAR_STAR, errorPrivilegeName)); } } @@ -2874,11 +2897,11 @@ private String[] parsePrivilege(String[] privileges) { PrivilegeType privilegeType = PrivilegeType.valueOf(priv.toUpperCase()); if (privilegeType.isDeprecated()) { throw new SemanticException( - "Privilege type " + DataNodeQueryMessages.PRIVILEGE_TYPE + priv.toUpperCase() - + " is deprecated, use " + + DataNodeQueryMessages.IS_DEPRECATED_USE + privilegeType.getReplacedPrivilegeType() - + " to instead it"); + + DataNodeQueryMessages.TO_INSTEAD_IT); } privSet.add(priv); } @@ -3418,7 +3441,8 @@ private Expression parseFunctionExpression( if (subLeftExpression.isConstantOperand() && (!(subRightExpression.isConstantOperand() && ((ConstantOperand) subRightExpression).getDataType().equals(TSDataType.TEXT)))) { - throw new SemanticException("Attributes of functions should be quoted with '' or \"\""); + throw new SemanticException( + DataNodeQueryMessages.ATTRIBUTES_OF_FUNCTIONS_SHOULD_BE_QUOTED_WITH_OR); } if (subLeftExpression.isConstantOperand() && subRightExpression.isConstantOperand()) { // parse attribute @@ -3437,7 +3461,7 @@ private Expression parseFunctionExpression( // non-pure-constant sub-expression, otherwise the timestamp of the row cannot be inferred. if (!hasNonPureConstantSubExpression) { throw new SemanticException( - "Invalid function expression, all the arguments are constant operands: " + DataNodeQueryMessages.INVALID_FUNCTION_EXPRESSION_ALL_THE_ARGUMENTS_ARE_CONSTANT_OPERANDS + functionClause.getText()); } @@ -3514,8 +3538,11 @@ public static void checkFunctionExpressionInputSize( } throw new SemanticException( String.format( - "Error size of input expressions. expression: %s, actual size: %s, expected size: %s.", - expressionString, actual, Arrays.toString(expected))); + DataNodeQueryMessages + .ERROR_SIZE_OF_INPUT_EXPRESSIONS_EXPRESSION_S_ACTUAL_SIZE_S_EXPECTED_SIZE_S, + expressionString, + actual, + Arrays.toString(expected))); } private Expression parseRegularExpression(ExpressionContext context, boolean canUseFullPath) { @@ -3652,7 +3679,9 @@ private long parseTimeValue(IoTDBSqlParser.TimeValueContext ctx, long currentTim return Long.parseLong(ctx.INTEGER_LITERAL().getText()); } catch (NumberFormatException e) { throw new SemanticException( - String.format("Can not parse %s to long value", ctx.INTEGER_LITERAL().getText())); + String.format( + DataNodeQueryMessages.CAN_NOT_PARSE_S_TO_LONG_VALUE, + ctx.INTEGER_LITERAL().getText())); } } else if (ctx.dateExpression() != null) { return parseDateExpression(ctx.dateExpression(), currentTime); @@ -3672,7 +3701,8 @@ private void setMap(IoTDBSqlParser.AlterClauseContext ctx, Map a key, (k, v) -> { throw new SemanticException( - String.format("There's duplicate [%s] in tag or attribute clause.", k)); + String.format( + DataNodeQueryMessages.THERE_S_DUPLICATE_S_IN_TAG_OR_ATTRIBUTE_CLAUSE, k)); }); alterMap.put(key, parseAttributeValue(attributePair.attributeValue())); } @@ -3691,7 +3721,8 @@ private Map extractMap( key, (k, v) -> { throw new SemanticException( - String.format("There's duplicate [%s] in tag or attribute clause.", k)); + String.format( + DataNodeQueryMessages.THERE_S_DUPLICATE_S_IN_TAG_OR_ATTRIBUTE_CLAUSE, k)); }); tags.put(key, parseAttributeValue(attributePair.attributeValue())); } @@ -4248,7 +4279,7 @@ public Statement visitCreatePipe(final IoTDBSqlParser.CreatePipeContext ctx) { createPipeStatement.setPipeName(pipeName); } else { throw new SemanticException( - "Not support for this sql in CREATE PIPE, please enter pipe name."); + DataNodeQueryMessages.NOT_SUPPORT_FOR_THIS_SQL_IN_CREATE_PIPE_PLEASE_ENTER_PIPE_NAME); } createPipeStatement.setIfNotExists( @@ -4287,7 +4318,7 @@ public Statement visitAlterPipe(IoTDBSqlParser.AlterPipeContext ctx) { alterPipeStatement.setPipeName(parseIdentifier(ctx.pipeName.getText())); } else { throw new SemanticException( - "Not support for this sql in ALTER PIPE, please enter pipe name."); + DataNodeQueryMessages.NOT_SUPPORT_FOR_THIS_SQL_IN_ALTER_PIPE_PLEASE_ENTER_PIPE_NAME); } alterPipeStatement.setIfExists(ctx.IF() != null && ctx.EXISTS() != null); @@ -4420,7 +4451,7 @@ public Statement visitCreateTopic(IoTDBSqlParser.CreateTopicContext ctx) { createTopicStatement.setTopicName(parseIdentifier(ctx.topicName.getText())); } else { throw new SemanticException( - "Not support for this sql in CREATE TOPIC, please enter topicName."); + DataNodeQueryMessages.NOT_SUPPORT_FOR_THIS_SQL_IN_CREATE_TOPIC_PLEASE_ENTER_TOPICNAME); } createTopicStatement.setIfNotExists( @@ -4455,7 +4486,7 @@ public Statement visitDropTopic(IoTDBSqlParser.DropTopicContext ctx) { dropTopicStatement.setTopicName(parseIdentifier(ctx.topicName.getText())); } else { throw new SemanticException( - "Not support for this sql in DROP TOPIC, please enter topicName."); + DataNodeQueryMessages.NOT_SUPPORT_FOR_THIS_SQL_IN_DROP_TOPIC_PLEASE_ENTER_TOPICNAME); } dropTopicStatement.setIfExists(ctx.IF() != null && ctx.EXISTS() != null); @@ -4493,7 +4524,8 @@ public Statement visitDropSubscription(IoTDBSqlParser.DropSubscriptionContext ct dropSubscriptionStatement.setSubscriptionId(parseIdentifier(ctx.subscriptionId.getText())); } else { throw new SemanticException( - "Not support for this sql in DROP SUBSCRIPTION, please enter subscriptionId."); + DataNodeQueryMessages + .NOT_SUPPORT_FOR_THIS_SQL_IN_DROP_SUBSCRIPTION_PLEASE_ENTER_SUBSCRIPTIONID); } dropSubscriptionStatement.setIfExists(ctx.IF() != null && ctx.EXISTS() != null); @@ -4783,7 +4815,8 @@ public Statement visitSetThrottleQuota(IoTDBSqlParser.SetThrottleQuotaContext ct break; default: throw new SemanticException( - "Please set the correct request type: " + quotas.get(IoTDBConstant.REQUEST_TYPE)); + DataNodeQueryMessages.PLEASE_SET_THE_CORRECT_REQUEST_TYPE + + quotas.get(IoTDBConstant.REQUEST_TYPE)); } } } @@ -4811,7 +4844,8 @@ public Statement visitSetThrottleQuota(IoTDBSqlParser.SetThrottleQuotaContext ct break; default: throw new SemanticException( - "Please set the correct request type: " + quotas.get(IoTDBConstant.REQUEST_TYPE)); + DataNodeQueryMessages.PLEASE_SET_THE_CORRECT_REQUEST_TYPE + + quotas.get(IoTDBConstant.REQUEST_TYPE)); } } } @@ -4866,7 +4900,8 @@ private long parseThrottleQuotaTimeUnit(String timeUnit) { return IoTDBConstant.DAY; default: throw new SemanticException( - "When setting the request, the unit is incorrect. Please use 'sec', 'min', 'hour', 'day' as the unit"); + DataNodeQueryMessages + .WHEN_SETTING_THE_REQUEST_THE_UNIT_IS_INCORRECT_PLEASE_USE_SEC_MIN_HOUR_DAY_AS_THE_UNIT); } } @@ -4891,7 +4926,8 @@ private long parseThrottleQuotaSizeUnit(String data) { return size * IoTDBConstant.PB; default: throw new SemanticException( - "When setting the size/time, the unit is incorrect. Please use 'B', 'K', 'M', 'G', 'P', 'T' as the unit"); + DataNodeQueryMessages + .WHEN_SETTING_THE_SIZE_TIME_THE_UNIT_IS_INCORRECT_PLEASE_USE_B_K_M_G_P_T_AS_THE_UNIT); } } @@ -4912,7 +4948,8 @@ private long parseSpaceQuotaSizeUnit(String data) { return disk * IoTDBConstant.GB; default: throw new SemanticException( - "When setting the disk size, the unit is incorrect. Please use 'M', 'G', 'P', 'T' as the unit"); + DataNodeQueryMessages + .WHEN_SETTING_THE_DISK_SIZE_THE_UNIT_IS_INCORRECT_PLEASE_USE_M_G_P_T_AS_THE_UNIT); } } @@ -4955,7 +4992,8 @@ public Statement visitCallInference(IoTDBSqlParser.CallInferenceContext ctx) { } if (valueContext.windowFunction().isEmpty()) { throw new SemanticException( - "Window Function(e.g. HEAD, TAIL, COUNT) should be set in value when key is 'WINDOW' in CALL INFERENCE"); + DataNodeQueryMessages + .WINDOW_FUNCTION_E_G_HEAD_TAIL_COUNT_SHOULD_BE_SET_IN_VALUE_WHEN_KEY_IS_WINDOW_IN_CALL); } parseWindowFunctionInInference(valueContext.windowFunction(), statement); } else if (paramKey.equalsIgnoreCase("GENERATETIME")) { @@ -5117,7 +5155,9 @@ public static TsTableColumnCategory getColumnCategory(final Token category) { return FIELD; default: throw new UnsupportedOperationException( - "Unsupported ColumnCategory: " + category.getText()); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_COLUMNCATEGORY_S_1260CFFD, + category.getText())); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/SqlParseError.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/SqlParseError.java index 4f46def98e863..f45646e07fecf 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/SqlParseError.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/SqlParseError.java @@ -19,6 +19,8 @@ package org.apache.iotdb.db.queryengine.plan.parser; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; + import org.antlr.v4.runtime.BaseErrorListener; import org.antlr.v4.runtime.Parser; import org.antlr.v4.runtime.RecognitionException; @@ -60,6 +62,11 @@ public void syntaxError( } } - throw new ParseCancellationException("line " + line + ":" + charPositionInLine + " " + msg); + throw new ParseCancellationException( + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_LINE_S_S_S_7CA5F0E1, + line, + charPositionInLine, + msg)); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/StatementGenerator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/StatementGenerator.java index 62c553509339d..6bdc4814a6da6 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/StatementGenerator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/StatementGenerator.java @@ -295,7 +295,8 @@ public static InsertRowStatement createStatement(TSInsertRecordReq insertRecordR if (!insertRecordReq.isSetColumnCategoryies() || insertRecordReq.getColumnCategoryiesSize() != insertRecordReq.getMeasurementsSize()) { throw new IllegalArgumentException( - "Missing or invalid column categories for table " + "insertion"); + DataNodeQueryMessages + .QUERY_EXCEPTION_MISSING_OR_INVALID_COLUMN_CATEGORIES_FOR_TABLE_INSERTION_5DF990B9); } TsTableColumnCategory[] columnCategories = new TsTableColumnCategory[insertRecordReq.getColumnCategoryies().size()]; @@ -375,7 +376,8 @@ public static InsertTabletStatement createStatement(TSInsertTabletReq insertTabl if (!insertTabletReq.isSetColumnCategories() || insertTabletReq.getColumnCategoriesSize() != insertTabletReq.getMeasurementsSize()) { throw new IllegalArgumentException( - "Missing or invalid column categories for table " + "insertion"); + DataNodeQueryMessages + .QUERY_EXCEPTION_MISSING_OR_INVALID_COLUMN_CATEGORIES_FOR_TABLE_INSERTION_5DF990B9); } TsTableColumnCategory[] columnCategories = new TsTableColumnCategory[insertTabletReq.columnCategories.size()]; @@ -696,7 +698,8 @@ public static CreateSchemaTemplateStatement createStatement(TSCreateSchemaTempla if (measurementName == null) { throw new MetadataException( - "The name of a measurement in schema template shall not be null."); + DataNodeQueryMessages + .QUERY_EXCEPTION_THE_NAME_OF_A_MEASUREMENT_IN_SCHEMA_TEMPLATE_SHALL_NOT_BE_937264BD); } if (alignedPrefix.containsKey(prefix) && !isAlign) { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/DataNodeTableOperatorGenerator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/DataNodeTableOperatorGenerator.java index b5de9a5561e23..4b7ab8577d991 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/DataNodeTableOperatorGenerator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/DataNodeTableOperatorGenerator.java @@ -265,7 +265,8 @@ public Operator visitIdentitySink(IdentitySinkNode node, LocalExecutionPlanConte operatorContext.recordSpecifiedInfo(DOWNSTREAM_PLAN_NODE_ID, downStreamPlanNodeId); } checkArgument( - MPP_DATA_EXCHANGE_MANAGER != null, "MPP_DATA_EXCHANGE_MANAGER should not be null"); + MPP_DATA_EXCHANGE_MANAGER != null, + DataNodeQueryMessages.EXCEPTION_MPP_DATA_EXCHANGE_MANAGER_SHOULD_NOT_BE_NULL_44D7141E); FragmentInstanceId localInstanceId = context.getInstanceContext().getId(); DownStreamChannelIndex downStreamChannelIndex = new DownStreamChannelIndex(0); ISinkHandle sinkHandle = @@ -287,7 +288,8 @@ public Operator visitIdentitySink(IdentitySinkNode node, LocalExecutionPlanConte operatorContext, children, downStreamChannelIndex, sinkHandle); } else { throw new IllegalStateException( - "IdentitySinkNode should only have one child in table model."); + DataNodeQueryMessages + .QUERY_EXCEPTION_IDENTITYSINKNODE_SHOULD_ONLY_HAVE_ONE_CHILD_IN_TABLE_MODEL_5E995EB3); } } @@ -345,7 +347,10 @@ public static IDeviceID.TreeDeviceIdColumnValueExtractor createTreeDeviceIdColum return new FourOrHigherLevelDBExtractor(dbLevel); } else { throw new IllegalArgumentException( - "tree db name should at least be two level: " + treeDBName); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_TREE_DB_NAME_SHOULD_AT_LEAST_BE_TWO_LEVEL_S_772B6832, + treeDBName)); } } catch (IllegalPathException e) { throw new IllegalArgumentException(e); @@ -441,7 +446,8 @@ public Operator visitTreeNonAlignedDeviceViewScan( long viewTTL) { if (node.isPushLimitToEachDevice() && node.getPushDownOffset() > 0) { throw new IllegalArgumentException( - "PushDownOffset should not be set when isPushLimitToEachDevice is true."); + DataNodeQueryMessages + .QUERY_EXCEPTION_PUSHDOWNOFFSET_SHOULD_NOT_BE_SET_WHEN_ISPUSHLIMITTOEACHDEVICE_9B6D5144); } CommonTableScanOperatorParameters commonParameter = new CommonTableScanOperatorParameters(node, fieldColumnsRenameMap, true); @@ -875,7 +881,9 @@ private CommonTableScanOperatorParameters( boolean addedTimeColumn = false; for (Symbol columnName : outputColumnNames) { ColumnSchema schema = - requireNonNull(columnSchemaMap.get(columnName), columnName + " is null"); + requireNonNull( + columnSchemaMap.get(columnName), + columnName + DataNodeQueryMessages.EXCEPTION_IS_NULL_97AAF381); symbolInputs.add(columnName); switch (schema.getColumnCategory()) { @@ -883,7 +891,8 @@ private CommonTableScanOperatorParameters( case ATTRIBUTE: columnsIndexArray[idx++] = requireNonNull( - tagAndAttributeColumnsIndexMap.get(columnName), columnName + " is null"); + tagAndAttributeColumnsIndexMap.get(columnName), + columnName + DataNodeQueryMessages.EXCEPTION_IS_NULL_97AAF381); columnSchemas.add(schema); break; case FIELD: @@ -908,7 +917,9 @@ private CommonTableScanOperatorParameters( break; default: throw new IllegalArgumentException( - "Unexpected column category: " + schema.getColumnCategory()); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNEXPECTED_COLUMN_CATEGORY_S_6E60A44E, + schema.getColumnCategory())); } } Set outputSet = new HashSet<>(outputColumnNames); @@ -993,7 +1004,11 @@ private void addSource( DeviceEntry deviceEntry = node.getDeviceEntries().get(i); if (deviceEntry == null) { throw new IllegalStateException( - "Device entries of index " + i + " in " + planNodeName + " is empty"); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_DEVICE_ENTRIES_OF_INDEX_S_IN_S_IS_EMPTY_68D1DB60, + i, + planNodeName)); } if (deviceEntry instanceof NonAlignedDeviceEntry) { for (IMeasurementSchema schema : measurementSchemas) { @@ -1256,7 +1271,8 @@ public Operator visitTableDeviceQueryCount( public Operator visitAggregationTreeDeviceViewScan( AggregationTreeDeviceViewScanNode node, LocalExecutionPlanContext context) { throw new UnsupportedOperationException( - "The AggregationTreeDeviceViewScanNode should has been transferred to its child class node"); + DataNodeQueryMessages + .QUERY_EXCEPTION_THE_AGGREGATIONTREEDEVICEVIEWSCANNODE_SHOULD_HAS_BEEN_TRANSFERRED_76A35037); } @Override @@ -1394,14 +1410,17 @@ public Operator visitNonAlignedAggregationTreeDeviceViewScan( for (Expression argument : entry.getValue().getArguments()) { Symbol symbol = Symbol.from(argument); ColumnSchema schema = - requireNonNull(node.getAssignments().get(symbol), symbol + " is null"); + requireNonNull( + node.getAssignments().get(symbol), + symbol + DataNodeQueryMessages.EXCEPTION_IS_NULL_97AAF381); if (!aggColumnLayout.containsKey(symbol)) { switch (schema.getColumnCategory()) { case TAG: case ATTRIBUTE: aggColumnsIndexArray[channel] = requireNonNull( - node.getTagAndAttributeIndexMap().get(symbol), symbol + " is null"); + node.getTagAndAttributeIndexMap().get(symbol), + symbol + DataNodeQueryMessages.EXCEPTION_IS_NULL_97AAF381); break; case FIELD: aggColumnsIndexArray[channel] = measurementColumnCount; @@ -1420,7 +1439,9 @@ public Operator visitNonAlignedAggregationTreeDeviceViewScan( break; default: throw new IllegalArgumentException( - "Unexpected column category: " + schema.getColumnCategory()); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNEXPECTED_COLUMN_CATEGORY_S_6E60A44E, + schema.getColumnCategory())); } aggColumnSchemas.add(schema); @@ -1495,7 +1516,8 @@ public Operator visitNonAlignedAggregationTreeDeviceViewScan( timeRangeIterator = new TableDateBinTimeRangeIterator(dateBinTransformer); } else { throw new IllegalStateException( - "grouping key must be ID or Attribute in AggregationTableScan"); + DataNodeQueryMessages + .QUERY_EXCEPTION_GROUPING_KEY_MUST_BE_ID_OR_ATTRIBUTE_IN_AGGREGATIONTABLESCAN_7B592AE6); } } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/LocalExecutionPlanContext.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/LocalExecutionPlanContext.java index 6590870839472..a57b99f9f8b32 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/LocalExecutionPlanContext.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/LocalExecutionPlanContext.java @@ -25,6 +25,7 @@ import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.PlanNode; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.PlanNodeId; import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.common.FragmentInstanceId; import org.apache.iotdb.db.queryengine.execution.driver.DataDriverContext; import org.apache.iotdb.db.queryengine.execution.driver.DriverContext; @@ -259,7 +260,8 @@ public void addExchangeOperator(ExchangeOperator exchangeOperator) { public void setMaxBytesOneHandleCanReserve() { long maxBytesOneHandleCanReserve = getMaxBytesOneHandleCanReserve(); LOGGER.debug( - "MaxBytesOneHandleCanReserve for ExchangeOperator is {}, exchangeSumNum is {}.", + DataNodeQueryMessages + .MAXBYTESONEHANDLECANRESERVE_FOR_EXCHANGEOPERATOR_IS_ARG_EXCHANGESUMNUM_IS_ARG, maxBytesOneHandleCanReserve, exchangeSumNum); exchangeOperatorList.forEach( @@ -293,8 +295,10 @@ public List>> getCachedLastValueAnd } public void setISink(ISink sink) { - requireNonNull(sink, "sink is null"); - checkArgument(driverContext.getSink() == null, "There must be at most one SinkNode"); + requireNonNull(sink, DataNodeQueryMessages.EXCEPTION_SINK_IS_NULL_E33854B4); + checkArgument( + driverContext.getSink() == null, + DataNodeQueryMessages.EXCEPTION_THERE_MUST_BE_AT_MOST_ONE_SINKNODE_A965AFE7); driverContext.setSink(sink); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/LocalExecutionPlanner.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/LocalExecutionPlanner.java index 95f28052c1fd5..5bf297565de7d 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/LocalExecutionPlanner.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/LocalExecutionPlanner.java @@ -104,7 +104,8 @@ public List plan( throws MemoryNotEnoughException { if (Objects.isNull(plan)) { throw new IoTDBRuntimeException( - "The planNode is null during local execution, maybe caused by closing of the current dataNode", + DataNodeQueryMessages + .QUERY_EXCEPTION_THE_PLANNODE_IS_NULL_DURING_LOCAL_EXECUTION_MAYBE_CAUSED_C5B942CA, TSStatusCode.CLOSE_OPERATION_ERROR.getStatusCode()); } LocalExecutionPlanContext context = @@ -143,7 +144,8 @@ public List plan( throws MemoryNotEnoughException { if (Objects.isNull(plan)) { throw new IoTDBRuntimeException( - "The planNode is null during local execution, maybe caused by closing of the current dataNode", + DataNodeQueryMessages + .QUERY_EXCEPTION_THE_PLANNODE_IS_NULL_DURING_LOCAL_EXECUTION_MAYBE_CAUSED_C5B942CA, TSStatusCode.CLOSE_OPERATION_ERROR.getStatusCode()); } LocalExecutionPlanContext context = @@ -209,17 +211,17 @@ private long checkMemory( if (OPERATORS_MEMORY_BLOCK.allocate(estimatedMemorySize)) { if (LOGGER.isDebugEnabled()) { LOGGER.debug( - "[ConsumeMemory] consume: {}, current remaining memory: {}", + DataNodeQueryMessages.CONSUMEMEMORY_CONSUME_ARG_CURRENT_REMAINING_MEMORY_ARG, estimatedMemorySize, OPERATORS_MEMORY_BLOCK.getFreeMemoryInBytes()); } } else { throw new MemoryNotEnoughException( String.format( - "There is not enough memory to execute current fragment instance, " - + "current remaining free memory is %dB, " - + "estimated memory usage for current fragment instance is %dB", - OPERATORS_MEMORY_BLOCK.getFreeMemoryInBytes(), estimatedMemorySize)); + DataNodeQueryMessages + .QUERY_EXCEPTION_THERE_IS_NOT_ENOUGH_MEMORY_TO_EXECUTE_CURRENT_FRAGMENT_INSTANCE_6071A581, + OPERATORS_MEMORY_BLOCK.getFreeMemoryInBytes(), + estimatedMemorySize)); } stateMachine.addStateChangeListener( newState -> { @@ -229,7 +231,7 @@ private long checkMemory( OPERATORS_MEMORY_BLOCK.release(estimatedMemorySize); if (LOGGER.isDebugEnabled()) { LOGGER.debug( - "[ReleaseMemory] release: {}, current remaining memory: {}", + DataNodeQueryMessages.RELEASEMEMORY_RELEASE_ARG_CURRENT_REMAINING_MEMORY_ARG, estimatedMemorySize, OPERATORS_MEMORY_BLOCK.getFreeMemoryInBytes()); } @@ -298,22 +300,21 @@ public void reserveFromFreeMemoryForOperators( final String contextHolder) { if (memoryInBytes <= 0) { throw new IllegalArgumentException( - "Bytes to reserve from free memory for operators should be larger than 0"); + DataNodeQueryMessages + .QUERY_EXCEPTION_BYTES_TO_RESERVE_FROM_FREE_MEMORY_FOR_OPERATORS_SHOULD_BE_4DC404D5); } if (OPERATORS_MEMORY_BLOCK.allocate(memoryInBytes)) { if (LOGGER.isDebugEnabled()) { LOGGER.debug( - "[ConsumeMemory] consume: {}, current remaining memory: {}", + DataNodeQueryMessages.CONSUMEMEMORY_CONSUME_ARG_CURRENT_REMAINING_MEMORY_ARG, memoryInBytes, OPERATORS_MEMORY_BLOCK.getFreeMemoryInBytes()); } } else { throw new MemoryNotEnoughException( String.format( - "There is not enough memory for Query %s, the contextHolder is %s," - + "current remaining free memory is %dB, " - + "already reserved memory for this context in total is %dB, " - + "the memory requested this time is %dB", + DataNodeQueryMessages + .QUERY_EXCEPTION_THERE_IS_NOT_ENOUGH_MEMORY_FOR_QUERY_S_THE_CONTEXTHOLDER_546CDD02, queryId, contextHolder, OPERATORS_MEMORY_BLOCK.getFreeMemoryInBytes(), @@ -325,7 +326,8 @@ public void reserveFromFreeMemoryForOperators( public void releaseToFreeMemoryForOperators(final long memoryInBytes) { if (memoryInBytes <= 0) { throw new IllegalArgumentException( - "Bytes to release to free memory for operators should be larger than 0"); + DataNodeQueryMessages + .QUERY_EXCEPTION_BYTES_TO_RELEASE_TO_FREE_MEMORY_FOR_OPERATORS_SHOULD_BE_3E5B0CB1); } OPERATORS_MEMORY_BLOCK.release(memoryInBytes); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/LogicalPlanBuilder.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/LogicalPlanBuilder.java index 26d361c1f210f..ce450b5005259 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/LogicalPlanBuilder.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/LogicalPlanBuilder.java @@ -144,7 +144,8 @@ public class LogicalPlanBuilder { public LogicalPlanBuilder(Analysis analysis, MPPQueryContext context) { this.analysis = analysis; - Validate.notNull(context, "Query context cannot be null"); + Validate.notNull( + context, DataNodeQueryMessages.EXCEPTION_QUERY_CONTEXT_CANNOT_BE_NULL_C4809234); this.context = context; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/LogicalPlanVisitor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/LogicalPlanVisitor.java index 2c9304ce0b98c..5bc55d2dfba72 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/LogicalPlanVisitor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/LogicalPlanVisitor.java @@ -24,6 +24,7 @@ import org.apache.iotdb.commons.schema.column.ColumnHeaderConstant; import org.apache.iotdb.commons.schema.template.Template; import org.apache.iotdb.commons.schema.view.viewExpression.ViewExpression; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.common.MPPQueryContext; import org.apache.iotdb.db.queryengine.plan.analyze.Analysis; import org.apache.iotdb.db.queryengine.plan.expression.Expression; @@ -124,7 +125,9 @@ public LogicalPlanVisitor(Analysis analysis) { @Override public PlanNode visitNode(StatementNode node, MPPQueryContext context) { throw new UnsupportedOperationException( - "Unsupported statement type: " + node.getClass().getName()); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_STATEMENT_TYPE_S_FBCA7305, + node.getClass().getName())); } @Override diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/OperatorTreeGenerator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/OperatorTreeGenerator.java index 327dbecdda26d..aad7b56cddb66 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/OperatorTreeGenerator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/OperatorTreeGenerator.java @@ -377,7 +377,9 @@ public Operator visitSeriesScan(SeriesScanNode node, LocalExecutionPlanContext c context.getDriverContext().setInputDriver(true); if (!predicateCanPushIntoScan) { - checkState(!context.isBuildPlanUseTemplate(), "Push down predicate is not supported yet"); + checkState( + !context.isBuildPlanUseTemplate(), + DataNodeQueryMessages.EXCEPTION_PUSH_DOWN_PREDICATE_IS_NOT_SUPPORTED_YET_178F04A1); Operator rootOperator = constructFilterOperator( pushDownPredicate, @@ -587,7 +589,10 @@ public Operator visitProject(ProjectNode node, LocalExecutionPlanContext context int index = inputColumnNames.indexOf(outputColumnName); if (index < 0 && !outputColumnName.equals(TIMESTAMP_EXPRESSION_STRING)) { throw new IllegalStateException( - String.format("Cannot find column [%s] in child's output", outputColumnName)); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_CANNOT_FIND_COLUMN_S_IN_CHILD_S_OUTPUT_10FBE4C8, + outputColumnName)); } remainingColumnIndexList.add(index); } @@ -719,7 +724,8 @@ private Operator constructAlignedSeriesAggregationScanOperator( for (AggregationDescriptor descriptor : aggregationDescriptorList) { checkArgument( descriptor.getInputExpressions().size() == 1, - "descriptor's input expression size is not 1"); + DataNodeQueryMessages + .EXCEPTION_DESCRIPTOR_QUOTE_S_INPUT_EXPRESSION_SIZE_IS_NOT_1_DA4BED50); Expression expression = descriptor.getInputExpressions().get(0); if (expression instanceof TimeSeriesOperand) { @@ -760,8 +766,10 @@ private Operator constructAlignedSeriesAggregationScanOperator( Collections.singletonList(new InputLocation[] {new InputLocation(0, -1)}))); } else { throw new IllegalArgumentException( - "descriptor's input expression must be TimeSeriesOperand/TimestampOperand, current is " - + expression); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_DESCRIPTOR_S_INPUT_EXPRESSION_MUST_BE_TIMESERIESOPERAND_F4F66475, + expression)); } } @@ -1183,7 +1191,8 @@ public Operator visitAggregationMergeSort( List sortItemList = node.getMergeOrderParameter().getSortItemList(); if (!sortItemList.get(0).getSortKey().equalsIgnoreCase("Device")) { throw new IllegalStateException( - "AggregationMergeSortNode without order by device should not appear here"); + DataNodeQueryMessages + .QUERY_EXCEPTION_AGGREGATIONMERGESORTNODE_WITHOUT_ORDER_BY_DEVICE_SHOULD_7AED85D1); } boolean timeAscending = true; @@ -1688,7 +1697,7 @@ private Operator constructFilterOperator( public Operator visitGroupByLevel(GroupByLevelNode node, LocalExecutionPlanContext context) { checkArgument( !node.getGroupByLevelDescriptors().isEmpty(), - "GroupByLevel descriptorList cannot be empty"); + DataNodeQueryMessages.EXCEPTION_GROUPBYLEVEL_DESCRIPTORLIST_CANNOT_BE_EMPTY_34604314); List children = dealWithConsumeAllChildrenPipelineBreaker(node, context); boolean ascending = node.getScanOrder() == ASC; List aggregators = new ArrayList<>(); @@ -1741,10 +1750,13 @@ public Operator visitGroupByLevel(GroupByLevelNode node, LocalExecutionPlanConte @Override public Operator visitGroupByTag(GroupByTagNode node, LocalExecutionPlanContext context) { - checkArgument(!node.getTagKeys().isEmpty(), "GroupByTag tag keys cannot be empty"); + checkArgument( + !node.getTagKeys().isEmpty(), + DataNodeQueryMessages.EXCEPTION_GROUPBYTAG_TAG_KEYS_CANNOT_BE_EMPTY_5D649624); checkArgument( node.getTagValuesToAggregationDescriptors().size() >= 1, - "GroupByTag aggregation descriptors cannot be empty"); + DataNodeQueryMessages + .EXCEPTION_GROUPBYTAG_AGGREGATION_DESCRIPTORS_CANNOT_BE_EMPTY_82EC14EB); List children = dealWithConsumeAllChildrenPipelineBreaker(node, context); @@ -1812,7 +1824,7 @@ public Operator visitSlidingWindowAggregation( SlidingWindowAggregationNode node, LocalExecutionPlanContext context) { checkArgument( !node.getAggregationDescriptorList().isEmpty(), - "Aggregation descriptorList cannot be empty"); + DataNodeQueryMessages.EXCEPTION_AGGREGATION_DESCRIPTORLIST_CANNOT_BE_EMPTY_490C1740); OperatorContext operatorContext = context .getDriverContext() @@ -1918,7 +1930,7 @@ private RawDataAggregationOperator createRawDataAggregationOperator( Map> layout) { checkArgument( !node.getAggregationDescriptorList().isEmpty(), - "Aggregation descriptorList cannot be empty"); + DataNodeQueryMessages.EXCEPTION_AGGREGATION_DESCRIPTORLIST_CANNOT_BE_EMPTY_490C1740); Operator child = node.getChild().accept(this, context); boolean ascending = node.getScanOrder() == ASC; List aggregators = new ArrayList<>(); @@ -2047,7 +2059,7 @@ private RawDataAggregationOperator createRawDataAggregationOperator( public Operator visitAggregation(AggregationNode node, LocalExecutionPlanContext context) { checkArgument( !node.getAggregationDescriptorList().isEmpty(), - "Aggregation descriptorList cannot be empty"); + DataNodeQueryMessages.EXCEPTION_AGGREGATION_DESCRIPTORLIST_CANNOT_BE_EMPTY_490C1740); List children = dealWithConsumeAllChildrenPipelineBreaker(node, context); boolean ascending = node.getScanOrder() == ASC; List aggregators = new ArrayList<>(); @@ -2595,7 +2607,8 @@ public Operator visitIdentitySink(IdentitySinkNode node, LocalExecutionPlanConte } checkArgument( - MPP_DATA_EXCHANGE_MANAGER != null, "MPP_DATA_EXCHANGE_MANAGER should not be null"); + MPP_DATA_EXCHANGE_MANAGER != null, + DataNodeQueryMessages.EXCEPTION_MPP_DATA_EXCHANGE_MANAGER_SHOULD_NOT_BE_NULL_44D7141E); FragmentInstanceId localInstanceId = context.getInstanceContext().getId(); DownStreamChannelIndex downStreamChannelIndex = new DownStreamChannelIndex(0); ISinkHandle sinkHandle = @@ -2637,7 +2650,8 @@ public Operator visitShuffleSink(ShuffleSinkNode node, LocalExecutionPlanContext List children = dealWithConsumeAllChildrenPipelineBreaker(node, context); checkArgument( - MPP_DATA_EXCHANGE_MANAGER != null, "MPP_DATA_EXCHANGE_MANAGER should not be null"); + MPP_DATA_EXCHANGE_MANAGER != null, + DataNodeQueryMessages.EXCEPTION_MPP_DATA_EXCHANGE_MANAGER_SHOULD_NOT_BE_NULL_44D7141E); FragmentInstanceId localInstanceId = context.getInstanceContext().getId(); DownStreamChannelIndex downStreamChannelIndex = new DownStreamChannelIndex(0); ISinkHandle sinkHandle = @@ -3207,7 +3221,8 @@ private List getOutputColumnTypesOfTimeJoinNode( } else { throw new UnsupportedOperationException( String.format( - "Unexpected PlanNode in getOutputColumnTypesOfTimeJoinNode, type: %s", + DataNodeQueryMessages + .QUERY_EXCEPTION_UNEXPECTED_PLANNODE_IN_GETOUTPUTCOLUMNTYPESOFTIMEJOINNODE_00FAAEED, child.getOutputColumnNames())); } } @@ -3768,7 +3783,8 @@ private static Map getTimeseriesSchemaInfoMap( List measurementList = alignedPath.getMeasurementList(); if (measurementList.size() != entry.getValue().size()) { throw new IllegalArgumentException( - "The size of measurementList and timeseriesSchemaInfoList should be equal in aligned path."); + DataNodeQueryMessages + .QUERY_EXCEPTION_THE_SIZE_OF_MEASUREMENTLIST_AND_TIMESERIESSCHEMAINFOLIST_A6649661); } int size = measurementList.size(); List schemaList = new ArrayList<>(size); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/PipelineDriverFactory.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/PipelineDriverFactory.java index 5edf4863a6a32..7ccc90311cebc 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/PipelineDriverFactory.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/PipelineDriverFactory.java @@ -21,6 +21,7 @@ import org.apache.iotdb.calc.execution.operator.Operator; import org.apache.iotdb.commons.utils.TestOnly; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.execution.driver.DataDriver; import org.apache.iotdb.db.queryengine.execution.driver.DataDriverContext; import org.apache.iotdb.db.queryengine.execution.driver.Driver; @@ -40,7 +41,8 @@ public class PipelineDriverFactory { public PipelineDriverFactory( Operator operation, DriverContext driverContext, long estimatedMemorySize) { - this.operation = requireNonNull(operation, "rootOperator is null"); + this.operation = + requireNonNull(operation, DataNodeQueryMessages.EXCEPTION_ROOTOPERATOR_IS_NULL_050A1E79); this.driverContext = driverContext; this.estimatedMemorySize = estimatedMemorySize; } @@ -50,7 +52,7 @@ public DriverContext getDriverContext() { } public Driver createDriver() { - requireNonNull(driverContext, "driverContext is null"); + requireNonNull(driverContext, DataNodeQueryMessages.EXCEPTION_DRIVERCONTEXT_IS_NULL_4FEBE55F); try { Driver driver = null; if (driverContext instanceof DataDriverContext) { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/distribution/DistributionPlanContext.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/distribution/DistributionPlanContext.java index 5055f43aaf0bc..c02b2b9e4e33f 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/distribution/DistributionPlanContext.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/distribution/DistributionPlanContext.java @@ -19,6 +19,7 @@ package org.apache.iotdb.db.queryengine.plan.planner.distribution; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.common.MPPQueryContext; import org.apache.iotdb.db.queryengine.plan.expression.Expression; @@ -44,7 +45,8 @@ public class DistributionPlanContext { protected DistributionPlanContext(MPPQueryContext queryContext) { this.isRoot = true; - Validate.notNull(queryContext, "Query context cannot be null"); + Validate.notNull( + queryContext, DataNodeQueryMessages.EXCEPTION_QUERY_CONTEXT_CANNOT_BE_NULL_C4809234); this.queryContext = queryContext; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/distribution/DistributionPlanner.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/distribution/DistributionPlanner.java index 4b039df6383b3..d98dcd4818794 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/distribution/DistributionPlanner.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/distribution/DistributionPlanner.java @@ -307,7 +307,8 @@ private void splitToSubPlan(PlanNode root, SubPlan subPlan, Set visi ExchangeNode exchangeNode = (ExchangeNode) root; Validate.isTrue( exchangeNode.getChild() instanceof MultiChildrenSinkNode, - "child of ExchangeNode must be MultiChildrenSinkNode"); + DataNodeQueryMessages + .EXCEPTION_CHILD_OF_EXCHANGENODE_MUST_BE_MULTICHILDRENSINKNODE_1BF715FD); MultiChildrenSinkNode sinkNode = (MultiChildrenSinkNode) (exchangeNode.getChild()); // We cut off the subtree to make the ExchangeNode as the leaf node of current PlanFragment diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/distribution/SourceRewriter.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/distribution/SourceRewriter.java index d326a6de30a42..2e3714b71a6c5 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/distribution/SourceRewriter.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/distribution/SourceRewriter.java @@ -200,7 +200,8 @@ private PlanNode buildSingleDeviceViewNodeInRegion( public List visitDeviceView(DeviceViewNode node, DistributionPlanContext context) { if (node.getDevices().size() != node.getChildren().size()) { throw new IllegalArgumentException( - "size of devices and its children in DeviceViewNode should be same"); + DataNodeQueryMessages + .QUERY_EXCEPTION_SIZE_OF_DEVICES_AND_ITS_CHILDREN_IN_DEVICEVIEWNODE_SHOULD_10709A84); } // Step 1: constructs DeviceViewSplits @@ -481,8 +482,8 @@ private void constructDeviceViewNodeListWithoutCrossRegion( for (DeviceViewSplit split : deviceViewSplits) { if (split.dataPartitions.size() != 1) { throw new IllegalStateException( - "In non-cross data region device-view situation, " - + "each device should only have on data partition."); + DataNodeQueryMessages + .QUERY_EXCEPTION_IN_NON_CROSS_DATA_REGION_DEVICE_VIEW_SITUATION_EACH_DEVICE_3A76445B); } TRegionReplicaSet region = split.dataPartitions.iterator().next(); DeviceViewNode regionDeviceViewNode = @@ -498,8 +499,8 @@ private void constructDeviceViewNodeListWithoutCrossRegion( List rewriteResult = rewrite(childNode, context); if (rewriteResult.size() != 1) { throw new IllegalStateException( - "In non-cross data region aggregation device-view situation, " - + "each rewrite child node of DeviceView should only be one."); + DataNodeQueryMessages + .QUERY_EXCEPTION_IN_NON_CROSS_DATA_REGION_AGGREGATION_DEVICE_VIEW_SITUATION_557AE5D2); } childNode = rewriteResult.get(0); } @@ -1137,7 +1138,8 @@ public List visitInnerTimeJoin( for (PlanNode child : node.getChildren()) { if (!(child instanceof SeriesSourceNode)) { throw new IllegalStateException( - "All child nodes of InnerTimeJoinNode should be SeriesSourceNode"); + DataNodeQueryMessages + .QUERY_EXCEPTION_ALL_CHILD_NODES_OF_INNERTIMEJOINNODE_SHOULD_BE_SERIESSOURCENODE_B92B181D); } SeriesSourceNode sourceNode = (SeriesSourceNode) child; seriesScanNodes.add(sourceNode); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/distribution/WriteFragmentParallelPlanner.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/distribution/WriteFragmentParallelPlanner.java index 34b2b34be716a..def7040d8dc93 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/distribution/WriteFragmentParallelPlanner.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/distribution/WriteFragmentParallelPlanner.java @@ -22,6 +22,7 @@ import org.apache.iotdb.common.rpc.thrift.TRegionReplicaSet; import org.apache.iotdb.commons.partition.StorageExecutor; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.PlanNode; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.common.MPPQueryContext; import org.apache.iotdb.db.queryengine.plan.ClusterTopology; import org.apache.iotdb.db.queryengine.plan.analyze.IAnalysis; @@ -68,7 +69,10 @@ public List parallelPlan() { PlanNode node = fragment.getPlanNodeTree(); if (!(node instanceof WritePlanNode)) { throw new IllegalArgumentException( - "PlanNode should be IWritePlanNode in WRITE operation:" + node.getClass()); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_PLANNODE_SHOULD_BE_IWRITEPLANNODE_IN_WRITE_OPERATION_S_36501D8A, + node.getClass())); } List splits = nodeSplitter.apply(((WritePlanNode) node), analysis); List ret = new ArrayList<>(); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/exceptions/ReplicaSetUnreachableException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/exceptions/ReplicaSetUnreachableException.java index 1e5a0319256bb..f5e542bbb7615 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/exceptions/ReplicaSetUnreachableException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/exceptions/ReplicaSetUnreachableException.java @@ -21,6 +21,7 @@ import org.apache.iotdb.common.rpc.thrift.TRegionReplicaSet; import org.apache.iotdb.commons.exception.IoTDBRuntimeException; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.rpc.TSStatusCode; /** @@ -31,7 +32,7 @@ public class ReplicaSetUnreachableException extends IoTDBRuntimeException { public ReplicaSetUnreachableException(TRegionReplicaSet replicaSet) { super( - "All replica cannot be reached:" + replicaSet.toString(), + String.format(DataNodeQueryMessages.ALL_REPLICA_CANNOT_BE_REACHED_FMT, replicaSet), TSStatusCode.PLAN_FAILED_NETWORK_PARTITION.getStatusCode()); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/exceptions/RootFIPlacementException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/exceptions/RootFIPlacementException.java index 8910673ef3847..0137b98c6e814 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/exceptions/RootFIPlacementException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/exceptions/RootFIPlacementException.java @@ -21,6 +21,7 @@ import org.apache.iotdb.common.rpc.thrift.TRegionReplicaSet; import org.apache.iotdb.commons.exception.IoTDBRuntimeException; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.rpc.TSStatusCode; import java.util.Collection; @@ -33,7 +34,8 @@ public class RootFIPlacementException extends IoTDBRuntimeException { public RootFIPlacementException(Collection replicaSets) { super( - "Root FragmentInstance placement error: " + replicaSets.toString(), + String.format( + DataNodeQueryMessages.ROOT_FRAGMENT_INSTANCE_PLACEMENT_ERROR_FMT, replicaSets), TSStatusCode.PLAN_FAILED_NETWORK_PARTITION.getStatusCode()); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/AbstractFragmentParallelPlanner.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/AbstractFragmentParallelPlanner.java index e5bd6ca38c200..ff9415738ed9b 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/AbstractFragmentParallelPlanner.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/AbstractFragmentParallelPlanner.java @@ -115,7 +115,9 @@ protected TDataNodeLocation selectTargetDataNode(TRegionReplicaSet regionReplica || regionReplicaSet.getDataNodeLocations() == null || regionReplicaSet.getDataNodeLocations().isEmpty()) { throw new IllegalArgumentException( - String.format("regionReplicaSet is invalid: %s", regionReplicaSet)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_REGIONREPLICASET_IS_INVALID_S_1C2671AD, + regionReplicaSet)); } boolean selectRandomDataNode = ReadConsistencyLevel.WEAK == this.readConsistencyLevel; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/PlanFragment.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/PlanFragment.java index 22d8fa4d1f7a5..a1be7a44fa7e2 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/PlanFragment.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/PlanFragment.java @@ -26,6 +26,7 @@ import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.PlanNode; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.PlanNodeId; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.PlanNodeType; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.common.PlanFragmentId; import org.apache.iotdb.db.queryengine.plan.analyze.TypeProvider; import org.apache.iotdb.db.queryengine.plan.planner.SubPlanTypeExtractor; @@ -161,10 +162,13 @@ private TDataNodeLocation getNodeLocation(PlanNode root) { ((InformationSchemaTableScanNode) root).getRegionReplicaSet(); checkArgument( - regionReplicaSet != null, "InformationSchemaTableScanNode must have regionReplicaSet"); + regionReplicaSet != null, + DataNodeQueryMessages + .EXCEPTION_INFORMATIONSCHEMATABLESCANNODE_MUST_HAVE_REGIONREPLICASET_0411DBCB); checkArgument( regionReplicaSet.getDataNodeLocations().size() == 1, - "each InformationSchemaTableScanNode have only one DataNodeLocation"); + DataNodeQueryMessages + .EXCEPTION_EACH_INFORMATIONSCHEMATABLESCANNODE_HAVE_ONLY_ONE_DATANODELOCATION_FA3E82C4); return regionReplicaSet.getDataNodeLocations().get(0); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/DataNodePlanNodeDeserializer.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/DataNodePlanNodeDeserializer.java index 2a9b9b6905c77..3e5e46a3c0c87 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/DataNodePlanNodeDeserializer.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/DataNodePlanNodeDeserializer.java @@ -405,7 +405,8 @@ public PlanNode deserialize(ByteBuffer buffer, short nodeType) { return DeviceSchemaFetchScanNode.deserialize(buffer); case 97: throw new UnsupportedOperationException( - "You should never see ContinuousSameSearchIndexSeparatorNode in this function, because ContinuousSameSearchIndexSeparatorNode should never be used in network transmission."); + DataNodeQueryMessages + .QUERY_EXCEPTION_YOU_SHOULD_NEVER_SEE_CONTINUOUSSAMESEARCHINDEXSEPARATORNODE_F380A4B6); case 98: return LastQueryScanNode.deserialize(buffer); case 99: @@ -455,7 +456,8 @@ public PlanNode deserialize(ByteBuffer buffer, short nodeType) { return InformationSchemaTableScanNode.deserialize(buffer); case 1022: throw new UnsupportedOperationException( - "AggregationTreeDeviceViewScanNode should not be deserialized"); + DataNodeQueryMessages + .QUERY_EXCEPTION_AGGREGATIONTREEDEVICEVIEWSCANNODE_SHOULD_NOT_BE_DESERIALIZED_11788F1B); case 1023: return TreeAlignedDeviceViewScanNode.deserialize(buffer); case 1024: diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/PlanGraphPrinter.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/PlanGraphPrinter.java index f747c18503573..9a0fbc11b1a4e 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/PlanGraphPrinter.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/PlanGraphPrinter.java @@ -50,6 +50,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.planner.node.ValueFillNode; import org.apache.iotdb.commons.queryengine.plan.relational.planner.node.ValuesNode; import org.apache.iotdb.commons.queryengine.plan.relational.planner.node.WindowNode; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.analyze.TemplatedInfo; import org.apache.iotdb.db.queryengine.plan.expression.Expression; import org.apache.iotdb.db.queryengine.plan.planner.plan.node.process.AggregationMergeSortNode; @@ -1409,7 +1410,9 @@ public int getBoxWidth() { public void calculateBoxParams(List> childBoxStrings) { int childrenWidth = 0; for (List childBoxString : childBoxStrings) { - Validate.isTrue(!childBoxString.isEmpty(), "Lines of box string should be greater than 0"); + Validate.isTrue( + !childBoxString.isEmpty(), + DataNodeQueryMessages.EXCEPTION_LINES_OF_BOX_STRING_SHOULD_BE_GREATER_THAN_0_5DB8C047); childrenWidth += childBoxString.get(0).length(); } childrenWidth += childBoxStrings.size() > 1 ? (childBoxStrings.size() - 1) * BOX_MARGIN : 0; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/load/LoadSingleTsFileNode.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/load/LoadSingleTsFileNode.java index be29fabe367ca..dae0a63e97482 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/load/LoadSingleTsFileNode.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/load/LoadSingleTsFileNode.java @@ -112,7 +112,10 @@ public boolean needDecodeTsFile( if (slotList.isEmpty()) { throw new IllegalStateException( - String.format("Devices in TsFile %s is empty, this should not happen here.", tsFile)); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_DEVICES_IN_TSFILE_S_IS_EMPTY_THIS_SHOULD_NOT_HAPPEN_HERE_BC1BE63C, + tsFile)); } else { final TTimePartitionSlot firstSlot = slotList.get(0).right; for (int i = 1, size = slotList.size(); i < size; i++) { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/load/LoadTsFilePieceNode.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/load/LoadTsFilePieceNode.java index db06083ddf0e8..df49b0e52e5da 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/load/LoadTsFilePieceNode.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/load/LoadTsFilePieceNode.java @@ -141,8 +141,9 @@ protected void serializeAttributes(DataOutputStream stream) throws IOException { } catch (IOException e) { LOGGER.error( String.format( - "Serialize data of TsFile %s error, skip TsFileData %s", - tsFile.getPath(), tsFileData)); + DataNodeQueryMessages.SERIALIZE_DATA_OF_TSFILE_S_ERROR_SKIP_TSFILEDATA_S, + tsFile.getPath(), + tsFileData)); } } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/metadata/write/view/AlterLogicalViewNode.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/metadata/write/view/AlterLogicalViewNode.java index 4fc405e5716ab..2b8d60873146c 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/metadata/write/view/AlterLogicalViewNode.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/metadata/write/view/AlterLogicalViewNode.java @@ -148,7 +148,8 @@ public int allowedChildCount() { public List getOutputColumnNames() { // TODO: CRTODO, complete this method throw new NotImplementedException( - "getOutputColumnNames of AlterLogicalViewNode is not implemented"); + DataNodeQueryMessages + .QUERY_EXCEPTION_GETOUTPUTCOLUMNNAMES_OF_ALTERLOGICALVIEWNODE_IS_NOT_IMPLEMENTED_D2294789); } @Override diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/metadata/write/view/CreateLogicalViewNode.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/metadata/write/view/CreateLogicalViewNode.java index 295184a5650c0..5f04d64ecbe5b 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/metadata/write/view/CreateLogicalViewNode.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/metadata/write/view/CreateLogicalViewNode.java @@ -182,7 +182,8 @@ public int allowedChildCount() { public List getOutputColumnNames() { // TODO: CRTODO, complete this method throw new NotImplementedException( - "getOutputColumnNames of CreateMultiTimeSeriesNode is not implemented"); + DataNodeQueryMessages + .QUERY_EXCEPTION_GETOUTPUTCOLUMNNAMES_OF_CREATEMULTITIMESERIESNODE_IS_NOT_9D02257A); } @Override diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/process/CollectNode.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/process/CollectNode.java index 03ef02f28b349..5e59108a83d74 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/process/CollectNode.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/process/CollectNode.java @@ -24,6 +24,7 @@ import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.PlanNodeId; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.PlanNodeType; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.process.MultiChildProcessNode; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.planner.plan.node.PlanVisitor; import org.apache.tsfile.utils.ReadWriteIOUtils; @@ -72,7 +73,9 @@ public List getOutputColumnNames() { @Override public PlanNode replaceChildren(List newChildren) { - checkArgument(children.size() == newChildren.size(), "wrong number of new children"); + checkArgument( + children.size() == newChildren.size(), + DataNodeQueryMessages.EXCEPTION_WRONG_NUMBER_OF_NEW_CHILDREN_817AF800); return new CollectNode(id, newChildren, outputColumnNames); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/process/DeviceMergeNode.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/process/DeviceMergeNode.java index 8b13c4fccf1f8..32c3f9028d3d8 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/process/DeviceMergeNode.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/process/DeviceMergeNode.java @@ -24,6 +24,7 @@ import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.PlanNodeId; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.PlanNodeType; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.process.MultiChildProcessNode; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.planner.plan.node.PlanVisitor; import org.apache.iotdb.db.queryengine.plan.planner.plan.parameter.OrderByParameter; @@ -74,7 +75,8 @@ public PlanNode clone() { @Override public PlanNode createSubNode(int subNodeId, int startIndex, int endIndex) { throw new UnsupportedOperationException( - "DeviceMergeNode should have only one local child in single data region."); + DataNodeQueryMessages + .QUERY_EXCEPTION_DEVICEMERGENODE_SHOULD_HAVE_ONLY_ONE_LOCAL_CHILD_IN_SINGLE_D1A2E6CF); } @Override diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/source/AlignedSeriesAggregationScanNode.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/source/AlignedSeriesAggregationScanNode.java index 6fe86aaa1736b..5c783ec88e9c0 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/source/AlignedSeriesAggregationScanNode.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/source/AlignedSeriesAggregationScanNode.java @@ -172,7 +172,8 @@ public int allowedChildCount() { @Override public void addChild(PlanNode child) { throw new UnsupportedOperationException( - "no child is allowed for AlignedSeriesAggregationScanNode"); + DataNodeQueryMessages + .QUERY_EXCEPTION_NO_CHILD_IS_ALLOWED_FOR_ALIGNEDSERIESAGGREGATIONSCANNODE_41654FE2); } @Override diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/ContinuousSameSearchIndexSeparatorNode.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/ContinuousSameSearchIndexSeparatorNode.java index 791cff616f7d6..4d5751b1857dd 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/ContinuousSameSearchIndexSeparatorNode.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/ContinuousSameSearchIndexSeparatorNode.java @@ -24,6 +24,7 @@ import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.PlanNode; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.PlanNodeId; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.PlanNodeType; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.analyze.IAnalysis; import org.apache.iotdb.db.queryengine.plan.planner.plan.node.WritePlanNode; import org.apache.iotdb.db.storageengine.dataregion.wal.buffer.IWALByteBufferView; @@ -53,7 +54,8 @@ public ContinuousSameSearchIndexSeparatorNode(PlanNodeId id) { @Override public SearchNode merge(List searchNodes) { throw new UnsupportedOperationException( - "ContinuousSameSearchIndexSeparatorNode not support merge"); + DataNodeQueryMessages + .QUERY_EXCEPTION_CONTINUOUSSAMESEARCHINDEXSEPARATORNODE_NOT_SUPPORT_MERGE_FD194976); } @Override diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/DeleteDataNode.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/DeleteDataNode.java index 807f4746e6681..a0af1aa7a4f53 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/DeleteDataNode.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/DeleteDataNode.java @@ -393,7 +393,8 @@ public SearchNode merge(List searchNodes) { firstOne.getDeleteStartTime() == deleteDataNode.getDeleteStartTime() && firstOne.getDeleteEndTime() == deleteDataNode.getDeleteEndTime())) { throw new IllegalArgumentException( - "DeleteDataNodes which start time or end time are not same cannot be merged"); + DataNodeQueryMessages + .QUERY_EXCEPTION_DELETEDATANODES_WHICH_START_TIME_OR_END_TIME_ARE_NOT_SAME_F396951C); } List pathList = deleteDataNodes.stream() diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/parameter/OutputColumn.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/parameter/OutputColumn.java index e17a405b7f12f..6ebe4d2e32225 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/parameter/OutputColumn.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/parameter/OutputColumn.java @@ -19,6 +19,7 @@ package org.apache.iotdb.db.queryengine.plan.planner.plan.parameter; import org.apache.iotdb.commons.queryengine.plan.planner.plan.parameter.InputLocation; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.ReadWriteIOUtils; @@ -49,7 +50,7 @@ public OutputColumn(InputLocation inputLocation) { public OutputColumn(List sourceLocations, boolean overlapped) { checkArgument( sourceLocations != null && !sourceLocations.isEmpty(), - "size of sourceLocations should be larger than 0"); + DataNodeQueryMessages.EXCEPTION_SIZE_OF_SOURCELOCATIONS_SHOULD_BE_LARGER_THAN_0_2EC41A23); this.sourceLocations = sourceLocations; this.overlapped = overlapped; } @@ -67,7 +68,9 @@ public boolean isSingleInputColumn() { } public InputLocation getSourceLocation(int index) { - checkArgument(index < sourceLocations.size(), "index is not valid"); + checkArgument( + index < sourceLocations.size(), + DataNodeQueryMessages.EXCEPTION_INDEX_IS_NOT_VALID_2AB4FB3A); return sourceLocations.get(index); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/AggregationAnalyzer.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/AggregationAnalyzer.java index d083c478fac03..819a1ee67a4e3 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/AggregationAnalyzer.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/AggregationAnalyzer.java @@ -122,10 +122,11 @@ private AggregationAnalyzer( Scope sourceScope, Optional orderByScope, Analysis analysis) { - requireNonNull(groupByExpressions, "groupByExpressions is null"); - requireNonNull(sourceScope, "sourceScope is null"); - requireNonNull(orderByScope, "orderByScope is null"); - requireNonNull(analysis, "analysis is null"); + requireNonNull( + groupByExpressions, DataNodeQueryMessages.EXCEPTION_GROUPBYEXPRESSIONS_IS_NULL_BFDC07D2); + requireNonNull(sourceScope, DataNodeQueryMessages.EXCEPTION_SOURCESCOPE_IS_NULL_4B3626A7); + requireNonNull(orderByScope, DataNodeQueryMessages.EXCEPTION_ORDERBYSCOPE_IS_NULL_A6017E73); + requireNonNull(analysis, DataNodeQueryMessages.EXCEPTION_ANALYSIS_IS_NULL_66666A58); this.sourceScope = sourceScope; this.orderByScope = orderByScope; @@ -151,7 +152,7 @@ private AggregationAnalyzer( fieldId -> { checkState( isFieldFromScope(fieldId, sourceScope), - "Grouping field %s should originate from %s", + DataNodeQueryMessages.EXCEPTION_GROUPING_FIELD_ARG_SHOULD_ORIGINATE_FROM_ARG_6DBBCE6B, fieldId, sourceScope.getRelationType()); }); @@ -162,7 +163,8 @@ private void analyze(Expression expression) { if (!visitor.process(expression, null)) { throw new SemanticException( String.format( - "'%s' must be an aggregate expression or appear in GROUP BY clause", expression)); + DataNodeQueryMessages.S_MUST_BE_AN_AGGREGATE_EXPRESSION_OR_APPEAR_IN_GROUP_BY_CLAUSE, + expression)); } } @@ -171,7 +173,10 @@ private class Visitor implements AstVisitor { @Override public Boolean visitExpression(Expression node, Void context) { throw new UnsupportedOperationException( - "aggregation analysis not yet implemented for: " + node.getClass().getName()); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_AGGREGATION_ANALYSIS_NOT_YET_IMPLEMENTED_FOR_S_38B64170, + node.getClass().getName())); } @Override @@ -188,7 +193,8 @@ public Boolean visitSubqueryExpression(SubqueryExpression node, Void context) { expression -> { throw new SemanticException( String.format( - "Subquery uses '%s' which must appear in GROUP BY clause", expression)); + DataNodeQueryMessages.SUBQUERY_USES_S_WHICH_MUST_APPEAR_IN_GROUP_BY_CLAUSE, + expression)); }); return true; @@ -293,8 +299,9 @@ public Boolean visitFunctionCall(FunctionCall node, Void context) { if (!aggregateFunctions.isEmpty()) { throw new SemanticException( String.format( - "Cannot nest aggregations inside aggregation '%s': %s", - node.getName(), aggregateFunctions)); + DataNodeQueryMessages.CANNOT_NEST_AGGREGATIONS_INSIDE_AGGREGATION_S_S, + node.getName(), + aggregateFunctions)); } return true; @@ -335,7 +342,9 @@ public Boolean visitDereferenceExpression(DereferenceExpression node, Void conte private boolean isGroupingKey(Expression node) { FieldId fieldId = - requireNonNull(columnReferences.get(NodeRef.of(node)), () -> "No field for " + node) + requireNonNull( + columnReferences.get(NodeRef.of(node)), + () -> DataNodeQueryMessages.EXCEPTION_NO_FIELD_FOR_E99DCE9A + node) .getFieldId(); if (orderByScope.isPresent() && isFieldFromScope(fieldId, orderByScope.get())) { @@ -352,7 +361,9 @@ public Boolean visitFieldReference(FieldReference node, Void context) { } FieldId fieldId = - requireNonNull(columnReferences.get(NodeRef.of(node)), () -> "No field for " + node) + requireNonNull( + columnReferences.get(NodeRef.of(node)), + () -> DataNodeQueryMessages.EXCEPTION_NO_FIELD_FOR_E99DCE9A + node) .getFieldId(); boolean inGroup = groupingFields.contains(fieldId); if (!inGroup) { @@ -441,7 +452,8 @@ public Boolean visitParameter(Parameter node, Void context) { Map, Expression> parameters = analysis.getParameters(); checkArgument( node.getId() < parameters.size(), - "Invalid parameter number %s, max values is %s", + DataNodeQueryMessages + .EXCEPTION_INVALID_PARAMETER_NUMBER_ARG_COMMA_MAX_VALUES_IS_ARG_B3F5C4E8, node.getId(), parameters.size() - 1); return process(parameters.get(NodeRef.of(node)), context); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/Analysis.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/Analysis.java index 34ed87bc08f8c..feecbf324c0ba 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/Analysis.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/Analysis.java @@ -267,7 +267,10 @@ public class Analysis implements IAnalysis { public Analysis(@Nullable Statement root, Map, Expression> parameters) { this.root = root; - this.parameters = ImmutableMap.copyOf(requireNonNull(parameters, "parameters is null")); + this.parameters = + ImmutableMap.copyOf( + requireNonNull( + parameters, DataNodeQueryMessages.EXCEPTION_PARAMETERS_IS_NULL_418C7892)); } public void updateNeedSetHighestPriority(QualifiedObjectName tableName) { @@ -324,15 +327,16 @@ public boolean isAnalyzed(Expression expression) { } public void registerNamedQuery(Table tableReference, Query query) { - requireNonNull(tableReference, "tableReference is null"); - requireNonNull(query, "query is null"); + requireNonNull(tableReference, DataNodeQueryMessages.EXCEPTION_TABLEREFERENCE_IS_NULL_C02D3A8F); + requireNonNull(query, DataNodeQueryMessages.EXCEPTION_QUERY_IS_NULL_689B7978); namedQueries.put(NodeRef.of(tableReference), query); } public void registerExpandableQuery(Query query, Node recursiveReference) { - requireNonNull(query, "query is null"); - requireNonNull(recursiveReference, "recursiveReference is null"); + requireNonNull(query, DataNodeQueryMessages.EXCEPTION_QUERY_IS_NULL_689B7978); + requireNonNull( + recursiveReference, DataNodeQueryMessages.EXCEPTION_RECURSIVEREFERENCE_IS_NULL_24B9D5DC); expandableNamedQueries.put(NodeRef.of(query), recursiveReference); } @@ -342,7 +346,9 @@ public boolean isExpandableQuery(Query query) { } public Node getRecursiveReference(Query query) { - checkArgument(isExpandableQuery(query), "query is not registered as expandable"); + checkArgument( + isExpandableQuery(query), + DataNodeQueryMessages.EXCEPTION_QUERY_IS_NOT_REGISTERED_AS_EXPANDABLE_FAAD8FC9); return expandableNamedQueries.get(NodeRef.of(query)); } @@ -359,7 +365,9 @@ public Scope getScope(Node node) { .orElseThrow( () -> new IllegalArgumentException( - format("Analysis does not contain information for node: %s", node))); + format( + DataNodeQueryMessages.ANALYSIS_DOES_NOT_CONTAIN_INFORMATION_FOR_NODE_FMT, + node))); } public void setImplicitFromScope(QuerySpecification node, Scope scope) { @@ -444,7 +452,10 @@ public Map, Type> getTypes() { public Type getType(Expression expression) { Type type = types.get(NodeRef.of(expression)); - checkArgument(type != null, "Expression not analyzed: %s", expression); + checkArgument( + type != null, + DataNodeQueryMessages.EXCEPTION_EXPRESSION_NOT_ANALYZED_COLON_ARG_D397B665, + expression); return type; } @@ -564,7 +575,10 @@ public void setFill(Fill node, FillAnalysis fillAnalysis) { } public FillAnalysis getFill(Fill node) { - checkState(fill.containsKey(NodeRef.of(node)), "missing FillAnalysis for node %s", node); + checkState( + fill.containsKey(NodeRef.of(node)), + DataNodeQueryMessages.EXCEPTION_MISSING_FILLANALYSIS_FOR_NODE_ARG_7E5B19A4, + node); return fill.get(NodeRef.of(node)); } @@ -573,7 +587,10 @@ public void setOffset(Offset node, long rowCount) { } public long getOffset(Offset node) { - checkState(offset.containsKey(NodeRef.of(node)), "missing OFFSET value for node %s", node); + checkState( + offset.containsKey(NodeRef.of(node)), + DataNodeQueryMessages.EXCEPTION_MISSING_OFFSET_VALUE_FOR_NODE_ARG_4B107520, + node); return offset.get(NodeRef.of(node)); } @@ -586,7 +603,10 @@ public void setLimit(Node node, long rowCount) { } public OptionalLong getLimit(Node node) { - checkState(limit.containsKey(NodeRef.of(node)), "missing LIMIT value for node %s", node); + checkState( + limit.containsKey(NodeRef.of(node)), + DataNodeQueryMessages.EXCEPTION_MISSING_LIMIT_VALUE_FOR_NODE_ARG_DD5FD777, + node); return limit.get(NodeRef.of(node)); } @@ -699,12 +719,14 @@ public void registerTable(Table table, Optional handle, QualifiedOb public ResolvedField getResolvedField(Expression expression) { checkArgument( - isColumnReference(expression), "Expression is not a column reference: %s", expression); + isColumnReference(expression), + DataNodeQueryMessages.EXCEPTION_EXPRESSION_IS_NOT_A_COLUMN_REFERENCE_COLON_ARG_7957E705, + expression); return columnReferences.get(NodeRef.of(expression)); } public boolean isColumnReference(Expression expression) { - requireNonNull(expression, "expression is null"); + requireNonNull(expression, DataNodeQueryMessages.EXCEPTION_EXPRESSION_IS_NULL_16C079B5); return columnReferences.containsKey(NodeRef.of(expression)); } @@ -757,7 +779,10 @@ public void setRanges(Map, Range> quantifierRanges) { public Range getRange(RangeQuantifier quantifier) { Range range = ranges.get(NodeRef.of(quantifier)); - checkNotNull(range, "missing range for quantifier %s", quantifier); + checkNotNull( + range, + DataNodeQueryMessages.EXCEPTION_MISSING_RANGE_FOR_QUANTIFIER_ARG_03461228, + quantifier); return range; } @@ -771,7 +796,8 @@ public void setUndefinedLabels(Map, Set> labels) { public Set getUndefinedLabels(RowPattern pattern) { Set labels = undefinedLabels.get(NodeRef.of(pattern)); - checkNotNull(labels, "missing undefined labels for %s", pattern); + checkNotNull( + labels, DataNodeQueryMessages.EXCEPTION_MISSING_UNDEFINED_LABELS_FOR_ARG_CA615EC2, pattern); return labels; } @@ -953,7 +979,9 @@ public void setDataPartitionInfo(final DataPartition dataPartition) { @Override public TsBlock constructResultForMemorySource(final MPPQueryContext context) { - requireNonNull(getStatement(), "root statement is analysis is null"); + requireNonNull( + getStatement(), + DataNodeQueryMessages.EXCEPTION_ROOT_STATEMENT_IS_ANALYSIS_IS_NULL_36BCD4D1); final StatementMemorySource memorySource = new TableModelStatementMemorySourceVisitor() .process(getStatement(), new TableModelStatementMemorySourceContext(context, this)); @@ -1053,8 +1081,11 @@ public static final class AccessControlInfo { private final Identity identity; public AccessControlInfo(AccessControl accessControl, Identity identity) { - this.accessControl = requireNonNull(accessControl, "accessControl is null"); - this.identity = requireNonNull(identity, "identity is null"); + this.accessControl = + requireNonNull( + accessControl, DataNodeQueryMessages.EXCEPTION_ACCESSCONTROL_IS_NULL_F534EBDD); + this.identity = + requireNonNull(identity, DataNodeQueryMessages.EXCEPTION_IDENTITY_IS_NULL_846265BA); } public AccessControl getAccessControl() { @@ -1091,8 +1122,8 @@ private static class TableEntry { private final QualifiedObjectName name; public TableEntry(Optional handle, QualifiedObjectName name) { - this.handle = requireNonNull(handle, "handle is null"); - this.name = requireNonNull(name, "name is null"); + this.handle = requireNonNull(handle, DataNodeQueryMessages.EXCEPTION_HANDLE_IS_NULL_E82FA480); + this.name = requireNonNull(name, DataNodeQueryMessages.EXCEPTION_NAME_IS_NULL_C8B35959); } public Optional getHandle() { @@ -1109,8 +1140,10 @@ public static class SourceColumn { private final String columnName; public SourceColumn(QualifiedObjectName tableName, String columnName) { - this.tableName = requireNonNull(tableName, "tableName is null"); - this.columnName = requireNonNull(columnName, "columnName is null"); + this.tableName = + requireNonNull(tableName, DataNodeQueryMessages.EXCEPTION_TABLENAME_IS_NULL_20708596); + this.columnName = + requireNonNull(columnName, DataNodeQueryMessages.EXCEPTION_COLUMNNAME_IS_NULL_81635BA6); } public QualifiedObjectName getTableName() { @@ -1158,7 +1191,8 @@ public static final class SelectExpression { private final Optional> unfoldedExpressions; public SelectExpression(Expression expression, Optional> unfoldedExpressions) { - this.expression = requireNonNull(expression, "expression is null"); + this.expression = + requireNonNull(expression, DataNodeQueryMessages.EXCEPTION_EXPRESSION_IS_NULL_16C079B5); this.unfoldedExpressions = requireNonNull(unfoldedExpressions); } @@ -1189,7 +1223,8 @@ public static final class JoinUsingAnalysis { checkArgument( leftJoinFields.size() == rightJoinFields.size(), - "Expected join fields for left and right to have the same size"); + DataNodeQueryMessages + .EXCEPTION_EXPECTED_JOIN_FIELDS_FOR_LEFT_AND_RIGHT_TO_HAVE_THE_SAME_SIZE_21BFD449); } public List getLeftJoinFields() { @@ -1264,8 +1299,11 @@ private static class RoutineEntry { private final String authorization; public RoutineEntry(ResolvedFunction function, String authorization) { - this.function = requireNonNull(function, "function is null"); - this.authorization = requireNonNull(authorization, "authorization is null"); + this.function = + requireNonNull(function, DataNodeQueryMessages.EXCEPTION_FUNCTION_IS_NULL_E0FA4B62); + this.authorization = + requireNonNull( + authorization, DataNodeQueryMessages.EXCEPTION_AUTHORIZATION_IS_NULL_7CCA692F); } public ResolvedFunction getFunction() { @@ -1328,9 +1366,14 @@ public static class PredicateCoercions { public PredicateCoercions( Type valueType, Optional valueCoercion, Optional subqueryCoercion) { - this.valueType = requireNonNull(valueType, "valueType is null"); - this.valueCoercion = requireNonNull(valueCoercion, "valueCoercion is null"); - this.subqueryCoercion = requireNonNull(subqueryCoercion, "subqueryCoercion is null"); + this.valueType = + requireNonNull(valueType, DataNodeQueryMessages.EXCEPTION_VALUETYPE_IS_NULL_A8582B5F); + this.valueCoercion = + requireNonNull( + valueCoercion, DataNodeQueryMessages.EXCEPTION_VALUECOERCION_IS_NULL_E1A004BF); + this.subqueryCoercion = + requireNonNull( + subqueryCoercion, DataNodeQueryMessages.EXCEPTION_SUBQUERYCOERCION_IS_NULL_33646290); } public Type getValueType() { @@ -1403,9 +1446,11 @@ public ResolvedWindow( boolean partitionByInherited, boolean orderByInherited, boolean frameInherited) { - this.partitionBy = requireNonNull(partitionBy, "partitionBy is null"); - this.orderBy = requireNonNull(orderBy, "orderBy is null"); - this.frame = requireNonNull(frame, "frame is null"); + this.partitionBy = + requireNonNull(partitionBy, DataNodeQueryMessages.EXCEPTION_PARTITIONBY_IS_NULL_84791B6B); + this.orderBy = + requireNonNull(orderBy, DataNodeQueryMessages.EXCEPTION_ORDERBY_IS_NULL_AA2494DE); + this.frame = requireNonNull(frame, DataNodeQueryMessages.EXCEPTION_FRAME_IS_NULL_5A92D609); this.partitionByInherited = partitionByInherited; this.orderByInherited = orderByInherited; this.frameInherited = frameInherited; @@ -1464,8 +1509,9 @@ public static class Range { private final Optional atMost; public Range(Optional atLeast, Optional atMost) { - this.atLeast = requireNonNull(atLeast, "atLeast is null"); - this.atMost = requireNonNull(atMost, "atMost is null"); + this.atLeast = + requireNonNull(atLeast, DataNodeQueryMessages.EXCEPTION_ATLEAST_IS_NULL_2FE8D701); + this.atMost = requireNonNull(atMost, DataNodeQueryMessages.EXCEPTION_ATMOST_IS_NULL_778B3B3A); } public Optional getAtLeast() { @@ -1494,7 +1540,7 @@ public static class ValueFillAnalysis extends FillAnalysis { public ValueFillAnalysis(Literal filledValue) { super(FillPolicy.CONSTANT); - requireNonNull(filledValue, "filledValue is null"); + requireNonNull(filledValue, DataNodeQueryMessages.EXCEPTION_FILLEDVALUE_IS_NULL_1FA907D6); this.filledValue = filledValue; } @@ -1561,7 +1607,8 @@ public static class LinearFillAnalysis extends FillAnalysis { public LinearFillAnalysis(FieldReference fieldReference, List groupingKeys) { super(FillPolicy.LINEAR); - requireNonNull(fieldReference, "fieldReference is null"); + requireNonNull( + fieldReference, DataNodeQueryMessages.EXCEPTION_FIELDREFERENCE_IS_NULL_0B07EA50); this.fieldReference = fieldReference; this.groupingKeys = groupingKeys; } @@ -1598,9 +1645,11 @@ public static final class Insert { private final List columns; public Insert(Table table, List columns) { - this.table = requireNonNull(table, "table is null"); - this.columns = requireNonNull(columns, "columns is null"); - checkArgument(!columns.isEmpty(), "No columns given to insert"); + this.table = requireNonNull(table, DataNodeQueryMessages.EXCEPTION_TABLE_IS_NULL_8DDD9098); + this.columns = + requireNonNull(columns, DataNodeQueryMessages.EXCEPTION_COLUMNS_IS_NULL_6C8F32B3); + checkArgument( + !columns.isEmpty(), DataNodeQueryMessages.EXCEPTION_NO_COLUMNS_GIVEN_TO_INSERT_52C42E47); } public Table getTable() { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/Analyzer.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/Analyzer.java index 39f67b7caf001..c263b52fb0ed4 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/Analyzer.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/Analyzer.java @@ -62,13 +62,18 @@ public Analyzer( final StatementRewrite statementRewrite, final WarningCollector warningCollector) { this.context = context; - this.session = requireNonNull(session, "session is null"); + this.session = + requireNonNull(session, DataNodeQueryMessages.EXCEPTION_SESSION_IS_NULL_6CF0F47D); this.statementAnalyzerFactory = - requireNonNull(statementAnalyzerFactory, "statementAnalyzerFactory is null"); + requireNonNull( + statementAnalyzerFactory, + DataNodeQueryMessages.EXCEPTION_STATEMENTANALYZERFACTORY_IS_NULL_D309BAB5); this.parameters = parameters; this.parameterLookup = parameterLookup; this.statementRewrite = statementRewrite; - this.warningCollector = requireNonNull(warningCollector, "warningCollector is null"); + this.warningCollector = + requireNonNull( + warningCollector, DataNodeQueryMessages.EXCEPTION_WARNINGCOLLECTOR_IS_NULL_7A524A68); } public Analysis analyze(Statement statement) { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/CanonicalizationAware.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/CanonicalizationAware.java index e79608212de37..d6d84cbd92bd9 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/CanonicalizationAware.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/CanonicalizationAware.java @@ -21,6 +21,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Identifier; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Node; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import java.util.OptionalInt; @@ -38,7 +39,7 @@ public class CanonicalizationAware { private int hashCode; private CanonicalizationAware(T node) { - this.node = requireNonNull(node, "node is null"); + this.node = requireNonNull(node, DataNodeQueryMessages.EXCEPTION_NODE_IS_NULL_C1479F4A); } public static CanonicalizationAware canonicalizationAwareKey(T node) { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/ExpressionAnalysis.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/ExpressionAnalysis.java index 2efbd39ce500a..91c544922b963 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/ExpressionAnalysis.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/ExpressionAnalysis.java @@ -26,6 +26,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.InPredicate; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.QuantifiedComparisonExpression; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.SubqueryExpression; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; @@ -56,23 +57,42 @@ public ExpressionAnalysis( Set> quantifiedComparisons, Set> windowFunctions) { this.expressionTypes = - ImmutableMap.copyOf(requireNonNull(expressionTypes, "expressionTypes is null")); + ImmutableMap.copyOf( + requireNonNull( + expressionTypes, DataNodeQueryMessages.EXCEPTION_EXPRESSIONTYPES_IS_NULL_4107A4A2)); // this.expressionCoercions = // ImmutableMap.copyOf(requireNonNull(expressionCoercions, "expressionCoercions is // null")); // this.typeOnlyCoercions = // ImmutableSet.copyOf(requireNonNull(typeOnlyCoercions, "typeOnlyCoercions is null")); this.columnReferences = - ImmutableMap.copyOf(requireNonNull(columnReferences, "columnReferences is null")); + ImmutableMap.copyOf( + requireNonNull( + columnReferences, + DataNodeQueryMessages.EXCEPTION_COLUMNREFERENCES_IS_NULL_124955C5)); this.subqueryInPredicates = - ImmutableSet.copyOf(requireNonNull(subqueryInPredicates, "subqueryInPredicates is null")); - this.subqueries = ImmutableSet.copyOf(requireNonNull(subqueries, "subqueries is null")); + ImmutableSet.copyOf( + requireNonNull( + subqueryInPredicates, + DataNodeQueryMessages.EXCEPTION_SUBQUERYINPREDICATES_IS_NULL_5A37F1C8)); + this.subqueries = + ImmutableSet.copyOf( + requireNonNull( + subqueries, DataNodeQueryMessages.EXCEPTION_SUBQUERIES_IS_NULL_0D5EA053)); this.existsSubqueries = - ImmutableSet.copyOf(requireNonNull(existsSubqueries, "existsSubqueries is null")); + ImmutableSet.copyOf( + requireNonNull( + existsSubqueries, + DataNodeQueryMessages.EXCEPTION_EXISTSSUBQUERIES_IS_NULL_5EA140F5)); this.quantifiedComparisons = - ImmutableSet.copyOf(requireNonNull(quantifiedComparisons, "quantifiedComparisons is null")); + ImmutableSet.copyOf( + requireNonNull( + quantifiedComparisons, + DataNodeQueryMessages.EXCEPTION_QUANTIFIEDCOMPARISONS_IS_NULL_A30F5121)); this.windowFunctions = - ImmutableSet.copyOf(requireNonNull(windowFunctions, "windowFunctions is null")); + ImmutableSet.copyOf( + requireNonNull( + windowFunctions, DataNodeQueryMessages.EXCEPTION_WINDOWFUNCTIONS_IS_NULL_D77C3CD5)); } public Type getType(Expression expression) { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/ExpressionAnalyzer.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/ExpressionAnalyzer.java index 93e0f4f0ba132..943965b5d2075 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/ExpressionAnalyzer.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/ExpressionAnalyzer.java @@ -269,17 +269,33 @@ private ExpressionAnalyzer( WarningCollector warningCollector, Function getPreanalyzedType, Function getResolvedWindow) { - this.metadata = requireNonNull(metadata, "metadata is null"); - this.context = requireNonNull(context, "context is null"); - this.accessControl = requireNonNull(accessControl, "accessControl is null"); + this.metadata = + requireNonNull(metadata, DataNodeQueryMessages.EXCEPTION_METADATA_IS_NULL_6F8F9BA0); + this.context = + requireNonNull(context, DataNodeQueryMessages.EXCEPTION_CONTEXT_IS_NULL_E329B664); + this.accessControl = + requireNonNull( + accessControl, DataNodeQueryMessages.EXCEPTION_ACCESSCONTROL_IS_NULL_F534EBDD); this.statementAnalyzerFactory = - requireNonNull(statementAnalyzerFactory, "statementAnalyzerFactory is null"); - this.session = requireNonNull(session, "session is null"); - this.symbolTypes = requireNonNull(symbolTypes, "symbolTypes is null"); - this.parameters = requireNonNull(parameters, "parameters is null"); - this.warningCollector = requireNonNull(warningCollector, "warningCollector is null"); - this.getResolvedWindow = requireNonNull(getResolvedWindow, "getResolvedWindow is null"); - this.getPreanalyzedType = requireNonNull(getPreanalyzedType, "getPreanalyzedType is null"); + requireNonNull( + statementAnalyzerFactory, + DataNodeQueryMessages.EXCEPTION_STATEMENTANALYZERFACTORY_IS_NULL_D309BAB5); + this.session = + requireNonNull(session, DataNodeQueryMessages.EXCEPTION_SESSION_IS_NULL_6CF0F47D); + this.symbolTypes = + requireNonNull(symbolTypes, DataNodeQueryMessages.EXCEPTION_SYMBOLTYPES_IS_NULL_DD16EA83); + this.parameters = + requireNonNull(parameters, DataNodeQueryMessages.EXCEPTION_PARAMETERS_IS_NULL_418C7892); + this.warningCollector = + requireNonNull( + warningCollector, DataNodeQueryMessages.EXCEPTION_WARNINGCOLLECTOR_IS_NULL_7A524A68); + this.getResolvedWindow = + requireNonNull( + getResolvedWindow, DataNodeQueryMessages.EXCEPTION_GETRESOLVEDWINDOW_IS_NULL_2438758C); + this.getPreanalyzedType = + requireNonNull( + getPreanalyzedType, + DataNodeQueryMessages.EXCEPTION_GETPREANALYZEDTYPE_IS_NULL_FBB2EC7D); } public static ExpressionAnalysis analyzeWindow( @@ -340,8 +356,8 @@ public Map, Type> getExpressionTypes() { } public Type setExpressionType(Expression expression, Type type) { - requireNonNull(expression, "expression cannot be null"); - requireNonNull(type, "type cannot be null"); + requireNonNull(expression, DataNodeQueryMessages.EXCEPTION_EXPRESSION_CANNOT_BE_NULL_EFF1A99C); + requireNonNull(type, DataNodeQueryMessages.EXCEPTION_TYPE_CANNOT_BE_NULL_97A0A8D3); expressionTypes.put(NodeRef.of(expression), type); @@ -353,10 +369,13 @@ public Set> getWindowFunctions() { } private Type getExpressionType(Expression expression) { - requireNonNull(expression, "expression cannot be null"); + requireNonNull(expression, DataNodeQueryMessages.EXCEPTION_EXPRESSION_CANNOT_BE_NULL_EFF1A99C); Type type = expressionTypes.get(NodeRef.of(expression)); - checkState(type != null, "Expression not yet analyzed: %s", expression); + checkState( + type != null, + DataNodeQueryMessages.EXCEPTION_EXPRESSION_NOT_YET_ANALYZED_COLON_ARG_0F4F19B7, + expression); return type; } @@ -461,8 +480,11 @@ private class Visitor extends StackableAstVisitor { private final List patternRecognitionInputs = new ArrayList<>(); public Visitor(Scope baseScope, WarningCollector warningCollector) { - this.baseScope = requireNonNull(baseScope, "baseScope is null"); - this.warningCollector = requireNonNull(warningCollector, "warningCollector is null"); + this.baseScope = + requireNonNull(baseScope, DataNodeQueryMessages.EXCEPTION_BASESCOPE_IS_NULL_ABE8F618); + this.warningCollector = + requireNonNull( + warningCollector, DataNodeQueryMessages.EXCEPTION_WARNINGCOLLECTOR_IS_NULL_7A524A68); } public List getPatternRecognitionInputs() { @@ -543,7 +565,9 @@ private Type handleResolvedField( && context.getContext().getCorrelationSupport() != CorrelationSupport.ALLOWED) { throw new SemanticException( String.format( - "Reference to column '%s' from outer scope not allowed in this context", node)); + DataNodeQueryMessages + .REFERENCE_TO_COLUMN_S_FROM_OUTER_SCOPE_NOT_ALLOWED_IN_THIS_CONTEXT, + node)); } FieldId fieldId = FieldId.from(resolvedField); @@ -571,7 +595,11 @@ private Type handleResolvedField( .ifPresent(source -> referencedFields.put(NodeRef.of(source), field)); ResolvedField previous = columnReferences.put(NodeRef.of(node), resolvedField); - checkState(previous == null, "%s already known to refer to %s", node, previous); + checkState( + previous == null, + DataNodeQueryMessages.EXCEPTION_ARG_ALREADY_KNOWN_TO_REFER_TO_ARG_8C8B4F24, + node, + previous); return setExpressionType(node, field.getType()); } @@ -607,14 +635,18 @@ public Type visitDereferenceExpression( if (qualifiedName.getOriginalParts().size() > 2) { throw new SemanticException( String.format( - "Column %s prefixed with label %s cannot be resolved", unlabeledName, label)); + DataNodeQueryMessages.COLUMN_S_PREFIXED_WITH_LABEL_S_CANNOT_BE_RESOLVED, + unlabeledName, + label)); } Optional resolvedField = context.getContext().getScope().tryResolveField(node, unlabeledName); if (!resolvedField.isPresent()) { throw new SemanticException( String.format( - "Column %s prefixed with label %s cannot be resolved", unlabeledName, label)); + DataNodeQueryMessages.COLUMN_S_PREFIXED_WITH_LABEL_S_CANNOT_BE_RESOLVED, + unlabeledName, + label)); } // Correlation is not allowed in pattern recognition context. Visitor's context for // pattern recognition has CorrelationSupport.DISALLOWED, @@ -632,7 +664,7 @@ public Type visitDereferenceExpression( } // In the context of row pattern matching, qualified column references are not allowed. throw new SemanticException( - String.format("Column '%s' cannot be resolved", qualifiedName)); + String.format(DataNodeQueryMessages.COLUMN_S_CANNOT_BE_RESOLVED, qualifiedName)); } Scope scope = context.getContext().getScope(); @@ -648,7 +680,7 @@ public Type visitDereferenceExpression( Type baseType = process(node.getBase(), context); if (!(baseType instanceof RowType)) { throw new SemanticException( - String.format("Expression %s is not of type ROW", node.getBase())); + String.format(DataNodeQueryMessages.EXPRESSION_S_IS_NOT_OF_TYPE_ROW, node.getBase())); } RowType rowType = (RowType) baseType; @@ -665,7 +697,7 @@ public Type visitDereferenceExpression( if (fieldName.equalsIgnoreCase(rowField.getName().orElse(null))) { if (foundFieldName) { throw new SemanticException( - String.format("Ambiguous row field reference: %s", fieldName)); + String.format(DataNodeQueryMessages.AMBIGUOUS_ROW_FIELD_REFERENCE_S, fieldName)); } foundFieldName = true; rowFieldType = rowField.getType(); @@ -746,7 +778,10 @@ public Type visitNullIfExpression( if (!firstType.equals(secondType)) { throw new SemanticException( - String.format("Types are not comparable with NULLIF: %s vs %s", firstType, secondType)); + String.format( + DataNodeQueryMessages.TYPES_ARE_NOT_COMPARABLE_WITH_NULLIF_S_VS_S, + firstType, + secondType)); } return setExpressionType(node, firstType); @@ -829,8 +864,10 @@ private void coerceCaseOperandToToSingleType( if (!operandType.equals(whenOperandType)) { throw new SemanticException( String.format( - "CASE operand type does not match WHEN clause operand type: %s vs %s", - operandType, whenOperandType)); + DataNodeQueryMessages + .CASE_OPERAND_TYPE_DOES_NOT_MATCH_WHEN_CLAUSE_OPERAND_TYPE_S_VS_S, + operandType, + whenOperandType)); } } @@ -840,8 +877,10 @@ private void coerceCaseOperandToToSingleType( // Expression whenOperand = whenClauses.get(i).getOperand(); throw new SemanticException( String.format( - "CASE operand type does not match WHEN clause operand type: %s vs %s", - operandType, whenOperandType)); + DataNodeQueryMessages + .CASE_OPERAND_TYPE_DOES_NOT_MATCH_WHEN_CLAUSE_OPERAND_TYPE_S_VS_S, + operandType, + whenOperandType)); // addOrReplaceExpressionCoercion(whenOperand, whenOperandType, operandType); } } @@ -878,7 +917,8 @@ public Type visitArithmeticUnary( // that types can chose to implement, or piggyback on the existence of the negation // operator throw new SemanticException( - String.format("Unary '+' operator cannot by applied to %s type", type)); + String.format( + DataNodeQueryMessages.UNARY_OPERATOR_CANNOT_BY_APPLIED_TO_S_TYPE, type)); } return setExpressionType(node, type); case MINUS: @@ -906,7 +946,8 @@ public Type visitLikePredicate( if (!isCharType(valueType)) { throw new SemanticException( String.format( - "Left side of LIKE expression must evaluate to TEXT or STRING Type (actual: %s)", + DataNodeQueryMessages + .LEFT_SIDE_OF_LIKE_EXPRESSION_MUST_EVALUATE_TO_TEXT_OR_STRING_TYPE_ACTUAL_S, valueType)); } @@ -914,7 +955,8 @@ public Type visitLikePredicate( if (!isCharType(patternType)) { throw new SemanticException( String.format( - "Pattern for LIKE expression must evaluate to TEXT or STRING Type (actual: %s)", + DataNodeQueryMessages + .PATTERN_FOR_LIKE_EXPRESSION_MUST_EVALUATE_TO_TEXT_OR_STRING_TYPE_ACTUAL_S, patternType)); } if (node.getEscape().isPresent()) { @@ -923,7 +965,8 @@ public Type visitLikePredicate( if (!isCharType(escapeType)) { throw new SemanticException( String.format( - "Escape for LIKE expression must evaluate to TEXT or STRING Type (actual: %s)", + DataNodeQueryMessages + .ESCAPE_FOR_LIKE_EXPRESSION_MUST_EVALUATE_TO_TEXT_OR_STRING_TYPE_ACTUAL_S, escapeType)); } } @@ -1003,13 +1046,16 @@ public Type visitFunctionCall(FunctionCall node, StackableAstVisitorContext { if (!isRowPatternCount || node.getArguments().size() > 1) { throw new SemanticException( - "label.* syntax is only supported as the only argument of row pattern count function"); + DataNodeQueryMessages + .LABEL_STAR_SYNTAX_IS_ONLY_SUPPORTED_AS_THE_ONLY_ARGUMENT_OF_ROW_PATTERN_COUNT_FUNCTION); } }); if (node.getWindow().isPresent()) { Analysis.ResolvedWindow window = getResolvedWindow.apply(node); - checkState(window != null, "no resolved window for: " + node); + checkState( + window != null, + DataNodeQueryMessages.EXCEPTION_NO_RESOLVED_WINDOW_FOR_COLON_AED19667 + node); analyzeWindow(window, context, (Node) node.getWindow().get()); windowFunctions.add(NodeRef.of(node)); @@ -1024,7 +1070,8 @@ public Type visitFunctionCall(FunctionCall node, StackableAstVisitorContext) relationType.getVisibleFields())) { throw new SemanticException( String.format( - "The second argument of %s function must be actual time name", functionName)); + DataNodeQueryMessages + .THE_SECOND_ARGUMENT_OF_S_FUNCTION_MUST_BE_ACTUAL_TIME_NAME, + functionName)); } } break; @@ -1096,7 +1148,9 @@ public Type visitFunctionCall(FunctionCall node, StackableAstVisitorContext) relationType.getVisibleFields())) { throw new SemanticException( String.format( - "The third argument of %s function must be actual time name", functionName)); + DataNodeQueryMessages + .THE_THIRD_ARGUMENT_OF_S_FUNCTION_MUST_BE_ACTUAL_TIME_NAME, + functionName)); } } } @@ -1105,14 +1159,16 @@ public Type visitFunctionCall(FunctionCall node, StackableAstVisitorContext 127) { throw new SemanticException( - String.format("Too many arguments for function call %s()", functionName)); + String.format( + DataNodeQueryMessages.TOO_MANY_ARGUMENTS_FOR_FUNCTION_CALL_S, functionName)); } for (Type argumentType : argumentTypes) { if (node.isDistinct() && !argumentType.isComparable()) { throw new SemanticException( String.format( - "DISTINCT can only be applied to comparable types (actual: %s)", argumentType)); + DataNodeQueryMessages.DISTINCT_CAN_ONLY_BE_APPLIED_TO_COMPARABLE_TYPES_ACTUAL_S, + argumentType)); } } @@ -1171,7 +1227,9 @@ public List getCallArgumentTypes( String label = label((Identifier) allRowsDereference.getBase()); if (!context.getContext().getPatternRecognitionContext().getLabels().contains(label)) { throw new SemanticException( - String.format("%s is not a primary pattern variable or subset name", label)); + String.format( + DataNodeQueryMessages.S_IS_NOT_A_PRIMARY_PATTERN_VARIABLE_OR_SUBSET_NAME, + label)); } labelDereferences.put(NodeRef.of(allRowsDereference), new LabelPrefixedReference(label)); } else { @@ -1244,7 +1302,8 @@ private String getActualTimeFieldName(RelationType relation) { .orElseThrow( () -> new SemanticException( - "Missing valid time column. The table must contain either a column with the TIME category or at least one TIMESTAMP column.")); + DataNodeQueryMessages + .MISSING_VALID_TIME_COLUMN_THE_TABLE_MUST_CONTAIN_EITHER_A_COLUMN_WITH_THE_TIME_CATEGORY)); } private Type analyzeMatchNumber( @@ -1262,7 +1321,8 @@ private Type analyzeMatchNumber( private Type analyzeClassifier(FunctionCall node, StackableAstVisitorContext context) { if (node.getArguments().size() > 1) { throw new SemanticException( - "CLASSIFIER pattern recognition function takes no arguments or 1 argument"); + DataNodeQueryMessages + .CLASSIFIER_PATTERN_RECOGNITION_FUNCTION_TAKES_NO_ARGUMENTS_OR_1_ARGUMENT); } Optional label = Optional.empty(); @@ -1271,7 +1331,8 @@ private Type analyzeClassifier(FunctionCall node, StackableAstVisitorContext Integer.MAX_VALUE) { throw new SemanticException( String.format( - "The second argument of %s pattern recognition navigation function must not exceed %s (actual: %s)", - node.getName(), Integer.MAX_VALUE, offset)); + DataNodeQueryMessages + .THE_SECOND_ARGUMENT_OF_S_PATTERN_RECOGNITION_NAVIGATION_FUNCTION_MUST_NOT_EXCEED_S, + node.getName(), + Integer.MAX_VALUE, + offset)); } } } @@ -1457,13 +1529,16 @@ private void validateNavigationNesting(FunctionCall node) { if (name.equalsIgnoreCase("RPR_FIRST") || name.equalsIgnoreCase("RPR_LAST")) { throw new SemanticException( String.format( - "Cannot nest %s pattern navigation function inside %s pattern navigation function", - nestedNavigationFunctions.get(0).getName(), name)); + DataNodeQueryMessages + .CANNOT_NEST_S_PATTERN_NAVIGATION_FUNCTION_INSIDE_S_PATTERN_NAVIGATION_FUNCTION, + nestedNavigationFunctions.get(0).getName(), + name)); } if (nestedNavigationFunctions.size() > 1) { throw new SemanticException( String.format( - "Cannot nest multiple pattern navigation functions inside %s pattern navigation function", + DataNodeQueryMessages + .CANNOT_NEST_MULTIPLE_PATTERN_NAVIGATION_FUNCTIONS_INSIDE_S_PATTERN_NAVIGATION_FUNCTION, name)); } FunctionCall nested = getOnlyElement(nestedNavigationFunctions); @@ -1471,12 +1546,14 @@ private void validateNavigationNesting(FunctionCall node) { if (nestedName.equalsIgnoreCase("PREV") || nestedName.equalsIgnoreCase("NEXT")) { throw new SemanticException( String.format( - "Cannot nest %s pattern navigation function inside %s pattern navigation function", - nestedName, name)); + DataNodeQueryMessages + .CANNOT_NEST_S_PATTERN_NAVIGATION_FUNCTION_INSIDE_S_PATTERN_NAVIGATION_FUNCTION, + nestedName, + name)); } if (nested != node.getArguments().get(0)) { throw new SemanticException( - "Immediate nesting is required for pattern navigation functions"); + DataNodeQueryMessages.IMMEDIATE_NESTING_IS_REQUIRED_FOR_PATTERN_NAVIGATION_FUNCTIONS); } } } @@ -1542,7 +1619,9 @@ private ArgumentLabel validateLabelConsistency(FunctionCall node, int argumentIn if (allLabels.size() > 1) { String name = node.getName().getSuffix(); throw new SemanticException( - String.format("All labels and classifiers inside the call to '%s' must match", name)); + String.format( + DataNodeQueryMessages.ALL_LABELS_AND_CLASSIFIERS_INSIDE_THE_CALL_TO_S_MUST_MATCH, + name)); } Optional label = Iterables.getOnlyElement(allLabels); @@ -1563,7 +1642,8 @@ private Set analyzeAggregationLabels(FunctionCall node) { } if (argumentLabels.size() > 1) { throw new SemanticException( - "All aggregate function arguments must apply to rows matched with the same label"); + DataNodeQueryMessages + .ALL_AGGREGATE_FUNCTION_ARGUMENTS_MUST_APPLY_TO_ROWS_MATCHED_WITH_THE_SAME_LABEL); } return argumentLabels.stream() @@ -1610,8 +1690,9 @@ private void checkNoNestedAggregations(FunctionCall node) { aggregation -> { throw new SemanticException( String.format( - "Cannot nest %s aggregate function inside %s function", - aggregation.getName(), node.getName())); + DataNodeQueryMessages.CANNOT_NEST_S_AGGREGATE_FUNCTION_INSIDE_S_FUNCTION, + aggregation.getName(), + node.getName())); }); } @@ -1623,8 +1704,10 @@ private void checkNoNestedNavigations(FunctionCall node) { navigation -> { throw new SemanticException( String.format( - "Cannot nest %s pattern navigation function inside %s function", - navigation.getName().getSuffix(), node.getName())); + DataNodeQueryMessages + .CANNOT_NEST_S_PATTERN_NAVIGATION_FUNCTION_INSIDE_S_FUNCTION, + navigation.getName().getSuffix(), + node.getName())); }); } @@ -1663,8 +1746,9 @@ public Type visitParameter(Parameter node, StackableAstVisitorContext c if (node.getId() >= parameters.size()) { throw new SemanticException( String.format( - "Invalid parameter index %s, max value is %s", - node.getId(), parameters.size() - 1)); + DataNodeQueryMessages.INVALID_PARAMETER_INDEX_S_MAX_VALUE_IS_S, + node.getId(), + parameters.size() - 1)); } Expression providedValue = parameters.get(NodeRef.of(node)); @@ -1702,12 +1786,20 @@ public Type visitBetweenPredicate( if (!isTwoTypeComparable(Arrays.asList(valueType, minType)) || !isTwoTypeComparable(Arrays.asList(valueType, maxType))) { throw new SemanticException( - String.format("Cannot check if %s is BETWEEN %s and %s", valueType, minType, maxType)); + String.format( + DataNodeQueryMessages.CANNOT_CHECK_IF_S_IS_BETWEEN_S_AND_S, + valueType, + minType, + maxType)); } if (!valueType.isOrderable()) { throw new SemanticException( - String.format("Cannot check if %s is BETWEEN %s and %s", valueType, minType, maxType)); + String.format( + DataNodeQueryMessages.CANNOT_CHECK_IF_S_IS_BETWEEN_S_AND_S, + valueType, + minType, + maxType)); } return setExpressionType(node, BOOLEAN); @@ -1782,8 +1874,10 @@ public Type visitInPredicate(InPredicate node, StackableAstVisitorContext new SemanticException( - "Window frame of type RANGE PRECEDING or FOLLOWING requires ORDER BY")); + DataNodeQueryMessages + .WINDOW_FRAME_OF_TYPE_RANGE_PRECEDING_OR_FOLLOWING_REQUIRES_ORDER_BY)); if (orderBy.getSortItems().size() != 1) { throw new SemanticException( String.format( - "Window frame of type RANGE PRECEDING or FOLLOWING requires single sort item in ORDER BY (actual: %s)", + DataNodeQueryMessages + .WINDOW_FRAME_OF_TYPE_RANGE_PRECEDING_OR_FOLLOWING_REQUIRES_SINGLE_SORT_ITEM_IN_ORDER_BY, orderBy.getSortItems().size())); } Expression sortKey = Iterables.getOnlyElement(orderBy.getSortItems()).getSortKey(); @@ -2038,7 +2144,8 @@ private void analyzeFrameRangeOffset( if (!isNumericType(sortKeyType)) { throw new SemanticException( String.format( - "Window frame of type RANGE PRECEDING or FOLLOWING requires that sort item type be numeric, datetime or interval (actual: %s)", + DataNodeQueryMessages + .WINDOW_FRAME_OF_TYPE_RANGE_PRECEDING_OR_FOLLOWING_REQUIRES_THAT_SORT_ITEM_TYPE_BE, sortKeyType)); } @@ -2048,8 +2155,10 @@ private void analyzeFrameRangeOffset( if (!isNumericType(offsetValueType)) { throw new SemanticException( String.format( - "Window frame RANGE value type (%s) not compatible with sort item type (%s)", - offsetValueType, sortKeyType)); + DataNodeQueryMessages + .WINDOW_FRAME_RANGE_VALUE_TYPE_S_NOT_COMPATIBLE_WITH_SORT_ITEM_TYPE_S, + offsetValueType, + sortKeyType)); } } } @@ -2102,7 +2211,8 @@ public Type visitQuantifiedComparisonExpression( if (!comparisonType.isOrderable()) { throw new SemanticException( String.format( - "Type [%s] must be orderable in order to be used in quantified comparison", + DataNodeQueryMessages + .TYPE_S_MUST_BE_ORDERABLE_IN_ORDER_TO_BE_USED_IN_QUANTIFIED_COMPARISON, comparisonType)); } break; @@ -2111,13 +2221,16 @@ public Type visitQuantifiedComparisonExpression( if (!comparisonType.isComparable()) { throw new SemanticException( String.format( - "Type [%s] must be comparable in order to be used in quantified comparison", + DataNodeQueryMessages + .TYPE_S_MUST_BE_COMPARABLE_IN_ORDER_TO_BE_USED_IN_QUANTIFIED_COMPARISON, comparisonType)); } break; default: throw new IllegalStateException( - String.format("Unexpected comparison type: %s", node.getOperator())); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNEXPECTED_COMPARISON_TYPE_S_5D101FCB, + node.getOperator())); } return setExpressionType(node, BOOLEAN); @@ -2133,13 +2246,13 @@ public Type visitFieldReference( @Override public Type visitExpression(Expression node, StackableAstVisitorContext context) { throw new SemanticException( - String.format("not yet implemented: %s", node.getClass().getName())); + String.format(DataNodeQueryMessages.NOT_YET_IMPLEMENTED_S, node.getClass().getName())); } @Override public Type visitNode(Node node, StackableAstVisitorContext context) { throw new SemanticException( - String.format("not yet implemented: %s", node.getClass().getName())); + String.format(DataNodeQueryMessages.NOT_YET_IMPLEMENTED_S, node.getClass().getName())); } @Override @@ -2173,7 +2286,10 @@ private void coerceType( // if (!typeCoercion.canCoerce(actualType, expectedType)) { throw new SemanticException( String.format( - "%s must evaluate to a %s (actual: %s)", message, expectedType, actualType)); + DataNodeQueryMessages.S_MUST_EVALUATE_TO_A_S_ACTUAL_S, + message, + expectedType, + actualType)); // } // addOrReplaceExpressionCoercion(expression, actualType, expectedType); } @@ -2235,8 +2351,12 @@ private Type coerceToSingleType( if (!isTwoTypeComparable(Arrays.asList(superType, type))) { throw new SemanticException( String.format( - "%s must be the same type or coercible to a common type. Cannot find common type between %s and %s, all types (without duplicates): %s", - description, superType, type, typeExpressions.keySet())); + DataNodeQueryMessages + .S_MUST_BE_THE_SAME_TYPE_OR_COERCIBLE_TO_A_COMMON_TYPE_CANNOT_FIND_COMMON_TYPE_BETWEEN_S, + description, + superType, + type, + typeExpressions.keySet())); } } // Optional newSuperType = typeCoercion.getCommonSuperType(superType, type); @@ -2311,12 +2431,17 @@ private Context( List functionInputTypes, Optional patternRecognitionContext, CorrelationSupport correlationSupport) { - this.scope = requireNonNull(scope, "scope is null"); + this.scope = requireNonNull(scope, DataNodeQueryMessages.EXCEPTION_SCOPE_IS_NULL_4F364BA2); this.functionInputTypes = functionInputTypes; // this.fieldToLambdaArgumentDeclaration = fieldToLambdaArgumentDeclaration; this.patternRecognitionContext = - requireNonNull(patternRecognitionContext, "patternRecognitionContext is null"); - this.correlationSupport = requireNonNull(correlationSupport, "correlationSupport is null"); + requireNonNull( + patternRecognitionContext, + DataNodeQueryMessages.EXCEPTION_PATTERNRECOGNITIONCONTEXT_IS_NULL_59C665F1); + this.correlationSupport = + requireNonNull( + correlationSupport, + DataNodeQueryMessages.EXCEPTION_CORRELATIONSUPPORT_IS_NULL_E0D669BF); } public static Context notInLambda(Scope scope, CorrelationSupport correlationSupport) { @@ -2326,7 +2451,9 @@ public static Context notInLambda(Scope scope, CorrelationSupport correlationSup public Context expectingLambda(List functionInputTypes) { return new Context( scope, - requireNonNull(functionInputTypes, "functionInputTypes is null"), + requireNonNull( + functionInputTypes, + DataNodeQueryMessages.EXCEPTION_FUNCTIONINPUTTYPES_IS_NULL_3030658F), Optional.empty(), correlationSupport); } @@ -2446,17 +2573,20 @@ public static boolean isPatternRecognitionFunction(FunctionCall node) { QualifiedName qualifiedName = node.getName(); if (qualifiedName.getParts().size() > 1) { throw new SemanticException( - "Pattern recognition function name must not be qualified: " + qualifiedName); + DataNodeQueryMessages.PATTERN_RECOGNITION_FUNCTION_NAME_MUST_NOT_BE_QUALIFIED + + qualifiedName); } Identifier identifier = qualifiedName.getOriginalParts().get(0); if (identifier.isDelimited()) { throw new SemanticException( - "Pattern recognition function name must not be delimited: " + identifier.getValue()); + DataNodeQueryMessages.PATTERN_RECOGNITION_FUNCTION_NAME_MUST_NOT_BE_DELIMITED + + identifier.getValue()); } String name = identifier.getValue().toUpperCase(ENGLISH); if (name.equals("LAST") || name.equals("FIRST")) { throw new SemanticException( - "Pattern recognition function names cannot be LAST or FIRST, use RPR_LAST or RPR_FIRST instead."); + DataNodeQueryMessages + .PATTERN_RECOGNITION_FUNCTION_NAMES_CANNOT_BE_LAST_OR_FIRST_USE_RPR_LAST_OR_RPR_FIRST); } else if (!(name.equals("RPR_FIRST") || name.equals("RPR_LAST") || name.equals("PREV") @@ -2708,7 +2838,10 @@ public static class LabelPrefixedReference { private final Optional column; public LabelPrefixedReference(String label, Identifier column) { - this(label, Optional.of(requireNonNull(column, "column is null"))); + this( + label, + Optional.of( + requireNonNull(column, DataNodeQueryMessages.EXCEPTION_COLUMN_IS_NULL_0C404041))); } public LabelPrefixedReference(String label) { @@ -2716,8 +2849,8 @@ public LabelPrefixedReference(String label) { } private LabelPrefixedReference(String label, Optional column) { - this.label = requireNonNull(label, "label is null"); - this.column = requireNonNull(column, "column is null"); + this.label = requireNonNull(label, DataNodeQueryMessages.EXCEPTION_LABEL_IS_NULL_B21FE26B); + this.column = requireNonNull(column, DataNodeQueryMessages.EXCEPTION_COLUMN_IS_NULL_0C404041); } public String getLabel() { @@ -2755,7 +2888,7 @@ public boolean hasLabel() { } public Optional getLabel() { - checkState(hasLabel, "no label available"); + checkState(hasLabel, DataNodeQueryMessages.EXCEPTION_NO_LABEL_AVAILABLE_8508CE32); return label; } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/ExpressionTreeUtils.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/ExpressionTreeUtils.java index 2abf38d60aec3..ee1343b35ab72 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/ExpressionTreeUtils.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/ExpressionTreeUtils.java @@ -27,6 +27,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.QualifiedName; import org.apache.iotdb.commons.queryengine.plan.udf.TableUDFUtils; import org.apache.iotdb.commons.udf.builtin.relational.TableBuiltinAggregationFunction; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.DefaultExpressionTraversalVisitor; import com.google.common.collect.ImmutableList; @@ -53,9 +54,9 @@ public static List extractExpressions( private static List extractExpressions( Iterable nodes, Class clazz, Predicate predicate) { - requireNonNull(nodes, "nodes is null"); - requireNonNull(clazz, "clazz is null"); - requireNonNull(predicate, "predicate is null"); + requireNonNull(nodes, DataNodeQueryMessages.EXCEPTION_NODES_IS_NULL_7AB3C1D7); + requireNonNull(clazz, DataNodeQueryMessages.EXCEPTION_CLAZZ_IS_NULL_7F710E3E); + requireNonNull(predicate, DataNodeQueryMessages.EXCEPTION_PREDICATE_IS_NULL_22E687A9); return stream(nodes) .flatMap(node -> linearizeNodes(node).stream()) diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/Field.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/Field.java index 787c2ecca602f..532dc30c65194 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/Field.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/Field.java @@ -22,6 +22,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.metadata.QualifiedObjectName; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.QualifiedName; import org.apache.iotdb.commons.schema.table.column.TsTableColumnCategory; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.tsfile.read.common.type.Type; @@ -42,8 +43,8 @@ public class Field { private final boolean aliased; public static Field newUnqualified(String name, Type type, TsTableColumnCategory columnCategory) { - requireNonNull(name, "name is null"); - requireNonNull(type, "type is null"); + requireNonNull(name, DataNodeQueryMessages.EXCEPTION_NAME_IS_NULL_C8B35959); + requireNonNull(type, DataNodeQueryMessages.EXCEPTION_TYPE_IS_NULL_16A3D3EB); return new Field( Optional.empty(), @@ -58,8 +59,8 @@ public static Field newUnqualified(String name, Type type, TsTableColumnCategory public static Field newUnqualified( Optional name, Type type, TsTableColumnCategory columnCategory) { - requireNonNull(name, "name is null"); - requireNonNull(type, "type is null"); + requireNonNull(name, DataNodeQueryMessages.EXCEPTION_NAME_IS_NULL_C8B35959); + requireNonNull(type, DataNodeQueryMessages.EXCEPTION_TYPE_IS_NULL_16A3D3EB); return new Field( Optional.empty(), @@ -79,9 +80,9 @@ public static Field newUnqualified( Optional originTable, Optional originColumn, boolean aliased) { - requireNonNull(name, "name is null"); - requireNonNull(type, "type is null"); - requireNonNull(originTable, "originTable is null"); + requireNonNull(name, DataNodeQueryMessages.EXCEPTION_NAME_IS_NULL_C8B35959); + requireNonNull(type, DataNodeQueryMessages.EXCEPTION_TYPE_IS_NULL_16A3D3EB); + requireNonNull(originTable, DataNodeQueryMessages.EXCEPTION_ORIGINTABLE_IS_NULL_18AC52C3); return new Field( Optional.empty(), name, type, columnCategory, false, originTable, originColumn, aliased); @@ -96,10 +97,10 @@ public static Field newQualified( Optional originTable, Optional originColumn, boolean aliased) { - requireNonNull(relationAlias, "relationAlias is null"); - requireNonNull(name, "name is null"); - requireNonNull(type, "type is null"); - requireNonNull(originTable, "originTable is null"); + requireNonNull(relationAlias, DataNodeQueryMessages.EXCEPTION_RELATIONALIAS_IS_NULL_C363AD25); + requireNonNull(name, DataNodeQueryMessages.EXCEPTION_NAME_IS_NULL_C8B35959); + requireNonNull(type, DataNodeQueryMessages.EXCEPTION_TYPE_IS_NULL_16A3D3EB); + requireNonNull(originTable, DataNodeQueryMessages.EXCEPTION_ORIGINTABLE_IS_NULL_18AC52C3); return new Field( Optional.of(relationAlias), @@ -121,11 +122,12 @@ public Field( Optional originTable, Optional originColumnName, boolean aliased) { - requireNonNull(relationAlias, "relationAlias is null"); - requireNonNull(name, "name is null"); - requireNonNull(type, "type is null"); - requireNonNull(originTable, "originTable is null"); - requireNonNull(originColumnName, "originColumnName is null"); + requireNonNull(relationAlias, DataNodeQueryMessages.EXCEPTION_RELATIONALIAS_IS_NULL_C363AD25); + requireNonNull(name, DataNodeQueryMessages.EXCEPTION_NAME_IS_NULL_C8B35959); + requireNonNull(type, DataNodeQueryMessages.EXCEPTION_TYPE_IS_NULL_16A3D3EB); + requireNonNull(originTable, DataNodeQueryMessages.EXCEPTION_ORIGINTABLE_IS_NULL_18AC52C3); + requireNonNull( + originColumnName, DataNodeQueryMessages.EXCEPTION_ORIGINCOLUMNNAME_IS_NULL_98607162); this.relationAlias = relationAlias; this.name = name; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/FieldId.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/FieldId.java index 93e0150647719..6b19e6b4abc36 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/FieldId.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/FieldId.java @@ -19,6 +19,8 @@ package org.apache.iotdb.db.queryengine.plan.relational.analyzer; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; + import java.util.Objects; import static com.google.common.base.MoreObjects.toStringHelper; @@ -27,7 +29,7 @@ public final class FieldId { public static FieldId from(ResolvedField field) { - requireNonNull(field, "field is null"); + requireNonNull(field, DataNodeQueryMessages.EXCEPTION_FIELD_IS_NULL_80E8CE23); Scope sourceScope = field.getScope(); RelationType relationType = sourceScope.getRelationType(); @@ -38,9 +40,14 @@ public static FieldId from(ResolvedField field) { private final int fieldIndex; public FieldId(RelationId relationId, int fieldIndex) { - this.relationId = requireNonNull(relationId, "relationId is null"); + this.relationId = + requireNonNull(relationId, DataNodeQueryMessages.EXCEPTION_RELATIONID_IS_NULL_C4683108); - checkArgument(fieldIndex >= 0, "fieldIndex must be non-negative, got: %s", fieldIndex); + checkArgument( + fieldIndex >= 0, + DataNodeQueryMessages + .EXCEPTION_FIELDINDEX_MUST_BE_NON_MINUS_NEGATIVE_COMMA_GOT_COLON_ARG_09C2C06D, + fieldIndex); this.fieldIndex = fieldIndex; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/PatternRecognitionAnalysis.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/PatternRecognitionAnalysis.java index c9dec8cb9cb19..e539607413e0b 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/PatternRecognitionAnalysis.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/PatternRecognitionAnalysis.java @@ -24,6 +24,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Expression; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.FunctionCall; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.RangeQuantifier; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; @@ -45,7 +46,8 @@ public PatternRecognitionAnalysis( Set allLabels, Set undefinedLabels, Map, Analysis.Range> ranges) { - this.allLabels = requireNonNull(allLabels, "allLabels is null"); + this.allLabels = + requireNonNull(allLabels, DataNodeQueryMessages.EXCEPTION_ALLLABELS_IS_NULL_9F240FB5); this.undefinedLabels = ImmutableSet.copyOf(undefinedLabels); this.ranges = ImmutableMap.copyOf(ranges); } @@ -94,8 +96,10 @@ public static class PatternFunctionAnalysis { private final Descriptor descriptor; public PatternFunctionAnalysis(Expression expression, Descriptor descriptor) { - this.expression = requireNonNull(expression, "expression is null"); - this.descriptor = requireNonNull(descriptor, "descriptor is null"); + this.expression = + requireNonNull(expression, DataNodeQueryMessages.EXCEPTION_EXPRESSION_IS_NULL_16C079B5); + this.descriptor = + requireNonNull(descriptor, DataNodeQueryMessages.EXCEPTION_DESCRIPTOR_IS_NULL_E6EC1F14); } public Expression getExpression() { @@ -153,12 +157,18 @@ public AggregationDescriptor( Set labels, List matchNumberCalls, List classifierCalls) { - this.function = requireNonNull(function, "function is null"); - this.arguments = requireNonNull(arguments, "arguments is null"); - this.mode = requireNonNull(mode, "mode is null"); - this.labels = requireNonNull(labels, "labels is null"); - this.matchNumberCalls = requireNonNull(matchNumberCalls, "matchNumberCalls is null"); - this.classifierCalls = requireNonNull(classifierCalls, "classifierCalls is null"); + this.function = + requireNonNull(function, DataNodeQueryMessages.EXCEPTION_FUNCTION_IS_NULL_E0FA4B62); + this.arguments = + requireNonNull(arguments, DataNodeQueryMessages.EXCEPTION_ARGUMENTS_IS_NULL_B1F6D4F2); + this.mode = requireNonNull(mode, DataNodeQueryMessages.EXCEPTION_MODE_IS_NULL_54A948DB); + this.labels = requireNonNull(labels, DataNodeQueryMessages.EXCEPTION_LABELS_IS_NULL_F4FBBECE); + this.matchNumberCalls = + requireNonNull( + matchNumberCalls, DataNodeQueryMessages.EXCEPTION_MATCHNUMBERCALLS_IS_NULL_EC08D0D0); + this.classifierCalls = + requireNonNull( + classifierCalls, DataNodeQueryMessages.EXCEPTION_CLASSIFIERCALLS_IS_NULL_92AA8B77); } public ResolvedFunction getFunction() { @@ -229,8 +239,9 @@ public static class ScalarInputDescriptor implements Descriptor { private final Navigation navigation; public ScalarInputDescriptor(Optional label, Navigation navigation) { - this.label = requireNonNull(label, "label is null"); - this.navigation = requireNonNull(navigation, "navigation is null"); + this.label = requireNonNull(label, DataNodeQueryMessages.EXCEPTION_LABEL_IS_NULL_B21FE26B); + this.navigation = + requireNonNull(navigation, DataNodeQueryMessages.EXCEPTION_NAVIGATION_IS_NULL_3D0CBEE1); } public Optional getLabel() { @@ -265,8 +276,9 @@ public static class ClassifierDescriptor implements Descriptor { private final Navigation navigation; public ClassifierDescriptor(Optional label, Navigation navigation) { - this.label = requireNonNull(label, "label is null"); - this.navigation = requireNonNull(navigation, "navigation is null"); + this.label = requireNonNull(label, DataNodeQueryMessages.EXCEPTION_LABEL_IS_NULL_B21FE26B); + this.navigation = + requireNonNull(navigation, DataNodeQueryMessages.EXCEPTION_NAVIGATION_IS_NULL_3D0CBEE1); } public Optional getLabel() { @@ -314,8 +326,8 @@ public static class Navigation { public Navigation( NavigationAnchor anchor, NavigationMode mode, int logicalOffset, int physicalOffset) { - this.anchor = requireNonNull(anchor, "anchor is null"); - this.mode = requireNonNull(mode, "mode is null"); + this.anchor = requireNonNull(anchor, DataNodeQueryMessages.EXCEPTION_ANCHOR_IS_NULL_4AF93E60); + this.mode = requireNonNull(mode, DataNodeQueryMessages.EXCEPTION_MODE_IS_NULL_54A948DB); this.logicalOffset = logicalOffset; this.physicalOffset = physicalOffset; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/PatternRecognitionAnalyzer.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/PatternRecognitionAnalyzer.java index eee02db217c00..0cd76b2cd2e0f 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/PatternRecognitionAnalyzer.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/PatternRecognitionAnalyzer.java @@ -34,6 +34,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.SkipTo; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.SubsetDefinition; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.VariableDefinition; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.relational.analyzer.Analysis.Range; import com.google.common.collect.ImmutableList; @@ -81,17 +82,22 @@ public static PatternRecognitionAnalysis analyze( if (primaryLabels.contains(label)) { throw new SemanticException( String.format( - "union pattern variable name: %s is a duplicate of primary pattern variable name", + DataNodeQueryMessages + .UNION_PATTERN_VARIABLE_NAME_S_IS_A_DUPLICATE_OF_PRIMARY_PATTERN_VARIABLE_NAME, subset.getName())); } if (!unique.add(label)) { throw new SemanticException( - String.format("union pattern variable name: %s is declared twice", subset.getName())); + String.format( + DataNodeQueryMessages.UNION_PATTERN_VARIABLE_NAME_S_IS_DECLARED_TWICE, + subset.getName())); } for (Identifier element : subset.getIdentifiers()) { if (!primaryLabels.contains(label(element))) { throw new SemanticException( - String.format("subset element: %s is not a primary pattern variable", element)); + String.format( + DataNodeQueryMessages.SUBSET_ELEMENT_S_IS_NOT_A_PRIMARY_PATTERN_VARIABLE, + element)); } } } @@ -103,11 +109,14 @@ public static PatternRecognitionAnalysis analyze( if (!primaryLabels.contains(label)) { throw new SemanticException( String.format( - "defined variable: %s is not a primary pattern variable", definition.getName())); + DataNodeQueryMessages.DEFINED_VARIABLE_S_IS_NOT_A_PRIMARY_PATTERN_VARIABLE, + definition.getName())); } if (!unique.add(label)) { throw new SemanticException( - String.format("pattern variable with name: %s is defined twice", definition.getName())); + String.format( + DataNodeQueryMessages.PATTERN_VARIABLE_WITH_NAME_S_IS_DEFINED_TWICE, + definition.getName())); } // DEFINE clause only supports RUNNING semantics which is default Expression expression = definition.getExpression(); @@ -122,7 +131,8 @@ public static PatternRecognitionAnalysis analyze( .ifPresent( functionCall -> { throw new SemanticException( - String.format("FINAL semantics is not supported in DEFINE clause")); + String.format( + DataNodeQueryMessages.FINAL_SEMANTICS_IS_NOT_SUPPORTED_IN_DEFINE_CLAUSE)); }); } // record primary labels without definitions. they are implicitly associated with `true` @@ -141,11 +151,13 @@ public static PatternRecognitionAnalysis analyze( value -> { if (value < 0) { throw new SemanticException( - "Pattern quantifier lower bound must be greater than or equal to 0"); + DataNodeQueryMessages + .PATTERN_QUANTIFIER_LOWER_BOUND_MUST_BE_GREATER_THAN_OR_EQUAL_TO_0); } if (value > Integer.MAX_VALUE) { throw new SemanticException( - "Pattern quantifier lower bound must not exceed " + Integer.MAX_VALUE); + DataNodeQueryMessages.PATTERN_QUANTIFIER_LOWER_BOUND_MUST_NOT_EXCEED + + Integer.MAX_VALUE); } }); Optional atMost = quantifier.getAtMost().map(LongLiteral::getParsedValue); @@ -153,17 +165,20 @@ public static PatternRecognitionAnalysis analyze( value -> { if (value < 1) { throw new SemanticException( - "Pattern quantifier upper bound must be greater than or equal to 1"); + DataNodeQueryMessages + .PATTERN_QUANTIFIER_UPPER_BOUND_MUST_BE_GREATER_THAN_OR_EQUAL_TO_1); } if (value > Integer.MAX_VALUE) { throw new SemanticException( - "Pattern quantifier upper bound must not exceed " + Integer.MAX_VALUE); + DataNodeQueryMessages.PATTERN_QUANTIFIER_UPPER_BOUND_MUST_NOT_EXCEED + + Integer.MAX_VALUE); } }); if (atLeast.isPresent() && atMost.isPresent()) { if (atLeast.get() > atMost.get()) { throw new SemanticException( - "Pattern quantifier lower bound must not exceed upper bound"); + DataNodeQueryMessages + .PATTERN_QUANTIFIER_LOWER_BOUND_MUST_NOT_EXCEED_UPPER_BOUND); } } ranges.put( @@ -181,7 +196,9 @@ public static PatternRecognitionAnalysis analyze( String label = label(identifier); if (!allLabels.contains(label)) { throw new SemanticException( - String.format("%s is not a primary or union pattern variable", identifier)); + String.format( + DataNodeQueryMessages.S_IS_NOT_A_PRIMARY_OR_UNION_PATTERN_VARIABLE, + identifier)); } }); @@ -201,7 +218,8 @@ public static PatternRecognitionAnalysis analyze( .ifPresent( nested -> { throw new SemanticException( - "nested row pattern recognition in row pattern recognition"); + DataNodeQueryMessages + .NESTED_ROW_PATTERN_RECOGNITION_IN_ROW_PATTERN_RECOGNITION); })); return new PatternRecognitionAnalysis(allLabels, undefinedLabels, ranges.buildOrThrow()); @@ -218,7 +236,8 @@ public static void validatePatternExclusions( .ifPresent( exclusion -> { throw new SemanticException( - "Pattern exclusion syntax is not allowed when ALL ROWS PER MATCH WITH UNMATCHED ROWS is specified"); + DataNodeQueryMessages + .PATTERN_EXCLUSION_SYNTAX_IS_NOT_ALLOWED_WHEN_ALL_ROWS_PER_MATCH_WITH_UNMATCHED_ROWS_IS); }); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/RelationType.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/RelationType.java index 5fce0ad2af1cb..f346b429a986e 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/RelationType.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/RelationType.java @@ -20,6 +20,7 @@ package org.apache.iotdb.db.queryengine.plan.relational.analyzer; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.QualifiedName; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; @@ -45,7 +46,7 @@ public RelationType(Field... fields) { } public RelationType(List fields) { - requireNonNull(fields, "fields is null"); + requireNonNull(fields, DataNodeQueryMessages.EXCEPTION_FIELDS_IS_NULL_DE209DBF); this.allFields = ImmutableList.copyOf(fields); this.visibleFields = fields.stream().filter(field -> !field.isHidden()).collect(toImmutableList()); @@ -64,9 +65,12 @@ public RelationType(List fields) { * @throws IllegalArgumentException when field is not found */ public int indexOf(Field field) { - requireNonNull(field, "field cannot be null"); + requireNonNull(field, DataNodeQueryMessages.EXCEPTION_FIELD_CANNOT_BE_NULL_09155004); Integer index = fieldIndexes.get(field); - checkArgument(index != null, "Field '%s' not found", field); + checkArgument( + index != null, + DataNodeQueryMessages.EXCEPTION_FIELD_QUOTE_ARG_QUOTE_NOT_FOUND_1BC2FDED, + field); return index; } @@ -132,7 +136,7 @@ public RelationType withAlias(String relationAlias, List columnAliases) if (columnAliases != null) { checkArgument( columnAliases.size() == visibleFields.size(), - "Column alias list has %s entries but '%s' has %s columns available", + DataNodeQueryMessages.COLUMN_ALIAS_LIST_HAS_S_ENTRIES_BUT_S_HAS_S_COLUMNS_AVAILABLE, columnAliases.size(), relationAlias, visibleFields.size()); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/ResolvedField.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/ResolvedField.java index 9639e0801bab1..bf07893a85fef 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/ResolvedField.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/ResolvedField.java @@ -20,6 +20,7 @@ package org.apache.iotdb.db.queryengine.plan.relational.analyzer; import org.apache.iotdb.commons.schema.table.column.TsTableColumnCategory; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import com.google.errorprone.annotations.Immutable; import org.apache.tsfile.read.common.type.Type; @@ -36,8 +37,8 @@ public class ResolvedField { public ResolvedField( Scope scope, Field field, int hierarchyFieldIndex, int relationFieldIndex, boolean local) { - this.scope = requireNonNull(scope, "scope is null"); - this.field = requireNonNull(field, "field is null"); + this.scope = requireNonNull(scope, DataNodeQueryMessages.EXCEPTION_SCOPE_IS_NULL_4F364BA2); + this.field = requireNonNull(field, DataNodeQueryMessages.EXCEPTION_FIELD_IS_NULL_80E8CE23); this.hierarchyFieldIndex = hierarchyFieldIndex; this.relationFieldIndex = relationFieldIndex; this.local = local; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/Scope.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/Scope.java index 9fa16ec93a55d..716d8ab8e48ed 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/Scope.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/Scope.java @@ -75,12 +75,19 @@ private Scope( RelationType relation, Map namedQueries, List tables) { - this.parent = requireNonNull(parent, "parent is null"); - this.relationId = requireNonNull(relationId, "relationId is null"); + this.parent = requireNonNull(parent, DataNodeQueryMessages.EXCEPTION_PARENT_IS_NULL_ED81BAD8); + this.relationId = + requireNonNull(relationId, DataNodeQueryMessages.EXCEPTION_RELATIONID_IS_NULL_C4683108); this.queryBoundary = queryBoundary; - this.relation = requireNonNull(relation, "relation is null"); - this.namedQueries = ImmutableMap.copyOf(requireNonNull(namedQueries, "namedQueries is null")); - this.tables = new ArrayList<>(requireNonNull(tables, "tables is null")); + this.relation = + requireNonNull(relation, DataNodeQueryMessages.EXCEPTION_RELATION_IS_NULL_890596ED); + this.namedQueries = + ImmutableMap.copyOf( + requireNonNull( + namedQueries, DataNodeQueryMessages.EXCEPTION_NAMEDQUERIES_IS_NULL_AFDE9A4A)); + this.tables = + new ArrayList<>( + requireNonNull(tables, DataNodeQueryMessages.EXCEPTION_TABLES_IS_NULL_2012309E)); } public void addTable(Table table) { @@ -257,7 +264,7 @@ public ResolvedField resolveField(Expression expression, QualifiedName name) { () -> new SemanticException( new IoTDBException( - String.format("Column '%s' cannot be resolved", name), + String.format(DataNodeQueryMessages.COLUMN_S_CANNOT_BE_RESOLVED, name), TSStatusCode.COLUMN_NOT_EXISTS.getStatusCode()))); } @@ -366,26 +373,34 @@ public Builder like(Scope other) { } public Builder withRelationType(RelationId relationId, RelationType relationType) { - this.relationId = requireNonNull(relationId, "relationId is null"); - this.relationType = requireNonNull(relationType, "relationType is null"); + this.relationId = + requireNonNull(relationId, DataNodeQueryMessages.EXCEPTION_RELATIONID_IS_NULL_C4683108); + this.relationType = + requireNonNull( + relationType, DataNodeQueryMessages.EXCEPTION_RELATIONTYPE_IS_NULL_62DDF9C1); return this; } public Builder withParent(Scope parent) { - checkArgument(!this.parent.isPresent(), "parent is already set"); + checkArgument( + !this.parent.isPresent(), DataNodeQueryMessages.EXCEPTION_PARENT_IS_ALREADY_SET_835DE0A5); this.parent = Optional.of(parent); return this; } public Builder withOuterQueryParent(Scope parent) { - checkArgument(!this.parent.isPresent(), "parent is already set"); + checkArgument( + !this.parent.isPresent(), DataNodeQueryMessages.EXCEPTION_PARENT_IS_ALREADY_SET_835DE0A5); this.parent = Optional.of(parent); this.queryBoundary = true; return this; } public Builder withNamedQuery(String name, WithQuery withQuery) { - checkArgument(!containsNamedQuery(name), "Query '%s' is already added", name); + checkArgument( + !containsNamedQuery(name), + DataNodeQueryMessages.EXCEPTION_QUERY_QUOTE_ARG_QUOTE_IS_ALREADY_ADDED_F3D47DBD, + name); namedQueries.put(name, withQuery); return this; } @@ -411,11 +426,18 @@ public static class AsteriskedIdentifierChainBasis { public AsteriskedIdentifierChainBasis( BasisType basisType, Optional scope, Optional relationType) { - this.basisType = requireNonNull(basisType, "basisType is null"); - this.scope = requireNonNull(scope, "scope is null"); - this.relationType = requireNonNull(relationType, "relationType is null"); - checkArgument(basisType == FIELD || scope.isPresent(), "missing scope"); - checkArgument(basisType == FIELD || relationType.isPresent(), "missing relationType"); + this.basisType = + requireNonNull(basisType, DataNodeQueryMessages.EXCEPTION_BASISTYPE_IS_NULL_33E4F842); + this.scope = requireNonNull(scope, DataNodeQueryMessages.EXCEPTION_SCOPE_IS_NULL_4F364BA2); + this.relationType = + requireNonNull( + relationType, DataNodeQueryMessages.EXCEPTION_RELATIONTYPE_IS_NULL_62DDF9C1); + checkArgument( + basisType == FIELD || scope.isPresent(), + DataNodeQueryMessages.EXCEPTION_MISSING_SCOPE_D573869F); + checkArgument( + basisType == FIELD || relationType.isPresent(), + DataNodeQueryMessages.EXCEPTION_MISSING_RELATIONTYPE_679D3CFA); } public BasisType getBasisType() { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/ScopeReferenceExtractor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/ScopeReferenceExtractor.java index 806b08e792ee4..11e88342f7b50 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/ScopeReferenceExtractor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/ScopeReferenceExtractor.java @@ -22,6 +22,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.analyzer.NodeRef; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Expression; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Node; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import java.util.Map; import java.util.Objects; @@ -51,7 +52,7 @@ public static Stream getReferencesToScope(Node node, Analysis analys private static boolean isReferenceToScope( Expression node, Scope scope, Map, ResolvedField> columnReferences) { ResolvedField field = columnReferences.get(NodeRef.of(node)); - requireNonNull(field, () -> "No Field for " + node); + requireNonNull(field, () -> DataNodeQueryMessages.EXCEPTION_NO_FIELD_FOR_97419CB1 + node); return isFieldFromScope(field.getFieldId(), scope); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/StatementAnalyzer.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/StatementAnalyzer.java index 4ff58026a94d1..c927cc2fefcc7 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/StatementAnalyzer.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/StatementAnalyzer.java @@ -445,9 +445,13 @@ private Visitor( final WarningCollector warningCollector, final Optional updateKind, final boolean isTopLevel) { - this.outerQueryScope = requireNonNull(outerQueryScope, "outerQueryScope is null"); - this.warningCollector = requireNonNull(warningCollector, "warningCollector is null"); - this.updateKind = requireNonNull(updateKind, "updateKind is null"); + this.outerQueryScope = + requireNonNull(outerQueryScope, QueryMessages.EXCEPTION_OUTERQUERYSCOPE_IS_NULL_D5305685); + this.warningCollector = + requireNonNull( + warningCollector, QueryMessages.EXCEPTION_WARNINGCOLLECTOR_IS_NULL_7A524A68); + this.updateKind = + requireNonNull(updateKind, QueryMessages.EXCEPTION_UPDATEKIND_IS_NULL_6CA83291); this.isTopLevel = isTopLevel; } @@ -467,12 +471,14 @@ public Scope process(Node node, final Optional scope) { } checkState( returnScope.getOuterQueryParent().equals(outerQueryScope), - "result scope should have outer query scope equal with parameter outer query scope"); + QueryMessages + .EXCEPTION_RESULT_SCOPE_SHOULD_HAVE_OUTER_QUERY_SCOPE_EQUAL_WITH_PARAMETER_OUTER_QUERY_SCOP_BE9CDB22); scope.ifPresent( value -> checkState( hasScopeAsLocalParent(returnScope, value), - "return scope should have context scope as one of its ancestors")); + QueryMessages + .EXCEPTION_RETURN_SCOPE_SHOULD_HAVE_CONTEXT_SCOPE_AS_ONE_OF_ITS_ANCESTORS_BBBFFE3E)); return returnScope; } @@ -628,7 +634,8 @@ public Scope visitUpdate(final Update node, final Optional context) { } if (attributeNames.contains(parsedColumn)) { throw new SemanticException( - "Update attribute shall specify a attribute only once."); + DataNodeQueryMessages + .UPDATE_ATTRIBUTE_SHALL_SPECIFY_A_ATTRIBUTE_ONLY_ONCE); } attributeNames.add((SymbolReference) parsedColumn); @@ -638,14 +645,14 @@ public Scope visitUpdate(final Update node, final Optional context) { analyzeAndRewriteExpression( translationMap, translationMap.getScope(), assignment.getValue()); } catch (final Exception e) { - if (e.getMessage().contains("cannot be resolved")) { + if (e.getMessage().contains(DataNodeQueryMessages.CANNOT_BE_RESOLVED)) { throw new SemanticException( new IoTDBException( e.getCause() .getMessage() .replace( - "cannot be resolved", - "is not an attribute or tag column"), + DataNodeQueryMessages.CANNOT_BE_RESOLVED, + DataNodeQueryMessages.IS_NOT_AN_ATTRIBUTE_OR_TAG_COLUMN), TSStatusCode.SEMANTIC_ERROR.getStatusCode())); } throw e; @@ -654,7 +661,8 @@ public Scope visitUpdate(final Update node, final Optional context) { && !expressionPair.getLeft().equals(BinaryType.TEXT) && !expressionPair.getLeft().equals(UnknownType.UNKNOWN)) { throw new SemanticException( - "Update's attribute value must be STRING, TEXT or null."); + DataNodeQueryMessages + .UPDATE_S_ATTRIBUTE_VALUE_MUST_BE_STRING_TEXT_OR_NULL); } return new UpdateAssignment(parsedColumn, expressionPair.getRight()); }) @@ -770,7 +778,7 @@ public Scope visitInsert(Insert insert, Optional scope) { if (column.getColumnCategory() == TsTableColumnCategory.TIME) { if (actualTimeColumnName != null) { throw new SemanticException( - "Multiple columns found with TIME category in table schema"); + DataNodeQueryMessages.MULTIPLE_COLUMNS_FOUND_WITH_TIME_CATEGORY_IN_TABLE_SCHEMA); } actualTimeColumnName = column.getName(); } @@ -792,11 +800,14 @@ public Scope visitInsert(Insert insert, Optional scope) { if (!tableColumns.contains(insertColumn)) { throw new SemanticException( String.format( - "Insert column name does not exist in target table: %s", insertColumn)); + DataNodeQueryMessages.INSERT_COLUMN_NAME_DOES_NOT_EXIST_IN_TARGET_TABLE_S, + insertColumn)); } if (!columnNames.add(insertColumn)) { throw new SemanticException( - String.format("Insert column name is specified more than once: %s", insertColumn)); + String.format( + DataNodeQueryMessages.INSERT_COLUMN_NAME_IS_SPECIFIED_MORE_THAN_ONCE_S, + insertColumn)); } } } else { @@ -830,8 +841,9 @@ public Scope visitInsert(Insert insert, Optional scope) { if (!typesMatchForInsert(tableTypes, queryTypes)) { throw new SemanticException( String.format( - "Insert query has mismatched column types: Table: [%s], Query: [%s]", - Joiner.on(", ").join(tableTypes), Joiner.on(", ").join(queryTypes))); + DataNodeQueryMessages.INSERT_QUERY_HAS_MISMATCHED_COLUMN_TYPES_TABLE_S_QUERY_S, + Joiner.on(QueryMessages.EXCEPTION_COMMA_50AD1C01).join(tableTypes), + Joiner.on(QueryMessages.EXCEPTION_COMMA_50AD1C01).join(queryTypes))); } return createAndAssignScope( @@ -1037,7 +1049,8 @@ private Scope analyzeWith(Query node, Optional scope) { String name = withQuery.getName().getValue().toLowerCase(ENGLISH); if (withScopeBuilder.containsNamedQuery(name)) { throw new SemanticException( - String.format("WITH query name '%s' specified more than once", name)); + String.format( + DataNodeQueryMessages.WITH_QUERY_NAME_S_SPECIFIED_MORE_THAN_ONCE, name)); } boolean isRecursive = false; @@ -1094,13 +1107,13 @@ private boolean tryProcessRecursiveQuery( List anchorReferences = findReferences(anchor, withQuery.getName()); if (!anchorReferences.isEmpty()) { throw new SemanticException( - "WITH table name is referenced in the base relation of recursion"); + DataNodeQueryMessages.WITH_TABLE_NAME_IS_REFERENCED_IN_THE_BASE_RELATION_OF_RECURSION); } // a WITH query is linearly recursive if it has a single recursive reference List stepReferences = findReferences(step, withQuery.getName()); if (stepReferences.size() > 1) { throw new SemanticException( - "multiple recursive references in the step relation of recursion"); + DataNodeQueryMessages.MULTIPLE_RECURSIVE_REFERENCES_IN_THE_STEP_RELATION_OF_RECURSION); } if (stepReferences.size() != 1) { return false; @@ -1114,20 +1127,23 @@ private boolean tryProcessRecursiveQuery( .ifPresent( limit -> { throw new SemanticException( - "FETCH FIRST / LIMIT clause in the step relation of recursion"); + DataNodeQueryMessages + .FETCH_FIRST_LIMIT_CLAUSE_IN_THE_STEP_RELATION_OF_RECURSION); }); specification = query.getQueryBody(); } if (!(specification instanceof QuerySpecification) || !((QuerySpecification) specification).getFrom().isPresent()) { throw new SemanticException( - "recursive reference outside of FROM clause of the step relation of recursion"); + DataNodeQueryMessages + .RECURSIVE_REFERENCE_OUTSIDE_OF_FROM_CLAUSE_OF_THE_STEP_RELATION_OF_RECURSION); } Relation from = ((QuerySpecification) specification).getFrom().get(); List fromReferences = findReferences(from, withQuery.getName()); if (fromReferences.isEmpty()) { throw new SemanticException( - "recursive reference outside of FROM clause of the step relation of recursion"); + DataNodeQueryMessages + .RECURSIVE_REFERENCE_OUTSIDE_OF_FROM_CLAUSE_OF_THE_STEP_RELATION_OF_RECURSION); } // b) validate top-level shape of recursive query @@ -1137,7 +1153,8 @@ private boolean tryProcessRecursiveQuery( .ifPresent( innerWith -> { throw new SemanticException( - "immediate WITH clause in recursive query is not supported"); + DataNodeQueryMessages + .IMMEDIATE_WITH_CLAUSE_IN_RECURSIVE_QUERY_IS_NOT_SUPPORTED); }); withQuery .getQuery() @@ -1145,7 +1162,8 @@ private boolean tryProcessRecursiveQuery( .ifPresent( orderBy -> { throw new SemanticException( - "immediate FILL clause in recursive query is not supported"); + DataNodeQueryMessages + .IMMEDIATE_FILL_CLAUSE_IN_RECURSIVE_QUERY_IS_NOT_SUPPORTED); }); withQuery .getQuery() @@ -1153,7 +1171,8 @@ private boolean tryProcessRecursiveQuery( .ifPresent( orderBy -> { throw new SemanticException( - "immediate ORDER BY clause in recursive query is not supported"); + DataNodeQueryMessages + .IMMEDIATE_ORDER_BY_CLAUSE_IN_RECURSIVE_QUERY_IS_NOT_SUPPORTED); }); withQuery .getQuery() @@ -1161,7 +1180,8 @@ private boolean tryProcessRecursiveQuery( .ifPresent( offset -> { throw new SemanticException( - "immediate OFFSET clause in recursive query is not supported"); + DataNodeQueryMessages + .IMMEDIATE_OFFSET_CLAUSE_IN_RECURSIVE_QUERY_IS_NOT_SUPPORTED); }); withQuery .getQuery() @@ -1169,7 +1189,8 @@ private boolean tryProcessRecursiveQuery( .ifPresent( limit -> { throw new SemanticException( - "immediate FETCH FIRST / LIMIT clause in recursive query is not support"); + DataNodeQueryMessages + .IMMEDIATE_FETCH_FIRST_LIMIT_CLAUSE_IN_RECURSIVE_QUERY_IS_NOT_SUPPORT); }); // c) validate recursion step has no illegal clauses @@ -1195,8 +1216,10 @@ private boolean tryProcessRecursiveQuery( if (anchorType.getVisibleFieldCount() != stepType.getVisibleFieldCount()) { throw new SemanticException( String.format( - "base and step relations of recursion have different number of fields: %s, %s", - anchorType.getVisibleFieldCount(), stepType.getVisibleFieldCount())); + DataNodeQueryMessages + .BASE_AND_STEP_RELATIONS_OF_RECURSION_HAVE_DIFFERENT_NUMBER_OF_FIELDS_S_S, + anchorType.getVisibleFieldCount(), + stepType.getVisibleFieldCount())); } List anchorFieldTypes = @@ -1210,8 +1233,11 @@ private boolean tryProcessRecursiveQuery( // `step` throw new SemanticException( String.format( - "recursion step relation output type (%s) is not coercible to recursion base relation output type (%s) at column %s", - stepFieldTypes.get(i), anchorFieldTypes.get(i), i + 1)); + DataNodeQueryMessages + .RECURSION_STEP_RELATION_OUTPUT_TYPE_S_IS_NOT_COERCIBLE_TO_RECURSION_BASE_RELATION_OUTPUT, + stepFieldTypes.get(i), + anchorFieldTypes.get(i), + i + 1)); } } @@ -1374,13 +1400,15 @@ private List analyzeWindowFunctions( extractWindowExpressions(windowFunction.getArguments()); if (!nestedWindowExpressions.isEmpty()) { throw new SemanticException( - "Cannot nest window functions or row pattern measures inside window function arguments"); + DataNodeQueryMessages + .CANNOT_NEST_WINDOW_FUNCTIONS_OR_ROW_PATTERN_MEASURES_INSIDE_WINDOW_FUNCTION_ARGUMENTS); } if (windowFunction.isDistinct()) { throw new SemanticException( String.format( - "DISTINCT in window function parameters not yet supported: %s", windowFunction)); + DataNodeQueryMessages.DISTINCT_IN_WINDOW_FUNCTION_PARAMETERS_NOT_YET_SUPPORTED_S, + windowFunction)); } Analysis.ResolvedWindow window = analysis.getWindow(windowFunction); @@ -1389,12 +1417,14 @@ private List analyzeWindowFunctions( if (!window.getOrderBy().isPresent()) { throw new SemanticException( String.format( - "%s function requires an ORDER BY window clause", windowFunction.getName())); + DataNodeQueryMessages.S_FUNCTION_REQUIRES_AN_ORDER_BY_WINDOW_CLAUSE, + windowFunction.getName())); } if (window.getFrame().isPresent()) { throw new SemanticException( String.format( - "Cannot specify window frame for %s function", windowFunction.getName())); + DataNodeQueryMessages.CANNOT_SPECIFY_WINDOW_FRAME_FOR_S_FUNCTION, + windowFunction.getName())); } } } @@ -1463,7 +1493,8 @@ private void analyzeWindowDefinitions(QuerySpecification node, Scope scope) { if (analysis.getWindowDefinition(node, canonicalName) != null) { throw new SemanticException( String.format( - "WINDOW name '%s' specified more than once", windowDefinition.getName())); + DataNodeQueryMessages.WINDOW_NAME_S_SPECIFIED_MORE_THAN_ONCE, + windowDefinition.getName())); } Analysis.ResolvedWindow resolvedWindow = @@ -1510,7 +1541,8 @@ private Analysis.ResolvedWindow resolveWindowSpecification( analysis.getWindowDefinition(querySpecification, canonicalName); if (referencedWindow == null) { throw new SemanticException( - String.format("Cannot resolve WINDOW name %s", windowReference.getName())); + String.format( + DataNodeQueryMessages.CANNOT_RESOLVE_WINDOW_NAME_S, windowReference.getName())); } return new Analysis.ResolvedWindow( @@ -1531,23 +1563,25 @@ private Analysis.ResolvedWindow resolveWindowSpecification( analysis.getWindowDefinition(querySpecification, canonicalName); if (referencedWindow == null) { throw new SemanticException( - String.format("Cannot resolve WINDOW name %s", referencedName)); + String.format(DataNodeQueryMessages.CANNOT_RESOLVE_WINDOW_NAME_S, referencedName)); } // analyze dependencies between this window specification and referenced window // specification if (!windowSpecification.getPartitionBy().isEmpty()) { throw new SemanticException( - "WINDOW specification with named WINDOW reference cannot specify PARTITION BY"); + DataNodeQueryMessages + .WINDOW_SPECIFICATION_WITH_NAMED_WINDOW_REFERENCE_CANNOT_SPECIFY_PARTITION_BY); } if (windowSpecification.getOrderBy().isPresent() && referencedWindow.getOrderBy().isPresent()) { throw new SemanticException( - "Cannot specify ORDER BY if referenced named WINDOW specifies ORDER BY"); + DataNodeQueryMessages + .CANNOT_SPECIFY_ORDER_BY_IF_REFERENCED_NAMED_WINDOW_SPECIFIES_ORDER_BY); } if (referencedWindow.getFrame().isPresent()) { throw new SemanticException( - "Cannot reference named WINDOW containing frame specification"); + DataNodeQueryMessages.CANNOT_REFERENCE_NAMED_WINDOW_CONTAINING_FRAME_SPECIFICATION); } // resolve window @@ -1626,7 +1660,8 @@ private void analyzeWhere(Node node, Scope scope, Expression predicate) { // if (!predicateType.equals(UNKNOWN)) { throw new SemanticException( String.format( - "WHERE clause must evaluate to a boolean: actual type %s", predicateType)); + DataNodeQueryMessages.WHERE_CLAUSE_MUST_EVALUATE_TO_A_BOOLEAN_ACTUAL_TYPE_S, + predicateType)); // } // coerce null to boolean // analysis.addCoercion(predicate, BOOLEAN, false); @@ -1676,7 +1711,9 @@ private SelectAnalysis analyzeSelect(QuerySpecification node, Scope scope) { } } else { throw new IllegalArgumentException( - "Unsupported SelectItem type: " + item.getClass().getName()); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_SELECTITEM_TYPE_S_4B0B155A, + item.getClass().getName())); } } analysis.setSelectExpressions(node, selectExpressionBuilder.build()); @@ -1721,7 +1758,8 @@ private Node containsColumnsHelper(Node node) { if (!childResult.equals(target)) { throw new SemanticException( - "Multiple different COLUMNS in the same expression are not supported"); + DataNodeQueryMessages + .MULTIPLE_DIFFERENT_COLUMNS_IN_THE_SAME_EXPRESSION_ARE_NOT_SUPPORTED); } } return target; @@ -1744,7 +1782,8 @@ public List getAccordingColumnNames() { public List visitNode(Node node, Scope scope) { throw new UnsupportedOperationException( - "This Visitor only supported process of Expression"); + DataNodeQueryMessages + .QUERY_EXCEPTION_THIS_VISITOR_ONLY_SUPPORTED_PROCESS_OF_EXPRESSION_7CEB79CB); } public List visitExpression(Expression node, Scope scope) { @@ -1818,7 +1857,9 @@ public List visitColumns(Columns node, Scope context) { List result = matchedColumns.build(); if (result.isEmpty()) { throw new SemanticException( - String.format("No matching columns found that match regex '%s'", node.getPattern())); + String.format( + DataNodeQueryMessages.NO_MATCHING_COLUMNS_FOUND_THAT_MATCH_REGEX_S, + node.getPattern())); } expandedExpressions = result; accordingColumnNames = outputColumnNames.build(); @@ -2274,7 +2315,8 @@ public List visitNotExpression(NotExpression node, Scope context) { @Override public List visitNullIfExpression(NullIfExpression node, Scope context) { throw new SemanticException( - String.format("%s are not supported now", node.getClass().getSimpleName())); + String.format( + DataNodeQueryMessages.S_ARE_NOT_SUPPORTED_NOW, node.getClass().getSimpleName())); } @Override @@ -2299,7 +2341,8 @@ public List visitQuantifiedComparisonExpression( @Override public List visitRow(Row node, Scope context) { throw new SemanticException( - String.format("%s are not supported now", node.getClass().getSimpleName())); + String.format( + DataNodeQueryMessages.S_ARE_NOT_SUPPORTED_NOW, node.getClass().getSimpleName())); } @Override @@ -2507,7 +2550,8 @@ private int analyzeSelectAllColumns( .orElseThrow( () -> new SemanticException( - String.format("Unable to resolve reference %s", prefix))); + String.format( + DataNodeQueryMessages.UNABLE_TO_RESOLVE_REFERENCE_S, prefix))); if (identifierChainBasis.getBasisType() == TABLE) { RelationType relationType = identifierChainBasis @@ -2547,7 +2591,8 @@ private int analyzeSelectAllColumns( // identifierChainBasis.get().getBasisType == FIELD or target expression isn't a // QualifiedName throw new SemanticException( - "identifierChainBasis.get().getBasisType == FIELD or target expression isn't a QualifiedName"); + DataNodeQueryMessages + .IDENTIFIERCHAINBASIS_GET_GETBASISTYPE_EQ_EQ_FIELD_OR_TARGET_EXPRESSION_ISN_T_A); // analyzeAllFieldsFromRowTypeExpression(expression, allColumns, node, scope, // outputExpressionBuilder, // selectExpressionBuilder); @@ -2647,9 +2692,12 @@ private int analyzeAllColumnsFromTable( } else { if (!field.getName().isPresent()) { throw new SemanticException( - "SELECT * from outer scope table not supported with anonymous columns"); + DataNodeQueryMessages + .SELECT_STAR_FROM_OUTER_SCOPE_TABLE_NOT_SUPPORTED_WITH_ANONYMOUS_COLUMNS); } - checkState(field.getRelationAlias().isPresent(), "missing relation alias"); + checkState( + field.getRelationAlias().isPresent(), + QueryMessages.EXCEPTION_MISSING_RELATION_ALIAS_437EDF9C); fieldExpression = new DereferenceExpression( DereferenceExpression.from(field.getRelationAlias().get()), @@ -2681,7 +2729,9 @@ private int analyzeAllColumnsFromTable( Type type = field.getType(); if (node.getSelect().isDistinct() && !type.isComparable()) { throw new SemanticException( - String.format("DISTINCT can only be applied to comparable types (actual: %s)", type)); + String.format( + DataNodeQueryMessages.DISTINCT_CAN_ONLY_BE_APPLIED_TO_COMPARABLE_TYPES_ACTUAL_S, + type)); } } analysis.setSelectAllResultFields(allColumns, itemOutputFieldBuilder.build()); @@ -2750,8 +2800,9 @@ private void analyzeSelectSingleColumn( if (node.getSelect().isDistinct() && !type.isComparable()) { throw new SemanticException( String.format( - "DISTINCT can only be applied to comparable types (actual: %s): %s", - type, expression)); + DataNodeQueryMessages.DISTINCT_CAN_ONLY_BE_APPLIED_TO_COMPARABLE_TYPES_ACTUAL_S_S, + type, + expression)); } } @@ -2778,7 +2829,9 @@ private Analysis.GroupingSetAnalysis analyzeGroupBy( long ordinal = ((LongLiteral) column).getParsedValue(); if (ordinal < 1 || ordinal > outputExpressions.size()) { throw new SemanticException( - String.format("GROUP BY position %s is not in select list", ordinal)); + String.format( + DataNodeQueryMessages.GROUP_BY_POSITION_S_IS_NOT_IN_SELECT_LIST, + ordinal)); } column = outputExpressions.get(toIntExact(ordinal - 1)); @@ -2819,7 +2872,9 @@ private Analysis.GroupingSetAnalysis analyzeGroupBy( analyzeExpression(column, scope); if (!analysis.getColumnReferences().contains(NodeRef.of(column))) { throw new SemanticException( - String.format("GROUP BY expression must be a column reference: %s", column)); + String.format( + DataNodeQueryMessages.GROUP_BY_EXPRESSION_MUST_BE_A_COLUMN_REFERENCE_S, + column)); } resolvedGroupingColumns.put(NodeRef.of(originalColumn), column); @@ -2862,7 +2917,9 @@ private Analysis.GroupingSetAnalysis analyzeGroupBy( if (!type.isComparable()) { throw new SemanticException( String.format( - "%s is not comparable, and therefore cannot be used in GROUP BY", type)); + DataNodeQueryMessages + .S_IS_NOT_COMPARABLE_AND_THEREFORE_CANNOT_BE_USED_IN_GROUP_BY, + type)); } } @@ -2963,12 +3020,16 @@ private void checkGroupingSetsCount(GroupBy node) { } } else { throw new UnsupportedOperationException( - "Unsupported grouping element type: " + element.getClass().getName()); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_UNSUPPORTED_GROUPING_ELEMENT_TYPE_S_B3C526E6, + element.getClass().getName())); } crossProduct = Math.multiplyExact(crossProduct, product); } catch (ArithmeticException e) { throw new SemanticException( - String.format("GROUP BY has more than %s grouping sets", Integer.MAX_VALUE)); + String.format( + DataNodeQueryMessages.GROUP_BY_HAS_MORE_THAN_S_GROUPING_SETS, Integer.MAX_VALUE)); } // if (crossProduct > getMaxGroupingSets(session)) { // throw semanticException(TOO_MANY_GROUPING_SETS, node, @@ -2989,7 +3050,8 @@ private void analyzeHaving(QuerySpecification node, Scope scope) { if (!predicateType.equals(BOOLEAN)) { throw new SemanticException( String.format( - "HAVING clause must evaluate to a boolean: actual type %s", predicateType)); + DataNodeQueryMessages.HAVING_CLAUSE_MUST_EVALUATE_TO_A_BOOLEAN_ACTUAL_TYPE_S, + predicateType)); } analysis.setHaving(node, predicate); @@ -3004,7 +3066,10 @@ private Scope computeAndAssignOutputScope( if (item instanceof AllColumns) { AllColumns allColumns = (AllColumns) item; List fields = analysis.getSelectAllResultFields(allColumns); - checkNotNull(fields, "output fields is null for select item %s", item); + checkNotNull( + fields, + QueryMessages.EXCEPTION_OUTPUT_FIELDS_IS_NULL_FOR_SELECT_ITEM_ARG_56AFEC51, + item); for (int i = 0; i < fields.size(); i++) { Field field = fields.get(i); @@ -3152,7 +3217,9 @@ private Scope computeAndAssignOutputScope( outputFields.add(newField); } else { throw new IllegalArgumentException( - "Unsupported SelectItem type: " + item.getClass().getName()); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_SELECTITEM_TYPE_S_4B0B155A, + item.getClass().getName())); } } @@ -3206,8 +3273,10 @@ public Scope visitSetOperation(SetOperation node, Optional scope) { if (outputFieldSize != descFieldSize) { throw new SemanticException( String.format( - "%s query has different number of fields: %d, %d", - setOperationName, outputFieldSize, descFieldSize)); + DataNodeQueryMessages.S_QUERY_HAS_DIFFERENT_NUMBER_OF_FIELDS_D_D, + setOperationName, + outputFieldSize, + descFieldSize)); } for (int i = 0; i < descFieldSize; i++) { Type descFieldType = relationType.getFieldByIndex(i).getType(); @@ -3216,7 +3285,7 @@ public Scope visitSetOperation(SetOperation node, Optional scope) { if (!commonSuperType.isPresent()) { throw new SemanticException( String.format( - "column %d in %s query has incompatible types: %s, %s", + DataNodeQueryMessages.COLUMN_D_IN_S_QUERY_HAS_INCOMPATIBLE_TYPES_S_S, i + 1, setOperationName, outputFieldTypes[i].getDisplayName(), @@ -3233,8 +3302,13 @@ public Scope visitSetOperation(SetOperation node, Optional scope) { if (!type.isComparable()) { throw new SemanticException( String.format( - "Type %s is not comparable and therefore cannot be used in %s%s", - type, setOperationName, node instanceof Union ? " DISTINCT" : "")); + DataNodeQueryMessages + .TYPE_S_IS_NOT_COMPARABLE_AND_THEREFORE_CANNOT_BE_USED_IN_SS, + type, + setOperationName, + node instanceof Union + ? DataNodeQueryMessages.DISTINCT + : QueryMessages.EMPTY_MESSAGE)); } } } @@ -3387,7 +3461,7 @@ private Scope createScopeForCommonTableExpression( // if columns are explicitly aliased -> WITH cte(alias1, alias2 ...) checkState( columnNames.get().size() == queryDescriptor.getVisibleFieldCount(), - "mismatched aliases"); + QueryMessages.EXCEPTION_MISMATCHED_ALIASES_A6D3F8CE); ImmutableList.Builder fieldBuilder = ImmutableList.builder(); Iterator aliases = columnNames.get().iterator(); for (int i = 0; i < queryDescriptor.getAllFieldCount(); i++) { @@ -3499,7 +3573,9 @@ public Scope visitPatternRecognitionRelation( name -> { if (!inputNames.add(name.toUpperCase(ENGLISH))) { throw new SemanticException( - String.format("ambiguous column: %s in row pattern input relation", name)); + String.format( + DataNodeQueryMessages.AMBIGUOUS_COLUMN_S_IN_ROW_PATTERN_INPUT_RELATION, + name)); } }); } @@ -3512,7 +3588,9 @@ public Scope visitPatternRecognitionRelation( if (!type.isComparable()) { throw new SemanticException( String.format( - "%s is not comparable, and therefore cannot be used in PARTITION BY", type)); + DataNodeQueryMessages + .S_IS_NOT_COMPARABLE_AND_THEREFORE_CANNOT_BE_USED_IN_PARTITION_BY, + type)); } } @@ -3524,7 +3602,9 @@ public Scope visitPatternRecognitionRelation( Type type = analyzeExpression(expression, inputScope).getType(sortItem.getSortKey()); if (!type.isOrderable()) { throw new SemanticException( - String.format("%s is not orderable, and therefore cannot be used in ORDER BY", type)); + String.format( + DataNodeQueryMessages.S_IS_NOT_ORDERABLE_AND_THEREFORE_CANNOT_BE_USED_IN_ORDER_BY, + type)); } } @@ -3583,7 +3663,9 @@ public Scope visitPatternRecognitionRelation( Type type = expressionAnalysis.getType(expression); if (!type.equals(BOOLEAN)) { throw new SemanticException( - String.format("Expression defining a label must be boolean (actual type: %s)", type)); + String.format( + DataNodeQueryMessages.EXPRESSION_DEFINING_A_LABEL_MUST_BE_BOOLEAN_ACTUAL_TYPE_S, + type)); } } ImmutableMap.Builder, Type> measureTypesBuilder = ImmutableMap.builder(); @@ -3715,8 +3797,9 @@ public Scope visitValues(Values node, Optional scope) { if (rowType.getTypeParameters().size() != fieldCount) { throw new SemanticException( String.format( - "Values rows have mismatched sizes: %s vs %s", - fieldCount, rowType.getTypeParameters().size())); + DataNodeQueryMessages.VALUES_ROWS_HAVE_MISMATCHED_SIZES_S_VS_S, + fieldCount, + rowType.getTypeParameters().size())); } // determine common super type of the rows @@ -3746,8 +3829,12 @@ public Scope visitValues(Values node, Optional scope) { if (!actualItemType.equals(expectedItemType)) { throw new SemanticException( String.format( - "Type of row %d column %d is mismatched, expected: %s, actual: %s", - rowIndex, i, expectedItemType, actualItemType)); + DataNodeQueryMessages + .TYPE_OF_ROW_D_COLUMN_D_IS_MISMATCHED_EXPECTED_S_ACTUAL_S, + rowIndex, + i, + expectedItemType, + actualItemType)); // analysis.addCoercion(item, expectedItemType, // typeCoercion.isTypeOnlyCoercion(actualItemType, // expectedItemType)); @@ -3762,8 +3849,10 @@ public Scope visitValues(Values node, Optional scope) { throw new SemanticException( String.format( - "Type of row %d is mismatched, expected: %s, actual: %s", - rowIndex, commonSuperType, actualType)); + DataNodeQueryMessages.TYPE_OF_ROW_D_IS_MISMATCHED_EXPECTED_S_ACTUAL_S, + rowIndex, + commonSuperType, + actualType)); } else { // coerce field. it will be wrapped in Row by Planner Type superType = getOnlyElement(commonSuperType.getTypeParameters()); @@ -3773,8 +3862,10 @@ public Scope visitValues(Values node, Optional scope) { // superType)); throw new SemanticException( String.format( - "Type of row %d is mismatched, expected: %s, actual: %s", - rowIndex, superType, actualType)); + DataNodeQueryMessages.TYPE_OF_ROW_D_IS_MISMATCHED_EXPECTED_S_ACTUAL_S, + rowIndex, + superType, + actualType)); } } rowIndex++; @@ -3805,8 +3896,11 @@ public Scope visitAliasedRelation(AliasedRelation relation, Optional scop if (totalColumns != relation.getColumnNames().size()) { throw new SemanticException( String.format( - "Column alias list has %s entries but '%s' has %s columns available", - relation.getColumnNames().size(), relation.getAlias(), totalColumns)); + DataNodeQueryMessages + .COLUMN_ALIAS_LIST_HAS_S_ENTRIES_BUT_S_HAS_S_COLUMNS_AVAILABLE, + relation.getColumnNames().size(), + relation.getAlias(), + totalColumns)); } } @@ -3825,7 +3919,7 @@ public Scope visitAliasedRelation(AliasedRelation relation, Optional scop checkArgument( inputFields.size() == descriptor.getAllFieldCount(), - "Expected %s fields, got %s", + QueryMessages.EXCEPTION_EXPECTED_ARG_FIELDS_COMMA_GOT_ARG_498063F2, descriptor.getAllFieldCount(), inputFields.size()); @@ -3901,7 +3995,8 @@ public Scope visitJoin(Join node, Optional scope) { // } throw new SemanticException( String.format( - "JOIN ON clause must evaluate to a boolean: actual type %s", clauseType)); + DataNodeQueryMessages.JOIN_ON_CLAUSE_MUST_EVALUATE_TO_A_BOOLEAN_ACTUAL_TYPE_S, + clauseType)); // coerce expression to boolean // analysis.addCoercion(expression, BOOLEAN, false); } @@ -3925,7 +4020,8 @@ public Scope visitJoin(Join node, Optional scope) { if (!clauseType.equals(BOOLEAN)) { throw new SemanticException( String.format( - "ASOF main JOIN expression must evaluate to a boolean: actual type %s", + DataNodeQueryMessages + .ASOF_MAIN_JOIN_EXPRESSION_MUST_EVALUATE_TO_A_BOOLEAN_ACTUAL_TYPE_S, clauseType)); } @@ -3933,7 +4029,8 @@ public Scope visitJoin(Join node, Optional scope) { if (!clauseType.equals(TimestampType.TIMESTAMP)) { throw new SemanticException( String.format( - "left child type of ASOF main JOIN expression must be TIMESTAMP: actual type %s", + DataNodeQueryMessages + .LEFT_CHILD_TYPE_OF_ASOF_MAIN_JOIN_EXPRESSION_MUST_BE_TIMESTAMP_ACTUAL_TYPE_S, clauseType)); } @@ -3941,14 +4038,17 @@ public Scope visitJoin(Join node, Optional scope) { if (!clauseType.equals(TimestampType.TIMESTAMP)) { throw new SemanticException( String.format( - "right child type of ASOF main JOIN expression must be TIMESTAMP: actual type %s", + DataNodeQueryMessages + .RIGHT_CHILD_TYPE_OF_ASOF_MAIN_JOIN_EXPRESSION_MUST_BE_TIMESTAMP_ACTUAL_TYPE_S, clauseType)); } } analysis.setJoinCriteria(node, expression); } else { throw new UnsupportedOperationException( - "Unsupported join criteria: " + criteria.getClass().getName()); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_JOIN_CRITERIA_S_311289C1, + criteria.getClass().getName())); } return output; @@ -3972,7 +4072,8 @@ private Scope analyzeJoinUsing( if (!seen.add(column)) { throw new SemanticException( String.format( - "Column '%s' appears multiple times in USING clause", column.getValue())); + DataNodeQueryMessages.COLUMN_S_APPEARS_MULTIPLE_TIMES_IN_USING_CLAUSE, + column.getValue())); } ResolvedField leftField = @@ -3981,7 +4082,7 @@ private Scope analyzeJoinUsing( () -> new SemanticException( String.format( - "Column '%s' is missing from left side of join", + DataNodeQueryMessages.COLUMN_S_IS_MISSING_FROM_LEFT_SIDE_OF_JOIN, column.getValue()))); ResolvedField rightField = right @@ -3990,7 +4091,7 @@ private Scope analyzeJoinUsing( () -> new SemanticException( String.format( - "Column '%s' is missing from right side of join", + DataNodeQueryMessages.COLUMN_S_IS_MISSING_FROM_RIGHT_SIDE_OF_JOIN, column.getValue()))); // ensure a comparison operator exists for the given types (applying coercions if necessary) @@ -4003,8 +4104,10 @@ private Scope analyzeJoinUsing( if (leftField.getType() != rightField.getType()) { throw new SemanticException( String.format( - "Column Types of left and right side are different: left is %s, right is %s", - leftField.getType(), rightField.getType())); + DataNodeQueryMessages + .COLUMN_TYPES_OF_LEFT_AND_RIGHT_SIDE_ARE_DIFFERENT_LEFT_IS_S_RIGHT_IS_S, + leftField.getType(), + rightField.getType())); } analysis.addTypes(ImmutableMap.of(NodeRef.of(column), leftField.getType())); @@ -4157,7 +4260,8 @@ private FieldReference getHelperColumn(Fill node, Scope scope, FillPolicy fillMe if (index == -1) { throw new SemanticException( String.format( - "Cannot infer TIME_COLUMN for %s FILL, there exists no column whose type is TIMESTAMP", + DataNodeQueryMessages + .CANNOT_INFER_TIME_COLUMN_FOR_S_FILL_THERE_EXISTS_NO_COLUMN_WHOSE_TYPE_IS_TIMESTAMP, fillMethod.name())); } helperColumn = new FieldReference(index); @@ -4195,13 +4299,15 @@ private FieldReference getFieldReferenceForTimeColumn( if (ordinal < 1 || ordinal > scope.getRelationType().getVisibleFieldCount()) { throw new SemanticException( String.format( - "%s FILL TIME_COLUMN position %s is not in select list", - fillMethod.name(), ordinal)); + DataNodeQueryMessages.S_FILL_TIME_COLUMN_POSITION_S_IS_NOT_IN_SELECT_LIST, + fillMethod.name(), + ordinal)); } else if (!isTimestampType( scope.getRelationType().getFieldByIndex((int) ordinal - 1).getType())) { throw new SemanticException( String.format( - "Type of TIME_COLUMN for %s FILL should only be TIMESTAMP, but type of the column you specify is %s", + DataNodeQueryMessages + .TYPE_OF_TIME_COLUMN_FOR_S_FILL_SHOULD_ONLY_BE_TIMESTAMP_BUT_TYPE_OF_THE_COLUMN_YOU, fillMethod.name(), scope.getRelationType().getFieldByIndex((int) ordinal - 1).getType())); } else { @@ -4215,8 +4321,9 @@ private FieldReference getFieldReferenceForFillGroup( if (ordinal < 1 || ordinal > scope.getRelationType().getVisibleFieldCount()) { throw new SemanticException( String.format( - "%s FILL FILL_GROUP position %s is not in select list", - fillMethod.name(), ordinal)); + DataNodeQueryMessages.S_FILL_FILL_GROUP_POSITION_S_IS_NOT_IN_SELECT_LIST, + fillMethod.name(), + ordinal)); } else if (!scope .getRelationType() .getFieldByIndex((int) ordinal - 1) @@ -4224,8 +4331,10 @@ private FieldReference getFieldReferenceForFillGroup( .isOrderable()) { throw new SemanticException( String.format( - "Type %s is not orderable, and therefore cannot be used in FILL_GROUP: %s", - scope.getRelationType().getFieldByIndex((int) ordinal - 1).getType(), index)); + DataNodeQueryMessages + .TYPE_S_IS_NOT_ORDERABLE_AND_THEREFORE_CANNOT_BE_USED_IN_FILL_GROUP_S, + scope.getRelationType().getFieldByIndex((int) ordinal - 1).getType(), + index)); } else { return new FieldReference(toIntExact(ordinal - 1)); } @@ -4244,7 +4353,8 @@ private List analyzeOrderBy( long ordinal = ((LongLiteral) expression).getParsedValue(); if (ordinal < 1 || ordinal > orderByScope.getRelationType().getVisibleFieldCount()) { throw new SemanticException( - String.format("ORDER BY position %s is not in select list", ordinal)); + String.format( + DataNodeQueryMessages.ORDER_BY_POSITION_S_IS_NOT_IN_SELECT_LIST, ordinal)); } expression = new FieldReference(toIntExact(ordinal - 1)); @@ -4273,8 +4383,10 @@ private List analyzeOrderBy( if (!type.isOrderable()) { throw new SemanticException( String.format( - "Type %s is not orderable, and therefore cannot be used in ORDER BY: %s", - type, expression)); + DataNodeQueryMessages + .TYPE_S_IS_NOT_ORDERABLE_AND_THEREFORE_CANNOT_BE_USED_IN_ORDER_BY_S, + type, + expression)); } orderByFieldsBuilder.add(expression); @@ -4299,7 +4411,8 @@ private void analyzeOffset(Offset node, Scope scope) { } else { checkState( node.getRowCount() instanceof Parameter, - "unexpected OFFSET rowCount: " + node.getRowCount().getClass().getSimpleName()); + QueryMessages.EXCEPTION_UNEXPECTED_OFFSET_ROWCOUNT_COLON_977E305C + + node.getRowCount().getClass().getSimpleName()); OptionalLong providedValue = analyzeParameterAsRowCount((Parameter) node.getRowCount(), scope, "OFFSET"); rowCount = providedValue.orElse(0); @@ -4307,7 +4420,8 @@ private void analyzeOffset(Offset node, Scope scope) { if (rowCount < 0) { throw new SemanticException( String.format( - "OFFSET row count must be greater or equal to 0 (actual value: %s)", rowCount)); + DataNodeQueryMessages.OFFSET_ROW_COUNT_MUST_BE_GREATER_OR_EQUAL_TO_0_ACTUAL_VALUE_S, + rowCount)); } analysis.setOffset(node, rowCount); } @@ -4323,7 +4437,8 @@ private boolean analyzeLimit(Node node, Scope scope) { // node.getClass().getName()); checkState( node instanceof Limit, - "Invalid limit node type. Expected: Limit. Actual: %s", + QueryMessages + .EXCEPTION_INVALID_LIMIT_NODE_TYPE_DOT_EXPECTED_COLON_LIMIT_DOT_ACTUAL_COLON_ARG_5BCD1C76, node.getClass().getName()); // if (node instanceof FetchFirst) { // return analyzeLimit((FetchFirst) node, scope); @@ -4365,7 +4480,8 @@ private boolean analyzeLimit(Limit node, Scope scope) { } else { checkState( node.getRowCount() instanceof Parameter, - "unexpected LIMIT rowCount: " + node.getRowCount().getClass().getSimpleName()); + QueryMessages.EXCEPTION_UNEXPECTED_LIMIT_ROWCOUNT_COLON_CFF154F0 + + node.getRowCount().getClass().getSimpleName()); rowCount = analyzeParameterAsRowCount((Parameter) node.getRowCount(), scope, "LIMIT"); } rowCount.ifPresent( @@ -4373,7 +4489,9 @@ private boolean analyzeLimit(Limit node, Scope scope) { if (count < 0) { throw new SemanticException( String.format( - "LIMIT row count must be greater or equal to 0 (actual value: %s)", count)); + DataNodeQueryMessages + .LIMIT_ROW_COUNT_MUST_BE_GREATER_OR_EQUAL_TO_0_ACTUAL_VALUE_S, + count)); } }); @@ -4395,11 +4513,17 @@ private OptionalLong analyzeParameterAsRowCount( } catch (VerifyException e) { throw new SemanticException( - String.format("Non constant parameter value for %s: %s", context, providedValue)); + String.format( + DataNodeQueryMessages.NON_CONSTANT_PARAMETER_VALUE_FOR_S_S, + context, + providedValue)); } if (value == null) { throw new SemanticException( - String.format("Parameter value provided for %s is NULL: %s", context, providedValue)); + String.format( + DataNodeQueryMessages.PARAMETER_VALUE_PROVIDED_FOR_S_IS_NULL_S, + context, + providedValue)); } return OptionalLong.of((long) value); } @@ -4413,7 +4537,8 @@ private void analyzeAggregations( List orderByExpressions) { checkState( orderByExpressions.isEmpty() || orderByScope.isPresent(), - "non-empty orderByExpressions list without orderByScope provided"); + QueryMessages + .EXCEPTION_NON_MINUS_EMPTY_ORDERBYEXPRESSIONS_LIST_WITHOUT_ORDERBYSCOPE_PROVIDED_240DDD64); List aggregates = extractAggregateFunctions(Iterables.concat(outputExpressions, orderByExpressions)); @@ -4527,11 +4652,15 @@ private void validateFromClauseOfRecursiveTerm(Relation from, Identifier name) { List rightRecursiveReferences = findReferences(join.getRight(), name); if (!leftRecursiveReferences.isEmpty() && (type == RIGHT || type == FULL)) { throw new SemanticException( - String.format("recursive reference in left source of %s join", type)); + String.format( + DataNodeQueryMessages.RECURSIVE_REFERENCE_IN_LEFT_SOURCE_OF_S_JOIN, + type)); } if (!rightRecursiveReferences.isEmpty() && (type == LEFT || type == FULL)) { throw new SemanticException( - String.format("recursive reference in right source of %s join", type)); + String.format( + DataNodeQueryMessages.RECURSIVE_REFERENCE_IN_RIGHT_SOURCE_OF_S_JOIN, + type)); } } }); @@ -4560,14 +4689,16 @@ private void validateFromClauseOfRecursiveTerm(Relation from, Identifier name) { if (!rightRecursiveReferences.isEmpty()) { throw new SemanticException( String.format( - "recursive reference in right relation of EXCEPT %s", - except.isDistinct() ? "DISTINCT" : "ALL")); + DataNodeQueryMessages.RECURSIVE_REFERENCE_IN_RIGHT_RELATION_OF_EXCEPT_S, + except.isDistinct() + ? DataNodeQueryMessages.DISTINCT_2 + : DataNodeQueryMessages.ALL)); } if (!except.isDistinct()) { List leftRecursiveReferences = findReferences(except.getLeft(), name); if (!leftRecursiveReferences.isEmpty()) { throw new SemanticException( - "recursive reference in left relation of EXCEPT ALL"); + DataNodeQueryMessages.RECURSIVE_REFERENCE_IN_LEFT_RELATION_OF_EXCEPT_ALL); } } }); @@ -4619,7 +4750,8 @@ private void verifySelectDistinct( if (!expressions.contains(ScopeAware.scopeAwareKey(expression, analysis, orderByScope))) { throw new SemanticException( - "For SELECT DISTINCT, ORDER BY expressions must appear in select list"); + DataNodeQueryMessages + .FOR_SELECT_DISTINCT_ORDER_BY_EXPRESSIONS_MUST_APPEAR_IN_SELECT_LIST); } } @@ -4657,7 +4789,10 @@ private Set> getAliases(Select node) { } else if (item instanceof AllColumns) { AllColumns allColumns = (AllColumns) item; List fields = analysis.getSelectAllResultFields(allColumns); - checkNotNull(fields, "output fields is null for select item %s", item); + checkNotNull( + fields, + QueryMessages.EXCEPTION_OUTPUT_FIELDS_IS_NULL_FOR_SELECT_ITEM_ARG_56AFEC51, + item); for (int i = 0; i < fields.size(); i++) { Field field = fields.get(i); @@ -4679,17 +4814,21 @@ private void validateProperties(final List properties, final Optional< final String key = property.getName().getValue().toLowerCase(Locale.ENGLISH); if (!TABLE_ALLOWED_PROPERTIES.contains(key)) { throw new SemanticException( - DataNodeQueryMessages.TABLE_PROPERTY_2 + key + " is currently not allowed."); + DataNodeQueryMessages.TABLE_PROPERTY_2 + + key + + DataNodeQueryMessages.IS_CURRENTLY_NOT_ALLOWED_2); } if (!propertyNames.add(key)) { throw new SemanticException( - String.format("Duplicate property: %s", property.getName().getValue())); + String.format( + DataNodeQueryMessages.DUPLICATE_PROPERTY_S, property.getName().getValue())); } if (!property.isSetToDefault()) { final Expression value = property.getNonDefaultValue(); if (!(value instanceof LongLiteral)) { throw new SemanticException( - "TTL' value must be a 'INF' or a LongLiteral, but now is: " + value.toString()); + DataNodeQueryMessages.TTL_VALUE_MUST_BE_A_INF_OR_A_LONGLITERAL_BUT_NOW_IS + + value.toString()); } } } @@ -4710,11 +4849,12 @@ private void validateColumns(Statement node, RelationType descriptor) { () -> new SemanticException( String.format( - "Column name not specified at position %s", + DataNodeQueryMessages.COLUMN_NAME_NOT_SPECIFIED_AT_POSITION_S, descriptor.indexOf(field) + 1))); if (!names.add(fieldName)) { throw new SemanticException( - String.format("Column name '%s' specified more than once", fieldName)); + String.format( + DataNodeQueryMessages.COLUMN_NAME_S_SPECIFIED_MORE_THAN_ONCE, fieldName)); } } } @@ -4725,7 +4865,9 @@ private void validateColumnAliases(List columnAliases, int sourceCol for (Identifier identifier : columnAliases) { if (names.contains(identifier.getValue().toLowerCase(ENGLISH))) { throw new SemanticException( - String.format("Column name '%s' specified more than once", identifier.getValue())); + String.format( + DataNodeQueryMessages.COLUMN_NAME_S_SPECIFIED_MORE_THAN_ONCE, + identifier.getValue())); } names.add(identifier.getValue().toLowerCase(ENGLISH)); } @@ -4735,8 +4877,9 @@ private void validateColumnAliasesCount(List columnAliases, int sour if (columnAliases.size() != sourceColumnSize) { throw new SemanticException( String.format( - "Column alias list has %s entries but relation has %s columns", - columnAliases.size(), sourceColumnSize)); + DataNodeQueryMessages.COLUMN_ALIAS_LIST_HAS_S_ENTRIES_BUT_RELATION_HAS_S_COLUMNS, + columnAliases.size(), + sourceColumnSize)); } } @@ -4907,12 +5050,15 @@ private TranslationMap analyzeTraverseDevice( try { analyzeWhere(node, translationMap.getScope(), node.getWhere().get()); } catch (final Throwable e) { - if (e instanceof SemanticException && e.getMessage().contains("cannot be resolved")) { + if (e instanceof SemanticException + && e.getMessage().contains(DataNodeQueryMessages.CANNOT_BE_RESOLVED)) { throw new SemanticException( new IoTDBException( e.getCause() .getMessage() - .replace("cannot be resolved", "is not an attribute or tag column"), + .replace( + DataNodeQueryMessages.CANNOT_BE_RESOLVED, + DataNodeQueryMessages.IS_NOT_AN_ATTRIBUTE_OR_TAG_COLUMN), TSStatusCode.SEMANTIC_ERROR.getStatusCode())); } throw e; @@ -5043,21 +5189,27 @@ public Scope visitTableFunctionInvocation(TableFunctionInvocation node, Optional if (!tableArgumentNameSet.contains(name)) { throw new SemanticException( String.format( - "Table function %s specifies required columns from table argument %s which cannot be found", - node.getName(), name)); + DataNodeQueryMessages + .TABLE_FUNCTION_S_SPECIFIES_REQUIRED_COLUMNS_FROM_TABLE_ARGUMENT_S_WHICH_CANNOT_BE_FOUND, + node.getName(), + name)); } // make sure the required columns are not empty and positive if (columns.isEmpty()) { throw new SemanticException( String.format( - "Table function %s specifies empty list of required columns from table argument %s", - node.getName(), name)); + DataNodeQueryMessages + .TABLE_FUNCTION_S_SPECIFIES_EMPTY_LIST_OF_REQUIRED_COLUMNS_FROM_TABLE_ARGUMENT_S, + node.getName(), + name)); } if (columns.stream().anyMatch(column -> column < 0)) { throw new SemanticException( String.format( - "Table function %s specifies negative index of required column from table argument %s", - node.getName(), name)); + DataNodeQueryMessages + .TABLE_FUNCTION_S_SPECIFIES_NEGATIVE_INDEX_OF_REQUIRED_COLUMN_FROM_TABLE_ARGUMENT_S, + node.getName(), + name)); } // the scope is recorded, because table arguments are already analyzed Scope inputScope = analysis.getScope(tableArgumentsByName.get(name).getRelation()); @@ -5068,8 +5220,11 @@ public Scope visitTableFunctionInvocation(TableFunctionInvocation node, Optional column -> { throw new SemanticException( String.format( - "Index %s of required column from table argument %s is out of bounds for table with %s columns", - column, name, inputScope.getRelationType().getAllFieldCount())); + DataNodeQueryMessages + .INDEX_S_OF_REQUIRED_COLUMN_FROM_TABLE_ARGUMENT_S_IS_OUT_OF_BOUNDS_FOR_TABLE_WITH_S, + column, + name, + inputScope.getRelationType().getAllFieldCount())); }); // record the required columns for access control columns.stream() @@ -5085,8 +5240,10 @@ public Scope visitTableFunctionInvocation(TableFunctionInvocation node, Optional input -> { throw new SemanticException( String.format( - "Table function %s does not specify required input columns from table argument %s", - node.getName(), input)); + DataNodeQueryMessages + .TABLE_FUNCTION_S_DOES_NOT_SPECIFY_REQUIRED_INPUT_COLUMNS_FROM_TABLE_ARGUMENT_S, + node.getName(), + input)); }); // The result relation type of a table function consists of: @@ -5125,7 +5282,10 @@ public Scope visitTableFunctionInvocation(TableFunctionInvocation node, Optional for (String name : tableArgumentNames) { TableArgumentAnalysis argument = tableArgumentsByName.get(name); // analyze arguments will make sure that all table arguments are present - checkArgument(argument != null, "Missing table argument: %s", name); + checkArgument( + argument != null, + QueryMessages.EXCEPTION_MISSING_TABLE_ARGUMENT_COLON_ARG_4F1E9F4E, + name); orderedTableArguments.add(argument); Scope argumentScope = analysis.getScope(argument.getRelation()); if (argument.isPassThroughColumns()) { @@ -5172,8 +5332,10 @@ private ArgumentsAnalysis analyzeArguments( if (parameterSpecifications.size() < arguments.size()) { throw new SemanticException( String.format( - "Too many arguments. Expected at most %s arguments, got %s arguments", - parameterSpecifications.size(), arguments.size())); + DataNodeQueryMessages + .TOO_MANY_ARGUMENTS_EXPECTED_AT_MOST_S_ARGUMENTS_GOT_S_ARGUMENTS, + parameterSpecifications.size(), + arguments.size())); } if (parameterSpecifications.isEmpty()) { @@ -5187,7 +5349,8 @@ private ArgumentsAnalysis analyzeArguments( arguments.stream().noneMatch(argument -> argument.getName().isPresent()); if (!argumentsPassedByName && !argumentsPassedByPosition) { throw new SemanticException( - "All arguments must be passed by name or all must be passed positionally"); + DataNodeQueryMessages + .ALL_ARGUMENTS_MUST_BE_PASSED_BY_NAME_OR_ALL_MUST_BE_PASSED_POSITIONALLY); } ImmutableMap.Builder passedArguments = ImmutableMap.builder(); @@ -5201,7 +5364,10 @@ private ArgumentsAnalysis analyzeArguments( // this should never happen, because the argument names are validated at function // registration time throw new IllegalStateException( - "Duplicate argument specification for name: " + parameterSpecification.getName()); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_DUPLICATE_ARGUMENT_SPECIFICATION_FOR_NAME_S_F804F3DC, + parameterSpecification.getName())); } } @@ -5219,7 +5385,9 @@ private ArgumentsAnalysis analyzeArguments( specifiedArgumentNames, argument.getName().get().getCanonicalValue()); if (argumentName == null) { throw new SemanticException( - String.format("Unexpected argument name: %s", argument.getName().get().getValue())); + String.format( + DataNodeQueryMessages.UNEXPECTED_ARGUMENT_NAME_S, + argument.getName().get().getValue())); } if (!uniqueArgumentNames.add(argumentName)) { throw new SemanticException( @@ -5300,7 +5468,8 @@ private void tryUpdateOrderByForForecastByPosition( } if (position == -1) { throw new IllegalStateException( - "ForecastTableFunction must contain ForecastTableFunction.TIMECOL_PARAMETER_NAME"); + DataNodeQueryMessages + .QUERY_EXCEPTION_FORECASTTABLEFUNCTION_MUST_CONTAIN_FORECASTTABLEFUNCTION_DA5828E9); } if (position < arguments.size() && arguments.get(position).getValue() instanceof StringLiteral) { @@ -5346,7 +5515,7 @@ private ArgumentAnalysis analyzeArgument( } else { throw new SemanticException( String.format( - "Unexpected table function argument type: %s", + DataNodeQueryMessages.UNEXPECTED_TABLE_FUNCTION_ARGUMENT_TYPE_S, argument.getClass().getSimpleName())); } @@ -5354,8 +5523,9 @@ private ArgumentAnalysis analyzeArgument( if (!(argument.getValue() instanceof TableFunctionTableArgument)) { throw new SemanticException( String.format( - "Invalid argument %s. Expected table argument, got %s", - parameterSpecification.getName(), actualType)); + DataNodeQueryMessages.INVALID_ARGUMENT_S_EXPECTED_TABLE_ARGUMENT_GOT_S, + parameterSpecification.getName(), + actualType)); } return analyzeTableArgument( (TableFunctionTableArgument) argument.getValue(), @@ -5365,16 +5535,18 @@ private ArgumentAnalysis analyzeArgument( if (!(argument.getValue() instanceof Expression)) { throw new SemanticException( String.format( - "Invalid argument %s. Expected scalar argument, got %s", - parameterSpecification.getName(), actualType)); + DataNodeQueryMessages.INVALID_ARGUMENT_S_EXPECTED_SCALAR_ARGUMENT_GOT_S, + parameterSpecification.getName(), + actualType)); } return analyzeScalarArgument( (Expression) argument.getValue(), (ScalarParameterSpecification) parameterSpecification); } else { throw new IllegalStateException( - "Unexpected argument specification: " - + parameterSpecification.getClass().getSimpleName()); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNEXPECTED_ARGUMENT_SPECIFICATION_S_830154B1, + parameterSpecification.getClass().getSimpleName())); } } @@ -5413,7 +5585,8 @@ private ArgumentAnalysis analyzeTableArgument( if (argumentSpecification.isRowSemantics()) { throw new SemanticException( String.format( - "Invalid argument %s. Partitioning can not be specified for table argument with row semantics", + DataNodeQueryMessages + .INVALID_ARGUMENT_S_PARTITIONING_CAN_NOT_BE_SPECIFIED_FOR_TABLE_ARGUMENT_WITH_ROW, argumentSpecification.getName())); } List partitionByExpression = tableArgument.getPartitionBy().get(); @@ -5426,7 +5599,8 @@ private ArgumentAnalysis analyzeTableArgument( if (!type.isComparable()) { throw new SemanticException( String.format( - "%s is not comparable, and therefore cannot be used in PARTITION BY", + DataNodeQueryMessages + .S_IS_NOT_COMPARABLE_AND_THEREFORE_CANNOT_BE_USED_IN_PARTITION_BY, type)); } }); @@ -5440,7 +5614,10 @@ private ArgumentAnalysis analyzeTableArgument( return expression.toString(); } else { throw new IllegalStateException( - "Unexpected partitionBy expression: " + expression); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_UNEXPECTED_PARTITIONBY_EXPRESSION_S_8D74EB2D, + expression)); } }) .collect(toImmutableList()); @@ -5451,7 +5628,8 @@ private ArgumentAnalysis analyzeTableArgument( if (argumentSpecification.isRowSemantics()) { throw new SemanticException( String.format( - "Invalid argument %s. Ordering can not be specified for table argument with row semantics", + DataNodeQueryMessages + .INVALID_ARGUMENT_S_ORDERING_CAN_NOT_BE_SPECIFIED_FOR_TABLE_ARGUMENT_WITH_ROW_SEMANTICS, argumentSpecification.getName())); } OrderBy orderByExpression = tableArgument.getOrderBy().get(); @@ -5466,7 +5644,9 @@ private ArgumentAnalysis analyzeTableArgument( if (!type.isOrderable()) { throw new SemanticException( String.format( - "%s is not orderable, and therefore cannot be used in ORDER BY", type)); + DataNodeQueryMessages + .S_IS_NOT_ORDERABLE_AND_THEREFORE_CANNOT_BE_USED_IN_ORDER_BY, + type)); } }); orderBy = @@ -5480,7 +5660,10 @@ private ArgumentAnalysis analyzeTableArgument( return expression.toString(); } else { throw new IllegalStateException( - "Unexpected orderBy expression: " + expression); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_UNEXPECTED_ORDERBY_EXPRESSION_S_9301B69E, + expression)); } }) .collect(toImmutableList()); @@ -5520,7 +5703,7 @@ private ArgumentAnalysis analyzeScalarArgument( } else { throw new SemanticException( String.format( - "Invalid scalar argument '%s'. Expected type %s, got %s", + DataNodeQueryMessages.INVALID_SCALAR_ARGUMENT_S_EXPECTED_TYPE_S_GOT_S, argumentSpecification.getName(), argumentSpecification.getType(), constantValue.getClass().getSimpleName())); @@ -5531,7 +5714,9 @@ private ArgumentAnalysis analyzeScalarArgument( if (errMsg != null) { throw new SemanticException( String.format( - "Invalid scalar argument %s, %s", argumentSpecification.getName(), errMsg)); + DataNodeQueryMessages.INVALID_SCALAR_ARGUMENT_S_S, + argumentSpecification.getName(), + errMsg)); } } return new ArgumentAnalysis( @@ -5542,24 +5727,30 @@ private Argument analyzeDefault( ParameterSpecification parameterSpecification, Node errorLocation) { if (parameterSpecification.isRequired()) { throw new SemanticException( - String.format("Missing required argument: %s", parameterSpecification.getName())); + String.format( + DataNodeQueryMessages.MISSING_REQUIRED_ARGUMENT_S, + parameterSpecification.getName())); } checkArgument( !(parameterSpecification instanceof TableParameterSpecification), - "Table argument specification cannot have a default value."); + QueryMessages + .EXCEPTION_TABLE_ARGUMENT_SPECIFICATION_CANNOT_HAVE_A_DEFAULT_VALUE_DOT_009A02CA); if (parameterSpecification instanceof ScalarParameterSpecification) { checkArgument( parameterSpecification.getDefaultValue().isPresent(), String.format( - "Missing default value for scalar argument: %s", parameterSpecification.getName())); + QueryMessages + .EXCEPTION_MISSING_DEFAULT_VALUE_FOR_SCALAR_ARGUMENT_COLON_ARG_8AF70F38, + parameterSpecification.getName())); return new ScalarArgument( ((ScalarParameterSpecification) parameterSpecification).getType(), parameterSpecification.getDefaultValue().get()); } else { throw new IllegalStateException( - "Unexpected argument specification: " - + parameterSpecification.getClass().getSimpleName()); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNEXPECTED_ARGUMENT_SPECIFICATION_S_830154B1, + parameterSpecification.getClass().getSimpleName())); } } @@ -5571,12 +5762,13 @@ private Field validateAndGetInputField(Expression expression, Scope inputScope) qualifiedName = getQualifiedName((DereferenceExpression) expression); } else { throw new SemanticException( - String.format("Expected column reference. Actual: %s", expression)); + String.format(DataNodeQueryMessages.EXPECTED_COLUMN_REFERENCE_ACTUAL_S, expression)); } Optional field = inputScope.tryResolveField(expression, qualifiedName); if (!field.isPresent() || !field.get().isLocal()) { throw new SemanticException( - String.format("Column %s is not present in the input relation", expression)); + String.format( + DataNodeQueryMessages.COLUMN_S_IS_NOT_PRESENT_IN_THE_INPUT_RELATION, expression)); } return field.get().getField(); @@ -5605,8 +5797,10 @@ static void verifyNoAggregateWindowOrGroupingFunctions(Expression predicate, Str if (!aggregates.isEmpty()) { throw new SemanticException( String.format( - "%s cannot contain aggregations, window functions or grouping operations: %s", - clause, aggregates)); + DataNodeQueryMessages + .S_CANNOT_CONTAIN_AGGREGATIONS_WINDOW_FUNCTIONS_OR_GROUPING_OPERATIONS_S, + clause, + aggregates)); } } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/StatementAnalyzerFactory.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/StatementAnalyzerFactory.java index 3772c63f86f97..2d55096d741cf 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/StatementAnalyzerFactory.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/StatementAnalyzerFactory.java @@ -21,6 +21,7 @@ import org.apache.iotdb.commons.queryengine.common.SessionInfo; import org.apache.iotdb.commons.queryengine.plan.relational.type.TypeManager; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.common.MPPQueryContext; import org.apache.iotdb.db.queryengine.execution.warnings.WarningCollector; import org.apache.iotdb.db.queryengine.plan.relational.metadata.Metadata; @@ -41,10 +42,14 @@ public StatementAnalyzerFactory( final SqlParser sqlParser, final AccessControl accessControl, final TypeManager typeManager) { - this.metadata = requireNonNull(metadata, "plannerContext is null"); + this.metadata = + requireNonNull(metadata, DataNodeQueryMessages.EXCEPTION_PLANNERCONTEXT_IS_NULL_B7C7DE50); this.sqlParser = sqlParser; - this.accessControl = requireNonNull(accessControl, "accessControl is null"); - this.typeManager = requireNonNull(typeManager, "typeManager is null"); + this.accessControl = + requireNonNull( + accessControl, DataNodeQueryMessages.EXCEPTION_ACCESSCONTROL_IS_NULL_F534EBDD); + this.typeManager = + requireNonNull(typeManager, DataNodeQueryMessages.EXCEPTION_TYPEMANAGER_IS_NULL_12A72016); } public StatementAnalyzerFactory withSpecializedAccessControl(AccessControl accessControl) { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/predicate/ConvertPredicateToFilterVisitor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/predicate/ConvertPredicateToFilterVisitor.java index 84c23d4976042..80ddbb8cddf2c 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/predicate/ConvertPredicateToFilterVisitor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/predicate/ConvertPredicateToFilterVisitor.java @@ -158,7 +158,10 @@ public static > Filter constructCompareFilter( if (!context.isMeasurementColumn(symbolReference)) { throw new IllegalStateException( - String.format("Only support measurement column in filter: %s", symbolReference)); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_ONLY_SUPPORT_MEASUREMENT_COLUMN_IN_FILTER_S_140800D9, + symbolReference)); } int measurementIndex = context.getMeasurementIndex(symbolReference.getName()); @@ -237,7 +240,9 @@ private static Filter constructFilterFromDouble( default: throw new IllegalArgumentException( - String.format("Unsupported comparison operator %s", operator)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_COMPARISON_OPERATOR_S_8357E642, + operator)); } } @@ -254,7 +259,9 @@ private static Filter constructFilterForLessThanMin( return new ValueIsNotNullOperator(measurementIndex); default: throw new IllegalArgumentException( - String.format("Unsupported comparison operator %s", operator)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_COMPARISON_OPERATOR_S_8357E642, + operator)); } } @@ -273,7 +280,9 @@ private static Filter constructFilterForGreaterThanMax( default: throw new IllegalArgumentException( - String.format("Unsupported comparison operator %s", operator)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_COMPARISON_OPERATOR_S_8357E642, + operator)); } } @@ -297,7 +306,9 @@ private static > Filter constructValueFilter( return ValueFilterApi.ltEq(measurementIndex, value, dataType); default: throw new IllegalArgumentException( - String.format("Unsupported comparison operator %s", operator)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_COMPARISON_OPERATOR_S_8357E642, + operator)); } } @@ -310,7 +321,10 @@ private Filter constructExtractCompareFilter( if (!context.isMeasurementColumn(symbolReference)) { throw new IllegalStateException( - String.format("Only support measurement column in filter: %s", symbolReference)); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_ONLY_SUPPORT_MEASUREMENT_COLUMN_IN_FILTER_S_140800D9, + symbolReference)); } int measurementIndex = context.getMeasurementIndex(symbolReference.getName()); @@ -339,7 +353,10 @@ private Filter constructExtractCompareFilter( measurementIndex, value, field1, zoneId, currPrecision); default: throw new IllegalArgumentException( - String.format("Unsupported extract comparison operator %s", operator)); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_UNSUPPORTED_EXTRACT_COMPARISON_OPERATOR_S_38A9CDFA, + operator)); } } @@ -368,11 +385,16 @@ public static > T getValue(Literal value, Type dataType) return (T) new Binary(getBlobValue(value)); default: throw new UnsupportedOperationException( - String.format("Unsupported data type %s", dataType)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_S_4CB21D47, + dataType)); } } catch (NumberFormatException e) { throw new IllegalArgumentException( - String.format("\"%s\" cannot be cast to [%s]", value, dataType)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_S_CANNOT_BE_CAST_TO_S_DABC2DA0, + value, + dataType)); } } @@ -419,7 +441,9 @@ public Filter visitLogicalExpression(LogicalExpression node, Context context) { node.getTerms().stream().map(n -> process(n, context)).collect(Collectors.toList())); default: throw new IllegalArgumentException( - String.format("Unsupported logical operator %s", node.getOperator())); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_LOGICAL_OPERATOR_S_FDC60986, + node.getOperator())); } } @@ -466,7 +490,9 @@ && isSymbolReference(right) context); } else { throw new IllegalStateException( - String.format("%s is not supported in value push down", node)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_S_IS_NOT_SUPPORTED_IN_VALUE_PUSH_DOWN_DD54E38A, + node)); } } @@ -552,13 +578,17 @@ public Filter visitBetweenPredicate(BetweenPredicate node, Context context) { measurementIndex, maxValue, field, zoneId, currPrecision))); } else if (context.isExtractMeasurementColumn(secondExpression)) { throw new IllegalStateException( - "Should not reach here before PredicateCombineIntoTableScanChecker support Extract push-down in third child"); + DataNodeQueryMessages + .QUERY_EXCEPTION_SHOULD_NOT_REACH_HERE_BEFORE_PREDICATECOMBINEINTOTABLESCANCHECKER_C591ED7D); } else if (context.isExtractMeasurementColumn(thirdExpression)) { throw new IllegalStateException( - "Should not reach here before PredicateCombineIntoTableScanChecker support Extract push-down in third child"); + DataNodeQueryMessages + .QUERY_EXCEPTION_SHOULD_NOT_REACH_HERE_BEFORE_PREDICATECOMBINEINTOTABLESCANCHECKER_C591ED7D); } else { throw new IllegalStateException( - String.format("%s is not supported in value push down", node)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_S_IS_NOT_SUPPORTED_IN_VALUE_PUSH_DOWN_DD54E38A, + node)); } } @@ -619,7 +649,8 @@ public static Long getTimestampValue(Expression expression) { return Long.valueOf(((GenericLiteral) expression).getValue()); } else { throw new SemanticException( - "InList Literal for TIMESTAMP can only be LongLiteral, DoubleLiteral and GenericLiteral, current is " + DataNodeQueryMessages + .INLIST_LITERAL_FOR_TIMESTAMP_CAN_ONLY_BE_LONGLITERAL_DOUBLELITERAL_AND_GENERICLITERAL + expression.getClass().getSimpleName()); } } @@ -639,7 +670,9 @@ public int getMeasurementIndex(String measurement) { Integer index = measuremrntsMap.get(measurement); if (index == null) { throw new IllegalArgumentException( - String.format("Measurement %s does not exist", measurement)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_MEASUREMENT_S_DOES_NOT_EXIST_23D2B5BE, + measurement)); } return index; } @@ -648,7 +681,10 @@ public Type getType(Symbol symbol) { Type type = schemaMap.get(symbol).getType(); if (type == null) { throw new IllegalArgumentException( - String.format("ColumnSchema of Symbol %s isn't saved in schemaMap", symbol)); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_COLUMNSCHEMA_OF_SYMBOL_S_ISN_T_SAVED_IN_SCHEMAMAP_3A172EBC, + symbol)); } return type; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/predicate/ConvertPredicateToTimeFilterVisitor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/predicate/ConvertPredicateToTimeFilterVisitor.java index 9347f3cadbd65..18a1aa33f50eb 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/predicate/ConvertPredicateToTimeFilterVisitor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/predicate/ConvertPredicateToTimeFilterVisitor.java @@ -209,7 +209,8 @@ public Filter visitComparisonExpression(ComparisonExpression node, Void context) } } else { throw new IllegalStateException( - "Either left or right operand of ComparisonExpression should have time column."); + DataNodeQueryMessages + .QUERY_EXCEPTION_EITHER_LEFT_OR_RIGHT_OPERAND_OF_COMPARISONEXPRESSION_SHOULD_FC89CE57); } } @@ -262,7 +263,10 @@ public Filter visitBetweenPredicate(BetweenPredicate node, Void context) { // 1 NOT BETWEEN time AND 0 => TRUE checkArgument( value <= maxValue, - String.format("Predicate [%s] should be simplified in previous step", node)); + String.format( + DataNodeQueryMessages + .EXCEPTION_PREDICATE_LEFT_BRACKET_ARG_RIGHT_BRACKET_SHOULD_BE_SIMPLIFIED_IN_PREVIOUS_STEP_9262C154, + node)); return TimeFilterApi.ltEq(value); } else if (thirdExpression instanceof SymbolReference) { // thirdExpression is TIMESTAMP @@ -278,7 +282,10 @@ public Filter visitBetweenPredicate(BetweenPredicate node, Void context) { // 1 NOT BETWEEN 0 AND time => time < 1 checkArgument( value >= minValue, - String.format("Predicate [%s] should be simplified in previous step", node)); + String.format( + DataNodeQueryMessages + .EXCEPTION_PREDICATE_LEFT_BRACKET_ARG_RIGHT_BRACKET_SHOULD_BE_SIMPLIFIED_IN_PREVIOUS_STEP_9262C154, + node)); return TimeFilterApi.gtEq(value); } else if (firstExpression instanceof Extract) { long minValue = getLongValue(secondExpression); @@ -296,13 +303,16 @@ public Filter visitBetweenPredicate(BetweenPredicate node, Void context) { TimeFilterApi.extractTimeLtEq(maxValue, field, zoneId, currPrecision))); } else if (secondExpression instanceof Extract) { throw new IllegalStateException( - "Should not reach here before GlobalTimePredicateExtractVisitor support Extract push-down in second child"); + DataNodeQueryMessages + .QUERY_EXCEPTION_SHOULD_NOT_REACH_HERE_BEFORE_GLOBALTIMEPREDICATEEXTRACTVISITOR_3ECC819B); } else if (thirdExpression instanceof Extract) { throw new IllegalStateException( - "Should not reach here before GlobalTimePredicateExtractVisitor support Extract push-down in third child"); + DataNodeQueryMessages + .QUERY_EXCEPTION_SHOULD_NOT_REACH_HERE_BEFORE_GLOBALTIMEPREDICATEEXTRACTVISITOR_FB8489E8); } else { throw new IllegalStateException( - "Three operand of between expression should have time column."); + DataNodeQueryMessages + .QUERY_EXCEPTION_THREE_OPERAND_OF_BETWEEN_EXPRESSION_SHOULD_HAVE_TIME_COLUMN_25ED881D); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/predicate/PredicateCombineIntoTableScanChecker.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/predicate/PredicateCombineIntoTableScanChecker.java index f63511cc10256..2e64a51f48452 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/predicate/PredicateCombineIntoTableScanChecker.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/predicate/PredicateCombineIntoTableScanChecker.java @@ -36,6 +36,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.SearchedCaseExpression; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.SimpleCaseExpression; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.SymbolReference; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import java.util.List; import java.util.Set; @@ -103,7 +104,8 @@ public Boolean visitLogicalExpression(LogicalExpression node, Void context) { Boolean result = process(child, context); if (result == null) { throw new IllegalStateException( - "Should never return null in PredicateCombineIntoTableScanChecker."); + DataNodeQueryMessages + .QUERY_EXCEPTION_SHOULD_NEVER_RETURN_NULL_IN_PREDICATECOMBINEINTOTABLESCANCHECKER_2A687052); } if (!result) { return Boolean.FALSE; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/predicate/schema/CheckSchemaPredicateVisitor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/predicate/schema/CheckSchemaPredicateVisitor.java index 020e9a8a02122..5962538394fc9 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/predicate/schema/CheckSchemaPredicateVisitor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/predicate/schema/CheckSchemaPredicateVisitor.java @@ -31,6 +31,7 @@ import org.apache.iotdb.commons.schema.table.TsTable; import org.apache.iotdb.commons.schema.table.column.TsTableColumnCategory; import org.apache.iotdb.commons.schema.table.column.TsTableColumnSchema; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.common.MPPQueryContext; import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.AstVisitor; @@ -57,7 +58,8 @@ public Boolean visitLogicalExpression(final LogicalExpression node, final Contex if (node.getOperator().equals(LogicalExpression.Operator.AND)) { if (System.currentTimeMillis() - lastLogTime >= LOG_INTERVAL_MS) { LOGGER.info( - "And expression encountered during tag-determined checking, will be classified into fuzzy expression. Sql: {}", + DataNodeQueryMessages + .AND_EXPRESSION_ENCOUNTERED_DURING_TAG_DETERMINED_CHECKING_WILL_BE_CLASSIFIED_INTO_FUZZY, context.queryContext.getSql()); lastLogTime = System.currentTimeMillis(); } @@ -75,7 +77,8 @@ public Boolean visitNotExpression(final NotExpression node, final Context contex if (node.getValue().getExpressionType().equals(TableExpressionType.LOGICAL_EXPRESSION)) { if (System.currentTimeMillis() - lastLogTime >= LOG_INTERVAL_MS) { LOGGER.info( - "Logical expression type encountered in not expression child during tag-determined checking, will be classified into fuzzy expression. Sql: {}", + DataNodeQueryMessages + .LOGICAL_EXPRESSION_TYPE_ENCOUNTERED_IN_NOT_EXPRESSION_CHILD_DURING_TAG_DETERMINED, context.queryContext.getSql()); lastLogTime = System.currentTimeMillis(); } @@ -108,7 +111,8 @@ private boolean processColumn(final Expression node, final Context context) { if (schema.getColumnCategory() == TsTableColumnCategory.TIME || schema.getColumnCategory() == TsTableColumnCategory.FIELD) { throw new SemanticException( - "The TIME/FIELD columns are currently not allowed in devices related operations"); + DataNodeQueryMessages + .THE_TIME_FIELD_COLUMNS_ARE_CURRENTLY_NOT_ALLOWED_IN_DEVICES_RELATED_OPERATIONS); } return schema.getColumnCategory().equals(TsTableColumnCategory.ATTRIBUTE); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/tablefunction/ArgumentAnalysis.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/tablefunction/ArgumentAnalysis.java index 9c334f7878445..38cce669eceb5 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/tablefunction/ArgumentAnalysis.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/tablefunction/ArgumentAnalysis.java @@ -19,6 +19,7 @@ package org.apache.iotdb.db.queryengine.plan.relational.analyzer.tablefunction; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.udf.api.relational.table.argument.Argument; import java.util.Optional; @@ -31,9 +32,12 @@ public class ArgumentAnalysis { public ArgumentAnalysis( Argument argument, Optional tableArgumentAnalysis) { - this.argument = requireNonNull(argument, "argument is null"); + this.argument = + requireNonNull(argument, DataNodeQueryMessages.EXCEPTION_ARGUMENT_IS_NULL_0CBBD22B); this.tableArgumentAnalysis = - requireNonNull(tableArgumentAnalysis, "tableArgumentAnalysis is null"); + requireNonNull( + tableArgumentAnalysis, + DataNodeQueryMessages.EXCEPTION_TABLEARGUMENTANALYSIS_IS_NULL_CF9F0E25); } public Argument getArgument() { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/tablefunction/ArgumentsAnalysis.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/tablefunction/ArgumentsAnalysis.java index e7227db48207a..d07e05c565e3b 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/tablefunction/ArgumentsAnalysis.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/tablefunction/ArgumentsAnalysis.java @@ -19,6 +19,7 @@ package org.apache.iotdb.db.queryengine.plan.relational.analyzer.tablefunction; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.udf.api.relational.table.argument.Argument; import com.google.common.collect.ImmutableList; @@ -36,10 +37,14 @@ public class ArgumentsAnalysis { public ArgumentsAnalysis( Map passedArguments, List tableArgumentAnalyses) { this.passedArguments = - ImmutableMap.copyOf(requireNonNull(passedArguments, "passedArguments is null")); + ImmutableMap.copyOf( + requireNonNull( + passedArguments, DataNodeQueryMessages.EXCEPTION_PASSEDARGUMENTS_IS_NULL_98D8CB1F)); this.tableArgumentAnalyses = ImmutableList.copyOf( - requireNonNull(tableArgumentAnalyses, "tableArgumentAnalyses is null")); + requireNonNull( + tableArgumentAnalyses, + DataNodeQueryMessages.EXCEPTION_TABLEARGUMENTANALYSES_IS_NULL_C8724E40)); } public Map getPassedArguments() { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/tablefunction/TableArgumentAnalysis.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/tablefunction/TableArgumentAnalysis.java index 6f9cbf12954b4..a909becbb6b96 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/tablefunction/TableArgumentAnalysis.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/tablefunction/TableArgumentAnalysis.java @@ -23,6 +23,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.OrderBy; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.QualifiedName; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Relation; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import com.google.common.collect.ImmutableList; import com.google.errorprone.annotations.CanIgnoreReturnValue; @@ -49,12 +50,16 @@ private TableArgumentAnalysis( Optional orderBy, boolean rowSemantics, boolean passThroughColumns) { - this.argumentName = requireNonNull(argumentName, "argumentName is null"); - this.name = requireNonNull(name, "name is null"); - this.relation = requireNonNull(relation, "relation is null"); + this.argumentName = + requireNonNull(argumentName, DataNodeQueryMessages.EXCEPTION_ARGUMENTNAME_IS_NULL_7F8F665F); + this.name = requireNonNull(name, DataNodeQueryMessages.EXCEPTION_NAME_IS_NULL_C8B35959); + this.relation = + requireNonNull(relation, DataNodeQueryMessages.EXCEPTION_RELATION_IS_NULL_890596ED); this.partitionBy = - requireNonNull(partitionBy, "partitionBy is null").map(ImmutableList::copyOf); - this.orderBy = requireNonNull(orderBy, "orderBy is null"); + requireNonNull(partitionBy, DataNodeQueryMessages.EXCEPTION_PARTITIONBY_IS_NULL_84791B6B) + .map(ImmutableList::copyOf); + this.orderBy = + requireNonNull(orderBy, DataNodeQueryMessages.EXCEPTION_ORDERBY_IS_NULL_AA2494DE); this.rowSemantics = rowSemantics; this.passThroughColumns = passThroughColumns; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/execution/querystats/QueryPlanOptimizerStatistics.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/execution/querystats/QueryPlanOptimizerStatistics.java index 3b9867b0d1822..affe25a0b501c 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/execution/querystats/QueryPlanOptimizerStatistics.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/execution/querystats/QueryPlanOptimizerStatistics.java @@ -19,6 +19,8 @@ package org.apache.iotdb.db.queryengine.plan.relational.execution.querystats; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; + import static java.util.Objects.requireNonNull; /** @@ -34,7 +36,7 @@ public class QueryPlanOptimizerStatistics { public QueryPlanOptimizerStatistics( String rule, long invocations, long applied, long totalTime, long failures) { - this.rule = requireNonNull(rule, "rule is null"); + this.rule = requireNonNull(rule, DataNodeQueryMessages.EXCEPTION_RULE_IS_NULL_5387C8CC); this.invocations = invocations; this.applied = applied; this.totalTime = totalTime; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/execution/querystats/QueryPlanOptimizerStats.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/execution/querystats/QueryPlanOptimizerStats.java index e7867ff4f8570..207cc0d45e2e6 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/execution/querystats/QueryPlanOptimizerStats.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/execution/querystats/QueryPlanOptimizerStats.java @@ -19,6 +19,8 @@ package org.apache.iotdb.db.queryengine.plan.relational.execution.querystats; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; + import java.util.concurrent.atomic.AtomicLong; import static com.google.common.base.Preconditions.checkArgument; @@ -32,7 +34,7 @@ public class QueryPlanOptimizerStats { private final AtomicLong failures = new AtomicLong(); public QueryPlanOptimizerStats(String rule) { - this.rule = requireNonNull(rule, "rule is null"); + this.rule = requireNonNull(rule, DataNodeQueryMessages.EXCEPTION_RULE_IS_NULL_5387C8CC); } public void record(long nanos, boolean applied) { @@ -76,7 +78,8 @@ public QueryPlanOptimizerStatistics snapshot() { public QueryPlanOptimizerStats merge(QueryPlanOptimizerStats other) { checkArgument( rule.equals(other.getRule()), - "Cannot merge stats for different rules: %s and %s", + DataNodeQueryMessages + .EXCEPTION_CANNOT_MERGE_STATS_FOR_DIFFERENT_RULES_COLON_ARG_AND_ARG_F0A5D5E6, rule, other.getRule()); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/DeviceEntry.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/DeviceEntry.java index 077d3c54adea7..4701e0e9c62b1 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/DeviceEntry.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/DeviceEntry.java @@ -19,6 +19,7 @@ package org.apache.iotdb.db.queryengine.plan.relational.metadata; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.relational.metadata.fetcher.cache.TableDeviceSchemaCache; import org.apache.iotdb.db.schemaengine.schemaregion.ISchemaRegion; @@ -148,7 +149,9 @@ private static DeviceEntry constructDeviceEntry( return new NonAlignedDeviceEntry(deviceID, attributeColumnValues); default: throw new UnsupportedOperationException( - "Unknown AlignedDeviceEntry Type: " + DeviceEntryType.values()[ordinal]); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNKNOWN_ALIGNEDDEVICEENTRY_TYPE_S_370A0039, + DeviceEntryType.values()[ordinal])); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/OperatorNotFoundException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/OperatorNotFoundException.java index d16f79da47c9e..ca4f97ab096a8 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/OperatorNotFoundException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/OperatorNotFoundException.java @@ -47,10 +47,13 @@ public OperatorNotFoundException( formatErrorMessage(operatorType, argumentTypes, Optional.empty()), cause, OPERATOR_NOT_FOUND.getStatusCode()); - this.operatorType = requireNonNull(operatorType, "operatorType is null"); + this.operatorType = + requireNonNull(operatorType, DataNodeQueryMessages.EXCEPTION_OPERATORTYPE_IS_NULL_CEA6E3D3); this.returnType = null; this.argumentTypes = - ImmutableList.copyOf(requireNonNull(argumentTypes, "argumentTypes is null")); + ImmutableList.copyOf( + requireNonNull( + argumentTypes, DataNodeQueryMessages.EXCEPTION_ARGUMENTTYPES_IS_NULL_1E377BFD)); } public OperatorNotFoundException( @@ -62,10 +65,14 @@ public OperatorNotFoundException( formatErrorMessage(operatorType, argumentTypes, Optional.of(returnType)), cause, OPERATOR_NOT_FOUND.getStatusCode()); - this.operatorType = requireNonNull(operatorType, "operatorType is null"); + this.operatorType = + requireNonNull(operatorType, DataNodeQueryMessages.EXCEPTION_OPERATORTYPE_IS_NULL_CEA6E3D3); this.argumentTypes = - ImmutableList.copyOf(requireNonNull(argumentTypes, "argumentTypes is null")); - this.returnType = requireNonNull(returnType, "returnType is null"); + ImmutableList.copyOf( + requireNonNull( + argumentTypes, DataNodeQueryMessages.EXCEPTION_ARGUMENTTYPES_IS_NULL_1E377BFD)); + this.returnType = + requireNonNull(returnType, DataNodeQueryMessages.EXCEPTION_RETURNTYPE_IS_NULL_07C7C6A5); } private static String formatErrorMessage( diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/TableMetadata.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/TableMetadata.java index 7ce8b3a3bc6d9..f72238d23fbc0 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/TableMetadata.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/TableMetadata.java @@ -21,6 +21,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.metadata.ColumnMetadata; import org.apache.iotdb.commons.queryengine.plan.relational.metadata.TableSchema; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import java.util.ArrayList; import java.util.Collections; @@ -52,9 +53,9 @@ public TableMetadata( List columns, Map properties, Optional comment) { - requireNonNull(table, "table is null"); - requireNonNull(columns, "columns is null"); - requireNonNull(comment, "comment is null"); + requireNonNull(table, DataNodeQueryMessages.EXCEPTION_TABLE_IS_NULL_8DDD9098); + requireNonNull(columns, DataNodeQueryMessages.EXCEPTION_COLUMNS_IS_NULL_6C8F32B3); + requireNonNull(comment, DataNodeQueryMessages.EXCEPTION_COMMENT_IS_NULL_0AD46118); this.table = table; this.columns = new ArrayList<>(columns); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/TableMetadataImpl.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/TableMetadataImpl.java index 2f0f12b9f8c32..b404c9586b35f 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/TableMetadataImpl.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/TableMetadataImpl.java @@ -220,18 +220,20 @@ public static Type getFunctionType(String functionName, List arg && CommonMetadataUtils.isNumericType(argumentTypes.get(0)) && BOOLEAN.equals(argumentTypes.get(1)))) { throw new SemanticException( - "Scalar function " + DataNodeQueryMessages.SCALAR_FUNCTION + functionName.toLowerCase(Locale.ENGLISH) - + " only supports one numeric data types [INT32, INT64, FLOAT, DOUBLE] and one boolean"); + + DataNodeQueryMessages + .ONLY_SUPPORTS_ONE_NUMERIC_DATA_TYPES_INT32_INT64_FLOAT_DOUBLE_AND_ONE_BOOLEAN); } return DOUBLE; } else if (TableBuiltinScalarFunction.ROUND.getFunctionName().equalsIgnoreCase(functionName)) { if (!CommonMetadataUtils.isOneSupportedMathNumericType(argumentTypes) && !CommonMetadataUtils.isTwoSupportedMathNumericType(argumentTypes)) { throw new SemanticException( - "Scalar function " + DataNodeQueryMessages.SCALAR_FUNCTION + functionName.toLowerCase(Locale.ENGLISH) - + " only supports two numeric data types [INT32, INT64, FLOAT, DOUBLE]"); + + DataNodeQueryMessages + .ONLY_SUPPORTS_TWO_NUMERIC_DATA_TYPES_INT32_INT64_FLOAT_DOUBLE); } return DOUBLE; } else if (TableBuiltinScalarFunction.REPLACE @@ -241,9 +243,10 @@ public static Type getFunctionType(String functionName, List arg if (!CommonMetadataUtils.isTwoCharType(argumentTypes) && !CommonMetadataUtils.isThreeCharType(argumentTypes)) { throw new SemanticException( - "Scalar function " + DataNodeQueryMessages.SCALAR_FUNCTION + functionName.toLowerCase(Locale.ENGLISH) - + " only accepts two or three arguments and they must be text or string data type."); + + DataNodeQueryMessages + .ONLY_ACCEPTS_TWO_OR_THREE_ARGUMENTS_AND_THEY_MUST_BE_TEXT_OR_STRING_DATA_TYPE); } return STRING; } else if (TableBuiltinScalarFunction.SUBSTRING @@ -257,9 +260,10 @@ public static Type getFunctionType(String functionName, List arg && CommonMetadataUtils.isIntegerNumber(argumentTypes.get(1)) && CommonMetadataUtils.isIntegerNumber(argumentTypes.get(2)))) { throw new SemanticException( - "Scalar function " + DataNodeQueryMessages.SCALAR_FUNCTION + functionName.toLowerCase(Locale.ENGLISH) - + " only accepts two or three arguments and first must be text or string data type, second and third must be numeric data types [INT32, INT64]"); + + DataNodeQueryMessages + .ONLY_ACCEPTS_TWO_OR_THREE_ARGUMENTS_AND_FIRST_MUST_BE_TEXT_OR_STRING_DATA_TYPE_SECOND); } return STRING; } else if (TableBuiltinScalarFunction.LENGTH.getFunctionName().equalsIgnoreCase(functionName)) { @@ -268,52 +272,58 @@ public static Type getFunctionType(String functionName, List arg || CommonMetadataUtils.isBlobType(argumentTypes.get(0)) || CommonMetadataUtils.isObjectType(argumentTypes.get(0))))) { throw new SemanticException( - "Scalar function " + DataNodeQueryMessages.SCALAR_FUNCTION + functionName.toLowerCase(Locale.ENGLISH) - + " only accepts one argument and it must be text or string or blob or object data type."); + + DataNodeQueryMessages + .ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_TEXT_OR_STRING_OR_BLOB_OR_OBJECT_DATA_TYPE); } return INT64; } else if (TableBuiltinScalarFunction.UPPER.getFunctionName().equalsIgnoreCase(functionName)) { if (!(argumentTypes.size() == 1 && CommonMetadataUtils.isCharType(argumentTypes.get(0)))) { throw new SemanticException( - "Scalar function " + DataNodeQueryMessages.SCALAR_FUNCTION + functionName.toLowerCase(Locale.ENGLISH) - + " only accepts one argument and it must be text or string data type."); + + DataNodeQueryMessages + .ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_TEXT_OR_STRING_DATA_TYPE); } return STRING; } else if (TableBuiltinScalarFunction.LOWER.getFunctionName().equalsIgnoreCase(functionName)) { if (!(argumentTypes.size() == 1 && CommonMetadataUtils.isCharType(argumentTypes.get(0)))) { throw new SemanticException( - "Scalar function " + DataNodeQueryMessages.SCALAR_FUNCTION + functionName.toLowerCase(Locale.ENGLISH) - + " only accepts one argument and it must be text or string data type."); + + DataNodeQueryMessages + .ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_TEXT_OR_STRING_DATA_TYPE); } return STRING; } else if (TableBuiltinScalarFunction.TRIM.getFunctionName().equalsIgnoreCase(functionName)) { if (!(argumentTypes.size() == 1 && CommonMetadataUtils.isCharType(argumentTypes.get(0))) && !(argumentTypes.size() == 2 && CommonMetadataUtils.isTwoCharType(argumentTypes))) { throw new SemanticException( - "Scalar function " + DataNodeQueryMessages.SCALAR_FUNCTION + functionName.toLowerCase(Locale.ENGLISH) - + " only accepts one or two arguments and they must be text or string data type."); + + DataNodeQueryMessages + .ONLY_ACCEPTS_ONE_OR_TWO_ARGUMENTS_AND_THEY_MUST_BE_TEXT_OR_STRING_DATA_TYPE); } return STRING; } else if (TableBuiltinScalarFunction.LTRIM.getFunctionName().equalsIgnoreCase(functionName)) { if (!(argumentTypes.size() == 1 && CommonMetadataUtils.isCharType(argumentTypes.get(0))) && !(argumentTypes.size() == 2 && CommonMetadataUtils.isTwoCharType(argumentTypes))) { throw new SemanticException( - "Scalar function " + DataNodeQueryMessages.SCALAR_FUNCTION + functionName.toLowerCase(Locale.ENGLISH) - + " only accepts one or two arguments and they must be text or string data type."); + + DataNodeQueryMessages + .ONLY_ACCEPTS_ONE_OR_TWO_ARGUMENTS_AND_THEY_MUST_BE_TEXT_OR_STRING_DATA_TYPE); } return STRING; } else if (TableBuiltinScalarFunction.RTRIM.getFunctionName().equalsIgnoreCase(functionName)) { if (!(argumentTypes.size() == 1 && CommonMetadataUtils.isCharType(argumentTypes.get(0))) && !(argumentTypes.size() == 2 && CommonMetadataUtils.isTwoCharType(argumentTypes))) { throw new SemanticException( - "Scalar function " + DataNodeQueryMessages.SCALAR_FUNCTION + functionName.toLowerCase(Locale.ENGLISH) - + " only accepts one or two arguments and they must be text or string data type."); + + DataNodeQueryMessages + .ONLY_ACCEPTS_ONE_OR_TWO_ARGUMENTS_AND_THEY_MUST_BE_TEXT_OR_STRING_DATA_TYPE); } return STRING; } else if (TableBuiltinScalarFunction.REGEXP_LIKE @@ -321,17 +331,19 @@ public static Type getFunctionType(String functionName, List arg .equalsIgnoreCase(functionName)) { if (!CommonMetadataUtils.isTwoCharType(argumentTypes)) { throw new SemanticException( - "Scalar function " + DataNodeQueryMessages.SCALAR_FUNCTION + functionName.toLowerCase(Locale.ENGLISH) - + " only accepts two arguments and they must be text or string data type."); + + DataNodeQueryMessages + .ONLY_ACCEPTS_TWO_ARGUMENTS_AND_THEY_MUST_BE_TEXT_OR_STRING_DATA_TYPE); } return BOOLEAN; } else if (TableBuiltinScalarFunction.STRPOS.getFunctionName().equalsIgnoreCase(functionName)) { if (!CommonMetadataUtils.isTwoCharType(argumentTypes)) { throw new SemanticException( - "Scalar function " + DataNodeQueryMessages.SCALAR_FUNCTION + functionName.toLowerCase(Locale.ENGLISH) - + " only accepts two arguments and they must be text or string data type."); + + DataNodeQueryMessages + .ONLY_ACCEPTS_TWO_ARGUMENTS_AND_THEY_MUST_BE_TEXT_OR_STRING_DATA_TYPE); } return INT32; } else if (TableBuiltinScalarFunction.STARTS_WITH @@ -339,9 +351,10 @@ public static Type getFunctionType(String functionName, List arg .equalsIgnoreCase(functionName)) { if (!CommonMetadataUtils.isTwoCharType(argumentTypes)) { throw new SemanticException( - "Scalar function " + DataNodeQueryMessages.SCALAR_FUNCTION + functionName.toLowerCase(Locale.ENGLISH) - + " only accepts two arguments and they must be text or string data type."); + + DataNodeQueryMessages + .ONLY_ACCEPTS_TWO_ARGUMENTS_AND_THEY_MUST_BE_TEXT_OR_STRING_DATA_TYPE); } return BOOLEAN; } else if (TableBuiltinScalarFunction.ENDS_WITH @@ -349,107 +362,119 @@ public static Type getFunctionType(String functionName, List arg .equalsIgnoreCase(functionName)) { if (!CommonMetadataUtils.isTwoCharType(argumentTypes)) { throw new SemanticException( - "Scalar function " + DataNodeQueryMessages.SCALAR_FUNCTION + functionName.toLowerCase(Locale.ENGLISH) - + " only accepts two arguments and they must be text or string data type."); + + DataNodeQueryMessages + .ONLY_ACCEPTS_TWO_ARGUMENTS_AND_THEY_MUST_BE_TEXT_OR_STRING_DATA_TYPE); } return BOOLEAN; } else if (TableBuiltinScalarFunction.CONCAT.getFunctionName().equalsIgnoreCase(functionName)) { if (!(argumentTypes.size() >= 2 && argumentTypes.stream().allMatch(CommonMetadataUtils::isCharType))) { throw new SemanticException( - "Scalar function " + DataNodeQueryMessages.SCALAR_FUNCTION + functionName.toLowerCase(Locale.ENGLISH) - + " only accepts two or more arguments and they must be text or string data type."); + + DataNodeQueryMessages + .ONLY_ACCEPTS_TWO_OR_MORE_ARGUMENTS_AND_THEY_MUST_BE_TEXT_OR_STRING_DATA_TYPE); } return STRING; } else if (TableBuiltinScalarFunction.STRCMP.getFunctionName().equalsIgnoreCase(functionName)) { if (!CommonMetadataUtils.isTwoCharType(argumentTypes)) { throw new SemanticException( - "Scalar function " + DataNodeQueryMessages.SCALAR_FUNCTION + functionName.toLowerCase(Locale.ENGLISH) - + " only accepts two arguments and they must be text or string data type."); + + DataNodeQueryMessages + .ONLY_ACCEPTS_TWO_ARGUMENTS_AND_THEY_MUST_BE_TEXT_OR_STRING_DATA_TYPE); } return INT32; } else if (TableBuiltinScalarFunction.SIN.getFunctionName().equalsIgnoreCase(functionName)) { if (!(argumentTypes.size() == 1 && CommonMetadataUtils.isSupportedMathNumericType(argumentTypes.get(0)))) { throw new SemanticException( - "Scalar function " + DataNodeQueryMessages.SCALAR_FUNCTION + functionName.toLowerCase(Locale.ENGLISH) - + " only accepts one argument and it must be Double, Float, Int32 or Int64 data type."); + + DataNodeQueryMessages + .ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_DOUBLE_FLOAT_INT32_OR_INT64_DATA_TYPE); } return DOUBLE; } else if (TableBuiltinScalarFunction.COS.getFunctionName().equalsIgnoreCase(functionName)) { if (!(argumentTypes.size() == 1 && CommonMetadataUtils.isSupportedMathNumericType(argumentTypes.get(0)))) { throw new SemanticException( - "Scalar function " + DataNodeQueryMessages.SCALAR_FUNCTION + functionName.toLowerCase(Locale.ENGLISH) - + " only accepts one argument and it must be Double, Float, Int32 or Int64 data type."); + + DataNodeQueryMessages + .ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_DOUBLE_FLOAT_INT32_OR_INT64_DATA_TYPE); } return DOUBLE; } else if (TableBuiltinScalarFunction.TAN.getFunctionName().equalsIgnoreCase(functionName)) { if (!(argumentTypes.size() == 1 && CommonMetadataUtils.isSupportedMathNumericType(argumentTypes.get(0)))) { throw new SemanticException( - "Scalar function " + DataNodeQueryMessages.SCALAR_FUNCTION + functionName.toLowerCase(Locale.ENGLISH) - + " only accepts one argument and it must be Double, Float, Int32 or Int64 data type."); + + DataNodeQueryMessages + .ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_DOUBLE_FLOAT_INT32_OR_INT64_DATA_TYPE); } return DOUBLE; } else if (TableBuiltinScalarFunction.ASIN.getFunctionName().equalsIgnoreCase(functionName)) { if (!(argumentTypes.size() == 1 && CommonMetadataUtils.isSupportedMathNumericType(argumentTypes.get(0)))) { throw new SemanticException( - "Scalar function " + DataNodeQueryMessages.SCALAR_FUNCTION + functionName.toLowerCase(Locale.ENGLISH) - + " only accepts one argument and it must be Double, Float, Int32 or Int64 data type."); + + DataNodeQueryMessages + .ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_DOUBLE_FLOAT_INT32_OR_INT64_DATA_TYPE); } return DOUBLE; } else if (TableBuiltinScalarFunction.ACOS.getFunctionName().equalsIgnoreCase(functionName)) { if (!(argumentTypes.size() == 1 && CommonMetadataUtils.isSupportedMathNumericType(argumentTypes.get(0)))) { throw new SemanticException( - "Scalar function " + DataNodeQueryMessages.SCALAR_FUNCTION + functionName.toLowerCase(Locale.ENGLISH) - + " only accepts one argument and it must be Double, Float, Int32 or Int64 data type."); + + DataNodeQueryMessages + .ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_DOUBLE_FLOAT_INT32_OR_INT64_DATA_TYPE); } return DOUBLE; } else if (TableBuiltinScalarFunction.ATAN.getFunctionName().equalsIgnoreCase(functionName)) { if (!(argumentTypes.size() == 1 && CommonMetadataUtils.isSupportedMathNumericType(argumentTypes.get(0)))) { throw new SemanticException( - "Scalar function " + DataNodeQueryMessages.SCALAR_FUNCTION + functionName.toLowerCase(Locale.ENGLISH) - + " only accepts one argument and it must be Double, Float, Int32 or Int64 data type."); + + DataNodeQueryMessages + .ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_DOUBLE_FLOAT_INT32_OR_INT64_DATA_TYPE); } return DOUBLE; } else if (TableBuiltinScalarFunction.SINH.getFunctionName().equalsIgnoreCase(functionName)) { if (!(argumentTypes.size() == 1 && CommonMetadataUtils.isSupportedMathNumericType(argumentTypes.get(0)))) { throw new SemanticException( - "Scalar function " + DataNodeQueryMessages.SCALAR_FUNCTION + functionName.toLowerCase(Locale.ENGLISH) - + " only accepts one argument and it must be Double, Float, Int32 or Int64 data type."); + + DataNodeQueryMessages + .ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_DOUBLE_FLOAT_INT32_OR_INT64_DATA_TYPE); } return DOUBLE; } else if (TableBuiltinScalarFunction.COSH.getFunctionName().equalsIgnoreCase(functionName)) { if (!(argumentTypes.size() == 1 && CommonMetadataUtils.isSupportedMathNumericType(argumentTypes.get(0)))) { throw new SemanticException( - "Scalar function " + DataNodeQueryMessages.SCALAR_FUNCTION + functionName.toLowerCase(Locale.ENGLISH) - + " only accepts one argument and it must be Double, Float, Int32 or Int64 data type."); + + DataNodeQueryMessages + .ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_DOUBLE_FLOAT_INT32_OR_INT64_DATA_TYPE); } return DOUBLE; } else if (TableBuiltinScalarFunction.TANH.getFunctionName().equalsIgnoreCase(functionName)) { if (!(argumentTypes.size() == 1 && CommonMetadataUtils.isSupportedMathNumericType(argumentTypes.get(0)))) { throw new SemanticException( - "Scalar function " + DataNodeQueryMessages.SCALAR_FUNCTION + functionName.toLowerCase(Locale.ENGLISH) - + " only accepts one argument and it must be Double, Float, Int32 or Int64 data type."); + + DataNodeQueryMessages + .ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_DOUBLE_FLOAT_INT32_OR_INT64_DATA_TYPE); } return DOUBLE; } else if (TableBuiltinScalarFunction.DEGREES @@ -458,9 +483,10 @@ public static Type getFunctionType(String functionName, List arg if (!(argumentTypes.size() == 1 && CommonMetadataUtils.isSupportedMathNumericType(argumentTypes.get(0)))) { throw new SemanticException( - "Scalar function " + DataNodeQueryMessages.SCALAR_FUNCTION + functionName.toLowerCase(Locale.ENGLISH) - + " only accepts one argument and it must be Double, Float, Int32 or Int64 data type."); + + DataNodeQueryMessages + .ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_DOUBLE_FLOAT_INT32_OR_INT64_DATA_TYPE); } return DOUBLE; } else if (TableBuiltinScalarFunction.RADIANS @@ -469,97 +495,106 @@ public static Type getFunctionType(String functionName, List arg if (!(argumentTypes.size() == 1 && CommonMetadataUtils.isSupportedMathNumericType(argumentTypes.get(0)))) { throw new SemanticException( - "Scalar function " + DataNodeQueryMessages.SCALAR_FUNCTION + functionName.toLowerCase(Locale.ENGLISH) - + " only accepts one argument and it must be Double, Float, Int32 or Int64 data type."); + + DataNodeQueryMessages + .ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_DOUBLE_FLOAT_INT32_OR_INT64_DATA_TYPE); } return DOUBLE; } else if (TableBuiltinScalarFunction.ABS.getFunctionName().equalsIgnoreCase(functionName)) { if (!(argumentTypes.size() == 1 && CommonMetadataUtils.isSupportedMathNumericType(argumentTypes.get(0)))) { throw new SemanticException( - "Scalar function " + DataNodeQueryMessages.SCALAR_FUNCTION + functionName.toLowerCase(Locale.ENGLISH) - + " only accepts one argument and it must be Double, Float, Int32 or Int64 data type."); + + DataNodeQueryMessages + .ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_DOUBLE_FLOAT_INT32_OR_INT64_DATA_TYPE); } return argumentTypes.get(0); } else if (TableBuiltinScalarFunction.SIGN.getFunctionName().equalsIgnoreCase(functionName)) { if (!(argumentTypes.size() == 1 && CommonMetadataUtils.isSupportedMathNumericType(argumentTypes.get(0)))) { throw new SemanticException( - "Scalar function " + DataNodeQueryMessages.SCALAR_FUNCTION + functionName.toLowerCase(Locale.ENGLISH) - + " only accepts one argument and it must be Double, Float, Int32 or Int64 data type."); + + DataNodeQueryMessages + .ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_DOUBLE_FLOAT_INT32_OR_INT64_DATA_TYPE); } return argumentTypes.get(0); } else if (TableBuiltinScalarFunction.CEIL.getFunctionName().equalsIgnoreCase(functionName)) { if (!(argumentTypes.size() == 1 && CommonMetadataUtils.isSupportedMathNumericType(argumentTypes.get(0)))) { throw new SemanticException( - "Scalar function " + DataNodeQueryMessages.SCALAR_FUNCTION + functionName.toLowerCase(Locale.ENGLISH) - + " only accepts one argument and it must be Double, Float, Int32 or Int64 data type."); + + DataNodeQueryMessages + .ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_DOUBLE_FLOAT_INT32_OR_INT64_DATA_TYPE); } return DOUBLE; } else if (TableBuiltinScalarFunction.FLOOR.getFunctionName().equalsIgnoreCase(functionName)) { if (!(argumentTypes.size() == 1 && CommonMetadataUtils.isSupportedMathNumericType(argumentTypes.get(0)))) { throw new SemanticException( - "Scalar function " + DataNodeQueryMessages.SCALAR_FUNCTION + functionName.toLowerCase(Locale.ENGLISH) - + " only accepts one argument and it must be Double, Float, Int32 or Int64 data type."); + + DataNodeQueryMessages + .ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_DOUBLE_FLOAT_INT32_OR_INT64_DATA_TYPE); } return DOUBLE; } else if (TableBuiltinScalarFunction.EXP.getFunctionName().equalsIgnoreCase(functionName)) { if (!(argumentTypes.size() == 1 && CommonMetadataUtils.isSupportedMathNumericType(argumentTypes.get(0)))) { throw new SemanticException( - "Scalar function " + DataNodeQueryMessages.SCALAR_FUNCTION + functionName.toLowerCase(Locale.ENGLISH) - + " only accepts one argument and it must be Double, Float, Int32 or Int64 data type."); + + DataNodeQueryMessages + .ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_DOUBLE_FLOAT_INT32_OR_INT64_DATA_TYPE); } return DOUBLE; } else if (TableBuiltinScalarFunction.LN.getFunctionName().equalsIgnoreCase(functionName)) { if (!(argumentTypes.size() == 1 && CommonMetadataUtils.isSupportedMathNumericType(argumentTypes.get(0)))) { throw new SemanticException( - "Scalar function " + DataNodeQueryMessages.SCALAR_FUNCTION + functionName.toLowerCase(Locale.ENGLISH) - + " only accepts one argument and it must be Double, Float, Int32 or Int64 data type."); + + DataNodeQueryMessages + .ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_DOUBLE_FLOAT_INT32_OR_INT64_DATA_TYPE); } return DOUBLE; } else if (TableBuiltinScalarFunction.LOG10.getFunctionName().equalsIgnoreCase(functionName)) { if (!(argumentTypes.size() == 1 && CommonMetadataUtils.isSupportedMathNumericType(argumentTypes.get(0)))) { throw new SemanticException( - "Scalar function " + DataNodeQueryMessages.SCALAR_FUNCTION + functionName.toLowerCase(Locale.ENGLISH) - + " only accepts one argument and it must be Double, Float, Int32 or Int64 data type."); + + DataNodeQueryMessages + .ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_DOUBLE_FLOAT_INT32_OR_INT64_DATA_TYPE); } return DOUBLE; } else if (TableBuiltinScalarFunction.SQRT.getFunctionName().equalsIgnoreCase(functionName)) { if (!(argumentTypes.size() == 1 && CommonMetadataUtils.isSupportedMathNumericType(argumentTypes.get(0)))) { throw new SemanticException( - "Scalar function " + DataNodeQueryMessages.SCALAR_FUNCTION + functionName.toLowerCase(Locale.ENGLISH) - + " only accepts one argument and it must be Double, Float, Int32 or Int64 data type."); + + DataNodeQueryMessages + .ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_DOUBLE_FLOAT_INT32_OR_INT64_DATA_TYPE); } return DOUBLE; } else if (TableBuiltinScalarFunction.PI.getFunctionName().equalsIgnoreCase(functionName)) { if (!(argumentTypes.isEmpty())) { throw new SemanticException( - "Scalar function " + DataNodeQueryMessages.SCALAR_FUNCTION + functionName.toLowerCase(Locale.ENGLISH) - + " accepts no argument."); + + DataNodeQueryMessages.ACCEPTS_NO_ARGUMENT); } return DOUBLE; } else if (TableBuiltinScalarFunction.E.getFunctionName().equalsIgnoreCase(functionName)) { if (!(argumentTypes.isEmpty())) { throw new SemanticException( - "Scalar function " + DataNodeQueryMessages.SCALAR_FUNCTION + functionName.toLowerCase(Locale.ENGLISH) - + " accepts no argument."); + + DataNodeQueryMessages.ACCEPTS_NO_ARGUMENT); } return DOUBLE; } else if (TableBuiltinScalarFunction.DATE_BIN @@ -567,17 +602,19 @@ public static Type getFunctionType(String functionName, List arg .equalsIgnoreCase(functionName)) { if (!CommonMetadataUtils.isTimestampType(argumentTypes.get(2))) { throw new SemanticException( - "Scalar function " + DataNodeQueryMessages.SCALAR_FUNCTION + functionName.toLowerCase(Locale.ENGLISH) - + " only accepts two or three arguments and the second and third must be TimeStamp data type."); + + DataNodeQueryMessages + .ONLY_ACCEPTS_TWO_OR_THREE_ARGUMENTS_AND_THE_SECOND_AND_THIRD_MUST_BE_TIMESTAMP_DATA_TYPE); } return TIMESTAMP; } else if (TableBuiltinScalarFunction.FORMAT.getFunctionName().equalsIgnoreCase(functionName)) { if (argumentTypes.size() < 2 || !CommonMetadataUtils.isCharType(argumentTypes.get(0))) { throw new SemanticException( - "Scalar function " + DataNodeQueryMessages.SCALAR_FUNCTION + functionName.toLowerCase(Locale.ENGLISH) - + " must have at least two arguments, and first argument pattern must be TEXT or STRING type."); + + DataNodeQueryMessages + .MUST_HAVE_AT_LEAST_TWO_ARGUMENTS_AND_FIRST_ARGUMENT_PATTERN_MUST_BE_TEXT_OR_STRING_TYPE); } return STRING; } else if (FAIL_FUNCTION_NAME.equalsIgnoreCase(functionName)) { @@ -587,9 +624,10 @@ public static Type getFunctionType(String functionName, List arg if (argumentTypes.size() < 2 || !CommonMetadataUtils.areAllTypesSameAndComparable(argumentTypes)) { throw new SemanticException( - "Scalar function " + DataNodeQueryMessages.SCALAR_FUNCTION + functionName.toLowerCase(Locale.ENGLISH) - + " must have at least two arguments, and all type must be the same."); + + DataNodeQueryMessages + .MUST_HAVE_AT_LEAST_TWO_ARGUMENTS_AND_ALL_TYPE_MUST_BE_THE_SAME); } return argumentTypes.get(0); } else if (TableBuiltinScalarFunction.BIT_COUNT.getFunctionName().equalsIgnoreCase(functionName) @@ -603,7 +641,8 @@ public static Type getFunctionType(String functionName, List arg && CommonMetadataUtils.isIntegerNumber(argumentTypes.get(1)))) { throw new SemanticException( String.format( - "Scalar function %s only accepts two arguments and they must be Int32 or Int64 data type.", + DataNodeQueryMessages + .SCALAR_FUNCTION_S_ONLY_ACCEPTS_TWO_ARGUMENTS_AND_THEY_MUST_BE_INT32_OR_INT64_DATA_TYPE, functionName)); } return INT64; @@ -613,7 +652,8 @@ public static Type getFunctionType(String functionName, List arg if (argumentTypes.size() != 1 || !CommonMetadataUtils.isIntegerNumber(argumentTypes.get(0))) { throw new SemanticException( String.format( - "Scalar function %s only accepts one argument and it must be Int32 or Int64 data type.", + DataNodeQueryMessages + .SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_INT32_OR_INT64_DATA_TYPE, functionName)); } return INT64; @@ -631,7 +671,8 @@ public static Type getFunctionType(String functionName, List arg && CommonMetadataUtils.isIntegerNumber(argumentTypes.get(1)))) { throw new SemanticException( String.format( - "Scalar function %s only accepts two arguments and they must be Int32 or Int64 data type.", + DataNodeQueryMessages + .SCALAR_FUNCTION_S_ONLY_ACCEPTS_TWO_ARGUMENTS_AND_THEY_MUST_BE_INT32_OR_INT64_DATA_TYPE, functionName)); } return argumentTypes.get(0); @@ -643,7 +684,8 @@ public static Type getFunctionType(String functionName, List arg || CommonMetadataUtils.isBlobType(argumentTypes.get(0))))) { throw new SemanticException( String.format( - "Scalar function %s only accepts one argument and it must be TEXT, STRING, or BLOB data type.", + DataNodeQueryMessages + .SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_TEXT_STRING_OR_BLOB_DATA_TYPE, functionName)); } return STRING; @@ -653,7 +695,8 @@ public static Type getFunctionType(String functionName, List arg if (argumentTypes.size() != 1 || !CommonMetadataUtils.isCharType(argumentTypes.get(0))) { throw new SemanticException( String.format( - "Scalar function %s only accepts one argument and it must be TEXT or STRING data type.", + DataNodeQueryMessages + .SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_TEXT_OR_STRING_DATA_TYPE, functionName)); } return BLOB; @@ -665,7 +708,8 @@ public static Type getFunctionType(String functionName, List arg || CommonMetadataUtils.isBlobType(argumentTypes.get(0))))) { throw new SemanticException( String.format( - "Scalar function %s only accepts one argument and it must be TEXT, STRING, or BLOB data type.", + DataNodeQueryMessages + .SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_TEXT_STRING_OR_BLOB_DATA_TYPE, functionName)); } return STRING; @@ -675,7 +719,8 @@ public static Type getFunctionType(String functionName, List arg if (argumentTypes.size() != 1 || !CommonMetadataUtils.isCharType(argumentTypes.get(0))) { throw new SemanticException( String.format( - "Scalar function %s only accepts one argument and it must be TEXT or STRING data type.", + DataNodeQueryMessages + .SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_TEXT_OR_STRING_DATA_TYPE, functionName)); } return BLOB; @@ -687,7 +732,8 @@ public static Type getFunctionType(String functionName, List arg || CommonMetadataUtils.isBlobType(argumentTypes.get(0))))) { throw new SemanticException( String.format( - "Scalar function %s only accepts one argument and it must be TEXT, STRING, or BLOB data type.", + DataNodeQueryMessages + .SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_TEXT_STRING_OR_BLOB_DATA_TYPE, functionName)); } return STRING; @@ -697,7 +743,8 @@ public static Type getFunctionType(String functionName, List arg if (argumentTypes.size() != 1 || !CommonMetadataUtils.isCharType(argumentTypes.get(0))) { throw new SemanticException( String.format( - "Scalar function %s only accepts one argument and it must be TEXT or STRING data type.", + DataNodeQueryMessages + .SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_TEXT_OR_STRING_DATA_TYPE, functionName)); } return BLOB; @@ -707,7 +754,8 @@ public static Type getFunctionType(String functionName, List arg || CommonMetadataUtils.isBlobType(argumentTypes.get(0))))) { throw new SemanticException( String.format( - "Scalar function %s only accepts one argument and it must be TEXT, STRING, or BLOB data type.", + DataNodeQueryMessages + .SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_TEXT_STRING_OR_BLOB_DATA_TYPE, functionName)); } return BLOB; @@ -717,7 +765,8 @@ public static Type getFunctionType(String functionName, List arg || CommonMetadataUtils.isBlobType(argumentTypes.get(0))))) { throw new SemanticException( String.format( - "Scalar function %s only accepts one argument and it must be TEXT, STRING, or BLOB data type.", + DataNodeQueryMessages + .SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_TEXT_STRING_OR_BLOB_DATA_TYPE, functionName)); } return BLOB; @@ -727,7 +776,8 @@ public static Type getFunctionType(String functionName, List arg || CommonMetadataUtils.isBlobType(argumentTypes.get(0))))) { throw new SemanticException( String.format( - "Scalar function %s only accepts one argument and it must be TEXT, STRING, or BLOB data type.", + DataNodeQueryMessages + .SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_TEXT_STRING_OR_BLOB_DATA_TYPE, functionName)); } return BLOB; @@ -737,7 +787,8 @@ public static Type getFunctionType(String functionName, List arg || CommonMetadataUtils.isBlobType(argumentTypes.get(0))))) { throw new SemanticException( String.format( - "Scalar function %s only accepts one argument and it must be TEXT, STRING, or BLOB data type.", + DataNodeQueryMessages + .SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_TEXT_STRING_OR_BLOB_DATA_TYPE, functionName)); } return BLOB; @@ -749,7 +800,8 @@ public static Type getFunctionType(String functionName, List arg || CommonMetadataUtils.isBlobType(argumentTypes.get(0))))) { throw new SemanticException( String.format( - "Scalar function %s only accepts one argument and it must be TEXT, STRING, or BLOB data type.", + DataNodeQueryMessages + .SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_TEXT_STRING_OR_BLOB_DATA_TYPE, functionName)); } return BLOB; @@ -761,7 +813,8 @@ public static Type getFunctionType(String functionName, List arg || CommonMetadataUtils.isBlobType(argumentTypes.get(0))))) { throw new SemanticException( String.format( - "Scalar function %s only accepts one argument and it must be TEXT, STRING, or BLOB data type.", + DataNodeQueryMessages + .SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_TEXT_STRING_OR_BLOB_DATA_TYPE, functionName)); } return BLOB; @@ -771,7 +824,8 @@ public static Type getFunctionType(String functionName, List arg || CommonMetadataUtils.isBlobType(argumentTypes.get(0))))) { throw new SemanticException( String.format( - "Scalar function %s only accepts one argument and it must be TEXT, STRING, or BLOB data type.", + DataNodeQueryMessages + .SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_TEXT_STRING_OR_BLOB_DATA_TYPE, functionName)); } return STRING; @@ -781,7 +835,8 @@ public static Type getFunctionType(String functionName, List arg if (argumentTypes.size() != 1 || !CommonMetadataUtils.isCharType(argumentTypes.get(0))) { throw new SemanticException( String.format( - "Scalar function %s only accepts one argument and it must be TEXT or STRING data type.", + DataNodeQueryMessages + .SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_TEXT_OR_STRING_DATA_TYPE, functionName)); } return BLOB; @@ -793,7 +848,8 @@ public static Type getFunctionType(String functionName, List arg || CommonMetadataUtils.isBlobType(argumentTypes.get(0)))) { throw new SemanticException( String.format( - "Scalar function %s only accepts one argument and it must be TEXT, STRING, or BlOB data type.", + DataNodeQueryMessages + .SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_TEXT_STRING_OR_BLOB_DATA_TYPE_2, functionName)); } return argumentTypes.get(0); @@ -809,7 +865,8 @@ public static Type getFunctionType(String functionName, List arg || !CommonMetadataUtils.isCharType(argumentTypes.get(1))) { throw new SemanticException( String.format( - "Scalar function %s only accepts two arguments, first argument must be TEXT, STRING, or BlOB type, second argument must be STRING OR TEXT type.", + DataNodeQueryMessages + .SCALAR_FUNCTION_S_ONLY_ACCEPTS_TWO_ARGUMENTS_FIRST_ARGUMENT_MUST_BE_TEXT_STRING_OR_BLOB, functionName)); } return BLOB; @@ -819,7 +876,8 @@ public static Type getFunctionType(String functionName, List arg if (argumentTypes.size() != 1 || !INT32.equals(argumentTypes.get(0))) { throw new SemanticException( String.format( - "Scalar function %s only accepts one argument and it must be Int32 data type.", + DataNodeQueryMessages + .SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_INT32_DATA_TYPE, functionName)); } return BLOB; @@ -829,7 +887,8 @@ public static Type getFunctionType(String functionName, List arg if (argumentTypes.size() != 1 || !CommonMetadataUtils.isBlobType(argumentTypes.get(0))) { throw new SemanticException( String.format( - "Scalar function %s only accepts one argument and it must be BLOB data type.", + DataNodeQueryMessages + .SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_BLOB_DATA_TYPE, functionName)); } return INT32; @@ -839,7 +898,8 @@ public static Type getFunctionType(String functionName, List arg if (argumentTypes.size() != 1 || !INT64.equals(argumentTypes.get(0))) { throw new SemanticException( String.format( - "Scalar function %s only accepts one argument and it must be Int64 data type.", + DataNodeQueryMessages + .SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_INT64_DATA_TYPE, functionName)); } return BLOB; @@ -849,7 +909,8 @@ public static Type getFunctionType(String functionName, List arg if (argumentTypes.size() != 1 || !CommonMetadataUtils.isBlobType(argumentTypes.get(0))) { throw new SemanticException( String.format( - "Scalar function %s only accepts one argument and it must be BLOB data type.", + DataNodeQueryMessages + .SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_BLOB_DATA_TYPE, functionName)); } return INT64; @@ -859,7 +920,8 @@ public static Type getFunctionType(String functionName, List arg if (argumentTypes.size() != 1 || !INT32.equals(argumentTypes.get(0))) { throw new SemanticException( String.format( - "Scalar function %s only accepts one argument and it must be Int32 data type.", + DataNodeQueryMessages + .SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_INT32_DATA_TYPE, functionName)); } return BLOB; @@ -869,7 +931,8 @@ public static Type getFunctionType(String functionName, List arg if (argumentTypes.size() != 1 || !CommonMetadataUtils.isBlobType(argumentTypes.get(0))) { throw new SemanticException( String.format( - "Scalar function %s only accepts one argument and it must be BLOB data type.", + DataNodeQueryMessages + .SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_BLOB_DATA_TYPE, functionName)); } return INT32; @@ -879,7 +942,8 @@ public static Type getFunctionType(String functionName, List arg if (argumentTypes.size() != 1 || !INT64.equals(argumentTypes.get(0))) { throw new SemanticException( String.format( - "Scalar function %s only accepts one argument and it must be Int64 data type.", + DataNodeQueryMessages + .SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_INT64_DATA_TYPE, functionName)); } return BLOB; @@ -889,7 +953,8 @@ public static Type getFunctionType(String functionName, List arg if (argumentTypes.size() != 1 || !CommonMetadataUtils.isBlobType(argumentTypes.get(0))) { throw new SemanticException( String.format( - "Scalar function %s only accepts one argument and it must be BLOB data type.", + DataNodeQueryMessages + .SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_BLOB_DATA_TYPE, functionName)); } return INT64; @@ -899,7 +964,8 @@ public static Type getFunctionType(String functionName, List arg if (argumentTypes.size() != 1 || !FLOAT.equals(argumentTypes.get(0))) { throw new SemanticException( String.format( - "Scalar function %s only accepts one argument and it must be Float data type.", + DataNodeQueryMessages + .SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_FLOAT_DATA_TYPE, functionName)); } return BLOB; @@ -909,7 +975,8 @@ public static Type getFunctionType(String functionName, List arg if (argumentTypes.size() != 1 || !CommonMetadataUtils.isBlobType(argumentTypes.get(0))) { throw new SemanticException( String.format( - "Scalar function %s only accepts one argument and it must be BLOB data type.", + DataNodeQueryMessages + .SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_BLOB_DATA_TYPE, functionName)); } return FLOAT; @@ -919,7 +986,8 @@ public static Type getFunctionType(String functionName, List arg if (argumentTypes.size() != 1 || !DOUBLE.equals(argumentTypes.get(0))) { throw new SemanticException( String.format( - "Scalar function %s only accepts one argument and it must be Double data type.", + DataNodeQueryMessages + .SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_DOUBLE_DATA_TYPE, functionName)); } return BLOB; @@ -929,7 +997,8 @@ public static Type getFunctionType(String functionName, List arg if (argumentTypes.size() != 1 || !CommonMetadataUtils.isBlobType(argumentTypes.get(0))) { throw new SemanticException( String.format( - "Scalar function %s only accepts one argument and it must be BLOB data type.", + DataNodeQueryMessages + .SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_BLOB_DATA_TYPE, functionName)); } return DOUBLE; @@ -939,7 +1008,8 @@ public static Type getFunctionType(String functionName, List arg || CommonMetadataUtils.isCharType(argumentTypes.get(0)))) { throw new SemanticException( String.format( - "Scalar function %s only accepts one argument and it must be TEXT, STRING, or BLOB data type.", + DataNodeQueryMessages + .SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_TEXT_STRING_OR_BLOB_DATA_TYPE, functionName)); } return INT64; @@ -954,7 +1024,8 @@ public static Type getFunctionType(String functionName, List arg || CommonMetadataUtils.isCharType(argumentTypes.get(0)))) { throw new SemanticException( String.format( - "Scalar function %s only accepts one argument and it must be TEXT, STRING, or BLOB data type.", + DataNodeQueryMessages + .SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_TEXT_STRING_OR_BLOB_DATA_TYPE, functionName)); } return BLOB; @@ -964,7 +1035,8 @@ public static Type getFunctionType(String functionName, List arg if (argumentTypes.size() != 1 || !INT32.equals(argumentTypes.get(0))) { throw new SemanticException( String.format( - "Scalar function %s only accepts one argument and it must be Int32 data type.", + DataNodeQueryMessages + .SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_INT32_DATA_TYPE, functionName)); } return BLOB; @@ -974,7 +1046,8 @@ public static Type getFunctionType(String functionName, List arg if (argumentTypes.size() != 1 || !CommonMetadataUtils.isBlobType(argumentTypes.get(0))) { throw new SemanticException( String.format( - "Scalar function %s only accepts one argument and it must be BLOB data type.", + DataNodeQueryMessages + .SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_BLOB_DATA_TYPE, functionName)); } return INT32; @@ -984,7 +1057,8 @@ public static Type getFunctionType(String functionName, List arg if (argumentTypes.size() != 1 || !INT64.equals(argumentTypes.get(0))) { throw new SemanticException( String.format( - "Scalar function %s only accepts one argument and it must be Int64 data type.", + DataNodeQueryMessages + .SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_INT64_DATA_TYPE, functionName)); } return BLOB; @@ -994,7 +1068,8 @@ public static Type getFunctionType(String functionName, List arg if (argumentTypes.size() != 1 || !CommonMetadataUtils.isBlobType(argumentTypes.get(0))) { throw new SemanticException( String.format( - "Scalar function %s only accepts one argument and it must be BLOB data type.", + DataNodeQueryMessages + .SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_BLOB_DATA_TYPE, functionName)); } return INT64; @@ -1004,7 +1079,8 @@ public static Type getFunctionType(String functionName, List arg if (argumentTypes.size() != 1 || !INT32.equals(argumentTypes.get(0))) { throw new SemanticException( String.format( - "Scalar function %s only accepts one argument and it must be Int32 data type.", + DataNodeQueryMessages + .SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_INT32_DATA_TYPE, functionName)); } return BLOB; @@ -1014,7 +1090,8 @@ public static Type getFunctionType(String functionName, List arg if (argumentTypes.size() != 1 || !CommonMetadataUtils.isBlobType(argumentTypes.get(0))) { throw new SemanticException( String.format( - "Scalar function %s only accepts one argument and it must be BLOB data type.", + DataNodeQueryMessages + .SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_BLOB_DATA_TYPE, functionName)); } return INT32; @@ -1024,7 +1101,8 @@ public static Type getFunctionType(String functionName, List arg if (argumentTypes.size() != 1 || !INT64.equals(argumentTypes.get(0))) { throw new SemanticException( String.format( - "Scalar function %s only accepts one argument and it must be Int64 data type.", + DataNodeQueryMessages + .SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_INT64_DATA_TYPE, functionName)); } return BLOB; @@ -1034,7 +1112,8 @@ public static Type getFunctionType(String functionName, List arg if (argumentTypes.size() != 1 || !CommonMetadataUtils.isBlobType(argumentTypes.get(0))) { throw new SemanticException( String.format( - "Scalar function %s only accepts one argument and it must be BLOB data type.", + DataNodeQueryMessages + .SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_BLOB_DATA_TYPE, functionName)); } return INT64; @@ -1044,7 +1123,8 @@ public static Type getFunctionType(String functionName, List arg if (argumentTypes.size() != 1 || !FLOAT.equals(argumentTypes.get(0))) { throw new SemanticException( String.format( - "Scalar function %s only accepts one argument and it must be Float data type.", + DataNodeQueryMessages + .SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_FLOAT_DATA_TYPE, functionName)); } return BLOB; @@ -1054,7 +1134,8 @@ public static Type getFunctionType(String functionName, List arg if (argumentTypes.size() != 1 || !CommonMetadataUtils.isBlobType(argumentTypes.get(0))) { throw new SemanticException( String.format( - "Scalar function %s only accepts one argument and it must be BLOB data type.", + DataNodeQueryMessages + .SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_BLOB_DATA_TYPE, functionName)); } return FLOAT; @@ -1064,7 +1145,8 @@ public static Type getFunctionType(String functionName, List arg if (argumentTypes.size() != 1 || !DOUBLE.equals(argumentTypes.get(0))) { throw new SemanticException( String.format( - "Scalar function %s only accepts one argument and it must be Double data type.", + DataNodeQueryMessages + .SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_DOUBLE_DATA_TYPE, functionName)); } return BLOB; @@ -1074,7 +1156,8 @@ public static Type getFunctionType(String functionName, List arg if (argumentTypes.size() != 1 || !CommonMetadataUtils.isBlobType(argumentTypes.get(0))) { throw new SemanticException( String.format( - "Scalar function %s only accepts one argument and it must be BLOB data type.", + DataNodeQueryMessages + .SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_BLOB_DATA_TYPE, functionName)); } return DOUBLE; @@ -1084,7 +1167,8 @@ public static Type getFunctionType(String functionName, List arg || CommonMetadataUtils.isCharType(argumentTypes.get(0)))) { throw new SemanticException( String.format( - "Scalar function %s only accepts one argument and it must be TEXT, STRING, or BLOB data type.", + DataNodeQueryMessages + .SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_TEXT_STRING_OR_BLOB_DATA_TYPE, functionName)); } return INT64; @@ -1099,7 +1183,8 @@ public static Type getFunctionType(String functionName, List arg || CommonMetadataUtils.isCharType(argumentTypes.get(0)))) { throw new SemanticException( String.format( - "Scalar function %s only accepts one argument and it must be TEXT, STRING, or BLOB data type.", + DataNodeQueryMessages + .SCALAR_FUNCTION_S_ONLY_ACCEPTS_ONE_ARGUMENT_AND_IT_MUST_BE_TEXT_STRING_OR_BLOB_DATA_TYPE, functionName)); } return BLOB; @@ -1111,8 +1196,10 @@ public static Type getFunctionType(String functionName, List arg || !CommonMetadataUtils.isBlobType(argumentTypes.get(2))) { throw new SemanticException( String.format( - "Scalar function %s only accepts three arguments, first argument must be BlOB type, " - + "second argument must be int32 or int64 type, third argument must be BLOB type.", + DataNodeQueryMessages + .SCALAR_FUNCTION_S_ONLY_ACCEPTS_THREE_ARGUMENTS_FIRST_ARGUMENT_MUST_BE_BLOB_TYPE + + DataNodeQueryMessages + .SECOND_ARGUMENT_MUST_BE_INT32_OR_INT64_TYPE_THIRD_ARGUMENT_MUST_BE_BLOB_TYPE, functionName)); } return BLOB; @@ -1133,13 +1220,15 @@ public static Type getFunctionType(String functionName, List arg if (argumentTypes.size() != 1) { throw new SemanticException( String.format( - "Aggregate functions [%s] should only have one argument", functionName)); + DataNodeQueryMessages.AGGREGATE_FUNCTIONS_S_SHOULD_ONLY_HAVE_ONE_ARGUMENT, + functionName)); } if (!CommonMetadataUtils.isSupportedMathNumericType(argumentTypes.get(0))) { throw new SemanticException( String.format( - "Aggregate functions [%s] only support numeric data types [INT32, INT64, FLOAT, DOUBLE]", + DataNodeQueryMessages + .AGGREGATE_FUNCTIONS_S_ONLY_SUPPORT_NUMERIC_DATA_TYPES_INT32_INT64_FLOAT_DOUBLE, functionName)); } break; @@ -1151,19 +1240,23 @@ public static Type getFunctionType(String functionName, List arg if (argumentTypes.size() != 2) { throw new SemanticException( String.format( - "Error size of input expressions. expression: %s, actual size: %s, expected size: [2].", - functionName.toUpperCase(), argumentTypes.size())); + DataNodeQueryMessages + .ERROR_SIZE_OF_INPUT_EXPRESSIONS_EXPRESSION_S_ACTUAL_SIZE_S_EXPECTED_SIZE_2, + functionName.toUpperCase(), + argumentTypes.size())); } if (!CommonMetadataUtils.isNumericType(argumentTypes.get(0))) { throw new SemanticException( String.format( - "Aggregate functions [%s] only support numeric data types [INT32, INT64, FLOAT, DOUBLE, TIMESTAMP]", + DataNodeQueryMessages + .AGGREGATE_FUNCTIONS_S_ONLY_SUPPORT_NUMERIC_DATA_TYPES_INT32_INT64_FLOAT_DOUBLE_TIMESTAMP, functionName.toUpperCase())); } if (!CommonMetadataUtils.isNumericType(argumentTypes.get(1))) { throw new SemanticException( String.format( - "Aggregate functions [%s] only support numeric data types [INT32, INT64, FLOAT, DOUBLE, TIMESTAMP]", + DataNodeQueryMessages + .AGGREGATE_FUNCTIONS_S_ONLY_SUPPORT_NUMERIC_DATA_TYPES_INT32_INT64_FLOAT_DOUBLE_TIMESTAMP, functionName.toUpperCase())); } break; @@ -1172,13 +1265,16 @@ public static Type getFunctionType(String functionName, List arg if (argumentTypes.size() != 1) { throw new SemanticException( String.format( - "Error size of input expressions. expression: %s, actual size: %s, expected size: [1].", - functionName.toUpperCase(), argumentTypes.size())); + DataNodeQueryMessages + .ERROR_SIZE_OF_INPUT_EXPRESSIONS_EXPRESSION_S_ACTUAL_SIZE_S_EXPECTED_SIZE_1, + functionName.toUpperCase(), + argumentTypes.size())); } if (!CommonMetadataUtils.isNumericType(argumentTypes.get(0))) { throw new SemanticException( String.format( - "Aggregate functions [%s] only support numeric data types [INT32, INT64, FLOAT, DOUBLE, TIMESTAMP]", + DataNodeQueryMessages + .AGGREGATE_FUNCTIONS_S_ONLY_SUPPORT_NUMERIC_DATA_TYPES_INT32_INT64_FLOAT_DOUBLE_TIMESTAMP, functionName.toUpperCase())); } break; @@ -1188,14 +1284,16 @@ public static Type getFunctionType(String functionName, List arg if (argumentTypes.size() != 1) { throw new SemanticException( String.format( - "Aggregate functions [%s] should only have one argument", functionName)); + DataNodeQueryMessages.AGGREGATE_FUNCTIONS_S_SHOULD_ONLY_HAVE_ONE_ARGUMENT, + functionName)); } break; case SqlConstant.COUNT_IF: if (argumentTypes.size() != 1 || !CommonMetadataUtils.isBool(argumentTypes.get(0))) { throw new SemanticException( String.format( - "Aggregate functions [%s] should only have one boolean expression as argument", + DataNodeQueryMessages + .AGGREGATE_FUNCTIONS_S_SHOULD_ONLY_HAVE_ONE_BOOLEAN_EXPRESSION_AS_ARGUMENT, functionName)); } break; @@ -1204,11 +1302,14 @@ public static Type getFunctionType(String functionName, List arg if (argumentTypes.size() != 2) { throw new SemanticException( String.format( - "Aggregate functions [%s] should only have one or two arguments", functionName)); + DataNodeQueryMessages.AGGREGATE_FUNCTIONS_S_SHOULD_ONLY_HAVE_ONE_OR_TWO_ARGUMENTS, + functionName)); } else if (!CommonMetadataUtils.isTimestampType(argumentTypes.get(1))) { throw new SemanticException( String.format( - "Second argument of Aggregate functions [%s] should be orderable", functionName)); + DataNodeQueryMessages + .SECOND_ARGUMENT_OF_AGGREGATE_FUNCTIONS_S_SHOULD_BE_ORDERABLE, + functionName)); } break; case SqlConstant.FIRST_BY_AGGREGATION: @@ -1216,7 +1317,8 @@ public static Type getFunctionType(String functionName, List arg if (argumentTypes.size() != 3) { throw new SemanticException( String.format( - "Aggregate functions [%s] should only have two or three arguments", + DataNodeQueryMessages + .AGGREGATE_FUNCTIONS_S_SHOULD_ONLY_HAVE_TWO_OR_THREE_ARGUMENTS, functionName)); } break; @@ -1225,11 +1327,14 @@ public static Type getFunctionType(String functionName, List arg if (argumentTypes.size() != 2) { throw new SemanticException( String.format( - "Aggregate functions [%s] should only have two arguments", functionName)); + DataNodeQueryMessages.AGGREGATE_FUNCTIONS_S_SHOULD_ONLY_HAVE_TWO_ARGUMENTS, + functionName)); } else if (!argumentTypes.get(1).isOrderable()) { throw new SemanticException( String.format( - "Second argument of Aggregate functions [%s] should be orderable", functionName)); + DataNodeQueryMessages + .SECOND_ARGUMENT_OF_AGGREGATE_FUNCTIONS_S_SHOULD_BE_ORDERABLE, + functionName)); } break; @@ -1237,14 +1342,16 @@ public static Type getFunctionType(String functionName, List arg if (argumentTypes.size() != 1 && argumentTypes.size() != 2) { throw new SemanticException( String.format( - "Aggregate functions [%s] should only have two arguments", functionName)); + DataNodeQueryMessages.AGGREGATE_FUNCTIONS_S_SHOULD_ONLY_HAVE_TWO_ARGUMENTS, + functionName)); } if (argumentTypes.size() == 2 && !CommonMetadataUtils.isSupportedMathNumericType(argumentTypes.get(1))) { throw new SemanticException( String.format( - "Second argument of Aggregate functions [%s] should be numberic type and do not use expression", + DataNodeQueryMessages + .SECOND_ARGUMENT_OF_AGGREGATE_FUNCTIONS_S_SHOULD_BE_NUMBERIC_TYPE_AND_DO_NOT_USE, functionName)); } break; @@ -1252,7 +1359,8 @@ public static Type getFunctionType(String functionName, List arg if (argumentTypes.size() != 3) { throw new SemanticException( String.format( - "Aggregation functions [%s] should only have three arguments", functionName)); + DataNodeQueryMessages.AGGREGATION_FUNCTIONS_S_SHOULD_ONLY_HAVE_THREE_ARGUMENTS, + functionName)); } break; case SqlConstant.APPROX_PERCENTILE: @@ -1260,7 +1368,8 @@ public static Type getFunctionType(String functionName, List arg if (argumentSize != 2 && argumentSize != 3) { throw new SemanticException( String.format( - "Aggregation functions [%s] should only have two or three arguments", + DataNodeQueryMessages + .AGGREGATION_FUNCTIONS_S_SHOULD_ONLY_HAVE_TWO_OR_THREE_ARGUMENTS, functionName)); } @@ -1268,7 +1377,8 @@ public static Type getFunctionType(String functionName, List arg if (!CommonMetadataUtils.isNumericType(valueColumnType)) { throw new SemanticException( String.format( - "Aggregation functions [%s] should have value column as numeric type [INT32, INT64, FLOAT, DOUBLE, TIMESTAMP]", + DataNodeQueryMessages + .AGGREGATION_FUNCTIONS_S_SHOULD_HAVE_VALUE_COLUMN_AS_NUMERIC_TYPE_INT32_INT64_FLOAT, functionName)); } @@ -1276,7 +1386,8 @@ public static Type getFunctionType(String functionName, List arg if (!CommonMetadataUtils.isDecimalType(percentageType)) { throw new SemanticException( String.format( - "Aggregation functions [%s] should have percentage as decimal type", + DataNodeQueryMessages + .AGGREGATION_FUNCTIONS_S_SHOULD_HAVE_PERCENTAGE_AS_DECIMAL_TYPE, functionName)); } if (argumentSize == 3) { @@ -1284,8 +1395,9 @@ public static Type getFunctionType(String functionName, List arg if (!INT32.equals(weightType) && !CommonMetadataUtils.isUnknownType(weightType)) { throw new SemanticException( String.format( - "Aggregation functions [%s] do not support weight as %s type", - functionName, weightType.getDisplayName())); + DataNodeQueryMessages.AGGREGATION_FUNCTIONS_S_DO_NOT_SUPPORT_WEIGHT_AS_S_TYPE, + functionName, + weightType.getDisplayName())); } } @@ -1343,34 +1455,41 @@ public static Type getFunctionType(String functionName, List arg case SqlConstant.NTILE: if (argumentTypes.size() != 1) { throw new SemanticException( - String.format("Window function [%s] should only have one argument", functionName)); + String.format( + DataNodeQueryMessages.WINDOW_FUNCTION_S_SHOULD_ONLY_HAVE_ONE_ARGUMENT, + functionName)); } break; case SqlConstant.NTH_VALUE: if (argumentTypes.size() != 2 || !CommonMetadataUtils.isIntegerNumber(argumentTypes.get(1))) { throw new SemanticException( - "Window function [nth_value] should only have two argument, and second argument must be integer type"); + DataNodeQueryMessages + .WINDOW_FUNCTION_NTH_VALUE_SHOULD_ONLY_HAVE_TWO_ARGUMENT_AND_SECOND_ARGUMENT_MUST_BE); } break; case SqlConstant.TABLE_FIRST_VALUE: case SqlConstant.TABLE_LAST_VALUE: if (argumentTypes.size() != 1) { throw new SemanticException( - String.format("Window function [%s] should only have one argument", functionName)); + String.format( + DataNodeQueryMessages.WINDOW_FUNCTION_S_SHOULD_ONLY_HAVE_ONE_ARGUMENT, + functionName)); } case SqlConstant.LEAD: case SqlConstant.LAG: if (argumentTypes.isEmpty() || argumentTypes.size() > 3) { throw new SemanticException( String.format( - "Window function [%s] should only have one to three argument", functionName)); + DataNodeQueryMessages.WINDOW_FUNCTION_S_SHOULD_ONLY_HAVE_ONE_TO_THREE_ARGUMENT, + functionName)); } if (argumentTypes.size() >= 2 && !CommonMetadataUtils.isIntegerNumber(argumentTypes.get(1))) { throw new SemanticException( String.format( - "Window function [%s]'s second argument must be integer type", functionName)); + DataNodeQueryMessages.WINDOW_FUNCTION_S_S_SECOND_ARGUMENT_MUST_BE_INTEGER_TYPE, + functionName)); } break; default: diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/fetcher/DeviceInCacheFilterVisitor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/fetcher/DeviceInCacheFilterVisitor.java index 59d7f3006e862..fe56024751df6 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/fetcher/DeviceInCacheFilterVisitor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/fetcher/DeviceInCacheFilterVisitor.java @@ -24,6 +24,7 @@ import org.apache.iotdb.commons.schema.filter.impl.StringValueFilterVisitor; import org.apache.iotdb.commons.schema.filter.impl.singlechild.AttributeFilter; import org.apache.iotdb.commons.schema.filter.impl.singlechild.TagFilter; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.relational.metadata.AlignedDeviceEntry; import org.apache.tsfile.common.conf.TSFileConfig; @@ -45,7 +46,10 @@ public class DeviceInCacheFilterVisitor extends SchemaFilterVisitor> fetchMissingDeviceSchemaForDataInsertion( ? new IoTDBRuntimeException( e.getCause(), TSStatusCode.SYNC_CONNECTION_ERROR.getStatusCode()) : new IoTDBRuntimeException( - String.format("Fetch Table Device Schema failed because %s", e.getMessage()), + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_FETCH_TABLE_DEVICE_SCHEMA_FAILED_BECAUSE_S_20B7D6C2, + e.getMessage()), e.getErrorCode(), e.isUserException()); } @@ -546,7 +549,10 @@ private void fetchMissingDeviceSchemaForQuery( } catch (final IoTDBException e) { t = e; throw new IoTDBRuntimeException( - String.format("Fetch Table Device Schema failed because %s", e.getMessage()), + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_FETCH_TABLE_DEVICE_SCHEMA_FAILED_BECAUSE_S_20B7D6C2, + e.getMessage()), e.getErrorCode(), e.isUserException()); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/fetcher/TableDeviceSchemaValidator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/fetcher/TableDeviceSchemaValidator.java index e783b4589c585..4ae7ce549c6da 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/fetcher/TableDeviceSchemaValidator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/fetcher/TableDeviceSchemaValidator.java @@ -81,7 +81,7 @@ public void validateDeviceSchema( if (LOGGER.isDebugEnabled()) { LOGGER.debug( - "Validating device schema {}.{} and other {} devices", + DataNodeQueryMessages.VALIDATING_DEVICE_SCHEMA_ARG_ARG_AND_OTHER_ARG_DEVICES, schemaValidation.getTableName(), Arrays.toString(deviceIdList.get(0)), deviceIdList.size() - 1); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/fetcher/TableHeaderSchemaValidator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/fetcher/TableHeaderSchemaValidator.java index c2cc7307d57d5..6a08427d82b25 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/fetcher/TableHeaderSchemaValidator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/fetcher/TableHeaderSchemaValidator.java @@ -136,7 +136,8 @@ public Optional validateTableHeaderSchema4TsFile( DataNodeTableCache.getInstance().getTable(database, tableSchema.getTableName(), false); if (table == null) { throw new IllegalStateException( - "auto create table succeed, but cannot get table schema in current node's DataNodeTableCache, may be caused by concurrently auto creating table"); + DataNodeQueryMessages + .QUERY_EXCEPTION_AUTO_CREATE_TABLE_SUCCEED_BUT_CANNOT_GET_TABLE_SCHEMA_IN_74985A8E); } } else { CommonMetadataUtils.throwTableNotExistsException(database, tableSchema.getTableName()); @@ -157,10 +158,11 @@ public Optional validateTableHeaderSchema4TsFile( if (indexIncoming != indexReal) { throw new LoadAnalyzeTableColumnDisorderException( String.format( - "Can not create table because incoming table has no less tag columns than existing table, " - + "and the existing tag columns are not the prefix of the incoming tag columns. " - + "Existing tag column: %s, index in existing table: %s, index in incoming table: %s", - tagName, indexReal, indexIncoming)); + DataNodeQueryMessages + .QUERY_EXCEPTION_CAN_NOT_CREATE_TABLE_BECAUSE_INCOMING_TABLE_HAS_NO_LESS_D3D33555, + tagName, + indexReal, + indexIncoming)); } } } else { @@ -172,10 +174,11 @@ public Optional validateTableHeaderSchema4TsFile( if (indexReal != indexIncoming) { throw new LoadAnalyzeTableColumnDisorderException( String.format( - "Can not create table because existing table has more tag columns than incoming table, " - + "and the incoming tag columns are not the prefix of the existing tag columns. " - + "Incoming tag column: %s, index in existing table: %s, index in incoming table: %s", - tagName, indexReal, indexIncoming)); + DataNodeQueryMessages + .QUERY_EXCEPTION_CAN_NOT_CREATE_TABLE_BECAUSE_EXISTING_TABLE_HAS_MORE_TAG_8364B675, + tagName, + indexReal, + indexIncoming)); } } } @@ -226,14 +229,14 @@ public Optional validateTableHeaderSchema4TsFile( if (columnSchema.getColumnCategory() == null) { throw new SemanticException( String.format( - "Unknown column category for %s. Cannot auto create column.", + DataNodeQueryMessages.UNKNOWN_COLUMN_CATEGORY_FOR_S_CANNOT_AUTO_CREATE_COLUMN, columnSchema.getName()), TSStatusCode.COLUMN_NOT_EXISTS.getStatusCode()); } if (columnSchema.getType() == null) { throw new SemanticException( String.format( - "Unknown column data type for %s. Cannot auto create column.", + DataNodeQueryMessages.UNKNOWN_COLUMN_DATA_TYPE_FOR_S_CANNOT_AUTO_CREATE_COLUMN, columnSchema.getName()), TSStatusCode.COLUMN_NOT_EXISTS.getStatusCode()); } @@ -252,7 +255,8 @@ public Optional validateTableHeaderSchema4TsFile( if (columnSchema.getColumnCategory() != null && !existingColumn.getColumnCategory().equals(columnSchema.getColumnCategory())) { throw new SemanticException( - String.format("Wrong category at column %s.", columnSchema.getName()), + String.format( + DataNodeQueryMessages.WRONG_CATEGORY_AT_COLUMN_S, columnSchema.getName()), TSStatusCode.COLUMN_CATEGORY_MISMATCH.getStatusCode()); } if (noField && existingColumn.getColumnCategory() == TsTableColumnCategory.FIELD) { @@ -275,7 +279,7 @@ public Optional validateTableHeaderSchema4TsFile( && !IoTDBDescriptor.getInstance().getConfig().isEnablePartialInsert()) { throw new SemanticException( String.format( - "Missing columns %s.", + DataNodeQueryMessages.MISSING_COLUMNS_S, missingColumnList.stream().map(ColumnSchema::getName).collect(Collectors.toList())), TSStatusCode.COLUMN_NOT_EXISTS.getStatusCode()); } @@ -378,7 +382,8 @@ public void validateInsertNodeMeasurements( .getTable(database, measurementInfo.getTableName(), false); if (table == null) { throw new IllegalStateException( - "auto create table succeed, but cannot get table schema in current node's DataNodeTableCache, may be caused by concurrently auto creating table"); + DataNodeQueryMessages + .QUERY_EXCEPTION_AUTO_CREATE_TABLE_SUCCEED_BUT_CANNOT_GET_TABLE_SCHEMA_IN_74985A8E); } } else { CommonMetadataUtils.throwTableNotExistsException(database, measurementInfo.getTableName()); @@ -431,7 +436,8 @@ public void validateInsertNodeMeasurements( if (category == null) { throw new SemanticException( String.format( - "Unknown column category for %s. Cannot auto create column.", measurementName), + DataNodeQueryMessages.UNKNOWN_COLUMN_CATEGORY_FOR_S_CANNOT_AUTO_CREATE_COLUMN, + measurementName), TSStatusCode.COLUMN_NOT_EXISTS.getStatusCode()); } missingMeasurementIndices.add(i); @@ -450,7 +456,7 @@ public void validateInsertNodeMeasurements( // Only check column category if (category != null && !existingColumn.getColumnCategory().equals(category)) { throw new SemanticException( - String.format("Wrong category at column %s.", measurementName), + String.format(DataNodeQueryMessages.WRONG_CATEGORY_AT_COLUMN_S, measurementName), TSStatusCode.COLUMN_CATEGORY_MISMATCH.getStatusCode()); } if (noField && existingColumn.getColumnCategory() == TsTableColumnCategory.FIELD) { @@ -504,7 +510,7 @@ public void validateInsertNodeMeasurements( missingNames.add(measurementInfo.getMeasurementName(idx)); } throw new SemanticException( - String.format("Missing columns %s.", missingNames), + String.format(DataNodeQueryMessages.MISSING_COLUMNS_S, missingNames), TSStatusCode.COLUMN_NOT_EXISTS.getStatusCode()); } @@ -551,7 +557,8 @@ private void autoCreateTableFromMeasurementInfo( if (result.getStatusCode().getStatusCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()) { throw new RuntimeException( new IoTDBException( - "Auto create table failed.", result.getStatusCode().getStatusCode())); + DataNodeQueryMessages.AUTO_CREATE_TABLE_FAILED, + result.getStatusCode().getStatusCode())); } DataNodeSchemaLockManager.getInstance() .takeReadLock(context, SchemaLockType.VALIDATE_VS_DELETION_TABLE); @@ -610,7 +617,9 @@ private void autoCreateColumnsFromMeasurements( if (result.getStatusCode().getStatusCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()) { throw new IoTDBRuntimeException( String.format( - "Auto add table column failed: %s.%s", database, measurementInfo.getTableName()), + DataNodeQueryMessages.QUERY_EXCEPTION_AUTO_ADD_TABLE_COLUMN_FAILED_S_S_02F3DD19, + database, + measurementInfo.getTableName()), result.getStatusCode().getStatusCode()); } DataNodeSchemaLockManager.getInstance() @@ -639,7 +648,8 @@ private void autoCreateTable( if (result.getStatusCode().getStatusCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()) { throw new RuntimeException( new IoTDBException( - "Auto create table column failed.", result.getStatusCode().getStatusCode())); + DataNodeQueryMessages.AUTO_CREATE_TABLE_COLUMN_FAILED, + result.getStatusCode().getStatusCode())); } DataNodeSchemaLockManager.getInstance() .takeReadLock(context, SchemaLockType.VALIDATE_VS_DELETION_TABLE); @@ -694,7 +704,10 @@ public TsTable toTsTable(InsertNodeMeasurementInfo measurementInfo) { : null; if (category == null) { throw new ColumnCreationFailException( - "Cannot create column " + columnName + " category is not provided"); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_CANNOT_CREATE_COLUMN_S_CATEGORY_IS_NOT_PROVIDED_E5410BD3, + columnName)); } if (tsTable.getColumnSchema(columnName) != null) { @@ -704,7 +717,10 @@ public TsTable toTsTable(InsertNodeMeasurementInfo measurementInfo) { TSDataType dataType = measurementInfo.getType(i); if (dataType == null && (dataType = measurementInfo.getTypeForFirstValue(i)) == null) { throw new ColumnCreationFailException( - "Cannot create column " + columnName + " datatype is not provided"); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_CANNOT_CREATE_COLUMN_S_DATATYPE_IS_NOT_PROVIDED_2A7D27FA, + columnName)); } if (category == TsTableColumnCategory.TIME && dataType != TSDataType.TIMESTAMP) { @@ -746,7 +762,10 @@ private void addColumnSchema(final List columnSchemas, final TsTab TsTableColumnCategory category = columnSchema.getColumnCategory(); if (category == null) { throw new ColumnCreationFailException( - "Cannot create column " + columnSchema.getName() + " category is not provided"); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_CANNOT_CREATE_COLUMN_S_CATEGORY_IS_NOT_PROVIDED_E5410BD3, + columnSchema.getName())); } final String columnName = columnSchema.getName(); if (tsTable.getColumnSchema(columnName) != null) { @@ -756,7 +775,10 @@ private void addColumnSchema(final List columnSchemas, final TsTab final TSDataType dataType = getTSDataType(columnSchema.getType()); if (dataType == null) { throw new ColumnCreationFailException( - "Cannot create column " + columnSchema.getName() + " datatype is not provided"); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_CANNOT_CREATE_COLUMN_S_DATATYPE_IS_NOT_PROVIDED_2A7D27FA, + columnSchema.getName())); } tsTable.addColumnSchema(generateColumnSchema(category, columnName, dataType, null, null)); } @@ -773,14 +795,16 @@ public static TsTableColumnSchema generateColumnSchema( case TAG: if (!TSDataType.STRING.equals(dataType)) { throw new SemanticException( - "DataType of TAG Column should only be STRING, current is " + dataType); + DataNodeQueryMessages.DATATYPE_OF_TAG_COLUMN_SHOULD_ONLY_BE_STRING_CURRENT_IS + + dataType); } schema = new TagColumnSchema(columnName, dataType); break; case ATTRIBUTE: if (!TSDataType.STRING.equals(dataType)) { throw new SemanticException( - "DataType of ATTRIBUTE Column should only be STRING, current is " + dataType); + DataNodeQueryMessages.DATATYPE_OF_ATTRIBUTE_COLUMN_SHOULD_ONLY_BE_STRING_CURRENT_IS + + dataType); } schema = new AttributeColumnSchema(columnName, dataType); break; @@ -838,8 +862,10 @@ private void autoCreateColumn( throw new RuntimeException( new IoTDBException( String.format( - "Auto add table column failed: %s.%s, %s", - database, tableName, inputColumnList), + DataNodeQueryMessages.AUTO_ADD_TABLE_COLUMN_FAILED_WITH_COLUMNS_FMT, + database, + tableName, + inputColumnList), result.getStatusCode().getStatusCode())); } DataNodeSchemaLockManager.getInstance() @@ -883,7 +909,10 @@ private List parseInputColumnSchema( break; default: throw new IllegalStateException( - "Unknown ColumnCategory for adding column: " + inputColumn.getColumnCategory()); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_UNKNOWN_COLUMNCATEGORY_FOR_ADDING_COLUMN_S_ED1BF7FA, + inputColumn.getColumnCategory())); } } return columnSchemaList; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/fetcher/cache/TableDeviceSchemaCache.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/fetcher/cache/TableDeviceSchemaCache.java index 8e40298e115bd..818f44222c049 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/fetcher/cache/TableDeviceSchemaCache.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/fetcher/cache/TableDeviceSchemaCache.java @@ -31,6 +31,7 @@ import org.apache.iotdb.db.conf.DataNodeMemoryConfig; import org.apache.iotdb.db.conf.IoTDBConfig; import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.common.schematree.DeviceSchemaInfo; import org.apache.iotdb.db.queryengine.plan.analyze.cache.schema.dualkeycache.IDualKeyCache; import org.apache.iotdb.db.queryengine.plan.analyze.cache.schema.dualkeycache.impl.DualKeyCacheBuilder; @@ -478,7 +479,8 @@ void invalidateLastCache(final PartialPath devicePath, final String measurement) return devicePath.matchPrefixPath(new PartialPath(tableId.getTableName())); } catch (final IllegalPathException e) { logger.warn( - "Illegal tableID {} found in cache when invalidating by path {}, invalidate it anyway", + DataNodeQueryMessages + .ILLEGAL_TABLEID_ARG_FOUND_IN_CACHE_WHEN_INVALIDATING_BY_PATH_ARG_INVALIDATE_IT_ANYWAY, tableId.getTableName(), devicePath); return true; @@ -489,7 +491,8 @@ void invalidateLastCache(final PartialPath devicePath, final String measurement) return devicePath.matchFullPath(cachedDeviceID); } catch (final IllegalPathException e) { logger.warn( - "Illegal deviceID {} found in cache when invalidating by path {}, invalidate it anyway", + DataNodeQueryMessages + .ILLEGAL_DEVICEID_ARG_FOUND_IN_CACHE_WHEN_INVALIDATING_BY_PATH_ARG_INVALIDATE_IT_ANYWAY, cachedDeviceID, devicePath); return true; @@ -516,7 +519,8 @@ void invalidateCache( return devicePath.matchPrefixPath(new PartialPath(tableId.getTableName())); } catch (final IllegalPathException e) { logger.warn( - "Illegal tableID {} found in cache when invalidating by path {}, invalidate it anyway", + DataNodeQueryMessages + .ILLEGAL_TABLEID_ARG_FOUND_IN_CACHE_WHEN_INVALIDATING_BY_PATH_ARG_INVALIDATE_IT_ANYWAY, tableId.getTableName(), devicePath); return true; @@ -529,7 +533,8 @@ void invalidateCache( : devicePath.matchFullPath(cachedDeviceID); } catch (final IllegalPathException e) { logger.warn( - "Illegal deviceID {} found in cache when invalidating by path {}, invalidate it anyway", + DataNodeQueryMessages + .ILLEGAL_DEVICEID_ARG_FOUND_IN_CACHE_WHEN_INVALIDATING_BY_PATH_ARG_INVALIDATE_IT_ANYWAY, cachedDeviceID, devicePath); return true; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/fetcher/cache/TreeDeviceSchemaCacheManager.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/fetcher/cache/TreeDeviceSchemaCacheManager.java index 93d75aeff2d8c..f3ef376460a72 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/fetcher/cache/TreeDeviceSchemaCacheManager.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/fetcher/cache/TreeDeviceSchemaCacheManager.java @@ -26,6 +26,7 @@ import org.apache.iotdb.commons.schema.template.Template; import org.apache.iotdb.commons.schema.view.LogicalViewSchema; import org.apache.iotdb.db.exception.metadata.view.InsertNonWritableViewException; +import org.apache.iotdb.db.i18n.DataNodeSchemaMessages; import org.apache.iotdb.db.queryengine.common.schematree.ClusterSchemaTree; import org.apache.iotdb.db.queryengine.common.schematree.IMeasurementSchemaInfo; import org.apache.iotdb.db.queryengine.plan.analyze.schema.ISchemaComputation; @@ -246,8 +247,7 @@ public Pair, List> computeSourceOfLogicalView( throw new RuntimeException( new UnsupportedOperationException( String.format( - "The source of view [%s] is also a view! Nested view is unsupported! " - + "Please check it.", + DataNodeSchemaMessages.NESTED_LOGICAL_VIEW_UNSUPPORTED_FMT, logicalViewSchema.getSourcePathIfWritable()))); } @@ -443,7 +443,7 @@ public MeasurementSchema getSchemaAsMeasurementSchema() { public LogicalViewSchema getSchemaAsLogicalViewSchema() { throw new RuntimeException( new UnsupportedOperationException( - "Function getSchemaAsLogicalViewSchema is not supported in DeviceUsingTemplateSchemaCache.")); + DataNodeSchemaMessages.GET_SCHEMA_AS_LOGICAL_VIEW_SCHEMA_UNSUPPORTED)); } @Override diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/CteMaterializer.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/CteMaterializer.java index 0d949340513ea..c0361b511dca4 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/CteMaterializer.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/CteMaterializer.java @@ -172,7 +172,8 @@ public CteDataStore fetchCteQueryResult( context.reserveMemoryForFrontEnd(tsBlock.get().getRetainedSizeInBytes()); if (!cteDataStore.addTsBlock(tsBlock.get())) { LOGGER.warn( - "Fail to materialize CTE because the data size exceeded memory or the row count threshold"); + DataNodeQueryMessages + .FAIL_TO_MATERIALIZE_CTE_BECAUSE_THE_DATA_SIZE_EXCEEDED_MEMORY_OR_THE_ROW_COUNT_THRESHOLD); if (context.isExplainAnalyze()) { handleCteExplainAnalyzeResults( context, @@ -212,7 +213,8 @@ private TableSchema getTableSchema(DatasetHeader datasetHeader, String cteName) final List columnDataTypes = datasetHeader.getRespDataTypes(); if (columnNames.size() != columnDataTypes.size()) { throw new IoTDBRuntimeException( - "Size of column names and column data types do not match", + DataNodeQueryMessages + .QUERY_EXCEPTION_SIZE_OF_COLUMN_NAMES_AND_COLUMN_DATA_TYPES_DO_NOT_MATCH_9333D273, TSStatusCode.INTERNAL_SERVER_ERROR.getStatusCode()); } @@ -323,7 +325,8 @@ private void handleCteExplainAnalyzeResults( context.addCteExplainResult(table, new Pair<>(maxLineLength, lines)); } catch (FragmentInstanceFetchException e) { throw new IoTDBRuntimeException( - "Failed to fetch fragment instance statistics", + DataNodeQueryMessages + .QUERY_EXCEPTION_FAILED_TO_FETCH_FRAGMENT_INSTANCE_STATISTICS_45176795, TSStatusCode.INTERNAL_SERVER_ERROR.getStatusCode()); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/EqualityInference.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/EqualityInference.java index 0dc4d121d54d3..1f86b6b9389a1 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/EqualityInference.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/EqualityInference.java @@ -22,6 +22,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.ComparisonExpression; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Expression; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.SymbolReference; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.relational.metadata.Metadata; import org.apache.iotdb.db.queryengine.plan.relational.planner.ir.SubExpressionExtractor; import org.apache.iotdb.db.queryengine.plan.relational.utils.DisjointSet; @@ -417,13 +418,20 @@ public EqualityPartition( Iterable scopeComplementEqualities, Iterable scopeStraddlingEqualities) { this.scopeEqualities = - ImmutableList.copyOf(requireNonNull(scopeEqualities, "scopeEqualities is null")); + ImmutableList.copyOf( + requireNonNull( + scopeEqualities, + DataNodeQueryMessages.EXCEPTION_SCOPEEQUALITIES_IS_NULL_22388B2C)); this.scopeComplementEqualities = ImmutableList.copyOf( - requireNonNull(scopeComplementEqualities, "scopeComplementEqualities is null")); + requireNonNull( + scopeComplementEqualities, + DataNodeQueryMessages.EXCEPTION_SCOPECOMPLEMENTEQUALITIES_IS_NULL_B9080FC7)); this.scopeStraddlingEqualities = ImmutableList.copyOf( - requireNonNull(scopeStraddlingEqualities, "scopeStraddlingEqualities is null")); + requireNonNull( + scopeStraddlingEqualities, + DataNodeQueryMessages.EXCEPTION_SCOPESTRADDLINGEQUALITIES_IS_NULL_F6B979AE)); } public List getScopeEqualities() { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/ExpressionExtractor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/ExpressionExtractor.java index 91bcc8a974328..6fae6f8cd6bd8 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/ExpressionExtractor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/ExpressionExtractor.java @@ -26,6 +26,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.planner.node.JoinNode; import org.apache.iotdb.commons.queryengine.plan.relational.planner.node.ProjectNode; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Expression; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.planner.plan.node.SimplePlanVisitor; import org.apache.iotdb.db.queryengine.plan.relational.planner.iterative.Lookup; @@ -43,8 +44,8 @@ public static List extractExpressions(PlanNode plan) { } public static List extractExpressions(PlanNode plan, Lookup lookup) { - requireNonNull(plan, "plan is null"); - requireNonNull(lookup, "lookup is null"); + requireNonNull(plan, DataNodeQueryMessages.EXCEPTION_PLAN_IS_NULL_717C9DF7); + requireNonNull(lookup, DataNodeQueryMessages.EXCEPTION_LOOKUP_IS_NULL_B8FD7E65); ImmutableList.Builder expressionsBuilder = ImmutableList.builder(); plan.accept(new Visitor(expressionsBuilder::add, true, lookup), null); @@ -69,9 +70,10 @@ private static class Visitor extends SimplePlanVisitor { private final Lookup lookup; Visitor(Consumer consumer, boolean recursive, Lookup lookup) { - this.consumer = requireNonNull(consumer, "consumer is null"); + this.consumer = + requireNonNull(consumer, DataNodeQueryMessages.EXCEPTION_CONSUMER_IS_NULL_B6207072); this.recursive = recursive; - this.lookup = requireNonNull(lookup, "lookup is null"); + this.lookup = requireNonNull(lookup, DataNodeQueryMessages.EXCEPTION_LOOKUP_IS_NULL_B8FD7E65); } @Override diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/ExpressionSymbolInliner.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/ExpressionSymbolInliner.java index d34332f64df6a..57ee185183136 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/ExpressionSymbolInliner.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/ExpressionSymbolInliner.java @@ -22,6 +22,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.planner.Symbol; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Expression; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.SymbolReference; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.relational.planner.ir.ExpressionRewriter; import org.apache.iotdb.db.queryengine.plan.relational.planner.ir.ExpressionTreeRewriter; @@ -65,7 +66,10 @@ public Expression rewriteSymbolReference( } Expression expression = mapping.apply(Symbol.from(node)); - checkArgument(expression != null, "Cannot resolve symbol %s", node.getName()); + checkArgument( + expression != null, + DataNodeQueryMessages.EXCEPTION_CANNOT_RESOLVE_SYMBOL_ARG_79F76FA6, + node.getName()); return expression; } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/IrExpressionInterpreter.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/IrExpressionInterpreter.java index 9e2b2eda673fa..464c18019bdd0 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/IrExpressionInterpreter.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/IrExpressionInterpreter.java @@ -104,14 +104,20 @@ public IrExpressionInterpreter( PlannerContext plannerContext, SessionInfo session, Map, Type> expressionTypes) { - this.expression = requireNonNull(expression, "expression is null"); - this.plannerContext = requireNonNull(plannerContext, "plannerContext is null"); + this.expression = + requireNonNull(expression, DataNodeQueryMessages.EXCEPTION_EXPRESSION_IS_NULL_16C079B5); + this.plannerContext = + requireNonNull( + plannerContext, DataNodeQueryMessages.EXCEPTION_PLANNERCONTEXT_IS_NULL_B7C7DE50); this.metadata = plannerContext.getMetadata(); this.literalInterpreter = new LiteralInterpreter(plannerContext, session); this.literalEncoder = new LiteralEncoder(plannerContext); - this.session = requireNonNull(session, "session is null"); + this.session = + requireNonNull(session, DataNodeQueryMessages.EXCEPTION_SESSION_IS_NULL_6CF0F47D); this.expressionTypes = - ImmutableMap.copyOf(requireNonNull(expressionTypes, "expressionTypes is null")); + ImmutableMap.copyOf( + requireNonNull( + expressionTypes, DataNodeQueryMessages.EXCEPTION_EXPRESSIONTYPES_IS_NULL_4107A4A2)); verify(expressionTypes.containsKey(NodeRef.of(expression))); this.functionInvoker = new InterpretedFunctionInvoker(); this.typeCoercion = new TypeCoercion(plannerContext.getTypeManager()::getType); @@ -128,7 +134,8 @@ public Object evaluate() { Object result = new Visitor(false).processWithExceptionHandling(expression, null); verify( !(result instanceof Expression), - "Expression interpreter returned an unresolved expression"); + DataNodeQueryMessages + .EXCEPTION_EXPRESSION_INTERPRETER_RETURNED_AN_UNRESOLVED_EXPRESSION_5BCE9A51); return result; } @@ -136,7 +143,8 @@ public Object evaluate(SymbolResolver inputs) { Object result = new Visitor(false).processWithExceptionHandling(expression, inputs); verify( !(result instanceof Expression), - "Expression interpreter returned an unresolved expression"); + DataNodeQueryMessages + .EXCEPTION_EXPRESSION_INTERPRETER_RETURNED_AN_UNRESOLVED_EXPRESSION_5BCE9A51); return result; } @@ -332,7 +340,10 @@ private boolean isEqual(Object operand1, Type type1, Object operand2, Type type2 private Type type(Expression expression) { Type type = expressionTypes.get(NodeRef.of(expression)); - checkState(type != null, "Type not found for expression: %s", expression); + checkState( + type != null, + DataNodeQueryMessages.EXCEPTION_TYPE_NOT_FOUND_FOR_EXPRESSION_COLON_ARG_C26C9237, + expression); return type; } @@ -369,7 +380,8 @@ private List processOperands(CoalesceExpression node, Object context) { !(nestedOperand instanceof NullLiteral) && !(nestedOperand instanceof Cast && ((Cast) nestedOperand).getExpression() instanceof NullLiteral), - "Null operand should have been removed by recursive coalesce processing"); + DataNodeQueryMessages + .EXCEPTION_NULL_OPERAND_SHOULD_HAVE_BEEN_REMOVED_BY_RECURSIVE_COALESCE_PROCESSING_B6D4D443); return newOperands; } } @@ -377,7 +389,8 @@ private List processOperands(CoalesceExpression node, Object context) { Expression expr = (Expression) value; verify( !(value instanceof NullLiteral), - "Null value is expected to be represented as null, not NullLiteral"); + DataNodeQueryMessages + .EXCEPTION_NULL_VALUE_IS_EXPECTED_TO_BE_REPRESENTED_AS_NULL_COMMA_NOT_NULLLITERAL_9B96D25A); // Skip duplicates unless they are non-deterministic. if (!isDeterministic(expr) || uniqueNewOperands.add(expr)) { newOperands.add(expr); @@ -877,7 +890,7 @@ public Object visitFunctionCall(FunctionCall node, Object context) { } if (optimize && hasUnresolvedValue(argumentValues)) { - verify(!node.isDistinct(), "distinct not supported"); + verify(!node.isDistinct(), DataNodeQueryMessages.EXCEPTION_DISTINCT_NOT_SUPPORTED_0E97D0BB); // verify(node.getOrderBy().isEmpty(), "order by not supported"); // verify(node.getFilter().isEmpty(), "filter not supported"); // verify(node.getWindow().isEmpty(), "window not supported"); @@ -934,7 +947,9 @@ public Object visitExtract(Extract node, Object context) { return constructEvaluateFunction(node.getField(), session.getZoneId()).apply((Long) value); } - checkState(value instanceof Expression, "Value reach here must be Expression"); + checkState( + value instanceof Expression, + DataNodeQueryMessages.EXCEPTION_VALUE_REACH_HERE_MUST_BE_EXPRESSION_C7CA1971); return new Extract((Expression) value, node.getField()); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/IrTypeAnalyzer.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/IrTypeAnalyzer.java index 0680a32ab2c46..d7ffc1c7693a4 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/IrTypeAnalyzer.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/IrTypeAnalyzer.java @@ -105,7 +105,9 @@ public class IrTypeAnalyzer { private final PlannerContext plannerContext; public IrTypeAnalyzer(PlannerContext plannerContext) { - this.plannerContext = requireNonNull(plannerContext, "plannerContext is null"); + this.plannerContext = + requireNonNull( + plannerContext, DataNodeQueryMessages.EXCEPTION_PLANNERCONTEXT_IS_NULL_B7C7DE50); } public Map, Type> getTypes( @@ -138,9 +140,13 @@ private static class Visitor implements AstVisitor { private final Map, Type> expressionTypes = new LinkedHashMap<>(); public Visitor(PlannerContext plannerContext, SessionInfo session, TypeProvider symbolTypes) { - this.plannerContext = requireNonNull(plannerContext, "plannerContext is null"); - this.session = requireNonNull(session, "session is null"); - this.symbolTypes = requireNonNull(symbolTypes, "symbolTypes is null"); + this.plannerContext = + requireNonNull( + plannerContext, DataNodeQueryMessages.EXCEPTION_PLANNERCONTEXT_IS_NULL_B7C7DE50); + this.session = + requireNonNull(session, DataNodeQueryMessages.EXCEPTION_SESSION_IS_NULL_6CF0F47D); + this.symbolTypes = + requireNonNull(symbolTypes, DataNodeQueryMessages.EXCEPTION_SYMBOLTYPES_IS_NULL_DD16EA83); } public Map, Type> getTypes() { @@ -148,8 +154,9 @@ public Map, Type> getTypes() { } private Type setExpressionType(Expression expression, Type type) { - requireNonNull(expression, "expression cannot be null"); - requireNonNull(type, "type cannot be null"); + requireNonNull( + expression, DataNodeQueryMessages.EXCEPTION_EXPRESSION_CANNOT_BE_NULL_EFF1A99C); + requireNonNull(type, DataNodeQueryMessages.EXCEPTION_TYPE_CANNOT_BE_NULL_97A0A8D3); expressionTypes.put(NodeRef.of(expression), type); return type; @@ -174,7 +181,10 @@ public Type visitSymbolReference(SymbolReference node, Context context) { if (type == null) { type = symbolTypes.getTableModelType(symbol); } - checkArgument(type != null, "No type for: %s", node.getName()); + checkArgument( + type != null, + DataNodeQueryMessages.EXCEPTION_NO_TYPE_FOR_COLON_ARG_9E34AD76, + node.getName()); return setExpressionType(node, type); } @@ -227,13 +237,19 @@ public Type visitNullIfExpression(NullIfExpression node, Context context) { @Override public Type visitIfExpression(IfExpression node, Context context) { Type conditionType = process(node.getCondition(), context); - checkArgument(conditionType.equals(BOOLEAN), "Condition must be boolean: %s", conditionType); + checkArgument( + conditionType.equals(BOOLEAN), + DataNodeQueryMessages.EXCEPTION_CONDITION_MUST_BE_BOOLEAN_COLON_ARG_806C2960, + conditionType); Type trueType = process(node.getTrueValue(), context); if (node.getFalseValue().isPresent()) { Type falseType = process(node.getFalseValue().get(), context); checkArgument( - trueType.equals(falseType), "Types must be equal: %s vs %s", trueType, falseType); + trueType.equals(falseType), + DataNodeQueryMessages.EXCEPTION_TYPES_MUST_BE_EQUAL_COLON_ARG_VS_ARG_098424AD, + trueType, + falseType); } return setExpressionType(node, trueType); @@ -280,8 +296,10 @@ public Type visitSimpleCaseExpression(SimpleCaseExpression node, Context context if (!clauseOperandType.equals(operandType)) { throw new SemanticException( String.format( - "WHEN clause operand type must match CASE operand type: %s vs %s", - clauseOperandType, operandType)); + DataNodeQueryMessages + .WHEN_CLAUSE_OPERAND_TYPE_MUST_MATCH_CASE_OPERAND_TYPE_S_VS_S, + clauseOperandType, + operandType)); } return setExpressionType(clause, process(clause.getResult(), context)); }) @@ -289,7 +307,7 @@ public Type visitSimpleCaseExpression(SimpleCaseExpression node, Context context if (resultTypes.size() != 1) { throw new SemanticException( - String.format("All result types must be the same: %s", resultTypes)); + String.format(DataNodeQueryMessages.ALL_RESULT_TYPES_MUST_BE_THE_SAME_S, resultTypes)); } Type resultType = resultTypes.iterator().next(); @@ -300,8 +318,10 @@ public Type visitSimpleCaseExpression(SimpleCaseExpression node, Context context if (!defaultType.equals(resultType)) { throw new SemanticException( String.format( - "Default result type must be the same as WHEN result types: %s vs %s", - defaultType, resultType)); + DataNodeQueryMessages + .DEFAULT_RESULT_TYPE_MUST_BE_THE_SAME_AS_WHEN_RESULT_TYPES_S_VS_S, + defaultType, + resultType)); } }); @@ -317,7 +337,7 @@ public Type visitCoalesceExpression(CoalesceExpression node, Context context) { if (types.size() != 1) { throw new SemanticException( - String.format("All operands must have the same type: %s", types)); + String.format(DataNodeQueryMessages.ALL_OPERANDS_MUST_HAVE_THE_SAME_TYPE_S, types)); } return setExpressionType(node, types.iterator().next()); } @@ -494,13 +514,17 @@ public Type visitCurrentUser(final CurrentUser node, final Context context) { @Override public Type visitExpression(Expression node, Context context) { throw new UnsupportedOperationException( - "Not a valid IR expression: " + node.getClass().getName()); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_NOT_A_VALID_IR_EXPRESSION_S_03C41ADD, + node.getClass().getName())); } @Override public Type visitNode(Node node, Context context) { throw new UnsupportedOperationException( - "Not a valid IR expression: " + node.getClass().getName()); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_NOT_A_VALID_IR_EXPRESSION_S_03C41ADD, + node.getClass().getName())); } // Only allow INT32 -> INT64 coercion to suppress some related bugs for now @@ -542,7 +566,10 @@ private Type coerceToSingleType( } if (!TypeCoercionUtils.canCoerceTo(type, superType)) { throw new SemanticException( - DataNodeQueryMessages.CANNOT_COERCE_TYPE + type + " to " + superType); + DataNodeQueryMessages.CANNOT_COERCE_TYPE + + type + + DataNodeQueryMessages.TO + + superType); } addOrReplaceExpressionType(nodeRefs, superType); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/LiteralEncoder.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/LiteralEncoder.java index 3bbde4a7290bb..2851e4659c34e 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/LiteralEncoder.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/LiteralEncoder.java @@ -59,13 +59,17 @@ public final class LiteralEncoder { private final PlannerContext plannerContext; public LiteralEncoder(PlannerContext plannerContext) { - this.plannerContext = requireNonNull(plannerContext, "plannerContext is null"); + this.plannerContext = + requireNonNull( + plannerContext, DataNodeQueryMessages.EXCEPTION_PLANNERCONTEXT_IS_NULL_B7C7DE50); } public List toExpressions(List objects, List types) { - requireNonNull(objects, "objects is null"); - requireNonNull(types, "types is null"); - checkArgument(objects.size() == types.size(), "objects and types do not have the same size"); + requireNonNull(objects, DataNodeQueryMessages.EXCEPTION_OBJECTS_IS_NULL_819EE879); + requireNonNull(types, DataNodeQueryMessages.EXCEPTION_TYPES_IS_NULL_E4B2309D); + checkArgument( + objects.size() == types.size(), + DataNodeQueryMessages.EXCEPTION_OBJECTS_AND_TYPES_DO_NOT_HAVE_THE_SAME_SIZE_8B51E17B); ImmutableList.Builder expressions = ImmutableList.builder(); for (int i = 0; i < objects.size(); i++) { @@ -77,7 +81,7 @@ public List toExpressions(List objects, List type } public Expression toExpression(@Nullable Object object, Type type) { - requireNonNull(type, "type is null"); + requireNonNull(type, DataNodeQueryMessages.EXCEPTION_TYPE_IS_NULL_16A3D3EB); if (object instanceof Expression) { return (Expression) object; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/LiteralInterpreter.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/LiteralInterpreter.java index abb8d53756939..fe993fbb2c397 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/LiteralInterpreter.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/LiteralInterpreter.java @@ -50,7 +50,9 @@ public class LiteralInterpreter { private final SessionInfo session; public LiteralInterpreter(PlannerContext plannerContext, SessionInfo session) { - this.plannerContext = requireNonNull(plannerContext, "plannerContext is null"); + this.plannerContext = + requireNonNull( + plannerContext, DataNodeQueryMessages.EXCEPTION_PLANNERCONTEXT_IS_NULL_B7C7DE50); this.session = session; } @@ -66,7 +68,7 @@ private class LiteralVisitor implements AstVisitor { private final Type type; private LiteralVisitor(Type type) { - this.type = requireNonNull(type, "type is null"); + this.type = requireNonNull(type, DataNodeQueryMessages.EXCEPTION_TYPE_IS_NULL_16A3D3EB); } @Override diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/NodeAndMappings.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/NodeAndMappings.java index a2563744d86dc..e4537dedc7d48 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/NodeAndMappings.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/NodeAndMappings.java @@ -21,6 +21,7 @@ import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.PlanNode; import org.apache.iotdb.commons.queryengine.plan.relational.planner.Symbol; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import java.util.List; @@ -31,8 +32,8 @@ public class NodeAndMappings { private final List fields; public NodeAndMappings(PlanNode node, List fields) { - this.node = requireNonNull(node, "node is null"); - this.fields = requireNonNull(fields, "fields is null"); + this.node = requireNonNull(node, DataNodeQueryMessages.EXCEPTION_NODE_IS_NULL_C1479F4A); + this.fields = requireNonNull(fields, DataNodeQueryMessages.EXCEPTION_FIELDS_IS_NULL_DE209DBF); } public PlanNode getNode() { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/PlanBuilder.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/PlanBuilder.java index 3c8e5ba4193b6..d83ae8b8ce69d 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/PlanBuilder.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/PlanBuilder.java @@ -25,6 +25,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.planner.node.ProjectNode; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Expression; import org.apache.iotdb.commons.queryengine.plan.relational.type.InternalTypeManager; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.common.MPPQueryContext; import org.apache.iotdb.db.queryengine.plan.planner.LocalExecutionPlanner; import org.apache.iotdb.db.queryengine.plan.relational.analyzer.Analysis; @@ -48,8 +49,8 @@ public class PlanBuilder { private final PlanNode root; public PlanBuilder(TranslationMap translations, PlanNode root) { - requireNonNull(translations, "translations is null"); - requireNonNull(root, "root is null"); + requireNonNull(translations, DataNodeQueryMessages.EXCEPTION_TRANSLATIONS_IS_NULL_37D62ADC); + requireNonNull(root, DataNodeQueryMessages.EXCEPTION_ROOT_IS_NULL_ECC8987D); this.translations = translations; this.root = root; @@ -108,7 +109,8 @@ public Symbol translate(Expression expression) { public Expression rewrite(Expression root) { verify( translations.getAnalysis().isAnalyzed(root), - "Expression is not analyzed (%s): %s", + DataNodeQueryMessages + .EXCEPTION_EXPRESSION_IS_NOT_ANALYZED_LEFT_PAREN_ARG_RIGHT_PAREN_COLON_ARG_DAE760B6, root.getClass().getName(), root); return translations.rewrite(root); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/PlanNodeSearcher.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/PlanNodeSearcher.java index c8d6992b211bd..e5a6a81067185 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/PlanNodeSearcher.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/PlanNodeSearcher.java @@ -20,6 +20,7 @@ package org.apache.iotdb.db.queryengine.plan.relational.planner; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.PlanNode; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.relational.planner.iterative.Lookup; import com.google.common.collect.ImmutableList; @@ -60,8 +61,8 @@ public static PlanNodeSearcher searchFrom(PlanNode node, Lookup lookup) { private Predicate recurseOnlyWhen = alwaysTrue(); private PlanNodeSearcher(PlanNode node, Lookup lookup) { - this.node = requireNonNull(node, "node is null"); - this.lookup = requireNonNull(lookup, "lookup is null"); + this.node = requireNonNull(node, DataNodeQueryMessages.EXCEPTION_NODE_IS_NULL_C1479F4A); + this.lookup = requireNonNull(lookup, DataNodeQueryMessages.EXCEPTION_LOOKUP_IS_NULL_B8FD7E65); } @SafeVarargs @@ -78,12 +79,13 @@ public final PlanNodeSearcher whereIsInstanceOfAny(List where) { - this.where = requireNonNull(where, "where is null"); + this.where = requireNonNull(where, DataNodeQueryMessages.EXCEPTION_WHERE_IS_NULL_A1A3FCBC); return this; } public PlanNodeSearcher recurseOnlyWhen(Predicate skipOnly) { - this.recurseOnlyWhen = requireNonNull(skipOnly, "skipOnly is null"); + this.recurseOnlyWhen = + requireNonNull(skipOnly, DataNodeQueryMessages.EXCEPTION_SKIPONLY_IS_NULL_80DB0703); return this; } @@ -143,7 +145,8 @@ private PlanNode removeAllRecursive(PlanNode node) { if (where.test(node)) { checkArgument( node.getChildren().size() == 1, - "Unable to remove plan node as it contains 0 or more than 1 children"); + DataNodeQueryMessages + .EXCEPTION_UNABLE_TO_REMOVE_PLAN_NODE_AS_IT_CONTAINS_0_OR_MORE_THAN_1_CHILDREN_6F26E194); return node.getChildren().get(0); } if (recurseOnlyWhen.test(node)) { @@ -164,7 +167,8 @@ private PlanNode removeFirstRecursive(PlanNode node) { if (where.test(node)) { checkArgument( node.getChildren().size() == 1, - "Unable to remove plan node as it contains 0 or more than 1 children"); + DataNodeQueryMessages + .EXCEPTION_UNABLE_TO_REMOVE_PLAN_NODE_AS_IT_CONTAINS_0_OR_MORE_THAN_1_CHILDREN_6F26E194); return node.getChildren().get(0); } if (recurseOnlyWhen.test(node)) { @@ -176,7 +180,8 @@ private PlanNode removeFirstRecursive(PlanNode node) { return replaceChildren(node, ImmutableList.of(removeFirstRecursive(sources.get(0)))); } throw new IllegalArgumentException( - "Unable to remove first node when a node has multiple children, use removeAll instead"); + DataNodeQueryMessages + .QUERY_EXCEPTION_UNABLE_TO_REMOVE_FIRST_NODE_WHEN_A_NODE_HAS_MULTIPLE_CHILDREN_FB6E81C5); } return node; } @@ -219,7 +224,8 @@ private PlanNode replaceFirstRecursive(PlanNode node, PlanNode nodeToReplace) { return replaceChildren(node, ImmutableList.of(replaceFirstRecursive(node, sources.get(0)))); } throw new IllegalArgumentException( - "Unable to replace first node when a node has multiple children, use replaceAll instead"); + DataNodeQueryMessages + .QUERY_EXCEPTION_UNABLE_TO_REPLACE_FIRST_NODE_WHEN_A_NODE_HAS_MULTIPLE_CHILDREN_2C3D0E9E); } public boolean matches() { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/PredicateUtils.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/PredicateUtils.java index 041be454c92a6..7110a70832bcf 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/PredicateUtils.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/PredicateUtils.java @@ -25,6 +25,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.InPredicate; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.LogicalExpression; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.LongLiteral; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.expression.UnknownExpressionTypeException; import org.apache.tsfile.utils.Pair; @@ -197,7 +198,10 @@ else if (predicate instanceof InPredicate) { // } else { throw new IllegalStateException( - "Unsupported expression in extractGlobalTimePredicate: " + predicate); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_UNSUPPORTED_EXPRESSION_IN_EXTRACTGLOBALTIMEPREDICATE_S_083B1BFA, + predicate)); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/QueryPlanner.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/QueryPlanner.java index 3159ac003001e..8b8b8dcbc2dea 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/QueryPlanner.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/QueryPlanner.java @@ -150,15 +150,18 @@ public QueryPlanner( Map, RelationPlan> recursiveSubqueries, PredicateWithUncorrelatedScalarSubqueryReconstructor predicateWithUncorrelatedScalarSubqueryReconstructor) { - requireNonNull(analysis, "analysis is null"); - requireNonNull(symbolAllocator, "symbolAllocator is null"); - requireNonNull(queryContext, "queryContext is null"); - requireNonNull(outerContext, "outerContext is null"); - requireNonNull(session, "session is null"); - requireNonNull(recursiveSubqueries, "recursiveSubqueries is null"); + requireNonNull(analysis, DataNodeQueryMessages.EXCEPTION_ANALYSIS_IS_NULL_66666A58); + requireNonNull( + symbolAllocator, DataNodeQueryMessages.EXCEPTION_SYMBOLALLOCATOR_IS_NULL_E2BE1908); + requireNonNull(queryContext, DataNodeQueryMessages.EXCEPTION_QUERYCONTEXT_IS_NULL_761DB539); + requireNonNull(outerContext, DataNodeQueryMessages.EXCEPTION_OUTERCONTEXT_IS_NULL_031CD366); + requireNonNull(session, DataNodeQueryMessages.EXCEPTION_SESSION_IS_NULL_6CF0F47D); + requireNonNull( + recursiveSubqueries, DataNodeQueryMessages.EXCEPTION_RECURSIVESUBQUERIES_IS_NULL_6AD8A180); requireNonNull( predicateWithUncorrelatedScalarSubqueryReconstructor, - "predicateWithUncorrelatedScalarSubqueryReconstructor is null"); + DataNodeQueryMessages + .EXCEPTION_PREDICATEWITHUNCORRELATEDSCALARSUBQUERYRECONSTRUCTOR_IS_NULL_B264FEBC); this.analysis = analysis; this.symbolAllocator = symbolAllocator; @@ -440,7 +443,9 @@ private PlanBuilder planWindowFunctions( frameEnd = plan.getFrameOffsetSymbol(); } else if (window.getFrame().isPresent()) { throw new IllegalArgumentException( - "unexpected window frame type: " + window.getFrame().get().getType()); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNEXPECTED_WINDOW_FRAME_TYPE_S_F06F81B8, + window.getFrame().get().getType())); } subPlan = @@ -943,7 +948,9 @@ private GroupingSetsPlan planGroupingSets( // Generate GroupIdNode (multiple grouping sets) or ProjectNode (single grouping set) PlanNode groupId; Optional groupIdSymbol = Optional.empty(); - checkArgument(groupingSets.size() == 1, "Only support one groupingSet now"); + checkArgument( + groupingSets.size() == 1, + DataNodeQueryMessages.EXCEPTION_ONLY_SUPPORT_ONE_GROUPINGSET_NOW_A1277FA4); Assignments.Builder assignments = Assignments.builder(); assignments.putIdentities(subPlan.getRoot().getOutputSymbols()); @@ -1511,8 +1518,9 @@ public Symbol get(Expression expression) { () -> new IllegalArgumentException( format( - "No mapping for expression: %s (%s)", - expression, System.identityHashCode(expression)))); + DataNodeQueryMessages.NO_MAPPING_FOR_EXPRESSION_WITH_IDENTITY_FMT, + expression, + System.identityHashCode(expression)))); } public Optional tryGet(Expression expression) { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/RelationPlan.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/RelationPlan.java index ce9ece17c8ab6..266fdce85b095 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/RelationPlan.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/RelationPlan.java @@ -21,6 +21,7 @@ import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.PlanNode; import org.apache.iotdb.commons.queryengine.plan.relational.planner.Symbol; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.relational.analyzer.RelationType; import org.apache.iotdb.db.queryengine.plan.relational.analyzer.Scope; @@ -53,9 +54,9 @@ public RelationPlan( Scope scope, List fieldMappings, Optional outerContext) { - requireNonNull(root, "root is null"); - requireNonNull(fieldMappings, "fieldMappings is null"); - requireNonNull(scope, "scope is null"); + requireNonNull(root, DataNodeQueryMessages.EXCEPTION_ROOT_IS_NULL_ECC8987D); + requireNonNull(fieldMappings, DataNodeQueryMessages.EXCEPTION_FIELDMAPPINGS_IS_NULL_C3681969); + requireNonNull(scope, DataNodeQueryMessages.EXCEPTION_SCOPE_IS_NULL_4F364BA2); int allFieldCount = scope.getLocalScopeFieldCount(); // checkArgument( @@ -73,7 +74,8 @@ public RelationPlan( public Symbol getSymbol(int fieldIndex) { checkArgument( fieldIndex >= 0 && fieldIndex < fieldMappings.size(), - "No field->symbol mapping for field %s", + DataNodeQueryMessages + .EXCEPTION_NO_FIELD_MINUS_GREATER_THAN_SYMBOL_MAPPING_FOR_FIELD_ARG_698FDF06, fieldIndex); return fieldMappings.get(fieldIndex); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/RelationPlanner.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/RelationPlanner.java index 268cd43452df1..5b276afd9a41b 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/RelationPlanner.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/RelationPlanner.java @@ -208,15 +208,18 @@ public RelationPlanner( final Map, RelationPlan> recursiveSubqueries, PredicateWithUncorrelatedScalarSubqueryReconstructor predicateWithUncorrelatedScalarSubqueryReconstructor) { - requireNonNull(analysis, "analysis is null"); - requireNonNull(symbolAllocator, "symbolAllocator is null"); - requireNonNull(queryContext, "queryContext is null"); - requireNonNull(outerContext, "outerContext is null"); - requireNonNull(sessionInfo, "session is null"); - requireNonNull(recursiveSubqueries, "recursiveSubqueries is null"); + requireNonNull(analysis, DataNodeQueryMessages.EXCEPTION_ANALYSIS_IS_NULL_66666A58); + requireNonNull( + symbolAllocator, DataNodeQueryMessages.EXCEPTION_SYMBOLALLOCATOR_IS_NULL_E2BE1908); + requireNonNull(queryContext, DataNodeQueryMessages.EXCEPTION_QUERYCONTEXT_IS_NULL_761DB539); + requireNonNull(outerContext, DataNodeQueryMessages.EXCEPTION_OUTERCONTEXT_IS_NULL_031CD366); + requireNonNull(sessionInfo, DataNodeQueryMessages.EXCEPTION_SESSION_IS_NULL_6CF0F47D); + requireNonNull( + recursiveSubqueries, DataNodeQueryMessages.EXCEPTION_RECURSIVESUBQUERIES_IS_NULL_6AD8A180); requireNonNull( predicateWithUncorrelatedScalarSubqueryReconstructor, - "predicateWithUncorrelatedScalarSubqueryReconstructor is null"); + DataNodeQueryMessages + .EXCEPTION_PREDICATEWITHUNCORRELATEDSCALARSUBQUERYRECONSTRUCTOR_IS_NULL_B264FEBC); this.analysis = analysis; this.symbolAllocator = symbolAllocator; @@ -346,7 +349,7 @@ private RelationPlan processPhysicalTable(Table table, Scope scope) { if (!qualifiedName.getPrefix().isPresent()) { throw new IllegalStateException( - DataNodeQueryMessages.TABLE + table.getName() + " has no prefix!"); + String.format(DataNodeQueryMessages.TABLE_HAS_NO_PREFIX_FMT, table.getName())); } final QualifiedObjectName qualifiedObjectName = @@ -654,7 +657,9 @@ public RelationPlan planJoin( // the case when we mix symbols from both left and right join side on either side of // condition. throw new SemanticException( - format("Complex ASOF main join expression [%s] is not supported", asofCriteria)); + format( + DataNodeQueryMessages.COMPLEX_ASOF_MAIN_JOIN_EXPRESSION_S_IS_NOT_SUPPORTED, + asofCriteria)); } } @@ -1171,7 +1176,8 @@ private ExpressionAndValuePointers planPatternRecognitionExpression( matchNumberSymbol); } else { throw new SemanticException( - "Unexpected descriptor type: " + accessor.getDescriptor().getClass().getName()); + DataNodeQueryMessages.UNEXPECTED_DESCRIPTOR_TYPE + + accessor.getDescriptor().getClass().getName()); } Symbol symbol = symbolAllocator.newSymbol(name, analysis.getType(accessor.getExpression())); @@ -1222,7 +1228,9 @@ private SkipToPosition mapSkipToPosition(SkipTo.Position position) { @Override public RelationPlan visitUnion(Union node, Void context) { - Preconditions.checkArgument(!node.getRelations().isEmpty(), "No relations specified for UNION"); + Preconditions.checkArgument( + !node.getRelations().isEmpty(), + DataNodeQueryMessages.EXCEPTION_NO_RELATIONS_SPECIFIED_FOR_UNION_70CE42C4); SetOperationPlan setOperationPlan = process(node); @@ -1242,7 +1250,8 @@ public RelationPlan visitUnion(Union node, Void context) { @Override public RelationPlan visitIntersect(Intersect node, Void context) { Preconditions.checkArgument( - !node.getRelations().isEmpty(), "No relations specified for intersect"); + !node.getRelations().isEmpty(), + DataNodeQueryMessages.EXCEPTION_NO_RELATIONS_SPECIFIED_FOR_INTERSECT_76B0ED3B); SetOperationPlan setOperationPlan = process(node); PlanNode intersectNode = @@ -1260,7 +1269,8 @@ public RelationPlan visitIntersect(Intersect node, Void context) { @Override public RelationPlan visitExcept(Except node, Void context) { Preconditions.checkArgument( - !node.getRelations().isEmpty(), "No relations specified for except"); + !node.getRelations().isEmpty(), + DataNodeQueryMessages.EXCEPTION_NO_RELATIONS_SPECIFIED_FOR_EXCEPT_C8E4B4AA); SetOperationPlan setOperationPlan = process(node); PlanNode exceptNode = @@ -1627,12 +1637,21 @@ public PatternRecognitionComponents( SkipToPosition skipToPosition, IrRowPattern pattern, Map variableDefinitions) { - this.measures = requireNonNull(measures, "measures is null"); - this.measureOutputs = requireNonNull(measureOutputs, "measureOutputs is null"); + this.measures = + requireNonNull(measures, DataNodeQueryMessages.EXCEPTION_MEASURES_IS_NULL_EC9D2431); + this.measureOutputs = + requireNonNull( + measureOutputs, DataNodeQueryMessages.EXCEPTION_MEASUREOUTPUTS_IS_NULL_923F7C4B); this.skipToLabels = ImmutableSet.copyOf(skipToLabels); - this.skipToPosition = requireNonNull(skipToPosition, "skipToPosition is null"); - this.pattern = requireNonNull(pattern, "pattern is null"); - this.variableDefinitions = requireNonNull(variableDefinitions, "variableDefinitions is null"); + this.skipToPosition = + requireNonNull( + skipToPosition, DataNodeQueryMessages.EXCEPTION_SKIPTOPOSITION_IS_NULL_EFBA10CA); + this.pattern = + requireNonNull(pattern, DataNodeQueryMessages.EXCEPTION_PATTERN_IS_NULL_AC4E239A); + this.variableDefinitions = + requireNonNull( + variableDefinitions, + DataNodeQueryMessages.EXCEPTION_VARIABLEDEFINITIONS_IS_NULL_5F7B8ED4); } public Map getMeasures() { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/ScopeAware.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/ScopeAware.java index 38ad8dc1831a1..dc8eb78bb00ce 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/ScopeAware.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/ScopeAware.java @@ -22,6 +22,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Expression; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Identifier; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Node; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.relational.analyzer.Analysis; import org.apache.iotdb.db.queryengine.plan.relational.analyzer.CanonicalizationAware; import org.apache.iotdb.db.queryengine.plan.relational.analyzer.ResolvedField; @@ -59,11 +60,12 @@ public class ScopeAware { private final int hash; private ScopeAware(Analysis analysis, Scope scope, T node) { - requireNonNull(scope, "scope is null"); + requireNonNull(scope, DataNodeQueryMessages.EXCEPTION_SCOPE_IS_NULL_4F364BA2); this.queryScope = scope.getQueryBoundaryScope(); - this.analysis = requireNonNull(analysis, "analysis is null"); - this.node = requireNonNull(node, "node is null"); + this.analysis = + requireNonNull(analysis, DataNodeQueryMessages.EXCEPTION_ANALYSIS_IS_NULL_66666A58); + this.node = requireNonNull(node, DataNodeQueryMessages.EXCEPTION_NODE_IS_NULL_C1479F4A); this.hash = treeHash(node, this::scopeAwareHash); } @@ -92,7 +94,8 @@ public boolean equals(Object o) { ScopeAware other = (ScopeAware) o; checkArgument( - this.queryScope == other.queryScope, "Expressions must be in the same local scope"); + this.queryScope == other.queryScope, + DataNodeQueryMessages.EXCEPTION_EXPRESSIONS_MUST_BE_IN_THE_SAME_LOCAL_SCOPE_CCAD793E); return treeEqual(node, other.node, this::scopeAwareComparison); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/SubqueryPlanner.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/SubqueryPlanner.java index bb4fba70eb294..20501e9d44258 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/SubqueryPlanner.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/SubqueryPlanner.java @@ -41,6 +41,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.QuantifiedComparisonExpression; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Query; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.SubqueryExpression; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.common.MPPQueryContext; import org.apache.iotdb.db.queryengine.common.QueryId; import org.apache.iotdb.db.queryengine.plan.relational.analyzer.Analysis; @@ -95,15 +96,18 @@ class SubqueryPlanner { Map, RelationPlan> recursiveSubqueries, PredicateWithUncorrelatedScalarSubqueryReconstructor predicateWithUncorrelatedScalarSubqueryReconstructor) { - requireNonNull(analysis, "analysis is null"); - requireNonNull(symbolAllocator, "symbolAllocator is null"); - requireNonNull(plannerContext, "plannerContext is null"); - requireNonNull(outerContext, "outerContext is null"); - requireNonNull(session, "session is null"); - requireNonNull(recursiveSubqueries, "recursiveSubqueries is null"); + requireNonNull(analysis, DataNodeQueryMessages.EXCEPTION_ANALYSIS_IS_NULL_66666A58); + requireNonNull( + symbolAllocator, DataNodeQueryMessages.EXCEPTION_SYMBOLALLOCATOR_IS_NULL_E2BE1908); + requireNonNull(plannerContext, DataNodeQueryMessages.EXCEPTION_PLANNERCONTEXT_IS_NULL_B7C7DE50); + requireNonNull(outerContext, DataNodeQueryMessages.EXCEPTION_OUTERCONTEXT_IS_NULL_031CD366); + requireNonNull(session, DataNodeQueryMessages.EXCEPTION_SESSION_IS_NULL_6CF0F47D); + requireNonNull( + recursiveSubqueries, DataNodeQueryMessages.EXCEPTION_RECURSIVESUBQUERIES_IS_NULL_6AD8A180); requireNonNull( predicateWithUncorrelatedScalarSubqueryReconstructor, - "predicateWithUncorrelatedScalarSubqueryReconstructor is null"); + DataNodeQueryMessages + .EXCEPTION_PREDICATEWITHUNCORRELATEDSCALARSUBQUERYRECONSTRUCTOR_IS_NULL_B264FEBC); this.analysis = analysis; this.symbolAllocator = symbolAllocator; @@ -289,7 +293,8 @@ private PlanBuilder planScalarSubquery(PlanBuilder subPlan, Cluster 1) { column = symbolAllocator.newSymbol("row", type); @@ -467,7 +472,10 @@ private PlanBuilder planQuantifiedComparison( case IS_DISTINCT_FROM: default: throw new IllegalArgumentException( - format("Unexpected quantified comparison: '%s %s'", operator.getValue(), quantifier)); + format( + DataNodeQueryMessages.UNEXPECTED_QUANTIFIED_COMPARISON_FMT, + operator.getValue(), + quantifier)); } } @@ -612,7 +620,10 @@ private PlanAndMappings planSubquery( List fieldsList = fields.build(); // Attention: remove this check after supporting RowType - checkArgument(fieldsList.size() == 1, "For now, only single column subqueries are supported."); + checkArgument( + fieldsList.size() == 1, + DataNodeQueryMessages + .EXCEPTION_FOR_NOW_COMMA_ONLY_SINGLE_COLUMN_SUBQUERIES_ARE_SUPPORTED_DOT_068B1A66); /*subqueryPlan = subqueryPlan.withNewRoot( new ProjectNode( @@ -672,7 +683,8 @@ private static class Cluster { private final List expressions; private Cluster(List expressions) { - checkArgument(!expressions.isEmpty(), "Cluster is empty"); + checkArgument( + !expressions.isEmpty(), DataNodeQueryMessages.EXCEPTION_CLUSTER_IS_EMPTY_22299EED); this.expressions = ImmutableList.copyOf(expressions); } @@ -685,7 +697,9 @@ public static Cluster newCluster( .count(); checkArgument( - count == 1, "Cluster contains expressions that are not equivalent to each other"); + count == 1, + DataNodeQueryMessages + .EXCEPTION_CLUSTER_CONTAINS_EXPRESSIONS_THAT_ARE_NOT_EQUIVALENT_TO_EACH_OTHER_7AD9A0E3); return new Cluster<>(expressions); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/SymbolAllocator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/SymbolAllocator.java index f7ad25965d1f4..0622398c2a04d 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/SymbolAllocator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/SymbolAllocator.java @@ -25,6 +25,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Identifier; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.SymbolReference; import org.apache.iotdb.commons.udf.builtin.relational.TableBuiltinScalarFunction; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.analyze.TypeProvider; import org.apache.iotdb.db.queryengine.plan.relational.analyzer.Field; @@ -57,7 +58,9 @@ public Symbol newSymbol(Symbol symbolHint) { } public Symbol newSymbol(Symbol symbolHint, String suffix) { - checkArgument(symbolMap.containsKey(symbolHint), "symbolHint not in symbols map"); + checkArgument( + symbolMap.containsKey(symbolHint), + DataNodeQueryMessages.EXCEPTION_SYMBOLHINT_NOT_IN_SYMBOLS_MAP_B0D67E43); return newSymbol(symbolHint.getName(), symbolMap.get(symbolHint), suffix); } @@ -66,8 +69,8 @@ public Symbol newSymbol(String symbolHint, Type type) { } public Symbol newSymbol(String symbolHint, Type symbolType, String suffix) { - requireNonNull(symbolHint, "symbolHint is null"); - requireNonNull(symbolType, "type is null"); + requireNonNull(symbolHint, DataNodeQueryMessages.EXCEPTION_SYMBOLHINT_IS_NULL_CE874C40); + requireNonNull(symbolType, DataNodeQueryMessages.EXCEPTION_TYPE_IS_NULL_16A3D3EB); if (suffix != null) { symbolHint = symbolHint + SEPARATOR + suffix; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/SymbolsExtractor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/SymbolsExtractor.java index 489796b7fa272..87676bcf75a00 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/SymbolsExtractor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/SymbolsExtractor.java @@ -30,6 +30,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.QualifiedName; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.SubqueryExpression; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.SymbolReference; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.relational.planner.iterative.Lookup; import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.DefaultExpressionTraversalVisitor; import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.DefaultTraversalVisitor; @@ -170,7 +171,9 @@ private static class QualifiedNameBuilderVisitor private QualifiedNameBuilderVisitor( Set> columnReferences, boolean recurseIntoSubqueries) { - this.columnReferences = requireNonNull(columnReferences, "columnReferences is null"); + this.columnReferences = + requireNonNull( + columnReferences, DataNodeQueryMessages.EXCEPTION_COLUMNREFERENCES_IS_NULL_124955C5); this.recurseIntoSubqueries = recurseIntoSubqueries; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/TableLogicalPlanner.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/TableLogicalPlanner.java index 77507fc8bab1a..6b9265dd95998 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/TableLogicalPlanner.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/TableLogicalPlanner.java @@ -44,6 +44,7 @@ import org.apache.iotdb.commons.schema.table.TreeViewSchema; import org.apache.iotdb.commons.schema.table.TsTable; import org.apache.iotdb.commons.utils.TestOnly; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.common.MPPQueryContext; import org.apache.iotdb.db.queryengine.common.QueryId; import org.apache.iotdb.db.queryengine.common.header.DatasetHeader; @@ -149,9 +150,14 @@ public TableLogicalPlanner( List planOptimizers) { this.queryContext = queryContext; this.metadata = metadata; - this.sessionInfo = requireNonNull(sessionInfo, "session is null"); - this.symbolAllocator = requireNonNull(symbolAllocator, "symbolAllocator is null"); - this.warningCollector = requireNonNull(warningCollector, "warningCollector is null"); + this.sessionInfo = + requireNonNull(sessionInfo, DataNodeQueryMessages.EXCEPTION_SESSION_IS_NULL_6CF0F47D); + this.symbolAllocator = + requireNonNull( + symbolAllocator, DataNodeQueryMessages.EXCEPTION_SYMBOLALLOCATOR_IS_NULL_E2BE1908); + this.warningCollector = + requireNonNull( + warningCollector, DataNodeQueryMessages.EXCEPTION_WARNINGCOLLECTOR_IS_NULL_7A524A68); this.planOptimizers = planOptimizers; this.predicateWithUncorrelatedScalarSubqueryReconstructor = new PredicateWithUncorrelatedScalarSubqueryReconstructor(); @@ -265,7 +271,9 @@ private RelationPlan planStatementWithoutOutput(Analysis analysis, Statement sta return genInsertPlan(analysis, (Insert) statement); } throw new IllegalStateException( - "Unsupported statement type: " + statement.getClass().getSimpleName()); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_STATEMENT_TYPE_S_FBCA7305, + statement.getClass().getSimpleName())); } private RelationPlan genInsertPlan(final Analysis analysis, final Insert node) { @@ -596,9 +604,9 @@ private void planTraverseDevice(final AbstractTraverseDevice statement, final An if (analysis.getSchemaPartitionInfo().getSchemaPartitionMap().size() > 1) { throw new SemanticException( - "Tree device view with multiple databases(" + DataNodeQueryMessages.TREE_DEVICE_VIEW_WITH_MULTIPLE_DATABASES + analysis.getSchemaPartitionInfo().getSchemaPartitionMap().keySet() - + ") is unsupported yet."); + + DataNodeQueryMessages.IS_UNSUPPORTED_YET); } } else { analysis.setSchemaPartitionInfo( diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/TranslationMap.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/TranslationMap.java index 0bd9038bf2fb0..29675036828f0 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/TranslationMap.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/TranslationMap.java @@ -125,16 +125,20 @@ public TranslationMap( Map, Symbol> astToSymbols, Map, Symbol> substitutions, PlannerContext plannerContext) { - this.outerContext = requireNonNull(outerContext, "outerContext is null"); - this.scope = requireNonNull(scope, "scope is null"); - this.analysis = requireNonNull(analysis, "analysis is null"); - this.plannerContext = requireNonNull(plannerContext, "plannerContext is null"); + this.outerContext = + requireNonNull(outerContext, DataNodeQueryMessages.EXCEPTION_OUTERCONTEXT_IS_NULL_031CD366); + this.scope = requireNonNull(scope, DataNodeQueryMessages.EXCEPTION_SCOPE_IS_NULL_4F364BA2); + this.analysis = + requireNonNull(analysis, DataNodeQueryMessages.EXCEPTION_ANALYSIS_IS_NULL_66666A58); + this.plannerContext = + requireNonNull( + plannerContext, DataNodeQueryMessages.EXCEPTION_PLANNERCONTEXT_IS_NULL_B7C7DE50); this.substitutions = ImmutableMap.copyOf(substitutions); - requireNonNull(fieldSymbols, "fieldSymbols is null"); + requireNonNull(fieldSymbols, DataNodeQueryMessages.EXCEPTION_FIELDSYMBOLS_IS_NULL_5130E49C); this.fieldSymbols = fieldSymbols.clone(); - requireNonNull(astToSymbols, "astToSymbols is null"); + requireNonNull(astToSymbols, DataNodeQueryMessages.EXCEPTION_ASTTOSYMBOLS_IS_NULL_80B3970F); this.astToSymbols = ImmutableMap.copyOf(astToSymbols); // checkArgument( @@ -219,7 +223,8 @@ public Expression rewrite(Expression expression) { verifyAstExpression(expression); verify( analysis.isAnalyzed(expression), - "Expression is not analyzed (%s): %s", + DataNodeQueryMessages + .EXCEPTION_EXPRESSION_IS_NOT_ANALYZED_LEFT_PAREN_ARG_RIGHT_PAREN_COLON_ARG_DAE760B6, expression.getClass().getName(), expression); @@ -248,8 +253,9 @@ public Expression rewriteFieldReference( () -> new IllegalStateException( format( - "No symbol mapping for node '%s' (%s)", - node, node.getFieldIndex())))); + DataNodeQueryMessages.NO_SYMBOL_MAPPING_FOR_NODE_FMT, + node, + node.getFieldIndex())))); } @Override @@ -362,7 +368,9 @@ public Expression rewriteParameter( return coerceIfNecessary(node, mapped.get()); } - checkState(analysis.getParameters().size() > node.getId(), "Too few parameter values"); + checkState( + analysis.getParameters().size() > node.getId(), + DataNodeQueryMessages.EXCEPTION_TOO_FEW_PARAMETER_VALUES_2F7358C6); return coerceIfNecessary( node, treeRewriter.rewrite(analysis.getParameters().get(NodeRef.of(node)), null)); } @@ -411,7 +419,7 @@ public Optional getSymbolForColumn(Expression expression) { private static void verifyAstExpression(Expression astExpression) { verify( AstUtil.preOrder(astExpression).noneMatch(SymbolReference.class::isInstance), - "symbol references are not allowed"); + DataNodeQueryMessages.EXCEPTION_SYMBOL_REFERENCES_ARE_NOT_ALLOWED_93779D6C); } public Scope getScope() { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/distribute/SubPlanGenerator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/distribute/SubPlanGenerator.java index 737dc43855aae..25e5c53f0a19d 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/distribute/SubPlanGenerator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/distribute/SubPlanGenerator.java @@ -21,6 +21,7 @@ import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.PlanNode; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.PlanNodeId; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.common.QueryId; import org.apache.iotdb.db.queryengine.plan.planner.plan.PlanFragment; import org.apache.iotdb.db.queryengine.plan.planner.plan.SubPlan; @@ -53,7 +54,8 @@ private void splitToSubPlan( ExchangeNode exchangeNode = (ExchangeNode) root; Validate.isTrue( exchangeNode.getChild() instanceof MultiChildrenSinkNode, - "child of ExchangeNode must be MultiChildrenSinkNode"); + DataNodeQueryMessages + .EXCEPTION_CHILD_OF_EXCHANGENODE_MUST_BE_MULTICHILDRENSINKNODE_1BF715FD); MultiChildrenSinkNode sinkNode = (MultiChildrenSinkNode) (exchangeNode.getChild()); // We cut off the subtree to make the ExchangeNode as the leaf node of current PlanFragment diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/distribute/TableDistributedPlanGenerator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/distribute/TableDistributedPlanGenerator.java index d31996aceba89..20ff40aea2504 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/distribute/TableDistributedPlanGenerator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/distribute/TableDistributedPlanGenerator.java @@ -419,7 +419,9 @@ public List visitTopK(TopKNode node, PlanContext context) { nodeOrderingMap.put(node.getPlanNodeId(), node.getOrderingScheme()); checkArgument( - node.getChildren().size() == 1, "Size of TopKNode can only be 1 in logical plan."); + node.getChildren().size() == 1, + DataNodeQueryMessages + .EXCEPTION_SIZE_OF_TOPKNODE_CAN_ONLY_BE_1_IN_LOGICAL_PLAN_DOT_DB32E3C5); List childrenNodes = node.getChildren().get(0).accept(this, context); if (childrenNodes.size() == 1) { if (canTopKEliminated(node.getOrderingScheme(), node.getCount(), childrenNodes.get(0))) { @@ -644,10 +646,13 @@ public List visitJoin(JoinNode node, PlanContext context) { // be MergeSortNode or // SortNode checkArgument( - leftChildrenNodes.size() == 1, "The size of left children node of JoinNode should be 1"); + leftChildrenNodes.size() == 1, + DataNodeQueryMessages + .EXCEPTION_THE_SIZE_OF_LEFT_CHILDREN_NODE_OF_JOINNODE_SHOULD_BE_1_F3437368); checkArgument( rightChildrenNodes.size() == 1, - "The size of right children node of JoinNode should be 1"); + DataNodeQueryMessages + .EXCEPTION_THE_SIZE_OF_RIGHT_CHILDREN_NODE_OF_JOINNODE_SHOULD_BE_1_6BA167CF); } OrderingScheme leftChildOrdering = nodeOrderingMap.get(node.getLeftChild().getPlanNodeId()); @@ -674,7 +679,8 @@ public List visitJoin(JoinNode node, PlanContext context) { break; case RIGHT: throw new IllegalStateException( - "RIGHT Join should be transformed to LEFT Join in previous process"); + DataNodeQueryMessages + .QUERY_EXCEPTION_RIGHT_JOIN_SHOULD_BE_TRANSFORMED_TO_LEFT_JOIN_IN_PREVIOUS_D6B56B1F); default: throw new UnsupportedOperationException( DataNodeQueryMessages.UNSUPPORTED_JOIN_TYPE + node.getJoinType()); @@ -708,10 +714,12 @@ public List visitSemiJoin(SemiJoinNode node, PlanContext context) { List rightChildrenNodes = node.getRightChild().accept(this, context); checkArgument( leftChildrenNodes.size() == 1, - "The size of left children node of SemiJoinNode should be 1"); + DataNodeQueryMessages + .EXCEPTION_THE_SIZE_OF_LEFT_CHILDREN_NODE_OF_SEMIJOINNODE_SHOULD_BE_1_FFEE3F41); checkArgument( rightChildrenNodes.size() == 1, - "The size of right children node of SemiJoinNode should be 1"); + DataNodeQueryMessages + .EXCEPTION_THE_SIZE_OF_RIGHT_CHILDREN_NODE_OF_SEMIJOINNODE_SHOULD_BE_1_AE90C4B8); node.setLeftChild(leftChildrenNodes.get(0)); node.setRightChild(rightChildrenNodes.get(0)); return Collections.singletonList(node); @@ -740,7 +748,7 @@ private List constructDeviceTableScanByTags( dataPartition.getDataPartitionMap().get(dbName); if (seriesSlotMap == null) { throw new SemanticException( - String.format("Given queried database: %s is not exist!", dbName)); + String.format(DataNodeQueryMessages.GIVEN_QUERIED_DATABASE_S_IS_NOT_EXIST, dbName)); } Map> cachedSeriesSlotWithRegions = new HashMap<>(); @@ -833,7 +841,7 @@ private List constructDeviceTableScanByRegionReplicaSet( dataPartition.getDataPartitionMap().get(dbName); if (seriesSlotMap == null) { throw new SemanticException( - String.format("Given queried database: %s is not exist!", dbName)); + String.format(DataNodeQueryMessages.GIVEN_QUERIED_DATABASE_S_IS_NOT_EXIST, dbName)); } final Map tableScanNodeMap = new HashMap<>(); @@ -923,7 +931,7 @@ public List visitTreeDeviceViewScan(TreeDeviceViewScanNode node, PlanC dataPartition.getDataPartitionMap().get(dbName); if (seriesSlotMap == null) { throw new SemanticException( - String.format("Given queried database: %s is not exist!", dbName)); + String.format(DataNodeQueryMessages.GIVEN_QUERIED_DATABASE_S_IS_NOT_EXIST, dbName)); } Map> @@ -1052,7 +1060,8 @@ public List visitInformationSchemaTableScan( dataNodeLocationSupplier.getDataNodeLocations(tableName); if (dataNodeLocations.isEmpty()) { throw new IoTDBRuntimeException( - "No available dataNodes, may be the cluster is closing", + DataNodeQueryMessages + .QUERY_EXCEPTION_NO_AVAILABLE_DATANODES_MAY_BE_THE_CLUSTER_IS_CLOSING_E13B8C50, TSStatusCode.NO_AVAILABLE_REPLICA.getStatusCode()); } @@ -1162,8 +1171,10 @@ public List visitAggregation(AggregationNode node, PlanContext context } else { throw new IllegalStateException( String.format( - "Should never reach here. Child ordering: %s. PreGroupedSymbols: %s", - childOrdering.getOrderBy(), node.getPreGroupedSymbols())); + DataNodeQueryMessages + .QUERY_EXCEPTION_SHOULD_NEVER_REACH_HERE_CHILD_ORDERING_S_PREGROUPEDSYMBOLS_79A94AB5, + childOrdering.getOrderBy(), + node.getPreGroupedSymbols())); } } else if (context.deviceCrossRegion) { // Child has no Ordering and the device cross region, the grouped property of child is not @@ -1566,7 +1577,7 @@ private AggregationDistributionInfo prepareAggregationDistribution( dataPartition.getDataPartitionMap().get(dbName); if (seriesSlotMap == null) { throw new SemanticException( - String.format("Given queried database: %s is not exist!", dbName)); + String.format(DataNodeQueryMessages.GIVEN_QUERIED_DATABASE_S_IS_NOT_EXIST, dbName)); } Map> cachedSeriesSlotWithRegions = new HashMap<>(); @@ -1773,8 +1784,12 @@ private static OrderingScheme constructOrderingSchema(List symbols) { private PlanNode mergeChildrenViaCollectOrMergeSort( final OrderingScheme childOrdering, final List childrenNodes) { - checkArgument(childrenNodes != null, "childrenNodes should not be null."); - checkArgument(!childrenNodes.isEmpty(), "childrenNodes should not be empty."); + checkArgument( + childrenNodes != null, + DataNodeQueryMessages.EXCEPTION_CHILDRENNODES_SHOULD_NOT_BE_NULL_DOT_0C93B063); + checkArgument( + !childrenNodes.isEmpty(), + DataNodeQueryMessages.EXCEPTION_CHILDRENNODES_SHOULD_NOT_BE_EMPTY_DOT_E5555FD9); if (childrenNodes.size() == 1) { return childrenNodes.get(0); @@ -2176,7 +2191,9 @@ public List visitTopKRanking(TopKRankingNode node, PlanContext context // TODO: per partition topk eliminate checkArgument( - node.getChildren().size() == 1, "Size of TopKRankingNode can only be 1 in logical plan."); + node.getChildren().size() == 1, + DataNodeQueryMessages + .EXCEPTION_SIZE_OF_TOPKRANKINGNODE_CAN_ONLY_BE_1_IN_LOGICAL_PLAN_DOT_20D6A513); boolean canSplitPushDown = node.getChild() instanceof GroupNode; if (!canSplitPushDown) { node.setChild(((SortNode) node.getChild()).getChild()); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/distribute/TableDistributedPlanner.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/distribute/TableDistributedPlanner.java index 20d533904394b..c905d55ba6771 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/distribute/TableDistributedPlanner.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/distribute/TableDistributedPlanner.java @@ -25,6 +25,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.planner.node.OutputNode; import org.apache.iotdb.commons.queryengine.plan.relational.type.InternalTypeManager; import org.apache.iotdb.commons.utils.TestOnly; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.common.MPPQueryContext; import org.apache.iotdb.db.queryengine.execution.exchange.sink.DownStreamChannelLocation; import org.apache.iotdb.db.queryengine.plan.planner.distribution.NodeDistribution; @@ -90,7 +91,9 @@ public TableDistributedPlanner( List distributedOptimizers, DataNodeLocationSupplierFactory.DataNodeLocationSupplier dataNodeLocationSupplier) { this.analysis = analysis; - this.symbolAllocator = requireNonNull(symbolAllocator, "symbolAllocator is null"); + this.symbolAllocator = + requireNonNull( + symbolAllocator, DataNodeQueryMessages.EXCEPTION_SYMBOLALLOCATOR_IS_NULL_E2BE1908); this.logicalQueryPlan = logicalQueryPlan; this.mppQueryContext = logicalQueryPlan.getContext(); this.optimizers = distributedOptimizers; @@ -136,7 +139,9 @@ public PlanNode generateDistributedPlanWithOptimize( new TableDistributedPlanGenerator( mppQueryContext, analysis, symbolAllocator, dataNodeLocationSupplier) .genResult(logicalQueryPlan.getRootNode(), planContext); - checkArgument(distributedPlanResult.size() == 1, "Root node must return only one"); + checkArgument( + distributedPlanResult.size() == 1, + DataNodeQueryMessages.EXCEPTION_ROOT_NODE_MUST_RETURN_ONLY_ONE_FF42061C); // distribute plan optimize rule PlanNode distributedPlan = distributedPlanResult.get(0); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/distribute/TableModelTypeProviderExtractor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/distribute/TableModelTypeProviderExtractor.java index dab8548887f5e..aaf3725ec2a97 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/distribute/TableModelTypeProviderExtractor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/distribute/TableModelTypeProviderExtractor.java @@ -38,6 +38,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.planner.node.StreamSortNode; import org.apache.iotdb.commons.queryengine.plan.relational.planner.node.TopKNode; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Expression; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.analyze.TypeProvider; import org.apache.iotdb.db.queryengine.plan.planner.plan.node.SimplePlanVisitor; import org.apache.iotdb.db.queryengine.plan.planner.plan.node.metadata.read.CountSchemaMergeNode; @@ -95,8 +96,10 @@ private void addOutputSymbolsToTypeProvider(PlanNode node) { if (!feTypeProvider.isSymbolExist(symbol)) { throw new IllegalStateException( String.format( - "Symbol: %s is not exist in feTypeProvider with %s", - symbol, node.getClass().getSimpleName())); + DataNodeQueryMessages + .QUERY_EXCEPTION_SYMBOL_S_IS_NOT_EXIST_IN_FETYPEPROVIDER_WITH_S_5CBBFB8B, + symbol, + node.getClass().getSimpleName())); } beTypeProvider.putTableModelType(symbol, feTypeProvider.getTableModelType(symbol)); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/ir/ExpressionTreeRewriter.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/ir/ExpressionTreeRewriter.java index a5c4b15cbcd24..619495ac7ee09 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/ir/ExpressionTreeRewriter.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/ir/ExpressionTreeRewriter.java @@ -58,6 +58,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Trim; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.TypeParameter; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.WhenClause; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.AstVisitor; import com.google.common.collect.ImmutableList; @@ -115,7 +116,9 @@ public Expression visitExpression(Expression node, Context context) { // visit method, // so visitExpression() should never be called. throw new UnsupportedOperationException( - "visit() not implemented for " + node.getClass().getName()); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_VISIT_NOT_IMPLEMENTED_FOR_S_1A798A4D, + node.getClass().getName())); } @Override diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/ir/IrUtils.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/ir/IrUtils.java index dda95e8b7f74c..7b19a444f97f0 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/ir/IrUtils.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/ir/IrUtils.java @@ -143,8 +143,8 @@ public static Expression or(Collection expressions) { public static Expression logicalExpression( LogicalExpression.Operator operator, Collection expressions) { - requireNonNull(operator, "operator is null"); - requireNonNull(expressions, "expressions is null"); + requireNonNull(operator, DataNodeQueryMessages.EXCEPTION_OPERATOR_IS_NULL_F5BB9F59); + requireNonNull(expressions, DataNodeQueryMessages.EXCEPTION_EXPRESSIONS_IS_NULL_C44D9384); if (expressions.isEmpty()) { switch (operator) { @@ -182,7 +182,7 @@ public static Expression filterDeterministicConjuncts(Expression expression) { } public static Expression combineConjuncts(Collection expressions) { - requireNonNull(expressions, "expressions is null"); + requireNonNull(expressions, DataNodeQueryMessages.EXCEPTION_EXPRESSIONS_IS_NULL_C44D9384); List conjuncts = expressions.stream() @@ -200,7 +200,7 @@ public static Expression combineConjuncts(Collection expressions) { } public static Expression combineConjunctsWithDuplicates(Collection expressions) { - requireNonNull(expressions, "expressions is null"); + requireNonNull(expressions, DataNodeQueryMessages.EXCEPTION_EXPRESSIONS_IS_NULL_C44D9384); List conjuncts = expressions.stream() @@ -225,7 +225,7 @@ public static Expression combineDisjuncts(Collection expressions) { public static Expression combineDisjunctsWithDefault( Collection expressions, Expression emptyDefault) { - requireNonNull(expressions, "expressions is null"); + requireNonNull(expressions, DataNodeQueryMessages.EXCEPTION_EXPRESSIONS_IS_NULL_C44D9384); List disjuncts = expressions.stream() diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/ir/PredicateWithUncorrelatedScalarSubqueryReconstructor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/ir/PredicateWithUncorrelatedScalarSubqueryReconstructor.java index 3e0ef250eb4e0..96fed18037920 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/ir/PredicateWithUncorrelatedScalarSubqueryReconstructor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/ir/PredicateWithUncorrelatedScalarSubqueryReconstructor.java @@ -182,23 +182,31 @@ public Optional fetchUncorrelatedSubqueryResultForPredicate( } final Column[] columns = tsBlock.get().getValueColumns(); // check column count - checkArgument(columns.length == 1, "Scalar Subquery result should only have one column."); + checkArgument( + columns.length == 1, + DataNodeQueryMessages + .EXCEPTION_SCALAR_SUBQUERY_RESULT_SHOULD_ONLY_HAVE_ONE_COLUMN_DOT_893F76CB); // check row count rowCount += tsBlock.get().getPositionCount(); checkArgument( rowCount == 1 && !columns[0].isNull(0), - "Scalar Subquery result should only have one row."); + DataNodeQueryMessages + .EXCEPTION_SCALAR_SUBQUERY_RESULT_SHOULD_ONLY_HAVE_ONE_ROW_DOT_F9007BBC); column = columns[0]; // column type DatasetHeader datasetHeader = coordinator.getQueryExecution(queryId).getDatasetHeader(); List dataTypes = datasetHeader.getRespDataTypes(); - checkArgument(dataTypes.size() == 1, "Scalar Subquery result should only have one column."); + checkArgument( + dataTypes.size() == 1, + DataNodeQueryMessages + .EXCEPTION_SCALAR_SUBQUERY_RESULT_SHOULD_ONLY_HAVE_ONE_COLUMN_DOT_893F76CB); dataType = dataTypes.get(0); } checkArgument( dataType != null && column != null, - "Scalar Subquery result should not get null dataType or null column."); + DataNodeQueryMessages + .EXCEPTION_SCALAR_SUBQUERY_RESULT_SHOULD_NOT_GET_NULL_DATATYPE_OR_NULL_COLUMN_DOT_616056F4); switch (dataType) { case INT32: case DATE: @@ -220,7 +228,9 @@ public Optional fetchUncorrelatedSubqueryResultForPredicate( default: throw new IllegalArgumentException( String.format( - "Unsupported data type for scalar subquery result: %s", column.getDataType())); + DataNodeQueryMessages + .QUERY_EXCEPTION_UNSUPPORTED_DATA_TYPE_FOR_SCALAR_SUBQUERY_RESULT_S_4381E489, + column.getDataType())); } } catch (final Throwable throwable) { t = throwable; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/ir/SubExpressionExtractor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/ir/SubExpressionExtractor.java index 24be8cde97848..3182b006a6e9f 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/ir/SubExpressionExtractor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/ir/SubExpressionExtractor.java @@ -20,6 +20,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Expression; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Node; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import com.google.common.graph.SuccessorsFunction; import com.google.common.graph.Traverser; @@ -43,6 +44,7 @@ public static Stream extract(Expression expression) { public static Stream preOrder(Node node) { return stream( Traverser.forTree((SuccessorsFunction) Node::getChildren) - .depthFirstPreOrder(requireNonNull(node, "node is null"))); + .depthFirstPreOrder( + requireNonNull(node, DataNodeQueryMessages.EXCEPTION_NODE_IS_NULL_C1479F4A))); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/IterativeOptimizer.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/IterativeOptimizer.java index e450b2ba08340..5f771e5ab1449 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/IterativeOptimizer.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/IterativeOptimizer.java @@ -26,6 +26,7 @@ import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.PlanNode; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.PlanNodeId; import org.apache.iotdb.commons.queryengine.plan.relational.planner.iterative.GroupReference; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.common.QueryId; import org.apache.iotdb.db.queryengine.execution.warnings.WarningCollector; import org.apache.iotdb.db.queryengine.plan.relational.execution.querystats.PlanOptimizersStatsCollector; @@ -81,10 +82,14 @@ public IterativeOptimizer( Predicate useLegacyRules, List legacyRules, Set> newRules) { - this.plannerContext = requireNonNull(plannerContext, "plannerContext is null"); - this.stats = requireNonNull(stats, "stats is null"); - this.useLegacyRules = requireNonNull(useLegacyRules, "useLegacyRules is null"); - this.rules = requireNonNull(newRules, "rules is null"); + this.plannerContext = + requireNonNull( + plannerContext, DataNodeQueryMessages.EXCEPTION_PLANNERCONTEXT_IS_NULL_B7C7DE50); + this.stats = requireNonNull(stats, DataNodeQueryMessages.EXCEPTION_STATS_IS_NULL_D3627E6A); + this.useLegacyRules = + requireNonNull( + useLegacyRules, DataNodeQueryMessages.EXCEPTION_USELEGACYRULES_IS_NULL_0AD13CAB); + this.rules = requireNonNull(newRules, DataNodeQueryMessages.EXCEPTION_RULES_IS_NULL_DF243716); this.legacyRules = ImmutableList.copyOf(legacyRules); this.ruleIndex = RuleIndex.builder().register(newRules).build(); @@ -207,7 +212,8 @@ private Rule.Result transform(PlanNode node, Rule rule, Context context) result = rule.apply(match.capture(nodeCapture), match.captures(), ruleContext(context)); if (LOG.isDebugEnabled() && !result.isEmpty()) { - LOG.debug("Rule: %s\nBefore:\n%s\nAfter:\n%s", rule.getClass().getName(), "", ""); + LOG.debug( + DataNodeQueryMessages.RULE_S_BEFORE_S_AFTER_S, rule.getClass().getName(), "", ""); } duration = nanoTime() - start; } catch (RuntimeException e) { @@ -232,7 +238,9 @@ private boolean exploreChildren(int group, Context context, Set chan for (PlanNode child : expression.getChildren()) { checkArgument( child instanceof GroupReference, - "Expected child to be a group reference. Found: " + child.getClass().getName()); + DataNodeQueryMessages + .EXCEPTION_EXPECTED_CHILD_TO_BE_A_GROUP_REFERENCE_DOT_FOUND_COLON_EC01971C + + child.getClass().getName()); if (exploreGroup(((GroupReference) child).getGroupId(), context, changedPlanNodeIds)) { progress = true; @@ -319,7 +327,9 @@ public Context( SessionInfo sessionInfo, WarningCollector warningCollector) { checkArgument( - timeoutInMilliseconds >= 0, "Timeout has to be a non-negative number [milliseconds]"); + timeoutInMilliseconds >= 0, + DataNodeQueryMessages + .EXCEPTION_TIMEOUT_HAS_TO_BE_A_NON_MINUS_NEGATIVE_NUMBER_LEFT_BRACKET_MILLISECONDS_RIGHT_BR_5201D8B3); this.memo = memo; this.lookup = lookup; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/Lookup.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/Lookup.java index b7bf3383ecf53..8d265ee1aff72 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/Lookup.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/Lookup.java @@ -21,6 +21,7 @@ import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.PlanNode; import org.apache.iotdb.commons.queryengine.plan.relational.planner.iterative.GroupReference; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import java.util.function.Function; import java.util.stream.Stream; @@ -64,7 +65,7 @@ static Lookup from(Function> resolver) { return node -> { checkArgument( node instanceof GroupReference, - "Node '%s' is not a GroupReference", + DataNodeQueryMessages.EXCEPTION_NODE_QUOTE_ARG_QUOTE_IS_NOT_A_GROUPREFERENCE_73C8C127, node.getClass().getSimpleName()); return resolver.apply((GroupReference) node); }; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/Memo.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/Memo.java index 243333a5cbbe0..5864e9903c0aa 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/Memo.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/Memo.java @@ -21,6 +21,7 @@ import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.PlanNode; import org.apache.iotdb.commons.queryengine.plan.relational.planner.iterative.GroupReference; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.common.QueryId; import com.google.common.collect.HashMultiset; @@ -89,7 +90,10 @@ public int getRootGroup() { } private Group getGroup(int group) { - checkArgument(groups.containsKey(group), "Invalid group: %s", group); + checkArgument( + groups.containsKey(group), + DataNodeQueryMessages.EXCEPTION_INVALID_GROUP_COLON_ARG_C0BAD253, + group); return groups.get(group); } @@ -115,7 +119,8 @@ public PlanNode replace(int groupId, PlanNode node, String reason) { checkArgument( new HashSet<>(old.getOutputSymbols()).equals(new HashSet<>(node.getOutputSymbols())), - "%s: transformed expression doesn't produce same outputs: %s vs %s", + DataNodeQueryMessages + .EXCEPTION_ARG_COLON_TRANSFORMED_EXPRESSION_DOESN_QUOTE_T_PRODUCE_SAME_OUTPUTS_COLON_ARG_VS_F9BAF138, reason, old.getOutputSymbols(), node.getOutputSymbols()); @@ -155,7 +160,9 @@ private void decrementReferenceCounts(PlanNode fromNode, int fromGroup) { for (int group : references) { Group childGroup = groups.get(group); - checkState(childGroup.incomingReferences.remove(fromGroup), "Reference to remove not found"); + checkState( + childGroup.incomingReferences.remove(fromGroup), + DataNodeQueryMessages.EXCEPTION_REFERENCE_TO_REMOVE_NOT_FOUND_2EB93289); if (childGroup.incomingReferences.isEmpty()) { deleteGroup(group); @@ -173,7 +180,7 @@ private Set getAllReferences(PlanNode node) { private void deleteGroup(int group) { checkArgument( getGroup(group).incomingReferences.isEmpty(), - "Cannot delete group that has incoming references"); + DataNodeQueryMessages.EXCEPTION_CANNOT_DELETE_GROUP_THAT_HAS_INCOMING_REFERENCES_83C9D700); PlanNode deletedNode = groups.remove(group).membership; decrementReferenceCounts(deletedNode, group); } @@ -226,7 +233,8 @@ static Group withMember(PlanNode member) { private PlanCostEstimate cost;*/ private Group(PlanNode member) { - this.membership = requireNonNull(member, "member is null"); + this.membership = + requireNonNull(member, DataNodeQueryMessages.EXCEPTION_MEMBER_IS_NULL_466D8670); } } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/Plans.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/Plans.java index 64decb66f2c7a..4fa02bf753c55 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/Plans.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/Plans.java @@ -21,6 +21,7 @@ import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.PlanNode; import org.apache.iotdb.commons.queryengine.plan.relational.planner.iterative.GroupReference; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.planner.plan.node.PlanVisitor; import java.util.List; @@ -30,7 +31,7 @@ public final class Plans { public static PlanNode resolveGroupReferences(PlanNode node, Lookup lookup) { - requireNonNull(node, "node is null"); + requireNonNull(node, DataNodeQueryMessages.EXCEPTION_NODE_IS_NULL_C1479F4A); return node.accept(new ResolvingVisitor(lookup), null); } @@ -38,7 +39,7 @@ private static class ResolvingVisitor implements PlanVisitor { private final Lookup lookup; public ResolvingVisitor(Lookup lookup) { - this.lookup = requireNonNull(lookup, "lookup is null"); + this.lookup = requireNonNull(lookup, DataNodeQueryMessages.EXCEPTION_LOOKUP_IS_NULL_B8FD7E65); } @Override diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/Rule.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/Rule.java index 6c1c1bab1ec47..f16adfac5900a 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/Rule.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/Rule.java @@ -23,6 +23,7 @@ import org.apache.iotdb.calc.plan.relational.utils.matching.Pattern; import org.apache.iotdb.commons.queryengine.common.SessionInfo; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.PlanNode; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.common.QueryId; import org.apache.iotdb.db.queryengine.execution.warnings.WarningCollector; import org.apache.iotdb.db.queryengine.plan.relational.planner.SymbolAllocator; @@ -73,7 +74,9 @@ public static Result ofPlanNode(PlanNode transformedPlan) { private final Optional transformedPlan; private Result(Optional transformedPlan) { - this.transformedPlan = requireNonNull(transformedPlan, "transformedPlan is null"); + this.transformedPlan = + requireNonNull( + transformedPlan, DataNodeQueryMessages.EXCEPTION_TRANSFORMEDPLAN_IS_NULL_83B2099A); } public Optional getTransformedPlan() { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/CanonicalizeExpressionRewriter.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/CanonicalizeExpressionRewriter.java index c12642ee729a3..8ad62b9713e15 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/CanonicalizeExpressionRewriter.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/CanonicalizeExpressionRewriter.java @@ -31,6 +31,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.SearchedCaseExpression; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.SymbolReference; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.WhenClause; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.analyze.TypeProvider; import org.apache.iotdb.db.queryengine.plan.relational.planner.IrTypeAnalyzer; import org.apache.iotdb.db.queryengine.plan.relational.planner.PlannerContext; @@ -65,8 +66,8 @@ public static Expression rewrite( PlannerContext plannerContext, IrTypeAnalyzer typeAnalyzer, TypeProvider types) { - requireNonNull(plannerContext, "plannerContext is null"); - requireNonNull(typeAnalyzer, "typeAnalyzer is null"); + requireNonNull(plannerContext, DataNodeQueryMessages.EXCEPTION_PLANNERCONTEXT_IS_NULL_B7C7DE50); + requireNonNull(typeAnalyzer, DataNodeQueryMessages.EXCEPTION_TYPEANALYZER_IS_NULL_3106B188); if (expression instanceof SymbolReference) { return expression; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/ExpressionRewriteRuleSet.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/ExpressionRewriteRuleSet.java index 23edba1d56d48..dfd84d1716880 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/ExpressionRewriteRuleSet.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/ExpressionRewriteRuleSet.java @@ -30,6 +30,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.planner.rowpattern.ExpressionAndValuePointers; import org.apache.iotdb.commons.queryengine.plan.relational.planner.rowpattern.IrLabel; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Expression; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.relational.planner.SymbolsExtractor; import org.apache.iotdb.db.queryengine.plan.relational.planner.iterative.Rule; @@ -56,7 +57,8 @@ public interface ExpressionRewriter { private final ExpressionRewriter rewriter; public ExpressionRewriteRuleSet(ExpressionRewriter rewriter) { - this.rewriter = requireNonNull(rewriter, "rewriter is null"); + this.rewriter = + requireNonNull(rewriter, DataNodeQueryMessages.EXCEPTION_REWRITER_IS_NULL_B0D8CC88); } public Set> rules() { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/ImplementExceptAll.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/ImplementExceptAll.java index a94e59876f778..63dec0a1e78b6 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/ImplementExceptAll.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/ImplementExceptAll.java @@ -32,6 +32,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.GenericLiteral; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.QualifiedName; import org.apache.iotdb.commons.udf.builtin.relational.TableBuiltinScalarFunction; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.relational.metadata.Metadata; import org.apache.iotdb.db.queryengine.plan.relational.planner.iterative.Rule; import org.apache.iotdb.db.queryengine.plan.relational.planner.node.Patterns; @@ -52,7 +53,8 @@ public class ImplementExceptAll implements Rule { private final Metadata metadata; public ImplementExceptAll(Metadata metadata) { - this.metadata = requireNonNull(metadata, "metadata is null"); + this.metadata = + requireNonNull(metadata, DataNodeQueryMessages.EXCEPTION_METADATA_IS_NULL_6F8F9BA0); } @Override @@ -73,7 +75,8 @@ public Result apply(ExceptNode node, Captures captures, Context context) { checkState( !translationResult.getCountSymbols().isEmpty(), - "ExceptNode translation result has no count symbols"); + DataNodeQueryMessages + .EXCEPTION_EXCEPTNODE_TRANSLATION_RESULT_HAS_NO_COUNT_SYMBOLS_8653930E); // 2. add the filter node above the result node from translation process // filter condition : row_number <= greatest(...greatest((greatest(count1 - count2, 0) - count3, diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/ImplementExceptDistinctAsUnion.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/ImplementExceptDistinctAsUnion.java index 1247335f77daa..9b7ee07376c1e 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/ImplementExceptDistinctAsUnion.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/ImplementExceptDistinctAsUnion.java @@ -28,6 +28,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.ComparisonExpression; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Expression; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.GenericLiteral; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.relational.metadata.Metadata; import org.apache.iotdb.db.queryengine.plan.relational.planner.iterative.Rule; import org.apache.iotdb.db.queryengine.plan.relational.planner.node.Patterns; @@ -46,7 +47,8 @@ public class ImplementExceptDistinctAsUnion implements Rule { Patterns.except().with(Patterns.Except.distinct().equalTo(true)); public ImplementExceptDistinctAsUnion(Metadata metadata) { - this.metadata = requireNonNull(metadata, "metadata is null"); + this.metadata = + requireNonNull(metadata, DataNodeQueryMessages.EXCEPTION_METADATA_IS_NULL_6F8F9BA0); } @Override diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/ImplementIntersectAll.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/ImplementIntersectAll.java index 2460f923ef67c..2b94174ef3d79 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/ImplementIntersectAll.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/ImplementIntersectAll.java @@ -30,6 +30,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.FunctionCall; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.QualifiedName; import org.apache.iotdb.commons.udf.builtin.relational.TableBuiltinScalarFunction; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.relational.metadata.Metadata; import org.apache.iotdb.db.queryengine.plan.relational.planner.iterative.Rule; @@ -46,7 +47,8 @@ public class ImplementIntersectAll implements Rule { private final Metadata metadata; public ImplementIntersectAll(Metadata metadata) { - this.metadata = requireNonNull(metadata, "metadata is null"); + this.metadata = + requireNonNull(metadata, DataNodeQueryMessages.EXCEPTION_METADATA_IS_NULL_6F8F9BA0); } @Override diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/ImplementIntersectDistinctAsUnion.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/ImplementIntersectDistinctAsUnion.java index 212ae94da4a37..d286e40bf0155 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/ImplementIntersectDistinctAsUnion.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/ImplementIntersectDistinctAsUnion.java @@ -28,6 +28,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.ComparisonExpression; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Expression; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.GenericLiteral; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.relational.metadata.Metadata; import org.apache.iotdb.db.queryengine.plan.relational.planner.iterative.Rule; import org.apache.iotdb.db.queryengine.plan.relational.planner.node.Patterns; @@ -52,7 +53,8 @@ public Pattern getPattern() { } public ImplementIntersectDistinctAsUnion(Metadata metadata) { - this.metadata = requireNonNull(metadata, "metadata is null"); + this.metadata = + requireNonNull(metadata, DataNodeQueryMessages.EXCEPTION_METADATA_IS_NULL_6F8F9BA0); } @Override diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/InlineProjections.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/InlineProjections.java index 32ed39d1644a8..52144a519bed2 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/InlineProjections.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/InlineProjections.java @@ -29,6 +29,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.planner.node.ProjectNode; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Expression; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.SymbolReference; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.analyze.TypeProvider; import org.apache.iotdb.db.queryengine.plan.relational.planner.PlannerContext; import org.apache.iotdb.db.queryengine.plan.relational.planner.SymbolsExtractor; @@ -67,7 +68,9 @@ public class InlineProjections implements Rule { private final PlannerContext plannerContext; public InlineProjections(PlannerContext plannerContext) { - this.plannerContext = requireNonNull(plannerContext, "plannerContext is null"); + this.plannerContext = + requireNonNull( + plannerContext, DataNodeQueryMessages.EXCEPTION_PLANNERCONTEXT_IS_NULL_B7C7DE50); } @Override diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/PruneTableScanColumns.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/PruneTableScanColumns.java index bf02d62f546e8..c7c0ae81d0563 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/PruneTableScanColumns.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/PruneTableScanColumns.java @@ -23,6 +23,7 @@ import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.TableScanNode; import org.apache.iotdb.commons.queryengine.plan.relational.metadata.ColumnSchema; import org.apache.iotdb.commons.queryengine.plan.relational.planner.Symbol; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.relational.metadata.Metadata; import org.apache.iotdb.db.queryengine.plan.relational.planner.SymbolsExtractor; import org.apache.iotdb.db.queryengine.plan.relational.planner.node.AggregationTableScanNode; @@ -48,7 +49,8 @@ public class PruneTableScanColumns extends ProjectOffPushDownRule public PruneTableScanColumns(Metadata metadata) { super(tableScan()); - this.metadata = requireNonNull(metadata, "metadata is null"); + this.metadata = + requireNonNull(metadata, DataNodeQueryMessages.EXCEPTION_METADATA_IS_NULL_6F8F9BA0); } @Override @@ -183,7 +185,9 @@ public static Optional pruneColumns(TableScanNode node, Set re return Optional.empty(); } else { throw new UnsupportedOperationException( - "Unknown TableScanNode type: " + node.getClass().getSimpleName()); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNKNOWN_TABLESCANNODE_TYPE_S_6246EF1E, + node.getClass().getSimpleName())); } } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/PushDownFilterIntoWindow.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/PushDownFilterIntoWindow.java index 3a74cd4ad975c..03a60885872ba 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/PushDownFilterIntoWindow.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/PushDownFilterIntoWindow.java @@ -31,6 +31,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Expression; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Literal; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.SymbolReference; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.relational.planner.PlannerContext; import org.apache.iotdb.db.queryengine.plan.relational.planner.iterative.Rule; @@ -55,7 +56,9 @@ public class PushDownFilterIntoWindow implements Rule { private final PlannerContext plannerContext; public PushDownFilterIntoWindow(PlannerContext plannerContext) { - this.plannerContext = requireNonNull(plannerContext, "plannerContext is null"); + this.plannerContext = + requireNonNull( + plannerContext, DataNodeQueryMessages.EXCEPTION_PLANNERCONTEXT_IS_NULL_B7C7DE50); this.pattern = filter() .with( diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/PushDownNegationsExpressionRewriter.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/PushDownNegationsExpressionRewriter.java index 9e1bdcf0ed9cf..902a946b5af7b 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/PushDownNegationsExpressionRewriter.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/PushDownNegationsExpressionRewriter.java @@ -24,6 +24,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Expression; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.LogicalExpression; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.NotExpression; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.relational.metadata.Metadata; import org.apache.iotdb.db.queryengine.plan.relational.planner.ir.ExpressionRewriter; import org.apache.iotdb.db.queryengine.plan.relational.planner.ir.ExpressionTreeRewriter; @@ -60,9 +61,13 @@ private static class Visitor extends ExpressionRewriter { private final Map, Type> expressionTypes; public Visitor(Metadata metadata, Map, Type> expressionTypes) { - this.metadata = requireNonNull(metadata, "metadata is null"); + this.metadata = + requireNonNull(metadata, DataNodeQueryMessages.EXCEPTION_METADATA_IS_NULL_6F8F9BA0); this.expressionTypes = - ImmutableMap.copyOf(requireNonNull(expressionTypes, "expressionTypes is null")); + ImmutableMap.copyOf( + requireNonNull( + expressionTypes, + DataNodeQueryMessages.EXCEPTION_EXPRESSIONTYPES_IS_NULL_4107A4A2)); } @Override @@ -87,7 +92,9 @@ public Expression rewriteNotExpression( Expression right = child.getRight(); Type leftType = expressionTypes.get(NodeRef.of(left)); Type rightType = expressionTypes.get(NodeRef.of(right)); - checkState(leftType != null && rightType != null, "missing type for expression"); + checkState( + leftType != null && rightType != null, + DataNodeQueryMessages.EXCEPTION_MISSING_TYPE_FOR_EXPRESSION_3D66D302); if ((typeHasNaN(leftType) || typeHasNaN(rightType)) && (operator == GREATER_THAN_OR_EQUAL || operator == GREATER_THAN diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/RemoveTrivialFilters.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/RemoveTrivialFilters.java index 2e7442cf0fa04..5dff1f20cea0d 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/RemoveTrivialFilters.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/RemoveTrivialFilters.java @@ -24,6 +24,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.planner.node.FilterNode; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Expression; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.NullLiteral; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.relational.planner.iterative.Rule; import static com.google.common.base.Preconditions.checkArgument; @@ -42,7 +43,8 @@ public Pattern getPattern() { public Result apply(FilterNode filterNode, Captures captures, Context context) { Expression predicate = filterNode.getPredicate(); checkArgument( - !(predicate instanceof NullLiteral), "Unexpected null literal without a cast to boolean"); + !(predicate instanceof NullLiteral), + DataNodeQueryMessages.EXCEPTION_UNEXPECTED_NULL_LITERAL_WITHOUT_A_CAST_TO_BOOLEAN_D399CFCB); if (predicate.equals(TRUE_LITERAL)) { return Result.ofPlanNode(filterNode.getChild()); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/SetOperationMerge.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/SetOperationMerge.java index 1e5e707cc3d3f..5c1c283ea7a98 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/SetOperationMerge.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/SetOperationMerge.java @@ -25,6 +25,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.planner.node.IntersectNode; import org.apache.iotdb.commons.queryengine.plan.relational.planner.node.SetOperationNode; import org.apache.iotdb.commons.queryengine.plan.relational.planner.node.UnionNode; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.relational.planner.iterative.Lookup; import org.apache.iotdb.db.queryengine.plan.relational.planner.iterative.Rule; @@ -57,7 +58,7 @@ public Optional merge() { checkState( node instanceof UnionNode || node instanceof IntersectNode, - "unexpected node type: %s", + DataNodeQueryMessages.EXCEPTION_UNEXPECTED_NODE_TYPE_COLON_ARG_B1C0328F, node.getClass().getSimpleName()); Lookup lookup = context.getLookup(); // Pre-check @@ -122,7 +123,9 @@ public Optional merge() { public Optional mergeFirstSource() { checkState( - node instanceof ExceptNode, "unexpected node type: %s", node.getClass().getSimpleName()); + node instanceof ExceptNode, + DataNodeQueryMessages.EXCEPTION_UNEXPECTED_NODE_TYPE_COLON_ARG_B1C0328F, + node.getClass().getSimpleName()); Lookup lookup = context.getLookup(); @@ -216,7 +219,9 @@ private Optional judgeQuantifierForUnionAndIntersect( // never should reach here throw new IllegalStateException( - "unexpected setOperation node type: " + node.getClass().getSimpleName()); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNEXPECTED_SETOPERATION_NODE_TYPE_S_3AE3EECA, + node.getClass().getSimpleName())); } /** diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/SetOperationNodeTranslator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/SetOperationNodeTranslator.java index a5ba553d77ae9..1f53fe3751a0b 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/SetOperationNodeTranslator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/SetOperationNodeTranslator.java @@ -42,6 +42,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.FrameBound; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.NullLiteral; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.WindowFrame; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.common.QueryId; import org.apache.iotdb.db.queryengine.plan.relational.metadata.Metadata; import org.apache.iotdb.db.queryengine.plan.relational.planner.SymbolAllocator; @@ -83,15 +84,21 @@ public class SetOperationNodeTranslator { public SetOperationNodeTranslator( Metadata metadata, SymbolAllocator symbolAllocator, QueryId idAllocator) { - this.metadata = requireNonNull(metadata, "metadata is null"); - this.symbolAllocator = requireNonNull(symbolAllocator, "symbolAllocator is null"); - this.idAllocator = requireNonNull(idAllocator, "idAllocator is null"); + this.metadata = + requireNonNull(metadata, DataNodeQueryMessages.EXCEPTION_METADATA_IS_NULL_6F8F9BA0); + this.symbolAllocator = + requireNonNull( + symbolAllocator, DataNodeQueryMessages.EXCEPTION_SYMBOLALLOCATOR_IS_NULL_E2BE1908); + this.idAllocator = + requireNonNull(idAllocator, DataNodeQueryMessages.EXCEPTION_IDALLOCATOR_IS_NULL_752B308D); } /** for intersect distinct and except distinct , use true and false for markers */ public TranslationResult makeSetContainmentPlanForDistinct(SetOperationNode node) { - checkArgument(!(node instanceof UnionNode), "Cannot simplify a UnionNode"); + checkArgument( + !(node instanceof UnionNode), + DataNodeQueryMessages.EXCEPTION_CANNOT_SIMPLIFY_A_UNIONNODE_9D5B09A7); List markers = allocateSymbols(node.getChildren().size(), MARKER, BOOLEAN); // 1. add the marker column to the origin planNode @@ -115,7 +122,9 @@ public TranslationResult makeSetContainmentPlanForDistinct(SetOperationNode node /** for intersect all and except all, use true and false for markers */ public TranslationResult makeSetContainmentPlanForAll(SetOperationNode node) { - checkArgument(!(node instanceof UnionNode), "Cannot simplify a UnionNode"); + checkArgument( + !(node instanceof UnionNode), + DataNodeQueryMessages.EXCEPTION_CANNOT_SIMPLIFY_A_UNIONNODE_9D5B09A7); List markers = allocateSymbols(node.getChildren().size(), MARKER, BOOLEAN); // for every child of SetOperation node, add the marker column for the child @@ -157,7 +166,8 @@ private WindowNode appendCounts( checkArgument( markers.size() == countOutputs.size(), - "the size of markers should be same as the size of count output symbols"); + DataNodeQueryMessages + .EXCEPTION_THE_SIZE_OF_MARKERS_SHOULD_BE_SAME_AS_THE_SIZE_OF_COUNT_OUTPUT_SYMBOLS_6DBDD287); // Add group node above the union node to assist partitioning, preparing for the window node ImmutableMap.Builder sortOrderings = ImmutableMap.builder(); @@ -333,10 +343,15 @@ public TranslationResult(PlanNode planNode, List countSymbols) { public TranslationResult( PlanNode planNode, List countSymbols, Optional rowNumberSymbol) { - this.planNode = requireNonNull(planNode, "planNode is null"); + this.planNode = + requireNonNull(planNode, DataNodeQueryMessages.EXCEPTION_PLANNODE_IS_NULL_49FBBFCF); this.countSymbols = - ImmutableList.copyOf(requireNonNull(countSymbols, "countSymbols is null")); - this.rowNumberSymbol = requireNonNull(rowNumberSymbol, "rowNumberSymbol is null"); + ImmutableList.copyOf( + requireNonNull( + countSymbols, DataNodeQueryMessages.EXCEPTION_COUNTSYMBOLS_IS_NULL_416D96FB)); + this.rowNumberSymbol = + requireNonNull( + rowNumberSymbol, DataNodeQueryMessages.EXCEPTION_ROWNUMBERSYMBOL_IS_NULL_BA30E0AA); } public List getCountSymbols() { @@ -344,7 +359,9 @@ public List getCountSymbols() { } public Symbol getRowNumberSymbol() { - checkState(rowNumberSymbol.isPresent(), "rowNumberSymbol is empty"); + checkState( + rowNumberSymbol.isPresent(), + DataNodeQueryMessages.EXCEPTION_ROWNUMBERSYMBOL_IS_EMPTY_34FE9565); return rowNumberSymbol.get(); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/SimplifyCountOverConstant.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/SimplifyCountOverConstant.java index e950840255be0..c500ca1fd3550 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/SimplifyCountOverConstant.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/SimplifyCountOverConstant.java @@ -31,6 +31,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.planner.node.ProjectNode; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Expression; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.SymbolReference; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.relational.planner.PlannerContext; import org.apache.iotdb.db.queryengine.plan.relational.planner.iterative.Rule; @@ -63,7 +64,9 @@ public class SimplifyCountOverConstant implements Rule { private final PlannerContext plannerContext; public SimplifyCountOverConstant(PlannerContext plannerContext) { - this.plannerContext = requireNonNull(plannerContext, "plannerContext is null"); + this.plannerContext = + requireNonNull( + plannerContext, DataNodeQueryMessages.EXCEPTION_PLANNERCONTEXT_IS_NULL_B7C7DE50); } @Override diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/SimplifyExpressions.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/SimplifyExpressions.java index a13757ce7c5c1..b381ca69eae78 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/SimplifyExpressions.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/SimplifyExpressions.java @@ -23,6 +23,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.analyzer.NodeRef; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Expression; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.SymbolReference; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.relational.planner.IrExpressionInterpreter; import org.apache.iotdb.db.queryengine.plan.relational.planner.IrTypeAnalyzer; import org.apache.iotdb.db.queryengine.plan.relational.planner.LiteralEncoder; @@ -49,8 +50,8 @@ public static Expression rewrite( SymbolAllocator symbolAllocator, PlannerContext plannerContext, IrTypeAnalyzer typeAnalyzer) { - requireNonNull(plannerContext, "plannerContext is null"); - requireNonNull(typeAnalyzer, "typeAnalyzer is null"); + requireNonNull(plannerContext, DataNodeQueryMessages.EXCEPTION_PLANNERCONTEXT_IS_NULL_B7C7DE50); + requireNonNull(typeAnalyzer, DataNodeQueryMessages.EXCEPTION_TYPEANALYZER_IS_NULL_3106B188); if (expression instanceof SymbolReference) { return expression; } @@ -87,8 +88,8 @@ public Set> rules() { private static ExpressionRewriter createRewrite( PlannerContext plannerContext, IrTypeAnalyzer typeAnalyzer) { - requireNonNull(plannerContext, "plannerContext is null"); - requireNonNull(typeAnalyzer, "typeAnalyzer is null"); + requireNonNull(plannerContext, DataNodeQueryMessages.EXCEPTION_PLANNERCONTEXT_IS_NULL_B7C7DE50); + requireNonNull(typeAnalyzer, DataNodeQueryMessages.EXCEPTION_TYPEANALYZER_IS_NULL_3106B188); return (expression, context) -> rewrite( diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/SingleDistinctAggregationToGroupBy.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/SingleDistinctAggregationToGroupBy.java index e555a7ca18548..64ecfb346aa4f 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/SingleDistinctAggregationToGroupBy.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/SingleDistinctAggregationToGroupBy.java @@ -24,6 +24,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.planner.Symbol; import org.apache.iotdb.commons.queryengine.plan.relational.planner.node.AggregationNode; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Expression; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.relational.planner.iterative.Rule; import com.google.common.collect.ImmutableList; @@ -148,7 +149,9 @@ public Result apply(AggregationNode aggregation, Captures captures, Context cont private static AggregationNode.Aggregation removeDistinct( AggregationNode.Aggregation aggregation) { - checkArgument(aggregation.isDistinct(), "Expected aggregation to have DISTINCT input"); + checkArgument( + aggregation.isDistinct(), + DataNodeQueryMessages.EXCEPTION_EXPECTED_AGGREGATION_TO_HAVE_DISTINCT_INPUT_EC6AF059); return new AggregationNode.Aggregation( aggregation.getResolvedFunction(), diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/TransformCorrelatedDistinctAggregationWithProjection.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/TransformCorrelatedDistinctAggregationWithProjection.java index f9a9aac09b913..1409a6cda8e96 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/TransformCorrelatedDistinctAggregationWithProjection.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/TransformCorrelatedDistinctAggregationWithProjection.java @@ -30,6 +30,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.planner.node.CorrelatedJoinNode; import org.apache.iotdb.commons.queryengine.plan.relational.planner.node.JoinNode; import org.apache.iotdb.commons.queryengine.plan.relational.planner.node.ProjectNode; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.relational.planner.PlannerContext; import org.apache.iotdb.db.queryengine.plan.relational.planner.iterative.Rule; import org.apache.iotdb.db.queryengine.plan.relational.planner.node.Patterns; @@ -108,7 +109,9 @@ public class TransformCorrelatedDistinctAggregationWithProjection private final PlannerContext plannerContext; public TransformCorrelatedDistinctAggregationWithProjection(PlannerContext plannerContext) { - this.plannerContext = requireNonNull(plannerContext, "plannerContext is null"); + this.plannerContext = + requireNonNull( + plannerContext, DataNodeQueryMessages.EXCEPTION_PLANNERCONTEXT_IS_NULL_B7C7DE50); } @Override diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/TransformCorrelatedDistinctAggregationWithoutProjection.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/TransformCorrelatedDistinctAggregationWithoutProjection.java index fd898d9f1e871..07a699c357600 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/TransformCorrelatedDistinctAggregationWithoutProjection.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/TransformCorrelatedDistinctAggregationWithoutProjection.java @@ -28,6 +28,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.planner.node.AssignUniqueId; import org.apache.iotdb.commons.queryengine.plan.relational.planner.node.CorrelatedJoinNode; import org.apache.iotdb.commons.queryengine.plan.relational.planner.node.JoinNode; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.relational.planner.PlannerContext; import org.apache.iotdb.db.queryengine.plan.relational.planner.iterative.Rule; import org.apache.iotdb.db.queryengine.plan.relational.planner.node.Patterns; @@ -97,7 +98,9 @@ public class TransformCorrelatedDistinctAggregationWithoutProjection private final PlannerContext plannerContext; public TransformCorrelatedDistinctAggregationWithoutProjection(PlannerContext plannerContext) { - this.plannerContext = requireNonNull(plannerContext, "plannerContext is null"); + this.plannerContext = + requireNonNull( + plannerContext, DataNodeQueryMessages.EXCEPTION_PLANNERCONTEXT_IS_NULL_B7C7DE50); } @Override diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/TransformCorrelatedGlobalAggregationWithProjection.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/TransformCorrelatedGlobalAggregationWithProjection.java index 3cd116cb3ebf4..49f7332498040 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/TransformCorrelatedGlobalAggregationWithProjection.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/TransformCorrelatedGlobalAggregationWithProjection.java @@ -31,6 +31,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.planner.node.JoinNode; import org.apache.iotdb.commons.queryengine.plan.relational.planner.node.ProjectNode; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Expression; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.relational.planner.PlannerContext; import org.apache.iotdb.db.queryengine.plan.relational.planner.iterative.Rule; import org.apache.iotdb.db.queryengine.plan.relational.planner.node.Patterns; @@ -155,7 +156,9 @@ public class TransformCorrelatedGlobalAggregationWithProjection private final PlannerContext plannerContext; public TransformCorrelatedGlobalAggregationWithProjection(PlannerContext plannerContext) { - this.plannerContext = requireNonNull(plannerContext, "plannerContext is null"); + this.plannerContext = + requireNonNull( + plannerContext, DataNodeQueryMessages.EXCEPTION_PLANNERCONTEXT_IS_NULL_B7C7DE50); } @Override @@ -167,7 +170,7 @@ public Pattern getPattern() { public Result apply(CorrelatedJoinNode correlatedJoinNode, Captures captures, Context context) { checkArgument( correlatedJoinNode.getJoinType() == INNER || correlatedJoinNode.getJoinType() == LEFT, - "unexpected correlated join type: %s", + DataNodeQueryMessages.EXCEPTION_UNEXPECTED_CORRELATED_JOIN_TYPE_COLON_ARG_27E8EC42, correlatedJoinNode.getJoinType()); // if there is another aggregation below the AggregationNode, handle both diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/TransformCorrelatedGlobalAggregationWithoutProjection.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/TransformCorrelatedGlobalAggregationWithoutProjection.java index 6e343a1486203..9f21121dc4527 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/TransformCorrelatedGlobalAggregationWithoutProjection.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/TransformCorrelatedGlobalAggregationWithoutProjection.java @@ -31,6 +31,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.planner.node.JoinNode; import org.apache.iotdb.commons.queryengine.plan.relational.planner.node.ProjectNode; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Expression; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.relational.planner.PlannerContext; import org.apache.iotdb.db.queryengine.plan.relational.planner.iterative.Rule; import org.apache.iotdb.db.queryengine.plan.relational.planner.node.Patterns; @@ -147,7 +148,9 @@ public class TransformCorrelatedGlobalAggregationWithoutProjection private final PlannerContext plannerContext; public TransformCorrelatedGlobalAggregationWithoutProjection(PlannerContext plannerContext) { - this.plannerContext = requireNonNull(plannerContext, "plannerContext is null"); + this.plannerContext = + requireNonNull( + plannerContext, DataNodeQueryMessages.EXCEPTION_PLANNERCONTEXT_IS_NULL_B7C7DE50); } @Override @@ -159,7 +162,7 @@ public Pattern getPattern() { public Result apply(CorrelatedJoinNode correlatedJoinNode, Captures captures, Context context) { checkArgument( correlatedJoinNode.getJoinType() == INNER || correlatedJoinNode.getJoinType() == LEFT, - "unexpected correlated join type: %s", + DataNodeQueryMessages.EXCEPTION_UNEXPECTED_CORRELATED_JOIN_TYPE_COLON_ARG_27E8EC42, correlatedJoinNode.getJoinType()); PlanNode source = captures.get(SOURCE); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/TransformCorrelatedGroupedAggregationWithProjection.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/TransformCorrelatedGroupedAggregationWithProjection.java index ecd0da2b42e86..2b85826eb3404 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/TransformCorrelatedGroupedAggregationWithProjection.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/TransformCorrelatedGroupedAggregationWithProjection.java @@ -30,6 +30,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.planner.node.CorrelatedJoinNode; import org.apache.iotdb.commons.queryengine.plan.relational.planner.node.JoinNode; import org.apache.iotdb.commons.queryengine.plan.relational.planner.node.ProjectNode; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.relational.planner.PlannerContext; import org.apache.iotdb.db.queryengine.plan.relational.planner.iterative.Rule; import org.apache.iotdb.db.queryengine.plan.relational.planner.node.Patterns; @@ -148,7 +149,9 @@ public class TransformCorrelatedGroupedAggregationWithProjection private final PlannerContext plannerContext; public TransformCorrelatedGroupedAggregationWithProjection(PlannerContext plannerContext) { - this.plannerContext = requireNonNull(plannerContext, "plannerContext is null"); + this.plannerContext = + requireNonNull( + plannerContext, DataNodeQueryMessages.EXCEPTION_PLANNERCONTEXT_IS_NULL_B7C7DE50); } @Override diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/TransformCorrelatedGroupedAggregationWithoutProjection.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/TransformCorrelatedGroupedAggregationWithoutProjection.java index e3426af4275a1..716faf5ae713f 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/TransformCorrelatedGroupedAggregationWithoutProjection.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/TransformCorrelatedGroupedAggregationWithoutProjection.java @@ -28,6 +28,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.planner.node.AssignUniqueId; import org.apache.iotdb.commons.queryengine.plan.relational.planner.node.CorrelatedJoinNode; import org.apache.iotdb.commons.queryengine.plan.relational.planner.node.JoinNode; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.relational.planner.PlannerContext; import org.apache.iotdb.db.queryengine.plan.relational.planner.iterative.Rule; import org.apache.iotdb.db.queryengine.plan.relational.planner.node.Patterns; @@ -135,7 +136,9 @@ public class TransformCorrelatedGroupedAggregationWithoutProjection private final PlannerContext plannerContext; public TransformCorrelatedGroupedAggregationWithoutProjection(PlannerContext plannerContext) { - this.plannerContext = requireNonNull(plannerContext, "plannerContext is null"); + this.plannerContext = + requireNonNull( + plannerContext, DataNodeQueryMessages.EXCEPTION_PLANNERCONTEXT_IS_NULL_B7C7DE50); } @Override diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/TransformCorrelatedJoinToJoin.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/TransformCorrelatedJoinToJoin.java index 42723fba62b96..a42df1389db9e 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/TransformCorrelatedJoinToJoin.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/TransformCorrelatedJoinToJoin.java @@ -25,6 +25,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.planner.node.CorrelatedJoinNode; import org.apache.iotdb.commons.queryengine.plan.relational.planner.node.JoinNode; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Expression; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.relational.planner.PlannerContext; import org.apache.iotdb.db.queryengine.plan.relational.planner.iterative.Rule; import org.apache.iotdb.db.queryengine.plan.relational.planner.optimizations.PlanNodeDecorrelator; @@ -54,7 +55,9 @@ public class TransformCorrelatedJoinToJoin implements Rule { private final PlannerContext plannerContext; public TransformCorrelatedJoinToJoin(PlannerContext plannerContext) { - this.plannerContext = requireNonNull(plannerContext, "plannerContext is null"); + this.plannerContext = + requireNonNull( + plannerContext, DataNodeQueryMessages.EXCEPTION_PLANNERCONTEXT_IS_NULL_B7C7DE50); } @Override @@ -66,7 +69,7 @@ public Pattern getPattern() { public Result apply(CorrelatedJoinNode correlatedJoinNode, Captures captures, Context context) { checkArgument( correlatedJoinNode.getJoinType() == INNER || correlatedJoinNode.getJoinType() == LEFT, - "correlation in %s JOIN", + DataNodeQueryMessages.EXCEPTION_CORRELATION_IN_ARG_JOIN_2F78ACC3, correlatedJoinNode.getJoinType().name()); PlanNode subquery = correlatedJoinNode.getSubquery(); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/TransformCorrelatedScalarSubquery.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/TransformCorrelatedScalarSubquery.java index e87607a923c6a..283f76795780f 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/TransformCorrelatedScalarSubquery.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/TransformCorrelatedScalarSubquery.java @@ -36,6 +36,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.SimpleCaseExpression; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.StringLiteral; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.WhenClause; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.relational.metadata.Metadata; import org.apache.iotdb.db.queryengine.plan.relational.planner.iterative.Rule; import org.apache.iotdb.db.queryengine.plan.relational.planner.optimizations.Cardinality; @@ -101,7 +102,8 @@ public class TransformCorrelatedScalarSubquery implements Rule { private final PlannerContext plannerContext; public TransformExistsApplyToCorrelatedJoin(PlannerContext plannerContext) { - this.plannerContext = requireNonNull(plannerContext, "plannerContext is null"); + this.plannerContext = + requireNonNull( + plannerContext, DataNodeQueryMessages.EXCEPTION_PLANNERCONTEXT_IS_NULL_B7C7DE50); } @Override @@ -132,7 +135,7 @@ public Result apply(ApplyNode parent, Captures captures, Context context) { private Optional rewriteToNonDefaultAggregation(ApplyNode applyNode, Context context) { checkState( applyNode.getSubquery().getOutputSymbols().isEmpty(), - "Expected subquery output symbols to be pruned"); + DataNodeQueryMessages.EXCEPTION_EXPECTED_SUBQUERY_OUTPUT_SYMBOLS_TO_BE_PRUNED_13B84182); Symbol subqueryTrue = context.getSymbolAllocator().newSymbol("subqueryTrue", BOOLEAN); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/TransformUncorrelatedSubqueryToJoin.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/TransformUncorrelatedSubqueryToJoin.java index 2dcdb036d7b7c..7843e52ebf06b 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/TransformUncorrelatedSubqueryToJoin.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/TransformUncorrelatedSubqueryToJoin.java @@ -30,6 +30,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Expression; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.IfExpression; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.NullLiteral; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.relational.planner.iterative.Lookup; import org.apache.iotdb.db.queryengine.plan.relational.planner.iterative.Rule; @@ -73,7 +74,8 @@ public Result apply(CorrelatedJoinNode correlatedJoinNode, Captures captures, Co checkState( correlatedJoinNode.getJoinType() == JoinNode.JoinType.RIGHT || correlatedJoinNode.getJoinType() == JoinNode.JoinType.FULL, - "unexpected CorrelatedJoin type: " + correlatedJoinNode.getType()); + DataNodeQueryMessages.EXCEPTION_UNEXPECTED_CORRELATEDJOIN_TYPE_COLON_47A368C1 + + correlatedJoinNode.getType()); // handle RIGHT and FULL correlated join ON TRUE JoinNode.JoinType type; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/Util.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/Util.java index 658586e11ad59..6d8a639c7b468 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/Util.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/Util.java @@ -26,6 +26,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.planner.node.TopKRankingNode; import org.apache.iotdb.commons.queryengine.plan.relational.planner.node.WindowNode; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Expression; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.common.QueryId; import org.apache.iotdb.db.queryengine.plan.relational.planner.SymbolsExtractor; @@ -102,7 +103,8 @@ public static Optional restrictChildOutputs( checkArgument( (node.getChildren().size() == permittedChildOutputs.size()), - "Mismatched child (%s) and permitted outputs (%s) sizes", + DataNodeQueryMessages + .EXCEPTION_MISMATCHED_CHILD_LEFT_PAREN_ARG_RIGHT_PAREN_AND_PERMITTED_OUTPUTS_LEFT_PAREN_ARG_57801144, node.getChildren().size(), permittedChildOutputs.size()); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/node/AggregationTableScanNode.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/node/AggregationTableScanNode.java index e5298d01cd34d..a32c465d97853 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/node/AggregationTableScanNode.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/node/AggregationTableScanNode.java @@ -116,12 +116,13 @@ public AggregationTableScanNode( this.aggregations = transformCountStar(aggregations, assignments); aggregations.values().forEach(aggregation -> aggregation.verifyArguments(step)); - requireNonNull(groupingSets, "groupingSets is null"); + requireNonNull(groupingSets, DataNodeQueryMessages.EXCEPTION_GROUPINGSETS_IS_NULL_8EE6D9BF); groupIdSymbol.ifPresent( symbol -> checkArgument( groupingSets.getGroupingKeys().contains(symbol), - "Grouping columns does not contain groupId column")); + DataNodeQueryMessages + .EXCEPTION_GROUPING_COLUMNS_DOES_NOT_CONTAIN_GROUPID_COLUMN_83976C83)); this.groupingSets = groupingSets; this.groupIdSymbol = requireNonNull(groupIdSymbol); @@ -132,7 +133,7 @@ public AggregationTableScanNode( .noneMatch(Optional::isPresent); checkArgument( noOrderBy || step == AggregationNode.Step.SINGLE, - "ORDER BY does not support distributed aggregation"); + DataNodeQueryMessages.EXCEPTION_ORDER_BY_DOES_NOT_SUPPORT_DISTRIBUTED_AGGREGATION_05109B26); this.step = step; @@ -140,13 +141,17 @@ public AggregationTableScanNode( for (int i = 0; i < groupingKeys.size(); i++) { if (groupingKeys.get(i).getName().startsWith(DATE_BIN_PREFIX)) { checkArgument( - i == groupingKeys.size() - 1, "date_bin function must be the last GroupingKey"); + i == groupingKeys.size() - 1, + DataNodeQueryMessages + .EXCEPTION_DATE_BIN_FUNCTION_MUST_BE_THE_LAST_GROUPINGKEY_EE955FF5); } } - requireNonNull(preGroupedSymbols, "preGroupedSymbols is null"); + requireNonNull( + preGroupedSymbols, DataNodeQueryMessages.EXCEPTION_PREGROUPEDSYMBOLS_IS_NULL_DC24FF7B); checkArgument( preGroupedSymbols.isEmpty() || groupingKeys.containsAll(preGroupedSymbols), - "Pre-grouped symbols must be a subset of the grouping keys"); + DataNodeQueryMessages + .EXCEPTION_PRE_MINUS_GROUPED_SYMBOLS_MUST_BE_A_SUBSET_OF_THE_GROUPING_KEYS_AFC6C33D); this.preGroupedSymbols = ImmutableList.copyOf(preGroupedSymbols); this.setOutputSymbols(constructOutputSymbols(groupingSets, aggregations)); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/node/CteScanNode.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/node/CteScanNode.java index aed06ed625558..aee78e4330b8a 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/node/CteScanNode.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/node/CteScanNode.java @@ -29,6 +29,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.planner.Symbol; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.QualifiedName; import org.apache.iotdb.commons.queryengine.utils.cte.CteDataStore; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.common.DataNodeEndPoints; import org.apache.iotdb.db.queryengine.plan.planner.plan.node.PlanVisitor; @@ -117,7 +118,8 @@ public List getOutputSymbols() { @Override public PlanNode replaceChildren(List newChildren) { - checkArgument(newChildren.isEmpty(), "newChildren is not empty"); + checkArgument( + newChildren.isEmpty(), DataNodeQueryMessages.EXCEPTION_NEWCHILDREN_IS_NOT_EMPTY_170FCE18); return this; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/node/IntoNode.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/node/IntoNode.java index 2d70b9311376e..02e609a2ebb09 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/node/IntoNode.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/node/IntoNode.java @@ -26,6 +26,7 @@ import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.process.SingleChildProcessNode; import org.apache.iotdb.commons.queryengine.plan.relational.metadata.ColumnSchema; import org.apache.iotdb.commons.queryengine.plan.relational.planner.Symbol; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.planner.plan.node.PlanVisitor; import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.Insert; @@ -63,7 +64,8 @@ public IntoNode( this.neededInputColumnNames = neededInputColumnNames; if (columns.size() != neededInputColumnNames.size()) { throw new IllegalArgumentException( - "insert into table columns's size should be same as query result"); + DataNodeQueryMessages + .QUERY_EXCEPTION_INSERT_INTO_TABLE_COLUMNS_S_SIZE_SHOULD_BE_SAME_AS_QUERY_E7437397); } this.rowCountSymbol = rowCountSymbol; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/node/TreeDeviceViewScanNode.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/node/TreeDeviceViewScanNode.java index f0496ee9b51b9..da308b749914d 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/node/TreeDeviceViewScanNode.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/node/TreeDeviceViewScanNode.java @@ -25,6 +25,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.metadata.QualifiedObjectName; import org.apache.iotdb.commons.queryengine.plan.relational.planner.Symbol; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Expression; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.planner.plan.node.PlanVisitor; import org.apache.iotdb.db.queryengine.plan.relational.metadata.DeviceEntry; import org.apache.iotdb.db.queryengine.plan.statement.component.Ordering; @@ -172,18 +173,24 @@ protected static void deserializeMemberVariables( @Override protected void serializeAttributes(ByteBuffer byteBuffer) { throw new UnsupportedOperationException( - "Unsupported to serialize: " + TreeNonAlignedDeviceViewScanNode.class.getSimpleName()); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_TO_SERIALIZE_S_484DAAAF, + TreeNonAlignedDeviceViewScanNode.class.getSimpleName())); } @Override protected void serializeAttributes(DataOutputStream stream) throws IOException { throw new UnsupportedOperationException( - "Unsupported to serialize: " + TreeNonAlignedDeviceViewScanNode.class.getSimpleName()); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_TO_SERIALIZE_S_484DAAAF, + TreeNonAlignedDeviceViewScanNode.class.getSimpleName())); } public static DeviceTableScanNode deserialize(ByteBuffer byteBuffer) { throw new UnsupportedOperationException( - "Unsupported to deserialize: " + TreeNonAlignedDeviceViewScanNode.class.getSimpleName()); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_TO_DESERIALIZE_S_4641CD63, + TreeNonAlignedDeviceViewScanNode.class.getSimpleName())); } @Override diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/node/schema/TableDeviceFetchNode.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/node/schema/TableDeviceFetchNode.java index 829610c1915a5..9d56f9e681250 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/node/schema/TableDeviceFetchNode.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/node/schema/TableDeviceFetchNode.java @@ -25,6 +25,7 @@ import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.PlanNodeId; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.PlanNodeType; import org.apache.iotdb.commons.schema.column.ColumnHeader; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.planner.plan.node.PlanVisitor; import org.apache.iotdb.db.queryengine.plan.planner.plan.node.metadata.read.TableDeviceSourceNode; import org.apache.iotdb.db.schemaengine.schemaregion.attribute.update.DeviceAttributeCacheUpdater; @@ -79,7 +80,8 @@ public PlanNodeType getType() { @Override public PlanNode clone() { throw new UnsupportedOperationException( - "The TableDeviceFetchNode's clone() method shall not be called."); + DataNodeQueryMessages + .QUERY_EXCEPTION_THE_TABLEDEVICEFETCHNODE_S_CLONE_METHOD_SHALL_NOT_BE_CALLED_977C41FD); } public PlanNode cloneForDistribution() { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/AdaptivePlanOptimizer.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/AdaptivePlanOptimizer.java index 3ea2f7c9aad86..6fcadd59b4a0b 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/AdaptivePlanOptimizer.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/AdaptivePlanOptimizer.java @@ -21,6 +21,7 @@ import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.PlanNode; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.PlanNodeId; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import java.util.Set; @@ -46,8 +47,10 @@ public class Result { * as the new PlanNodeIds that were added to the optimized plan. */ public Result(PlanNode plan, Set changedPlanNodes) { - this.plan = requireNonNull(plan, "plan is null"); - this.changedPlanNodes = requireNonNull(changedPlanNodes, "changedPlanNodes is null"); + this.plan = requireNonNull(plan, DataNodeQueryMessages.EXCEPTION_PLAN_IS_NULL_717C9DF7); + this.changedPlanNodes = + requireNonNull( + changedPlanNodes, DataNodeQueryMessages.EXCEPTION_CHANGEDPLANNODES_IS_NULL_5ECBDE28); } public PlanNode plan() { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/Cardinality.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/Cardinality.java index 2db8c0849d60e..62e87f39fe560 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/Cardinality.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/Cardinality.java @@ -19,6 +19,8 @@ package org.apache.iotdb.db.queryengine.plan.relational.planner.optimizations; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; + import com.google.common.collect.Range; import static java.util.Objects.requireNonNull; @@ -27,7 +29,9 @@ public class Cardinality { private final Range cardinalityRange; public Cardinality(Range cardinalityRange) { - this.cardinalityRange = requireNonNull(cardinalityRange, "cardinalityRange is null"); + this.cardinalityRange = + requireNonNull( + cardinalityRange, DataNodeQueryMessages.EXCEPTION_CARDINALITYRANGE_IS_NULL_8FDEE0B4); } public boolean isEmpty() { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/CheckSubqueryNodesAreRewritten.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/CheckSubqueryNodesAreRewritten.java index 76fecf5962f27..9ded3a9c87f4d 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/CheckSubqueryNodesAreRewritten.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/CheckSubqueryNodesAreRewritten.java @@ -24,6 +24,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.planner.Symbol; import org.apache.iotdb.commons.queryengine.plan.relational.planner.node.ApplyNode; import org.apache.iotdb.commons.queryengine.plan.relational.planner.node.CorrelatedJoinNode; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import java.util.List; @@ -58,8 +59,10 @@ public PlanNode optimize(PlanNode plan, Context context) { private SemanticException error(List correlation) { checkState( !correlation.isEmpty(), - "All the non correlated subqueries should be rewritten at this point"); + DataNodeQueryMessages + .EXCEPTION_ALL_THE_NON_CORRELATED_SUBQUERIES_SHOULD_BE_REWRITTEN_AT_THIS_POINT_B4614541); throw new SemanticException( - "Given correlated subquery is not supported", SEMANTIC_ERROR.getStatusCode()); + DataNodeQueryMessages.GIVEN_CORRELATED_SUBQUERY_IS_NOT_SUPPORTED, + SEMANTIC_ERROR.getStatusCode()); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/DataNodeLocationSupplierFactory.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/DataNodeLocationSupplierFactory.java index d0b3cb330e10c..7df20573d9911 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/DataNodeLocationSupplierFactory.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/DataNodeLocationSupplierFactory.java @@ -67,8 +67,10 @@ public interface DataNodeLocationSupplier { TShowRegionResp tShowRegionResp = client.showRegion(req); if (tShowRegionResp.getStatus().getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()) { throw new IoTDBRuntimeException( - "An error occurred when executing getReadableDataRegions():" - + tShowRegionResp.getStatus().getMessage(), + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_AN_ERROR_OCCURRED_WHEN_EXECUTING_GETREADABLEDATAREGIONS_A884A6BB, + tShowRegionResp.getStatus().getMessage()), QUERY_PROCESS_ERROR.getStatusCode()); } Map> map = new HashMap<>(); @@ -78,7 +80,10 @@ public interface DataNodeLocationSupplier { return map; } catch (final ClientManagerException | TException e) { throw new IoTDBRuntimeException( - "An error occurred when executing getReadableDataNodeLocations():" + e.getMessage(), + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_AN_ERROR_OCCURRED_WHEN_EXECUTING_GETREADABLEDATANODELOCATIONS_54CBD60D, + e.getMessage()), QUERY_PROCESS_ERROR.getStatusCode()); } } @@ -90,14 +95,19 @@ public static List getReadableDataNodeLocations() { final TGetDataNodeLocationsResp showDataNodesResp = client.getReadableDataNodeLocations(); if (showDataNodesResp.getStatus().getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()) { throw new IoTDBRuntimeException( - "An error occurred when executing getReadableDataNodeLocations():" - + showDataNodesResp.getStatus().getMessage(), + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_AN_ERROR_OCCURRED_WHEN_EXECUTING_GETREADABLEDATANODELOCATIONS_54CBD60D, + showDataNodesResp.getStatus().getMessage()), QUERY_PROCESS_ERROR.getStatusCode()); } return showDataNodesResp.getDataNodeLocationList(); } catch (final ClientManagerException | TException e) { throw new IoTDBRuntimeException( - "An error occurred when executing getReadableDataNodeLocations():" + e.getMessage(), + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_AN_ERROR_OCCURRED_WHEN_EXECUTING_GETREADABLEDATANODELOCATIONS_54CBD60D, + e.getMessage()), QUERY_PROCESS_ERROR.getStatusCode()); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/JoinUtils.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/JoinUtils.java index 03e2b5a575073..b6beb9b83fc46 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/JoinUtils.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/JoinUtils.java @@ -23,6 +23,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.planner.node.JoinNode; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.ComparisonExpression; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Expression; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.relational.metadata.Metadata; import org.apache.iotdb.db.queryengine.plan.relational.planner.EqualityInference; @@ -102,10 +103,12 @@ static InnerJoinPushDownResult processInnerJoin( Collection rightSymbols) { checkArgument( leftSymbols.containsAll(extractUnique(leftEffectivePredicate)), - "leftEffectivePredicate must only contain symbols from leftSymbols"); + DataNodeQueryMessages + .EXCEPTION_LEFTEFFECTIVEPREDICATE_MUST_ONLY_CONTAIN_SYMBOLS_FROM_LEFTSYMBOLS_DB3259B8); checkArgument( rightSymbols.containsAll(extractUnique(rightEffectivePredicate)), - "rightEffectivePredicate must only contain symbols from rightSymbols"); + DataNodeQueryMessages + .EXCEPTION_RIGHTEFFECTIVEPREDICATE_MUST_ONLY_CONTAIN_SYMBOLS_FROM_RIGHTSYMBOLS_4B97238D); ImmutableList.Builder leftPushDownConjuncts = ImmutableList.builder(); ImmutableList.Builder rightPushDownConjuncts = ImmutableList.builder(); @@ -258,10 +261,12 @@ static OuterJoinPushDownResult processLimitedOuterJoin( Collection innerSymbols) { checkArgument( outerSymbols.containsAll(extractUnique(outerEffectivePredicate)), - "outerEffectivePredicate must only contain symbols from outerSymbols"); + DataNodeQueryMessages + .EXCEPTION_OUTEREFFECTIVEPREDICATE_MUST_ONLY_CONTAIN_SYMBOLS_FROM_OUTERSYMBOLS_99FC2AA9); checkArgument( innerSymbols.containsAll(extractUnique(innerEffectivePredicate)), - "innerEffectivePredicate must only contain symbols from innerSymbols"); + DataNodeQueryMessages + .EXCEPTION_INNEREFFECTIVEPREDICATE_MUST_ONLY_CONTAIN_SYMBOLS_FROM_INNERSYMBOLS_ECB7C6A2); ImmutableList.Builder outerPushdownConjuncts = ImmutableList.builder(); ImmutableList.Builder innerPushdownConjuncts = ImmutableList.builder(); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/PlanNodeDecorrelator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/PlanNodeDecorrelator.java index 9529e1d9d3814..fc73837d8703d 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/PlanNodeDecorrelator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/PlanNodeDecorrelator.java @@ -78,9 +78,13 @@ public class PlanNodeDecorrelator { public PlanNodeDecorrelator( PlannerContext plannerContext, SymbolAllocator symbolAllocator, Lookup lookup) { - this.plannerContext = requireNonNull(plannerContext, "plannerContext is null"); - this.symbolAllocator = requireNonNull(symbolAllocator, "symbolAllocator is null"); - this.lookup = requireNonNull(lookup, "lookup is null"); + this.plannerContext = + requireNonNull( + plannerContext, DataNodeQueryMessages.EXCEPTION_PLANNERCONTEXT_IS_NULL_B7C7DE50); + this.symbolAllocator = + requireNonNull( + symbolAllocator, DataNodeQueryMessages.EXCEPTION_SYMBOLALLOCATOR_IS_NULL_E2BE1908); + this.lookup = requireNonNull(lookup, DataNodeQueryMessages.EXCEPTION_LOOKUP_IS_NULL_B8FD7E65); this.typeCoercion = new TypeCoercion(plannerContext.getTypeManager()::getType); } @@ -102,8 +106,10 @@ private class DecorrelatingVisitor implements PlanVisitor correlation; DecorrelatingVisitor(TypeManager typeManager, List correlation) { - this.typeManager = requireNonNull(typeManager, "typeManager is null"); - this.correlation = requireNonNull(correlation, "correlation is null"); + this.typeManager = + requireNonNull(typeManager, DataNodeQueryMessages.EXCEPTION_TYPEMANAGER_IS_NULL_12A72016); + this.correlation = + requireNonNull(correlation, DataNodeQueryMessages.EXCEPTION_CORRELATION_IS_NULL_F8327EAD); } @Override @@ -205,7 +211,8 @@ public Optional visitLimit(LimitNode node, Void context) { return rewriteLimitWithRowCountOne(childDecorrelationResult, node.getPlanNodeId()); } throw new SemanticException( - "Decorrelation for LIMIT with row count greater than 1 is not supported yet"); + DataNodeQueryMessages + .DECORRELATION_FOR_LIMIT_WITH_ROW_COUNT_GREATER_THAN_1_IS_NOT_SUPPORTED_YET); // return rewriteLimitWithRowCountGreaterThanOne(childDecorrelationResult, node); } @@ -448,7 +455,7 @@ public Optional visitAggregation(AggregationNode node, Void Set groupingKeys = ImmutableSet.copyOf(node.getGroupingKeys()); checkState( ImmutableSet.copyOf(decorrelatedAggregation.getGroupingKeys()).equals(groupingKeys), - "grouping keys were correlated"); + DataNodeQueryMessages.EXCEPTION_GROUPING_KEYS_WERE_CORRELATED_EE1C8406); List symbolsToAdd = childDecorrelationResult.symbolsToPropagate.stream() .filter(symbol -> !groupingKeys.contains(symbol)) @@ -638,10 +645,12 @@ private static class DecorrelationResult { this.constantSymbols = constantSymbols; checkState( constantSymbols.containsAll(correlatedSymbolsMapping.values()), - "Expected constant symbols to contain all correlated symbols local equivalents"); + DataNodeQueryMessages + .EXCEPTION_EXPECTED_CONSTANT_SYMBOLS_TO_CONTAIN_ALL_CORRELATED_SYMBOLS_LOCAL_EQUIVALENTS_E20CB055); checkState( symbolsToPropagate.containsAll(constantSymbols), - "Expected symbols to propagate to contain all constant symbols"); + DataNodeQueryMessages + .EXCEPTION_EXPECTED_SYMBOLS_TO_PROPAGATE_TO_CONTAIN_ALL_CONSTANT_SYMBOLS_C9D876E4); } SymbolMapper getCorrelatedSymbolMapper() { @@ -682,9 +691,11 @@ public static class DecorrelatedNode { private final PlanNode node; public DecorrelatedNode(List correlatedPredicates, PlanNode node) { - requireNonNull(correlatedPredicates, "correlatedPredicates is null"); + requireNonNull( + correlatedPredicates, + DataNodeQueryMessages.EXCEPTION_CORRELATEDPREDICATES_IS_NULL_5FCB8011); this.correlatedPredicates = ImmutableList.copyOf(correlatedPredicates); - this.node = requireNonNull(node, "node is null"); + this.node = requireNonNull(node, DataNodeQueryMessages.EXCEPTION_NODE_IS_NULL_C1479F4A); } public Optional getCorrelatedPredicates() { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/PlanOptimizer.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/PlanOptimizer.java index 4613687d23af2..bafa7b3c7f3d3 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/PlanOptimizer.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/PlanOptimizer.java @@ -21,6 +21,7 @@ import org.apache.iotdb.commons.queryengine.common.SessionInfo; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.PlanNode; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.common.MPPQueryContext; import org.apache.iotdb.db.queryengine.common.QueryId; import org.apache.iotdb.db.queryengine.execution.warnings.WarningCollector; @@ -57,11 +58,19 @@ public Context( this.analysis = analysis; this.metadata = metadata; this.queryContext = queryContext; - this.symbolAllocator = requireNonNull(symbolAllocator, "symbolAllocator is null"); - this.queryIdAllocator = requireNonNull(queryIdAllocator, "idAllocator is null"); - this.warningCollector = requireNonNull(warningCollector, "warningCollector is null"); + this.symbolAllocator = + requireNonNull( + symbolAllocator, DataNodeQueryMessages.EXCEPTION_SYMBOLALLOCATOR_IS_NULL_E2BE1908); + this.queryIdAllocator = + requireNonNull( + queryIdAllocator, DataNodeQueryMessages.EXCEPTION_IDALLOCATOR_IS_NULL_752B308D); + this.warningCollector = + requireNonNull( + warningCollector, DataNodeQueryMessages.EXCEPTION_WARNINGCOLLECTOR_IS_NULL_7A524A68); this.planOptimizersStatsCollector = - requireNonNull(planOptimizersStatsCollector, "planOptimizersStatsCollector is null"); + requireNonNull( + planOptimizersStatsCollector, + DataNodeQueryMessages.EXCEPTION_PLANOPTIMIZERSSTATSCOLLECTOR_IS_NULL_9DA4B0CC); } public SessionInfo sessionInfo() { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/PushLimitOffsetIntoTableScan.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/PushLimitOffsetIntoTableScan.java index 298e0616f3178..87efeb0e8f8ca 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/PushLimitOffsetIntoTableScan.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/PushLimitOffsetIntoTableScan.java @@ -41,6 +41,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Expression; import org.apache.iotdb.commons.schema.table.InformationSchema; import org.apache.iotdb.commons.schema.table.column.TsTableColumnCategory; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.planner.plan.node.PlanVisitor; import org.apache.iotdb.db.queryengine.plan.relational.analyzer.Analysis; import org.apache.iotdb.db.queryengine.plan.relational.planner.node.CteScanNode; @@ -283,7 +284,8 @@ public PlanNode visitTableFunctionProcessor(TableFunctionProcessorNode node, Con @Override public PlanNode visitTopK(TopKNode node, Context context) { throw new IllegalStateException( - "TopKNode must be appeared after PushLimitOffsetIntoTableScan"); + DataNodeQueryMessages + .QUERY_EXCEPTION_TOPKNODE_MUST_BE_APPEARED_AFTER_PUSHLIMITOFFSETINTOTABLESCAN_844A065D); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/PushPredicateIntoTableScan.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/PushPredicateIntoTableScan.java index aff3a1445843a..87375a1f5bd15 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/PushPredicateIntoTableScan.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/PushPredicateIntoTableScan.java @@ -51,6 +51,7 @@ import org.apache.iotdb.commons.schema.table.InformationSchema; import org.apache.iotdb.db.conf.IoTDBConfig; import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.common.MPPQueryContext; import org.apache.iotdb.db.queryengine.common.QueryId; import org.apache.iotdb.db.queryengine.metric.QueryPlanCostMetricSet; @@ -342,7 +343,9 @@ private boolean isInliningCandidate(Expression expression, ProjectNode node) { @Override public PlanNode visitFilter(FilterNode node, RewriteContext context) { - checkArgument(node.getPredicate() != null, "Filter predicate of FilterNode is null"); + checkArgument( + node.getPredicate() != null, + DataNodeQueryMessages.EXCEPTION_FILTER_PREDICATE_OF_FILTERNODE_IS_NULL_C3964179); Expression predicate = combineConjuncts(node.getPredicate(), context.inheritedPredicate); @@ -702,9 +705,9 @@ private void getDeviceEntriesWithDataPartitions( queryContext); if (deviceEntriesMap.size() > 1) { throw new SemanticException( - "Tree device view with multiple databases(" + DataNodeQueryMessages.TREE_DEVICE_VIEW_WITH_MULTIPLE_DATABASES + deviceEntriesMap.keySet() - + ") is unsupported yet."); + + DataNodeQueryMessages.IS_UNSUPPORTED_YET); } final String deviceDatabase = !deviceEntriesMap.isEmpty() ? deviceEntriesMap.keySet().iterator().next() : null; @@ -759,7 +762,8 @@ private void getDeviceEntriesWithDataPartitions( if (dataPartition.getDataPartitionMap().size() > 1) { throw new IllegalStateException( - "Table model can only process data only in one database yet!"); + DataNodeQueryMessages + .QUERY_EXCEPTION_TABLE_MODEL_CAN_ONLY_PROCESS_DATA_ONLY_IN_ONE_DATABASE_YET_AB8C1EF5); } if (dataPartition.getDataPartitionMap().isEmpty()) { @@ -837,7 +841,10 @@ public PlanNode visitJoin(JoinNode node, RewriteContext context) { break; default: throw new IllegalArgumentException( - "Unsupported join type in predicate push down: " + node.getJoinType().name()); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_UNSUPPORTED_JOIN_TYPE_IN_PREDICATE_PUSH_DOWN_S_4493D86C, + node.getJoinType().name())); } // newJoinPredicate = simplifyExpression(newJoinPredicate); @@ -1260,7 +1267,7 @@ public PlanNode visitAssignUniqueId(AssignUniqueId node, RewriteContext context) Set predicateSymbols = extractUnique(inheritedPredicate); checkState( !predicateSymbols.contains(node.getIdColumn()), - "UniqueId in predicate is not yet supported"); + DataNodeQueryMessages.EXCEPTION_UNIQUEID_IN_PREDICATE_IS_NOT_YET_SUPPORTED_7B5D2EAF); PlanNode rewrittenChild = node.getChild().accept(this, context); return node.replaceChildren(ImmutableList.of(rewrittenChild)); } @@ -1336,7 +1343,7 @@ private DataPartition fetchDataPartitionByDevices( private JoinNode tryNormalizeToOuterToInnerJoin(JoinNode node, Expression inheritedPredicate) { checkArgument( EnumSet.of(INNER, RIGHT, LEFT, FULL).contains(node.getJoinType()), - "Unsupported join type: %s", + DataNodeQueryMessages.EXCEPTION_UNSUPPORTED_JOIN_TYPE_COLON_ARG_9FB6751B, node.getJoinType()); if (node.getJoinType() == JoinNode.JoinType.INNER) { @@ -1489,11 +1496,18 @@ public SplitExpression( List expressionsCanPushDown, List expressionsCannotPushDown, @Nullable String timeColumnName) { - this.metadataExpressions = requireNonNull(metadataExpressions, "metadataExpressions is null"); + this.metadataExpressions = + requireNonNull( + metadataExpressions, + DataNodeQueryMessages.EXCEPTION_METADATAEXPRESSIONS_IS_NULL_3752914C); this.expressionsCanPushDown = - requireNonNull(expressionsCanPushDown, "expressionsCanPushDown is null"); + requireNonNull( + expressionsCanPushDown, + DataNodeQueryMessages.EXCEPTION_EXPRESSIONSCANPUSHDOWN_IS_NULL_DC8DFEB3); this.expressionsCannotPushDown = - requireNonNull(expressionsCannotPushDown, "expressionsCannotPushDown is null"); + requireNonNull( + expressionsCannotPushDown, + DataNodeQueryMessages.EXCEPTION_EXPRESSIONSCANNOTPUSHDOWN_IS_NULL_63BC9AF9); this.timeColumnName = timeColumnName; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/QueryCardinalityUtil.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/QueryCardinalityUtil.java index c8c9efa874a4b..0d8427c985f98 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/QueryCardinalityUtil.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/QueryCardinalityUtil.java @@ -28,6 +28,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.planner.node.OffsetNode; import org.apache.iotdb.commons.queryengine.plan.relational.planner.node.ProjectNode; import org.apache.iotdb.commons.queryengine.plan.relational.planner.node.TopKNode; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.planner.plan.node.PlanVisitor; import org.apache.iotdb.db.queryengine.plan.planner.plan.node.process.ExchangeNode; import org.apache.iotdb.db.queryengine.plan.relational.planner.iterative.Lookup; @@ -92,7 +93,7 @@ private static final class CardinalityExtractorPlanVisitor private final Lookup lookup; public CardinalityExtractorPlanVisitor(Lookup lookup) { - this.lookup = requireNonNull(lookup, "lookup is null"); + this.lookup = requireNonNull(lookup, DataNodeQueryMessages.EXCEPTION_LOOKUP_IS_NULL_B8FD7E65); } @Override diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/SymbolMapper.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/SymbolMapper.java index c85748714acd4..96a377d1a8976 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/SymbolMapper.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/SymbolMapper.java @@ -68,7 +68,9 @@ public class SymbolMapper { private final Function mappingFunction; public SymbolMapper(Function mappingFunction) { - this.mappingFunction = requireNonNull(mappingFunction, "mappingFunction is null"); + this.mappingFunction = + requireNonNull( + mappingFunction, DataNodeQueryMessages.EXCEPTION_MAPPINGFUNCTION_IS_NULL_212D6109); } public static SymbolMapper symbolMapper(Map mapping) { @@ -409,7 +411,9 @@ public Expression rewriteSymbolReference( pointer.getMatchNumberSymbol()); } else { throw new IllegalArgumentException( - "Unsupported ValuePointer type: " + assignment.getValuePointer().getClass().getName()); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_VALUEPOINTER_TYPE_S_4147FFFB, + assignment.getValuePointer().getClass().getName())); } newAssignments.add( diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/TransformAggregationToStreamable.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/TransformAggregationToStreamable.java index 7d5e7c7e4b128..77470247488e7 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/TransformAggregationToStreamable.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/TransformAggregationToStreamable.java @@ -32,6 +32,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.planner.node.TableFunctionProcessorNode; import org.apache.iotdb.commons.queryengine.plan.relational.planner.node.UnionNode; import org.apache.iotdb.commons.queryengine.plan.relational.planner.node.ValueFillNode; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.planner.plan.node.PlanVisitor; import org.apache.iotdb.db.queryengine.plan.relational.planner.node.AggregationTableScanNode; import org.apache.iotdb.db.queryengine.plan.relational.planner.node.DeviceTableScanNode; @@ -91,7 +92,8 @@ public PlanNode visitAggregation(AggregationNode node, Void context) { @Override public PlanNode visitAggregationTableScan(AggregationTableScanNode node, Void context) { throw new RuntimeException( - "This optimizer should be used before optimizer of PushAggregationIntoTableScan"); + DataNodeQueryMessages + .QUERY_EXCEPTION_THIS_OPTIMIZER_SHOULD_BE_USED_BEFORE_OPTIMIZER_OF_PUSHAGGREGATIONINTOTABLESCAN_9F6016E3); } } @@ -202,7 +204,8 @@ public List visitAggregation(AggregationNode node, GroupContext context) public List visitAggregationTableScan( AggregationTableScanNode node, GroupContext context) { throw new RuntimeException( - "This optimizer should be used before optimizer of PushAggregationIntoTableScan"); + DataNodeQueryMessages + .QUERY_EXCEPTION_THIS_OPTIMIZER_SHOULD_BE_USED_BEFORE_OPTIMIZER_OF_PUSHAGGREGATIONINTOTABLESCAN_9F6016E3); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/TransformQuantifiedComparisonApplyToCorrelatedJoin.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/TransformQuantifiedComparisonApplyToCorrelatedJoin.java index f92cb52dc03d7..ca6f7b9c9f835 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/TransformQuantifiedComparisonApplyToCorrelatedJoin.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/TransformQuantifiedComparisonApplyToCorrelatedJoin.java @@ -77,7 +77,8 @@ public class TransformQuantifiedComparisonApplyToCorrelatedJoin implements PlanO private final Metadata metadata; public TransformQuantifiedComparisonApplyToCorrelatedJoin(Metadata metadata) { - this.metadata = requireNonNull(metadata, "metadata is null"); + this.metadata = + requireNonNull(metadata, DataNodeQueryMessages.EXCEPTION_METADATA_IS_NULL_6F8F9BA0); } @Override @@ -92,9 +93,13 @@ private static class Rewriter extends SimplePlanRewriter { private final Metadata metadata; public Rewriter(QueryId idAllocator, SymbolAllocator symbolAllocator, Metadata metadata) { - this.idAllocator = requireNonNull(idAllocator, "idAllocator is null"); - this.symbolAllocator = requireNonNull(symbolAllocator, "symbolAllocator is null"); - this.metadata = requireNonNull(metadata, "metadata is null"); + this.idAllocator = + requireNonNull(idAllocator, DataNodeQueryMessages.EXCEPTION_IDALLOCATOR_IS_NULL_752B308D); + this.symbolAllocator = + requireNonNull( + symbolAllocator, DataNodeQueryMessages.EXCEPTION_SYMBOLALLOCATOR_IS_NULL_E2BE1908); + this.metadata = + requireNonNull(metadata, DataNodeQueryMessages.EXCEPTION_METADATA_IS_NULL_6F8F9BA0); } @Override @@ -120,7 +125,9 @@ private PlanNode rewriteQuantifiedApplyNode( Symbol outputColumn = getOnlyElement(subqueryPlan.getOutputSymbols()); Type outputColumnType = symbolAllocator.getTypes().getTableModelType(outputColumn); - checkState(outputColumnType.isOrderable(), "Subquery result type must be orderable"); + checkState( + outputColumnType.isOrderable(), + DataNodeQueryMessages.EXCEPTION_SUBQUERY_RESULT_TYPE_MUST_BE_ORDERABLE_82AF0EFA); Symbol minValue = symbolAllocator.newSymbol("min", outputColumnType); Symbol maxValue = symbolAllocator.newSymbol("max", outputColumnType); @@ -262,7 +269,9 @@ private Expression getBoundComparisons( boundValue.toSymbolReference()); } throw new IllegalArgumentException( - "Unsupported quantified comparison: " + quantifiedComparison); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_QUANTIFIED_COMPARISON_S_C3700430, + quantifiedComparison)); } private static ComparisonExpression.Operator mapOperator( @@ -282,7 +291,9 @@ private static ComparisonExpression.Operator mapOperator( return GREATER_THAN_OR_EQUAL; default: throw new IllegalArgumentException( - "Unexpected quantifiedComparison: " + quantifiedComparison.getOperator()); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNEXPECTED_QUANTIFIEDCOMPARISON_S_F13E4EB2, + quantifiedComparison.getOperator())); } } @@ -315,7 +326,9 @@ private static boolean shouldCompareValueWithLowerBound( } default: throw new IllegalArgumentException( - "Unexpected Quantifier: " + quantifiedComparison.getQuantifier()); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNEXPECTED_QUANTIFIER_S_62214B74, + quantifiedComparison.getQuantifier())); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/UnaliasSymbolReferences.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/UnaliasSymbolReferences.java index eeda5d77094d4..6cc53c8678b86 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/UnaliasSymbolReferences.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/UnaliasSymbolReferences.java @@ -59,6 +59,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Expression; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.NullLiteral; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.SymbolReference; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.planner.plan.node.PlanVisitor; import org.apache.iotdb.db.queryengine.plan.relational.metadata.Metadata; import org.apache.iotdb.db.queryengine.plan.relational.planner.NodeAndMappings; @@ -115,12 +116,13 @@ public class UnaliasSymbolReferences implements PlanOptimizer { private final Metadata metadata; public UnaliasSymbolReferences(Metadata metadata) { - this.metadata = requireNonNull(metadata, "metadata is null"); + this.metadata = + requireNonNull(metadata, DataNodeQueryMessages.EXCEPTION_METADATA_IS_NULL_6F8F9BA0); } @Override public PlanNode optimize(PlanNode plan, Context context) { - requireNonNull(plan, "plan is null"); + requireNonNull(plan, DataNodeQueryMessages.EXCEPTION_PLAN_IS_NULL_717C9DF7); Visitor visitor = new Visitor(metadata, SymbolMapper::symbolMapper); PlanAndMappings result = plan.accept(visitor, UnaliasContext.empty()); @@ -136,9 +138,10 @@ public PlanNode optimize(PlanNode plan, Context context) { */ public NodeAndMappings reallocateSymbols( PlanNode plan, List fields, SymbolAllocator symbolAllocator) { - requireNonNull(plan, "plan is null"); - requireNonNull(fields, "fields is null"); - requireNonNull(symbolAllocator, "symbolAllocator is null"); + requireNonNull(plan, DataNodeQueryMessages.EXCEPTION_PLAN_IS_NULL_717C9DF7); + requireNonNull(fields, DataNodeQueryMessages.EXCEPTION_FIELDS_IS_NULL_DE209DBF); + requireNonNull( + symbolAllocator, DataNodeQueryMessages.EXCEPTION_SYMBOLALLOCATOR_IS_NULL_E2BE1908); Visitor visitor = new Visitor(metadata, mapping -> symbolReallocator(mapping, symbolAllocator)); PlanAndMappings result = plan.accept(visitor, UnaliasContext.empty()); @@ -150,8 +153,11 @@ private static class Visitor implements PlanVisitor, SymbolMapper> mapperProvider; public Visitor(Metadata metadata, Function, SymbolMapper> mapperProvider) { - this.metadata = requireNonNull(metadata, "metadata is null"); - this.mapperProvider = requireNonNull(mapperProvider, "mapperProvider is null"); + this.metadata = + requireNonNull(metadata, DataNodeQueryMessages.EXCEPTION_METADATA_IS_NULL_6F8F9BA0); + this.mapperProvider = + requireNonNull( + mapperProvider, DataNodeQueryMessages.EXCEPTION_MAPPERPROVIDER_IS_NULL_472725D5); } private SymbolMapper symbolMapper(Map mappings) { @@ -161,7 +167,9 @@ private SymbolMapper symbolMapper(Map mappings) { @Override public PlanAndMappings visitPlan(PlanNode node, UnaliasContext context) { throw new UnsupportedOperationException( - "Unsupported plan node " + node.getClass().getSimpleName()); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_PLAN_NODE_S_72DD2270, + node.getClass().getSimpleName())); } @Override @@ -1206,7 +1214,10 @@ private static class UnaliasContext { private final Map correlationMapping; public UnaliasContext(Map correlationMapping) { - this.correlationMapping = requireNonNull(correlationMapping, "correlationMapping is null"); + this.correlationMapping = + requireNonNull( + correlationMapping, + DataNodeQueryMessages.EXCEPTION_CORRELATIONMAPPING_IS_NULL_9D595C82); } public static UnaliasContext empty() { @@ -1223,8 +1234,10 @@ private static class PlanAndMappings { private final Map mappings; public PlanAndMappings(PlanNode root, Map mappings) { - this.root = requireNonNull(root, "root is null"); - this.mappings = ImmutableMap.copyOf(requireNonNull(mappings, "mappings is null")); + this.root = requireNonNull(root, DataNodeQueryMessages.EXCEPTION_ROOT_IS_NULL_ECC8987D); + this.mappings = + ImmutableMap.copyOf( + requireNonNull(mappings, DataNodeQueryMessages.EXCEPTION_MAPPINGS_IS_NULL_23BD9025)); } public PlanNode getRoot() { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/Util.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/Util.java index 4a78b753fbf1b..b18af7913851a 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/Util.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/Util.java @@ -27,6 +27,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.planner.Symbol; import org.apache.iotdb.commons.queryengine.plan.relational.planner.node.AggregationNode; import org.apache.iotdb.commons.udf.builtin.relational.TableBuiltinAggregationFunction; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.common.QueryId; import org.apache.iotdb.db.queryengine.plan.relational.metadata.Metadata; import org.apache.iotdb.db.queryengine.plan.relational.planner.SymbolAllocator; @@ -72,7 +73,8 @@ public static Pair split( symbolAllocator.newSymbol(resolvedFunction.getSignature().getName(), intermediateType); checkState( !originalAggregation.getOrderingScheme().isPresent(), - "Aggregate with ORDER BY does not support partial aggregation"); + DataNodeQueryMessages + .EXCEPTION_AGGREGATE_WITH_ORDER_BY_DOES_NOT_SUPPORT_PARTIAL_AGGREGATION_D5BDD21F); intermediateAggregation.put( intermediateSymbol, new AggregationNode.Aggregation( @@ -144,7 +146,8 @@ public static Pair split( checkState( !originalAggregation.getOrderingScheme().isPresent(), - "Aggregate with ORDER BY does not support partial aggregation"); + DataNodeQueryMessages + .EXCEPTION_AGGREGATE_WITH_ORDER_BY_DOES_NOT_SUPPORT_PARTIAL_AGGREGATION_D5BDD21F); intermediateAggregation.put( intermediateSymbol, new AggregationNode.Aggregation( diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/rowpattern/rowpattern/RowPatternToIrRewriter.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/rowpattern/rowpattern/RowPatternToIrRewriter.java index cf1fe3aad1b09..10cc8a5921c3b 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/rowpattern/rowpattern/RowPatternToIrRewriter.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/rowpattern/rowpattern/RowPatternToIrRewriter.java @@ -62,7 +62,8 @@ public class RowPatternToIrRewriter implements AstVisitor { private final Analysis analysis; public RowPatternToIrRewriter(Analysis analysis) { - this.analysis = requireNonNull(analysis, "analysis is null"); + this.analysis = + requireNonNull(analysis, DataNodeQueryMessages.EXCEPTION_ANALYSIS_IS_NULL_66666A58); } public static IrRowPattern rewrite(RowPattern node, Analysis analysis) { @@ -112,7 +113,9 @@ private IrQuantifier rewritePatternQuantifier(PatternQuantifier quantifier) { } throw new IllegalStateException( - "unsupported pattern quantifier type: " + quantifier.getClass().getSimpleName()); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_PATTERN_QUANTIFIER_TYPE_S_4ED427E9, + quantifier.getClass().getSimpleName())); } @Override diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/security/ITableAuthCheckerImpl.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/security/ITableAuthCheckerImpl.java index ea65f85df5a17..6be70384fc725 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/security/ITableAuthCheckerImpl.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/security/ITableAuthCheckerImpl.java @@ -167,7 +167,9 @@ private static void checkAuditDatabase( .setResult(false), () -> databaseName); throw new AccessDeniedException( - String.format("The database '%s' is read-only.", TABLE_MODEL_AUDIT_DATABASE)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_THE_DATABASE_S_IS_READ_ONLY_CB6732CE, + TABLE_MODEL_AUDIT_DATABASE)); } } } @@ -202,7 +204,9 @@ public static void checkCanSelectAuditTable(IAuditEntity auditEntity) { false)); throw new AccessDeniedException( String.format( - "The database '%s' can only be queried by AUDIT admin.", TABLE_MODEL_AUDIT_DATABASE)); + DataNodeQueryMessages + .QUERY_EXCEPTION_THE_DATABASE_S_CAN_ONLY_BE_QUERIED_BY_AUDIT_ADMIN_4A510F66, + TABLE_MODEL_AUDIT_DATABASE)); } AUDIT_LOGGER.recordObjectAuthenticationAuditLog( auditEntity diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/security/TreeAccessCheckVisitor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/security/TreeAccessCheckVisitor.java index fd9757c5f8902..25c6ac2e89ad6 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/security/TreeAccessCheckVisitor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/security/TreeAccessCheckVisitor.java @@ -1663,7 +1663,8 @@ public TSStatus visitAlterEncodingCompressor( return new TSStatus(TSStatusCode.NO_PERMISSION.getStatusCode()) .setMessage( String.format( - "'AUDIT' permission is needed to alter the encoding and compressor of database %s", + DataNodeQueryMessages + .MESSAGE_AUDIT_PERMISSION_NEEDED_ALTER_ENCODING_COMPRESSOR_DATABASE_ARG_CC06994D, TREE_MODEL_AUDIT_DATABASE)); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ParameterExtractor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ParameterExtractor.java index b76655394c1b6..49f836872627d 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ParameterExtractor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ParameterExtractor.java @@ -25,6 +25,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.NodeLocation; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Parameter; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Statement; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.DefaultTraversalVisitor; import com.google.common.collect.ImmutableMap; @@ -67,7 +68,9 @@ public static List extractParameters(Statement statement) { parameter .getLocation() .orElseThrow( - () -> new SemanticException("Parameter node must have a location")), + () -> + new SemanticException( + DataNodeQueryMessages.PARAMETER_NODE_MUST_HAVE_A_LOCATION)), Comparator.comparing(NodeLocation::getLineNumber) .thenComparing(NodeLocation::getColumnNumber))) .collect(toImmutableList()); @@ -90,8 +93,9 @@ public static Map, Expression> bindParameters( if (parametersList.size() != values.size()) { throw new SemanticException( String.format( - "Invalid number of parameters: expected %d, got %d", - parametersList.size(), values.size())); + DataNodeQueryMessages.INVALID_NUMBER_OF_PARAMETERS_EXPECTED_D_GOT_D, + parametersList.size(), + values.size())); } ImmutableMap.Builder, Expression> builder = ImmutableMap.builder(); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/AddColumn.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/AddColumn.java index 872523dcc721c..79c43a55037e0 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/AddColumn.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/AddColumn.java @@ -25,6 +25,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.NodeLocation; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.QualifiedName; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Statement; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.tsfile.utils.RamUsageEstimator; @@ -53,10 +54,11 @@ public AddColumn( final boolean tableIfExists, final boolean columnIfNotExists, final boolean view) { - super(requireNonNull(location, "location is null")); + super(requireNonNull(location, DataNodeQueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); - this.tableName = requireNonNull(tableName, "tableName is null"); - this.column = requireNonNull(column, "column is null"); + this.tableName = + requireNonNull(tableName, DataNodeQueryMessages.EXCEPTION_TABLENAME_IS_NULL_20708596); + this.column = requireNonNull(column, DataNodeQueryMessages.EXCEPTION_COLUMN_IS_NULL_0C404041); this.tableIfExists = tableIfExists; this.columnIfNotExists = columnIfNotExists; this.view = view; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/AlterDB.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/AlterDB.java index fc4e3b4407454..04a214af719fa 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/AlterDB.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/AlterDB.java @@ -21,6 +21,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.IAstVisitor; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.NodeLocation; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.statement.metadata.DatabaseSchemaStatement; import org.apache.tsfile.utils.RamUsageEstimator; @@ -38,7 +39,11 @@ public AlterDB( final boolean exists, final String dbName, final List properties) { - super(requireNonNull(location, "location is null"), exists, dbName, properties); + super( + requireNonNull(location, DataNodeQueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388), + exists, + dbName, + properties); } @Override diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ColumnDefinition.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ColumnDefinition.java index 6f069be40c850..dad80ed104d4e 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ColumnDefinition.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ColumnDefinition.java @@ -27,6 +27,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Node; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.NodeLocation; import org.apache.iotdb.commons.schema.table.column.TsTableColumnCategory; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -61,8 +62,10 @@ public ColumnDefinition( final @Nullable String charsetName, final @Nullable String comment) { super(location); - this.name = requireNonNull(name, "name is null"); - this.columnCategory = requireNonNull(columnCategory, "columnCategory is null"); + this.name = requireNonNull(name, DataNodeQueryMessages.EXCEPTION_NAME_IS_NULL_C8B35959); + this.columnCategory = + requireNonNull( + columnCategory, DataNodeQueryMessages.EXCEPTION_COLUMNCATEGORY_IS_NULL_0075924B); this.type = getDefaultType(type); this.charsetName = charsetName; this.comment = comment; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/CountDB.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/CountDB.java index 49f113421b22f..bbdbbb63e3751 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/CountDB.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/CountDB.java @@ -24,6 +24,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Node; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.NodeLocation; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Statement; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -37,7 +38,7 @@ public class CountDB extends Statement { private static final long INSTANCE_SIZE = RamUsageEstimator.shallowSizeOfInstance(CountDB.class); public CountDB(final NodeLocation location) { - super(requireNonNull(location, "location is null")); + super(requireNonNull(location, DataNodeQueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); } @Override diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/CountStatement.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/CountStatement.java index 91385b788d59d..7c4501dd4043e 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/CountStatement.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/CountStatement.java @@ -25,6 +25,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Node; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.NodeLocation; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Statement; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -45,7 +46,7 @@ public class CountStatement extends Statement { public CountStatement( final NodeLocation location, final String tableName, final Optional where) { - super(requireNonNull(location, "location is null")); + super(requireNonNull(location, DataNodeQueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); this.tableName = tableName; this.where = where; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/CreateDB.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/CreateDB.java index 27ac04014ff7b..143e557eb246c 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/CreateDB.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/CreateDB.java @@ -21,6 +21,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.IAstVisitor; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.NodeLocation; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.statement.metadata.DatabaseSchemaStatement; import org.apache.tsfile.utils.RamUsageEstimator; @@ -39,7 +40,11 @@ public CreateDB( final boolean exists, final String dbName, final List properties) { - super(requireNonNull(location, "location is null"), exists, dbName, properties); + super( + requireNonNull(location, DataNodeQueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388), + exists, + dbName, + properties); } @Override diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/CreateExternalService.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/CreateExternalService.java index 2172c8a8dae7f..57b1968dda900 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/CreateExternalService.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/CreateExternalService.java @@ -24,6 +24,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Node; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.NodeLocation; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Statement; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -42,10 +43,12 @@ public class CreateExternalService extends Statement { private final String className; public CreateExternalService(NodeLocation location, String serviceName, String className) { - super(requireNonNull(location, "location is null")); + super(requireNonNull(location, DataNodeQueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); - this.serviceName = requireNonNull(serviceName, "serviceName is null"); - this.className = requireNonNull(className, "className is null"); + this.serviceName = + requireNonNull(serviceName, DataNodeQueryMessages.EXCEPTION_SERVICENAME_IS_NULL_1009BA39); + this.className = + requireNonNull(className, DataNodeQueryMessages.EXCEPTION_CLASSNAME_IS_NULL_3902B37C); } public String getServiceName() { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/CreateFunction.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/CreateFunction.java index 74e621d2668da..bd6124d0eb518 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/CreateFunction.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/CreateFunction.java @@ -24,6 +24,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Node; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.NodeLocation; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Statement; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -47,18 +48,23 @@ public class CreateFunction extends Statement { @Nullable private final String uriString; public CreateFunction(NodeLocation location, String udfName, String className) { - super(requireNonNull(location, "location is null")); + super(requireNonNull(location, DataNodeQueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); - this.udfName = requireNonNull(udfName, "udfName is null"); - this.className = requireNonNull(className, "className is null"); + this.udfName = + requireNonNull(udfName, DataNodeQueryMessages.EXCEPTION_UDFNAME_IS_NULL_83E9039B); + this.className = + requireNonNull(className, DataNodeQueryMessages.EXCEPTION_CLASSNAME_IS_NULL_3902B37C); this.uriString = null; } public CreateFunction(NodeLocation location, String udfName, String className, String uriString) { - super(requireNonNull(location, "location is null")); - this.udfName = requireNonNull(udfName, "udfName is null"); - this.className = requireNonNull(className, "className is null"); - this.uriString = requireNonNull(uriString, "uriString is null"); + super(requireNonNull(location, DataNodeQueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.udfName = + requireNonNull(udfName, DataNodeQueryMessages.EXCEPTION_UDFNAME_IS_NULL_83E9039B); + this.className = + requireNonNull(className, DataNodeQueryMessages.EXCEPTION_CLASSNAME_IS_NULL_3902B37C); + this.uriString = + requireNonNull(uriString, DataNodeQueryMessages.EXCEPTION_URISTRING_IS_NULL_E7458C6A); } public String getUdfName() { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/CreateIndex.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/CreateIndex.java index ae6dc7c22ae77..8d188cfc6ccd3 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/CreateIndex.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/CreateIndex.java @@ -26,6 +26,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.NodeLocation; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.QualifiedName; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Statement; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -49,10 +50,14 @@ public class CreateIndex extends Statement { public CreateIndex(QualifiedName tableName, Identifier indexName, List columnList) { super(null); - this.tableName = requireNonNull(tableName, "tableName is null"); - this.indexName = requireNonNull(indexName, "indexName is null"); - requireNonNull(columnList, "columnList is null"); - checkArgument(!columnList.isEmpty(), "size of columnList should be larger than 1"); + this.tableName = + requireNonNull(tableName, DataNodeQueryMessages.EXCEPTION_TABLENAME_IS_NULL_20708596); + this.indexName = + requireNonNull(indexName, DataNodeQueryMessages.EXCEPTION_INDEXNAME_IS_NULL_2525299C); + requireNonNull(columnList, DataNodeQueryMessages.EXCEPTION_COLUMNLIST_IS_NULL_DADE6825); + checkArgument( + !columnList.isEmpty(), + DataNodeQueryMessages.EXCEPTION_SIZE_OF_COLUMNLIST_SHOULD_BE_LARGER_THAN_1_7EB80E55); this.columnList = columnList; } @@ -61,11 +66,15 @@ public CreateIndex( QualifiedName tableName, Identifier indexName, List columnList) { - super(requireNonNull(location, "location is null")); - this.tableName = requireNonNull(tableName, "tableName is null"); - this.indexName = requireNonNull(indexName, "indexName is null"); - requireNonNull(columnList, "columnList is null"); - checkArgument(!columnList.isEmpty(), "size of columnList should be larger than 1"); + super(requireNonNull(location, DataNodeQueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.tableName = + requireNonNull(tableName, DataNodeQueryMessages.EXCEPTION_TABLENAME_IS_NULL_20708596); + this.indexName = + requireNonNull(indexName, DataNodeQueryMessages.EXCEPTION_INDEXNAME_IS_NULL_2525299C); + requireNonNull(columnList, DataNodeQueryMessages.EXCEPTION_COLUMNLIST_IS_NULL_DADE6825); + checkArgument( + !columnList.isEmpty(), + DataNodeQueryMessages.EXCEPTION_SIZE_OF_COLUMNLIST_SHOULD_BE_LARGER_THAN_1_7EB80E55); this.columnList = columnList; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/CreatePipe.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/CreatePipe.java index 909a8647524de..2592ee9aefac4 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/CreatePipe.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/CreatePipe.java @@ -21,6 +21,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.AstMemoryEstimationHelper; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.IAstVisitor; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.tsfile.utils.RamUsageEstimator; @@ -46,13 +47,23 @@ public CreatePipe( final Map sourceAttributes, final Map processorAttributes, final Map sinkAttributes) { - this.pipeName = requireNonNull(pipeName, "pipe name can not be null"); + this.pipeName = + requireNonNull( + pipeName, DataNodeQueryMessages.EXCEPTION_PIPE_NAME_CAN_NOT_BE_NULL_14570979); this.ifNotExistsCondition = ifNotExistsCondition; this.sourceAttributes = - requireNonNull(sourceAttributes, "extractor/source attributes can not be null"); + requireNonNull( + sourceAttributes, + DataNodeQueryMessages + .EXCEPTION_EXTRACTOR_SLASH_SOURCE_ATTRIBUTES_CAN_NOT_BE_NULL_2B3A656B); this.processorAttributes = - requireNonNull(processorAttributes, "processor attributes can not be null"); - this.sinkAttributes = requireNonNull(sinkAttributes, "connector attributes can not be null"); + requireNonNull( + processorAttributes, + DataNodeQueryMessages.EXCEPTION_PROCESSOR_ATTRIBUTES_CAN_NOT_BE_NULL_FFF91008); + this.sinkAttributes = + requireNonNull( + sinkAttributes, + DataNodeQueryMessages.EXCEPTION_CONNECTOR_ATTRIBUTES_CAN_NOT_BE_NULL_7AF2F613); } public String getPipeName() { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/CreatePipePlugin.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/CreatePipePlugin.java index 4302dca37de6d..204aa3b1bbc61 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/CreatePipePlugin.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/CreatePipePlugin.java @@ -21,6 +21,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.AstMemoryEstimationHelper; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.IAstVisitor; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.tsfile.utils.RamUsageEstimator; @@ -43,10 +44,15 @@ public CreatePipePlugin( final boolean ifNotExistsCondition, final String className, final String uriString) { - this.pluginName = requireNonNull(pluginName, "plugin name can not be null"); + this.pluginName = + requireNonNull( + pluginName, DataNodeQueryMessages.EXCEPTION_PLUGIN_NAME_CAN_NOT_BE_NULL_92F0F4D6); this.ifNotExistsCondition = ifNotExistsCondition; - this.className = requireNonNull(className, "class name can not be null"); - this.uriString = requireNonNull(uriString, "uri can not be null"); + this.className = + requireNonNull( + className, DataNodeQueryMessages.EXCEPTION_CLASS_NAME_CAN_NOT_BE_NULL_1D276677); + this.uriString = + requireNonNull(uriString, DataNodeQueryMessages.EXCEPTION_URI_CAN_NOT_BE_NULL_B3535EDC); } public String getPluginName() { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/CreateTable.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/CreateTable.java index 7b81c8f93abf5..5331ffbc06b97 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/CreateTable.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/CreateTable.java @@ -25,6 +25,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.NodeLocation; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.QualifiedName; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Statement; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -60,12 +61,15 @@ public CreateTable( final @Nullable String comment, final List properties) { super(location); - this.name = requireNonNull(name, "name is null"); - this.elements = ImmutableList.copyOf(requireNonNull(elements, "elements is null")); + this.name = requireNonNull(name, DataNodeQueryMessages.EXCEPTION_NAME_IS_NULL_C8B35959); + this.elements = + ImmutableList.copyOf( + requireNonNull(elements, DataNodeQueryMessages.EXCEPTION_ELEMENTS_IS_NULL_3451C1DA)); this.ifNotExists = ifNotExists; this.charsetName = charsetName; this.comment = comment; - this.properties = requireNonNull(properties, "properties is null"); + this.properties = + requireNonNull(properties, DataNodeQueryMessages.EXCEPTION_PROPERTIES_IS_NULL_57B88B49); } public QualifiedName getName() { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/CreateTopic.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/CreateTopic.java index b7518a29abf45..d660a3977af70 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/CreateTopic.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/CreateTopic.java @@ -21,6 +21,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.AstMemoryEstimationHelper; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.IAstVisitor; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.tsfile.utils.RamUsageEstimator; @@ -42,9 +43,14 @@ public CreateTopic( final String topicName, final boolean ifNotExistsCondition, final Map topicAttributes) { - this.topicName = requireNonNull(topicName, "topic name can not be null"); + this.topicName = + requireNonNull( + topicName, DataNodeQueryMessages.EXCEPTION_TOPIC_NAME_CAN_NOT_BE_NULL_EA4ED0BF); this.ifNotExistsCondition = ifNotExistsCondition; - this.topicAttributes = requireNonNull(topicAttributes, "topic attributes can not be null"); + this.topicAttributes = + requireNonNull( + topicAttributes, + DataNodeQueryMessages.EXCEPTION_TOPIC_ATTRIBUTES_CAN_NOT_BE_NULL_791A8FED); } public String getTopicName() { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/DatabaseStatement.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/DatabaseStatement.java index 950ee060aa721..f343787df19d9 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/DatabaseStatement.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/DatabaseStatement.java @@ -23,6 +23,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Node; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.NodeLocation; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Statement; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.statement.metadata.DatabaseSchemaStatement; import com.google.common.collect.ImmutableList; @@ -47,10 +48,15 @@ protected DatabaseStatement( final boolean exists, final String dbName, final List properties) { - super(requireNonNull(location, "location is null")); + super(requireNonNull(location, DataNodeQueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); this.exists = exists; - this.dbName = requireNonNull(dbName, "dbName is null").toLowerCase(Locale.ENGLISH); - this.properties = ImmutableList.copyOf(requireNonNull(properties, "properties is null")); + this.dbName = + requireNonNull(dbName, DataNodeQueryMessages.EXCEPTION_DBNAME_IS_NULL_4521C4EE) + .toLowerCase(Locale.ENGLISH); + this.properties = + ImmutableList.copyOf( + requireNonNull( + properties, DataNodeQueryMessages.EXCEPTION_PROPERTIES_IS_NULL_57B88B49)); } public String getDbName() { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/Deallocate.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/Deallocate.java index 8868fb4dcdcfe..b70af8727d1fb 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/Deallocate.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/Deallocate.java @@ -25,6 +25,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Node; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.NodeLocation; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Statement; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -49,7 +50,9 @@ public Deallocate(Identifier statementName) { public Deallocate(NodeLocation location, Identifier statementName) { super(location); - this.statementName = requireNonNull(statementName, "statementName is null"); + this.statementName = + requireNonNull( + statementName, DataNodeQueryMessages.EXCEPTION_STATEMENTNAME_IS_NULL_C03BB8D4); } public Identifier getStatementName() { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/Delete.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/Delete.java index 8ad2045fab0a6..e5e4f2396cc3e 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/Delete.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/Delete.java @@ -27,6 +27,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.NodeLocation; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Statement; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Table; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.storageengine.dataregion.modification.TableDeletionEntry; import com.google.common.collect.ImmutableList; @@ -56,19 +57,19 @@ public class Delete extends Statement { public Delete(final Table table) { super(null); - this.table = requireNonNull(table, "table is null"); + this.table = requireNonNull(table, DataNodeQueryMessages.EXCEPTION_TABLE_IS_NULL_8DDD9098); } public Delete(final NodeLocation location, final Table table) { - super(requireNonNull(location, "location is null")); - this.table = requireNonNull(table, "table is null"); + super(requireNonNull(location, DataNodeQueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.table = requireNonNull(table, DataNodeQueryMessages.EXCEPTION_TABLE_IS_NULL_8DDD9098); this.where = null; } public Delete(final NodeLocation location, final Table table, final Expression where) { - super(requireNonNull(location, "location is null")); - this.table = requireNonNull(table, "table is null"); - this.where = requireNonNull(where, "where is null"); + super(requireNonNull(location, DataNodeQueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.table = requireNonNull(table, DataNodeQueryMessages.EXCEPTION_TABLE_IS_NULL_8DDD9098); + this.where = requireNonNull(where, DataNodeQueryMessages.EXCEPTION_WHERE_IS_NULL_A1A3FCBC); } public Table getTable() { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/DescribeTable.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/DescribeTable.java index 07276e0615759..a7c05cb44be2e 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/DescribeTable.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/DescribeTable.java @@ -25,6 +25,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.NodeLocation; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.QualifiedName; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Statement; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -53,8 +54,8 @@ public DescribeTable( final QualifiedName table, final boolean isDetails, final Boolean isShowCreateView) { - super(requireNonNull(location, "location is null")); - this.table = requireNonNull(table, "table is null"); + super(requireNonNull(location, DataNodeQueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.table = requireNonNull(table, DataNodeQueryMessages.EXCEPTION_TABLE_IS_NULL_8DDD9098); this.isDetails = isDetails; this.isShowCreateView = isShowCreateView; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/DropColumn.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/DropColumn.java index 4bd8c3aa7b544..1878ac9cbd484 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/DropColumn.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/DropColumn.java @@ -26,6 +26,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.NodeLocation; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.QualifiedName; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Statement; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -54,9 +55,9 @@ public DropColumn( final boolean tableIfExists, final boolean columnIfExists, final boolean view) { - super(requireNonNull(location, "location is null")); - this.table = requireNonNull(table, "table is null"); - this.field = requireNonNull(field, "field is null"); + super(requireNonNull(location, DataNodeQueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.table = requireNonNull(table, DataNodeQueryMessages.EXCEPTION_TABLE_IS_NULL_8DDD9098); + this.field = requireNonNull(field, DataNodeQueryMessages.EXCEPTION_FIELD_IS_NULL_80E8CE23); this.tableIfExists = tableIfExists; this.columnIfExists = columnIfExists; this.view = view; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/DropDB.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/DropDB.java index f7d45ae3123c9..9cd37ee5ea5b0 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/DropDB.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/DropDB.java @@ -25,6 +25,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Node; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.NodeLocation; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Statement; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -43,8 +44,9 @@ public class DropDB extends Statement { private final boolean exists; public DropDB(NodeLocation location, Identifier catalogName, boolean exists) { - super(requireNonNull(location, "location is null")); - this.dbName = requireNonNull(catalogName, "catalogName is null"); + super(requireNonNull(location, DataNodeQueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.dbName = + requireNonNull(catalogName, DataNodeQueryMessages.EXCEPTION_CATALOGNAME_IS_NULL_2E3C3C6B); this.exists = exists; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/DropExternalService.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/DropExternalService.java index e4906c60a1521..c9d0443c5b0c9 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/DropExternalService.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/DropExternalService.java @@ -24,6 +24,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Node; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.NodeLocation; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Statement; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -42,8 +43,9 @@ public class DropExternalService extends Statement { private final boolean forcedly; public DropExternalService(NodeLocation location, String serviceName, boolean forcedly) { - super(requireNonNull(location, "location is null")); - this.serviceName = requireNonNull(serviceName, "serviceName is null"); + super(requireNonNull(location, DataNodeQueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.serviceName = + requireNonNull(serviceName, DataNodeQueryMessages.EXCEPTION_SERVICENAME_IS_NULL_1009BA39); this.forcedly = forcedly; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/DropFunction.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/DropFunction.java index 09b198cfd7663..768149848b12d 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/DropFunction.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/DropFunction.java @@ -24,6 +24,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Node; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.NodeLocation; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Statement; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -41,8 +42,9 @@ public class DropFunction extends Statement { private final String udfName; public DropFunction(NodeLocation location, String udfName) { - super(requireNonNull(location, "location is null")); - this.udfName = requireNonNull(udfName, "udfName is null"); + super(requireNonNull(location, DataNodeQueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.udfName = + requireNonNull(udfName, DataNodeQueryMessages.EXCEPTION_UDFNAME_IS_NULL_83E9039B); } public String getUdfName() { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/DropIndex.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/DropIndex.java index 7b3772d80247a..61e530e626926 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/DropIndex.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/DropIndex.java @@ -26,6 +26,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.NodeLocation; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.QualifiedName; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Statement; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -46,14 +47,18 @@ public class DropIndex extends Statement { public DropIndex(QualifiedName tableName, Identifier indexName) { super(null); - this.tableName = requireNonNull(tableName, "tableName is null"); - this.indexName = requireNonNull(indexName, "indexName is null"); + this.tableName = + requireNonNull(tableName, DataNodeQueryMessages.EXCEPTION_TABLENAME_IS_NULL_20708596); + this.indexName = + requireNonNull(indexName, DataNodeQueryMessages.EXCEPTION_INDEXNAME_IS_NULL_2525299C); } public DropIndex(NodeLocation location, QualifiedName tableName, Identifier indexName) { - super(requireNonNull(location, "location is null")); - this.tableName = requireNonNull(tableName, "tableName is null"); - this.indexName = requireNonNull(indexName, "indexName is null"); + super(requireNonNull(location, DataNodeQueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.tableName = + requireNonNull(tableName, DataNodeQueryMessages.EXCEPTION_TABLENAME_IS_NULL_20708596); + this.indexName = + requireNonNull(indexName, DataNodeQueryMessages.EXCEPTION_INDEXNAME_IS_NULL_2525299C); } public QualifiedName getTableName() { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/DropPipe.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/DropPipe.java index 030465ccdc0a4..e8e37a2b7929c 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/DropPipe.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/DropPipe.java @@ -21,6 +21,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.AstMemoryEstimationHelper; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.IAstVisitor; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.tsfile.utils.RamUsageEstimator; @@ -36,7 +37,9 @@ public class DropPipe extends PipeStatement { private final boolean ifExistsCondition; public DropPipe(final String pipeName, final boolean ifExistsCondition) { - this.pipeName = requireNonNull(pipeName, "pipe name can not be null"); + this.pipeName = + requireNonNull( + pipeName, DataNodeQueryMessages.EXCEPTION_PIPE_NAME_CAN_NOT_BE_NULL_14570979); this.ifExistsCondition = ifExistsCondition; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/DropPipePlugin.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/DropPipePlugin.java index b2d61dde6f75d..497c02e8e9327 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/DropPipePlugin.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/DropPipePlugin.java @@ -21,6 +21,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.AstMemoryEstimationHelper; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.IAstVisitor; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.tsfile.utils.RamUsageEstimator; @@ -37,7 +38,9 @@ public class DropPipePlugin extends PipeStatement { private final boolean ifExistsCondition; public DropPipePlugin(final String pluginName, final boolean ifExistsCondition) { - this.pluginName = requireNonNull(pluginName, "plugin name can not be null"); + this.pluginName = + requireNonNull( + pluginName, DataNodeQueryMessages.EXCEPTION_PLUGIN_NAME_CAN_NOT_BE_NULL_92F0F4D6); this.ifExistsCondition = ifExistsCondition; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/DropSubscription.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/DropSubscription.java index 92f5427822bef..5001453bf3b2b 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/DropSubscription.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/DropSubscription.java @@ -21,6 +21,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.AstMemoryEstimationHelper; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.IAstVisitor; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.tsfile.utils.RamUsageEstimator; @@ -37,7 +38,10 @@ public class DropSubscription extends SubscriptionStatement { private final boolean ifExistsCondition; public DropSubscription(final String subscriptionId, final boolean ifExistsCondition) { - this.subscriptionId = requireNonNull(subscriptionId, "subscription id can not be null"); + this.subscriptionId = + requireNonNull( + subscriptionId, + DataNodeQueryMessages.EXCEPTION_SUBSCRIPTION_ID_CAN_NOT_BE_NULL_0CDFFD7D); this.ifExistsCondition = ifExistsCondition; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/DropTable.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/DropTable.java index 8f182d3bbc68d..9879e4cc6865c 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/DropTable.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/DropTable.java @@ -25,6 +25,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.NodeLocation; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.QualifiedName; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Statement; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -49,8 +50,9 @@ public DropTable( final QualifiedName tableName, final boolean exists, final boolean isView) { - super(requireNonNull(location, "location is null")); - this.tableName = requireNonNull(tableName, "tableName is null"); + super(requireNonNull(location, DataNodeQueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.tableName = + requireNonNull(tableName, DataNodeQueryMessages.EXCEPTION_TABLENAME_IS_NULL_20708596); this.exists = exists; this.isView = isView; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/DropTopic.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/DropTopic.java index f4b9f954a7c5e..82abba4191a48 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/DropTopic.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/DropTopic.java @@ -21,6 +21,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.AstMemoryEstimationHelper; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.IAstVisitor; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.tsfile.utils.RamUsageEstimator; @@ -37,7 +38,9 @@ public class DropTopic extends SubscriptionStatement { private final boolean ifExistsCondition; public DropTopic(final String topicName, final boolean ifExistsCondition) { - this.topicName = requireNonNull(topicName, "topic name can not be null"); + this.topicName = + requireNonNull( + topicName, DataNodeQueryMessages.EXCEPTION_TOPIC_NAME_CAN_NOT_BE_NULL_EA4ED0BF); this.ifExistsCondition = ifExistsCondition; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/Execute.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/Execute.java index 87cc96ac4fdd6..98a460005c212 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/Execute.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/Execute.java @@ -26,6 +26,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Node; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.NodeLocation; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Statement; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -54,8 +55,13 @@ public Execute(Identifier statementName, List parameters) { public Execute(NodeLocation location, Identifier statementName, List parameters) { super(location); - this.statementName = requireNonNull(statementName, "statementName is null"); - this.parameters = ImmutableList.copyOf(requireNonNull(parameters, "parameters is null")); + this.statementName = + requireNonNull( + statementName, DataNodeQueryMessages.EXCEPTION_STATEMENTNAME_IS_NULL_C03BB8D4); + this.parameters = + ImmutableList.copyOf( + requireNonNull( + parameters, DataNodeQueryMessages.EXCEPTION_PARAMETERS_IS_NULL_418C7892)); } public Identifier getStatementName() { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ExecuteImmediate.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ExecuteImmediate.java index 5b6494407200e..f2252fa591af9 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ExecuteImmediate.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ExecuteImmediate.java @@ -26,6 +26,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.NodeLocation; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Statement; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.StringLiteral; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -58,8 +59,11 @@ public ExecuteImmediate(StringLiteral sql, List parameters) { public ExecuteImmediate(NodeLocation location, StringLiteral sql, List parameters) { super(location); - this.sql = requireNonNull(sql, "sql is null"); - this.parameters = ImmutableList.copyOf(requireNonNull(parameters, "parameters is null")); + this.sql = requireNonNull(sql, DataNodeQueryMessages.EXCEPTION_SQL_IS_NULL_BEDB2B7A); + this.parameters = + ImmutableList.copyOf( + requireNonNull( + parameters, DataNodeQueryMessages.EXCEPTION_PARAMETERS_IS_NULL_418C7892)); } public StringLiteral getSql() { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/Explain.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/Explain.java index 0e98aabfd1273..60d328e210c0c 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/Explain.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/Explain.java @@ -24,6 +24,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Node; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.NodeLocation; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Statement; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -42,12 +43,14 @@ public class Explain extends Statement { public Explain(Statement statement) { super(null); - this.statement = requireNonNull(statement, "statement is null"); + this.statement = + requireNonNull(statement, DataNodeQueryMessages.EXCEPTION_STATEMENT_IS_NULL_693A0622); } public Explain(NodeLocation location, Statement statement) { - super(requireNonNull(location, "location is null")); - this.statement = requireNonNull(statement, "statement is null"); + super(requireNonNull(location, DataNodeQueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.statement = + requireNonNull(statement, DataNodeQueryMessages.EXCEPTION_STATEMENT_IS_NULL_693A0622); } public Statement getStatement() { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ExplainAnalyze.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ExplainAnalyze.java index 1c158a1b279bf..a0dca9845c1ad 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ExplainAnalyze.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ExplainAnalyze.java @@ -24,6 +24,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Node; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.NodeLocation; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Statement; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -44,13 +45,15 @@ public class ExplainAnalyze extends Statement { public ExplainAnalyze(Statement statement, boolean verbose) { super(null); - this.statement = requireNonNull(statement, "statement is null"); + this.statement = + requireNonNull(statement, DataNodeQueryMessages.EXCEPTION_STATEMENT_IS_NULL_693A0622); this.verbose = verbose; } public ExplainAnalyze(NodeLocation location, boolean verbose, Statement statement) { - super(requireNonNull(location, "location is null")); - this.statement = requireNonNull(statement, "statement is null"); + super(requireNonNull(location, DataNodeQueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.statement = + requireNonNull(statement, DataNodeQueryMessages.EXCEPTION_STATEMENT_IS_NULL_693A0622); this.verbose = verbose; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/Insert.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/Insert.java index fb42445e6d8a5..be3a06c0c67f0 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/Insert.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/Insert.java @@ -28,6 +28,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Statement; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Table; import org.apache.iotdb.commons.schema.table.column.TsTableColumnCategory; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import com.google.common.collect.ImmutableList; import org.apache.tsfile.read.common.type.LongType; @@ -57,16 +58,17 @@ public final class Insert extends Statement { public Insert(Table table, Query query) { super(null); - this.table = requireNonNull(table, "target is null"); + this.table = requireNonNull(table, DataNodeQueryMessages.EXCEPTION_TARGET_IS_NULL_240F0372); this.columns = null; - this.query = requireNonNull(query, "query is null"); + this.query = requireNonNull(query, DataNodeQueryMessages.EXCEPTION_QUERY_IS_NULL_689B7978); } public Insert(Table table, List columns, Query query) { super(null); - this.table = requireNonNull(table, "target is null"); - this.columns = requireNonNull(columns, "columns is null"); - this.query = requireNonNull(query, "query is null"); + this.table = requireNonNull(table, DataNodeQueryMessages.EXCEPTION_TARGET_IS_NULL_240F0372); + this.columns = + requireNonNull(columns, DataNodeQueryMessages.EXCEPTION_COLUMNS_IS_NULL_6C8F32B3); + this.query = requireNonNull(query, DataNodeQueryMessages.EXCEPTION_QUERY_IS_NULL_689B7978); } public Table getTable() { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/LoadTsFile.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/LoadTsFile.java index dc1a549f63650..28ae4d7f08163 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/LoadTsFile.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/LoadTsFile.java @@ -26,6 +26,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.NodeLocation; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Statement; import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.storageengine.dataregion.tsfile.TsFileResource; import org.apache.iotdb.db.storageengine.load.config.LoadTsFileConfigurator; @@ -86,7 +87,8 @@ private LoadTsFile( Map loadAttributes, boolean validateSourcePath) { super(location); - this.filePath = requireNonNull(filePath, "filePath is null"); + this.filePath = + requireNonNull(filePath, DataNodeQueryMessages.EXCEPTION_FILEPATH_IS_NULL_84CE8A66); this.databaseLevel = IoTDBDescriptor.getInstance().getConfig().getDefaultDatabaseLevel(); this.deleteAfterLoad = false; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/Prepare.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/Prepare.java index 0a40033aa8663..8b5979e480a0e 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/Prepare.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/Prepare.java @@ -25,6 +25,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Node; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.NodeLocation; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Statement; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -45,14 +46,18 @@ public final class Prepare extends Statement { public Prepare(Identifier statementName, Statement sql) { super(null); - this.statementName = requireNonNull(statementName, "statementName is null"); - this.sql = requireNonNull(sql, "sql is null"); + this.statementName = + requireNonNull( + statementName, DataNodeQueryMessages.EXCEPTION_STATEMENTNAME_IS_NULL_C03BB8D4); + this.sql = requireNonNull(sql, DataNodeQueryMessages.EXCEPTION_SQL_IS_NULL_BEDB2B7A); } public Prepare(NodeLocation location, Identifier statementName, Statement sql) { super(location); - this.statementName = requireNonNull(statementName, "statementName is null"); - this.sql = requireNonNull(sql, "sql is null"); + this.statementName = + requireNonNull( + statementName, DataNodeQueryMessages.EXCEPTION_STATEMENTNAME_IS_NULL_C03BB8D4); + this.sql = requireNonNull(sql, DataNodeQueryMessages.EXCEPTION_SQL_IS_NULL_BEDB2B7A); } public Identifier getStatementName() { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/Property.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/Property.java index bb4f4ae7a202c..677b979f148ab 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/Property.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/Property.java @@ -25,6 +25,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Identifier; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Node; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.NodeLocation; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -49,28 +50,28 @@ public class Property extends Node { /** Constructs an instance representing a property whose value is set to DEFAULT */ public Property(@Nonnull Identifier name) { super(null); - this.name = requireNonNull(name, "name is null"); + this.name = requireNonNull(name, DataNodeQueryMessages.EXCEPTION_NAME_IS_NULL_C8B35959); this.value = null; } /** Constructs an instance representing a property whose value is set to DEFAULT */ public Property(@Nonnull NodeLocation location, @Nonnull Identifier name) { - super(requireNonNull(location, "location is null")); - this.name = requireNonNull(name, "name is null"); + super(requireNonNull(location, DataNodeQueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.name = requireNonNull(name, DataNodeQueryMessages.EXCEPTION_NAME_IS_NULL_C8B35959); this.value = null; } public Property(@Nonnull Identifier name, @Nonnull Expression value) { super(null); - this.name = requireNonNull(name, "name is null"); - this.value = requireNonNull(value, "value is null"); + this.name = requireNonNull(name, DataNodeQueryMessages.EXCEPTION_NAME_IS_NULL_C8B35959); + this.value = requireNonNull(value, DataNodeQueryMessages.EXCEPTION_VALUE_IS_NULL_192F6BFF); } public Property( @Nonnull NodeLocation location, @Nonnull Identifier name, @Nullable Expression value) { - super(requireNonNull(location, "location is null")); - this.name = requireNonNull(name, "name is null"); - this.value = requireNonNull(value, "value is null"); + super(requireNonNull(location, DataNodeQueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.name = requireNonNull(name, DataNodeQueryMessages.EXCEPTION_NAME_IS_NULL_C8B35959); + this.value = requireNonNull(value, DataNodeQueryMessages.EXCEPTION_VALUE_IS_NULL_192F6BFF); } public Identifier getName() { @@ -88,7 +89,8 @@ public boolean isSetToDefault() { public Expression getNonDefaultValue() { checkState( !isSetToDefault(), - "Cannot get non-default value of property %s since its value is set to DEFAULT", + DataNodeQueryMessages + .EXCEPTION_CANNOT_GET_NON_MINUS_DEFAULT_VALUE_OF_PROPERTY_ARG_SINCE_ITS_VALUE_IS_SET_TO_DEF_E7D3185F, name); return value; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/RenameColumn.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/RenameColumn.java index 83a8863f91f9b..7866b03a2c746 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/RenameColumn.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/RenameColumn.java @@ -58,10 +58,10 @@ public RenameColumn( final boolean tableIfExists, final boolean columnIfNotExists, final boolean view) { - super(requireNonNull(location, "location is null")); - this.table = requireNonNull(table, "table is null"); - this.source = requireNonNull(source, "source is null"); - this.target = requireNonNull(target, "target is null"); + super(requireNonNull(location, DataNodeQueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.table = requireNonNull(table, DataNodeQueryMessages.EXCEPTION_TABLE_IS_NULL_8DDD9098); + this.source = requireNonNull(source, DataNodeQueryMessages.EXCEPTION_SOURCE_IS_NULL_45946547); + this.target = requireNonNull(target, DataNodeQueryMessages.EXCEPTION_TARGET_IS_NULL_240F0372); this.tableIfExists = tableIfExists; this.columnIfNotExists = columnIfNotExists; this.view = view; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/RenameTable.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/RenameTable.java index 205c94dc33976..eb39c4b176b94 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/RenameTable.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/RenameTable.java @@ -54,9 +54,11 @@ public RenameTable( final Identifier target, final boolean tableIfExists, final boolean view) { - super(requireNonNull(location, "location is null")); - this.source = requireNonNull(source, "source name is null"); - this.target = requireNonNull(target, "target name is null"); + super(requireNonNull(location, DataNodeQueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.source = + requireNonNull(source, DataNodeQueryMessages.EXCEPTION_SOURCE_NAME_IS_NULL_287E475D); + this.target = + requireNonNull(target, DataNodeQueryMessages.EXCEPTION_TARGET_NAME_IS_NULL_A5F701C6); this.tableIfExists = tableIfExists; this.view = view; if (!view) { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/SetColumnComment.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/SetColumnComment.java index 90c82f0a541d0..117f0bd305415 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/SetColumnComment.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/SetColumnComment.java @@ -26,6 +26,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.NodeLocation; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.QualifiedName; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Statement; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -55,9 +56,9 @@ public SetColumnComment( final boolean tableIfExists, final boolean columnIfExists, final @Nullable String comment) { - super(requireNonNull(location, "location is null")); - this.table = requireNonNull(table, "table is null"); - this.field = requireNonNull(field, "field is null"); + super(requireNonNull(location, DataNodeQueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.table = requireNonNull(table, DataNodeQueryMessages.EXCEPTION_TABLE_IS_NULL_8DDD9098); + this.field = requireNonNull(field, DataNodeQueryMessages.EXCEPTION_FIELD_IS_NULL_80E8CE23); this.tableIfExists = tableIfExists; this.columnIfExists = columnIfExists; this.comment = comment; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/SetProperties.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/SetProperties.java index d8f7e83ad37f4..81722d2360e8f 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/SetProperties.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/SetProperties.java @@ -25,6 +25,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.NodeLocation; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.QualifiedName; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Statement; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -58,10 +59,13 @@ public SetProperties( final QualifiedName name, final List properties, final boolean ifExists) { - super(requireNonNull(location, "location is null")); - this.type = requireNonNull(type, "type is null"); - this.name = requireNonNull(name, "name is null"); - this.properties = ImmutableList.copyOf(requireNonNull(properties, "properties is null")); + super(requireNonNull(location, DataNodeQueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.type = requireNonNull(type, DataNodeQueryMessages.EXCEPTION_TYPE_IS_NULL_16A3D3EB); + this.name = requireNonNull(name, DataNodeQueryMessages.EXCEPTION_NAME_IS_NULL_C8B35959); + this.properties = + ImmutableList.copyOf( + requireNonNull( + properties, DataNodeQueryMessages.EXCEPTION_PROPERTIES_IS_NULL_57B88B49)); this.ifExists = ifExists; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ShowAINodes.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ShowAINodes.java index c681dbdc2b8ee..d26ca18343474 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ShowAINodes.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ShowAINodes.java @@ -24,6 +24,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Node; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.NodeLocation; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Statement; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -43,7 +44,7 @@ public ShowAINodes() { } public ShowAINodes(NodeLocation location) { - super(requireNonNull(location, "location is null")); + super(requireNonNull(location, DataNodeQueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); } @Override diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ShowCluster.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ShowCluster.java index 8b6628bb614b5..9032acf617b7e 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ShowCluster.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ShowCluster.java @@ -24,6 +24,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Node; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.NodeLocation; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Statement; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -48,18 +49,20 @@ public ShowCluster() { } public ShowCluster(NodeLocation location) { - super(requireNonNull(location, "location is null")); + super(requireNonNull(location, DataNodeQueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); this.details = false; } public ShowCluster(Boolean withDetails) { super(null); - this.details = requireNonNull(withDetails, "details is null"); + this.details = + requireNonNull(withDetails, DataNodeQueryMessages.EXCEPTION_DETAILS_IS_NULL_8EDEEA03); } public ShowCluster(NodeLocation location, Boolean withDetails) { - super(requireNonNull(location, "location is null")); - this.details = requireNonNull(withDetails, "details is null"); + super(requireNonNull(location, DataNodeQueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.details = + requireNonNull(withDetails, DataNodeQueryMessages.EXCEPTION_DETAILS_IS_NULL_8EDEEA03); } public Optional getDetails() { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ShowConfigNodes.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ShowConfigNodes.java index 8985a998d81f5..f998b4eee43fa 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ShowConfigNodes.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ShowConfigNodes.java @@ -24,6 +24,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Node; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.NodeLocation; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Statement; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -43,7 +44,7 @@ public ShowConfigNodes() { } public ShowConfigNodes(NodeLocation location) { - super(requireNonNull(location, "location is null")); + super(requireNonNull(location, DataNodeQueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); } @Override diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ShowDB.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ShowDB.java index 5a141658ce22e..6ce49e38bcb9a 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ShowDB.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ShowDB.java @@ -24,6 +24,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Node; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.NodeLocation; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Statement; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -39,7 +40,7 @@ public class ShowDB extends Statement { private final boolean isDetails; public ShowDB(final NodeLocation location, final boolean isDetails) { - super(requireNonNull(location, "location is null")); + super(requireNonNull(location, DataNodeQueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); this.isDetails = isDetails; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ShowDataNodes.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ShowDataNodes.java index 26d791718d064..ed3324f768d8a 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ShowDataNodes.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ShowDataNodes.java @@ -24,6 +24,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Node; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.NodeLocation; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Statement; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -43,7 +44,7 @@ public ShowDataNodes() { } public ShowDataNodes(NodeLocation location) { - super(requireNonNull(location, "location is null")); + super(requireNonNull(location, DataNodeQueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); } @Override diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ShowFunctions.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ShowFunctions.java index dd8d6510cff3a..e2cc2101bb105 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ShowFunctions.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ShowFunctions.java @@ -24,6 +24,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Node; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.NodeLocation; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Statement; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -42,7 +43,7 @@ public ShowFunctions() { } public ShowFunctions(NodeLocation location) { - super(requireNonNull(location, "location is null")); + super(requireNonNull(location, DataNodeQueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); } @Override diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ShowIndex.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ShowIndex.java index 0b013d4b38fdf..5db8a72f10c4b 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ShowIndex.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ShowIndex.java @@ -25,6 +25,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.NodeLocation; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.QualifiedName; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Statement; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -43,12 +44,14 @@ public class ShowIndex extends Statement { public ShowIndex(QualifiedName tableName) { super(null); - this.tableName = requireNonNull(tableName, "tableName is null"); + this.tableName = + requireNonNull(tableName, DataNodeQueryMessages.EXCEPTION_TABLENAME_IS_NULL_20708596); } public ShowIndex(NodeLocation location, QualifiedName tableName) { - super(requireNonNull(location, "location is null")); - this.tableName = requireNonNull(tableName, "tableName is null"); + super(requireNonNull(location, DataNodeQueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.tableName = + requireNonNull(tableName, DataNodeQueryMessages.EXCEPTION_TABLENAME_IS_NULL_20708596); } public QualifiedName getTableName() { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ShowStatement.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ShowStatement.java index ea2870c094c41..8296abf808788 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ShowStatement.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ShowStatement.java @@ -27,6 +27,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Offset; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.OrderBy; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Statement; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -56,7 +57,7 @@ public ShowStatement( Optional orderBy, Optional offset, Optional limit) { - super(requireNonNull(location, "location is null")); + super(requireNonNull(location, DataNodeQueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); this.tableName = tableName; this.where = where; this.orderBy = orderBy; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ShowTables.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ShowTables.java index 1c9032d5b8300..2bbab7f5779ce 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ShowTables.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ShowTables.java @@ -25,6 +25,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Node; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.NodeLocation; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Statement; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -48,14 +49,14 @@ public class ShowTables extends Statement { private final boolean isDetails; public ShowTables(final NodeLocation location, final boolean isDetails) { - super(requireNonNull(location, "location is null")); + super(requireNonNull(location, DataNodeQueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); this.dbName = null; this.isDetails = isDetails; } public ShowTables(final NodeLocation location, final Identifier dbName, final boolean isDetails) { - super(requireNonNull(location, "location is null")); - this.dbName = requireNonNull(dbName, "dbName is null"); + super(requireNonNull(location, DataNodeQueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.dbName = requireNonNull(dbName, DataNodeQueryMessages.EXCEPTION_DBNAME_IS_NULL_4521C4EE); this.isDetails = isDetails; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/StartExternalService.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/StartExternalService.java index 1b1c484b0aade..94dda53110922 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/StartExternalService.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/StartExternalService.java @@ -24,6 +24,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Node; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.NodeLocation; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Statement; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -41,8 +42,9 @@ public class StartExternalService extends Statement { private final String serviceName; public StartExternalService(NodeLocation location, String serviceName) { - super(requireNonNull(location, "location is null")); - this.serviceName = requireNonNull(serviceName, "serviceName is null"); + super(requireNonNull(location, DataNodeQueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.serviceName = + requireNonNull(serviceName, DataNodeQueryMessages.EXCEPTION_SERVICENAME_IS_NULL_1009BA39); } public String getServiceName() { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/StartPipe.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/StartPipe.java index 4221b290a385c..8ce1c13a2346b 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/StartPipe.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/StartPipe.java @@ -21,6 +21,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.AstMemoryEstimationHelper; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.IAstVisitor; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.tsfile.utils.RamUsageEstimator; @@ -36,7 +37,9 @@ public class StartPipe extends PipeStatement { private final String pipeName; public StartPipe(final String pipeName) { - this.pipeName = requireNonNull(pipeName, "pipe name can not be null"); + this.pipeName = + requireNonNull( + pipeName, DataNodeQueryMessages.EXCEPTION_PIPE_NAME_CAN_NOT_BE_NULL_14570979); } public String getPipeName() { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/StopExternalService.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/StopExternalService.java index 85639375d492b..a507b6d6ede5c 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/StopExternalService.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/StopExternalService.java @@ -24,6 +24,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Node; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.NodeLocation; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Statement; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -41,8 +42,9 @@ public class StopExternalService extends Statement { private final String serviceName; public StopExternalService(NodeLocation location, String serviceName) { - super(requireNonNull(location, "location is null")); - this.serviceName = requireNonNull(serviceName, "serviceName is null"); + super(requireNonNull(location, DataNodeQueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.serviceName = + requireNonNull(serviceName, DataNodeQueryMessages.EXCEPTION_SERVICENAME_IS_NULL_1009BA39); } public String getServiceName() { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/StopPipe.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/StopPipe.java index b911abd0155dc..81e0d2b859172 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/StopPipe.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/StopPipe.java @@ -21,6 +21,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.AstMemoryEstimationHelper; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.IAstVisitor; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.tsfile.utils.RamUsageEstimator; @@ -35,7 +36,9 @@ public class StopPipe extends PipeStatement { private final String pipeName; public StopPipe(final String pipeName) { - this.pipeName = requireNonNull(pipeName, "pipe name can not be null"); + this.pipeName = + requireNonNull( + pipeName, DataNodeQueryMessages.EXCEPTION_PIPE_NAME_CAN_NOT_BE_NULL_14570979); } public String getPipeName() { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/Update.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/Update.java index 1509e5cd3c981..dcbdf218f0fee 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/Update.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/Update.java @@ -25,6 +25,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Node; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.NodeLocation; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Table; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -48,7 +49,8 @@ public Update( final List assignments, final Expression where) { super(location, table, where); - this.assignments = requireNonNull(assignments, "assignments is null"); + this.assignments = + requireNonNull(assignments, DataNodeQueryMessages.EXCEPTION_ASSIGNMENTS_IS_NULL_1FD6142D); } public List getAssignments() { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/UpdateAssignment.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/UpdateAssignment.java index 196af0df2851a..067b02244c9de 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/UpdateAssignment.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/UpdateAssignment.java @@ -24,6 +24,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.IAstVisitor; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Node; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.NodeLocation; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -45,15 +46,15 @@ public class UpdateAssignment extends Node { public UpdateAssignment(final Expression name, final Expression value) { super(null); - this.name = requireNonNull(name, "name is null"); - this.value = requireNonNull(value, "value is null"); + this.name = requireNonNull(name, DataNodeQueryMessages.EXCEPTION_NAME_IS_NULL_C8B35959); + this.value = requireNonNull(value, DataNodeQueryMessages.EXCEPTION_VALUE_IS_NULL_192F6BFF); } public UpdateAssignment( final NodeLocation location, final Expression name, final Expression value) { - super(requireNonNull(location, "location is null")); - this.name = requireNonNull(name, "name is null"); - this.value = requireNonNull(value, "value is null"); + super(requireNonNull(location, DataNodeQueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.name = requireNonNull(name, DataNodeQueryMessages.EXCEPTION_NAME_IS_NULL_C8B35959); + this.value = requireNonNull(value, DataNodeQueryMessages.EXCEPTION_VALUE_IS_NULL_192F6BFF); } public Expression getName() { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/Use.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/Use.java index 10e375f84ed8b..0c4be16cf099f 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/Use.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/Use.java @@ -25,6 +25,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Node; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.NodeLocation; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Statement; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -45,12 +46,12 @@ public final class Use extends Statement { public Use(@Nonnull Identifier db) { super(null); - this.db = requireNonNull(db, "db is null"); + this.db = requireNonNull(db, DataNodeQueryMessages.EXCEPTION_DB_IS_NULL_E1AD1B58); } public Use(@Nonnull NodeLocation location, @Nonnull Identifier db) { - super(requireNonNull(location, "location is null")); - this.db = requireNonNull(db, "db is null"); + super(requireNonNull(location, DataNodeQueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.db = requireNonNull(db, DataNodeQueryMessages.EXCEPTION_DB_IS_NULL_E1AD1B58); } public Identifier getDatabaseId() { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/WrappedInsertStatement.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/WrappedInsertStatement.java index f3151fbfe10fe..52bc387199ef5 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/WrappedInsertStatement.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/WrappedInsertStatement.java @@ -29,6 +29,7 @@ import org.apache.iotdb.db.conf.IoTDBDescriptor; import org.apache.iotdb.db.exception.metadata.DataTypeMismatchException; import org.apache.iotdb.db.exception.metadata.PathNotExistException; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.common.MPPQueryContext; import org.apache.iotdb.db.queryengine.plan.analyze.AnalyzeUtils; import org.apache.iotdb.db.queryengine.plan.relational.metadata.ITableDeviceSchemaValidation; @@ -200,8 +201,10 @@ private void validate( } else if (!columnCategory.equals(existingColumn.getColumnCategory())) { throw new SemanticException( String.format( - "Inconsistent column category of column %s: %s/%s", - measurement, columnCategory, existingColumn.getColumnCategory()), + DataNodeQueryMessages.INCONSISTENT_COLUMN_CATEGORY_OF_COLUMN_S_S_S, + measurement, + columnCategory, + existingColumn.getColumnCategory()), TSStatusCode.COLUMN_CATEGORY_MISMATCH.getStatusCode()); } @@ -416,7 +419,10 @@ public static void processNonExistColumn( // the column does not exist and auto-creation is disabled SemanticException semanticException = new SemanticException( - "Column " + name + " does not exists or fails to be " + "created", + DataNodeQueryMessages.COLUMN + + name + + DataNodeQueryMessages.DOES_NOT_EXISTS_OR_FAILS_TO_BE + + DataNodeQueryMessages.CREATED, TSStatusCode.COLUMN_NOT_EXISTS.getStatusCode()); if (columnCategory != TsTableColumnCategory.FIELD || !IoTDBDescriptor.getInstance().getConfig().isEnablePartialInsert()) { @@ -433,8 +439,10 @@ public static void processTypeConflictColumn( SemanticException semanticException = new SemanticException( String.format( - "Incompatible data type of column %s: %s/%s", - incoming.getName(), incoming.getType(), real.getType()), + DataNodeQueryMessages.INCOMPATIBLE_DATA_TYPE_OF_COLUMN_S_S_S, + incoming.getName(), + incoming.getType(), + real.getType()), TSStatusCode.DATA_TYPE_MISMATCH.getStatusCode()); if (incoming.getColumnCategory() != TsTableColumnCategory.FIELD || !IoTDBDescriptor.getInstance().getConfig().isEnablePartialInsert()) { @@ -456,8 +464,10 @@ public static void processTypeConflictColumn( SemanticException semanticException = new SemanticException( String.format( - "Incompatible data type of column %s: %s/%s", - incomingMeasurement, incomingDataType, real.getDataType()), + DataNodeQueryMessages.INCOMPATIBLE_DATA_TYPE_OF_COLUMN_S_S_S, + incomingMeasurement, + incomingDataType, + real.getDataType()), TSStatusCode.DATA_TYPE_MISMATCH.getStatusCode()); if (columnCategory != TsTableColumnCategory.FIELD || !IoTDBDescriptor.getInstance().getConfig().isEnablePartialInsert()) { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/parser/AntlrATNCacheFields.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/parser/AntlrATNCacheFields.java index 9acc3e6ba5d42..9b21d853e423a 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/parser/AntlrATNCacheFields.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/parser/AntlrATNCacheFields.java @@ -19,6 +19,8 @@ package org.apache.iotdb.db.queryengine.plan.relational.sql.parser; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; + import org.antlr.v4.runtime.Lexer; import org.antlr.v4.runtime.Parser; import org.antlr.v4.runtime.atn.ATN; @@ -36,26 +38,34 @@ public class AntlrATNCacheFields { private final DFA[] decisionToDFA; public AntlrATNCacheFields(ATN atn) { - this.atn = requireNonNull(atn, "atn is null"); + this.atn = requireNonNull(atn, DataNodeQueryMessages.EXCEPTION_ATN_IS_NULL_48BE0D3E); this.predictionContextCache = new PredictionContextCache(); this.decisionToDFA = createDecisionToDFA(atn); } @SuppressWarnings("ObjectEquality") public void configureLexer(Lexer lexer) { - requireNonNull(lexer, "lexer is null"); + requireNonNull(lexer, DataNodeQueryMessages.EXCEPTION_LEXER_IS_NULL_88834E18); // Intentional identity equals comparison checkArgument( - atn == lexer.getATN(), "Lexer ATN mismatch: expected %s, found %s", atn, lexer.getATN()); + atn == lexer.getATN(), + DataNodeQueryMessages + .EXCEPTION_LEXER_ATN_MISMATCH_COLON_EXPECTED_ARG_COMMA_FOUND_ARG_8ED22CF1, + atn, + lexer.getATN()); lexer.setInterpreter(new LexerATNSimulator(lexer, atn, decisionToDFA, predictionContextCache)); } @SuppressWarnings("ObjectEquality") public void configureParser(Parser parser) { - requireNonNull(parser, "parser is null"); + requireNonNull(parser, DataNodeQueryMessages.EXCEPTION_PARSER_IS_NULL_AE8E5D6F); // Intentional identity equals comparison checkArgument( - atn == parser.getATN(), "Parser ATN mismatch: expected %s, found %s", atn, parser.getATN()); + atn == parser.getATN(), + DataNodeQueryMessages + .EXCEPTION_PARSER_ATN_MISMATCH_COLON_EXPECTED_ARG_COMMA_FOUND_ARG_FF75D61B, + atn, + parser.getATN()); parser.setInterpreter( new ParserATNSimulator(parser, atn, decisionToDFA, predictionContextCache)); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/parser/AstBuilder.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/parser/AstBuilder.java index a19168b50f42f..a3015f32483d1 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/parser/AstBuilder.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/parser/AstBuilder.java @@ -949,9 +949,9 @@ private InsertRowStatement toInsertRowStatement( List columnList = table.getColumnList(); if (expressions.size() != columnList.size()) { throw new SemanticException( - "expressions and columns do not match, expressions size: " + DataNodeQueryMessages.EXPRESSIONS_AND_COLUMNS_DO_NOT_MATCH_EXPRESSIONS_SIZE + expressions.size() - + ", columns size: " + + DataNodeQueryMessages.COLUMNS_SIZE + columnList.size()); } @@ -1018,7 +1018,9 @@ private InsertRowStatement toInsertRowStatement( if (timeColumnIndex >= expressions.size()) { throw new SemanticException( String.format( - "TimeColumnIndex out of bound: %d-%d", timeColumnIndex, expressions.size())); + DataNodeQueryMessages.TIMECOLUMNINDEX_OUT_OF_BOUND_D_D, + timeColumnIndex, + expressions.size())); } Expression timeExpression = expressions.get(timeColumnIndex); @@ -1039,8 +1041,9 @@ private InsertRowStatement toInsertRowStatement( if (nonTimeColCnt != nonTimeColumnNames.length) { throw new SemanticException( String.format( - "Inconsistent numbers of non-time column names and values: %d-%d", - nonTimeColumnNames.length, nonTimeColCnt)); + DataNodeQueryMessages.INCONSISTENT_NUMBERS_OF_NON_TIME_COLUMN_NAMES_AND_VALUES_D_D, + nonTimeColumnNames.length, + nonTimeColCnt)); } TimestampPrecisionUtils.checkTimestampPrecision(timestamp); @@ -1759,8 +1762,9 @@ public Node visitSetConfigurationStatement( if (!propertyValue.getExpressionType().equals(TableExpressionType.STRING_LITERAL)) { throw new SemanticException( propertyValue.getExpressionType() - + " is not supported for property value of 'set configuration'. " - + "Note that the syntax for 'set configuration' in the tree model is not exactly the same as that in the table model."); + + DataNodeQueryMessages.IS_NOT_SUPPORTED_FOR_PROPERTY_VALUE_OF_SET_CONFIGURATION + + DataNodeQueryMessages + .NOTE_THAT_THE_SYNTAX_FOR_SET_CONFIGURATION_IN_THE_TREE_MODEL_IS_NOT_EXACTLY_THE_SAME_AS); } String value = ((StringLiteral) propertyValue).getValue(); configItems.put(key.trim(), value.trim()); @@ -1971,11 +1975,11 @@ private Set parseSystemPrivilege(RelationalSqlParser.SystemPrivil PrivilegeType privilegeType = PrivilegeType.valueOf(privilege.getText().toUpperCase()); if (privilegeType.isDeprecated()) { throw new SemanticException( - "Privilege type " + DataNodeQueryMessages.PRIVILEGE_TYPE + privilege.getText().toUpperCase() - + " is deprecated, use " + + DataNodeQueryMessages.IS_DEPRECATED_USE + privilegeType.getReplacedPrivilegeType() - + " to instead it"); + + DataNodeQueryMessages.TO_INSTEAD_IT); } privileges.add(privilegeType); } @@ -2009,7 +2013,8 @@ public Node visitGrantStatement(RelationalSqlParser.GrantStatementContext ctx) { if (!CommonDescriptor.getInstance().getConfig().getEnableGrantOption() && ctx.grantOpt() != null) { throw new SemanticException( - "Grant Option is disabled, Please check the parameter enable_grant_option."); + DataNodeQueryMessages + .GRANT_OPTION_IS_DISABLED_PLEASE_CHECK_THE_PARAMETER_ENABLE_GRANT_OPTION); } boolean grantOption = ctx.grantOpt() != null; boolean toTable; @@ -2239,8 +2244,9 @@ private void addCopyToOption( .collect(Collectors.joining(", ")); throw new SemanticException( String.format( - "Unsupported COPY TO format '%s'. Supported formats: %s", - formatIdentifier.getValue(), supportedFormats)); + DataNodeQueryMessages.UNSUPPORTED_COPY_TO_FORMAT_S_SUPPORTED_FORMATS_S, + formatIdentifier.getValue(), + supportedFormats)); } } else if (context.TABLE() != null) { Identifier targetTableIdentifier = (Identifier) visit(context.identifier()); @@ -2374,7 +2380,8 @@ public Node visitPreviousFill(RelationalSqlParser.PreviousFillContext ctx) { if (timeBound.monthDuration != 0 && timeBound.nonMonthDuration != 0) { throw new SemanticException( - "Simultaneous setting of monthly and non-monthly intervals is not supported."); + DataNodeQueryMessages + .SIMULTANEOUS_SETTING_OF_MONTHLY_AND_NON_MONTHLY_INTERVALS_IS_NOT_SUPPORTED); } } @@ -2394,7 +2401,8 @@ public Node visitPreviousFill(RelationalSqlParser.PreviousFillContext ctx) { if (timeColumn != null && (timeBound == null && fillGroupingElements == null)) { throw new SemanticException( - "Don't need to specify TIME_COLUMN while either TIME_BOUND or FILL_GROUP parameter is not specified"); + DataNodeQueryMessages + .DON_T_NEED_TO_SPECIFY_TIME_COLUMN_WHILE_EITHER_TIME_BOUND_OR_FILL_GROUP_PARAMETER_IS_NOT); } return new Fill(getLocation(ctx), timeBound, timeColumn, fillGroupingElements); } @@ -2411,7 +2419,8 @@ public Node visitNextFill(RelationalSqlParser.NextFillContext ctx) { if (timeBound.monthDuration != 0 && timeBound.nonMonthDuration != 0) { throw new SemanticException( - "Simultaneous setting of monthly and non-monthly intervals is not supported."); + DataNodeQueryMessages + .SIMULTANEOUS_SETTING_OF_MONTHLY_AND_NON_MONTHLY_INTERVALS_IS_NOT_SUPPORTED); } } @@ -2431,7 +2440,8 @@ public Node visitNextFill(RelationalSqlParser.NextFillContext ctx) { if (timeColumn != null && (timeBound == null && fillGroupingElements == null)) { throw new SemanticException( - "Don't need to specify TIME_COLUMN while either TIME_BOUND or FILL_GROUP parameter is not specified"); + DataNodeQueryMessages + .DON_T_NEED_TO_SPECIFY_TIME_COLUMN_WHILE_EITHER_TIME_BOUND_OR_FILL_GROUP_PARAMETER_IS_NOT); } return new Fill(getLocation(ctx), FillPolicy.NEXT, timeBound, timeColumn, fillGroupingElements); } @@ -2804,7 +2814,7 @@ public Node visitJoinRelation(RelationalSqlParser.JoinRelationContext ctx) { if (timeDuration.monthDuration != 0) { throw new SemanticException( - "Month or year interval in tolerance is not supported now."); + DataNodeQueryMessages.MONTH_OR_YEAR_INTERVAL_IN_TOLERANCE_IS_NOT_SUPPORTED_NOW); } } criteria = @@ -2834,7 +2844,7 @@ public Node visitJoinRelation(RelationalSqlParser.JoinRelationContext ctx) { if (criteria instanceof AsofJoinOn) { if (joinType == Join.Type.RIGHT || joinType == Join.Type.FULL) { throw new SemanticException( - String.format("ASOF JOIN does not support %s type now", joinType)); + String.format(DataNodeQueryMessages.ASOF_JOIN_DOES_NOT_SUPPORT_S_TYPE_NOW, joinType)); } if (joinType != Join.Type.INNER && timeDuration != null) { @@ -3353,7 +3363,9 @@ public Node visitUnboundedFrame(RelationalSqlParser.UnboundedFrameContext ctx) { return new FrameBound(getLocation(ctx), FrameBound.Type.UNBOUNDED_FOLLOWING); default: throw new IllegalArgumentException( - "Unsupported unbounded type: " + ctx.boundType.getText()); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_UNBOUNDED_TYPE_S_2D943211, + ctx.boundType.getText())); } } @@ -3639,22 +3651,26 @@ public Node visitFunctionCall(RelationalSqlParser.FunctionCallContext ctx) { || arguments.get(1) instanceof LongLiteral || arguments.get(1) instanceof StringLiteral)) { throw new SemanticException( - "The second argument of 'approx_count_distinct' function must be a literal"); + DataNodeQueryMessages + .THE_SECOND_ARGUMENT_OF_APPROX_COUNT_DISTINCT_FUNCTION_MUST_BE_A_LITERAL); } } else if (name.toString().equalsIgnoreCase(APPROX_MOST_FREQUENT)) { if (arguments.size() == 3 && (!(arguments.get(1) instanceof LongLiteral) || !(arguments.get(2) instanceof LongLiteral))) { throw new SemanticException( - "The second and third argument of 'approx_most_frequent' function must be positive integer literal"); + DataNodeQueryMessages + .THE_SECOND_AND_THIRD_ARGUMENT_OF_APPROX_MOST_FREQUENT_FUNCTION_MUST_BE_POSITIVE_INTEGER); } } else if (name.toString().equalsIgnoreCase(APPROX_PERCENTILE)) { if (arguments.size() == 2 && !(arguments.get(1) instanceof DoubleLiteral)) { throw new SemanticException( - "The second argument of 'approx_percentile' function percentage must be a double literal"); + DataNodeQueryMessages + .THE_SECOND_ARGUMENT_OF_APPROX_PERCENTILE_FUNCTION_PERCENTAGE_MUST_BE_A_DOUBLE_LITERAL); } else if (arguments.size() == 3 && !(arguments.get(2) instanceof DoubleLiteral)) { throw new SemanticException( - "The third argument of 'approx_percentile' function percentage must be a double literal"); + DataNodeQueryMessages + .THE_THIRD_ARGUMENT_OF_APPROX_PERCENTILE_FUNCTION_PERCENTAGE_MUST_BE_A_DOUBLE_LITERAL); } } @@ -3668,7 +3684,8 @@ public Node visitDateBinGapFill(RelationalSqlParser.DateBinGapFillContext ctx) { if (timeDuration.monthDuration != 0 && timeDuration.nonMonthDuration != 0) { throw new SemanticException( - "Simultaneous setting of monthly and non-monthly intervals is not supported."); + DataNodeQueryMessages + .SIMULTANEOUS_SETTING_OF_MONTHLY_AND_NON_MONTHLY_INTERVALS_IS_NOT_SUPPORTED); } LongLiteral monthDuration = @@ -3702,7 +3719,8 @@ public Node visitDateBin(RelationalSqlParser.DateBinContext ctx) { if (timeDuration.monthDuration != 0 && timeDuration.nonMonthDuration != 0) { throw new SemanticException( - "Simultaneous setting of monthly and non-monthly intervals is not supported."); + DataNodeQueryMessages + .SIMULTANEOUS_SETTING_OF_MONTHLY_AND_NON_MONTHLY_INTERVALS_IS_NOT_SUPPORTED); } LongLiteral monthDuration = @@ -3734,7 +3752,9 @@ private long parseTimeValue(RelationalSqlParser.TimeValueContext ctx, long curre return parseLong(ctx.INTEGER_VALUE().getText()); } catch (NumberFormatException e) { throw new SemanticException( - String.format("Can not parse %s to long value", ctx.INTEGER_VALUE().getText())); + String.format( + DataNodeQueryMessages.CAN_NOT_PARSE_S_TO_LONG_VALUE, + ctx.INTEGER_VALUE().getText())); } } else { return parseDateExpression(ctx.dateExpression(), currentTime); @@ -4245,7 +4265,9 @@ private static TsTableColumnCategory getColumnCategory(final Token category) { return FIELD; default: throw new UnsupportedOperationException( - "Unsupported ColumnCategory: " + category.getText()); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_COLUMNCATEGORY_S_1260CFFD, + category.getText())); } } @@ -4355,17 +4377,18 @@ private static void check(boolean condition, String message, ParserRuleContext c } private NodeLocation getLocation(TerminalNode terminalNode) { - requireNonNull(terminalNode, "terminalNode is null"); + requireNonNull(terminalNode, DataNodeQueryMessages.EXCEPTION_TERMINALNODE_IS_NULL_578F27FD); return getLocation(terminalNode.getSymbol()); } private NodeLocation getLocation(ParserRuleContext parserRuleContext) { - requireNonNull(parserRuleContext, "parserRuleContext is null"); + requireNonNull( + parserRuleContext, DataNodeQueryMessages.EXCEPTION_PARSERRULECONTEXT_IS_NULL_9E0DD3B5); return getLocation(parserRuleContext.getStart()); } private NodeLocation getLocation(Token token) { - requireNonNull(token, "token is null"); + requireNonNull(token, DataNodeQueryMessages.EXCEPTION_TOKEN_IS_NULL_43094C56); return baseLocation != null ? new NodeLocation( token.getLine() + baseLocation.getLineNumber() - 1, diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/parser/ErrorHandler.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/parser/ErrorHandler.java index f94eb0a2f9924..a8e4707d4971f 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/parser/ErrorHandler.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/parser/ErrorHandler.java @@ -98,7 +98,8 @@ public void syntaxError( parser.getTokenStream().get(result.getErrorTokenIndex()).getText(), expected); } catch (Exception exception) { LOGGER.warn( - "Unexpected failure when handling parsing error. This is likely a bug in the implementation", + DataNodeQueryMessages + .UNEXPECTED_FAILURE_WHEN_HANDLING_PARSING_ERROR_THIS_IS_LIKELY_A_BUG_IN_THE, exception); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/parser/SqlParser.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/parser/SqlParser.java index 91ed122b15005..3f741e635e453 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/parser/SqlParser.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/parser/SqlParser.java @@ -100,7 +100,8 @@ public SqlParser() { } public SqlParser(BiConsumer initializer) { - this.initializer = requireNonNull(initializer, "initializer is null"); + this.initializer = + requireNonNull(initializer, DataNodeQueryMessages.EXCEPTION_INITIALIZER_IS_NULL_2EEC3764); } public Statement createStatement(String sql, ZoneId zoneId, IClientSession clientSession) { @@ -227,7 +228,8 @@ public void exitQuotedIdentifier(RelationalSqlParser.QuotedIdentifierContext con Token token = context.QUOTED_IDENTIFIER().getSymbol(); if (token.getText().length() == 2) { // empty identifier throw new ParsingException( - "Zero-length delimited identifier not allowed", + DataNodeQueryMessages + .QUERY_EXCEPTION_ZERO_LENGTH_DELIMITED_IDENTIFIER_NOT_ALLOWED_00C9ADEC, null, token.getLine(), token.getCharPositionInLine() + 1); @@ -238,7 +240,8 @@ public void exitQuotedIdentifier(RelationalSqlParser.QuotedIdentifierContext con public void exitBackQuotedIdentifier(RelationalSqlParser.BackQuotedIdentifierContext context) { Token token = context.BACKQUOTED_IDENTIFIER().getSymbol(); throw new ParsingException( - "backquoted identifiers are not supported; use double quotes to quote identifiers", + DataNodeQueryMessages + .QUERY_EXCEPTION_BACKQUOTED_IDENTIFIERS_ARE_NOT_SUPPORTED_USE_DOUBLE_QUOTES_78BC7EE3, null, token.getLine(), token.getCharPositionInLine() + 1); @@ -263,7 +266,8 @@ public void exitNonReserved(RelationalSqlParser.NonReservedContext context) { if (!(context.getChild(0) instanceof TerminalNode)) { int rule = ((ParserRuleContext) context.getChild(0)).getRuleIndex(); throw new AssertionError( - "nonReserved can only contain tokens. Found nested rule: " + ruleNames.get(rule)); + DataNodeQueryMessages.NON_RESERVED_CAN_ONLY_CONTAIN_TOKENS_FOUND_NESTED_RULE + + ruleNames.get(rule)); } // replace nonReserved words with IDENT tokens diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/rewrite/StatementRewrite.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/rewrite/StatementRewrite.java index f5785879b1116..8bbad5dafe5fc 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/rewrite/StatementRewrite.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/rewrite/StatementRewrite.java @@ -24,6 +24,7 @@ import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Expression; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Parameter; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Statement; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.execution.warnings.WarningCollector; import org.apache.iotdb.db.queryengine.plan.relational.analyzer.StatementAnalyzerFactory; @@ -39,7 +40,9 @@ public final class StatementRewrite { private final Set rewrites; public StatementRewrite(Set rewrites) { - this.rewrites = ImmutableSet.copyOf(requireNonNull(rewrites, "rewrites is null")); + this.rewrites = + ImmutableSet.copyOf( + requireNonNull(rewrites, DataNodeQueryMessages.EXCEPTION_REWRITES_IS_NULL_4E5AD77A)); } public Statement rewrite( @@ -54,7 +57,7 @@ public Statement rewrite( requireNonNull( rewrite.rewrite( analyzerFactory, session, node, parameters, parameterLookup, warningCollector), - "Statement rewrite returned null"); + DataNodeQueryMessages.EXCEPTION_STATEMENT_REWRITE_RETURNED_NULL_AB1E89EA); } return node; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/util/AstUtil.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/util/AstUtil.java index 986501a197614..92d4a7032e128 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/util/AstUtil.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/util/AstUtil.java @@ -49,7 +49,8 @@ public final class AstUtil { public static Stream preOrder(Node node) { return stream( Traverser.forTree((SuccessorsFunction) Node::getChildren) - .depthFirstPreOrder(requireNonNull(node, "node is null"))); + .depthFirstPreOrder( + requireNonNull(node, DataNodeQueryMessages.EXCEPTION_NODE_IS_NULL_C1479F4A))); } /** @@ -112,7 +113,9 @@ public static Object expressionToTsValue(Expression expression) { } if (expression instanceof Identifier) { throw new SemanticException( - String.format("Cannot insert identifier %s, please use string literal", expression)); + String.format( + DataNodeQueryMessages.CANNOT_INSERT_IDENTIFIER_S_PLEASE_USE_STRING_LITERAL, + expression)); } throw new SemanticException(DataNodeQueryMessages.UNSUPPORTED_EXPRESSION + expression); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/type/TypeCoercion.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/type/TypeCoercion.java index b838bed9555f1..36a40e3101d38 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/type/TypeCoercion.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/type/TypeCoercion.java @@ -20,6 +20,7 @@ package org.apache.iotdb.db.queryengine.plan.relational.type; import org.apache.iotdb.commons.queryengine.plan.relational.type.TypeSignature; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.tsfile.read.common.type.Type; @@ -31,6 +32,7 @@ public class TypeCoercion { private final Function lookupType; public TypeCoercion(Function lookupType) { - this.lookupType = requireNonNull(lookupType, "lookupType is null"); + this.lookupType = + requireNonNull(lookupType, DataNodeQueryMessages.EXCEPTION_LOOKUPTYPE_IS_NULL_190054FA); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/utils/MoreLists.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/utils/MoreLists.java index aec9c7e4a6230..cd589d1ac27d1 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/utils/MoreLists.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/utils/MoreLists.java @@ -19,6 +19,8 @@ package org.apache.iotdb.db.queryengine.plan.relational.utils; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; + import com.google.common.collect.ImmutableList; import java.util.List; @@ -38,20 +40,21 @@ public static List> listOfListsCopy(List> lists) { } public static List filteredCopy(Iterable elements, Predicate predicate) { - requireNonNull(elements, "elements is null"); - requireNonNull(predicate, "predicate is null"); + requireNonNull(elements, DataNodeQueryMessages.EXCEPTION_ELEMENTS_IS_NULL_3451C1DA); + requireNonNull(predicate, DataNodeQueryMessages.EXCEPTION_PREDICATE_IS_NULL_22E687A9); return stream(elements).filter(predicate).collect(toImmutableList()); } public static List mappedCopy(Iterable elements, Function mapper) { - requireNonNull(elements, "elements is null"); - requireNonNull(mapper, "mapper is null"); + requireNonNull(elements, DataNodeQueryMessages.EXCEPTION_ELEMENTS_IS_NULL_3451C1DA); + requireNonNull(mapper, DataNodeQueryMessages.EXCEPTION_MAPPER_IS_NULL_1D7789D1); return stream(elements).map(mapper).collect(toImmutableList()); } public static List nElements(int n, IntFunction function) { - checkArgument(n >= 0, "n must be greater than or equal to zero"); - requireNonNull(function, "function is null"); + checkArgument( + n >= 0, DataNodeQueryMessages.EXCEPTION_N_MUST_BE_GREATER_THAN_OR_EQUAL_TO_ZERO_C4CE8BF0); + requireNonNull(function, DataNodeQueryMessages.EXCEPTION_FUNCTION_IS_NULL_E0FA4B62); return IntStream.range(0, n).mapToObj(function).collect(toImmutableList()); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/scheduler/AsyncPlanNodeSender.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/scheduler/AsyncPlanNodeSender.java index 1bab463050eb2..da5a2dfc889b1 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/scheduler/AsyncPlanNodeSender.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/scheduler/AsyncPlanNodeSender.java @@ -23,6 +23,7 @@ import org.apache.iotdb.common.rpc.thrift.TSStatus; import org.apache.iotdb.commons.client.IClientManager; import org.apache.iotdb.commons.client.async.AsyncDataNodeInternalServiceClient; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.planner.plan.FragmentInstance; import org.apache.iotdb.mpp.rpc.thrift.TPlanNode; import org.apache.iotdb.mpp.rpc.thrift.TSendBatchPlanNodeReq; @@ -119,7 +120,7 @@ public List getFailedInstancesWithStatuses() { if (!entry.getValue().accepted) { if (status == null) { LOGGER.warn( - "dispatch write failed. message: {}, node {}", + DataNodeQueryMessages.DISPATCH_WRITE_FAILED_MESSAGE_ARG_NODE_ARG, entry.getValue().message, instances.get(entry.getKey()).getHostDataNode().getInternalEndPoint()); failureFragmentInstanceWithStatusList.add( @@ -130,7 +131,8 @@ public List getFailedInstancesWithStatuses() { } else { if (status.code != TSStatusCode.OUT_OF_TTL.getStatusCode()) { LOGGER.warn( - "dispatch write failed. status: {}, code: {}, message: {}, node {}", + DataNodeQueryMessages + .DISPATCH_WRITE_FAILED_STATUS_ARG_CODE_ARG_MESSAGE_ARG_NODE_ARG_2, entry.getValue().status, TSStatusCode.representOf(status.code), entry.getValue().message, diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/scheduler/ClusterScheduler.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/scheduler/ClusterScheduler.java index 9eedde8ca7414..5e0aa02f5c0c6 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/scheduler/ClusterScheduler.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/scheduler/ClusterScheduler.java @@ -24,6 +24,7 @@ import org.apache.iotdb.commons.client.IClientManager; import org.apache.iotdb.commons.client.async.AsyncDataNodeInternalServiceClient; import org.apache.iotdb.commons.client.sync.SyncDataNodeInternalServiceClient; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.common.MPPQueryContext; import org.apache.iotdb.db.queryengine.execution.QueryStateMachine; import org.apache.iotdb.db.queryengine.execution.fragment.FragmentInfo; @@ -150,7 +151,7 @@ public void start() { stateMachine.transitionToRunning(); this.stateTracker.start(); - logger.debug("state tracker starts"); + logger.debug(DataNodeQueryMessages.STATE_TRACKER_STARTS); } @Override diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/scheduler/FixedRateFragInsStateTracker.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/scheduler/FixedRateFragInsStateTracker.java index 0c7ffe3ec642a..c0796aae9e685 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/scheduler/FixedRateFragInsStateTracker.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/scheduler/FixedRateFragInsStateTracker.java @@ -159,7 +159,7 @@ private void fetchStateAndUpdate() { FragmentInstanceInfo instanceInfo = new FragmentInstanceInfo(NO_SUCH_INSTANCE); instanceInfo.setMessage( String.format( - "Failed to fetch state, has retried %s times", + DataNodeQueryMessages.MESSAGE_FAILED_FETCH_STATE_HAS_RETRIED_ARG_TIMES_E7572C66, InstanceStateMetrics.MAX_STATE_FETCH_RETRY_COUNT)); updateQueryState(instance.getId(), instanceInfo); } else { @@ -178,8 +178,10 @@ private void updateQueryState(FragmentInstanceId instanceId, FragmentInstanceInf stateMachine.transitionToFailed( new IoTDBException( String.format( - "FragmentInstance[%s] is failed. %s, may be caused by DN restarting.", - instanceId, instanceInfo.getMessage()), + DataNodeQueryMessages + .QUERY_EXCEPTION_FRAGMENTINSTANCE_S_IS_FAILED_S_MAY_BE_CAUSED_BY_DN_RESTARTING_45D7D52A, + instanceId, + instanceInfo.getMessage()), TSStatusCode.CANNOT_FETCH_FI_STATE.getStatusCode(), true)); } else if (instanceInfo.getState().isFailed()) { @@ -193,7 +195,9 @@ private void updateQueryState(FragmentInstanceId instanceId, FragmentInstanceInf stateMachine.transitionToFailed( new RuntimeException( String.format( - "FragmentInstance[%s] is failed. %s", instanceId, instanceInfo.getMessage()))); + DataNodeQueryMessages.QUERY_EXCEPTION_FRAGMENTINSTANCE_S_IS_FAILED_S_566B0005, + instanceId, + instanceInfo.getMessage()))); } else { stateMachine.transitionToFailed(instanceInfo.getFailureInfoList().get(0).toException()); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/scheduler/FragmentInstanceDispatcherImpl.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/scheduler/FragmentInstanceDispatcherImpl.java index 4b3165a9ed588..df719a724fe4b 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/scheduler/FragmentInstanceDispatcherImpl.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/scheduler/FragmentInstanceDispatcherImpl.java @@ -531,7 +531,8 @@ private void dispatchRemoteHelper(final FragmentInstance instance, final TEndPoi if (sendPlanNodeResp.getStatus().getCode() != TSStatusCode.SYSTEM_READ_ONLY.getStatusCode()) { LOGGER.warn( - "Dispatch write failed. status: {}, code: {}, message: {}, node {}", + DataNodeQueryMessages + .DISPATCH_WRITE_FAILED_STATUS_ARG_CODE_ARG_MESSAGE_ARG_NODE_ARG, sendPlanNodeResp.status, TSStatusCode.representOf(sendPlanNodeResp.status.code), sendPlanNodeResp.message, @@ -551,7 +552,7 @@ private void dispatchRemoteHelper(final FragmentInstance instance, final TEndPoi throw new FragmentInstanceDispatchException( RpcUtils.getStatus( TSStatusCode.EXECUTE_STATEMENT_ERROR, - String.format("unknown read type [%s]", instance.getType()))); + String.format(DataNodeQueryMessages.UNKNOWN_READ_TYPE_FMT, instance.getType()))); } } catch (TException e) { Throwable rootCause = ExceptionUtils.getRootCause(e); @@ -568,7 +569,7 @@ private void dispatchRemoteHelper(final FragmentInstance instance, final TEndPoi private void dispatchRemoteFailed(TEndPoint endPoint, Exception e) throws FragmentInstanceDispatchException { LOGGER.warn( - "can't execute request on node {} in second try, error msg is {}.", + DataNodeQueryMessages.CAN_T_EXECUTE_REQUEST_ON_NODE_ARG_IN_SECOND_TRY_ERROR_MSG_IS_ARG, endPoint, ExceptionUtils.getRootCause(e).toString()); TSStatus status = new TSStatus(); @@ -587,7 +588,8 @@ private void dispatchRemote(FragmentInstance instance, TEndPoint endPoint) dispatchRemoteHelper(instance, endPoint); } catch (ClientManagerException | TException | RatisReadUnavailableException e) { LOGGER.warn( - "can't execute request on node {}, error msg is {}, and we try to reconnect this node.", + DataNodeQueryMessages + .CAN_T_EXECUTE_REQUEST_ON_NODE_ARG_ERROR_MSG_IS_ARG_AND_WE_TRY_TO_RECONNECT_THIS_NODE, endPoint, ExceptionUtils.getRootCause(e).toString()); // If the query has already timed out, do not retry. Re-dispatching the same FragmentInstance @@ -632,7 +634,9 @@ private void dispatchLocally(final FragmentInstance instance) throw new FragmentInstanceDispatchException( RpcUtils.getStatus( TSStatusCode.EXECUTE_STATEMENT_ERROR, - "Deserialize ConsensusGroupId failed: " + t.getMessage())); + String.format( + DataNodeQueryMessages.DESERIALIZE_CONSENSUSGROUPID_FAILED_WITH_REASON_FMT, + t.getMessage()))); } } @@ -685,7 +689,7 @@ private void dispatchLocally(final FragmentInstance instance) if (writeResult.getStatus().getCode() != TSStatusCode.SYSTEM_READ_ONLY.getStatusCode()) { LOGGER.warn( - "write locally failed. TSStatus: {}, message: {}", + DataNodeQueryMessages.WRITE_LOCALLY_FAILED_TSSTATUS_ARG_MESSAGE_ARG, writeResult.getStatus(), writeResult.getMessage()); } @@ -703,7 +707,7 @@ private void dispatchLocally(final FragmentInstance instance) throw new FragmentInstanceDispatchException( RpcUtils.getStatus( TSStatusCode.EXECUTE_STATEMENT_ERROR, - String.format("unknown read type [%s]", instance.getType()))); + String.format(DataNodeQueryMessages.UNKNOWN_READ_TYPE_FMT, instance.getType()))); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/scheduler/load/LoadTsFileDispatcherImpl.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/scheduler/load/LoadTsFileDispatcherImpl.java index bd5356ccff49b..9ff496521cb13 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/scheduler/load/LoadTsFileDispatcherImpl.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/scheduler/load/LoadTsFileDispatcherImpl.java @@ -258,11 +258,15 @@ public Future dispatchCommand( } } catch (FragmentInstanceDispatchException e) { LOGGER.warn( - "Cannot dispatch LoadCommand for load operation {}", duplicatedLoadCommandReq, e); + DataNodeQueryMessages.CANNOT_DISPATCH_LOADCOMMAND_FOR_LOAD_OPERATION_ARG, + duplicatedLoadCommandReq, + e); return immediateFuture(new FragInstanceDispatchResult(e.getFailureStatus())); } catch (Exception t) { LOGGER.warn( - "Cannot dispatch LoadCommand for load operation {}", duplicatedLoadCommandReq, t); + DataNodeQueryMessages.CANNOT_DISPATCH_LOADCOMMAND_FOR_LOAD_OPERATION_ARG, + duplicatedLoadCommandReq, + t); return immediateFuture( new FragInstanceDispatchResult( RpcUtils.getStatus( @@ -349,7 +353,8 @@ private static void adjustTimeoutIfNecessary(Throwable e) { if (newConnectionTimeout != CONNECTION_TIMEOUT_MS.get()) { CONNECTION_TIMEOUT_MS.set(newConnectionTimeout); LOGGER.info( - "Load remote procedure call connection timeout is adjusted to {} ms ({} mins)", + DataNodeQueryMessages + .LOAD_REMOTE_PROCEDURE_CALL_CONNECTION_TIMEOUT_IS_ADJUSTED_TO_ARG_MS_ARG_MINS, newConnectionTimeout, newConnectionTimeout / 60000.0); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/scheduler/load/LoadTsFileScheduler.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/scheduler/load/LoadTsFileScheduler.java index 6ca3164a3e12d..40a0d4fd43bfc 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/scheduler/load/LoadTsFileScheduler.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/scheduler/load/LoadTsFileScheduler.java @@ -189,7 +189,10 @@ public void start() { synchronized (LOADING_FILE_SET) { if (LOADING_FILE_SET.contains(filePath)) { throw new LoadFileException( - String.format("TsFile %s is loading by another scheduler.", filePath)); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_TSFILE_S_IS_LOADING_BY_ANOTHER_SCHEDULER_55077B82, + filePath)); } LOADING_FILE_SET.add(filePath); } @@ -244,7 +247,8 @@ public void start() { if (RegionMigrateService.getInstance().getLastNotifyMigratingTime() > startTimeMs || RegionMigrateService.getInstance().mayHaveMigratingRegions()) { LOGGER.warn( - "LoadTsFileScheduler: Region migration was detected during loading TsFile {}, will convert to insertion to avoid data loss", + DataNodeQueryMessages + .LOADTSFILESCHEDULER_REGION_MIGRATION_WAS_DETECTED_DURING_LOADING_TSFILE_ARG_WILL_CONVERT, filePath); isLoadSingleTsFileSuccess = false; } @@ -252,7 +256,7 @@ public void start() { if (isLoadSingleTsFileSuccess) { node.clean(); LOGGER.info( - "Load TsFile {} Successfully, load process [{}/{}]", + DataNodeQueryMessages.LOAD_TSFILE_ARG_SUCCESSFULLY_LOAD_PROCESS_ARG_ARG, filePath, i + 1, tsFileNodeListSize); @@ -260,7 +264,7 @@ public void start() { isLoadSuccess = false; failedTsFileNodeIndexes.add(i); LOGGER.warn( - "Can not Load TsFile {}, load process [{}/{}]", + DataNodeQueryMessages.CAN_NOT_LOAD_TSFILE_ARG_LOAD_PROCESS_ARG_ARG, filePath, i + 1, tsFileNodeListSize); @@ -299,7 +303,8 @@ public void start() { try { // if failed to load some TsFiles, then try to convert the TsFiles to Tablets LOGGER.info( - "Load TsFile(s) failed, will try to convert to tablets and insert. Failed TsFiles: {}", + DataNodeQueryMessages + .LOAD_TSFILE_S_FAILED_WILL_TRY_TO_CONVERT_TO_TABLETS_AND_INSERT_FAILED_TSFILES_ARG, failedTsFiles); convertFailedTsFilesToTabletsAndRetry(); } finally { @@ -324,13 +329,16 @@ private boolean firstPhase(LoadSingleTsFileNode node) { } catch (IllegalStateException e) { LOGGER.warn( String.format( - "Dispatch TsFileData error when parsing TsFile %s.", + DataNodeQueryMessages.DISPATCH_TSFILEDATA_ERROR_WHEN_PARSING_TSFILE_S, node.getTsFileResource().getTsFile()), e); return false; } catch (Exception e) { LOGGER.warn( - String.format("Parse or send TsFile %s error.", node.getTsFileResource().getTsFile()), e); + String.format( + DataNodeQueryMessages.PARSE_OR_SEND_TSFILE_S_ERROR, + node.getTsFileResource().getTsFile()), + e); return false; } finally { tsFileDataManager.clear(); @@ -361,8 +369,9 @@ private boolean dispatchOnePieceNode( CONFIG.getLoadCleanupTaskExecutionDelayTimeSeconds(), TimeUnit.SECONDS); if (!result.isSuccessful()) { LOGGER.warn( - "Dispatch one piece to ReplicaSet {} error. Result status code {}. " - + "Result status message {}. Dispatch piece node error:%n{}", + DataNodeQueryMessages.DISPATCH_ONE_PIECE_TO_REPLICASET_ARG_ERROR_RESULT_STATUS_CODE_ARG + + DataNodeQueryMessages + .RESULT_STATUS_MESSAGE_ARG_DISPATCH_PIECE_NODE_ERROR_PERCENT_NARG, replicaSet, TSStatusCode.representOf(result.getFailureStatus().getCode()).name(), result.getFailureStatus().getMessage(), @@ -370,14 +379,16 @@ private boolean dispatchOnePieceNode( if (result.getFailureStatus().getSubStatus() != null) { for (TSStatus status : result.getFailureStatus().getSubStatus()) { LOGGER.warn( - "Sub status code {}. Sub status message {}.", + DataNodeQueryMessages.SUB_STATUS_CODE_ARG_SUB_STATUS_MESSAGE_ARG, TSStatusCode.representOf(status.getCode()).toString(), status.getMessage()); } } TSStatus status = result.getFailureStatus(); status.setMessage( - String.format("Load %s piece error in 1st phase. Because ", pieceNode.getTsFile()) + String.format( + DataNodeQueryMessages.MESSAGE_LOAD_ARG_PIECE_ERROR_1ST_PHASE_BECAUSE_F3D9672C, + pieceNode.getTsFile()) + status.getMessage()); return false; } @@ -390,7 +401,10 @@ private boolean dispatchOnePieceNode( } catch (TimeoutException e) { dispatchResultFuture.cancel(true); LOGGER.warn( - String.format("Wait for loading %s time out.", LoadTsFilePieceNode.class.getName()), e); + String.format( + DataNodeQueryMessages.WAIT_FOR_LOADING_S_TIME_OUT, + LoadTsFilePieceNode.class.getName()), + e); return false; } return true; @@ -421,8 +435,11 @@ private boolean secondPhase( } catch (final IOException e) { throw new RuntimeException( String.format( - "Serialize Progress Index error, isFirstPhaseSuccess: %s, uuid: %s, tsFile: %s", - isFirstPhaseSuccess, uuid, tsFile.getAbsolutePath()), + DataNodeQueryMessages + .QUERY_EXCEPTION_SERIALIZE_PROGRESS_INDEX_ERROR_ISFIRSTPHASESUCCESS_S_UUID_690F0419, + isFirstPhaseSuccess, + uuid, + tsFile.getAbsolutePath()), e); } }))); @@ -432,8 +449,9 @@ private boolean secondPhase( FragInstanceDispatchResult result = dispatchResultFuture.get(); if (!result.isSuccessful()) { LOGGER.warn( - "Dispatch load command {} of TsFile {} error to replicaSets {} error. " - + "Result status code {}. Result status message {}.", + DataNodeQueryMessages + .DISPATCH_LOAD_COMMAND_ARG_OF_TSFILE_ARG_ERROR_TO_REPLICASETS_ARG_ERROR + + DataNodeQueryMessages.RESULT_STATUS_CODE_ARG_RESULT_STATUS_MESSAGE_ARG, loadCommandReq, tsFile, allReplicaSets, @@ -442,8 +460,13 @@ private boolean secondPhase( TSStatus status = result.getFailureStatus(); status.setMessage( String.format( - "Load %s error in second phase. Because %s, first phase is %s", - tsFile, status.getMessage(), isFirstPhaseSuccess ? "success" : "failed")); + DataNodeQueryMessages + .MESSAGE_LOAD_ARG_ERROR_SECOND_PHASE_BECAUSE_ARG_FIRST_PHASE_ARG_CBA980FC, + tsFile, + status.getMessage(), + isFirstPhaseSuccess + ? DataNodeQueryMessages.MESSAGE_SUCCESS_260CA9DD + : DataNodeQueryMessages.MESSAGE_FAILED_26934EB3)); return false; } } catch (InterruptedException | ExecutionException e) { @@ -516,8 +539,8 @@ private boolean loadLocally(LoadSingleTsFileNode node) throws IoTDBException { } catch (FragmentInstanceDispatchException e) { LOGGER.warn( String.format( - "Dispatch tsFile %s error to local error. Result status code %s. " - + "Result status message %s.", + DataNodeQueryMessages.DISPATCH_TSFILE_S_ERROR_TO_LOCAL_ERROR_RESULT_STATUS_CODE_S + + DataNodeQueryMessages.RESULT_STATUS_MESSAGE_S, node.getTsFileResource().getTsFile(), TSStatusCode.representOf(e.getFailureStatus().getCode()).name(), e.getFailureStatus().getMessage())); @@ -605,17 +628,18 @@ private void convertFailedTsFilesToTabletsAndRetry() { if (loadTsFileDataTypeConverter.isSuccessful(status)) { iterator.remove(); LOGGER.info( - "Load: Successfully converted TsFile {} into tablets and inserted.", + DataNodeQueryMessages + .LOAD_SUCCESSFULLY_CONVERTED_TSFILE_ARG_INTO_TABLETS_AND_INSERTED, failedNode.getTsFileResource().getTsFilePath()); } else { LOGGER.warn( - "Load: Failed to convert to tablets from TsFile {}. Status: {}", + DataNodeQueryMessages.LOAD_FAILED_TO_CONVERT_TO_TABLETS_FROM_TSFILE_ARG_STATUS_ARG, failedNode.getTsFileResource().getTsFilePath(), status); } } catch (final Exception e) { LOGGER.warn( - "Load: Failed to convert to tablets from TsFile {}. Exception: {}", + DataNodeQueryMessages.LOAD_FAILED_TO_CONVERT_TO_TABLETS_FROM_TSFILE_ARG_EXCEPTION_ARG, failedNode.getTsFileResource().getTsFilePath(), e.getMessage(), e); @@ -715,7 +739,9 @@ private boolean addOrSendTsFileData(TsFileData tsFileData) throws LoadFileExcept return addOrSendDeletionData((DeletionData) tsFileData); default: throw new UnsupportedOperationException( - String.format("Unsupported TsFileDataType %s.", tsFileData.getType())); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_TSFILEDATATYPE_S_374475FA, + tsFileData.getType())); } } @@ -851,7 +877,7 @@ private boolean sendAllTsFileData() throws LoadFileException { && !scheduler.dispatchOnePieceNode( entry.getValue().getRight(), entry.getValue().getLeft())) { LOGGER.warn( - "Dispatch piece node {} of TsFile {} error.", + DataNodeQueryMessages.DISPATCH_PIECE_NODE_ARG_OF_TSFILE_ARG_ERROR, entry.getValue(), singleTsFileNode.getTsFileResource().getTsFile()); isAllSuccess = false; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/component/OrderByComponent.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/component/OrderByComponent.java index 236a939dc9aef..1014e32df1d4b 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/component/OrderByComponent.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/component/OrderByComponent.java @@ -19,6 +19,7 @@ package org.apache.iotdb.db.queryengine.plan.statement.component; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.analyze.ExpressionAnalyzer; import org.apache.iotdb.db.queryengine.plan.expression.Expression; import org.apache.iotdb.db.queryengine.plan.statement.StatementNode; @@ -75,7 +76,9 @@ public void addSortItem(SortItem sortItem) { break; default: throw new IllegalArgumentException( - String.format("Unknown sort key %s", sortItem.getSortKey())); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNKNOWN_SORT_KEY_S_37965711, + sortItem.getSortKey())); } } @@ -112,7 +115,9 @@ public boolean isOrderByTime() { } public Ordering getTimeOrder() { - checkState(timeOrderPriority != -1, "The time order is not specified."); + checkState( + timeOrderPriority != -1, + DataNodeQueryMessages.EXCEPTION_THE_TIME_ORDER_IS_NOT_SPECIFIED_DOT_624A7526); return sortItemList.get(timeOrderPriority).getOrdering(); } @@ -121,7 +126,9 @@ public boolean isOrderByTimeseries() { } public Ordering getTimeseriesOrder() { - checkState(timeseriesOrderPriority != -1, "The timeseries order is not specified."); + checkState( + timeseriesOrderPriority != -1, + DataNodeQueryMessages.EXCEPTION_THE_TIMESERIES_ORDER_IS_NOT_SPECIFIED_DOT_68EE3875); return sortItemList.get(timeseriesOrderPriority).getOrdering(); } @@ -130,7 +137,9 @@ public boolean isOrderByDevice() { } public Ordering getDeviceOrder() { - checkState(deviceOrderPriority != -1, "The device order is not specified."); + checkState( + deviceOrderPriority != -1, + DataNodeQueryMessages.EXCEPTION_THE_DEVICE_ORDER_IS_NOT_SPECIFIED_DOT_D3FB9559); return sortItemList.get(deviceOrderPriority).getOrdering(); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertBaseStatement.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertBaseStatement.java index ddefab4d2d416..4c074c7cc149e 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertBaseStatement.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertBaseStatement.java @@ -266,7 +266,8 @@ public void semanticCheck() { continue; } throw new SemanticException( - "Measurement contains null or empty string: " + Arrays.toString(measurements)); + DataNodeQueryMessages.MEASUREMENT_CONTAINS_NULL_OR_EMPTY_STRING + + Arrays.toString(measurements)); } index++; deduplicatedMeasurements.add(measurement); @@ -646,7 +647,8 @@ public void insertColumn(final int pos, final ColumnSchema columnSchema) { public void swapColumn(int src, int target) { if (src < 0 || src >= measurements.length || target < 0 || target >= measurements.length) { - throw new ArrayIndexOutOfBoundsException(src + "/" + target); + throw new ArrayIndexOutOfBoundsException( + src + DataNodeQueryMessages.EXCEPTION_SLASH_BC35AB27 + target); } if (measurementSchemas != null) { CommonUtils.swapArray(measurementSchemas, src, target); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertMultiTabletsStatement.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertMultiTabletsStatement.java index 0ccd115fb2e9c..63e942312d0b6 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertMultiTabletsStatement.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertMultiTabletsStatement.java @@ -22,6 +22,7 @@ import org.apache.iotdb.commons.conf.CommonDescriptor; import org.apache.iotdb.commons.exception.SemanticException; import org.apache.iotdb.commons.path.PartialPath; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.common.MPPQueryContext; import org.apache.iotdb.db.queryengine.plan.analyze.schema.ISchemaValidation; import org.apache.iotdb.db.queryengine.plan.statement.StatementType; @@ -190,7 +191,8 @@ public Optional getDatabaseName() { && database.isPresent() && !Objects.equals(childDatabaseName.get(), database.get())) { throw new SemanticException( - "Cannot insert into multiple databases within one statement, please split them manually"); + DataNodeQueryMessages + .CANNOT_INSERT_INTO_MULTIPLE_DATABASES_WITHIN_ONE_STATEMENT_PLEASE_SPLIT_THEM_MANUALLY); } database = childDatabaseName; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertRowStatement.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertRowStatement.java index d0ec0b19ee081..51912ab38718e 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertRowStatement.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertRowStatement.java @@ -241,13 +241,17 @@ public void transferType(ZoneId zoneId) throws QueryProcessException { || ((Binary) values[i]).getValues()[0] != 0 && ((Binary) values[i]).getValues()[0] != 1) { throw new IllegalArgumentException( - "data type is not consistent, input " + values[i] + ", registered " + dataTypes[i]); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_DATA_TYPE_IS_NOT_CONSISTENT_INPUT_S_REGISTERED_S_AE9DBDC0, + values[i], + dataTypes[i])); } } } catch (Exception e) { LOGGER.warn( - "data type of {}.{} is not consistent, " - + "registered type {}, inserting timestamp {}, value {}", + DataNodeQueryMessages.DATA_TYPE_OF_ARG_ARG_IS_NOT_CONSISTENT + + DataNodeQueryMessages.REGISTERED_TYPE_ARG_INSERTING_TIMESTAMP_ARG_VALUE_ARG, devicePath, measurements[i], dataTypes[i], @@ -316,8 +320,10 @@ public void semanticCheck() { if (measurements.length != values.length) { throw new SemanticException( String.format( - "the measurementList's size %d is not consistent with the valueList's size %d", - measurements.length, values.length)); + DataNodeQueryMessages + .THE_MEASUREMENTLIST_S_SIZE_D_IS_NOT_CONSISTENT_WITH_THE_VALUELIST_S_SIZE_D, + measurements.length, + values.length)); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertRowsOfOneDeviceStatement.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertRowsOfOneDeviceStatement.java index e4052e505607c..cae40f3c9cd7d 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertRowsOfOneDeviceStatement.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertRowsOfOneDeviceStatement.java @@ -24,6 +24,7 @@ import org.apache.iotdb.commons.exception.SemanticException; import org.apache.iotdb.commons.path.PartialPath; import org.apache.iotdb.commons.utils.TimePartitionUtils; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.common.MPPQueryContext; import org.apache.iotdb.db.queryengine.plan.analyze.schema.ISchemaValidation; import org.apache.iotdb.db.queryengine.plan.statement.StatementType; @@ -210,7 +211,8 @@ public Optional getDatabaseName() { && database.isPresent() && !Objects.equals(childDatabaseName.get(), database.get())) { throw new SemanticException( - "Cannot insert into multiple databases within one statement, please split them manually"); + DataNodeQueryMessages + .CANNOT_INSERT_INTO_MULTIPLE_DATABASES_WITHIN_ONE_STATEMENT_PLEASE_SPLIT_THEM_MANUALLY); } database = childDatabaseName; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertRowsStatement.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertRowsStatement.java index 01f07a6c75403..f6fe91016baf1 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertRowsStatement.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertRowsStatement.java @@ -23,6 +23,7 @@ import org.apache.iotdb.commons.exception.SemanticException; import org.apache.iotdb.commons.path.PartialPath; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Statement; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.common.MPPQueryContext; import org.apache.iotdb.db.queryengine.plan.analyze.schema.ISchemaValidation; import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.InsertRows; @@ -220,7 +221,8 @@ public Optional getDatabaseName() { && database.isPresent() && !Objects.equals(childDatabaseName.get(), database.get())) { throw new SemanticException( - "Cannot insert into multiple databases within one statement, please split them manually"); + DataNodeQueryMessages + .CANNOT_INSERT_INTO_MULTIPLE_DATABASES_WITHIN_ONE_STATEMENT_PLEASE_SPLIT_THEM_MANUALLY); } database = childDatabaseName; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertTabletStatement.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertTabletStatement.java index 8ce0d534a4980..89c08545ca705 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertTabletStatement.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertTabletStatement.java @@ -180,7 +180,10 @@ private Object convertTableColumn(final Object input, final int rowCount, final return result; default: throw new UnSupportedDataTypeException( - String.format("data type %s is not supported when convert data at client", type)); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_DATA_TYPE_S_IS_NOT_SUPPORTED_WHEN_CONVERT_DATA_AT_CLIENT_405429CC, + type)); } } @@ -342,8 +345,10 @@ public void semanticCheck() { if (measurements.length != columns.length) { throw new SemanticException( String.format( - "the measurementList's size %d is not consistent with the columnList's size %d", - measurements.length, columns.length)); + DataNodeQueryMessages + .THE_MEASUREMENTLIST_S_SIZE_D_IS_NOT_CONSISTENT_WITH_THE_COLUMNLIST_S_SIZE_D, + measurements.length, + columns.length)); } } @@ -794,7 +799,8 @@ public Tablet convertToTablet() throws MetadataException { timestamps = Arrays.copyOf(times, rowSize); } else { LOGGER.warn( - "Times array is null or too small. times.length={}, rowSize={}, deviceId={}", + DataNodeQueryMessages + .TIMES_ARRAY_IS_NULL_OR_TOO_SMALL_TIMES_LENGTH_ARG_ROWSIZE_ARG_DEVICEID_ARG, times != null ? times.length : 0, rowSize, deviceIdOrTableName); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/LoadTsFileStatement.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/LoadTsFileStatement.java index 73133611ed283..0d632ef87bf7e 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/LoadTsFileStatement.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/LoadTsFileStatement.java @@ -24,6 +24,7 @@ import org.apache.iotdb.commons.utils.PathUtils; import org.apache.iotdb.db.conf.IoTDBConfig; import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.common.MPPQueryContext; import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.LoadTsFile; import org.apache.iotdb.db.queryengine.plan.statement.Statement; @@ -119,7 +120,8 @@ public static List processTsFile(final File file, final boolean validateSo if (file.listFiles() == null) { throw new FileNotFoundException( String.format( - "Can not find %s on this machine, notice that load can only handle files on this machine.", + DataNodeQueryMessages + .QUERY_EXCEPTION_CAN_NOT_FIND_S_ON_THIS_MACHINE_NOTICE_THAT_LOAD_CAN_ONLY_B7886C0E, file.getPath())); } tsFiles.addAll(findAllTsFile(file, validateSourcePath)); @@ -187,8 +189,10 @@ private static void validateLoadSourcePath(final File file) throws FileNotFoundE throw new FileNotFoundException( String.format( - "Load TsFile source path %s is outside allowed directories %s.", - sourcePath, Arrays.toString(allowedDirs))); + DataNodeQueryMessages + .QUERY_EXCEPTION_LOAD_TSFILE_SOURCE_PATH_S_IS_OUTSIDE_ALLOWED_DIRECTORIES_85A6019F, + sourcePath, + Arrays.toString(allowedDirs))); } private static Path canonicalPath(final File file) throws FileNotFoundException { @@ -197,8 +201,10 @@ private static Path canonicalPath(final File file) throws FileNotFoundException } catch (final IOException e) { throw new FileNotFoundException( String.format( - "Failed to resolve canonical path for Load TsFile source %s: %s", - file.getPath(), e.getMessage())); + DataNodeQueryMessages + .QUERY_EXCEPTION_FAILED_TO_RESOLVE_CANONICAL_PATH_FOR_LOAD_TSFILE_SOURCE_09CC9AC6, + file.getPath(), + e.getMessage())); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/QueryStatement.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/QueryStatement.java index eb4b11886429b..8c199f6c19c42 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/QueryStatement.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/QueryStatement.java @@ -657,7 +657,9 @@ public void semanticCheck() { && expression.getExpressions().get(0) instanceof TimeSeriesOperand && expression.isAggregationFunctionExpression())) { throw new SemanticException( - expression + " can't be used in group by tag. It will be supported in the future."); + expression + + DataNodeQueryMessages + .CAN_T_BE_USED_IN_GROUP_BY_TAG_IT_WILL_BE_SUPPORTED_IN_THE_FUTURE); } } } @@ -674,7 +676,8 @@ public void semanticCheck() { } else { if (isGroupBy() || isGroupByLevel() || isGroupByTag()) { throw new SemanticException( - "Common queries and aggregated queries are not allowed to appear at the same time"); + DataNodeQueryMessages + .COMMON_QUERIES_AND_AGGREGATED_QUERIES_ARE_NOT_ALLOWED_TO_APPEAR_AT_THE_SAME_TIME); } for (Expression expression : getExpressionSortItemList()) { if (hasAggregationFunction(expression)) { @@ -701,7 +704,8 @@ public void semanticCheck() { } if (!isAggregationQuery()) { throw new SemanticException( - "Expression of HAVING clause can not be used in NonAggregationQuery"); + DataNodeQueryMessages + .EXPRESSION_OF_HAVING_CLAUSE_CAN_NOT_BE_USED_IN_NONAGGREGATIONQUERY); } if (havingExpression.toString().toLowerCase().contains(COUNT_TIME) && (!new CountTimeAggregationAmountVisitor().process(havingExpression, null).isEmpty())) { @@ -766,7 +770,7 @@ public void semanticCheck() { } if (isOrderByDevice()) { throw new SemanticException( - "Sorting by device is only supported in ALIGN BY DEVICE queries."); + DataNodeQueryMessages.SORTING_BY_DEVICE_IS_ONLY_SUPPORTED_IN_ALIGN_BY_DEVICE_QUERIES); } if (seriesLimit != 0 || seriesOffset != 0) { throw new SemanticException(DataNodeQueryMessages.SLIMIT_AND_SOFFSET_CAN_NOT_BE_USED_IN); @@ -780,7 +784,7 @@ public void semanticCheck() { } if (isOrderByDevice()) { throw new SemanticException( - "Sorting by device is only supported in ALIGN BY DEVICE queries."); + DataNodeQueryMessages.SORTING_BY_DEVICE_IS_ONLY_SUPPORTED_IN_ALIGN_BY_DEVICE_QUERIES); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/metadata/CreateContinuousQueryStatement.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/metadata/CreateContinuousQueryStatement.java index c198c1c896026..ef7506c8d20b2 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/metadata/CreateContinuousQueryStatement.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/metadata/CreateContinuousQueryStatement.java @@ -174,7 +174,8 @@ public void semanticCheck() { < IoTDBDescriptor.getInstance().getConfig().getContinuousQueryMinimumEveryInterval()) { throw new SemanticException( String.format( - "CQ: Every interval [%d] should not be lower than the `continuous_query_minimum_every_interval` [%d] configured.", + DataNodeQueryMessages + .CQ_EVERY_INTERVAL_D_SHOULD_NOT_BE_LOWER_THAN_THE_CONTINUOUS_QUERY_MINIMUM_EVERY_INTERVAL, everyInterval, IoTDBDescriptor.getInstance().getConfig().getContinuousQueryMinimumEveryInterval())); } @@ -186,11 +187,12 @@ public void semanticCheck() { } if (startTimeOffset <= endTimeOffset) { throw new SemanticException( - "CQ: The start time offset should be greater than end time offset."); + DataNodeQueryMessages.CQ_THE_START_TIME_OFFSET_SHOULD_BE_GREATER_THAN_END_TIME_OFFSET); } if (everyInterval > startTimeOffset) { throw new SemanticException( - "CQ: The start time offset should be greater than or equal to every interval."); + DataNodeQueryMessages + .CQ_THE_START_TIME_OFFSET_SHOULD_BE_GREATER_THAN_OR_EQUAL_TO_EVERY_INTERVAL); } if (!queryBodyStatement.isSelectInto()) { @@ -200,7 +202,7 @@ public void semanticCheck() { if (groupByTimeComponent != null && (groupByTimeComponent.getStartTime() != 0 || groupByTimeComponent.getEndTime() != 0)) { throw new SemanticException( - "CQ: Specifying time range in GROUP BY TIME clause is prohibited."); + DataNodeQueryMessages.CQ_SPECIFYING_TIME_RANGE_IN_GROUP_BY_TIME_CLAUSE_IS_PROHIBITED); } if (queryBodyStatement.getWhereCondition() != null && PredicateUtils.checkIfTimeFilterExist( diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/metadata/view/CreateLogicalViewStatement.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/metadata/view/CreateLogicalViewStatement.java index 04c8eccad1878..153fc41f6bf19 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/metadata/view/CreateLogicalViewStatement.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/metadata/view/CreateLogicalViewStatement.java @@ -23,6 +23,7 @@ import org.apache.iotdb.commons.path.PartialPath; import org.apache.iotdb.commons.schema.view.viewExpression.ViewExpression; import org.apache.iotdb.db.exception.metadata.view.UnsupportedViewException; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.analyze.SelectIntoUtils; import org.apache.iotdb.db.queryengine.plan.expression.Expression; import org.apache.iotdb.db.queryengine.plan.expression.leaf.TimeSeriesOperand; @@ -185,7 +186,8 @@ public void parseIntoItemIfNecessary() { } else { throw new SemanticException( new UnsupportedViewException( - "Cannot create views using data sources with calculated expressions while using into item.")); + DataNodeQueryMessages + .CANNOT_CREATE_VIEWS_USING_DATA_SOURCES_WITH_CALCULATED_EXPRESSIONS_WHILE_USING_INTO_ITEM)); } } this.targetPaths.setFullPathList(targetPathsList); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/sys/SetConfigurationStatement.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/sys/SetConfigurationStatement.java index 23aaa25acb563..23a8faae76a05 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/sys/SetConfigurationStatement.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/sys/SetConfigurationStatement.java @@ -23,6 +23,7 @@ import org.apache.iotdb.commons.conf.ConfigurationFileUtils; import org.apache.iotdb.commons.exception.SemanticException; import org.apache.iotdb.commons.path.PartialPath; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.analyze.QueryType; import org.apache.iotdb.db.queryengine.plan.statement.IConfigStatement; import org.apache.iotdb.db.queryengine.plan.statement.Statement; @@ -103,9 +104,10 @@ public void checkSomeParametersKeepConsistentInCluster() { if (nodeId >= 0 || configItems.size() > 1) { throw new SemanticException( - "The parameters '" + DataNodeQueryMessages.THE_PARAMETERS + specialParam - + "' must be consistent across the entire cluster and only one can be set at a time."); + + DataNodeQueryMessages + .MUST_BE_CONSISTENT_ACROSS_THE_ENTIRE_CLUSTER_AND_ONLY_ONE_CAN_BE_SET_AT_A_TIME); } } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/transformation/dag/input/ConstantInputReader.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/transformation/dag/input/ConstantInputReader.java index 5a8fea61dcc88..55096612ad753 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/transformation/dag/input/ConstantInputReader.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/transformation/dag/input/ConstantInputReader.java @@ -54,7 +54,9 @@ public ConstantInputReader(ConstantOperand expression) throws QueryProcessExcept Object value = CommonUtils.parseValue(expression.getDataType(), expression.getValueString()); if (value == null) { throw new QueryProcessException( - "Invalid constant operand: " + expression.getExpressionString()); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_INVALID_CONSTANT_OPERAND_S_939F3B8D, + expression.getExpressionString())); } // Use RLEColumn to mimic column filled with same values diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/transformation/dag/intermediate/ConstantIntermediateLayer.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/transformation/dag/intermediate/ConstantIntermediateLayer.java index 1d6408de77aa1..b547378fd74da 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/transformation/dag/intermediate/ConstantIntermediateLayer.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/transformation/dag/intermediate/ConstantIntermediateLayer.java @@ -20,6 +20,7 @@ package org.apache.iotdb.db.queryengine.transformation.dag.intermediate; import org.apache.iotdb.calc.exception.QueryProcessException; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.expression.leaf.ConstantOperand; import org.apache.iotdb.db.queryengine.transformation.api.LayerReader; import org.apache.iotdb.db.queryengine.transformation.api.LayerRowWindowReader; @@ -72,6 +73,7 @@ protected LayerRowWindowReader constructRowStateWindowReader( StateWindowAccessStrategy strategy, float memoryBudgetInMB) { // Not allowed since the timestamp of a constant row is not defined. throw new UnsupportedOperationException( - "StateWindowAccessStrategy does not support pure constant input."); + DataNodeQueryMessages + .QUERY_EXCEPTION_STATEWINDOWACCESSSTRATEGY_DOES_NOT_SUPPORT_PURE_CONSTANT_B09D811B); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/transformation/dag/intermediate/IntermediateLayer.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/transformation/dag/intermediate/IntermediateLayer.java index 13c73485ea801..30aa62c42892c 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/transformation/dag/intermediate/IntermediateLayer.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/transformation/dag/intermediate/IntermediateLayer.java @@ -20,6 +20,7 @@ package org.apache.iotdb.db.queryengine.transformation.dag.intermediate; import org.apache.iotdb.calc.exception.QueryProcessException; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.expression.Expression; import org.apache.iotdb.db.queryengine.transformation.api.LayerReader; import org.apache.iotdb.db.queryengine.transformation.api.LayerRowWindowReader; @@ -66,7 +67,9 @@ public final LayerRowWindowReader constructRowWindowReader( (StateWindowAccessStrategy) strategy, memoryBudgetInMB); default: throw new IllegalStateException( - "Unexpected access strategy: " + strategy.getAccessStrategyType()); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNEXPECTED_ACCESS_STRATEGY_S_92EA9D64, + strategy.getAccessStrategyType())); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/transformation/dag/intermediate/MultiInputLayer.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/transformation/dag/intermediate/MultiInputLayer.java index fc0bf8ba1ee0d..6752074484356 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/transformation/dag/intermediate/MultiInputLayer.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/transformation/dag/intermediate/MultiInputLayer.java @@ -22,6 +22,7 @@ import org.apache.iotdb.calc.exception.QueryProcessException; import org.apache.iotdb.calc.transformation.datastructure.iterator.RowListForwardIterator; import org.apache.iotdb.calc.transformation.datastructure.row.ElasticSerializableRowList; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.expression.Expression; import org.apache.iotdb.db.queryengine.transformation.api.LayerReader; import org.apache.iotdb.db.queryengine.transformation.api.LayerRowWindowReader; @@ -272,7 +273,8 @@ public YieldableState yield() throws Exception { int endIndex = beginIndex + windowSize; if (beginIndex < 0 || endIndex < 0) { LOGGER.warn( - "LayerRowWindowReader index overflow. beginIndex: {}, endIndex: {}, windowSize: {}.", + DataNodeQueryMessages + .LAYERROWWINDOWREADER_INDEX_OVERFLOW_BEGININDEX_ARG_ENDINDEX_ARG_WINDOWSIZE_ARG, beginIndex, endIndex, windowSize); @@ -661,6 +663,7 @@ public RowWindow currentWindow() { protected LayerRowWindowReader constructRowStateWindowReader( StateWindowAccessStrategy strategy, float memoryBudgetInMB) { throw new UnsupportedOperationException( - "StateWindowAccessStrategy only support one input series for now."); + DataNodeQueryMessages + .QUERY_EXCEPTION_STATEWINDOWACCESSSTRATEGY_ONLY_SUPPORT_ONE_INPUT_SERIES_6856E52C); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/transformation/dag/intermediate/SingleInputMultiReferenceLayer.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/transformation/dag/intermediate/SingleInputMultiReferenceLayer.java index e272a1b99b946..cdf648faa0486 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/transformation/dag/intermediate/SingleInputMultiReferenceLayer.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/transformation/dag/intermediate/SingleInputMultiReferenceLayer.java @@ -21,6 +21,7 @@ import org.apache.iotdb.calc.transformation.datastructure.iterator.TVListForwardIterator; import org.apache.iotdb.calc.transformation.datastructure.tv.ElasticSerializableTVList; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.expression.Expression; import org.apache.iotdb.db.queryengine.transformation.api.LayerReader; import org.apache.iotdb.db.queryengine.transformation.api.LayerRowWindowReader; @@ -165,7 +166,8 @@ public YieldableState yield() throws Exception { int endIndex = beginIndex + windowSize; if (beginIndex < 0 || endIndex < 0) { LOGGER.warn( - "LayerRowWindowReader index overflow. beginIndex: {}, endIndex: {}, windowSize: {}.", + DataNodeQueryMessages + .LAYERROWWINDOWREADER_INDEX_OVERFLOW_BEGININDEX_ARG_ENDINDEX_ARG_WINDOWSIZE_ARG, beginIndex, endIndex, windowSize); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/transformation/dag/intermediate/SingleInputSingleReferenceLayer.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/transformation/dag/intermediate/SingleInputSingleReferenceLayer.java index 928a2e68b53b1..9b15ad426f329 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/transformation/dag/intermediate/SingleInputSingleReferenceLayer.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/transformation/dag/intermediate/SingleInputSingleReferenceLayer.java @@ -21,6 +21,7 @@ import org.apache.iotdb.calc.transformation.datastructure.iterator.TVListForwardIterator; import org.apache.iotdb.calc.transformation.datastructure.tv.ElasticSerializableTVList; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.plan.expression.Expression; import org.apache.iotdb.db.queryengine.transformation.api.LayerReader; import org.apache.iotdb.db.queryengine.transformation.api.LayerRowWindowReader; @@ -91,7 +92,8 @@ public YieldableState yield() throws Exception { int endIndex = beginIndex + windowSize; if (beginIndex < 0 || endIndex < 0) { LOGGER.warn( - "LayerRowWindowReader index overflow. beginIndex: {}, endIndex: {}, windowSize: {}.", + DataNodeQueryMessages + .LAYERROWWINDOWREADER_INDEX_OVERFLOW_BEGININDEX_ARG_ENDINDEX_ARG_WINDOWSIZE_ARG, beginIndex, endIndex, windowSize); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/transformation/dag/transformer/unary/scalar/CastFunctionTransformer.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/transformation/dag/transformer/unary/scalar/CastFunctionTransformer.java index b7c6b0945e50a..bd8e5b3ca5b0d 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/transformation/dag/transformer/unary/scalar/CastFunctionTransformer.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/transformation/dag/transformer/unary/scalar/CastFunctionTransformer.java @@ -21,6 +21,7 @@ import org.apache.iotdb.calc.exception.QueryProcessException; import org.apache.iotdb.calc.transformation.dag.util.CastFunctionUtils; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.transformation.api.LayerReader; import org.apache.iotdb.db.queryengine.transformation.dag.transformer.unary.UnaryTransformer; @@ -74,7 +75,9 @@ protected Column[] transform(Column[] columns) throws QueryProcessException, IOE case DATE: default: throw new UnsupportedOperationException( - String.format("Unsupported source dataType: %s", layerReaderDataType)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_SOURCE_DATATYPE_S_EA03E121, + layerReaderDataType)); } } @@ -146,7 +149,9 @@ private Column[] castInts(Column[] columns) { case INT32: default: throw new UnsupportedOperationException( - String.format("Unsupported target dataType: %s", layerReaderDataType)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_TARGET_DATATYPE_S_8DEFDAE6, + layerReaderDataType)); } Column valueColumn = builder.build(); @@ -222,7 +227,9 @@ private Column[] castLongs(Column[] columns) { case INT64: default: throw new UnsupportedOperationException( - String.format("Unsupported target dataType: %s", layerReaderDataType)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_TARGET_DATATYPE_S_8DEFDAE6, + layerReaderDataType)); } Column valueColumn = builder.build(); @@ -298,7 +305,9 @@ private Column[] castFloats(Column[] columns) { case FLOAT: default: throw new UnsupportedOperationException( - String.format("Unsupported target dataType: %s", layerReaderDataType)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_TARGET_DATATYPE_S_8DEFDAE6, + layerReaderDataType)); } Column valueColumn = builder.build(); @@ -374,7 +383,9 @@ private Column[] castDoubles(Column[] columns) { case DOUBLE: default: throw new UnsupportedOperationException( - String.format("Unsupported target dataType: %s", layerReaderDataType)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_TARGET_DATATYPE_S_8DEFDAE6, + layerReaderDataType)); } Column valueColumn = builder.build(); @@ -450,7 +461,9 @@ private Column[] castBooleans(Column[] columns) { case BOOLEAN: default: throw new UnsupportedOperationException( - String.format("Unsupported target dataType: %s", layerReaderDataType)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_TARGET_DATATYPE_S_8DEFDAE6, + layerReaderDataType)); } Column valueColumn = builder.build(); @@ -531,7 +544,9 @@ private Column[] castBinaries(Column[] columns) { case TEXT: default: throw new UnsupportedOperationException( - String.format("Unsupported target dataType: %s", layerReaderDataType)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_TARGET_DATATYPE_S_8DEFDAE6, + layerReaderDataType)); } Column valueColumn = builder.build(); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/transformation/dag/transformer/unary/scalar/RoundFunctionTransformer.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/transformation/dag/transformer/unary/scalar/RoundFunctionTransformer.java index 9fb43cd40c513..4d2a41b85bcd5 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/transformation/dag/transformer/unary/scalar/RoundFunctionTransformer.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/transformation/dag/transformer/unary/scalar/RoundFunctionTransformer.java @@ -20,6 +20,7 @@ package org.apache.iotdb.db.queryengine.transformation.dag.transformer.unary.scalar; import org.apache.iotdb.calc.exception.QueryProcessException; +import org.apache.iotdb.db.i18n.DataNodeQueryMessages; import org.apache.iotdb.db.queryengine.transformation.api.LayerReader; import org.apache.iotdb.db.queryengine.transformation.dag.transformer.unary.UnaryTransformer; @@ -70,7 +71,9 @@ protected void transform(Column[] columns, ColumnBuilder builder) case OBJECT: default: throw new UnsupportedOperationException( - String.format("Unsupported source dataType: %s", layerReaderDataType)); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_UNSUPPORTED_SOURCE_DATATYPE_S_EA03E121, + layerReaderDataType)); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/transformation/dag/udf/UDAFInformationInferrer.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/transformation/dag/udf/UDAFInformationInferrer.java index 6e0861a887803..e6f0c3cf9f9ef 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/transformation/dag/udf/UDAFInformationInferrer.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/transformation/dag/udf/UDAFInformationInferrer.java @@ -57,7 +57,9 @@ public TSDataType inferOutputType( } catch (Exception e) { LOGGER.warn(DataNodeQueryMessages.ERROR_OCCURRED_DURING_INFERRING_UDF_DATA_TYPE, e); throw new SemanticException( - String.format("Error occurred during inferring UDF data type: %s", System.lineSeparator()) + String.format( + DataNodeQueryMessages.ERROR_OCCURRED_DURING_INFERRING_UDF_DATA_TYPE_S, + System.lineSeparator()) + e); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/transformation/dag/udf/UDTFInformationInferrer.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/transformation/dag/udf/UDTFInformationInferrer.java index cb91101a2a9c9..281bc2e6e78e7 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/transformation/dag/udf/UDTFInformationInferrer.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/transformation/dag/udf/UDTFInformationInferrer.java @@ -59,7 +59,9 @@ public TSDataType inferOutputType( } catch (Exception e) { LOGGER.warn(DataNodeQueryMessages.ERROR_OCCURRED_DURING_INFERRING_UDF_DATA_TYPE, e); throw new SemanticException( - String.format("Error occurred during inferring UDF data type: %s", System.lineSeparator()) + String.format( + DataNodeQueryMessages.ERROR_OCCURRED_DURING_INFERRING_UDF_DATA_TYPE_S, + System.lineSeparator()) + e); } } @@ -75,7 +77,8 @@ public AccessStrategy getAccessStrategy( LOGGER.warn(DataNodeQueryMessages.ERROR_OCCURRED_DURING_GETTING_UDF_ACCESS_STRATEGY, e); throw new SemanticException( String.format( - "Error occurred during getting UDF access strategy: %s", System.lineSeparator()) + DataNodeQueryMessages.ERROR_OCCURRED_DURING_GETTING_UDF_ACCESS_STRATEGY_S, + System.lineSeparator()) + e); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/transformation/dag/util/TransformUtils.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/transformation/dag/util/TransformUtils.java index b3fa506de0644..0755b1be52b72 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/transformation/dag/util/TransformUtils.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/transformation/dag/util/TransformUtils.java @@ -54,7 +54,9 @@ public static Column transformConstantOperandToColumn(ConstantOperand constantOp CommonUtils.parseValue(constantOperand.getDataType(), constantOperand.getValueString()); if (value == null) { throw new UnsupportedOperationException( - "Invalid constant operand: " + constantOperand.getExpressionString()); + String.format( + DataNodeQueryMessages.QUERY_EXCEPTION_INVALID_CONSTANT_OPERAND_S_939F3B8D, + constantOperand.getExpressionString())); } switch (constantOperand.getDataType()) { @@ -157,7 +159,8 @@ public static boolean splitWindowForStateWindow( case STRING: default: throw new UnsupportedOperationException( - "The data type of the state window strategy is not valid."); + DataNodeQueryMessages + .QUERY_EXCEPTION_THE_DATA_TYPE_OF_THE_STATE_WINDOW_STRATEGY_IS_NOT_VALID_DFFBF210); } return res; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/transformation/dag/util/TypeUtils.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/transformation/dag/util/TypeUtils.java index 96385858ea604..e59e088e1dd35 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/transformation/dag/util/TypeUtils.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/transformation/dag/util/TypeUtils.java @@ -56,7 +56,10 @@ public static ColumnBuilder initColumnBuilder(TSDataType type, int count) { return new BinaryColumnBuilder(null, count); default: throw new UnSupportedDataTypeException( - "Do not support create ColumnBuilder with data type " + type); + String.format( + DataNodeQueryMessages + .QUERY_EXCEPTION_DO_NOT_SUPPORT_CREATE_COLUMNBUILDER_WITH_DATA_TYPE_S_1672578A, + type)); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/impl/mem/MTreeBelowSGMemoryImpl.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/impl/mem/MTreeBelowSGMemoryImpl.java index 44c4c49f27444..c29f4ec7d3941 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/impl/mem/MTreeBelowSGMemoryImpl.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/impl/mem/MTreeBelowSGMemoryImpl.java @@ -426,7 +426,9 @@ public List> createAlignedTimeSeries( devicePath.concatAsMeasurementPath(measurements.get(i))); } else if (!withMerge || measurementNode.getDataType() != dataTypes.get(i)) { throw new MeasurementAlreadyExistException( - devicePath.getFullPath() + "." + measurements.get(i), + devicePath.getFullPath() + + DataNodeSchemaMessages.EXCEPTION_DOT_9D9B854A + + measurements.get(i), node.getAsMeasurementMNode().getMeasurementPath()); } else { existingMeasurementIndexes.add(i); @@ -434,12 +436,17 @@ public List> createAlignedTimeSeries( } } else { throw new PathAlreadyExistException( - devicePath.getFullPath() + "." + measurements.get(i)); + devicePath.getFullPath() + + DataNodeSchemaMessages.EXCEPTION_DOT_9D9B854A + + measurements.get(i)); } } if (aliasList != null && aliasList.get(i) != null && device.hasChild(aliasList.get(i))) { throw new AliasAlreadyExistException( - devicePath.getFullPath() + "." + measurements.get(i), aliasList.get(i)); + devicePath.getFullPath() + + DataNodeSchemaMessages.EXCEPTION_DOT_9D9B854A + + measurements.get(i), + aliasList.get(i)); } } @@ -561,21 +568,28 @@ public Map checkMeasurementExistence( failingMeasurementMap.put( i, new MeasurementAlreadyExistException( - devicePath.getFullPath() + "." + measurementList.get(i), + devicePath.getFullPath() + + DataNodeSchemaMessages.EXCEPTION_DOT_9D9B854A + + measurementList.get(i), node.getAsMeasurementMNode().getMeasurementPath())); } } else { failingMeasurementMap.put( i, new PathAlreadyExistException( - devicePath.getFullPath() + "." + measurementList.get(i))); + devicePath.getFullPath() + + DataNodeSchemaMessages.EXCEPTION_DOT_9D9B854A + + measurementList.get(i))); } } if (aliasList != null && aliasList.get(i) != null && device.hasChild(aliasList.get(i))) { failingMeasurementMap.put( i, new AliasAlreadyExistException( - devicePath.getFullPath() + "." + measurementList.get(i), aliasList.get(i))); + devicePath.getFullPath() + + DataNodeSchemaMessages.EXCEPTION_DOT_9D9B854A + + measurementList.get(i), + aliasList.get(i))); } if (IoTDBDescriptor.getInstance().getConfig().isQuotaEnable()) { if (!DataNodeSpaceQuotaManager.getInstance().checkTimeSeriesNum(databaseMNode.getName())) { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/impl/pbtree/MTreeBelowSGCachedImpl.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/impl/pbtree/MTreeBelowSGCachedImpl.java index a660314df95f6..188620ef6a51e 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/impl/pbtree/MTreeBelowSGCachedImpl.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/impl/pbtree/MTreeBelowSGCachedImpl.java @@ -497,7 +497,9 @@ public List> createAlignedTimeSeries( devicePath.concatAsMeasurementPath(measurements.get(i))); } else if (!withMerge || measurementNode.getDataType() != dataTypes.get(i)) { throw new MeasurementAlreadyExistException( - devicePath.getFullPath() + "." + measurements.get(i), + devicePath.getFullPath() + + DataNodeSchemaMessages.EXCEPTION_DOT_9D9B854A + + measurements.get(i), node.getAsMeasurementMNode().getMeasurementPath()); } else { existingMeasurementIndexes.add(i); @@ -505,7 +507,9 @@ public List> createAlignedTimeSeries( } } else { throw new PathAlreadyExistException( - devicePath.getFullPath() + "." + measurements.get(i)); + devicePath.getFullPath() + + DataNodeSchemaMessages.EXCEPTION_DOT_9D9B854A + + measurements.get(i)); } } @@ -513,7 +517,10 @@ public List> createAlignedTimeSeries( && aliasList.get(i) != null && store.hasChild(device, aliasList.get(i))) { throw new AliasAlreadyExistException( - devicePath.getFullPath() + "." + measurements.get(i), aliasList.get(i)); + devicePath.getFullPath() + + DataNodeSchemaMessages.EXCEPTION_DOT_9D9B854A + + measurements.get(i), + aliasList.get(i)); } } @@ -576,12 +583,11 @@ public boolean changeAlias(String alias, PartialPath fullPath) throws MetadataEx if (cachedMNode != null) { unPinMNode(cachedMNode); throw new MetadataException( - DataNodeSchemaMessages.ALIAS_DUPLICATED - + alias - + ", fullPath: " - + fullPath - + ", otherMeasurement: " - + cachedMNode.getFullPath()); + String.format( + DataNodeSchemaMessages.ALIAS_DUPLICATED_FULLPATH_OTHER_MEASUREMENT_FMT, + alias, + fullPath, + cachedMNode.getFullPath())); } if (measurementMNode.getAlias() != null) { device.deleteAliasChild(measurementMNode.getAlias()); @@ -625,14 +631,18 @@ public Map checkMeasurementExistence( failingMeasurementMap.put( i, new MeasurementAlreadyExistException( - devicePath.getFullPath() + "." + measurementList.get(i), + devicePath.getFullPath() + + DataNodeSchemaMessages.EXCEPTION_DOT_9D9B854A + + measurementList.get(i), node.getAsMeasurementMNode().getMeasurementPath())); } } else { failingMeasurementMap.put( i, new PathAlreadyExistException( - devicePath.getFullPath() + "." + measurementList.get(i))); + devicePath.getFullPath() + + DataNodeSchemaMessages.EXCEPTION_DOT_9D9B854A + + measurementList.get(i))); } } if (aliasList != null @@ -641,7 +651,10 @@ public Map checkMeasurementExistence( failingMeasurementMap.put( i, new AliasAlreadyExistException( - devicePath.getFullPath() + "." + measurementList.get(i), aliasList.get(i))); + devicePath.getFullPath() + + DataNodeSchemaMessages.EXCEPTION_DOT_9D9B854A + + measurementList.get(i), + aliasList.get(i))); } } catch (MetadataException e) { failingMeasurementMap.put(i, e); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/impl/pbtree/flush/PBTreeFlushExecutor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/impl/pbtree/flush/PBTreeFlushExecutor.java index fae8de16d3187..066116790f1ff 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/impl/pbtree/flush/PBTreeFlushExecutor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/impl/pbtree/flush/PBTreeFlushExecutor.java @@ -100,7 +100,11 @@ public void flushVolatileNodes(AtomicLong flushNodeNum, AtomicLong flushMemSize) } if (!exceptions.isEmpty()) { throw new MetadataException( - exceptions.stream().map(Exception::getMessage).reduce("", (a, b) -> a + ", " + b)); + exceptions.stream() + .map(Exception::getMessage) + .reduce( + DataNodeSchemaMessages.EMPTY_MESSAGE, + (a, b) -> a + DataNodeSchemaMessages.EXCEPTION_COMMA_50AD1C01 + b)); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/traverser/Traverser.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/traverser/Traverser.java index cf15771fec0fa..99486fa5475d3 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/traverser/Traverser.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/traverser/Traverser.java @@ -32,6 +32,7 @@ import org.apache.iotdb.commons.schema.node.utils.IMNodeIterator; import org.apache.iotdb.commons.schema.template.Template; import org.apache.iotdb.commons.schema.tree.AbstractTreeVisitor; +import org.apache.iotdb.db.i18n.DataNodeSchemaMessages; import org.apache.iotdb.db.schemaengine.schemaregion.mtree.IMTreeStore; import org.apache.iotdb.db.schemaengine.schemaregion.mtree.impl.mem.mnode.IMemMNode; import org.apache.iotdb.db.schemaengine.schemaregion.mtree.impl.mem.mnode.iterator.MNodeIterator; @@ -109,7 +110,11 @@ protected Traverser( String[] nodes = path.getNodes(); if (nodes.length == 0 || !nodes[0].equals(startNode.getName())) { throw new IllegalPathException( - path.getFullPath(), path.getFullPath() + " doesn't start with " + startNode.getName()); + path.getFullPath(), + String.format( + DataNodeSchemaMessages.PATH_DOES_NOT_START_WITH_FMT, + path.getFullPath(), + startNode.getName())); } this.startNode = startNode; this.nodes = nodes; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/tag/TagManager.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/tag/TagManager.java index 6be09486b4310..bff7fe29421fd 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/tag/TagManager.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/tag/TagManager.java @@ -369,7 +369,10 @@ public void removeFromTagInvertedIndex(IMeasurementMNode node) throws IOExcep if (logger.isDebugEnabled()) { logger.debug( String.format( - String.format(DEBUG_MSG, "Delete" + TAG_FORMAT, node.getFullPath()), + String.format( + DEBUG_MSG, + DataNodeSchemaMessages.TAG_ACTION_DELETE + TAG_FORMAT, + node.getFullPath()), entry.getKey(), entry.getValue(), node.getOffset())); @@ -381,7 +384,10 @@ public void removeFromTagInvertedIndex(IMeasurementMNode node) throws IOExcep if (logger.isDebugEnabled()) { logger.debug( String.format( - String.format(DEBUG_MSG_1, "Delete" + PREVIOUS_CONDITION, node.getFullPath()), + String.format( + DEBUG_MSG_1, + DataNodeSchemaMessages.TAG_ACTION_DELETE + PREVIOUS_CONDITION, + node.getFullPath()), entry.getKey(), entry.getValue(), node.getOffset(), @@ -422,7 +428,10 @@ public void updateTagsAndAttributes( if (logger.isDebugEnabled()) { logger.debug( String.format( - String.format(DEBUG_MSG, "Upsert" + TAG_FORMAT, leafMNode.getFullPath()), + String.format( + DEBUG_MSG, + DataNodeSchemaMessages.TAG_ACTION_UPSERT + TAG_FORMAT, + leafMNode.getFullPath()), key, beforeValue, leafMNode.getOffset())); @@ -435,7 +444,9 @@ public void updateTagsAndAttributes( logger.debug( String.format( String.format( - DEBUG_MSG_1, "Upsert" + PREVIOUS_CONDITION, leafMNode.getFullPath()), + DEBUG_MSG_1, + DataNodeSchemaMessages.TAG_ACTION_UPSERT + PREVIOUS_CONDITION, + leafMNode.getFullPath()), key, beforeValue, leafMNode.getOffset(), @@ -556,7 +567,10 @@ public void dropTagsOrAttributes( if (logger.isDebugEnabled()) { logger.debug( String.format( - String.format(DEBUG_MSG, "Drop" + TAG_FORMAT, leafMNode.getFullPath()), + String.format( + DEBUG_MSG, + DataNodeSchemaMessages.TAG_ACTION_DROP + TAG_FORMAT, + leafMNode.getFullPath()), entry.getKey(), entry.getValue(), leafMNode.getOffset())); @@ -569,7 +583,9 @@ public void dropTagsOrAttributes( logger.debug( String.format( String.format( - DEBUG_MSG_1, "Drop" + PREVIOUS_CONDITION, leafMNode.getFullPath()), + DEBUG_MSG_1, + DataNodeSchemaMessages.TAG_ACTION_DROP + PREVIOUS_CONDITION, + leafMNode.getFullPath()), entry.getKey(), entry.getValue(), leafMNode.getOffset(), @@ -627,7 +643,10 @@ public void setTagsOrAttributesValue( if (logger.isDebugEnabled()) { logger.debug( String.format( - String.format(DEBUG_MSG, "Set" + TAG_FORMAT, leafMNode.getFullPath()), + String.format( + DEBUG_MSG, + DataNodeSchemaMessages.TAG_ACTION_SET + TAG_FORMAT, + leafMNode.getFullPath()), entry.getKey(), beforeValue, leafMNode.getOffset())); @@ -639,7 +658,10 @@ public void setTagsOrAttributesValue( if (logger.isDebugEnabled()) { logger.debug( String.format( - String.format(DEBUG_MSG_1, "Set" + PREVIOUS_CONDITION, leafMNode.getFullPath()), + String.format( + DEBUG_MSG_1, + DataNodeSchemaMessages.TAG_ACTION_SET + PREVIOUS_CONDITION, + leafMNode.getFullPath()), key, beforeValue, leafMNode.getOffset(), @@ -685,7 +707,10 @@ public void renameTagOrAttributeKey( if (logger.isDebugEnabled()) { logger.debug( String.format( - String.format(DEBUG_MSG, "Rename" + TAG_FORMAT, leafMNode.getFullPath()), + String.format( + DEBUG_MSG, + DataNodeSchemaMessages.TAG_ACTION_RENAME + TAG_FORMAT, + leafMNode.getFullPath()), oldKey, value, leafMNode.getOffset())); @@ -698,7 +723,9 @@ public void renameTagOrAttributeKey( logger.debug( String.format( String.format( - DEBUG_MSG_1, "Rename" + PREVIOUS_CONDITION, leafMNode.getFullPath()), + DEBUG_MSG_1, + DataNodeSchemaMessages.TAG_ACTION_RENAME + PREVIOUS_CONDITION, + leafMNode.getFullPath()), oldKey, value, leafMNode.getOffset(), diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/utils/ResourceByPathUtils.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/utils/ResourceByPathUtils.java index b9cf97d76f72e..17d5dfd2995c7 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/utils/ResourceByPathUtils.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/utils/ResourceByPathUtils.java @@ -146,7 +146,8 @@ protected Map prepareTvListMapForQuery( tvList.lockQueryList(); try { LOGGER.debug( - "Flushing/Working MemTable - add current query context to immutable TVList's query list"); + DataNodeSchemaMessages + .SCHEMA_LOG_FLUSHING_WORKING_MEMTABLE_ADD_CURRENT_QUERY_CONTEXT_TO_IMMUTABLE_7B7CD373); tvList.getQueryContextSet().add(context); tvListQueryMap.put(tvList, tvList.rowCount()); } finally { @@ -182,7 +183,8 @@ protected Map prepareTvListMapForQuery( */ boolean canUseListDirectly = list.isSorted() || list.getQueryContextSet().isEmpty(); LOGGER.debug( - "Flushing MemTable - add current query context to mutable TVList's query list"); + DataNodeSchemaMessages + .SCHEMA_LOG_FLUSHING_MEMTABLE_ADD_CURRENT_QUERY_CONTEXT_TO_MUTABLE_TVLIST_BEB0D766); if (canUseListDirectly) { list.getQueryContextSet().add(context); tvListQueryMap.put(list, list.rowCount()); @@ -209,7 +211,8 @@ protected Map prepareTvListMapForQuery( } else { if (list.isSorted() || list.getQueryContextSet().isEmpty()) { LOGGER.debug( - "Working MemTable - add current query context to mutable TVList's query list when it's sorted or no other query on it"); + DataNodeSchemaMessages + .SCHEMA_LOG_WORKING_MEMTABLE_ADD_CURRENT_QUERY_CONTEXT_TO_MUTABLE_TVLIST_8C937414); list.getQueryContextSet().add(context); tvListQueryMap.put(list, list.rowCount()); } else { @@ -228,7 +231,8 @@ protected Map prepareTvListMapForQuery( * +------------+ */ LOGGER.debug( - "Working MemTable - clone mutable TVList and replace old TVList in working MemTable"); + DataNodeSchemaMessages + .SCHEMA_LOG_WORKING_MEMTABLE_CLONE_MUTABLE_TVLIST_AND_REPLACE_OLD_TVLIST_FD1EAE22); QueryContext firstQuery = list.getQueryContextSet().iterator().next(); // reserve query memory if (firstQuery instanceof FragmentInstanceContext) { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/table/DataNodeTreeViewSchemaUtils.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/table/DataNodeTreeViewSchemaUtils.java index 816e84a9509d0..93223da86b17f 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/table/DataNodeTreeViewSchemaUtils.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/table/DataNodeTreeViewSchemaUtils.java @@ -23,6 +23,7 @@ import org.apache.iotdb.commons.exception.SemanticException; import org.apache.iotdb.commons.path.PartialPath; import org.apache.iotdb.commons.schema.table.TsTable; +import org.apache.iotdb.db.i18n.DataNodeSchemaMessages; import org.apache.iotdb.db.storageengine.dataregion.memtable.DeviceIDFactory; import org.apache.iotdb.rpc.TSStatusCode; @@ -43,8 +44,9 @@ public static void checkTableInWrite(final String database, final TsTable table) throw new SemanticException( new IoTDBException( String.format( - "The table %s.%s is a view from tree, cannot be written or deleted from", - database, table.getTableName()), + DataNodeSchemaMessages.TREE_VIEW_TABLE_CANNOT_BE_WRITTEN_OR_DELETED, + database, + table.getTableName()), TSStatusCode.SEMANTIC_ERROR.getStatusCode())); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/DataNode.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/DataNode.java index 09a71ad0b8986..5fc67446925aa 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/DataNode.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/DataNode.java @@ -347,7 +347,8 @@ protected void start() { @Override protected void remove(Set nodeIds) throws IoTDBException { throw new IoTDBException( - "The remove-datanode script has been deprecated. Please connect to the CLI and use SQL: remove datanode [datanode_id].", + DataNodeMiscMessages + .MISC_EXCEPTION_THE_REMOVE_DATANODE_SCRIPT_HAS_BEEN_DEPRECATED_PLEASE_CONNECT_F91DF360, -1); } @@ -419,11 +420,12 @@ private void pullAndCheckSystemConfigurations() throws StartupException { || configurationResp.getStatus().getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()) { // All tries failed logger.error( - "Cannot pull system configurations from ConfigNode-leader after {} retries.", + DataNodeMiscMessages + .MISC_LOG_CANNOT_PULL_SYSTEM_CONFIGURATIONS_FROM_CONFIGNODE_LEADER_FE630DAE, DEFAULT_RETRY); throw new StartupException( - "Cannot pull system configurations from ConfigNode-leader. " - + "Please check whether the dn_seed_config_node in iotdb-system.properties is correct or alive."); + DataNodeMiscMessages + .MISC_EXCEPTION_CANNOT_PULL_SYSTEM_CONFIGURATIONS_FROM_CONFIGNODE_LEADER_BAD295DC); } /* Load system configurations */ @@ -462,7 +464,8 @@ private void pullAndCheckSystemConfigurations() throws StartupException { initTimestampPrecision(); long endTime = System.currentTimeMillis(); logger.info( - "Successfully pull system configurations from ConfigNode-leader, which takes {} ms", + DataNodeMiscMessages + .MISC_LOG_SUCCESSFULLY_PULL_SYSTEM_CONFIGURATIONS_FROM_CONFIGNODE_C8E04BF8, (endTime - startTime)); } @@ -571,8 +574,8 @@ private void sendRegisterRequestToConfigNode(boolean isPreCheck) // All tries failed logger.error(DataNodeMiscMessages.CANNOT_REGISTER_AFTER_RETRIES, DEFAULT_RETRY); throw new StartupException( - "Cannot register into the cluster. " - + "Please check whether the dn_seed_config_node in iotdb-system.properties is correct or alive."); + DataNodeMiscMessages + .MISC_EXCEPTION_CANNOT_REGISTER_INTO_THE_CLUSTER_PLEASE_CHECK_WHETHER_THE_D8B29F58); } if (dataNodeRegisterResp.getStatus().getCode() == TSStatusCode.SUCCESS_STATUS.getStatusCode()) { @@ -590,7 +593,8 @@ private void sendRegisterRequestToConfigNode(boolean isPreCheck) long endTime = System.currentTimeMillis(); logger.info( - "Successfully register to the cluster: {} , which takes {} ms.", + DataNodeMiscMessages + .MISC_LOG_SUCCESSFULLY_REGISTER_TO_THE_CLUSTER_WHICH_TAKES_MS_ED479CA7, config.getClusterName(), (endTime - startTime)); } else { @@ -731,7 +735,9 @@ private void sendRestartRequestToConfigNode() throws StartupException { break; } catch (TException | ClientManagerException e) { logger.warn( - "Cannot send restart request to the ConfigNode-leader, because: {}", e.getMessage()); + DataNodeMiscMessages + .MISC_LOG_CANNOT_SEND_RESTART_REQUEST_TO_THE_CONFIGNODE_LEADER_BECAUSE_AB17D41A, + e.getMessage()); retry--; } @@ -747,11 +753,12 @@ private void sendRestartRequestToConfigNode() throws StartupException { if (dataNodeRestartResp == null) { // All tries failed logger.error( - "Cannot send restart DataNode request to ConfigNode-leader after {} retries.", + DataNodeMiscMessages + .MISC_LOG_CANNOT_SEND_RESTART_DATANODE_REQUEST_TO_CONFIGNODE_LEADER_4F50C19F, DEFAULT_RETRY); throw new StartupException( - "Cannot send restart DataNode request to ConfigNode-leader. " - + "Please check whether the dn_seed_config_node in iotdb-system.properties is correct or alive."); + DataNodeMiscMessages + .MISC_EXCEPTION_CANNOT_SEND_RESTART_DATANODE_REQUEST_TO_CONFIGNODE_LEADER_368BE214); } if (dataNodeRestartResp.getStatus().getCode() == TSStatusCode.SUCCESS_STATUS.getStatusCode()) { @@ -760,7 +767,8 @@ private void sendRestartRequestToConfigNode() throws StartupException { dataNodeRestartResp.getConfigNodeList(), dataNodeRestartResp.getRuntimeConfiguration()); long endTime = System.currentTimeMillis(); logger.info( - "Restart request to cluster: {} is accepted, which takes {} ms.", + DataNodeMiscMessages + .MISC_LOG_RESTART_REQUEST_TO_CLUSTER_IS_ACCEPTED_WHICH_TAKES_MS_E8305E02, config.getClusterName(), (endTime - startTime)); @@ -806,14 +814,16 @@ private void active() throws StartupException, IOException { SchemaRegionConsensusImpl.getInstance().start(); long schemaRegionEndTime = System.currentTimeMillis(); logger.info( - "SchemaRegion consensus start successfully, which takes {} ms.", + DataNodeMiscMessages + .MISC_LOG_SCHEMAREGION_CONSENSUS_START_SUCCESSFULLY_WHICH_TAKES_MS_3D1B8523, (schemaRegionEndTime - startTime)); schemaRegionConsensusStarted = true; if (!isUsingIoTConsensusV2()) { DataRegionConsensusImpl.getInstance().start(); long dataRegionEndTime = System.currentTimeMillis(); logger.info( - "DataRegion consensus start successfully, which takes {} ms.", + DataNodeMiscMessages + .MISC_LOG_DATAREGION_CONSENSUS_START_SUCCESSFULLY_WHICH_TAKES_MS_2B2DB4CB, (dataRegionEndTime - schemaRegionEndTime)); dataRegionConsensusStarted = true; } @@ -866,7 +876,8 @@ private void setUp() throws StartupException, IOException { registerUdfServices(); logger.info( - "IoTDB DataNode is setting up, some databases may not be ready now, please wait several seconds..."); + DataNodeMiscMessages + .MISC_LOG_IOTDB_DATANODE_IS_SETTING_UP_SOME_DATABASES_MAY_NOT_BE_READY_961523F0); long startTime = System.currentTimeMillis(); while (!StorageEngine.getInstance().isReadyForReadAndWrite()) { try { @@ -905,7 +916,8 @@ private void setUp() throws StartupException, IOException { DataRegionConsensusImpl.getInstance().start(); long dataRegionEndTime = System.currentTimeMillis(); logger.info( - "DataRegion consensus start successfully, which takes {} ms.", + DataNodeMiscMessages + .MISC_LOG_DATAREGION_CONSENSUS_START_SUCCESSFULLY_WHICH_TAKES_MS_2B2DB4CB, (dataRegionEndTime - dataRegionStartTime)); dataRegionConsensusStarted = true; } @@ -1169,14 +1181,17 @@ private void prepareTriggerResources() throws StartupException { for (TriggerExecutor triggerExecutor : TriggerManagementService.getInstance().getAllTriggerExecutors()) { logger.debug( - "get trigger executor: {}", triggerExecutor.getTriggerInformation().getTriggerName()); + DataNodeMiscMessages.MISC_LOG_GET_TRIGGER_EXECUTOR_1727D243, + triggerExecutor.getTriggerInformation().getTriggerName()); } } // Start TriggerInformationUpdater triggerInformationUpdater.startTriggerInformationUpdater(); long endTime = System.currentTimeMillis(); logger.info( - "successfully registered all the triggers, which takes {} ms.", (endTime - startTime)); + DataNodeMiscMessages + .MISC_LOG_SUCCESSFULLY_REGISTERED_ALL_THE_TRIGGERS_WHICH_TAKES_MS_246178BB, + (endTime - startTime)); } private void getJarOfTriggers(List triggerInformationList) @@ -1253,7 +1268,8 @@ private void prepareExternalServiceResources() throws StartupException { } logger.info( - "Prepare external-service resources successfully, which takes {} ms.", + DataNodeMiscMessages + .MISC_LOG_PREPARE_EXTERNAL_SERVICE_RESOURCES_SUCCESSFULLY_WHICH_TAKES_00E62CB0, System.currentTimeMillis() - startTime); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/DataNodeShutdownHook.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/DataNodeShutdownHook.java index c2806e325281c..22d0cb25cb02a 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/DataNodeShutdownHook.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/DataNodeShutdownHook.java @@ -151,7 +151,8 @@ public void run() { while (true) { if (entry.getValue().getRemainingNonHeartbeatEvents() == 0) { logger.info( - "Successfully waited for pipe {} to finish.", entry.getValue().getPipeName()); + DataNodeMiscMessages.MISC_LOG_SUCCESSFULLY_WAITED_FOR_PIPE_TO_FINISH_FBDF5157, + entry.getValue().getPipeName()); break; } if (System.currentTimeMillis() - startTime @@ -188,14 +189,15 @@ public void run() { // Set and report shutdown to cluster ConfigNode-leader if (!reportShutdownToConfigNodeLeader()) { logger.warn( - "Failed to report DataNode's shutdown to ConfigNode. The cluster will still take the current DataNode as Running for a few seconds."); + DataNodeMiscMessages + .MISC_LOG_FAILED_TO_REPORT_DATANODE_S_SHUTDOWN_TO_CONFIGNODE_THE_CLUSTER_E6727497); } // Clear lock file. All services should be shutdown before this line. DirectoryChecker.getInstance().deregisterAll(); logger.info( - "DataNode exits. Jvm memory usage: {}", + DataNodeMiscMessages.MISC_LOG_DATANODE_EXITS_JVM_MEMORY_USAGE_BE69D1F5, MemUtils.bytesCntToStr( Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory())); @@ -210,8 +212,8 @@ private void triggerSnapshotForAllDataRegion() { DataRegionConsensusImpl.getInstance().triggerSnapshot(id, true); } catch (ConsensusException e) { logger.warn( - "Something wrong happened while calling consensus layer's " - + "triggerSnapshot API.", + DataNodeMiscMessages + .MISC_LOG_SOMETHING_WRONG_HAPPENED_WHILE_CALLING_CONSENSUS_LAYER_S_8B8FBB16, e); } }); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/RegionMigrateService.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/RegionMigrateService.java index 39c1a1678cff4..3b22d97880ff8 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/RegionMigrateService.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/RegionMigrateService.java @@ -159,7 +159,8 @@ public synchronized boolean submitAddRegionPeerTask(TMaintainPeerReq req) { try { if (!addToTaskResultMap(req.getTaskId())) { LOGGER.warn( - "{} The AddRegionPeerTask {} has already been submitted and will not be submitted again.", + DataNodeMiscMessages + .MISC_LOG_THE_ADDREGIONPEERTASK_HAS_ALREADY_BEEN_SUBMITTED_AND_WILL_4D398F73, REGION_MIGRATE_PROCESS, req.getTaskId()); return true; @@ -168,7 +169,7 @@ public synchronized boolean submitAddRegionPeerTask(TMaintainPeerReq req) { new AddRegionPeerTask(req.getTaskId(), req.getRegionId(), req.getDestNode())); } catch (Exception e) { LOGGER.error( - "{}, Submit AddRegionPeerTask error for Region: {}", + DataNodeMiscMessages.MISC_LOG_SUBMIT_ADDREGIONPEERTASK_ERROR_FOR_REGION_4E999BA9, REGION_MIGRATE_PROCESS, req.getRegionId(), e); @@ -189,7 +190,8 @@ public synchronized boolean submitRemoveRegionPeerTask(TMaintainPeerReq req) { try { if (!addToTaskResultMap(req.getTaskId())) { LOGGER.warn( - "{} The RemoveRegionPeer {} has already been submitted and will not be submitted again.", + DataNodeMiscMessages + .MISC_LOG_THE_REMOVEREGIONPEER_HAS_ALREADY_BEEN_SUBMITTED_AND_WILL_6754D9FB, REGION_MIGRATE_PROCESS, req.getTaskId()); return true; @@ -198,7 +200,7 @@ public synchronized boolean submitRemoveRegionPeerTask(TMaintainPeerReq req) { new RemoveRegionPeerTask(req.getTaskId(), req.getRegionId(), req.getDestNode())); } catch (Exception e) { LOGGER.error( - "{}, Submit RemoveRegionPeer task error for Region: {}", + DataNodeMiscMessages.MISC_LOG_SUBMIT_REMOVEREGIONPEER_TASK_ERROR_FOR_REGION_200E7F68, REGION_MIGRATE_PROCESS, req.getRegionId(), e); @@ -218,7 +220,8 @@ public synchronized boolean submitDeleteOldRegionPeerTask(TMaintainPeerReq req) try { if (!addToTaskResultMap(req.getTaskId())) { LOGGER.warn( - "{} The DeleteOldRegionPeerTask {} has already been submitted and will not be submitted again.", + DataNodeMiscMessages + .MISC_LOG_THE_DELETEOLDREGIONPEERTASK_HAS_ALREADY_BEEN_SUBMITTED_AND_75815D37, REGION_MIGRATE_PROCESS, req.getTaskId()); return true; @@ -227,7 +230,7 @@ public synchronized boolean submitDeleteOldRegionPeerTask(TMaintainPeerReq req) new DeleteOldRegionPeerTask(req.getTaskId(), req.getRegionId(), req.getDestNode())); } catch (Exception e) { LOGGER.error( - "{}, Submit DeleteOldRegionPeerTask error for Region: {}", + DataNodeMiscMessages.MISC_LOG_SUBMIT_DELETEOLDREGIONPEERTASK_ERROR_FOR_REGION_460C308A, REGION_MIGRATE_PROCESS, req.getRegionId(), e); @@ -251,7 +254,8 @@ public synchronized TSStatus resetPeerList(TResetPeerListReq req) { } } catch (ConsensusGroupNotExistException e) { LOGGER.warn( - "Reset peer list fail, this DataNode not contains peer of consensus group {}. Maybe caused by create local peer failure.", + DataNodeMiscMessages + .MISC_LOG_RESET_PEER_LIST_FAIL_THIS_DATANODE_NOT_CONTAINS_PEER_OF_6539945C, regionId, e); } catch (ConsensusException e) { @@ -318,7 +322,10 @@ public void run() { private TSStatus addPeer() { taskLogger.info( - "{}, Start to addPeer {} for region {}", REGION_MIGRATE_PROCESS, destDataNode, tRegionId); + DataNodeMiscMessages.START_TO_ADD_PEER_FOR_REGION, + REGION_MIGRATE_PROCESS, + destDataNode, + tRegionId); ConsensusGroupId regionId = ConsensusGroupId.Factory.createFromTConsensusGroupId(tRegionId); TSStatus status = new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode()); TEndPoint destEndpoint = getConsensusEndPoint(destDataNode, regionId); @@ -332,7 +339,7 @@ private TSStatus addPeer() { addPeerSucceed = false; throwable = e; taskLogger.error( - "{}, executed addPeer {} for region {} error", + DataNodeMiscMessages.EXECUTED_ADD_PEER_FOR_REGION_ERROR, REGION_MIGRATE_PROCESS, destEndpoint, regionId, @@ -340,14 +347,16 @@ private TSStatus addPeer() { } catch (Exception e) { addPeerSucceed = false; throwable = e; - taskLogger.warn("Unexpected exception", e); + taskLogger.warn(DataNodeMiscMessages.REGION_MIGRATE_UNEXPECTED_EXCEPTION, e); } if (!addPeerSucceed) { String errorMsg = String.format( - "%s, AddPeer for region error, peerId: %s, regionId: %s", - REGION_MIGRATE_PROCESS, destEndpoint, regionId); + DataNodeMiscMessages.ADD_PEER_FOR_REGION_ERROR_FMT, + REGION_MIGRATE_PROCESS, + destEndpoint, + regionId); taskLogger.error(errorMsg, throwable); status.setCode(TSStatusCode.MIGRATE_REGION_ERROR.getStatusCode()); status.setMessage(errorMsg); @@ -355,7 +364,7 @@ private TSStatus addPeer() { } taskLogger.info( - "{}, Succeed to addPeer {} for region {}", + DataNodeMiscMessages.SUCCEED_TO_ADD_PEER_FOR_REGION, REGION_MIGRATE_PROCESS, destEndpoint, regionId); @@ -407,7 +416,7 @@ private TSStatus removePeer() { TSStatus status = new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode()); TEndPoint destEndPoint = getConsensusEndPoint(destDataNode, regionId); taskLogger.info( - "{}, Start to removePeer {} for region {}", + DataNodeMiscMessages.START_TO_REMOVE_PEER_FOR_REGION, REGION_MIGRATE_PROCESS, destEndPoint, regionId); @@ -430,7 +439,7 @@ private TSStatus removePeer() { removePeerSucceed = false; throwable = e; taskLogger.error( - "{}, executed removePeer {} for region {} error, retry times: {}", + DataNodeMiscMessages.EXECUTED_REMOVE_PEER_FOR_REGION_ERROR_RETRY_TIMES, REGION_MIGRATE_PROCESS, destEndPoint, regionId, @@ -439,7 +448,7 @@ private TSStatus removePeer() { } catch (Exception e) { removePeerSucceed = false; throwable = e; - taskLogger.warn("Unexpected exception", e); + taskLogger.warn(DataNodeMiscMessages.REGION_MIGRATE_UNEXPECTED_EXCEPTION, e); } if (removePeerSucceed || throwable instanceof InterruptedException) { break; @@ -449,8 +458,10 @@ private TSStatus removePeer() { if (!removePeerSucceed) { String errorMsg = String.format( - "%s, RemovePeer for region error after max retry times, peerId: %s, regionId: %s", - REGION_MIGRATE_PROCESS, destEndPoint, regionId); + DataNodeMiscMessages.REMOVE_PEER_FOR_REGION_ERROR_AFTER_MAX_RETRY_TIMES_FMT, + REGION_MIGRATE_PROCESS, + destEndPoint, + regionId); taskLogger.error(errorMsg, throwable); status.setCode(TSStatusCode.MIGRATE_REGION_ERROR.getStatusCode()); status.setMessage(errorMsg); @@ -458,7 +469,7 @@ private TSStatus removePeer() { } taskLogger.info( - "{}, Succeed to removePeer {} for region {}", + DataNodeMiscMessages.SUCCEED_TO_REMOVE_PEER_FOR_REGION, REGION_MIGRATE_PROCESS, destEndPoint, regionId); @@ -525,7 +536,7 @@ public void run() { private TSStatus deletePeer() { taskLogger.info( - "{}, Start to deletePeer {} for region {}", + DataNodeMiscMessages.START_TO_DELETE_PEER_FOR_REGION, REGION_MIGRATE_PROCESS, originalDataNode, tRegionId); @@ -540,20 +551,31 @@ private TSStatus deletePeer() { } catch (ConsensusException e) { String errorMsg = String.format( - "deletePeer error, regionId: %s, errorMessage: %s", regionId, e.getMessage()); + DataNodeMiscMessages.DELETE_PEER_ERROR_WITH_ERROR_MESSAGE_FMT, + regionId, + e.getMessage()); taskLogger.error(errorMsg); status.setCode(TSStatusCode.MIGRATE_REGION_ERROR.getStatusCode()); status.setMessage(errorMsg); return status; } catch (Exception e) { - taskLogger.error("{}, deletePeer error, regionId: {}", REGION_MIGRATE_PROCESS, regionId, e); + taskLogger.error( + DataNodeMiscMessages.DELETE_PEER_ERROR_WITH_REGION_ID, + REGION_MIGRATE_PROCESS, + regionId, + e); status.setCode(TSStatusCode.MIGRATE_REGION_ERROR.getStatusCode()); status.setMessage( - "deletePeer for region: " + regionId + " error. exception: " + e.getMessage()); + String.format( + DataNodeMiscMessages.DELETE_PEER_FOR_REGION_ERROR_EXCEPTION_FMT, + regionId, + e.getMessage())); return status; } taskLogger.info( - "{}, Succeed to deletePeer {} from consensus group", REGION_MIGRATE_PROCESS, regionId); + DataNodeMiscMessages.SUCCEED_TO_DELETE_PEER_FROM_CONSENSUS_GROUP, + REGION_MIGRATE_PROCESS, + regionId); status.setMessage( String.format(DataNodeMiscMessages.DELETE_PEER_FROM_CONSENSUS_GROUP_SUCCEED, regionId)); return status; @@ -561,7 +583,7 @@ private TSStatus deletePeer() { private TSStatus deleteRegion() { taskLogger.info( - "{}, Start to deleteRegion {} for datanode {}", + DataNodeMiscMessages.START_TO_DELETE_REGION_FOR_DATANODE, REGION_MIGRATE_PROCESS, tRegionId, originalDataNode); @@ -574,14 +596,16 @@ private TSStatus deleteRegion() { DataNodeRegionManager.getInstance().deleteSchemaRegion((SchemaRegionId) regionId); } } catch (Exception e) { - taskLogger.error("{}, deleteRegion {} error", REGION_MIGRATE_PROCESS, regionId, e); + taskLogger.error( + DataNodeMiscMessages.DELETE_REGION_ERROR_LOG, REGION_MIGRATE_PROCESS, regionId, e); status.setCode(TSStatusCode.DELETE_REGION_ERROR.getStatusCode()); status.setMessage( String.format(DataNodeMiscMessages.DELETE_REGION_ERROR, regionId, e.getMessage())); return status; } status.setMessage(String.format(DataNodeMiscMessages.DELETE_REGION_SUCCEED, regionId)); - taskLogger.info("{}, Succeed to deleteRegion {}", REGION_MIGRATE_PROCESS, regionId); + taskLogger.info( + DataNodeMiscMessages.SUCCEED_TO_DELETE_REGION, REGION_MIGRATE_PROCESS, regionId); return status; } } @@ -596,7 +620,10 @@ private Holder() {} private static void taskSucceed(long taskId, TConsensusGroupId tRegionId, String migrateState) { TSStatus status = new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode()); status.setMessage( - String.format("Region: %s, state: %s, executed succeed", tRegionId, migrateState)); + String.format( + DataNodeMiscMessages.MESSAGE_REGION_ARG_STATE_ARG_EXECUTED_SUCCEED_F78C5849, + tRegionId, + migrateState)); TRegionMigrateResult req = new TRegionMigrateResult(TRegionMaintainTaskStatus.SUCCESS); req.setRegionId(tRegionId).setMigrateResult(status); taskResultMap.put(taskId, req); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/SettleService.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/SettleService.java index 654915199b05e..06e3a4419a191 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/SettleService.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/SettleService.java @@ -107,7 +107,7 @@ public void startSettling( return; } logger.info( - "Totally find {} tsFiles to be settled.", + DataNodeMiscMessages.MISC_LOG_TOTALLY_FIND_TSFILES_TO_BE_SETTLED_DB47A63C, seqResourcesToBeSettled.size() + unseqResourcesToBeSettled.size()); // settle seqTsFile for (TsFileResource resource : seqResourcesToBeSettled) { @@ -153,7 +153,9 @@ public PartialPath getSGByFilePath(String tsFilePath) throws WriteProcessExcepti new File(tsFilePath).getParentFile().getParentFile().getParentFile().getName()); } catch (IllegalPathException e) { throw new WriteProcessException( - "Fail to get sg of this tsFile while parsing the file path.", e); + DataNodeMiscMessages + .MISC_EXCEPTION_FAIL_TO_GET_SG_OF_THIS_TSFILE_WHILE_PARSING_THE_FILE_PATH_9EADADE1, + e); } return sgPath; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/externalservice/ExternalServiceManagementService.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/externalservice/ExternalServiceManagementService.java index 25a3d50be3b44..baf326ce53c1d 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/externalservice/ExternalServiceManagementService.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/externalservice/ExternalServiceManagementService.java @@ -114,7 +114,10 @@ public void createService(String serviceName, String className) if (serviceInfos.containsKey(serviceName)) { TSStatus status = new TSStatus(TSStatusCode.EXTERNAL_SERVICE_ALREADY_EXIST.getStatusCode()); status.setMessage( - String.format("Failed to create External Service %s, it already exists!", serviceName)); + String.format( + DataNodeMiscMessages + .MESSAGE_FAILED_CREATE_EXTERNAL_SERVICE_ARG_IT_ALREADY_EXISTS_50AE69DF, + serviceName)); throw new ExternalServiceManagementException(status); } @@ -148,7 +151,9 @@ public void startService(String serviceName) throws ClientManagerException, TExc TSStatus status = new TSStatus(TSStatusCode.NO_SUCH_EXTERNAL_SERVICE.getStatusCode()); status.setMessage( String.format( - "Failed to start External Service %s, because it is not existed!", serviceName)); + DataNodeMiscMessages + .MESSAGE_FAILED_START_EXTERNAL_SERVICE_ARG_BECAUSE_IT_NOT_EXISTED_29D6D3F2, + serviceName)); throw new ExternalServiceManagementException(status); } @@ -199,8 +204,10 @@ private IExternalService createExternalServiceInstance( new TSStatus(TSStatusCode.EXTERNAL_SERVICE_INSTANCE_CREATE_ERROR.getStatusCode()); status.setMessage( String.format( - "Failed to start External Service %s, because its instance can not be constructed successfully. Exception: %s", - serviceName, t)); + DataNodeMiscMessages + .MESSAGE_FAILED_START_EXTERNAL_SERVICE_ARG_BECAUSE_ITS_INSTANCE_CAN_NOT_F5A6C198, + serviceName, + t)); LOGGER.warn(status.getMessage(), t); throw new ExternalServiceManagementException(status); } @@ -231,7 +238,9 @@ public void stopService(String serviceName) throws ClientManagerException, TExce TSStatus status = new TSStatus(TSStatusCode.NO_SUCH_EXTERNAL_SERVICE.getStatusCode()); status.setMessage( String.format( - "Failed to stop External Service %s, because it is not existed!", serviceName)); + DataNodeMiscMessages + .MESSAGE_FAILED_STOP_EXTERNAL_SERVICE_ARG_BECAUSE_IT_NOT_EXISTED_3CCCDA42, + serviceName)); throw new ExternalServiceManagementException(status); } @@ -281,7 +290,9 @@ public void dropService(String serviceName, boolean forcedly) TSStatus status = new TSStatus(TSStatusCode.NO_SUCH_EXTERNAL_SERVICE.getStatusCode()); status.setMessage( String.format( - "Failed to drop External Service %s, because it is not existed!", serviceName)); + DataNodeMiscMessages + .MESSAGE_FAILED_DROP_EXTERNAL_SERVICE_ARG_BECAUSE_IT_NOT_EXISTED_FDD11F17, + serviceName)); throw new ExternalServiceManagementException(status); } if (serviceInfo.getServiceType() == ServiceInfo.ServiceType.BUILTIN) { @@ -289,7 +300,9 @@ public void dropService(String serviceName, boolean forcedly) new TSStatus(TSStatusCode.CANNOT_DROP_BUILTIN_EXTERNAL_SERVICE.getStatusCode()); status.setMessage( String.format( - "Failed to drop External Service %s, because it is BUILT-IN!", serviceName)); + DataNodeMiscMessages + .MESSAGE_FAILED_DROP_EXTERNAL_SERVICE_ARG_BECAUSE_IT_BUILT_59858F3F, + serviceName)); throw new ExternalServiceManagementException(status); } @@ -304,15 +317,19 @@ public void dropService(String serviceName, boolean forcedly) } catch (Exception e) { // record errMsg if exception occurs during the stop of service LOGGER.warn( - "Failed to stop External Service %s because %s. It will be drop forcedly", - serviceName, e.getMessage()); + DataNodeMiscMessages + .MISC_LOG_FAILED_TO_STOP_EXTERNAL_SERVICE_S_BECAUSE_S_IT_WILL_BE_DROP_B2909C1E, + serviceName, + e.getMessage()); } } else { TSStatus status = new TSStatus(TSStatusCode.CANNOT_DROP_RUNNING_EXTERNAL_SERVICE.getStatusCode()); status.setMessage( String.format( - "Failed to drop External Service %s, because it is RUNNING!", serviceName)); + DataNodeMiscMessages + .MESSAGE_FAILED_DROP_EXTERNAL_SERVICE_ARG_BECAUSE_IT_RUNNING_89B38F80, + serviceName)); throw new ExternalServiceManagementException(status); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/metrics/IoTDBInternalLocalReporter.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/metrics/IoTDBInternalLocalReporter.java index 444fdd2e9899b..f081a7b60fc6a 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/metrics/IoTDBInternalLocalReporter.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/metrics/IoTDBInternalLocalReporter.java @@ -178,10 +178,14 @@ protected void writeMetricToIoTDB(Map valueMap, String prefix, l } } catch (IoTDBConnectionException e1) { LOGGER.warn( - "Failed to update the value of metric because of connection failure, because ", e1); + DataNodeMiscMessages + .MISC_LOG_FAILED_TO_UPDATE_THE_VALUE_OF_METRIC_BECAUSE_OF_CONNECTION_B0FC4929, + e1); } catch (IllegalPathException | QueryProcessException e2) { LOGGER.warn( - "Failed to update the value of metric because of internal error, because ", e2); + DataNodeMiscMessages + .MISC_LOG_FAILED_TO_UPDATE_THE_VALUE_OF_METRIC_BECAUSE_OF_INTERNAL_E5C64806, + e2); } }); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/StorageEngine.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/StorageEngine.java index db51775281d43..c9bf101c4fb7a 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/StorageEngine.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/StorageEngine.java @@ -190,7 +190,9 @@ public static void blockInsertionIfReject() throws WriteProcessRejectException { TimeUnit.MILLISECONDS.sleep(CONFIG.getCheckPeriodWhenInsertBlocked()); if (System.currentTimeMillis() - startTime > CONFIG.getMaxWaitingTimeWhenInsertBlocked()) { throw new WriteProcessRejectException( - "System rejected over " + (System.currentTimeMillis() - startTime) + "ms"); + String.format( + StorageEngineMessages.STORAGE_EXCEPTION_SYSTEM_REJECTED_OVER_SMS_94CEF932, + (System.currentTimeMillis() - startTime))); } } catch (InterruptedException e) { Thread.currentThread().interrupt(); @@ -233,7 +235,7 @@ private void asyncRecoverDataRegion() throws StartupException { checkResults(futures, StorageEngineMessages.STORAGE_ENGINE_FAILED_TO_RECOVER); isReadyForReadAndWrite.set(true); LOGGER.info( - "Storage Engine recover cost: {}s.", + StorageEngineMessages.STORAGE_LOG_STORAGE_ENGINE_RECOVER_COST_S_C8AEE9D9, (System.currentTimeMillis() - startRecoverTime) / 1000); }, ThreadName.STORAGE_ENGINE_RECOVER_TRIGGER.getName()); @@ -259,12 +261,15 @@ private void asyncRecover(List> futures) { dataRegion = buildNewDataRegion(sgName, dataRegionId); } catch (DataRegionException e) { LOGGER.error( - "Failed to recover data region {}[{}]", sgName, dataRegionId.getId(), e); + StorageEngineMessages.STORAGE_LOG_FAILED_TO_RECOVER_DATA_REGION_804B162D, + sgName, + dataRegionId.getId(), + e); return null; } dataRegionMap.put(dataRegionId, dataRegion); LOGGER.info( - "Data regions have been recovered {}/{}", + StorageEngineMessages.STORAGE_LOG_DATA_REGIONS_HAVE_BEEN_RECOVERED_D5BD3A80, readyDataRegionNum.incrementAndGet(), recoverDataRegionNum); return null; @@ -402,7 +407,7 @@ private void asyncRecoverTsFileResource() { recoverRepairData(); isReadyForNonReadWriteFunctions.set(true); LOGGER.info( - "TsFile Resource recover cost: {}s.", + StorageEngineMessages.STORAGE_LOG_TSFILE_RESOURCE_RECOVER_COST_S_41F074E0, (System.currentTimeMillis() - startRecoverTime) / 1000); }, ThreadName.STORAGE_ENGINE_RECOVER_TRIGGER.getName()); @@ -472,7 +477,8 @@ public DataRegion buildNewDataRegion(String databaseName, DataRegionId dataRegio throws DataRegionException { DataRegion dataRegion; LOGGER.info( - "construct a data region instance, the database is {}, Thread is {}", + StorageEngineMessages + .STORAGE_LOG_CONSTRUCT_A_DATA_REGION_INSTANCE_THE_DATABASE_IS_THREAD_17A16BDF, databaseName, Thread.currentThread().getId()); dataRegion = @@ -860,7 +866,7 @@ public void deleteDataRegion(DataRegionId regionId) { LOGGER.info(StorageEngineMessages.REMOVED_DATA_REGION, regionId); } catch (Exception e) { LOGGER.error( - "Error occurs when deleting data region {}-{}", + StorageEngineMessages.STORAGE_LOG_ERROR_OCCURS_WHEN_DELETING_DATA_REGION_8C07B7A0, region.getDatabaseName(), region.getDataRegionIdString(), e); @@ -1011,8 +1017,8 @@ public TSStatus writeLoadTsFileNode( final DataRegion dataRegion = getDataRegion(dataRegionId); if (dataRegion == null) { LOGGER.warn( - "DataRegion {} not found on this DataNode when writing piece node" - + "of TsFile {} (maybe due to region migration), will skip.", + StorageEngineMessages + .STORAGE_LOG_DATAREGION_NOT_FOUND_ON_THIS_DATANODE_WHEN_WRITING_PIECE_E5B5A888, dataRegionId, pieceNode.getTsFile()); return RpcUtils.SUCCESS_STATUS; @@ -1022,7 +1028,8 @@ public TSStatus writeLoadTsFileNode( loadTsFileManager.writeToDataRegion(dataRegion, pieceNode, uuid); } catch (IOException | PageException e) { LOGGER.warn( - "IO error when writing piece node of TsFile {} to DataRegion {}.", + StorageEngineMessages + .STORAGE_LOG_IO_ERROR_WHEN_WRITING_PIECE_NODE_OF_TSFILE_TO_DATAREGION_946738F2, pieceNode.getTsFile(), dataRegionId, e); @@ -1031,7 +1038,8 @@ public TSStatus writeLoadTsFileNode( return status; } catch (Exception e) { LOGGER.warn( - "Exception occurred when writing piece node of TsFile {} to DataRegion {}.", + StorageEngineMessages + .STORAGE_LOG_EXCEPTION_OCCURRED_WHEN_WRITING_PIECE_NODE_OF_TSFILE_TO_9EDD09BD, pieceNode.getTsFile(), dataRegionId, e); @@ -1059,8 +1067,10 @@ public TSStatus executeLoadCommand( status.setCode(TSStatusCode.LOAD_FILE_ERROR.getStatusCode()); status.setMessage( String.format( - "No load TsFile uuid %s recorded for execute load command %s.", - uuid, loadCommand)); + StorageEngineMessages + .MESSAGE_NO_LOAD_TSFILE_UUID_ARG_RECORDED_EXECUTE_LOAD_COMMAND_ARG_66722D80, + uuid, + loadCommand)); } break; case ROLLBACK: @@ -1070,8 +1080,10 @@ public TSStatus executeLoadCommand( status.setCode(TSStatusCode.LOAD_FILE_ERROR.getStatusCode()); status.setMessage( String.format( - "No load TsFile uuid %s recorded for execute load command %s.", - uuid, loadCommand)); + StorageEngineMessages + .MESSAGE_NO_LOAD_TSFILE_UUID_ARG_RECORDED_EXECUTE_LOAD_COMMAND_ARG_66722D80, + uuid, + loadCommand)); } break; default: diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/buffer/TimeSeriesMetadataCache.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/buffer/TimeSeriesMetadataCache.java index cc3b2ee5aff2c..211a2a6a4067c 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/buffer/TimeSeriesMetadataCache.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/buffer/TimeSeriesMetadataCache.java @@ -91,7 +91,8 @@ public class TimeSeriesMetadataCache { private TimeSeriesMetadataCache() { if (CACHE_ENABLE) { logger.info( - "TimeSeriesMetadataCache size = {}", CACHE_MEMORY_BLOCK.getTotalMemorySizeInBytes()); + StorageEngineMessages.STORAGE_LOG_TIMESERIESMETADATACACHE_SIZE_E31733D3, + CACHE_MEMORY_BLOCK.getTotalMemorySizeInBytes()); } lruCache = Caffeine.newBuilder() @@ -227,7 +228,7 @@ public TimeseriesMetadata get( } else { if (debug) { DEBUG_LOGGER.info( - "Get timeseries: {}.{} metadata in file: {} from cache: {}.", + StorageEngineMessages.STORAGE_LOG_GET_TIMESERIES_METADATA_IN_FILE_FROM_CACHE_36652729, key.device, key.measurement, filePath, diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/DataRegion.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/DataRegion.java index 8c719dfdaac35..a3781cb2b4133 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/DataRegion.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/DataRegion.java @@ -421,7 +421,9 @@ public DataRegion( new TsFileManager(databaseName, dataRegionIdString, dataRegionSysDir.getPath()); if (dataRegionSysDir.mkdirs()) { logger.info( - "Database system Directory {} doesn't exist, create it", dataRegionSysDir.getPath()); + StorageEngineMessages + .STORAGE_LOG_DATABASE_SYSTEM_DIRECTORY_DOESN_T_EXIST_CREATE_IT_9C0E7C68, + dataRegionSysDir.getPath()); } else if (!dataRegionSysDir.exists()) { logger.error(StorageEngineMessages.CREATE_DB_SYSTEM_DIR_FAILED, dataRegionSysDir.getPath()); } @@ -437,7 +439,8 @@ public DataRegion( if (config.getDataRegionConsensusProtocolClass().equals(ConsensusFactory.RATIS_CONSENSUS) && !StorageEngine.getInstance().isReadyForReadAndWrite()) { logger.debug( - "Skip recovering data region {}[{}] when consensus protocol is ratis and storage engine is not ready.", + StorageEngineMessages + .STORAGE_LOG_SKIP_RECOVERING_DATA_REGION_WHEN_CONSENSUS_PROTOCOL_IS_RATIS_43A6A699, databaseName, dataRegionIdString); for (String fileFolder : TierManager.getInstance().getAllFilesFolders()) { @@ -447,7 +450,8 @@ public DataRegion( fsFactory.deleteDirectory(dataRegionFolder.getPath()); } catch (IOException e) { logger.error( - "Exception occurs when deleting data region folder for {}-{}", + StorageEngineMessages + .STORAGE_LOG_EXCEPTION_OCCURS_WHEN_DELETING_DATA_REGION_FOLDER_FOR_8ABCF5D1, databaseName, dataRegionIdString, e); @@ -455,7 +459,9 @@ public DataRegion( if (FSUtils.getFSType(dataRegionFolder) == FSType.LOCAL) { if (dataRegionFolder.mkdirs()) { logger.info( - "Data region directory {} doesn't exist, create it", dataRegionFolder.getPath()); + StorageEngineMessages + .STORAGE_LOG_DATA_REGION_DIRECTORY_DOESN_T_EXIST_CREATE_IT_EFB0AE77, + dataRegionFolder.getPath()); } else if (!dataRegionFolder.exists()) { logger.error( StorageEngineMessages.CREATE_DATA_REGION_DIR_FAILED, dataRegionFolder.getPath()); @@ -507,7 +513,11 @@ private void initDiskSelector() { throw e; } catch (Exception e) { throw new LoadFileException( - String.format("Storage allocation failed for %s (tier %d)", fileName, tierLevel), + String.format( + StorageEngineMessages + .STORAGE_EXCEPTION_STORAGE_ALLOCATION_FAILED_FOR_S_TIER_D_E2C94F74, + fileName, + tierLevel), e); } }; @@ -570,7 +580,7 @@ public void incrementRecoveredFilesNum() { if (recoveredFilesNum < numOfFilesToRecover) { if (System.currentTimeMillis() - lastLogTime > config.getRecoveryLogIntervalInMs()) { logger.info( - "The TsFiles of data region {}[{}] has recovered {}/{}.", + StorageEngineMessages.STORAGE_LOG_THE_TSFILES_OF_DATA_REGION_HAS_RECOVERED_E17384CF, databaseName, dataRegionIdString, recoveredFilesNum, @@ -579,7 +589,8 @@ public void incrementRecoveredFilesNum() { } } else { logger.info( - "The TsFiles of data region {}[{}] has recovered completely {}/{}.", + StorageEngineMessages + .STORAGE_LOG_THE_TSFILES_OF_DATA_REGION_HAS_RECOVERED_COMPLETELY_0D79FC83, databaseName, dataRegionIdString, numOfFilesToRecover, @@ -743,7 +754,7 @@ private void recover() throws DataRegionException { for (WALRecoverListener recoverListener : recoverListeners) { if (recoverListener.waitForResult() == WALRecoverListener.Status.FAILURE) { logger.error( - "Fail to recover unsealed TsFile {}, skip it.", + StorageEngineMessages.STORAGE_LOG_FAIL_TO_RECOVER_UNSEALED_TSFILE_SKIP_IT_CA576205, recoverListener.getFilePath(), recoverListener.getCause()); } @@ -789,10 +800,14 @@ private void recover() throws DataRegionException { } } logger.info( - "The data region {}[{}] is created successfully", databaseName, dataRegionIdString); + StorageEngineMessages.STORAGE_LOG_THE_DATA_REGION_IS_CREATED_SUCCESSFULLY_B991F1D4, + databaseName, + dataRegionIdString); } else { logger.info( - "The data region {}[{}] is recovered successfully", databaseName, dataRegionIdString); + StorageEngineMessages.STORAGE_LOG_THE_DATA_REGION_IS_RECOVERED_SUCCESSFULLY_5AAFF7B7, + databaseName, + dataRegionIdString); } } @@ -927,9 +942,13 @@ private void checkTsFileTime(File tsFile, long currentTime) throws DataRegionExc && fileTime < RepairUnsortedFileCompactionTask.getInitialAllocatedFileTimestamp()) { throw new DataRegionException( String.format( - "data region %s[%s] is down, because the time of tsfile %s is larger than system current time, " - + "file time is %d while system current time is %d, please check it.", - databaseName, dataRegionIdString, tsFile.getAbsolutePath(), fileTime, currentTime)); + StorageEngineMessages + .STORAGE_EXCEPTION_DATA_REGION_S_S_IS_DOWN_BECAUSE_THE_TIME_OF_TSFILE_S_IS_1F732E71, + databaseName, + dataRegionIdString, + tsFile.getAbsolutePath(), + fileTime, + currentTime)); } } @@ -1015,7 +1034,7 @@ private void recoverUnsealedTsFileCallBack(UnsealedTsFileRecoverPerformer recove tsFileManager.add(tsFileResource, recoverPerformer.isSequence()); } catch (Throwable e) { logger.error( - "Fail to recover unsealed TsFile {}, skip it.", + StorageEngineMessages.STORAGE_LOG_FAIL_TO_RECOVER_UNSEALED_TSFILE_SKIP_IT_CA576205, recoverPerformer.getTsFileAbsolutePath(), e); } @@ -1405,7 +1424,9 @@ public void insertTablet(InsertTabletNode insertTabletNode) try { if (deleted) { logger.info( - "Won't insert tablet {}, because region is deleted", insertTabletNode.getSearchIndex()); + StorageEngineMessages + .STORAGE_LOG_WON_T_INSERT_TABLET_BECAUSE_REGION_IS_DELETED_34D893A7, + insertTabletNode.getSearchIndex()); return; } if (delayAnalyzer != null) { @@ -1561,7 +1582,7 @@ private boolean insertTabletToTsFileProcessor( if (insertTabletNode.allMeasurementFailed()) { if (logger.isDebugEnabled()) { logger.debug( - "Won't insert tablet {}, because {}", + StorageEngineMessages.STORAGE_LOG_WON_T_INSERT_TABLET_BECAUSE_C2DC8032, insertTabletNode.getSearchIndex(), "insertTabletNode allMeasurementFailed"); } @@ -1712,7 +1733,8 @@ private void registerToTsFile(InsertNode node, TsFileProcessor tsFileProcessor) return schema; } catch (TException | ClientManagerException e) { logger.error( - "Remote request config node failed that judgment if table is exist, occur exception. {}", + StorageEngineMessages + .STORAGE_LOG_REMOTE_REQUEST_CONFIG_NODE_FAILED_THAT_JUDGMENT_IF_TABLE_25FE3602, e.getMessage()); CommonMetadataUtils.throwTableNotExistsException(getDatabaseName(), tableName); return null; // unreachable, throwTableNotExistsException always throws @@ -1721,7 +1743,8 @@ private void registerToTsFile(InsertNode node, TsFileProcessor tsFileProcessor) // Here may be invoked by leader node, the table is very unexpected not exist in the // DataNodeTableCache logger.error( - "Due tsTable is null, table schema can't be got, leader node occur special situation need to resolve."); + StorageEngineMessages + .STORAGE_LOG_DUE_TSTABLE_IS_NULL_TABLE_SCHEMA_CAN_T_BE_GOT_LEADER_NODE_C3EF524D); throw new TableLostRuntimeException(getDatabaseName(), tableName); } } @@ -2038,9 +2061,10 @@ protected TsFileProcessor getOrCreateTsFileProcessor(long timeRangeId, boolean s if (IoTDBDescriptor.getInstance().getConfig().isQuotaEnable()) { if (!DataNodeSpaceQuotaManager.getInstance().checkRegionDisk(databaseName)) { throw new ExceedQuotaException( - "Unable to continue writing data, because the space allocated to the database " - + databaseName - + " has already used the upper limit", + String.format( + StorageEngineMessages + .STORAGE_EXCEPTION_UNABLE_TO_CONTINUE_WRITING_DATA_BECAUSE_THE_SPACE_ALLOCATED_9A5FB99E, + databaseName), TSStatusCode.SPACE_QUOTA_EXCEEDED.getStatusCode()); } } @@ -2053,7 +2077,8 @@ protected TsFileProcessor getOrCreateTsFileProcessor(long timeRangeId, boolean s } } catch (DiskSpaceInsufficientException e) { logger.error( - "disk space is insufficient when creating TsFile processor, change system mode to read-only", + StorageEngineMessages + .STORAGE_LOG_DISK_SPACE_IS_INSUFFICIENT_WHEN_CREATING_TSFILE_PROCESSOR_4032BAF0, e); CommonDescriptor.getInstance().getConfig().setNodeStatus(NodeStatus.ReadOnly); throw new WriteProcessException(e.getMessage(), e.getErrorCode(), true); @@ -2063,12 +2088,16 @@ protected TsFileProcessor getOrCreateTsFileProcessor(long timeRangeId, boolean s retryCnt++; } else { logger.error( - "meet IOException when creating TsFileProcessor, change system mode to error", e); + StorageEngineMessages + .STORAGE_LOG_MEET_IOEXCEPTION_WHEN_CREATING_TSFILEPROCESSOR_CHANGE_SYSTEM_4337F729, + e); CommonDescriptor.getInstance().getConfig().handleUnrecoverableError(); throw new WriteProcessException( String.format( - "Failed to create TsFileProcessor for database %s, timePartitionId %s", - databaseName, timeRangeId), + StorageEngineMessages + .STORAGE_EXCEPTION_FAILED_TO_CREATE_TSFILEPROCESSOR_FOR_DATABASE_S_TIMEPARTITIONID_0CD885BB, + databaseName, + timeRangeId), e); } } catch (ExceedQuotaException e) { @@ -2197,7 +2226,7 @@ public Future asyncCloseOneTsFileProcessor(boolean sequence, TsFileProcessor TsFileResource resource = tsFileProcessor.getTsFileResource(); logger.info( - "Async close tsfile: {}, file start time: {}, file end time: {}", + StorageEngineMessages.STORAGE_LOG_ASYNC_CLOSE_TSFILE_FILE_START_TIME_FILE_END_TIME_65020832, resource.getTsFile().getAbsolutePath(), resource.getFileStartTime(), resource.getFileEndTime()); @@ -2215,7 +2244,7 @@ public Future asyncCloseOneTsFileProcessor(boolean sequence, TsFileProcessor */ public void deleteFolder(String systemDir) { logger.info( - "{} will close all files for deleting data folder {}", + StorageEngineMessages.STORAGE_LOG_WILL_CLOSE_ALL_FILES_FOR_DELETING_DATA_FOLDER_93A5B15E, databaseName + "-" + dataRegionIdString, systemDir); int regionId = dataRegionId.getId(); @@ -2265,7 +2294,8 @@ public void closeAllResources() { /** delete tsfile */ public void syncDeleteDataFiles() throws TsFileProcessorException { logger.info( - "{} will close all files for deleting data files", databaseName + "-" + dataRegionIdString); + StorageEngineMessages.STORAGE_LOG_WILL_CLOSE_ALL_FILES_FOR_DELETING_DATA_FILES_7768D429, + databaseName + "-" + dataRegionIdString); writeLock("syncDeleteDataFiles"); try { forceCloseAllWorkingTsFileProcessors(); @@ -2295,7 +2325,8 @@ public void syncDeleteDataFiles() throws TsFileProcessorException { .removeTimePartitionInfo(new DataRegionId(Integer.parseInt(dataRegionIdString))); } catch (InterruptedException e) { logger.error( - "CloseFileNodeCondition error occurs while waiting for closing the storage " + "group {}", + StorageEngineMessages + .STORAGE_LOG_CLOSEFILENODECONDITION_ERROR_OCCURS_WHILE_WAITING_FOR_CLOSING_F33B72A6, databaseName + "-" + dataRegionIdString, e); Thread.currentThread().interrupt(); @@ -2378,7 +2409,8 @@ public void timedFlushSeqMemTable() { for (TsFileProcessor tsFileProcessor : tsFileProcessors) { if (tsFileProcessor.getWorkMemTableUpdateTime() < timeLowerBound) { logger.info( - "Exceed sequence memtable flush interval, so flush working memtable of time partition {} in database {}[{}]", + StorageEngineMessages + .STORAGE_LOG_EXCEED_SEQUENCE_MEMTABLE_FLUSH_INTERVAL_SO_FLUSH_WORKING_23513D66, tsFileProcessor.getTimeRangeId(), databaseName, dataRegionIdString); @@ -2404,7 +2436,8 @@ public void timedFlushUnseqMemTable() { for (TsFileProcessor tsFileProcessor : tsFileProcessors) { if (tsFileProcessor.getWorkMemTableUpdateTime() < timeLowerBound) { logger.info( - "Exceed unsequence memtable flush interval, so flush working memtable of time partition {} in database {}[{}]", + StorageEngineMessages + .STORAGE_LOG_EXCEED_UNSEQUENCE_MEMTABLE_FLUSH_INTERVAL_SO_FLUSH_WORKING_BADB0B75, tsFileProcessor.getTimeRangeId(), databaseName, dataRegionIdString); @@ -2429,7 +2462,8 @@ public void syncCloseAllWorkingTsFileProcessors() { } } catch (InterruptedException | ExecutionException e) { logger.error( - "CloseFileNodeCondition error occurs while waiting for closing tsfile processors of {}", + StorageEngineMessages + .STORAGE_LOG_CLOSEFILENODECONDITION_ERROR_OCCURS_WHILE_WAITING_FOR_CLOSING_C4B97CC0, databaseName + "-" + dataRegionIdString, e); Thread.currentThread().interrupt(); @@ -2463,7 +2497,8 @@ public void syncCloseWorkingTsFileProcessors(boolean sequence) { } } catch (InterruptedException | ExecutionException e) { logger.error( - "CloseFileNodeCondition error occurs while waiting for closing tsfile processors of {}", + StorageEngineMessages + .STORAGE_LOG_CLOSEFILENODECONDITION_ERROR_OCCURS_WHILE_WAITING_FOR_CLOSING_C4B97CC0, databaseName + "-" + dataRegionIdString, e); Thread.currentThread().interrupt(); @@ -2473,7 +2508,8 @@ public void syncCloseWorkingTsFileProcessors(boolean sequence) { private void waitClosingTsFileProcessorFinished() throws InterruptedException { long startTime = System.currentTimeMillis(); logger.info( - "Start to wait TsFiles to close, seq files: {}, unseq files: {}", + StorageEngineMessages + .STORAGE_LOG_START_TO_WAIT_TSFILES_TO_CLOSE_SEQ_FILES_UNSEQ_FILES_441F7130, closingSequenceTsFileProcessor, closingUnSequenceTsFileProcessor); while (!closingSequenceTsFileProcessor.isEmpty() @@ -2487,11 +2523,11 @@ private void waitClosingTsFileProcessorFinished() throws InterruptedException { } if (System.currentTimeMillis() - startTime > 60_000) { logger.warn( - "{} has spent {}s to wait for closing all TsFiles.", + StorageEngineMessages.STORAGE_LOG_HAS_SPENT_S_TO_WAIT_FOR_CLOSING_ALL_TSFILES_6C3EE4CE, databaseName + "-" + this.dataRegionIdString, (System.currentTimeMillis() - startTime) / 1000); logger.warn( - "Sseq files: {}, unseq files: {}", + StorageEngineMessages.STORAGE_LOG_SSEQ_FILES_UNSEQ_FILES_918AEB2A, closingSequenceTsFileProcessor, closingUnSequenceTsFileProcessor); } @@ -2505,7 +2541,8 @@ public List> asyncCloseAllWorkingTsFileProcessors() { int count = 0; try { logger.info( - "async force close all files in database: {}", databaseName + "-" + dataRegionIdString); + StorageEngineMessages.STORAGE_LOG_ASYNC_FORCE_CLOSE_ALL_FILES_IN_DATABASE_076AB4B9, + databaseName + "-" + dataRegionIdString); // to avoid concurrent modification problem, we need a new array list for (TsFileProcessor tsFileProcessor : new ArrayList<>(workSequenceTsFileProcessors.values())) { @@ -2530,7 +2567,8 @@ public void forceCloseAllWorkingTsFileProcessors() throws TsFileProcessorExcepti writeLock("forceCloseAllWorkingTsFileProcessors"); try { logger.info( - "force close all processors in database: {}", databaseName + "-" + dataRegionIdString); + StorageEngineMessages.STORAGE_LOG_FORCE_CLOSE_ALL_PROCESSORS_IN_DATABASE_68C9EB60, + databaseName + "-" + dataRegionIdString); // to avoid concurrent modification problem, we need a new array list List closedTsFileResources = new ArrayList<>(); for (TsFileProcessor tsFileProcessor : @@ -3018,7 +3056,8 @@ public void deleteByDevice(final MeasurementPath pattern, final DeleteDataNode n throws IOException { if (SettleService.getINSTANCE().getFilesToBeSettledCount().get() != 0) { throw new IOException( - "Delete failed. " + "Please do not delete until the old files settled."); + StorageEngineMessages + .STORAGE_EXCEPTION_DELETE_FAILED_PLEASE_DO_NOT_DELETE_UNTIL_THE_OLD_FILES_SETTLED_6C9F17CC); } final long startTime = node.getDeleteStartTime(); final long endTime = node.getDeleteEndTime(); @@ -3083,7 +3122,8 @@ public void deleteByTable(RelationalDeleteDataNode node) throws IOException { if (SettleService.getINSTANCE().getFilesToBeSettledCount().get() != 0) { throw new IOException( - "Delete failed. " + "Please do not delete until the old files settled."); + StorageEngineMessages + .STORAGE_EXCEPTION_DELETE_FAILED_PLEASE_DO_NOT_DELETE_UNTIL_THE_OLD_FILES_SETTLED_6C9F17CC); } List modEntries = node.getModEntries(); @@ -3191,7 +3231,8 @@ public void deleteDataDirectly(MeasurementPath pathToDelete, DeleteDataNode node final long endTime = node.getDeleteEndTime(); final long searchIndex = node.getSearchIndex(); logger.info( - "{} will delete data files directly for deleting data between {} and {}", + StorageEngineMessages + .STORAGE_LOG_WILL_DELETE_DATA_FILES_DIRECTLY_FOR_DELETING_DATA_BETWEEN_289DD3BF, databaseName + "-" + dataRegionIdString, startTime, endTime); @@ -3368,7 +3409,7 @@ private void deleteObjectFiles(List matchedObjectDirs, List sealedTsFiles, M device -> { if (logger.isDebugEnabled()) { logger.debug( - "device is {}, deviceTable is {}, tableDeletionEntry.getPredicate().matches(device) is {}", + StorageEngineMessages + .STORAGE_LOG_DEVICE_IS_DEVICETABLE_IS_TABLEDELETIONENTRY_GETPREDICATE_E84489E9, device, device.getTableName(), tableDeletionEntry.getPredicate().matches(device)); @@ -3542,7 +3584,8 @@ private void deleteDataInSealedFiles(Collection sealedTsFiles, M onlyOneTable = matchSize == devicesInFile.size(); if (logger.isDebugEnabled()) { logger.debug( - "tableName is {}, matchSize is {}, onlyOneTable is {}", + StorageEngineMessages + .STORAGE_LOG_TABLENAME_IS_MATCHSIZE_IS_ONLYONETABLE_IS_E20FAFAE, tableName, matchSize, onlyOneTable); @@ -3563,7 +3606,8 @@ private void deleteDataInSealedFiles(Collection sealedTsFiles, M if (logger.isDebugEnabled()) { logger.debug( - "tableName is {}, device is {}, deletionStartTime is {}, deletionEndTime is {}, fileStartTime is {}, fileEndTime is {}", + StorageEngineMessages + .STORAGE_LOG_TABLENAME_IS_DEVICE_IS_DELETIONSTARTTIME_IS_DELETIONENDTIME_B881E677, device.getTableName(), device, deletion.getStartTime(), @@ -3593,7 +3637,8 @@ private void deleteDataInSealedFiles(Collection sealedTsFiles, M StorageEngineMessages.EXPECT_IS_ACTUAL_IS, devicesInFile.size(), matchSize); for (TsFileResource tsFileResource : deletedByFiles) { logger.debug( - "delete tsFileResource is {}", tsFileResource.getTsFile().getAbsolutePath()); + StorageEngineMessages.STORAGE_LOG_DELETE_TSFILERESOURCE_IS_29F5A98C, + tsFileResource.getTsFile().getAbsolutePath()); } } } else { @@ -3615,7 +3660,8 @@ private void deleteDataInSealedFiles(Collection sealedTsFiles, M deleteTsFileCompletely(deletedByFiles); if (logger.isDebugEnabled()) { logger.debug( - "deleteTsFileCompletely execute successful, all tsfile are deleted successfully"); + StorageEngineMessages + .STORAGE_LOG_DELETETSFILECOMPLETELY_EXECUTE_SUCCESSFUL_ALL_TSFILE_ARE_D81FE0D7); } } @@ -3646,11 +3692,12 @@ private void deleteDataInSealedFiles(Collection sealedTsFiles, M exceptions.forEach( e -> logger.error(StorageEngineMessages.FAIL_TO_WRITE_MOD_ENTRY_TO_FILES, deletion, e)); throw new IOException( - "Multiple errors occurred while writing mod files, see logs for details."); + StorageEngineMessages + .STORAGE_EXCEPTION_MULTIPLE_ERRORS_OCCURRED_WHILE_WRITING_MOD_FILES_SEE_LOGS_529D7145); } } logger.info( - "[Deletion] Deletion {} is written into {} mod files", + StorageEngineMessages.STORAGE_LOG_DELETION_DELETION_IS_WRITTEN_INTO_MOD_FILES_DDCDF0AD, deletion, involvedModificationFiles.size()); } @@ -3700,7 +3747,9 @@ private void deleteDataDirectlyInFile(List tsfileResourceList, M // negative involvedModificationFile.close(); logger.debug( - "[Deletion] Deletion {} written into mods file:{}.", modEntry, involvedModificationFile); + StorageEngineMessages.STORAGE_LOG_DELETION_DELETION_WRITTEN_INTO_MODS_FILE_F5E26D2A, + modEntry, + involvedModificationFile); } // can be deleted by files @@ -3880,7 +3929,9 @@ public int executeTTLCheck() throws InterruptedException { return 0; } logger.info( - "[TTL] {}-{} Start ttl and modification checking.", databaseName, dataRegionIdString); + StorageEngineMessages.STORAGE_LOG_TTL_START_TTL_AND_MODIFICATION_CHECKING_A37AB173, + databaseName, + dataRegionIdString); CompactionScheduleContext context = new CompactionScheduleContext( EncryptDBUtils.getFirstEncryptParamFromDatabase(databaseName)); @@ -3903,7 +3954,8 @@ public int executeTTLCheck() throws InterruptedException { CompactionMetrics.getInstance().updateCompactionTaskSelectionNum(context); } logger.info( - "[TTL] {}-{} Totally select {} all-outdated files and {} partial-outdated files.", + StorageEngineMessages + .STORAGE_LOG_TTL_TOTALLY_SELECT_ALL_OUTDATED_FILES_AND_PARTIAL_OUTDATED_5246BD61, databaseName, dataRegionIdString, context.getFullyDirtyFileNum(), @@ -4023,7 +4075,10 @@ private void settleTsFileCallBack( } catch (IOException e) { logger.error(StorageEngineMessages.EXCEPTION_MOVE_NEW_TSFILE_IN_SETTLING, e); throw new WriteProcessException( - "Meet error when settling file: " + oldTsFileResource.getTsFile().getAbsolutePath(), e); + String.format( + StorageEngineMessages.STORAGE_EXCEPTION_MEET_ERROR_WHEN_SETTLING_FILE_S_4D6ECCEE, + oldTsFileResource.getTsFile().getAbsolutePath()), + e); } finally { oldTsFileResource.writeUnlock(); } @@ -4096,8 +4151,10 @@ public void loadNewTsFile( if (Objects.nonNull(impl) && !impl.isActive()) { throw new LoadFileException( String.format( - "Peer is inactive and not ready to write request, %s, DataNode Id: %s", - dataRegionId, IoTDBDescriptor.getInstance().getConfig().getDataNodeId())); + StorageEngineMessages + .STORAGE_EXCEPTION_PEER_IS_INACTIVE_AND_NOT_READY_TO_WRITE_REQUEST_S_DATANODE_EDFE5AEF, + dataRegionId, + IoTDBDescriptor.getInstance().getConfig().getDataNodeId())); } } @@ -4106,7 +4163,9 @@ public void loadNewTsFile( if (!TsFileValidator.getInstance().validateTsFile(newTsFileResource)) { throw new LoadFileException( - "tsfile validate failed, " + newTsFileResource.getTsFile().getName()); + String.format( + StorageEngineMessages.STORAGE_EXCEPTION_TSFILE_VALIDATE_FAILED_S_3CDE0677, + newTsFileResource.getTsFile().getName())); } TsFileLastReader lastReader = null; @@ -4131,7 +4190,7 @@ public void loadNewTsFile( try { if (deleted) { logger.info( - "Won't load TsFile {}, because region is deleted", + StorageEngineMessages.STORAGE_LOG_WON_T_LOAD_TSFILE_BECAUSE_REGION_IS_DELETED_0E72E8D0, tsfileToBeInserted.getAbsolutePath()); return; } @@ -4145,7 +4204,8 @@ public void loadNewTsFile( if (!newFileName.equals(tsfileToBeInserted.getName())) { logger.info( - "TsFile {} must be renamed to {} for loading into the unsequence list.", + StorageEngineMessages + .STORAGE_LOG_TSFILE_MUST_BE_RENAMED_TO_FOR_LOADING_INTO_THE_UNSEQUENCE_70321619, tsfileToBeInserted.getName(), newFileName); newTsFileResource.setFile( @@ -4199,7 +4259,8 @@ public void loadNewTsFile( logger.info(StorageEngineMessages.TSFILE_LOADED_IN_UNSEQ_LIST, newFileName); } catch (final DiskSpaceInsufficientException e) { logger.error( - "Failed to append the tsfile {} to database processor {} because the disk space is insufficient.", + StorageEngineMessages + .STORAGE_LOG_FAILED_TO_APPEND_THE_TSFILE_TO_DATABASE_PROCESSOR_BECAUSE_670341AE, tsfileToBeInserted.getAbsolutePath(), tsfileToBeInserted.getParentFile().getName()); throw new LoadFileException(e); @@ -4249,7 +4310,8 @@ private void onTsFileLoaded( break; default: logger.warn( - "Unrecognized LastCacheLoadStrategy: {}, fall back to CLEAN_ALL", + StorageEngineMessages + .STORAGE_LOG_UNRECOGNIZED_LASTCACHELOADSTRATEGY_FALL_BACK_TO_CLEAN_ALL_C200F32D, IoTDBDescriptor.getInstance().getConfig().getLastCacheLoadStrategy()); TreeDeviceSchemaCacheManager.getInstance().cleanUp(); break; @@ -4351,7 +4413,7 @@ private boolean loadTsFileToUnSequence( } logger.info( - "Load tsfile in unsequence list, move file from {} to {}", + StorageEngineMessages.STORAGE_LOG_LOAD_TSFILE_IN_UNSEQUENCE_LIST_MOVE_FILE_FROM_TO_21E11AEB, tsFileToLoad.getAbsolutePath(), targetFile.getAbsolutePath()); @@ -4377,14 +4439,18 @@ private boolean loadTsFileToUnSequence( } } catch (final IOException e) { logger.warn( - "File renaming failed when loading tsfile. Origin: {}, Target: {}", + StorageEngineMessages + .STORAGE_LOG_FILE_RENAMING_FAILED_WHEN_LOADING_TSFILE_ORIGIN_TARGET_28E43D85, tsFileToLoad.getAbsolutePath(), targetFile.getAbsolutePath(), e); throw new LoadFileException( String.format( - "File renaming failed when loading tsfile. Origin: %s, Target: %s, because %s", - tsFileToLoad.getAbsolutePath(), targetFile.getAbsolutePath(), e.getMessage())); + StorageEngineMessages + .STORAGE_EXCEPTION_FILE_RENAMING_FAILED_WHEN_LOADING_TSFILE_ORIGIN_S_TARGET_37BDA16F, + tsFileToLoad.getAbsolutePath(), + targetFile.getAbsolutePath(), + e.getMessage())); } final File resourceFileToLoad = @@ -4407,13 +4473,15 @@ private boolean loadTsFileToUnSequence( } } catch (final IOException e) { logger.warn( - "File renaming failed when loading .resource file. Origin: {}, Target: {}", + StorageEngineMessages + .STORAGE_LOG_FILE_RENAMING_FAILED_WHEN_LOADING_RESOURCE_FILE_ORIGIN_TARGET_9C22DDF3, resourceFileToLoad.getAbsolutePath(), targetResourceFile.getAbsolutePath(), e); throw new LoadFileException( String.format( - "File renaming failed when loading .resource file. Origin: %s, Target: %s, because %s", + StorageEngineMessages + .STORAGE_EXCEPTION_FILE_RENAMING_FAILED_WHEN_LOADING_RESOURCE_FILE_ORIGIN_S_9622AA6D, resourceFileToLoad.getAbsolutePath(), targetResourceFile.getAbsolutePath(), e.getMessage())); @@ -4482,14 +4550,18 @@ private void moveModFile(File modFileToLoad, File targetModFile, boolean deleteO } } catch (final IOException e) { logger.warn( - "File renaming failed when loading .mod file. Origin: {}, Target: {}", + StorageEngineMessages + .STORAGE_LOG_FILE_RENAMING_FAILED_WHEN_LOADING_MOD_FILE_ORIGIN_TARGET_18A212F3, modFileToLoad.getAbsolutePath(), targetModFile.getAbsolutePath(), e); throw new LoadFileException( String.format( - "File renaming failed when loading .mod file. Origin: %s, Target: %s, because %s", - modFileToLoad.getAbsolutePath(), targetModFile.getAbsolutePath(), e.getMessage())); + StorageEngineMessages + .STORAGE_EXCEPTION_FILE_RENAMING_FAILED_WHEN_LOADING_MOD_FILE_ORIGIN_S_TARGET_EEB4EDE7, + modFileToLoad.getAbsolutePath(), + targetModFile.getAbsolutePath(), + e.getMessage())); } } } @@ -4538,7 +4610,7 @@ public boolean unloadTsfile(File fileToBeUnloaded, File targetDir) throws IOExce try { tsFileResourceToBeMoved.moveTo(targetDir); logger.info( - "Move tsfile {} to target dir {} successfully.", + StorageEngineMessages.STORAGE_LOG_MOVE_TSFILE_TO_TARGET_DIR_SUCCESSFULLY_57288783, tsFileResourceToBeMoved.getTsFile(), targetDir.getPath()); } finally { @@ -4855,7 +4927,8 @@ public void insertTablets(InsertMultiTabletsNode insertMultiTabletsNode) try { if (deleted) { logger.info( - "Won't insert tablets {}, because region is deleted", + StorageEngineMessages + .STORAGE_LOG_WON_T_INSERT_TABLETS_BECAUSE_REGION_IS_DELETED_48E9720F, insertMultiTabletsNode.getSearchIndex()); return; } @@ -5117,10 +5190,11 @@ private void acquireDirectBufferMemory() throws DataRegionException { long acquireDirectBufferMemCost = getAcquireDirectBufferMemCost(); if (!SystemInfo.getInstance().addDirectBufferMemoryCost(acquireDirectBufferMemCost)) { throw new DataRegionException( - "Total allocated memory for direct buffer will be " - + (SystemInfo.getInstance().getDirectBufferMemoryCost() + acquireDirectBufferMemCost) - + ", which is greater than limit mem cost: " - + SystemInfo.getInstance().getTotalDirectBufferMemorySizeLimit()); + String.format( + StorageEngineMessages + .STORAGE_EXCEPTION_TOTAL_ALLOCATED_MEMORY_FOR_DIRECT_BUFFER_WILL_BE_S_WHICH_FD7DC149, + (SystemInfo.getInstance().getDirectBufferMemoryCost() + acquireDirectBufferMemCost), + SystemInfo.getInstance().getTotalDirectBufferMemorySizeLimit())); } this.directBufferMemoryCost = acquireDirectBufferMemCost; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/exception/BatchCompactionCannotAlignedException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/exception/BatchCompactionCannotAlignedException.java index 10b2154aef5d6..2bc705cf0466e 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/exception/BatchCompactionCannotAlignedException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/exception/BatchCompactionCannotAlignedException.java @@ -19,6 +19,7 @@ package org.apache.iotdb.db.storageengine.dataregion.compaction.execute.exception; +import org.apache.iotdb.db.i18n.StorageEngineMessages; import org.apache.iotdb.db.storageengine.dataregion.compaction.execute.utils.executor.batch.utils.BatchCompactionPlan; import org.apache.iotdb.db.storageengine.dataregion.compaction.execute.utils.executor.batch.utils.CompactChunkPlan; @@ -31,16 +32,20 @@ public BatchCompactionCannotAlignedException( PageHeader pageHeader, CompactChunkPlan compactChunkPlan, int pageIndex) { super( String.format( - "Current page %s cannot be aligned with time chunk %s, page index is %s", - pageHeader, compactChunkPlan, pageIndex)); + StorageEngineMessages.CURRENT_PAGE_CANNOT_BE_ALIGNED_WITH_TIME_CHUNK_FMT, + pageHeader, + compactChunkPlan, + pageIndex)); } public BatchCompactionCannotAlignedException( Statistics pageStatistics, CompactChunkPlan compactChunkPlan, int pageIndex) { super( String.format( - "Current page %s cannot be aligned with time chunk %s, page index is %s", - pageStatistics, compactChunkPlan, pageIndex)); + StorageEngineMessages.CURRENT_PAGE_CANNOT_BE_ALIGNED_WITH_TIME_CHUNK_FMT, + pageStatistics, + compactChunkPlan, + pageIndex)); } public BatchCompactionCannotAlignedException( @@ -49,7 +54,9 @@ public BatchCompactionCannotAlignedException( BatchCompactionPlan batchCompactionPlan) { super( String.format( - "Current chunk %s cannot be aligned with time chunk: %s, all time chunk in first batch is %s", - chunkMetadata, compactChunkPlan, batchCompactionPlan)); + StorageEngineMessages.CURRENT_CHUNK_CANNOT_BE_ALIGNED_WITH_TIME_CHUNK_FMT, + chunkMetadata, + compactChunkPlan, + batchCompactionPlan)); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/exception/CompactionExceptionHandler.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/exception/CompactionExceptionHandler.java index 221017015bc3d..cef2f7882a2ae 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/exception/CompactionExceptionHandler.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/exception/CompactionExceptionHandler.java @@ -20,6 +20,7 @@ package org.apache.iotdb.db.storageengine.dataregion.compaction.execute.exception; import org.apache.iotdb.commons.conf.IoTDBConstant; +import org.apache.iotdb.db.i18n.StorageEngineMessages; import org.apache.iotdb.db.storageengine.dataregion.compaction.execute.utils.CompactionUtils; import org.apache.iotdb.db.storageengine.dataregion.tsfile.TsFileManager; import org.apache.iotdb.db.storageengine.dataregion.tsfile.TsFileResource; @@ -63,9 +64,8 @@ public static void handleException( return; } LOGGER.info( - "{} [Compaction][ExceptionHandler] {} space compaction start handling exception, " - + "source seqFiles is {}, " - + "source unseqFiles is {}.", + StorageEngineMessages + .STORAGE_LOG_COMPACTION_EXCEPTIONHANDLER_SPACE_COMPACTION_START_HANDLING_1B55549F, fullStorageGroupName, compactionType, seqResourceList, @@ -101,8 +101,8 @@ public static void handleException( if (!handleSuccess) { LOGGER.error( - "[Compaction][ExceptionHandler] Fail to handle {} space compaction exception, " - + "storage group is {}", + StorageEngineMessages + .STORAGE_LOG_COMPACTION_EXCEPTIONHANDLER_FAIL_TO_HANDLE_SPACE_COMPACTION_B21F170F, compactionType, fullStorageGroupName); } else { @@ -111,8 +111,8 @@ public static void handleException( } catch (IOException e) { // catch throwable when handling exception LOGGER.error( - "[Compaction][ExceptionHandler] exception occurs when handling exception in {} space compaction. " - + "storage group is {}", + StorageEngineMessages + .STORAGE_LOG_COMPACTION_EXCEPTIONHANDLER_EXCEPTION_OCCURS_WHEN_HANDLING_B6C9751E, compactionType, fullStorageGroupName); } @@ -165,7 +165,8 @@ private static boolean handleWhenAllSourceFilesExist( targetTsFile.writeLock(); if (!targetTsFile.remove()) { LOGGER.error( - "{} [Compaction][Exception] fail to delete target tsfile {} when handling exception", + StorageEngineMessages + .STORAGE_LOG_COMPACTION_EXCEPTION_FAIL_TO_DELETE_TARGET_TSFILE_WHEN_HANDLING_DC19DC8A, fullStorageGroupName, targetTsFile); removeAllTargetFile = false; @@ -247,8 +248,8 @@ private static boolean checkIsTargetFilesComplete( } if (!TsFileUtils.isTsFileComplete(targetResource.getTsFile())) { LOGGER.error( - "{} [Compaction][ExceptionHandler] target file {} is not complete, " - + "and some source files {} is lost, do nothing.", + StorageEngineMessages + .STORAGE_LOG_COMPACTION_EXCEPTIONHANDLER_TARGET_FILE_IS_NOT_COMPLETE_91E81106, fullStorageGroupName, targetResource, lostSourceResources); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/exception/CompactionLastTimeCheckFailedException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/exception/CompactionLastTimeCheckFailedException.java index 61bb138b1d01b..684cef4f931d9 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/exception/CompactionLastTimeCheckFailedException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/exception/CompactionLastTimeCheckFailedException.java @@ -20,6 +20,7 @@ package org.apache.iotdb.db.storageengine.dataregion.compaction.execute.exception; import org.apache.iotdb.commons.conf.IoTDBConstant; +import org.apache.iotdb.db.i18n.StorageEngineMessages; import org.apache.tsfile.file.metadata.IDeviceID; @@ -28,25 +29,21 @@ public class CompactionLastTimeCheckFailedException extends RuntimeException { public CompactionLastTimeCheckFailedException( String path, long currentTimestamp, long lastTimestamp) { super( - "Timestamp of the current point of " - + path - + " is " - + currentTimestamp - + ", which should be later than the last time " - + lastTimestamp); + String.format( + StorageEngineMessages.CURRENT_POINT_TIMESTAMP_SHOULD_BE_LATER_FMT, + path, + currentTimestamp, + lastTimestamp)); } public CompactionLastTimeCheckFailedException( IDeviceID device, String measurement, long currentTimestamp, long lastTimestamp) { super( - "Timestamp of the current point of " - + device - + IoTDBConstant.PATH_SEPARATOR - + measurement - + " is " - + currentTimestamp - + ", which should be later than the last time " - + lastTimestamp); + String.format( + StorageEngineMessages.CURRENT_POINT_TIMESTAMP_SHOULD_BE_LATER_FMT, + device.toString() + IoTDBConstant.PATH_SEPARATOR + measurement, + currentTimestamp, + lastTimestamp)); } @Override diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/exception/CompactionStatisticsCheckFailedException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/exception/CompactionStatisticsCheckFailedException.java index 9fe58c760424e..eb63f2c31fd00 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/exception/CompactionStatisticsCheckFailedException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/exception/CompactionStatisticsCheckFailedException.java @@ -19,6 +19,8 @@ package org.apache.iotdb.db.storageengine.dataregion.compaction.execute.exception; +import org.apache.iotdb.db.i18n.StorageEngineMessages; + import org.apache.tsfile.file.header.PageHeader; import org.apache.tsfile.file.metadata.ChunkMetadata; import org.apache.tsfile.file.metadata.IDeviceID; @@ -36,10 +38,10 @@ public CompactionStatisticsCheckFailedException( super( getExceptionMsg( deviceID, - "The time range of current device is " - + deviceTimeRange - + ", which should equals actual device time range " - + actualDeviceTimeRange)); + String.format( + StorageEngineMessages.CURRENT_DEVICE_TIME_RANGE_MISMATCH_FMT, + deviceTimeRange, + actualDeviceTimeRange))); } public CompactionStatisticsCheckFailedException( @@ -47,10 +49,10 @@ public CompactionStatisticsCheckFailedException( super( getExceptionMsg( deviceID, - "Current timeseriesMetadata is " - + timeseriesMetadata - + ", which should equals actual time range " - + actualTimeRange)); + String.format( + StorageEngineMessages.CURRENT_TIMESERIES_METADATA_MISMATCH_FMT, + timeseriesMetadata, + actualTimeRange))); } public CompactionStatisticsCheckFailedException( @@ -58,10 +60,10 @@ public CompactionStatisticsCheckFailedException( super( getExceptionMsg( deviceID, - "Current chunkMetadata is " - + chunkMetadata - + ", which should equals actual chunk time range " - + actualChunkTimeRange)); + String.format( + StorageEngineMessages.CURRENT_CHUNK_METADATA_MISMATCH_FMT, + chunkMetadata, + actualChunkTimeRange))); } public CompactionStatisticsCheckFailedException( @@ -69,14 +71,15 @@ public CompactionStatisticsCheckFailedException( super( getExceptionMsg( deviceID, - "Current page is " - + pageHeader - + ", which should contains actual page data time range " - + pageDataTimeRange)); + String.format( + StorageEngineMessages.CURRENT_PAGE_TIME_RANGE_MISMATCH_FMT, + pageHeader, + pageDataTimeRange))); } private static String getExceptionMsg(IDeviceID deviceID, String detail) { - return "The device(" + deviceID + ")'s time range verification failed. " + detail; + return String.format( + StorageEngineMessages.DEVICE_TIME_RANGE_VERIFICATION_FAILED_FMT, deviceID, detail); } @Override diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/exception/CompactionValidationFailedException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/exception/CompactionValidationFailedException.java index 0d7abc2c6836b..97571fff61a93 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/exception/CompactionValidationFailedException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/exception/CompactionValidationFailedException.java @@ -19,6 +19,7 @@ package org.apache.iotdb.db.storageengine.dataregion.compaction.execute.exception; +import org.apache.iotdb.db.i18n.StorageEngineMessages; import org.apache.iotdb.db.storageengine.dataregion.tsfile.TsFileResource; import java.util.List; @@ -32,8 +33,9 @@ public CompactionValidationFailedException(String msg) { public CompactionValidationFailedException(List overlappedTsFileResources) { super( - "Failed to pass compaction validation, sequence files has overlap, file is " - + overlappedTsFileResources); + String.format( + StorageEngineMessages.COMPACTION_VALIDATION_SEQUENCE_FILES_HAS_OVERLAP_FMT, + overlappedTsFileResources)); this.overlappedTsFileResources = overlappedTsFileResources; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/exception/FileCannotTransitToCompactingException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/exception/FileCannotTransitToCompactingException.java index d14ae4a44db4a..e488963d781e2 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/exception/FileCannotTransitToCompactingException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/exception/FileCannotTransitToCompactingException.java @@ -19,13 +19,15 @@ package org.apache.iotdb.db.storageengine.dataregion.compaction.execute.exception; +import org.apache.iotdb.db.i18n.StorageEngineMessages; import org.apache.iotdb.db.storageengine.dataregion.tsfile.TsFileResource; public class FileCannotTransitToCompactingException extends Exception { public FileCannotTransitToCompactingException(TsFileResource f) { super( - String.format("TsFile %s cannot transit to COMPACTING. its status: %s", f, f.getStatus())); + String.format( + StorageEngineMessages.TSFILE_CANNOT_TRANSIT_TO_COMPACTING_FMT, f, f.getStatus())); } public FileCannotTransitToCompactingException() {} diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/performer/ICompactionPerformer.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/performer/ICompactionPerformer.java index 1dc24d12f700e..8b1ffc971d0c9 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/performer/ICompactionPerformer.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/performer/ICompactionPerformer.java @@ -19,6 +19,7 @@ package org.apache.iotdb.db.storageengine.dataregion.compaction.execute.performer; +import org.apache.iotdb.db.i18n.StorageEngineMessages; import org.apache.iotdb.db.storageengine.dataregion.compaction.execute.exception.IllegalSourceFileTypeException; import org.apache.iotdb.db.storageengine.dataregion.compaction.execute.task.CompactionTaskSummary; import org.apache.iotdb.db.storageengine.dataregion.tsfile.TsFileResource; @@ -42,11 +43,13 @@ public interface ICompactionPerformer { default void setSourceFiles(List files) { throw new IllegalSourceFileTypeException( - "Cannot set single type of source files to this kind of performer"); + StorageEngineMessages + .STORAGE_EXCEPTION_CANNOT_SET_SINGLE_TYPE_OF_SOURCE_FILES_TO_THIS_KIND_OF_PERFORMER_6B422172); } default void setSourceFiles(List seqFiles, List unseqFiles) { throw new IllegalSourceFileTypeException( - "Cannot set both seq files and unseq files to this kind of performer"); + StorageEngineMessages + .STORAGE_EXCEPTION_CANNOT_SET_BOTH_SEQ_FILES_AND_UNSEQ_FILES_TO_THIS_KIND_OF_F68F629E); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/performer/constant/CrossCompactionPerformer.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/performer/constant/CrossCompactionPerformer.java index 2e5ff20f96405..78981178e2bda 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/performer/constant/CrossCompactionPerformer.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/performer/constant/CrossCompactionPerformer.java @@ -20,6 +20,7 @@ package org.apache.iotdb.db.storageengine.dataregion.compaction.execute.performer.constant; import org.apache.iotdb.commons.utils.TestOnly; +import org.apache.iotdb.db.i18n.StorageEngineMessages; import org.apache.iotdb.db.storageengine.dataregion.compaction.execute.exception.IllegalCompactionPerformerException; import org.apache.iotdb.db.storageengine.dataregion.compaction.execute.performer.ICrossCompactionPerformer; import org.apache.iotdb.db.storageengine.dataregion.compaction.execute.performer.impl.FastCompactionPerformer; @@ -38,7 +39,10 @@ public static CrossCompactionPerformer getCrossCompactionPerformer(String name) return FAST; } throw new IllegalCompactionPerformerException( - "Illegal compaction performer for cross compaction " + name); + String.format( + StorageEngineMessages + .STORAGE_EXCEPTION_ILLEGAL_COMPACTION_PERFORMER_FOR_CROSS_COMPACTION_S_17C6E05D, + name)); } @TestOnly @@ -50,7 +54,10 @@ public ICrossCompactionPerformer createInstance() { return new FastCompactionPerformer(true); default: throw new IllegalCompactionPerformerException( - "Illegal compaction performer for cross compaction " + this); + String.format( + StorageEngineMessages + .STORAGE_EXCEPTION_ILLEGAL_COMPACTION_PERFORMER_FOR_CROSS_COMPACTION_S_17C6E05D, + this)); } } @@ -62,7 +69,10 @@ public ICrossCompactionPerformer createInstance(EncryptParameter encryptParamete return new FastCompactionPerformer(true, encryptParameter); default: throw new IllegalCompactionPerformerException( - "Illegal compaction performer for cross compaction " + this); + String.format( + StorageEngineMessages + .STORAGE_EXCEPTION_ILLEGAL_COMPACTION_PERFORMER_FOR_CROSS_COMPACTION_S_17C6E05D, + this)); } } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/performer/constant/InnerSeqCompactionPerformer.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/performer/constant/InnerSeqCompactionPerformer.java index f64597e25d40f..e87678ca6cf38 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/performer/constant/InnerSeqCompactionPerformer.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/performer/constant/InnerSeqCompactionPerformer.java @@ -20,6 +20,7 @@ package org.apache.iotdb.db.storageengine.dataregion.compaction.execute.performer.constant; import org.apache.iotdb.commons.utils.TestOnly; +import org.apache.iotdb.db.i18n.StorageEngineMessages; import org.apache.iotdb.db.storageengine.dataregion.compaction.execute.exception.IllegalCompactionPerformerException; import org.apache.iotdb.db.storageengine.dataregion.compaction.execute.performer.ISeqCompactionPerformer; import org.apache.iotdb.db.storageengine.dataregion.compaction.execute.performer.impl.FastCompactionPerformer; @@ -38,7 +39,10 @@ public static InnerSeqCompactionPerformer getInnerSeqCompactionPerformer(String return FAST; } throw new IllegalCompactionPerformerException( - "Illegal compaction performer for seq inner compaction " + name); + String.format( + StorageEngineMessages + .STORAGE_EXCEPTION_ILLEGAL_COMPACTION_PERFORMER_FOR_SEQ_INNER_COMPACTION_S_2C2F1F66, + name)); } @TestOnly @@ -50,7 +54,10 @@ public ISeqCompactionPerformer createInstance() { return new FastCompactionPerformer(false); default: throw new IllegalCompactionPerformerException( - "Illegal compaction performer for seq inner compaction " + this); + String.format( + StorageEngineMessages + .STORAGE_EXCEPTION_ILLEGAL_COMPACTION_PERFORMER_FOR_SEQ_INNER_COMPACTION_S_2C2F1F66, + this)); } } @@ -62,7 +69,10 @@ public ISeqCompactionPerformer createInstance(EncryptParameter encryptParameter) return new FastCompactionPerformer(false, encryptParameter); default: throw new IllegalCompactionPerformerException( - "Illegal compaction performer for seq inner compaction " + this); + String.format( + StorageEngineMessages + .STORAGE_EXCEPTION_ILLEGAL_COMPACTION_PERFORMER_FOR_SEQ_INNER_COMPACTION_S_2C2F1F66, + this)); } } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/performer/constant/InnerUnseqCompactionPerformer.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/performer/constant/InnerUnseqCompactionPerformer.java index 857a5f63924ba..bbb9b5c520e09 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/performer/constant/InnerUnseqCompactionPerformer.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/performer/constant/InnerUnseqCompactionPerformer.java @@ -20,6 +20,7 @@ package org.apache.iotdb.db.storageengine.dataregion.compaction.execute.performer.constant; import org.apache.iotdb.commons.utils.TestOnly; +import org.apache.iotdb.db.i18n.StorageEngineMessages; import org.apache.iotdb.db.storageengine.dataregion.compaction.execute.exception.IllegalCompactionPerformerException; import org.apache.iotdb.db.storageengine.dataregion.compaction.execute.performer.IUnseqCompactionPerformer; import org.apache.iotdb.db.storageengine.dataregion.compaction.execute.performer.impl.FastCompactionPerformer; @@ -38,7 +39,10 @@ public static InnerUnseqCompactionPerformer getInnerUnseqCompactionPerformer(Str return FAST; } throw new IllegalCompactionPerformerException( - "Illegal compaction performer for unseq inner compaction " + name); + String.format( + StorageEngineMessages + .STORAGE_EXCEPTION_ILLEGAL_COMPACTION_PERFORMER_FOR_UNSEQ_INNER_COMPACTION_50D566DF, + name)); } @TestOnly @@ -50,7 +54,10 @@ public IUnseqCompactionPerformer createInstance() { return new FastCompactionPerformer(false); default: throw new IllegalCompactionPerformerException( - "Illegal compaction performer for unseq inner compaction " + this); + String.format( + StorageEngineMessages + .STORAGE_EXCEPTION_ILLEGAL_COMPACTION_PERFORMER_FOR_UNSEQ_INNER_COMPACTION_50D566DF, + this)); } } @@ -62,7 +69,10 @@ public IUnseqCompactionPerformer createInstance(EncryptParameter encryptParamete return new FastCompactionPerformer(false, encryptParameter); default: throw new IllegalCompactionPerformerException( - "Illegal compaction performer for unseq inner compaction " + this); + String.format( + StorageEngineMessages + .STORAGE_EXCEPTION_ILLEGAL_COMPACTION_PERFORMER_FOR_UNSEQ_INNER_COMPACTION_50D566DF, + this)); } } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/performer/impl/FastCompactionPerformer.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/performer/impl/FastCompactionPerformer.java index 428d85c55396a..9b57f56499a5d 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/performer/impl/FastCompactionPerformer.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/performer/impl/FastCompactionPerformer.java @@ -362,8 +362,8 @@ public void setTargetFiles(List targetFiles) { public void setSummary(CompactionTaskSummary summary) { if (!(summary instanceof FastCompactionTaskSummary)) { throw new IllegalCompactionTaskSummaryException( - "CompactionTaskSummary for FastCompactionPerformer " - + "should be FastCompactionTaskSummary"); + StorageEngineMessages + .STORAGE_EXCEPTION_COMPACTIONTASKSUMMARY_FOR_FASTCOMPACTIONPERFORMER_SHOULD_F5710AA8); } this.subTaskSummary = (FastCompactionTaskSummary) summary; } @@ -378,7 +378,9 @@ private void checkThreadInterrupted() throws InterruptedException { if (Thread.interrupted() || subTaskSummary.isCancel()) { throw new InterruptedException( String.format( - "[Compaction] compaction for target file %s abort", targetFiles.toString())); + StorageEngineMessages + .STORAGE_EXCEPTION_COMPACTION_COMPACTION_FOR_TARGET_FILE_S_ABORT_46ECFF41, + targetFiles.toString())); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/performer/impl/ReadChunkCompactionPerformer.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/performer/impl/ReadChunkCompactionPerformer.java index 4a6c639e30323..da2e15db500d4 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/performer/impl/ReadChunkCompactionPerformer.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/performer/impl/ReadChunkCompactionPerformer.java @@ -25,6 +25,7 @@ import org.apache.iotdb.commons.utils.TestOnly; import org.apache.iotdb.db.conf.IoTDBDescriptor; import org.apache.iotdb.db.exception.StorageEngineException; +import org.apache.iotdb.db.i18n.StorageEngineMessages; import org.apache.iotdb.db.storageengine.dataregion.compaction.execute.performer.ISeqCompactionPerformer; import org.apache.iotdb.db.storageengine.dataregion.compaction.execute.task.CompactionTaskSummary; import org.apache.iotdb.db.storageengine.dataregion.compaction.execute.utils.CompactionTableSchemaCollector; @@ -270,7 +271,10 @@ private void compactAlignedSeries( private void checkThreadInterrupted() throws InterruptedException { if (Thread.interrupted() || summary.isCancel()) { throw new InterruptedException( - String.format("[Compaction] compaction for target files %s abort", targetResources)); + String.format( + StorageEngineMessages + .STORAGE_EXCEPTION_COMPACTION_COMPACTION_FOR_TARGET_FILES_S_ABORT_AFC87906, + targetResources)); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/performer/impl/ReadPointCompactionPerformer.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/performer/impl/ReadPointCompactionPerformer.java index d4c075da5293e..8ba6cebb82de0 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/performer/impl/ReadPointCompactionPerformer.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/performer/impl/ReadPointCompactionPerformer.java @@ -25,6 +25,7 @@ import org.apache.iotdb.commons.path.NonAlignedFullPath; import org.apache.iotdb.commons.utils.TestOnly; import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.i18n.StorageEngineMessages; import org.apache.iotdb.db.queryengine.execution.fragment.FragmentInstanceContext; import org.apache.iotdb.db.storageengine.dataregion.compaction.execute.performer.ICrossCompactionPerformer; import org.apache.iotdb.db.storageengine.dataregion.compaction.execute.performer.IUnseqCompactionPerformer; @@ -364,7 +365,9 @@ private void checkThreadInterrupted() throws InterruptedException { if (Thread.interrupted() || summary.isCancel()) { throw new InterruptedException( String.format( - "[Compaction] compaction for target file %s abort", targetFiles.toString())); + StorageEngineMessages + .STORAGE_EXCEPTION_COMPACTION_COMPACTION_FOR_TARGET_FILE_S_ABORT_46ECFF41, + targetFiles.toString())); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/recover/CompactionRecoverManager.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/recover/CompactionRecoverManager.java index c0980b7dd288f..edb730747bb40 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/recover/CompactionRecoverManager.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/recover/CompactionRecoverManager.java @@ -75,7 +75,8 @@ public void recoverCompaction() { new File( dir + File.separator + logicalStorageGroupName + File.separator + dataRegionId); logger.info( - "{} [Compaction][Recover] recover compaction in data region dir {}", + StorageEngineMessages + .STORAGE_LOG_COMPACTION_RECOVER_RECOVER_COMPACTION_IN_DATA_REGION_DIR_ABD144CC, logicalStorageGroupName, storageGroupDir.getAbsolutePath()); if (!storageGroupDir.exists()) { @@ -91,7 +92,8 @@ public void recoverCompaction() { continue; } logger.info( - "{} [Compaction][Recover] recover compaction in time partition dir {}", + StorageEngineMessages + .STORAGE_LOG_COMPACTION_RECOVER_RECOVER_COMPACTION_IN_TIME_PARTITION_FA2FC44D, logicalStorageGroupName, timePartitionDir.getAbsolutePath()); // including repair task @@ -125,7 +127,9 @@ public void recoverModSettleFile(Path timePartitionDir) { } } catch (IOException e) { logger.error( - "recover mods file error on delete origin file or rename mods settle,", e); + StorageEngineMessages + .STORAGE_LOG_RECOVER_MODS_FILE_ERROR_ON_DELETE_ORIGIN_FILE_OR_RENAME_7033152A, + e); } }); } catch (IOException e) { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/recover/CompactionRecoverTask.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/recover/CompactionRecoverTask.java index bf4e57748dc58..04a093807765b 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/recover/CompactionRecoverTask.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/recover/CompactionRecoverTask.java @@ -68,11 +68,14 @@ public CompactionRecoverTask( public void doCompaction() { boolean recoverSuccess = true; LOGGER.info( - "{} [Compaction][Recover] compaction log is {}", fullStorageGroupName, compactionLogFile); + StorageEngineMessages.STORAGE_LOG_COMPACTION_RECOVER_COMPACTION_LOG_IS_0C57C7DA, + fullStorageGroupName, + compactionLogFile); try { if (compactionLogFile.exists()) { LOGGER.info( - "{} [Compaction][Recover] compaction log file {} exists, start to recover it", + StorageEngineMessages + .STORAGE_LOG_COMPACTION_RECOVER_COMPACTION_LOG_FILE_EXISTS_START_TO_RECOVER_74836930, fullStorageGroupName, compactionLogFile); CompactionLogAnalyzer logAnalyzer = new CompactionLogAnalyzer(compactionLogFile); @@ -85,7 +88,9 @@ public void doCompaction() { // compaction log file is incomplete if (targetFileIdentifiers.isEmpty() || sourceFileIdentifiers.isEmpty()) { LOGGER.info( - "{} [Compaction][Recover] incomplete log file, abort recover", fullStorageGroupName); + StorageEngineMessages + .STORAGE_LOG_COMPACTION_RECOVER_INCOMPLETE_LOG_FILE_ABORT_RECOVER_46472E7C, + fullStorageGroupName); return; } @@ -118,13 +123,15 @@ public void doCompaction() { if (compactionLogFile.exists()) { try { LOGGER.info( - "{} [Compaction][Recover] Recover compaction successfully, delete log file {}", + StorageEngineMessages + .STORAGE_LOG_COMPACTION_RECOVER_RECOVER_COMPACTION_SUCCESSFULLY_DELETE_8451AEFB, fullStorageGroupName, compactionLogFile); FileUtils.delete(compactionLogFile); } catch (IOException e) { LOGGER.error( - "{} [Compaction][Recover] Exception occurs while deleting log file {}", + StorageEngineMessages + .STORAGE_LOG_COMPACTION_RECOVER_EXCEPTION_OCCURS_WHILE_DELETING_LOG_FILE_49A24E1D, fullStorageGroupName, compactionLogFile, e); @@ -141,7 +148,8 @@ public void doCompaction() { private boolean handleWithAllSourceFilesExist( List targetFileIdentifiers, List sourceFileIdentifiers) { LOGGER.info( - "{} [Compaction][Recover] all source files exists, delete all target files.", + StorageEngineMessages + .STORAGE_LOG_COMPACTION_RECOVER_ALL_SOURCE_FILES_EXISTS_DELETE_ALL_TARGET_79954E60, fullStorageGroupName); // remove tmp target files and target files @@ -169,7 +177,8 @@ private boolean handleWithAllSourceFilesExist( // failed to remove tmp target tsfile // system should not carry out the subsequent compaction in case of data redundant LOGGER.error( - "{} [Compaction][Recover] failed to remove target file {}", + StorageEngineMessages + .STORAGE_LOG_COMPACTION_RECOVER_FAILED_TO_REMOVE_TARGET_FILE_35A1E718, fullStorageGroupName, targetResource); return false; @@ -185,7 +194,8 @@ private boolean handleWithAllSourceFilesExist( CompactionUtils.deleteCompactionModsFile(sourceTsFileResourceList, Collections.emptyList()); } catch (IOException e) { LOGGER.error( - "{} [Compaction][Recover] Exception occurs while deleting compaction mods file", + StorageEngineMessages + .STORAGE_LOG_COMPACTION_RECOVER_EXCEPTION_OCCURS_WHILE_DELETING_COMPACTION_218A56FB, fullStorageGroupName, e); return false; @@ -258,8 +268,8 @@ private boolean checkIsTargetFilesComplete( if (targetFile == null || !TsFileUtils.isTsFileComplete(new TsFileResource(targetFile).getTsFile())) { LOGGER.error( - "{} [Compaction][ExceptionHandler] target file {} is not complete, " - + "and some source files is lost, do nothing.", + StorageEngineMessages + .STORAGE_LOG_COMPACTION_EXCEPTIONHANDLER_TARGET_FILE_IS_NOT_COMPLETE_865ADA73, fullStorageGroupName, targetFileIdentifier.getFilePath()); return false; @@ -334,7 +344,8 @@ private boolean checkAndDeleteFile(File file) { Files.delete(file.toPath()); } catch (IOException e) { LOGGER.error( - "{} [Compaction][Recover] failed to remove file {}, exception: {}", + StorageEngineMessages + .STORAGE_LOG_COMPACTION_RECOVER_FAILED_TO_REMOVE_FILE_EXCEPTION_67CEA8E7, fullStorageGroupName, file, e); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/AbstractCompactionTask.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/AbstractCompactionTask.java index 0f6e927a4656c..6959d3cbf034a 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/AbstractCompactionTask.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/AbstractCompactionTask.java @@ -23,6 +23,7 @@ import org.apache.iotdb.commons.utils.TestOnly; import org.apache.iotdb.db.conf.IoTDBDescriptor; import org.apache.iotdb.db.exception.ChunkTypeInconsistentException; +import org.apache.iotdb.db.i18n.StorageEngineMessages; import org.apache.iotdb.db.service.metrics.CompactionMetrics; import org.apache.iotdb.db.storageengine.dataregion.compaction.constant.CompactionTaskType; import org.apache.iotdb.db.storageengine.dataregion.compaction.execute.exception.CompactionFileCountExceededException; @@ -140,7 +141,7 @@ protected void handleException(Logger logger, Exception e) { if (e instanceof CompactionLastTimeCheckFailedException || e instanceof CompactionValidationFailedException) { logger.error( - "{}-{} [Compaction] {} task meets error: {}.", + StorageEngineMessages.STORAGE_LOG_COMPACTION_TASK_MEETS_ERROR_1002C659, storageGroupName, dataRegionId, getCompactionTaskType(), @@ -168,7 +169,7 @@ protected void handleException(Logger logger, Exception e) { || !tsFileManager.isAllowCompaction() || CompactionTaskManager.getInstance().isStopAllCompactionWorker()) { logger.warn( - "{}-{} [Compaction] {} task interrupted", + StorageEngineMessages.STORAGE_LOG_COMPACTION_TASK_INTERRUPTED_E31121C0, storageGroupName, dataRegionId, getCompactionTaskType()); @@ -177,17 +178,15 @@ protected void handleException(Logger logger, Exception e) { ChunkTypeInconsistentException chunkTypeInconsistentException = (ChunkTypeInconsistentException) e; logger.error( - "Unexpected chunk type detected when reading non-aligned chunk reader. " - + "The chunk metadata indicates a non-aligned chunk, " - + "but the actual chunk read from tsfile is a value chunk of aligned series. " - + "tsFile={}, device={}, measurement={}, offsetOfChunkHeader={}", + StorageEngineMessages + .STORAGE_LOG_UNEXPECTED_CHUNK_TYPE_DETECTED_WHEN_READING_NON_ALIGNED_1C0E4674, chunkTypeInconsistentException.filePath, chunkTypeInconsistentException.deviceId, chunkTypeInconsistentException.measurement, chunkTypeInconsistentException.offsetOfChunkHeader); } else { logger.error( - "{}-{} [Compaction] {} task meets error: {}.", + StorageEngineMessages.STORAGE_LOG_COMPACTION_TASK_MEETS_ERROR_1002C659, storageGroupName, dataRegionId, getCompactionTaskType(), @@ -313,7 +312,10 @@ public long getTimeCost() { protected void checkInterrupted() throws InterruptedException { if (Thread.currentThread().isInterrupted()) { throw new InterruptedException( - String.format("%s-%s [Compaction] abort", storageGroupName, dataRegionId)); + String.format( + StorageEngineMessages.STORAGE_EXCEPTION_S_S_COMPACTION_ABORT_7D0CB1E5, + storageGroupName, + dataRegionId)); } } @@ -344,7 +346,8 @@ protected void handleRecoverException(Exception e) { return; } LOGGER.error( - "{} [Compaction][Recover] Failed to recover compaction. TaskInfo: {}, Exception: {}", + StorageEngineMessages + .STORAGE_LOG_COMPACTION_RECOVER_FAILED_TO_RECOVER_COMPACTION_TASKINFO_24424402, dataRegionId, this, e); @@ -481,12 +484,14 @@ protected void validateCompactionResult( } if (needToValidateTsFileCorrectness && !validator.validateTsFiles(validTargetFiles)) { LOGGER.error( - "Failed to pass compaction validation, source seq files: {}, source unseq files: {}, target files: {}", + StorageEngineMessages + .STORAGE_LOG_FAILED_TO_PASS_COMPACTION_VALIDATION_SOURCE_SEQ_FILES_SOURCE_BF5A4525, sourceSeqFiles, sourceUnseqFiles, targetFiles); throw new CompactionValidationFailedException( - "Failed to pass compaction validation, .resources file or tsfile data is wrong"); + StorageEngineMessages + .STORAGE_EXCEPTION_FAILED_TO_PASS_COMPACTION_VALIDATION_RESOURCES_FILE_OR_TSFILE_4B78731F); } } @@ -521,7 +526,8 @@ protected void checkSequenceSpaceOverlap( RepairDataFileScanUtil.checkTimePartitionHasOverlap(timePartitionSeqFiles, true); if (!overlapFilesInTimePartition.isEmpty()) { LOGGER.error( - "Failed to pass compaction overlap validation, source seq files: {}, source unseq files: {}, target files: {}", + StorageEngineMessages + .STORAGE_LOG_FAILED_TO_PASS_COMPACTION_OVERLAP_VALIDATION_SOURCE_SEQ_9CFDC149, sourceSeqFiles, sourceUnseqFiles, targetFiles); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/CrossSpaceCompactionTask.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/CrossSpaceCompactionTask.java index 30a726544c28b..1a6703e4b6772 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/CrossSpaceCompactionTask.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/CrossSpaceCompactionTask.java @@ -149,18 +149,15 @@ public boolean doCompaction() { if (selectedSequenceFiles.isEmpty() || selectedUnsequenceFiles.isEmpty()) { LOGGER.info( - "{}-{} [Compaction] Cross space compaction file list is empty, end it", + StorageEngineMessages + .STORAGE_LOG_COMPACTION_CROSS_SPACE_COMPACTION_FILE_LIST_IS_EMPTY_END_B8044743, storageGroupName, dataRegionId); return true; } LOGGER.info( - "{}-{} [Compaction] CrossSpaceCompaction task starts with {} seq files " - + "and {} unsequence files. " - + "Sequence files : {}, unsequence files : {} . " - + "Sequence files size is {} MB, " - + "unsequence file size is {} MB, " - + "total size is {} MB", + StorageEngineMessages + .STORAGE_LOG_COMPACTION_CROSSSPACECOMPACTION_TASK_STARTS_WITH_SEQ_FILES_8CDCBE0F, storageGroupName, dataRegionId, selectedSequenceFiles.size(), @@ -246,9 +243,8 @@ public boolean doCompaction() { double costTime = (System.currentTimeMillis() - startTime) / 1000.0d; LOGGER.info( - "{}-{} [Compaction] CrossSpaceCompaction task finishes successfully, " - + "time cost is {} s, " - + "compaction speed is {} MB/s, {}", + StorageEngineMessages + .STORAGE_LOG_COMPACTION_CROSSSPACECOMPACTION_TASK_FINISHES_SUCCESSFULLY_D7F1B1FD, storageGroupName, dataRegionId, String.format("%.2f", costTime), @@ -338,13 +334,18 @@ private void finishTask() throws IOException { // it means the target file is empty after compaction if (!target.remove()) { throw new CompactionRecoverException( - String.format("failed to delete empty target file %s", target)); + String.format( + StorageEngineMessages + .STORAGE_EXCEPTION_FAILED_TO_DELETE_EMPTY_TARGET_FILE_S_324EF900, + target)); } } else { File targetFile = target.getTsFile(); if (targetFile == null || !TsFileUtils.isTsFileComplete(target.getTsFile())) { throw new CompactionRecoverException( - String.format("Target file is not completed. %s", targetFile)); + String.format( + StorageEngineMessages.STORAGE_EXCEPTION_TARGET_FILE_IS_NOT_COMPLETED_S_E65150DB, + targetFile)); } if (recoverMemoryStatus) { target.setStatus(TsFileResourceStatus.NORMAL); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/InnerSpaceCompactionTask.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/InnerSpaceCompactionTask.java index 94b8d7bb016a5..acc2ff500a946 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/InnerSpaceCompactionTask.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/InnerSpaceCompactionTask.java @@ -237,8 +237,8 @@ protected boolean doCompaction() { // get resource of target file recoverMemoryStatus = true; LOGGER.info( - "{}-{} [Compaction] {} InnerSpaceCompaction task starts with {} files, " - + "total file size is {} MB, estimated memory cost is {} MB", + StorageEngineMessages + .STORAGE_LOG_COMPACTION_INNERSPACECOMPACTION_TASK_STARTS_WITH_FILES_TOTAL_934B562F, storageGroupName, dataRegionId, filesView.sequence ? "Sequence" : "Unsequence", @@ -255,7 +255,8 @@ protected boolean doCompaction() { compactionLogger.logTargetFiles(filesView.targetFilesInLog); compactionLogger.force(); LOGGER.info( - "{}-{} [Compaction] compaction with selected files {}, skipped files {}", + StorageEngineMessages + .STORAGE_LOG_COMPACTION_COMPACTION_WITH_SELECTED_FILES_SKIPPED_FILES_ACC66872, storageGroupName, dataRegionId, filesView.sourceFilesInCompactionPerformer, @@ -263,10 +264,8 @@ protected boolean doCompaction() { compact(compactionLogger); double costTime = (System.currentTimeMillis() - startTime) / 1000.0d; LOGGER.info( - "{}-{} [Compaction] {} InnerSpaceCompaction task finishes successfully, " - + "target files are {}," - + "time cost is {} s, " - + "compaction speed is {} MB/s, {}", + StorageEngineMessages + .STORAGE_LOG_COMPACTION_INNERSPACECOMPACTION_TASK_FINISHES_SUCCESSFULLY_08475DE4, storageGroupName, dataRegionId, filesView.sequence ? "Sequence" : "Unsequence", @@ -397,7 +396,10 @@ protected void compact(SimpleCompactionLogger compactionLogger) throws Exception if (Thread.currentThread().isInterrupted() || summary.isCancel()) { throw new InterruptedException( - String.format("%s-%s [Compaction] abort", storageGroupName, dataRegionId)); + String.format( + StorageEngineMessages.STORAGE_EXCEPTION_S_S_COMPACTION_ABORT_7D0CB1E5, + storageGroupName, + dataRegionId)); } validateCompactionResult( @@ -573,7 +575,10 @@ protected void finishTask() throws IOException { // it means the target file is empty after compaction if (!targetTsFileResource.remove()) { throw new CompactionRecoverException( - String.format("failed to delete empty target file %s", targetTsFileResource)); + String.format( + StorageEngineMessages + .STORAGE_EXCEPTION_FAILED_TO_DELETE_EMPTY_TARGET_FILE_S_324EF900, + targetTsFileResource)); } } else { File targetFile = targetTsFileResource.getTsFile(); @@ -581,7 +586,9 @@ protected void finishTask() throws IOException { || !targetFile.exists() || !TsFileUtils.isTsFileComplete(targetTsFileResource.getTsFile())) { throw new CompactionRecoverException( - String.format("Target file is not completed. %s", targetFile)); + String.format( + StorageEngineMessages.STORAGE_EXCEPTION_TARGET_FILE_IS_NOT_COMPLETED_S_E65150DB, + targetFile)); } if (recoverMemoryStatus) { targetTsFileResource.setStatus(TsFileResourceStatus.NORMAL); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/InsertionCrossSpaceCompactionTask.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/InsertionCrossSpaceCompactionTask.java index dd8fb2b8e239b..57805130532b4 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/InsertionCrossSpaceCompactionTask.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/InsertionCrossSpaceCompactionTask.java @@ -121,10 +121,8 @@ protected boolean doCompaction() { long startTime = System.currentTimeMillis(); recoverMemoryStatus = true; LOGGER.info( - "{}-{} [Compaction] InsertionCrossSpaceCompaction task starts with unseq file {}, " - + "nearest seq files are {}, " - + "target file name timestamp is {}, " - + "file size is {} MB.", + StorageEngineMessages + .STORAGE_LOG_COMPACTION_INSERTIONCROSSSPACECOMPACTION_TASK_STARTS_WITH_A315B8C6, storageGroupName, dataRegionId, unseqFileToInsert, @@ -140,7 +138,8 @@ protected boolean doCompaction() { targetFile = new TsFileResource(generateTargetFile(), TsFileResourceStatus.COMPACTING); } catch (IOException e) { LOGGER.error( - "{}-{} [InsertionCrossSpaceCompactionTask] failed to generate target file name, source unseq file is {}", + StorageEngineMessages + .STORAGE_LOG_INSERTIONCROSSSPACECOMPACTIONTASK_FAILED_TO_GENERATE_TARGET_B03E4C67, storageGroupName, dataRegionId, unseqFileToInsert); @@ -173,9 +172,8 @@ protected boolean doCompaction() { double costTime = (System.currentTimeMillis() - startTime) / 1000.0d; LOGGER.info( - "{}-{} [Compaction] InsertionCrossSpaceCompaction task finishes successfully, " - + "target file is {}," - + "time cost is {} s.", + StorageEngineMessages + .STORAGE_LOG_COMPACTION_INSERTIONCROSSSPACECOMPACTION_TASK_FINISHES_SUCCESSFULLY_69360DD0, storageGroupName, dataRegionId, targetFile, diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/RepairUnsortedFileCompactionTask.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/RepairUnsortedFileCompactionTask.java index 7fdf712693997..db2c3a3ed88be 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/RepairUnsortedFileCompactionTask.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/RepairUnsortedFileCompactionTask.java @@ -165,7 +165,8 @@ protected void prepareTargetFiles() throws IOException { storageGroupName + "-" + dataRegionId); LOGGER.info( - "{}-{} [InnerSpaceCompactionTask] start to rename mods file", + StorageEngineMessages + .STORAGE_LOG_INNERSPACECOMPACTIONTASK_START_TO_RENAME_MODS_FILE_7C036CBD, storageGroupName, dataRegionId); @@ -235,10 +236,8 @@ public long getEstimatedMemoryCost() { if (memoryCost > SystemInfo.getInstance().getMemorySizeForCompaction()) { sourceFile.setTsFileRepairStatus(TsFileRepairStatus.CAN_NOT_REPAIR); LOGGER.warn( - "[RepairUnsortedFileCompactionTask]" - + " Can not repair unsorted file {} " - + "because the required memory to repair" - + " is greater than the total compaction memory budget", + StorageEngineMessages + .STORAGE_LOG_REPAIRUNSORTEDFILECOMPACTIONTASK_CAN_NOT_REPAIR_UNSORTED_48124B0C, sourceFile.getTsFile().getAbsolutePath()); } return memoryCost; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/SettleCompactionTask.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/SettleCompactionTask.java index b039be731053f..388197e66e390 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/SettleCompactionTask.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/task/SettleCompactionTask.java @@ -111,19 +111,16 @@ protected boolean doCompaction() { } if (fullyDirtyFiles.isEmpty() && filesView.sourceFilesInCompactionPerformer.isEmpty()) { LOGGER.info( - "{}-{} [Compaction] Settle compaction file list is empty, end it", + StorageEngineMessages + .STORAGE_LOG_COMPACTION_SETTLE_COMPACTION_FILE_LIST_IS_EMPTY_END_IT_56CF079D, storageGroupName, dataRegionId); } long startTime = System.currentTimeMillis(); LOGGER.info( - "{}-{} [Compaction] SettleCompaction task starts with {} fully_dirty files " - + "and {} partially_dirty files. " - + "Fully_dirty files : {}, partially_dirty files : {} . " - + "Fully_dirty files size is {} MB, " - + "partially_dirty file size is {} MB. " - + "Memory cost is {} MB.", + StorageEngineMessages + .STORAGE_LOG_COMPACTION_SETTLECOMPACTION_TASK_STARTS_WITH_FULLY_DIRTY_0962C95A, storageGroupName, dataRegionId, fullyDirtyFiles.size(), @@ -165,16 +162,16 @@ protected boolean doCompaction() { if (isSuccess) { if (partiallyDirtyFileSize == 0) { LOGGER.info( - "{}-{} [Compaction] SettleCompaction task finishes successfully, time cost is {} s." - + "Fully_dirty files num is {}.", + StorageEngineMessages + .STORAGE_LOG_COMPACTION_SETTLECOMPACTION_TASK_FINISHES_SUCCESSFULLY_TIME_2BD3839A, storageGroupName, dataRegionId, String.format("%.2f", costTime), fullyDirtyFiles.size()); } else { LOGGER.info( - "{}-{} [Compaction] SettleCompaction task finishes successfully, time cost is {} s, compaction speed is {} MB/s." - + "Fully_dirty files num is {} and partially_dirty files num is {}.", + StorageEngineMessages + .STORAGE_LOG_COMPACTION_SETTLECOMPACTION_TASK_FINISHES_SUCCESSFULLY_TIME_4FEB0F56, storageGroupName, dataRegionId, String.format("%.2f", costTime), @@ -184,8 +181,8 @@ protected boolean doCompaction() { } } else { LOGGER.info( - "{}-{} [Compaction] SettleCompaction task finishes with some error, time cost is {} s." - + "Fully_dirty files num is {} and there are {} files fail to delete.", + StorageEngineMessages + .STORAGE_LOG_COMPACTION_SETTLECOMPACTION_TASK_FINISHES_WITH_SOME_ERROR_A8A15439, storageGroupName, dataRegionId, String.format("%.2f", costTime), @@ -225,7 +222,8 @@ public boolean settleWithFullyDirtyFiles() throws IllegalPathException, IOExcept if (res) { fullyDeletedSuccessNum++; LOGGER.debug( - "Settle task deletes fully_dirty tsfile {} successfully.", + StorageEngineMessages + .STORAGE_LOG_SETTLE_TASK_DELETES_FULLY_DIRTY_TSFILE_SUCCESSFULLY_18D81225, resource.getTsFile().getAbsolutePath()); if (recoverMemoryStatus) { FileMetrics.getInstance() @@ -233,7 +231,8 @@ public boolean settleWithFullyDirtyFiles() throws IllegalPathException, IOExcept } } else { LOGGER.error( - "Settle task fail to delete fully_dirty tsfile {}.", + StorageEngineMessages + .STORAGE_LOG_SETTLE_TASK_FAIL_TO_DELETE_FULLY_DIRTY_TSFILE_B7DAEA8D, resource.getTsFile().getAbsolutePath()); } isSuccess = isSuccess && res; @@ -247,8 +246,8 @@ private void settleWithPartiallyDirtyFiles(SimpleCompactionLogger logger) throws return; } LOGGER.info( - "{}-{} [Compaction] Start to settle {} {} partially_dirty files, " - + "total file size is {} MB", + StorageEngineMessages + .STORAGE_LOG_COMPACTION_START_TO_SETTLE_PARTIALLY_DIRTY_FILES_TOTAL_FILE_BAC113C4, storageGroupName, dataRegionId, filesView.sourceFilesInCompactionPerformer.size(), @@ -258,10 +257,8 @@ private void settleWithPartiallyDirtyFiles(SimpleCompactionLogger logger) throws compact(logger); double costTime = (System.currentTimeMillis() - startTime) / 1000.0d; LOGGER.info( - "{}-{} [Compaction] Finish to settle {} {} partially_dirty files successfully , " - + "target file is {}," - + "time cost is {} s, " - + "compaction speed is {} MB/s, {}", + StorageEngineMessages + .STORAGE_LOG_COMPACTION_FINISH_TO_SETTLE_PARTIALLY_DIRTY_FILES_SUCCESSFULLY_9ACFD5C0, storageGroupName, dataRegionId, filesView.sourceFilesInCompactionPerformer.size(), @@ -275,7 +272,8 @@ private void settleWithPartiallyDirtyFiles(SimpleCompactionLogger logger) throws @Override public void recover() { LOGGER.info( - "{}-{} [Compaction][Recover] Start to recover settle compaction.", + StorageEngineMessages + .STORAGE_LOG_COMPACTION_RECOVER_START_TO_RECOVER_SETTLE_COMPACTION_C342241D, storageGroupName, dataRegionId); try { @@ -285,7 +283,8 @@ public void recover() { recoverFullyDirtyFiles(); recoverPartiallyDirtyFiles(); LOGGER.info( - "{}-{} [Compaction][Recover] Finish to recover settle compaction successfully.", + StorageEngineMessages + .STORAGE_LOG_COMPACTION_RECOVER_FINISH_TO_RECOVER_SETTLE_COMPACTION_SUCCESSFULLY_714EF642, storageGroupName, dataRegionId); if (needRecoverTaskInfoFromLogFile) { @@ -312,7 +311,7 @@ private void recoverPartiallyDirtyFiles() throws IOException { public void recoverSettleTaskInfoFromLogFile() throws IOException { LOGGER.info( - "{}-{} [Compaction][Recover] compaction log is {}", + StorageEngineMessages.STORAGE_LOG_COMPACTION_RECOVER_COMPACTION_LOG_IS_DF6FD183, storageGroupName, dataRegionId, logFile); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/CompactionTableSchema.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/CompactionTableSchema.java index 3f6e83cbe96c0..9a79a2db83930 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/CompactionTableSchema.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/CompactionTableSchema.java @@ -19,6 +19,7 @@ package org.apache.iotdb.db.storageengine.dataregion.compaction.execute.utils; +import org.apache.iotdb.db.i18n.StorageEngineMessages; import org.apache.iotdb.db.storageengine.dataregion.compaction.execute.exception.CompactionTableSchemaNotMatchException; import org.apache.tsfile.enums.ColumnCategory; @@ -39,7 +40,11 @@ public boolean merge(TableSchema tableSchema) { } if (!tableSchema.getTableName().equals(this.tableName)) { throw new CompactionTableSchemaNotMatchException( - "this.tableName is " + tableName + " merge tableName is " + tableSchema.getTableName()); + String.format( + StorageEngineMessages + .STORAGE_EXCEPTION_THIS_TABLENAME_IS_S_MERGE_TABLENAME_IS_S_4B05FA97, + tableName, + tableSchema.getTableName())); } // filter id columns List otherSchemaColumnSchemas = tableSchema.getColumnSchemas(); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/CompactionUtils.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/CompactionUtils.java index 7bdd492fa74ac..beb8647fdab82 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/CompactionUtils.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/CompactionUtils.java @@ -130,7 +130,8 @@ private static void moveOneTargetFile( // move to target file and delete old tmp target file if (!targetResource.getTsFile().exists()) { logger.info( - "{} [Compaction] Tmp target tsfile {} may be deleted after compaction.", + StorageEngineMessages + .STORAGE_LOG_COMPACTION_TMP_TARGET_TSFILE_MAY_BE_DELETED_AFTER_COMPACTION_0BFFA73F, fullStorageGroupName, targetResource.getTsFilePath()); return; @@ -308,7 +309,9 @@ public static boolean deleteTsFilesInDisk( result = false; } logger.info( - "{} [Compaction] delete TsFile {}", storageGroupName, mergeTsFile.getTsFilePath()); + StorageEngineMessages.STORAGE_LOG_COMPACTION_DELETE_TSFILE_A97320DB, + storageGroupName, + mergeTsFile.getTsFilePath()); } return result; } @@ -408,7 +411,7 @@ public static void deleteSourceTsFileAndUpdateFileMetrics( public static void deleteTsFileResourceWithoutLock(TsFileResource resource) { if (!resource.remove()) { logger.warn( - "[Compaction] delete file failed, file path is {}", + StorageEngineMessages.STORAGE_LOG_COMPACTION_DELETE_FILE_FAILED_FILE_PATH_IS_6E1D2670, resource.getTsFile().getAbsolutePath()); } else { logger.info( diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/executor/batch/BatchedFastAlignedSeriesCompactionExecutor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/executor/batch/BatchedFastAlignedSeriesCompactionExecutor.java index 0c1f12e9886a7..57f20b740f838 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/executor/batch/BatchedFastAlignedSeriesCompactionExecutor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/executor/batch/BatchedFastAlignedSeriesCompactionExecutor.java @@ -24,6 +24,7 @@ import org.apache.iotdb.commons.path.PatternTreeMap; import org.apache.iotdb.db.conf.IoTDBDescriptor; import org.apache.iotdb.db.exception.WriteProcessException; +import org.apache.iotdb.db.i18n.StorageEngineMessages; import org.apache.iotdb.db.storageengine.dataregion.compaction.execute.task.subtask.FastCompactionTaskSummary; import org.apache.iotdb.db.storageengine.dataregion.compaction.execute.utils.executor.ModifiedStatus; import org.apache.iotdb.db.storageengine.dataregion.compaction.execute.utils.executor.batch.utils.AlignedSeriesBatchCompactionUtils; @@ -174,7 +175,8 @@ private void compactFirstBatch() ignoreAllNullRows); executor.execute(); LOGGER.debug( - "[Batch Compaction] current device is {}, first batch compacted time chunk is {}", + StorageEngineMessages + .STORAGE_LOG_BATCH_COMPACTION_CURRENT_DEVICE_IS_FIRST_BATCH_COMPACTED_34910754, deviceId, batchCompactionPlan); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/executor/batch/BatchedReadChunkAlignedSeriesCompactionExecutor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/executor/batch/BatchedReadChunkAlignedSeriesCompactionExecutor.java index 108c11fe4aec4..c2bfe18e12ca1 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/executor/batch/BatchedReadChunkAlignedSeriesCompactionExecutor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/executor/batch/BatchedReadChunkAlignedSeriesCompactionExecutor.java @@ -21,6 +21,7 @@ import org.apache.iotdb.commons.conf.IoTDBConstant; import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.i18n.StorageEngineMessages; import org.apache.iotdb.db.storageengine.dataregion.compaction.execute.exception.BatchCompactionCannotAlignedException; import org.apache.iotdb.db.storageengine.dataregion.compaction.execute.task.CompactionTaskSummary; import org.apache.iotdb.db.storageengine.dataregion.compaction.execute.utils.executor.ModifiedStatus; @@ -139,7 +140,8 @@ private void compactFirstBatch() throws IOException, PageException { ignoreAllNullRows); executor.execute(); LOGGER.debug( - "[Batch Compaction] current device is {}, first batch compacted time chunk is {}", + StorageEngineMessages + .STORAGE_LOG_BATCH_COMPACTION_CURRENT_DEVICE_IS_FIRST_BATCH_COMPACTED_34910754, device, batchCompactionPlan); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/executor/fast/reader/CompactionChunkReader.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/executor/fast/reader/CompactionChunkReader.java index 2b39064d36a6b..c428074d3458c 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/executor/fast/reader/CompactionChunkReader.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/executor/fast/reader/CompactionChunkReader.java @@ -19,6 +19,8 @@ package org.apache.iotdb.db.storageengine.dataregion.compaction.execute.utils.executor.fast.reader; +import org.apache.iotdb.db.i18n.StorageEngineMessages; + import org.apache.tsfile.common.conf.TSFileDescriptor; import org.apache.tsfile.compress.IUnCompressor; import org.apache.tsfile.encoding.decoder.Decoder; @@ -112,10 +114,11 @@ public static ByteBuffer readCompressedPageData(PageHeader pageHeader, ByteBuffe int compressedPageBodyLength = pageHeader.getCompressedSize(); if (compressedPageBodyLength > chunkBuffer.remaining()) { throw new IOException( - "do not have a complete page body. Expected:" - + compressedPageBodyLength - + ". Actual:" - + chunkBuffer.remaining()); + String.format( + StorageEngineMessages + .STORAGE_EXCEPTION_DO_NOT_HAVE_A_COMPLETE_PAGE_BODY_EXPECTED_S_ACTUAL_S_3A05EF8F, + compressedPageBodyLength, + chunkBuffer.remaining())); } ByteBuffer pageBodyBuffer = chunkBuffer.slice(); pageBodyBuffer.limit(compressedPageBodyLength); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/executor/readchunk/ReadChunkAlignedSeriesCompactionExecutor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/executor/readchunk/ReadChunkAlignedSeriesCompactionExecutor.java index e69a234d08166..5e72bc481e9e3 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/executor/readchunk/ReadChunkAlignedSeriesCompactionExecutor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/executor/readchunk/ReadChunkAlignedSeriesCompactionExecutor.java @@ -23,6 +23,7 @@ import org.apache.iotdb.commons.schema.table.column.TsTableColumnSchema; import org.apache.iotdb.commons.utils.MetadataUtils; import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.i18n.StorageEngineMessages; import org.apache.iotdb.db.schemaengine.table.DataNodeTableCache; import org.apache.iotdb.db.storageengine.dataregion.compaction.execute.exception.CompactionLastTimeCheckFailedException; import org.apache.iotdb.db.storageengine.dataregion.compaction.execute.task.CompactionTaskSummary; @@ -690,7 +691,9 @@ private long estimateMemorySizeAsPageWriter(PageLoader pageLoader) { break; default: throw new IllegalArgumentException( - "Unsupported data type: " + pageLoader.getDataType().toString()); + String.format( + StorageEngineMessages.STORAGE_EXCEPTION_UNSUPPORTED_DATA_TYPE_S_D16A1E9A, + pageLoader.getDataType().toString())); } // Due to the fact that the page writer in memory includes some other objects // and has a special calculation method, the estimated size will actually be diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/log/CompactionLogAnalyzer.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/log/CompactionLogAnalyzer.java index ca3404807efa4..f96e54b59f7bf 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/log/CompactionLogAnalyzer.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/log/CompactionLogAnalyzer.java @@ -19,6 +19,8 @@ package org.apache.iotdb.db.storageengine.dataregion.compaction.execute.utils.log; +import org.apache.iotdb.db.i18n.StorageEngineMessages; + import java.io.BufferedReader; import java.io.File; import java.io.FileReader; @@ -65,7 +67,9 @@ public void analyze() throws IOException, IllegalArgumentException { taskStage = CompactionTaskStage.valueOf(currLine); } else { throw new IllegalArgumentException( - String.format("unknown compaction log line: %s", currLine)); + String.format( + StorageEngineMessages.STORAGE_EXCEPTION_UNKNOWN_COMPACTION_LOG_LINE_S_C0A9DC05, + currLine)); } } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/log/TsFileIdentifier.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/log/TsFileIdentifier.java index 25df09d595c25..3439c09dfcc24 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/log/TsFileIdentifier.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/log/TsFileIdentifier.java @@ -21,6 +21,7 @@ import org.apache.iotdb.commons.conf.IoTDBConstant; import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.i18n.StorageEngineMessages; import org.apache.iotdb.db.storageengine.dataregion.modification.ModificationFile; import org.apache.iotdb.db.storageengine.dataregion.modification.v1.ModificationFileV1; import org.apache.iotdb.db.storageengine.dataregion.tsfile.TsFileResource; @@ -90,7 +91,10 @@ public static TsFileIdentifier getFileIdentifierFromFilePath(String filepath) { // if the path contains the required information // after splitting result should contain more than 5 objects throw new RuntimeException( - String.format("Path %s cannot be parsed into file info", filepath)); + String.format( + StorageEngineMessages + .STORAGE_EXCEPTION_PATH_S_CANNOT_BE_PARSED_INTO_FILE_INFO_631C48C8, + filepath)); } return new TsFileIdentifier( @@ -111,7 +115,10 @@ public static TsFileIdentifier getFileIdentifierFromInfoString(String infoString int length = splittedFileInfo.length; if (length != 5) { throw new RuntimeException( - String.format("String %s is not a legal file info string", infoString)); + String.format( + StorageEngineMessages + .STORAGE_EXCEPTION_STRING_S_IS_NOT_A_LEGAL_FILE_INFO_STRING_0CBEAB8E, + infoString)); } return new TsFileIdentifier( splittedFileInfo[LOGICAL_SG_OFFSET_IN_LOG], diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/writer/ReadPointCrossCompactionWriter.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/writer/ReadPointCrossCompactionWriter.java index 6810df4d1a3b6..b05f25c9a917a 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/writer/ReadPointCrossCompactionWriter.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/writer/ReadPointCrossCompactionWriter.java @@ -20,6 +20,7 @@ package org.apache.iotdb.db.storageengine.dataregion.compaction.execute.utils.writer; import org.apache.iotdb.commons.utils.TestOnly; +import org.apache.iotdb.db.i18n.StorageEngineMessages; import org.apache.iotdb.db.storageengine.dataregion.compaction.execute.utils.executor.fast.element.AlignedPageElement; import org.apache.iotdb.db.storageengine.dataregion.compaction.execute.utils.executor.fast.element.ChunkMetadataElement; import org.apache.iotdb.db.storageengine.dataregion.compaction.execute.utils.writer.flushcontroller.AbstractCompactionFlushController; @@ -92,13 +93,15 @@ protected TsFileSequenceReader getFileReader(TsFileResource resource) throws IOE @Override public boolean flushNonAlignedChunk(Chunk chunk, ChunkMetadata chunkMetadata, int subTaskId) { throw new UnsupportedOperationException( - "Does not support this method in ReadPointCrossCompactionWriter"); + StorageEngineMessages + .STORAGE_EXCEPTION_DOES_NOT_SUPPORT_THIS_METHOD_IN_READPOINTCROSSCOMPACTIONWRITER_D024F312); } @Override public boolean flushAlignedChunk(ChunkMetadataElement chunkMetadataElement, int subTaskId) { throw new UnsupportedOperationException( - "Does not support this method in ReadPointCrossCompactionWriter"); + StorageEngineMessages + .STORAGE_EXCEPTION_DOES_NOT_SUPPORT_THIS_METHOD_IN_READPOINTCROSSCOMPACTIONWRITER_D024F312); } @Override @@ -107,20 +110,23 @@ public boolean flushBatchedValueChunk( int subTaskId, AbstractCompactionFlushController flushController) { throw new UnsupportedOperationException( - "Does not support this method in ReadPointCrossCompactionWriter"); + StorageEngineMessages + .STORAGE_EXCEPTION_DOES_NOT_SUPPORT_THIS_METHOD_IN_READPOINTCROSSCOMPACTIONWRITER_D024F312); } @Override public boolean flushNonAlignedPage( ByteBuffer compressedPageData, PageHeader pageHeader, int subTaskId) { throw new UnsupportedOperationException( - "Does not support this method in ReadPointCrossCompactionWriter"); + StorageEngineMessages + .STORAGE_EXCEPTION_DOES_NOT_SUPPORT_THIS_METHOD_IN_READPOINTCROSSCOMPACTIONWRITER_D024F312); } @Override public boolean flushAlignedPage(AlignedPageElement alignedPageElement, int subTaskId) { throw new UnsupportedOperationException( - "Does not support this method in ReadPointCrossCompactionWriter"); + StorageEngineMessages + .STORAGE_EXCEPTION_DOES_NOT_SUPPORT_THIS_METHOD_IN_READPOINTCROSSCOMPACTIONWRITER_D024F312); } @Override @@ -129,6 +135,7 @@ public boolean flushBatchedValuePage( int subTaskId, AbstractCompactionFlushController flushController) { throw new UnsupportedOperationException( - "Does not support this method in ReadPointCrossCompactionWriter"); + StorageEngineMessages + .STORAGE_EXCEPTION_DOES_NOT_SUPPORT_THIS_METHOD_IN_READPOINTCROSSCOMPACTIONWRITER_D024F312); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/repair/RepairDataFileScanUtil.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/repair/RepairDataFileScanUtil.java index 0226bdc1d4f60..97381eb29d01c 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/repair/RepairDataFileScanUtil.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/repair/RepairDataFileScanUtil.java @@ -101,7 +101,8 @@ public void scanTsFile(boolean checkTsFileResource) { timeIndex = checkTsFileResource ? getDeviceTimeIndex(resource) : null; } catch (IOException e) { logger.warn( - "Meet error when read tsfile resource file {}, it may be repaired after reboot", + StorageEngineMessages + .STORAGE_LOG_MEET_ERROR_WHEN_READ_TSFILE_RESOURCE_FILE_IT_MAY_BE_REPAIRED_A8A514C6, tsfile.getAbsolutePath() + TsFileResource.RESOURCE_SUFFIX, e); isBrokenFile = true; @@ -123,7 +124,9 @@ public void scanTsFile(boolean checkTsFileResource) { if (checkTsFileResource) { if (!deviceIdsInTimeIndex.contains(deviceInfile)) { throw new CompactionStatisticsCheckFailedException( - deviceInfile + " does not exist in the resource file"); + String.format( + StorageEngineMessages.DEVICE_DOES_NOT_EXIST_IN_RESOURCE_FILE_FMT, + deviceInfile)); } deviceIdsInTimeIndex.remove(deviceInfile); } @@ -156,13 +159,16 @@ public void scanTsFile(boolean checkTsFileResource) { } if (!deviceIdsInTimeIndex.isEmpty()) { throw new CompactionStatisticsCheckFailedException( - "These devices (" + deviceIdsInTimeIndex + ") do not exist in the tsfile"); + String.format( + StorageEngineMessages + .STORAGE_EXCEPTION_THESE_DEVICES_S_DO_NOT_EXIST_IN_THE_TSFILE_5A03F30D, + deviceIdsInTimeIndex)); } } catch (CompactionLastTimeCheckFailedException lastTimeCheckFailedException) { this.hasUnsortedDataOrWrongStatistics = true; if (printLog) { logger.error( - "File {} has unsorted data: ", + StorageEngineMessages.STORAGE_LOG_FILE_HAS_UNSORTED_DATA_1B118A14, resource.getTsFile().getPath(), lastTimeCheckFailedException); } @@ -170,7 +176,7 @@ public void scanTsFile(boolean checkTsFileResource) { this.hasUnsortedDataOrWrongStatistics = true; if (printLog) { logger.error( - "File {} has wrong time statistics: ", + StorageEngineMessages.STORAGE_LOG_FILE_HAS_WRONG_TIME_STATISTICS_4E63345E, resource.getTsFile().getPath(), compactionStatisticsCheckFailedException); } @@ -482,7 +488,8 @@ public static List checkTimePartitionHasOverlap( if (deviceStartTimeInCurrentFile <= deviceEndTimeInPreviousFile) { if (printOverlappedDevices) { logger.error( - "Device {} has overlapped data, start time in current file {} is {}, end time in previous file {} is {}", + StorageEngineMessages + .STORAGE_LOG_DEVICE_HAS_OVERLAPPED_DATA_START_TIME_IN_CURRENT_FILE_IS_F4F29A22, device, resource.getTsFile(), deviceStartTimeInCurrentFile, diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/repair/RepairTaskRecoverLogParser.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/repair/RepairTaskRecoverLogParser.java index 04d5808e58e57..308d82af94843 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/repair/RepairTaskRecoverLogParser.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/repair/RepairTaskRecoverLogParser.java @@ -118,7 +118,8 @@ private void parseEndTimePartitionLog(String line) { private void handleIncompleteRepairedTimePartition() { LOGGER.error( - "[{}][{}]Repair data log is not complete, time partition is {}.", + StorageEngineMessages + .STORAGE_LOG_REPAIR_DATA_LOG_IS_NOT_COMPLETE_TIME_PARTITION_IS_D9D4F01F, currentTimePartition.getDatabaseName(), currentTimePartition.getDataRegionId(), currentTimePartition.getTimePartitionId()); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/repair/RepairTimePartitionScanTask.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/repair/RepairTimePartitionScanTask.java index b737b1266c552..33c97493c0e0e 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/repair/RepairTimePartitionScanTask.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/repair/RepairTimePartitionScanTask.java @@ -69,7 +69,7 @@ public Void call() { private void scanTimePartitionFiles() throws InterruptedException { LOGGER.info( - "[RepairScheduler][{}][{}] start scan repair time partition {}", + StorageEngineMessages.STORAGE_LOG_REPAIRSCHEDULER_START_SCAN_REPAIR_TIME_PARTITION_1D6789DB, repairTimePartition.getDatabaseName(), repairTimePartition.getDataRegionId(), repairTimePartition.getTimePartitionId()); @@ -91,7 +91,8 @@ private void checkInternalUnsortedFileAndRepair(RepairTimePartition timePartitio for (TsFileResource sourceFile : sourceFiles) { if (!timePartition.getTsFileManager().isAllowCompaction()) { LOGGER.info( - "[RepairScheduler] cannot scan source files in {} because 'allowCompaction' is false", + StorageEngineMessages + .STORAGE_LOG_REPAIRSCHEDULER_CANNOT_SCAN_SOURCE_FILES_IN_BECAUSE_ALLOWCOMPACTION_5E644A6D, repairTimePartition.getDataRegionId()); return; } @@ -121,7 +122,9 @@ private void checkInternalUnsortedFileAndRepair(RepairTimePartition timePartitio } sourceFile.setTsFileRepairStatus(TsFileRepairStatus.NEED_TO_REPAIR_BY_REWRITE); LOGGER.info( - "[RepairScheduler] {} need to repair because it has internal unsorted data", sourceFile); + StorageEngineMessages + .STORAGE_LOG_REPAIRSCHEDULER_NEED_TO_REPAIR_BECAUSE_IT_HAS_INTERNAL_UNSORTED_C1596DC3, + sourceFile); TsFileManager tsFileManager = timePartition.getTsFileManager(); RepairUnsortedFileCompactionTask task = new RepairUnsortedFileCompactionTask( @@ -148,7 +151,8 @@ private void checkOverlapInSequenceSpaceAndRepair(RepairTimePartition timePartit for (TsFileResource overlapFile : overlapFiles) { if (!timePartition.getTsFileManager().isAllowCompaction()) { LOGGER.info( - "[RepairScheduler] cannot scan source files in {} because 'allowCompaction' is false", + StorageEngineMessages + .STORAGE_LOG_REPAIRSCHEDULER_CANNOT_SCAN_SOURCE_FILES_IN_BECAUSE_ALLOWCOMPACTION_5E644A6D, repairTimePartition.getDataRegionId()); return; } @@ -164,7 +168,8 @@ private void checkOverlapInSequenceSpaceAndRepair(RepairTimePartition timePartit true, tsFileManager.getNextCompactionTaskId()); LOGGER.info( - "[RepairScheduler] {} need to repair because it is overlapped with other files", + StorageEngineMessages + .STORAGE_LOG_REPAIRSCHEDULER_NEED_TO_REPAIR_BECAUSE_IT_IS_OVERLAPPED_F1AC0C78, overlapFile); if (submitRepairFileTaskSafely(task)) { latch.await(); @@ -193,14 +198,16 @@ private void finishRepairTimePartition(RepairTimePartition timePartition) { } } catch (Exception e) { LOGGER.error( - "[RepairScheduler][{}][{}] failed to record repair log for time partition {}", + StorageEngineMessages + .STORAGE_LOG_REPAIRSCHEDULER_FAILED_TO_RECORD_REPAIR_LOG_FOR_TIME_PARTITION_11251247, timePartition.getDatabaseName(), timePartition.getDataRegionId(), timePartition.getTimePartitionId(), e); } LOGGER.info( - "[RepairScheduler][{}][{}] time partition {} has been repaired, progress: {}/{}", + StorageEngineMessages + .STORAGE_LOG_REPAIRSCHEDULER_TIME_PARTITION_HAS_BEEN_REPAIRED_PROGRESS_697FEA22, timePartition.getDatabaseName(), timePartition.getDataRegionId(), timePartition.getTimePartitionId(), diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/repair/UnsortedFileRepairTaskScheduler.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/repair/UnsortedFileRepairTaskScheduler.java index 325af9e00dc0c..97ad5a6764d51 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/repair/UnsortedFileRepairTaskScheduler.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/repair/UnsortedFileRepairTaskScheduler.java @@ -94,7 +94,10 @@ private void initRepairDataTask( recoverRepairProgress(recoverLogParser); } catch (Exception e) { LOGGER.error( - "[RepairScheduler] Failed to parse repair log file {}", logFile.getAbsolutePath(), e); + StorageEngineMessages + .STORAGE_LOG_REPAIRSCHEDULER_FAILED_TO_PARSE_REPAIR_LOG_FILE_142D2568, + logFile.getAbsolutePath(), + e); return; } } @@ -102,7 +105,8 @@ private void initRepairDataTask( repairLogger.recordRepairTaskStartTimeIfLogFileEmpty(repairTaskTime); } catch (IOException e) { LOGGER.error( - "[RepairScheduler] Failed to record repair task start time in log file {}", + StorageEngineMessages + .STORAGE_LOG_REPAIRSCHEDULER_FAILED_TO_RECORD_REPAIR_TASK_START_TIME_95552D7E, logFile.getAbsolutePath(), e); return; @@ -126,7 +130,8 @@ private File getOrCreateRepairLogDir() { private void recoverRepairProgress(RepairTaskRecoverLogParser recoverLogParser) { LOGGER.info( - "[RepairScheduler] recover unfinished repair schedule task from log file: {}", + StorageEngineMessages + .STORAGE_LOG_REPAIRSCHEDULER_RECOVER_UNFINISHED_REPAIR_SCHEDULE_TASK_7C5B6D5F, recoverLogParser.getRepairLogFilePath()); Map> repairedTimePartitionWithCannotRepairFiles = @@ -200,7 +205,8 @@ public void run() { repairLogger.close(); } catch (Exception e) { LOGGER.error( - "[RepairScheduler] Failed to close repair logger {}", + StorageEngineMessages + .STORAGE_LOG_REPAIRSCHEDULER_FAILED_TO_CLOSE_REPAIR_LOGGER_EC191F6B, repairLogger.getRepairLogFilePath(), e); } @@ -232,7 +238,8 @@ private void startTimePartitionScanTasks() throws InterruptedException { for (RepairTimePartition timePartition : allTimePartitionFiles) { if (timePartition.isRepaired()) { LOGGER.info( - "[RepairScheduler][{}][{}] skip repair time partition {} because it is repaired", + StorageEngineMessages + .STORAGE_LOG_REPAIRSCHEDULER_SKIP_REPAIR_TIME_PARTITION_BECAUSE_IT_IS_BDD35739, timePartition.getDatabaseName(), timePartition.getDataRegionId(), timePartition.getTimePartitionId()); @@ -240,7 +247,8 @@ private void startTimePartitionScanTasks() throws InterruptedException { continue; } LOGGER.info( - "[RepairScheduler] submit a repair time partition scan task {}-{}-{}", + StorageEngineMessages + .STORAGE_LOG_REPAIRSCHEDULER_SUBMIT_A_REPAIR_TIME_PARTITION_SCAN_TASK_0E98F12C, timePartition.getDatabaseName(), timePartition.getDataRegionId(), timePartition.getTimePartitionId()); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/schedule/CompactionScheduleTaskManager.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/schedule/CompactionScheduleTaskManager.java index 9e207b90b1ceb..9024b0995f2fc 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/schedule/CompactionScheduleTaskManager.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/schedule/CompactionScheduleTaskManager.java @@ -182,7 +182,9 @@ public void waitAndStop(long milliseconds) { } } catch (InterruptedException e) { logger.warn( - "compaction schedule task thread pool can not be closed in {} ms", milliseconds); + StorageEngineMessages + .STORAGE_LOG_COMPACTION_SCHEDULE_TASK_THREAD_POOL_CAN_NOT_BE_CLOSED_IN_27D38188, + milliseconds); Thread.currentThread().interrupt(); } } finally { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/schedule/CompactionScheduleTaskWorker.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/schedule/CompactionScheduleTaskWorker.java index 714d232d62538..befef89594448 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/schedule/CompactionScheduleTaskWorker.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/schedule/CompactionScheduleTaskWorker.java @@ -21,6 +21,7 @@ import org.apache.iotdb.commons.conf.IoTDBConstant; import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.i18n.StorageEngineMessages; import org.apache.iotdb.db.storageengine.StorageEngine; import org.apache.iotdb.db.storageengine.dataregion.DataRegion; @@ -75,7 +76,8 @@ public Void call() { boolean isStoppedByUser = CompactionScheduleTaskManager.getInstance().isStoppingAllScheduleTask(); logger.info( - "[CompactionScheduleTaskWorker-{}] compaction schedule is interrupted, isStopByUser: {}", + StorageEngineMessages + .STORAGE_LOG_COMPACTIONSCHEDULETASKWORKER_COMPACTION_SCHEDULE_IS_INTERRUPTED_9EF702D1, workerId, isStoppedByUser); if (isStoppedByUser) { @@ -83,12 +85,14 @@ public Void call() { } } catch (Exception e) { logger.error( - "[CompactionScheduleTaskWorker-{}] Failed to execute compaction schedule task", + StorageEngineMessages + .STORAGE_LOG_COMPACTIONSCHEDULETASKWORKER_FAILED_TO_EXECUTE_COMPACTION_4F302761, workerId, e); } catch (Throwable t) { logger.error( - "[CompactionScheduleTaskWorker-{}] Failed to execute compaction schedule task and cannot recover", + StorageEngineMessages + .STORAGE_LOG_COMPACTIONSCHEDULETASKWORKER_FAILED_TO_EXECUTE_COMPACTION_E571F6E3, workerId, t); throw t; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/schedule/CompactionScheduler.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/schedule/CompactionScheduler.java index ae9e871b0b40c..77f13d3fe9070 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/schedule/CompactionScheduler.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/schedule/CompactionScheduler.java @@ -208,7 +208,8 @@ private static boolean canAddTaskToWaitingQueue(AbstractCompactionTask task) // check disk space if (!task.isDiskSpaceCheckPassed()) { LOGGER.info( - "Compaction task start check failed because disk free ratio is less than disk_space_warning_threshold"); + StorageEngineMessages + .STORAGE_LOG_COMPACTION_TASK_START_CHECK_FAILED_BECAUSE_DISK_FREE_RATIO_9D2BE2FE); return false; } return true; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/schedule/CompactionTaskManager.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/schedule/CompactionTaskManager.java index 544fba11f74f3..169d10137d8be 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/schedule/CompactionTaskManager.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/schedule/CompactionTaskManager.java @@ -448,18 +448,20 @@ public void restart() throws InterruptedException { if (!this.subCompactionTaskExecutionPool.awaitTermination( MAX_WAITING_TIME, TimeUnit.MILLISECONDS)) { throw new InterruptedException( - "Has been waiting over " - + MAX_WAITING_TIME / 1000 - + " seconds for all sub compaction tasks to finish."); + String.format( + StorageEngineMessages + .STORAGE_EXCEPTION_HAS_BEEN_WAITING_OVER_S_SECONDS_FOR_ALL_SUB_COMPACTION_TASKS_76BD45D6, + MAX_WAITING_TIME / 1000)); } } if (taskExecutionPool != null) { this.taskExecutionPool.shutdownNow(); if (!this.taskExecutionPool.awaitTermination(MAX_WAITING_TIME, TimeUnit.MILLISECONDS)) { throw new InterruptedException( - "Has been waiting over " - + MAX_WAITING_TIME / 1000 - + " seconds for all compaction tasks to finish."); + String.format( + StorageEngineMessages + .STORAGE_EXCEPTION_HAS_BEEN_WAITING_OVER_S_SECONDS_FOR_ALL_COMPACTION_TASKS_87E1B82E, + MAX_WAITING_TIME / 1000)); } } initThreadPool(); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/schedule/TTLScheduleTask.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/schedule/TTLScheduleTask.java index f76f58aab8022..0ed5a4f9355c0 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/schedule/TTLScheduleTask.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/schedule/TTLScheduleTask.java @@ -71,7 +71,8 @@ public Void call() throws Exception { boolean isStoppedByUser = CompactionScheduleTaskManager.getInstance().isStoppingAllScheduleTask(); logger.info( - "[TTLCheckTask-{}] TTL checker is interrupted, isStoppedByUser: {}", + StorageEngineMessages + .STORAGE_LOG_TTLCHECKTASK_TTL_CHECKER_IS_INTERRUPTED_ISSTOPPEDBYUSER_B1E45A2E, workerId, isStoppedByUser); if (isStoppedByUser) { @@ -81,7 +82,10 @@ public Void call() throws Exception { logger.error(StorageEngineMessages.TTL_CHECK_TASK_FAILED, workerId, e); } catch (Throwable t) { logger.error( - "[TTLCheckTask-{}] Failed to execute ttl check and cannot recover", workerId, t); + StorageEngineMessages + .STORAGE_LOG_TTLCHECKTASK_FAILED_TO_EXECUTE_TTL_CHECK_AND_CANNOT_RECOVER_6F4E4A13, + workerId, + t); throw t; } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/selector/ICompactionSelector.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/selector/ICompactionSelector.java index d8848cf6ed8f2..919925616cd3d 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/selector/ICompactionSelector.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/selector/ICompactionSelector.java @@ -73,11 +73,13 @@ static AbstractCompactionEstimator getCompactionEstimator( } default: throw new RuntimeException( - "Corresponding memory estimator for " - + compactionPerformer - + " performer of " - + (isInnerSpace ? "inner" : "cross") - + " space compaction is not existed."); + String.format( + StorageEngineMessages + .STORAGE_EXCEPTION_CORRESPONDING_MEMORY_ESTIMATOR_FOR_S_PERFORMER_OF_S_SPACE_D543D3EF, + compactionPerformer, + (isInnerSpace + ? StorageEngineMessages.COMPACTION_INNER_SPACE + : StorageEngineMessages.COMPACTION_CROSS_SPACE))); } } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/selector/estimator/CompactionEstimateUtils.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/selector/estimator/CompactionEstimateUtils.java index d4be316e888ed..a86c8358fe924 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/selector/estimator/CompactionEstimateUtils.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/selector/estimator/CompactionEstimateUtils.java @@ -21,6 +21,7 @@ import org.apache.iotdb.commons.conf.IoTDBConstant; import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.i18n.StorageEngineMessages; import org.apache.iotdb.db.storageengine.dataregion.compaction.execute.exception.CompactionSourceFileDeletedException; import org.apache.iotdb.db.storageengine.dataregion.compaction.io.CompactionTsFileReader; import org.apache.iotdb.db.storageengine.dataregion.compaction.schedule.constant.CompactionType; @@ -123,7 +124,7 @@ static FileInfo calculateFileInfo(TsFileSequenceReader reader) throws IOExceptio } } else { LOGGER.warn( - "{} has null chunk metadata, file is {}", + StorageEngineMessages.STORAGE_LOG_HAS_NULL_CHUNK_METADATA_FILE_IS_819E4A49, device.toString() + "." + measurementChunkMetadataList.getKey(), reader.getFileName()); } @@ -251,7 +252,9 @@ public static void addReadLock(List resources) resources.get(j).readUnlock(); } throw new CompactionSourceFileDeletedException( - "source file " + resource.getTsFilePath() + " is deleted"); + String.format( + StorageEngineMessages.STORAGE_EXCEPTION_SOURCE_FILE_S_IS_DELETED_D2ED7D90, + resource.getTsFilePath())); } } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/selector/impl/RewriteCrossSpaceCompactionSelector.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/selector/impl/RewriteCrossSpaceCompactionSelector.java index f2b37bda42ceb..96db160a5a6f3 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/selector/impl/RewriteCrossSpaceCompactionSelector.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/selector/impl/RewriteCrossSpaceCompactionSelector.java @@ -138,7 +138,8 @@ public CrossCompactionTaskResource selectOneTaskResources(CrossSpaceCompactionCa } try { LOGGER.debug( - "Selecting cross compaction task resources from {} seqFile, {} unseqFiles", + StorageEngineMessages + .STORAGE_LOG_SELECTING_CROSS_COMPACTION_TASK_RESOURCES_FROM_SEQFILE_UNSEQFILES_F4E1ABEB, candidate.getSeqFiles().size(), candidate.getUnseqFiles().size()); @@ -165,7 +166,8 @@ public InsertionCrossCompactionTaskResource selectOneInsertionTask( new InsertionCrossSpaceCompactionSelector(candidate); try { LOGGER.debug( - "Selecting insertion cross compaction task resources from {} seqFile, {} unseqFiles", + StorageEngineMessages + .STORAGE_LOG_SELECTING_INSERTION_CROSS_COMPACTION_TASK_RESOURCES_FROM_ECB186D1, candidate.getSeqFiles().size(), candidate.getUnseqFiles().size()); boolean delaySelection = @@ -249,7 +251,8 @@ private CrossCompactionTaskResource executeTaskResourceSelection( } taskResource.putResources(unseqFile, targetSeqFiles, memoryCost); LOGGER.debug( - "Adding a new unseqFile {} and seqFiles {} as candidates, new cost {}, total cost {}", + StorageEngineMessages + .STORAGE_LOG_ADDING_A_NEW_UNSEQFILE_AND_SEQFILES_AS_CANDIDATES_NEW_COST_07DD0A10, unseqFile, targetSeqFiles, memoryCost, @@ -268,7 +271,8 @@ private TsFileResourceCandidate getLatestSealedSeqFile( // overlapping of the new compacted files with the subsequent seq files. if (seqResourceCandidate.isValidCandidate) { LOGGER.debug( - "Select one valid seq file {} for nonOverlap unseq file to compact with.", + StorageEngineMessages + .STORAGE_LOG_SELECT_ONE_VALID_SEQ_FILE_FOR_NONOVERLAP_UNSEQ_FILE_TO_COMPACT_456668F1, seqResourceCandidate.resource); return seqResourceCandidate; } @@ -378,10 +382,8 @@ public List selectCrossSpaceTask( if (!taskResources.isValid()) { if (!hasPrintedLog) { LOGGER.info( - "{} [{}] Total source files: {} seqFiles, {} unseqFiles. " - + "Candidate source files: {} seqFiles, {} unseqFiles. " - + "Cannot select any files because they do not meet the conditions " - + "or may be occupied by other compaction threads.", + StorageEngineMessages + .STORAGE_LOG_TOTAL_SOURCE_FILES_SEQFILES_UNSEQFILES_CANDIDATE_SOURCE_7511ED9E, isInsertionTask ? "InsertionCrossSpaceCompaction" : "CrossSpaceCompaction", sgDataRegionId, sequenceFileList.size(), @@ -394,14 +396,8 @@ public List selectCrossSpaceTask( } long timeCost = System.currentTimeMillis() - startTime; LOGGER.info( - "{} [{}] Total source files: {} seqFiles, {} unseqFiles. " - + "Candidate source files: {} seqFiles, {} unseqFiles. " - + "Selected source files: {} seqFiles, " - + "{} unseqFiles, estimated memory cost {} MB, " - + "total selected file size is {} MB, " - + "total selected seq file size is {} MB, " - + "total selected unseq file size is {} MB, " - + "time consumption {}ms.", + StorageEngineMessages + .STORAGE_LOG_TOTAL_SOURCE_FILES_SEQFILES_UNSEQFILES_CANDIDATE_SOURCE_B8B01FC4, sgDataRegionId, isInsertionTask ? "InsertionCrossSpaceCompaction" : "CrossSpaceCompaction", sequenceFileList.size(), diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/selector/impl/SettleSelectorImpl.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/selector/impl/SettleSelectorImpl.java index 09a55819dd936..cef6084d1aebb 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/selector/impl/SettleSelectorImpl.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/selector/impl/SettleSelectorImpl.java @@ -25,6 +25,7 @@ import org.apache.iotdb.commons.utils.CommonDateTimeUtils; import org.apache.iotdb.db.conf.IoTDBConfig; import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.i18n.StorageEngineMessages; import org.apache.iotdb.db.queryengine.plan.analyze.cache.schema.DataNodeTTLCache; import org.apache.iotdb.db.storageengine.dataregion.compaction.execute.performer.ICompactionPerformer; import org.apache.iotdb.db.storageengine.dataregion.compaction.execute.task.SettleCompactionTask; @@ -192,7 +193,10 @@ private List selectTasks(List resources) { return createTask(partiallyDirtyResourceList); } catch (Exception e) { LOGGER.error( - "{}-{} cannot select file for settle compaction", storageGroupName, dataRegionId, e); + StorageEngineMessages.STORAGE_LOG_CANNOT_SELECT_FILE_FOR_SETTLE_COMPACTION_08C958D3, + storageGroupName, + dataRegionId, + e); } return Collections.emptyList(); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/selector/impl/SizeTieredCompactionSelector.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/selector/impl/SizeTieredCompactionSelector.java index 80b7541df512a..8785dd5effc5a 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/selector/impl/SizeTieredCompactionSelector.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/selector/impl/SizeTieredCompactionSelector.java @@ -145,7 +145,8 @@ private List> selectTsFileResourcesByLevel(int level) throw selectedFileList.add(currentFile); selectedFileSize += currentFile.getTsFileSize(); LOGGER.debug( - "Add tsfile {}, current select file num is {}, size is {}", + StorageEngineMessages + .STORAGE_LOG_ADD_TSFILE_CURRENT_SELECT_FILE_NUM_IS_SIZE_IS_17E21BC9, currentFile, selectedFileList.size(), selectedFileSize); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/settle/SettleRequestHandler.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/settle/SettleRequestHandler.java index 470d82cfc498f..01060b6380d7f 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/settle/SettleRequestHandler.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/settle/SettleRequestHandler.java @@ -24,6 +24,7 @@ import org.apache.iotdb.commons.consensus.DataRegionId; import org.apache.iotdb.db.conf.IoTDBConfig; import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.i18n.StorageEngineMessages; import org.apache.iotdb.db.storageengine.StorageEngine; import org.apache.iotdb.db.storageengine.dataregion.DataRegion; import org.apache.iotdb.db.storageengine.dataregion.compaction.execute.performer.ICompactionPerformer; @@ -295,7 +296,8 @@ private TSStatus submitCompactionTask(List tsFileResources) { CompactionTaskManager.getInstance().addTaskToWaitingQueue(task); } catch (InterruptedException e) { logger.error( - "meet error when adding task-{} to compaction waiting queue: {}", + StorageEngineMessages + .STORAGE_LOG_MEET_ERROR_WHEN_ADDING_TASK_TO_COMPACTION_WAITING_QUEUE_84AA345D, task.getSerialId(), e.getMessage()); Thread.currentThread().interrupt(); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/settle/SettleTask.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/settle/SettleTask.java index 98f305e10eac8..48d7c85ed0d3c 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/settle/SettleTask.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/settle/SettleTask.java @@ -48,7 +48,9 @@ public void runMayThrow() { settleTsFile(); } catch (Exception e) { logger.error( - "meet error when settling file:{}", resourceToBeSettled.getTsFile().getAbsolutePath(), e); + StorageEngineMessages.STORAGE_LOG_MEET_ERROR_WHEN_SETTLING_FILE_CBA0F9D7, + resourceToBeSettled.getTsFile().getAbsolutePath(), + e); } } @@ -56,7 +58,7 @@ public void settleTsFile() throws WriteProcessException { List settledResources = new ArrayList<>(); if (!resourceToBeSettled.isClosed()) { logger.warn( - "The tsFile {} should be sealed when settling.", + StorageEngineMessages.STORAGE_LOG_THE_TSFILE_SHOULD_BE_SEALED_WHEN_SETTLING_8DBD716A, resourceToBeSettled.getTsFile().getAbsolutePath()); return; } @@ -85,7 +87,8 @@ public void settleTsFile() throws WriteProcessException { resourceToBeSettled.readUnlock(); throw new WriteProcessException( String.format( - "Exception to parse the tsfile: %s in settling", + StorageEngineMessages + .STORAGE_EXCEPTION_EXCEPTION_TO_PARSE_THE_TSFILE_S_IN_SETTLING_D40564AD, resourceToBeSettled.getTsFile().getAbsolutePath()), e); } @@ -97,7 +100,8 @@ public void settleTsFile() throws WriteProcessException { + SettleLog.COMMA_SEPERATOR + SettleLog.SettleCheckStatus.SETTLE_SUCCESS); logger.info( - "Settle completes, file path:{} , the remaining file to be settled num: {}", + StorageEngineMessages + .STORAGE_LOG_SETTLE_COMPLETES_FILE_PATH_THE_REMAINING_FILE_TO_BE_SETTLED_32DF95A7, resourceToBeSettled.getTsFile().getAbsolutePath(), SettleService.getINSTANCE().getFilesToBeSettledCount().get()); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/flush/CompressionRatio.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/flush/CompressionRatio.java index dfc0899e7a7ab..a243912240f0c 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/flush/CompressionRatio.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/flush/CompressionRatio.java @@ -100,7 +100,8 @@ public synchronized void updateRatio(long memorySize, long diskSize, String data totalDiskSize += diskSize; if (memorySize < 0 || totalMemorySize.get() < 0) { LOGGER.warn( - "The compression ratio is negative, current memTableSize: {}, totalMemTableSize: {}", + StorageEngineMessages + .STORAGE_LOG_THE_COMPRESSION_RATIO_IS_NEGATIVE_CURRENT_MEMTABLESIZE_TOTALMEMTABLESIZE_8C3DD017, memorySize, totalMemorySize); } @@ -183,13 +184,15 @@ private void persist(File oldFile, File newFile) throws IOException { if (!oldFile.exists()) { Files.createFile(newFile.toPath()); LOGGER.debug( - "Old ratio file {} doesn't exist, force create ratio file {}", + StorageEngineMessages + .STORAGE_LOG_OLD_RATIO_FILE_DOESN_T_EXIST_FORCE_CREATE_RATIO_FILE_74EDD7DB, oldFile.getAbsolutePath(), newFile.getAbsolutePath()); } else { FileUtils.moveFile(oldFile, newFile); LOGGER.debug( - "Compression ratio file updated, previous: {}, current: {}", + StorageEngineMessages + .STORAGE_LOG_COMPRESSION_RATIO_FILE_UPDATED_PREVIOUS_CURRENT_7A9EEDF8, oldFile.getAbsolutePath(), newFile.getAbsolutePath()); } @@ -263,7 +266,8 @@ private void recoverDataNodeRatio(File[] ratioFiles) throws IOException { } } LOGGER.debug( - "After restoring from compression ratio file, total memory size = {}, total disk size = {}", + StorageEngineMessages + .STORAGE_LOG_AFTER_RESTORING_FROM_COMPRESSION_RATIO_FILE_TOTAL_MEMORY_D5ACB1C4, totalMemorySize, totalDiskSize); oldFileName = ratioFiles[maxRatioIndex].getName(); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/flush/MemTableFlushTask.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/flush/MemTableFlushTask.java index a8794b1ebf61e..888c184f573ec 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/flush/MemTableFlushTask.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/flush/MemTableFlushTask.java @@ -120,7 +120,8 @@ public MemTableFlushTask( MAX_NUMBER_OF_POINTS_IN_CHUNK, TARGET_CHUNK_SIZE); LOGGER.debug( - "flush task of database {} memtable is created, flushing to file {}.", + StorageEngineMessages + .STORAGE_LOG_FLUSH_TASK_OF_DATABASE_MEMTABLE_IS_CREATED_FLUSHING_TO_FILE_E44B3AA0, storageGroup, writer.getFile().getName()); } @@ -186,7 +187,8 @@ public void syncFlushMemTable() throws ExecutionException, InterruptedException } encodingTaskQueue.put(new TaskEnd()); LOGGER.debug( - "Database {} memtable flushing into file {}: data sort time cost {} ms.", + StorageEngineMessages + .STORAGE_LOG_DATABASE_MEMTABLE_FLUSHING_INTO_FILE_DATA_SORT_TIME_COST_3D39AA17, storageGroup, writer.getFile().getName(), sortTime); @@ -237,7 +239,8 @@ public void syncFlushMemTable() throws ExecutionException, InterruptedException @Override public void run() { LOGGER.debug( - "Database {} memtable flushing to file {} starts to encoding data.", + StorageEngineMessages + .STORAGE_LOG_DATABASE_MEMTABLE_FLUSHING_TO_FILE_STARTS_TO_ENCODING_DATA_6A89F32E, storageGroup, writer.getFile().getName()); while (true) { @@ -257,7 +260,8 @@ public void run() { @SuppressWarnings("squid:S2142") InterruptedException e) { LOGGER.error( - "Database {} memtable flushing to file {}, encoding task is interrupted.", + StorageEngineMessages + .STORAGE_LOG_DATABASE_MEMTABLE_FLUSHING_TO_FILE_ENCODING_TASK_IS_INTERRUPTED_9D7BF4EF, storageGroup, writer.getFile().getName(), e); @@ -328,7 +332,7 @@ public static void recordFlushPointsMetricInternal( private Runnable ioTask = () -> { LOGGER.debug( - "Database {} memtable flushing to file {} start io.", + StorageEngineMessages.STORAGE_LOG_DATABASE_MEMTABLE_FLUSHING_TO_FILE_START_IO_CB72C2DA, storageGroup, writer.getFile().getName()); while (true) { @@ -355,7 +359,10 @@ public static void recordFlushPointsMetricInternal( } } catch (IOException e) { LOGGER.error( - "Database {} memtable {}, io task meets error.", storageGroup, memTable, e); + StorageEngineMessages.STORAGE_LOG_DATABASE_MEMTABLE_IO_TASK_MEETS_ERROR_EC383D33, + storageGroup, + memTable, + e); return; } long subTaskTime = System.currentTimeMillis() - starTime; @@ -363,7 +370,8 @@ public static void recordFlushPointsMetricInternal( WRITING_METRICS.recordFlushSubTaskCost(WritingMetrics.IO_TASK, subTaskTime); } LOGGER.debug( - "flushing a memtable to file {} in database {}, io cost {}ms", + StorageEngineMessages + .STORAGE_LOG_FLUSHING_A_MEMTABLE_TO_FILE_IN_DATABASE_IO_COST_MS_2306578A, writer.getFile().getName(), storageGroup, ioTime); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/memtable/AbstractWritableMemChunk.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/memtable/AbstractWritableMemChunk.java index 873f49c54e217..9c78a247d7bc4 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/memtable/AbstractWritableMemChunk.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/memtable/AbstractWritableMemChunk.java @@ -22,6 +22,7 @@ import org.apache.iotdb.calc.exception.MemoryNotEnoughException; import org.apache.iotdb.calc.plan.planner.memory.MemoryReservationManager; import org.apache.iotdb.common.rpc.thrift.TSStatus; +import org.apache.iotdb.db.i18n.StorageEngineMessages; import org.apache.iotdb.db.queryengine.execution.fragment.FragmentInstanceContext; import org.apache.iotdb.db.queryengine.execution.fragment.QueryContext; import org.apache.iotdb.db.storageengine.dataregion.wal.buffer.IWALByteBufferView; @@ -70,7 +71,9 @@ protected void maybeReleaseTvList(TVList tvList) { // print log every 5 seconds if (retryCount % 50 == 0) { LOGGER.warn( - "Failed to transfer tvlist memory owner to query engine, {}", ex.getMessage()); + StorageEngineMessages + .STORAGE_LOG_FAILED_TO_TRANSFER_TVLIST_MEMORY_OWNER_TO_QUERY_ENGINE_0DFA506D, + ex.getMessage()); } retryCount++; long waitQueryInMs = System.currentTimeMillis() - startTimeInMs; @@ -85,7 +88,8 @@ protected void maybeReleaseTvList(TVList tvList) { FragmentInstanceContext firstQuery = (FragmentInstanceContext) iterator.next(); firstQuery.failed( new MemoryNotEnoughException( - "Memory not enough to clone the tvlist during flush phase")); + StorageEngineMessages + .STORAGE_EXCEPTION_MEMORY_NOT_ENOUGH_TO_CLONE_THE_TVLIST_DURING_FLUSH_PHASE_75C90725)); } } finally { tvList.unlockQueryList(); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/memtable/AlignedReadOnlyMemChunk.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/memtable/AlignedReadOnlyMemChunk.java index 01a61eee5cca3..0ba04ad53e683 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/memtable/AlignedReadOnlyMemChunk.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/memtable/AlignedReadOnlyMemChunk.java @@ -19,6 +19,7 @@ package org.apache.iotdb.db.storageengine.dataregion.memtable; +import org.apache.iotdb.db.i18n.StorageEngineMessages; import org.apache.iotdb.db.queryengine.execution.fragment.FragmentInstanceContext; import org.apache.iotdb.db.queryengine.execution.fragment.QueryContext; import org.apache.iotdb.db.queryengine.plan.statement.component.Ordering; @@ -257,7 +258,9 @@ public void initChunkMetaFromTvLists(Filter globalTimeFilter) { break; default: throw new UnSupportedDataTypeException( - String.format("Data type %s is not supported.", dataTypes.get(column))); + String.format( + StorageEngineMessages.STORAGE_EXCEPTION_DATA_TYPE_S_IS_NOT_SUPPORTED_5D5C02E4, + dataTypes.get(column))); } pageValueStatistics[column] = pageValueStats.isEmpty() ? null : pageValueStats; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/memtable/ReadOnlyMemChunk.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/memtable/ReadOnlyMemChunk.java index 4c32be0e79828..39629bbbcaae2 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/memtable/ReadOnlyMemChunk.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/memtable/ReadOnlyMemChunk.java @@ -21,6 +21,7 @@ import org.apache.iotdb.calc.exception.QueryProcessException; import org.apache.iotdb.commons.utils.TestOnly; +import org.apache.iotdb.db.i18n.StorageEngineMessages; import org.apache.iotdb.db.queryengine.execution.fragment.FragmentInstanceContext; import org.apache.iotdb.db.queryengine.execution.fragment.QueryContext; import org.apache.iotdb.db.queryengine.plan.statement.component.Ordering; @@ -112,13 +113,14 @@ public ReadOnlyMemChunk( floatPrecision = Integer.parseInt(props.get(Encoder.MAX_POINT_NUMBER)); } catch (NumberFormatException e) { logger.warn( - "The format of MAX_POINT_NUMBER {} is not correct." - + " Using default float precision.", + StorageEngineMessages + .STORAGE_LOG_THE_FORMAT_OF_MAX_POINT_NUMBER_IS_NOT_CORRECT_USING_DEFAULT_1B78AF69, props.get(Encoder.MAX_POINT_NUMBER)); } if (floatPrecision < 0) { logger.warn( - "The MAX_POINT_NUMBER shouldn't be less than 0." + " Using default float precision {}.", + StorageEngineMessages + .STORAGE_LOG_THE_MAX_POINT_NUMBER_SHOULDN_T_BE_LESS_THAN_0_USING_DEFAULT_12745217, TSFileDescriptor.getInstance().getConfig().getFloatPrecision()); floatPrecision = TSFileDescriptor.getInstance().getConfig().getFloatPrecision(); } @@ -216,7 +218,9 @@ public void initChunkMetaFromTvLists(Filter globalTimeFilter) { break; default: throw new UnSupportedDataTypeException( - String.format("Data type %s is not supported.", dataType)); + String.format( + StorageEngineMessages.STORAGE_EXCEPTION_DATA_TYPE_S_IS_NOT_SUPPORTED_5D5C02E4, + dataType)); } } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/memtable/TsFileProcessor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/memtable/TsFileProcessor.java index c4e488f84863f..7d8906f44a070 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/memtable/TsFileProcessor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/memtable/TsFileProcessor.java @@ -328,8 +328,10 @@ public void insert(InsertRowNode insertRowNode, long[] infoForMetrics) } else { throw new WriteProcessException( String.format( - "%s: %s write WAL failed: %s", - dataRegionName, tsFileResource.getTsFile().getAbsolutePath(), e.getMessage()), + StorageEngineMessages.STORAGE_EXCEPTION_S_S_WRITE_WAL_FAILED_S_5A7E61FB, + dataRegionName, + tsFileResource.getTsFile().getAbsolutePath(), + e.getMessage()), e); } } finally { @@ -425,8 +427,10 @@ public void insertRows(InsertRowsNode insertRowsNode, long[] infoForMetrics) } else { throw new WriteProcessException( String.format( - "%s: %s write WAL failed: %s", - dataRegionName, tsFileResource.getTsFile().getAbsolutePath(), e.getMessage()), + StorageEngineMessages.STORAGE_EXCEPTION_S_S_WRITE_WAL_FAILED_S_5A7E61FB, + dataRegionName, + tsFileResource.getTsFile().getAbsolutePath(), + e.getMessage()), e); } } finally { @@ -1160,7 +1164,9 @@ private void updateMemoryInfo( if (System.currentTimeMillis() - startTime > config.getMaxWaitingTimeWhenInsertBlocked()) { throw new WriteProcessRejectException( - "System rejected over " + (System.currentTimeMillis() - startTime) + "ms"); + String.format( + StorageEngineMessages.STORAGE_EXCEPTION_SYSTEM_REJECTED_OVER_SMS_94CEF932, + (System.currentTimeMillis() - startTime))); } } catch (InterruptedException e) { Thread.currentThread().interrupt(); @@ -1208,7 +1214,8 @@ public boolean deleteDataInMemory(ModEntry deletion) { if (workMemTable != null) { long pointDeleted = workMemTable.delete(deletion); logger.info( - "[Deletion] Deletion with {} in workMemTable, {} points deleted", + StorageEngineMessages + .STORAGE_LOG_DELETION_DELETION_WITH_IN_WORKMEMTABLE_POINTS_DELETED_00EA995A, deletion, pointDeleted); deleted = true; @@ -1254,7 +1261,7 @@ public boolean shouldFlush() { @TestOnly public void syncClose() throws ExecutionException { logger.info( - "Sync close file: {}, will firstly async close it", + StorageEngineMessages.STORAGE_LOG_SYNC_CLOSE_FILE_WILL_FIRSTLY_ASYNC_CLOSE_IT_34588A7D, tsFileResource.getTsFile().getAbsolutePath()); try { @@ -1291,8 +1298,8 @@ public Future asyncClose() { if (logger.isDebugEnabled()) { if (workMemTable != null) { logger.debug( - "{}: flush a working memtable in async close tsfile {}, memtable size: {}, tsfile " - + "size: {}, plan index: [{}, {}], progress index: {}", + StorageEngineMessages + .STORAGE_LOG_FLUSH_A_WORKING_MEMTABLE_IN_ASYNC_CLOSE_TSFILE_MEMTABLE_00158706, dataRegionName, tsFileResource.getTsFile().getAbsolutePath(), workMemTable.memSize(), @@ -1302,7 +1309,8 @@ public Future asyncClose() { tsFileResource.getMaxProgressIndex()); } else { logger.debug( - "{}: flush a NotifyFlushMemTable in async close tsfile {}, tsfile size: {}", + StorageEngineMessages + .STORAGE_LOG_FLUSH_A_NOTIFYFLUSHMEMTABLE_IN_ASYNC_CLOSE_TSFILE_TSFILE_48D1E75A, dataRegionName, tsFileResource.getTsFile().getAbsolutePath(), tsFileResource.getTsFileSize()); @@ -1330,7 +1338,7 @@ public Future asyncClose() { return future; } catch (Exception e) { logger.error( - "{}: {} async close failed, because", + StorageEngineMessages.STORAGE_LOG_ASYNC_CLOSE_FAILED_BECAUSE_C5B63B78, dataRegionName, tsFileResource.getTsFile().getName(), e); @@ -1351,11 +1359,12 @@ public void asyncFlush() { return; } logger.info( - "Async flush a memtable to tsfile: {}", tsFileResource.getTsFile().getAbsolutePath()); + StorageEngineMessages.STORAGE_LOG_ASYNC_FLUSH_A_MEMTABLE_TO_TSFILE_00ED383A, + tsFileResource.getTsFile().getAbsolutePath()); closeFuture = addAMemtableIntoFlushingList(workMemTable); } catch (Exception e) { logger.error( - "{}: {} add a memtable into flushing list failed", + StorageEngineMessages.STORAGE_LOG_ADD_A_MEMTABLE_INTO_FLUSHING_LIST_FAILED_30FA8E58, dataRegionName, tsFileResource.getTsFile().getName(), e); @@ -1396,7 +1405,8 @@ private Future addAMemtableIntoFlushingList(IMemTable tobeFlushed) throws IOE flushingMemTables.addLast(tobeFlushed); if (logger.isDebugEnabled()) { logger.debug( - "{}: {} Memtable (signal = {}) is added into the flushing Memtable, queue size = {}", + StorageEngineMessages + .STORAGE_LOG_MEMTABLE_SIGNAL_IS_ADDED_INTO_THE_FLUSHING_MEMTABLE_QUEUE_5D9DA8DB, dataRegionName, tsFileResource.getTsFile().getName(), tobeFlushed.isSignalMemTable(), @@ -1423,13 +1433,15 @@ private void releaseFlushedMemTable(IMemTable memTable) { writer.makeMetadataVisible(); if (!flushingMemTables.remove(memTable)) { logger.warn( - "{}: {} put the memtable (signal={}) out of flushingMemtables but it is not in the queue.", + StorageEngineMessages + .STORAGE_LOG_PUT_THE_MEMTABLE_SIGNAL_OUT_OF_FLUSHINGMEMTABLES_BUT_IT_D78AF257, dataRegionName, tsFileResource.getTsFile().getName(), memTable.isSignalMemTable()); } else if (logger.isDebugEnabled()) { logger.debug( - "{}: {} memtable (signal={}) is removed from the queue. {} left.", + StorageEngineMessages + .STORAGE_LOG_MEMTABLE_SIGNAL_IS_REMOVED_FROM_THE_QUEUE_LEFT_DFDB97D2, dataRegionName, tsFileResource.getTsFile().getName(), memTable.isSignalMemTable(), @@ -1441,8 +1453,8 @@ private void releaseFlushedMemTable(IMemTable memTable) { dataRegionInfo.releaseStorageGroupMemCost(memTable.getTVListsRamCost()); if (logger.isDebugEnabled()) { logger.debug( - "[mem control] {}: {} flush finished, try to reset system mem cost, " - + "flushing memtable list size: {}", + StorageEngineMessages + .STORAGE_LOG_MEM_CONTROL_FLUSH_FINISHED_TRY_TO_RESET_SYSTEM_MEM_COST_3CD8399C, dataRegionName, tsFileResource.getTsFile().getName(), flushingMemTables.size()); @@ -1452,8 +1464,8 @@ private void releaseFlushedMemTable(IMemTable memTable) { SystemInfo.getInstance().resetFlushingMemTableCost(memTable.getTVListsRamCost()); if (logger.isDebugEnabled()) { logger.debug( - "{}: {} flush finished, remove a memtable from flushing list, " - + "flushing memtable list size: {}", + StorageEngineMessages + .STORAGE_LOG_FLUSH_FINISHED_REMOVE_A_MEMTABLE_FROM_FLUSHING_LIST_FLUSHING_08A00750, dataRegionName, tsFileResource.getTsFile().getName(), flushingMemTables.size()); @@ -1477,7 +1489,8 @@ private void syncReleaseFlushedMemTable(IMemTable memTable) { flushingMemTables.notifyAll(); if (logger.isDebugEnabled()) { logger.debug( - "{}: {} released a memtable (signal={}), flushingMemtables size ={}", + StorageEngineMessages + .STORAGE_LOG_RELEASED_A_MEMTABLE_SIGNAL_FLUSHINGMEMTABLES_SIZE_6D22169F, dataRegionName, tsFileResource.getTsFile().getName(), memTable.isSignalMemTable(), @@ -1498,7 +1511,7 @@ public void flushOneMemTable() { if (!memTableToFlush.isSignalMemTable()) { if (memTableToFlush.isEmpty()) { logger.info( - "This normal memtable is empty, skip flush. {}: {}", + StorageEngineMessages.STORAGE_LOG_THIS_NORMAL_MEMTABLE_IS_EMPTY_SKIP_FLUSH_6C195557, dataRegionName, tsFileResource.getTsFile().getName()); } else { @@ -1515,7 +1528,8 @@ public void flushOneMemTable() { } catch (Throwable e) { if (writer == null) { logger.info( - "{}: {} is closed during flush, abandon flush task", + StorageEngineMessages + .STORAGE_LOG_IS_CLOSED_DURING_FLUSH_ABANDON_FLUSH_TASK_DD47632F, dataRegionName, tsFileResource.getTsFile().getAbsolutePath()); synchronized (flushingMemTables) { @@ -1523,21 +1537,23 @@ public void flushOneMemTable() { } } else { logger.error( - "{}: {} meet error when flushing a memtable, change system mode to error", + StorageEngineMessages + .STORAGE_LOG_MEET_ERROR_WHEN_FLUSHING_A_MEMTABLE_CHANGE_SYSTEM_MODE_TO_0C6D5025, dataRegionName, tsFileResource.getTsFile().getAbsolutePath(), e); CommonDescriptor.getInstance().getConfig().handleUnrecoverableError(); try { logger.error( - "{}: {} IOTask meets error, truncate the corrupted data", + StorageEngineMessages + .STORAGE_LOG_IOTASK_MEETS_ERROR_TRUNCATE_THE_CORRUPTED_DATA_E9041D54, dataRegionName, tsFileResource.getTsFile().getAbsolutePath(), e); writer.reset(); } catch (IOException e1) { logger.error( - "{}: {} Truncate corrupted data meets error", + StorageEngineMessages.STORAGE_LOG_TRUNCATE_CORRUPTED_DATA_MEETS_ERROR_3757A85E, dataRegionName, tsFileResource.getTsFile().getAbsolutePath(), e1); @@ -1559,7 +1575,7 @@ public void flushOneMemTable() { } } catch (Exception e1) { logger.error( - "{}: {} Release resource meets error", + StorageEngineMessages.STORAGE_LOG_RELEASE_RESOURCE_MEETS_ERROR_B62CBC3A, dataRegionName, tsFileResource.getTsFile().getAbsolutePath(), e1); @@ -1584,7 +1600,8 @@ public void flushOneMemTable() { } } catch (IOException e) { logger.error( - "Meet error when writing into ModificationFile file of {} ", + StorageEngineMessages + .STORAGE_LOG_MEET_ERROR_WHEN_WRITING_INTO_MODIFICATIONFILE_FILE_OF_63B5E24A, tsFileResource.getTsFile().getAbsolutePath(), e); } finally { @@ -1593,7 +1610,7 @@ public void flushOneMemTable() { if (logger.isDebugEnabled()) { logger.debug( - "{}: {} try get lock to release a memtable (signal={})", + StorageEngineMessages.STORAGE_LOG_TRY_GET_LOCK_TO_RELEASE_A_MEMTABLE_SIGNAL_B9098E21, dataRegionName, tsFileResource.getTsFile().getAbsolutePath(), memTableToFlush.isSignalMemTable()); @@ -1622,7 +1639,8 @@ public void flushOneMemTable() { updateCompressionRatio(); if (logger.isDebugEnabled()) { logger.debug( - "{}: {} flushingMemtables is empty and will close the file", + StorageEngineMessages + .STORAGE_LOG_FLUSHINGMEMTABLES_IS_EMPTY_AND_WILL_CLOSE_THE_FILE_22A07A5C, dataRegionName, tsFileResource.getTsFile().getAbsolutePath()); } @@ -1633,7 +1651,7 @@ public void flushOneMemTable() { } } catch (Exception e) { logger.error( - "{}: {} marking or ending file meet error", + StorageEngineMessages.STORAGE_LOG_MARKING_OR_ENDING_FILE_MEET_ERROR_5653B904, dataRegionName, tsFileResource.getTsFile().getAbsolutePath(), e); @@ -1645,7 +1663,7 @@ public void flushOneMemTable() { break; } catch (IOException e1) { logger.error( - "{}: {} truncate corrupted data meets error", + StorageEngineMessages.STORAGE_LOG_TRUNCATE_CORRUPTED_DATA_MEETS_ERROR_8F721CC1, dataRegionName, tsFileResource.getTsFile().getAbsolutePath(), e1); @@ -1653,7 +1671,8 @@ public void flushOneMemTable() { // Retry or set read-only if (retryCnt < 3) { logger.warn( - "{} meet error when flush FileMetadata to {}, retry it again", + StorageEngineMessages + .STORAGE_LOG_MEET_ERROR_WHEN_FLUSH_FILEMETADATA_TO_RETRY_IT_AGAIN_DAAF298C, dataRegionName, tsFileResource.getTsFile().getAbsolutePath(), e); @@ -1661,7 +1680,8 @@ public void flushOneMemTable() { continue; } else { logger.error( - "{} meet error when flush FileMetadata to {}, change system mode to error", + StorageEngineMessages + .STORAGE_LOG_MEET_ERROR_WHEN_FLUSH_FILEMETADATA_TO_CHANGE_SYSTEM_MODE_0BC79DA5, dataRegionName, tsFileResource.getTsFile().getAbsolutePath(), e); @@ -1672,7 +1692,7 @@ public void flushOneMemTable() { // For sync close if (logger.isDebugEnabled()) { logger.debug( - "{}: {} try to get flushingMemtables lock.", + StorageEngineMessages.STORAGE_LOG_TRY_TO_GET_FLUSHINGMEMTABLES_LOCK_F91EA27F, dataRegionName, tsFileResource.getTsFile().getAbsolutePath()); } @@ -1686,7 +1706,8 @@ private void updateCompressionRatio() { try { double compressionRatio = ((double) totalMemTableSize) / writer.getPos(); logger.info( - "The compression ratio of tsfile {} is {}, totalMemTableSize: {}, the file size: {}", + StorageEngineMessages + .STORAGE_LOG_THE_COMPRESSION_RATIO_OF_TSFILE_IS_TOTALMEMTABLESIZE_THE_8CE66BE3, writer.getFile().getAbsolutePath(), String.format("%.2f", compressionRatio), totalMemTableSize, @@ -1697,7 +1718,7 @@ private void updateCompressionRatio() { CompressionRatio.getInstance().updateRatio(totalMemTableSize, writer.getPos(), dataRegionId); } catch (IOException e) { logger.error( - "{}: {} update compression ratio failed", + StorageEngineMessages.STORAGE_LOG_UPDATE_COMPRESSION_RATIO_FAILED_8A076DFC, dataRegionName, tsFileResource.getTsFile().getName(), e); @@ -1755,7 +1776,7 @@ private void endEmptyFile() throws TsFileProcessorException, IOException { tsFileProcessorInfo.clear(); dataRegionInfo.closeTsFileProcessorAndReportToSystem(this); logger.info( - "Storage group {} close and remove empty file {}", + StorageEngineMessages.STORAGE_LOG_STORAGE_GROUP_CLOSE_AND_REMOVE_EMPTY_FILE_72D42293, dataRegionName, tsFileResource.getTsFile().getAbsoluteFile()); @@ -2012,7 +2033,7 @@ public void queryForSeriesRegionScanWithoutLock( } } catch (QueryProcessException | MetadataException | IOException e) { logger.error( - "{}: {} get ReadOnlyMemChunk has error", + StorageEngineMessages.STORAGE_LOG_GET_READONLYMEMCHUNK_HAS_ERROR_2366DE2A, dataRegionName, tsFileResource.getTsFile().getName(), e); @@ -2093,7 +2114,7 @@ public void queryForDeviceRegionScanWithoutLock( } } catch (QueryProcessException | MetadataException | IOException e) { logger.error( - "{}: {} get ReadOnlyMemChunk has error", + StorageEngineMessages.STORAGE_LOG_GET_READONLYMEMCHUNK_HAS_ERROR_2366DE2A, dataRegionName, tsFileResource.getTsFile().getName(), e); @@ -2190,7 +2211,7 @@ private void query( } } catch (QueryProcessException | MetadataException e) { logger.error( - "{}: {} get ReadOnlyMemChunk has error", + StorageEngineMessages.STORAGE_LOG_GET_READONLYMEMCHUNK_HAS_ERROR_2366DE2A, dataRegionName, tsFileResource.getTsFile().getName(), e); @@ -2354,7 +2375,9 @@ private void logFlushQueryWriteUnlocked() { private void logFlushQueryReadUnlocked() { if (logger.isDebugEnabled()) { logger.debug( - "{}: {} release flushQueryLock", dataRegionName, tsFileResource.getTsFile().getName()); + StorageEngineMessages.STORAGE_LOG_RELEASE_FLUSHQUERYLOCK_6DF2C0FC, + dataRegionName, + tsFileResource.getTsFile().getName()); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/modification/ModificationFile.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/modification/ModificationFile.java index 48786277ebb95..5ef17e9c01bc4 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/modification/ModificationFile.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/modification/ModificationFile.java @@ -277,7 +277,8 @@ public ModIterator(long offset) throws IOException { long skipped = inputStream.skip(offset); if (skipped != offset) { LOGGER.warn( - "Fail to read Mod file {}, expecting offset {}, actually skipped {}", + StorageEngineMessages + .STORAGE_LOG_FAIL_TO_READ_MOD_FILE_EXPECTING_OFFSET_ACTUALLY_SKIPPED_8B96B670, file, offset, skipped); @@ -423,7 +424,8 @@ public void compact() throws IOException { LOGGER.info(StorageEngineMessages.SETTLE_SUCCESSFUL, file); if (getFileLength() > COMPACT_THRESHOLD) { LOGGER.warn( - "After the mod file is settled, the file size is still greater than 1M,the size of the file before settle is {},after settled the file size is {}", + StorageEngineMessages + .STORAGE_LOG_AFTER_THE_MOD_FILE_IS_SETTLED_THE_FILE_SIZE_IS_STILL_GREATER_FA454979, originFileSize, getFileLength()); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/modification/v1/ModificationFileV1.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/modification/v1/ModificationFileV1.java index d17a5b50c2e39..77eda55f01fa6 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/modification/v1/ModificationFileV1.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/modification/v1/ModificationFileV1.java @@ -243,7 +243,8 @@ public void compact() { if (getSize() > COMPACT_THRESHOLD) { logger.warn( - "After the mod file is settled, the file size is still greater than 1M,the size of the file before settle is {},after settled the file size is {}", + StorageEngineMessages + .STORAGE_LOG_AFTER_THE_MOD_FILE_IS_SETTLED_THE_FILE_SIZE_IS_STILL_GREATER_FA454979, originFileSize, getSize()); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/modification/v1/io/LocalTextModificationAccessor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/modification/v1/io/LocalTextModificationAccessor.java index b9ae485d9289e..ecc4be4f90972 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/modification/v1/io/LocalTextModificationAccessor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/modification/v1/io/LocalTextModificationAccessor.java @@ -209,7 +209,11 @@ public void truncate(long size) { logger.debug(NO_MODIFICATION_MSG, filePath); } catch (IOException e) { logger.error( - "An error occurred when truncating modifications[{}] to size {}.", filePath, size, e); + StorageEngineMessages + .STORAGE_LOG_AN_ERROR_OCCURRED_WHEN_TRUNCATING_MODIFICATIONS_TO_SIZE_F8A0D6D5, + filePath, + size, + e); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/read/QueryDataSource.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/read/QueryDataSource.java index 2816493401671..0c86c887fe813 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/read/QueryDataSource.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/read/QueryDataSource.java @@ -19,6 +19,7 @@ package org.apache.iotdb.db.storageengine.dataregion.read; +import org.apache.iotdb.db.i18n.StorageEngineMessages; import org.apache.iotdb.db.storageengine.dataregion.tsfile.TsFileResource; import org.apache.tsfile.file.metadata.IDeviceID; @@ -127,7 +128,11 @@ public boolean isSeqSatisfied( IDeviceID deviceID, int curIndex, Filter timeFilter, boolean debug) { if (curIndex != this.curSeqIndex) { throw new IllegalArgumentException( - String.format("curIndex %d is not equal to curSeqIndex %d", curIndex, this.curSeqIndex)); + String.format( + StorageEngineMessages + .STORAGE_EXCEPTION_CURINDEX_D_IS_NOT_EQUAL_TO_CURSEQINDEX_D_6B9B1134, + curIndex, + this.curSeqIndex)); } if (curSeqSatisfied == null) { TsFileResource tsFileResource = seqResources.get(curSeqIndex); @@ -142,7 +147,11 @@ public boolean isSeqSatisfied( public long getCurrentSeqOrderTime(int curIndex) { if (curIndex != this.curSeqIndex) { throw new IllegalArgumentException( - String.format("curIndex %d is not equal to curSeqIndex %d", curIndex, this.curSeqIndex)); + String.format( + StorageEngineMessages + .STORAGE_EXCEPTION_CURINDEX_D_IS_NOT_EQUAL_TO_CURSEQINDEX_D_6B9B1134, + curIndex, + this.curSeqIndex)); } return this.curSeqOrderTime; } @@ -172,7 +181,10 @@ public boolean isUnSeqSatisfied( if (curIndex != this.curUnSeqIndex) { throw new IllegalArgumentException( String.format( - "curIndex %d is not equal to curUnSeqIndex %d", curIndex, this.curUnSeqIndex)); + StorageEngineMessages + .STORAGE_EXCEPTION_CURINDEX_D_IS_NOT_EQUAL_TO_CURUNSEQINDEX_D_AB32F71D, + curIndex, + this.curUnSeqIndex)); } if (curUnSeqSatisfied == null) { TsFileResource tsFileResource = unseqResources.get(unSeqFileOrderIndex[curIndex]); @@ -188,7 +200,10 @@ public long getCurrentUnSeqOrderTime(int curIndex) { if (curIndex != this.curUnSeqIndex) { throw new IllegalArgumentException( String.format( - "curIndex %d is not equal to curSeqIndex %d", curIndex, this.curUnSeqIndex)); + StorageEngineMessages + .STORAGE_EXCEPTION_CURINDEX_D_IS_NOT_EQUAL_TO_CURSEQINDEX_D_6B9B1134, + curIndex, + this.curUnSeqIndex)); } return this.curUnSeqOrderTime; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/read/control/FileReaderManager.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/read/control/FileReaderManager.java index 3952c7480a59d..a4819c6ba3404 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/read/control/FileReaderManager.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/read/control/FileReaderManager.java @@ -230,7 +230,8 @@ private void closeUnUsedReaderAndRemoveRef( readerMap.remove(tsFileID); refMap.remove(tsFileID); if (resourceLogger.isDebugEnabled()) { - resourceLogger.debug("{} TsFileReader is closed because of no reference.", tsFilePath); + resourceLogger.debug( + StorageEngineMessages.TSFILE_READER_CLOSED_BECAUSE_NO_REFERENCE, tsFilePath); } } } @@ -248,7 +249,7 @@ public synchronized void closeAndRemoveAllOpenedReaders() throws IOException { Map.Entry entry = iterator.next(); entry.getValue().close(); if (resourceLogger.isDebugEnabled()) { - resourceLogger.debug("{} closedTsFileReader is closed.", entry.getKey()); + resourceLogger.debug(StorageEngineMessages.CLOSED_TSFILE_READER_CLOSED, entry.getKey()); } closedReferenceMap.remove(entry.getKey()); iterator.remove(); @@ -258,7 +259,7 @@ public synchronized void closeAndRemoveAllOpenedReaders() throws IOException { Map.Entry entry = iterator.next(); entry.getValue().close(); if (resourceLogger.isDebugEnabled()) { - resourceLogger.debug("{} unclosedTsFileReader is closed.", entry.getKey()); + resourceLogger.debug(StorageEngineMessages.UNCLOSED_TSFILE_READER_CLOSED, entry.getKey()); } unclosedReferenceMap.remove(entry.getKey()); iterator.remove(); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/read/reader/chunk/MemAlignedPageReader.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/read/reader/chunk/MemAlignedPageReader.java index f28e1e4ceff10..a0b8a7aa17e51 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/read/reader/chunk/MemAlignedPageReader.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/read/reader/chunk/MemAlignedPageReader.java @@ -328,7 +328,9 @@ private void updatePageStatisticsFromTsBlock( break; default: throw new UnSupportedDataTypeException( - String.format("Data type %s is not supported.", tsDataTypes.get(column))); + String.format( + StorageEngineMessages.STORAGE_EXCEPTION_DATA_TYPE_S_IS_NOT_SUPPORTED_5D5C02E4, + tsDataTypes.get(column))); } } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/read/reader/chunk/MemPageReader.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/read/reader/chunk/MemPageReader.java index 911aa9c21afa6..b7e7bf6d995a4 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/read/reader/chunk/MemPageReader.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/read/reader/chunk/MemPageReader.java @@ -19,6 +19,7 @@ package org.apache.iotdb.db.storageengine.dataregion.read.reader.chunk; +import org.apache.iotdb.db.i18n.StorageEngineMessages; import org.apache.iotdb.db.storageengine.dataregion.read.reader.chunk.metadata.PageMetadata; import org.apache.tsfile.block.column.Column; @@ -316,7 +317,9 @@ private void updatePageStatisticsFromTsBlock(Statistics statistics) { break; default: throw new UnSupportedDataTypeException( - String.format("Data type %s is not supported.", tsDataType)); + String.format( + StorageEngineMessages.STORAGE_EXCEPTION_DATA_TYPE_S_IS_NOT_SUPPORTED_5D5C02E4, + tsDataType)); } } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/read/reader/chunk/metadata/DiskAlignedChunkMetadataLoader.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/read/reader/chunk/metadata/DiskAlignedChunkMetadataLoader.java index a89f6dd00f333..14fe3a25dad74 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/read/reader/chunk/metadata/DiskAlignedChunkMetadataLoader.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/read/reader/chunk/metadata/DiskAlignedChunkMetadataLoader.java @@ -109,7 +109,7 @@ public List loadChunkMetadataList(ITimeSeriesMetadata timeSeries if (context.isDebug()) { DEBUG_LOGGER.info( - "Modifications size is {} for file Path: {} ", + StorageEngineMessages.STORAGE_LOG_MODIFICATIONS_SIZE_IS_FOR_FILE_PATH_EED7FD92, valueColumnsModifications.size(), resource.getTsFilePath()); valueColumnsModifications.forEach(c -> DEBUG_LOGGER.info(c.toString())); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/read/reader/chunk/metadata/DiskChunkMetadataLoader.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/read/reader/chunk/metadata/DiskChunkMetadataLoader.java index 6e0f070423044..1b7495f54a086 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/read/reader/chunk/metadata/DiskChunkMetadataLoader.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/read/reader/chunk/metadata/DiskChunkMetadataLoader.java @@ -96,7 +96,7 @@ public List loadChunkMetadataList(ITimeSeriesMetadata timeSeries if (context.isDebug()) { DEBUG_LOGGER.info( - "Modifications size is {} for file Path: {} ", + StorageEngineMessages.STORAGE_LOG_MODIFICATIONS_SIZE_IS_FOR_FILE_PATH_EED7FD92, pathModifications.size(), resource.getTsFilePath()); pathModifications.forEach(c -> DEBUG_LOGGER.info(c.toString())); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/read/reader/chunk/metadata/PageMetadata.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/read/reader/chunk/metadata/PageMetadata.java index d188195baf769..d37e22e44ee8a 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/read/reader/chunk/metadata/PageMetadata.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/read/reader/chunk/metadata/PageMetadata.java @@ -19,6 +19,8 @@ package org.apache.iotdb.db.storageengine.dataregion.read.reader.chunk.metadata; +import org.apache.iotdb.db.i18n.StorageEngineMessages; + import org.apache.tsfile.enums.TSDataType; import org.apache.tsfile.file.metadata.IMetadata; import org.apache.tsfile.file.metadata.statistics.Statistics; @@ -79,7 +81,9 @@ public Optional> getMeasurementStatistics( int measurementIndex) { checkArgument( measurementIndex == 0, - "Non-aligned chunk only has one measurement, but measurementIndex is " + measurementIndex); + StorageEngineMessages + .EXCEPTION_NON_MINUS_ALIGNED_CHUNK_ONLY_HAS_ONE_MEASUREMENT_COMMA_BUT_MEASUREMENTINDEX_IS_E1A87F80 + + measurementIndex); return Optional.ofNullable(statistics); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/snapshot/SnapshotTaker.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/snapshot/SnapshotTaker.java index 52b7e2edc4b72..6707c3f6cc99b 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/snapshot/SnapshotTaker.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/snapshot/SnapshotTaker.java @@ -77,7 +77,9 @@ public boolean takeFullSnapshot( && Objects.requireNonNull(snapshotDir.listFiles()).length > 0) { // the directory should be empty or not exists throw new DirectoryNotLegalException( - String.format("%s already exists and is not empty", snapshotDirPath)); + String.format( + StorageEngineMessages.STORAGE_EXCEPTION_S_ALREADY_EXISTS_AND_IS_NOT_EMPTY_CF0BD6A4, + snapshotDirPath)); } if (!snapshotDir.exists() && !snapshotDir.mkdirs()) { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/tsfile/TsFileResource.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/tsfile/TsFileResource.java index 439286288d623..a9617e60aa77c 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/tsfile/TsFileResource.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/tsfile/TsFileResource.java @@ -617,7 +617,10 @@ public Optional getStartTime(IDeviceID deviceId) { return deviceId == null ? Optional.of(getFileStartTime()) : timeIndex.getStartTime(deviceId); } catch (Exception e) { LOGGER.error( - "meet error when getStartTime of {} in file {}", deviceId, file.getAbsolutePath(), e); + StorageEngineMessages.STORAGE_LOG_MEET_ERROR_WHEN_GETSTARTTIME_OF_IN_FILE_D7F27B92, + deviceId, + file.getAbsolutePath(), + e); if (LOGGER.isDebugEnabled()) { LOGGER.debug(StorageEngineMessages.TIME_INDEX_VALUE, timeIndex); } @@ -631,7 +634,10 @@ public Optional getEndTime(IDeviceID deviceId) { return deviceId == null ? Optional.of(getFileEndTime()) : timeIndex.getEndTime(deviceId); } catch (Exception e) { LOGGER.error( - "meet error when getEndTime of {} in file {}", deviceId, file.getAbsolutePath(), e); + StorageEngineMessages.STORAGE_LOG_MEET_ERROR_WHEN_GETENDTIME_OF_IN_FILE_350DA42F, + deviceId, + file.getAbsolutePath(), + e); if (LOGGER.isDebugEnabled()) { LOGGER.debug(StorageEngineMessages.TIME_INDEX_VALUE, timeIndex); } @@ -703,7 +709,11 @@ public ArrayDeviceTimeIndex buildDeviceTimeIndex(IDeviceID.Deserializer deserial return (ArrayDeviceTimeIndex) timeIndexFromResourceFile; } catch (Exception e) { throw new IOException( - "Can't read file " + file.getPath() + RESOURCE_SUFFIX + " from disk", e); + String.format( + StorageEngineMessages.STORAGE_EXCEPTION_CAN_T_READ_FILE_S_S_FROM_DISK_9D5066C0, + file.getPath(), + RESOURCE_SUFFIX), + e); } } finally { readUnlock(); @@ -1021,7 +1031,10 @@ public boolean isSatisfied(IDeviceID deviceId, Filter timeFilter, boolean isSeq, if (deviceId != null && definitelyNotContains(deviceId)) { if (debug) { DEBUG_LOGGER.info( - "Path: {} file {} is not satisfied because of no device!", deviceId, file); + StorageEngineMessages + .STORAGE_LOG_PATH_FILE_IS_NOT_SATISFIED_BECAUSE_OF_NO_DEVICE_8BB15136, + deviceId, + file); } return false; } @@ -1035,7 +1048,8 @@ public boolean isSatisfied(IDeviceID deviceId, Filter timeFilter, boolean isSeq, // false // directly, or it may lead to infinite loop in GroupByMonthFilter#getTimePointPosition. LOGGER.warn( - "startTime[{}] of TsFileResource[{}] is greater than its endTime[{}]", + StorageEngineMessages + .STORAGE_LOG_STARTTIME_OF_TSFILERESOURCE_IS_GREATER_THAN_ITS_ENDTIME_BC6CC591, startTime, this, endTime); @@ -1046,7 +1060,8 @@ public boolean isSatisfied(IDeviceID deviceId, Filter timeFilter, boolean isSeq, boolean res = timeFilter.satisfyStartEndTime(startTime, endTime); if (debug && !res) { DEBUG_LOGGER.info( - "Path: {} file {} is not satisfied because of time filter!", + StorageEngineMessages + .STORAGE_LOG_PATH_FILE_IS_NOT_SATISFIED_BECAUSE_OF_TIME_FILTER_71121709, deviceId != null ? deviceId : "", fsFactory); } @@ -1186,7 +1201,8 @@ public void updatePlanIndexes(long planIndex) { serialize(); } catch (IOException e) { LOGGER.error( - "Cannot serialize TsFileResource {} when updating plan index {}-{}", + StorageEngineMessages + .STORAGE_LOG_CANNOT_SERIALIZE_TSFILERESOURCE_WHEN_UPDATING_PLAN_INDEX_69665DD5, this, maxPlanIndex, planIndex); @@ -1438,7 +1454,8 @@ public ProgressIndex getProgressIndex() { public ProgressIndex getMaxProgressIndexAfterClose() throws IllegalStateException { if (getStatus().equals(TsFileResourceStatus.UNCLOSED)) { throw new IllegalStateException( - "Should not get progress index from a unclosing TsFileResource."); + StorageEngineMessages + .STORAGE_EXCEPTION_SHOULD_NOT_GET_PROGRESS_INDEX_FROM_A_UNCLOSING_TSFILERESOURCE_129FD925); } return getMaxProgressIndex(); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/tsfile/generator/TsFileNameGenerator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/tsfile/generator/TsFileNameGenerator.java index 37c8f1a964fa1..c723dce3f3b7c 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/tsfile/generator/TsFileNameGenerator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/tsfile/generator/TsFileNameGenerator.java @@ -112,9 +112,10 @@ public static String generateNewTsFilePathWithMkdir( if (!targetDir.exists()) { if (!targetDir.mkdirs() && !targetDir.exists()) { throw new IOException( - "Directory creation failed: " - + tsFileDir - + " (Permission denied or parent not writable)"); + String.format( + StorageEngineMessages + .STORAGE_EXCEPTION_DIRECTORY_CREATION_FAILED_S_PERMISSION_DENIED_OR_PARENT_2855777B, + tsFileDir)); } } return tsFileDir diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/tsfile/timeindex/FileTimeIndex.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/tsfile/timeindex/FileTimeIndex.java index e0761d9ef7c2d..0230c052392a8 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/tsfile/timeindex/FileTimeIndex.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/tsfile/timeindex/FileTimeIndex.java @@ -109,15 +109,26 @@ public Set getDevices(String tsFilePath, TsFileResource tsFileResourc return Collections.emptySet(); } else { logger.error( - "Can't read file {} from disk ", tsFilePath + TsFileResource.RESOURCE_SUFFIX, e); + StorageEngineMessages.STORAGE_LOG_CAN_T_READ_FILE_FROM_DISK_F5625609, + tsFilePath + TsFileResource.RESOURCE_SUFFIX, + e); throw new RuntimeException( - "Can't read file " + tsFilePath + TsFileResource.RESOURCE_SUFFIX + " from disk"); + String.format( + StorageEngineMessages.STORAGE_EXCEPTION_CAN_T_READ_FILE_S_S_FROM_DISK_9D5066C0, + tsFilePath, + TsFileResource.RESOURCE_SUFFIX)); } } catch (Exception e) { logger.error( - "Failed to get devices from tsfile: {}", tsFilePath + TsFileResource.RESOURCE_SUFFIX, e); + StorageEngineMessages.STORAGE_LOG_FAILED_TO_GET_DEVICES_FROM_TSFILE_F94CF47B, + tsFilePath + TsFileResource.RESOURCE_SUFFIX, + e); throw new RuntimeException( - "Failed to get devices from tsfile: " + tsFilePath + TsFileResource.RESOURCE_SUFFIX); + String.format( + StorageEngineMessages + .STORAGE_EXCEPTION_FAILED_TO_GET_DEVICES_FROM_TSFILE_S_S_412EEA1A, + tsFilePath, + TsFileResource.RESOURCE_SUFFIX)); } finally { tsFileResource.readUnlock(); } @@ -148,15 +159,26 @@ public Set getDevices( return Collections.emptySet(); } else { logger.error( - "Can't read file {} from disk ", tsFilePath + TsFileResource.RESOURCE_SUFFIX, e); + StorageEngineMessages.STORAGE_LOG_CAN_T_READ_FILE_FROM_DISK_F5625609, + tsFilePath + TsFileResource.RESOURCE_SUFFIX, + e); throw new RuntimeException( - "Can't read file " + tsFilePath + TsFileResource.RESOURCE_SUFFIX + " from disk"); + String.format( + StorageEngineMessages.STORAGE_EXCEPTION_CAN_T_READ_FILE_S_S_FROM_DISK_9D5066C0, + tsFilePath, + TsFileResource.RESOURCE_SUFFIX)); } } catch (Exception e) { logger.error( - "Failed to get devices from tsfile: {}", tsFilePath + TsFileResource.RESOURCE_SUFFIX, e); + StorageEngineMessages.STORAGE_LOG_FAILED_TO_GET_DEVICES_FROM_TSFILE_F94CF47B, + tsFilePath + TsFileResource.RESOURCE_SUFFIX, + e); throw new RuntimeException( - "Failed to get devices from tsfile: " + tsFilePath + TsFileResource.RESOURCE_SUFFIX); + String.format( + StorageEngineMessages + .STORAGE_EXCEPTION_FAILED_TO_GET_DEVICES_FROM_TSFILE_S_S_412EEA1A, + tsFilePath, + TsFileResource.RESOURCE_SUFFIX)); } finally { tsFileResource.readUnlock(); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/tsfile/timeindex/FileTimeIndexCacheRecorder.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/tsfile/timeindex/FileTimeIndexCacheRecorder.java index 50f55db7e1847..40159a6924bc6 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/tsfile/timeindex/FileTimeIndexCacheRecorder.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/tsfile/timeindex/FileTimeIndexCacheRecorder.java @@ -175,7 +175,8 @@ private FileTimeIndexCacheWriter getWriter(int dataRegionId, File dataRegionSysD try { if (!dataRegionSysDir.exists() && !dataRegionSysDir.mkdirs()) { LOGGER.debug( - "DataRegionSysDir has existed,filePath:{}", dataRegionSysDir.getAbsolutePath()); + StorageEngineMessages.STORAGE_LOG_DATAREGIONSYSDIR_HAS_EXISTED_FILEPATH_53009475, + dataRegionSysDir.getAbsolutePath()); } if (!logFile.createNewFile()) { LOGGER.debug( @@ -185,7 +186,10 @@ private FileTimeIndexCacheWriter getWriter(int dataRegionId, File dataRegionSysD return new FileTimeIndexCacheWriter(logFile, true); } catch (IOException e) { LOGGER.error( - "FileTimeIndex log file create filed,filePath:{}", logFile.getAbsolutePath(), e); + StorageEngineMessages + .STORAGE_LOG_FILETIMEINDEX_LOG_FILE_CREATE_FILED_FILEPATH_D675FBD5, + logFile.getAbsolutePath(), + e); throw new RuntimeException(e); } }); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/utils/SharedTimeDataBuffer.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/utils/SharedTimeDataBuffer.java index 2cce253e78ed7..184d939da8293 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/utils/SharedTimeDataBuffer.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/utils/SharedTimeDataBuffer.java @@ -76,7 +76,8 @@ public long[] getPageTime(int pageId) throws IOException { return timeData.get(pageId); } else { throw new UnsupportedOperationException( - "PageId in SharedTimeDataBuffer should be incremental."); + StorageEngineMessages + .STORAGE_EXCEPTION_PAGEID_IN_SHAREDTIMEDATABUFFER_SHOULD_BE_INCREMENTAL_A5E6C4EE); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/utils/TsFileResourceUtils.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/utils/TsFileResourceUtils.java index c254ce028e5d8..755fe88bb46af 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/utils/TsFileResourceUtils.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/utils/TsFileResourceUtils.java @@ -106,7 +106,7 @@ public static boolean validateTsFileResourceCorrectness(TsFileResource resource) long endTime = timeIndex.getEndTime(device).get(); if (startTime > endTime) { logger.error( - "{} {} the start time of {} is greater than end time", + StorageEngineMessages.STORAGE_LOG_THE_START_TIME_OF_IS_GREATER_THAN_END_TIME_44DD784A, resource.getTsFilePath(), VALIDATE_FAILED, device); @@ -127,7 +127,9 @@ public static boolean validateTsFileIsComplete(TsFileResource resource) { // file size is smaller than magic string and version number logger.error( String.format( - "target file %s is smaller than magic string and version number size", resource)); + StorageEngineMessages + .TARGET_FILE_SMALLER_THAN_MAGIC_STRING_AND_VERSION_NUMBER_SIZE_FMT, + resource)); return false; } return true; @@ -147,7 +149,9 @@ public static boolean validateTsFileDataCorrectness(TsFileResource resource) { Map chunkMetadataMap = getChunkMetadata(reader); if (chunkMetadataMap.isEmpty()) { logger.error( - "{} {} there is no data in the file", resource.getTsFilePath(), VALIDATE_FAILED); + StorageEngineMessages.STORAGE_LOG_THERE_IS_NO_DATA_IN_THE_FILE_F480954E, + resource.getTsFilePath(), + VALIDATE_FAILED); return false; } @@ -169,7 +173,8 @@ public static boolean validateTsFileDataCorrectness(TsFileResource resource) { IChunkMetadata chunkMetadata = chunkMetadataMap.get(chunkOffset - Byte.BYTES); if (!chunkMetadata.getMeasurementUid().equals(header.getMeasurementID())) { logger.error( - "{} chunk start offset is inconsistent with the value in the metadata.", + StorageEngineMessages + .STORAGE_LOG_CHUNK_START_OFFSET_IS_INCONSISTENT_WITH_THE_VALUE_IN_THE_E1E7AF07, VALIDATE_FAILED); return false; } @@ -247,14 +252,16 @@ public static boolean validateTsFileDataCorrectness(TsFileResource resource) { if (!lastNoAlignedPageTimeStamps.isEmpty() && currentTime <= lastNoAlignedPageTimeStamps.getLast()) { logger.error( - "{} {} time ranges overlap between pages.", + StorageEngineMessages + .STORAGE_LOG_TIME_RANGES_OVERLAP_BETWEEN_PAGES_2A131465, resource.getTsFilePath(), VALIDATE_FAILED); return false; } if (currentTime <= previousTime) { logger.error( - "{} {} the timestamp in the page is repeated or not incremental.", + StorageEngineMessages + .STORAGE_LOG_THE_TIMESTAMP_IN_THE_PAGE_IS_REPEATED_OR_NOT_INCREMENTAL_04627FDA, resource.getTsFilePath(), VALIDATE_FAILED); return false; @@ -266,14 +273,16 @@ public static boolean validateTsFileDataCorrectness(TsFileResource resource) { } if (pageHeaderStartTime != pageStartTime) { logger.error( - "{} {} the start time in page is different from that in page header.", + StorageEngineMessages + .STORAGE_LOG_THE_START_TIME_IN_PAGE_IS_DIFFERENT_FROM_THAT_IN_PAGE_HEADER_C23CE8D4, resource.getTsFilePath(), VALIDATE_FAILED); return false; } if (pageHeaderEndTime != previousTime) { logger.error( - "{} {} the end time in page is different from that in page header.", + StorageEngineMessages + .STORAGE_LOG_THE_END_TIME_IN_PAGE_IS_DIFFERENT_FROM_THAT_IN_PAGE_HEADER_5E363FAB, resource.getTsFilePath(), VALIDATE_FAILED); return false; @@ -291,7 +300,9 @@ public static boolean validateTsFileDataCorrectness(TsFileResource resource) { if (chunkGroupHeader.getDeviceID() == null || chunkGroupHeader.getDeviceID().isEmpty()) { logger.error( - "{} {} device id is null or empty.", resource.getTsFilePath(), VALIDATE_FAILED); + StorageEngineMessages.STORAGE_LOG_DEVICE_ID_IS_NULL_OR_EMPTY_635DD75C, + resource.getTsFilePath(), + VALIDATE_FAILED); return false; } break; @@ -321,14 +332,16 @@ private static boolean validateTimeFrame( TsFileResource tsFileResource) { if (pageHeaderStartTime != pageTimestamps[0]) { logger.error( - "{} {} the start time in page is different from that in page header.", + StorageEngineMessages + .STORAGE_LOG_THE_START_TIME_IN_PAGE_IS_DIFFERENT_FROM_THAT_IN_PAGE_HEADER_C23CE8D4, tsFileResource.getTsFilePath(), VALIDATE_FAILED); return false; } if (pageHeaderEndTime != pageTimestamps[pageTimestamps.length - 1]) { logger.error( - "{} {} the end time in page is different from that in page header.", + StorageEngineMessages + .STORAGE_LOG_THE_END_TIME_IN_PAGE_IS_DIFFERENT_FROM_THAT_IN_PAGE_HEADER_5E363FAB, tsFileResource.getTsFilePath(), VALIDATE_FAILED); return false; @@ -336,7 +349,8 @@ private static boolean validateTimeFrame( for (int i = 0; i < pageTimestamps.length - 1; i++) { if (pageTimestamps[i + 1] <= pageTimestamps[i]) { logger.error( - "{} {} the timestamp in the page is repeated or not incremental.", + StorageEngineMessages + .STORAGE_LOG_THE_TIMESTAMP_IN_THE_PAGE_IS_REPEATED_OR_NOT_INCREMENTAL_04627FDA, tsFileResource.getTsFilePath(), VALIDATE_FAILED); return false; @@ -347,7 +361,7 @@ private static boolean validateTimeFrame( long[] lastPageTimes = timeBatch.get(timeBatch.size() - 1); if (lastPageTimes[lastPageTimes.length - 1] >= pageTimestamps[0]) { logger.error( - "{} {} time ranges overlap between pages.", + StorageEngineMessages.STORAGE_LOG_TIME_RANGES_OVERLAP_BETWEEN_PAGES_2A131465, tsFileResource.getTsFilePath(), VALIDATE_FAILED); return false; @@ -401,8 +415,8 @@ public static boolean validateTsFileResourcesHasNoOverlap(List r long lastEndTime = lastDeviceInfo.right; if (lastEndTime >= currentStartTime) { logger.error( - "Device {} is overlapped between {} and {}, " - + "end time in {} is {}, start time in {} is {}", + StorageEngineMessages + .STORAGE_LOG_DEVICE_IS_OVERLAPPED_BETWEEN_AND_END_TIME_IN_IS_START_TIME_BA49D2AA, device.toString(), lastDeviceInfo.left, resource, diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/utils/tableDiskUsageIndex/AbstractTableSizeIndexWriter.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/utils/tableDiskUsageIndex/AbstractTableSizeIndexWriter.java index 72b668b45b414..60ee00f76d014 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/utils/tableDiskUsageIndex/AbstractTableSizeIndexWriter.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/utils/tableDiskUsageIndex/AbstractTableSizeIndexWriter.java @@ -19,6 +19,7 @@ package org.apache.iotdb.db.storageengine.dataregion.utils.tableDiskUsageIndex; +import org.apache.iotdb.db.i18n.StorageEngineMessages; import org.apache.iotdb.db.storageengine.StorageEngine; import org.slf4j.Logger; @@ -58,7 +59,9 @@ protected void deleteOldVersionFiles(int maxVersion, String prefix, List f } } catch (Exception e) { logger.warn( - "Failed to delete old version table size index file {}", file.getAbsolutePath()); + StorageEngineMessages + .STORAGE_LOG_FAILED_TO_DELETE_OLD_VERSION_TABLE_SIZE_INDEX_FILE_05930C4A, + file.getAbsolutePath()); } } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/utils/tableDiskUsageIndex/TableDiskUsageIndex.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/utils/tableDiskUsageIndex/TableDiskUsageIndex.java index 543356c98bc4d..f5b965f4786af 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/utils/tableDiskUsageIndex/TableDiskUsageIndex.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/utils/tableDiskUsageIndex/TableDiskUsageIndex.java @@ -85,7 +85,8 @@ protected void run() { // keep processing subsequent operations. if (!stop) { LOGGER.warn( - "TableDiskUsageIndex worker thread was interrupted unexpectedly while waiting for operations.", + StorageEngineMessages + .STORAGE_LOG_TABLEDISKUSAGEINDEX_WORKER_THREAD_WAS_INTERRUPTED_UNEXPECTEDLY_A21172AB, e); } } catch (Exception e) { @@ -208,7 +209,8 @@ protected boolean addOperationToQueue(Operation operation) { } if (stop) { LOGGER.warn( - "Skip adding operation {} to queue because TableDiskUsageIndex has been stopped.", + StorageEngineMessages + .STORAGE_LOG_SKIP_ADDING_OPERATION_TO_QUEUE_BECAUSE_TABLEDISKUSAGEINDEX_4A606B40, operation); return false; } @@ -504,7 +506,8 @@ public void decreaseActiveReaderNum() { activeReaderNum--; } else { LOGGER.warn( - "Attempt to decrease activeReaderNum when it is already 0. This may indicate an incorrect reader lifecycle management."); + StorageEngineMessages + .STORAGE_LOG_ATTEMPT_TO_DECREASE_ACTIVEREADERNUM_WHEN_IT_IS_ALREADY_0_73756CBB); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/utils/tableDiskUsageIndex/tsfile/TsFileTableSizeIndexReader.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/utils/tableDiskUsageIndex/tsfile/TsFileTableSizeIndexReader.java index 905b567b94434..655e0b4e19d45 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/utils/tableDiskUsageIndex/tsfile/TsFileTableSizeIndexReader.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/utils/tableDiskUsageIndex/tsfile/TsFileTableSizeIndexReader.java @@ -129,7 +129,8 @@ public Pair selfCheck() { } } catch (Exception e) { logger.warn( - "Failed to read table tsfile size index {} after position: {} and {} after position: {}", + StorageEngineMessages + .STORAGE_LOG_FAILED_TO_READ_TABLE_TSFILE_SIZE_INDEX_AFTER_POSITION_AND_74251AF3, keyFile, valueFile, keyFileTruncateSize, @@ -195,7 +196,11 @@ public KeyFileEntry readOneEntryFromKeyFile() throws IOException { keyFileEntry = new KeyFileEntry(tsFileID, originTsFileID); } else { throw new IoTDBRuntimeException( - "Unsupported record type in file: " + keyFile.getPath() + ", type: " + type, + String.format( + StorageEngineMessages + .STORAGE_EXCEPTION_UNSUPPORTED_RECORD_TYPE_IN_FILE_S_TYPE_S_DADEE641, + keyFile.getPath(), + type), TSStatusCode.INTERNAL_SERVER_ERROR.getStatusCode()); } return keyFileEntry; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/WALManager.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/WALManager.java index 00eb47d40ae2b..8fafee304b2b6 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/WALManager.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/WALManager.java @@ -172,7 +172,8 @@ public void rebootWALDeleteThread() { logger.info(StorageEngineMessages.STOP_WAL_DELETE_THREAD_AND_RESTART); registerScheduleTask(0, config.getDeleteWalFilesPeriodInMs()); logger.info( - "Reboot wal delete thread successfully, current period is {} ms", + StorageEngineMessages + .STORAGE_LOG_REBOOT_WAL_DELETE_THREAD_SUCCESSFULLY_CURRENT_PERIOD_IS_44B69C7A, config.getDeleteWalFilesPeriodInMs()); } @@ -185,7 +186,8 @@ private void deleteOutdatedFiles() { deleteOutdatedFilesInWALNodes(); if (firstLoop && shouldThrottle()) { logger.warn( - "WAL disk usage {} is larger than the wal_throttle_threshold_in_byte * 0.8 {}, please check your write load, iot consensus and the pipe module. It's better to allocate more disk for WAL.", + StorageEngineMessages + .STORAGE_LOG_WAL_DISK_USAGE_IS_LARGER_THAN_THE_WAL_THROTTLE_THRESHOLD_2396FFCC, getTotalDiskUsage(), getThrottleThreshold()); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/allocation/AbstractNodeAllocationStrategy.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/allocation/AbstractNodeAllocationStrategy.java index de97bb313f652..16052a5fef2f1 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/allocation/AbstractNodeAllocationStrategy.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/allocation/AbstractNodeAllocationStrategy.java @@ -53,7 +53,8 @@ protected AbstractNodeAllocationStrategy() { // folderManager remains null when disk space is insufficient during initialization // It will be lazily initialized later when disk space becomes available logger.error( - "Fail to create wal node allocation strategy because all disks of wal folders are full.", + StorageEngineMessages + .STORAGE_LOG_FAIL_TO_CREATE_WAL_NODE_ALLOCATION_STRATEGY_BECAUSE_ALL_72801644, e); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/buffer/WALBuffer.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/buffer/WALBuffer.java index 0e3182d544a96..25fb31ba8041b 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/buffer/WALBuffer.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/buffer/WALBuffer.java @@ -207,7 +207,8 @@ public void setBufferSize(int size) { public void write(WALEntry walEntry) { if (isClosed) { logger.warn( - "Fail to write WALEntry into wal node-{} because this node is closed. It's ok to see this log during data region deletion.", + StorageEngineMessages + .STORAGE_LOG_FAIL_TO_WRITE_WALENTRY_INTO_WAL_NODE_BECAUSE_THIS_NODE_IS_5D45E73F, identifier); walEntry.getWalFlushListener().fail(new WALNodeClosedException(identifier)); return; @@ -261,7 +262,8 @@ private void serialize() { } } catch (InterruptedException e) { logger.warn( - "Interrupted when waiting for taking WALEntry from blocking queue to serialize."); + StorageEngineMessages + .STORAGE_LOG_INTERRUPTED_WHEN_WAITING_FOR_TAKING_WALENTRY_FROM_BLOCKING_0765C068); Thread.currentThread().interrupt(); } @@ -279,7 +281,8 @@ private void serialize() { } } catch (InterruptedException e) { logger.warn( - "Interrupted when waiting for taking WALEntry from blocking queue to serialize."); + StorageEngineMessages + .STORAGE_LOG_INTERRUPTED_WHEN_WAITING_FOR_TAKING_WALENTRY_FROM_BLOCKING_0765C068); Thread.currentThread().interrupt(); } @@ -329,7 +332,10 @@ private void handleInfoEntry(WALEntry walEntry) { size = byteBufferView.position() - startPosition; } catch (Exception e) { logger.error( - "Fail to serialize WALEntry to wal node-{}'s buffer, discard it.", identifier, e); + StorageEngineMessages + .STORAGE_LOG_FAIL_TO_SERIALIZE_WALENTRY_TO_WAL_NODE_S_BUFFER_DISCARD_F0948835, + identifier, + e); walEntry.getWalFlushListener().fail(e); return; } @@ -379,7 +385,8 @@ private boolean handleSignalEntry(WALSignalEntry walSignalEntry) { case CLOSE_SIGNAL: if (logger.isDebugEnabled()) { logger.debug( - "Handle close signal for wal node-{}, there are {} entries left.", + StorageEngineMessages + .STORAGE_LOG_HANDLE_CLOSE_SIGNAL_FOR_WAL_NODE_THERE_ARE_ENTRIES_LEFT_393393D0, identifier, walEntries.size()); } @@ -558,8 +565,11 @@ public void run() { double usedRatio = (double) syncingBuffer.position() / syncingBuffer.capacity(); WRITING_METRICS.recordWALBufferUsedRatio(usedRatio); logger.debug( - "Sync wal buffer, forceFlag: {}, buffer used: {} / {} = {}%", - forceFlag, syncingBuffer.position(), syncingBuffer.capacity(), usedRatio * 100); + StorageEngineMessages.STORAGE_LOG_SYNC_WAL_BUFFER_FORCEFLAG_BUFFER_USED_C2A75C99, + forceFlag, + syncingBuffer.position(), + syncingBuffer.capacity(), + usedRatio * 100); // flush buffer to os double compressionRatio = 1.0; @@ -567,7 +577,10 @@ public void run() { compressionRatio = currentWALFileWriter.write(syncingBuffer, info.metaData); } catch (Throwable e) { logger.error( - "Fail to sync wal node-{}'s buffer, change system mode to error.", identifier, e); + StorageEngineMessages + .STORAGE_LOG_FAIL_TO_SYNC_WAL_NODE_S_BUFFER_CHANGE_SYSTEM_MODE_TO_ERROR_8C379D57, + identifier, + e); CommonDescriptor.getInstance().getConfig().handleUnrecoverableError(); } finally { switchSyncingBufferToIdle(); @@ -593,7 +606,10 @@ public void run() { } } catch (IOException e) { logger.error( - "Fail to roll wal node-{}'s log writer, change system mode to error.", identifier, e); + StorageEngineMessages + .STORAGE_LOG_FAIL_TO_ROLL_WAL_NODE_S_LOG_WRITER_CHANGE_SYSTEM_MODE_TO_A384AA54, + identifier, + e); if (info.rollWALFileWriterListener != null) { info.rollWALFileWriterListener.fail(e); } @@ -606,7 +622,8 @@ public void run() { forceSuccess = true; } catch (IOException e) { logger.error( - "Fail to fsync wal node-{}'s log writer, change system mode to error.", + StorageEngineMessages + .STORAGE_LOG_FAIL_TO_FSYNC_WAL_NODE_S_LOG_WRITER_CHANGE_SYSTEM_MODE_TO_7930160B, identifier, e); for (WALFlushListener fsyncListener : info.fsyncListeners) { @@ -643,8 +660,10 @@ private void makeMemTableCheckpoints() { break; default: throw new RuntimeException( - "Cannot make other checkpoint types in the wal buffer, type is " - + checkpoint.getType()); + String.format( + StorageEngineMessages + .STORAGE_EXCEPTION_CANNOT_MAKE_OTHER_CHECKPOINT_TYPES_IN_THE_WAL_BUFFER_TYPE_E9053BC1, + checkpoint.getType())); } } checkpointManager.fsyncCheckpointFile(); @@ -785,13 +804,15 @@ public Set getMemTableIds(long fileVersionId) { .getMemTablesId(); } catch (BrokenWALFileException e) { logger.warn( - "Fail to read memTable ids from the wal file {} of wal node {}: {}", + StorageEngineMessages + .STORAGE_LOG_FAIL_TO_READ_MEMTABLE_IDS_FROM_THE_WAL_FILE_OF_WAL_NODE_54B0056E, id, identifier, e.getMessage()); } catch (IOException e) { logger.warn( - "Fail to read memTable ids from the wal file {} of wal node {}.", + StorageEngineMessages + .STORAGE_LOG_FAIL_TO_READ_MEMTABLE_IDS_FROM_THE_WAL_FILE_OF_WAL_NODE_D5287E27, id, identifier, e); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/buffer/WALEntry.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/buffer/WALEntry.java index 58d05591d7a1d..8c0a5e353291e 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/buffer/WALEntry.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/buffer/WALEntry.java @@ -153,7 +153,7 @@ public static WALEntry deserialize(DataInputStream stream) throws IOException { */ public static PlanNode deserializeForConsensus(ByteBuffer buffer) { logger.debug( - "buffer capacity is: {}, limit is: {}, position is: {}", + StorageEngineMessages.STORAGE_LOG_BUFFER_CAPACITY_IS_LIMIT_IS_POSITION_IS_911625D8, buffer.capacity(), buffer.limit(), buffer.position()); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/checkpoint/CheckpointManager.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/checkpoint/CheckpointManager.java index 42e65e5220549..1fc84166e05b5 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/checkpoint/CheckpointManager.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/checkpoint/CheckpointManager.java @@ -214,7 +214,8 @@ public void fsyncCheckpointFile() { currentLogWriter.force(); } catch (IOException e) { logger.error( - "Fail to fsync wal node-{}'s checkpoint writer, change system mode to error.", + StorageEngineMessages + .STORAGE_LOG_FAIL_TO_FSYNC_WAL_NODE_S_CHECKPOINT_WRITER_CHANGE_SYSTEM_6E1EE226, identifier, e); CommonDescriptor.getInstance().getConfig().handleUnrecoverableError(); @@ -233,7 +234,8 @@ public void fsyncCheckpointFile() { } } catch (IOException e) { logger.error( - "Fail to roll wal node-{}'s checkpoint writer, change system mode to error.", + StorageEngineMessages + .STORAGE_LOG_FAIL_TO_ROLL_WAL_NODE_S_CHECKPOINT_WRITER_CHANGE_SYSTEM_791DDAB7, identifier, e); CommonDescriptor.getInstance().getConfig().handleUnrecoverableError(); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/exception/BrokenWALFileException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/exception/BrokenWALFileException.java index d053d1447279d..87c528a631c39 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/exception/BrokenWALFileException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/exception/BrokenWALFileException.java @@ -19,12 +19,14 @@ package org.apache.iotdb.db.storageengine.dataregion.wal.exception; +import org.apache.iotdb.db.i18n.StorageEngineMessages; + import java.io.File; import java.io.IOException; public class BrokenWALFileException extends IOException { public BrokenWALFileException(File logFile) { - super(String.format("Broken wal file %s, size %d", logFile, logFile.length())); + super(String.format(StorageEngineMessages.BROKEN_WAL_FILE_FMT, logFile, logFile.length())); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/exception/WALNodeClosedException.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/exception/WALNodeClosedException.java index 1829db81cbcf3..de4455e25a0d0 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/exception/WALNodeClosedException.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/exception/WALNodeClosedException.java @@ -19,8 +19,10 @@ package org.apache.iotdb.db.storageengine.dataregion.wal.exception; +import org.apache.iotdb.db.i18n.StorageEngineMessages; + public class WALNodeClosedException extends WALException { public WALNodeClosedException(String nodeIdentifier) { - super(String.format("wal node-%s has been closed", nodeIdentifier)); + super(String.format(StorageEngineMessages.WAL_NODE_CLOSED_FMT, nodeIdentifier)); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/io/CheckpointReader.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/io/CheckpointReader.java index 9bd8643e386de..7069781fd8bfe 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/io/CheckpointReader.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/io/CheckpointReader.java @@ -19,6 +19,7 @@ package org.apache.iotdb.db.storageengine.dataregion.wal.io; +import org.apache.iotdb.db.i18n.StorageEngineMessages; import org.apache.iotdb.db.storageengine.dataregion.wal.checkpoint.Checkpoint; import org.slf4j.Logger; @@ -54,12 +55,16 @@ private void init() { } } catch (EOFException e) { logger.debug( - "Meet error when reading checkpoint file {}, skip broken checkpoints", + StorageEngineMessages + .STORAGE_LOG_MEET_ERROR_WHEN_READING_CHECKPOINT_FILE_SKIP_BROKEN_CHECKPOINTS_DADF9E9D, logFile, e.getMessage()); } catch (IOException e) { logger.warn( - "Meet error when reading checkpoint file {}, skip broken checkpoints", logFile, e); + StorageEngineMessages + .STORAGE_LOG_MEET_ERROR_WHEN_READING_CHECKPOINT_FILE_SKIP_BROKEN_CHECKPOINTS_DADF9E9D, + logFile, + e); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/io/WALInputStream.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/io/WALInputStream.java index c8d18ed773cc0..69917c302f62d 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/io/WALInputStream.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/io/WALInputStream.java @@ -264,7 +264,7 @@ private void loadNextSegmentV2() throws IOException { } } catch (Exception e) { logger.error( - "Unexpected error when loading a wal segment {} in {}@{}", + StorageEngineMessages.STORAGE_LOG_UNEXPECTED_ERROR_WHEN_LOADING_A_WAL_SEGMENT_IN_45B42CCF, segmentInfo, logFile, position, diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/io/WALMetaData.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/io/WALMetaData.java index afd4d026644e0..ea731360af917 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/io/WALMetaData.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/io/WALMetaData.java @@ -105,7 +105,10 @@ public void add( private static short toShortExact(long value, String fieldName) { if (value < Short.MIN_VALUE || value > Short.MAX_VALUE) { throw new IllegalArgumentException( - String.format("%s %s exceeds short range", fieldName, value)); + String.format( + StorageEngineMessages.STORAGE_EXCEPTION_S_S_EXCEEDS_SHORT_RANGE_1DF75A2D, + fieldName, + value)); } return (short) value; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/node/WALNode.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/node/WALNode.java index 6af4e09517c7f..728b3356b8887 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/node/WALNode.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/node/WALNode.java @@ -143,7 +143,7 @@ public WALNode( @Override public WALFlushListener log(long memTableId, InsertRowNode insertRowNode) { logger.debug( - "WAL node-{} logs insertRowNode, the search index is {}.", + StorageEngineMessages.STORAGE_LOG_WAL_NODE_LOGS_INSERTROWNODE_THE_SEARCH_INDEX_IS_027450AC, identifier, insertRowNode.getSearchIndex()); WALEntry walEntry = new WALInfoEntry(memTableId, insertRowNode); @@ -153,7 +153,7 @@ public WALFlushListener log(long memTableId, InsertRowNode insertRowNode) { @Override public WALFlushListener log(long memTableId, InsertRowsNode insertRowsNode) { logger.debug( - "WAL node-{} logs insertRowsNode, the search index is {}.", + StorageEngineMessages.STORAGE_LOG_WAL_NODE_LOGS_INSERTROWSNODE_THE_SEARCH_INDEX_IS_1AF72E25, identifier, insertRowsNode.getSearchIndex()); WALEntry walEntry = new WALInfoEntry(memTableId, insertRowsNode); @@ -164,7 +164,8 @@ public WALFlushListener log(long memTableId, InsertRowsNode insertRowsNode) { public WALFlushListener log( long memTableId, InsertTabletNode insertTabletNode, List rangeList) { logger.debug( - "WAL node-{} logs insertTabletNode, the search index is {}.", + StorageEngineMessages + .STORAGE_LOG_WAL_NODE_LOGS_INSERTTABLETNODE_THE_SEARCH_INDEX_IS_CF9A3600, identifier, insertTabletNode.getSearchIndex()); WALEntry walEntry = new WALInfoEntry(memTableId, insertTabletNode, rangeList); @@ -174,7 +175,7 @@ public WALFlushListener log( @Override public WALFlushListener log(long memTableId, DeleteDataNode deleteDataNode) { logger.debug( - "WAL node-{} logs deleteDataNode, the search index is {}.", + StorageEngineMessages.STORAGE_LOG_WAL_NODE_LOGS_DELETEDATANODE_THE_SEARCH_INDEX_IS_6E49BC54, identifier, deleteDataNode.getSearchIndex()); WALEntry walEntry = new WALInfoEntry(memTableId, deleteDataNode); @@ -185,7 +186,8 @@ public WALFlushListener log(long memTableId, DeleteDataNode deleteDataNode) { public WALFlushListener log(long memTableId, RelationalDeleteDataNode deleteDataNode) { if (logger.isDebugEnabled()) { logger.debug( - "WAL node-{} logs relationalDeleteDataNode, the search index is {}.", + StorageEngineMessages + .STORAGE_LOG_WAL_NODE_LOGS_RELATIONALDELETEDATANODE_THE_SEARCH_INDEX_33258B30, identifier, deleteDataNode.getSearchIndex()); } @@ -293,7 +295,8 @@ private boolean initAndCheckIfNeedContinue() { if (allWalFilesOfOneNode == null || allWalFilesOfOneNode.length <= 1) { if (logger.isDebugEnabled()) { logger.debug( - "wal node-{}:no wal file or wal file number less than or equal to one was found", + StorageEngineMessages + .STORAGE_LOG_WAL_NODE_NO_WAL_FILE_OR_WAL_FILE_NUMBER_LESS_THAN_OR_EQUAL_3C65641C, identifier); } return false; @@ -371,7 +374,8 @@ private void updateEffectiveInfoRationAndUpdateMetric() { } effectiveInfoRatio = (double) costOfActiveMemTables / totalCost; logger.debug( - "Effective information ratio is {}, active memTables cost is {}, total cost is {}", + StorageEngineMessages + .STORAGE_LOG_EFFECTIVE_INFORMATION_RATIO_IS_ACTIVE_MEMTABLES_COST_IS_D9A13DD2, effectiveInfoRatio, costOfActiveMemTables, totalCost); @@ -380,7 +384,8 @@ private void updateEffectiveInfoRationAndUpdateMetric() { private void summarizeExecuteResult() { logger.debug( - "Successfully delete {} outdated wal files for wal node-{}", + StorageEngineMessages + .STORAGE_LOG_SUCCESSFULLY_DELETE_OUTDATED_WAL_FILES_FOR_WAL_NODE_C141C741, successfullyDeleted.size(), identifier); } @@ -399,7 +404,10 @@ private void deleteOutdatedFilesAndUpdateMetric() { successfullyDeleted.add(versionId); } else { logger.info( - "Fail to delete outdated wal file {} of wal node-{}.", currentWal, identifier); + StorageEngineMessages + .STORAGE_LOG_FAIL_TO_DELETE_OUTDATED_WAL_FILE_OF_WAL_NODE_1B1F2AF2, + currentWal, + identifier); } } } @@ -478,7 +486,8 @@ private void flushMemTable(DataRegion dataRegion, File tsFile, IMemTable memTabl dataRegion.submitAFlushTask( TsFileUtils.getTimePartition(tsFile), TsFileUtils.isSequence(tsFile), memTable); logger.info( - "WAL node-{} flushes memTable-{} to TsFile {} because Effective information ratio {} is below wal min effective info ratio {}, memTable size is {}.", + StorageEngineMessages + .STORAGE_LOG_WAL_NODE_FLUSHES_MEMTABLE_TO_TSFILE_BECAUSE_EFFECTIVE_INFORMATION_8CC86239, identifier, memTable.getMemTableId(), tsFile, @@ -549,7 +558,8 @@ private void snapshotMemTable(DataRegion dataRegion, File tsFile, MemTableInfo m return; } logger.info( - "WAL node-{} snapshots memTable-{} to wal files because Effective information ratio {} is below wal min effective info ratio {}, memTable size is {}.", + StorageEngineMessages + .STORAGE_LOG_WAL_NODE_SNAPSHOTS_MEMTABLE_TO_WAL_FILES_BECAUSE_EFFECTIVE_0A1304ED, identifier, memTable.getMemTableId(), String.format("%.4f", effectiveInfoRatio), @@ -649,7 +659,9 @@ public boolean hasNext() { updateFilesToSearch(); if (needUpdatingFilesToSearch) { logger.debug( - "update file to search failed, the next search index is {}", nextSearchIndex); + StorageEngineMessages + .STORAGE_LOG_UPDATE_FILE_TO_SEARCH_FAILED_THE_NEXT_SEARCH_INDEX_IS_F3DC95F3, + nextSearchIndex); return false; } } @@ -752,7 +764,8 @@ public boolean hasNext() { tryToCollectInsertNodeAndBumpIndex.run(); if (currentWalEntryIndex != nextSearchIndex) { logger.warn( - "The search index of next WAL entry should be {}, but actually it's {}", + StorageEngineMessages + .STORAGE_LOG_THE_SEARCH_INDEX_OF_NEXT_WAL_ENTRY_SHOULD_BE_BUT_ACTUALLY_177BF8AF, nextSearchIndex, currentWalEntryIndex); nextSearchIndex = currentWalEntryIndex; @@ -794,7 +807,8 @@ public boolean hasNext() { } catch (Exception e) { brokenFileId = WALFileUtils.parseVersionId(filesToSearch[currentFileIndex].getName()); logger.error( - "Fail to read wal from wal file {}, skip this file.", + StorageEngineMessages + .STORAGE_LOG_FAIL_TO_READ_WAL_FROM_WAL_FILE_SKIP_THIS_FILE_06A3B079, filesToSearch[currentFileIndex], e); } @@ -836,7 +850,8 @@ public void waitForNextReady() throws InterruptedException { if (timeout) { bufferLastSearchIndex = buffer.getCurrentSearchIndex(); logger.info( - "timeout when waiting for next WAL entry ready, execute rollWALFile. Current search index in wal buffer is {}, and next target index is {}", + StorageEngineMessages + .STORAGE_LOG_TIMEOUT_WHEN_WAITING_FOR_NEXT_WAL_ENTRY_READY_EXECUTE_ROLLWALFILE_FEE9700E, bufferLastSearchIndex, nextSearchIndex); rollWALFile(); @@ -865,7 +880,8 @@ public void waitForNextReady(long time, TimeUnit unit) public void skipTo(long targetIndex) { if (targetIndex < nextSearchIndex) { logger.warn( - "Skip from {} to {}, it's a dangerous operation because insert plan {} may have been lost.", + StorageEngineMessages + .STORAGE_LOG_SKIP_FROM_TO_IT_S_A_DANGEROUS_OPERATION_BECAUSE_INSERT_PLAN_9283DC91, nextSearchIndex, targetIndex, targetIndex); @@ -904,7 +920,10 @@ private void updateFilesToSearch() { WALFileUtils.ascSortByVersionId(filesToSearch); int fileIndex = WALFileUtils.binarySearchFileBySearchIndex(filesToSearch, nextSearchIndex); logger.debug( - "searchIndex: {}, result: {}, files: {}, ", nextSearchIndex, fileIndex, filesToSearch); + StorageEngineMessages.STORAGE_LOG_SEARCHINDEX_RESULT_FILES_6151DCEB, + nextSearchIndex, + fileIndex, + filesToSearch); // (xingtanzjr) When the target entry does not exist, the reader will return minimum one whose // searchIndex is larger than target searchIndex if (fileIndex == -1) { @@ -1063,7 +1082,8 @@ public void rollWALFile() { WALFlushListener walFlushListener = log(rollWALFileSignal); if (!deleted && walFlushListener.waitForResult() == AbstractResultListener.Status.FAILURE) { logger.error( - "Fail to trigger rolling wal node-{}'s wal file log writer.", + StorageEngineMessages + .STORAGE_LOG_FAIL_TO_TRIGGER_ROLLING_WAL_NODE_S_WAL_FILE_LOG_WRITER_D1E595DC, identifier, walFlushListener.getCause()); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/recover/WALNodeRecoverTask.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/recover/WALNodeRecoverTask.java index f2bae2203f476..af221813e7d71 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/recover/WALNodeRecoverTask.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/recover/WALNodeRecoverTask.java @@ -125,13 +125,15 @@ public void run() { lastVersionId + 1, lastSearchIndex); logger.info( - "Successfully recover WAL node in the directory {}, add this node to WALManger.", + StorageEngineMessages + .STORAGE_LOG_SUCCESSFULLY_RECOVER_WAL_NODE_IN_THE_DIRECTORY_ADD_THIS_FA6ADE22, logDirectory); } else { // delete this wal node folder FileUtils.deleteFileOrDirectory(logDirectory); logger.info( - "Successfully recover WAL node in the directory {}, so delete these wal files.", + StorageEngineMessages + .STORAGE_LOG_SUCCESSFULLY_RECOVER_WAL_NODE_IN_THE_DIRECTORY_SO_DELETE_A17892D9, logDirectory); } @@ -145,7 +147,8 @@ public void run() { lastVersionId + 1, lastSearchIndex); logger.info( - "Successfully recover WAL node in the directory {}, add this node to WALManger.", + StorageEngineMessages + .STORAGE_LOG_SUCCESSFULLY_RECOVER_WAL_NODE_IN_THE_DIRECTORY_ADD_THIS_FA6ADE22, logDirectory); } } finally { @@ -283,17 +286,21 @@ private void recoverTsFiles() { recoverPerformer.redoLog(walEntry); } else { logger.debug( - "Fail to find TsFile recover performer for wal entry in TsFile {}", walFile); + StorageEngineMessages + .STORAGE_LOG_FAIL_TO_FIND_TSFILE_RECOVER_PERFORMER_FOR_WAL_ENTRY_IN_TSFILE_ED4EF3E7, + walFile); } } } catch (BrokenWALFileException e) { logger.warn( - "Fail to read memTable ids from the wal file {} of wal node: {}", + StorageEngineMessages + .STORAGE_LOG_FAIL_TO_READ_MEMTABLE_IDS_FROM_THE_WAL_FILE_OF_WAL_NODE_5325B5AB, walFile.getAbsoluteFile(), e.getMessage()); } catch (IOException e) { logger.warn( - "Fail to read memTable ids from the wal file {} of wal node.", + StorageEngineMessages + .STORAGE_LOG_FAIL_TO_READ_MEMTABLE_IDS_FROM_THE_WAL_FILE_OF_WAL_NODE_FBCE8D93, walFile.getAbsoluteFile(), e); } catch (Exception e) { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/recover/WALRecoverManager.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/recover/WALRecoverManager.java index 22363af5e866f..54a45626a3d67 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/recover/WALRecoverManager.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/recover/WALRecoverManager.java @@ -101,7 +101,8 @@ public void recover() throws WALRecoverException, StartupException { throw new WALRecoverException(StorageEngineMessages.FAIL_TO_RECOVER_WAL, e); } logger.info( - "Data regions have submitted all unsealed TsFiles, start recovering TsFiles in each wal node."); + StorageEngineMessages + .STORAGE_LOG_DATA_REGIONS_HAVE_SUBMITTED_ALL_UNSEALED_TSFILES_START_RECOVERING_208E6A26); // recover each wal node's TsFiles if (!walNodeDirs.isEmpty()) { recoverThreadPool = @@ -163,7 +164,8 @@ private void asyncRecoverLeftTsFiles() { recoverPerformer.getRecoverListener().succeed(); } catch (DataRegionException | IOException | WALRecoverException e) { logger.error( - "Fail to recover unsealed TsFile {}, skip it.", + StorageEngineMessages + .STORAGE_LOG_FAIL_TO_RECOVER_UNSEALED_TSFILE_SKIP_IT_CA576205, recoverPerformer.getTsFileAbsolutePath(), e); recoverPerformer.getRecoverListener().fail(e); @@ -200,7 +202,7 @@ public WALRecoverListener addRecoverPerformer(UnsealedTsFileRecoverPerformer rec absolutePath2RecoverPerformer.put(tsFileRelativePath, recoverPerformer); } catch (IOException e) { logger.error( - "Fail to add recover performer for file {}", + StorageEngineMessages.STORAGE_LOG_FAIL_TO_ADD_RECOVER_PERFORMER_FOR_FILE_54746E05, recoverPerformer.getTsFileAbsolutePath(), e); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/recover/file/AbstractTsFileRecoverPerformer.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/recover/file/AbstractTsFileRecoverPerformer.java index 79d9fb1aec584..46fe0129c2b24 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/recover/file/AbstractTsFileRecoverPerformer.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/recover/file/AbstractTsFileRecoverPerformer.java @@ -114,7 +114,8 @@ private void loadResourceFile() throws IOException { tsFileResource.deserialize(); } catch (Throwable e) { logger.warn( - "Cannot deserialize .resource file of {}, try to reconstruct it.", + StorageEngineMessages + .STORAGE_LOG_CANNOT_DESERIALIZE_RESOURCE_FILE_OF_TRY_TO_RECONSTRUCT_IT_F82299C6, tsFileResource.getTsFile(), e); reconstructResourceFile(); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/recover/file/SealedTsFileRecoverPerformer.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/recover/file/SealedTsFileRecoverPerformer.java index c054b8c0244db..bd021f6d74f60 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/recover/file/SealedTsFileRecoverPerformer.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/recover/file/SealedTsFileRecoverPerformer.java @@ -20,6 +20,7 @@ package org.apache.iotdb.db.storageengine.dataregion.wal.recover.file; import org.apache.iotdb.db.exception.DataRegionException; +import org.apache.iotdb.db.i18n.StorageEngineMessages; import org.apache.iotdb.db.storageengine.dataregion.tsfile.TsFileResource; import java.io.IOException; @@ -46,10 +47,12 @@ public void recover() throws DataRegionException, IOException { reconstructResourceFile(); } catch (IOException e) { throw new DataRegionException( - "Failed recover the resource file: " - + tsFileResource.getTsFilePath() - + TsFileResource.RESOURCE_SUFFIX - + e); + String.format( + StorageEngineMessages + .STORAGE_EXCEPTION_FAILED_RECOVER_THE_RESOURCE_FILE_S_S_S_E35EF7D5, + tsFileResource.getTsFilePath(), + TsFileResource.RESOURCE_SUFFIX, + e)); } } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/recover/file/UnsealedTsFileRecoverPerformer.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/recover/file/UnsealedTsFileRecoverPerformer.java index 2effd009ab6ec..d9a54490d69c8 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/recover/file/UnsealedTsFileRecoverPerformer.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/recover/file/UnsealedTsFileRecoverPerformer.java @@ -167,7 +167,9 @@ public void redoLog(WALEntry walEntry) { // skip redo wal log when this TsFile is not crashed if (!hasCrashed()) { logger.info( - "This TsFile {} isn't crashed, no need to redo wal log.", tsFileResource.getTsFilePath()); + StorageEngineMessages + .STORAGE_LOG_THIS_TSFILE_ISN_T_CRASHED_NO_NEED_TO_REDO_WAL_LOG_A017A0F0, + tsFileResource.getTsFilePath()); return; } try { @@ -290,7 +292,8 @@ public void endRecovery() throws WALRecoverException { long memTableSize = recoveryMemTable.memSize(); double compressionRatio = ((double) memTableSize) / writer.getPos(); logger.info( - "The compression ratio of tsfile {} is {}, totalMemTableSize: {}, the file size: {}", + StorageEngineMessages + .STORAGE_LOG_THE_COMPRESSION_RATIO_OF_TSFILE_IS_TOTALMEMTABLESIZE_THE_8CE66BE3, writer.getFile().getAbsolutePath(), String.format("%.2f", compressionRatio), memTableSize, @@ -298,7 +301,7 @@ public void endRecovery() throws WALRecoverException { CompressionRatio.getInstance().updateRatio(memTableSize, writer.getPos(), dataRegionId); } catch (IOException e) { logger.error( - "{}: {} update compression ratio failed", + StorageEngineMessages.STORAGE_LOG_UPDATE_COMPRESSION_RATIO_FAILED_8A076DFC, databaseName, tsFileResource.getTsFile().getName(), e); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/utils/MemoryControlledWALEntryQueue.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/utils/MemoryControlledWALEntryQueue.java index 2bd56a1a4fedb..0974aef999a3b 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/utils/MemoryControlledWALEntryQueue.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/utils/MemoryControlledWALEntryQueue.java @@ -20,6 +20,7 @@ package org.apache.iotdb.db.storageengine.dataregion.wal.utils; import org.apache.iotdb.commons.exception.IoTDBRuntimeException; +import org.apache.iotdb.db.i18n.StorageEngineMessages; import org.apache.iotdb.db.storageengine.dataregion.wal.buffer.WALEntry; import org.apache.iotdb.db.storageengine.rescon.memory.SystemInfo; @@ -55,12 +56,13 @@ public void put(WALEntry e) throws InterruptedException { if (elementSize > SystemInfo.getInstance().getWalBufferQueueMemoryBlock().getTotalMemorySizeInBytes()) { throw new IoTDBRuntimeException( - "The element size of WALEntry " - + elementSize - + " is larger than the total memory size of wal buffer queue " - + SystemInfo.getInstance() + String.format( + StorageEngineMessages + .STORAGE_EXCEPTION_THE_ELEMENT_SIZE_OF_WALENTRY_S_IS_LARGER_THAN_THE_TOTAL_E494520D, + elementSize, + SystemInfo.getInstance() .getWalBufferQueueMemoryBlock() - .getTotalMemorySizeInBytes(), + .getTotalMemorySizeInBytes()), WAL_ENTRY_TOO_LARGE.getStatusCode()); } nonFullCondition.wait(); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/utils/WALFileUtils.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/utils/WALFileUtils.java index 3330448b9a8aa..5cff6d4b13cba 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/utils/WALFileUtils.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/utils/WALFileUtils.java @@ -95,8 +95,10 @@ public static File getWALFile(File dir, long versionId) throws FileNotFoundExcep if (files == null || files.length != 1) { throw new FileNotFoundException( String.format( - "Fail to get wal file by versionId=%s and files=%s.", - versionId, Arrays.toString(files))); + StorageEngineMessages + .STORAGE_EXCEPTION_FAIL_TO_GET_WAL_FILE_BY_VERSIONID_S_AND_FILES_S_9CB045F4, + versionId, + Arrays.toString(files))); } return files[0]; } @@ -363,7 +365,11 @@ private static void forEachSealedSearchableRequest( } } } catch (final IOException e) { - logger.warn("Failed to scan WAL file {} for searchable request metadata", walFile, e); + logger.warn( + StorageEngineMessages + .STORAGE_LOG_FAILED_TO_SCAN_WAL_FILE_FOR_SEARCHABLE_REQUEST_METADATA_9B4B0198, + walFile, + e); } } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/LoadTsFileManager.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/LoadTsFileManager.java index e3c6948563a3c..0f3541bb1a1a8 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/LoadTsFileManager.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/LoadTsFileManager.java @@ -192,7 +192,8 @@ private void cleanupTasks() { } else { final long waitTimeInMs = cleanupTask.scheduledTime - System.currentTimeMillis(); LOGGER.info( - "Next load cleanup task {} is not ready to run, wait for at least {} ms ({}s).", + StorageEngineMessages + .STORAGE_LOG_NEXT_LOAD_CLEANUP_TASK_IS_NOT_READY_TO_RUN_WAIT_FOR_AT_LEAST_CBE0023F, cleanupTask.uuid, waitTimeInMs, waitTimeInMs / 1000.0); @@ -259,9 +260,10 @@ public void writeToDataRegion(DataRegion dataRegion, LoadTsFilePieceNode pieceNo if (exception.get() != null || writerManager == null) { throw new IOException( - "Failed to create TsFileWriterManager for uuid " - + uuid - + " because of insufficient disk space.", + String.format( + StorageEngineMessages + .STORAGE_EXCEPTION_FAILED_TO_CREATE_TSFILEWRITERMANAGER_FOR_UUID_S_BECAUSE_A0D68950, + uuid), exception.get()); } @@ -538,7 +540,8 @@ private void write(DataPartitionInfo partitionInfo, ChunkData chunkData) } if (writer.isWritingChunkGroup()) { LOGGER.warn( - "Writer {} for partition {} is already writing chunk group for device {}, but the last device is {}. ", + StorageEngineMessages + .STORAGE_LOG_WRITER_FOR_PARTITION_IS_ALREADY_WRITING_CHUNK_GROUP_FOR_903B1D66, writer.getFile().getAbsolutePath(), partitionInfo, device, @@ -565,7 +568,9 @@ private void writeDeletion(DataRegion dataRegion, DeletionData deletionData) File newModificationFile = ModificationFile.getExclusiveMods(writer.getFile()); if (!newModificationFile.createNewFile()) { LOGGER.error( - "Can not create ModificationFile {} for writing.", newModificationFile.getPath()); + StorageEngineMessages + .STORAGE_LOG_CAN_NOT_CREATE_MODIFICATIONFILE_FOR_WRITING_17D14C11, + newModificationFile.getPath()); return; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/active/ActiveLoadDirScanner.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/active/ActiveLoadDirScanner.java index 2a3ddee11f7b8..a5a3d6f5b0d02 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/active/ActiveLoadDirScanner.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/active/ActiveLoadDirScanner.java @@ -148,8 +148,8 @@ private boolean checkPermission(final String listeningDir) { if (!Files.isReadable(listeningDirPath)) { if (!noPermissionDirs.contains(listeningDir)) { LOGGER.error( - "Current dir path is not readable: {}." - + "Skip scanning this dir. Please check the permission.", + StorageEngineMessages + .STORAGE_LOG_CURRENT_DIR_PATH_IS_NOT_READABLE_SKIP_SCANNING_THIS_DIR_9C8B7E00, listeningDirPath); noPermissionDirs.add(listeningDir); } @@ -159,8 +159,8 @@ private boolean checkPermission(final String listeningDir) { if (!Files.isWritable(listeningDirPath)) { if (!noPermissionDirs.contains(listeningDir)) { LOGGER.error( - "Current dir path is not writable: {}." - + "Skip scanning this dir. Please check the permission.", + StorageEngineMessages + .STORAGE_LOG_CURRENT_DIR_PATH_IS_NOT_WRITABLE_SKIP_SCANNING_THIS_DIR_4885E78F, listeningDirPath); noPermissionDirs.add(listeningDir); } @@ -171,7 +171,8 @@ private boolean checkPermission(final String listeningDir) { return true; } catch (final Exception e) { LOGGER.error( - "Error occurred during checking r/w permission of dir: {}. Skip scanning this dir.", + StorageEngineMessages + .STORAGE_LOG_ERROR_OCCURRED_DURING_CHECKING_R_W_PERMISSION_OF_DIR_SKIP_3EC7FC7D, listeningDir, e); return false; @@ -215,8 +216,8 @@ private void hotReloadActiveLoadDirs() { ActiveLoadingFilesSizeMetricsSet.getInstance().updatePendingDirList(listeningDirs); } catch (final Exception e) { LOGGER.warn( - "Error occurred during hot reload active load dirs. " - + "Current active load listening dirs: {}.", + StorageEngineMessages + .STORAGE_LOG_ERROR_OCCURRED_DURING_HOT_RELOAD_ACTIVE_LOAD_DIRS_CURRENT_673AFC0F, listeningDirs, e); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/active/ActiveLoadFailedMessageHandler.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/active/ActiveLoadFailedMessageHandler.java index 92a1d45702b0b..452e204f700b4 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/active/ActiveLoadFailedMessageHandler.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/active/ActiveLoadFailedMessageHandler.java @@ -20,6 +20,7 @@ package org.apache.iotdb.db.storageengine.load.active; import org.apache.iotdb.commons.conf.CommonDescriptor; +import org.apache.iotdb.db.i18n.StorageEngineMessages; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -42,7 +43,8 @@ public class ActiveLoadFailedMessageHandler { "memory", filePair -> LOGGER.info( - "Rejecting auto load tsfile {} (isGeneratedByPipe = {}) due to memory constraints, will retry later.", + StorageEngineMessages + .STORAGE_LOG_REJECTING_AUTO_LOAD_TSFILE_ISGENERATEDBYPIPE_DUE_TO_MEMORY_9A60DF29, filePair.getFile(), filePair.isGeneratedByPipe())); // system is read only @@ -50,7 +52,8 @@ public class ActiveLoadFailedMessageHandler { "read only", filePair -> LOGGER.info( - "Rejecting auto load tsfile {} (isGeneratedByPipe = {}) due to the system is read only, will retry later.", + StorageEngineMessages + .STORAGE_LOG_REJECTING_AUTO_LOAD_TSFILE_ISGENERATEDBYPIPE_DUE_TO_THE_16FA5F18, filePair.getFile(), filePair.isGeneratedByPipe())); // Timed out to wait for procedure return. The procedure is still running. @@ -58,7 +61,8 @@ public class ActiveLoadFailedMessageHandler { "procedure return", filePair -> LOGGER.info( - "Rejecting auto load tsfile {} (isGeneratedByPipe = {}) due to time out to wait for procedure return, will retry later.", + StorageEngineMessages + .STORAGE_LOG_REJECTING_AUTO_LOAD_TSFILE_ISGENERATEDBYPIPE_DUE_TO_TIME_E18630DE, filePair.getFile(), filePair.isGeneratedByPipe())); // DataNode is not enough, please register more. @@ -66,7 +70,8 @@ public class ActiveLoadFailedMessageHandler { "not enough", filePair -> LOGGER.info( - "Rejecting auto load tsfile {} (isGeneratedByPipe = {}) due to the datanode is not enough, will retry later.", + StorageEngineMessages + .STORAGE_LOG_REJECTING_AUTO_LOAD_TSFILE_ISGENERATEDBYPIPE_DUE_TO_THE_5F811A8B, filePair.getFile(), filePair.isGeneratedByPipe())); // Fail to connect to any config node. Please check status of ConfigNodes or logs of @@ -75,7 +80,8 @@ public class ActiveLoadFailedMessageHandler { "any config node", filePair -> LOGGER.info( - "Rejecting auto load tsfile {} (isGeneratedByPipe = {}) due to fail to connect to any config node, will retry later.", + StorageEngineMessages + .STORAGE_LOG_REJECTING_AUTO_LOAD_TSFILE_ISGENERATEDBYPIPE_DUE_TO_FAIL_F59307B8, filePair.getFile(), filePair.isGeneratedByPipe())); // Current query is time out, query start time is 1729653161797, ddl is @@ -85,7 +91,8 @@ public class ActiveLoadFailedMessageHandler { "query is time out", filePair -> LOGGER.info( - "Rejecting auto load tsfile {} (isGeneratedByPipe = {}) due to current query is time out, will retry later.", + StorageEngineMessages + .STORAGE_LOG_REJECTING_AUTO_LOAD_TSFILE_ISGENERATEDBYPIPE_DUE_TO_CURRENT_264E12EE, filePair.getFile(), filePair.isGeneratedByPipe())); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/active/ActiveLoadPathHelper.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/active/ActiveLoadPathHelper.java index c774b5e7af72d..7b971c15a10b1 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/active/ActiveLoadPathHelper.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/active/ActiveLoadPathHelper.java @@ -264,12 +264,11 @@ private static void validateTabletConversionThreshold(final String value) { try { final long threshold = Long.parseLong(value); if (threshold < 0) { - throw new SemanticException( - "Tablet conversion threshold must be a non-negative long value."); + throw new SemanticException(StorageEngineMessages.TABLET_CONVERSION_THRESHOLD_NON_NEGATIVE); } } catch (final NumberFormatException e) { throw new SemanticException( - String.format("Tablet conversion threshold '%s' is not a valid long value.", value)); + String.format(StorageEngineMessages.TABLET_CONVERSION_THRESHOLD_NOT_VALID_LONG, value)); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/active/ActiveLoadTsFileLoader.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/active/ActiveLoadTsFileLoader.java index 13ec94186b779..8c8ec02603c76 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/active/ActiveLoadTsFileLoader.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/active/ActiveLoadTsFileLoader.java @@ -111,7 +111,8 @@ private void initFailDirIfNecessary() { }); } catch (final IOException e) { LOGGER.warn( - "Error occurred during creating fail directory {} for active load.", + StorageEngineMessages + .STORAGE_LOG_ERROR_OCCURRED_DURING_CREATING_FAIL_DIRECTORY_FOR_ACTIVE_7D3BEB38, failDirFile.getAbsoluteFile(), e); } @@ -178,7 +179,8 @@ private void tryLoadPendingTsFiles() { if (result.getCode() == TSStatusCode.SUCCESS_STATUS.getStatusCode() || result.getCode() == TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode()) { LOGGER.info( - "Successfully auto load tsfile {} (isGeneratedByPipe = {})", + StorageEngineMessages + .STORAGE_LOG_SUCCESSFULLY_AUTO_LOAD_TSFILE_ISGENERATEDBYPIPE_ADB5FEC9, loadEntry.get().getFile(), loadEntry.get().isGeneratedByPipe()); } else { @@ -271,7 +273,8 @@ private void handleLoadFailure( final ActiveLoadPendingQueue.ActiveLoadEntry entry, final TSStatus status) { if (!ActiveLoadFailedMessageHandler.isExceptionMessageShouldRetry(entry, status.getMessage())) { LOGGER.warn( - "Failed to auto load tsfile {} (isGeneratedByPipe = {}), status: {}. File will be moved to fail directory.", + StorageEngineMessages + .STORAGE_LOG_FAILED_TO_AUTO_LOAD_TSFILE_ISGENERATEDBYPIPE_STATUS_FILE_F43E9EF7, entry.getFile(), entry.isGeneratedByPipe(), status); @@ -281,7 +284,8 @@ private void handleLoadFailure( private void handleFileNotFoundException(final ActiveLoadPendingQueue.ActiveLoadEntry entry) { LOGGER.warn( - "Failed to auto load tsfile {} (isGeneratedByPipe = {}) due to file not found, will skip this file.", + StorageEngineMessages + .STORAGE_LOG_FAILED_TO_AUTO_LOAD_TSFILE_ISGENERATEDBYPIPE_DUE_TO_FILE_5EE1FA08, entry.getFile(), entry.isGeneratedByPipe()); removeFileAndResourceAndModsToFailDir(entry.getFile()); @@ -291,7 +295,8 @@ private void handleOtherException( final ActiveLoadPendingQueue.ActiveLoadEntry entry, final Exception e) { if (!ActiveLoadFailedMessageHandler.isExceptionMessageShouldRetry(entry, e.getMessage())) { LOGGER.warn( - "Failed to auto load tsfile {} (isGeneratedByPipe = {}) because of an unexpected exception. File will be moved to fail directory.", + StorageEngineMessages + .STORAGE_LOG_FAILED_TO_AUTO_LOAD_TSFILE_ISGENERATEDBYPIPE_BECAUSE_OF_07946D74, entry.getFile(), entry.isGeneratedByPipe(), e); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/config/LoadTsFileConfigurator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/config/LoadTsFileConfigurator.java index 4109272812def..3076afe1f2551 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/config/LoadTsFileConfigurator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/config/LoadTsFileConfigurator.java @@ -63,18 +63,17 @@ public static void validateParameters(final String key, final String value) { break; default: throw new SemanticException( - StorageEngineMessages.INVALID_PARAMETER + key + "' for LOAD TSFILE command."); + String.format(StorageEngineMessages.INVALID_PARAMETER_FOR_LOAD_TSFILE_COMMAND, key)); } } public static void validateSynonymParameters(final Map parameters) { if (parameters.containsKey(DATABASE_KEY) && parameters.containsKey(DATABASE_NAME_KEY)) { throw new SemanticException( - "The parameter key '" - + DATABASE_KEY - + "' and '" - + DATABASE_NAME_KEY - + "' cannot co-exist."); + String.format( + StorageEngineMessages.LOAD_TSFILE_DATABASE_KEY_AND_NAME_CANNOT_COEXIST, + DATABASE_KEY, + DATABASE_NAME_KEY)); } } @@ -89,14 +88,13 @@ public static void validateDatabaseLevelParam(final String databaseLevel) { if (level < DATABASE_LEVEL_MIN_VALUE) { throw new SemanticException( String.format( - "Given database level %d is less than the minimum value %d, please input a valid database level.", - level, DATABASE_LEVEL_MIN_VALUE)); + StorageEngineMessages.DATABASE_LEVEL_LESS_THAN_MINIMUM, + level, + DATABASE_LEVEL_MIN_VALUE)); } } catch (final NumberFormatException e) { throw new SemanticException( - String.format( - "Given database level %s is not a valid integer, please input a valid database level.", - databaseLevel)); + String.format(StorageEngineMessages.DATABASE_LEVEL_NOT_VALID_INTEGER, databaseLevel)); } } @@ -127,9 +125,7 @@ public static int parseOrGetDefaultDatabaseLevel(final Map loadA public static void validateOnSuccessParam(final String onSuccess) { if (!ON_SUCCESS_VALUE_SET.contains(onSuccess)) { throw new SemanticException( - String.format( - "Given on-success value '%s' is not supported, please input a valid on-success value.", - onSuccess)); + String.format(StorageEngineMessages.ON_SUCCESS_VALUE_NOT_SUPPORTED, onSuccess)); } } @@ -146,8 +142,9 @@ public static void validateConvertOnTypeMismatchParam(final String convertOnType && !"false".equalsIgnoreCase(convertOnTypeMismatch)) { throw new SemanticException( String.format( - "Given %s value '%s' is not supported, please input a valid boolean value.", - CONVERT_ON_TYPE_MISMATCH_KEY, convertOnTypeMismatch)); + StorageEngineMessages.PARAMETER_VALUE_NOT_SUPPORTED_BOOLEAN, + CONVERT_ON_TYPE_MISMATCH_KEY, + convertOnTypeMismatch)); } } @@ -178,8 +175,7 @@ public static void validateVerifyParam(final String verify) { if (!"true".equalsIgnoreCase(verify) && !"false".equalsIgnoreCase(verify)) { throw new SemanticException( String.format( - "Given %s value '%s' is not supported, please input a valid boolean value.", - VERIFY_KEY, verify)); + StorageEngineMessages.PARAMETER_VALUE_NOT_SUPPORTED_BOOLEAN, VERIFY_KEY, verify)); } } @@ -194,8 +190,9 @@ public static void validatePipeGeneratedParam(final String pipeGenerated) { if (!"true".equalsIgnoreCase(pipeGenerated) && !"false".equalsIgnoreCase(pipeGenerated)) { throw new SemanticException( String.format( - "Given %s value '%s' is not supported, please input a valid boolean value.", - PIPE_GENERATED_KEY, pipeGenerated)); + StorageEngineMessages.PARAMETER_VALUE_NOT_SUPPORTED_BOOLEAN, + PIPE_GENERATED_KEY, + pipeGenerated)); } } @@ -210,8 +207,9 @@ public static void validateAsyncLoadParam(final String asyncLoad) { if (!"true".equalsIgnoreCase(asyncLoad) && !"false".equalsIgnoreCase(asyncLoad)) { throw new SemanticException( String.format( - "Given %s value '%s' is not supported, please input a valid boolean value.", - ASYNC_LOAD_KEY, asyncLoad)); + StorageEngineMessages.PARAMETER_VALUE_NOT_SUPPORTED_BOOLEAN, + ASYNC_LOAD_KEY, + asyncLoad)); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/converter/LoadConvertedInsertTabletStatement.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/converter/LoadConvertedInsertTabletStatement.java index 1366b0720c557..591756e9f11e5 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/converter/LoadConvertedInsertTabletStatement.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/converter/LoadConvertedInsertTabletStatement.java @@ -19,6 +19,7 @@ package org.apache.iotdb.db.storageengine.load.converter; +import org.apache.iotdb.db.i18n.StorageEngineMessages; import org.apache.iotdb.db.pipe.receiver.transform.converter.ArrayConverter; import org.apache.iotdb.db.pipe.receiver.transform.statement.PipeConvertedInsertTabletStatement; import org.apache.iotdb.db.queryengine.plan.statement.crud.InsertTabletStatement; @@ -49,7 +50,7 @@ protected boolean checkAndCastDataType(int columnIndex, TSDataType dataType) { } LOGGER.info( - "Load: Inserting tablet to {}.{}. Casting type from {} to {}.", + StorageEngineMessages.STORAGE_LOG_LOAD_INSERTING_TABLET_TO_CASTING_TYPE_FROM_TO_AE808A8B, devicePath, measurements[columnIndex], dataTypes[columnIndex], diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/converter/LoadTableStatementDataTypeConvertExecutionVisitor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/converter/LoadTableStatementDataTypeConvertExecutionVisitor.java index 440e8bb66f3ca..89854e23f04df 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/converter/LoadTableStatementDataTypeConvertExecutionVisitor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/converter/LoadTableStatementDataTypeConvertExecutionVisitor.java @@ -110,7 +110,10 @@ public Optional visitLoadTsFile( } } catch (final Exception e) { LOGGER.warn( - "Failed to convert data type for LoadTsFileStatement: {}.", loadTsFileStatement, e); + StorageEngineMessages + .STORAGE_LOG_FAILED_TO_CONVERT_DATA_TYPE_FOR_LOADTSFILESTATEMENT_5D132E57, + loadTsFileStatement, + e); return Optional.of( LoadTsFileDataTypeConverter.TABLE_STATEMENT_EXCEPTION_VISITOR.process( loadTsFileStatement, e)); @@ -131,7 +134,9 @@ public Optional visitLoadTsFile( } LOGGER.info( - "Data type conversion for LoadTsFileStatement {} is successful.", loadTsFileStatement); + StorageEngineMessages + .STORAGE_LOG_DATA_TYPE_CONVERSION_FOR_LOADTSFILESTATEMENT_IS_SUCCESSFUL_99016326, + loadTsFileStatement); return Optional.of(new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode())); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/converter/LoadTreeStatementDataTypeConvertExecutionVisitor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/converter/LoadTreeStatementDataTypeConvertExecutionVisitor.java index e7afde176b6ef..ed010b6809e1c 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/converter/LoadTreeStatementDataTypeConvertExecutionVisitor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/converter/LoadTreeStatementDataTypeConvertExecutionVisitor.java @@ -131,7 +131,10 @@ public Optional visitLoadFile( } } catch (final Exception e) { LOGGER.warn( - "Failed to convert data type for LoadTsFileStatement: {}.", loadTsFileStatement, e); + StorageEngineMessages + .STORAGE_LOG_FAILED_TO_CONVERT_DATA_TYPE_FOR_LOADTSFILESTATEMENT_5D132E57, + loadTsFileStatement, + e); return Optional.of( loadTsFileStatement.accept( LoadTsFileDataTypeConverter.TREE_STATEMENT_EXCEPTION_VISITOR, e)); @@ -155,7 +158,10 @@ public Optional visitLoadFile( } } catch (final Exception e) { LOGGER.warn( - "Failed to convert data type for LoadTsFileStatement: {}.", loadTsFileStatement, e); + StorageEngineMessages + .STORAGE_LOG_FAILED_TO_CONVERT_DATA_TYPE_FOR_LOADTSFILESTATEMENT_5D132E57, + loadTsFileStatement, + e); return Optional.of( loadTsFileStatement.accept( LoadTsFileDataTypeConverter.TREE_STATEMENT_EXCEPTION_VISITOR, e)); @@ -184,7 +190,9 @@ public Optional visitLoadFile( } LOGGER.info( - "Data type conversion for LoadTsFileStatement {} is successful.", loadTsFileStatement); + StorageEngineMessages + .STORAGE_LOG_DATA_TYPE_CONVERSION_FOR_LOADTSFILESTATEMENT_IS_SUCCESSFUL_99016326, + loadTsFileStatement); return Optional.of(new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode())); } @@ -234,7 +242,8 @@ public static boolean handleTSStatus(final TSStatus result, final Object loadTsF || result.getCode() == TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode() || result.getCode() == TSStatusCode.LOAD_IDEMPOTENT_CONFLICT_EXCEPTION.getStatusCode())) { LOGGER.warn( - "Failed to convert data type for LoadTsFileStatement: {}, status code is {}.", + StorageEngineMessages + .STORAGE_LOG_FAILED_TO_CONVERT_DATA_TYPE_FOR_LOADTSFILESTATEMENT_STATUS_F0311707, loadTsFileStatement, result.getCode()); return false; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/converter/LoadTsFileDataTypeConverter.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/converter/LoadTsFileDataTypeConverter.java index 3aab4aac29009..a0435ea90dbae 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/converter/LoadTsFileDataTypeConverter.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/converter/LoadTsFileDataTypeConverter.java @@ -24,6 +24,7 @@ import org.apache.iotdb.commons.queryengine.common.SqlDialect; import org.apache.iotdb.db.auth.AuthorityChecker; import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.i18n.StorageEngineMessages; import org.apache.iotdb.db.protocol.session.IClientSession; import org.apache.iotdb.db.protocol.session.InternalClientSession; import org.apache.iotdb.db.protocol.session.SessionManager; @@ -88,7 +89,8 @@ public Optional convertForTableModel(final LoadTsFile loadTsFileTableS tableStatementDataTypeConvertExecutionVisitor, loadTsFileTableStatement.getDatabase()); } catch (Exception e) { LOGGER.warn( - "Failed to convert data types for table model statement {}.", + StorageEngineMessages + .STORAGE_LOG_FAILED_TO_CONVERT_DATA_TYPES_FOR_TABLE_MODEL_STATEMENT_CB574D44, loadTsFileTableStatement, e); return Optional.of( @@ -140,7 +142,10 @@ public Optional convertForTreeModel(final LoadTsFileStatement loadTsFi return loadTsFileTreeStatement.accept(treeStatementDataTypeConvertExecutionVisitor, null); } catch (Exception e) { LOGGER.warn( - "Failed to convert data types for tree model statement {}.", loadTsFileTreeStatement, e); + StorageEngineMessages + .STORAGE_LOG_FAILED_TO_CONVERT_DATA_TYPES_FOR_TREE_MODEL_STATEMENT_5C2869D6, + loadTsFileTreeStatement, + e); return Optional.of( new TSStatus(TSStatusCode.LOAD_FILE_ERROR.getStatusCode()).setMessage(e.getMessage())); } finally { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/disk/MinIOSelector.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/disk/MinIOSelector.java index 9be9c98d079e9..87929c8370914 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/disk/MinIOSelector.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/disk/MinIOSelector.java @@ -64,11 +64,16 @@ public MinIOSelector(final String[] dirs, final DiskDirectorySelector selector) logger.info(StorageEngineMessages.ADD_MOUNT_POINT, dataDirPath, mountPoint); } else { logger.info( - "Failed to find mount point {}, skip register it to map", dataDirPath); + StorageEngineMessages + .STORAGE_LOG_FAILED_TO_FIND_MOUNT_POINT_SKIP_REGISTER_IT_TO_MAP_33F38542, + dataDirPath); } } catch (Exception e) { logger.warn( - "Exception occurs when reading data dir's mount point {}", dataDirPath, e); + StorageEngineMessages + .STORAGE_LOG_EXCEPTION_OCCURS_WHEN_READING_DATA_DIR_S_MOUNT_POINT_9421E685, + dataDirPath, + e); } }); } @@ -90,7 +95,8 @@ public File selectTargetDirectory( } } catch (Exception e) { logger.warn( - "Exception occurs when reading target file's mount point {}", + StorageEngineMessages + .STORAGE_LOG_EXCEPTION_OCCURS_WHEN_READING_TARGET_FILE_S_MOUNT_POINT_47567945, sourceDirectory.getAbsoluteFile(), e); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/memory/LoadTsFileDataCacheMemoryBlock.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/memory/LoadTsFileDataCacheMemoryBlock.java index 6980cd63e8ece..0da4c724ab10e 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/memory/LoadTsFileDataCacheMemoryBlock.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/memory/LoadTsFileDataCacheMemoryBlock.java @@ -44,8 +44,10 @@ public class LoadTsFileDataCacheMemoryBlock extends LoadTsFileAbstractMemoryBloc if (initialLimitedMemorySizeInBytes < MINIMUM_MEMORY_SIZE_IN_BYTES) { throw new LoadRuntimeOutOfMemoryException( String.format( - "The initial limited memory size %d is less than the minimum memory size %d", - initialLimitedMemorySizeInBytes, MINIMUM_MEMORY_SIZE_IN_BYTES)); + StorageEngineMessages + .STORAGE_EXCEPTION_THE_INITIAL_LIMITED_MEMORY_SIZE_D_IS_LESS_THAN_THE_MINIMUM_FC044302, + initialLimitedMemorySizeInBytes, + MINIMUM_MEMORY_SIZE_IN_BYTES)); } this.limitedMemorySizeInBytes = new AtomicLong(initialLimitedMemorySizeInBytes); @@ -74,14 +76,17 @@ public synchronized void reduceMemoryUsage(long memoryInBytes) { @Override public synchronized void forceResize(long newSizeInBytes) { throw new UnsupportedOperationException( - "setTotalMemorySizeInBytes is not supported for LoadTsFileDataCacheMemoryBlock"); + StorageEngineMessages + .STORAGE_EXCEPTION_SETTOTALMEMORYSIZEINBYTES_IS_NOT_SUPPORTED_FOR_LOADTSFILEDATACACHEMEMORYBLOCK_DFAB2A2A); } @Override protected void releaseAllMemory() { if (memoryUsageInBytes.get() != 0) { LOGGER.warn( - "Try to release memory from a memory block {} which has not released all memory", this); + StorageEngineMessages + .STORAGE_LOG_TRY_TO_RELEASE_MEMORY_FROM_A_MEMORY_BLOCK_WHICH_HAS_NOT_874E7A08, + this); } MEMORY_MANAGER.releaseToQuery(limitedMemorySizeInBytes.get()); } @@ -89,7 +94,8 @@ protected void releaseAllMemory() { public boolean doShrink(long shrinkMemoryInBytes) { if (shrinkMemoryInBytes < 0) { LOGGER.warn( - "Try to shrink a negative memory size {} from memory block {}", + StorageEngineMessages + .STORAGE_LOG_TRY_TO_SHRINK_A_NEGATIVE_MEMORY_SIZE_FROM_MEMORY_BLOCK_60501B13, shrinkMemoryInBytes, this); return false; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/memory/LoadTsFileMemoryBlock.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/memory/LoadTsFileMemoryBlock.java index 568dd6122feaf..43c239642d091 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/memory/LoadTsFileMemoryBlock.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/memory/LoadTsFileMemoryBlock.java @@ -102,7 +102,9 @@ public synchronized void forceResize(long newSizeInBytes) { protected synchronized void releaseAllMemory() { if (memoryUsageInBytes.get() != 0) { LOGGER.warn( - "Try to release memory from a memory block {} which has not released all memory", this); + StorageEngineMessages + .STORAGE_LOG_TRY_TO_RELEASE_MEMORY_FROM_A_MEMORY_BLOCK_WHICH_HAS_NOT_874E7A08, + this); } MEMORY_MANAGER.releaseToQuery(totalMemorySizeInBytes); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/memory/LoadTsFileMemoryManager.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/memory/LoadTsFileMemoryManager.java index 9af3fc6cf20d1..c0902f2da730e 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/memory/LoadTsFileMemoryManager.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/memory/LoadTsFileMemoryManager.java @@ -65,9 +65,8 @@ private synchronized void forceAllocateFromQuery(long sizeInBytes) throw new LoadRuntimeOutOfMemoryException( String.format( - "forceAllocate: failed to allocate memory from query engine after %s retries, " - + "total query memory %s bytes, current available memory for load %s bytes, " - + "current load used memory size %s bytes, load requested memory size %s bytes", + StorageEngineMessages + .STORAGE_EXCEPTION_FORCEALLOCATE_FAILED_TO_ALLOCATE_MEMORY_FROM_QUERY_ENGINE_F91D5959, MEMORY_ALLOCATE_MAX_RETRIES, QUERY_ENGINE_MEMORY_MANAGER.getAllocateMemoryForOperators(), Math.max(0L, QUERY_ENGINE_MEMORY_MANAGER.getFreeMemoryForLoadTsFile()), @@ -85,11 +84,15 @@ public synchronized long tryAllocateFromQuery(final long sizeInBytes) { public synchronized void releaseToQuery(final long sizeInBytes) { if (sizeInBytes <= 0) { throw new IllegalArgumentException( - String.format("Load: Invalid memory size %d bytes, must be positive", sizeInBytes)); + String.format( + StorageEngineMessages + .STORAGE_EXCEPTION_LOAD_INVALID_MEMORY_SIZE_D_BYTES_MUST_BE_POSITIVE_D6586ED3, + sizeInBytes)); } if (usedMemorySizeInBytes.get() < sizeInBytes) { LOGGER.error( - "Load: Attempting to release more memory ({}) than allocated ({})", + StorageEngineMessages + .STORAGE_LOG_LOAD_ATTEMPTING_TO_RELEASE_MORE_MEMORY_THAN_ALLOCATED_0E737996, sizeInBytes, usedMemorySizeInBytes.get()); } @@ -103,7 +106,10 @@ public synchronized LoadTsFileMemoryBlock allocateMemoryBlock(long sizeInBytes) throws LoadRuntimeOutOfMemoryException { if (sizeInBytes <= 0) { throw new IllegalArgumentException( - String.format("Load: Invalid memory size %d bytes, must be positive", sizeInBytes)); + String.format( + StorageEngineMessages + .STORAGE_EXCEPTION_LOAD_INVALID_MEMORY_SIZE_D_BYTES_MUST_BE_POSITIVE_D6586ED3, + sizeInBytes)); } try { forceAllocateFromQuery(sizeInBytes); @@ -113,7 +119,8 @@ public synchronized LoadTsFileMemoryBlock allocateMemoryBlock(long sizeInBytes) } catch (LoadRuntimeOutOfMemoryException e) { if (dataCacheMemoryBlock != null && dataCacheMemoryBlock.doShrink(sizeInBytes)) { LOGGER.info( - "Load: Query engine's memory is not sufficient, allocated MemoryBlock from DataCacheMemoryBlock, size: {}", + StorageEngineMessages + .STORAGE_LOG_LOAD_QUERY_ENGINE_S_MEMORY_IS_NOT_SUFFICIENT_ALLOCATED_MEMORYBLOCK_44D5B5FB, sizeInBytes); return new LoadTsFileMemoryBlock(sizeInBytes); } @@ -132,7 +139,9 @@ synchronized void forceResize(LoadTsFileMemoryBlock memoryBlock, long newSizeInB if (newSizeInBytes < 0) { throw new IllegalArgumentException( String.format( - "Load: Invalid memory size %d bytes, must be non-negative", newSizeInBytes)); + StorageEngineMessages + .STORAGE_EXCEPTION_LOAD_INVALID_MEMORY_SIZE_D_BYTES_MUST_BE_NON_NEGATIVE_A0146353, + newSizeInBytes)); } if (memoryBlock.getTotalMemorySizeInBytes() == newSizeInBytes) { return; @@ -142,7 +151,8 @@ synchronized void forceResize(LoadTsFileMemoryBlock memoryBlock, long newSizeInB if (memoryBlock.getMemoryUsageInBytes() > newSizeInBytes) { LOGGER.error( - "Load: Failed to setTotalMemorySizeInBytes memory block {} to {} bytes, current memory usage {} bytes", + StorageEngineMessages + .STORAGE_LOG_LOAD_FAILED_TO_SETTOTALMEMORYSIZEINBYTES_MEMORY_BLOCK_TO_DBE9BE56, memoryBlock, newSizeInBytes, memoryBlock.getMemoryUsageInBytes()); @@ -158,14 +168,16 @@ synchronized void forceResize(LoadTsFileMemoryBlock memoryBlock, long newSizeInB forceAllocateFromQuery(bytesNeeded); if (LOGGER.isDebugEnabled()) { LOGGER.debug( - "Load: Force resized LoadTsFileMemoryBlock with memory from query engine, size added: {}, new size: {}", + StorageEngineMessages + .STORAGE_LOG_LOAD_FORCE_RESIZED_LOADTSFILEMEMORYBLOCK_WITH_MEMORY_FROM_33AC288A, bytesNeeded, newSizeInBytes); } } catch (LoadRuntimeOutOfMemoryException e) { if (dataCacheMemoryBlock != null && dataCacheMemoryBlock.doShrink(bytesNeeded)) { LOGGER.info( - "Load: Query engine's memory is not sufficient, force resized LoadTsFileMemoryBlock with memory from DataCacheMemoryBlock, size added: {}, new size: {}", + StorageEngineMessages + .STORAGE_LOG_LOAD_QUERY_ENGINE_S_MEMORY_IS_NOT_SUFFICIENT_FORCE_RESIZED_9F85F4CA, bytesNeeded, newSizeInBytes); } else { @@ -193,7 +205,7 @@ public synchronized LoadTsFileDataCacheMemoryBlock allocateDataCacheMemoryBlock( throw e; } LOGGER.info( - "Create Data Cache Memory Block {}, allocate memory {}", + StorageEngineMessages.STORAGE_LOG_CREATE_DATA_CACHE_MEMORY_BLOCK_ALLOCATE_MEMORY_5F3E041D, dataCacheMemoryBlock, actuallyAllocateMemoryInBytes); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/splitter/AlignedChunkData.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/splitter/AlignedChunkData.java index d852ec3c9b85d..ebb3d9afb854d 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/splitter/AlignedChunkData.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/splitter/AlignedChunkData.java @@ -282,7 +282,9 @@ public void writeDecodeValuePage( break; default: throw new UnSupportedDataTypeException( - String.format("Data type %s is not supported.", dataType)); + String.format( + StorageEngineMessages.STORAGE_EXCEPTION_DATA_TYPE_S_IS_NOT_SUPPORTED_5D5C02E4, + dataType)); } } } @@ -424,7 +426,10 @@ private void buildChunk( break; default: throw new UnSupportedDataTypeException( - String.format("Data type %s is not supported.", chunkHeader.getDataType())); + String.format( + StorageEngineMessages + .STORAGE_EXCEPTION_DATA_TYPE_S_IS_NOT_SUPPORTED_5D5C02E4, + chunkHeader.getDataType())); } } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/splitter/BatchedAlignedValueChunkData.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/splitter/BatchedAlignedValueChunkData.java index 6e8d3850b8e24..adafad2725599 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/splitter/BatchedAlignedValueChunkData.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/splitter/BatchedAlignedValueChunkData.java @@ -21,6 +21,7 @@ import org.apache.iotdb.common.rpc.thrift.TTimePartitionSlot; import org.apache.iotdb.commons.utils.TimePartitionUtils; +import org.apache.iotdb.db.i18n.StorageEngineMessages; import org.apache.tsfile.enums.TSDataType; import org.apache.tsfile.exception.write.PageException; @@ -115,7 +116,9 @@ public void writeDecodeValuePage(long[] times, TsPrimitiveType[] values, TSDataT break; default: throw new UnSupportedDataTypeException( - String.format("Data type %s is not supported.", dataType)); + String.format( + StorageEngineMessages.STORAGE_EXCEPTION_DATA_TYPE_S_IS_NOT_SUPPORTED_5D5C02E4, + dataType)); } } } @@ -208,7 +211,9 @@ private void buildValueChunkWriter( break; default: throw new UnSupportedDataTypeException( - String.format("Data type %s is not supported.", chunkHeader.getDataType())); + String.format( + StorageEngineMessages.STORAGE_EXCEPTION_DATA_TYPE_S_IS_NOT_SUPPORTED_5D5C02E4, + chunkHeader.getDataType())); } } Statistics statistics = diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/splitter/NonAlignedChunkData.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/splitter/NonAlignedChunkData.java index 7b3c2fd3f9523..c6056506b770f 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/splitter/NonAlignedChunkData.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/splitter/NonAlignedChunkData.java @@ -21,6 +21,7 @@ import org.apache.iotdb.common.rpc.thrift.TTimePartitionSlot; import org.apache.iotdb.commons.utils.TimePartitionUtils; +import org.apache.iotdb.db.i18n.StorageEngineMessages; import org.apache.iotdb.db.queryengine.plan.planner.plan.node.load.LoadTsFilePieceNode; import org.apache.tsfile.exception.write.PageException; @@ -220,7 +221,9 @@ public void writeDecodePage(final long[] times, final Object[] values, final int break; default: throw new UnSupportedDataTypeException( - String.format("Data type %s is not supported.", chunkHeader.getDataType())); + String.format( + StorageEngineMessages.STORAGE_EXCEPTION_DATA_TYPE_S_IS_NOT_SUPPORTED_5D5C02E4, + chunkHeader.getDataType())); } } } @@ -282,7 +285,9 @@ private void buildChunkWriter(final InputStream stream) throws IOException, Page break; default: throw new UnSupportedDataTypeException( - String.format("Data type %s is not supported.", chunkHeader.getDataType())); + String.format( + StorageEngineMessages.STORAGE_EXCEPTION_DATA_TYPE_S_IS_NOT_SUPPORTED_5D5C02E4, + chunkHeader.getDataType())); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/splitter/TsFileSplitter.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/splitter/TsFileSplitter.java index d43b828cced8f..f8ba40cbe687b 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/splitter/TsFileSplitter.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/splitter/TsFileSplitter.java @@ -101,7 +101,10 @@ public void splitTsFileByDataPartition() if (!checkMagic(reader)) { throw new TsFileRuntimeException( - String.format("Magic String check error when parsing TsFile %s.", tsFile.getPath())); + String.format( + StorageEngineMessages + .STORAGE_EXCEPTION_MAGIC_STRING_CHECK_ERROR_WHEN_PARSING_TSFILE_S_EA3D68E3, + tsFile.getPath())); } reader.position((long) TSFileConfig.MAGIC_STRING.getBytes().length + 1); @@ -160,8 +163,10 @@ private void processTimeChunkOrNonAlignedChunk(TsFileSequenceReader reader, byte if (header.getDataSize() == 0) { throw new TsFileRuntimeException( String.format( - "Empty Nonaligned Chunk or Time Chunk with offset %d in TsFile %s.", - chunkOffset, tsFile.getPath())); + StorageEngineMessages + .STORAGE_EXCEPTION_EMPTY_NONALIGNED_CHUNK_OR_TIME_CHUNK_WITH_OFFSET_D_IN_TSFILE_B1E462C9, + chunkOffset, + tsFile.getPath())); } isAligned = @@ -397,14 +402,18 @@ private boolean checkMagic(TsFileSequenceReader reader) throws IOException { if (versionNumber < TSFileConfig.VERSION_NUMBER) { if (versionNumber == TSFileConfig.VERSION_NUMBER_V3 && TSFileConfig.VERSION_NUMBER == 4) { logger.info( - "try to load TsFile V3 into current version (V4), file path: {}", reader.getFileName()); + StorageEngineMessages + .STORAGE_LOG_TRY_TO_LOAD_TSFILE_V3_INTO_CURRENT_VERSION_V4_FILE_PATH_B8D38E22, + reader.getFileName()); } else { logger.error(StorageEngineMessages.FILE_VERSION_TOO_OLD, reader.getFileName()); return false; } } else if (versionNumber > TSFileConfig.VERSION_NUMBER) { logger.error( - "the file's Version Number is higher than current, file path: {}", reader.getFileName()); + StorageEngineMessages + .STORAGE_LOG_THE_FILE_S_VERSION_NUMBER_IS_HIGHER_THAN_CURRENT_FILE_PATH_6D17349F, + reader.getFileName()); return false; } @@ -458,14 +467,17 @@ private void consumeAllAlignedChunkData( && timePartitionSlots.size() > CONFIG.getLoadTsFileSpiltPartitionMaxSize()) { throw new LoadFileException( String.format( - "Time partition slots size is greater than %s", + StorageEngineMessages + .STORAGE_EXCEPTION_TIME_PARTITION_SLOTS_SIZE_IS_GREATER_THAN_S_D076F78E, CONFIG.getLoadTsFileSpiltPartitionMaxSize())); } if (Boolean.FALSE.equals(consumer.apply(chunkData))) { throw new IllegalStateException( String.format( - "Consume aligned chunk data error, next chunk offset: %d, chunkData: %s", - offset, chunkData)); + StorageEngineMessages + .STORAGE_EXCEPTION_CONSUME_ALIGNED_CHUNK_DATA_ERROR_NEXT_CHUNK_OFFSET_D_CHUNKDATA_D896FAE2, + offset, + chunkData)); } } this.pageIndex2ChunkData = new HashMap<>(); @@ -478,14 +490,18 @@ private void consumeChunkData(String measurement, long offset, ChunkData chunkDa && timePartitionSlots.size() > CONFIG.getLoadTsFileSpiltPartitionMaxSize()) { throw new LoadFileException( String.format( - "Time partition slots size is greater than %s", + StorageEngineMessages + .STORAGE_EXCEPTION_TIME_PARTITION_SLOTS_SIZE_IS_GREATER_THAN_S_D076F78E, CONFIG.getLoadTsFileSpiltPartitionMaxSize())); } if (Boolean.FALSE.equals(consumer.apply(chunkData))) { throw new IllegalStateException( String.format( - "Consume chunkData error, chunk offset: %d, measurement: %s, chunkData: %s", - offset, measurement, chunkData)); + StorageEngineMessages + .STORAGE_EXCEPTION_CONSUME_CHUNKDATA_ERROR_CHUNK_OFFSET_D_MEASUREMENT_S_CHUNKDATA_4A1F1EE1, + offset, + measurement, + chunkData)); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/rescon/disk/DirectoryChecker.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/rescon/disk/DirectoryChecker.java index 81b1690dd89ec..e7076cfbe186b 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/rescon/disk/DirectoryChecker.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/rescon/disk/DirectoryChecker.java @@ -56,13 +56,15 @@ public void registerDirectory(File dir) throws ConfigurationException, IOExcepti if (dir.exists() && !dir.isDirectory()) { throw new ConfigurationException( String.format( - "Unable to create directory %s because there is file under the path, please check configuration and restart.", + StorageEngineMessages + .STORAGE_EXCEPTION_UNABLE_TO_CREATE_DIRECTORY_S_BECAUSE_THERE_IS_FILE_UNDER_1C59ACFC, dir.getAbsolutePath())); } else if (!dir.exists()) { if (!dir.mkdirs()) { throw new ConfigurationException( String.format( - "Unable to create directory %s, please check configuration and restart.", + StorageEngineMessages + .STORAGE_EXCEPTION_UNABLE_TO_CREATE_DIRECTORY_S_PLEASE_CHECK_CONFIGURATION_BA580B67, dir.getAbsolutePath())); } } @@ -82,8 +84,10 @@ public void registerDirectory(File dir) throws ConfigurationException, IOExcepti randomAccessFile.close(); throw new ConfigurationException( String.format( - "Conflict is detected in directory %s, which may be being used by another IoTDB (ProcessId=%s). Please check configuration and restart.", - dir.getAbsolutePath(), randomAccessFile.readLine())); + StorageEngineMessages + .STORAGE_EXCEPTION_CONFLICT_IS_DETECTED_IN_DIRECTORY_S_WHICH_MAY_BE_BEING_USED_CB5C77FC, + dir.getAbsolutePath(), + randomAccessFile.readLine())); } randomAccessFile.writeBytes(ProcessIdUtils.getProcessId()); // add to list diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/rescon/disk/TierManager.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/rescon/disk/TierManager.java index 200be13966423..8fd92f199a015 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/rescon/disk/TierManager.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/rescon/disk/TierManager.java @@ -109,7 +109,9 @@ public synchronized void initFolders() { } } catch (Exception e) { logger.error( - "Can't find strategy {} for mult-directories.", config.getMultiDirStrategyClassName(), e); + StorageEngineMessages.STORAGE_LOG_CAN_T_FIND_STRATEGY_FOR_MULT_DIRECTORIES_A06406EC, + config.getMultiDirStrategyClassName(), + e); } config.updatePath(); @@ -239,7 +241,9 @@ private void mkDataDirs(List folders) { logger.info(StorageEngineMessages.FOLDER_NOT_EXIST_CREATE_IT, file.getPath()); } else { logger.info( - "create folder {} failed. Is the folder existed: {}", file.getPath(), file.exists()); + StorageEngineMessages.STORAGE_LOG_CREATE_FOLDER_FAILED_IS_THE_FOLDER_EXISTED_18E29D51, + file.getPath(), + file.exists()); } } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/rescon/memory/PrimitiveArrayManager.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/rescon/memory/PrimitiveArrayManager.java index b0b4a4fe8d069..cb996fd25e1d1 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/rescon/memory/PrimitiveArrayManager.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/rescon/memory/PrimitiveArrayManager.java @@ -201,7 +201,7 @@ private static void updateLimits() { if (LOGGER.isDebugEnabled() && oldLimit != newLimit) { LOGGER.debug( - "limit of {} array deque size updated: {} -> {}", + StorageEngineMessages.STORAGE_LOG_LIMIT_OF_ARRAY_DEQUE_SIZE_UPDATED_05DBA95E, TSDataType.deserialize((byte) i).name(), oldLimit, newLimit); @@ -216,7 +216,8 @@ private static void updateLimits() { } if (LOGGER.isDebugEnabled() && oldLimitUpdateThreshold != limitUpdateThreshold) { LOGGER.debug( - "limitUpdateThreshold of PrimitiveArrayManager updated: {} -> {}", + StorageEngineMessages + .STORAGE_LOG_LIMITUPDATETHRESHOLD_OF_PRIMITIVEARRAYMANAGER_UPDATED_394801AE, oldLimitUpdateThreshold, limitUpdateThreshold); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/rescon/memory/SystemInfo.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/rescon/memory/SystemInfo.java index f379e85a50140..5491f113ba7e4 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/rescon/memory/SystemInfo.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/rescon/memory/SystemInfo.java @@ -112,7 +112,8 @@ public synchronized boolean reportStorageGroupStatus( totalStorageGroupMemCost += delta; if (logger.isDebugEnabled()) { logger.debug( - "Report database Status to the system. " + "After adding {}, current sg mem cost is {}.", + StorageEngineMessages + .STORAGE_LOG_REPORT_DATABASE_STATUS_TO_THE_SYSTEM_AFTER_ADDING_CURRENT_8982BBD7, delta, totalStorageGroupMemCost); } @@ -122,14 +123,15 @@ public synchronized boolean reportStorageGroupStatus( return true; } else if (totalStorageGroupMemCost < REJECT_THRESHOLD) { logger.debug( - "The total database mem costs are too large, call for flushing. " - + "Current sg cost is {}", + StorageEngineMessages + .STORAGE_LOG_THE_TOTAL_DATABASE_MEM_COSTS_ARE_TOO_LARGE_CALL_FOR_FLUSHING_26AD8CDF, totalStorageGroupMemCost); chooseMemTablesToMarkFlush(tsFileProcessor); return true; } else { logger.info( - "Change system to reject status. Triggered by: logical SG ({}), mem cost delta ({}), totalSgMemCost ({}), REJECT_THRESHOLD ({})", + StorageEngineMessages + .STORAGE_LOG_CHANGE_SYSTEM_TO_REJECT_STATUS_TRIGGERED_BY_LOGICAL_SG_MEM_6F9BCBD3, dataRegionInfo.getDataRegion().getDatabaseName(), delta, totalStorageGroupMemCost, @@ -140,10 +142,11 @@ public synchronized boolean reportStorageGroupStatus( return true; } else { throw new WriteProcessRejectException( - "Total database MemCost " - + totalStorageGroupMemCost - + " is over than memorySizeForWriting " - + memorySizeForMemtable); + String.format( + StorageEngineMessages + .STORAGE_EXCEPTION_TOTAL_DATABASE_MEMCOST_S_IS_OVER_THAN_MEMORYSIZEFORWRITING_C63E4D72, + totalStorageGroupMemCost, + memorySizeForMemtable)); } } else { return false; @@ -172,13 +175,15 @@ public synchronized void resetStorageGroupStatus(DataRegionInfo dataRegionInfo) if (totalStorageGroupMemCost >= FLUSH_THRESHOLD && totalStorageGroupMemCost < REJECT_THRESHOLD) { logger.debug( - "SG ({}) released memory (delta: {}) but still exceeding flush proportion (totalSgMemCost: {}), call flush.", + StorageEngineMessages + .STORAGE_LOG_SG_RELEASED_MEMORY_DELTA_BUT_STILL_EXCEEDING_FLUSH_PROPORTION_DB68D9D5, dataRegionInfo.getDataRegion().getDatabaseName(), delta, totalStorageGroupMemCost); if (rejected) { logger.info( - "SG ({}) released memory (delta: {}), set system to normal status (totalSgMemCost: {}).", + StorageEngineMessages + .STORAGE_LOG_SG_RELEASED_MEMORY_DELTA_SET_SYSTEM_TO_NORMAL_STATUS_TOTALSGMEMCOST_0F714668, dataRegionInfo.getDataRegion().getDatabaseName(), delta, totalStorageGroupMemCost); @@ -187,7 +192,8 @@ public synchronized void resetStorageGroupStatus(DataRegionInfo dataRegionInfo) rejected = false; } else if (totalStorageGroupMemCost >= REJECT_THRESHOLD) { logger.warn( - "SG ({}) released memory (delta: {}), but system is still in reject status (totalSgMemCost: {}).", + StorageEngineMessages + .STORAGE_LOG_SG_RELEASED_MEMORY_DELTA_BUT_SYSTEM_IS_STILL_IN_REJECT_STATUS_AD5E475C, dataRegionInfo.getDataRegion().getDatabaseName(), delta, totalStorageGroupMemCost); @@ -195,7 +201,8 @@ public synchronized void resetStorageGroupStatus(DataRegionInfo dataRegionInfo) rejected = true; } else { logger.debug( - "SG ({}) released memory (delta: {}), system is in normal status (totalSgMemCost: {}).", + StorageEngineMessages + .STORAGE_LOG_SG_RELEASED_MEMORY_DELTA_SYSTEM_IS_IN_NORMAL_STATUS_TOTALSGMEMCOST_600A4A8D, dataRegionInfo.getDataRegion().getDatabaseName(), delta, totalStorageGroupMemCost); @@ -234,8 +241,10 @@ public boolean addCompactionFileNum(int fileNum, long timeOutInSecond) // source file num is greater than the max file num for compaction throw new CompactionFileCountExceededException( String.format( - "Required file num %d is greater than the max file num %d for compaction.", - fileNum, totalFileLimitForCompactionTask)); + StorageEngineMessages + .STORAGE_EXCEPTION_REQUIRED_FILE_NUM_D_IS_GREATER_THAN_THE_MAX_FILE_NUM_D_FOR_AB6DE95B, + fileNum, + totalFileLimitForCompactionTask)); } long startTime = System.currentTimeMillis(); int originFileNum = this.compactionFileNumCost.get(); @@ -244,8 +253,12 @@ public boolean addCompactionFileNum(int fileNum, long timeOutInSecond) if (System.currentTimeMillis() - startTime >= timeOutInSecond * 1000L) { throw new CompactionFileCountExceededException( String.format( - "Failed to allocate %d files for compaction after %d seconds, max file num for compaction module is %d, %d files is used.", - fileNum, timeOutInSecond, totalFileLimitForCompactionTask, originFileNum)); + StorageEngineMessages + .STORAGE_EXCEPTION_FAILED_TO_ALLOCATE_D_FILES_FOR_COMPACTION_AFTER_D_SECONDS_C701F750, + fileNum, + timeOutInSecond, + totalFileLimitForCompactionTask, + originFileNum)); } Thread.sleep(100); originFileNum = this.compactionFileNumCost.get(); @@ -259,8 +272,10 @@ public void addCompactionFileNum(int fileNum, boolean waitUntilAcquired) // source file num is greater than the max file num for compaction throw new CompactionFileCountExceededException( String.format( - "Required file num %d is greater than the max file num %d for compaction.", - fileNum, totalFileLimitForCompactionTask)); + StorageEngineMessages + .STORAGE_EXCEPTION_REQUIRED_FILE_NUM_D_IS_GREATER_THAN_THE_MAX_FILE_NUM_D_FOR_AB6DE95B, + fileNum, + totalFileLimitForCompactionTask)); } int originFileNum = this.compactionFileNumCost.get(); while (true) { @@ -268,8 +283,11 @@ public void addCompactionFileNum(int fileNum, boolean waitUntilAcquired) if (!canUpdate && !waitUntilAcquired) { throw new CompactionFileCountExceededException( String.format( - "Failed to allocate %d files for compaction, max file num for compaction module is %d, %d files is used.", - fileNum, totalFileLimitForCompactionTask, originFileNum)); + StorageEngineMessages + .STORAGE_EXCEPTION_FAILED_TO_ALLOCATE_D_FILES_FOR_COMPACTION_MAX_FILE_NUM_FOR_9B954F8C, + fileNum, + totalFileLimitForCompactionTask, + originFileNum)); } if (canUpdate && compactionFileNumCost.compareAndSet(originFileNum, originFileNum + fileNum)) { @@ -287,9 +305,10 @@ public void addCompactionMemoryCost( // required memory cost is greater than the total memory budget for compaction throw new CompactionMemoryNotEnoughException( String.format( - "Required memory cost %d bytes is greater than " - + "the total memory budget for compaction %d bytes", - memoryCost, compactionMemoryBlock.getTotalMemorySizeInBytes())); + StorageEngineMessages + .STORAGE_EXCEPTION_REQUIRED_MEMORY_COST_D_BYTES_IS_GREATER_THAN_THE_TOTAL_MEMORY_444D8FE4, + memoryCost, + compactionMemoryBlock.getTotalMemorySizeInBytes())); } boolean allocateResult = waitUntilAcquired @@ -298,8 +317,8 @@ public void addCompactionMemoryCost( if (!allocateResult) { throw new CompactionMemoryNotEnoughException( String.format( - "Failed to allocate %d bytes memory for compaction, " - + "total memory budget for compaction module is %d bytes, %d bytes is used", + StorageEngineMessages + .STORAGE_EXCEPTION_FAILED_TO_ALLOCATE_D_BYTES_MEMORY_FOR_COMPACTION_TOTAL_MEMORY_33BE3C71, memoryCost, compactionMemoryBlock.getTotalMemorySizeInBytes(), compactionMemoryBlock.getUsedMemoryInBytes())); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/rescon/memory/TimePartitionManager.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/rescon/memory/TimePartitionManager.java index 5ded82a36ba00..7e45bc1693317 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/rescon/memory/TimePartitionManager.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/rescon/memory/TimePartitionManager.java @@ -24,6 +24,7 @@ import org.apache.iotdb.commons.memory.MemoryBlockType; import org.apache.iotdb.commons.utils.TestOnly; import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.i18n.StorageEngineMessages; import org.apache.iotdb.db.pipe.source.dataregion.realtime.listener.PipeTimePartitionListener; import org.apache.iotdb.db.storageengine.StorageEngine; import org.apache.iotdb.db.storageengine.dataregion.DataRegion; @@ -131,7 +132,8 @@ private void degradeLastFlushTime() { if (dataRegion != null) { dataRegion.degradeFlushTimeMap(timePartitionInfo.partitionId); logger.info( - "[{}]degrade LastFlushTimeMap of old TimePartitionInfo-{}, mem size is {}, remaining mem cost is {}", + StorageEngineMessages + .STORAGE_LOG_DEGRADE_LASTFLUSHTIMEMAP_OF_OLD_TIMEPARTITIONINFO_MEM_SIZE_BED053EE, timePartitionInfo.dataRegionId, timePartitionInfo.partitionId, timePartitionInfo.memSize, diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/rescon/quotas/QuotaLimiter.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/rescon/quotas/QuotaLimiter.java index 9a659d67dd956..1a404c48901c8 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/rescon/quotas/QuotaLimiter.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/rescon/quotas/QuotaLimiter.java @@ -27,6 +27,7 @@ import org.apache.iotdb.commons.quotas.RateLimiter; import org.apache.iotdb.db.conf.IoTDBConfig; import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.i18n.StorageEngineMessages; import org.apache.iotdb.rpc.TSStatusCode; import java.util.Map; @@ -113,26 +114,35 @@ public void checkQuota( throws RpcThrottlingException { if (!reqsLimiter.canExecute(writeReqs + readReqs)) { throw new RpcThrottlingException( - "number of requests exceeded - wait " + reqsLimiter.waitInterval() + "ms", + String.format( + StorageEngineMessages.STORAGE_EXCEPTION_NUMBER_OF_REQUESTS_EXCEEDED_WAIT_SMS_30F0842F, + reqsLimiter.waitInterval()), TSStatusCode.NUM_REQUESTS_EXCEEDED.getStatusCode()); } if (!reqSizeLimiter.canExecute(estimateWriteSize + estimateReadSize)) { throw new RpcThrottlingException( - "request size limit exceeded - wait " + reqSizeLimiter.waitInterval() + "ms", + String.format( + StorageEngineMessages.STORAGE_EXCEPTION_REQUEST_SIZE_LIMIT_EXCEEDED_WAIT_SMS_11C1E549, + reqSizeLimiter.waitInterval()), TSStatusCode.REQUEST_SIZE_EXCEEDED.getStatusCode()); } if (estimateWriteSize > 0) { if (!writeReqsLimiter.canExecute(writeReqs)) { throw new RpcThrottlingException( - "number of write requests exceeded - wait " + writeReqsLimiter.waitInterval() + "ms", + String.format( + StorageEngineMessages + .STORAGE_EXCEPTION_NUMBER_OF_WRITE_REQUESTS_EXCEEDED_WAIT_SMS_D11F94D2, + writeReqsLimiter.waitInterval()), TSStatusCode.NUM_WRITE_REQUESTS_EXCEEDED.getStatusCode()); } if (!writeSizeLimiter.canExecute(estimateWriteSize)) { throw new RpcThrottlingException( - "write size limit exceeded - wait " + writeSizeLimiter.waitInterval() + "ms", + String.format( + StorageEngineMessages.STORAGE_EXCEPTION_WRITE_SIZE_LIMIT_EXCEEDED_WAIT_SMS_AA3796DC, + writeSizeLimiter.waitInterval()), TSStatusCode.WRITE_SIZE_EXCEEDED.getStatusCode()); } } @@ -140,13 +150,18 @@ public void checkQuota( if (estimateReadSize > 0) { if (!readReqsLimiter.canExecute(readReqs)) { throw new RpcThrottlingException( - "number of read requests exceeded - wait " + readReqsLimiter.waitInterval() + "ms", + String.format( + StorageEngineMessages + .STORAGE_EXCEPTION_NUMBER_OF_READ_REQUESTS_EXCEEDED_WAIT_SMS_C92D6C43, + readReqsLimiter.waitInterval()), TSStatusCode.NUM_READ_REQUESTS_EXCEEDED.getStatusCode()); } if (!readSizeLimiter.canExecute(estimateReadSize)) { throw new RpcThrottlingException( - "read size limit exceeded - wait " + readSizeLimiter.waitInterval() + "ms", + String.format( + StorageEngineMessages.STORAGE_EXCEPTION_READ_SIZE_LIMIT_EXCEEDED_WAIT_SMS_E19598BA, + readSizeLimiter.waitInterval()), TSStatusCode.READ_SIZE_EXCEEDED.getStatusCode()); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/agent/SubscriptionAgentLauncher.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/agent/SubscriptionAgentLauncher.java index 447a70ad58248..9c13316deb692 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/agent/SubscriptionAgentLauncher.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/agent/SubscriptionAgentLauncher.java @@ -27,6 +27,7 @@ import org.apache.iotdb.confignode.rpc.thrift.TGetAllSubscriptionInfoResp; import org.apache.iotdb.confignode.rpc.thrift.TGetAllTopicInfoResp; import org.apache.iotdb.db.i18n.DataNodeMiscMessages; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; import org.apache.iotdb.db.protocol.client.ConfigNodeClient; import org.apache.iotdb.db.protocol.client.ConfigNodeClientManager; import org.apache.iotdb.db.protocol.client.ConfigNodeInfo; @@ -77,7 +78,8 @@ public static synchronized void launchSubscriptionTopicAgent() throws StartupExc byteBuffer -> { final TopicMeta topicMeta = TopicMeta.deserialize(byteBuffer); LOGGER.info( - "Pulled topic meta from config node: {}, recovering ...", + DataNodePipeMessages + .PIPE_LOG_PULLED_TOPIC_META_FROM_CONFIG_NODE_RECOVERING_5C4B1AEE, topicMeta); return topicMeta; }) @@ -91,7 +93,8 @@ public static synchronized void launchSubscriptionTopicAgent() throws StartupExc } catch (final SubscriptionException | ClientManagerException | TException e) { retry++; LOGGER.warn( - "Failed to get topic meta from config node for {} times, will retry at most {} times.", + DataNodePipeMessages + .PIPE_LOG_FAILED_TO_GET_TOPIC_META_FROM_CONFIG_NODE_FOR_TIMES_WILL_E8D0B7F8, retry, MAX_RETRY_TIMES, e); @@ -100,7 +103,8 @@ public static synchronized void launchSubscriptionTopicAgent() throws StartupExc retry * SubscriptionConfig.getInstance().getSubscriptionLaunchRetryIntervalMs()); } catch (final InterruptedException interruptedException) { LOGGER.info( - "Interrupted while sleeping, will retry to get topic meta from config node.", + DataNodePipeMessages + .PIPE_LOG_INTERRUPTED_WHILE_SLEEPING_WILL_RETRY_TO_GET_TOPIC_META_976E4BE2, interruptedException); Thread.currentThread().interrupt(); } @@ -136,7 +140,8 @@ public static synchronized void launchSubscriptionConsumerAgent() throws Startup final ConsumerGroupMeta consumerGroupMeta = ConsumerGroupMeta.deserialize(byteBuffer); LOGGER.info( - "Pulled consumer group meta from config node: {}, recovering ...", + DataNodePipeMessages + .PIPE_LOG_PULLED_CONSUMER_GROUP_META_FROM_CONFIG_NODE_RECOVERING_A85B948F, consumerGroupMeta); return consumerGroupMeta; }) @@ -150,7 +155,8 @@ public static synchronized void launchSubscriptionConsumerAgent() throws Startup } catch (final SubscriptionException | ClientManagerException | TException e) { retry++; LOGGER.warn( - "Failed to get consumer group meta from config node for {} times, will retry at most {} times.", + DataNodePipeMessages + .PIPE_LOG_FAILED_TO_GET_CONSUMER_GROUP_META_FROM_CONFIG_NODE_FOR_TIMES_3E4C727C, retry, MAX_RETRY_TIMES, e); @@ -159,7 +165,8 @@ public static synchronized void launchSubscriptionConsumerAgent() throws Startup retry * SubscriptionConfig.getInstance().getSubscriptionLaunchRetryIntervalMs()); } catch (final InterruptedException interruptedException) { LOGGER.info( - "Interrupted while sleeping, will retry to get consumer group meta from config node.", + DataNodePipeMessages + .PIPE_LOG_INTERRUPTED_WHILE_SLEEPING_WILL_RETRY_TO_GET_CONSUMER_GROUP_7E161F39, interruptedException); Thread.currentThread().interrupt(); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/agent/SubscriptionBrokerAgent.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/agent/SubscriptionBrokerAgent.java index e177f02746ab3..74ce775122c5d 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/agent/SubscriptionBrokerAgent.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/agent/SubscriptionBrokerAgent.java @@ -28,6 +28,7 @@ import org.apache.iotdb.db.conf.IoTDBDescriptor; import org.apache.iotdb.db.consensus.DataRegionConsensusImpl; import org.apache.iotdb.db.i18n.DataNodeMiscMessages; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; import org.apache.iotdb.db.subscription.broker.ConsensusSubscriptionBroker; import org.apache.iotdb.db.subscription.broker.ISubscriptionBroker; import org.apache.iotdb.db.subscription.broker.SubscriptionBroker; @@ -259,7 +260,8 @@ private RegionProgress getConsensusCommittedRegionProgress( consumerGroupId, topicName, ConsensusGroupId.Factory.createFromString(regionId)); } catch (final IllegalArgumentException e) { LOGGER.warn( - "Subscription: failed to parse consensus region id {} for committed progress, topic={}, consumerGroup={}", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_FAILED_TO_PARSE_CONSENSUS_REGION_ID_FOR_COMMITTED_9F1A50EB, regionId, topicName, consumerGroupId, @@ -356,8 +358,8 @@ private ConsensusSubscriptionBroker getConsensusBrokerForSeekOrNoOp( } LOGGER.info( - "Subscription: consensus {} is a no-op on this DataNode because no local queue exists, " - + "consumerGroup={}, topic={}", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_CONSENSUS_IS_A_NO_OP_ON_THIS_DATANODE_BECAUSE_28F7E92B, operation, consumerGroupId, topicName); @@ -641,7 +643,8 @@ public void bindConsensusPrefetchingQueue( public void refreshConsensusQueueOrderMode(final String topicName, final String orderMode) { LOGGER.info( - "SubscriptionBrokerAgent: refreshing consensus queue order-mode for topic [{}] to [{}]", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTIONBROKERAGENT_REFRESHING_CONSENSUS_QUEUE_ORDER_1886704D, topicName, orderMode); for (final ConsensusSubscriptionBroker broker : getBrokers(ConsensusSubscriptionBroker.class)) { @@ -654,7 +657,8 @@ public void unbindConsensusPrefetchingQueue( final ConsensusSubscriptionBroker broker = getConsensusBroker(consumerGroupId); if (Objects.isNull(broker)) { LOGGER.warn( - "Subscription: consensus broker bound to consumer group [{}] does not exist", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_CONSENSUS_BROKER_BOUND_TO_CONSUMER_GROUP_DOES_E46FCDD9, consumerGroupId); return; } @@ -670,7 +674,8 @@ public void unbindByRegion(final ConsensusGroupId regionId) { if (totalClosed > 0) { prefetchingQueueCount.invalidate(); LOGGER.info( - "Subscription: unbound {} consensus prefetching queue(s) for removed region [{}]", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_UNBOUND_CONSENSUS_PREFETCHING_QUEUE_S_FOR_REMOVED_AC018742, totalClosed, regionId); } @@ -683,7 +688,10 @@ public void unbindByRegion(final ConsensusGroupId regionId) { */ public void setActiveForRegion(final ConsensusGroupId regionId, final boolean active) { LOGGER.info( - "SubscriptionBrokerAgent: setActiveForRegion regionId={}, active={}", regionId, active); + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTIONBROKERAGENT_SETACTIVEFORREGION_REGIONID_ACTIVE_4AC3A2CB, + regionId, + active); for (final ConsensusSubscriptionBroker broker : getBrokers(ConsensusSubscriptionBroker.class)) { broker.setActiveForRegion(regionId, active); } @@ -692,7 +700,8 @@ public void setActiveForRegion(final ConsensusGroupId regionId, final boolean ac public void setActiveWritersForRegion( final ConsensusGroupId regionId, final Set activeWriterNodeIds) { LOGGER.info( - "SubscriptionBrokerAgent: setActiveWritersForRegion regionId={}, activeWriterNodeIds={}", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTIONBROKERAGENT_SETACTIVEWRITERSFORREGION_REGIONID_48B39B3E, regionId, activeWriterNodeIds); for (final ConsensusSubscriptionBroker broker : getBrokers(ConsensusSubscriptionBroker.class)) { @@ -703,7 +712,8 @@ public void setActiveWritersForRegion( public void applyRuntimeStateForRegion( final ConsensusGroupId regionId, final ConsensusRegionRuntimeState runtimeState) { LOGGER.info( - "SubscriptionBrokerAgent: applyRuntimeStateForRegion regionId={}, runtimeState={}", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTIONBROKERAGENT_APPLYRUNTIMESTATEFORREGION_REGIONID_6D8C37A1, regionId, runtimeState); for (final ConsensusSubscriptionBroker broker : getBrokers(ConsensusSubscriptionBroker.class)) { @@ -721,7 +731,9 @@ public void updateCompletedTopicNames(final String consumerGroupId, final String final SubscriptionBroker pipeBroker = getPipeBroker(consumerGroupId); if (Objects.isNull(pipeBroker)) { LOGGER.warn( - "Subscription: pipe broker bound to consumer group [{}] does not exist", consumerGroupId); + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_PIPE_BROKER_BOUND_TO_CONSUMER_GROUP_DOES_NOT_E9B60B22, + consumerGroupId); return; } pipeBroker.updateCompletedTopicNames(topicName); @@ -731,7 +743,9 @@ public void unbindPrefetchingQueue(final String consumerGroupId, final String to final ISubscriptionBroker broker = getBrokerForTopic(consumerGroupId, topicName); if (Objects.isNull(broker)) { LOGGER.warn( - "Subscription: broker bound to consumer group [{}] does not exist", consumerGroupId); + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_BROKER_BOUND_TO_CONSUMER_GROUP_DOES_NOT_EXIST_74CAD5BE, + consumerGroupId); return; } broker.unbind(topicName); @@ -742,7 +756,9 @@ public void removePrefetchingQueue(final String consumerGroupId, final String to final ISubscriptionBroker broker = getBrokerForTopic(consumerGroupId, topicName); if (Objects.isNull(broker)) { LOGGER.warn( - "Subscription: broker bound to consumer group [{}] does not exist", consumerGroupId); + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_BROKER_BOUND_TO_CONSUMER_GROUP_DOES_NOT_EXIST_74CAD5BE, + consumerGroupId); return; } broker.removeQueue(topicName); @@ -757,7 +773,8 @@ public boolean executePrefetch(final String consumerGroupId, final String topicN .ifPresent( l -> l.warn( - "Subscription: broker bound to consumer group [{}] does not exist", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_BROKER_BOUND_TO_CONSUMER_GROUP_DOES_NOT_EXIST_74CAD5BE, consumerGroupId)); return false; } @@ -768,7 +785,9 @@ public int getPipeEventCount(final String consumerGroupId, final String topicNam final ISubscriptionBroker broker = getBrokerForTopic(consumerGroupId, topicName); if (Objects.isNull(broker)) { LOGGER.warn( - "Subscription: broker bound to consumer group [{}] does not exist", consumerGroupId); + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_BROKER_BOUND_TO_CONSUMER_GROUP_DOES_NOT_EXIST_74CAD5BE, + consumerGroupId); return 0; } return broker.getEventCount(topicName); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/agent/SubscriptionConsumerAgent.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/agent/SubscriptionConsumerAgent.java index c3bc2a0922195..f0ca419fd294e 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/agent/SubscriptionConsumerAgent.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/agent/SubscriptionConsumerAgent.java @@ -22,6 +22,7 @@ import org.apache.iotdb.commons.subscription.meta.consumer.ConsumerGroupMeta; import org.apache.iotdb.commons.subscription.meta.consumer.ConsumerGroupMetaKeeper; import org.apache.iotdb.db.i18n.DataNodeMiscMessages; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; import org.apache.iotdb.db.subscription.broker.consensus.ConsensusSubscriptionSetupHandler; import org.apache.iotdb.mpp.rpc.thrift.TPushConsumerGroupMetaRespExceptionMessage; import org.apache.iotdb.rpc.subscription.exception.SubscriptionException; @@ -77,7 +78,8 @@ public TPushConsumerGroupMetaRespExceptionMessage handleSingleConsumerGroupMetaC } catch (final Exception e) { final String consumerGroupId = consumerGroupMetaFromCoordinator.getConsumerGroupId(); LOGGER.warn( - "Exception occurred when handling single consumer group meta changes for consumer group {}", + DataNodePipeMessages + .PIPE_LOG_EXCEPTION_OCCURRED_WHEN_HANDLING_SINGLE_CONSUMER_GROUP_META_10E7688C, consumerGroupId, e); final String exceptionMessage = @@ -109,7 +111,8 @@ private void handleSingleConsumerGroupMetaChangesInternal( if (metaInAgent.getCreationTime() != metaFromCoordinator.getCreationTime()) { if (SubscriptionAgent.broker().isBrokerExist(consumerGroupId)) { LOGGER.warn( - "Subscription: broker bound to consumer group [{}] has already existed when the creation time of consumer group meta on local agent {} is inconsistent with meta from coordinator {}, drop it", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_BROKER_BOUND_TO_CONSUMER_GROUP_HAS_ALREADY_0F37997F, consumerGroupId, metaInAgent, metaFromCoordinator); @@ -154,8 +157,8 @@ private void handleSingleConsumerGroupMetaChangesInternal( ConsumerGroupMeta.getTopicsNewlySubByGroup(metaInAgent, metaFromCoordinator); LOGGER.info( - "Subscription: consumer group [{}] meta change detected, " - + "topicsUnsubByGroup={}, newlySubscribedTopics={}", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_CONSUMER_GROUP_META_CHANGE_DETECTED_TOPICSUNSUBBYGROUP_F6DAF20A, consumerGroupId, topicsUnsubByGroup, newlySubscribedTopics); @@ -184,7 +187,8 @@ public TPushConsumerGroupMetaRespExceptionMessage handleConsumerGroupMetaChanges } catch (final Exception e) { final String consumerGroupId = consumerGroupMetaFromCoordinator.getConsumerGroupId(); LOGGER.warn( - "Exception occurred when handling single consumer group meta changes for consumer group {}", + DataNodePipeMessages + .PIPE_LOG_EXCEPTION_OCCURRED_WHEN_HANDLING_SINGLE_CONSUMER_GROUP_META_10E7688C, consumerGroupId, e); final String exceptionMessage = @@ -229,7 +233,8 @@ private void handleDropConsumerGroupInternal(final String consumerGroupId) { } } else { LOGGER.warn( - "Subscription: broker bound to consumer group [{}] does not existed when the corresponding consumer group meta has already existed on local agent, ignore it", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_BROKER_BOUND_TO_CONSUMER_GROUP_DOES_NOT_EXISTED_9F09E4DE, consumerGroupId); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/agent/SubscriptionReceiverAgent.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/agent/SubscriptionReceiverAgent.java index 200728fe203e6..4b26a5668374a 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/agent/SubscriptionReceiverAgent.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/agent/SubscriptionReceiverAgent.java @@ -23,6 +23,7 @@ import org.apache.iotdb.commons.concurrent.IoTDBThreadPoolFactory; import org.apache.iotdb.commons.concurrent.threadpool.ScheduledExecutorUtil; import org.apache.iotdb.commons.subscription.config.SubscriptionConfig; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; import org.apache.iotdb.db.subscription.receiver.SubscriptionReceiver; import org.apache.iotdb.db.subscription.receiver.SubscriptionReceiverV1; import org.apache.iotdb.rpc.RpcUtils; @@ -93,7 +94,9 @@ public TPipeSubscribeResp handle(final TPipeSubscribeReq req) { TSStatusCode.SUBSCRIPTION_VERSION_ERROR, String.format("Unknown PipeSubscribeRequestVersion %s.", reqVersion)); LOGGER.warn( - "Subscription: Unknown PipeSubscribeRequestVersion, response status = {}.", status); + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_UNKNOWN_PIPESUBSCRIBEREQUESTVERSION_RESPONSE_56E5D93F, + status); return new TPipeSubscribeResp( status, PipeSubscribeResponseVersion.VERSION_1.getVersion(), @@ -121,8 +124,8 @@ private SubscriptionReceiver getReceiver(final byte reqVersion) { final byte receiverThreadLocalVersion = receiverThreadLocal.get().getVersion().getVersion(); if (receiverThreadLocalVersion != reqVersion) { LOGGER.warn( - "The subscription request version {} is different from the client request version {}," - + " the receiver will be reset to the client request version.", + DataNodePipeMessages + .PIPE_LOG_THE_SUBSCRIPTION_REQUEST_VERSION_IS_DIFFERENT_FROM_THE_CLIENT_324A125F, receiverThreadLocalVersion, reqVersion); receiverThreadLocal.remove(); @@ -137,7 +140,10 @@ private SubscriptionReceiver setAndGetReceiver(final byte reqVersion) { receiverThreadLocal.set(RECEIVER_CONSTRUCTORS.get(reqVersion).get()); } else { throw new UnsupportedOperationException( - String.format("Unsupported subscription request version %d", reqVersion)); + String.format( + DataNodePipeMessages + .PIPE_EXCEPTION_UNSUPPORTED_SUBSCRIPTION_REQUEST_VERSION_D_1E7C211A, + reqVersion)); } return receiverThreadLocal.get(); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/agent/SubscriptionTopicAgent.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/agent/SubscriptionTopicAgent.java index e89578fe556e6..9f8e7944df5c0 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/agent/SubscriptionTopicAgent.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/agent/SubscriptionTopicAgent.java @@ -22,6 +22,7 @@ import org.apache.iotdb.commons.subscription.meta.topic.TopicMeta; import org.apache.iotdb.commons.subscription.meta.topic.TopicMetaKeeper; import org.apache.iotdb.db.i18n.DataNodeMiscMessages; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; import org.apache.iotdb.mpp.rpc.thrift.TPushTopicMetaRespExceptionMessage; import org.apache.iotdb.rpc.subscription.config.TopicConfig; import org.apache.iotdb.rpc.subscription.config.TopicConstant; @@ -73,7 +74,10 @@ public TPushTopicMetaRespExceptionMessage handleSingleTopicMetaChanges( } catch (final Exception e) { final String topicName = topicMetaFromCoordinator.getTopicName(); LOGGER.warn( - "Exception occurred when handling single topic meta changes for topic {}", topicName, e); + DataNodePipeMessages + .PIPE_LOG_EXCEPTION_OCCURRED_WHEN_HANDLING_SINGLE_TOPIC_META_CHANGES_43434FC4, + topicName, + e); final String exceptionMessage = String.format( "Subscription: Failed to handle single topic meta changes for topic %s, because %s", @@ -103,7 +107,8 @@ public TPushTopicMetaRespExceptionMessage handleTopicMetaChanges( } catch (final Exception e) { final String topicName = topicMetaFromCoordinator.getTopicName(); LOGGER.warn( - "Exception occurred when handling single topic meta changes for topic {}", + DataNodePipeMessages + .PIPE_LOG_EXCEPTION_OCCURRED_WHEN_HANDLING_SINGLE_TOPIC_META_CHANGES_43434FC4, topicName, e); final String exceptionMessage = diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/ConsensusSubscriptionBroker.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/ConsensusSubscriptionBroker.java index 9eb3d5719c704..e089a8426d3ce 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/ConsensusSubscriptionBroker.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/ConsensusSubscriptionBroker.java @@ -23,6 +23,7 @@ import org.apache.iotdb.commons.subscription.config.SubscriptionConfig; import org.apache.iotdb.consensus.iot.IoTConsensusServerImpl; import org.apache.iotdb.consensus.iot.SubscriptionWalRetentionPolicy; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; import org.apache.iotdb.db.subscription.broker.consensus.ConsensusLogToTabletConverter; import org.apache.iotdb.db.subscription.broker.consensus.ConsensusPrefetchingQueue; import org.apache.iotdb.db.subscription.broker.consensus.ConsensusRegionRuntimeState; @@ -112,8 +113,8 @@ public List poll( final long maxBytes, final Map progressByTopic) { LOGGER.debug( - "ConsensusSubscriptionBroker [{}]: poll called, consumerId={}, topicNames={}, " - + "queueCount={}, maxBytes={}", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSSUBSCRIPTIONBROKER_POLL_CALLED_CONSUMERID_TOPICNAMES_5F1F5175, brokerId, consumerId, topicNames, @@ -191,7 +192,8 @@ public List poll( } LOGGER.debug( - "ConsensusSubscriptionBroker [{}]: poll result, consumerId={}, eventsPolled={}, eventsNacked={}", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSSUBSCRIPTIONBROKER_POLL_RESULT_CONSUMERID_EVENTSPOLLED_06412726, brokerId, consumerId, eventsToPoll.size(), @@ -236,7 +238,8 @@ public List commit( topicNameToConsensusPrefetchingQueues.get(topicName); if (Objects.isNull(queues) || queues.isEmpty()) { LOGGER.warn( - "ConsensusSubscriptionBroker [{}]: no queues for topic [{}] to commit", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSSUBSCRIPTIONBROKER_NO_QUEUES_FOR_TOPIC_TO_COMMIT_7D8CC39D, brokerId, topicName); continue; @@ -259,7 +262,8 @@ public List commit( } if (!handled) { LOGGER.warn( - "ConsensusSubscriptionBroker [{}]: commit context {} not found in any of {} region queue(s) for topic [{}]", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSSUBSCRIPTIONBROKER_COMMIT_CONTEXT_NOT_FOUND_IN_46DF62A6, brokerId, commitContext, queues.size(), @@ -317,7 +321,8 @@ public void seek(final String topicName, final short seekType) { topicNameToConsensusPrefetchingQueues.get(topicName); if (Objects.isNull(queues) || queues.isEmpty()) { LOGGER.warn( - "ConsensusSubscriptionBroker [{}]: no queues for topic [{}] to seek", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSSUBSCRIPTIONBROKER_NO_QUEUES_FOR_TOPIC_TO_SEEK_6307A90D, brokerId, topicName); return; @@ -336,7 +341,8 @@ public void seek(final String topicName, final short seekType) { break; default: LOGGER.warn( - "ConsensusSubscriptionBroker [{}]: unsupported seekType {} for topic [{}]", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSSUBSCRIPTIONBROKER_UNSUPPORTED_SEEKTYPE_FOR_TOPIC_EDCA2CF2, brokerId, seekType, topicName); @@ -352,7 +358,8 @@ public void seek(final String topicName, final TopicProgress topicProgress) { topicNameToConsensusPrefetchingQueues.get(topicName); if (Objects.isNull(queues) || queues.isEmpty()) { LOGGER.warn( - "ConsensusSubscriptionBroker [{}]: no queues for topic [{}] to seek(topicProgress)", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSSUBSCRIPTIONBROKER_NO_QUEUES_FOR_TOPIC_TO_SEEK_9AC3890C, brokerId, topicName); return; @@ -374,7 +381,8 @@ public void seekAfter(final String topicName, final TopicProgress topicProgress) topicNameToConsensusPrefetchingQueues.get(topicName); if (Objects.isNull(queues) || queues.isEmpty()) { LOGGER.warn( - "ConsensusSubscriptionBroker [{}]: no queues for topic [{}] to seekAfter(topicProgress)", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSSUBSCRIPTIONBROKER_NO_QUEUES_FOR_TOPIC_TO_SEEKAFTER_C6D87BFD, brokerId, topicName); return; @@ -477,7 +485,8 @@ private TopicOwnershipSnapshot refreshAndGetTopicOwnership( TopicOwnershipSnapshot.create(sortedConsumers, activeRegionIds); topicOwnershipSnapshots.put(topicName, refreshedSnapshot); LOGGER.debug( - "ConsensusSubscriptionBroker [{}]: refreshed ownership for topic [{}], consumers={}, regions={}, generation={}", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSSUBSCRIPTIONBROKER_REFRESHED_OWNERSHIP_FOR_TOPIC_EB11CF64, brokerId, topicName, sortedConsumers, @@ -526,7 +535,8 @@ private List buildPollOrderForAssignedQueues( orderedQueues.add(pollQueues.get((startOffset + i) % pollQueues.size())); } LOGGER.debug( - "ConsensusSubscriptionBroker [{}]: stable ownership poll order for topic [{}], assignedQueueCount={}", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSSUBSCRIPTIONBROKER_STABLE_OWNERSHIP_POLL_ORDER_D40BB7D4, brokerId, topicName, orderedQueues.size()); @@ -582,8 +592,8 @@ public void bindConsensusPrefetchingQueue( for (final ConsensusPrefetchingQueue existing : queues) { if (consensusGroupId.equals(existing.getConsensusGroupId()) && !existing.isClosed()) { LOGGER.info( - "Subscription: consensus prefetching queue for topic [{}], region [{}] " - + "in consumer group [{}] already exists, skipping", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_CONSENSUS_PREFETCHING_QUEUE_FOR_TOPIC_REGION_B40792D9, topicName, consensusGroupId, brokerId); @@ -608,9 +618,8 @@ public void bindConsensusPrefetchingQueue( initialActive); queues.add(consensusQueue); LOGGER.info( - "Subscription: create consensus prefetching queue bound to topic [{}] for consumer group [{}], " - + "consensusGroupId={}, fallbackCommittedRegionProgress={}, " - + "tailStartSearchIndex={}, initialRuntimeVersion={}, initialActive={}, totalRegionQueues={}", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_CREATE_CONSENSUS_PREFETCHING_QUEUE_BOUND_TO_0DBFC05E, topicName, brokerId, consensusGroupId, @@ -670,8 +679,8 @@ public int unbindByRegion(final ConsensusGroupId regionId) { for (int i = 0; i < queuesToClose.size(); i++) { queuesToClose.get(i).close(); LOGGER.info( - "Subscription: closed consensus prefetching queue for topic [{}] region [{}] " - + "in consumer group [{}] due to region removal", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_CLOSED_CONSENSUS_PREFETCHING_QUEUE_FOR_TOPIC_3A9DDEC5, topicNamesToLog.get(i), regionId, brokerId); @@ -738,7 +747,8 @@ public void removeQueue(final String topicName) { topicNameToConsensusPrefetchingQueues.get(topicName); if (Objects.nonNull(queues) && !queues.isEmpty()) { LOGGER.info( - "Subscription: consensus prefetching queue(s) bound to topic [{}] for consumer group [{}] still exist, unbind before closing", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_CONSENSUS_PREFETCHING_QUEUE_S_BOUND_TO_TOPIC_AB10ED07, topicName, brokerId); } @@ -754,7 +764,8 @@ private void closeAndRemoveConsensusPrefetchingQueues( if (Objects.isNull(queues) || queues.isEmpty()) { if (warnIfMissing) { LOGGER.warn( - "Subscription: consensus prefetching queues bound to topic [{}] for consumer group [{}] do not exist", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_CONSENSUS_PREFETCHING_QUEUES_BOUND_TO_TOPIC_63B37089, topicName, brokerId); } @@ -769,7 +780,8 @@ private void closeAndRemoveConsensusPrefetchingQueues( q.close(); } LOGGER.info( - "Subscription: drop all {} consensus prefetching queue(s) bound to topic [{}] for consumer group [{}]", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_DROP_ALL_CONSENSUS_PREFETCHING_QUEUE_S_BOUND_FCC1B2C4, queuesToClose.size(), topicName, brokerId); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/SubscriptionBroker.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/SubscriptionBroker.java index eb61016be03a1..dac6bc5261c0b 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/SubscriptionBroker.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/SubscriptionBroker.java @@ -21,6 +21,7 @@ import org.apache.iotdb.commons.pipe.agent.task.connection.UnboundedBlockingPendingQueue; import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; import org.apache.iotdb.db.pipe.agent.PipeDataNodeAgent; import org.apache.iotdb.db.subscription.agent.SubscriptionAgent; import org.apache.iotdb.db.subscription.broker.consensus.ConsensusSubscriptionSetupHandler; @@ -206,7 +207,8 @@ private Set prepareCandidateTopicNames( if (Objects.isNull(prefetchingQueue)) { if (completedTopicNames.containsKey(topicName)) { LOGGER.info( - "Subscription: prefetching queue bound to topic [{}] for consumer group [{}] is completed, return termination response to client", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_PREFETCHING_QUEUE_BOUND_TO_TOPIC_FOR_CONSUMER_ECB64624, topicName, brokerId); // Add a termination event for the completed topic @@ -237,7 +239,8 @@ private Set prepareCandidateTopicNames( .ifPresent( l -> l.warn( - "Subscription: prefetching queue bound to topic [{}] for consumer group [{}] is closed", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_PREFETCHING_QUEUE_BOUND_TO_TOPIC_FOR_CONSUMER_EA7D450B, topicName, brokerId)); continue; @@ -274,7 +277,8 @@ public List pollTsFile( } if (prefetchingQueue.isClosed()) { LOGGER.warn( - "Subscription: prefetching queue bound to topic [{}] for consumer group [{}] is closed", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_PREFETCHING_QUEUE_BOUND_TO_TOPIC_FOR_CONSUMER_EA7D450B, topicName, brokerId); return Collections.emptyList(); @@ -313,7 +317,8 @@ public List pollTablets( } if (prefetchingQueue.isClosed()) { LOGGER.warn( - "Subscription: prefetching queue bound to topic [{}] for consumer group [{}] is closed", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_PREFETCHING_QUEUE_BOUND_TO_TOPIC_FOR_CONSUMER_EA7D450B, topicName, brokerId); return Collections.emptyList(); @@ -343,14 +348,16 @@ public List commit( topicNameToPrefetchingQueue.get(topicName); if (Objects.isNull(prefetchingQueue)) { LOGGER.warn( - "Subscription: prefetching queue bound to topic [{}] for consumer group [{}] does not exist", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_PREFETCHING_QUEUE_BOUND_TO_TOPIC_FOR_CONSUMER_12E69B65, topicName, brokerId); continue; } if (prefetchingQueue.isClosed()) { LOGGER.warn( - "Subscription: prefetching queue bound to topic [{}] for consumer group [{}] is closed", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_PREFETCHING_QUEUE_BOUND_TO_TOPIC_FOR_CONSUMER_EA7D450B, topicName, brokerId); continue; @@ -406,7 +413,8 @@ public List fetchTopicNamesToUnsubscribe(final Set topicNames) { // If there is no prefetching queue for the topic, check if it's completed if (Objects.isNull(prefetchingQueue) && completedTopicNames.containsKey(topicName)) { LOGGER.info( - "Subscription: prefetching queue bound to topic [{}] for consumer group [{}] is completed, reply to client heartbeat request", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_PREFETCHING_QUEUE_BOUND_TO_TOPIC_FOR_CONSUMER_8F561EB2, topicName, brokerId); topicNamesToUnsubscribe.add(topicName); @@ -422,7 +430,8 @@ public void bindPrefetchingQueue( final String topicName, final UnboundedBlockingPendingQueue inputPendingQueue) { if (Objects.nonNull(topicNameToPrefetchingQueue.get(topicName))) { LOGGER.warn( - "Subscription: prefetching queue bound to topic [{}] for consumer group [{}] has already existed", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_PREFETCHING_QUEUE_BOUND_TO_TOPIC_FOR_CONSUMER_C2735402, topicName, brokerId); return; @@ -447,7 +456,8 @@ public void bindPrefetchingQueue( SubscriptionPrefetchingQueueMetrics.getInstance().register(prefetchingQueue); topicNameToPrefetchingQueue.put(topicName, prefetchingQueue); LOGGER.info( - "Subscription: create prefetching queue bound to topic [{}] for consumer group [{}]", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_CREATE_PREFETCHING_QUEUE_BOUND_TO_TOPIC_FOR_E7F21F1E, topicName, brokerId); } @@ -466,7 +476,8 @@ public void unbindPrefetchingQueue(final String topicName) { topicNameToPrefetchingQueue.get(topicName); if (Objects.isNull(prefetchingQueue)) { LOGGER.warn( - "Subscription: prefetching queue bound to topic [{}] for consumer group [{}] does not exist", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_PREFETCHING_QUEUE_BOUND_TO_TOPIC_FOR_CONSUMER_12E69B65, topicName, brokerId); return; @@ -491,7 +502,8 @@ public void unbindPrefetchingQueue(final String topicName) { // remove prefetching queue topicNameToPrefetchingQueue.remove(topicName); LOGGER.info( - "Subscription: drop prefetching queue bound to topic [{}] for consumer group [{}]", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_DROP_PREFETCHING_QUEUE_BOUND_TO_TOPIC_FOR_CONSUMER_21F313CB, topicName, brokerId); } @@ -511,7 +523,8 @@ public void removePrefetchingQueue(final String topicName) { topicNameToPrefetchingQueue.get(topicName); if (Objects.nonNull(prefetchingQueue)) { LOGGER.info( - "Subscription: prefetching queue bound to topic [{}] for consumer group [{}] still exists, unbind it before closing", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_PREFETCHING_QUEUE_BOUND_TO_TOPIC_FOR_CONSUMER_03B89C51, topicName, brokerId); // TODO: consider more robust metadata semantics @@ -532,7 +545,8 @@ public boolean executePrefetch(final String topicName) { .ifPresent( l -> l.warn( - "Subscription: prefetching queue bound to topic [{}] for consumer group [{}] does not exist", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_PREFETCHING_QUEUE_BOUND_TO_TOPIC_FOR_CONSUMER_12E69B65, topicName, brokerId)); return false; @@ -543,7 +557,8 @@ public boolean executePrefetch(final String topicName) { .ifPresent( l -> l.warn( - "Subscription: prefetching queue bound to topic [{}] for consumer group [{}] is closed", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_PREFETCHING_QUEUE_BOUND_TO_TOPIC_FOR_CONSUMER_EA7D450B, topicName, brokerId)); return false; @@ -565,14 +580,16 @@ public int getPipeEventCount(final String topicName) { topicNameToPrefetchingQueue.get(topicName); if (Objects.isNull(prefetchingQueue)) { LOGGER.warn( - "Subscription: prefetching queue bound to topic [{}] for consumer group [{}] does not exist", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_PREFETCHING_QUEUE_BOUND_TO_TOPIC_FOR_CONSUMER_12E69B65, topicName, brokerId); return 0; } if (prefetchingQueue.isClosed()) { LOGGER.warn( - "Subscription: prefetching queue bound to topic [{}] for consumer group [{}] is closed", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_PREFETCHING_QUEUE_BOUND_TO_TOPIC_FOR_CONSUMER_EA7D450B, topicName, brokerId); return 0; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/SubscriptionPrefetchingQueue.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/SubscriptionPrefetchingQueue.java index 086fde0fbcc9e..1950eafa8f85a 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/SubscriptionPrefetchingQueue.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/SubscriptionPrefetchingQueue.java @@ -24,6 +24,7 @@ import org.apache.iotdb.commons.subscription.config.SubscriptionConfig; import org.apache.iotdb.db.conf.IoTDBDescriptor; import org.apache.iotdb.db.i18n.DataNodeMiscMessages; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; import org.apache.iotdb.db.pipe.agent.PipeDataNodeAgent; import org.apache.iotdb.db.pipe.agent.task.connection.PipeEventCollector; import org.apache.iotdb.db.pipe.agent.task.execution.PipeSubtaskExecutorManager; @@ -249,7 +250,8 @@ private SubscriptionEvent pollInternal(final String consumerId) { TimeUnit.MILLISECONDS))) { if (event.isCommitted()) { LOGGER.warn( - "Subscription: SubscriptionPrefetchingQueue {} poll committed event {} from prefetching queue (broken invariant), remove it", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_SUBSCRIPTIONPREFETCHINGQUEUE_POLL_COMMITTED_8684FF17, this, event); // no need to update inFlightEvents @@ -258,7 +260,8 @@ private SubscriptionEvent pollInternal(final String consumerId) { if (!event.pollable()) { LOGGER.warn( - "Subscription: SubscriptionPrefetchingQueue {} poll non-pollable event {} from prefetching queue (broken invariant), nack and remove it", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_SUBSCRIPTIONPREFETCHINGQUEUE_POLL_NON_POLLABLE_644D5D6B, this, event); event.nack(); // now pollable @@ -277,7 +280,8 @@ private SubscriptionEvent pollInternal(final String consumerId) { } catch (final InterruptedException e) { Thread.currentThread().interrupt(); LOGGER.warn( - "Subscription: SubscriptionPrefetchingQueue {} interrupted while polling events.", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_SUBSCRIPTIONPREFETCHINGQUEUE_INTERRUPTED_WHILE_F8923826, this, e); } @@ -318,7 +322,8 @@ private SubscriptionEvent pollInternalV2(final String consumerId, final PollTime TimeUnit.MILLISECONDS))) { if (event.isCommitted()) { LOGGER.warn( - "Subscription: SubscriptionPrefetchingQueue {} poll committed event {} from prefetching queue (broken invariant), remove it", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_SUBSCRIPTIONPREFETCHINGQUEUE_POLL_COMMITTED_8684FF17, this, event); // no need to update inFlightEvents @@ -327,7 +332,8 @@ private SubscriptionEvent pollInternalV2(final String consumerId, final PollTime if (!event.pollable()) { LOGGER.warn( - "Subscription: SubscriptionPrefetchingQueue {} poll non-pollable event {} from prefetching queue (broken invariant), nack and remove it", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_SUBSCRIPTIONPREFETCHINGQUEUE_POLL_NON_POLLABLE_644D5D6B, this, event); event.nack(); // now pollable @@ -346,7 +352,8 @@ private SubscriptionEvent pollInternalV2(final String consumerId, final PollTime } catch (final InterruptedException e) { Thread.currentThread().interrupt(); LOGGER.warn( - "Subscription: SubscriptionPrefetchingQueue {} interrupted while polling events.", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_SUBSCRIPTIONPREFETCHINGQUEUE_INTERRUPTED_WHILE_F8923826, this, e); } @@ -447,7 +454,8 @@ private synchronized void peekOnce() { final Event polledEvent = inputPendingQueue.waitedPoll(); if (!Objects.equals(peekedEvent, polledEvent)) { LOGGER.warn( - "Subscription: inconsistent heartbeat event when {} peeking (broken invariant), expected {}, actual {}, offer back", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_INCONSISTENT_HEARTBEAT_EVENT_WHEN_PEEKING_BROKEN_BFE1DF6E, this, peekedEvent, polledEvent); @@ -490,7 +498,8 @@ private synchronized void tryPrefetch() { if (!(event instanceof EnrichedEvent)) { LOGGER.warn( - "Subscription: SubscriptionPrefetchingQueue {} only support prefetch EnrichedEvent. Ignore {}.", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_SUBSCRIPTIONPREFETCHINGQUEUE_ONLY_SUPPORT_PREFETCH_F3B33B30, this, event); continue; @@ -504,7 +513,8 @@ private synchronized void tryPrefetch() { ((PipeTerminateEvent) event) .decreaseReferenceCount(SubscriptionPrefetchingQueue.class.getName(), true); LOGGER.info( - "Subscription: SubscriptionPrefetchingQueue {} commit PipeTerminateEvent {}", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_SUBSCRIPTIONPREFETCHINGQUEUE_COMMIT_PIPETERMINATEEVENT_36529DC9, this, terminateEvent); continue; @@ -535,7 +545,8 @@ private synchronized void tryPrefetch() { // - UserDefinedEnrichedEvent: ignored? // - Others: events related to meta sync, safe to ignore LOGGER.info( - "Subscription: SubscriptionPrefetchingQueue {} ignore EnrichedEvent {} when prefetching.", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_SUBSCRIPTIONPREFETCHINGQUEUE_IGNORE_ENRICHEDEVENT_95C6241C, this, event); ((EnrichedEvent) event) @@ -606,7 +617,8 @@ private synchronized void tryPrefetchV2() { if (!(event instanceof EnrichedEvent)) { LOGGER.warn( - "Subscription: SubscriptionPrefetchingQueue {} only support prefetch EnrichedEvent. Ignore {}.", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_SUBSCRIPTIONPREFETCHINGQUEUE_ONLY_SUPPORT_PREFETCH_F3B33B30, this, event); return; @@ -620,7 +632,8 @@ private synchronized void tryPrefetchV2() { ((PipeTerminateEvent) event) .decreaseReferenceCount(SubscriptionPrefetchingQueue.class.getName(), true); LOGGER.info( - "Subscription: SubscriptionPrefetchingQueue {} commit PipeTerminateEvent {}", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_SUBSCRIPTIONPREFETCHINGQUEUE_COMMIT_PIPETERMINATEEVENT_36529DC9, this, terminateEvent); return; @@ -639,7 +652,8 @@ private synchronized void tryPrefetchV2() { } if (Objects.nonNull(currentToTabletIterator)) { LOGGER.warn( - "Subscription: SubscriptionPrefetchingQueue {} prefetch TsFileInsertionEvent when ToTabletIterator is not null (broken invariant). Ignore {}.", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_SUBSCRIPTIONPREFETCHINGQUEUE_PREFETCH_TSFILEINSERTIONEVENT_19444D2C, this, event); } else { @@ -653,7 +667,8 @@ private synchronized void tryPrefetchV2() { // - UserDefinedEnrichedEvent: ignored? // - Others: events related to meta sync, safe to ignore LOGGER.info( - "Subscription: SubscriptionPrefetchingQueue {} ignore EnrichedEvent {} when prefetching.", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_SUBSCRIPTIONPREFETCHINGQUEUE_IGNORE_ENRICHEDEVENT_95C6241C, this, event); ((EnrichedEvent) event) @@ -683,7 +698,8 @@ private RetryableState onRetryableTabletInsertionEvent( if (retryableEvent.shouldIncreaseReferenceCount) { if (!event.increaseReferenceCount(this.getClass().getName())) { LOGGER.warn( - "Failed to increase reference count for {} when {} on retryable TabletInsertionEvent", + DataNodePipeMessages + .PIPE_LOG_FAILED_TO_INCREASE_REFERENCE_COUNT_FOR_WHEN_ON_RETRYABLE_4E10BE3B, event, this); currentTabletInsertionEvent = retryableEvent; @@ -705,7 +721,11 @@ private RetryableState onRetryableTabletInsertionEvent( : RetryableState.NO_RETRY; } catch (final Exception e) { LOGGER.warn( - "Exception occurred when {} on retryable TabletInsertionEvent {}", this, event, e); + DataNodePipeMessages + .PIPE_LOG_EXCEPTION_OCCURRED_WHEN_ON_RETRYABLE_TABLETINSERTIONEVENT_2350D9F7, + this, + event, + e); currentTabletInsertionEvent = retryableEvent; return RetryableState.RETRY; } @@ -791,7 +811,8 @@ private boolean ackInternal( (key, ev) -> { if (Objects.isNull(ev)) { LOGGER.warn( - "Subscription: subscription commit context {} does not exist, it may have been committed or something unexpected happened, prefetching queue: {}", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_SUBSCRIPTION_COMMIT_CONTEXT_DOES_NOT_EXIST_0E4EF990, commitContext, this); return null; @@ -799,7 +820,8 @@ private boolean ackInternal( if (ev.isCommitted()) { LOGGER.warn( - "Subscription: subscription event {} is committed, subscription commit context {}, prefetching queue: {}", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_SUBSCRIPTION_EVENT_IS_COMMITTED_SUBSCRIPTION_BEE17D7F, ev, commitContext, this); @@ -810,7 +832,8 @@ private boolean ackInternal( if (!ev.isCommittable()) { LOGGER.warn( - "Subscription: subscription event {} is not committable, subscription commit context {}, prefetching queue: {}", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_SUBSCRIPTION_EVENT_IS_NOT_COMMITTABLE_SUBSCRIPTION_8D03A10C, ev, commitContext, this); @@ -821,7 +844,8 @@ private boolean ackInternal( final String consumerGroupId = commitContext.getConsumerGroupId(); if (!Objects.equals(consumerGroupId, brokerId)) { LOGGER.warn( - "inconsistent consumer group when acking event, current: {}, incoming: {}, consumer id: {}, event commit context: {}, prefetching queue: {}, commit it anyway...", + DataNodePipeMessages + .PIPE_LOG_INCONSISTENT_CONSUMER_GROUP_WHEN_ACKING_EVENT_CURRENT_INCOMING_AEE3E90F, brokerId, consumerGroupId, consumerId, @@ -864,7 +888,8 @@ public boolean nackInternal( (key, ev) -> { if (Objects.isNull(ev)) { LOGGER.warn( - "Subscription: subscription commit context [{}] does not exist, it may have been committed or something unexpected happened, prefetching queue: {}", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_SUBSCRIPTION_COMMIT_CONTEXT_DOES_NOT_EXIST_DE907E05, commitContext, this); return null; @@ -874,7 +899,8 @@ public boolean nackInternal( final String consumerGroupId = commitContext.getConsumerGroupId(); if (!Objects.equals(consumerGroupId, brokerId)) { LOGGER.warn( - "inconsistent consumer group when nacking event, current: {}, incoming: {}, consumer id: {}, event commit context: {}, prefetching queue: {}, commit it anyway...", + DataNodePipeMessages + .PIPE_LOG_INCONSISTENT_CONSUMER_GROUP_WHEN_NACKING_EVENT_CURRENT_INCOMING_B0104C41, brokerId, consumerGroupId, consumerId, @@ -887,7 +913,8 @@ public boolean nackInternal( if (ev.isPoisoned()) { LOGGER.error( - "Subscription: poison message detected (nackCount={}), force-acking event {} in prefetching queue: {}", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_POISON_MESSAGE_DETECTED_NACKCOUNT_FORCE_ACKING_7528DD6B, ev.getNackCount(), ev, this); @@ -1067,7 +1094,8 @@ private static RemappingFunction COMBINER( ev.nack(); // now pollable (the nack operation here is actually unnecessary) if (ev.isPoisoned()) { LOGGER.error( - "Subscription: poison message detected (nackCount={}), force-acking eagerly pollable event {} in prefetching queue: {}", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_POISON_MESSAGE_DETECTED_NACKCOUNT_FORCE_ACKING_D984349C, ev.getNackCount(), ev, this); @@ -1083,7 +1111,8 @@ private static RemappingFunction COMBINER( ev.nack(); // now pollable if (ev.isPoisoned()) { LOGGER.error( - "Subscription: poison message detected (nackCount={}), force-acking pollable event {} in prefetching queue: {}", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_POISON_MESSAGE_DETECTED_NACKCOUNT_FORCE_ACKING_FEF0F0BF, ev.getNackCount(), ev, this); @@ -1094,7 +1123,8 @@ private static RemappingFunction COMBINER( } prefetchEvent(ev); LOGGER.warn( - "Subscription: SubscriptionPrefetchingQueue {} recycle event {} from in flight events, nack and enqueue it to prefetching queue", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_SUBSCRIPTIONPREFETCHINGQUEUE_RECYCLE_EVENT_7B120BC3, this, ev); return null; // remove this entry diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/SubscriptionPrefetchingTabletQueue.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/SubscriptionPrefetchingTabletQueue.java index cc11e7b03d8d3..86b45ff658733 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/SubscriptionPrefetchingTabletQueue.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/SubscriptionPrefetchingTabletQueue.java @@ -22,6 +22,7 @@ import org.apache.iotdb.commons.pipe.event.EnrichedEvent; import org.apache.iotdb.commons.subscription.config.SubscriptionConfig; import org.apache.iotdb.db.i18n.DataNodeMiscMessages; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; import org.apache.iotdb.db.subscription.agent.SubscriptionAgent; import org.apache.iotdb.db.subscription.event.SubscriptionEvent; import org.apache.iotdb.pipe.api.event.dml.insertion.TsFileInsertionEvent; @@ -80,7 +81,8 @@ private SubscriptionEvent pollTabletsInternal( if (Objects.isNull(ev)) { if (isCommitContextOutdated(commitContext)) { LOGGER.warn( - "SubscriptionPrefetchingTabletQueue {} detected outdated poll request, consumer {}, commit context {}, offset {}", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTIONPREFETCHINGTABLETQUEUE_DETECTED_OUTDATED_POLL_C0001CCF, this, consumerId, commitContext, diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/SubscriptionPrefetchingTsFileQueue.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/SubscriptionPrefetchingTsFileQueue.java index ec02700ffdcfb..0972f5f8303a8 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/SubscriptionPrefetchingTsFileQueue.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/SubscriptionPrefetchingTsFileQueue.java @@ -21,6 +21,7 @@ import org.apache.iotdb.commons.subscription.config.SubscriptionConfig; import org.apache.iotdb.db.i18n.DataNodeMiscMessages; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; import org.apache.iotdb.db.pipe.event.common.tsfile.PipeTsFileInsertionEvent; import org.apache.iotdb.db.subscription.agent.SubscriptionAgent; import org.apache.iotdb.db.subscription.event.SubscriptionEvent; @@ -86,7 +87,8 @@ public SubscriptionEvent pollTsFileInternal( if (Objects.isNull(ev)) { if (isCommitContextOutdated(commitContext)) { LOGGER.warn( - "SubscriptionPrefetchingTsFileQueue {} detected outdated poll request, consumer {}, commit context {}, writing offset {}", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTIONPREFETCHINGTSFILEQUEUE_DETECTED_OUTDATED_POLL_7E0CE108, this, consumerId, commitContext, diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/TsFileDeduplicationBlockingPendingQueue.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/TsFileDeduplicationBlockingPendingQueue.java index b1677c9ffe616..5f614013e87fb 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/TsFileDeduplicationBlockingPendingQueue.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/TsFileDeduplicationBlockingPendingQueue.java @@ -22,6 +22,7 @@ import org.apache.iotdb.commons.pipe.agent.task.connection.UnboundedBlockingPendingQueue; import org.apache.iotdb.commons.pipe.event.EnrichedEvent; import org.apache.iotdb.commons.subscription.config.SubscriptionConfig; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; import org.apache.iotdb.db.pipe.event.common.tablet.PipeRawTabletInsertionEvent; import org.apache.iotdb.db.pipe.event.common.tsfile.PipeTsFileInsertionEvent; import org.apache.iotdb.pipe.api.event.Event; @@ -114,7 +115,8 @@ private boolean isDuplicated(final PipeTsFileInsertionEvent event) { return false; } LOGGER.info( - "Subscription: Detect duplicated PipeTsFileInsertionEvent {}, commit it directly", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_DETECT_DUPLICATED_PIPETSFILEINSERTIONEVENT_23A4740C, event.coreReportMessage()); return true; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/consensus/ConsensusLogToTabletConverter.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/consensus/ConsensusLogToTabletConverter.java index ad247680cb818..3a3d2dfebb19c 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/consensus/ConsensusLogToTabletConverter.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/consensus/ConsensusLogToTabletConverter.java @@ -27,6 +27,7 @@ import org.apache.iotdb.commons.schema.table.column.TsTableColumnCategory; import org.apache.iotdb.consensus.common.request.IndexedConsensusRequest; import org.apache.iotdb.consensus.common.request.IoTConsensusRequest; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; import org.apache.iotdb.db.queryengine.plan.planner.plan.node.write.InsertMultiTabletsNode; import org.apache.iotdb.db.queryengine.plan.planner.plan.node.write.InsertNode; import org.apache.iotdb.db.queryengine.plan.planner.plan.node.write.InsertRowNode; @@ -122,8 +123,8 @@ static InsertNode deserializeToInsertNode(final IndexedConsensusRequest indexedR } } catch (final Exception e) { LOGGER.warn( - "ConsensusLogToTabletConverter: failed to deserialize IConsensusRequest " - + "(type={}) in searchIndex={}: {}", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSLOGTOTABLETCONVERTER_FAILED_TO_DESERIALIZE_ICONSENSUSREQUEST_EC1F6BAD, req.getClass().getSimpleName(), indexedRequest.getSearchIndex(), e.getMessage(), @@ -154,8 +155,8 @@ static InsertNode deserializeToInsertNode(final IndexedConsensusRequest indexedR if (merged instanceof InsertNode) { final InsertNode mergedInsert = (InsertNode) merged; LOGGER.debug( - "ConsensusLogToTabletConverter: deserialized merged InsertNode for searchIndex={}, " - + "type={}, deviceId={}, searchNodeCount={}", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSLOGTOTABLETCONVERTER_DESERIALIZED_MERGED_INSERTNODE_51FB8295, indexedRequest.getSearchIndex(), mergedInsert.getType(), safeDeviceIdForLog(mergedInsert), @@ -167,7 +168,8 @@ static InsertNode deserializeToInsertNode(final IndexedConsensusRequest indexedR if (nonSearchNode != null) { LOGGER.debug( - "ConsensusLogToTabletConverter: searchIndex={} contains non-InsertNode PlanNode: {}", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSLOGTOTABLETCONVERTER_SEARCHINDEX_CONTAINS_NON_INSERTNODE_CFA9FA49, indexedRequest.getSearchIndex(), nonSearchNode.getClass().getSimpleName()); } @@ -182,12 +184,14 @@ public List convert(final InsertNode insertNode) { final PlanNodeType nodeType = insertNode.getType(); if (nodeType == null) { - LOGGER.warn("InsertNode type is null, skipping conversion"); + LOGGER.warn( + DataNodePipeMessages.PIPE_LOG_INSERTNODE_TYPE_IS_NULL_SKIPPING_CONVERSION_A2F1ADF7); return Collections.emptyList(); } LOGGER.debug( - "ConsensusLogToTabletConverter: converting InsertNode type={}, deviceId={}", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSLOGTOTABLETCONVERTER_CONVERTING_INSERTNODE_TYPE_B80428A0, nodeType, safeDeviceIdForLog(insertNode)); @@ -209,7 +213,9 @@ public List convert(final InsertNode insertNode) { case RELATIONAL_INSERT_ROWS: return convertRelationalInsertRowsNode((RelationalInsertRowsNode) insertNode); default: - LOGGER.debug("Unsupported InsertNode type for subscription: {}", nodeType); + LOGGER.debug( + DataNodePipeMessages.PIPE_LOG_UNSUPPORTED_INSERTNODE_TYPE_FOR_SUBSCRIPTION_E488EF74, + nodeType); return Collections.emptyList(); } } @@ -678,7 +684,7 @@ private void addValueToTablet( ((Binary[]) tablet.getValues()[columnIndex])[rowIndex] = (Binary) value; break; default: - LOGGER.warn("Unsupported data type: {}", dataType); + LOGGER.warn(DataNodePipeMessages.PIPE_LOG_UNSUPPORTED_DATA_TYPE_C8929F11, dataType); return; } // Unmark the bitmap position to indicate this value is NOT null. @@ -727,7 +733,8 @@ private void copyColumnValue( ((Binary[]) sourceColumn)[sourceRowIndex]; break; default: - LOGGER.warn("Unsupported data type for copy: {}", dataType); + LOGGER.warn( + DataNodePipeMessages.PIPE_LOG_UNSUPPORTED_DATA_TYPE_FOR_COPY_8AD25FE7, dataType); return; } // Unmark the bitmap position to indicate this value is NOT null. diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/consensus/ConsensusPrefetchingQueue.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/consensus/ConsensusPrefetchingQueue.java index fcd5cc4c3b654..6fedc37b70e51 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/consensus/ConsensusPrefetchingQueue.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/consensus/ConsensusPrefetchingQueue.java @@ -27,6 +27,7 @@ import org.apache.iotdb.consensus.iot.log.ConsensusReqReader; import org.apache.iotdb.db.conf.IoTDBDescriptor; import org.apache.iotdb.db.i18n.DataNodeMiscMessages; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; import org.apache.iotdb.db.pipe.agent.PipeDataNodeAgent; import org.apache.iotdb.db.pipe.resource.memory.PipeMemoryWeightUtil; import org.apache.iotdb.db.queryengine.plan.planner.plan.node.write.InsertMultiTabletsNode; @@ -387,7 +388,10 @@ private synchronized void awaitCompletion() { wait(50L); } catch (final InterruptedException e) { Thread.currentThread().interrupt(); - throw new RuntimeException("Interrupted while waiting for seek application", e); + throw new RuntimeException( + DataNodePipeMessages + .PIPE_EXCEPTION_INTERRUPTED_WHILE_WAITING_FOR_SEEK_APPLICATION_7C7ECAF2, + e); } } if (failure != null) { @@ -436,9 +440,8 @@ public ConsensusPrefetchingQueue( serverImpl.registerSubscriptionQueue(pendingEntries, retentionPolicy); LOGGER.info( - "ConsensusPrefetchingQueue created (dormant): consumerGroupId={}, topicName={}, " - + "orderMode={}, consensusGroupId={}, fallbackCommittedRegionProgress={}, " - + "fallbackTailSearchIndex={}, initialRuntimeVersion={}, initialActive={}", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_CREATED_DORMANT_CONSUMERGROUPID_863BC6D6, consumerGroupId, topicName, this.orderMode, @@ -640,7 +643,8 @@ private synchronized void initPrefetch(final RegionProgress regionProgress) { resetBatchWriterProgress(); LOGGER.info( - "ConsensusPrefetchingQueue {}: prefetch initialized, startSearchIndex={}, progressSource={}, recoveryWriterCount={}", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_PREFETCH_INITIALIZED_STARTSEARCHINDEX_69B53EE6, this, resolvedStart.getStartSearchIndex(), resolvedStart.getDetail(), @@ -661,8 +665,10 @@ private ReplayLocateDecision resolveInitReplayStartDecision( if (!(consensusReqReader instanceof WALNode)) { throw new IllegalStateException( String.format( - "ConsensusPrefetchingQueue %s: cannot recover from non-empty region progress without WAL access: %s", - this, recoveryRegionProgress)); + DataNodePipeMessages + .PIPE_EXCEPTION_CONSENSUSPREFETCHINGQUEUE_S_CANNOT_RECOVER_FROM_NON_EMPTY_C1B367EF, + this, + recoveryRegionProgress)); } final ReplayLocateDecision replayTarget = @@ -679,8 +685,11 @@ private ReplayLocateDecision resolveInitReplayStartDecision( default: throw new IllegalStateException( String.format( - "ConsensusPrefetchingQueue %s: cannot initialize replay start from region progress %s: %s", - this, recoveryRegionProgress, replayTarget.getDetail())); + DataNodePipeMessages + .PIPE_EXCEPTION_CONSENSUSPREFETCHINGQUEUE_S_CANNOT_INITIALIZE_REPLAY_START_E02DE40E, + this, + recoveryRegionProgress, + replayTarget.getDetail())); } } @@ -1045,8 +1054,8 @@ private SubscriptionEvent pollInternal(final String consumerId) { final long size = prefetchingQueue.size(); if (size == 0) { LOGGER.debug( - "ConsensusPrefetchingQueue {}: prefetching queue is empty for consumerId={}, " - + "pendingEntriesSize={}, nextExpected={}, isClosed={}, prefetchInitialized={}, subtaskScheduled={}", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_PREFETCHING_QUEUE_IS_EMPTY_FOR_22836B5E, this, consumerId, pendingEntries.size(), @@ -1058,7 +1067,8 @@ private SubscriptionEvent pollInternal(final String consumerId) { } LOGGER.debug( - "ConsensusPrefetchingQueue {}: polling, queue size={}, consumerId={}", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_POLLING_QUEUE_SIZE_CONSUMERID_FCA0AAD3, this, size, consumerId); @@ -1081,7 +1091,8 @@ private SubscriptionEvent pollInternal(final String consumerId) { if (event.isCommitted()) { LOGGER.warn( - "ConsensusPrefetchingQueue {} poll committed event {} (broken invariant), remove it", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_POLL_COMMITTED_EVENT_BROKEN_INVARIANT_E478FA3C, this, event); continue; @@ -1089,7 +1100,8 @@ private SubscriptionEvent pollInternal(final String consumerId) { if (!event.pollable()) { LOGGER.warn( - "ConsensusPrefetchingQueue {} poll non-pollable event {} (broken invariant), nack it", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_POLL_NON_POLLABLE_EVENT_BROKEN_E9551325, this, event); event.nack(); @@ -1104,7 +1116,11 @@ private SubscriptionEvent pollInternal(final String consumerId) { } } catch (final InterruptedException e) { Thread.currentThread().interrupt(); - LOGGER.warn("ConsensusPrefetchingQueue {} interrupted while polling", this, e); + LOGGER.warn( + DataNodePipeMessages + .PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_INTERRUPTED_WHILE_POLLING_B7CFF5FD, + this, + e); } return null; @@ -1210,9 +1226,8 @@ public PrefetchRoundResult drivePrefetchOnce() { final List batch = drainPendingEntries(maxWalEntries); if (!batch.isEmpty()) { LOGGER.debug( - "ConsensusPrefetchingQueue {}: drained {} entries from pendingEntries, " - + "first searchIndex={}, last searchIndex={}, nextExpected={}, " - + "prefetchingQueueSize={}", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_DRAINED_ENTRIES_FROM_PENDINGENTRIES_2D4E0BE7, this, batch.size(), batch.get(0).getSearchIndex(), @@ -1252,8 +1267,8 @@ public PrefetchRoundResult drivePrefetchOnce() { return PrefetchRoundResult.rescheduleNow(); } LOGGER.debug( - "ConsensusPrefetchingQueue {}: time-based flush, {} tablets lingered for {}ms " - + "(threshold={}ms)", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_TIME_BASED_FLUSH_TABLETS_LINGERED_10A4EBA8, this, lingerBatch.tablets.size(), lingerElapsedMs, @@ -1266,7 +1281,8 @@ public PrefetchRoundResult drivePrefetchOnce() { return computeIdleRoundResult(); } catch (final Throwable fatal) { LOGGER.error( - "ConsensusPrefetchingQueue {}: prefetch round failed " + "(type={}, message={})", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_PREFETCH_ROUND_FAILED_TYPE_MESSAGE_63BC909B, this, fatal.getClass().getName(), fatal.getMessage(), @@ -1290,9 +1306,8 @@ private void logPeriodicStatsIfNecessary() { final long currentPendingAcceptedEntries = pendingPathAcceptedEntries.get(); final long currentWalAcceptedEntries = walPathAcceptedEntries.get(); LOGGER.info( - "ConsensusPrefetchingQueue {}: periodic stats, lag={}, pendingDelta={}, walDelta={}, " - + "pendingTotal={}, walTotal={}, pendingQueueSize={}, prefetchingQueueSize={}, " - + "inFlightEventsSize={}, realtimeWriterCount={}, walHasNext={}, isActive={}, subtaskScheduled={}", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_PERIODIC_STATS_LAG_PENDINGDELTA_D75375D0, this, getLag(), currentPendingAcceptedEntries - lastPendingAcceptedEntries, @@ -1447,8 +1462,8 @@ private boolean accumulateFromPending( final long expected = nextExpectedSearchIndex.get(); if (hasLocalSearchIndex(request) && searchIndex > expected) { LOGGER.debug( - "ConsensusPrefetchingQueue {}: gap detected, expected={}, got={}. " - + "Filling {} entries from WAL.", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_GAP_DETECTED_EXPECTED_GOT_FILLING_70DD08B3, this, expected, searchIndex, @@ -1487,8 +1502,8 @@ private boolean accumulateFromPending( } LOGGER.debug( - "ConsensusPrefetchingQueue {}: accumulate complete, batchSize={}, processed={}, " - + "skipped={}, lingerTablets={}, nextExpected={}", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_ACCUMULATE_COMPLETE_BATCHSIZE_FA3F3B41, this, batch.size(), processedCount, @@ -1542,8 +1557,8 @@ private boolean fillGapFromWAL( if (lastWalGapWaitLogTimeMs == 0L || nowMs - lastWalGapWaitLogTimeMs >= WAL_GAP_WAIT_LOG_INTERVAL_MS) { LOGGER.info( - "ConsensusPrefetchingQueue {}: waiting {}ms for WAL gap [{}, {}) to become visible, " - + "currentNextExpected={}, currentWalIndex={}, seekGeneration={}", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_WAITING_MS_FOR_WAL_GAP_TO_BECOME_7D91C6C5, this, nowMs - walGapWaitStartTimeMs, nextExpected, @@ -1619,14 +1634,19 @@ private boolean pumpFromSubscriptionWAL( markMaterializedProgress(walEntry); advanceLocalCursorIfPresent(walEntry); } catch (final Exception e) { - LOGGER.warn("ConsensusPrefetchingQueue {}: error reading subscription WAL", this, e); + LOGGER.warn( + DataNodePipeMessages + .PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_ERROR_READING_SUBSCRIPTION_WAL_A3888AC5, + this, + e); break; } } if (entriesRead > 0) { LOGGER.debug( - "ConsensusPrefetchingQueue {}: subscription WAL read {} entries, nextExpectedSearchIndex={}", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_SUBSCRIPTION_WAL_READ_ENTRIES_14AA5096, this, entriesRead, nextExpectedSearchIndex.get()); @@ -1647,8 +1667,8 @@ private void ensureSubscriptionWalReadable() { } LOGGER.debug( - "ConsensusPrefetchingQueue {}: subscription WAL exhausted at {} while current WAL is {}. " - + "Rolling WAL file to expose current-file entries.", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_SUBSCRIPTION_WAL_EXHAUSTED_AT_E61AF763, this, nextExpectedSearchIndex.get(), currentWalIndex); @@ -1711,7 +1731,11 @@ private void closeSubscriptionWALIterator() { try { subscriptionWALIterator.close(); } catch (final IOException e) { - LOGGER.warn("ConsensusPrefetchingQueue {}: error closing subscription WAL iterator", this, e); + LOGGER.warn( + DataNodePipeMessages + .PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_ERROR_CLOSING_SUBSCRIPTION_WAL_19711C01, + this, + e); } finally { subscriptionWALIterator = null; } @@ -1771,8 +1795,8 @@ private boolean createAndEnqueueEvent( if (seekGeneration.get() != expectedSeekGeneration) { LOGGER.debug( - "ConsensusPrefetchingQueue {}: skip stale event with searchIndex range [{}, {}], " - + "expectedSeekGeneration={}, currentSeekGeneration={}", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_SKIP_STALE_EVENT_WITH_SEARCHINDEX_07A09B36, this, startSearchIndex, endSearchIndex, @@ -1801,8 +1825,8 @@ private boolean createAndEnqueueEvent( prefetchingQueue.add(event); LOGGER.debug( - "ConsensusPrefetchingQueue {}: ENQUEUED event with {} tablets, " - + "searchIndex range [{}, {}], prefetchQueueSize={}", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_ENQUEUED_EVENT_WITH_TABLETS_SEARCHINDEX_140FDDCB, this, tablets.size(), startSearchIndex, @@ -2031,13 +2055,15 @@ private boolean canAcceptCommitContext( if (Objects.isNull(commitContext) || !commitContext.hasWriterProgress()) { if (silent) { LOGGER.debug( - "ConsensusPrefetchingQueue {}: reject {} without writer progress, commitContext={}", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_REJECT_WITHOUT_WRITER_PROGRESS_D84AA802, this, action, commitContext); } else { LOGGER.warn( - "ConsensusPrefetchingQueue {}: reject {} without writer progress, commitContext={}", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_REJECT_WITHOUT_WRITER_PROGRESS_D84AA802, this, action, commitContext); @@ -2047,14 +2073,16 @@ private boolean canAcceptCommitContext( if (!isActive) { if (silent) { LOGGER.debug( - "ConsensusPrefetchingQueue {}: reject {} for inactive queue, commitContext={}, runtimeVersion={}", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_REJECT_FOR_INACTIVE_QUEUE_COMMITCONTEXT_AE6D382C, this, action, commitContext, runtimeVersion); } else { LOGGER.warn( - "ConsensusPrefetchingQueue {}: reject {} for inactive queue, commitContext={}, runtimeVersion={}", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_REJECT_FOR_INACTIVE_QUEUE_COMMITCONTEXT_AE6D382C, this, action, commitContext, @@ -2094,7 +2122,8 @@ private boolean ackInternal( acked.set(directCommitted); if (!acked.get()) { LOGGER.warn( - "ConsensusPrefetchingQueue {}: commit context {} does not exist for ack", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_COMMIT_CONTEXT_DOES_NOT_EXIST_99B8A8F3, this, commitContext); } @@ -2103,7 +2132,10 @@ private boolean ackInternal( if (ev.isCommitted()) { LOGGER.warn( - "ConsensusPrefetchingQueue {}: event {} already committed", this, commitContext); + DataNodePipeMessages + .PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_EVENT_ALREADY_COMMITTED_AC34E829, + this, + commitContext); ev.cleanUp(false); return null; } @@ -2117,7 +2149,8 @@ private boolean ackInternal( commitWriterProgress); if (!committed) { LOGGER.warn( - "ConsensusPrefetchingQueue {}: failed to advance commit frontier for {}", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_FAILED_TO_ADVANCE_COMMIT_FRONTIER_56E606C0, this, commitContext); return ev; @@ -2228,8 +2261,8 @@ public boolean nackSilent( nacked.set(true); if (ev.isPoisoned()) { LOGGER.error( - "ConsensusPrefetchingQueue {}: poison message detected (nackCount={}), " - + "force-acking event {} to prevent infinite re-delivery", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_POISON_MESSAGE_DETECTED_NACKCOUNT_3A9255FB, this, ev.getNackCount(), ev); @@ -2255,7 +2288,8 @@ private boolean nackInternal( (key, ev) -> { if (Objects.isNull(ev)) { LOGGER.warn( - "ConsensusPrefetchingQueue {}: commit context {} does not exist for nack", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_COMMIT_CONTEXT_DOES_NOT_EXIST_05F6C6E0, this, commitContext); return null; @@ -2265,8 +2299,8 @@ private boolean nackInternal( nacked.set(true); if (ev.isPoisoned()) { LOGGER.error( - "ConsensusPrefetchingQueue {}: poison message detected (nackCount={}), " - + "force-acking event {} to prevent infinite re-delivery", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_POISON_MESSAGE_DETECTED_NACKCOUNT_3A9255FB, this, ev.getNackCount(), ev); @@ -2301,8 +2335,8 @@ private void recycleInFlightEvents() { ev.nack(); if (ev.isPoisoned()) { LOGGER.error( - "ConsensusPrefetchingQueue {}: poison message detected during recycle " - + "(nackCount={}), force-acking event {}", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_POISON_MESSAGE_DETECTED_DURING_23159F02, this, ev.getNackCount(), ev); @@ -2313,7 +2347,8 @@ private void recycleInFlightEvents() { } prefetchingQueue.add(ev); LOGGER.debug( - "ConsensusPrefetchingQueue {}: recycled timed-out event {} back to prefetching queue", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_RECYCLED_TIMED_OUT_EVENT_BACK_5E58639C, this, ev); return null; @@ -2374,7 +2409,8 @@ public void seekToEnd() { public void seekToRegionProgress(final RegionProgress regionProgress) { if (!(consensusReqReader instanceof WALNode)) { LOGGER.warn( - "ConsensusPrefetchingQueue {}: seekToRegionProgress not supported (no WAL directory)", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_SEEKTOREGIONPROGRESS_NOT_SUPPORTED_85477BAB, this); seekToBeginning(); return; @@ -2388,7 +2424,8 @@ public void seekToRegionProgress(final RegionProgress regionProgress) { case FOUND: case AT_END: LOGGER.info( - "ConsensusPrefetchingQueue {}: seekToRegionProgress writerCount={} -> {} searchIndex={}", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_SEEKTOREGIONPROGRESS_WRITERCOUNT_3134A29B, this, regionProgress.getWriterPositions().size(), replayTarget.getStatus(), @@ -2402,15 +2439,19 @@ public void seekToRegionProgress(final RegionProgress regionProgress) { default: throw new IllegalStateException( String.format( - "ConsensusPrefetchingQueue %s: cannot seekToRegionProgress %s: %s", - this, regionProgress, replayTarget.getDetail())); + DataNodePipeMessages + .PIPE_EXCEPTION_CONSENSUSPREFETCHINGQUEUE_S_CANNOT_SEEKTOREGIONPROGRESS_2746E514, + this, + regionProgress, + replayTarget.getDetail())); } } public void seekAfterRegionProgress(final RegionProgress regionProgress) { if (!(consensusReqReader instanceof WALNode)) { LOGGER.warn( - "ConsensusPrefetchingQueue {}: seekAfterRegionProgress not supported (no WAL directory)", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_SEEKAFTERREGIONPROGRESS_NOT_SUPPORTED_55F36BE8, this); seekToEnd(); return; @@ -2424,7 +2465,8 @@ public void seekAfterRegionProgress(final RegionProgress regionProgress) { case FOUND: case AT_END: LOGGER.info( - "ConsensusPrefetchingQueue {}: seekAfterRegionProgress writerCount={} -> {} searchIndex={}", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_SEEKAFTERREGIONPROGRESS_WRITERCOUNT_C6B26D20, this, regionProgress.getWriterPositions().size(), replayTarget.getStatus(), @@ -2438,8 +2480,11 @@ public void seekAfterRegionProgress(final RegionProgress regionProgress) { default: throw new IllegalStateException( String.format( - "ConsensusPrefetchingQueue %s: cannot seekAfterRegionProgress %s: %s", - this, regionProgress, replayTarget.getDetail())); + DataNodePipeMessages + .PIPE_EXCEPTION_CONSENSUSPREFETCHINGQUEUE_S_CANNOT_SEEKAFTERREGIONPROGRESS_48A500C3, + this, + regionProgress, + replayTarget.getDetail())); } } @@ -2500,7 +2545,9 @@ private boolean applyPendingSeekRequestIfNecessary() { request.fail( new IllegalStateException( String.format( - "ConsensusPrefetchingQueue %s is closing while applying seek", this))); + DataNodePipeMessages + .PIPE_EXCEPTION_CONSENSUSPREFETCHINGQUEUE_S_IS_CLOSING_WHILE_APPLYING_SEEK_2BB2B431, + this))); return true; } applySeekResetUnderWriteLock(request); @@ -2529,7 +2576,8 @@ public void abortPendingSeekForRuntimeStop() { seekGeneration.set(requestToFail.previousSeekGeneration); } LOGGER.info( - "ConsensusPrefetchingQueue {}: aborted pending seek({}) during runtime stop, restored prefetchInitialized {} -> {}, seekGeneration {} -> {}", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_ABORTED_PENDING_SEEK_DURING_RUNTIME_F9928604, this, requestToFail.seekReason, true, @@ -2543,8 +2591,10 @@ public void abortPendingSeekForRuntimeStop() { requestToFail.fail( new IllegalStateException( String.format( - "ConsensusPrefetchingQueue %s runtime stopped before seek(%s) was applied", - this, requestToFail.seekReason))); + DataNodePipeMessages + .PIPE_EXCEPTION_CONSENSUSPREFETCHINGQUEUE_S_RUNTIME_STOPPED_BEFORE_SEEK_7BCB4F4B, + this, + requestToFail.seekReason))); } private void failPendingSeekBeforeScheduling(final PendingSeekRequest request) { @@ -2562,7 +2612,8 @@ private void failPendingSeekBeforeScheduling(final PendingSeekRequest request) { seekGeneration.set(request.previousSeekGeneration); } LOGGER.info( - "ConsensusPrefetchingQueue {}: failed to schedule seek({}) because {}, restored prefetchInitialized {} -> {}, seekGeneration {} -> {}", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_FAILED_TO_SCHEDULE_SEEK_BECAUSE_9E407068, this, request.seekReason, closing ? "the queue is closing" : "prefetch runtime is unavailable", @@ -2578,8 +2629,10 @@ private void failPendingSeekBeforeScheduling(final PendingSeekRequest request) { new IllegalStateException( String.format( closing - ? "ConsensusPrefetchingQueue %s is closing before seek(%s) can be scheduled" - : "ConsensusPrefetchingQueue %s cannot schedule seek(%s) because prefetch runtime is unavailable", + ? DataNodePipeMessages + .CONSENSUS_PREFETCHING_QUEUE_CLOSING_BEFORE_SEEK_SCHEDULED_FMT + : DataNodePipeMessages + .CONSENSUS_PREFETCHING_QUEUE_RUNTIME_UNAVAILABLE_FOR_SEEK_FMT, this, request.seekReason))); } @@ -2622,7 +2675,8 @@ private void applySeekResetUnderWriteLock(final PendingSeekRequest request) { consumerGroupId, topicName, consensusGroupId, request.committedRegionProgress); LOGGER.info( - "ConsensusPrefetchingQueue {}: seek({}) applied to searchIndex={}, writerCount={}, seekGeneration={}", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_SEEK_APPLIED_TO_SEARCHINDEX_WRITERCOUNT_FA2C4327, this, request.seekReason, request.targetSearchIndex, @@ -2658,7 +2712,8 @@ private RegionProgress computeTailRegionProgress() { mergeTailProgress(tailProgressByWriter, reader.getMetaData()); } catch (final IOException e) { LOGGER.warn( - "ConsensusPrefetchingQueue {}: failed to read WAL metadata from {} while computing seekToEnd frontier", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_FAILED_TO_READ_WAL_METADATA_FROM_A2ED50D1, this, walFile, e); @@ -2782,7 +2837,8 @@ private void injectWatermark(final long watermarkTimestamp) { prefetchingQueue.add(watermarkEvent); LOGGER.debug( - "ConsensusPrefetchingQueue {}: injected WATERMARK, watermarkTimestamp={}", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_INJECTED_WATERMARK_WATERMARKTIMESTAMP_BF373164, this, watermarkTimestamp); } @@ -2826,7 +2882,10 @@ public void close() { if (Objects.nonNull(seekRequestToFail)) { seekRequestToFail.fail( new IllegalStateException( - String.format("ConsensusPrefetchingQueue %s is closing before seek applies", this))); + String.format( + DataNodePipeMessages + .PIPE_EXCEPTION_CONSENSUSPREFETCHINGQUEUE_S_IS_CLOSING_BEFORE_SEEK_APPLIES_F893BB02, + this))); } if (Objects.nonNull(prefetchBinding.right)) { @@ -2874,7 +2933,10 @@ private void deregisterPendingEntriesFromConsensusServer() { try { serverImpl.deregisterSubscriptionQueue(pendingEntries); } catch (final Exception e) { - LOGGER.warn("ConsensusPrefetchingQueue {}: error during deregister", this, e); + LOGGER.warn( + DataNodePipeMessages.PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_ERROR_DURING_DEREGISTER_34C332E7, + this, + e); } } @@ -2883,12 +2945,14 @@ private void flushLingeringBatchOnCloseUnderWriteLock() { return; } LOGGER.info( - "ConsensusPrefetchingQueue {}: flushing {} lingering tablets during close", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_FLUSHING_LINGERING_TABLETS_DURING_4C4AF235, this, lingerBatch.tablets.size()); if (!flushBatch(lingerBatch, observedSeekGeneration)) { LOGGER.warn( - "ConsensusPrefetchingQueue {}: failed to flush lingering batch during close, discarding it", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_FAILED_TO_FLUSH_LINGERING_BATCH_F97D8AA7, this); lingerBatch.reset(); resetBatchWriterProgress(); @@ -2968,7 +3032,7 @@ public long getEpochChangeCount() { public void setActive(final boolean active) { this.isActive = active; LOGGER.info( - "ConsensusPrefetchingQueue {}: isActive set to {} (region={})", + DataNodePipeMessages.PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_ISACTIVE_SET_TO_REGION_EC0AD7BA, this, active, consensusGroupId); @@ -2987,8 +3051,8 @@ public void setActiveWriterNodeIds(final Set activeWriterNodeIds) { new LinkedHashSet<>(Objects.requireNonNull(activeWriterNodeIds))); refreshEffectiveActiveWriterNodeIds(); LOGGER.info( - "ConsensusPrefetchingQueue {}: runtimeActiveWriterNodeIds={}, effectiveActiveWriterNodeIds={} " - + "(region={}, orderMode={}, preferredWriterNodeId={})", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_RUNTIMEACTIVEWRITERNODEIDS_EFFECTIVEACTIVEWRITERNODEIDS_246519D2, this, this.runtimeActiveWriterNodeIds, this.activeWriterNodeIds, @@ -3036,8 +3100,8 @@ public void setPreferredWriterNodeId(final int preferredWriterNodeId) { this.preferredWriterNodeId = preferredWriterNodeId; refreshEffectiveActiveWriterNodeIds(); LOGGER.info( - "ConsensusPrefetchingQueue {}: preferredWriterNodeId set to {}, effectiveActiveWriterNodeIds={} " - + "(region={}, orderMode={})", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_PREFERREDWRITERNODEID_SET_TO_EFFECTIVEACTIVEWRITERNODEIDS_B08E8180, this, this.preferredWriterNodeId, this.activeWriterNodeIds, @@ -3058,8 +3122,8 @@ public void setOrderMode(final String orderMode) { this.orderMode = normalizedOrderMode; refreshEffectiveActiveWriterNodeIds(); LOGGER.info( - "ConsensusPrefetchingQueue {}: orderMode set to {}, effectiveActiveWriterNodeIds={} " - + "(region={}, preferredWriterNodeId={}, runtimeActiveWriterNodeIds={})", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_ORDERMODE_SET_TO_EFFECTIVEACTIVEWRITERNODEIDS_CDD3C86E, this, this.orderMode, this.activeWriterNodeIds, @@ -3079,11 +3143,11 @@ private boolean isWriterRuntimeActive(final int writerNodeId) { } public void applyRuntimeState(final ConsensusRegionRuntimeState runtimeState) { - Objects.requireNonNull(runtimeState, "runtimeState"); + Objects.requireNonNull(runtimeState, DataNodeMiscMessages.EXCEPTION_RUNTIMESTATE_D4D018BA); this.runtimeVersion = runtimeState.getRuntimeVersion(); runtimeVersionChangeCount.incrementAndGet(); LOGGER.info( - "ConsensusPrefetchingQueue {}: applied runtimeVersion {}", + DataNodePipeMessages.PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_APPLIED_RUNTIMEVERSION_36E05B80, this, runtimeState.getRuntimeVersion()); setPreferredWriterNodeId(runtimeState.getPreferredWriterNodeId()); @@ -3094,7 +3158,8 @@ public void applyRuntimeState(final ConsensusRegionRuntimeState runtimeState) { // signal. setActive(runtimeState.isActive()); LOGGER.info( - "ConsensusPrefetchingQueue {}: applied runtimeState={}, preferredWriterNodeId={}", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSPREFETCHINGQUEUE_APPLIED_RUNTIMESTATE_PREFERREDWRITERNODEID_D845E9D6, this, runtimeState, runtimeState.getPreferredWriterNodeId()); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/consensus/ConsensusSubscriptionCommitManager.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/consensus/ConsensusSubscriptionCommitManager.java index 845197a0d8138..0e96c893fb766 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/consensus/ConsensusSubscriptionCommitManager.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/consensus/ConsensusSubscriptionCommitManager.java @@ -35,6 +35,7 @@ import org.apache.iotdb.confignode.rpc.thrift.TGetCommitProgressResp; import org.apache.iotdb.db.conf.IoTDBDescriptor; import org.apache.iotdb.db.i18n.DataNodeMiscMessages; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; import org.apache.iotdb.db.protocol.client.ConfigNodeClient; import org.apache.iotdb.db.protocol.client.ConfigNodeClientManager; import org.apache.iotdb.db.protocol.client.ConfigNodeInfo; @@ -224,8 +225,8 @@ public boolean commit( final ConsensusSubscriptionCommitState state = commitStates.get(stateKey.encodedStateKey); if (state == null) { LOGGER.warn( - "ConsensusSubscriptionCommitManager: Cannot commit for unknown state, " - + "consumerGroupId={}, topicName={}, regionId={}, writerId={}, writerProgress={}", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSSUBSCRIPTIONCOMMITMANAGER_CANNOT_COMMIT_FOR_UNKNOWN_751BD2A9, consumerGroupId, topicName, regionId, @@ -261,8 +262,8 @@ public boolean commitWithoutOutstanding( final ConsensusSubscriptionCommitState state = commitStates.get(stateKey.encodedStateKey); if (state == null) { LOGGER.warn( - "ConsensusSubscriptionCommitManager: Cannot direct-commit for unknown state, " - + "consumerGroupId={}, topicName={}, regionId={}, writerId={}, writerProgress={}", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSSUBSCRIPTIONCOMMITMANAGER_CANNOT_DIRECT_COMMIT_D6AD7D96, consumerGroupId, topicName, regionId, @@ -383,8 +384,8 @@ public void resetState( final ConsensusSubscriptionCommitState state = commitStates.get(key); if (state == null) { LOGGER.warn( - "ConsensusSubscriptionCommitManager: Cannot reset unknown state, " - + "consumerGroupId={}, topicName={}, regionId={}", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSSUBSCRIPTIONCOMMITMANAGER_CANNOT_RESET_UNKNOWN_C469052F, consumerGroupId, topicName, regionId); @@ -495,7 +496,8 @@ private void doBroadcast( client.syncSubscriptionProgress(req); } catch (final ClientManagerException | TException e) { LOGGER.debug( - "Failed to broadcast subscription progress to DataNode {} at {}: {}", + DataNodePipeMessages + .PIPE_LOG_FAILED_TO_BROADCAST_SUBSCRIPTION_PROGRESS_TO_DATANODE_AT_7024F5B2, location.getDataNodeId(), endpoint, e.getMessage()); @@ -503,7 +505,10 @@ private void doBroadcast( } } catch (final Exception e) { LOGGER.debug( - "Failed to broadcast subscription progress for region {}: {}", regionId, e.getMessage()); + DataNodePipeMessages + .PIPE_LOG_FAILED_TO_BROADCAST_SUBSCRIPTION_PROGRESS_FOR_REGION_DE9074BD, + regionId, + e.getMessage()); } } @@ -534,8 +539,8 @@ public void receiveProgressBroadcast( final WriterProgress writerProgress) { if (Objects.isNull(writerId) || Objects.isNull(writerProgress)) { LOGGER.warn( - "ConsensusSubscriptionCommitManager: ignore broadcast without writer identity, " - + "consumerGroupId={}, topicName={}, regionId={}, writerId={}, writerProgress={}", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSSUBSCRIPTIONCOMMITMANAGER_IGNORE_BROADCAST_WITHOUT_211DE477, consumerGroupId, topicName, regionIdStr, @@ -562,8 +567,8 @@ public void receiveProgressBroadcast( persistRegionProgress(stateKey, commitStates.get(stateKey.encodedStateKey)); } LOGGER.debug( - "Received subscription progress broadcast: consumerGroupId={}, topicName={}, " - + "regionId={}, physicalTime={}, localSeq={}", + DataNodePipeMessages + .PIPE_LOG_RECEIVED_SUBSCRIPTION_PROGRESS_BROADCAST_CONSUMERGROUPID_CDAEF839, consumerGroupId, topicName, regionIdStr, @@ -621,7 +626,8 @@ private static String decodeFileNameComponent(final String value) { case 3: return new String(Base64.getUrlDecoder().decode(value + "="), StandardCharsets.UTF_8); default: - throw new IllegalArgumentException("Invalid base64 url component length"); + throw new IllegalArgumentException( + DataNodePipeMessages.PIPE_EXCEPTION_INVALID_BASE64_URL_COMPONENT_LENGTH_F1F1B6BA); } } @@ -670,7 +676,9 @@ private void recoverAllTopicStatesIfNeeded() { final String[] decodedTopicKey = decodeTopicFileKey(topicFileKey); if (Objects.isNull(decodedTopicKey)) { LOGGER.warn( - "Skip malformed consensus subscription progress file name {}", metaFile.getName()); + DataNodePipeMessages + .PIPE_LOG_SKIP_MALFORMED_CONSENSUS_SUBSCRIPTION_PROGRESS_FILE_NAME_BB4D75F0, + metaFile.getName()); continue; } recoverTopicStatesIfNeeded(topicFileKey, decodedTopicKey[0], decodedTopicKey[1]); @@ -710,8 +718,8 @@ private void recoverTopicStatesIfNeeded( topicProgressIndexes.put(topicFileKey, snapshot.indexEntries); } catch (final IOException e) { LOGGER.warn( - "Failed to recover consensus subscription progress for consumerGroupId={}, " - + "topicName={}", + DataNodePipeMessages + .PIPE_LOG_FAILED_TO_RECOVER_CONSENSUS_SUBSCRIPTION_PROGRESS_FOR_CONSUMERGROUPID_DF30716B, consumerGroupId, topicName, e); @@ -741,7 +749,10 @@ private TopicProgressSnapshot readTopicProgressSnapshot(final String topicFileKe final int regionCount = ReadWriteIOUtils.readInt(buffer); if (regionCount < 0) { throw new IOException( - "Invalid consensus subscription progress region count " + regionCount); + String.format( + DataNodePipeMessages + .PIPE_EXCEPTION_INVALID_CONSENSUS_SUBSCRIPTION_PROGRESS_REGION_COUNT_S_7CE4FD8E, + regionCount)); } final Map states = new LinkedHashMap<>(); final Map indexEntries = new LinkedHashMap<>(); @@ -750,7 +761,10 @@ private TopicProgressSnapshot readTopicProgressSnapshot(final String topicFileKe final int payloadLength = ReadWriteIOUtils.readInt(buffer); if (payloadLength < 0 || payloadLength > buffer.remaining()) { throw new IOException( - "Invalid consensus subscription progress payload length " + payloadLength); + String.format( + DataNodePipeMessages + .PIPE_EXCEPTION_INVALID_CONSENSUS_SUBSCRIPTION_PROGRESS_PAYLOAD_LENGTH_S_8C145986, + payloadLength)); } final long payloadOffset = buffer.position(); final byte[] payload = new byte[payloadLength]; @@ -762,7 +776,12 @@ private TopicProgressSnapshot readTopicProgressSnapshot(final String topicFileKe } return new TopicProgressSnapshot(states, indexEntries); } catch (final RuntimeException e) { - throw new IOException("Malformed consensus subscription progress file " + metaFile, e); + throw new IOException( + String.format( + DataNodePipeMessages + .PIPE_EXCEPTION_MALFORMED_CONSENSUS_SUBSCRIPTION_PROGRESS_FILE_S_83042847, + metaFile), + e); } } @@ -777,7 +796,10 @@ private void deleteTopicProgressFiles(final String topicFileKey) { private static void deleteFileIfExists(final File file) { if (file.exists() && !file.delete()) { - LOGGER.warn("Failed to delete consensus subscription progress file {}", file); + LOGGER.warn( + DataNodePipeMessages + .PIPE_LOG_FAILED_TO_DELETE_CONSENSUS_SUBSCRIPTION_PROGRESS_FILE_51C57096, + file); } } @@ -827,8 +849,8 @@ private void persistRegionProgress( rewriteTopicProgressFilesUnderLock(stateKey); } catch (final IOException e) { LOGGER.warn( - "Failed to persist consensus subscription progress for consumerGroupId={}, " - + "topicName={}, regionId={}", + DataNodePipeMessages + .PIPE_LOG_FAILED_TO_PERSIST_CONSENSUS_SUBSCRIPTION_PROGRESS_FOR_CONSUMERGROUPID_4EA71236, stateKey.consumerGroupId, stateKey.topicName, stateKey.regionIdStr, @@ -854,8 +876,8 @@ private void rewriteTopicProgressFiles(final CommitStateKey stateKey) { rewriteTopicProgressFilesUnderLock(stateKey); } catch (final IOException e) { LOGGER.warn( - "Failed to rewrite consensus subscription progress for consumerGroupId={}, " - + "topicName={}", + DataNodePipeMessages + .PIPE_LOG_FAILED_TO_REWRITE_CONSENSUS_SUBSCRIPTION_PROGRESS_FOR_CONSUMERGROUPID_8B230D50, stateKey.consumerGroupId, stateKey.topicName, e); @@ -955,8 +977,8 @@ private ConsensusSubscriptionCommitState queryCommitProgressStateFromConfigNode( final TGetCommitProgressResp resp = configNodeClient.getCommitProgress(req); if (resp.status.getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()) { LOGGER.warn( - "ConsensusSubscriptionCommitManager: failed to query commit progress from ConfigNode " - + "for consumerGroupId={}, topicName={}, regionId={}, status={}", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSSUBSCRIPTIONCOMMITMANAGER_FAILED_TO_QUERY_COMMIT_31E47F21, consumerGroupId, topicName, regionId, @@ -970,8 +992,8 @@ private ConsensusSubscriptionCommitState queryCommitProgressStateFromConfigNode( if (Objects.nonNull(committedRegionProgress) && !committedRegionProgress.getWriterPositions().isEmpty()) { LOGGER.info( - "ConsensusSubscriptionCommitManager: recovered committedRegionProgress={} from " - + "ConfigNode for consumerGroupId={}, topicName={}, regionId={}", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSSUBSCRIPTIONCOMMITMANAGER_RECOVERED_COMMITTEDREGIONPROGRESS_F6B92C6B, committedRegionProgress, consumerGroupId, topicName, @@ -985,8 +1007,8 @@ private ConsensusSubscriptionCommitState queryCommitProgressStateFromConfigNode( } } catch (final ClientManagerException | TException e) { LOGGER.warn( - "ConsensusSubscriptionCommitManager: failed to query commit progress from ConfigNode " - + "for consumerGroupId={}, topicName={}, regionId={}, starting from 0", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSSUBSCRIPTIONCOMMITMANAGER_FAILED_TO_QUERY_COMMIT_16CFDCD9, consumerGroupId, topicName, regionId, @@ -1004,7 +1026,10 @@ private static ByteBuffer serializeRegionProgress(final RegionProgress regionPro regionProgress.serialize(dos); return ByteBuffer.wrap(baos.getBuf(), 0, baos.size()); } catch (final IOException e) { - LOGGER.warn("Failed to serialize committed region progress {}", regionProgress, e); + LOGGER.warn( + DataNodePipeMessages.PIPE_LOG_FAILED_TO_SERIALIZE_COMMITTED_REGION_PROGRESS_0D8D2129, + regionProgress, + e); return null; } } @@ -1158,8 +1183,8 @@ public RegionProgress getCommittedRegionProgress() { public void recordMapping(final WriterId writerId, final WriterProgress writerProgress) { if (Objects.isNull(writerId) || Objects.isNull(writerProgress)) { LOGGER.warn( - "ConsensusSubscriptionCommitState: ignore mapping without writer identity, " - + "writerId={}, writerProgress={}", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSSUBSCRIPTIONCOMMITSTATE_IGNORE_MAPPING_WITHOUT_3E66A74D, writerId, writerProgress); return; @@ -1170,8 +1195,8 @@ public void recordMapping(final WriterId writerId, final WriterProgress writerPr final ProgressKey previous = outstandingKeys.put(slot, key); if (Objects.nonNull(previous) && !previous.equals(key)) { LOGGER.warn( - "ConsensusSubscriptionCommitState: duplicate outstanding mapping for slot={}, " - + "previous={}, current={}", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSSUBSCRIPTIONCOMMITSTATE_DUPLICATE_OUTSTANDING_MAPPING_B5B34891, slot, previous, key); @@ -1179,8 +1204,8 @@ public void recordMapping(final WriterId writerId, final WriterProgress writerPr final int size = outstandingKeys.size(); if (size > OUTSTANDING_SIZE_WARN_THRESHOLD && size % OUTSTANDING_SIZE_WARN_THRESHOLD == 1) { LOGGER.warn( - "ConsensusSubscriptionCommitState: outstanding size ({}) exceeds threshold ({}), " - + "consumers may not be committing. committed=({},{}), writerNodeId={}", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSSUBSCRIPTIONCOMMITSTATE_OUTSTANDING_SIZE_EXCEEDS_1463BF02, size, OUTSTANDING_SIZE_WARN_THRESHOLD, getCommittedPhysicalTime(), @@ -1204,8 +1229,8 @@ CommitOperationResult commitAndGetResult( final WriterId writerId, final WriterProgress writerProgress) { if (Objects.isNull(writerId) || Objects.isNull(writerProgress)) { LOGGER.warn( - "ConsensusSubscriptionCommitState: missing writer identity for commit, " - + "writerId={}, writerProgress={}", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSSUBSCRIPTIONCOMMITSTATE_MISSING_WRITER_IDENTITY_01040357, writerId, writerProgress); return CommitOperationResult.unhandled(); @@ -1217,7 +1242,8 @@ CommitOperationResult commitAndGetResult( if (recordedKey == null) { if (recentlyCommittedKeys.contains(key)) { LOGGER.debug( - "ConsensusSubscriptionCommitState: idempotent re-commit for ({},{},{})", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSSUBSCRIPTIONCOMMITSTATE_IDEMPOTENT_RE_COMMIT_FOR_30464FC4, key.physicalTime, key.writerNodeId, key.localSeq); @@ -1225,7 +1251,8 @@ CommitOperationResult commitAndGetResult( return CommitOperationResult.handledWithoutAdvance(); } LOGGER.warn( - "ConsensusSubscriptionCommitState: unknown key ({},{},{}) for commit", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSSUBSCRIPTIONCOMMITSTATE_UNKNOWN_KEY_FOR_COMMIT_5F699CFD, key.physicalTime, key.writerNodeId, key.localSeq); @@ -1252,8 +1279,8 @@ CommitOperationResult commitWithoutOutstandingAndGetResult( final WriterId writerId, final WriterProgress writerProgress) { if (Objects.isNull(writerId) || Objects.isNull(writerProgress)) { LOGGER.warn( - "ConsensusSubscriptionCommitState: missing writer identity for direct commit, " - + "writerId={}, writerProgress={}", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSSUBSCRIPTIONCOMMITSTATE_MISSING_WRITER_IDENTITY_BB10A3B1, writerId, writerProgress); return CommitOperationResult.unhandled(); @@ -1263,7 +1290,8 @@ CommitOperationResult commitWithoutOutstandingAndGetResult( synchronized (this) { if (recentlyCommittedKeys.contains(incomingKey)) { LOGGER.debug( - "ConsensusSubscriptionCommitState: idempotent direct commit for ({},{},{})", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSSUBSCRIPTIONCOMMITSTATE_IDEMPOTENT_DIRECT_COMMIT_B093AC01, incomingKey.physicalTime, incomingKey.writerNodeId, incomingKey.localSeq); @@ -1274,8 +1302,8 @@ CommitOperationResult commitWithoutOutstandingAndGetResult( final ProgressKey outstandingKey = outstandingKeys.remove(ProgressSlot.from(incomingKey)); if (Objects.isNull(outstandingKey)) { LOGGER.warn( - "ConsensusSubscriptionCommitState: reject direct commit without outstanding mapping " - + "for ({},{},{})", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSSUBSCRIPTIONCOMMITSTATE_REJECT_DIRECT_COMMIT_WITHOUT_5B975E49, incomingKey.physicalTime, incomingKey.writerNodeId, incomingKey.localSeq); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/consensus/ConsensusSubscriptionSetupHandler.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/consensus/ConsensusSubscriptionSetupHandler.java index 0d072e50f23c1..78d4afe228d27 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/consensus/ConsensusSubscriptionSetupHandler.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/consensus/ConsensusSubscriptionSetupHandler.java @@ -36,6 +36,7 @@ import org.apache.iotdb.db.conf.IoTDBConfig; import org.apache.iotdb.db.conf.IoTDBDescriptor; import org.apache.iotdb.db.consensus.DataRegionConsensusImpl; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; import org.apache.iotdb.db.storageengine.StorageEngine; import org.apache.iotdb.db.storageengine.dataregion.DataRegion; import org.apache.iotdb.db.subscription.agent.SubscriptionAgent; @@ -112,11 +113,14 @@ public static void ensureNewRegionListenerRegistered() { if (IoTConsensus.onNewPeerCreated == null) { IoTConsensus.onNewPeerCreated = ConsensusSubscriptionSetupHandler::onNewRegionCreated; LOGGER.info( - "Set IoTConsensus.onNewPeerCreated callback for consensus subscription auto-binding"); + DataNodePipeMessages + .PIPE_LOG_SET_IOTCONSENSUS_ONNEWPEERCREATED_CALLBACK_FOR_CONSENSUS_0766CE68); } if (IoTConsensus.onPeerRemoved == null) { IoTConsensus.onPeerRemoved = ConsensusSubscriptionSetupHandler::onRegionRemoved; - LOGGER.info("Set IoTConsensus.onPeerRemoved callback for consensus subscription cleanup"); + LOGGER.info( + DataNodePipeMessages + .PIPE_LOG_SET_IOTCONSENSUS_ONPEERREMOVED_CALLBACK_FOR_CONSENSUS_SUBSCRIPTION_21D4D6AC); } } @@ -142,8 +146,8 @@ private static void onNewRegionCreated( ConsensusSubscriptionCommitManager.getInstance(); LOGGER.info( - "New DataRegion {} created, checking {} consumer group(s) for auto-binding, " - + "currentSearchIndex={}", + DataNodePipeMessages + .PIPE_LOG_NEW_DATAREGION_CREATED_CHECKING_CONSUMER_GROUP_S_FOR_AUTO_787C16E9, groupId, allSubscriptions.size(), serverImpl.getSearchIndex()); @@ -208,9 +212,8 @@ private static void onNewRegionCreated( initialActiveWriterNodeIds); LOGGER.info( - "Auto-binding consensus queue for topic [{}] in group [{}] to new region {} " - + "(database={}, tailStartSearchIndex={}, hasLocalPersistedState={}, " - + "committedRegionProgress={}, initialRuntimeVersion={}, initialActive={})", + DataNodePipeMessages + .PIPE_LOG_AUTO_BINDING_CONSENSUS_QUEUE_FOR_TOPIC_IN_GROUP_TO_NEW_REGION_86F21649, topicName, consumerGroupId, groupId, @@ -238,7 +241,8 @@ private static void onNewRegionCreated( SubscriptionAgent.broker().applyRuntimeStateForRegion(groupId, initialRuntimeState); } catch (final Exception e) { LOGGER.error( - "Failed to auto-bind topic [{}] in group [{}] to new region {}", + DataNodePipeMessages + .PIPE_LOG_FAILED_TO_AUTO_BIND_TOPIC_IN_GROUP_TO_NEW_REGION_5BFD0E7D, topicName, consumerGroupId, groupId, @@ -261,12 +265,17 @@ private static void onRegionRemoved(final ConsensusGroupId groupId) { regionRuntimeVersion.remove(groupId.convertToTConsensusGroupId()); regionActiveWriterNodeIds.remove(groupId.convertToTConsensusGroupId()); LOGGER.info( - "DataRegion {} being removed, unbinding all consensus subscription queues", groupId); + DataNodePipeMessages + .PIPE_LOG_DATAREGION_BEING_REMOVED_UNBINDING_ALL_CONSENSUS_SUBSCRIPTION_848A29F0, + groupId); try { SubscriptionAgent.broker().unbindByRegion(groupId); } catch (final Exception e) { LOGGER.error( - "Failed to unbind consensus subscription queues for removed region {}", groupId, e); + DataNodePipeMessages + .PIPE_LOG_FAILED_TO_UNBIND_CONSENSUS_SUBSCRIPTION_QUEUES_FOR_REMOVED_7086F70A, + groupId, + e); } } @@ -275,14 +284,17 @@ public static boolean isConsensusBasedTopic(final String topicName) { final String topicMode = SubscriptionAgent.topic().getTopicMode(topicName); final boolean result = TopicConstant.MODE_CONSENSUS_VALUE.equalsIgnoreCase(topicMode); LOGGER.debug( - "isConsensusBasedTopic check for topic [{}]: mode={}, result={}", + DataNodePipeMessages.PIPE_LOG_ISCONSENSUSBASEDTOPIC_CHECK_FOR_TOPIC_MODE_RESULT_19EFA0F9, topicName, topicMode, result); return result; } catch (final Exception e) { LOGGER.warn( - "Failed to check if topic [{}] is consensus-based, defaulting to false", topicName, e); + DataNodePipeMessages + .PIPE_LOG_FAILED_TO_CHECK_IF_TOPIC_IS_CONSENSUS_BASED_DEFAULTING_TO_ECCE1509, + topicName, + e); return false; } } @@ -295,9 +307,8 @@ public static void setupConsensusSubscriptions( final String runtimeConsensusImplementation = Objects.nonNull(dataRegionConsensus) ? dataRegionConsensus.getClass().getName() : "null"; LOGGER.warn( - "Skipping setup of consensus-based subscriptions for consumer group [{}] because " - + "mode=consensus only supports data_region_consensus_protocol_class={}, but " - + "current configured value is {} (runtime consensus implementation: {})", + DataNodePipeMessages + .PIPE_LOG_SKIPPING_SETUP_OF_CONSENSUS_BASED_SUBSCRIPTIONS_FOR_CONSUMER_A7B2C812, consumerGroupId, ConsensusFactory.IOT_CONSENSUS, configuredProtocol, @@ -313,8 +324,8 @@ public static void setupConsensusSubscriptions( ConsensusSubscriptionCommitManager.getInstance(); LOGGER.info( - "Setting up consensus subscriptions for consumer group [{}], topics={}, " - + "total consensus groups={}", + DataNodePipeMessages + .PIPE_LOG_SETTING_UP_CONSENSUS_SUBSCRIPTIONS_FOR_CONSUMER_GROUP_TOPICS_204374A2, consumerGroupId, topicNames, ioTConsensus.getAllConsensusGroupIds().size()); @@ -328,7 +339,8 @@ public static void setupConsensusSubscriptions( setupConsensusQueueForTopic(consumerGroupId, topicName, ioTConsensus, commitManager); } catch (final Exception e) { LOGGER.error( - "Failed to set up consensus subscription for topic [{}] in consumer group [{}]", + DataNodePipeMessages + .PIPE_LOG_FAILED_TO_SET_UP_CONSENSUS_SUBSCRIPTION_FOR_TOPIC_IN_CONSUMER_1A30001B, topicName, consumerGroupId, e); @@ -360,13 +372,16 @@ private static void setupConsensusQueueForTopic( final TopicConfig topicConfig = topicConfigs.get(topicName); if (topicConfig == null) { LOGGER.warn( - "Topic config not found for topic [{}], cannot set up consensus queue", topicName); + DataNodePipeMessages + .PIPE_LOG_TOPIC_CONFIG_NOT_FOUND_FOR_TOPIC_CANNOT_SET_UP_CONSENSUS_A93339CE, + topicName); return; } // Build the converter from the currently supported topic filters. LOGGER.info( - "Setting up consensus queue for topic [{}]: isTableTopic={}, orderMode={}, config={}", + DataNodePipeMessages + .PIPE_LOG_SETTING_UP_CONSENSUS_QUEUE_FOR_TOPIC_ISTABLETOPIC_ORDERMODE_4F1CDC66, topicName, topicConfig.isTableTopic(), topicConfig.getOrderMode(), @@ -374,7 +389,8 @@ private static void setupConsensusQueueForTopic( final List allGroupIds = ioTConsensus.getAllConsensusGroupIds(); LOGGER.info( - "Discovered {} consensus group(s) for topic [{}] in consumer group [{}]: {}", + DataNodePipeMessages + .PIPE_LOG_DISCOVERED_CONSENSUS_GROUP_S_FOR_TOPIC_IN_CONSUMER_GROUP_012EE420, allGroupIds.size(), topicName, consumerGroupId, @@ -402,7 +418,8 @@ private static void setupConsensusQueueForTopic( if (!matchesTopicDatabase(topicConfig, dbTableModel)) { LOGGER.info( - "Skipping region {} (database={}) for table topic [{}] (DATABASE_KEY={})", + DataNodePipeMessages + .PIPE_LOG_SKIPPING_REGION_DATABASE_FOR_TABLE_TOPIC_DATABASE_KEY_2DA27A84, groupId, dbTableModel, topicName, @@ -443,10 +460,8 @@ private static void setupConsensusQueueForTopic( initialActiveWriterNodeIds); LOGGER.info( - "Binding consensus prefetching queue for topic [{}] in consumer group [{}] " - + "to data region consensus group [{}] (database={}, tailStartSearchIndex={}, " - + "hasLocalPersistedState={}, committedRegionProgress={}, " - + "initialRuntimeVersion={}, initialActive={})", + DataNodePipeMessages + .PIPE_LOG_BINDING_CONSENSUS_PREFETCHING_QUEUE_FOR_TOPIC_IN_CONSUMER_45239EEA, topicName, consumerGroupId, groupId, @@ -479,8 +494,8 @@ private static void setupConsensusQueueForTopic( if (!bound) { LOGGER.warn( - "No local IoTConsensus data region found for topic [{}] in consumer group [{}]. " - + "Consensus subscription will be set up when a matching data region becomes available.", + DataNodePipeMessages + .PIPE_LOG_NO_LOCAL_IOTCONSENSUS_DATA_REGION_FOUND_FOR_TOPIC_IN_CONSUMER_6FD0600E, topicName, consumerGroupId); } @@ -558,7 +573,10 @@ private static long resolveRetentionValue( final long parsedValue = Long.parseLong(topicConfig.getAttribute().get(key)); if (parsedValue == 0 || parsedValue < SubscriptionWalRetentionPolicy.UNBOUNDED) { throw new IllegalArgumentException( - String.format("Illegal %s=%s", key, topicConfig.getAttribute().get(key))); + String.format( + DataNodePipeMessages.PIPE_EXCEPTION_ILLEGAL_S_S_72D743AA, + key, + topicConfig.getAttribute().get(key))); } return normalizeRetentionValue(parsedValue); } @@ -578,12 +596,14 @@ public static void teardownConsensusSubscriptions( .removeAllStatesForTopic(consumerGroupId, topicName); LOGGER.info( - "Tore down consensus subscription for topic [{}] in consumer group [{}]", + DataNodePipeMessages + .PIPE_LOG_TORE_DOWN_CONSENSUS_SUBSCRIPTION_FOR_TOPIC_IN_CONSUMER_GROUP_80B84227, topicName, consumerGroupId); } catch (final Exception e) { LOGGER.warn( - "Failed to tear down consensus subscription for topic [{}] in consumer group [{}]", + DataNodePipeMessages + .PIPE_LOG_FAILED_TO_TEAR_DOWN_CONSENSUS_SUBSCRIPTION_FOR_TOPIC_IN_F59E8B7C, topicName, consumerGroupId, e); @@ -598,7 +618,8 @@ public static void handleNewSubscriptions( } LOGGER.info( - "Checking new subscriptions in consumer group [{}] for consensus-based topics: {}", + DataNodePipeMessages + .PIPE_LOG_CHECKING_NEW_SUBSCRIPTIONS_IN_CONSUMER_GROUP_FOR_CONSENSUS_4A56D78A, consumerGroupId, newTopicNames); @@ -614,7 +635,8 @@ public static void applyRuntimeState( final long oldRuntimeVersion = regionRuntimeVersion.getOrDefault(groupId, 0L); if (runtimeState.getRuntimeVersion() < oldRuntimeVersion) { LOGGER.info( - "ConsensusSubscriptionSetupHandler: ignore stale runtime state for region {}, incomingRuntimeVersion={}, currentRuntimeVersion={}, runtimeState={}", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSSUBSCRIPTIONSETUPHANDLER_IGNORE_STALE_RUNTIME_STATE_6C36B250, regionId, runtimeState.getRuntimeVersion(), oldRuntimeVersion, @@ -624,7 +646,8 @@ public static void applyRuntimeState( regionRuntimeVersion.put(groupId, runtimeState.getRuntimeVersion()); regionActiveWriterNodeIds.put(groupId, runtimeState.getActiveWriterNodeIds()); LOGGER.info( - "ConsensusSubscriptionSetupHandler: applying runtime state for region {}, preferred writer {} -> {}, runtimeVersion {} -> {}, runtimeState={}", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSSUBSCRIPTIONSETUPHANDLER_APPLYING_RUNTIME_STATE_1FB8937E, regionId, oldPreferredNodeId, newPreferredNodeId, @@ -672,7 +695,8 @@ public static void onRegionRouteChanged( runtimeActiveWriterNodeIds); LOGGER.info( - "ConsensusSubscriptionSetupHandler: region {} preferred writer changed {} -> {}, runtimeVersion {} -> {}, runtimeState={} (route hint)", + DataNodePipeMessages + .PIPE_LOG_CONSENSUSSUBSCRIPTIONSETUPHANDLER_REGION_PREFERRED_WRITER_46C1A894, regionId, oldPreferredNodeId, newPreferredNodeId, diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/consensus/ProgressWALIterator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/consensus/ProgressWALIterator.java index fad01221f0f6c..359715d9467c2 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/consensus/ProgressWALIterator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/consensus/ProgressWALIterator.java @@ -23,6 +23,7 @@ import org.apache.iotdb.commons.request.IConsensusRequest; import org.apache.iotdb.consensus.common.request.IndexedConsensusRequest; import org.apache.iotdb.consensus.common.request.IoTConsensusRequest; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; import org.apache.iotdb.db.storageengine.dataregion.wal.buffer.WALEntryType; import org.apache.iotdb.db.storageengine.dataregion.wal.buffer.WALInfoEntry; import org.apache.iotdb.db.storageengine.dataregion.wal.io.ProgressWALReader; @@ -169,7 +170,7 @@ public boolean hasNext() { } } catch (IOException e) { lastError = e; - LOGGER.warn("ProgressWALIterator: error reading WAL", e); + LOGGER.warn(DataNodePipeMessages.PIPE_LOG_PROGRESSWALITERATOR_ERROR_READING_WAL_2DB46D41, e); return false; } return nextReady != null; @@ -384,7 +385,8 @@ private boolean openReaderAtIndex( } catch (final IOException e) { if (isNearLiveWalVersion(versionId)) { LOGGER.debug( - "ProgressWALIterator: failed to open near-live WAL file {}, retrying without blacklisting", + DataNodePipeMessages + .PIPE_LOG_PROGRESSWALITERATOR_FAILED_TO_OPEN_NEAR_LIVE_WAL_FILE_RETRYING_5AEB94AC, walFile.getName(), e); if (allowNearLiveRetry) { @@ -405,7 +407,10 @@ private boolean openReaderAtIndex( } skippedBrokenWalVersionIds.add(versionId); LOGGER.warn( - "ProgressWALIterator: failed to open WAL file {}, skipping", walFile.getName(), e); + DataNodePipeMessages + .PIPE_LOG_PROGRESSWALITERATOR_FAILED_TO_OPEN_WAL_FILE_SKIPPING_29CA1092, + walFile.getName(), + e); return false; } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/event/batch/SubscriptionPipeEventBatch.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/event/batch/SubscriptionPipeEventBatch.java index d25573add6b38..b4cb4ca0ddb32 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/event/batch/SubscriptionPipeEventBatch.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/event/batch/SubscriptionPipeEventBatch.java @@ -20,6 +20,7 @@ package org.apache.iotdb.db.subscription.event.batch; import org.apache.iotdb.commons.pipe.event.EnrichedEvent; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; import org.apache.iotdb.db.subscription.broker.SubscriptionPrefetchingQueue; import org.apache.iotdb.db.subscription.event.SubscriptionEvent; import org.apache.iotdb.pipe.api.event.dml.insertion.TabletInsertionEvent; @@ -96,7 +97,10 @@ protected synchronized boolean onEvent( enrichedEvents.add(event); } else { LOGGER.warn( - "SubscriptionPipeEventBatch {} ignore EnrichedEvent {} when batching.", this, event); + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTIONPIPEEVENTBATCH_IGNORE_ENRICHEDEVENT_WHEN_BATCHING_E69BE90D, + this, + event); } return onEvent(consumer); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/event/batch/SubscriptionPipeEventBatchSegmentLock.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/event/batch/SubscriptionPipeEventBatchSegmentLock.java index 194eb5a8fa53b..dd21bc9e6dcf7 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/event/batch/SubscriptionPipeEventBatchSegmentLock.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/event/batch/SubscriptionPipeEventBatchSegmentLock.java @@ -19,6 +19,7 @@ package org.apache.iotdb.db.subscription.event.batch; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; import org.apache.iotdb.db.storageengine.StorageEngine; import org.slf4j.Logger; @@ -46,7 +47,7 @@ private void initIfNecessary() { lockSegmentSize = StorageEngine.getInstance().getAllDataRegionIds().size(); } catch (final Exception e) { LOGGER.warn( - "Cannot get data region ids, use default lock segment size: {}", lockSegmentSize); + DataNodePipeMessages.CANNOT_GET_DATA_REGION_IDS_USE_DEFAULT, lockSegmentSize); } lockSegmentSize = Math.min(SEGMENT_LOCK_MAX_SIZE, lockSegmentSize); lockSegmentSize = Math.max(SEGMENT_LOCK_MIN_SIZE, lockSegmentSize); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/event/batch/SubscriptionPipeTabletEventBatch.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/event/batch/SubscriptionPipeTabletEventBatch.java index d5843d1d99da2..f614b895b4f3c 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/event/batch/SubscriptionPipeTabletEventBatch.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/event/batch/SubscriptionPipeTabletEventBatch.java @@ -21,6 +21,7 @@ import org.apache.iotdb.commons.pipe.event.EnrichedEvent; import org.apache.iotdb.commons.subscription.config.SubscriptionConfig; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; import org.apache.iotdb.db.pipe.event.common.tablet.PipeInsertNodeTabletInsertionEvent; import org.apache.iotdb.db.pipe.event.common.tablet.PipeRawTabletInsertionEvent; import org.apache.iotdb.db.pipe.event.common.tsfile.PipeTsFileInsertionEvent; @@ -191,7 +192,8 @@ private Pair> convertToTablets( } LOGGER.warn( - "SubscriptionPipeTabletEventBatch {} only support convert PipeInsertNodeTabletInsertionEvent or PipeRawTabletInsertionEvent to tablet. Ignore {}.", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTIONPIPETABLETEVENTBATCH_ONLY_SUPPORT_CONVERT_PIPEINSERTNODETABLETINSERTIONEVENT_B888B8AA, this, tabletInsertionEvent); return null; @@ -281,7 +283,8 @@ public synchronized Pair> next() { } if (iteratedCount.incrementAndGet() % ITERATED_COUNT_REPORT_FREQ == 0) { LOGGER.info( - "{} has been iterated {} times, current TsFileInsertionEvent {}", + DataNodePipeMessages + .PIPE_LOG_HAS_BEEN_ITERATED_TIMES_CURRENT_TSFILEINSERTIONEVENT_0939C298, this, iteratedCount, Objects.isNull(currentTsFileInsertionEvent) @@ -298,13 +301,15 @@ private Pair> nextInternal() { currentTabletInsertionEventsIterator.next(); if (!(tabletInsertionEvent instanceof PipeRawTabletInsertionEvent)) { LOGGER.warn( - "SubscriptionPipeTabletEventBatch: Unexpected tablet insertion event {}, skipping it.", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTIONPIPETABLETEVENTBATCH_UNEXPECTED_TABLET_INSERTION_8FB1B507, tabletInsertionEvent); } else { if (!((PipeRawTabletInsertionEvent) tabletInsertionEvent) .increaseReferenceCount(this.getClass().getName())) { LOGGER.warn( - "SubscriptionPipeTabletEventBatch: Failed to increase the reference count of event {}, skipping it.", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTIONPIPETABLETEVENTBATCH_FAILED_TO_INCREASE_THE_595722D8, ((PipeRawTabletInsertionEvent) tabletInsertionEvent).coreReportMessage()); } else { iterationSnapshot.addParsedEnrichedEvent( @@ -333,7 +338,8 @@ private Pair> nextInternal() { if (enrichedEvent instanceof TsFileInsertionEvent) { if (Objects.nonNull(currentTabletInsertionEventsIterator)) { LOGGER.warn( - "SubscriptionPipeTabletEventBatch {} override non-null currentTabletInsertionEventsIterator when iterating (broken invariant).", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTIONPIPETABLETEVENTBATCH_OVERRIDE_NON_NULL_CURRENTTABLETINSERTIONEVENTSITERATOR_2633B158, this); } final PipeTsFileInsertionEvent tsFileInsertionEvent = @@ -354,7 +360,8 @@ private Pair> nextInternal() { return convertToTablets((TabletInsertionEvent) enrichedEvent); } else { LOGGER.warn( - "SubscriptionPipeTabletEventBatch {} ignore EnrichedEvent {} when iterating (broken invariant).", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTIONPIPETABLETEVENTBATCH_IGNORE_ENRICHEDEVENT_WHEN_E6BAEACE, this, enrichedEvent); return null; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/event/batch/SubscriptionPipeTsFileEventBatch.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/event/batch/SubscriptionPipeTsFileEventBatch.java index 089e25b063dd4..876bc71ef7962 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/event/batch/SubscriptionPipeTsFileEventBatch.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/event/batch/SubscriptionPipeTsFileEventBatch.java @@ -20,6 +20,7 @@ package org.apache.iotdb.db.subscription.event.batch; import org.apache.iotdb.commons.pipe.event.EnrichedEvent; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; import org.apache.iotdb.db.pipe.sink.payload.evolvable.batch.PipeTabletEventTsFileBatch; import org.apache.iotdb.db.subscription.broker.SubscriptionPrefetchingTsFileQueue; import org.apache.iotdb.db.subscription.event.SubscriptionEvent; @@ -83,7 +84,8 @@ protected void onTabletInsertionEvent(final TabletInsertionEvent event) { @Override protected void onTsFileInsertionEvent(final TsFileInsertionEvent event) { LOGGER.warn( - "SubscriptionPipeTsFileEventBatch {} ignore TsFileInsertionEvent {} when batching.", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTIONPIPETSFILEEVENTBATCH_IGNORE_TSFILEINSERTIONEVENT_88189024, this, event); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/event/cache/SubscriptionPollResponseCache.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/event/cache/SubscriptionPollResponseCache.java index 427b0f2278a94..c4b37b88263d3 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/event/cache/SubscriptionPollResponseCache.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/event/cache/SubscriptionPollResponseCache.java @@ -21,6 +21,7 @@ import org.apache.iotdb.commons.subscription.config.SubscriptionConfig; import org.apache.iotdb.db.i18n.DataNodeMiscMessages; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; import org.apache.iotdb.db.pipe.resource.PipeDataNodeResourceManager; import org.apache.iotdb.db.pipe.resource.memory.PipeMemoryBlock; import org.apache.iotdb.rpc.subscription.payload.poll.SubscriptionPollResponse; @@ -54,7 +55,8 @@ public ByteBuffer serialize(final CachedSubscriptionPollResponse response) throw return this.cache.get(response); } catch (final Exception e) { LOGGER.warn( - "SubscriptionEventBinaryCache raised an exception while serializing CachedSubscriptionPollResponse: {}", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTIONEVENTBINARYCACHE_RAISED_AN_EXCEPTION_WHILE_SERIALIZING_F3B698CB, response, e); throw new IOException(e); @@ -69,7 +71,8 @@ public Optional trySerialize(final CachedSubscriptionPollResponse re return Optional.of(serialize(response)); } catch (final IOException e) { LOGGER.warn( - "Subscription: something unexpected happened when serializing CachedSubscriptionPollResponse: {}", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_SOMETHING_UNEXPECTED_HAPPENED_WHEN_SERIALIZING_5467B7B6, response, e); return Optional.empty(); @@ -129,7 +132,8 @@ private SubscriptionPollResponseCache() { (oldMemory, newMemory) -> { cache.policy().eviction().ifPresent(eviction -> eviction.setMaximum(newMemory)); LOGGER.info( - "SubscriptionEventBinaryCache.allocatedMemoryBlock has shrunk from {} to {}.", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTIONEVENTBINARYCACHE_ALLOCATEDMEMORYBLOCK_HAS_SHRUNK_08F23ADE, oldMemory, newMemory); }) @@ -138,7 +142,8 @@ private SubscriptionPollResponseCache() { (oldMemory, newMemory) -> { cache.policy().eviction().ifPresent(eviction -> eviction.setMaximum(newMemory)); LOGGER.info( - "SubscriptionEventBinaryCache.allocatedMemoryBlock has expanded from {} to {}.", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTIONEVENTBINARYCACHE_ALLOCATEDMEMORYBLOCK_HAS_EXPANDED_52A971D9, oldMemory, newMemory); }); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/event/response/SubscriptionEventTabletResponse.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/event/response/SubscriptionEventTabletResponse.java index a06267d7b7617..8be023f74eeb7 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/event/response/SubscriptionEventTabletResponse.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/event/response/SubscriptionEventTabletResponse.java @@ -21,6 +21,7 @@ import org.apache.iotdb.commons.exception.pipe.PipeRuntimeOutOfMemoryCriticalException; import org.apache.iotdb.commons.subscription.config.SubscriptionConfig; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; import org.apache.iotdb.db.pipe.resource.PipeDataNodeResourceManager; import org.apache.iotdb.db.pipe.resource.memory.PipeMemoryManager; import org.apache.iotdb.db.pipe.resource.memory.PipeMemoryWeightUtil; @@ -109,7 +110,8 @@ public void fetchNextResponse(final long offset /* unused */) throws Exception { final CachedSubscriptionPollResponse previousResponse; if (Objects.isNull(previousResponse = poll())) { LOGGER.warn( - "SubscriptionEventTabletResponse {} is empty when fetching next response (broken invariant)", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTIONEVENTTABLETRESPONSE_IS_EMPTY_WHEN_FETCHING_NEXT_4464E3F2, this); } else { previousResponse.closeMemoryBlock(); @@ -147,7 +149,8 @@ public boolean isCommittable() { private void init() { if (!isEmpty()) { LOGGER.warn( - "SubscriptionEventTabletResponse {} is not empty when initializing (broken invariant)", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTIONEVENTTABLETRESPONSE_IS_NOT_EMPTY_WHEN_INITIALIZING_88F075C9, this); return; } @@ -204,7 +207,8 @@ private synchronized CachedSubscriptionPollResponse generateNextTabletResponse() if (bufferSize > READ_TABLET_BUFFER_SIZE) { // TODO: split tablets LOGGER.warn( - "Detect large tablets with {} byte(s), current tablets size {} byte(s)", + DataNodePipeMessages + .PIPE_LOG_DETECT_LARGE_TABLETS_WITH_BYTE_S_CURRENT_TABLETS_SIZE_BYTE_4D472E38, bufferSize, currentTablets); response = @@ -283,13 +287,15 @@ private void waitForResourceEnough4Parsing(final long timeoutMs) throws Interrup final double waitTimeSeconds = (currentTime - startTime) / 1000.0; if (elapsedRecordTimeSeconds > 10.0) { LOGGER.info( - "SubscriptionEventTabletResponse {} wait for resource enough for parsing tablets {} seconds.", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTIONEVENTTABLETRESPONSE_WAIT_FOR_RESOURCE_ENOUGH_9926289F, commitContext, waitTimeSeconds); lastRecordTime = currentTime; } else if (LOGGER.isDebugEnabled()) { LOGGER.debug( - "SubscriptionEventTabletResponse {} wait for resource enough for parsing tablets {} seconds.", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTIONEVENTTABLETRESPONSE_WAIT_FOR_RESOURCE_ENOUGH_9926289F, commitContext, waitTimeSeconds); } @@ -297,14 +303,17 @@ private void waitForResourceEnough4Parsing(final long timeoutMs) throws Interrup if (waitTimeSeconds * 1000 > timeoutMs) { // should contain 'TimeoutException' in exception message throw new PipeException( - String.format("TimeoutException: Waited %s seconds", waitTimeSeconds)); + String.format( + DataNodePipeMessages.PIPE_EXCEPTION_TIMEOUTEXCEPTION_WAITED_S_SECONDS_8B31A3A5, + waitTimeSeconds)); } } final long currentTime = System.currentTimeMillis(); final double waitTimeSeconds = (currentTime - startTime) / 1000.0; LOGGER.info( - "SubscriptionEventTabletResponse {} wait for resource enough for parsing tablets {} seconds.", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTIONEVENTTABLETRESPONSE_WAIT_FOR_RESOURCE_ENOUGH_9926289F, commitContext, waitTimeSeconds); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/event/response/SubscriptionEventTsFileResponse.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/event/response/SubscriptionEventTsFileResponse.java index ee8ef1fdb8952..50bcaac15e7f4 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/event/response/SubscriptionEventTsFileResponse.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/event/response/SubscriptionEventTsFileResponse.java @@ -22,6 +22,7 @@ import org.apache.iotdb.commons.exception.pipe.PipeRuntimeOutOfMemoryCriticalException; import org.apache.iotdb.commons.subscription.config.SubscriptionConfig; import org.apache.iotdb.db.i18n.DataNodeMiscMessages; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; import org.apache.iotdb.db.pipe.resource.PipeDataNodeResourceManager; import org.apache.iotdb.db.pipe.resource.memory.PipeMemoryManager; import org.apache.iotdb.db.pipe.resource.memory.PipeTsFileMemoryBlock; @@ -91,7 +92,8 @@ public void fetchNextResponse(final long offset) throws Exception { final CachedSubscriptionPollResponse previousResponse; if (Objects.isNull(previousResponse = poll())) { LOGGER.warn( - "SubscriptionEventTsFileResponse {} is empty when fetching next response (broken invariant)", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTIONEVENTTSFILERESPONSE_IS_EMPTY_WHEN_FETCHING_NEXT_DFD60DF1, this); } else { previousResponse.closeMemoryBlock(); @@ -114,7 +116,8 @@ public synchronized void cleanUp() { private void init() { if (!isEmpty()) { LOGGER.warn( - "SubscriptionEventTsFileResponse {} is not empty when initializing (broken invariant)", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTIONEVENTTSFILERESPONSE_IS_NOT_EMPTY_WHEN_INITIALIZING_C9DE83C9, this); return; } @@ -136,7 +139,8 @@ private synchronized Optional generateNextTsFile final SubscriptionPollResponse previousResponse = peekLast(); if (Objects.isNull(previousResponse)) { LOGGER.warn( - "SubscriptionEventTsFileResponse {} is empty when generating next response (broken invariant)", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTIONEVENTTSFILERESPONSE_IS_EMPTY_WHEN_GENERATING_B8D03E93, this); return Optional.empty(); } @@ -199,8 +203,10 @@ private CachedSubscriptionPollResponse generateResponseWithPieceOrSealPayload( memoryBlock.close(); throw new SubscriptionException( String.format( - "inconsistent read length (broken invariant), expected: %s, actual: %s", - bufferSize, readLength)); + DataNodePipeMessages + .PIPE_EXCEPTION_INCONSISTENT_READ_LENGTH_BROKEN_INVARIANT_EXPECTED_S_ACTUAL_9203668A, + bufferSize, + readLength)); } // generate subscription poll response with piece payload @@ -235,13 +241,13 @@ private void waitForResourceEnough4Slicing(final long timeoutMs) throws Interrup final double waitTimeSeconds = (currentTime - startTime) / 1000.0; if (elapsedRecordTimeSeconds > 10.0) { LOGGER.info( - "Wait for resource enough for slicing tsfile {} for {} seconds.", + DataNodePipeMessages.WAIT_FOR_RESOURCE_ENOUGH_FOR_SLICING_TSFILE, tsFile, waitTimeSeconds); lastRecordTime = currentTime; } else if (LOGGER.isDebugEnabled()) { LOGGER.debug( - "Wait for resource enough for slicing tsfile {} for {} seconds.", + DataNodePipeMessages.WAIT_FOR_RESOURCE_ENOUGH_FOR_SLICING_TSFILE, tsFile, waitTimeSeconds); } @@ -250,14 +256,16 @@ private void waitForResourceEnough4Slicing(final long timeoutMs) throws Interrup // should contain 'TimeoutException' in exception message // see org.apache.iotdb.rpc.subscription.exception.SubscriptionTimeoutException.KEYWORD throw new SubscriptionException( - String.format("TimeoutException: Waited %s seconds", waitTimeSeconds)); + String.format( + DataNodePipeMessages.PIPE_EXCEPTION_TIMEOUTEXCEPTION_WAITED_S_SECONDS_8B31A3A5, + waitTimeSeconds)); } } final long currentTime = System.currentTimeMillis(); final double waitTimeSeconds = (currentTime - startTime) / 1000.0; LOGGER.info( - "Wait for resource enough for slicing tsfile {} for {} seconds.", tsFile, waitTimeSeconds); + DataNodePipeMessages.WAIT_FOR_RESOURCE_ENOUGH_FOR_SLICING_TSFILE, tsFile, waitTimeSeconds); } /////////////////////////////// stringify /////////////////////////////// diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/metric/ConsensusSubscriptionPrefetchingQueueMetrics.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/metric/ConsensusSubscriptionPrefetchingQueueMetrics.java index ecf79360237b7..1172e16bd55f7 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/metric/ConsensusSubscriptionPrefetchingQueueMetrics.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/metric/ConsensusSubscriptionPrefetchingQueueMetrics.java @@ -21,6 +21,7 @@ import org.apache.iotdb.commons.service.metric.enums.Metric; import org.apache.iotdb.commons.service.metric.enums.Tag; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; import org.apache.iotdb.db.subscription.broker.consensus.ConsensusPrefetchingQueue; import org.apache.iotdb.metrics.AbstractMetricService; import org.apache.iotdb.metrics.metricsets.IMetricSet; @@ -64,7 +65,8 @@ public void unbindFrom(final AbstractMetricService metricService) { } if (!queueMap.isEmpty()) { LOGGER.warn( - "Failed to unbind from consensus subscription prefetching queue metrics, queue map not empty"); + DataNodePipeMessages + .PIPE_LOG_FAILED_TO_UNBIND_FROM_CONSENSUS_SUBSCRIPTION_PREFETCHING_A8F920D9); } } @@ -150,8 +152,8 @@ private void createRate(final String id) { public void deregister(final String id) { if (!queueMap.containsKey(id)) { LOGGER.warn( - "Failed to deregister consensus subscription prefetching queue metrics, " - + "ConsensusPrefetchingQueue({}) does not exist", + DataNodePipeMessages + .PIPE_LOG_FAILED_TO_DEREGISTER_CONSENSUS_SUBSCRIPTION_PREFETCHING_8B180091, id); return; } @@ -222,7 +224,9 @@ public void mark(final String id, final long size) { final Rate rate = rateMap.get(id); if (rate == null) { LOGGER.warn( - "Failed to mark transfer event rate, ConsensusPrefetchingQueue({}) does not exist", id); + DataNodePipeMessages + .PIPE_LOG_FAILED_TO_MARK_TRANSFER_EVENT_RATE_CONSENSUSPREFETCHINGQUEUE_FE9B91C3, + id); return; } rate.mark(size); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/metric/SubscriptionPrefetchingQueueMetrics.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/metric/SubscriptionPrefetchingQueueMetrics.java index aa061cc8ff3f9..250191fcdf140 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/metric/SubscriptionPrefetchingQueueMetrics.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/metric/SubscriptionPrefetchingQueueMetrics.java @@ -21,6 +21,7 @@ import org.apache.iotdb.commons.service.metric.enums.Metric; import org.apache.iotdb.commons.service.metric.enums.Tag; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; import org.apache.iotdb.db.subscription.broker.SubscriptionPrefetchingQueue; import org.apache.iotdb.metrics.AbstractMetricService; import org.apache.iotdb.metrics.metricsets.IMetricSet; @@ -65,7 +66,8 @@ public void unbindFrom(final AbstractMetricService metricService) { } if (!prefetchingQueueMap.isEmpty()) { LOGGER.warn( - "Failed to unbind from subscription prefetching queue metrics, prefetching queue map not empty"); + DataNodePipeMessages + .PIPE_LOG_FAILED_TO_UNBIND_FROM_SUBSCRIPTION_PREFETCHING_QUEUE_METRICS_6614388C); } } @@ -119,7 +121,8 @@ private void createRate(final String id) { public void deregister(final String id) { if (!prefetchingQueueMap.containsKey(id)) { LOGGER.warn( - "Failed to deregister subscription prefetching queue metrics, SubscriptionPrefetchingQueue({}) does not exist", + DataNodePipeMessages + .PIPE_LOG_FAILED_TO_DEREGISTER_SUBSCRIPTION_PREFETCHING_QUEUE_METRICS_F08479A7, id); return; } @@ -167,7 +170,8 @@ public void mark(final String id, final long size) { final Rate rate = rateMap.get(id); if (rate == null) { LOGGER.warn( - "Failed to mark transfer event rate, SubscriptionPrefetchingQueue({}) does not exist", + DataNodePipeMessages + .PIPE_LOG_FAILED_TO_MARK_TRANSFER_EVENT_RATE_SUBSCRIPTIONPREFETCHINGQUEUE_7DEF95B5, id); return; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/receiver/SubscriptionReceiverV1.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/receiver/SubscriptionReceiverV1.java index 3c76d09c88dd5..3a9854909967f 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/receiver/SubscriptionReceiverV1.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/receiver/SubscriptionReceiverV1.java @@ -34,6 +34,7 @@ import org.apache.iotdb.confignode.rpc.thrift.TUnsubscribeReq; import org.apache.iotdb.db.conf.IoTDBDescriptor; import org.apache.iotdb.db.i18n.DataNodeMiscMessages; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; import org.apache.iotdb.db.protocol.client.ConfigNodeClient; import org.apache.iotdb.db.protocol.client.ConfigNodeClientManager; import org.apache.iotdb.db.protocol.client.ConfigNodeInfo; @@ -184,7 +185,8 @@ public void handleExit() { final ConsumerConfig consumerConfig = consumerConfigThreadLocal.get(); if (Objects.nonNull(consumerConfig)) { LOGGER.info( - "Subscription: remove consumer config {} when handling exit", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_REMOVE_CONSUMER_CONFIG_WHEN_HANDLING_EXIT_3827D0E8, consumerConfigThreadLocal.get()); // we should not close the consumer here because it might reuse the previous consumption // progress to continue consuming @@ -216,7 +218,8 @@ public void handleTimeout() { } LOGGER.info( - "Subscription: consumer {} is inactive for {} ms, exceeding timeout {} ms, close it on server side.", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_CONSUMER_IS_INACTIVE_FOR_MS_EXCEEDING_TIMEOUT_36E06B11, consumerConfig, inactiveMs, timeoutMs); @@ -224,7 +227,8 @@ public void handleTimeout() { closeConsumer(consumerConfig); } catch (final Exception e) { LOGGER.warn( - "Subscription: failed to close timed out consumer {} after {} ms inactivity", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_FAILED_TO_CLOSE_TIMED_OUT_CONSUMER_AFTER_MS_89CC11F1, consumerConfig, inactiveMs, e); @@ -281,7 +285,8 @@ private TPipeSubscribeResp handlePipeSubscribeHandshakeInternal( } else { if (!existedConsumerConfig.equals(consumerConfig)) { LOGGER.warn( - "Subscription: Detect stale consumer config when handshaking, stale consumer config {} will be cleared, consumer config will set to the incoming consumer config {}.", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_DETECT_STALE_CONSUMER_CONFIG_WHEN_HANDSHAKING_B0196DB8, existedConsumerConfig, consumerConfig); // drop stale consumer @@ -295,7 +300,8 @@ private TPipeSubscribeResp handlePipeSubscribeHandshakeInternal( createConsumer(consumerConfig); } else { LOGGER.info( - "Subscription: The consumer {} has already existed when handshaking, skip creating consumer.", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_THE_CONSUMER_HAS_ALREADY_EXISTED_WHEN_HANDSHAKING_3761AD81, consumerConfig); } @@ -303,7 +309,8 @@ private TPipeSubscribeResp handlePipeSubscribeHandshakeInternal( final int dataNodeId = IoTDBDescriptor.getInstance().getConfig().getDataNodeId(); LOGGER.info( - "Subscription: consumer {} handshake successfully, data node id: {}", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_CONSUMER_HANDSHAKE_SUCCESSFULLY_DATA_NODE_ID_58DA6A5F, req.getConsumerConfig(), dataNodeId); return PipeSubscribeHandshakeResp.toTPipeSubscribeResp( @@ -329,7 +336,10 @@ private TPipeSubscribeResp handleSubscriptionHeartbeatInternal(final Subscriptio // check consumer config thread local final ConsumerConfig consumerConfig = consumerConfigThreadLocal.get(); if (Objects.isNull(consumerConfig)) { - LOGGER.warn("Subscription: missing consumer config when handling heartbeat request: {}", req); + LOGGER.warn( + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_MISSING_CONSUMER_CONFIG_WHEN_HANDLING_HEARTBEAT_B9EFB1CC, + req); return SUBSCRIPTION_MISSING_CONSUMER_RESP; } @@ -341,7 +351,8 @@ private TPipeSubscribeResp handleSubscriptionHeartbeatInternal(final Subscriptio if (Objects.nonNull(processorBufferedCommitContexts) && !processorBufferedCommitContexts.isEmpty()) { LOGGER.debug( - "Subscription: consumer {} refreshed {} of {} processor-buffered commit context lease(s)", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_CONSUMER_REFRESHED_OF_PROCESSOR_BUFFERED_COMMIT_8C7A352A, consumerConfig, refreshedCount, processorBufferedCommitContexts.size()); @@ -377,7 +388,8 @@ private TPipeSubscribeResp handleSubscriptionHeartbeatInternal(final Subscriptio } } catch (final ClientManagerException | TException e) { LOGGER.warn( - "Exception occurred when fetch endpoints for consumer {} in config node", + DataNodePipeMessages + .PIPE_LOG_EXCEPTION_OCCURRED_WHEN_FETCH_ENDPOINTS_FOR_CONSUMER_IN_325B571A, consumerConfig, e); final String exceptionMessage = @@ -420,7 +432,9 @@ private TPipeSubscribeResp handlePipeSubscribeSubscribeInternal( final ConsumerConfig consumerConfig = consumerConfigThreadLocal.get(); if (Objects.isNull(consumerConfig)) { LOGGER.warn( - "Subscription: missing consumer config when handling PipeSubscribeSubscribeReq: {}", req); + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_MISSING_CONSUMER_CONFIG_WHEN_HANDLING_PIPESUBSCRIBESUBSCRIBEREQ_DF466A30, + req); return SUBSCRIPTION_MISSING_CONSUMER_RESP; } @@ -462,7 +476,8 @@ private TPipeSubscribeResp handlePipeSubscribeUnsubscribeInternal( final ConsumerConfig consumerConfig = consumerConfigThreadLocal.get(); if (Objects.isNull(consumerConfig)) { LOGGER.warn( - "Subscription: missing consumer config when handling PipeSubscribeUnsubscribeReq: {}", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_MISSING_CONSUMER_CONFIG_WHEN_HANDLING_PIPESUBSCRIBEUNSUBSCRIBEREQ_673CE701, req); return SUBSCRIPTION_MISSING_CONSUMER_RESP; } @@ -472,7 +487,9 @@ private TPipeSubscribeResp handlePipeSubscribeUnsubscribeInternal( unsubscribe(consumerConfig, topicNames); LOGGER.info( - "Subscription: consumer {} unsubscribe {} successfully", consumerConfig, topicNames); + DataNodePipeMessages.PIPE_LOG_SUBSCRIPTION_CONSUMER_UNSUBSCRIBE_SUCCESSFULLY_AA5E0AA9, + consumerConfig, + topicNames); return PipeSubscribeUnsubscribeResp.toTPipeSubscribeResp( RpcUtils.SUCCESS_STATUS, SubscriptionAgent.topic() @@ -504,7 +521,9 @@ private TPipeSubscribeResp handlePipeSubscribePollInternal(final PipeSubscribePo final ConsumerConfig consumerConfig = consumerConfigThreadLocal.get(); if (Objects.isNull(consumerConfig)) { LOGGER.warn( - "Subscription: missing consumer config when handling PipeSubscribePollReq: {}", req); + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_MISSING_CONSUMER_CONFIG_WHEN_HANDLING_PIPESUBSCRIBEPOLLREQ_6BB9292B, + req); return SUBSCRIPTION_MISSING_CONSUMER_RESP; } @@ -562,7 +581,8 @@ private TPipeSubscribeResp handlePipeSubscribePollInternal(final PipeSubscribePo SubscriptionAgent.broker() .isCommitContextOutdated(event.getCommitContext()); LOGGER.warn( - "Subscription: consumer {} poll null response for event {} (outdated: {}) with request: {}", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_CONSUMER_POLL_NULL_RESPONSE_FOR_EVENT_OUTDATED_4CF7FAAA, consumerConfig, event, isOutdated, @@ -583,8 +603,10 @@ private TPipeSubscribeResp handlePipeSubscribePollInternal(final PipeSubscribePo if (totalSize.get() + size > maxBytes) { throw new SubscriptionPayloadExceedException( String.format( - "payload size %s byte(s) will exceed the threshold %s byte(s)", - totalSize.get() + size, maxBytes)); + DataNodePipeMessages + .PIPE_EXCEPTION_PAYLOAD_SIZE_S_BYTE_S_WILL_EXCEED_THE_THRESHOLD_S_BYTE_S_6043B3D8, + totalSize.get() + size, + maxBytes)); } totalSize.getAndAdd(size); @@ -604,13 +626,15 @@ private TPipeSubscribeResp handlePipeSubscribePollInternal(final PipeSubscribePo || response.getResponseType() == SubscriptionPollResponseType.TABLETS.getType()) { LOGGER.debug( - "Subscription: consumer {} poll {} successfully with request: {}", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_CONSUMER_POLL_SUCCESSFULLY_WITH_REQUEST_6BC8BFED, consumerConfig, response, req.getRequest()); } else { LOGGER.info( - "Subscription: consumer {} poll {} successfully with request: {}", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_CONSUMER_POLL_SUCCESSFULLY_WITH_REQUEST_6BC8BFED, consumerConfig, response, req.getRequest()); @@ -622,7 +646,8 @@ private TPipeSubscribeResp handlePipeSubscribePollInternal(final PipeSubscribePo .isCommitContextOutdated(event.getCommitContext()); if (e instanceof SubscriptionPayloadExceedException) { LOGGER.error( - "Subscription: consumer {} poll excessive payload {} for event {} (outdated: {}) with request: {}, something unexpected happened with parameter configuration or payload control...", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_CONSUMER_POLL_EXCESSIVE_PAYLOAD_FOR_EVENT_OUTDATED_2BFF690B, consumerConfig, response, event, @@ -631,7 +656,8 @@ private TPipeSubscribeResp handlePipeSubscribePollInternal(final PipeSubscribePo e); } else { LOGGER.warn( - "Subscription: consumer {} poll {} for event {} (outdated: {}) failed with request: {}", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_CONSUMER_POLL_FOR_EVENT_OUTDATED_FAILED_WITH_0BEFF244, consumerConfig, response, event, @@ -703,7 +729,9 @@ private TPipeSubscribeResp handlePipeSubscribeCommitInternal(final PipeSubscribe final ConsumerConfig consumerConfig = consumerConfigThreadLocal.get(); if (Objects.isNull(consumerConfig)) { LOGGER.warn( - "Subscription: missing consumer config when handling PipeSubscribeCommitReq: {}", req); + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_MISSING_CONSUMER_CONFIG_WHEN_HANDLING_PIPESUBSCRIBECOMMITREQ_76B28EBB, + req); return SUBSCRIPTION_MISSING_CONSUMER_RESP; } @@ -738,20 +766,23 @@ private TPipeSubscribeResp handlePipeSubscribeCommitInternal(final PipeSubscribe if (Objects.equals(acceptedCommitContexts.size(), commitContexts.size())) { LOGGER.info( - "Subscription: consumer {} commit (nack: {}) accepted successfully, summary: {}", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_CONSUMER_COMMIT_NACK_ACCEPTED_SUCCESSFULLY_58D1C111, consumerConfig, nack, summarizeCommitContexts(commitContexts)); if (LOGGER.isDebugEnabled()) { LOGGER.debug( - "Subscription: consumer {} commit (nack: {}) full commit contexts: {}", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_CONSUMER_COMMIT_NACK_FULL_COMMIT_CONTEXTS_CFC18359, consumerConfig, nack, commitContexts); } } else { LOGGER.warn( - "Subscription: consumer {} commit (nack: {}) partially accepted, requested summary: {}, accepted summary: {}, stale unsubscribed summary: {}", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_CONSUMER_COMMIT_NACK_PARTIALLY_ACCEPTED_REQUESTED_87D0C038, consumerConfig, nack, summarizeCommitContexts(commitContexts), @@ -759,7 +790,8 @@ private TPipeSubscribeResp handlePipeSubscribeCommitInternal(final PipeSubscribe summarizeCommitContexts(staleUnsubscribedCommitContexts)); if (LOGGER.isDebugEnabled()) { LOGGER.debug( - "Subscription: consumer {} commit (nack: {}) full requested commit contexts: {}, full accepted commit contexts: {}, full stale unsubscribed commit contexts: {}", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_CONSUMER_COMMIT_NACK_FULL_REQUESTED_COMMIT_1E67E8A3, consumerConfig, nack, commitContexts, @@ -848,7 +880,9 @@ private TPipeSubscribeResp handlePipeSubscribeCloseInternal(final PipeSubscribeC final ConsumerConfig consumerConfig = consumerConfigThreadLocal.get(); if (Objects.isNull(consumerConfig)) { LOGGER.warn( - "Subscription: missing consumer config when handling PipeSubscribeCloseReq: {}", req); + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_MISSING_CONSUMER_CONFIG_WHEN_HANDLING_PIPESUBSCRIBECLOSEREQ_717660F8, + req); return SUBSCRIPTION_MISSING_CONSUMER_RESP; } @@ -863,7 +897,10 @@ private TPipeSubscribeResp handleSubscriptionSeek(final SubscriptionSeekReq req) try { return handleSubscriptionSeekInternal(req); } catch (final Exception e) { - LOGGER.warn("Exception occurred when seeking with request {}", req, e); + LOGGER.warn( + DataNodePipeMessages.PIPE_LOG_EXCEPTION_OCCURRED_WHEN_SEEKING_WITH_REQUEST_6B581543, + req, + e); final String exceptionMessage = String.format( "Subscription: something unexpected happened when seeking with request %s: %s", @@ -878,7 +915,9 @@ private TPipeSubscribeResp handleSubscriptionSeekInternal(final SubscriptionSeek final ConsumerConfig consumerConfig = consumerConfigThreadLocal.get(); if (Objects.isNull(consumerConfig)) { LOGGER.warn( - "Subscription: missing consumer config when handling subscription seek request: {}", req); + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_MISSING_CONSUMER_CONFIG_WHEN_HANDLING_SUBSCRIPTION_B85D47A4, + req); return SUBSCRIPTION_MISSING_CONSUMER_RESP; } @@ -889,7 +928,8 @@ private TPipeSubscribeResp handleSubscriptionSeekInternal(final SubscriptionSeek SubscriptionAgent.broker() .seekToTopicProgress(consumerConfig, topicName, req.getTopicProgress()); LOGGER.info( - "Subscription: consumer {} seek topic {} to topicProgress(regionCount={})", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_CONSUMER_SEEK_TOPIC_TO_TOPICPROGRESS_REGIONCOUNT_41702313, consumerConfig, topicName, req.getTopicProgress().getRegionProgress().size()); @@ -897,7 +937,8 @@ private TPipeSubscribeResp handleSubscriptionSeekInternal(final SubscriptionSeek SubscriptionAgent.broker() .seekAfterTopicProgress(consumerConfig, topicName, req.getTopicProgress()); LOGGER.info( - "Subscription: consumer {} seekAfter topic {} to topicProgress(regionCount={})", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_CONSUMER_SEEKAFTER_TOPIC_TO_TOPICPROGRESS_REGIONCOUNT_838584F8, consumerConfig, topicName, req.getTopicProgress().getRegionProgress().size()); @@ -905,7 +946,7 @@ private TPipeSubscribeResp handleSubscriptionSeekInternal(final SubscriptionSeek || seekType == SubscriptionSeekReq.SEEK_TO_END) { SubscriptionAgent.broker().seek(consumerConfig, topicName, seekType); LOGGER.info( - "Subscription: consumer {} seek topic {} with seekType={}", + DataNodePipeMessages.PIPE_LOG_SUBSCRIPTION_CONSUMER_SEEK_TOPIC_WITH_SEEKTYPE_799FF449, consumerConfig, topicName, seekType); @@ -932,7 +973,8 @@ private void closeConsumer(final ConsumerConfig consumerConfig) { consumerConfig.getConsumerGroupId(), consumerConfig.getConsumerId()); if (!topicNames.isEmpty()) { LOGGER.info( - "Subscription: unsubscribe all subscribed topics {} before close consumer {}", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_UNSUBSCRIBE_ALL_SUBSCRIBED_TOPICS_BEFORE_CLOSE_BFB787AE, topicNames, consumerConfig); try { @@ -949,7 +991,8 @@ private void closeConsumer(final ConsumerConfig consumerConfig) { dropConsumer(consumerConfig); } else { LOGGER.info( - "Subscription: The consumer {} does not existed when closing, skip dropping consumer.", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_THE_CONSUMER_DOES_NOT_EXISTED_WHEN_CLOSING_CCB63DCB, consumerConfig); } @@ -977,7 +1020,8 @@ private void unsubscribeCompleteTopics(final ConsumerConfig consumerConfig) { unsubscribe(consumerConfig, new HashSet<>(topicNamesToUnsubscribe)); LOGGER.info( - "Subscription: consumer {} unsubscribe {} (completed topics) successfully", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTION_CONSUMER_UNSUBSCRIBE_COMPLETED_TOPICS_SUCCESSFULLY_44BAFF55, consumerConfig, topicNamesToUnsubscribe); } @@ -995,7 +1039,8 @@ private void createConsumer(final ConsumerConfig consumerConfig) throws Subscrip final TSStatus tsStatus = configNodeClient.createConsumer(req); if (TSStatusCode.SUCCESS_STATUS.getStatusCode() != tsStatus.getCode()) { LOGGER.warn( - "Unexpected status code {} when creating consumer {} in config node", + DataNodePipeMessages + .PIPE_LOG_UNEXPECTED_STATUS_CODE_WHEN_CREATING_CONSUMER_IN_CONFIG_5D2E1B97, tsStatus, consumerConfig); final String exceptionMessage = @@ -1024,7 +1069,8 @@ private void dropConsumer(final ConsumerConfig consumerConfig) throws Subscripti final TSStatus tsStatus = configNodeClient.closeConsumer(req); if (TSStatusCode.SUCCESS_STATUS.getStatusCode() != tsStatus.getCode()) { LOGGER.warn( - "Unexpected status code {} when closing consumer {} in config node", + DataNodePipeMessages + .PIPE_LOG_UNEXPECTED_STATUS_CODE_WHEN_CLOSING_CONSUMER_IN_CONFIG_NODE_0C2E0CE6, tsStatus, consumerConfig); final String exceptionMessage = @@ -1059,7 +1105,8 @@ private void subscribe(final ConsumerConfig consumerConfig, final Set to final TSStatus tsStatus = configNodeClient.createSubscription(req); if (TSStatusCode.SUCCESS_STATUS.getStatusCode() != tsStatus.getCode()) { LOGGER.warn( - "Unexpected status code {} when subscribing topics {} for consumer {} in config node", + DataNodePipeMessages + .PIPE_LOG_UNEXPECTED_STATUS_CODE_WHEN_SUBSCRIBING_TOPICS_FOR_CONSUMER_8676DA8A, tsStatus, topicNames, consumerConfig); @@ -1075,7 +1122,8 @@ private void subscribe(final ConsumerConfig consumerConfig, final Set to } } catch (final ClientManagerException | TException e) { LOGGER.warn( - "Exception occurred when subscribing topics {} for consumer {} in config node", + DataNodePipeMessages + .PIPE_LOG_EXCEPTION_OCCURRED_WHEN_SUBSCRIBING_TOPICS_FOR_CONSUMER_E5D72F10, topicNames, consumerConfig, e); @@ -1101,7 +1149,8 @@ private void unsubscribe(final ConsumerConfig consumerConfig, final Set final TSStatus tsStatus = configNodeClient.dropSubscription(req); if (TSStatusCode.SUCCESS_STATUS.getStatusCode() != tsStatus.getCode()) { LOGGER.warn( - "Unexpected status code {} when unsubscribing topics {} for consumer {} in config node", + DataNodePipeMessages + .PIPE_LOG_UNEXPECTED_STATUS_CODE_WHEN_UNSUBSCRIBING_TOPICS_FOR_CONSUMER_EFC771F0, tsStatus, topicNames, consumerConfig); @@ -1117,7 +1166,8 @@ private void unsubscribe(final ConsumerConfig consumerConfig, final Set } } catch (final ClientManagerException | TException e) { LOGGER.warn( - "Exception occurred when unsubscribing topics {} for consumer {} in config node", + DataNodePipeMessages + .PIPE_LOG_EXCEPTION_OCCURRED_WHEN_UNSUBSCRIBING_TOPICS_FOR_CONSUMER_FE4B3CEE, topicNames, consumerConfig, e); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/task/execution/ConsensusSubscriptionPrefetchExecutor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/task/execution/ConsensusSubscriptionPrefetchExecutor.java index 660de3770cd7d..01700febb455b 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/task/execution/ConsensusSubscriptionPrefetchExecutor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/task/execution/ConsensusSubscriptionPrefetchExecutor.java @@ -22,6 +22,7 @@ import org.apache.iotdb.commons.concurrent.IoTDBThreadPoolFactory; import org.apache.iotdb.commons.concurrent.ThreadName; import org.apache.iotdb.commons.subscription.config.SubscriptionConfig; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; import org.apache.iotdb.db.subscription.task.subtask.ConsensusPrefetchSubtask; import org.slf4j.Logger; @@ -78,11 +79,15 @@ public ConsensusSubscriptionPrefetchExecutor() { public synchronized boolean register(final ConsensusPrefetchSubtask subtask) { if (shutdown.get()) { LOGGER.warn( - "Consensus prefetch executor is shutdown, skip registering {}", subtask.getTaskId()); + DataNodePipeMessages + .PIPE_LOG_CONSENSUS_PREFETCH_EXECUTOR_IS_SHUTDOWN_SKIP_REGISTERING_83E36171, + subtask.getTaskId()); return false; } if (taskIdToSubtask.putIfAbsent(subtask.getTaskId(), subtask) != null) { - LOGGER.warn("Consensus prefetch subtask {} is already registered", subtask.getTaskId()); + LOGGER.warn( + DataNodePipeMessages.PIPE_LOG_CONSENSUS_PREFETCH_SUBTASK_IS_ALREADY_REGISTERED_419FE7AD, + subtask.getTaskId()); return false; } subtask.bindExecutor(this); @@ -154,7 +159,9 @@ private void workerLoop() { } catch (final InterruptedException e) { Thread.currentThread().interrupt(); } catch (final Throwable t) { - LOGGER.error("Consensus prefetch worker loop exits abnormally", t); + LOGGER.error( + DataNodePipeMessages.PIPE_LOG_CONSENSUS_PREFETCH_WORKER_LOOP_EXITS_ABNORMALLY_531EE564, + t); } } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/task/subtask/ConsensusPrefetchSubtask.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/task/subtask/ConsensusPrefetchSubtask.java index e038fb7d6e2fc..e2de603eda1a8 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/task/subtask/ConsensusPrefetchSubtask.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/task/subtask/ConsensusPrefetchSubtask.java @@ -19,6 +19,7 @@ package org.apache.iotdb.db.subscription.task.subtask; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; import org.apache.iotdb.db.subscription.broker.consensus.ConsensusPrefetchingQueue; import org.apache.iotdb.db.subscription.broker.consensus.PrefetchRoundResult; import org.apache.iotdb.db.subscription.task.execution.ConsensusSubscriptionPrefetchExecutor; @@ -112,7 +113,11 @@ public void runOneRound() { result = queue.drivePrefetchOnce(); } catch (final Throwable t) { LOGGER.error( - "ConsensusPrefetchSubtask {}: unexpected error while driving queue {}", taskId, queue, t); + DataNodePipeMessages + .PIPE_LOG_CONSENSUSPREFETCHSUBTASK_UNEXPECTED_ERROR_WHILE_DRIVING_D361F4C2, + taskId, + queue, + t); result = PrefetchRoundResult.rescheduleAfter(100L); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/task/subtask/SubscriptionSinkSubtask.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/task/subtask/SubscriptionSinkSubtask.java index 7b67f79e62291..454ce2b80b6c6 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/task/subtask/SubscriptionSinkSubtask.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/task/subtask/SubscriptionSinkSubtask.java @@ -20,6 +20,7 @@ package org.apache.iotdb.db.subscription.task.subtask; import org.apache.iotdb.commons.pipe.agent.task.connection.UnboundedBlockingPendingQueue; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; import org.apache.iotdb.db.pipe.agent.task.subtask.sink.PipeSinkSubtask; import org.apache.iotdb.db.subscription.agent.SubscriptionAgent; import org.apache.iotdb.db.subscription.broker.consensus.ConsensusSubscriptionSetupHandler; @@ -93,7 +94,8 @@ public synchronized void onFailure(final Throwable throwable) { if (isConsensusDrivenTopic()) { LOGGER.warn( - "SubscriptionSinkSubtask for consensus topic [{}] failed unexpectedly, skip auto-resubmit", + DataNodePipeMessages + .PIPE_LOG_SUBSCRIPTIONSINKSUBTASK_FOR_CONSENSUS_TOPIC_FAILED_UNEXPECTEDLY_FC41B565, topicName, throwable); return; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/task/subtask/SubscriptionSinkSubtaskLifeCycle.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/task/subtask/SubscriptionSinkSubtaskLifeCycle.java index 3b1a9d462068e..3a0f52e3f99f6 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/task/subtask/SubscriptionSinkSubtaskLifeCycle.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/task/subtask/SubscriptionSinkSubtaskLifeCycle.java @@ -22,6 +22,7 @@ import org.apache.iotdb.commons.pipe.agent.task.connection.UnboundedBlockingPendingQueue; import org.apache.iotdb.commons.pipe.agent.task.progress.CommitterKey; import org.apache.iotdb.db.i18n.DataNodeMiscMessages; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; import org.apache.iotdb.db.pipe.agent.task.execution.PipeSinkSubtaskExecutor; import org.apache.iotdb.db.pipe.agent.task.subtask.sink.PipeSinkSubtask; import org.apache.iotdb.db.pipe.agent.task.subtask.sink.PipeSinkSubtaskLifeCycle; @@ -61,7 +62,7 @@ public synchronized void register() { registeredTaskCount++; LOGGER.info( - "Register subtask {}. runningTaskCount: {}, registeredTaskCount: {}", + DataNodePipeMessages.REGISTER_SUBTASK_RUNNINGTASKCOUNT_REGISTEREDTASKCOUNT, subtask, runningTaskCount, registeredTaskCount); @@ -86,7 +87,7 @@ public synchronized boolean deregister(final CommitterKey committerKey) { } finally { registeredTaskCount--; LOGGER.info( - "Deregister subtask {}. runningTaskCount: {}, registeredTaskCount: {}", + DataNodePipeMessages.DEREGISTER_SUBTASK_RUNNINGTASKCOUNT_REGISTEREDTASKCOUNT, subtask, runningTaskCount, registeredTaskCount); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/task/subtask/SubscriptionSinkSubtaskManager.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/task/subtask/SubscriptionSinkSubtaskManager.java index a41b8a095588f..ad6d56ca10552 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/task/subtask/SubscriptionSinkSubtaskManager.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/task/subtask/SubscriptionSinkSubtaskManager.java @@ -28,6 +28,7 @@ import org.apache.iotdb.commons.pipe.config.plugin.configuraion.PipeTaskRuntimeConfiguration; import org.apache.iotdb.commons.pipe.config.plugin.env.PipeTaskSinkRuntimeEnvironment; import org.apache.iotdb.db.i18n.DataNodeMiscMessages; +import org.apache.iotdb.db.i18n.DataNodePipeMessages; import org.apache.iotdb.db.pipe.agent.PipeDataNodeAgent; import org.apache.iotdb.db.pipe.agent.task.execution.PipeSinkSubtaskExecutor; import org.apache.iotdb.db.pipe.agent.task.subtask.sink.PipeRealtimePriorityBlockingQueue; @@ -78,7 +79,8 @@ public synchronized String register( .toLowerCase(); if (!SUBSCRIPTION_SINK.getPipePluginName().equals(connectorKey)) { throw new SubscriptionException( - "The SubscriptionConnectorSubtaskManager only supports subscription-sink."); + DataNodePipeMessages + .PIPE_EXCEPTION_THE_SUBSCRIPTIONCONNECTORSUBTASKMANAGER_ONLY_SUPPORTS_SUBSCRIPTION_CEFFAAA9); } PipeEventCommitManager.getInstance() @@ -116,7 +118,8 @@ public synchronized String register( pipeSink.close(); } catch (final Exception closeException) { LOGGER.warn( - "Failed to close sink after failed to initialize sink. " + "Ignore this exception.", + DataNodePipeMessages + .PIPE_LOG_FAILED_TO_CLOSE_SINK_AFTER_FAILED_TO_INITIALIZE_SINK_IGNORE_CF2E3D90, closeException); } throw new PipeException( @@ -130,9 +133,10 @@ public synchronized String register( if (Objects.isNull(topicName) || Objects.isNull(consumerGroupId)) { throw new SubscriptionException( String.format( - "Failed to construct subscription sink, because of %s or %s " - + "does not exist in pipe connector parameters", - PipeSinkConstant.SINK_TOPIC_KEY, PipeSinkConstant.SINK_CONSUMER_GROUP_KEY)); + DataNodePipeMessages + .PIPE_EXCEPTION_FAILED_TO_CONSTRUCT_SUBSCRIPTION_SINK_BECAUSE_OF_S_OR_S_DBA27DC2, + PipeSinkConstant.SINK_TOPIC_KEY, + PipeSinkConstant.SINK_CONSUMER_GROUP_KEY)); } // 3. Construct PipeConnectorSubtaskLifeCycle to manage PipeConnectorSubtask's life cycle @@ -206,7 +210,10 @@ public UnboundedBlockingPendingQueue getPipeConnectorPendingQueue( final String attributeSortedString) { if (!attributeSortedString2SubtaskLifeCycleMap.containsKey(attributeSortedString)) { throw new PipeException( - "Failed to get PendingQueue. No such subtask: " + attributeSortedString); + String.format( + DataNodePipeMessages + .PIPE_EXCEPTION_FAILED_TO_GET_PENDINGQUEUE_NO_SUCH_SUBTASK_S_B445404A, + attributeSortedString)); } return attributeSortedString2SubtaskLifeCycleMap.get(attributeSortedString).getPendingQueue(); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/tools/DelayAnalyzer.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/tools/DelayAnalyzer.java index d4e5fba477c18..cbebe1f70cd5a 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/tools/DelayAnalyzer.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/tools/DelayAnalyzer.java @@ -124,8 +124,11 @@ public DelayAnalyzer(int windowSize, boolean checkSize) { if (windowSize < MIN_WINDOW_SIZE || windowSize > MAX_WINDOW_SIZE) { throw new IllegalArgumentException( String.format( - "Window size must be between %d and %d, got %d", - MIN_WINDOW_SIZE, MAX_WINDOW_SIZE, windowSize)); + DataNodeMiscMessages + .MISC_EXCEPTION_WINDOW_SIZE_MUST_BE_BETWEEN_D_AND_D_GOT_D_3559BE09, + MIN_WINDOW_SIZE, + MAX_WINDOW_SIZE, + windowSize)); } } @@ -163,12 +166,18 @@ public DelayAnalyzer( if (windowSize < minWindowSize || windowSize > maxWindowSize) { throw new IllegalArgumentException( String.format( - "Window size must be between %d and %d, got %d", - minWindowSize, maxWindowSize, windowSize)); + DataNodeMiscMessages + .MISC_EXCEPTION_WINDOW_SIZE_MUST_BE_BETWEEN_D_AND_D_GOT_D_3559BE09, + minWindowSize, + maxWindowSize, + windowSize)); } if (confidenceLevel <= 0 || confidenceLevel > 1) { throw new IllegalArgumentException( - String.format("Confidence level must be between 0 and 1, got %f", confidenceLevel)); + String.format( + DataNodeMiscMessages + .MISC_EXCEPTION_CONFIDENCE_LEVEL_MUST_BE_BETWEEN_0_AND_1_GOT_F_2CDA358E, + confidenceLevel)); } this.windowSize = windowSize; @@ -234,7 +243,9 @@ public void update(long generationTime, long arrivalTime) { public long getDelayQuantile(double percentile) { if (percentile <= 0 || percentile > 1) { throw new IllegalArgumentException( - String.format("Percentile must be between 0 and 1, got %f", percentile)); + String.format( + DataNodeMiscMessages.MISC_EXCEPTION_PERCENTILE_MUST_BE_BETWEEN_0_AND_1_GOT_F_DE6B1311, + percentile)); } long[] snapshot; @@ -290,7 +301,8 @@ public long getSafeWatermark(long currentSystemTime, double confidenceLevel) { if (LOGGER.isDebugEnabled()) { LOGGER.debug( - "[DelayAnalyzer] Calculated safe watermark: {} (currentTime: {}, P{} delay: {}ms)", + DataNodeMiscMessages + .MISC_LOG_DELAYANALYZER_CALCULATED_SAFE_WATERMARK_CURRENTTIME_P_DELAY_74E1214C, watermark, currentSystemTime, (int) (confidenceLevel * 100), diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/tools/IoTDBDataDirViewer.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/tools/IoTDBDataDirViewer.java index 574112371ab8d..af349768fa224 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/tools/IoTDBDataDirViewer.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/tools/IoTDBDataDirViewer.java @@ -62,18 +62,20 @@ public static void main(String[] args) throws IOException { File[] seqAndUnseqDirs = dirFile.listFiles(); if (seqAndUnseqDirs == null) { throw new IOException( - "Irregular data dir structure.There should be a sequence and unsequence directory " - + "under the data directory " - + dirFile.getName()); + String.format( + DataNodeMiscMessages + .MISC_EXCEPTION_IRREGULAR_DATA_DIR_STRUCTURE_THERE_SHOULD_BE_A_SEQUENCE_95B4D431, + dirFile.getName())); } List fileList = Arrays.asList(seqAndUnseqDirs); fileList.sort((Comparator.comparing(File::getName))); if (!"sequence".equals(seqAndUnseqDirs[1].getName()) || !"unsequence".equals(seqAndUnseqDirs[2].getName())) { throw new IOException( - "Irregular data dir structure.There should be a sequence and unsequence directory " - + "under the data directory " - + dirFile.getPath()); + String.format( + DataNodeMiscMessages + .MISC_EXCEPTION_IRREGULAR_DATA_DIR_STRUCTURE_THERE_SHOULD_BE_A_SEQUENCE_95B4D431, + dirFile.getPath())); } printlnBoth(pw, "|=============================================================="); @@ -92,9 +94,10 @@ private static void printFilesInSeqOrUnseqDir(File seqOrUnseqDir, PrintWriter pw File[] storageGroupDirs = seqOrUnseqDir.listFiles(); if (storageGroupDirs == null) { throw new IOException( - "Irregular data dir structure.There should be database directories under " - + "the sequence/unsequence directory " - + seqOrUnseqDir.getName()); + String.format( + DataNodeMiscMessages + .MISC_EXCEPTION_IRREGULAR_DATA_DIR_STRUCTURE_THERE_SHOULD_BE_DATABASE_DIRECTORIES_10C36DC2, + seqOrUnseqDir.getName())); } List fileList = Arrays.asList(storageGroupDirs); fileList.sort((Comparator.comparing(File::getName))); @@ -109,9 +112,10 @@ private static void printFilesInStorageGroupDir(File storageGroup, PrintWriter p File[] files = storageGroup.listFiles(); if (files == null) { throw new IOException( - "Irregular data dir structure.There should be dataRegion directories under " - + "the database directory " - + storageGroup.getName()); + String.format( + DataNodeMiscMessages + .MISC_EXCEPTION_IRREGULAR_DATA_DIR_STRUCTURE_THERE_SHOULD_BE_DATAREGION_6BCDBFA1, + storageGroup.getName())); } List fileList = Arrays.asList(files); fileList.sort((Comparator.comparing(File::getName))); @@ -126,9 +130,10 @@ private static void printFilesInDataRegionDir(File dataRegion, PrintWriter pw) File[] files = dataRegion.listFiles(); if (files == null) { throw new IOException( - "Irregular data dir structure.There should be timeInterval directories under " - + "the database directory " - + dataRegion.getName()); + String.format( + DataNodeMiscMessages + .MISC_EXCEPTION_IRREGULAR_DATA_DIR_STRUCTURE_THERE_SHOULD_BE_TIMEINTERVAL_8D074700, + dataRegion.getName())); } List fileList = Arrays.asList(files); fileList.sort((Comparator.comparing(File::getName))); @@ -143,9 +148,10 @@ private static void printFilesInTimeInterval(File timeInterval, PrintWriter pw) File[] files = timeInterval.listFiles(); if (files == null) { throw new IOException( - "Irregular data dir structure.There should be tsfiles under " - + "the timeInterval directories directory " - + timeInterval.getName()); + String.format( + DataNodeMiscMessages + .MISC_EXCEPTION_IRREGULAR_DATA_DIR_STRUCTURE_THERE_SHOULD_BE_TSFILES_UNDER_6381FDA5, + timeInterval.getName())); } List fileList = Arrays.asList(files); fileList.sort((Comparator.comparing(File::getName))); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/tools/TsFileSketchTool.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/tools/TsFileSketchTool.java index d86314a8b7c99..41e4a563a8aba 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/tools/TsFileSketchTool.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/tools/TsFileSketchTool.java @@ -104,7 +104,10 @@ public TsFileSketchTool(String filename, String outFile) { if (reader.selfCheck(new Schema(), allChunkGroupMetadata, false) != TsFileCheckStatus.COMPLETE_FILE) { throw new IOException( - String.format("Cannot load file %s because the file has crashed.", filename)); + String.format( + DataNodeMiscMessages + .MISC_EXCEPTION_CANNOT_LOAD_FILE_S_BECAUSE_THE_FILE_HAS_CRASHED_6C180DF9, + filename)); } } catch (IOException e) { LOGGER.warn(DataNodeMiscMessages.FAIL_INIT_SKETCH_TOOL, filename, e); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/tools/TsFileSplitByPartitionTool.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/tools/TsFileSplitByPartitionTool.java index 07c412340ae1e..f36c461f9b651 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/tools/TsFileSplitByPartitionTool.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/tools/TsFileSplitByPartitionTool.java @@ -146,7 +146,8 @@ public void parseAndRewriteFile(List rewrittenResources) byte version = reader.readMarker(); if (version != (byte) 3 && version != (byte) 4) { throw new WriteProcessException( - "The version of this tsfile is too low, please upgrade it to the version 4."); + DataNodeMiscMessages + .MISC_EXCEPTION_THE_VERSION_OF_THIS_TSFILE_IS_TOO_LOW_PLEASE_UPGRADE_IT_19CC276C); } // start to scan chunks and chunkGroups byte marker; @@ -233,10 +234,11 @@ public void parseAndRewriteFile(List rewrittenResources) } catch (IOException e2) { throw new IOException( - "TsFile rewrite process cannot proceed at position " - + reader.position() - + "because: " - + e2.getMessage()); + String.format( + DataNodeMiscMessages + .MISC_EXCEPTION_TSFILE_REWRITE_PROCESS_CANNOT_PROCEED_AT_POSITION_SBECAUSE_3763D32F, + reader.position(), + e2.getMessage())); } finally { if (reader != null) { reader.close(); @@ -436,7 +438,9 @@ protected void rewritePageIntoFiles( break; default: throw new UnSupportedDataTypeException( - String.format("Data type %s is not supported.", schema.getType())); + String.format( + DataNodeMiscMessages.MISC_EXCEPTION_DATA_TYPE_S_IS_NOT_SUPPORTED_5D5C02E4, + schema.getType())); } batchData.next(); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/tools/TsFileSplitTool.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/tools/TsFileSplitTool.java index aaaff663f2277..2efc26a0b5a73 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/tools/TsFileSplitTool.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/tools/TsFileSplitTool.java @@ -265,7 +265,9 @@ private void writeToChunkWriter( break; default: throw new UnSupportedDataTypeException( - String.format("Data type %s is not supported.", dataType)); + String.format( + DataNodeMiscMessages.MISC_EXCEPTION_DATA_TYPE_S_IS_NOT_SUPPORTED_5D5C02E4, + dataType)); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/tools/schema/SRStatementGenerator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/tools/schema/SRStatementGenerator.java index 2286bd11c55f9..d681dac1b14c2 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/tools/schema/SRStatementGenerator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/tools/schema/SRStatementGenerator.java @@ -401,7 +401,10 @@ public List visitMeasurementMNode( } catch (final IOException ioException) { lastExcept = ioException; LOGGER.warn( - "Error when parse tag and attributes file of node path {}", path, ioException); + DataNodeMiscMessages + .MISC_LOG_ERROR_WHEN_PARSE_TAG_AND_ATTRIBUTES_FILE_OF_NODE_PATH_D1492217, + path, + ioException); } } return statementList; @@ -502,7 +505,10 @@ private Statement genAlignedTimeseriesStatement(final IMNode node, final Partial } catch (final IOException ioException) { lastExcept = ioException; LOGGER.warn( - "Error when parse tag and attributes file of node path {}", path, ioException); + DataNodeMiscMessages + .MISC_LOG_ERROR_WHEN_PARSE_TAG_AND_ATTRIBUTES_FILE_OF_NODE_PATH_D1492217, + path, + ioException); } measurement.getAsMeasurementMNode().setOffset(0); } else { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/tools/schema/SchemaRegionSnapshotParser.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/tools/schema/SchemaRegionSnapshotParser.java index 39d98a98902b3..44366f157883b 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/tools/schema/SchemaRegionSnapshotParser.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/tools/schema/SchemaRegionSnapshotParser.java @@ -135,21 +135,24 @@ public static SRStatementGenerator translate2Statements( if (!mtreefile.getName().equals(SchemaConstant.MTREE_SNAPSHOT)) { throw new IllegalArgumentException( String.format( - "%s is not allowed, only support %s", - mtreefile.getName(), SchemaConstant.MTREE_SNAPSHOT)); + DataNodeMiscMessages.MISC_EXCEPTION_S_IS_NOT_ALLOWED_ONLY_SUPPORT_S_862A4D86, + mtreefile.getName(), + SchemaConstant.MTREE_SNAPSHOT)); } if (tagfile != null && !tagfile.getName().equals(SchemaConstant.TAG_LOG_SNAPSHOT)) { throw new IllegalArgumentException( String.format( - " %s is not allowed, only support %s", - tagfile.getName(), SchemaConstant.TAG_LOG_SNAPSHOT)); + DataNodeMiscMessages.MISC_EXCEPTION_S_IS_NOT_ALLOWED_ONLY_SUPPORT_S_1B06E0B7, + tagfile.getName(), + SchemaConstant.TAG_LOG_SNAPSHOT)); } if (attributeFile != null && !attributeFile.getName().equals(SchemaConstant.DEVICE_ATTRIBUTE_SNAPSHOT)) { throw new IllegalArgumentException( String.format( - " %s is not allowed, only support %s", - attributeFile.getName(), SchemaConstant.DEVICE_ATTRIBUTE_SNAPSHOT)); + DataNodeMiscMessages.MISC_EXCEPTION_S_IS_NOT_ALLOWED_ONLY_SUPPORT_S_1B06E0B7, + attributeFile.getName(), + SchemaConstant.DEVICE_ATTRIBUTE_SNAPSHOT)); } return new SRStatementGenerator(mtreefile, tagfile, attributeFile, databasePath); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/tools/settle/TsFileAndModSettleTool.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/tools/settle/TsFileAndModSettleTool.java index ec8fcb7252d48..9f4727b0d9145 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/tools/settle/TsFileAndModSettleTool.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/tools/settle/TsFileAndModSettleTool.java @@ -86,7 +86,8 @@ public static void main(String[] args) { } } logger.info( - "Totally find {} tsFiles to be settled, including {} tsFiles to be recovered.", + DataNodeMiscMessages + .MISC_LOG_TOTALLY_FIND_TSFILES_TO_BE_SETTLED_INCLUDING_TSFILES_TO_522BCA28, oldTsFileResources.size(), getInstance().recoverSettleFileMap.size()); settleTsFilesAndMods(oldTsFileResources); @@ -181,11 +182,14 @@ public static void settleTsFilesAndMods(Map resourcesToB + SettleLog.COMMA_SEPERATOR + SettleCheckStatus.SETTLE_SUCCESS); logger.info( - "Finish settling successfully for tsFile : {}", resourceToBeSettled.getTsFilePath()); + DataNodeMiscMessages.MISC_LOG_FINISH_SETTLING_SUCCESSFULLY_FOR_TSFILE_C8BF06D7, + resourceToBeSettled.getTsFilePath()); successCount++; } catch (Exception e) { logger.info( - "Meet error while settling the tsFile : {}", resourceToBeSettled.getTsFilePath(), e); + DataNodeMiscMessages.MISC_LOG_MEET_ERROR_WHILE_SETTLING_THE_TSFILE_A3515E1A, + resourceToBeSettled.getTsFilePath(), + e); } } if (resourcesToBeSettled.size() == successCount) { @@ -193,7 +197,8 @@ public static void settleTsFilesAndMods(Map resourcesToB logger.info(DataNodeMiscMessages.FINISH_SETTLING_ALL); } else { logger.info( - "Finish Settling, {} tsfiles meet errors.", (resourcesToBeSettled.size() - successCount)); + DataNodeMiscMessages.MISC_LOG_FINISH_SETTLING_TSFILES_MEET_ERRORS_6B564B68, + (resourcesToBeSettled.size() - successCount)); } } @@ -207,7 +212,8 @@ public void settleOneTsFileAndMod( throws WriteProcessException, IllegalPathException, IOException { if (!resourceToBeSettled.isClosed()) { logger.warn( - "The tsFile {} should be sealed when rewritting.", resourceToBeSettled.getTsFilePath()); + DataNodeMiscMessages.MISC_LOG_THE_TSFILE_SHOULD_BE_SEALED_WHEN_REWRITTING_8B631F6C, + resourceToBeSettled.getTsFilePath()); return; } // if no deletions to this tsfile, then return. @@ -238,7 +244,9 @@ public static void findFilesToBeRecovered() { } } catch (IOException e) { logger.error( - "meet error when reading settle log, log path:{}", SettleLog.getSettleLogPath(), e); + DataNodeMiscMessages.MISC_LOG_MEET_ERROR_WHEN_READING_SETTLE_LOG_LOG_PATH_2B076234, + SettleLog.getSettleLogPath(), + e); } finally { File f = FSFactoryProducer.getFSFactory().getFile(SettleLog.getSettleLogPath()); try { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/tools/utils/TsFileValidationScan.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/tools/utils/TsFileValidationScan.java index f9632fdb3bb70..75138c6d02db6 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/tools/utils/TsFileValidationScan.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/tools/utils/TsFileValidationScan.java @@ -100,7 +100,8 @@ protected boolean onFileOpen(File file) throws IOException { if (!new File(file.getAbsolutePath() + TsFileResource.RESOURCE_SUFFIX).exists()) { // resource file does not exist, tsfile may not be flushed yet LOGGER.warn( - "{} does not exist ,skip it.", file.getAbsolutePath() + TsFileResource.RESOURCE_SUFFIX); + DataNodeMiscMessages.MISC_LOG_DOES_NOT_EXIST_SKIP_IT_EFB94454, + file.getAbsolutePath() + TsFileResource.RESOURCE_SUFFIX); return false; } else { resource.deserialize(); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/trigger/executor/TriggerExecutor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/trigger/executor/TriggerExecutor.java index f534fa9292117..ccbb66dcdb85f 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/trigger/executor/TriggerExecutor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/trigger/executor/TriggerExecutor.java @@ -21,6 +21,7 @@ import org.apache.iotdb.commons.trigger.TriggerInformation; import org.apache.iotdb.commons.trigger.exception.TriggerExecutionException; +import org.apache.iotdb.db.i18n.DataNodeMiscMessages; import org.apache.iotdb.trigger.api.Trigger; import org.apache.iotdb.trigger.api.TriggerAttributes; import org.apache.iotdb.trigger.api.enums.FailureStrategy; @@ -85,7 +86,7 @@ public boolean fire(Tablet tablet, TriggerEvent event) throws TriggerExecutionEx } else { // !event.equals(triggerInformation.getEvent()) should not happen in normal case LOGGER.warn( - "Trigger {} was fired with wrong event {}", + DataNodeMiscMessages.MISC_LOG_TRIGGER_WAS_FIRED_WITH_WRONG_EVENT_43D89454, triggerInformation.getTriggerName(), triggerInformation.getEvent()); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/trigger/executor/TriggerFireVisitor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/trigger/executor/TriggerFireVisitor.java index 6fc369d89e34c..a04ce81d2b1ea 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/trigger/executor/TriggerFireVisitor.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/trigger/executor/TriggerFireVisitor.java @@ -364,7 +364,8 @@ private TriggerFireResult fire(String triggerName, Tablet tablet, TriggerEvent e // We need to update local TriggerTable with the new TDataNodeLocation of the stateful // trigger. LOGGER.warn( - "Error occurred when trying to fire trigger({}) on TEndPoint: {}, the cause is: {}", + DataNodeMiscMessages + .MISC_LOG_ERROR_OCCURRED_WHEN_TRYING_TO_FIRE_TRIGGER_ON_TENDPOINT_BFCBA56E, triggerName, tDataNodeLocation.getInternalEndPoint(), e); @@ -375,7 +376,8 @@ private TriggerFireResult fire(String triggerName, Tablet tablet, TriggerEvent e Thread.currentThread().interrupt(); } catch (Exception e) { LOGGER.warn( - "Error occurred when trying to fire trigger({}) on TEndPoint: {}, the cause is: {}", + DataNodeMiscMessages + .MISC_LOG_ERROR_OCCURRED_WHEN_TRYING_TO_FIRE_TRIGGER_ON_TENDPOINT_BFCBA56E, triggerName, tDataNodeLocation.getInternalEndPoint(), e); @@ -433,7 +435,8 @@ private boolean updateLocationOfStatefulTrigger(String triggerName, int currentD return false; } catch (ClientManagerException | TException | IOException e) { LOGGER.error( - "Failed to update location of stateful trigger({}) through config node. The cause is {}.", + DataNodeMiscMessages + .MISC_LOG_FAILED_TO_UPDATE_LOCATION_OF_STATEFUL_TRIGGER_THROUGH_CONFIG_E6777439, triggerName, e); return false; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/trigger/service/TriggerManagementService.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/trigger/service/TriggerManagementService.java index 92f1c89641ac7..b48a1a5c5ce5e 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/trigger/service/TriggerManagementService.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/trigger/service/TriggerManagementService.java @@ -333,7 +333,10 @@ public Trigger constructTriggerInstance(String className, TriggerClassLoader cla | ClassCastException e) { throw new TriggerManagementException( String.format( - "Failed to reflect trigger instance with className(%s), because %s", className, e)); + DataNodeMiscMessages + .MISC_EXCEPTION_FAILED_TO_REFLECT_TRIGGER_INSTANCE_WITH_CLASSNAME_S_BECAUSE_C0CC44E2, + className, + e)); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/CommonUtils.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/CommonUtils.java index a4656878bafc5..be2e9d81aac0a 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/CommonUtils.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/CommonUtils.java @@ -92,14 +92,22 @@ public static Object parseValue(TSDataType dataType, String value, ZoneId zoneId return Integer.parseInt(StringUtils.trim(value)); } catch (NumberFormatException e) { throw new NumberFormatException( - "data type is not consistent, input " + value + ", registered " + dataType); + String.format( + DataNodeMiscMessages + .MISC_EXCEPTION_DATA_TYPE_IS_NOT_CONSISTENT_INPUT_S_REGISTERED_S_AE9DBDC0, + value, + dataType)); } case INT64: try { return Long.parseLong(StringUtils.trim(value)); } catch (NumberFormatException e) { throw new NumberFormatException( - "data type is not consistent, input " + value + ", registered " + dataType); + String.format( + DataNodeMiscMessages + .MISC_EXCEPTION_DATA_TYPE_IS_NOT_CONSISTENT_INPUT_S_REGISTERED_S_AE9DBDC0, + value, + dataType)); } case TIMESTAMP: try { @@ -111,12 +119,12 @@ public static Object parseValue(TSDataType dataType, String value, ZoneId zoneId } } catch (Throwable e) { throw new NumberFormatException( - "data type is not consistent, input " - + value - + ", registered " - + dataType - + " because " - + e.getMessage()); + String.format( + DataNodeMiscMessages + .MISC_EXCEPTION_DATA_TYPE_IS_NOT_CONSISTENT_INPUT_S_REGISTERED_S_BECAUSE_50C4BF31, + value, + dataType, + e.getMessage())); } case DATE: return parseIntFromString(value); @@ -126,7 +134,11 @@ public static Object parseValue(TSDataType dataType, String value, ZoneId zoneId f = Float.parseFloat(value); } catch (NumberFormatException e) { throw new NumberFormatException( - "data type is not consistent, input " + value + ", registered " + dataType); + String.format( + DataNodeMiscMessages + .MISC_EXCEPTION_DATA_TYPE_IS_NOT_CONSISTENT_INPUT_S_REGISTERED_S_AE9DBDC0, + value, + dataType)); } if (Float.isInfinite(f)) { throw new NumberFormatException(DataNodeMiscMessages.INPUT_FLOAT_INFINITY); @@ -138,7 +150,11 @@ public static Object parseValue(TSDataType dataType, String value, ZoneId zoneId d = Double.parseDouble(value); } catch (NumberFormatException e) { throw new NumberFormatException( - "data type is not consistent, input " + value + ", registered " + dataType); + String.format( + DataNodeMiscMessages + .MISC_EXCEPTION_DATA_TYPE_IS_NOT_CONSISTENT_INPUT_S_REGISTERED_S_AE9DBDC0, + value, + dataType)); } if (Double.isInfinite(d)) { throw new NumberFormatException(DataNodeMiscMessages.INPUT_DOUBLE_INFINITY); @@ -168,7 +184,11 @@ public static Object parseValue(TSDataType dataType, String value, ZoneId zoneId return new Binary(parseBlobStringToByteArray(value)); case OBJECT: throw new NumberFormatException( - "data type is not consistent, input " + value + ", registered " + dataType); + String.format( + DataNodeMiscMessages + .MISC_EXCEPTION_DATA_TYPE_IS_NOT_CONSISTENT_INPUT_S_REGISTERED_S_AE9DBDC0, + value, + dataType)); default: throw new QueryProcessException(DataNodeMiscMessages.UNSUPPORTED_DATA_TYPE + dataType); } @@ -188,12 +208,12 @@ public static Integer parseIntFromString(String value) { } } catch (Throwable e) { throw new NumberFormatException( - "data type is not consistent, input " - + value - + ", registered " - + TSDataType.DATE - + " because " - + e.getMessage()); + String.format( + DataNodeMiscMessages + .MISC_EXCEPTION_DATA_TYPE_IS_NOT_CONSISTENT_INPUT_S_REGISTERED_S_BECAUSE_50C4BF31, + value, + TSDataType.DATE, + e.getMessage())); } } @@ -397,7 +417,9 @@ public static Object createValueColumnOfDataType( break; default: throw new UnSupportedDataTypeException( - String.format("Data type %s is not supported.", dataType)); + String.format( + DataNodeMiscMessages.MISC_EXCEPTION_DATA_TYPE_S_IS_NOT_SUPPORTED_5D5C02E4, + dataType)); } return valueColumn; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/EncodingInferenceUtils.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/EncodingInferenceUtils.java index d9d4cecc4e423..6c26d7197fb32 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/EncodingInferenceUtils.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/EncodingInferenceUtils.java @@ -21,6 +21,7 @@ import org.apache.iotdb.db.conf.IoTDBConfig; import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.i18n.DataNodeMiscMessages; import org.apache.tsfile.enums.TSDataType; import org.apache.tsfile.file.metadata.enums.TSEncoding; @@ -55,7 +56,9 @@ public static TSEncoding getDefaultEncoding(TSDataType dataType) { return conf.getDefaultTextEncoding(); default: throw new UnSupportedDataTypeException( - String.format("Data type %s is not supported.", dataType)); + String.format( + DataNodeMiscMessages.MISC_EXCEPTION_DATA_TYPE_S_IS_NOT_SUPPORTED_5D5C02E4, + dataType)); } } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/ErrorHandlingUtils.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/ErrorHandlingUtils.java index 103549a9cc7b1..0a9216b8b288e 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/ErrorHandlingUtils.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/ErrorHandlingUtils.java @@ -30,6 +30,7 @@ import org.apache.iotdb.db.exception.QueryInBatchStatementException; import org.apache.iotdb.db.exception.StorageGroupNotReadyException; import org.apache.iotdb.db.exception.query.QueryTimeoutRuntimeException; +import org.apache.iotdb.db.i18n.DataNodeMiscMessages; import org.apache.iotdb.db.protocol.thrift.OperationType; import org.apache.iotdb.db.queryengine.plan.planner.exceptions.ReplicaSetUnreachableException; import org.apache.iotdb.db.queryengine.plan.planner.exceptions.RootFIPlacementException; @@ -56,13 +57,16 @@ private ErrorHandlingUtils() {} private static final Logger LOGGER = LoggerFactory.getLogger(ErrorHandlingUtils.class); private static final String INFO_PARSING_SQL_ERROR = - "Error occurred while parsing SQL to physical plan: "; - private static final String INFO_QUERY_PROCESS_ERROR = "Error occurred in read process: "; + DataNodeMiscMessages.MESSAGE_ERROR_OCCURRED_WHILE_PARSING_SQL_TO_PHYSICAL_PLAN_COLON_5C9F2C59; + private static final String INFO_QUERY_PROCESS_ERROR = + DataNodeMiscMessages.MESSAGE_ERROR_OCCURRED_IN_READ_PROCESS_COLON_CD184195; private static final String INFO_NOT_ALLOWED_IN_BATCH_ERROR = - "The read statement is not allowed in batch: "; + DataNodeMiscMessages.MESSAGE_THE_READ_STATEMENT_IS_NOT_ALLOWED_IN_BATCH_COLON_D6A3D5EB; - private static final String ERROR_OPERATION_LOG = "Status code: {}, operation: {} failed"; - private static final String EXCEPTION_PATTERN = "[%s] Exception occurred: %s failed. "; + private static final String ERROR_OPERATION_LOG = DataNodeMiscMessages.ERROR_OPERATION_LOG; + private static final String EXCEPTION_PATTERN = + DataNodeMiscMessages + .MESSAGE_LEFT_BRACKET_ARG_RIGHT_BRACKET_EXCEPTION_OCCURRED_COLON_ARG_FAILED_DOT_909D8FFA; public static TSStatus onNpeOrUnexpectedException( Exception e, String operation, TSStatusCode statusCode) { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/ObjectWriter.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/ObjectWriter.java index e5d51a5a9f476..67c61fcc1bc78 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/ObjectWriter.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/ObjectWriter.java @@ -68,7 +68,11 @@ public void write(boolean isGeneratedByConsensus, long offset, byte[] content) fos.getChannel().truncate(offset); } else { throw new IOException( - "The file length " + file.length() + " is not equal to the offset " + offset); + String.format( + DataNodeMiscMessages + .MISC_EXCEPTION_THE_FILE_LENGTH_S_IS_NOT_EQUAL_TO_THE_OFFSET_S_73905F07, + file.length(), + offset)); } } if (file.length() + content.length > config.getMaxObjectSizeInByte()) { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/QueryDataSetUtils.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/QueryDataSetUtils.java index 816be10afb6a8..e87558ec669b1 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/QueryDataSetUtils.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/QueryDataSetUtils.java @@ -20,6 +20,7 @@ package org.apache.iotdb.db.utils; import org.apache.iotdb.commons.exception.IoTDBException; +import org.apache.iotdb.db.i18n.DataNodeMiscMessages; import org.apache.iotdb.db.queryengine.plan.execution.IQueryExecution; import org.apache.iotdb.service.rpc.thrift.TSQueryDataSet; @@ -244,7 +245,9 @@ public static TSQueryDataSet convertTsBlockByFetchSize(List tsBlocks) break; default: throw new UnSupportedDataTypeException( - String.format("Data type %s is not supported.", type)); + String.format( + DataNodeMiscMessages.MISC_EXCEPTION_DATA_TYPE_S_IS_NOT_SUPPORTED_5D5C02E4, + type)); } if (k != columnNum - 1) { rowCount -= currentCount; @@ -325,7 +328,8 @@ private static void serializeTsBlock( break; default: throw new UnSupportedDataTypeException( - String.format("Data type %s is not supported.", type)); + String.format( + DataNodeMiscMessages.MISC_EXCEPTION_DATA_TYPE_S_IS_NOT_SUPPORTED_5D5C02E4, type)); } } } @@ -673,7 +677,10 @@ public static Object[] readTabletValuesFromBuffer( break; default: throw new UnSupportedDataTypeException( - String.format("data type %s is not supported when convert data at client", types[i])); + String.format( + DataNodeMiscMessages + .MISC_EXCEPTION_DATA_TYPE_S_IS_NOT_SUPPORTED_WHEN_CONVERT_DATA_AT_CLIENT_405429CC, + types[i])); } } return values; @@ -709,7 +716,10 @@ public static Object[] readTabletValuesFromStream( break; default: throw new UnSupportedDataTypeException( - String.format("data type %s is not supported when convert data at client", types[i])); + String.format( + DataNodeMiscMessages + .MISC_EXCEPTION_DATA_TYPE_S_IS_NOT_SUPPORTED_WHEN_CONVERT_DATA_AT_CLIENT_405429CC, + types[i])); } } return values; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/SchemaUtils.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/SchemaUtils.java index 4257144e466ff..0ca603570734f 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/SchemaUtils.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/SchemaUtils.java @@ -294,7 +294,11 @@ public static void checkDataTypeWithEncoding(TSDataType dataType, TSEncoding enc throws MetadataException { if (!encoding.isSupported(dataType)) { throw new MetadataException( - String.format("encoding %s does not support %s", encoding, dataType), true); + String.format( + DataNodeMiscMessages.MISC_EXCEPTION_ENCODING_S_DOES_NOT_SUPPORT_S_58301155, + encoding, + dataType), + true); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/SetThreadName.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/SetThreadName.java index ba6225923bd9a..b611707901c17 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/SetThreadName.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/SetThreadName.java @@ -18,6 +18,8 @@ */ package org.apache.iotdb.db.utils; +import org.apache.iotdb.db.i18n.DataNodeMiscMessages; + import java.io.Closeable; import static java.util.Objects.requireNonNull; @@ -26,7 +28,7 @@ public class SetThreadName implements Closeable { private final String originalThreadName; public SetThreadName(String suffix) { - requireNonNull(suffix, "Suffix is null"); + requireNonNull(suffix, DataNodeMiscMessages.EXCEPTION_SUFFIX_IS_NULL_6CC6B965); originalThreadName = Thread.currentThread().getName(); int index = originalThreadName.indexOf("$"); if (index < 0) { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/TabletDecoder.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/TabletDecoder.java index fa4375dd2d313..e6e584ed7fe06 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/TabletDecoder.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/TabletDecoder.java @@ -103,7 +103,7 @@ private ByteBuffer uncompress(ByteBuffer compressedBuffer) { return output; } catch (IOException e) { throw new IoTDBRuntimeException( - "Failed to decompress compressedBuffer", + DataNodeMiscMessages.MISC_EXCEPTION_FAILED_TO_DECOMPRESS_COMPRESSEDBUFFER_56398D3E, e, TSStatusCode.INTERNAL_SERVER_ERROR.getStatusCode()); } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/ThreadUtils.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/ThreadUtils.java index 58ddce17d92ee..62ceae47c5f9f 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/ThreadUtils.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/ThreadUtils.java @@ -44,7 +44,11 @@ public static void stopThreadPool(ExecutorService pool, ThreadName poolName) { logger.warn(DataNodeMiscMessages.POOL_NOT_EXIT_AFTER_TIMEOUT, poolName.getName()); Thread.currentThread().interrupt(); throw new StorageEngineFailureException( - String.format("StorageEngine failed to stop because of %s.", poolName.getName()), e); + String.format( + DataNodeMiscMessages + .MISC_EXCEPTION_STORAGEENGINE_FAILED_TO_STOP_BECAUSE_OF_S_84D26574, + poolName.getName()), + e); } } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/TimeFilterForDeviceTTL.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/TimeFilterForDeviceTTL.java index 4df2cfbc459c7..59a508164aa7d 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/TimeFilterForDeviceTTL.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/TimeFilterForDeviceTTL.java @@ -20,6 +20,7 @@ package org.apache.iotdb.db.utils; import org.apache.iotdb.commons.utils.CommonDateTimeUtils; +import org.apache.iotdb.db.i18n.DataNodeMiscMessages; import org.apache.tsfile.file.metadata.IDeviceID; import org.apache.tsfile.read.filter.basic.Filter; @@ -65,7 +66,8 @@ private long getTTL(IDeviceID deviceID) { Long ttl = ttlCached.get(deviceID); if (ttl == null) { throw new IllegalArgumentException( - "deviceID should not be empty in getTTL method in TimeFilterForDeviceTTL"); + DataNodeMiscMessages + .MISC_EXCEPTION_DEVICEID_SHOULD_NOT_BE_EMPTY_IN_GETTTL_METHOD_IN_TIMEFILTERFORDEVICETTL_8A501A45); } return ttl; } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/TypeInferenceUtils.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/TypeInferenceUtils.java index 6c20a76739dcc..d48ed5fffd100 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/TypeInferenceUtils.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/TypeInferenceUtils.java @@ -184,7 +184,7 @@ private static void verifyIsAggregationDataTypeMatched(String aggrFuncName, TSDa return; } throw new SemanticException( - "Aggregate functions [MIN_VALUE, MAX_VALUE] only support data types [INT32, INT64, FLOAT, DOUBLE, STRING, DATE, TIMESTAMP]"); + DataNodeMiscMessages.AGGREGATE_MIN_MAX_VALUE_ONLY_SUPPORT_ALLOWED_TYPES); case SqlConstant.AVG: case SqlConstant.SUM: case SqlConstant.EXTREME: @@ -198,17 +198,14 @@ private static void verifyIsAggregationDataTypeMatched(String aggrFuncName, TSDa return; } throw new SemanticException( - "Aggregate functions [AVG, SUM, EXTREME, STDDEV, STDDEV_POP, STDDEV_SAMP, " - + "VARIANCE, VAR_POP, VAR_SAMP] only support " - + "numeric data types [INT32, INT64, FLOAT, DOUBLE]"); + DataNodeMiscMessages.AGGREGATE_AVG_SUM_STDDEV_ONLY_SUPPORT_NUMERIC_TYPES); case SqlConstant.SKEWNESS: case SqlConstant.KURTOSIS: if (dataType.isNumeric() || TSDataType.TIMESTAMP.equals(dataType)) { return; } throw new SemanticException( - "Aggregate functions [SKEWNESS, KURTOSIS] only support " - + "numeric data types [INT32, INT64, FLOAT, DOUBLE, TIMESTAMP]"); + DataNodeMiscMessages.AGGREGATE_SKEWNESS_KURTOSIS_ONLY_SUPPORT_NUMERIC_TYPES); // For the two-argument aggregation functions CORR, COVAR_POP, COVAR_SAMP, // REGR_SLOPE, and REGR_INTERCEPT, type validation is performed in // verifyIsAggregationDataTypeMatchedForBothInputs. @@ -232,7 +229,7 @@ private static void verifyIsAggregationDataTypeMatched(String aggrFuncName, TSDa if (dataType != TSDataType.BOOLEAN) { throw new SemanticException( String.format( - "Input series of Aggregation function [%s] only supports data type [BOOLEAN]", + DataNodeMiscMessages.AGGREGATE_FUNCTION_INPUT_SERIES_ONLY_SUPPORTS_BOOLEAN, aggrFuncName)); } return; @@ -257,8 +254,7 @@ public static void verifyIsAggregationDataTypeMatchedForBothInputs( && !secondDataType.isNumeric() && !TSDataType.TIMESTAMP.equals(secondDataType))) { throw new SemanticException( - "Aggregate functions [CORR, COVAR_POP, COVAR_SAMP, REGR_SLOPE, REGR_INTERCEPT] only support " - + "numeric data types [INT32, INT64, FLOAT, DOUBLE, TIMESTAMP]"); + DataNodeMiscMessages.AGGREGATE_CORR_COVAR_REGR_ONLY_SUPPORT_NUMERIC_TYPES); } return; default: @@ -329,15 +325,12 @@ public static void bindTypeForBuiltinAggregationNonSeriesInputExpressions( return; } else { throw new SemanticException( - String.format( - "Please check input keep condition of Aggregation function [%s]", - functionName)); + String.format(DataNodeMiscMessages.CHECK_AGGREGATION_KEEP_CONDITION, functionName)); } } else { throw new SemanticException( String.format( - "Keep condition of Aggregation function [%s] need to be constant or compare expression constructed by keep and a long number", - functionName)); + DataNodeMiscMessages.AGGREGATION_KEEP_CONDITION_REQUIREMENT, functionName)); } default: throw new IllegalArgumentException( diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/datastructure/AlignedTVList.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/datastructure/AlignedTVList.java index dc3c31b855a00..01af929d5c811 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/datastructure/AlignedTVList.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/datastructure/AlignedTVList.java @@ -2011,7 +2011,9 @@ public TsPrimitiveType getPrimitiveTypeObject(int rowIndex, int columnIndex) { TSDataType.TEXT, getBinaryByValueIndex(valueIndex, validColumnIndex)); default: throw new UnSupportedDataTypeException( - String.format("Data type %s is not supported.", dataTypeList.get(columnIndex))); + String.format( + DataNodeMiscMessages.MISC_EXCEPTION_DATA_TYPE_S_IS_NOT_SUPPORTED_5D5C02E4, + dataTypeList.get(columnIndex))); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/datastructure/MergeSortMultiAlignedTVListIterator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/datastructure/MergeSortMultiAlignedTVListIterator.java index e7e706c21de3d..4d1adece4b803 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/datastructure/MergeSortMultiAlignedTVListIterator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/datastructure/MergeSortMultiAlignedTVListIterator.java @@ -19,6 +19,7 @@ package org.apache.iotdb.db.utils.datastructure; +import org.apache.iotdb.db.i18n.DataNodeMiscMessages; import org.apache.iotdb.db.queryengine.execution.fragment.QueryContext; import org.apache.iotdb.db.queryengine.plan.statement.component.Ordering; @@ -284,7 +285,9 @@ public void encodeBatch(IChunkWriter chunkWriter, BatchEncodeInfo encodeInfo, lo break; default: throw new UnSupportedDataTypeException( - String.format("Data type %s is not supported.", tsDataTypeList.get(columnIndex))); + String.format( + DataNodeMiscMessages.MISC_EXCEPTION_DATA_TYPE_S_IS_NOT_SUPPORTED_5D5C02E4, + tsDataTypeList.get(columnIndex))); } } next(); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/datastructure/MergeSortMultiTVListIterator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/datastructure/MergeSortMultiTVListIterator.java index 9254a0ce1da88..cf9862ac210fd 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/datastructure/MergeSortMultiTVListIterator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/datastructure/MergeSortMultiTVListIterator.java @@ -19,6 +19,7 @@ package org.apache.iotdb.db.utils.datastructure; +import org.apache.iotdb.db.i18n.DataNodeMiscMessages; import org.apache.iotdb.db.queryengine.execution.fragment.QueryContext; import org.apache.iotdb.db.queryengine.plan.statement.component.Ordering; @@ -176,7 +177,9 @@ public void encodeBatch(IChunkWriter chunkWriter, BatchEncodeInfo encodeInfo, lo break; default: throw new UnSupportedDataTypeException( - String.format("Data type %s is not supported.", tsDataType)); + String.format( + DataNodeMiscMessages.MISC_EXCEPTION_DATA_TYPE_S_IS_NOT_SUPPORTED_5D5C02E4, + tsDataType)); } encodeInfo.pointNumInChunk++; diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/datastructure/MultiAlignedTVListIterator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/datastructure/MultiAlignedTVListIterator.java index d0d86a5b6c0d8..83bfa8c6888b0 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/datastructure/MultiAlignedTVListIterator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/datastructure/MultiAlignedTVListIterator.java @@ -19,6 +19,7 @@ package org.apache.iotdb.db.utils.datastructure; +import org.apache.iotdb.db.i18n.DataNodeMiscMessages; import org.apache.iotdb.db.queryengine.execution.fragment.QueryContext; import org.apache.iotdb.db.queryengine.plan.statement.component.Ordering; @@ -265,7 +266,9 @@ public TsBlock nextBatch() { break; default: throw new UnSupportedDataTypeException( - String.format("Data type %s is not supported.", tsDataTypeList.get(columnIndex))); + String.format( + DataNodeMiscMessages.MISC_EXCEPTION_DATA_TYPE_S_IS_NOT_SUPPORTED_5D5C02E4, + tsDataTypeList.get(columnIndex))); } } next(); diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/datastructure/MultiTVListIterator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/datastructure/MultiTVListIterator.java index db35a87ed8678..8895235ffd8fa 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/datastructure/MultiTVListIterator.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/datastructure/MultiTVListIterator.java @@ -19,6 +19,7 @@ package org.apache.iotdb.db.utils.datastructure; +import org.apache.iotdb.db.i18n.DataNodeMiscMessages; import org.apache.iotdb.db.queryengine.execution.fragment.QueryContext; import org.apache.iotdb.db.queryengine.plan.statement.component.Ordering; @@ -250,7 +251,9 @@ public TsBlock nextBatch() { break; default: throw new UnSupportedDataTypeException( - String.format("Data type %s is not supported.", tsDataType)); + String.format( + DataNodeMiscMessages.MISC_EXCEPTION_DATA_TYPE_S_IS_NOT_SUPPORTED_5D5C02E4, + tsDataType)); } if (this.getQueryContext().isVerbose() && filteredRowsByPushDownFilter > 0) { diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/datastructure/TVList.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/datastructure/TVList.java index 2355afbc1b85d..f96473781aea0 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/datastructure/TVList.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/datastructure/TVList.java @@ -1261,7 +1261,9 @@ public TsBlock nextBatch() { break; default: throw new UnSupportedDataTypeException( - String.format("Data type %s is not supported.", dataType)); + String.format( + DataNodeMiscMessages.MISC_EXCEPTION_DATA_TYPE_S_IS_NOT_SUPPORTED_5D5C02E4, + dataType)); } // count the filtered row from time filter and other filter @@ -1376,7 +1378,9 @@ public void encodeBatch(IChunkWriter chunkWriter, BatchEncodeInfo encodeInfo, lo break; default: throw new UnSupportedDataTypeException( - String.format("Data type %s is not supported.", dataType)); + String.format( + DataNodeMiscMessages.MISC_EXCEPTION_DATA_TYPE_S_IS_NOT_SUPPORTED_5D5C02E4, + dataType)); } encodeInfo.pointNumInChunk++; if (encodeInfo.pointNumInChunk >= encodeInfo.maxNumberOfPointsInChunk diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/windowing/configuration/SlidingSizeWindowConfiguration.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/windowing/configuration/SlidingSizeWindowConfiguration.java index d95225d4c5f81..961d368b3ae8d 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/windowing/configuration/SlidingSizeWindowConfiguration.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/windowing/configuration/SlidingSizeWindowConfiguration.java @@ -19,6 +19,7 @@ package org.apache.iotdb.db.utils.windowing.configuration; +import org.apache.iotdb.db.i18n.DataNodeMiscMessages; import org.apache.iotdb.db.utils.windowing.exception.WindowingException; import org.apache.tsfile.enums.TSDataType; @@ -44,11 +45,17 @@ public SlidingSizeWindowConfiguration(TSDataType dataType, int windowSize) { public void check() throws WindowingException { if (windowSize <= 0) { throw new WindowingException( - String.format("Parameter windowSize(%d) should be positive.", windowSize)); + String.format( + DataNodeMiscMessages + .MISC_EXCEPTION_PARAMETER_WINDOWSIZE_D_SHOULD_BE_POSITIVE_D95CBF33, + windowSize)); } if (slidingStep <= 0) { throw new WindowingException( - String.format("Parameter slidingStep(%d) should be positive.", slidingStep)); + String.format( + DataNodeMiscMessages + .MISC_EXCEPTION_PARAMETER_SLIDINGSTEP_D_SHOULD_BE_POSITIVE_C0C25C2C, + slidingStep)); } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/windowing/configuration/SlidingTimeWindowConfiguration.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/windowing/configuration/SlidingTimeWindowConfiguration.java index a218ffaa460b3..5d9991d1d25b5 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/windowing/configuration/SlidingTimeWindowConfiguration.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/windowing/configuration/SlidingTimeWindowConfiguration.java @@ -19,6 +19,7 @@ package org.apache.iotdb.db.utils.windowing.configuration; +import org.apache.iotdb.db.i18n.DataNodeMiscMessages; import org.apache.iotdb.db.utils.windowing.exception.WindowingException; import org.apache.tsfile.enums.TSDataType; @@ -44,11 +45,17 @@ public SlidingTimeWindowConfiguration(TSDataType dataType, long timeInterval) { public void check() throws WindowingException { if (timeInterval <= 0) { throw new WindowingException( - String.format("Parameter timeInterval(%d) should be positive.", timeInterval)); + String.format( + DataNodeMiscMessages + .MISC_EXCEPTION_PARAMETER_TIMEINTERVAL_D_SHOULD_BE_POSITIVE_53A6CE3B, + timeInterval)); } if (slidingStep <= 0) { throw new WindowingException( - String.format("Parameter slidingStep(%d) should be positive.", slidingStep)); + String.format( + DataNodeMiscMessages + .MISC_EXCEPTION_PARAMETER_SLIDINGSTEP_D_SHOULD_BE_POSITIVE_C0C25C2C, + slidingStep)); } } diff --git a/iotdb-core/metrics/core/src/main/i18n/en/org/apache/iotdb/metrics/core/i18n/MetricsCoreMessages.java b/iotdb-core/metrics/core/src/main/i18n/en/org/apache/iotdb/metrics/core/i18n/MetricsCoreMessages.java index cc60dd0e5b9a9..b667b7184957a 100644 --- a/iotdb-core/metrics/core/src/main/i18n/en/org/apache/iotdb/metrics/core/i18n/MetricsCoreMessages.java +++ b/iotdb-core/metrics/core/src/main/i18n/en/org/apache/iotdb/metrics/core/i18n/MetricsCoreMessages.java @@ -36,4 +36,9 @@ public final class MetricsCoreMessages { public static final String JMX_UNABLE_TO_REGISTER = "IoTDB Metric: Unable to register {} {}"; private MetricsCoreMessages() {} + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String LOG_DETECTED_ERROR_TAKING_SNAPSHOT_MAY_CAUSE_MISS_DURING_RECORDING_2BAE49C4 = "Detected an error while taking snapshot, may cause a miss during this recording."; + } diff --git a/iotdb-core/metrics/core/src/main/i18n/zh/org/apache/iotdb/metrics/core/i18n/MetricsCoreMessages.java b/iotdb-core/metrics/core/src/main/i18n/zh/org/apache/iotdb/metrics/core/i18n/MetricsCoreMessages.java index f758e1a3b7d7e..9a83163d2983f 100644 --- a/iotdb-core/metrics/core/src/main/i18n/zh/org/apache/iotdb/metrics/core/i18n/MetricsCoreMessages.java +++ b/iotdb-core/metrics/core/src/main/i18n/zh/org/apache/iotdb/metrics/core/i18n/MetricsCoreMessages.java @@ -36,4 +36,9 @@ public final class MetricsCoreMessages { public static final String JMX_UNABLE_TO_REGISTER = "IoTDB 指标:无法注册 {} {}"; private MetricsCoreMessages() {} + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String LOG_DETECTED_ERROR_TAKING_SNAPSHOT_MAY_CAUSE_MISS_DURING_RECORDING_2BAE49C4 = "获取快照时检测到错误,可能导致本次记录缺失。"; + } diff --git a/iotdb-core/metrics/core/src/main/java/org/apache/iotdb/metrics/core/type/IoTDBTimer.java b/iotdb-core/metrics/core/src/main/java/org/apache/iotdb/metrics/core/type/IoTDBTimer.java index 19def110f4b4b..a3017bd82be97 100644 --- a/iotdb-core/metrics/core/src/main/java/org/apache/iotdb/metrics/core/type/IoTDBTimer.java +++ b/iotdb-core/metrics/core/src/main/java/org/apache/iotdb/metrics/core/type/IoTDBTimer.java @@ -19,6 +19,7 @@ package org.apache.iotdb.metrics.core.type; +import org.apache.iotdb.metrics.core.i18n.MetricsCoreMessages; import org.apache.iotdb.metrics.type.HistogramSnapshot; import org.apache.iotdb.metrics.type.Timer; import org.apache.iotdb.metrics.utils.AbstractMetricMBean; @@ -49,7 +50,9 @@ public HistogramSnapshot takeSnapshot() { return new IoTDBTimerHistogramSnapshot(timer); } catch (ArrayIndexOutOfBoundsException e) { LOGGER.warn( - "Detected an error while taking snapshot, may cause a miss during this recording.", e); + MetricsCoreMessages + .LOG_DETECTED_ERROR_TAKING_SNAPSHOT_MAY_CAUSE_MISS_DURING_RECORDING_2BAE49C4, + e); return null; } } diff --git a/iotdb-core/metrics/interface/src/main/i18n/en/org/apache/iotdb/metrics/i18n/MetricsMessages.java b/iotdb-core/metrics/interface/src/main/i18n/en/org/apache/iotdb/metrics/i18n/MetricsMessages.java index 5e6072f09162d..778da2b32bfba 100644 --- a/iotdb-core/metrics/interface/src/main/i18n/en/org/apache/iotdb/metrics/i18n/MetricsMessages.java +++ b/iotdb-core/metrics/interface/src/main/i18n/en/org/apache/iotdb/metrics/i18n/MetricsMessages.java @@ -107,4 +107,26 @@ public final class MetricsMessages { "Interrupted while collecting windows disk metrics"; private MetricsMessages() {} + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String LOG_FAILED_LOAD_ARG_REPORTER_BECAUSE_ALREADY_EXISTED_4BAF2E58 = "Failed to load {} reporter because already existed"; + public static final String EXCEPTION_FAILED_REMOVE_BECAUSE_MISMATCH_TYPE_044E55F6 = " failed to remove because the mismatch of type. "; + public static final String LOG_SIZE_METRIC_TAGS_SHOULD_EVEN_BUT_WAS_ODD_TAGS_ARG_201E6A2A = "The size of metric tags should be even, but was odd, tags: {}."; + public static final String LOG_GC_NOTIFICATIONS_WILL_NOT_AVAILABLE_BECAUSE_MEMORYPOOLMXBEANS_86C3EB6B = "GC notifications will not be available because MemoryPoolMXBeans "; + public static final String LOG_NOT_PROVIDED_JVM_948976D1 = "are not provided by the JVM"; + public static final String LOG_GC_NOTIFICATIONS_WILL_NOT_AVAILABLE_BECAUSE_22FD13E0 = "GC notifications will not be available because "; + public static final String LOG_COM_SUN_MANAGEMENT_GARBAGECOLLECTIONNOTIFICATIONINFO_NOT_PRESENT_FA43486E = "com.sun.management.GarbageCollectionNotificationInfo is not present"; + public static final String LOG_FAILED_GET_MEMORY_BECAUSE_041BE661 = "Failed to get memory, because "; + public static final String LOG_INTERRUPTED_WAITING_MEMORY_COMMAND_CF538E10 = "Interrupted while waiting for memory command"; + public static final String LOG_FAILED_REMOVE_LOGBACKMETRICS_BECAUSE_9BE74246 = "Failed to remove logBackMetrics, because "; + public static final String LOG_ARG_WINDOWS_DISK_METRICS_WILL_SKIPPED_ARG_MS_BEFORE_RETRYING_1F1EB4C4 = "{}. Windows disk metrics will be skipped for {} ms before retrying."; + public static final String LOG_ARG_ARG_WINDOWS_DISK_METRICS_WILL_SKIPPED_ARG_MS_BEFORE_74269D0A = "{}: {}. Windows disk metrics will be skipped for {} ms before retrying."; + public static final String LOG_FAILED_WINDOWS_DISK_METRICS_POWERSHELL_COMMAND_ARG_OUTPUT_ARG_16D24C0C = "Failed windows disk metrics powershell command: {}, output: {}"; + public static final String LOG_ARG_WINDOWS_DISK_METRICS_COLLECTION_STILL_RETRY_BACKOFF_C237EE87 = "{}. Windows disk metrics collection is still in retry backoff."; + public static final String LOG_RECOVERED_WINDOWS_DISK_METRICS_COLLECTION_THROUGH_POWERSHELL_CIM_03B9110E = "Recovered windows disk metrics collection through PowerShell/CIM."; + public static final String LOG_IOTDBSESSIONREPORTER_START_WRITE_ARG_ARG_E79CDDAE = "IoTDBSessionReporter start, write to {}:{}"; + public static final String LOG_PROMETHEUSREPORTER_STARTED_USE_PORT_ARG_A688FFC8 = "PrometheusReporter started, use port {}"; + public static final String LOG_DETECTED_ERROR_TAKING_METRIC_TIMER_SNAPSHOT_WILL_DISCARD_METRIC_B7154169 = "Detected an error when taking metric timer snapshot, will discard this metric"; + } diff --git a/iotdb-core/metrics/interface/src/main/i18n/zh/org/apache/iotdb/metrics/i18n/MetricsMessages.java b/iotdb-core/metrics/interface/src/main/i18n/zh/org/apache/iotdb/metrics/i18n/MetricsMessages.java index 1824e0428d8e5..89eb7607da53f 100644 --- a/iotdb-core/metrics/interface/src/main/i18n/zh/org/apache/iotdb/metrics/i18n/MetricsMessages.java +++ b/iotdb-core/metrics/interface/src/main/i18n/zh/org/apache/iotdb/metrics/i18n/MetricsMessages.java @@ -103,4 +103,26 @@ public final class MetricsMessages { "收集 Windows 磁盘指标时被中断"; private MetricsMessages() {} + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String LOG_FAILED_LOAD_ARG_REPORTER_BECAUSE_ALREADY_EXISTED_4BAF2E58 = "无法加载 {} reporter,原因:已存在"; + public static final String EXCEPTION_FAILED_REMOVE_BECAUSE_MISMATCH_TYPE_044E55F6 = " 无法移除,原因:类型不匹配。"; + public static final String LOG_SIZE_METRIC_TAGS_SHOULD_EVEN_BUT_WAS_ODD_TAGS_ARG_201E6A2A = "metric tags 的数量应为偶数,但当前为奇数,tags:{}。"; + public static final String LOG_GC_NOTIFICATIONS_WILL_NOT_AVAILABLE_BECAUSE_MEMORYPOOLMXBEANS_86C3EB6B = "GC notifications 不可用,原因:MemoryPoolMXBeans "; + public static final String LOG_NOT_PROVIDED_JVM_948976D1 = "未由 JVM 提供"; + public static final String LOG_GC_NOTIFICATIONS_WILL_NOT_AVAILABLE_BECAUSE_22FD13E0 = "GC notifications 不可用,原因:"; + public static final String LOG_COM_SUN_MANAGEMENT_GARBAGECOLLECTIONNOTIFICATIONINFO_NOT_PRESENT_FA43486E = "com.sun.management.GarbageCollectionNotificationInfo 不存在"; + public static final String LOG_FAILED_GET_MEMORY_BECAUSE_041BE661 = "无法获取 memory,,原因:"; + public static final String LOG_INTERRUPTED_WAITING_MEMORY_COMMAND_CF538E10 = "等待 memory command 时被中断"; + public static final String LOG_FAILED_REMOVE_LOGBACKMETRICS_BECAUSE_9BE74246 = "无法移除 logBackMetrics,,原因:"; + public static final String LOG_ARG_WINDOWS_DISK_METRICS_WILL_SKIPPED_ARG_MS_BEFORE_RETRYING_1F1EB4C4 = "{}。Windows disk metrics 将跳过 {} ms 后重试。"; + public static final String LOG_ARG_ARG_WINDOWS_DISK_METRICS_WILL_SKIPPED_ARG_MS_BEFORE_74269D0A = "{}:{}。Windows disk metrics 将跳过 {} ms 后重试。"; + public static final String LOG_FAILED_WINDOWS_DISK_METRICS_POWERSHELL_COMMAND_ARG_OUTPUT_ARG_16D24C0C = "失败 windows disk metrics powershell command: {}, output: {}"; + public static final String LOG_ARG_WINDOWS_DISK_METRICS_COLLECTION_STILL_RETRY_BACKOFF_C237EE87 = "{}。Windows disk metrics 采集仍处于重试退避中。"; + public static final String LOG_RECOVERED_WINDOWS_DISK_METRICS_COLLECTION_THROUGH_POWERSHELL_CIM_03B9110E = "已通过 PowerShell/CIM 恢复 Windows disk metrics 采集。"; + public static final String LOG_IOTDBSESSIONREPORTER_START_WRITE_ARG_ARG_E79CDDAE = "IoTDBSessionReporter 启动,写入 {}:{}"; + public static final String LOG_PROMETHEUSREPORTER_STARTED_USE_PORT_ARG_A688FFC8 = "PrometheusReporter 已启动,使用端口 {}"; + public static final String LOG_DETECTED_ERROR_TAKING_METRIC_TIMER_SNAPSHOT_WILL_DISCARD_METRIC_B7154169 = "获取 metric timer 快照时检测到错误,将丢弃该 metric"; + } diff --git a/iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/AbstractMetricManager.java b/iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/AbstractMetricManager.java index fcbb8266251a1..cf5df80f36a85 100644 --- a/iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/AbstractMetricManager.java +++ b/iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/AbstractMetricManager.java @@ -21,6 +21,7 @@ import org.apache.iotdb.metrics.config.MetricConfig; import org.apache.iotdb.metrics.config.MetricConfigDescriptor; +import org.apache.iotdb.metrics.i18n.MetricsMessages; import org.apache.iotdb.metrics.impl.DoNothingMetricManager; import org.apache.iotdb.metrics.reporter.JmxReporter; import org.apache.iotdb.metrics.type.AutoGauge; @@ -435,7 +436,7 @@ public void remove(MetricType type, String name, String... tags) { removeMetric(type, metricInfo); } else { throw new IllegalArgumentException( - metricInfo + " failed to remove because the mismatch of type. "); + metricInfo + MetricsMessages.EXCEPTION_FAILED_REMOVE_BECAUSE_MISMATCH_TYPE_044E55F6); } } } diff --git a/iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/CompositeReporter.java b/iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/CompositeReporter.java index 495ab1da4b816..75356b7acb759 100644 --- a/iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/CompositeReporter.java +++ b/iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/CompositeReporter.java @@ -78,7 +78,8 @@ public void addReporter(Reporter reporter) { for (Reporter originReporter : reporters) { if (originReporter.getReporterType() == reporter.getReporterType()) { LOGGER.warn( - "Failed to load {} reporter because already existed", reporter.getReporterType()); + MetricsMessages.LOG_FAILED_LOAD_ARG_REPORTER_BECAUSE_ALREADY_EXISTED_4BAF2E58, + reporter.getReporterType()); return; } } diff --git a/iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/metricsets/disk/WindowsDiskMetricsManager.java b/iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/metricsets/disk/WindowsDiskMetricsManager.java index 4e717190eb761..abf012859c132 100644 --- a/iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/metricsets/disk/WindowsDiskMetricsManager.java +++ b/iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/metricsets/disk/WindowsDiskMetricsManager.java @@ -525,24 +525,26 @@ private void handlePowerShellFailure( if (shouldLogFailure(currentTime, failureMessage)) { if (exception == null) { LOGGER.warn( - "{}. Windows disk metrics will be skipped for {} ms before retrying.", + MetricsMessages + .LOG_ARG_WINDOWS_DISK_METRICS_WILL_SKIPPED_ARG_MS_BEFORE_RETRYING_1F1EB4C4, failureMessage, POWERSHELL_RETRY_INTERVAL); } else { LOGGER.warn( - "{}: {}. Windows disk metrics will be skipped for {} ms before retrying.", + MetricsMessages.LOG_ARG_ARG_WINDOWS_DISK_METRICS_WILL_SKIPPED_ARG_MS_BEFORE_74269D0A, failureMessage, exception.toString(), POWERSHELL_RETRY_INTERVAL); } LOGGER.debug( - "Failed windows disk metrics powershell command: {}, output: {}", + MetricsMessages + .LOG_FAILED_WINDOWS_DISK_METRICS_POWERSHELL_COMMAND_ARG_OUTPUT_ARG_16D24C0C, command, output == null ? "" : String.join(" | ", output), exception); } else { LOGGER.debug( - "{}. Windows disk metrics collection is still in retry backoff.", + MetricsMessages.LOG_ARG_WINDOWS_DISK_METRICS_COLLECTION_STILL_RETRY_BACKOFF_C237EE87, failureMessage, exception); } @@ -559,7 +561,9 @@ private boolean shouldLogFailure(long currentTime, String failureMessage) { private void clearPowerShellFailure() { if (!lastPowerShellFailure.isEmpty() || nextPowerShellRetryTime > 0L) { - LOGGER.info("Recovered windows disk metrics collection through PowerShell/CIM."); + LOGGER.info( + MetricsMessages + .LOG_RECOVERED_WINDOWS_DISK_METRICS_COLLECTION_THROUGH_POWERSHELL_CIM_03B9110E); } lastPowerShellFailure = ""; nextFailureLogTime = 0L; diff --git a/iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/metricsets/jvm/JvmGcMetrics.java b/iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/metricsets/jvm/JvmGcMetrics.java index a707afa83b015..ee65e7eff135e 100644 --- a/iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/metricsets/jvm/JvmGcMetrics.java +++ b/iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/metricsets/jvm/JvmGcMetrics.java @@ -20,6 +20,7 @@ package org.apache.iotdb.metrics.metricsets.jvm; import org.apache.iotdb.metrics.AbstractMetricService; +import org.apache.iotdb.metrics.i18n.MetricsMessages; import org.apache.iotdb.metrics.metricsets.IMetricSet; import org.apache.iotdb.metrics.type.Counter; import org.apache.iotdb.metrics.type.Timer; @@ -380,8 +381,8 @@ public void unbindFrom(AbstractMetricService metricService) { private boolean preCheck() { if (ManagementFactory.getMemoryPoolMXBeans().isEmpty()) { logger.warn( - "GC notifications will not be available because MemoryPoolMXBeans " - + "are not provided by the JVM"); + MetricsMessages.LOG_GC_NOTIFICATIONS_WILL_NOT_AVAILABLE_BECAUSE_MEMORYPOOLMXBEANS_86C3EB6B + + MetricsMessages.LOG_NOT_PROVIDED_JVM_948976D1); return false; } @@ -393,8 +394,9 @@ private boolean preCheck() { } catch (Exception e) { // We are operating in a JVM without access to this level of detail logger.warn( - "GC notifications will not be available because " - + "com.sun.management.GarbageCollectionNotificationInfo is not present"); + MetricsMessages.LOG_GC_NOTIFICATIONS_WILL_NOT_AVAILABLE_BECAUSE_22FD13E0 + + MetricsMessages + .LOG_COM_SUN_MANAGEMENT_GARBAGECOLLECTIONNOTIFICATIONINFO_NOT_PRESENT_FA43486E); return false; } return true; diff --git a/iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/metricsets/logback/LogbackMetrics.java b/iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/metricsets/logback/LogbackMetrics.java index 0d21790c7fcf4..d7aa5e81b1aaa 100644 --- a/iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/metricsets/logback/LogbackMetrics.java +++ b/iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/metricsets/logback/LogbackMetrics.java @@ -20,6 +20,7 @@ package org.apache.iotdb.metrics.metricsets.logback; import org.apache.iotdb.metrics.AbstractMetricService; +import org.apache.iotdb.metrics.i18n.MetricsMessages; import org.apache.iotdb.metrics.metricsets.IMetricSet; import org.apache.iotdb.metrics.utils.MetricType; import org.apache.iotdb.metrics.utils.SystemMetric; @@ -105,7 +106,7 @@ public void unbindFrom(AbstractMetricService metricService) { MetricType.COUNTER, SystemMetric.LOGBACK_EVENTS.toString(), LEVEL, "trace"); } } catch (Exception e) { - logger.warn("Failed to remove logBackMetrics, because ", e); + logger.warn(MetricsMessages.LOG_FAILED_REMOVE_LOGBACKMETRICS_BECAUSE_9BE74246, e); } } } diff --git a/iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/metricsets/system/SystemMetrics.java b/iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/metricsets/system/SystemMetrics.java index e14d8910791a1..e25a1cb4fbd85 100644 --- a/iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/metricsets/system/SystemMetrics.java +++ b/iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/metricsets/system/SystemMetrics.java @@ -23,6 +23,7 @@ import org.apache.iotdb.metrics.MetricConstant; import org.apache.iotdb.metrics.config.MetricConfig; import org.apache.iotdb.metrics.config.MetricConfigDescriptor; +import org.apache.iotdb.metrics.i18n.MetricsMessages; import org.apache.iotdb.metrics.metricsets.IMetricSet; import org.apache.iotdb.metrics.utils.FileStoreUtils; import org.apache.iotdb.metrics.utils.MetricLevel; @@ -241,9 +242,9 @@ private void updateLinuxSystemMemInfo() { } } } catch (IOException e) { - logger.debug("Failed to get memory, because ", e); + logger.debug(MetricsMessages.LOG_FAILED_GET_MEMORY_BECAUSE_041BE661, e); } catch (InterruptedException e) { - logger.debug("Interrupted while waiting for memory command", e); + logger.debug(MetricsMessages.LOG_INTERRUPTED_WAITING_MEMORY_COMMAND_CF538E10, e); Thread.currentThread().interrupt(); } finally { if (process != null && process.isAlive()) { diff --git a/iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/reporter/iotdb/IoTDBSessionReporter.java b/iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/reporter/iotdb/IoTDBSessionReporter.java index 8e73776e53796..6b5872702a685 100644 --- a/iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/reporter/iotdb/IoTDBSessionReporter.java +++ b/iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/reporter/iotdb/IoTDBSessionReporter.java @@ -127,7 +127,7 @@ public boolean start() { MetricConfigDescriptor.getInstance().getMetricConfig().getAsyncCollectPeriodInSecond(), TimeUnit.SECONDS); LOGGER.info( - "IoTDBSessionReporter start, write to {}:{}", + MetricsMessages.LOG_IOTDBSESSIONREPORTER_START_WRITE_ARG_ARG_E79CDDAE, ioTDBReporterConfig.getHost(), ioTDBReporterConfig.getPort()); return true; diff --git a/iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/reporter/prometheus/PrometheusReporter.java b/iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/reporter/prometheus/PrometheusReporter.java index 96fa92d70840f..7846e056f8cdd 100644 --- a/iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/reporter/prometheus/PrometheusReporter.java +++ b/iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/reporter/prometheus/PrometheusReporter.java @@ -130,7 +130,8 @@ public boolean start() { return false; } LOGGER.info( - "PrometheusReporter started, use port {}", METRIC_CONFIG.getPrometheusReporterPort()); + MetricsMessages.LOG_PROMETHEUSREPORTER_STARTED_USE_PORT_ARG_A688FFC8, + METRIC_CONFIG.getPrometheusReporterPort()); return true; } @@ -227,7 +228,8 @@ private String scrape() { HistogramSnapshot snapshot = timer.takeSnapshot(); if (Objects.isNull(snapshot)) { LOGGER.warn( - "Detected an error when taking metric timer snapshot, will discard this metric"); + MetricsMessages + .LOG_DETECTED_ERROR_TAKING_METRIC_TIMER_SNAPSHOT_WILL_DISCARD_METRIC_B7154169); continue; } name += "_seconds"; diff --git a/iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/utils/MetricInfo.java b/iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/utils/MetricInfo.java index 416a143dc6e38..f72b0a10ef3a7 100644 --- a/iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/utils/MetricInfo.java +++ b/iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/utils/MetricInfo.java @@ -19,6 +19,8 @@ package org.apache.iotdb.metrics.utils; +import org.apache.iotdb.metrics.i18n.MetricsMessages; + import org.apache.tsfile.utils.Pair; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -52,7 +54,8 @@ public MetricInfo(MetricType type, String name, String... tags) { } } else { logger.error( - "The size of metric tags should be even, but was odd, tags: {}.", String.join(",", tags)); + MetricsMessages.LOG_SIZE_METRIC_TAGS_SHOULD_EVEN_BUT_WAS_ODD_TAGS_ARG_201E6A2A, + String.join(",", tags)); } this.metaInfo = new MetaInfo(type, this.tags.keySet()); } diff --git a/iotdb-core/node-commons/src/main/i18n/en/org/apache/iotdb/commons/i18n/AuthMessages.java b/iotdb-core/node-commons/src/main/i18n/en/org/apache/iotdb/commons/i18n/AuthMessages.java index 57f5b8d70b9f3..edab81ba818aa 100644 --- a/iotdb-core/node-commons/src/main/i18n/en/org/apache/iotdb/commons/i18n/AuthMessages.java +++ b/iotdb-core/node-commons/src/main/i18n/en/org/apache/iotdb/commons/i18n/AuthMessages.java @@ -116,4 +116,11 @@ private AuthMessages() {} public static final String NAME_CANNOT_CONTAIN_SPACES = "The name cannot contain spaces"; public static final String PASSWORD_CANNOT_CONTAIN_SPACES = "The password cannot contain spaces"; + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String EXCEPTION_ACCESS_DENIED_E128C1A1 = "Access Denied: "; + public static final String EXCEPTION_ENCRYPT_DECRYPT_FAILED_163764B5 = "Encrypt or decrypt failed."; + public static final String EXCEPTION_BACKSLASH_QUOTE_D4C5D637 = "\""; + } diff --git a/iotdb-core/node-commons/src/main/i18n/en/org/apache/iotdb/commons/i18n/ClientMessages.java b/iotdb-core/node-commons/src/main/i18n/en/org/apache/iotdb/commons/i18n/ClientMessages.java index ab7b5a100bd01..c82ab3a84816a 100644 --- a/iotdb-core/node-commons/src/main/i18n/en/org/apache/iotdb/commons/i18n/ClientMessages.java +++ b/iotdb-core/node-commons/src/main/i18n/en/org/apache/iotdb/commons/i18n/ClientMessages.java @@ -92,4 +92,19 @@ public final class ClientMessages { "{} failed on Node {}, because {}, retrying {}..."; private ClientMessages() {} + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String LOG_RETURN_CLIENT_ARG_POOL_FAILED_BECAUSE_NODE_NULL_81511014 = "Return client {} to pool failed because the node is null. "; + public static final String LOG_MAY_CAUSE_RESOURCE_LEAK_PLEASE_CHECK_YOUR_CODE_DD730191 = "This may cause resource leak, please check your code."; + public static final String EXCEPTION_UNSUPPORTED_REQUEST_TYPE_2030CDC7 = "unsupported request type "; + public static final String EXCEPTION_PLEASE_SET_IT_ASYNCREQUESTMANAGER_INITACTIONMAPBUILDER_0F039A93 = ", please set it in AsyncRequestManager::initActionMapBuilder()"; + public static final String EXCEPTION_ERROR_CALLING_METHOD_C04E5A63 = "Error in calling method "; + public static final String EXCEPTION_BECAUSE_ACD0B1C8 = ", because: "; + public static final String LOG_PIPE_CONNECTION_TIMEOUT_ADJUSTED_ARG_MS_ARG_MINS_6D126A53 = "Pipe connection timeout is adjusted to {} ms ({} mins)"; + public static final String LOG_BODY_SIZE_REQUEST_TOO_LARGE_REQUEST_WILL_SLICED_ORIGIN_REQ_35E73788 = "The body size of the request is too large. The request will be sliced. Origin req: {}-{}. "; + public static final String LOG_REQUEST_BODY_SIZE_ARG_THRESHOLD_ARG_69B1BE00 = "Request body size: {}, threshold: {}"; + public static final String LOG_FAILED_TRANSFER_SLICE_ORIGIN_REQ_ARG_ARG_RETRY_WHOLE_TRANSFER_E1EA2F41 = "Failed to transfer slice. Origin req: {}-{}. Retry the whole transfer."; + public static final String EXCEPTION_FAILED_TRANSFER_SLICE_ORIGIN_REQ_ARG_ARG_SLICE_INDEX_ARG_7219936C = "Failed to transfer slice. Origin req: %s-%s, slice index: %d, slice count: %d. Reason: %s"; + } diff --git a/iotdb-core/node-commons/src/main/i18n/en/org/apache/iotdb/commons/i18n/CommonMessages.java b/iotdb-core/node-commons/src/main/i18n/en/org/apache/iotdb/commons/i18n/CommonMessages.java index 5a2e41961978f..09a841ebe776d 100644 --- a/iotdb-core/node-commons/src/main/i18n/en/org/apache/iotdb/commons/i18n/CommonMessages.java +++ b/iotdb-core/node-commons/src/main/i18n/en/org/apache/iotdb/commons/i18n/CommonMessages.java @@ -126,4 +126,82 @@ private CommonMessages() {} public static final String ITERATOR_MUST_NOT_BE_NULL = "Iterator must not be null"; public static final String ITERATOR_REMOVE_ONLY_AFTER_NEXT = "Iterator remove() can only be called once after next()"; public static final String FAIL_TO_GET_DATA_TYPE_IN_ROW = "Fail to get data type in row "; + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String LOG_STEP_METRICS_ARG_ARG_TOTAL_ARG_SUM_2FMS_AVG_ARG_87491AB0 = "step metrics [%d]-[%s] - Total: %d, SUM: %.2fms, AVG: %fms, Last%dAVG: %fms"; + public static final String LOG_ERROR_OCCURRED_DURING_TRANSFERRING_FILE_ARG_BYTEBUFFER_CAUSE_ARG_FEDC38A3 = "Error occurred during transferring file{} to ByteBuffer, the cause is {}"; + public static final String LOG_ERROR_OCCURRED_DURING_WRITING_BYTEBUFFER_ARG_CAUSE_ARG_F3AD2DA0 = "Error occurred during writing bytebuffer to {} , the cause is {}"; + public static final String EXCEPTION_SIZE_FILE_EXCEED_ARG_BYTES_C60F1149 = "Size of file exceed %d bytes"; + public static final String EXCEPTION_UNRECOGNIZED_TCONSENSUSGROUPTYPE_9204FF8E = "Unrecognized TConsensusGroupType: "; + public static final String EXCEPTION_ID_1F238F51 = " with id = "; + public static final String LOG_MEMORY_COST_RELEASED_LARGER_THAN_MEMORY_COST_MEMORY_BLOCK_ARG_00DD9DA9 = "The memory cost to be released is larger than the memory cost of memory block {}"; + public static final String LOG_EXACTALLOCATEIFSUFFICIENT_FAILED_ALLOCATE_MEMORY_A47897D9 = "exactAllocateIfSufficient: failed to allocate memory, "; + public static final String LOG_TOTAL_MEMORY_SIZE_ARG_BYTES_USED_MEMORY_SIZE_ARG_BYTES_5FB5059F = "total memory size {} bytes, used memory size {} bytes, "; + public static final String LOG_REQUESTED_MEMORY_SIZE_ARG_BYTES_USED_THRESHOLD_ARG_D7061DEB = "requested memory size {} bytes, used threshold {}"; + public static final String LOG_TRYALLOCATE_ALLOCATED_MEMORY_B3D564D9 = "tryAllocate: allocated memory, "; + public static final String LOG_ORIGINAL_REQUESTED_MEMORY_SIZE_ARG_BYTES_03D28A6B = "original requested memory size {} bytes, "; + public static final String LOG_ACTUAL_REQUESTED_MEMORY_SIZE_ARG_BYTES_62760058 = "actual requested memory size {} bytes"; + public static final String LOG_TRYALLOCATE_FAILED_ALLOCATE_MEMORY_838FA6FB = "tryAllocate: failed to allocate memory, "; + public static final String LOG_REQUESTED_MEMORY_SIZE_ARG_BYTES_BF9CEF81 = "requested memory size {} bytes"; + public static final String LOG_GETORREGISTERMEMORYBLOCK_FAILED_MEMORY_BLOCK_ARG_ALREADY_EXISTS_42CA8914 = "getOrRegisterMemoryBlock failed: memory block {} already exists, "; + public static final String LOG_IT_S_SIZE_ARG_REQUESTED_SIZE_ARG_AF8F04B2 = "it's size is {}, requested size is {}"; + public static final String LOG_GETMEMORYMANAGER_MEMORY_MANAGER_ARG_ALREADY_EXISTS_IT_S_SIZE_ARG_0102560A = "getMemoryManager: memory manager {} already exists, it's size is {}, enabled is {}"; + public static final String LOG_GETORCREATEMEMORYMANAGER_FAILED_TOTAL_MEMORY_SIZE_ARG_BYTES_LESS_THAN_ALLOCATED_3D110256 = + "getOrCreateMemoryManager failed: total memory size {} bytes is less than allocated memory" + + " size {} bytes"; + public static final String EXCEPTION_EXACTALLOCATE_FAILED_ALLOCATE_MEMORY_AFTER_ARG_RETRIES_957A647B = "exactAllocate: failed to allocate memory after %d retries, "; + public static final String EXCEPTION_TOTAL_MEMORY_SIZE_ARG_BYTES_USED_MEMORY_SIZE_ARG_BYTES_9FC9A9C6 = "total memory size %d bytes, used memory size %d bytes, "; + public static final String EXCEPTION_REQUESTED_MEMORY_SIZE_ARG_BYTES_E6340842 = "requested memory size %d bytes"; + public static final String EXCEPTION_REGISTER_MEMORY_BLOCK_ARG_FAILED_SIZEINBYTES_SHOULD_NON_NEGATIVE_EC54AA75 = "register memory block %s failed: sizeInBytes should be non-negative"; + public static final String LOG_DELETE_SYSTEM_PROPERTIES_TMP_FILE_FAIL_YOU_MAY_MANUALLY_DELETE_F81C4A53 = "Delete system.properties tmp file fail, you may manually delete it: {}"; + public static final String LOG_FAILED_DELETE_SYSTEM_PROPERTIES_FILE_YOU_SHOULD_MANUALLY_DELETE_THEM_77F91A98 = "Failed to delete system.properties file, you should manually delete them: {}, {}"; + public static final String EXCEPTION_LENGTH_PARAMETERS_SHOULD_EVENLY_DIVIDED_2_BUT_ACTUAL_LENGTH_E9A792D9 = "Length of parameters should be evenly divided by 2, but the actual length is "; + public static final String EXCEPTION_TMP_SYSTEM_PROPERTIES_FILE_MUST_EXIST_CALL_REPLACEFORMALFILE_FA63B976 = "Tmp system properties file must exist when call replaceFormalFile"; + public static final String LOG_UNRECOVERABLE_ERROR_OCCURS_CHANGE_SYSTEM_STATUS_READ_ONLY_BECAUSE_HANDLE_05C9AD1A = + "Unrecoverable error occurs! Change system status to read-only because handle_system_error is" + + " CHANGE_TO_READ_ONLY. Only query statements are permitted!"; + public static final String LOG_UNRECOVERABLE_ERROR_OCCURS_SHUTDOWN_SYSTEM_DIRECTLY_BECAUSE_HANDLE_SYSTEM_ERROR_14FC06C9 = "Unrecoverable error occurs! Shutdown system directly because handle_system_error is SHUTDOWN."; + public static final String EXCEPTION_TYPE_ARG_NOT_SUPPORTED_PIPE_RATE_AVERAGE_F74694AD = "The type %s is not supported in pipe rate average."; + public static final String EXCEPTION_UNKNOWN_UDFTYPE_9A8D1B23 = "Unknown UDFType:"; + public static final String EXCEPTION_8S_5F5F831F = "%8s"; + public static final String EXCEPTION_CAN_NOT_RECOGNIZE_PIPETYPE_ARG_8850A249 = "Can not recognize PipeType %s."; + public static final String EXCEPTION_TARGETREGIONLIST_EMPTY_DEVICE_ARG_TIMESLOT_ARG_E7E5818C = "targetRegionList is empty. device: %s, timeSlot: %s"; + public static final String EXCEPTION_DATABASE_18F8303F = "Database "; + public static final String EXCEPTION_NOT_EXISTS_FAILED_CREATE_AUTOMATICALLY_BECAUSE_ENABLE_AUTO_CREATE_SCHEMA_80DE1A4B = " not exists and failed to create automatically because enable_auto_create_schema is FALSE."; + public static final String EXCEPTION_PATH_DOES_NOT_EXIST_737CB95D = "Path does not exist. "; + public static final String EXCEPTION_CAN_T_GET_NEXT_FOLDER_ARG_BECAUSE_THEY_ALL_FULL_A105BB2D = "Can't get next folder from [%s], because they are all full."; + public static final String EXCEPTION_PARAMETER_ARG_CAN_NOT_ARG_PLEASE_SET_ARG_BECAUSE_ARG_749738D1 = "Parameter %s can not be %s, please set to: %s. Because %s"; + public static final String EXCEPTION_QUERY_EXECUTION_TIME_OUT_A5DC7BFB = "Query execution is time out"; + public static final String EXCEPTION_OBJECT_FILE_ARG_DOES_NOT_EXIST_7EA8CB1C = "Object file %s does not exist"; + public static final String EXCEPTION_ARG_NOT_LEGAL_PRIVILEGE_504838E8 = "%s is not a legal privilege"; + public static final String EXCEPTION_SOME_PORTS_OCCUPIED_77ED044D = "Some ports are occupied"; + public static final String EXCEPTION_PORTS_ARG_OCCUPIED_B462E9DA = "Ports %s are occupied"; + public static final String EXCEPTION_UNEXPECTED_ERROR_OCCURS_SERIALIZATION_A6B2E222 = "Unexpected error occurs in serialization"; + public static final String EXCEPTION_COLUMN_ARG_TABLE_ARG_ARG_DOES_NOT_EXIST_D8145581 = "Column %s in table '%s.%s' does not exist."; + public static final String EXCEPTION_TABLE_ARG_ARG_DOES_NOT_EXIST_796E503B = "Table '%s.%s' does not exist."; + public static final String EXCEPTION_TABLE_ARG_ARG_ALREADY_EXISTS_D4BDF4B5 = "Table '%s.%s' already exists."; + public static final String EXCEPTION_COULDN_T_CONSTRUCTOR_SERIESPARTITIONEXECUTOR_CLASS_ARG_34FB9F45 = "Couldn't Constructor SeriesPartitionExecutor class: %s"; + public static final String EXCEPTION_CANNOT_USE_SETVALUE_OBJECT_BEING_SET_ALREADY_MAP_676ED3BF = "Cannot use setValue() when the object being set is already in the map"; + public static final String EXCEPTION_ITERATOR_GETKEY_CAN_ONLY_CALLED_AFTER_NEXT_BEFORE_REMOVE_009C456B = "Iterator getKey() can only be called after next() and before remove()"; + public static final String EXCEPTION_ITERATOR_GETVALUE_CAN_ONLY_CALLED_AFTER_NEXT_BEFORE_REMOVE_927A88A2 = "Iterator getValue() can only be called after next() and before remove()"; + public static final String EXCEPTION_ITERATOR_SETVALUE_CAN_ONLY_CALLED_AFTER_NEXT_BEFORE_REMOVE_51505AD1 = "Iterator setValue() can only be called after next() and before remove()"; + public static final String LOG_FAILED_CLOSE_UDFCLASSLOADER_QUERYID_ARG_BECAUSE_ARG_8B1C3739 = "Failed to close UDFClassLoader (queryId: {}), because {}"; + public static final String EXCEPTION_ATTRIBUTE_ARG_ARG_REQUIRED_BUT_WAS_NOT_PROVIDED_CD090883 = "attribute \"%s\"/\"%s\" is required but was not provided."; + public static final String EXCEPTION_USE_ATTRIBUTE_ARG_ARG_ONLY_ONE_AT_TIME_B431468C = "use attribute \"%s\" or \"%s\" only one at a time."; + public static final String EXCEPTION_ILLEGAL_OUTLIER_METHOD_OUTLIER_TYPE_SHOULD_AVG_STENDIS_COS_PRENEXTDIS_91D1C70A = "Illegal outlier method. Outlier type should be avg, stendis, cos or prenextdis."; + public static final String EXCEPTION_ILLEGAL_AGGREGATION_METHOD_AGGREGATION_TYPE_SHOULD_AVG_MIN_MAX_SUM_2D7BEC96 = "Illegal aggregation method. Aggregation type should be avg, min, max, sum, extreme, variance."; + public static final String EXCEPTION_CUMULATIVE_TABLE_FUNCTION_REQUIRES_SIZE_MUST_INTEGRAL_MULTIPLE_STEP_D8A9DA94 = "Cumulative table function requires size must be an integral multiple of step."; + public static final String EXCEPTION_COLUMN_TYPE_MUST_NUMERIC_IF_DELTA_NOT_0_F7864D4E = " The column type must be numeric if DELTA is not 0."; + public static final String EXCEPTION_TYPE_COLUMN_ARG_NOT_AS_EXPECTED_7A81636E = "The type of the column [%s] is not as expected."; + public static final String EXCEPTION_REQUIRED_COLUMN_ARG_NOT_FOUND_SOURCE_TABLE_ARGUMENT_993E1C08 = "Required column [%s] not found in the source table argument."; + public static final String EXCEPTION_UNSUPPORTED_PROGRESS_INDEX_TYPE_ARG_A84CDFF9 = "Unsupported progress index type %s."; + public static final String EXCEPTION_TIMEWINDOWSTATEPROGRESSINDEX_DOES_NOT_SUPPORT_TOPOLOGICAL_SORTING_897C8976 = "TimeWindowStateProgressIndex does not support topological sorting"; + public static final String EXCEPTION_INTENDED_READ_LENGTH_ARG_BUT_ARG_ACTUALLY_READ_DESERIALIZING_TIMEPROGRESSINDEX_63CD54E4 = + "The intended read length is %s but %s is actually read when deserializing TimeProgressIndex," + + " ProgressIndex: %s"; + public static final String EXCEPTION_COLON_3A291246 = " : "; + public static final String EXCEPTION_DATAPARTITIONMAP_IS_NULL_B764418A = "dataPartitionMap is null"; + public static final String EXCEPTION_ARG_634FCEDB = "%s"; + } diff --git a/iotdb-core/node-commons/src/main/i18n/en/org/apache/iotdb/commons/i18n/ConfigMessages.java b/iotdb-core/node-commons/src/main/i18n/en/org/apache/iotdb/commons/i18n/ConfigMessages.java index 5b49279bc42af..4b8cece0a7e50 100644 --- a/iotdb-core/node-commons/src/main/i18n/en/org/apache/iotdb/commons/i18n/ConfigMessages.java +++ b/iotdb-core/node-commons/src/main/i18n/en/org/apache/iotdb/commons/i18n/ConfigMessages.java @@ -74,4 +74,76 @@ public final class ConfigMessages { + " configuration file update. Ignore temporary file {}"; private ConfigMessages() {} + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String LOG_THERE_MAY_HAVE_BEEN_UNEXPECTED_INTERRUPTION_LAST_E784B008 = " There may have been an unexpected interruption in the last"; + public static final String LOG_CONFIGURATION_FILE_UPDATE_IGNORE_TEMPORARY_FILE_ARG_3DE7B218 = " configuration file update. Ignore temporary file {}"; + public static final String LOG_PIPEDATASTRUCTURETABLETSIZEINBYTES_SET_ARG_243363B3 = "pipeDataStructureTabletSizeInBytes is set to {}."; + public static final String LOG_PIPEDATASTRUCTURETABLETMEMORYBLOCKALLOCATIONREJECTTHRESHOLD_SET_ARG_EF34614A = "pipeDataStructureTabletMemoryBlockAllocationRejectThreshold is set to {}."; + public static final String LOG_PIPEDATASTRUCTURETSFILEMEMORYBLOCKALLOCATIONREJECTTHRESHOLD_SET_ARG_309A7E12 = "pipeDataStructureTsFileMemoryBlockAllocationRejectThreshold is set to {}."; + public static final String LOG_PIPETOTALFLOATINGMEMORYPROPORTION_SET_ARG_FDCA8082 = "pipeTotalFloatingMemoryProportion is set to {}."; + public static final String LOG_PIPESOURCEASSIGNERDISRUPTORRINGBUFFERSIZE_SET_ARG_31C9A8D8 = "pipeSourceAssignerDisruptorRingBufferSize is set to {}."; + public static final String LOG_PIPESOURCEASSIGNERDISRUPTORRINGBUFFERENTRYSIZE_SET_ARG_95D31172 = "pipeSourceAssignerDisruptorRingBufferEntrySize is set to {}."; + public static final String LOG_PIPECONNECTORHANDSHAKETIMEOUTMS_SET_ARG_64890ED2 = "pipeConnectorHandshakeTimeoutMs is set to {}."; + public static final String LOG_PIPEAIRGAPSINKTABLETTIMEOUTMS_SET_ARG_3413AC05 = "pipeAirGapSinkTabletTimeoutMs is set to {}."; + public static final String LOG_ISPIPESINKREADFILEBUFFERMEMORYCONTROLENABLED_SET_ARG_138BB142 = "isPipeSinkReadFileBufferMemoryControlEnabled is set to {}."; + public static final String LOG_PIPESINKRPCTHRIFTCOMPRESSIONENABLED_SET_ARG_1F2B6AB4 = "pipeSinkRPCThriftCompressionEnabled is set to {}."; + public static final String LOG_PIPEASYNCSINKFORCEDRETRYTSFILEEVENTQUEUESIZE_SET_ARG_0BB1C280 = "pipeAsyncSinkForcedRetryTsFileEventQueueSize is set to {}."; + public static final String LOG_PIPEASYNCSINKFORCEDRETRYTABLETEVENTQUEUESIZE_SET_ARG_8FDA7023 = "pipeAsyncSinkForcedRetryTabletEventQueueSize is set to {}."; + public static final String LOG_PIPEASYNCSINKFORCEDRETRYTOTALEVENTQUEUESIZE_SET_ARG_92D6EACB = "pipeAsyncSinkForcedRetryTotalEventQueueSize is set to {}."; + public static final String LOG_PIPEASYNCSINKMAXRETRYEXECUTIONTIMEMSPERCALL_SET_ARG_77E7B216 = "pipeAsyncSinkMaxRetryExecutionTimeMsPerCall is set to {}."; + public static final String LOG_PIPEASYNCSINKSELECTORNUMBER_SHOULD_GREATER_THAN_0_CONFIGURING_IT_NOT_CHANGE_EEB9793C = "pipeAsyncSinkSelectorNumber should be greater than 0, configuring it not to change."; + public static final String LOG_PIPEASYNCSINKMAXCLIENTNUMBER_SHOULD_GREATER_THAN_0_CONFIGURING_IT_NOT_CHANGE_11EF47BF = " pipeAsyncSinkMaxClientNumber should be greater than 0, configuring it not to change."; + public static final String LOG_PIPEASYNCSINKMAXTSFILECLIENTNUMBER_SHOULD_GREATER_THAN_0_CONFIGURING_IT_NOT_CHANGE_AC812FE2 = "pipeAsyncSinkMaxTsFileClientNumber should be greater than 0, configuring it not to change."; + public static final String LOG_PIPEASYNCSINKMAXTSFILECLIENTNUMBER_SET_ARG_7D83FCDE = "pipeAsyncSinkMaxTsFileClientNumber is set to {}."; + public static final String LOG_PIPEHEARTBEATINTERVALSECONDSFORCOLLECTINGPIPEMETA_SET_ARG_E171AAAD = "pipeHeartbeatIntervalSecondsForCollectingPipeMeta is set to {}."; + public static final String LOG_PIPEMETASYNCERINITIALSYNCDELAYMINUTES_SET_ARG_6E36A895 = "pipeMetaSyncerInitialSyncDelayMinutes is set to {}."; + public static final String LOG_PIPEMETASYNCERSYNCINTERVALMINUTES_SET_ARG_CFBACD71 = "pipeMetaSyncerSyncIntervalMinutes is set to {}."; + public static final String LOG_PIPEMETASYNCERAUTORESTARTPIPECHECKINTERVALROUND_SET_ARG_A80B4589 = "pipeMetaSyncerAutoRestartPipeCheckIntervalRound is set to {}."; + public static final String LOG_PIPESINKRETRYLOCALLYFORCONNECTIONERROR_SET_ARG_5D886CE6 = "pipeSinkRetryLocallyForConnectionError is set to {}"; + public static final String LOG_PIPESUBTASKEXECUTORBASICCHECKPOINTINTERVALBYCONSUMEDEVENTCOUNT_SET_ARG_CFCECFCE = "pipeSubtaskExecutorBasicCheckPointIntervalByConsumedEventCount is set to {}"; + public static final String LOG_PIPESUBTASKEXECUTORBASICCHECKPOINTINTERVALBYTIMEDURATION_SET_ARG_45B3F433 = "pipeSubtaskExecutorBasicCheckPointIntervalByTimeDuration is set to {}"; + public static final String LOG_PIPESUBTASKEXECUTORMAXTHREADNUM_SHOULD_GREATER_THAN_0_CONFIGURING_IT_NOT_CHANGE_25E0CE6E = "pipeSubtaskExecutorMaxThreadNum should be greater than 0, configuring it not to change."; + public static final String LOG_PIPERETRYLOCALLYFORPARALLELORUSERCONFLICT_SET_ARG_368926E5 = "pipeRetryLocallyForParallelOrUserConflict is set to {}."; + public static final String LOG_PIPESINKSUBTASKSLEEPINTERVALINITMS_SET_ARG_B8DCF143 = "pipeSinkSubtaskSleepIntervalInitMs is set to {}."; + public static final String LOG_PIPESINKSUBTASKSLEEPINTERVALMAXMS_SET_ARG_0010425D = "pipeSinkSubtaskSleepIntervalMaxMs is set to {}."; + public static final String LOG_PIPESUBTASKEXECUTORPENDINGQUEUEMAXBLOCKINGTIMEMS_SET_ARG_2F1A6865 = "pipeSubtaskExecutorPendingQueueMaxBlockingTimeMs is set to {}"; + public static final String LOG_PIPESUBTASKEXECUTORCRONHEARTBEATEVENTINTERVALSECONDS_SET_ARG_B5C9E195 = "pipeSubtaskExecutorCronHeartbeatEventIntervalSeconds is set to {}."; + public static final String LOG_PIPEREALTIMEQUEUEPOLLHISTORICALTSFILETHRESHOLD_SET_ARG_FD88A384 = "pipeRealTimeQueuePollHistoricalTsFileThreshold is set to {}"; + public static final String LOG_PIPEREALTIMEQUEUEMAXWAITINGTSFILESIZE_SET_ARG_7E0698AB = "pipeRealTimeQueueMaxWaitingTsFileSize is set to {}."; + public static final String LOG_PIPEREALTIMEFORCEDOWNGRADINGTIME_SET_ARG_98A0F8AE = "pipeRealtimeForceDowngradingTime is set to {}."; + public static final String LOG_PIPEREALTIMEFORCEDOWNGRADINGPROPORTION_SET_ARG_92974D0B = "pipeRealtimeForceDowngradingProportion is set to {}."; + public static final String LOG_PIPERECEIVERLOGINPERIODICVERIFICATIONINTERVALMS_SET_ARG_158C791C = "pipeReceiverLoginPeriodicVerificationIntervalMs is set to {}"; + public static final String LOG_PIPERECEIVERACTUALTOESTIMATEDMEMORYRATIO_SET_ARG_0D1F305D = "pipeReceiverActualToEstimatedMemoryRatio is set to {}"; + public static final String LOG_PIPERECEIVERREQDECOMPRESSEDMAXLENGTHINBYTES_SET_ARG_9356E410 = "pipeReceiverReqDecompressedMaxLengthInBytes is set to {}."; + public static final String LOG_IGNORE_INVALID_PIPEAIRGAPRECEIVERMAXPAYLOADSIZEINBYTES_ARG_BECAUSE_IT_MUST_GREATER_THAN_0_8ACA836C = "Ignore invalid pipeAirGapReceiverMaxPayloadSizeInBytes {}, because it must be greater than 0."; + public static final String LOG_PIPEAIRGAPRECEIVERMAXPAYLOADSIZEINBYTES_SET_ARG_9B21877F = "pipeAirGapReceiverMaxPayloadSizeInBytes is set to {}."; + public static final String LOG_PIPEPERIODICALLOGMININTERVALSECONDS_SET_ARG_5535C79E = "pipePeriodicalLogMinIntervalSeconds is set to {}."; + public static final String LOG_PIPEMETAREPORTMAXLOGINTERVALROUNDS_SET_ARG_0090AECB = "pipeMetaReportMaxLogIntervalRounds is set to {}"; + public static final String LOG_PIPETSFILEPINMAXLOGINTERVALROUNDS_SET_ARG_FAFE1040 = "pipeTsFilePinMaxLogIntervalRounds is set to {}"; + public static final String LOG_PIPEMEMORYALLOCATEFORTSFILESEQUENCEREADERINBYTES_SET_ARG_8A26960D = "pipeMemoryAllocateForTsFileSequenceReaderInBytes is set to {}"; + public static final String LOG_PIPEMEMORYEXPANDERINTERVALSECONDS_SET_ARG_73F96BBC = "pipeMemoryExpanderIntervalSeconds is set to {}"; + public static final String LOG_PIPEMEMORYALLOCATERETRYINTERVALMS_SET_ARG_39D52E47 = "pipeMemoryAllocateRetryIntervalMs is set to {}"; + public static final String LOG_PIPELEADERCACHEMEMORYUSAGEPERCENTAGE_SET_ARG_E32DE64B = "pipeLeaderCacheMemoryUsagePercentage is set to {}"; + public static final String LOG_PIPELISTENINGQUEUETRANSFERSNAPSHOTTHRESHOLD_SET_ARG_FD856477 = "pipeListeningQueueTransferSnapshotThreshold is set to {}"; + public static final String LOG_PIPESNAPSHOTEXECUTIONMAXBATCHSIZE_SET_ARG_F1C5C62C = "pipeSnapshotExecutionMaxBatchSize is set to {}"; + public static final String LOG_PIPEREMAININGTIMECOMMITRATEAUTOSWITCHSECONDS_SET_ARG_17E6C979 = "pipeRemainingTimeCommitRateAutoSwitchSeconds is set to {}"; + public static final String LOG_PIPEREMAININGTIMECOMMITRATEAVERAGETIME_SET_ARG_D010BE98 = "pipeRemainingTimeCommitRateAverageTime is set to {}"; + public static final String LOG_PIPEREMAININGINSERTEVENTCOUNTAVERAGE_SET_ARG_17C28F47 = "pipeRemainingInsertEventCountAverage is set to {}"; + public static final String LOG_PIPEDYNAMICMEMORYADJUSTMENTTHRESHOLD_SET_ARG_2F008DB1 = "pipeDynamicMemoryAdjustmentThreshold is set to {}"; + public static final String LOG_PIPETHRESHOLDALLOCATIONSTRATEGYMAXIMUMMEMORYINCREMENTRATIO_SET_ARG_BFAD04E0 = "pipeThresholdAllocationStrategyMaximumMemoryIncrementRatio is set to {}"; + public static final String LOG_PIPEMEMORYBLOCKLOWUSAGETHRESHOLD_SET_ARG_DDF99D69 = "pipeMemoryBlockLowUsageThreshold is set to {}"; + public static final String LOG_PIPETHRESHOLDALLOCATIONSTRATEGYFIXEDMEMORYHIGHUSAGETHRESHOLD_SET_ARG_82721CBE = "pipeThresholdAllocationStrategyFixedMemoryHighUsageThreshold is set to {}"; + public static final String LOG_PIPECHECKSYNCALLCLIENTLIVETIMEINTERVALMS_SET_ARG_246CE0EB = "pipeCheckSyncAllClientLiveTimeIntervalMs is set to {}"; + public static final String LOG_PIPESENDTSFILERATELIMITBYTESPERSECOND_SET_ARG_653F2CC4 = "pipeSendTsFileRateLimitBytesPerSecond is set to {}"; + public static final String LOG_PIPEALLSINKSRATELIMITBYTESPERSECOND_SET_ARG_EE3FE2A0 = "pipeAllSinksRateLimitBytesPerSecond is set to {}"; + public static final String LOG_RATELIMITERHOTRELOADCHECKINTERVALMS_SET_ARG_E086A4F0 = "rateLimiterHotReloadCheckIntervalMs is set to {}"; + public static final String LOG_PIPECONNECTORREQUESTSLICETHRESHOLDBYTES_SET_ARG_7FAA56F2 = "pipeConnectorRequestSliceThresholdBytes is set to {}"; + public static final String LOG_TWOSTAGEAGGREGATEMAXCOMBINERLIVETIMEINMS_SET_ARG_F10B7C02 = "twoStageAggregateMaxCombinerLiveTimeInMs is set to {}"; + public static final String LOG_TWOSTAGEAGGREGATEDATAREGIONINFOCACHETIMEINMS_SET_ARG_C7895888 = "twoStageAggregateDataRegionInfoCacheTimeInMs is set to {}"; + public static final String LOG_TWOSTAGEAGGREGATESENDERENDPOINTSCACHEINMS_SET_ARG_A3CF42B2 = "twoStageAggregateSenderEndPointsCacheInMs is set to {}"; + public static final String LOG_PIPEEVENTREFERENCETRACKINGENABLED_SET_ARG_98E9A640 = "pipeEventReferenceTrackingEnabled is set to {}"; + public static final String LOG_PIPEEVENTREFERENCEELIMINATEINTERVALSECONDS_SET_ARG_62542387 = "pipeEventReferenceEliminateIntervalSeconds is set to {}"; + } diff --git a/iotdb-core/node-commons/src/main/i18n/en/org/apache/iotdb/commons/i18n/PathMessages.java b/iotdb-core/node-commons/src/main/i18n/en/org/apache/iotdb/commons/i18n/PathMessages.java index b34e851801e0e..760794e858bec 100644 --- a/iotdb-core/node-commons/src/main/i18n/en/org/apache/iotdb/commons/i18n/PathMessages.java +++ b/iotdb-core/node-commons/src/main/i18n/en/org/apache/iotdb/commons/i18n/PathMessages.java @@ -49,4 +49,10 @@ public final class PathMessages { "Only accept MeasurementPath and AlignedPath."; private PathMessages() {} + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String EXCEPTION_NODES_LENGTH_MEASUREMENTPATH_SHOULD_ALWAYS_GREATER_THAN_2_CURRENT_39B913AE = "nodes.length for MeasurementPath should always be greater than 2, current is: "; + public static final String EXCEPTION_WILDCARDS_NOT_ALLOWED_PREFIX_PATH_948C42D1 = "Wildcards are not allowed in the prefix path: "; + } diff --git a/iotdb-core/node-commons/src/main/i18n/en/org/apache/iotdb/commons/i18n/PipeMessages.java b/iotdb-core/node-commons/src/main/i18n/en/org/apache/iotdb/commons/i18n/PipeMessages.java index f0086f2689855..b48437300d164 100644 --- a/iotdb-core/node-commons/src/main/i18n/en/org/apache/iotdb/commons/i18n/PipeMessages.java +++ b/iotdb-core/node-commons/src/main/i18n/en/org/apache/iotdb/commons/i18n/PipeMessages.java @@ -877,4 +877,60 @@ private PipeMessages() {} public static final String CONFIG_SUBSCRIPTION_META_SYNCER_SYNC_INTERVAL_MINUTES = "SubscriptionMetaSyncerSyncIntervalMinutes: {}"; + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String EXCEPTION_UNSUPPORTED_PIPERUNTIMEEXCEPTION_TYPE_ARG_C5D5D84C = "Unsupported PipeRuntimeException type %s."; + public static final String LOG_SUBSCRIPTIONENABLED_ARG_6F9EC0F9 = "SubscriptionEnabled: {}"; + public static final String LOG_SUBSCRIPTIONCONSENSUSPREFETCHEXECUTORMAXTHREADNUM_ARG_94D0BD76 = "SubscriptionConsensusPrefetchExecutorMaxThreadNum: {}"; + public static final String LOG_SUBSCRIPTIONCONSENSUSBATCHMAXDELAYINMS_ARG_38C2CB8B = "SubscriptionConsensusBatchMaxDelayInMs: {}"; + public static final String LOG_SUBSCRIPTIONCONSENSUSBATCHMAXSIZEINBYTES_ARG_F8D28441 = "SubscriptionConsensusBatchMaxSizeInBytes: {}"; + public static final String LOG_SUBSCRIPTIONCONSENSUSBATCHMAXTABLETCOUNT_ARG_60BB1D6A = "SubscriptionConsensusBatchMaxTabletCount: {}"; + public static final String LOG_SUBSCRIPTIONCONSENSUSBATCHMAXWALENTRIES_ARG_9BF1CAE4 = "SubscriptionConsensusBatchMaxWalEntries: {}"; + public static final String LOG_SUBSCRIPTIONCONSENSUSIDLESAFETIMEBARRIERINTERVALMS_ARG_A6944544 = "SubscriptionConsensusIdleSafeTimeBarrierIntervalMs: {}"; + public static final String EXCEPTION_UNEXPECTED_EOF_READING_REGION_PROGRESS_KEY_LENGTH_EBC10484 = "Unexpected EOF reading region progress key length"; + public static final String EXCEPTION_UNEXPECTED_EOF_READING_REGION_PROGRESS_KEY_C1532EAE = "Unexpected EOF reading region progress key"; + public static final String EXCEPTION_UNEXPECTED_EOF_READING_REGION_PROGRESS_VALUE_LENGTH_D95F9CE0 = "Unexpected EOF reading region progress value length"; + public static final String EXCEPTION_UNEXPECTED_EOF_READING_REGION_PROGRESS_VALUE_A459C521 = "Unexpected EOF reading region progress value"; + public static final String EXCEPTION_FAILED_ADD_SUBSCRIPTION_CONSUMER_GROUP_META_CONSUMER_ARG_DOES_NOT_EF08EE87 = + "Failed to add subscription to consumer group meta: consumer %s does not exist in consumer" + + " group %s"; + public static final String EXCEPTION_FAILED_REMOVE_SUBSCRIPTION_CONSUMER_GROUP_META_CONSUMER_ARG_DOES_NOT_75C319C3 = + "Failed to remove subscription from consumer group meta: consumer %s does not exist in" + + " consumer group %s"; + public static final String EXCEPTION_PATH_PATTERN_ARG_NOT_VALID_SOURCE_ONLY_PREFIX_FULL_PATH_784778B8 = "The path pattern %s is not valid for the source. Only prefix or full path is allowed."; + public static final String EXCEPTION_CAPTURE_TREE_CAN_NOT_SPECIFIED_FALSE_DOUBLE_LIVING_ENABLED_29A08445 = "capture.tree can not be specified to false when double living is enabled"; + public static final String EXCEPTION_CAPTURE_TABLE_CAN_NOT_SPECIFIED_FALSE_DOUBLE_LIVING_ENABLED_8AEB8F7B = "capture.table can not be specified to false when double living is enabled"; + public static final String EXCEPTION_FORWARDING_PIPE_REQUESTS_CAN_NOT_SPECIFIED_TRUE_DOUBLE_LIVING_ENABLED_B000E8A1 = "forwarding-pipe-requests can not be specified to true when double living is enabled"; + public static final String EXCEPTION_PARAMETERS_SET_ARG_NOT_ALLOWED_SKIPIF_2B9AA054 = "Parameters in set %s are not allowed in 'skipif'"; + public static final String LOG_USER_CONFLICT_EXCEPTION_DISCARDED_DATA_INFO_BECAUSE_ARG_DATA_ARG_CCE510A5 = + "User conflict exception: discarded data info because {}. data: {}. receiver message: {}." + + " status: {}"; + public static final String LOG_RE_INCREASE_REFERENCE_COUNT_EVENT_HAS_ALREADY_BEEN_RELEASED_ARG_B8DAAAEE = "re-increase reference count to event that has already been released: {}, stack trace: {}"; + public static final String LOG_INCREASE_REFERENCE_COUNT_FAILED_ENRICHEDEVENT_ARG_STACK_TRACE_ARG_94C472FC = "increase reference count failed, EnrichedEvent: {}, stack trace: {}"; + public static final String LOG_DECREASE_REFERENCE_COUNT_EVENT_HAS_ALREADY_BEEN_RELEASED_ARG_STACK_99FCAB8B = "decrease reference count to event that has already been released: {}, stack trace: {}"; + public static final String LOG_RESOURCE_REFERENCE_COUNT_DECREASED_0_BUT_FAILED_RELEASE_RESOURCE_ENRICHEDEVENT_A02A86AF = + "resource reference count is decreased to 0, but failed to release the resource," + + " EnrichedEvent: {}, stack trace: {}"; + public static final String LOG_REFERENCE_COUNT_DECREASED_ARG_EVENT_ARG_STACK_TRACE_ARG_A4BF56FC = "reference count is decreased to {}, event: {}, stack trace: {}"; + public static final String LOG_DECREASE_REFERENCE_COUNT_FAILED_ENRICHEDEVENT_ARG_STACK_TRACE_ARG_6A2024AB = "decrease reference count failed, EnrichedEvent: {}, stack trace: {}"; + public static final String LOG_BROKEN_INVARIANT_DETECT_INVISIBLE_EXTRACTOR_PARAMETERS_ARG_ADAD3038 = "BROKEN INVARIANT: DETECT INVISIBLE EXTRACTOR PARAMETERS {}"; + public static final String LOG_UNKNOWN_PATTERN_FORMAT_ARG_USE_PREFIX_MATCHING_FORMAT_DEFAULT_E7B9EFEC = "Unknown pattern format: {}, use prefix matching format by default."; + public static final String LOG_PIPE_LISTENING_QUEUE_SNAPSHOT_CACHE_UPDATED_ARG_414EE914 = "Pipe listening queue snapshot cache is updated: {}"; + public static final String LOG_FAILED_SERIALIZE_FILE_BECAUSE_FILE_ARG_ALREADY_EXIST_FACC5C4C = "Failed to serialize to file, because file {} is already exist."; + public static final String LOG_FAILED_DESERIALIZE_FILE_FILE_ARG_DOES_NOT_EXIST_2356708C = "Failed to deserialize from file, file {} does not exist."; + public static final String EXCEPTION_UNKNOWN_PIPE_RUNTIME_META_VERSION_C2F4B575 = "Unknown pipe runtime meta version: "; + public static final String EXCEPTION_ROOT_CAUSE_A22E94DE = ", root cause: "; + public static final String LOG_SUCCESSFULLY_EXECUTED_SUBTASK_ARG_ARG_AFTER_ARG_RETRIES_70972F07 = "Successfully executed subtask {}({}) after {} retries."; + public static final String EXCEPTION_FAILED_REFLECT_PIPEPLUGIN_INSTANCE_BECAUSE_PIPEPLUGINMETAKEEPER_NULL_0C9BD2E2 = "Failed to reflect PipePlugin instance, because PipePluginMetaKeeper is null."; + public static final String EXCEPTION_FAILED_REFLECT_PIPEPLUGIN_INSTANCE_BECAUSE_PLUGIN_NAME_NULL_416BD04D = "Failed to reflect PipePlugin instance, because plugin name is null."; + public static final String LOG_IOTDBSINK_ARG_ARG_4E140C06 = "IoTDBSink {} = {}"; + public static final String EXCEPTION_SOCKET_ARG_CLOSED_WILL_TRY_HANDSHAKE_02562BF1 = "Socket %s is closed, will try to handshake"; + public static final String EXCEPTION_NETWORK_ERROR_TRANSFER_FILE_ARG_BECAUSE_ARG_BC25323C = "Network error when transfer file %s, because %s."; + public static final String LOG_ORIGIN_REQUEST_TYPE_MISMATCH_EXPECTED_ARG_ACTUAL_ARG_D96D10AE = "Origin request type mismatch: expected {}, actual {}"; + public static final String LOG_ORIGIN_BODY_SIZE_MISMATCH_EXPECTED_ARG_ACTUAL_ARG_5D410B75 = "Origin body size mismatch: expected {}, actual {}"; + public static final String LOG_INVALID_SLICE_INDEX_EXPECTED_ARG_ACTUAL_ARG_2AC41628 = "Invalid slice index: expected {}, actual {}"; + public static final String EXCEPTION_DECOMPRESSED_LENGTH_SHOULD_BETWEEN_0_ARG_BUT_GOT_ARG_488B3073 = "Decompressed length should be between 0 and %d, but got %d."; + public static final String EXCEPTION_COMMA_50AD1C01 = ", "; + } diff --git a/iotdb-core/node-commons/src/main/i18n/en/org/apache/iotdb/commons/i18n/QueryMessages.java b/iotdb-core/node-commons/src/main/i18n/en/org/apache/iotdb/commons/i18n/QueryMessages.java index 6aef62d27ef53..b4a3a4b65bb63 100644 --- a/iotdb-core/node-commons/src/main/i18n/en/org/apache/iotdb/commons/i18n/QueryMessages.java +++ b/iotdb-core/node-commons/src/main/i18n/en/org/apache/iotdb/commons/i18n/QueryMessages.java @@ -262,4 +262,288 @@ private QueryMessages() {} public static final String NO_CHANNEL_GROUP_BY_HASH_NOT_SUPPORT_APPEND = "NoChannelGroupByHash does not support appendValuesTo"; public static final String NO_CHANNEL_GROUP_BY_HASH_NOT_SUPPORT_RAW_HASH = "NoChannelGroupByHash does not support getRawHash"; public static final String MULTIPLE_TABLE_FUNCTION_AI_NODE_PROVIDER = "Multiple ITableFunctionAINodeServiceProvider found"; + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String EXCEPTION_UNKNOWN_TYPE_BC7EAB78 = "Unknown type: "; + public static final String EXCEPTION_UNEXPECTED_ROWSPERMATCH_F9B931C9 = "unexpected rowsPerMatch: "; + public static final String EXCEPTION_UNSUPPORTED_FILL_METHOD_0809912A = "Unsupported fill method: "; + public static final String EXCEPTION_EXCEPTNODE_SHOULD_NEVER_SERIALIZED_CURRENT_VERSION_6F5B4EE0 = "ExceptNode should never be serialized in current version"; + public static final String EXCEPTION_EXCEPTNODE_SHOULD_NEVER_DESERIALIZED_CURRENT_VERSION_690C18F0 = "ExceptNode should never be deserialized in current version"; + public static final String EXCEPTION_INTERSECTNODE_SHOULD_NEVER_SERIALIZED_CURRENT_VERSION_68D2C0D3 = "IntersectNode should never be serialized in current version"; + public static final String EXCEPTION_INTERSECTNODE_SHOULD_NEVER_DESERIALIZED_CURRENT_VERSION_A3614371 = "IntersectNode should never be deserialized in current version"; + public static final String EXCEPTION_COMMA_50AD1C01 = ", "; + public static final String EMPTY_MESSAGE = ""; + public static final String EXCEPTION_OUTERQUERYSCOPE_IS_NULL_D5305685 = "outerQueryScope is null"; + public static final String EXCEPTION_WARNINGCOLLECTOR_IS_NULL_7A524A68 = "warningCollector is null"; + public static final String EXCEPTION_UPDATEKIND_IS_NULL_6CA83291 = "updateKind is null"; + public static final String EXCEPTION_EXPECTED_ARG_FIELDS_COMMA_GOT_ARG_498063F2 = "Expected %s fields, got %s"; + public static final String EXCEPTION_MISSING_TABLE_ARGUMENT_COLON_ARG_4F1E9F4E = "Missing table argument: %s"; + public static final String EXCEPTION_TABLE_ARGUMENT_SPECIFICATION_CANNOT_HAVE_A_DEFAULT_VALUE_DOT_009A02CA = "Table argument specification cannot have a default value."; + public static final String EXCEPTION_MISSING_DEFAULT_VALUE_FOR_SCALAR_ARGUMENT_COLON_ARG_8AF70F38 = "Missing default value for scalar argument: %s"; + public static final String EXCEPTION_RESULT_SCOPE_SHOULD_HAVE_OUTER_QUERY_SCOPE_EQUAL_WITH_PARAMETER_OUTER_QUERY_SCOP_BE9CDB22 = "result scope should have outer query scope equal with parameter outer query scope"; + public static final String EXCEPTION_RETURN_SCOPE_SHOULD_HAVE_CONTEXT_SCOPE_AS_ONE_OF_ITS_ANCESTORS_BBBFFE3E = "return scope should have context scope as one of its ancestors"; + public static final String EXCEPTION_MISSING_RELATION_ALIAS_437EDF9C = "missing relation alias"; + public static final String EXCEPTION_MISMATCHED_ALIASES_A6D3F8CE = "mismatched aliases"; + public static final String EXCEPTION_UNEXPECTED_OFFSET_ROWCOUNT_COLON_977E305C = "unexpected OFFSET rowCount: "; + public static final String EXCEPTION_INVALID_LIMIT_NODE_TYPE_DOT_EXPECTED_COLON_LIMIT_DOT_ACTUAL_COLON_ARG_5BCD1C76 = "Invalid limit node type. Expected: Limit. Actual: %s"; + public static final String EXCEPTION_UNEXPECTED_LIMIT_ROWCOUNT_COLON_CFF154F0 = "unexpected LIMIT rowCount: "; + public static final String EXCEPTION_NON_MINUS_EMPTY_ORDERBYEXPRESSIONS_LIST_WITHOUT_ORDERBYSCOPE_PROVIDED_240DDD64 = "non-empty orderByExpressions list without orderByScope provided"; + public static final String EXCEPTION_OUTPUT_FIELDS_IS_NULL_FOR_SELECT_ITEM_ARG_56AFEC51 = "output fields is null for select item %s"; + public static final String EXCEPTION_NODE_IS_NULL_C1479F4A = "node is null"; + public static final String EXCEPTION_COLUMNS_SHOULDN_QUOTE_T_BE_EMPTY_HERE_34E44AAA = "columns shouldn't be empty here"; + public static final String EXCEPTION_GREATER_THAN_0B37D87A = " > "; + public static final String EXCEPTION_GROUPID_OUT_OF_RANGE_8B10E54B = "groupId out of range"; + public static final String EXCEPTION_MINIMUMREQUIREDCAPACITY_MUST_BE_POSITIVE_81638118 = "minimumRequiredCapacity must be positive"; + public static final String EXCEPTION_EXPECTEDSIZE_MUST_BE_GREATER_THAN_ZERO_DA2E0345 = "expectedSize must be greater than zero"; + public static final String EXCEPTION_POSITION_COUNT_OUT_OF_BOUND_5513847E = "position count out of bound"; + public static final String EXCEPTION_ID_IS_NULL_9D5D27B1 = "id is null"; + public static final String EXCEPTION_NEWCHILDREN_IS_NOT_EMPTY_170FCE18 = "newChildren is not empty"; + public static final String EXCEPTION_ORDERBY_IS_NULL_AA2494DE = "orderBy is null"; + public static final String EXCEPTION_ORDERINGS_IS_NULL_59B1C097 = "orderings is null"; + public static final String EXCEPTION_ORDERBY_IS_EMPTY_963405E0 = "orderBy is empty"; + public static final String EXCEPTION_ORDERBY_KEYS_AND_ORDERINGS_DON_QUOTE_T_MATCH_E0334493 = "orderBy keys and orderings don't match"; + public static final String EXCEPTION_NO_ORDERING_FOR_SYMBOL_COLON_ARG_F54E70FC = "No ordering for symbol: %s"; + public static final String EXCEPTION_NAME_IS_NULL_C8B35959 = "name is null"; + public static final String EXCEPTION_UNEXPECTED_EXPRESSION_COLON_ARG_8E4AC833 = "Unexpected expression: %s"; + public static final String EXCEPTION_ORDERINGSCHEME_IS_NULL_4D4D2F6F = "orderingScheme is null"; + public static final String EXCEPTION_ASSIGNMENTS_IS_NULL_1FD6142D = "assignments is null"; + public static final String EXCEPTION_OUTPUT_IS_NULL_3CDA316E = "output is null"; + public static final String EXCEPTION_EXPRESSION_IS_NULL_16C079B5 = "expression is null"; + public static final String EXCEPTION_SYMBOL_ARG_ALREADY_HAS_ASSIGNMENT_ARG_COMMA_WHILE_ADDING_ARG_EE8CADA3 = "Symbol %s already has assignment %s, while adding %s"; + public static final String EXCEPTION_TYPEVARIABLECONSTRAINTS_IS_NULL_0A86DA34 = "typeVariableConstraints is null"; + public static final String EXCEPTION_LONGVARIABLECONSTRAINTS_IS_NULL_51F80E3C = "longVariableConstraints is null"; + public static final String EXCEPTION_RETURNTYPE_IS_NULL_07C7C6A5 = "returnType is null"; + public static final String EXCEPTION_ARGUMENTTYPES_IS_NULL_1E377BFD = "argumentTypes is null"; + public static final String EXCEPTION_TYPEVARIABLECONSTRAINT_IS_NULL_18B97042 = "typeVariableConstraint is null"; + public static final String EXCEPTION_TYPE_IS_NULL_16A3D3EB = "type is null"; + public static final String EXCEPTION_VARIADICBOUND_IS_NULL_33A6BCC2 = "variadicBound is null"; + public static final String EXCEPTION_CASTABLETO_IS_NULL_0F2A5B36 = "castableTo is null"; + public static final String EXCEPTION_CASTABLEFROM_IS_NULL_DE5158C7 = "castableFrom is null"; + public static final String EXCEPTION_FUNCTIONNAME_IS_NULL_0818CBC7 = "functionName is null"; + public static final String EXCEPTION_RESOLVEDFUNCTION_IS_NULL_81B5B93A = "resolvedFunction is null"; + public static final String EXCEPTION_VALUE_IS_NULL_192F6BFF = "value is null"; + public static final String EXCEPTION_VALUES_IS_NULL_F1D7D3D8 = "values is null"; + public static final String EXCEPTION_FIELDNAME_IS_NULL_DEB1CA0C = "fieldName is null"; + public static final String EXCEPTION_TYPESIGNATURE_IS_NULL_E8B47305 = "typeSignature is null"; + public static final String EXCEPTION_BASE_TYPE_NAME_CANNOT_BE_A_TYPE_VARIABLE_71E810A9 = "Base type name cannot be a type variable"; + public static final String EXCEPTION_BASE_IS_NULL_AC445AD0 = "base is null"; + public static final String EXCEPTION_BASE_IS_EMPTY_E86FBC3A = "base is empty"; + public static final String EXCEPTION_BAD_CHARACTERS_IN_BASE_TYPE_COLON_ARG_FA811786 = "Bad characters in base type: %s"; + public static final String EXCEPTION_PARAMETERS_IS_NULL_418C7892 = "parameters is null"; + public static final String EXCEPTION_PARAMETERS_FOR_ROW_TYPE_MUST_BE_NAMED_TYPE_PARAMETERS_6AADD078 = "Parameters for ROW type must be NAMED_TYPE parameters"; + public static final String EXCEPTION_KIND_IS_NULL_8C13BAB2 = "kind is null"; + public static final String EXCEPTION_COLUMNCATEGORY_IS_NULL_0075924B = "columnCategory is null"; + public static final String EXCEPTION_PROPERTIES_IS_NULL_57B88B49 = "properties is null"; + public static final String EXCEPTION_COMMENT_IS_NULL_0AD46118 = "comment is null"; + public static final String EXCEPTION_EXTRAINFO_IS_NULL_43AE989F = "extraInfo is null"; + public static final String EXCEPTION_SIGNATURE_IS_NULL_CA3D8772 = "signature is null"; + public static final String EXCEPTION_FUNCTIONID_IS_NULL_F91F8E89 = "functionId is null"; + public static final String EXCEPTION_FUNCTIONKIND_IS_NULL_EDF86E36 = "functionKind is null"; + public static final String EXCEPTION_FUNCTIONNULLABILITY_IS_NULL_6EF52FB4 = "functionNullability is null"; + public static final String EXCEPTION_INVALID_NAME_ARG_AD3FA0BF = "Invalid name %s"; + public static final String EXCEPTION_INVALID_NAME_COLON_LEFT_BRACKET_ARG_RIGHT_BRACKET_C46F15A4 = "Invalid name: [%s]"; + public static final String EXCEPTION_ARGUMENTNULLABLE_IS_NULL_0CC221D3 = "argumentNullable is null"; + public static final String EXCEPTION_LITERALFORMATTER_IS_NULL_3F4F4A2B = "literalFormatter is null"; + public static final String EXCEPTION_SYMBOLREFERENCEFORMATTER_IS_NULL_B9B540EC = "symbolReferenceFormatter is null"; + public static final String EXCEPTION_BUILDER_IS_NULL_ADE64E9B = "builder is null"; + public static final String EXCEPTION_VISITEXPRESSION_SHOULD_ONLY_BE_CALLED_AT_ROOT_93E4AAD4 = "visitExpression should only be called at root"; + public static final String EXCEPTION_VISITROWPATTERN_SHOULD_ONLY_BE_CALLED_AT_ROOT_9DE9F574 = "visitRowPattern should only be called at root"; + public static final String EXCEPTION_MISSING_IDENTIFIER_IN_AFTER_MATCH_SKIP_TO_LAST_82A12A21 = "missing identifier in AFTER MATCH SKIP TO LAST"; + public static final String EXCEPTION_MISSING_IDENTIFIER_IN_AFTER_MATCH_SKIP_TO_FIRST_F988B839 = "missing identifier in AFTER MATCH SKIP TO FIRST"; + public static final String EXCEPTION_LINE_MUST_BE_GREATER_THAN_0_8D2C1802 = "line must be > 0"; + public static final String EXCEPTION_COLUMN_MUST_BE_GREATER_THAN_0_2481C561 = "column must be > 0"; + public static final String EXCEPTION_LEFT_IS_NULL_2C1080C5 = "left is null"; + public static final String EXCEPTION_RIGHT_IS_NULL_97BD6491 = "right is null"; + public static final String EXCEPTION_LOCATION_IS_NULL_F134D388 = "location is null"; + public static final String EXCEPTION_CRITERIA_IS_NULL_2996D1A3 = "criteria is null"; + public static final String EXCEPTION_NO_JOIN_CRITERIA_SPECIFIED_44DED0B9 = "No join criteria specified"; + public static final String EXCEPTION_ARG_JOIN_CANNOT_HAVE_JOIN_CRITERIA_3B23E0D1 = "%s join cannot have join criteria"; + public static final String EXCEPTION_SELECTITEMS_16EC72CF = "selectItems"; + public static final String EXCEPTION_FUNCTION_IS_NULL_E0FA4B62 = "function is null"; + public static final String EXCEPTION_PRECISION_IS_NULL_73E48139 = "precision is null"; + public static final String EXCEPTION_OPERAND_IS_NULL_D0182140 = "operand is null"; + public static final String EXCEPTION_WHENCLAUSES_IS_NULL_140535CF = "whenClauses is null"; + public static final String EXCEPTION_DEFAULTVALUE_IS_NULL_B1C8490D = "defaultValue is null"; + public static final String EXCEPTION_THE_LENGTH_OF_SIMPLECASEEXPRESSION_QUOTE_S_WHENCLAUSES_MUST_GREATER_THAN_0_5D2963B9 = "the length of SimpleCaseExpression's whenClauses must greater than 0"; + public static final String EXCEPTION_SETS_IS_NULL_C9A2FA67 = "sets is null"; + public static final String EXCEPTION_GROUPING_SETS_CANNOT_BE_EMPTY_8E0BE7DB = "grouping sets cannot be empty"; + public static final String EXCEPTION_IDENTIFIERS_IS_NULL_72CDC3BE = "identifiers is null"; + public static final String EXCEPTION_IDENTIFIERS_IS_EMPTY_410ED65C = "identifiers is empty"; + public static final String EXCEPTION_QUERIES_IS_NULL_94399651 = "queries is null"; + public static final String EXCEPTION_QUERIES_IS_EMPTY_FE480BBC = "queries is empty"; + public static final String EXCEPTION_VALUE_IS_EMPTY_A42300DD = "value is empty"; + public static final String EXCEPTION_VALUE_CONTAINS_ILLEGAL_CHARACTERS_COLON_ARG_C6DBFEBA = "value contains illegal characters: %s"; + public static final String EXCEPTION_RELATIONS_IS_NULL_0275CA3C = "relations is null"; + public static final String EXCEPTION_FILLMETHOD_IS_NULL_2E5A83E6 = "fillMethod is null"; + public static final String EXCEPTION_RELATION_IS_NULL_890596ED = "relation is null"; + public static final String EXCEPTION_ALIAS_IS_NULL_B2ED729A = "alias is null"; + public static final String EXCEPTION_RESULT_IS_NULL_031E2F89 = "result is null"; + public static final String EXCEPTION_VALUELIST_IS_NULL_9271DC51 = "valueList is null"; + public static final String EXCEPTION_ROWS_IS_NULL_B8BF74DE = "rows is null"; + public static final String EXCEPTION_SORTITEMS_IS_NULL_DD277CDD = "sortItems is null"; + public static final String EXCEPTION_SORTITEMS_SHOULD_NOT_BE_EMPTY_78C26791 = "sortItems should not be empty"; + public static final String EXCEPTION_FIELD_IS_NULL_80E8CE23 = "field is null"; + public static final String EXCEPTION_EXISTINGWINDOWNAME_IS_NULL_5D67FD72 = "existingWindowName is null"; + public static final String EXCEPTION_PARTITIONBY_IS_NULL_84791B6B = "partitionBy is null"; + public static final String EXCEPTION_FRAME_IS_NULL_5A92D609 = "frame is null"; + public static final String EXCEPTION_CONDITION_IS_NULL_327EBA55 = "condition is null"; + public static final String EXCEPTION_TRUEVALUE_IS_NULL_99C09BA5 = "trueValue is null"; + public static final String EXCEPTION_PATTERNS_IS_NULL_7E0DDDF0 = "patterns is null"; + public static final String EXCEPTION_PATTERNS_LIST_IS_EMPTY_D4D1802F = "patterns list is empty"; + public static final String EXCEPTION_ARGUMENTS_IS_NULL_B1F6D4F2 = "arguments is null"; + public static final String EXCEPTION_TARGET_IS_NULL_240F0372 = "target is null"; + public static final String EXCEPTION_ALIASES_IS_NULL_C481EE59 = "aliases is null"; + public static final String EXCEPTION_SUBQUERY_IS_NULL_F0E1842F = "subquery is null"; + public static final String EXCEPTION_INPUT_IS_NULL_EE7EADB0 = "input is null"; + public static final String EXCEPTION_MEASURES_IS_NULL_EC9D2431 = "measures is null"; + public static final String EXCEPTION_ROWSPERMATCH_IS_NULL_661EA4A9 = "rowsPerMatch is null"; + public static final String EXCEPTION_AFTERMATCHSKIPTO_IS_NULL_7623C3C0 = "afterMatchSkipTo is null"; + public static final String EXCEPTION_PATTERN_IS_NULL_AC4E239A = "pattern is null"; + public static final String EXCEPTION_SUBSETS_IS_NULL_AF77CD01 = "subsets is null"; + public static final String EXCEPTION_VARIABLEDEFINITIONS_IS_NULL_5F7B8ED4 = "variableDefinitions is null"; + public static final String EXCEPTION_VARIABLEDEFINITIONS_IS_EMPTY_9E324869 = "variableDefinitions is empty"; + public static final String EXCEPTION_UNEXPECTED_ROWCOUNT_CLASS_COLON_ARG_170FC7CD = "unexpected rowCount class: %s"; + public static final String EXCEPTION_ITEMS_IS_NULL_32A25379 = "items is null"; + public static final String EXCEPTION_OPERANDS_IS_NULL_135465B7 = "operands is null"; + public static final String EXCEPTION_MUST_HAVE_AT_LEAST_TWO_OPERANDS_CE7B0DCB = "must have at least two operands"; + public static final String EXCEPTION_LINE_MUST_BE_AT_LEAST_ONE_COMMA_GOT_COLON_ARG_6BA7A99C = "line must be at least one, got: %s"; + public static final String EXCEPTION_COLUMN_MUST_BE_AT_LEAST_ONE_COMMA_GOT_COLON_ARG_4A529240 = "column must be at least one, got: %s"; + public static final String EXCEPTION_QUERY_IS_NULL_689B7978 = "query is null"; + public static final String EXCEPTION_OPERATOR_IS_NULL_F5BB9F59 = "operator is null"; + public static final String EXCEPTION_EXPECTED_AT_LEAST_2_TERMS_87CD9010 = "Expected at least 2 terms"; + public static final String EXCEPTION_SPECIFICATION_IS_NULL_BB4AA029 = "specification is null"; + public static final String EXCEPTION_TRIMSOURCE_IS_NULL_C7E6B71D = "trimSource is null"; + public static final String EXCEPTION_TRIMCHARACTER_IS_NULL_4036C3D8 = "trimCharacter is null"; + public static final String EXCEPTION_POSITION_IS_NULL_5B14C61B = "position is null"; + public static final String EXCEPTION_IDENTIFIER_IS_NULL_8F8171C8 = "identifier is null"; + public static final String EXCEPTION_MISSING_IDENTIFIER_IN_SKIP_TO_ARG_33E1A7C3 = "missing identifier in SKIP TO %s"; + public static final String EXCEPTION_UNEXPECTED_IDENTIFIER_IN_SKIP_TO_ARG_58438AFC = "unexpected identifier in SKIP TO %s"; + public static final String EXCEPTION_FIRST_IS_NULL_DC679129 = "first is null"; + public static final String EXCEPTION_ORIGINALPARTS_IS_NULL_EA9B01F3 = "originalParts is null"; + public static final String EXCEPTION_ORIGINALPARTS_IS_EMPTY_0D1EFAC4 = "originalParts is empty"; + public static final String EXCEPTION_MIN_IS_NULL_B80144C1 = "min is null"; + public static final String EXCEPTION_MAX_IS_NULL_CCABB3BF = "max is null"; + public static final String EXCEPTION_TABLE_IS_NULL_8DDD9098 = "table is null"; + public static final String EXCEPTION_WITH_IS_NULL_20C2A1AE = "with is null"; + public static final String EXCEPTION_QUERYBODY_IS_NULL_E3EB26CA = "queryBody is null"; + public static final String EXCEPTION_FILL_IS_NULL_3548C13D = "fill is null"; + public static final String EXCEPTION_OFFSET_IS_NULL_82BA6093 = "offset is null"; + public static final String EXCEPTION_LIMIT_IS_NULL_2EE9FA0F = "limit is null"; + public static final String EXCEPTION_LIMIT_MUST_BE_OPTIONAL_OF_EITHER_FETCHFIRST_OR_LIMIT_TYPE_0636CAA9 = "limit must be optional of either FetchFirst or Limit type"; + public static final String EXCEPTION_ATLEAST_IS_NULL_2FE8D701 = "atLeast is null"; + public static final String EXCEPTION_ATMOST_IS_NULL_778B3B3A = "atMost is null"; + public static final String EXCEPTION_VALUES_CANNOT_BE_EMPTY_F18F863D = "values cannot be empty"; + public static final String EXCEPTION_SELECT_IS_NULL_B45C440F = "select is null"; + public static final String EXCEPTION_FROM_IS_NULL_2651BF57 = "from is null"; + public static final String EXCEPTION_WHERE_IS_NULL_A1A3FCBC = "where is null"; + public static final String EXCEPTION_GROUPBY_IS_NULL_4CF478F2 = "groupBy is null"; + public static final String EXCEPTION_HAVING_IS_NULL_700DC5B0 = "having is null"; + public static final String EXCEPTION_WINDOWS_IS_NULL_549D8892 = "windows is null"; + public static final String EXCEPTION_FIELDINDEX_MUST_BE_GREATER_THAN_EQUALS_0_4138C39B = "fieldIndex must be >= 0"; + public static final String EXCEPTION_WINDOW_IS_NULL_7532B76A = "window is null"; + public static final String EXCEPTION_ESCAPE_IS_NULL_C9E4F69B = "escape is null"; + public static final String EXCEPTION_PROCESSINGMODE_IS_NULL_F4D8AE91 = "processingMode is null"; + public static final String EXCEPTION_SIMPLEGROUPBYEXPRESSIONS_IS_NULL_3F6A1ECC = "simpleGroupByExpressions is null"; + public static final String EXCEPTION_THE_LENGTH_OF_SEARCHEDCASEEXPRESSION_QUOTE_S_WHENCLAUSES_MUST_GREATER_THAN_0_D710DBF6 = "the length of SearchedCaseExpression's whenClauses must greater than 0"; + public static final String EXCEPTION_SIGN_IS_NULL_4AF91D16 = "sign is null"; + public static final String EXCEPTION_START_IS_NULL_5A075F04 = "start is null"; + public static final String EXCEPTION_END_IS_NULL_C6C46BAA = "end is null"; + public static final String EXCEPTION_SECOND_IS_NULL_989FAA15 = "second is null"; + public static final String EXCEPTION_MODE_IS_NULL_54A948DB = "mode is null"; + public static final String EXCEPTION_PATTERNQUANTIFIER_IS_NULL_0AC88BAB = "patternQuantifier is null"; + public static final String EXCEPTION_COLUMNS_IS_NULL_6C8F32B3 = "columns is null"; + public static final String EXCEPTION_COLUMNS_IS_EMPTY_C7A671C9 = "columns is empty"; + public static final String EXCEPTION_QUANTIFIER_IS_NULL_7B81C096 = "quantifier is null"; + public static final String EXCEPTION_COLUMNNAMES_IS_NULL_C3BF708F = "columnNames is null"; + public static final String EXCEPTION_SETDESCRIPTOR_IS_NULL_4ED0D19A = "setDescriptor is null"; + public static final String EXCEPTION_CLASSIFIERSYMBOL_IS_NULL_B92EE093 = "classifierSymbol is null"; + public static final String EXCEPTION_MATCHNUMBERSYMBOL_IS_NULL_D88DC4EE = "matchNumberSymbol is null"; + public static final String EXCEPTION_LOGICALINDEXPOINTER_IS_NULL_BF8B516B = "logicalIndexPointer is null"; + public static final String EXCEPTION_INPUTSYMBOL_IS_NULL_F4B354EB = "inputSymbol is null"; + public static final String EXCEPTION_PATTERN_CONCATENATION_MUST_HAVE_AT_LEAST_2_ELEMENTS_LEFT_PAREN_ACTUAL_COLON_ARG__8B283563 = "pattern concatenation must have at least 2 elements (actual: %s)"; + public static final String EXCEPTION_LABELS_IS_NULL_F4FBBECE = "labels is null"; + public static final String EXCEPTION_LOGICAL_OFFSET_MUST_BE_GREATER_THAN_EQUALS_0_COMMA_ACTUAL_COLON_ARG_539807BF = "logical offset must be >= 0, actual: %s"; + public static final String EXCEPTION_PATTERN_ALTERNATION_MUST_HAVE_AT_LEAST_2_ELEMENTS_LEFT_PAREN_ACTUAL_COLON_ARG_RI_A03B40AC = "pattern alternation must have at least 2 elements (actual: %s)"; + public static final String EXCEPTION_RUN_IRROWPATTERNFLATTENER_FIRST_TO_REMOVE_REDUNDANT_EMPTY_PATTERN_D2FB553C = "run IrRowPatternFlattener first to remove redundant empty pattern"; + public static final String EXCEPTION_OUTPUTSYMBOLS_IS_NULL_D7024804 = "outputSymbols is null"; + public static final String EXCEPTION_ROW_IS_NULL_36A3CCAA = "row is null"; + public static final String EXCEPTION_DECLARED_AND_ACTUAL_ROW_COUNTS_DON_QUOTE_T_MATCH_COLON_ARG_VS_ARG_EC8361A5 = "declared and actual row counts don't match: %s vs %s"; + public static final String EXCEPTION_MISSING_ROWS_SPECIFICATION_FOR_VALUES_WITH_NON_MINUS_EMPTY_OUTPUT_SYMBOLS_9BA9C169 = "missing rows specification for Values with non-empty output symbols"; + public static final String EXCEPTION_MISMATCHED_ROWS_DOT_ALL_ROWS_MUST_BE_THE_SAME_SIZE_E98CF3BE = "mismatched rows. All rows must be the same size"; + public static final String EXCEPTION_ROW_SIZE_DOESN_QUOTE_T_MATCH_THE_NUMBER_OF_OUTPUT_SYMBOLS_COLON_ARG_VS_ARG_5FBDF729 = "row size doesn't match the number of output symbols: %s vs %s"; + public static final String EXCEPTION_ARGUMENTNAME_IS_NULL_7F8F665F = "argumentName is null"; + public static final String EXCEPTION_PASSTHROUGHSPECIFICATION_IS_NULL_2B48FE41 = "passThroughSpecification is null"; + public static final String EXCEPTION_SYMBOL_IS_NULL_AE539B31 = "symbol is null"; + public static final String EXCEPTION_WRONG_NUMBER_OF_NEW_CHILDREN_817AF800 = "wrong number of new children"; + public static final String EXCEPTION_STARTTYPE_IS_NULL_2EB77A1F = "startType is null"; + public static final String EXCEPTION_STARTVALUE_IS_NULL_4FD58C2B = "startValue is null"; + public static final String EXCEPTION_SORTKEYCOERCEDFORFRAMESTARTCOMPARISON_IS_NULL_4E922E4D = "sortKeyCoercedForFrameStartComparison is null"; + public static final String EXCEPTION_ENDTYPE_IS_NULL_6B9E47D2 = "endType is null"; + public static final String EXCEPTION_ENDVALUE_IS_NULL_69BD66CB = "endValue is null"; + public static final String EXCEPTION_SORTKEYCOERCEDFORFRAMEENDCOMPARISON_IS_NULL_CB0BAC41 = "sortKeyCoercedForFrameEndComparison is null"; + public static final String EXCEPTION_ORIGINALSTARTVALUE_IS_NULL_6BCE78A9 = "originalStartValue is null"; + public static final String EXCEPTION_ORIGINALENDVALUE_IS_NULL_EBA46FFA = "originalEndValue is null"; + public static final String EXCEPTION_PREPARTITIONEDINPUTS_MUST_BE_CONTAINED_IN_PARTITIONBY_CE9DCE6F = "prePartitionedInputs must be contained in partitionBy"; + public static final String EXCEPTION_CANNOT_HAVE_SORTED_MORE_SYMBOLS_THAN_THOSE_REQUESTED_52EEB7C9 = "Cannot have sorted more symbols than those requested"; + public static final String EXCEPTION_PRESORTEDORDERPREFIX_CAN_ONLY_BE_GREATER_THAN_ZERO_IF_ALL_PARTITION_SYMBOLS_ARE__76BBC8DD = "preSortedOrderPrefix can only be greater than zero if all partition symbols are pre-partitioned"; + public static final String EXCEPTION_ORIGINALSTARTVALUE_MUST_BE_PRESENT_IF_STARTVALUE_IS_PRESENT_30B6FDFF = "originalStartValue must be present if startValue is present"; + public static final String EXCEPTION_FOR_FRAME_OF_TYPE_RANGE_COMMA_SORTKEYCOERCEDFORFRAMESTARTCOMPARISON_MUST_BE_PRES_7533A433 = "for frame of type RANGE, sortKeyCoercedForFrameStartComparison must be present if startValue is present"; + public static final String EXCEPTION_ORIGINALENDVALUE_MUST_BE_PRESENT_IF_ENDVALUE_IS_PRESENT_E79EF3D2 = "originalEndValue must be present if endValue is present"; + public static final String EXCEPTION_FOR_FRAME_OF_TYPE_RANGE_COMMA_SORTKEYCOERCEDFORFRAMEENDCOMPARISON_MUST_BE_PRESEN_36A665AC = "for frame of type RANGE, sortKeyCoercedForFrameEndComparison must be present if endValue is present"; + public static final String EXCEPTION_SUBQUERYASSIGNMENTS_IS_NULL_946CDC43 = "subqueryAssignments is null"; + public static final String EXCEPTION_CORRELATION_IS_NULL_F8327EAD = "correlation is null"; + public static final String EXCEPTION_ORIGINSUBQUERY_IS_NULL_8EFEB8D5 = "originSubquery is null"; + public static final String EXCEPTION_INPUT_DOES_NOT_CONTAIN_SYMBOLS_FROM_CORRELATION_1B3DB7BF = "Input does not contain symbols from correlation"; + public static final String EXCEPTION_EXPECTED_NEWCHILDREN_TO_CONTAIN_2_NODES_25FE7927 = "expected newChildren to contain 2 nodes"; + public static final String EXCEPTION_CHILDREN_IS_NULL_0CB43CE2 = "children is null"; + public static final String EXCEPTION_OUTPUTTOINPUTS_IS_NULL_4125312B = "outputToInputs is null"; + public static final String EXCEPTION_OUTPUTS_IS_NULL_EFD078A2 = "outputs is null"; + public static final String EXCEPTION_MUST_HAVE_AT_LEAST_ONE_SOURCE_4114F454 = "Must have at least one source"; + public static final String EXCEPTION_EVERY_CHILD_NEEDS_TO_MAP_ITS_SYMBOLS_TO_AN_OUTPUT_ARG_OPERATION_SYMBOL_7FA107A2 = "Every child needs to map its symbols to an output %s operation symbol"; + public static final String EXCEPTION_CHILD_DOES_NOT_PROVIDE_REQUIRED_SYMBOLS_B7CE956E = "Child does not provide required symbols"; + public static final String EXCEPTION_LEFTOUTPUTSYMBOLS_IS_NULL_083AE900 = "leftOutputSymbols is null"; + public static final String EXCEPTION_RIGHTOUTPUTSYMBOLS_IS_NULL_F44B848F = "rightOutputSymbols is null"; + public static final String EXCEPTION_FILTER_IS_NULL_8F83BD19 = "filter is null"; + public static final String EXCEPTION_SPILLABLE_IS_NULL_8226EA70 = "spillable is null"; + public static final String EXCEPTION_FILTER_MUST_BE_AN_EXPRESSION_OF_BOOLEAN_TYPE_COLON_ARG_F358F1A8 = "Filter must be an expression of boolean type: %s"; + public static final String EXCEPTION_LEFT_SOURCE_INPUTS_DO_NOT_CONTAIN_ALL_LEFT_OUTPUT_SYMBOLS_71459E3B = "Left source inputs do not contain all left output symbols"; + public static final String EXCEPTION_RIGHT_SOURCE_INPUTS_DO_NOT_CONTAIN_ALL_RIGHT_OUTPUT_SYMBOLS_23EBC024 = "Right source inputs do not contain all right output symbols"; + public static final String EXCEPTION_EQUALITY_JOIN_CRITERIA_SHOULD_BE_NORMALIZED_ACCORDING_TO_JOIN_SIDES_COLON_ARG_76EB7C14 = "Equality join criteria should be normalized according to join sides: %s"; + public static final String EXCEPTION_EXPECTED_NEWCHILDREN_TO_CONTAIN_2_NODES_FOR_JOINNODE_BEEC3D82 = "expected newChildren to contain 2 nodes for JoinNode"; + public static final String EXCEPTION_MARKERSYMBOL_IS_NULL_0313F046 = "markerSymbol is null"; + public static final String EXCEPTION_HASHSYMBOL_IS_NULL_1BD487F2 = "hashSymbol is null"; + public static final String EXCEPTION_DISTINCTSYMBOLS_IS_NULL_28B8DB52 = "distinctSymbols is null"; + public static final String EXCEPTION_DISTINCTSYMBOLS_CANNOT_BE_EMPTY_A44A693E = "distinctSymbols cannot be empty"; + public static final String EXCEPTION_EXPRESSIONANDVALUEPOINTERS_IS_NULL_8A02F345 = "expressionAndValuePointers is null"; + public static final String EXCEPTION_SKIPTOLABELS_IS_NULL_0A543C09 = "skipToLabels is null"; + public static final String EXCEPTION_SKIPTOPOSITION_IS_NULL_EFBA10CA = "skipToPosition is null"; + public static final String EXCEPTION_COLUMNNAMES_AND_OUTPUTSYMBOLS_SIZES_DON_QUOTE_T_MATCH_1BDF6B28 = "columnNames and outputSymbols sizes don't match"; + public static final String EXCEPTION_AGGREGATIONS_IS_NULL_CFE9CD2E = "aggregations is null"; + public static final String EXCEPTION_GROUPINGSETS_IS_NULL_8EE6D9BF = "groupingSets is null"; + public static final String EXCEPTION_PREGROUPEDSYMBOLS_IS_NULL_DC24FF7B = "preGroupedSymbols is null"; + public static final String EXCEPTION_GLOBALGROUPINGSETS_IS_NULL_5B175B47 = "globalGroupingSets is null"; + public static final String EXCEPTION_GROUPINGKEYS_IS_NULL_90D11F0C = "groupingKeys is null"; + public static final String EXCEPTION_MASK_IS_NULL_5A7CEA49 = "mask is null"; + public static final String EXCEPTION_SOURCE_IS_NULL_45946547 = "source is null"; + public static final String EXCEPTION_STEP_IS_NULL_F83262DA = "step is null"; + public static final String EXCEPTION_GROUPIDSYMBOL_IS_NULL_BFD3763D = "groupIdSymbol is null"; + public static final String EXCEPTION_GROUPING_COLUMNS_DOES_NOT_CONTAIN_GROUPID_COLUMN_83976C83 = "Grouping columns does not contain groupId column"; + public static final String EXCEPTION_ORDER_BY_DOES_NOT_SUPPORT_DISTRIBUTED_AGGREGATION_05109B26 = "ORDER BY does not support distributed aggregation"; + public static final String EXCEPTION_PRE_MINUS_GROUPED_SYMBOLS_MUST_BE_A_SUBSET_OF_THE_GROUPING_KEYS_AFC6C33D = "Pre-grouped symbols must be a subset of the grouping keys"; + public static final String EXCEPTION_GROUPING_SET_COUNT_MUST_BE_LARGER_THAN_0_06FE609E = "grouping set count must be larger than 0"; + public static final String EXCEPTION_LIST_OF_EMPTY_GLOBAL_GROUPING_SETS_MUST_BE_NO_LARGER_THAN_GROUPING_SET_COUNT_12DAD147 = "list of empty global grouping sets must be no larger than grouping set count"; + public static final String EXCEPTION_NO_GROUPING_KEYS_IMPLIES_AT_LEAST_ONE_GLOBAL_GROUPING_SET_COMMA_BUT_NONE_PROVIDE_F099B6D2 = "no grouping keys implies at least one global grouping set, but none provided"; + public static final String EXCEPTION_ARGUMENT_MUST_BE_SYMBOL_COLON_ARG_9C176D4D = "argument must be symbol: %s"; + public static final String EXCEPTION_ARG_AGGREGATION_FUNCTION_ARG_HAS_ARG_ARGUMENTS_COMMA_BUT_ARG_ARGUMENTS_WERE_PROV_53CC06CF = "%s aggregation function %s has %s arguments, but %s arguments were provided to function call"; + public static final String EXCEPTION_IDCOLUMN_IS_NULL_FA206D71 = "idColumn is null"; + public static final String EXCEPTION_EXPECTED_NEWCHILDREN_TO_CONTAIN_1_NODE_7A97D180 = "expected newChildren to contain 1 node"; + public static final String EXCEPTION_SOURCEJOINSYMBOL_IS_NULL_A88AEC85 = "sourceJoinSymbol is null"; + public static final String EXCEPTION_FILTERINGSOURCEJOINSYMBOL_IS_NULL_502C5BD5 = "filteringSourceJoinSymbol is null"; + public static final String EXCEPTION_SEMIJOINOUTPUT_IS_NULL_D961A39B = "semiJoinOutput is null"; + public static final String EXCEPTION_SOURCE_DOES_NOT_CONTAIN_JOIN_SYMBOL_FA572FD2 = "Source does not contain join symbol"; + public static final String EXCEPTION_FILTERING_SOURCE_DOES_NOT_CONTAIN_FILTERING_JOIN_SYMBOL_0C7B1BE3 = "Filtering source does not contain filtering join symbol"; + public static final String EXCEPTION_REHASHMEMORYRESERVATION_IS_NEGATIVE_7EFEFCC2 = "rehashMemoryReservation is negative"; + public static final String EXCEPTION_IDENTIFIER_CANNOT_BE_EMPTY_OR_NULL_9C70B87D = "Identifier cannot be empty or null"; + } diff --git a/iotdb-core/node-commons/src/main/i18n/en/org/apache/iotdb/commons/i18n/SchemaMessages.java b/iotdb-core/node-commons/src/main/i18n/en/org/apache/iotdb/commons/i18n/SchemaMessages.java index d659a68c1c676..58e7f6fe22012 100644 --- a/iotdb-core/node-commons/src/main/i18n/en/org/apache/iotdb/commons/i18n/SchemaMessages.java +++ b/iotdb-core/node-commons/src/main/i18n/en/org/apache/iotdb/commons/i18n/SchemaMessages.java @@ -76,4 +76,19 @@ private SchemaMessages() {} public static final String S_IS_NULL = "%s is null"; + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String EXCEPTION_DATABASE_MUST_SPECIFIED_SESSION_DATABASE_NOT_SET_CBF6F21F = "Database must be specified when session database is not set"; + public static final String MESSAGE_NOT_TTL_RULE_669A7BA4 = "Not TTL rule"; + public static final String MESSAGE_SET_4BE61E08 = " set for "; + public static final String EXCEPTION_FAILED_GET_ORIGINAL_DATABASE_BECAUSE_ARG_NULL_TABLE_ARG_5AE54514 = "Failed to get the original database, because the %s is null for table %s"; + public static final String EXCEPTION_FAILED_PARSE_TREE_VIEW_STRING_ARG_CONVERT_IDEVICEID_6E735586 = "Failed to parse the tree view string %s when convert to IDeviceID"; + public static final String EXCEPTION_SESSION_IS_NULL_6CF0F47D = "session is null"; + public static final String EXCEPTION_NAME_IS_NULL_C8B35959 = "name is null"; + public static final String EXCEPTION_ARG_IS_NOT_LOWERCASE_COLON_ARG_D78298F6 = "%s is not lowercase: %s"; + public static final String EMPTY_MESSAGE = ""; + public static final String EXCEPTION_OPERATOR_IS_NULL_F5BB9F59 = "operator is null"; + public static final String EXCEPTION_VALUE_IS_NULL_192F6BFF = "value is null"; + } diff --git a/iotdb-core/node-commons/src/main/i18n/en/org/apache/iotdb/commons/i18n/UtilMessages.java b/iotdb-core/node-commons/src/main/i18n/en/org/apache/iotdb/commons/i18n/UtilMessages.java index b13ad217f7ae5..8f2b4f7483dc6 100644 --- a/iotdb-core/node-commons/src/main/i18n/en/org/apache/iotdb/commons/i18n/UtilMessages.java +++ b/iotdb-core/node-commons/src/main/i18n/en/org/apache/iotdb/commons/i18n/UtilMessages.java @@ -196,4 +196,64 @@ public final class UtilMessages { public static final String READ_T_PIPE_SINK_INFO_FAILED = "Read TPipeSinkInfo failed: "; private UtilMessages() {} + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String EXCEPTION_INTERNAL_USER_NAMES_EXCEPT_DEFAULT_SUPERUSER_SEPARATION_DUTIES_ADMINS_MUST_3F045FC1 = "Internal user names (except the default superuser and separation-of-duties admins) must "; + public static final String EXCEPTION_START_01CCD2EF = "start with \""; + public static final String EXCEPTION_USER_NAMES_STARTING_8FDC637E = "User names starting with \""; + public static final String EXCEPTION_RESERVED_SYSTEM_USE_CANNOT_USED_NEW_USERS_AS_RENAME_CEB73835 = "\" are reserved for system use and cannot be used for new users or as a rename "; + public static final String EXCEPTION_TARGET_42AEFBAE = "target"; + public static final String EXCEPTION_LENGTH_NAME_MUST_GREATER_THAN_EQUAL_0387C3A5 = "The length of name must be greater than or equal to "; + public static final String EXCEPTION_LENGTH_NAME_MUST_LESS_THAN_EQUAL_B7B31C94 = "The length of name must be less than or equal to "; + public static final String EXCEPTION_NAME_CAN_ONLY_CONTAIN_LETTERS_NUMBERS_A313856E = "The name can only contain letters, numbers or !@#$%^*()_+-="; + public static final String EXCEPTION_LENGTH_PASSWORD_MUST_GREATER_THAN_EQUAL_F95F3E8F = "The length of password must be greater than or equal to "; + public static final String EXCEPTION_LENGTH_PASSWORD_MUST_LESS_THAN_EQUAL_C822ECBE = "The length of password must be less than or equal to "; + public static final String EXCEPTION_PASSWORD_CAN_ONLY_CONTAIN_LETTERS_NUMBERS_D84EE152 = "The password can only contain letters, numbers or !@#$%^*()_+-="; + public static final String EXCEPTION_ILLEGAL_SERIESPATH_ARG_SERIESPATH_SHOULD_START_ARG_FB9E3C07 = "Illegal seriesPath %s, seriesPath should start with \"%s\""; + public static final String EXCEPTION_ILLEGAL_PATTERN_PATH_ARG_ONLY_PATTERN_PATH_END_SUPPORTED_16CBB77D = "Illegal pattern path: %s, only pattern path that end with ** are supported."; + public static final String EXCEPTION_ILLEGAL_PATTERN_PATH_ARG_ONLY_PATTERN_PATH_END_WILDCARDS_SUPPORTED_7183A896 = "Illegal pattern path: %s, only pattern path that end with wildcards are supported."; + public static final String EXCEPTION_NO_SUCH_PRIVILEGE_62644205 = "No such privilege "; + public static final String MESSAGE_EXECUTED_SUCCESSFULLY_1EAF1169 = "Executed successfully."; + public static final String MESSAGE_REQUEST_TIMED_OUT_FD587FC4 = "Request timed out."; + public static final String MESSAGE_INCOMPATIBLE_VERSION_0C5CB2AF = "Incompatible version."; + public static final String MESSAGE_FAILED_REMOVING_DATANODE_B4B7F050 = "Failed while removing DataNode."; + public static final String MESSAGE_ALIAS_ALREADY_EXISTS_C05A2E5A = "Alias already exists."; + public static final String MESSAGE_PATH_ALREADY_EXIST_56F8BFF9 = "Path already exist."; + public static final String MESSAGE_PATH_DOES_NOT_EXIST_93310498 = "Path does not exist."; + public static final String MESSAGE_MEET_ERROR_DEALING_METADATA_1C4A38B9 = "Meet error when dealing with metadata."; + public static final String MESSAGE_INSERTION_TIME_LESS_THAN_TTL_TIME_BOUND_0F1BB861 = "Insertion time is less than TTL time bound."; + public static final String MESSAGE_MEET_ERROR_MERGING_28424A77 = "Meet error while merging."; + public static final String MESSAGE_MEET_ERROR_DISPATCHING_73E4FD5E = "Meet error while dispatching."; + public static final String MESSAGE_DATABASE_PROCESSOR_RELATED_ERROR_C58690B1 = "Database processor related error."; + public static final String MESSAGE_STORAGE_ENGINE_RELATED_ERROR_94DEBBCF = "Storage engine related error."; + public static final String MESSAGE_TSFILE_PROCESSOR_RELATED_ERROR_B6C57C3E = "TsFile processor related error."; + public static final String MESSAGE_ILLEGAL_PATH_020B26BC = "Illegal path."; + public static final String MESSAGE_MEET_ERROR_LOADING_FILE_A90EBC21 = "Meet error while loading file."; + public static final String MESSAGE_EXECUTE_STATEMENT_ERROR_54E4A395 = "Execute statement error."; + public static final String MESSAGE_MEET_ERROR_PARSING_SQL_3C5A3B80 = "Meet error while parsing SQL."; + public static final String MESSAGE_MEET_ERROR_GENERATING_TIME_ZONE_94E03CA3 = "Meet error while generating time zone."; + public static final String MESSAGE_MEET_ERROR_SETTING_TIME_ZONE_CBE88DCF = "Meet error while setting time zone."; + public static final String MESSAGE_QUERY_STATEMENTS_NOT_ALLOWED_ERROR_58D30C99 = "Query statements are not allowed error."; + public static final String MESSAGE_LOGICAL_OPERATOR_RELATED_ERROR_D94D5972 = "Logical operator related error."; + public static final String MESSAGE_LOGICAL_OPTIMIZE_RELATED_ERROR_36D63CB3 = "Logical optimize related error."; + public static final String MESSAGE_UNSUPPORTED_FILL_TYPE_RELATED_ERROR_67BE2CF2 = "Unsupported fill type related error."; + public static final String MESSAGE_QUERY_PROCESS_RELATED_ERROR_93FA1016 = "Query process related error."; + public static final String MESSAGE_WRITING_DATA_RELATED_ERROR_0CA06C4D = "Writing data related error."; + public static final String MESSAGE_INTERNAL_SERVER_ERROR_12F61DF7 = "Internal server error."; + public static final String MESSAGE_MEET_ERROR_CLOSE_OPERATION_1C7D0589 = "Meet error in close operation."; + public static final String MESSAGE_FAIL_DO_NON_QUERY_OPERATIONS_BECAUSE_SYSTEM_READ_ONLY_10CA1ED2 = "Fail to do non-query operations because system is read-only."; + public static final String MESSAGE_DISK_SPACE_INSUFFICIENT_DF6205B0 = "Disk space is insufficient."; + public static final String MESSAGE_MEET_ERROR_STARTING_UP_22A4CBFE = "Meet error while starting up."; + public static final String MESSAGE_USERNAME_PASSWORD_WRONG_C44C4AF0 = "Username or password is wrong."; + public static final String MESSAGE_HAS_NOT_LOGGED_A2BA0267 = "Has not logged in."; + public static final String MESSAGE_NO_PERMISSIONS_OPERATION_PLEASE_ADD_PRIVILEGE_64047D1E = "No permissions for this operation, please add privilege."; + public static final String MESSAGE_FAILED_INIT_AUTHORIZER_1E2B017E = "Failed to init authorizer."; + public static final String MESSAGE_UNSUPPORTED_OPERATION_295CDB21 = "Unsupported operation."; + public static final String MESSAGE_NODE_CANNOT_REACHED_D3FD04A8 = "Node cannot be reached."; + public static final String LOG_ARG_ABOVE_WARNING_THRESHOLD_NOT_ACCESSIBLE_FREE_SPACE_ARG_TOTAL_87DAD16A = "{} is above the warning threshold, or not accessible, free space {}, total space {}"; + public static final String EXCEPTION_VALUE_IS_NULL_192F6BFF = "value is null"; + public static final String LOG_ARG_COLON_ARG_DCE519A1 = "{}: {}"; + public static final String EMPTY_MESSAGE = ""; + } diff --git a/iotdb-core/node-commons/src/main/i18n/zh/org/apache/iotdb/commons/i18n/AuthMessages.java b/iotdb-core/node-commons/src/main/i18n/zh/org/apache/iotdb/commons/i18n/AuthMessages.java index bc41b387dd63a..96ea001e5b513 100644 --- a/iotdb-core/node-commons/src/main/i18n/zh/org/apache/iotdb/commons/i18n/AuthMessages.java +++ b/iotdb-core/node-commons/src/main/i18n/zh/org/apache/iotdb/commons/i18n/AuthMessages.java @@ -103,4 +103,11 @@ private AuthMessages() {} public static final String NAME_CANNOT_CONTAIN_SPACES = "名称不能包含空格"; public static final String PASSWORD_CANNOT_CONTAIN_SPACES = "密码不能包含空格"; + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String EXCEPTION_ACCESS_DENIED_E128C1A1 = "访问被拒绝:"; + public static final String EXCEPTION_ENCRYPT_DECRYPT_FAILED_163764B5 = "加密或解密失败。"; + public static final String EXCEPTION_BACKSLASH_QUOTE_D4C5D637 = "\""; + } diff --git a/iotdb-core/node-commons/src/main/i18n/zh/org/apache/iotdb/commons/i18n/ClientMessages.java b/iotdb-core/node-commons/src/main/i18n/zh/org/apache/iotdb/commons/i18n/ClientMessages.java index 1ba91d78889f2..6028aedb2a4e4 100644 --- a/iotdb-core/node-commons/src/main/i18n/zh/org/apache/iotdb/commons/i18n/ClientMessages.java +++ b/iotdb-core/node-commons/src/main/i18n/zh/org/apache/iotdb/commons/i18n/ClientMessages.java @@ -90,4 +90,19 @@ public final class ClientMessages { "{} 在节点 {} 上失败,原因 {},正在进行第 {} 次重试..."; private ClientMessages() {} + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String LOG_RETURN_CLIENT_ARG_POOL_FAILED_BECAUSE_NODE_NULL_81511014 = "归还 client {} 到 pool 失败,原因:节点为空。"; + public static final String LOG_MAY_CAUSE_RESOURCE_LEAK_PLEASE_CHECK_YOUR_CODE_DD730191 = "这可能导致资源泄漏,请检查代码。"; + public static final String EXCEPTION_UNSUPPORTED_REQUEST_TYPE_2030CDC7 = "不支持的请求类型 "; + public static final String EXCEPTION_PLEASE_SET_IT_ASYNCREQUESTMANAGER_INITACTIONMAPBUILDER_0F039A93 = ",请在 AsyncRequestManager::initActionMapBuilder() 中设置"; + public static final String EXCEPTION_ERROR_CALLING_METHOD_C04E5A63 = "调用方法时出错 "; + public static final String EXCEPTION_BECAUSE_ACD0B1C8 = ",,原因: "; + public static final String LOG_PIPE_CONNECTION_TIMEOUT_ADJUSTED_ARG_MS_ARG_MINS_6D126A53 = "Pipe 连接超时已调整为 {} ms({} mins)"; + public static final String LOG_BODY_SIZE_REQUEST_TOO_LARGE_REQUEST_WILL_SLICED_ORIGIN_REQ_35E73788 = "请求 body 过大,请求将被切片。Origin req: {}-{}。"; + public static final String LOG_REQUEST_BODY_SIZE_ARG_THRESHOLD_ARG_69B1BE00 = "请求 body 大小: {},阈值: {}"; + public static final String LOG_FAILED_TRANSFER_SLICE_ORIGIN_REQ_ARG_ARG_RETRY_WHOLE_TRANSFER_E1EA2F41 = "传输 slice 失败。Origin req:{}-{}。重试整个传输。"; + public static final String EXCEPTION_FAILED_TRANSFER_SLICE_ORIGIN_REQ_ARG_ARG_SLICE_INDEX_ARG_7219936C = "无法传输 slice。Origin req: %s-%s,slice index: %d,slice count: %d。原因:%s"; + } diff --git a/iotdb-core/node-commons/src/main/i18n/zh/org/apache/iotdb/commons/i18n/CommonMessages.java b/iotdb-core/node-commons/src/main/i18n/zh/org/apache/iotdb/commons/i18n/CommonMessages.java index a4b72b9e4271b..3e913ab8c1de2 100644 --- a/iotdb-core/node-commons/src/main/i18n/zh/org/apache/iotdb/commons/i18n/CommonMessages.java +++ b/iotdb-core/node-commons/src/main/i18n/zh/org/apache/iotdb/commons/i18n/CommonMessages.java @@ -122,4 +122,79 @@ private CommonMessages() {} public static final String ITERATOR_MUST_NOT_BE_NULL = "迭代器不能为空"; public static final String ITERATOR_REMOVE_ONLY_AFTER_NEXT = "Iterator remove() 只能在 next() 之后调用一次"; public static final String FAIL_TO_GET_DATA_TYPE_IN_ROW = "获取行中数据类型失败,行时间:"; + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String LOG_STEP_METRICS_ARG_ARG_TOTAL_ARG_SUM_2FMS_AVG_ARG_87491AB0 = "步骤指标 [%d]-[%s] - 总数: %d, 总和: %.2fms, 平均: %fms, 最近%d次平均: %fms"; + public static final String LOG_ERROR_OCCURRED_DURING_TRANSFERRING_FILE_ARG_BYTEBUFFER_CAUSE_ARG_FEDC38A3 = "传输文件{}到 ByteBuffer 时发生错误,原因:{}"; + public static final String LOG_ERROR_OCCURRED_DURING_WRITING_BYTEBUFFER_ARG_CAUSE_ARG_F3AD2DA0 = "向 {} 写入 bytebuffer 时发生错误,原因:{}"; + public static final String EXCEPTION_SIZE_FILE_EXCEED_ARG_BYTES_C60F1149 = "文件大小超过 %d 字节"; + public static final String EXCEPTION_UNRECOGNIZED_TCONSENSUSGROUPTYPE_9204FF8E = "无法识别的 TConsensusGroupType: "; + public static final String EXCEPTION_ID_1F238F51 = ",id = "; + public static final String LOG_MEMORY_COST_RELEASED_LARGER_THAN_MEMORY_COST_MEMORY_BLOCK_ARG_00DD9DA9 = "待释放的内存开销大于内存块 {} 的内存开销"; + public static final String LOG_EXACTALLOCATEIFSUFFICIENT_FAILED_ALLOCATE_MEMORY_A47897D9 = "exactAllocateIfSufficient: 无法分配内存, "; + public static final String LOG_TOTAL_MEMORY_SIZE_ARG_BYTES_USED_MEMORY_SIZE_ARG_BYTES_5FB5059F = "总内存大小 {} 字节,已用内存大小 {} 字节,"; + public static final String LOG_REQUESTED_MEMORY_SIZE_ARG_BYTES_USED_THRESHOLD_ARG_D7061DEB = "请求内存大小 {} 字节,已用阈值 {}"; + public static final String LOG_TRYALLOCATE_ALLOCATED_MEMORY_B3D564D9 = "tryAllocate: 已分配内存, "; + public static final String LOG_ORIGINAL_REQUESTED_MEMORY_SIZE_ARG_BYTES_03D28A6B = "原始请求内存大小 {} 字节,"; + public static final String LOG_ACTUAL_REQUESTED_MEMORY_SIZE_ARG_BYTES_62760058 = "实际请求内存大小 {} 字节"; + public static final String LOG_TRYALLOCATE_FAILED_ALLOCATE_MEMORY_838FA6FB = "tryAllocate: 无法分配内存, "; + public static final String LOG_REQUESTED_MEMORY_SIZE_ARG_BYTES_BF9CEF81 = "请求内存大小 {} 字节"; + public static final String LOG_GETORREGISTERMEMORYBLOCK_FAILED_MEMORY_BLOCK_ARG_ALREADY_EXISTS_42CA8914 = "getOrRegisterMemoryBlock 失败: 内存块 {} 已存在, "; + public static final String LOG_IT_S_SIZE_ARG_REQUESTED_SIZE_ARG_AF8F04B2 = "其大小为 {},请求大小为 {}"; + public static final String LOG_GETMEMORYMANAGER_MEMORY_MANAGER_ARG_ALREADY_EXISTS_IT_S_SIZE_ARG_0102560A = "getMemoryManager:内存管理器 {} 已存在,其大小为 {},enabled 为 {}"; + public static final String LOG_GETORCREATEMEMORYMANAGER_FAILED_TOTAL_MEMORY_SIZE_ARG_BYTES_LESS_THAN_ALLOCATED_3D110256 = + "getOrCreateMemoryManager 失败:总内存大小 {} 字节小于已分配内存大小 {} 字节"; + public static final String EXCEPTION_EXACTALLOCATE_FAILED_ALLOCATE_MEMORY_AFTER_ARG_RETRIES_957A647B = "exactAllocate:重试 %d 次后仍无法分配内存,"; + public static final String EXCEPTION_TOTAL_MEMORY_SIZE_ARG_BYTES_USED_MEMORY_SIZE_ARG_BYTES_9FC9A9C6 = "总内存大小 %d 字节,已用内存大小 %d 字节,"; + public static final String EXCEPTION_REQUESTED_MEMORY_SIZE_ARG_BYTES_E6340842 = "请求内存大小 %d 字节"; + public static final String EXCEPTION_REGISTER_MEMORY_BLOCK_ARG_FAILED_SIZEINBYTES_SHOULD_NON_NEGATIVE_EC54AA75 = "注册内存块 %s 失败: sizeInBytes 应为非负数"; + public static final String LOG_DELETE_SYSTEM_PROPERTIES_TMP_FILE_FAIL_YOU_MAY_MANUALLY_DELETE_F81C4A53 = "删除 system.properties 临时文件失败,可手动删除:{}"; + public static final String LOG_FAILED_DELETE_SYSTEM_PROPERTIES_FILE_YOU_SHOULD_MANUALLY_DELETE_THEM_77F91A98 = "无法删除 system.properties 文件,请手动删除:{}, {}"; + public static final String EXCEPTION_LENGTH_PARAMETERS_SHOULD_EVENLY_DIVIDED_2_BUT_ACTUAL_LENGTH_E9A792D9 = "参数长度应能被 2 整除,但实际长度为 "; + public static final String EXCEPTION_TMP_SYSTEM_PROPERTIES_FILE_MUST_EXIST_CALL_REPLACEFORMALFILE_FA63B976 = "调用 replaceFormalFile 时,临时 system properties 文件必须存在"; + public static final String LOG_UNRECOVERABLE_ERROR_OCCURS_CHANGE_SYSTEM_STATUS_READ_ONLY_BECAUSE_HANDLE_05C9AD1A = + "发生不可恢复错误!由于 handle_system_error 为 CHANGE_TO_READ_ONLY,将系统状态改为只读。仅允许查询语句!"; + public static final String LOG_UNRECOVERABLE_ERROR_OCCURS_SHUTDOWN_SYSTEM_DIRECTLY_BECAUSE_HANDLE_SYSTEM_ERROR_14FC06C9 = "发生不可恢复错误!由于 handle_system_error 为 SHUTDOWN,直接关闭系统。"; + public static final String EXCEPTION_TYPE_ARG_NOT_SUPPORTED_PIPE_RATE_AVERAGE_F74694AD = "pipe rate average 不支持类型 %s。"; + public static final String EXCEPTION_UNKNOWN_UDFTYPE_9A8D1B23 = "未知的 UDFType:"; + public static final String EXCEPTION_8S_5F5F831F = "%8s"; + public static final String EXCEPTION_CAN_NOT_RECOGNIZE_PIPETYPE_ARG_8850A249 = "无法识别 PipeType %s."; + public static final String EXCEPTION_TARGETREGIONLIST_EMPTY_DEVICE_ARG_TIMESLOT_ARG_E7E5818C = "targetRegionList 为空。device:%s,timeSlot:%s"; + public static final String EXCEPTION_DATABASE_18F8303F = "数据库 "; + public static final String EXCEPTION_NOT_EXISTS_FAILED_CREATE_AUTOMATICALLY_BECAUSE_ENABLE_AUTO_CREATE_SCHEMA_80DE1A4B = " 不存在,且无法自动创建,原因:enable_auto_create_schema 为 FALSE。"; + public static final String EXCEPTION_PATH_DOES_NOT_EXIST_737CB95D = "路径不存在。"; + public static final String EXCEPTION_CAN_T_GET_NEXT_FOLDER_ARG_BECAUSE_THEY_ALL_FULL_A105BB2D = "无法从 [%s] 获取下一个文件夹,原因:全部文件夹都已满。"; + public static final String EXCEPTION_PARAMETER_ARG_CAN_NOT_ARG_PLEASE_SET_ARG_BECAUSE_ARG_749738D1 = "参数 %s 不能为 %s,请设置为:%s。原因:%s"; + public static final String EXCEPTION_QUERY_EXECUTION_TIME_OUT_A5DC7BFB = "查询执行超时"; + public static final String EXCEPTION_OBJECT_FILE_ARG_DOES_NOT_EXIST_7EA8CB1C = "对象文件 %s 不存在"; + public static final String EXCEPTION_ARG_NOT_LEGAL_PRIVILEGE_504838E8 = "%s 不是一个合法权限"; + public static final String EXCEPTION_SOME_PORTS_OCCUPIED_77ED044D = "部分端口已被占用"; + public static final String EXCEPTION_PORTS_ARG_OCCUPIED_B462E9DA = "端口 %s 已被占用"; + public static final String EXCEPTION_UNEXPECTED_ERROR_OCCURS_SERIALIZATION_A6B2E222 = "序列化时发生意外错误"; + public static final String EXCEPTION_COLUMN_ARG_TABLE_ARG_ARG_DOES_NOT_EXIST_D8145581 = "列 %s 在表 '%s.%s' 中不存在。"; + public static final String EXCEPTION_TABLE_ARG_ARG_DOES_NOT_EXIST_796E503B = "表 '%s.%s' 不存在。"; + public static final String EXCEPTION_TABLE_ARG_ARG_ALREADY_EXISTS_D4BDF4B5 = "表 '%s.%s' 已存在。"; + public static final String EXCEPTION_COULDN_T_CONSTRUCTOR_SERIESPARTITIONEXECUTOR_CLASS_ARG_34FB9F45 = "无法构造 SeriesPartitionExecutor 类:%s"; + public static final String EXCEPTION_CANNOT_USE_SETVALUE_OBJECT_BEING_SET_ALREADY_MAP_676ED3BF = "对象已在 map 中时,不能使用 setValue()"; + public static final String EXCEPTION_ITERATOR_GETKEY_CAN_ONLY_CALLED_AFTER_NEXT_BEFORE_REMOVE_009C456B = "Iterator getKey() 只能在 next() 之后、remove() 之前调用"; + public static final String EXCEPTION_ITERATOR_GETVALUE_CAN_ONLY_CALLED_AFTER_NEXT_BEFORE_REMOVE_927A88A2 = "Iterator getValue() 只能在 next() 之后、remove() 之前调用"; + public static final String EXCEPTION_ITERATOR_SETVALUE_CAN_ONLY_CALLED_AFTER_NEXT_BEFORE_REMOVE_51505AD1 = "Iterator setValue() 只能在 next() 之后、remove() 之前调用"; + public static final String LOG_FAILED_CLOSE_UDFCLASSLOADER_QUERYID_ARG_BECAUSE_ARG_8B1C3739 = "无法关闭 UDFClassLoader (queryId: {}),原因:{}"; + public static final String EXCEPTION_ATTRIBUTE_ARG_ARG_REQUIRED_BUT_WAS_NOT_PROVIDED_CD090883 = "attribute \"%s\"/\"%s\" 为必填项,但未提供。"; + public static final String EXCEPTION_USE_ATTRIBUTE_ARG_ARG_ONLY_ONE_AT_TIME_B431468C = "只能同时使用 attribute \"%s\" 或 \"%s\" 中的一个。"; + public static final String EXCEPTION_ILLEGAL_OUTLIER_METHOD_OUTLIER_TYPE_SHOULD_AVG_STENDIS_COS_PRENEXTDIS_91D1C70A = "非法 outlier 方法。outlier 类型应为 avg、stendis、cos 或 prenextdis。"; + public static final String EXCEPTION_ILLEGAL_AGGREGATION_METHOD_AGGREGATION_TYPE_SHOULD_AVG_MIN_MAX_SUM_2D7BEC96 = "非法聚合方法。聚合类型应为 avg、min、max、sum、extreme、variance。"; + public static final String EXCEPTION_CUMULATIVE_TABLE_FUNCTION_REQUIRES_SIZE_MUST_INTEGRAL_MULTIPLE_STEP_D8A9DA94 = "累积表函数要求 size 必须是 step 的整数倍。"; + public static final String EXCEPTION_COLUMN_TYPE_MUST_NUMERIC_IF_DELTA_NOT_0_F7864D4E = "DELTA 不为 0 时,列类型必须为数值类型。"; + public static final String EXCEPTION_TYPE_COLUMN_ARG_NOT_AS_EXPECTED_7A81636E = "列 [%s] 的类型不符合预期。"; + public static final String EXCEPTION_REQUIRED_COLUMN_ARG_NOT_FOUND_SOURCE_TABLE_ARGUMENT_993E1C08 = "未在源表参数中找到必需列 [%s]。"; + public static final String EXCEPTION_UNSUPPORTED_PROGRESS_INDEX_TYPE_ARG_A84CDFF9 = "不支持的进度索引类型 %s."; + public static final String EXCEPTION_TIMEWINDOWSTATEPROGRESSINDEX_DOES_NOT_SUPPORT_TOPOLOGICAL_SORTING_897C8976 = "TimeWindowStateProgressIndex 不支持拓扑排序"; + public static final String EXCEPTION_INTENDED_READ_LENGTH_ARG_BUT_ARG_ACTUALLY_READ_DESERIALIZING_TIMEPROGRESSINDEX_63CD54E4 = + "反序列化 TimeProgressIndex 时预期读取长度为 %s,但实际读取了 %s,ProgressIndex:%s"; + public static final String EXCEPTION_COLON_3A291246 = " : "; + public static final String EXCEPTION_DATAPARTITIONMAP_IS_NULL_B764418A = "dataPartitionMap 不能为空"; + public static final String EXCEPTION_ARG_634FCEDB = "%s"; + } diff --git a/iotdb-core/node-commons/src/main/i18n/zh/org/apache/iotdb/commons/i18n/ConfigMessages.java b/iotdb-core/node-commons/src/main/i18n/zh/org/apache/iotdb/commons/i18n/ConfigMessages.java index 3f9dcc5f4120b..28b5f98c25d8a 100644 --- a/iotdb-core/node-commons/src/main/i18n/zh/org/apache/iotdb/commons/i18n/ConfigMessages.java +++ b/iotdb-core/node-commons/src/main/i18n/zh/org/apache/iotdb/commons/i18n/ConfigMessages.java @@ -74,4 +74,76 @@ public final class ConfigMessages { + "忽略临时文件 {}"; private ConfigMessages() {} + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String LOG_THERE_MAY_HAVE_BEEN_UNEXPECTED_INTERRUPTION_LAST_E784B008 = " 上次"; + public static final String LOG_CONFIGURATION_FILE_UPDATE_IGNORE_TEMPORARY_FILE_ARG_3DE7B218 = "配置文件更新期间可能发生意外中断。忽略临时文件 {}"; + public static final String LOG_PIPEDATASTRUCTURETABLETSIZEINBYTES_SET_ARG_243363B3 = "pipeDataStructureTabletSizeInBytes 已设置为 {}。"; + public static final String LOG_PIPEDATASTRUCTURETABLETMEMORYBLOCKALLOCATIONREJECTTHRESHOLD_SET_ARG_EF34614A = "pipeDataStructureTabletMemoryBlockAllocationRejectThreshold 已设置为 {}。"; + public static final String LOG_PIPEDATASTRUCTURETSFILEMEMORYBLOCKALLOCATIONREJECTTHRESHOLD_SET_ARG_309A7E12 = "pipeDataStructureTsFileMemoryBlockAllocationRejectThreshold 已设置为 {}。"; + public static final String LOG_PIPETOTALFLOATINGMEMORYPROPORTION_SET_ARG_FDCA8082 = "pipeTotalFloatingMemoryProportion 已设置为 {}。"; + public static final String LOG_PIPESOURCEASSIGNERDISRUPTORRINGBUFFERSIZE_SET_ARG_31C9A8D8 = "pipeSourceAssignerDisruptorRingBufferSize 已设置为 {}。"; + public static final String LOG_PIPESOURCEASSIGNERDISRUPTORRINGBUFFERENTRYSIZE_SET_ARG_95D31172 = "pipeSourceAssignerDisruptorRingBufferEntrySize 已设置为 {}。"; + public static final String LOG_PIPECONNECTORHANDSHAKETIMEOUTMS_SET_ARG_64890ED2 = "pipeConnectorHandshakeTimeoutMs 已设置为 {}。"; + public static final String LOG_PIPEAIRGAPSINKTABLETTIMEOUTMS_SET_ARG_3413AC05 = "pipeAirGapSinkTabletTimeoutMs 已设置为 {}。"; + public static final String LOG_ISPIPESINKREADFILEBUFFERMEMORYCONTROLENABLED_SET_ARG_138BB142 = "isPipeSinkReadFileBufferMemoryControlEnabled 已设置为 {}。"; + public static final String LOG_PIPESINKRPCTHRIFTCOMPRESSIONENABLED_SET_ARG_1F2B6AB4 = "pipeSinkRPCThriftCompressionEnabled 已设置为 {}。"; + public static final String LOG_PIPEASYNCSINKFORCEDRETRYTSFILEEVENTQUEUESIZE_SET_ARG_0BB1C280 = "pipeAsyncSinkForcedRetryTsFileEventQueueSize 已设置为 {}。"; + public static final String LOG_PIPEASYNCSINKFORCEDRETRYTABLETEVENTQUEUESIZE_SET_ARG_8FDA7023 = "pipeAsyncSinkForcedRetryTabletEventQueueSize 已设置为 {}。"; + public static final String LOG_PIPEASYNCSINKFORCEDRETRYTOTALEVENTQUEUESIZE_SET_ARG_92D6EACB = "pipeAsyncSinkForcedRetryTotalEventQueueSize 已设置为 {}。"; + public static final String LOG_PIPEASYNCSINKMAXRETRYEXECUTIONTIMEMSPERCALL_SET_ARG_77E7B216 = "pipeAsyncSinkMaxRetryExecutionTimeMsPerCall 已设置为 {}。"; + public static final String LOG_PIPEASYNCSINKSELECTORNUMBER_SHOULD_GREATER_THAN_0_CONFIGURING_IT_NOT_CHANGE_EEB9793C = "pipeAsyncSinkSelectorNumber 应大于 0,配置保持不变。"; + public static final String LOG_PIPEASYNCSINKMAXCLIENTNUMBER_SHOULD_GREATER_THAN_0_CONFIGURING_IT_NOT_CHANGE_11EF47BF = "pipeAsyncSinkMaxClientNumber 应大于 0,配置保持不变。"; + public static final String LOG_PIPEASYNCSINKMAXTSFILECLIENTNUMBER_SHOULD_GREATER_THAN_0_CONFIGURING_IT_NOT_CHANGE_AC812FE2 = "pipeAsyncSinkMaxTsFileClientNumber 应大于 0,配置保持不变。"; + public static final String LOG_PIPEASYNCSINKMAXTSFILECLIENTNUMBER_SET_ARG_7D83FCDE = "pipeAsyncSinkMaxTsFileClientNumber 已设置为 {}。"; + public static final String LOG_PIPEHEARTBEATINTERVALSECONDSFORCOLLECTINGPIPEMETA_SET_ARG_E171AAAD = "pipeHeartbeatIntervalSecondsForCollectingPipeMeta 已设置为 {}。"; + public static final String LOG_PIPEMETASYNCERINITIALSYNCDELAYMINUTES_SET_ARG_6E36A895 = "pipeMetaSyncerInitialSyncDelayMinutes 已设置为 {}。"; + public static final String LOG_PIPEMETASYNCERSYNCINTERVALMINUTES_SET_ARG_CFBACD71 = "pipeMetaSyncerSyncIntervalMinutes 已设置为 {}。"; + public static final String LOG_PIPEMETASYNCERAUTORESTARTPIPECHECKINTERVALROUND_SET_ARG_A80B4589 = "pipeMetaSyncerAutoRestartPipeCheckIntervalRound 已设置为 {}。"; + public static final String LOG_PIPESINKRETRYLOCALLYFORCONNECTIONERROR_SET_ARG_5D886CE6 = "pipeSinkRetryLocallyForConnectionError 已设置为 {}"; + public static final String LOG_PIPESUBTASKEXECUTORBASICCHECKPOINTINTERVALBYCONSUMEDEVENTCOUNT_SET_ARG_CFCECFCE = "pipeSubtaskExecutorBasicCheckPointIntervalByConsumedEventCount 已设置为 {}"; + public static final String LOG_PIPESUBTASKEXECUTORBASICCHECKPOINTINTERVALBYTIMEDURATION_SET_ARG_45B3F433 = "pipeSubtaskExecutorBasicCheckPointIntervalByTimeDuration 已设置为 {}"; + public static final String LOG_PIPESUBTASKEXECUTORMAXTHREADNUM_SHOULD_GREATER_THAN_0_CONFIGURING_IT_NOT_CHANGE_25E0CE6E = "pipeSubtaskExecutorMaxThreadNum 应大于 0,配置保持不变。"; + public static final String LOG_PIPERETRYLOCALLYFORPARALLELORUSERCONFLICT_SET_ARG_368926E5 = "pipeRetryLocallyForParallelOrUserConflict 已设置为 {}。"; + public static final String LOG_PIPESINKSUBTASKSLEEPINTERVALINITMS_SET_ARG_B8DCF143 = "pipeSinkSubtaskSleepIntervalInitMs 已设置为 {}。"; + public static final String LOG_PIPESINKSUBTASKSLEEPINTERVALMAXMS_SET_ARG_0010425D = "pipeSinkSubtaskSleepIntervalMaxMs 已设置为 {}。"; + public static final String LOG_PIPESUBTASKEXECUTORPENDINGQUEUEMAXBLOCKINGTIMEMS_SET_ARG_2F1A6865 = "pipeSubtaskExecutorPendingQueueMaxBlockingTimeMs 已设置为 {}"; + public static final String LOG_PIPESUBTASKEXECUTORCRONHEARTBEATEVENTINTERVALSECONDS_SET_ARG_B5C9E195 = "pipeSubtaskExecutorCronHeartbeatEventIntervalSeconds 已设置为 {}。"; + public static final String LOG_PIPEREALTIMEQUEUEPOLLHISTORICALTSFILETHRESHOLD_SET_ARG_FD88A384 = "pipeRealTimeQueuePollHistoricalTsFileThreshold 已设置为 {}"; + public static final String LOG_PIPEREALTIMEQUEUEMAXWAITINGTSFILESIZE_SET_ARG_7E0698AB = "pipeRealTimeQueueMaxWaitingTsFileSize 已设置为 {}。"; + public static final String LOG_PIPEREALTIMEFORCEDOWNGRADINGTIME_SET_ARG_98A0F8AE = "pipeRealtimeForceDowngradingTime 已设置为 {}。"; + public static final String LOG_PIPEREALTIMEFORCEDOWNGRADINGPROPORTION_SET_ARG_92974D0B = "pipeRealtimeForceDowngradingProportion 已设置为 {}。"; + public static final String LOG_PIPERECEIVERLOGINPERIODICVERIFICATIONINTERVALMS_SET_ARG_158C791C = "pipeReceiverLoginPeriodicVerificationIntervalMs 已设置为 {}"; + public static final String LOG_PIPERECEIVERACTUALTOESTIMATEDMEMORYRATIO_SET_ARG_0D1F305D = "pipeReceiverActualToEstimatedMemoryRatio 已设置为 {}"; + public static final String LOG_PIPERECEIVERREQDECOMPRESSEDMAXLENGTHINBYTES_SET_ARG_9356E410 = "pipeReceiverReqDecompressedMaxLengthInBytes 已设置为 {}。"; + public static final String LOG_IGNORE_INVALID_PIPEAIRGAPRECEIVERMAXPAYLOADSIZEINBYTES_ARG_BECAUSE_IT_MUST_GREATER_THAN_0_8ACA836C = "忽略无效的 pipeAirGapReceiverMaxPayloadSizeInBytes {},原因:其必须大于 0。"; + public static final String LOG_PIPEAIRGAPRECEIVERMAXPAYLOADSIZEINBYTES_SET_ARG_9B21877F = "pipeAirGapReceiverMaxPayloadSizeInBytes 已设置为 {}。"; + public static final String LOG_PIPEPERIODICALLOGMININTERVALSECONDS_SET_ARG_5535C79E = "pipePeriodicalLogMinIntervalSeconds 已设置为 {}。"; + public static final String LOG_PIPEMETAREPORTMAXLOGINTERVALROUNDS_SET_ARG_0090AECB = "pipeMetaReportMaxLogIntervalRounds 已设置为 {}"; + public static final String LOG_PIPETSFILEPINMAXLOGINTERVALROUNDS_SET_ARG_FAFE1040 = "pipeTsFilePinMaxLogIntervalRounds 已设置为 {}"; + public static final String LOG_PIPEMEMORYALLOCATEFORTSFILESEQUENCEREADERINBYTES_SET_ARG_8A26960D = "pipeMemoryAllocateForTsFileSequenceReaderInBytes 已设置为 {}"; + public static final String LOG_PIPEMEMORYEXPANDERINTERVALSECONDS_SET_ARG_73F96BBC = "pipeMemoryExpanderIntervalSeconds 已设置为 {}"; + public static final String LOG_PIPEMEMORYALLOCATERETRYINTERVALMS_SET_ARG_39D52E47 = "pipeMemoryAllocateRetryIntervalMs 已设置为 {}"; + public static final String LOG_PIPELEADERCACHEMEMORYUSAGEPERCENTAGE_SET_ARG_E32DE64B = "pipeLeaderCacheMemoryUsagePercentage 已设置为 {}"; + public static final String LOG_PIPELISTENINGQUEUETRANSFERSNAPSHOTTHRESHOLD_SET_ARG_FD856477 = "pipeListeningQueueTransferSnapshotThreshold 已设置为 {}"; + public static final String LOG_PIPESNAPSHOTEXECUTIONMAXBATCHSIZE_SET_ARG_F1C5C62C = "pipeSnapshotExecutionMaxBatchSize 已设置为 {}"; + public static final String LOG_PIPEREMAININGTIMECOMMITRATEAUTOSWITCHSECONDS_SET_ARG_17E6C979 = "pipeRemainingTimeCommitRateAutoSwitchSeconds 已设置为 {}"; + public static final String LOG_PIPEREMAININGTIMECOMMITRATEAVERAGETIME_SET_ARG_D010BE98 = "pipeRemainingTimeCommitRateAverageTime 已设置为 {}"; + public static final String LOG_PIPEREMAININGINSERTEVENTCOUNTAVERAGE_SET_ARG_17C28F47 = "pipeRemainingInsertEventCountAverage 已设置为 {}"; + public static final String LOG_PIPEDYNAMICMEMORYADJUSTMENTTHRESHOLD_SET_ARG_2F008DB1 = "pipeDynamicMemoryAdjustmentThreshold 已设置为 {}"; + public static final String LOG_PIPETHRESHOLDALLOCATIONSTRATEGYMAXIMUMMEMORYINCREMENTRATIO_SET_ARG_BFAD04E0 = "pipeThresholdAllocationStrategyMaximumMemoryIncrementRatio 已设置为 {}"; + public static final String LOG_PIPEMEMORYBLOCKLOWUSAGETHRESHOLD_SET_ARG_DDF99D69 = "pipeMemoryBlockLowUsageThreshold 已设置为 {}"; + public static final String LOG_PIPETHRESHOLDALLOCATIONSTRATEGYFIXEDMEMORYHIGHUSAGETHRESHOLD_SET_ARG_82721CBE = "pipeThresholdAllocationStrategyFixedMemoryHighUsageThreshold 已设置为 {}"; + public static final String LOG_PIPECHECKSYNCALLCLIENTLIVETIMEINTERVALMS_SET_ARG_246CE0EB = "pipeCheckSyncAllClientLiveTimeIntervalMs 已设置为 {}"; + public static final String LOG_PIPESENDTSFILERATELIMITBYTESPERSECOND_SET_ARG_653F2CC4 = "pipeSendTsFileRateLimitBytesPerSecond 已设置为 {}"; + public static final String LOG_PIPEALLSINKSRATELIMITBYTESPERSECOND_SET_ARG_EE3FE2A0 = "pipeAllSinksRateLimitBytesPerSecond 已设置为 {}"; + public static final String LOG_RATELIMITERHOTRELOADCHECKINTERVALMS_SET_ARG_E086A4F0 = "rateLimiterHotReloadCheckIntervalMs 已设置为 {}"; + public static final String LOG_PIPECONNECTORREQUESTSLICETHRESHOLDBYTES_SET_ARG_7FAA56F2 = "pipeConnectorRequestSliceThresholdBytes 已设置为 {}"; + public static final String LOG_TWOSTAGEAGGREGATEMAXCOMBINERLIVETIMEINMS_SET_ARG_F10B7C02 = "twoStageAggregateMaxCombinerLiveTimeInMs 已设置为 {}"; + public static final String LOG_TWOSTAGEAGGREGATEDATAREGIONINFOCACHETIMEINMS_SET_ARG_C7895888 = "twoStageAggregateDataRegionInfoCacheTimeInMs 已设置为 {}"; + public static final String LOG_TWOSTAGEAGGREGATESENDERENDPOINTSCACHEINMS_SET_ARG_A3CF42B2 = "twoStageAggregateSenderEndPointsCacheInMs 已设置为 {}"; + public static final String LOG_PIPEEVENTREFERENCETRACKINGENABLED_SET_ARG_98E9A640 = "pipeEventReferenceTrackingEnabled 已设置为 {}"; + public static final String LOG_PIPEEVENTREFERENCEELIMINATEINTERVALSECONDS_SET_ARG_62542387 = "pipeEventReferenceEliminateIntervalSeconds 已设置为 {}"; + } diff --git a/iotdb-core/node-commons/src/main/i18n/zh/org/apache/iotdb/commons/i18n/PathMessages.java b/iotdb-core/node-commons/src/main/i18n/zh/org/apache/iotdb/commons/i18n/PathMessages.java index 3ca90cb68f47c..628e1c3db6034 100644 --- a/iotdb-core/node-commons/src/main/i18n/zh/org/apache/iotdb/commons/i18n/PathMessages.java +++ b/iotdb-core/node-commons/src/main/i18n/zh/org/apache/iotdb/commons/i18n/PathMessages.java @@ -48,4 +48,10 @@ public final class PathMessages { "仅接受 MeasurementPath 和 AlignedPath。"; private PathMessages() {} + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String EXCEPTION_NODES_LENGTH_MEASUREMENTPATH_SHOULD_ALWAYS_GREATER_THAN_2_CURRENT_39B913AE = "MeasurementPath 的 nodes.length 应始终大于 2,当前为:"; + public static final String EXCEPTION_WILDCARDS_NOT_ALLOWED_PREFIX_PATH_948C42D1 = "前缀路径中不允许使用通配符:"; + } diff --git a/iotdb-core/node-commons/src/main/i18n/zh/org/apache/iotdb/commons/i18n/PipeMessages.java b/iotdb-core/node-commons/src/main/i18n/zh/org/apache/iotdb/commons/i18n/PipeMessages.java index d081a8fd4cf89..8767609c391e3 100644 --- a/iotdb-core/node-commons/src/main/i18n/zh/org/apache/iotdb/commons/i18n/PipeMessages.java +++ b/iotdb-core/node-commons/src/main/i18n/zh/org/apache/iotdb/commons/i18n/PipeMessages.java @@ -853,4 +853,53 @@ private PipeMessages() {} public static final String CONFIG_SUBSCRIPTION_META_SYNCER_SYNC_INTERVAL_MINUTES = "SubscriptionMetaSyncerSyncIntervalMinutes: {}"; + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String EXCEPTION_UNSUPPORTED_PIPERUNTIMEEXCEPTION_TYPE_ARG_C5D5D84C = "不支持的 PipeRuntime 异常类型 %s."; + public static final String LOG_SUBSCRIPTIONENABLED_ARG_6F9EC0F9 = "SubscriptionEnabled: {}"; + public static final String LOG_SUBSCRIPTIONCONSENSUSPREFETCHEXECUTORMAXTHREADNUM_ARG_94D0BD76 = "SubscriptionConsensusPrefetchExecutorMaxThreadNum: {}"; + public static final String LOG_SUBSCRIPTIONCONSENSUSBATCHMAXDELAYINMS_ARG_38C2CB8B = "SubscriptionConsensusBatchMaxDelayInMs: {}"; + public static final String LOG_SUBSCRIPTIONCONSENSUSBATCHMAXSIZEINBYTES_ARG_F8D28441 = "SubscriptionConsensusBatchMaxSizeInBytes: {}"; + public static final String LOG_SUBSCRIPTIONCONSENSUSBATCHMAXTABLETCOUNT_ARG_60BB1D6A = "SubscriptionConsensusBatchMaxTabletCount: {}"; + public static final String LOG_SUBSCRIPTIONCONSENSUSBATCHMAXWALENTRIES_ARG_9BF1CAE4 = "SubscriptionConsensusBatchMaxWalEntries: {}"; + public static final String LOG_SUBSCRIPTIONCONSENSUSIDLESAFETIMEBARRIERINTERVALMS_ARG_A6944544 = "SubscriptionConsensusIdleSafeTimeBarrierIntervalMs: {}"; + public static final String EXCEPTION_UNEXPECTED_EOF_READING_REGION_PROGRESS_KEY_LENGTH_EBC10484 = "读取 region progress key 长度时遇到意外 EOF"; + public static final String EXCEPTION_UNEXPECTED_EOF_READING_REGION_PROGRESS_KEY_C1532EAE = "读取 region progress key 时遇到意外 EOF"; + public static final String EXCEPTION_UNEXPECTED_EOF_READING_REGION_PROGRESS_VALUE_LENGTH_D95F9CE0 = "读取 region progress value 长度时遇到意外 EOF"; + public static final String EXCEPTION_UNEXPECTED_EOF_READING_REGION_PROGRESS_VALUE_A459C521 = "读取 region progress value 时遇到意外 EOF"; + public static final String EXCEPTION_FAILED_ADD_SUBSCRIPTION_CONSUMER_GROUP_META_CONSUMER_ARG_DOES_NOT_EF08EE87 = "添加 subscription 到 consumer group meta 失败:consumer %s 不存在于 consumer group %s"; + public static final String EXCEPTION_FAILED_REMOVE_SUBSCRIPTION_CONSUMER_GROUP_META_CONSUMER_ARG_DOES_NOT_75C319C3 = "从 consumer group meta 移除 subscription 失败:consumer %s 不存在于 consumer group %s"; + public static final String EXCEPTION_PATH_PATTERN_ARG_NOT_VALID_SOURCE_ONLY_PREFIX_FULL_PATH_784778B8 = "路径模式 %s 对 source 无效。仅允许前缀或完整路径。"; + public static final String EXCEPTION_CAPTURE_TREE_CAN_NOT_SPECIFIED_FALSE_DOUBLE_LIVING_ENABLED_29A08445 = "启用 double living 时,capture.tree 不能指定为 false"; + public static final String EXCEPTION_CAPTURE_TABLE_CAN_NOT_SPECIFIED_FALSE_DOUBLE_LIVING_ENABLED_8AEB8F7B = "启用 double living 时,capture.table 不能指定为 false"; + public static final String EXCEPTION_FORWARDING_PIPE_REQUESTS_CAN_NOT_SPECIFIED_TRUE_DOUBLE_LIVING_ENABLED_B000E8A1 = "启用 double living 时,forwarding-pipe-requests 不能指定为 true"; + public static final String EXCEPTION_PARAMETERS_SET_ARG_NOT_ALLOWED_SKIPIF_2B9AA054 = "参数集 %s 中的参数不允许用于 'skipif'"; + public static final String LOG_USER_CONFLICT_EXCEPTION_DISCARDED_DATA_INFO_BECAUSE_ARG_DATA_ARG_CCE510A5 = "用户冲突异常:已丢弃数据信息,原因:{}。数据:{}。接收端消息:{}。状态:{}"; + public static final String LOG_RE_INCREASE_REFERENCE_COUNT_EVENT_HAS_ALREADY_BEEN_RELEASED_ARG_B8DAAAEE = "对已释放的 event 重新增加引用计数:{},堆栈跟踪:{}"; + public static final String LOG_INCREASE_REFERENCE_COUNT_FAILED_ENRICHEDEVENT_ARG_STACK_TRACE_ARG_94C472FC = "增加引用计数失败,EnrichedEvent: {},堆栈跟踪: {}"; + public static final String LOG_DECREASE_REFERENCE_COUNT_EVENT_HAS_ALREADY_BEEN_RELEASED_ARG_STACK_99FCAB8B = "减少已释放 event 的引用计数:{},堆栈跟踪:{}"; + public static final String LOG_RESOURCE_REFERENCE_COUNT_DECREASED_0_BUT_FAILED_RELEASE_RESOURCE_ENRICHEDEVENT_A02A86AF = + "资源引用计数已降为 0,但释放资源失败,EnrichedEvent:{},堆栈跟踪:{}"; + public static final String LOG_REFERENCE_COUNT_DECREASED_ARG_EVENT_ARG_STACK_TRACE_ARG_A4BF56FC = "引用计数已降至 {},event: {},堆栈跟踪: {}"; + public static final String LOG_DECREASE_REFERENCE_COUNT_FAILED_ENRICHEDEVENT_ARG_STACK_TRACE_ARG_6A2024AB = "减少引用计数失败,EnrichedEvent: {},堆栈跟踪: {}"; + public static final String LOG_BROKEN_INVARIANT_DETECT_INVISIBLE_EXTRACTOR_PARAMETERS_ARG_ADAD3038 = "不变量被破坏:检测到不可见的 extractor 参数 {}"; + public static final String LOG_UNKNOWN_PATTERN_FORMAT_ARG_USE_PREFIX_MATCHING_FORMAT_DEFAULT_E7B9EFEC = "未知模式格式:{},默认使用前缀匹配格式。"; + public static final String LOG_PIPE_LISTENING_QUEUE_SNAPSHOT_CACHE_UPDATED_ARG_414EE914 = "Pipe listening queue 快照缓存已更新:{}"; + public static final String LOG_FAILED_SERIALIZE_FILE_BECAUSE_FILE_ARG_ALREADY_EXIST_FACC5C4C = "序列化到文件失败,原因:文件 {} 已存在。"; + public static final String LOG_FAILED_DESERIALIZE_FILE_FILE_ARG_DOES_NOT_EXIST_2356708C = "从文件反序列化失败,文件 {} 不存在。"; + public static final String EXCEPTION_UNKNOWN_PIPE_RUNTIME_META_VERSION_C2F4B575 = "未知的 pipe runtime meta 版本: "; + public static final String EXCEPTION_ROOT_CAUSE_A22E94DE = ",根本原因: "; + public static final String LOG_SUCCESSFULLY_EXECUTED_SUBTASK_ARG_ARG_AFTER_ARG_RETRIES_70972F07 = "重试 {} 次后成功执行 subtask {}({})。"; + public static final String EXCEPTION_FAILED_REFLECT_PIPEPLUGIN_INSTANCE_BECAUSE_PIPEPLUGINMETAKEEPER_NULL_0C9BD2E2 = "反射 PipePlugin 实例失败,原因:PipePluginMetaKeeper 为空。"; + public static final String EXCEPTION_FAILED_REFLECT_PIPEPLUGIN_INSTANCE_BECAUSE_PLUGIN_NAME_NULL_416BD04D = "反射 PipePlugin 实例失败,原因:插件名为空。"; + public static final String LOG_IOTDBSINK_ARG_ARG_4E140C06 = "IoTDBSink {} = {}"; + public static final String EXCEPTION_SOCKET_ARG_CLOSED_WILL_TRY_HANDSHAKE_02562BF1 = "Socket %s 已关闭,将尝试握手"; + public static final String EXCEPTION_NETWORK_ERROR_TRANSFER_FILE_ARG_BECAUSE_ARG_BC25323C = "传输文件 %s 时发生网络错误,原因:%s。"; + public static final String LOG_ORIGIN_REQUEST_TYPE_MISMATCH_EXPECTED_ARG_ACTUAL_ARG_D96D10AE = "Origin request type 不匹配:期望 {},实际 {}"; + public static final String LOG_ORIGIN_BODY_SIZE_MISMATCH_EXPECTED_ARG_ACTUAL_ARG_5D410B75 = "Origin body size 不匹配:期望 {},实际 {}"; + public static final String LOG_INVALID_SLICE_INDEX_EXPECTED_ARG_ACTUAL_ARG_2AC41628 = "无效的 slice index:期望 {},实际 {}"; + public static final String EXCEPTION_DECOMPRESSED_LENGTH_SHOULD_BETWEEN_0_ARG_BUT_GOT_ARG_488B3073 = "解压后长度应介于 0 和 %d 之间,但实际为 %d。"; + public static final String EXCEPTION_COMMA_50AD1C01 = ", "; + } diff --git a/iotdb-core/node-commons/src/main/i18n/zh/org/apache/iotdb/commons/i18n/QueryMessages.java b/iotdb-core/node-commons/src/main/i18n/zh/org/apache/iotdb/commons/i18n/QueryMessages.java index bb6cd5d022005..877018e2b4f0d 100644 --- a/iotdb-core/node-commons/src/main/i18n/zh/org/apache/iotdb/commons/i18n/QueryMessages.java +++ b/iotdb-core/node-commons/src/main/i18n/zh/org/apache/iotdb/commons/i18n/QueryMessages.java @@ -262,4 +262,288 @@ private QueryMessages() {} public static final String NO_CHANNEL_GROUP_BY_HASH_NOT_SUPPORT_APPEND = "NoChannelGroupByHash 不支持 appendValuesTo"; public static final String NO_CHANNEL_GROUP_BY_HASH_NOT_SUPPORT_RAW_HASH = "NoChannelGroupByHash 不支持 getRawHash"; public static final String MULTIPLE_TABLE_FUNCTION_AI_NODE_PROVIDER = "找到多个 ITableFunctionAINodeServiceProvider"; + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String EXCEPTION_UNKNOWN_TYPE_BC7EAB78 = "未知的类型: "; + public static final String EXCEPTION_UNEXPECTED_ROWSPERMATCH_F9B931C9 = "意外的 rowsPerMatch: "; + public static final String EXCEPTION_UNSUPPORTED_FILL_METHOD_0809912A = "不支持的填充方法: "; + public static final String EXCEPTION_EXCEPTNODE_SHOULD_NEVER_SERIALIZED_CURRENT_VERSION_6F5B4EE0 = "ExceptNode 在当前版本中绝不应被序列化"; + public static final String EXCEPTION_EXCEPTNODE_SHOULD_NEVER_DESERIALIZED_CURRENT_VERSION_690C18F0 = "ExceptNode 在当前版本中绝不应被反序列化"; + public static final String EXCEPTION_INTERSECTNODE_SHOULD_NEVER_SERIALIZED_CURRENT_VERSION_68D2C0D3 = "IntersectNode 在当前版本中绝不应被序列化"; + public static final String EXCEPTION_INTERSECTNODE_SHOULD_NEVER_DESERIALIZED_CURRENT_VERSION_A3614371 = "IntersectNode 在当前版本中绝不应被反序列化"; + public static final String EXCEPTION_COMMA_50AD1C01 = ", "; + public static final String EMPTY_MESSAGE = ""; + public static final String EXCEPTION_OUTERQUERYSCOPE_IS_NULL_D5305685 = "outerQueryScope 不能为空"; + public static final String EXCEPTION_WARNINGCOLLECTOR_IS_NULL_7A524A68 = "warningCollector 不能为空"; + public static final String EXCEPTION_UPDATEKIND_IS_NULL_6CA83291 = "updateKind 不能为空"; + public static final String EXCEPTION_EXPECTED_ARG_FIELDS_COMMA_GOT_ARG_498063F2 = "期望 %s 个字段,实际为 %s"; + public static final String EXCEPTION_MISSING_TABLE_ARGUMENT_COLON_ARG_4F1E9F4E = "缺少表参数: %s"; + public static final String EXCEPTION_TABLE_ARGUMENT_SPECIFICATION_CANNOT_HAVE_A_DEFAULT_VALUE_DOT_009A02CA = "表参数规格不能有默认值。"; + public static final String EXCEPTION_MISSING_DEFAULT_VALUE_FOR_SCALAR_ARGUMENT_COLON_ARG_8AF70F38 = "缺少标量参数的默认值: %s"; + public static final String EXCEPTION_RESULT_SCOPE_SHOULD_HAVE_OUTER_QUERY_SCOPE_EQUAL_WITH_PARAMETER_OUTER_QUERY_SCOP_BE9CDB22 = "result scope 应具有等于参数外层查询 scope 的外层查询 scope"; + public static final String EXCEPTION_RETURN_SCOPE_SHOULD_HAVE_CONTEXT_SCOPE_AS_ONE_OF_ITS_ANCESTORS_BBBFFE3E = "return scope 应将 context scope 作为其祖先之一"; + public static final String EXCEPTION_MISSING_RELATION_ALIAS_437EDF9C = "缺少 relation alias"; + public static final String EXCEPTION_MISMATCHED_ALIASES_A6D3F8CE = "aliases 不匹配"; + public static final String EXCEPTION_UNEXPECTED_OFFSET_ROWCOUNT_COLON_977E305C = "意外的 OFFSET rowCount: "; + public static final String EXCEPTION_INVALID_LIMIT_NODE_TYPE_DOT_EXPECTED_COLON_LIMIT_DOT_ACTUAL_COLON_ARG_5BCD1C76 = "无效的 limit node type。期望: Limit。实际: %s"; + public static final String EXCEPTION_UNEXPECTED_LIMIT_ROWCOUNT_COLON_CFF154F0 = "意外的 LIMIT rowCount: "; + public static final String EXCEPTION_NON_MINUS_EMPTY_ORDERBYEXPRESSIONS_LIST_WITHOUT_ORDERBYSCOPE_PROVIDED_240DDD64 = "非空 orderByExpressions 列表未提供 orderByScope"; + public static final String EXCEPTION_OUTPUT_FIELDS_IS_NULL_FOR_SELECT_ITEM_ARG_56AFEC51 = "select item %s 的输出字段不能为空"; + public static final String EXCEPTION_NODE_IS_NULL_C1479F4A = "node 不能为空"; + public static final String EXCEPTION_COLUMNS_SHOULDN_QUOTE_T_BE_EMPTY_HERE_34E44AAA = "columns 此处不应为空"; + public static final String EXCEPTION_GREATER_THAN_0B37D87A = " > "; + public static final String EXCEPTION_GROUPID_OUT_OF_RANGE_8B10E54B = "groupId 超出范围"; + public static final String EXCEPTION_MINIMUMREQUIREDCAPACITY_MUST_BE_POSITIVE_81638118 = "minimumRequiredCapacity 必须为正数"; + public static final String EXCEPTION_EXPECTEDSIZE_MUST_BE_GREATER_THAN_ZERO_DA2E0345 = "expectedSize 必须大于 0"; + public static final String EXCEPTION_POSITION_COUNT_OUT_OF_BOUND_5513847E = "position count 越界"; + public static final String EXCEPTION_ID_IS_NULL_9D5D27B1 = "id 不能为空"; + public static final String EXCEPTION_NEWCHILDREN_IS_NOT_EMPTY_170FCE18 = "newChildren 不为空"; + public static final String EXCEPTION_ORDERBY_IS_NULL_AA2494DE = "orderBy 不能为空"; + public static final String EXCEPTION_ORDERINGS_IS_NULL_59B1C097 = "orderings 不能为空"; + public static final String EXCEPTION_ORDERBY_IS_EMPTY_963405E0 = "orderBy 为空"; + public static final String EXCEPTION_ORDERBY_KEYS_AND_ORDERINGS_DON_QUOTE_T_MATCH_E0334493 = "orderBy keys 和 orderings 不匹配"; + public static final String EXCEPTION_NO_ORDERING_FOR_SYMBOL_COLON_ARG_F54E70FC = "symbol 缺少 ordering: %s"; + public static final String EXCEPTION_NAME_IS_NULL_C8B35959 = "name 不能为空"; + public static final String EXCEPTION_UNEXPECTED_EXPRESSION_COLON_ARG_8E4AC833 = "意外的 expression: %s"; + public static final String EXCEPTION_ORDERINGSCHEME_IS_NULL_4D4D2F6F = "orderingScheme 不能为空"; + public static final String EXCEPTION_ASSIGNMENTS_IS_NULL_1FD6142D = "assignments 不能为空"; + public static final String EXCEPTION_OUTPUT_IS_NULL_3CDA316E = "output 不能为空"; + public static final String EXCEPTION_EXPRESSION_IS_NULL_16C079B5 = "expression 不能为空"; + public static final String EXCEPTION_SYMBOL_ARG_ALREADY_HAS_ASSIGNMENT_ARG_COMMA_WHILE_ADDING_ARG_EE8CADA3 = "Symbol %s 已有 assignment %s,无法再添加 %s"; + public static final String EXCEPTION_TYPEVARIABLECONSTRAINTS_IS_NULL_0A86DA34 = "typeVariableConstraints 不能为空"; + public static final String EXCEPTION_LONGVARIABLECONSTRAINTS_IS_NULL_51F80E3C = "longVariableConstraints 不能为空"; + public static final String EXCEPTION_RETURNTYPE_IS_NULL_07C7C6A5 = "returnType 不能为空"; + public static final String EXCEPTION_ARGUMENTTYPES_IS_NULL_1E377BFD = "argumentTypes 不能为空"; + public static final String EXCEPTION_TYPEVARIABLECONSTRAINT_IS_NULL_18B97042 = "typeVariableConstraint 不能为空"; + public static final String EXCEPTION_TYPE_IS_NULL_16A3D3EB = "type 不能为空"; + public static final String EXCEPTION_VARIADICBOUND_IS_NULL_33A6BCC2 = "variadicBound 不能为空"; + public static final String EXCEPTION_CASTABLETO_IS_NULL_0F2A5B36 = "castableTo 不能为空"; + public static final String EXCEPTION_CASTABLEFROM_IS_NULL_DE5158C7 = "castableFrom 不能为空"; + public static final String EXCEPTION_FUNCTIONNAME_IS_NULL_0818CBC7 = "functionName 不能为空"; + public static final String EXCEPTION_RESOLVEDFUNCTION_IS_NULL_81B5B93A = "resolvedFunction 不能为空"; + public static final String EXCEPTION_VALUE_IS_NULL_192F6BFF = "value 不能为空"; + public static final String EXCEPTION_VALUES_IS_NULL_F1D7D3D8 = "values 不能为空"; + public static final String EXCEPTION_FIELDNAME_IS_NULL_DEB1CA0C = "fieldName 不能为空"; + public static final String EXCEPTION_TYPESIGNATURE_IS_NULL_E8B47305 = "typeSignature 不能为空"; + public static final String EXCEPTION_BASE_TYPE_NAME_CANNOT_BE_A_TYPE_VARIABLE_71E810A9 = "base type name 不能是 type variable"; + public static final String EXCEPTION_BASE_IS_NULL_AC445AD0 = "base 不能为空"; + public static final String EXCEPTION_BASE_IS_EMPTY_E86FBC3A = "base 为空"; + public static final String EXCEPTION_BAD_CHARACTERS_IN_BASE_TYPE_COLON_ARG_FA811786 = "base type 中存在非法字符: %s"; + public static final String EXCEPTION_PARAMETERS_IS_NULL_418C7892 = "parameters 不能为空"; + public static final String EXCEPTION_PARAMETERS_FOR_ROW_TYPE_MUST_BE_NAMED_TYPE_PARAMETERS_6AADD078 = "ROW 类型的参数必须为 NAMED_TYPE 参数"; + public static final String EXCEPTION_KIND_IS_NULL_8C13BAB2 = "kind 不能为空"; + public static final String EXCEPTION_COLUMNCATEGORY_IS_NULL_0075924B = "columnCategory 不能为空"; + public static final String EXCEPTION_PROPERTIES_IS_NULL_57B88B49 = "properties 不能为空"; + public static final String EXCEPTION_COMMENT_IS_NULL_0AD46118 = "comment 不能为空"; + public static final String EXCEPTION_EXTRAINFO_IS_NULL_43AE989F = "extraInfo 不能为空"; + public static final String EXCEPTION_SIGNATURE_IS_NULL_CA3D8772 = "signature 不能为空"; + public static final String EXCEPTION_FUNCTIONID_IS_NULL_F91F8E89 = "functionId 不能为空"; + public static final String EXCEPTION_FUNCTIONKIND_IS_NULL_EDF86E36 = "functionKind 不能为空"; + public static final String EXCEPTION_FUNCTIONNULLABILITY_IS_NULL_6EF52FB4 = "functionNullability 不能为空"; + public static final String EXCEPTION_INVALID_NAME_ARG_AD3FA0BF = "无效名称 %s"; + public static final String EXCEPTION_INVALID_NAME_COLON_LEFT_BRACKET_ARG_RIGHT_BRACKET_C46F15A4 = "无效名称: [%s]"; + public static final String EXCEPTION_ARGUMENTNULLABLE_IS_NULL_0CC221D3 = "argumentNullable 不能为空"; + public static final String EXCEPTION_LITERALFORMATTER_IS_NULL_3F4F4A2B = "literalFormatter 不能为空"; + public static final String EXCEPTION_SYMBOLREFERENCEFORMATTER_IS_NULL_B9B540EC = "symbolReferenceFormatter 不能为空"; + public static final String EXCEPTION_BUILDER_IS_NULL_ADE64E9B = "builder 不能为空"; + public static final String EXCEPTION_VISITEXPRESSION_SHOULD_ONLY_BE_CALLED_AT_ROOT_93E4AAD4 = "visitExpression 只能在 root 调用"; + public static final String EXCEPTION_VISITROWPATTERN_SHOULD_ONLY_BE_CALLED_AT_ROOT_9DE9F574 = "visitRowPattern 只能在 root 调用"; + public static final String EXCEPTION_MISSING_IDENTIFIER_IN_AFTER_MATCH_SKIP_TO_LAST_82A12A21 = "AFTER MATCH SKIP TO LAST 中缺少标识符"; + public static final String EXCEPTION_MISSING_IDENTIFIER_IN_AFTER_MATCH_SKIP_TO_FIRST_F988B839 = "AFTER MATCH SKIP TO FIRST 中缺少标识符"; + public static final String EXCEPTION_LINE_MUST_BE_GREATER_THAN_0_8D2C1802 = "line 必须为 > 0"; + public static final String EXCEPTION_COLUMN_MUST_BE_GREATER_THAN_0_2481C561 = "column 必须为 > 0"; + public static final String EXCEPTION_LEFT_IS_NULL_2C1080C5 = "left 不能为空"; + public static final String EXCEPTION_RIGHT_IS_NULL_97BD6491 = "right 不能为空"; + public static final String EXCEPTION_LOCATION_IS_NULL_F134D388 = "location 不能为空"; + public static final String EXCEPTION_CRITERIA_IS_NULL_2996D1A3 = "criteria 不能为空"; + public static final String EXCEPTION_NO_JOIN_CRITERIA_SPECIFIED_44DED0B9 = "未指定 join criteria"; + public static final String EXCEPTION_ARG_JOIN_CANNOT_HAVE_JOIN_CRITERIA_3B23E0D1 = "%s join 不能包含 join criteria"; + public static final String EXCEPTION_SELECTITEMS_16EC72CF = "selectItems"; + public static final String EXCEPTION_FUNCTION_IS_NULL_E0FA4B62 = "function 不能为空"; + public static final String EXCEPTION_PRECISION_IS_NULL_73E48139 = "precision 不能为空"; + public static final String EXCEPTION_OPERAND_IS_NULL_D0182140 = "operand 不能为空"; + public static final String EXCEPTION_WHENCLAUSES_IS_NULL_140535CF = "whenClauses 不能为空"; + public static final String EXCEPTION_DEFAULTVALUE_IS_NULL_B1C8490D = "defaultValue 不能为空"; + public static final String EXCEPTION_THE_LENGTH_OF_SIMPLECASEEXPRESSION_QUOTE_S_WHENCLAUSES_MUST_GREATER_THAN_0_5D2963B9 = "SimpleCaseExpression 的 whenClauses 长度必须大于 0"; + public static final String EXCEPTION_SETS_IS_NULL_C9A2FA67 = "sets 不能为空"; + public static final String EXCEPTION_GROUPING_SETS_CANNOT_BE_EMPTY_8E0BE7DB = "grouping sets 不能为空"; + public static final String EXCEPTION_IDENTIFIERS_IS_NULL_72CDC3BE = "identifiers 不能为空"; + public static final String EXCEPTION_IDENTIFIERS_IS_EMPTY_410ED65C = "identifiers 为空"; + public static final String EXCEPTION_QUERIES_IS_NULL_94399651 = "queries 不能为空"; + public static final String EXCEPTION_QUERIES_IS_EMPTY_FE480BBC = "queries 为空"; + public static final String EXCEPTION_VALUE_IS_EMPTY_A42300DD = "value 为空"; + public static final String EXCEPTION_VALUE_CONTAINS_ILLEGAL_CHARACTERS_COLON_ARG_C6DBFEBA = "value 包含非法字符: %s"; + public static final String EXCEPTION_RELATIONS_IS_NULL_0275CA3C = "relations 不能为空"; + public static final String EXCEPTION_FILLMETHOD_IS_NULL_2E5A83E6 = "fillMethod 不能为空"; + public static final String EXCEPTION_RELATION_IS_NULL_890596ED = "relation 不能为空"; + public static final String EXCEPTION_ALIAS_IS_NULL_B2ED729A = "alias 不能为空"; + public static final String EXCEPTION_RESULT_IS_NULL_031E2F89 = "result 不能为空"; + public static final String EXCEPTION_VALUELIST_IS_NULL_9271DC51 = "valueList 不能为空"; + public static final String EXCEPTION_ROWS_IS_NULL_B8BF74DE = "rows 不能为空"; + public static final String EXCEPTION_SORTITEMS_IS_NULL_DD277CDD = "sortItems 不能为空"; + public static final String EXCEPTION_SORTITEMS_SHOULD_NOT_BE_EMPTY_78C26791 = "sortItems 不应为空"; + public static final String EXCEPTION_FIELD_IS_NULL_80E8CE23 = "field 不能为空"; + public static final String EXCEPTION_EXISTINGWINDOWNAME_IS_NULL_5D67FD72 = "existingWindowName 不能为空"; + public static final String EXCEPTION_PARTITIONBY_IS_NULL_84791B6B = "partitionBy 不能为空"; + public static final String EXCEPTION_FRAME_IS_NULL_5A92D609 = "frame 不能为空"; + public static final String EXCEPTION_CONDITION_IS_NULL_327EBA55 = "condition 不能为空"; + public static final String EXCEPTION_TRUEVALUE_IS_NULL_99C09BA5 = "trueValue 不能为空"; + public static final String EXCEPTION_PATTERNS_IS_NULL_7E0DDDF0 = "patterns 不能为空"; + public static final String EXCEPTION_PATTERNS_LIST_IS_EMPTY_D4D1802F = "patterns list 为空"; + public static final String EXCEPTION_ARGUMENTS_IS_NULL_B1F6D4F2 = "arguments 不能为空"; + public static final String EXCEPTION_TARGET_IS_NULL_240F0372 = "target 不能为空"; + public static final String EXCEPTION_ALIASES_IS_NULL_C481EE59 = "aliases 不能为空"; + public static final String EXCEPTION_SUBQUERY_IS_NULL_F0E1842F = "subquery 不能为空"; + public static final String EXCEPTION_INPUT_IS_NULL_EE7EADB0 = "input 不能为空"; + public static final String EXCEPTION_MEASURES_IS_NULL_EC9D2431 = "measures 不能为空"; + public static final String EXCEPTION_ROWSPERMATCH_IS_NULL_661EA4A9 = "rowsPerMatch 不能为空"; + public static final String EXCEPTION_AFTERMATCHSKIPTO_IS_NULL_7623C3C0 = "afterMatchSkipTo 不能为空"; + public static final String EXCEPTION_PATTERN_IS_NULL_AC4E239A = "pattern 不能为空"; + public static final String EXCEPTION_SUBSETS_IS_NULL_AF77CD01 = "subsets 不能为空"; + public static final String EXCEPTION_VARIABLEDEFINITIONS_IS_NULL_5F7B8ED4 = "variableDefinitions 不能为空"; + public static final String EXCEPTION_VARIABLEDEFINITIONS_IS_EMPTY_9E324869 = "variableDefinitions 为空"; + public static final String EXCEPTION_UNEXPECTED_ROWCOUNT_CLASS_COLON_ARG_170FC7CD = "意外的 rowCount class: %s"; + public static final String EXCEPTION_ITEMS_IS_NULL_32A25379 = "items 不能为空"; + public static final String EXCEPTION_OPERANDS_IS_NULL_135465B7 = "operands 不能为空"; + public static final String EXCEPTION_MUST_HAVE_AT_LEAST_TWO_OPERANDS_CE7B0DCB = "必须至少有两个 operands"; + public static final String EXCEPTION_LINE_MUST_BE_AT_LEAST_ONE_COMMA_GOT_COLON_ARG_6BA7A99C = "line 必须至少为 1,实际为: %s"; + public static final String EXCEPTION_COLUMN_MUST_BE_AT_LEAST_ONE_COMMA_GOT_COLON_ARG_4A529240 = "column 必须至少为 1,实际为: %s"; + public static final String EXCEPTION_QUERY_IS_NULL_689B7978 = "查询不能为空"; + public static final String EXCEPTION_OPERATOR_IS_NULL_F5BB9F59 = "operator 不能为空"; + public static final String EXCEPTION_EXPECTED_AT_LEAST_2_TERMS_87CD9010 = "期望至少 2 个 terms"; + public static final String EXCEPTION_SPECIFICATION_IS_NULL_BB4AA029 = "specification 不能为空"; + public static final String EXCEPTION_TRIMSOURCE_IS_NULL_C7E6B71D = "trimSource 不能为空"; + public static final String EXCEPTION_TRIMCHARACTER_IS_NULL_4036C3D8 = "trimCharacter 不能为空"; + public static final String EXCEPTION_POSITION_IS_NULL_5B14C61B = "position 不能为空"; + public static final String EXCEPTION_IDENTIFIER_IS_NULL_8F8171C8 = "identifier 不能为空"; + public static final String EXCEPTION_MISSING_IDENTIFIER_IN_SKIP_TO_ARG_33E1A7C3 = "SKIP TO %s 中缺少标识符"; + public static final String EXCEPTION_UNEXPECTED_IDENTIFIER_IN_SKIP_TO_ARG_58438AFC = "SKIP TO %s 中出现意外的标识符"; + public static final String EXCEPTION_FIRST_IS_NULL_DC679129 = "第一个值不能为空"; + public static final String EXCEPTION_ORIGINALPARTS_IS_NULL_EA9B01F3 = "originalParts 不能为空"; + public static final String EXCEPTION_ORIGINALPARTS_IS_EMPTY_0D1EFAC4 = "originalParts 为空"; + public static final String EXCEPTION_MIN_IS_NULL_B80144C1 = "min 不能为空"; + public static final String EXCEPTION_MAX_IS_NULL_CCABB3BF = "max 不能为空"; + public static final String EXCEPTION_TABLE_IS_NULL_8DDD9098 = "table 不能为空"; + public static final String EXCEPTION_WITH_IS_NULL_20C2A1AE = "公共表表达式子句不能为空"; + public static final String EXCEPTION_QUERYBODY_IS_NULL_E3EB26CA = "queryBody 不能为空"; + public static final String EXCEPTION_FILL_IS_NULL_3548C13D = "fill 不能为空"; + public static final String EXCEPTION_OFFSET_IS_NULL_82BA6093 = "offset 不能为空"; + public static final String EXCEPTION_LIMIT_IS_NULL_2EE9FA0F = "limit 不能为空"; + public static final String EXCEPTION_LIMIT_MUST_BE_OPTIONAL_OF_EITHER_FETCHFIRST_OR_LIMIT_TYPE_0636CAA9 = "limit 必须是 FetchFirst 或 Limit 类型之一的可选项"; + public static final String EXCEPTION_ATLEAST_IS_NULL_2FE8D701 = "atLeast 不能为空"; + public static final String EXCEPTION_ATMOST_IS_NULL_778B3B3A = "atMost 不能为空"; + public static final String EXCEPTION_VALUES_CANNOT_BE_EMPTY_F18F863D = "values 不能为空"; + public static final String EXCEPTION_SELECT_IS_NULL_B45C440F = "select 不能为空"; + public static final String EXCEPTION_FROM_IS_NULL_2651BF57 = "FROM 不能为空"; + public static final String EXCEPTION_WHERE_IS_NULL_A1A3FCBC = "where 不能为空"; + public static final String EXCEPTION_GROUPBY_IS_NULL_4CF478F2 = "groupBy 不能为空"; + public static final String EXCEPTION_HAVING_IS_NULL_700DC5B0 = "having 不能为空"; + public static final String EXCEPTION_WINDOWS_IS_NULL_549D8892 = "windows 不能为空"; + public static final String EXCEPTION_FIELDINDEX_MUST_BE_GREATER_THAN_EQUALS_0_4138C39B = "fieldIndex 必须为 >= 0"; + public static final String EXCEPTION_WINDOW_IS_NULL_7532B76A = "window 不能为空"; + public static final String EXCEPTION_ESCAPE_IS_NULL_C9E4F69B = "escape 不能为空"; + public static final String EXCEPTION_PROCESSINGMODE_IS_NULL_F4D8AE91 = "processingMode 不能为空"; + public static final String EXCEPTION_SIMPLEGROUPBYEXPRESSIONS_IS_NULL_3F6A1ECC = "simpleGroupByExpressions 不能为空"; + public static final String EXCEPTION_THE_LENGTH_OF_SEARCHEDCASEEXPRESSION_QUOTE_S_WHENCLAUSES_MUST_GREATER_THAN_0_D710DBF6 = "SearchedCaseExpression 的 whenClauses 长度必须大于 0"; + public static final String EXCEPTION_SIGN_IS_NULL_4AF91D16 = "sign 不能为空"; + public static final String EXCEPTION_START_IS_NULL_5A075F04 = "start 不能为空"; + public static final String EXCEPTION_END_IS_NULL_C6C46BAA = "end 不能为空"; + public static final String EXCEPTION_SECOND_IS_NULL_989FAA15 = "second 不能为空"; + public static final String EXCEPTION_MODE_IS_NULL_54A948DB = "mode 不能为空"; + public static final String EXCEPTION_PATTERNQUANTIFIER_IS_NULL_0AC88BAB = "patternQuantifier 不能为空"; + public static final String EXCEPTION_COLUMNS_IS_NULL_6C8F32B3 = "columns 不能为空"; + public static final String EXCEPTION_COLUMNS_IS_EMPTY_C7A671C9 = "columns 为空"; + public static final String EXCEPTION_QUANTIFIER_IS_NULL_7B81C096 = "quantifier 不能为空"; + public static final String EXCEPTION_COLUMNNAMES_IS_NULL_C3BF708F = "columnNames 不能为空"; + public static final String EXCEPTION_SETDESCRIPTOR_IS_NULL_4ED0D19A = "setDescriptor 不能为空"; + public static final String EXCEPTION_CLASSIFIERSYMBOL_IS_NULL_B92EE093 = "classifierSymbol 不能为空"; + public static final String EXCEPTION_MATCHNUMBERSYMBOL_IS_NULL_D88DC4EE = "matchNumberSymbol 不能为空"; + public static final String EXCEPTION_LOGICALINDEXPOINTER_IS_NULL_BF8B516B = "logicalIndexPointer 不能为空"; + public static final String EXCEPTION_INPUTSYMBOL_IS_NULL_F4B354EB = "inputSymbol 不能为空"; + public static final String EXCEPTION_PATTERN_CONCATENATION_MUST_HAVE_AT_LEAST_2_ELEMENTS_LEFT_PAREN_ACTUAL_COLON_ARG__8B283563 = "pattern concatenation 必须至少有 2 个元素(实际: %s)"; + public static final String EXCEPTION_LABELS_IS_NULL_F4FBBECE = "labels 不能为空"; + public static final String EXCEPTION_LOGICAL_OFFSET_MUST_BE_GREATER_THAN_EQUALS_0_COMMA_ACTUAL_COLON_ARG_539807BF = "logical offset 必须 >= 0,实际: %s"; + public static final String EXCEPTION_PATTERN_ALTERNATION_MUST_HAVE_AT_LEAST_2_ELEMENTS_LEFT_PAREN_ACTUAL_COLON_ARG_RI_A03B40AC = "pattern alternation 必须至少有 2 个元素(实际: %s)"; + public static final String EXCEPTION_RUN_IRROWPATTERNFLATTENER_FIRST_TO_REMOVE_REDUNDANT_EMPTY_PATTERN_D2FB553C = "请先运行 IrRowPatternFlattener,以移除多余的空 pattern"; + public static final String EXCEPTION_OUTPUTSYMBOLS_IS_NULL_D7024804 = "outputSymbols 不能为空"; + public static final String EXCEPTION_ROW_IS_NULL_36A3CCAA = "row 不能为空"; + public static final String EXCEPTION_DECLARED_AND_ACTUAL_ROW_COUNTS_DON_QUOTE_T_MATCH_COLON_ARG_VS_ARG_EC8361A5 = "声明的 row count 与实际 row count 不匹配: %s vs %s"; + public static final String EXCEPTION_MISSING_ROWS_SPECIFICATION_FOR_VALUES_WITH_NON_MINUS_EMPTY_OUTPUT_SYMBOLS_9BA9C169 = "具有非空 output symbols 的 Values 缺少 rows specification"; + public static final String EXCEPTION_MISMATCHED_ROWS_DOT_ALL_ROWS_MUST_BE_THE_SAME_SIZE_E98CF3BE = "rows 不匹配。所有 rows 大小必须一致"; + public static final String EXCEPTION_ROW_SIZE_DOESN_QUOTE_T_MATCH_THE_NUMBER_OF_OUTPUT_SYMBOLS_COLON_ARG_VS_ARG_5FBDF729 = "row size 与 output symbols 数量不匹配: %s vs %s"; + public static final String EXCEPTION_ARGUMENTNAME_IS_NULL_7F8F665F = "argumentName 不能为空"; + public static final String EXCEPTION_PASSTHROUGHSPECIFICATION_IS_NULL_2B48FE41 = "passThroughSpecification 不能为空"; + public static final String EXCEPTION_SYMBOL_IS_NULL_AE539B31 = "symbol 不能为空"; + public static final String EXCEPTION_WRONG_NUMBER_OF_NEW_CHILDREN_817AF800 = "new children 数量错误"; + public static final String EXCEPTION_STARTTYPE_IS_NULL_2EB77A1F = "startType 不能为空"; + public static final String EXCEPTION_STARTVALUE_IS_NULL_4FD58C2B = "startValue 不能为空"; + public static final String EXCEPTION_SORTKEYCOERCEDFORFRAMESTARTCOMPARISON_IS_NULL_4E922E4D = "sortKeyCoercedForFrameStartComparison 不能为空"; + public static final String EXCEPTION_ENDTYPE_IS_NULL_6B9E47D2 = "endType 不能为空"; + public static final String EXCEPTION_ENDVALUE_IS_NULL_69BD66CB = "endValue 不能为空"; + public static final String EXCEPTION_SORTKEYCOERCEDFORFRAMEENDCOMPARISON_IS_NULL_CB0BAC41 = "sortKeyCoercedForFrameEndComparison 不能为空"; + public static final String EXCEPTION_ORIGINALSTARTVALUE_IS_NULL_6BCE78A9 = "originalStartValue 不能为空"; + public static final String EXCEPTION_ORIGINALENDVALUE_IS_NULL_EBA46FFA = "originalEndValue 不能为空"; + public static final String EXCEPTION_PREPARTITIONEDINPUTS_MUST_BE_CONTAINED_IN_PARTITIONBY_CE9DCE6F = "prePartitionedInputs 必须包含在 partitionBy 中"; + public static final String EXCEPTION_CANNOT_HAVE_SORTED_MORE_SYMBOLS_THAN_THOSE_REQUESTED_52EEB7C9 = "不能包含多于请求数量的 sorted symbols"; + public static final String EXCEPTION_PRESORTEDORDERPREFIX_CAN_ONLY_BE_GREATER_THAN_ZERO_IF_ALL_PARTITION_SYMBOLS_ARE__76BBC8DD = "只有在所有 partition symbols 均已 pre-partitioned 时,preSortedOrderPrefix 才能大于 0"; + public static final String EXCEPTION_ORIGINALSTARTVALUE_MUST_BE_PRESENT_IF_STARTVALUE_IS_PRESENT_30B6FDFF = "startValue 存在时 originalStartValue 必须存在"; + public static final String EXCEPTION_FOR_FRAME_OF_TYPE_RANGE_COMMA_SORTKEYCOERCEDFORFRAMESTARTCOMPARISON_MUST_BE_PRES_7533A433 = "RANGE 类型 frame 中,startValue 存在时 sortKeyCoercedForFrameStartComparison 必须存在"; + public static final String EXCEPTION_ORIGINALENDVALUE_MUST_BE_PRESENT_IF_ENDVALUE_IS_PRESENT_E79EF3D2 = "endValue 存在时 originalEndValue 必须存在"; + public static final String EXCEPTION_FOR_FRAME_OF_TYPE_RANGE_COMMA_SORTKEYCOERCEDFORFRAMEENDCOMPARISON_MUST_BE_PRESEN_36A665AC = "RANGE 类型 frame 中,endValue 存在时 sortKeyCoercedForFrameEndComparison 必须存在"; + public static final String EXCEPTION_SUBQUERYASSIGNMENTS_IS_NULL_946CDC43 = "subqueryAssignments 不能为空"; + public static final String EXCEPTION_CORRELATION_IS_NULL_F8327EAD = "correlation 不能为空"; + public static final String EXCEPTION_ORIGINSUBQUERY_IS_NULL_8EFEB8D5 = "originSubquery 不能为空"; + public static final String EXCEPTION_INPUT_DOES_NOT_CONTAIN_SYMBOLS_FROM_CORRELATION_1B3DB7BF = "Input 不包含来自 correlation 的 symbols"; + public static final String EXCEPTION_EXPECTED_NEWCHILDREN_TO_CONTAIN_2_NODES_25FE7927 = "期望 newChildren 包含 2 个 nodes"; + public static final String EXCEPTION_CHILDREN_IS_NULL_0CB43CE2 = "children 不能为空"; + public static final String EXCEPTION_OUTPUTTOINPUTS_IS_NULL_4125312B = "outputToInputs 不能为空"; + public static final String EXCEPTION_OUTPUTS_IS_NULL_EFD078A2 = "outputs 不能为空"; + public static final String EXCEPTION_MUST_HAVE_AT_LEAST_ONE_SOURCE_4114F454 = "必须至少有一个 source"; + public static final String EXCEPTION_EVERY_CHILD_NEEDS_TO_MAP_ITS_SYMBOLS_TO_AN_OUTPUT_ARG_OPERATION_SYMBOL_7FA107A2 = "每个 child 都需要将其 symbols 映射到输出 %s operation symbol"; + public static final String EXCEPTION_CHILD_DOES_NOT_PROVIDE_REQUIRED_SYMBOLS_B7CE956E = "Child 未提供必需 symbols"; + public static final String EXCEPTION_LEFTOUTPUTSYMBOLS_IS_NULL_083AE900 = "leftOutputSymbols 不能为空"; + public static final String EXCEPTION_RIGHTOUTPUTSYMBOLS_IS_NULL_F44B848F = "rightOutputSymbols 不能为空"; + public static final String EXCEPTION_FILTER_IS_NULL_8F83BD19 = "filter 不能为空"; + public static final String EXCEPTION_SPILLABLE_IS_NULL_8226EA70 = "spillable 不能为空"; + public static final String EXCEPTION_FILTER_MUST_BE_AN_EXPRESSION_OF_BOOLEAN_TYPE_COLON_ARG_F358F1A8 = "Filter 必须是 boolean 类型表达式:%s"; + public static final String EXCEPTION_LEFT_SOURCE_INPUTS_DO_NOT_CONTAIN_ALL_LEFT_OUTPUT_SYMBOLS_71459E3B = "Left source inputs 不包含所有 left output symbols"; + public static final String EXCEPTION_RIGHT_SOURCE_INPUTS_DO_NOT_CONTAIN_ALL_RIGHT_OUTPUT_SYMBOLS_23EBC024 = "Right source inputs 不包含所有 right output symbols"; + public static final String EXCEPTION_EQUALITY_JOIN_CRITERIA_SHOULD_BE_NORMALIZED_ACCORDING_TO_JOIN_SIDES_COLON_ARG_76EB7C14 = "等值 join criteria 应按 join sides 规范化:%s"; + public static final String EXCEPTION_EXPECTED_NEWCHILDREN_TO_CONTAIN_2_NODES_FOR_JOINNODE_BEEC3D82 = "期望 newChildren 包含 2 个 JoinNode 节点"; + public static final String EXCEPTION_MARKERSYMBOL_IS_NULL_0313F046 = "markerSymbol 不能为空"; + public static final String EXCEPTION_HASHSYMBOL_IS_NULL_1BD487F2 = "hashSymbol 不能为空"; + public static final String EXCEPTION_DISTINCTSYMBOLS_IS_NULL_28B8DB52 = "distinctSymbols 不能为空"; + public static final String EXCEPTION_DISTINCTSYMBOLS_CANNOT_BE_EMPTY_A44A693E = "distinctSymbols 不能为空"; + public static final String EXCEPTION_EXPRESSIONANDVALUEPOINTERS_IS_NULL_8A02F345 = "expressionAndValuePointers 不能为空"; + public static final String EXCEPTION_SKIPTOLABELS_IS_NULL_0A543C09 = "skipToLabels 不能为空"; + public static final String EXCEPTION_SKIPTOPOSITION_IS_NULL_EFBA10CA = "skipToPosition 不能为空"; + public static final String EXCEPTION_COLUMNNAMES_AND_OUTPUTSYMBOLS_SIZES_DON_QUOTE_T_MATCH_1BDF6B28 = "columnNames 和 outputSymbols 的大小不匹配"; + public static final String EXCEPTION_AGGREGATIONS_IS_NULL_CFE9CD2E = "aggregations 不能为空"; + public static final String EXCEPTION_GROUPINGSETS_IS_NULL_8EE6D9BF = "groupingSets 不能为空"; + public static final String EXCEPTION_PREGROUPEDSYMBOLS_IS_NULL_DC24FF7B = "preGroupedSymbols 不能为空"; + public static final String EXCEPTION_GLOBALGROUPINGSETS_IS_NULL_5B175B47 = "globalGroupingSets 不能为空"; + public static final String EXCEPTION_GROUPINGKEYS_IS_NULL_90D11F0C = "groupingKeys 不能为空"; + public static final String EXCEPTION_MASK_IS_NULL_5A7CEA49 = "mask 不能为空"; + public static final String EXCEPTION_SOURCE_IS_NULL_45946547 = "source 不能为空"; + public static final String EXCEPTION_STEP_IS_NULL_F83262DA = "step 不能为空"; + public static final String EXCEPTION_GROUPIDSYMBOL_IS_NULL_BFD3763D = "groupIdSymbol 不能为空"; + public static final String EXCEPTION_GROUPING_COLUMNS_DOES_NOT_CONTAIN_GROUPID_COLUMN_83976C83 = "Grouping columns 不包含 groupId column"; + public static final String EXCEPTION_ORDER_BY_DOES_NOT_SUPPORT_DISTRIBUTED_AGGREGATION_05109B26 = "ORDER BY 不支持分布式聚合"; + public static final String EXCEPTION_PRE_MINUS_GROUPED_SYMBOLS_MUST_BE_A_SUBSET_OF_THE_GROUPING_KEYS_AFC6C33D = "pre-grouped symbols 必须是 grouping keys 的子集"; + public static final String EXCEPTION_GROUPING_SET_COUNT_MUST_BE_LARGER_THAN_0_06FE609E = "grouping set 数量必须大于 0"; + public static final String EXCEPTION_LIST_OF_EMPTY_GLOBAL_GROUPING_SETS_MUST_BE_NO_LARGER_THAN_GROUPING_SET_COUNT_12DAD147 = "空 global grouping sets 列表大小不能大于 grouping set 数量"; + public static final String EXCEPTION_NO_GROUPING_KEYS_IMPLIES_AT_LEAST_ONE_GLOBAL_GROUPING_SET_COMMA_BUT_NONE_PROVIDE_F099B6D2 = "没有 grouping keys 意味着至少需要一个 global grouping set,但未提供"; + public static final String EXCEPTION_ARGUMENT_MUST_BE_SYMBOL_COLON_ARG_9C176D4D = "argument 必须为 symbol: %s"; + public static final String EXCEPTION_ARG_AGGREGATION_FUNCTION_ARG_HAS_ARG_ARGUMENTS_COMMA_BUT_ARG_ARGUMENTS_WERE_PROV_53CC06CF = "%s aggregation function %s 有 %s 个参数,但函数调用提供了 %s 个参数"; + public static final String EXCEPTION_IDCOLUMN_IS_NULL_FA206D71 = "idColumn 不能为空"; + public static final String EXCEPTION_EXPECTED_NEWCHILDREN_TO_CONTAIN_1_NODE_7A97D180 = "期望 newChildren 包含 1 个 node"; + public static final String EXCEPTION_SOURCEJOINSYMBOL_IS_NULL_A88AEC85 = "sourceJoinSymbol 不能为空"; + public static final String EXCEPTION_FILTERINGSOURCEJOINSYMBOL_IS_NULL_502C5BD5 = "filteringSourceJoinSymbol 不能为空"; + public static final String EXCEPTION_SEMIJOINOUTPUT_IS_NULL_D961A39B = "semiJoinOutput 不能为空"; + public static final String EXCEPTION_SOURCE_DOES_NOT_CONTAIN_JOIN_SYMBOL_FA572FD2 = "Source 不包含 join symbol"; + public static final String EXCEPTION_FILTERING_SOURCE_DOES_NOT_CONTAIN_FILTERING_JOIN_SYMBOL_0C7B1BE3 = "Filtering source 不包含 filtering join symbol"; + public static final String EXCEPTION_REHASHMEMORYRESERVATION_IS_NEGATIVE_7EFEFCC2 = "rehashMemoryReservation 不能为负数"; + public static final String EXCEPTION_IDENTIFIER_CANNOT_BE_EMPTY_OR_NULL_9C70B87D = "Identifier 不能为空或 null"; + } diff --git a/iotdb-core/node-commons/src/main/i18n/zh/org/apache/iotdb/commons/i18n/SchemaMessages.java b/iotdb-core/node-commons/src/main/i18n/zh/org/apache/iotdb/commons/i18n/SchemaMessages.java index fb3a1c5d05fe0..776690108a0df 100644 --- a/iotdb-core/node-commons/src/main/i18n/zh/org/apache/iotdb/commons/i18n/SchemaMessages.java +++ b/iotdb-core/node-commons/src/main/i18n/zh/org/apache/iotdb/commons/i18n/SchemaMessages.java @@ -76,4 +76,19 @@ private SchemaMessages() {} public static final String S_IS_NULL = "%s 为 null"; + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String EXCEPTION_DATABASE_MUST_SPECIFIED_SESSION_DATABASE_NOT_SET_CBF6F21F = "未设置会话数据库时,必须指定数据库"; + public static final String MESSAGE_NOT_TTL_RULE_669A7BA4 = "不是 TTL 规则"; + public static final String MESSAGE_SET_4BE61E08 = " 设置于 "; + public static final String EXCEPTION_FAILED_GET_ORIGINAL_DATABASE_BECAUSE_ARG_NULL_TABLE_ARG_5AE54514 = "获取原始数据库失败,原因:%s 在表 %s 中为空"; + public static final String EXCEPTION_FAILED_PARSE_TREE_VIEW_STRING_ARG_CONVERT_IDEVICEID_6E735586 = "解析树视图字符串 %s 并转换为 IDeviceID 时失败"; + public static final String EXCEPTION_SESSION_IS_NULL_6CF0F47D = "session 不能为空"; + public static final String EXCEPTION_NAME_IS_NULL_C8B35959 = "name 不能为空"; + public static final String EXCEPTION_ARG_IS_NOT_LOWERCASE_COLON_ARG_D78298F6 = "%s 不是小写: %s"; + public static final String EMPTY_MESSAGE = ""; + public static final String EXCEPTION_OPERATOR_IS_NULL_F5BB9F59 = "operator 不能为空"; + public static final String EXCEPTION_VALUE_IS_NULL_192F6BFF = "value 不能为空"; + } diff --git a/iotdb-core/node-commons/src/main/i18n/zh/org/apache/iotdb/commons/i18n/UtilMessages.java b/iotdb-core/node-commons/src/main/i18n/zh/org/apache/iotdb/commons/i18n/UtilMessages.java index f4215f6e449c7..9cfde9a6ff454 100644 --- a/iotdb-core/node-commons/src/main/i18n/zh/org/apache/iotdb/commons/i18n/UtilMessages.java +++ b/iotdb-core/node-commons/src/main/i18n/zh/org/apache/iotdb/commons/i18n/UtilMessages.java @@ -194,4 +194,64 @@ public final class UtilMessages { public static final String READ_T_PIPE_SINK_INFO_FAILED = "读取 TPipeSinkInfo 失败:"; private UtilMessages() {} + // --------------------------------------------------------------------------- + // Additional auto-collected messages + // --------------------------------------------------------------------------- + public static final String EXCEPTION_INTERNAL_USER_NAMES_EXCEPT_DEFAULT_SUPERUSER_SEPARATION_DUTIES_ADMINS_MUST_3F045FC1 = "内部用户名(默认 superuser 和职责分离管理员除外)必须"; + public static final String EXCEPTION_START_01CCD2EF = "以 \" 开头"; + public static final String EXCEPTION_USER_NAMES_STARTING_8FDC637E = "以 \" 开头的用户名"; + public static final String EXCEPTION_RESERVED_SYSTEM_USE_CANNOT_USED_NEW_USERS_AS_RENAME_CEB73835 = "\" 保留供系统使用,不能用于新用户或重命名 "; + public static final String EXCEPTION_TARGET_42AEFBAE = "target"; + public static final String EXCEPTION_LENGTH_NAME_MUST_GREATER_THAN_EQUAL_0387C3A5 = "name 长度必须大于等于 "; + public static final String EXCEPTION_LENGTH_NAME_MUST_LESS_THAN_EQUAL_B7B31C94 = "name 长度必须小于等于 "; + public static final String EXCEPTION_NAME_CAN_ONLY_CONTAIN_LETTERS_NUMBERS_A313856E = "name 只能包含字母、数字或 !@#$%^*()_+-="; + public static final String EXCEPTION_LENGTH_PASSWORD_MUST_GREATER_THAN_EQUAL_F95F3E8F = "密码长度必须大于等于 "; + public static final String EXCEPTION_LENGTH_PASSWORD_MUST_LESS_THAN_EQUAL_C822ECBE = "密码长度必须小于等于 "; + public static final String EXCEPTION_PASSWORD_CAN_ONLY_CONTAIN_LETTERS_NUMBERS_D84EE152 = "密码只能包含字母、数字或 !@#$%^*()_+-="; + public static final String EXCEPTION_ILLEGAL_SERIESPATH_ARG_SERIESPATH_SHOULD_START_ARG_FB9E3C07 = "非法 seriesPath %s,seriesPath 应以 \"%s\" 开头"; + public static final String EXCEPTION_ILLEGAL_PATTERN_PATH_ARG_ONLY_PATTERN_PATH_END_SUPPORTED_16CBB77D = "非法 pattern path:%s,仅支持以 ** 结尾的 pattern path。"; + public static final String EXCEPTION_ILLEGAL_PATTERN_PATH_ARG_ONLY_PATTERN_PATH_END_WILDCARDS_SUPPORTED_7183A896 = "非法 pattern path:%s,仅支持以通配符结尾的 pattern path。"; + public static final String EXCEPTION_NO_SUCH_PRIVILEGE_62644205 = "无此权限 "; + public static final String MESSAGE_EXECUTED_SUCCESSFULLY_1EAF1169 = "执行成功。"; + public static final String MESSAGE_REQUEST_TIMED_OUT_FD587FC4 = "请求超时。"; + public static final String MESSAGE_INCOMPATIBLE_VERSION_0C5CB2AF = "版本不兼容。"; + public static final String MESSAGE_FAILED_REMOVING_DATANODE_B4B7F050 = "移除 DataNode 失败。"; + public static final String MESSAGE_ALIAS_ALREADY_EXISTS_C05A2E5A = "别名已存在。"; + public static final String MESSAGE_PATH_ALREADY_EXIST_56F8BFF9 = "路径 已存在."; + public static final String MESSAGE_PATH_DOES_NOT_EXIST_93310498 = "路径 不存在."; + public static final String MESSAGE_MEET_ERROR_DEALING_METADATA_1C4A38B9 = "处理元数据时发生错误。"; + public static final String MESSAGE_INSERTION_TIME_LESS_THAN_TTL_TIME_BOUND_0F1BB861 = "插入时间小于 TTL 时间边界。"; + public static final String MESSAGE_MEET_ERROR_MERGING_28424A77 = "合并时发生错误。"; + public static final String MESSAGE_MEET_ERROR_DISPATCHING_73E4FD5E = "分发时发生错误。"; + public static final String MESSAGE_DATABASE_PROCESSOR_RELATED_ERROR_C58690B1 = "数据库处理器相关错误。"; + public static final String MESSAGE_STORAGE_ENGINE_RELATED_ERROR_94DEBBCF = "存储引擎相关错误。"; + public static final String MESSAGE_TSFILE_PROCESSOR_RELATED_ERROR_B6C57C3E = "TsFile 处理器相关错误。"; + public static final String MESSAGE_ILLEGAL_PATH_020B26BC = "非法路径。"; + public static final String MESSAGE_MEET_ERROR_LOADING_FILE_A90EBC21 = "加载文件时发生错误。"; + public static final String MESSAGE_EXECUTE_STATEMENT_ERROR_54E4A395 = "执行语句错误。"; + public static final String MESSAGE_MEET_ERROR_PARSING_SQL_3C5A3B80 = "解析 SQL 时发生错误。"; + public static final String MESSAGE_MEET_ERROR_GENERATING_TIME_ZONE_94E03CA3 = "生成时区时发生错误。"; + public static final String MESSAGE_MEET_ERROR_SETTING_TIME_ZONE_CBE88DCF = "设置时区时发生错误。"; + public static final String MESSAGE_QUERY_STATEMENTS_NOT_ALLOWED_ERROR_58D30C99 = "不允许执行查询语句。"; + public static final String MESSAGE_LOGICAL_OPERATOR_RELATED_ERROR_D94D5972 = "逻辑运算符相关错误。"; + public static final String MESSAGE_LOGICAL_OPTIMIZE_RELATED_ERROR_36D63CB3 = "逻辑优化相关错误。"; + public static final String MESSAGE_UNSUPPORTED_FILL_TYPE_RELATED_ERROR_67BE2CF2 = "不支持的填充类型相关错误。"; + public static final String MESSAGE_QUERY_PROCESS_RELATED_ERROR_93FA1016 = "查询处理相关错误。"; + public static final String MESSAGE_WRITING_DATA_RELATED_ERROR_0CA06C4D = "写入数据相关错误。"; + public static final String MESSAGE_INTERNAL_SERVER_ERROR_12F61DF7 = "内部服务器错误。"; + public static final String MESSAGE_MEET_ERROR_CLOSE_OPERATION_1C7D0589 = "关闭操作中发生错误。"; + public static final String MESSAGE_FAIL_DO_NON_QUERY_OPERATIONS_BECAUSE_SYSTEM_READ_ONLY_10CA1ED2 = "系统只读,无法执行非查询操作。"; + public static final String MESSAGE_DISK_SPACE_INSUFFICIENT_DF6205B0 = "磁盘空间不足。"; + public static final String MESSAGE_MEET_ERROR_STARTING_UP_22A4CBFE = "启动时发生错误。"; + public static final String MESSAGE_USERNAME_PASSWORD_WRONG_C44C4AF0 = "用户名或密码错误。"; + public static final String MESSAGE_HAS_NOT_LOGGED_A2BA0267 = "尚未登录。"; + public static final String MESSAGE_NO_PERMISSIONS_OPERATION_PLEASE_ADD_PRIVILEGE_64047D1E = "没有此操作的权限,请添加权限。"; + public static final String MESSAGE_FAILED_INIT_AUTHORIZER_1E2B017E = "初始化授权器失败。"; + public static final String MESSAGE_UNSUPPORTED_OPERATION_295CDB21 = "不支持的操作。"; + public static final String MESSAGE_NODE_CANNOT_REACHED_D3FD04A8 = "节点无法访问。"; + public static final String LOG_ARG_ABOVE_WARNING_THRESHOLD_NOT_ACCESSIBLE_FREE_SPACE_ARG_TOTAL_87DAD16A = "{} 超过警告阈值或不可访问,可用空间 {},总空间 {}"; + public static final String EXCEPTION_VALUE_IS_NULL_192F6BFF = "value 不能为空"; + public static final String LOG_ARG_COLON_ARG_DCE519A1 = "{}: {}"; + public static final String EMPTY_MESSAGE = ""; + } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/StepTracker.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/StepTracker.java index 98ca5a4aab921..31067d204a76b 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/StepTracker.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/StepTracker.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons; +import org.apache.iotdb.commons.i18n.CommonMessages; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -56,7 +58,7 @@ public void tryPrint() { if (invokeCount % printRate == 0) { logger.info( String.format( - "step metrics [%d]-[%s] - Total: %d, SUM: %.2fms, AVG: %fms, Last%dAVG: %fms", + CommonMessages.LOG_STEP_METRICS_ARG_ARG_TOTAL_ARG_SUM_2FMS_AVG_ARG_87491AB0, Thread.currentThread().getId(), stepName, invokeCount, diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/client/ClientManager.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/client/ClientManager.java index 6fc6e7ff26932..147f3375683d0 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/client/ClientManager.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/client/ClientManager.java @@ -75,8 +75,8 @@ public void returnClient(K node, V client) { } else if (client instanceof ThriftClient) { ((ThriftClient) client).invalidateAll(); LOGGER.warn( - "Return client {} to pool failed because the node is null. " - + "This may cause resource leak, please check your code.", + ClientMessages.LOG_RETURN_CLIENT_ARG_POOL_FAILED_BECAUSE_NODE_NULL_81511014 + + ClientMessages.LOG_MAY_CAUSE_RESOURCE_LEAK_PLEASE_CHECK_YOUR_CODE_DD730191, client); } } @@ -99,8 +99,8 @@ public void returnClient(K node, V client, Function ignoreEr } else if (client instanceof ThriftClient) { ((ThriftClient) client).invalidateAll(); LOGGER.warn( - "Return client {} to pool failed because the node is null. " - + "This may cause resource leak, please check your code.", + ClientMessages.LOG_RETURN_CLIENT_ARG_POOL_FAILED_BECAUSE_NODE_NULL_81511014 + + ClientMessages.LOG_MAY_CAUSE_RESOURCE_LEAK_PLEASE_CHECK_YOUR_CODE_DD730191, client); } } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/client/async/AsyncConfigNodeInternalServiceClient.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/client/async/AsyncConfigNodeInternalServiceClient.java index 26aa3c80b0b16..134dd46d892ee 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/client/async/AsyncConfigNodeInternalServiceClient.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/client/async/AsyncConfigNodeInternalServiceClient.java @@ -125,10 +125,7 @@ private void returnSelf() { */ public synchronized void setTimeoutTemporarily(long timeout) { if (originalTimeout != -1) { - logger.warn( - "This client's timeout has been set to {}. If you need to set it to {}, please call the recoverTimeout() first.", - originalTimeout, - timeout); + logger.warn(ClientMessages.TIMEOUT_ALREADY_SET, originalTimeout, timeout); } originalTimeout = getTimeout(); setTimeout(timeout); diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/client/async/AsyncDataNodeInternalServiceClient.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/client/async/AsyncDataNodeInternalServiceClient.java index 5f6aa0a6bb4e0..fe90f2af10c19 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/client/async/AsyncDataNodeInternalServiceClient.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/client/async/AsyncDataNodeInternalServiceClient.java @@ -137,10 +137,7 @@ private void returnSelf() { */ public synchronized void setTimeoutTemporarily(long timeout) { if (originalTimeout != -1) { - logger.warn( - "This client's timeout has been set to {}. If you need to set it to {}, please call the recoverTimeout() first.", - originalTimeout, - timeout); + logger.warn(ClientMessages.TIMEOUT_ALREADY_SET, originalTimeout, timeout); } originalTimeout = getTimeout(); setTimeout(timeout); diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/client/request/AsyncRequestManager.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/client/request/AsyncRequestManager.java index 1f147070acb90..b0d96f8d00907 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/client/request/AsyncRequestManager.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/client/request/AsyncRequestManager.java @@ -185,9 +185,10 @@ protected void sendAsyncRequest( try { if (!actionMap.containsKey(requestContext.getRequestType())) { throw new UnsupportedOperationException( - "unsupported request type " + ClientMessages.EXCEPTION_UNSUPPORTED_REQUEST_TYPE_2030CDC7 + requestContext.getRequestType() - + ", please set it in AsyncRequestManager::initActionMapBuilder()"); + + ClientMessages + .EXCEPTION_PLEASE_SET_IT_ASYNCREQUESTMANAGER_INITACTIONMAPBUILDER_0F039A93); } client = clientManager.borrowClient(endPoint); adjustClientTimeoutIfNecessary(requestContext.getRequestType(), client); diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/client/sync/SyncThriftClientWithErrorHandler.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/client/sync/SyncThriftClientWithErrorHandler.java index 06097c9c82172..f85d1421547f5 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/client/sync/SyncThriftClientWithErrorHandler.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/client/sync/SyncThriftClientWithErrorHandler.java @@ -20,6 +20,7 @@ package org.apache.iotdb.commons.client.sync; import org.apache.iotdb.commons.client.ThriftClient; +import org.apache.iotdb.commons.i18n.ClientMessages; import net.sf.cglib.proxy.Enhancer; import net.sf.cglib.proxy.MethodInterceptor; @@ -55,7 +56,11 @@ public Object intercept(Object o, Method method, Object[] objects, MethodProxy m } catch (Throwable t) { ThriftClient.resolveException(t, (ThriftClient) o); throw new TException( - "Error in calling method " + method.getName() + ", because: " + t.getMessage(), t); + ClientMessages.EXCEPTION_ERROR_CALLING_METHOD_C04E5A63 + + method.getName() + + ClientMessages.EXCEPTION_BECAUSE_ACD0B1C8 + + t.getMessage(), + t); } } } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/conf/CommonConfig.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/conf/CommonConfig.java index 252d00b5a4fca..6d3cc7e8ffc45 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/conf/CommonConfig.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/conf/CommonConfig.java @@ -919,7 +919,8 @@ public void setPipeDataStructureTabletSizeInBytes(int pipeDataStructureTabletSiz } this.pipeDataStructureTabletSizeInBytes = pipeDataStructureTabletSizeInBytes; logger.info( - "pipeDataStructureTabletSizeInBytes is set to {}.", pipeDataStructureTabletSizeInBytes); + ConfigMessages.LOG_PIPEDATASTRUCTURETABLETSIZEINBYTES_SET_ARG_243363B3, + pipeDataStructureTabletSizeInBytes); } public double getPipeDataStructureTabletMemoryBlockAllocationRejectThreshold() { @@ -935,7 +936,8 @@ public void setPipeDataStructureTabletMemoryBlockAllocationRejectThreshold( this.pipeDataStructureTabletMemoryBlockAllocationRejectThreshold = pipeDataStructureTabletMemoryBlockAllocationRejectThreshold; logger.info( - "pipeDataStructureTabletMemoryBlockAllocationRejectThreshold is set to {}.", + ConfigMessages + .LOG_PIPEDATASTRUCTURETABLETMEMORYBLOCKALLOCATIONREJECTTHRESHOLD_SET_ARG_EF34614A, pipeDataStructureTabletMemoryBlockAllocationRejectThreshold); } @@ -952,7 +954,8 @@ public void setPipeDataStructureTsFileMemoryBlockAllocationRejectThreshold( this.pipeDataStructureTsFileMemoryBlockAllocationRejectThreshold = pipeDataStructureTsFileMemoryBlockAllocationRejectThreshold; logger.info( - "pipeDataStructureTsFileMemoryBlockAllocationRejectThreshold is set to {}.", + ConfigMessages + .LOG_PIPEDATASTRUCTURETSFILEMEMORYBLOCKALLOCATIONREJECTTHRESHOLD_SET_ARG_309A7E12, pipeDataStructureTsFileMemoryBlockAllocationRejectThreshold); } @@ -1070,7 +1073,8 @@ public void setPipeTotalFloatingMemoryProportion(double pipeTotalFloatingMemoryP } this.pipeTotalFloatingMemoryProportion = pipeTotalFloatingMemoryProportion; logger.info( - "pipeTotalFloatingMemoryProportion is set to {}.", pipeTotalFloatingMemoryProportion); + ConfigMessages.LOG_PIPETOTALFLOATINGMEMORYPROPORTION_SET_ARG_FDCA8082, + pipeTotalFloatingMemoryProportion); } public int getPipeSourceAssignerDisruptorRingBufferSize() { @@ -1085,7 +1089,7 @@ public void setPipeSourceAssignerDisruptorRingBufferSize( } this.pipeSourceAssignerDisruptorRingBufferSize = pipeSourceAssignerDisruptorRingBufferSize; logger.info( - "pipeSourceAssignerDisruptorRingBufferSize is set to {}.", + ConfigMessages.LOG_PIPESOURCEASSIGNERDISRUPTORRINGBUFFERSIZE_SET_ARG_31C9A8D8, pipeSourceAssignerDisruptorRingBufferSize); } @@ -1102,7 +1106,7 @@ public void setPipeSourceAssignerDisruptorRingBufferEntrySizeInBytes( this.pipeSourceAssignerDisruptorRingBufferEntrySizeInBytes = pipeSourceAssignerDisruptorRingBufferEntrySize; logger.info( - "pipeSourceAssignerDisruptorRingBufferEntrySize is set to {}.", + ConfigMessages.LOG_PIPESOURCEASSIGNERDISRUPTORRINGBUFFERENTRYSIZE_SET_ARG_95D31172, pipeSourceAssignerDisruptorRingBufferEntrySize); } @@ -1120,7 +1124,8 @@ public void setPipeSinkHandshakeTimeoutMs(long pipeSinkHandshakeTimeoutMs) { } finally { if (fPipeSinkHandshakeTimeoutMs != this.pipeSinkHandshakeTimeoutMs) { logger.info( - "pipeConnectorHandshakeTimeoutMs is set to {}.", this.pipeSinkHandshakeTimeoutMs); + ConfigMessages.LOG_PIPECONNECTORHANDSHAKETIMEOUTMS_SET_ARG_64890ED2, + this.pipeSinkHandshakeTimeoutMs); } } } @@ -1139,7 +1144,8 @@ public void setPipeAirGapSinkTabletTimeoutMs(long pipeAirGapSinkTabletTimeoutMs) } finally { if (fPipeAirGapSinkTabletTimeoutMs != this.pipeAirGapSinkTabletTimeoutMs) { logger.info( - "pipeAirGapSinkTabletTimeoutMs is set to {}.", this.pipeAirGapSinkTabletTimeoutMs); + ConfigMessages.LOG_PIPEAIRGAPSINKTABLETTIMEOUTMS_SET_ARG_3413AC05, + this.pipeAirGapSinkTabletTimeoutMs); } } } @@ -1189,7 +1195,7 @@ public void setIsPipeSinkReadFileBufferMemoryControlEnabled( this.isPipeSinkReadFileBufferMemoryControlEnabled = isPipeSinkReadFileBufferMemoryControlEnabled; logger.info( - "isPipeSinkReadFileBufferMemoryControlEnabled is set to {}.", + ConfigMessages.LOG_ISPIPESINKREADFILEBUFFERMEMORYCONTROLENABLED_SET_ARG_138BB142, isPipeSinkReadFileBufferMemoryControlEnabled); } @@ -1199,7 +1205,8 @@ public void setPipeSinkRPCThriftCompressionEnabled(boolean pipeSinkRPCThriftComp } this.pipeSinkRPCThriftCompressionEnabled = pipeSinkRPCThriftCompressionEnabled; logger.info( - "pipeSinkRPCThriftCompressionEnabled is set to {}.", pipeSinkRPCThriftCompressionEnabled); + ConfigMessages.LOG_PIPESINKRPCTHRIFTCOMPRESSIONENABLED_SET_ARG_1F2B6AB4, + pipeSinkRPCThriftCompressionEnabled); } public boolean isPipeSinkRPCThriftCompressionEnabled() { @@ -1215,7 +1222,7 @@ public void setPipeAsyncSinkForcedRetryTsFileEventQueueSize( this.pipeAsyncSinkForcedRetryTsFileEventQueueSize = pipeAsyncSinkForcedRetryTsFileEventQueueSize; logger.info( - "pipeAsyncSinkForcedRetryTsFileEventQueueSize is set to {}.", + ConfigMessages.LOG_PIPEASYNCSINKFORCEDRETRYTSFILEEVENTQUEUESIZE_SET_ARG_0BB1C280, pipeAsyncSinkForcedRetryTsFileEventQueueSize); } @@ -1232,7 +1239,7 @@ public void setPipeAsyncSinkForcedRetryTabletEventQueueSize( this.pipeAsyncSinkForcedRetryTabletEventQueueSize = pipeAsyncSinkForcedRetryTabletEventQueueSize; logger.info( - "pipeAsyncSinkForcedRetryTabletEventQueueSize is set to {}.", + ConfigMessages.LOG_PIPEASYNCSINKFORCEDRETRYTABLETEVENTQUEUESIZE_SET_ARG_8FDA7023, pipeAsyncSinkForcedRetryTabletEventQueueSize); } @@ -1248,7 +1255,7 @@ public void setPipeAsyncSinkForcedRetryTotalEventQueueSize( } this.pipeAsyncSinkForcedRetryTotalEventQueueSize = pipeAsyncSinkForcedRetryTotalEventQueueSize; logger.info( - "pipeAsyncSinkForcedRetryTotalEventQueueSize is set to {}.", + ConfigMessages.LOG_PIPEASYNCSINKFORCEDRETRYTOTALEVENTQUEUESIZE_SET_ARG_92D6EACB, pipeAsyncSinkForcedRetryTotalEventQueueSize); } @@ -1264,7 +1271,7 @@ public void setPipeAsyncSinkMaxRetryExecutionTimeMsPerCall( } this.pipeAsyncSinkMaxRetryExecutionTimeMsPerCall = pipeAsyncSinkMaxRetryExecutionTimeMsPerCall; logger.info( - "pipeAsyncSinkMaxRetryExecutionTimeMsPerCall is set to {}.", + ConfigMessages.LOG_PIPEASYNCSINKMAXRETRYEXECUTIONTIMEMSPERCALL_SET_ARG_77E7B216, pipeAsyncSinkMaxRetryExecutionTimeMsPerCall); } @@ -1279,7 +1286,8 @@ public int getPipeAsyncSinkSelectorNumber() { public void setPipeAsyncSinkSelectorNumber(int pipeAsyncSinkSelectorNumber) { if (pipeAsyncSinkSelectorNumber <= 0) { logger.info( - "pipeAsyncSinkSelectorNumber should be greater than 0, configuring it not to change."); + ConfigMessages + .LOG_PIPEASYNCSINKSELECTORNUMBER_SHOULD_GREATER_THAN_0_CONFIGURING_IT_NOT_CHANGE_EEB9793C); return; } pipeAsyncSinkSelectorNumber = Math.max(4, pipeAsyncSinkSelectorNumber); @@ -1298,7 +1306,8 @@ public int getPipeAsyncSinkMaxClientNumber() { public void setPipeAsyncSinkMaxClientNumber(int pipeAsyncSinkMaxClientNumber) { if (pipeAsyncSinkMaxClientNumber <= 0) { logger.info( - " pipeAsyncSinkMaxClientNumber should be greater than 0, configuring it not to change."); + ConfigMessages + .LOG_PIPEASYNCSINKMAXCLIENTNUMBER_SHOULD_GREATER_THAN_0_CONFIGURING_IT_NOT_CHANGE_11EF47BF); return; } pipeAsyncSinkMaxClientNumber = Math.max(32, pipeAsyncSinkMaxClientNumber); @@ -1317,7 +1326,8 @@ public int getPipeAsyncSinkMaxTsFileClientNumber() { public void setPipeAsyncSinkMaxTsFileClientNumber(int pipeAsyncSinkMaxTsFileClientNumber) { if (pipeAsyncSinkMaxTsFileClientNumber <= 0) { logger.info( - "pipeAsyncSinkMaxTsFileClientNumber should be greater than 0, configuring it not to change."); + ConfigMessages + .LOG_PIPEASYNCSINKMAXTSFILECLIENTNUMBER_SHOULD_GREATER_THAN_0_CONFIGURING_IT_NOT_CHANGE_AC812FE2); return; } pipeAsyncSinkMaxTsFileClientNumber = Math.max(16, pipeAsyncSinkMaxTsFileClientNumber); @@ -1326,7 +1336,8 @@ public void setPipeAsyncSinkMaxTsFileClientNumber(int pipeAsyncSinkMaxTsFileClie } this.pipeAsyncSinkMaxTsFileClientNumber = pipeAsyncSinkMaxTsFileClientNumber; logger.info( - "pipeAsyncSinkMaxTsFileClientNumber is set to {}.", pipeAsyncSinkMaxTsFileClientNumber); + ConfigMessages.LOG_PIPEASYNCSINKMAXTSFILECLIENTNUMBER_SET_ARG_7D83FCDE, + pipeAsyncSinkMaxTsFileClientNumber); } public boolean isPrintLogWhenEncounterException() { @@ -1372,7 +1383,7 @@ public void setPipeHeartbeatIntervalSecondsForCollectingPipeMeta( this.pipeHeartbeatIntervalSecondsForCollectingPipeMeta = pipeHeartbeatIntervalSecondsForCollectingPipeMeta; logger.info( - "pipeHeartbeatIntervalSecondsForCollectingPipeMeta is set to {}.", + ConfigMessages.LOG_PIPEHEARTBEATINTERVALSECONDSFORCOLLECTINGPIPEMETA_SET_ARG_E171AAAD, pipeHeartbeatIntervalSecondsForCollectingPipeMeta); } @@ -1386,7 +1397,7 @@ public void setPipeMetaSyncerInitialSyncDelayMinutes(long pipeMetaSyncerInitialS } this.pipeMetaSyncerInitialSyncDelayMinutes = pipeMetaSyncerInitialSyncDelayMinutes; logger.info( - "pipeMetaSyncerInitialSyncDelayMinutes is set to {}.", + ConfigMessages.LOG_PIPEMETASYNCERINITIALSYNCDELAYMINUTES_SET_ARG_6E36A895, pipeMetaSyncerInitialSyncDelayMinutes); } @@ -1400,7 +1411,8 @@ public void setPipeMetaSyncerSyncIntervalMinutes(long pipeMetaSyncerSyncInterval } this.pipeMetaSyncerSyncIntervalMinutes = pipeMetaSyncerSyncIntervalMinutes; logger.info( - "pipeMetaSyncerSyncIntervalMinutes is set to {}.", pipeMetaSyncerSyncIntervalMinutes); + ConfigMessages.LOG_PIPEMETASYNCERSYNCINTERVALMINUTES_SET_ARG_CFBACD71, + pipeMetaSyncerSyncIntervalMinutes); } public long getPipeMetaSyncerAutoRestartPipeCheckIntervalRound() { @@ -1416,7 +1428,7 @@ public void setPipeMetaSyncerAutoRestartPipeCheckIntervalRound( this.pipeMetaSyncerAutoRestartPipeCheckIntervalRound = pipeMetaSyncerAutoRestartPipeCheckIntervalRound; logger.info( - "pipeMetaSyncerAutoRestartPipeCheckIntervalRound is set to {}.", + ConfigMessages.LOG_PIPEMETASYNCERAUTORESTARTPIPECHECKINTERVALROUND_SET_ARG_A80B4589, pipeMetaSyncerAutoRestartPipeCheckIntervalRound); } @@ -1455,7 +1467,7 @@ public void setPipeSinkRetryLocallyForConnectionError( } this.pipeSinkRetryLocallyForConnectionError = pipeSinkRetryLocallyForConnectionError; logger.info( - "pipeSinkRetryLocallyForConnectionError is set to {}", + ConfigMessages.LOG_PIPESINKRETRYLOCALLYFORCONNECTIONERROR_SET_ARG_5D886CE6, pipeSinkRetryLocallyForConnectionError); } @@ -1472,7 +1484,8 @@ public void setPipeSubtaskExecutorBasicCheckPointIntervalByConsumedEventCount( this.pipeSubtaskExecutorBasicCheckPointIntervalByConsumedEventCount = pipeSubtaskExecutorBasicCheckPointIntervalByConsumedEventCount; logger.info( - "pipeSubtaskExecutorBasicCheckPointIntervalByConsumedEventCount is set to {}", + ConfigMessages + .LOG_PIPESUBTASKEXECUTORBASICCHECKPOINTINTERVALBYCONSUMEDEVENTCOUNT_SET_ARG_CFCECFCE, pipeSubtaskExecutorBasicCheckPointIntervalByConsumedEventCount); } @@ -1489,7 +1502,8 @@ public void setPipeSubtaskExecutorBasicCheckPointIntervalByTimeDuration( this.pipeSubtaskExecutorBasicCheckPointIntervalByTimeDuration = pipeSubtaskExecutorBasicCheckPointIntervalByTimeDuration; logger.info( - "pipeSubtaskExecutorBasicCheckPointIntervalByTimeDuration is set to {}", + ConfigMessages + .LOG_PIPESUBTASKEXECUTORBASICCHECKPOINTINTERVALBYTIMEDURATION_SET_ARG_45B3F433, pipeSubtaskExecutorBasicCheckPointIntervalByTimeDuration); } @@ -1500,7 +1514,8 @@ public int getPipeSubtaskExecutorMaxThreadNum() { public void setPipeSubtaskExecutorMaxThreadNum(int pipeSubtaskExecutorMaxThreadNum) { if (pipeSubtaskExecutorMaxThreadNum <= 0) { logger.info( - "pipeSubtaskExecutorMaxThreadNum should be greater than 0, configuring it not to change."); + ConfigMessages + .LOG_PIPESUBTASKEXECUTORMAXTHREADNUM_SHOULD_GREATER_THAN_0_CONFIGURING_IT_NOT_CHANGE_25E0CE6E); return; } pipeSubtaskExecutorMaxThreadNum = Math.max(5, pipeSubtaskExecutorMaxThreadNum); @@ -1526,7 +1541,8 @@ public void setPipeRetryLocallyForParallelOrUserConflict( } this.pipeRetryLocallyForParallelOrUserConflict = pipeRetryLocallyForParallelOrUserConflict; logger.info( - "pipeRetryLocallyForParallelOrUserConflict is set to {}.", pipeSubtaskExecutorMaxThreadNum); + ConfigMessages.LOG_PIPERETRYLOCALLYFORPARALLELORUSERCONFLICT_SET_ARG_368926E5, + pipeSubtaskExecutorMaxThreadNum); } public long getPipeSinkSubtaskSleepIntervalInitMs() { @@ -1539,7 +1555,8 @@ public void setPipeSinkSubtaskSleepIntervalInitMs(long pipeSinkSubtaskSleepInter } this.pipeSinkSubtaskSleepIntervalInitMs = pipeSinkSubtaskSleepIntervalInitMs; logger.info( - "pipeSinkSubtaskSleepIntervalInitMs is set to {}.", pipeSinkSubtaskSleepIntervalInitMs); + ConfigMessages.LOG_PIPESINKSUBTASKSLEEPINTERVALINITMS_SET_ARG_B8DCF143, + pipeSinkSubtaskSleepIntervalInitMs); } public long getPipeSinkSubtaskSleepIntervalMaxMs() { @@ -1552,7 +1569,8 @@ public void setPipeSinkSubtaskSleepIntervalMaxMs(long pipeSinkSubtaskSleepInterv } this.pipeSinkSubtaskSleepIntervalMaxMs = pipeSinkSubtaskSleepIntervalMaxMs; logger.info( - "pipeSinkSubtaskSleepIntervalMaxMs is set to {}.", pipeSinkSubtaskSleepIntervalMaxMs); + ConfigMessages.LOG_PIPESINKSUBTASKSLEEPINTERVALMAXMS_SET_ARG_0010425D, + pipeSinkSubtaskSleepIntervalMaxMs); } public long getPipeSubtaskExecutorPendingQueueMaxBlockingTimeMs() { @@ -1568,7 +1586,7 @@ public void setPipeSubtaskExecutorPendingQueueMaxBlockingTimeMs( this.pipeSubtaskExecutorPendingQueueMaxBlockingTimeMs = pipeSubtaskExecutorPendingQueueMaxBlockingTimeMs; logger.info( - "pipeSubtaskExecutorPendingQueueMaxBlockingTimeMs is set to {}", + ConfigMessages.LOG_PIPESUBTASKEXECUTORPENDINGQUEUEMAXBLOCKINGTIMEMS_SET_ARG_2F1A6865, pipeSubtaskExecutorPendingQueueMaxBlockingTimeMs); } @@ -1585,7 +1603,7 @@ public void setPipeSubtaskExecutorCronHeartbeatEventIntervalSeconds( this.pipeSubtaskExecutorCronHeartbeatEventIntervalSeconds = pipeSubtaskExecutorCronHeartbeatEventIntervalSeconds; logger.info( - "pipeSubtaskExecutorCronHeartbeatEventIntervalSeconds is set to {}.", + ConfigMessages.LOG_PIPESUBTASKEXECUTORCRONHEARTBEATEVENTINTERVALSECONDS_SET_ARG_B5C9E195, pipeSubtaskExecutorCronHeartbeatEventIntervalSeconds); } @@ -1629,7 +1647,7 @@ public void setPipeRealTimeQueuePollHistoricalTsFileThreshold( this.pipeRealTimeQueuePollHistoricalTsFileThreshold = pipeRealTimeQueuePollHistoricalTsFileThreshold; logger.info( - "pipeRealTimeQueuePollHistoricalTsFileThreshold is set to {}", + ConfigMessages.LOG_PIPEREALTIMEQUEUEPOLLHISTORICALTSFILETHRESHOLD_SET_ARG_FD88A384, pipeRealTimeQueuePollHistoricalTsFileThreshold); } @@ -1643,7 +1661,7 @@ public void setPipeRealTimeQueueMaxWaitingTsFileSize(int pipeRealTimeQueueMaxWai } this.pipeRealTimeQueueMaxWaitingTsFileSize = pipeRealTimeQueueMaxWaitingTsFileSize; logger.info( - "pipeRealTimeQueueMaxWaitingTsFileSize is set to {}.", + ConfigMessages.LOG_PIPEREALTIMEQUEUEMAXWAITINGTSFILESIZE_SET_ARG_7E0698AB, pipeRealTimeQueueMaxWaitingTsFileSize); } @@ -1657,7 +1675,8 @@ public void setPipeRealtimeForceDowngradingEnabled(boolean pipeRealtimeForceDown } this.pipeRealtimeForceDowngradingEnabled = pipeRealtimeForceDowngradingEnabled; logger.info( - "pipeRealtimeForceDowngradingTime is set to {}.", pipeRealtimeForceDowngradingEnabled); + ConfigMessages.LOG_PIPEREALTIMEFORCEDOWNGRADINGTIME_SET_ARG_98A0F8AE, + pipeRealtimeForceDowngradingEnabled); } public double getPipeRealtimeForceDowngradingProportion() { @@ -1671,7 +1690,7 @@ public void setPipeRealtimeForceDowngradingProportion( } this.pipeRealtimeForceDowngradingProportion = pipeRealtimeForceDowngradingProportion; logger.info( - "pipeRealtimeForceDowngradingProportion is set to {}.", + ConfigMessages.LOG_PIPEREALTIMEFORCEDOWNGRADINGPROPORTION_SET_ARG_92974D0B, pipeRealtimeForceDowngradingProportion); } @@ -1741,7 +1760,7 @@ public void setPipeReceiverLoginPeriodicVerificationIntervalMs( this.pipeReceiverLoginPeriodicVerificationIntervalMs = pipeReceiverLoginPeriodicVerificationIntervalMs; logger.info( - "pipeReceiverLoginPeriodicVerificationIntervalMs is set to {}", + ConfigMessages.LOG_PIPERECEIVERLOGINPERIODICVERIFICATIONINTERVALMS_SET_ARG_158C791C, pipeReceiverLoginPeriodicVerificationIntervalMs); } @@ -1756,7 +1775,7 @@ public void setPipeReceiverActualToEstimatedMemoryRatio( } this.pipeReceiverActualToEstimatedMemoryRatio = pipeReceiverActualToEstimatedMemoryRatio; logger.info( - "pipeReceiverActualToEstimatedMemoryRatio is set to {}", + ConfigMessages.LOG_PIPERECEIVERACTUALTOESTIMATEDMEMORYRATIO_SET_ARG_0D1F305D, pipeReceiverActualToEstimatedMemoryRatio); } @@ -1772,7 +1791,7 @@ public void setPipeReceiverReqDecompressedMaxLengthInBytes( } this.pipeReceiverReqDecompressedMaxLengthInBytes = pipeReceiverReqDecompressedMaxLengthInBytes; logger.info( - "pipeReceiverReqDecompressedMaxLengthInBytes is set to {}.", + ConfigMessages.LOG_PIPERECEIVERREQDECOMPRESSEDMAXLENGTHINBYTES_SET_ARG_9356E410, pipeReceiverReqDecompressedMaxLengthInBytes); } @@ -1780,7 +1799,8 @@ public void setPipeAirGapReceiverMaxPayloadSizeInBytes( int pipeAirGapReceiverMaxPayloadSizeInBytes) { if (pipeAirGapReceiverMaxPayloadSizeInBytes <= 0) { logger.info( - "Ignore invalid pipeAirGapReceiverMaxPayloadSizeInBytes {}, because it must be greater than 0.", + ConfigMessages + .LOG_IGNORE_INVALID_PIPEAIRGAPRECEIVERMAXPAYLOADSIZEINBYTES_ARG_BECAUSE_IT_MUST_GREATER_THAN_0_8ACA836C, pipeAirGapReceiverMaxPayloadSizeInBytes); return; } @@ -1789,7 +1809,7 @@ public void setPipeAirGapReceiverMaxPayloadSizeInBytes( } this.pipeAirGapReceiverMaxPayloadSizeInBytes = pipeAirGapReceiverMaxPayloadSizeInBytes; logger.info( - "pipeAirGapReceiverMaxPayloadSizeInBytes is set to {}.", + ConfigMessages.LOG_PIPEAIRGAPRECEIVERMAXPAYLOADSIZEINBYTES_SET_ARG_9B21877F, pipeAirGapReceiverMaxPayloadSizeInBytes); } @@ -1818,7 +1838,8 @@ public void setPipePeriodicalLogMinIntervalSeconds(long pipePeriodicalLogMinInte } this.pipePeriodicalLogMinIntervalSeconds = pipePeriodicalLogMinIntervalSeconds; logger.info( - "pipePeriodicalLogMinIntervalSeconds is set to {}.", pipePeriodicalLogMinIntervalSeconds); + ConfigMessages.LOG_PIPEPERIODICALLOGMININTERVALSECONDS_SET_ARG_5535C79E, + pipePeriodicalLogMinIntervalSeconds); } public long getPipeLoggerCacheMaxSizeInBytes() { @@ -1869,7 +1890,8 @@ public void setPipeMetaReportMaxLogIntervalRounds(int pipeMetaReportMaxLogInterv } this.pipeMetaReportMaxLogIntervalRounds = pipeMetaReportMaxLogIntervalRounds; logger.info( - "pipeMetaReportMaxLogIntervalRounds is set to {}", pipeMetaReportMaxLogIntervalRounds); + ConfigMessages.LOG_PIPEMETAREPORTMAXLOGINTERVALROUNDS_SET_ARG_0090AECB, + pipeMetaReportMaxLogIntervalRounds); } public int getPipeTsFilePinMaxLogNumPerRound() { @@ -1897,7 +1919,8 @@ public void setPipeTsFilePinMaxLogIntervalRounds(int pipeTsFilePinMaxLogInterval } this.pipeTsFilePinMaxLogIntervalRounds = pipeTsFilePinMaxLogIntervalRounds; logger.info( - "pipeTsFilePinMaxLogIntervalRounds is set to {}", pipeTsFilePinMaxLogIntervalRounds); + ConfigMessages.LOG_PIPETSFILEPINMAXLOGINTERVALROUNDS_SET_ARG_FAFE1040, + pipeTsFilePinMaxLogIntervalRounds); } public boolean getPipeMemoryManagementEnabled() { @@ -1926,7 +1949,7 @@ public void setPipeMemoryAllocateForTsFileSequenceReaderInBytes( this.pipeMemoryAllocateForTsFileSequenceReaderInBytes = pipeMemoryAllocateForTsFileSequenceReaderInBytes; logger.info( - "pipeMemoryAllocateForTsFileSequenceReaderInBytes is set to {}", + ConfigMessages.LOG_PIPEMEMORYALLOCATEFORTSFILESEQUENCEREADERINBYTES_SET_ARG_8A26960D, pipeMemoryAllocateForTsFileSequenceReaderInBytes); } @@ -1940,7 +1963,8 @@ public void setPipeMemoryExpanderIntervalSeconds(long pipeMemoryExpanderInterval } this.pipeMemoryExpanderIntervalSeconds = pipeMemoryExpanderIntervalSeconds; logger.info( - "pipeMemoryExpanderIntervalSeconds is set to {}", pipeMemoryExpanderIntervalSeconds); + ConfigMessages.LOG_PIPEMEMORYEXPANDERINTERVALSECONDS_SET_ARG_73F96BBC, + pipeMemoryExpanderIntervalSeconds); } public long getPipeCheckMemoryEnoughIntervalMs() { @@ -1981,7 +2005,8 @@ public void setPipeMemoryAllocateRetryIntervalInMs(long pipeMemoryAllocateRetryI } this.pipeMemoryAllocateRetryIntervalMs = pipeMemoryAllocateRetryIntervalMs; logger.info( - "pipeMemoryAllocateRetryIntervalMs is set to {}", pipeMemoryAllocateRetryIntervalMs); + ConfigMessages.LOG_PIPEMEMORYALLOCATERETRYINTERVALMS_SET_ARG_39D52E47, + pipeMemoryAllocateRetryIntervalMs); } public long getPipeMemoryAllocateMinSizeInBytes() { @@ -2009,7 +2034,8 @@ public void setPipeLeaderCacheMemoryUsagePercentage(float pipeLeaderCacheMemoryU } this.pipeLeaderCacheMemoryUsagePercentage = pipeLeaderCacheMemoryUsagePercentage; logger.info( - "pipeLeaderCacheMemoryUsagePercentage is set to {}", pipeLeaderCacheMemoryUsagePercentage); + ConfigMessages.LOG_PIPELEADERCACHEMEMORYUSAGEPERCENTAGE_SET_ARG_E32DE64B, + pipeLeaderCacheMemoryUsagePercentage); } public long getPipeMaxReaderChunkSize() { @@ -2036,7 +2062,7 @@ public void setPipeListeningQueueTransferSnapshotThreshold( } this.pipeListeningQueueTransferSnapshotThreshold = pipeListeningQueueTransferSnapshotThreshold; logger.info( - "pipeListeningQueueTransferSnapshotThreshold is set to {}", + ConfigMessages.LOG_PIPELISTENINGQUEUETRANSFERSNAPSHOTTHRESHOLD_SET_ARG_FD856477, pipeListeningQueueTransferSnapshotThreshold); } @@ -2050,7 +2076,8 @@ public void setPipeSnapshotExecutionMaxBatchSize(int pipeSnapshotExecutionMaxBat } this.pipeSnapshotExecutionMaxBatchSize = pipeSnapshotExecutionMaxBatchSize; logger.info( - "pipeSnapshotExecutionMaxBatchSize is set to {}", pipeSnapshotExecutionMaxBatchSize); + ConfigMessages.LOG_PIPESNAPSHOTEXECUTIONMAXBATCHSIZE_SET_ARG_F1C5C62C, + pipeSnapshotExecutionMaxBatchSize); } public long getPipeRemainingTimeCommitRateAutoSwitchSeconds() { @@ -2066,7 +2093,7 @@ public void setPipeRemainingTimeCommitRateAutoSwitchSeconds( this.pipeRemainingTimeCommitRateAutoSwitchSeconds = pipeRemainingTimeCommitRateAutoSwitchSeconds; logger.info( - "pipeRemainingTimeCommitRateAutoSwitchSeconds is set to {}", + ConfigMessages.LOG_PIPEREMAININGTIMECOMMITRATEAUTOSWITCHSECONDS_SET_ARG_17E6C979, pipeRemainingTimeCommitRateAutoSwitchSeconds); } @@ -2082,7 +2109,7 @@ public void setPipeRemainingTimeCommitRateAverageTime( } this.pipeRemainingTimeCommitRateAverageTime = pipeRemainingTimeCommitRateAverageTime; logger.info( - "pipeRemainingTimeCommitRateAverageTime is set to {}", + ConfigMessages.LOG_PIPEREMAININGTIMECOMMITRATEAVERAGETIME_SET_ARG_D010BE98, pipeRemainingTimeCommitRateAverageTime); } @@ -2098,7 +2125,8 @@ public void setPipeRemainingInsertNodeCountEMAAlpha( } this.pipeRemainingInsertNodeCountEMAAlpha = pipeRemainingInsertNodeCountEMAAlpha; logger.info( - "pipeRemainingInsertEventCountAverage is set to {}", pipeRemainingInsertNodeCountEMAAlpha); + ConfigMessages.LOG_PIPEREMAININGINSERTEVENTCOUNTAVERAGE_SET_ARG_17C28F47, + pipeRemainingInsertNodeCountEMAAlpha); } public double getPipeTsFileScanParsingThreshold() { @@ -2141,7 +2169,8 @@ public void setPipeDynamicMemoryAdjustmentThreshold(double pipeDynamicMemoryAdju } this.pipeDynamicMemoryAdjustmentThreshold = pipeDynamicMemoryAdjustmentThreshold; logger.info( - "pipeDynamicMemoryAdjustmentThreshold is set to {}", pipeDynamicMemoryAdjustmentThreshold); + ConfigMessages.LOG_PIPEDYNAMICMEMORYADJUSTMENTTHRESHOLD_SET_ARG_2F008DB1, + pipeDynamicMemoryAdjustmentThreshold); } public double getPipeThresholdAllocationStrategyMaximumMemoryIncrementRatio() { @@ -2157,7 +2186,8 @@ public void setPipeThresholdAllocationStrategyMaximumMemoryIncrementRatio( this.pipeThresholdAllocationStrategyMaximumMemoryIncrementRatio = pipeThresholdAllocationStrategyMaximumMemoryIncrementRatio; logger.info( - "pipeThresholdAllocationStrategyMaximumMemoryIncrementRatio is set to {}", + ConfigMessages + .LOG_PIPETHRESHOLDALLOCATIONSTRATEGYMAXIMUMMEMORYINCREMENTRATIO_SET_ARG_BFAD04E0, pipeThresholdAllocationStrategyMaximumMemoryIncrementRatio); } @@ -2174,7 +2204,7 @@ public void setPipeThresholdAllocationStrategyLowUsageThreshold( this.pipeThresholdAllocationStrategyLowUsageThreshold = pipeThresholdAllocationStrategyLowUsageThreshold; logger.info( - "pipeMemoryBlockLowUsageThreshold is set to {}", + ConfigMessages.LOG_PIPEMEMORYBLOCKLOWUSAGETHRESHOLD_SET_ARG_DDF99D69, pipeThresholdAllocationStrategyLowUsageThreshold); } @@ -2191,7 +2221,8 @@ public void setPipeThresholdAllocationStrategyFixedMemoryHighUsageThreshold( this.pipeThresholdAllocationStrategyFixedMemoryHighUsageThreshold = pipeThresholdAllocationStrategyFixedMemoryHighUsageThreshold; logger.info( - "pipeThresholdAllocationStrategyFixedMemoryHighUsageThreshold is set to {}", + ConfigMessages + .LOG_PIPETHRESHOLDALLOCATIONSTRATEGYFIXEDMEMORYHIGHUSAGETHRESHOLD_SET_ARG_82721CBE, pipeThresholdAllocationStrategyFixedMemoryHighUsageThreshold); } @@ -2218,7 +2249,7 @@ public void setPipeCheckAllSyncClientLiveTimeIntervalMs( } this.pipeCheckAllSyncClientLiveTimeIntervalMs = pipeCheckAllSyncClientLiveTimeIntervalMs; logger.info( - "pipeCheckSyncAllClientLiveTimeIntervalMs is set to {}", + ConfigMessages.LOG_PIPECHECKSYNCALLCLIENTLIVETIMEINTERVALMS_SET_ARG_246CE0EB, pipeCheckAllSyncClientLiveTimeIntervalMs); } @@ -2232,7 +2263,7 @@ public void setPipeTsFileResourceSegmentLockNum(int pipeTsFileResourceSegmentLoc } this.pipeTsFileResourceSegmentLockNum = pipeTsFileResourceSegmentLockNum; logger.info( - "pipeCheckSyncAllClientLiveTimeIntervalMs is set to {}", + ConfigMessages.LOG_PIPECHECKSYNCALLCLIENTLIVETIMEINTERVALMS_SET_ARG_246CE0EB, pipeCheckAllSyncClientLiveTimeIntervalMs); } @@ -2247,7 +2278,7 @@ public void setPipeSendTsFileRateLimitBytesPerSecond( } this.pipeSendTsFileRateLimitBytesPerSecond = pipeSendTsFileRateLimitBytesPerSecond; logger.info( - "pipeSendTsFileRateLimitBytesPerSecond is set to {}", + ConfigMessages.LOG_PIPESENDTSFILERATELIMITBYTESPERSECOND_SET_ARG_653F2CC4, pipeSendTsFileRateLimitBytesPerSecond); } @@ -2261,7 +2292,8 @@ public void setPipeAllSinksRateLimitBytesPerSecond(double pipeAllSinksRateLimitB } this.pipeAllSinksRateLimitBytesPerSecond = pipeAllSinksRateLimitBytesPerSecond; logger.info( - "pipeAllSinksRateLimitBytesPerSecond is set to {}", pipeAllSinksRateLimitBytesPerSecond); + ConfigMessages.LOG_PIPEALLSINKSRATELIMITBYTESPERSECOND_SET_ARG_EE3FE2A0, + pipeAllSinksRateLimitBytesPerSecond); } public int getRateLimiterHotReloadCheckIntervalMs() { @@ -2274,7 +2306,8 @@ public void setRateLimiterHotReloadCheckIntervalMs(int rateLimiterHotReloadCheck } this.rateLimiterHotReloadCheckIntervalMs = rateLimiterHotReloadCheckIntervalMs; logger.info( - "rateLimiterHotReloadCheckIntervalMs is set to {}", rateLimiterHotReloadCheckIntervalMs); + ConfigMessages.LOG_RATELIMITERHOTRELOADCHECKINTERVALMS_SET_ARG_E086A4F0, + rateLimiterHotReloadCheckIntervalMs); } public int getPipeSinkRequestSliceThresholdBytes() { @@ -2287,7 +2320,8 @@ public void setPipeSinkRequestSliceThresholdBytes(int pipeSinkRequestSliceThresh } this.pipeSinkRequestSliceThresholdBytes = pipeSinkRequestSliceThresholdBytes; logger.info( - "pipeConnectorRequestSliceThresholdBytes is set to {}", pipeSinkRequestSliceThresholdBytes); + ConfigMessages.LOG_PIPECONNECTORREQUESTSLICETHRESHOLDBYTES_SET_ARG_7FAA56F2, + pipeSinkRequestSliceThresholdBytes); } public long getTwoStageAggregateMaxCombinerLiveTimeInMs() { @@ -2301,7 +2335,7 @@ public void setTwoStageAggregateMaxCombinerLiveTimeInMs( } this.twoStageAggregateMaxCombinerLiveTimeInMs = twoStageAggregateMaxCombinerLiveTimeInMs; logger.info( - "twoStageAggregateMaxCombinerLiveTimeInMs is set to {}", + ConfigMessages.LOG_TWOSTAGEAGGREGATEMAXCOMBINERLIVETIMEINMS_SET_ARG_F10B7C02, twoStageAggregateMaxCombinerLiveTimeInMs); } @@ -2318,7 +2352,7 @@ public void setTwoStageAggregateDataRegionInfoCacheTimeInMs( this.twoStageAggregateDataRegionInfoCacheTimeInMs = twoStageAggregateDataRegionInfoCacheTimeInMs; logger.info( - "twoStageAggregateDataRegionInfoCacheTimeInMs is set to {}", + ConfigMessages.LOG_TWOSTAGEAGGREGATEDATAREGIONINFOCACHETIMEINMS_SET_ARG_C7895888, twoStageAggregateDataRegionInfoCacheTimeInMs); } @@ -2334,7 +2368,7 @@ public void setTwoStageAggregateSenderEndPointsCacheInMs( } this.twoStageAggregateSenderEndPointsCacheInMs = twoStageAggregateSenderEndPointsCacheInMs; logger.info( - "twoStageAggregateSenderEndPointsCacheInMs is set to {}", + ConfigMessages.LOG_TWOSTAGEAGGREGATESENDERENDPOINTSCACHEINMS_SET_ARG_A3CF42B2, twoStageAggregateSenderEndPointsCacheInMs); } @@ -2348,7 +2382,8 @@ public void setPipeEventReferenceTrackingEnabled(boolean pipeEventReferenceTrack } this.pipeEventReferenceTrackingEnabled = pipeEventReferenceTrackingEnabled; logger.info( - "pipeEventReferenceTrackingEnabled is set to {}", pipeEventReferenceTrackingEnabled); + ConfigMessages.LOG_PIPEEVENTREFERENCETRACKINGENABLED_SET_ARG_98E9A640, + pipeEventReferenceTrackingEnabled); } public long getPipeEventReferenceEliminateIntervalSeconds() { @@ -2363,7 +2398,7 @@ public void setPipeEventReferenceEliminateIntervalSeconds( } this.pipeEventReferenceEliminateIntervalSeconds = pipeEventReferenceEliminateIntervalSeconds; logger.info( - "pipeEventReferenceEliminateIntervalSeconds is set to {}", + ConfigMessages.LOG_PIPEEVENTREFERENCEELIMINATEINTERVALSECONDS_SET_ARG_62542387, pipeEventReferenceEliminateIntervalSeconds); } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/conf/ConfigurationFileUtils.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/conf/ConfigurationFileUtils.java index ee777a3cdf5d7..43f117e96ac02 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/conf/ConfigurationFileUtils.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/conf/ConfigurationFileUtils.java @@ -414,8 +414,8 @@ private static void acquireTargetFileLock(File file) throws IOException, Interru } logger.warn( ConfigMessages.WAITING_TO_ACQUIRE_CONFIG_FILE_LOCK - + " There may have been an unexpected interruption in the last" - + " configuration file update. Ignore temporary file {}", + + ConfigMessages.LOG_THERE_MAY_HAVE_BEEN_UNEXPECTED_INTERRUPTION_LAST_E784B008 + + ConfigMessages.LOG_CONFIGURATION_FILE_UPDATE_IGNORE_TEMPORARY_FILE_ARG_3DE7B218, totalWaitTime / 1000, file.getName()); } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/consensus/ConsensusGroupId.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/consensus/ConsensusGroupId.java index c0877a3a5527d..e76f6245f1c63 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/consensus/ConsensusGroupId.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/consensus/ConsensusGroupId.java @@ -88,7 +88,10 @@ public static ConsensusGroupId create(int type, int id) { groupId = new ConfigRegionId(id); } else { throw new IllegalArgumentException( - "Unrecognized TConsensusGroupType: " + type + " with id = " + id); + CommonMessages.EXCEPTION_UNRECOGNIZED_TCONSENSUSGROUPTYPE_9204FF8E + + type + + CommonMessages.EXCEPTION_ID_1F238F51 + + id); } return groupId; } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/consensus/index/ProgressIndexType.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/consensus/index/ProgressIndexType.java index 58548e18c4b61..13cfe27c2bef2 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/consensus/index/ProgressIndexType.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/consensus/index/ProgressIndexType.java @@ -27,6 +27,7 @@ import org.apache.iotdb.commons.consensus.index.impl.SimpleProgressIndex; import org.apache.iotdb.commons.consensus.index.impl.StateProgressIndex; import org.apache.iotdb.commons.consensus.index.impl.TimeWindowStateProgressIndex; +import org.apache.iotdb.commons.i18n.CommonMessages; import org.apache.tsfile.utils.ReadWriteIOUtils; @@ -84,7 +85,8 @@ public static ProgressIndex deserializeFrom(ByteBuffer byteBuffer) { return StateProgressIndex.deserializeFrom(byteBuffer); default: throw new UnsupportedOperationException( - String.format("Unsupported progress index type %s.", indexType)); + String.format( + CommonMessages.EXCEPTION_UNSUPPORTED_PROGRESS_INDEX_TYPE_ARG_A84CDFF9, indexType)); } } @@ -109,7 +111,8 @@ public static ProgressIndex deserializeFrom(InputStream stream) throws IOExcepti return StateProgressIndex.deserializeFrom(stream); default: throw new UnsupportedOperationException( - String.format("Unsupported progress index type %s.", indexType)); + String.format( + CommonMessages.EXCEPTION_UNSUPPORTED_PROGRESS_INDEX_TYPE_ARG_A84CDFF9, indexType)); } } } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/consensus/index/impl/TimeWindowStateProgressIndex.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/consensus/index/impl/TimeWindowStateProgressIndex.java index bb1b2c1ce5e18..d998d85e01fb8 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/consensus/index/impl/TimeWindowStateProgressIndex.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/consensus/index/impl/TimeWindowStateProgressIndex.java @@ -21,6 +21,7 @@ import org.apache.iotdb.commons.consensus.index.ProgressIndex; import org.apache.iotdb.commons.consensus.index.ProgressIndexType; +import org.apache.iotdb.commons.i18n.CommonMessages; import com.google.common.collect.ImmutableMap; import org.apache.tsfile.utils.Pair; @@ -241,7 +242,8 @@ public ProgressIndexType getType() { @Override public TotalOrderSumTuple getTotalOrderSumTuple() { throw new UnsupportedOperationException( - "TimeWindowStateProgressIndex does not support topological sorting"); + CommonMessages + .EXCEPTION_TIMEWINDOWSTATEPROGRESSINDEX_DOES_NOT_SUPPORT_TOPOLOGICAL_SORTING_897C8976); } public static TimeWindowStateProgressIndex deserializeFrom(ByteBuffer byteBuffer) { @@ -283,8 +285,11 @@ public static TimeWindowStateProgressIndex deserializeFrom(InputStream stream) if (readLen != length) { throw new IOException( String.format( - "The intended read length is %s but %s is actually read when deserializing TimeProgressIndex, ProgressIndex: %s", - length, readLen, timeWindowStateProgressIndex)); + CommonMessages + .EXCEPTION_INTENDED_READ_LENGTH_ARG_BUT_ARG_ACTUALLY_READ_DESERIALIZING_TIMEPROGRESSINDEX_63CD54E4, + length, + readLen, + timeWindowStateProgressIndex)); } final ByteBuffer dstBuffer = ByteBuffer.wrap(body); timeWindowStateProgressIndex.timeSeries2TimestampWindowBufferPairMap.put( diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/disk/strategy/SequenceStrategy.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/disk/strategy/SequenceStrategy.java index 6b0394e0768d1..089093dba8f5c 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/disk/strategy/SequenceStrategy.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/disk/strategy/SequenceStrategy.java @@ -19,6 +19,7 @@ package org.apache.iotdb.commons.disk.strategy; import org.apache.iotdb.commons.exception.DiskSpaceInsufficientException; +import org.apache.iotdb.commons.i18n.UtilMessages; import org.apache.iotdb.commons.utils.JVMCommonUtils; import org.apache.tsfile.fileSystem.FSFactoryProducer; @@ -68,7 +69,8 @@ private int tryGetNextIndex(int start) throws DiskSpaceInsufficientException { long freeSpace = dirFile.getFreeSpace(); long totalSpace = dirFile.getTotalSpace(); LOGGER.warn( - "{} is above the warning threshold, or not accessible, free space {}, total space {}", + UtilMessages + .LOG_ARG_ABOVE_WARNING_THRESHOLD_NOT_ACCESSIBLE_FREE_SPACE_ARG_TOTAL_87DAD16A, dir, freeSpace, totalSpace); diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/enums/HandleSystemErrorStrategy.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/enums/HandleSystemErrorStrategy.java index a279c84941222..b21dc8db89c3a 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/enums/HandleSystemErrorStrategy.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/enums/HandleSystemErrorStrategy.java @@ -36,12 +36,14 @@ public enum HandleSystemErrorStrategy { public void handle() { if (this == HandleSystemErrorStrategy.CHANGE_TO_READ_ONLY) { logger.error( - "Unrecoverable error occurs! Change system status to read-only because handle_system_error is CHANGE_TO_READ_ONLY. Only query statements are permitted!", + CommonMessages + .LOG_UNRECOVERABLE_ERROR_OCCURS_CHANGE_SYSTEM_STATUS_READ_ONLY_BECAUSE_HANDLE_05C9AD1A, new RuntimeException(CommonMessages.SYSTEM_READ_ONLY)); CommonDescriptor.getInstance().getConfig().setNodeStatus(NodeStatus.ReadOnly); } else if (this == HandleSystemErrorStrategy.SHUTDOWN) { logger.error( - "Unrecoverable error occurs! Shutdown system directly because handle_system_error is SHUTDOWN.", + CommonMessages + .LOG_UNRECOVERABLE_ERROR_OCCURS_SHUTDOWN_SYSTEM_DIRECTLY_BECAUSE_HANDLE_SYSTEM_ERROR_14FC06C9, new RuntimeException(CommonMessages.UNRECOVERABLE_ERROR)); System.exit(-1); } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/enums/PipeRateAverage.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/enums/PipeRateAverage.java index 1c90df1bb07c4..b7ec429924df6 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/enums/PipeRateAverage.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/enums/PipeRateAverage.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.enums; +import org.apache.iotdb.commons.i18n.CommonMessages; + import com.codahale.metrics.Meter; public enum PipeRateAverage { @@ -41,7 +43,8 @@ public double getMeterRate(final Meter meter) { case NONE: default: throw new UnsupportedOperationException( - String.format("The type %s is not supported in pipe rate average.", this)); + String.format( + CommonMessages.EXCEPTION_TYPE_ARG_NOT_SUPPORTED_PIPE_RATE_AVERAGE_F74694AD, this)); } } } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/exception/ConfigurationException.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/exception/ConfigurationException.java index b6cde39eb79a6..34e6e75a8f5fd 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/exception/ConfigurationException.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/exception/ConfigurationException.java @@ -19,6 +19,7 @@ package org.apache.iotdb.commons.exception; +import org.apache.iotdb.commons.i18n.CommonMessages; import org.apache.iotdb.commons.utils.TestOnly; import org.apache.iotdb.rpc.TSStatusCode; @@ -38,8 +39,11 @@ public ConfigurationException( String parameter, String badValue, String correctValue, String reason) { super( String.format( - "Parameter %s can not be %s, please set to: %s. Because %s", - parameter, badValue, correctValue, reason), + CommonMessages.EXCEPTION_PARAMETER_ARG_CAN_NOT_ARG_PLEASE_SET_ARG_BECAUSE_ARG_749738D1, + parameter, + badValue, + correctValue, + reason), TSStatusCode.CONFIGURATION_ERROR.getStatusCode()); this.parameter = parameter; this.correctValue = correctValue; diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/exception/DiskSpaceInsufficientException.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/exception/DiskSpaceInsufficientException.java index 20286caea068e..c832505c77cb6 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/exception/DiskSpaceInsufficientException.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/exception/DiskSpaceInsufficientException.java @@ -18,6 +18,7 @@ */ package org.apache.iotdb.commons.exception; +import org.apache.iotdb.commons.i18n.CommonMessages; import org.apache.iotdb.rpc.TSStatusCode; import java.util.List; @@ -28,7 +29,9 @@ public class DiskSpaceInsufficientException extends IoTDBException { public DiskSpaceInsufficientException(List folders) { super( - String.format("Can't get next folder from [%s], because they are all full.", folders), + String.format( + CommonMessages.EXCEPTION_CAN_T_GET_NEXT_FOLDER_ARG_BECAUSE_THEY_ALL_FULL_A105BB2D, + folders), TSStatusCode.DISK_SPACE_INSUFFICIENT.getStatusCode()); } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/exception/IllegalPrivilegeException.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/exception/IllegalPrivilegeException.java index da8a4ae7815b3..06f9a3a1a7407 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/exception/IllegalPrivilegeException.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/exception/IllegalPrivilegeException.java @@ -20,6 +20,7 @@ package org.apache.iotdb.commons.exception; import org.apache.iotdb.commons.auth.entity.PrivilegeType; +import org.apache.iotdb.commons.i18n.CommonMessages; import org.apache.iotdb.rpc.TSStatusCode; public class IllegalPrivilegeException extends MetadataException { @@ -27,12 +28,17 @@ public class IllegalPrivilegeException extends MetadataException { public IllegalPrivilegeException(Integer priv) { super( - String.format("%s is not a legal privilege", PrivilegeType.values()[priv].toString()), + String.format( + CommonMessages.EXCEPTION_ARG_NOT_LEGAL_PRIVILEGE_504838E8, + PrivilegeType.values()[priv].toString()), TSStatusCode.ILLEGAL_PRIVILEGE.getStatusCode(), true); } public IllegalPrivilegeException(String reason) { - super(String.format("%s", reason), TSStatusCode.ILLEGAL_PATH.getStatusCode(), true); + super( + String.format(CommonMessages.EXCEPTION_ARG_634FCEDB, reason), + TSStatusCode.ILLEGAL_PATH.getStatusCode(), + true); } } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/exception/ObjectFileNotExist.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/exception/ObjectFileNotExist.java index afe2cda5500c4..590fa8ea984e1 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/exception/ObjectFileNotExist.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/exception/ObjectFileNotExist.java @@ -19,13 +19,15 @@ package org.apache.iotdb.commons.exception; +import org.apache.iotdb.commons.i18n.CommonMessages; import org.apache.iotdb.rpc.RpcUtils; import static org.apache.iotdb.rpc.TSStatusCode.OBJECT_NOT_EXISTS; public class ObjectFileNotExist extends IoTDBRuntimeException { - private static final String ERROR_MSG = "Object file %s does not exist"; + private static final String ERROR_MSG = + CommonMessages.EXCEPTION_OBJECT_FILE_ARG_DOES_NOT_EXIST_7EA8CB1C; public ObjectFileNotExist(String relativeObjectPath) { super( diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/exception/PortOccupiedException.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/exception/PortOccupiedException.java index bbde0c8857644..a85cb73d20566 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/exception/PortOccupiedException.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/exception/PortOccupiedException.java @@ -18,14 +18,18 @@ */ package org.apache.iotdb.commons.exception; +import org.apache.iotdb.commons.i18n.CommonMessages; + import java.util.Arrays; public class PortOccupiedException extends RuntimeException { public PortOccupiedException() { - super("Some ports are occupied"); + super(CommonMessages.EXCEPTION_SOME_PORTS_OCCUPIED_77ED044D); } public PortOccupiedException(int... ports) { - super(String.format("Ports %s are occupied", Arrays.toString(ports))); + super( + String.format( + CommonMessages.EXCEPTION_PORTS_ARG_OCCUPIED_B462E9DA, Arrays.toString(ports))); } } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/exception/QueryTimeoutException.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/exception/QueryTimeoutException.java index ed8cce83fbd91..62cbe216f1539 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/exception/QueryTimeoutException.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/exception/QueryTimeoutException.java @@ -20,12 +20,17 @@ package org.apache.iotdb.commons.exception; +import org.apache.iotdb.commons.i18n.CommonMessages; + import static org.apache.iotdb.rpc.TSStatusCode.QUERY_TIMEOUT; public class QueryTimeoutException extends IoTDBRuntimeException { public QueryTimeoutException() { - super("Query execution is time out", QUERY_TIMEOUT.getStatusCode(), true); + super( + CommonMessages.EXCEPTION_QUERY_EXECUTION_TIME_OUT_A5DC7BFB, + QUERY_TIMEOUT.getStatusCode(), + true); } public QueryTimeoutException(String message) { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/exception/auth/AccessDeniedException.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/exception/auth/AccessDeniedException.java index 9aca837f82519..53575ace882b7 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/exception/auth/AccessDeniedException.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/exception/auth/AccessDeniedException.java @@ -20,11 +20,12 @@ package org.apache.iotdb.commons.exception.auth; import org.apache.iotdb.commons.exception.IoTDBRuntimeException; +import org.apache.iotdb.commons.i18n.AuthMessages; import org.apache.iotdb.rpc.TSStatusCode; public class AccessDeniedException extends IoTDBRuntimeException { - public static final String PREFIX = "Access Denied: "; + public static final String PREFIX = AuthMessages.EXCEPTION_ACCESS_DENIED_E128C1A1; public AccessDeniedException(String message) { super(PREFIX + message, TSStatusCode.NO_PERMISSION.getStatusCode()); diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/exception/pipe/PipeRuntimeExceptionType.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/exception/pipe/PipeRuntimeExceptionType.java index ea9683493c188..669fff4d61912 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/exception/pipe/PipeRuntimeExceptionType.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/exception/pipe/PipeRuntimeExceptionType.java @@ -19,6 +19,7 @@ package org.apache.iotdb.commons.exception.pipe; +import org.apache.iotdb.commons.i18n.PipeMessages; import org.apache.iotdb.commons.pipe.agent.task.meta.PipeRuntimeMetaVersion; import org.apache.tsfile.utils.ReadWriteIOUtils; @@ -67,7 +68,8 @@ public static PipeRuntimeException deserializeFrom( return PipeRuntimeOutOfMemoryCriticalException.deserializeFrom(version, byteBuffer); default: throw new UnsupportedOperationException( - String.format("Unsupported PipeRuntimeException type %s.", type)); + String.format( + PipeMessages.EXCEPTION_UNSUPPORTED_PIPERUNTIMEEXCEPTION_TYPE_ARG_C5D5D84C, type)); } } @@ -85,7 +87,8 @@ public static PipeRuntimeException deserializeFrom( return PipeRuntimeOutOfMemoryCriticalException.deserializeFrom(version, stream); default: throw new UnsupportedOperationException( - String.format("Unsupported PipeRuntimeException type %s.", type)); + String.format( + PipeMessages.EXCEPTION_UNSUPPORTED_PIPERUNTIMEEXCEPTION_TYPE_ARG_C5D5D84C, type)); } } } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/exception/runtime/SerializationRunTimeException.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/exception/runtime/SerializationRunTimeException.java index e0398ef1b155e..23b611de73807 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/exception/runtime/SerializationRunTimeException.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/exception/runtime/SerializationRunTimeException.java @@ -19,9 +19,11 @@ package org.apache.iotdb.commons.exception.runtime; +import org.apache.iotdb.commons.i18n.CommonMessages; + public class SerializationRunTimeException extends RuntimeException { public SerializationRunTimeException(Throwable e) { - super("Unexpected error occurs in serialization", e); + super(CommonMessages.EXCEPTION_UNEXPECTED_ERROR_OCCURS_SERIALIZATION_A6B2E222, e); } } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/exception/table/ColumnNotExistsException.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/exception/table/ColumnNotExistsException.java index 0a9fa784e9f77..2b4f8e690a377 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/exception/table/ColumnNotExistsException.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/exception/table/ColumnNotExistsException.java @@ -20,6 +20,7 @@ package org.apache.iotdb.commons.exception.table; import org.apache.iotdb.commons.exception.MetadataException; +import org.apache.iotdb.commons.i18n.CommonMessages; import org.apache.iotdb.rpc.TSStatusCode; public class ColumnNotExistsException extends MetadataException { @@ -27,7 +28,10 @@ public ColumnNotExistsException( final String database, final String tableName, final String columnName) { super( String.format( - "Column %s in table '%s.%s' does not exist.", columnName, database, tableName), + CommonMessages.EXCEPTION_COLUMN_ARG_TABLE_ARG_ARG_DOES_NOT_EXIST_D8145581, + columnName, + database, + tableName), TSStatusCode.COLUMN_NOT_EXISTS.getStatusCode()); } } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/exception/table/TableAlreadyExistsException.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/exception/table/TableAlreadyExistsException.java index d0baa216b84f2..7f5f82bb5b868 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/exception/table/TableAlreadyExistsException.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/exception/table/TableAlreadyExistsException.java @@ -20,13 +20,15 @@ package org.apache.iotdb.commons.exception.table; import org.apache.iotdb.commons.exception.MetadataException; +import org.apache.iotdb.commons.i18n.CommonMessages; import org.apache.iotdb.rpc.TSStatusCode; public class TableAlreadyExistsException extends MetadataException { public TableAlreadyExistsException(final String database, final String tableName) { super( - String.format("Table '%s.%s' already exists.", database, tableName), + String.format( + CommonMessages.EXCEPTION_TABLE_ARG_ARG_ALREADY_EXISTS_D4BDF4B5, database, tableName), TSStatusCode.TABLE_ALREADY_EXISTS.getStatusCode()); } } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/exception/table/TableNotExistsException.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/exception/table/TableNotExistsException.java index c0caabe711a7c..1b6bab4e9f6dd 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/exception/table/TableNotExistsException.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/exception/table/TableNotExistsException.java @@ -20,13 +20,15 @@ package org.apache.iotdb.commons.exception.table; import org.apache.iotdb.commons.exception.MetadataException; +import org.apache.iotdb.commons.i18n.CommonMessages; import org.apache.iotdb.rpc.TSStatusCode; public class TableNotExistsException extends MetadataException { public TableNotExistsException(final String database, final String tableName) { super( - String.format("Table '%s.%s' does not exist.", database, tableName), + String.format( + CommonMessages.EXCEPTION_TABLE_ARG_ARG_DOES_NOT_EXIST_796E503B, database, tableName), TSStatusCode.TABLE_NOT_EXISTS.getStatusCode()); } } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/executable/ExecutableManager.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/executable/ExecutableManager.java index 2c75928fee258..8f373bceb4ff3 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/executable/ExecutableManager.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/executable/ExecutableManager.java @@ -20,6 +20,7 @@ package org.apache.iotdb.commons.executable; import org.apache.iotdb.commons.conf.CommonDescriptor; +import org.apache.iotdb.commons.i18n.CommonMessages; import org.apache.iotdb.commons.trigger.exception.TriggerJarTooLargeException; import org.apache.tsfile.external.commons.io.FileUtils; @@ -196,7 +197,8 @@ public static ByteBuffer transferToBytebuffer(String filePath) throws IOExceptio if (size > Integer.MAX_VALUE) { // Max length of Thrift Binary is Integer.MAX_VALUE bytes. throw new TriggerJarTooLargeException( - String.format("Size of file exceed %d bytes", Integer.MAX_VALUE)); + String.format( + CommonMessages.EXCEPTION_SIZE_FILE_EXCEED_ARG_BYTES_C60F1149, Integer.MAX_VALUE)); } ByteBuffer byteBuffer = ByteBuffer.allocate((int) size); fileChannel.read(byteBuffer); @@ -204,7 +206,10 @@ public static ByteBuffer transferToBytebuffer(String filePath) throws IOExceptio return byteBuffer; } catch (Exception e) { LOGGER.warn( - "Error occurred during transferring file{} to ByteBuffer, the cause is {}", filePath, e); + CommonMessages + .LOG_ERROR_OCCURRED_DURING_TRANSFERRING_FILE_ARG_BYTEBUFFER_CAUSE_ARG_FEDC38A3, + filePath, + e); throw e; } } @@ -231,7 +236,9 @@ protected void saveToDir(ByteBuffer byteBuffer, String destination) throws IOExc } } catch (IOException e) { LOGGER.warn( - "Error occurred during writing bytebuffer to {} , the cause is {}", destination, e); + CommonMessages.LOG_ERROR_OCCURRED_DURING_WRITING_BYTEBUFFER_ARG_CAUSE_ARG_F3AD2DA0, + destination, + e); throw e; } } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/external/collections4/bidimap/AbstractDualBidiMap.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/external/collections4/bidimap/AbstractDualBidiMap.java index c7b7c77188550..868b6828f7a70 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/external/collections4/bidimap/AbstractDualBidiMap.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/external/collections4/bidimap/AbstractDualBidiMap.java @@ -692,7 +692,7 @@ public V setValue(final V value) { final K key = MapEntry.this.getKey(); if (parent.reverseMap.containsKey(value) && parent.reverseMap.get(value) != key) { throw new IllegalArgumentException( - "Cannot use setValue() when the object being set is already in the map"); + CommonMessages.EXCEPTION_CANNOT_USE_SETVALUE_OBJECT_BEING_SET_ALREADY_MAP_676ED3BF); } parent.put(key, value); return super.setValue(value); @@ -754,7 +754,8 @@ public void remove() { public K getKey() { if (last == null) { throw new IllegalStateException( - "Iterator getKey() can only be called after next() and before remove()"); + CommonMessages + .EXCEPTION_ITERATOR_GETKEY_CAN_ONLY_CALLED_AFTER_NEXT_BEFORE_REMOVE_009C456B); } return last.getKey(); } @@ -763,7 +764,8 @@ public K getKey() { public V getValue() { if (last == null) { throw new IllegalStateException( - "Iterator getValue() can only be called after next() and before remove()"); + CommonMessages + .EXCEPTION_ITERATOR_GETVALUE_CAN_ONLY_CALLED_AFTER_NEXT_BEFORE_REMOVE_927A88A2); } return last.getValue(); } @@ -772,11 +774,12 @@ public V getValue() { public V setValue(final V value) { if (last == null) { throw new IllegalStateException( - "Iterator setValue() can only be called after next() and before remove()"); + CommonMessages + .EXCEPTION_ITERATOR_SETVALUE_CAN_ONLY_CALLED_AFTER_NEXT_BEFORE_REMOVE_51505AD1); } if (parent.reverseMap.containsKey(value) && parent.reverseMap.get(value) != last.getKey()) { throw new IllegalArgumentException( - "Cannot use setValue() when the object being set is already in the map"); + CommonMessages.EXCEPTION_CANNOT_USE_SETVALUE_OBJECT_BEING_SET_ALREADY_MAP_676ED3BF); } return parent.put(last.getKey(), value); } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/external/collections4/bidimap/DualTreeBidiMap.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/external/collections4/bidimap/DualTreeBidiMap.java index f050c7713bedf..35e62460e0823 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/external/collections4/bidimap/DualTreeBidiMap.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/external/collections4/bidimap/DualTreeBidiMap.java @@ -21,6 +21,7 @@ import org.apache.iotdb.commons.external.collections4.OrderedBidiMap; import org.apache.iotdb.commons.external.collections4.SortedBidiMap; import org.apache.iotdb.commons.external.collections4.map.AbstractSortedMapDecorator; +import org.apache.iotdb.commons.i18n.CommonMessages; import org.apache.tsfile.external.commons.collections4.OrderedMap; import org.apache.tsfile.external.commons.collections4.OrderedMapIterator; @@ -350,7 +351,8 @@ public void remove() { public K getKey() { if (last == null) { throw new IllegalStateException( - "Iterator getKey() can only be called after next() and before remove()"); + CommonMessages + .EXCEPTION_ITERATOR_GETKEY_CAN_ONLY_CALLED_AFTER_NEXT_BEFORE_REMOVE_009C456B); } return last.getKey(); } @@ -359,7 +361,8 @@ public K getKey() { public V getValue() { if (last == null) { throw new IllegalStateException( - "Iterator getValue() can only be called after next() and before remove()"); + CommonMessages + .EXCEPTION_ITERATOR_GETVALUE_CAN_ONLY_CALLED_AFTER_NEXT_BEFORE_REMOVE_927A88A2); } return last.getValue(); } @@ -368,11 +371,12 @@ public V getValue() { public V setValue(final V value) { if (last == null) { throw new IllegalStateException( - "Iterator setValue() can only be called after next() and before remove()"); + CommonMessages + .EXCEPTION_ITERATOR_SETVALUE_CAN_ONLY_CALLED_AFTER_NEXT_BEFORE_REMOVE_51505AD1); } if (parent.reverseMap.containsKey(value) && parent.reverseMap.get(value) != last.getKey()) { throw new IllegalArgumentException( - "Cannot use setValue() when the object being set is already in the map"); + CommonMessages.EXCEPTION_CANNOT_USE_SETVALUE_OBJECT_BEING_SET_ALREADY_MAP_676ED3BF); } final V oldValue = parent.put(last.getKey(), value); // Map.Entry specifies that the behavior is undefined when the backing map diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/file/SystemPropertiesHandler.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/file/SystemPropertiesHandler.java index e77ea288719e8..5d465e7376e96 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/file/SystemPropertiesHandler.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/file/SystemPropertiesHandler.java @@ -63,9 +63,10 @@ public SystemPropertiesHandler(String filePath) { public void put(Object... keyOrValue) throws IOException { if (keyOrValue.length % 2 != 0) { throw new IllegalArgumentException( - "Length of parameters should be evenly divided by 2, but the actual length is " + CommonMessages + .EXCEPTION_LENGTH_PARAMETERS_SHOULD_EVENLY_DIVIDED_2_BUT_ACTUAL_LENGTH_E9A792D9 + keyOrValue.length - + " : " + + CommonMessages.EXCEPTION_COLON_3A291246 + Arrays.toString(keyOrValue)); } try (AutoCloseableLock ignore = AutoCloseableLock.acquire(lock.writeLock())) { @@ -162,7 +163,8 @@ private void recover() throws IOException { if (formalFile.exists() && tmpFile.exists()) { if (!tmpFile.delete()) { LOGGER.warn( - "Delete system.properties tmp file fail, you may manually delete it: {}", + CommonMessages + .LOG_DELETE_SYSTEM_PROPERTIES_TMP_FILE_FAIL_YOU_MAY_MANUALLY_DELETE_F81C4A53, tmpFile.getAbsoluteFile()); } return; @@ -177,7 +179,8 @@ private void recover() throws IOException { private void replaceFormalFile() throws IOException { if (!tmpFile.exists()) { throw new FileNotFoundException( - "Tmp system properties file must exist when call replaceFormalFile"); + CommonMessages + .EXCEPTION_TMP_SYSTEM_PROPERTIES_FILE_MUST_EXIST_CALL_REPLACEFORMALFILE_FA63B976); } if (formalFile.exists() && !formalFile.delete()) { String msg = @@ -199,7 +202,8 @@ public void delete() { this.tmpFile.delete(); if (this.formalFile.exists() || this.tmpFile.exists()) { LOGGER.warn( - "Failed to delete system.properties file, you should manually delete them: {}, {}", + CommonMessages + .LOG_FAILED_DELETE_SYSTEM_PROPERTIES_FILE_YOU_SHOULD_MANUALLY_DELETE_THEM_77F91A98, this.formalFile.getAbsoluteFile(), this.tmpFile.getAbsolutePath()); } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/memory/AtomicLongMemoryBlock.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/memory/AtomicLongMemoryBlock.java index 7f144e5d0d62c..67b81213eac94 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/memory/AtomicLongMemoryBlock.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/memory/AtomicLongMemoryBlock.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.memory; +import org.apache.iotdb.commons.i18n.CommonMessages; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -109,7 +111,8 @@ public long release(long sizeInByte) { if (sizeInByte > prev) { // print log after compareAndSet was success LOGGER.warn( - "The memory cost to be released is larger than the memory cost of memory block {}", this); + CommonMessages.LOG_MEMORY_COST_RELEASED_LARGER_THAN_MEMORY_COST_MEMORY_BLOCK_ARG_00DD9DA9, + this); } return next; } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/memory/MemoryManager.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/memory/MemoryManager.java index 27a3012e1ac40..2aa480b9060cc 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/memory/MemoryManager.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/memory/MemoryManager.java @@ -119,9 +119,10 @@ public synchronized IMemoryBlock exactAllocate( throw new MemoryException( String.format( - "exactAllocate: failed to allocate memory after %d retries, " - + "total memory size %d bytes, used memory size %d bytes, " - + "requested memory size %d bytes", + CommonMessages.EXCEPTION_EXACTALLOCATE_FAILED_ALLOCATE_MEMORY_AFTER_ARG_RETRIES_957A647B + + CommonMessages + .EXCEPTION_TOTAL_MEMORY_SIZE_ARG_BYTES_USED_MEMORY_SIZE_ARG_BYTES_9FC9A9C6 + + CommonMessages.EXCEPTION_REQUESTED_MEMORY_SIZE_ARG_BYTES_E6340842, MEMORY_ALLOCATE_MAX_RETRIES, totalMemorySizeInBytes, allocatedMemorySizeInBytes, @@ -164,9 +165,9 @@ public synchronized IMemoryBlock exactAllocateIfSufficient( } else { // TODO @spricoder: consider to find more memory in active way LOGGER.debug( - "exactAllocateIfSufficient: failed to allocate memory, " - + "total memory size {} bytes, used memory size {} bytes, " - + "requested memory size {} bytes, used threshold {}", + CommonMessages.LOG_EXACTALLOCATEIFSUFFICIENT_FAILED_ALLOCATE_MEMORY_A47897D9 + + CommonMessages.LOG_TOTAL_MEMORY_SIZE_ARG_BYTES_USED_MEMORY_SIZE_ARG_BYTES_5FB5059F + + CommonMessages.LOG_REQUESTED_MEMORY_SIZE_ARG_BYTES_USED_THRESHOLD_ARG_D7061DEB, totalMemorySizeInBytes, allocatedMemorySizeInBytes, sizeInBytes, @@ -202,10 +203,10 @@ public synchronized IMemoryBlock tryAllocate( while (sizeToAllocateInBytes >= MEMORY_ALLOCATE_MIN_SIZE_IN_BYTES) { if (totalMemorySizeInBytes - allocatedMemorySizeInBytes >= sizeToAllocateInBytes) { LOGGER.debug( - "tryAllocate: allocated memory, " - + "total memory size {} bytes, used memory size {} bytes, " - + "original requested memory size {} bytes, " - + "actual requested memory size {} bytes", + CommonMessages.LOG_TRYALLOCATE_ALLOCATED_MEMORY_B3D564D9 + + CommonMessages.LOG_TOTAL_MEMORY_SIZE_ARG_BYTES_USED_MEMORY_SIZE_ARG_BYTES_5FB5059F + + CommonMessages.LOG_ORIGINAL_REQUESTED_MEMORY_SIZE_ARG_BYTES_03D28A6B + + CommonMessages.LOG_ACTUAL_REQUESTED_MEMORY_SIZE_ARG_BYTES_62760058, totalMemorySizeInBytes, allocatedMemorySizeInBytes, sizeInBytes, @@ -221,9 +222,9 @@ public synchronized IMemoryBlock tryAllocate( // TODO @spricoder: consider to find more memory in active way LOGGER.warn( - "tryAllocate: failed to allocate memory, " - + "total memory size {} bytes, used memory size {} bytes, " - + "requested memory size {} bytes", + CommonMessages.LOG_TRYALLOCATE_FAILED_ALLOCATE_MEMORY_838FA6FB + + CommonMessages.LOG_TOTAL_MEMORY_SIZE_ARG_BYTES_USED_MEMORY_SIZE_ARG_BYTES_5FB5059F + + CommonMessages.LOG_REQUESTED_MEMORY_SIZE_ARG_BYTES_BF9CEF81, totalMemorySizeInBytes, allocatedMemorySizeInBytes, sizeInBytes); @@ -243,7 +244,9 @@ private IMemoryBlock getOrRegisterMemoryBlock( if (sizeInBytes < 0) { throw new MemoryException( String.format( - "register memory block %s failed: sizeInBytes should be non-negative", name)); + CommonMessages + .EXCEPTION_REGISTER_MEMORY_BLOCK_ARG_FAILED_SIZEINBYTES_SHOULD_NON_NEGATIVE_EC54AA75, + name)); } return allocatedMemoryBlocks.compute( name, @@ -251,8 +254,9 @@ private IMemoryBlock getOrRegisterMemoryBlock( if (block != null) { if (block.getTotalMemorySizeInBytes() != sizeInBytes) { LOGGER.warn( - "getOrRegisterMemoryBlock failed: memory block {} already exists, " - + "it's size is {}, requested size is {}", + CommonMessages + .LOG_GETORREGISTERMEMORYBLOCK_FAILED_MEMORY_BLOCK_ARG_ALREADY_EXISTS_42CA8914 + + CommonMessages.LOG_IT_S_SIZE_ARG_REQUESTED_SIZE_ARG_AF8F04B2, blockName, block.getTotalMemorySizeInBytes(), sizeInBytes); @@ -323,7 +327,8 @@ public synchronized MemoryManager getOrCreateMemoryManager( } if (manager != null) { LOGGER.debug( - "getMemoryManager: memory manager {} already exists, it's size is {}, enabled is {}", + CommonMessages + .LOG_GETMEMORYMANAGER_MEMORY_MANAGER_ARG_ALREADY_EXISTS_IT_S_SIZE_ARG_0102560A, managerName, manager.getTotalMemorySizeInBytes(), manager.isEnable()); @@ -332,7 +337,8 @@ public synchronized MemoryManager getOrCreateMemoryManager( if (this.enabled && sizeInBytes + this.allocatedMemorySizeInBytes > this.totalMemorySizeInBytes) { LOGGER.warn( - "getOrCreateMemoryManager failed: total memory size {} bytes is less than allocated memory size {} bytes", + CommonMessages + .LOG_GETORCREATEMEMORYMANAGER_FAILED_TOTAL_MEMORY_SIZE_ARG_BYTES_LESS_THAN_ALLOCATED_3D110256, sizeInBytes, allocatedMemorySizeInBytes); return null; diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/partition/DataPartition.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/partition/DataPartition.java index 100c40eddcc23..68cf75d28aabb 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/partition/DataPartition.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/partition/DataPartition.java @@ -22,6 +22,7 @@ import org.apache.iotdb.common.rpc.thrift.TRegionReplicaSet; import org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot; import org.apache.iotdb.common.rpc.thrift.TTimePartitionSlot; +import org.apache.iotdb.commons.i18n.CommonMessages; import org.apache.iotdb.commons.utils.PathUtils; import org.apache.iotdb.commons.utils.TimePartitionUtils; @@ -228,8 +229,9 @@ public List getDataRegionReplicaSetForWriting( if (targetRegionList == null || targetRegionList.isEmpty()) { throw new RuntimeException( String.format( - "targetRegionList is empty. device: %s, timeSlot: %s", - deviceID, timePartitionSlot)); + CommonMessages.EXCEPTION_TARGETREGIONLIST_EMPTY_DEVICE_ARG_TIMESLOT_ARG_E7E5818C, + deviceID, + timePartitionSlot)); } else { dataRegionReplicaSets.add(targetRegionList.get(targetRegionList.size() - 1)); } @@ -250,9 +252,10 @@ public TRegionReplicaSet getDataRegionReplicaSetForWriting( databasePartitionMap = dataPartitionMap.get(databaseName); if (databasePartitionMap == null) { throw new RuntimeException( - "Database " + CommonMessages.EXCEPTION_DATABASE_18F8303F + databaseName - + " not exists and failed to create automatically because enable_auto_create_schema is FALSE."); + + CommonMessages + .EXCEPTION_NOT_EXISTS_FAILED_CREATE_AUTOMATICALLY_BECAUSE_ENABLE_AUTO_CREATE_SCHEMA_80DE1A4B); } final List regions = databasePartitionMap.get(seriesPartitionSlot).get(timePartitionSlot); @@ -300,7 +303,8 @@ public List getDistributionInfo() { // TODO(beyyes) if join queries more than one table, may trigger the unmodication error in // Collections.singletonMap public void upsertDataPartition(DataPartition targetDataPartition) { - requireNonNull(this.dataPartitionMap, "dataPartitionMap is null"); + requireNonNull( + this.dataPartitionMap, CommonMessages.EXCEPTION_DATAPARTITIONMAP_IS_NULL_B764418A); for (Map.Entry< String, Map>>> diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/partition/SchemaPartition.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/partition/SchemaPartition.java index 96abc7498653d..cff0324a78b64 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/partition/SchemaPartition.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/partition/SchemaPartition.java @@ -22,6 +22,7 @@ import org.apache.iotdb.common.rpc.thrift.TRegionReplicaSet; import org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot; import org.apache.iotdb.commons.exception.IoTDBException; +import org.apache.iotdb.commons.i18n.CommonMessages; import org.apache.iotdb.commons.utils.PathUtils; import org.apache.iotdb.commons.utils.TestOnly; import org.apache.iotdb.rpc.TSStatusCode; @@ -89,7 +90,9 @@ public TRegionReplicaSet getSchemaRegionReplicaSet(final IDeviceID deviceID) { final TSeriesPartitionSlot seriesPartitionSlot = calculateDeviceGroupId(deviceID); if (schemaPartitionMap.get(storageGroup) == null) { throw new RuntimeException( - new IoTDBException("Path does not exist. ", TSStatusCode.PATH_NOT_EXIST.getStatusCode())); + new IoTDBException( + CommonMessages.EXCEPTION_PATH_DOES_NOT_EXIST_737CB95D, + TSStatusCode.PATH_NOT_EXIST.getStatusCode())); } return schemaPartitionMap.get(storageGroup).get(seriesPartitionSlot); } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/partition/executor/SeriesPartitionExecutor.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/partition/executor/SeriesPartitionExecutor.java index d2666446e8e14..b7b35cb5a0309 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/partition/executor/SeriesPartitionExecutor.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/partition/executor/SeriesPartitionExecutor.java @@ -20,6 +20,7 @@ package org.apache.iotdb.commons.partition.executor; import org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot; +import org.apache.iotdb.commons.i18n.CommonMessages; import org.apache.iotdb.commons.utils.TestOnly; import org.apache.tsfile.file.metadata.IDeviceID; @@ -69,7 +70,10 @@ private static synchronized void initStaticSeriesPartitionExecutor( | IllegalAccessException | InvocationTargetException e) { throw new IllegalArgumentException( - String.format("Couldn't Constructor SeriesPartitionExecutor class: %s", executorName)); + String.format( + CommonMessages + .EXCEPTION_COULDN_T_CONSTRUCTOR_SERIESPARTITIONEXECUTOR_CLASS_ARG_34FB9F45, + executorName)); } } } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/path/MeasurementPath.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/path/MeasurementPath.java index 1c1816ceebb7c..47098269d1062 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/path/MeasurementPath.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/path/MeasurementPath.java @@ -137,7 +137,8 @@ public MeasurementPath(String[] nodes) { super(nodes); if (nodes.length < 2) { throw new IllegalArgumentException( - "nodes.length for MeasurementPath should always be greater than 2, current is: " + PathMessages + .EXCEPTION_NODES_LENGTH_MEASUREMENTPATH_SHOULD_ALWAYS_GREATER_THAN_2_CURRENT_39B913AE + Arrays.toString(nodes)); } } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/path/PartialPath.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/path/PartialPath.java index 1c10c3e02c4f1..9d71b0121bcc9 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/path/PartialPath.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/path/PartialPath.java @@ -328,7 +328,8 @@ public List alterPrefixPath(PartialPath prefix) { for (String node : prefix.getNodes()) { if (MULTI_LEVEL_PATH_WILDCARD.equals(node) || ONE_LEVEL_PATH_WILDCARD.equals(node)) { throw new IllegalArgumentException( - "Wildcards are not allowed in the prefix path: " + prefix.getFullPath()); + PathMessages.EXCEPTION_WILDCARDS_NOT_ALLOWED_PREFIX_PATH_948C42D1 + + prefix.getFullPath()); } } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/agent/plugin/constructor/PipePluginConstructor.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/agent/plugin/constructor/PipePluginConstructor.java index 6e87444c2d935..2a723f8d97a88 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/agent/plugin/constructor/PipePluginConstructor.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/agent/plugin/constructor/PipePluginConstructor.java @@ -19,6 +19,7 @@ package org.apache.iotdb.commons.pipe.agent.plugin.constructor; +import org.apache.iotdb.commons.i18n.PipeMessages; import org.apache.iotdb.commons.pipe.agent.plugin.meta.PipePluginMeta; import org.apache.iotdb.commons.pipe.agent.plugin.meta.PipePluginMetaKeeper; import org.apache.iotdb.commons.pipe.agent.plugin.service.PipePluginClassLoaderManager; @@ -63,12 +64,14 @@ public PipePlugin reflectPluginByKey(String pluginKey) { private PipePlugin reflect(String pluginName) { if (pluginMetaKeeper == null) { throw new PipeException( - "Failed to reflect PipePlugin instance, because PipePluginMetaKeeper is null."); + PipeMessages + .EXCEPTION_FAILED_REFLECT_PIPEPLUGIN_INSTANCE_BECAUSE_PIPEPLUGINMETAKEEPER_NULL_0C9BD2E2); } if (pluginName == null) { throw new PipeException( - "Failed to reflect PipePlugin instance, because plugin name is null."); + PipeMessages + .EXCEPTION_FAILED_REFLECT_PIPEPLUGIN_INSTANCE_BECAUSE_PLUGIN_NAME_NULL_416BD04D); } final PipePluginMeta information = pluginMetaKeeper.getPipePluginMeta(pluginName); diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/agent/task/meta/PipeRuntimeMeta.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/agent/task/meta/PipeRuntimeMeta.java index 1f28a24dd6042..87077e1514db7 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/agent/task/meta/PipeRuntimeMeta.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/agent/task/meta/PipeRuntimeMeta.java @@ -28,6 +28,7 @@ import org.apache.iotdb.commons.exception.pipe.PipeRuntimeException; import org.apache.iotdb.commons.exception.pipe.PipeRuntimeExceptionType; import org.apache.iotdb.commons.exception.pipe.PipeRuntimeSinkCriticalException; +import org.apache.iotdb.commons.i18n.PipeMessages; import org.apache.tsfile.utils.PublicBAOS; import org.apache.tsfile.utils.ReadWriteIOUtils; @@ -192,7 +193,8 @@ public static PipeRuntimeMeta deserialize(InputStream inputStream) throws IOExce return deserializeVersion2(inputStream); default: throw new UnsupportedOperationException( - "Unknown pipe runtime meta version: " + pipeRuntimeMetaVersion.getVersion()); + PipeMessages.EXCEPTION_UNKNOWN_PIPE_RUNTIME_META_VERSION_C2F4B575 + + pipeRuntimeMetaVersion.getVersion()); } } @@ -248,7 +250,8 @@ public static PipeRuntimeMeta deserialize(ByteBuffer byteBuffer) { return deserializeVersion2(byteBuffer); default: throw new UnsupportedOperationException( - "Unknown pipe runtime meta version: " + pipeRuntimeMetaVersion.getVersion()); + PipeMessages.EXCEPTION_UNKNOWN_PIPE_RUNTIME_META_VERSION_C2F4B575 + + pipeRuntimeMetaVersion.getVersion()); } } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/agent/task/subtask/PipeAbstractSinkSubtask.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/agent/task/subtask/PipeAbstractSinkSubtask.java index 790e5fe4c6d2e..92dd725bd7952 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/agent/task/subtask/PipeAbstractSinkSubtask.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/agent/task/subtask/PipeAbstractSinkSubtask.java @@ -194,7 +194,9 @@ private boolean onPipeConnectionException(final Throwable throwable) { report( (EnrichedEvent) lastEvent, new PipeRuntimeSinkCriticalException( - throwable.getMessage() + ", root cause: " + getRootCause(throwable))); + throwable.getMessage() + + PipeMessages.EXCEPTION_ROOT_CAUSE_A22E94DE + + getRootCause(throwable))); LOGGER.warn( PipeMessages.HANDSHAKE_FAILED_STOPPING, outputPipeSink.getClass().getName(), diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/agent/task/subtask/PipeSubtask.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/agent/task/subtask/PipeSubtask.java index 2da797c2b3b5d..958e98dc5b1f2 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/agent/task/subtask/PipeSubtask.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/agent/task/subtask/PipeSubtask.java @@ -19,6 +19,7 @@ package org.apache.iotdb.commons.pipe.agent.task.subtask; +import org.apache.iotdb.commons.i18n.PipeMessages; import org.apache.iotdb.commons.pipe.agent.task.execution.PipeSubtaskScheduler; import org.apache.iotdb.commons.pipe.event.EnrichedEvent; import org.apache.iotdb.pipe.api.event.Event; @@ -113,7 +114,7 @@ public synchronized void onSuccess(final Boolean hasAtLeastOneEventProcessed) { if (totalRetryCount != 0) { LOGGER.warn( - "Successfully executed subtask {}({}) after {} retries.", + PipeMessages.LOG_SUCCESSFULLY_EXECUTED_SUBTASK_ARG_ARG_AFTER_ARG_RETRIES_70972F07, taskID, this.getClass().getSimpleName(), totalRetryCount); diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/datastructure/pattern/TreePattern.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/datastructure/pattern/TreePattern.java index 48c4c64abaa30..d75c40aad0fb0 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/datastructure/pattern/TreePattern.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/datastructure/pattern/TreePattern.java @@ -686,7 +686,9 @@ private static List parsePatternsFromPatternParameter( break; default: LOGGER.info( - "Unknown pattern format: {}, use prefix matching format by default.", patternFormat); + PipeMessages + .LOG_UNKNOWN_PATTERN_FORMAT_ARG_USE_PREFIX_MATCHING_FORMAT_DEFAULT_E7B9EFEC, + patternFormat); patterns = parseMultiplePatterns( pattern, p -> new PrefixTreePattern(isTreeModelDataAllowedToBeCaptured, p)); diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/datastructure/queue/listening/AbstractPipeListeningQueue.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/datastructure/queue/listening/AbstractPipeListeningQueue.java index cb57260e4115d..39e59640f5cae 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/datastructure/queue/listening/AbstractPipeListeningQueue.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/datastructure/queue/listening/AbstractPipeListeningQueue.java @@ -19,6 +19,7 @@ package org.apache.iotdb.commons.pipe.datastructure.queue.listening; +import org.apache.iotdb.commons.i18n.PipeMessages; import org.apache.iotdb.commons.pipe.agent.task.PipeTask; import org.apache.iotdb.commons.pipe.config.PipeConfig; import org.apache.iotdb.commons.pipe.datastructure.queue.serializer.QueueSerializerType; @@ -72,7 +73,8 @@ protected synchronized void tryListen(final List events) { event -> event.increaseReferenceCount(AbstractPipeListeningQueue.class.getName())); queueTailIndex2SnapshotsCache.setRight(events); LOGGER.info( - "Pipe listening queue snapshot cache is updated: {}", queueTailIndex2SnapshotsCache); + PipeMessages.LOG_PIPE_LISTENING_QUEUE_SNAPSHOT_CACHE_UPDATED_ARG_414EE914, + queueTailIndex2SnapshotsCache); } } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/datastructure/queue/listening/AbstractSerializableListeningQueue.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/datastructure/queue/listening/AbstractSerializableListeningQueue.java index 513d37899e9d2..4c5465edc8ac3 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/datastructure/queue/listening/AbstractSerializableListeningQueue.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/datastructure/queue/listening/AbstractSerializableListeningQueue.java @@ -110,7 +110,7 @@ public synchronized boolean serializeToFile(final File snapshotName) throws IOEx final File snapshotFile = new File(String.valueOf(snapshotName)); if (snapshotFile.exists() && snapshotFile.isFile()) { LOGGER.warn( - "Failed to serialize to file, because file {} is already exist.", + PipeMessages.LOG_FAILED_SERIALIZE_FILE_BECAUSE_FILE_ARG_ALREADY_EXIST_FACC5C4C, snapshotFile.getAbsolutePath()); return false; } @@ -134,7 +134,7 @@ public synchronized void deserializeFromFile(final File snapshotName) throws IOE final File snapshotFile = new File(String.valueOf(snapshotName)); if (!snapshotFile.exists() || !snapshotFile.isFile()) { LOGGER.warn( - "Failed to deserialize from file, file {} does not exist.", + PipeMessages.LOG_FAILED_DESERIALIZE_FILE_FILE_ARG_DOES_NOT_EXIST_2356708C, snapshotFile.getAbsolutePath()); return; } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/datastructure/visibility/VisibilityUtils.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/datastructure/visibility/VisibilityUtils.java index 235a22e23adb2..752aee548aa13 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/datastructure/visibility/VisibilityUtils.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/datastructure/visibility/VisibilityUtils.java @@ -19,6 +19,7 @@ package org.apache.iotdb.commons.pipe.datastructure.visibility; +import org.apache.iotdb.commons.i18n.PipeMessages; import org.apache.iotdb.commons.pipe.config.constant.PipeSourceConstant; import org.apache.iotdb.commons.pipe.config.constant.SystemConstant; import org.apache.iotdb.pipe.api.annotation.TableModel; @@ -127,7 +128,7 @@ public static Visibility calculateFromExtractorParameters( // UNREACHABLE CODE LOGGER.error( - "BROKEN INVARIANT: DETECT INVISIBLE EXTRACTOR PARAMETERS {}", + PipeMessages.LOG_BROKEN_INVARIANT_DETECT_INVISIBLE_EXTRACTOR_PARAMETERS_ARG_ADAD3038, extractorParameters.getAttribute()); return Visibility.NONE; } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/event/EnrichedEvent.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/event/EnrichedEvent.java index c8efa83a124bc..63eedf80a43e5 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/event/EnrichedEvent.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/event/EnrichedEvent.java @@ -136,7 +136,7 @@ public synchronized boolean increaseReferenceCount(final String holderMessage) { if (isReleased.get()) { LOGGER.warn( - "re-increase reference count to event that has already been released: {}, stack trace: {}", + PipeMessages.LOG_RE_INCREASE_REFERENCE_COUNT_EVENT_HAS_ALREADY_BEEN_RELEASED_ARG_B8DAAAEE, coreReportMessage(), Thread.currentThread().getStackTrace()); isSuccessful = false; @@ -155,7 +155,8 @@ public synchronized boolean increaseReferenceCount(final String holderMessage) { } } else { LOGGER.warn( - "increase reference count failed, EnrichedEvent: {}, stack trace: {}", + PipeMessages + .LOG_INCREASE_REFERENCE_COUNT_FAILED_ENRICHEDEVENT_ARG_STACK_TRACE_ARG_94C472FC, coreReportMessage(), Thread.currentThread().getStackTrace()); } @@ -192,7 +193,8 @@ public synchronized boolean decreaseReferenceCount( if (isReleased.get()) { LOGGER.warn( - "decrease reference count to event that has already been released: {}, stack trace: {}", + PipeMessages + .LOG_DECREASE_REFERENCE_COUNT_EVENT_HAS_ALREADY_BEEN_RELEASED_ARG_STACK_99FCAB8B, coreReportMessage(), Thread.currentThread().getStackTrace()); isSuccessful = false; @@ -206,7 +208,8 @@ public synchronized boolean decreaseReferenceCount( // We assume that this function will not throw any exceptions. if (!internallyDecreaseResourceReferenceCount(holderMessage)) { LOGGER.warn( - "resource reference count is decreased to 0, but failed to release the resource, EnrichedEvent: {}, stack trace: {}", + PipeMessages + .LOG_RESOURCE_REFERENCE_COUNT_DECREASED_0_BUT_FAILED_RELEASE_RESOURCE_ENRICHEDEVENT_A02A86AF, coreReportMessage(), Thread.currentThread().getStackTrace()); } @@ -220,7 +223,7 @@ public synchronized boolean decreaseReferenceCount( isSuccessful = newReferenceCount == 0; if (newReferenceCount < 0) { LOGGER.warn( - "reference count is decreased to {}, event: {}, stack trace: {}", + PipeMessages.LOG_REFERENCE_COUNT_DECREASED_ARG_EVENT_ARG_STACK_TRACE_ARG_A4BF56FC, newReferenceCount, coreReportMessage(), Thread.currentThread().getStackTrace()); @@ -230,7 +233,8 @@ public synchronized boolean decreaseReferenceCount( if (!isSuccessful) { LOGGER.warn( - "decrease reference count failed, EnrichedEvent: {}, stack trace: {}", + PipeMessages + .LOG_DECREASE_REFERENCE_COUNT_FAILED_ENRICHEDEVENT_ARG_STACK_TRACE_ARG_6A2024AB, coreReportMessage(), Thread.currentThread().getStackTrace()); } @@ -257,7 +261,8 @@ public synchronized boolean clearReferenceCount(final String holderMessage) { // We assume that this function will not throw any exceptions. if (!internallyDecreaseResourceReferenceCount(holderMessage)) { LOGGER.warn( - "resource reference count is decreased to 0, but failed to release the resource, EnrichedEvent: {}, stack trace: {}", + PipeMessages + .LOG_RESOURCE_REFERENCE_COUNT_DECREASED_0_BUT_FAILED_RELEASE_RESOURCE_ENRICHEDEVENT_A02A86AF, coreReportMessage(), Thread.currentThread().getStackTrace()); } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/receiver/PipeReceiverStatusHandler.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/receiver/PipeReceiverStatusHandler.java index 1a922448fc046..db34cbfe86d61 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/receiver/PipeReceiverStatusHandler.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/receiver/PipeReceiverStatusHandler.java @@ -276,7 +276,7 @@ private void logDiscardedUserConflictData( } LOGGER.warn( - "User conflict exception: discarded data info because {}. data: {}. receiver message: {}. status: {}", + PipeMessages.LOG_USER_CONFLICT_EXCEPTION_DISCARDED_DATA_INFO_BECAUSE_ARG_DATA_ARG_CCE510A5, reason, summarizeRecordMessage(recordMessage), status.getMessage(), diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/sink/client/IoTDBClientManager.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/sink/client/IoTDBClientManager.java index 1f76f5d2453f5..f15c60bd7cbfb 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/sink/client/IoTDBClientManager.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/sink/client/IoTDBClientManager.java @@ -21,6 +21,7 @@ import org.apache.iotdb.common.rpc.thrift.TEndPoint; import org.apache.iotdb.commons.audit.UserEntity; +import org.apache.iotdb.commons.i18n.ClientMessages; import org.apache.iotdb.commons.pipe.config.PipeConfig; import org.slf4j.Logger; @@ -107,7 +108,7 @@ public void adjustTimeoutIfNecessary(Throwable e) { if (newConnectionTimeout != CONNECTION_TIMEOUT_MS.get()) { CONNECTION_TIMEOUT_MS.set(newConnectionTimeout); LOGGER.info( - "Pipe connection timeout is adjusted to {} ms ({} mins)", + ClientMessages.LOG_PIPE_CONNECTION_TIMEOUT_ADJUSTED_ARG_MS_ARG_MINS_6D126A53, newConnectionTimeout, newConnectionTimeout / 60000.0); } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/sink/client/IoTDBSyncClient.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/sink/client/IoTDBSyncClient.java index 1ad5d0a855f23..b0407e0a7bfd1 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/sink/client/IoTDBSyncClient.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/sink/client/IoTDBSyncClient.java @@ -22,6 +22,7 @@ import org.apache.iotdb.common.rpc.thrift.TEndPoint; import org.apache.iotdb.commons.client.ThriftClient; import org.apache.iotdb.commons.client.property.ThriftClientProperty; +import org.apache.iotdb.commons.i18n.ClientMessages; import org.apache.iotdb.commons.pipe.sink.payload.thrift.common.PipeTransferSliceReqBuilder; import org.apache.iotdb.pipe.api.exception.PipeConnectionException; import org.apache.iotdb.rpc.DeepCopyRpcTransportFactory; @@ -100,8 +101,8 @@ public TPipeTransferResp pipeTransfer(final TPipeTransferReq req) throws TExcept } LOGGER.warn( - "The body size of the request is too large. The request will be sliced. Origin req: {}-{}. " - + "Request body size: {}, threshold: {}", + ClientMessages.LOG_BODY_SIZE_REQUEST_TOO_LARGE_REQUEST_WILL_SLICED_ORIGIN_REQ_35E73788 + + ClientMessages.LOG_REQUEST_BODY_SIZE_ARG_THRESHOLD_ARG_69B1BE00, req.getVersion(), req.getType(), req.body.limit(), @@ -123,8 +124,13 @@ public TPipeTransferResp pipeTransfer(final TPipeTransferReq req) throws TExcept if (sliceResp.getStatus().getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()) { throw new PipeConnectionException( String.format( - "Failed to transfer slice. Origin req: %s-%s, slice index: %d, slice count: %d. Reason: %s", - req.getVersion(), req.getType(), i, sliceCount, sliceResp.getStatus())); + ClientMessages + .EXCEPTION_FAILED_TRANSFER_SLICE_ORIGIN_REQ_ARG_ARG_SLICE_INDEX_ARG_7219936C, + req.getVersion(), + req.getType(), + i, + sliceCount, + sliceResp.getStatus())); } } @@ -132,7 +138,7 @@ public TPipeTransferResp pipeTransfer(final TPipeTransferReq req) throws TExcept return super.pipeTransfer(req); } catch (final Exception e) { LOGGER.warn( - "Failed to transfer slice. Origin req: {}-{}. Retry the whole transfer.", + ClientMessages.LOG_FAILED_TRANSFER_SLICE_ORIGIN_REQ_ARG_ARG_RETRY_WHOLE_TRANSFER_E1EA2F41, req.getVersion(), req.getType(), e); diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/sink/payload/thrift/common/PipeTransferSliceReqHandler.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/sink/payload/thrift/common/PipeTransferSliceReqHandler.java index 450cedd526cf0..c95d4ec43060c 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/sink/payload/thrift/common/PipeTransferSliceReqHandler.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/sink/payload/thrift/common/PipeTransferSliceReqHandler.java @@ -79,7 +79,7 @@ public boolean receiveSlice(final PipeTransferSliceReq req) { } if (originReqType != req.getOriginReqType()) { LOGGER.warn( - "Origin request type mismatch: expected {}, actual {}", + PipeMessages.LOG_ORIGIN_REQUEST_TYPE_MISMATCH_EXPECTED_ARG_ACTUAL_ARG_D96D10AE, originReqType, req.getOriginReqType()); clear(); @@ -87,7 +87,7 @@ public boolean receiveSlice(final PipeTransferSliceReq req) { } if (originBodySize != req.getOriginBodySize()) { LOGGER.warn( - "Origin body size mismatch: expected {}, actual {}", + PipeMessages.LOG_ORIGIN_BODY_SIZE_MISMATCH_EXPECTED_ARG_ACTUAL_ARG_5D410B75, originBodySize, req.getOriginBodySize()); clear(); @@ -100,7 +100,9 @@ public boolean receiveSlice(final PipeTransferSliceReq req) { } if (sliceBodies.size() != req.getSliceIndex()) { LOGGER.warn( - "Invalid slice index: expected {}, actual {}", sliceBodies.size(), req.getSliceIndex()); + PipeMessages.LOG_INVALID_SLICE_INDEX_EXPECTED_ARG_ACTUAL_ARG_2AC41628, + sliceBodies.size(), + req.getSliceIndex()); clear(); return false; } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/sink/payload/thrift/request/PipeTransferCompressedReq.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/sink/payload/thrift/request/PipeTransferCompressedReq.java index 73bac4c05b401..8f6f36edf1b83 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/sink/payload/thrift/request/PipeTransferCompressedReq.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/sink/payload/thrift/request/PipeTransferCompressedReq.java @@ -19,6 +19,7 @@ package org.apache.iotdb.commons.pipe.sink.payload.thrift.request; +import org.apache.iotdb.commons.i18n.PipeMessages; import org.apache.iotdb.commons.pipe.config.PipeConfig; import org.apache.iotdb.commons.pipe.sink.compressor.PipeCompressor; import org.apache.iotdb.commons.pipe.sink.compressor.PipeCompressorFactory; @@ -120,8 +121,9 @@ private static void checkDecompressedLength(final int decompressedLength) if (decompressedLength < 0 || decompressedLength > maxDecompressedLength) { throw new IllegalArgumentException( String.format( - "Decompressed length should be between 0 and %d, but got %d.", - maxDecompressedLength, decompressedLength)); + PipeMessages.EXCEPTION_DECOMPRESSED_LENGTH_SHOULD_BETWEEN_0_ARG_BUT_GOT_ARG_488B3073, + maxDecompressedLength, + decompressedLength)); } } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/sink/protocol/IoTDBAirGapSink.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/sink/protocol/IoTDBAirGapSink.java index 6d74102ff1940..f43b1abc55f56 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/sink/protocol/IoTDBAirGapSink.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/sink/protocol/IoTDBAirGapSink.java @@ -126,9 +126,7 @@ public void customize( loadBalancer = new PriorityLoadBalancer(); break; default: - LOGGER.warn( - "Unknown load balance strategy: {}, use round-robin strategy instead.", - loadBalanceStrategy); + LOGGER.warn(PipeMessages.UNKNOWN_LOAD_BALANCE_STRATEGY, loadBalanceStrategy); loadBalancer = new RoundRobinLoadBalancer(); } @@ -315,7 +313,8 @@ protected boolean send( protected boolean sendBytes(final AirGapSocket socket, byte[] bytes) throws IOException { if (!socket.isConnected()) { throw new SocketException( - String.format("Socket %s is closed, will try to handshake", socket)); + String.format( + PipeMessages.EXCEPTION_SOCKET_ARG_CLOSED_WILL_TRY_HANDSHAKE_02562BF1, socket)); } final BufferedOutputStream outputStream = new BufferedOutputStream(socket.getOutputStream()); diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/sink/protocol/IoTDBSink.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/sink/protocol/IoTDBSink.java index b5662aeec2ce9..9485ff942ac2b 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/sink/protocol/IoTDBSink.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/sink/protocol/IoTDBSink.java @@ -445,7 +445,9 @@ public void customize( skipIfNoPrivileges = skipIfOptionSet.remove(CONNECTOR_IOTDB_SKIP_IF_NO_PRIVILEGES); if (!skipIfOptionSet.isEmpty()) { throw new PipeParameterNotValidException( - String.format("Parameters in set %s are not allowed in 'skipif'", skipIfOptionSet)); + String.format( + PipeMessages.EXCEPTION_PARAMETERS_SET_ARG_NOT_ALLOWED_SKIPIF_2B9AA054, + skipIfOptionSet)); } LOGGER.info(PipeMessages.IOTDB_SINK_SKIP_IF_NO_PRIVILEGES, skipIfNoPrivileges); @@ -487,7 +489,7 @@ public void customize( SINK_EXCEPTION_DATA_CONVERT_ON_TYPE_MISMATCH_KEY), CONNECTOR_EXCEPTION_DATA_CONVERT_ON_TYPE_MISMATCH_DEFAULT_VALUE); LOGGER.info( - "IoTDBSink {} = {}", + PipeMessages.LOG_IOTDBSINK_ARG_ARG_4E140C06, CONNECTOR_EXCEPTION_DATA_CONVERT_ON_TYPE_MISMATCH_KEY, shouldReceiverConvertOnTypeMismatch); isRealtimeFirst = @@ -497,7 +499,9 @@ public void customize( PipeSinkConstant.SINK_REALTIME_FIRST_KEY), PipeSinkConstant.CONNECTOR_REALTIME_FIRST_DEFAULT_VALUE); LOGGER.info( - "IoTDBSink {} = {}", PipeSinkConstant.CONNECTOR_REALTIME_FIRST_KEY, isRealtimeFirst); + PipeMessages.LOG_IOTDBSINK_ARG_ARG_4E140C06, + PipeSinkConstant.CONNECTOR_REALTIME_FIRST_KEY, + isRealtimeFirst); } protected LinkedHashSet parseNodeUrls(final PipeParameters parameters) diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/sink/protocol/IoTDBSslSyncSink.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/sink/protocol/IoTDBSslSyncSink.java index 6d3c05d3b4f21..e2dccccfd20b7 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/sink/protocol/IoTDBSslSyncSink.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/sink/protocol/IoTDBSslSyncSink.java @@ -218,7 +218,9 @@ protected void transferFilePieces( clientAndStatus.setRight(false); throw new PipeConnectionException( String.format( - "Network error when transfer file %s, because %s.", file, e.getMessage()), + PipeMessages.EXCEPTION_NETWORK_ERROR_TRANSFER_FILE_ARG_BECAUSE_ARG_BC25323C, + file, + e.getMessage()), e); } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/source/IoTDBNonDataRegionSource.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/source/IoTDBNonDataRegionSource.java index f10661e0a05b4..286f373c8a7d9 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/source/IoTDBNonDataRegionSource.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/source/IoTDBNonDataRegionSource.java @@ -85,7 +85,8 @@ public void customize( && (((IoTDBTreePatternOperations) pattern).isPrefixOrFullPath()))) { throw new IllegalArgumentException( String.format( - "The path pattern %s is not valid for the source. Only prefix or full path is allowed.", + PipeMessages + .EXCEPTION_PATH_PATTERN_ARG_NOT_VALID_SOURCE_ONLY_PREFIX_FULL_PATH_784778B8, pattern.getPattern())); } treePattern = (IoTDBTreePatternOperations) pattern; diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/source/IoTDBSource.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/source/IoTDBSource.java index 33acc06123e76..5bcca38fd4d26 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/source/IoTDBSource.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/source/IoTDBSource.java @@ -21,6 +21,7 @@ import org.apache.iotdb.commons.audit.AuditLogOperation; import org.apache.iotdb.commons.audit.UserEntity; +import org.apache.iotdb.commons.i18n.PipeMessages; import org.apache.iotdb.commons.pipe.agent.task.meta.PipeTaskMeta; import org.apache.iotdb.commons.pipe.config.constant.PipeSourceConstant; import org.apache.iotdb.commons.pipe.config.plugin.env.PipeTaskSourceRuntimeEnvironment; @@ -131,7 +132,8 @@ private void validateDoubleLiving(final PipeParameters parameters) { PipeSourceConstant.SOURCE_CAPTURE_TREE_KEY); if (Objects.nonNull(isCaptureTree) && !isCaptureTree) { throw new PipeParameterNotValidException( - "capture.tree can not be specified to false when double living is enabled"); + PipeMessages + .EXCEPTION_CAPTURE_TREE_CAN_NOT_SPECIFIED_FALSE_DOUBLE_LIVING_ENABLED_29A08445); } // check 'capture.table' @@ -141,7 +143,8 @@ private void validateDoubleLiving(final PipeParameters parameters) { PipeSourceConstant.SOURCE_CAPTURE_TABLE_KEY); if (Objects.nonNull(isCaptureTable) && !isCaptureTable) { throw new PipeParameterNotValidException( - "capture.table can not be specified to false when double living is enabled"); + PipeMessages + .EXCEPTION_CAPTURE_TABLE_CAN_NOT_SPECIFIED_FALSE_DOUBLE_LIVING_ENABLED_8AEB8F7B); } // check 'forwarding-pipe-requests' @@ -151,7 +154,8 @@ private void validateDoubleLiving(final PipeParameters parameters) { PipeSourceConstant.SOURCE_FORWARDING_PIPE_REQUESTS_KEY); if (Objects.nonNull(isForwardingPipeRequests) && isForwardingPipeRequests) { throw new PipeParameterNotValidException( - "forwarding-pipe-requests can not be specified to true when double living is enabled"); + PipeMessages + .EXCEPTION_FORWARDING_PIPE_REQUESTS_CAN_NOT_SPECIFIED_TRUE_DOUBLE_LIVING_ENABLED_B000E8A1); } } @@ -230,7 +234,9 @@ public static boolean getSkipIfNoPrivileges(final PipeParameters extractorParame boolean skipIfNoPrivileges = skipIfOptionSet.remove(EXTRACTOR_IOTDB_SKIP_IF_NO_PRIVILEGES); if (!skipIfOptionSet.isEmpty()) { throw new PipeParameterNotValidException( - String.format("Parameters in set %s are not allowed in 'skipif'", skipIfOptionSet)); + String.format( + PipeMessages.EXCEPTION_PARAMETERS_SET_ARG_NOT_ALLOWED_SKIPIF_2B9AA054, + skipIfOptionSet)); } return skipIfNoPrivileges; } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/common/NodeRef.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/common/NodeRef.java index 9f57602863145..00a5ae49ff8a8 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/common/NodeRef.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/common/NodeRef.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.common; +import org.apache.iotdb.commons.i18n.QueryMessages; + import static java.lang.String.format; import static java.lang.System.identityHashCode; import static java.util.Objects.requireNonNull; @@ -28,7 +30,7 @@ public class NodeRef { private final T node; public NodeRef(T node) { - this.node = requireNonNull(node, "node is null"); + this.node = requireNonNull(node, QueryMessages.EXCEPTION_NODE_IS_NULL_C1479F4A); } public static NodeRef of(T node) { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/execution/operator/source/relational/aggregation/grouped/hash/FlatGroupByHash.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/execution/operator/source/relational/aggregation/grouped/hash/FlatGroupByHash.java index 4c1b1bf3c9801..be8069486c520 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/execution/operator/source/relational/aggregation/grouped/hash/FlatGroupByHash.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/execution/operator/source/relational/aggregation/grouped/hash/FlatGroupByHash.java @@ -72,7 +72,8 @@ public FlatGroupByHash( this.groupByChannelCount = hashTypes.size(); this.hasPrecomputedHash = hasPrecomputedHash; - checkArgument(expectedSize > 0, "expectedSize must be greater than zero"); + checkArgument( + expectedSize > 0, QueryMessages.EXCEPTION_EXPECTEDSIZE_MUST_BE_GREATER_THAN_ZERO_DA2E0345); int totalChannels = hashTypes.size() + (hasPrecomputedHash ? 1 : 0); this.currentColumns = new Column[totalChannels]; @@ -159,7 +160,9 @@ public void addNonDictionaryPageWork(Column[] columns) { int lastPosition = 0; int positionCount = columns[0].getPositionCount(); - checkState(lastPosition <= positionCount, "position count out of bound"); + checkState( + lastPosition <= positionCount, + QueryMessages.EXCEPTION_POSITION_COUNT_OUT_OF_BOUND_5513847E); int remainingPositions = positionCount - lastPosition; @@ -186,7 +189,9 @@ public int[] getNonDictionaryPageWork(Column[] columns) { int positionCount = columns[0].getPositionCount(); int[] groupIds = new int[positionCount]; - checkState(lastPosition <= positionCount, "position count out of bound"); + checkState( + lastPosition <= positionCount, + QueryMessages.EXCEPTION_POSITION_COUNT_OUT_OF_BOUND_5513847E); int remainingPositions = positionCount - lastPosition; diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/execution/operator/source/relational/aggregation/grouped/hash/FlatHash.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/execution/operator/source/relational/aggregation/grouped/hash/FlatHash.java index 66cf8986a6d10..1484730dec464 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/execution/operator/source/relational/aggregation/grouped/hash/FlatHash.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/execution/operator/source/relational/aggregation/grouped/hash/FlatHash.java @@ -175,7 +175,7 @@ private static void longToBytes(byte[] desc, int offset, long num) { public long hashPosition(int groupId) { // for spilling - checkArgument(groupId < nextGroupId, "groupId out of range"); + checkArgument(groupId < nextGroupId, QueryMessages.EXCEPTION_GROUPID_OUT_OF_RANGE_8B10E54B); int index = groupRecordIndex[groupId]; byte[] records = getRecords(index); @@ -187,7 +187,7 @@ public long hashPosition(int groupId) { } public void appendTo(int groupId, ColumnBuilder[] columnBuilders) { - checkArgument(groupId < nextGroupId, "groupId out of range"); + checkArgument(groupId < nextGroupId, QueryMessages.EXCEPTION_GROUPID_OUT_OF_RANGE_8B10E54B); int index = groupRecordIndex[groupId]; byte[] records = getRecords(index); int recordOffset = getRecordOffset(index); @@ -361,7 +361,9 @@ private boolean tryRehash(int minimumRequiredCapacity) { // while the rehash is in progress, the old control array is retained, and one additional record // group is retained rehashMemoryReservation = sumExact(sizeOf(control), sizeOf(recordGroups[0])); - verify(rehashMemoryReservation >= 0, "rehashMemoryReservation is negative"); + verify( + rehashMemoryReservation >= 0, + QueryMessages.EXCEPTION_REHASHMEMORYRESERVATION_IS_NEGATIVE_7EFEFCC2); if (!checkMemoryReservation.update()) { return false; } @@ -459,7 +461,9 @@ private void rehash(int minimumRequiredCapacity) { } private int computeNewCapacity(int minimumRequiredCapacity) { - checkArgument(minimumRequiredCapacity >= 0, "minimumRequiredCapacity must be positive"); + checkArgument( + minimumRequiredCapacity >= 0, + QueryMessages.EXCEPTION_MINIMUMREQUIREDCAPACITY_MUST_BE_POSITIVE_81638118); long newCapacityLong = capacity * 2L; while (newCapacityLong < minimumRequiredCapacity) { newCapacityLong = multiplyExact(newCapacityLong, 2); diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/execution/operator/source/relational/aggregation/grouped/hash/MarkDistinctHash.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/execution/operator/source/relational/aggregation/grouped/hash/MarkDistinctHash.java index a2bb02b8b9220..54b58bccf388e 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/execution/operator/source/relational/aggregation/grouped/hash/MarkDistinctHash.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/execution/operator/source/relational/aggregation/grouped/hash/MarkDistinctHash.java @@ -19,6 +19,7 @@ package org.apache.iotdb.commons.queryengine.execution.operator.source.relational.aggregation.grouped.hash; +import org.apache.iotdb.commons.i18n.QueryMessages; import org.apache.iotdb.commons.queryengine.execution.operator.source.relational.aggregation.grouped.UpdateMemory; import com.google.common.annotations.VisibleForTesting; @@ -49,7 +50,8 @@ public long getEstimatedSize() { } public Column markDistinctRows(Column[] columns) { - checkArgument(columns.length > 0, "columns shouldn't be empty here"); + checkArgument( + columns.length > 0, QueryMessages.EXCEPTION_COLUMNS_SHOULDN_QUOTE_T_BE_EMPTY_HERE_34E44AAA); int[] groupIds = groupByHash.getGroupIds(columns); return processNextGroupIds( groupByHash.getGroupCount(), groupIds, columns[0].getPositionCount()); diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/execution/operator/source/relational/aggregation/grouped/hash/VariableWidthData.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/execution/operator/source/relational/aggregation/grouped/hash/VariableWidthData.java index 880eb47762209..5684f55da818d 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/execution/operator/source/relational/aggregation/grouped/hash/VariableWidthData.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/execution/operator/source/relational/aggregation/grouped/hash/VariableWidthData.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.execution.operator.source.relational.aggregation.grouped.hash; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.primitives.Ints; import org.apache.tsfile.utils.RamUsageEstimator; @@ -126,7 +128,7 @@ public byte[] allocate(byte[] pointer, int pointerOffset, int size) { public static int clamp(long value, int min, int max) { if (min > max) { - throw new IllegalArgumentException(min + " > " + max); + throw new IllegalArgumentException(min + QueryMessages.EXCEPTION_GREATER_THAN_0B37D87A + max); } return (int) Math.min(max, Math.max(value, min)); } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/planner/plan/node/PlanNode.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/planner/plan/node/PlanNode.java index 336587f4d5161..b2e74b32af847 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/planner/plan/node/PlanNode.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/planner/plan/node/PlanNode.java @@ -54,7 +54,7 @@ public abstract class PlanNode implements IConsensusRequest { protected PlanNode() {} protected PlanNode(PlanNodeId id) { - requireNonNull(id, "id is null"); + requireNonNull(id, QueryMessages.EXCEPTION_ID_IS_NULL_9D5D27B1); this.id = id; } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/planner/plan/node/TableScanNode.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/planner/plan/node/TableScanNode.java index 65cbb8beb03b0..74f462e0b8b43 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/planner/plan/node/TableScanNode.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/planner/plan/node/TableScanNode.java @@ -20,6 +20,7 @@ package org.apache.iotdb.commons.queryengine.plan.planner.plan.node; import org.apache.iotdb.common.rpc.thrift.TRegionReplicaSet; +import org.apache.iotdb.commons.i18n.QueryMessages; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.source.SourceNode; import org.apache.iotdb.commons.queryengine.plan.relational.metadata.ColumnSchema; import org.apache.iotdb.commons.queryengine.plan.relational.metadata.QualifiedObjectName; @@ -343,7 +344,7 @@ public String toString() { @Override public PlanNode replaceChildren(List newChildren) { - checkArgument(newChildren.isEmpty(), "newChildren is not empty"); + checkArgument(newChildren.isEmpty(), QueryMessages.EXCEPTION_NEWCHILDREN_IS_NOT_EMPTY_170FCE18); return this; } } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/analyzer/NodeRef.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/analyzer/NodeRef.java index 50dd2a0a2588d..168e60cf39651 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/analyzer/NodeRef.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/analyzer/NodeRef.java @@ -19,6 +19,7 @@ package org.apache.iotdb.commons.queryengine.plan.relational.analyzer; +import org.apache.iotdb.commons.i18n.QueryMessages; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Node; import static java.lang.System.identityHashCode; @@ -32,7 +33,7 @@ public static NodeRef of(T node) { private final T node; private NodeRef(T node) { - this.node = requireNonNull(node, "node is null"); + this.node = requireNonNull(node, QueryMessages.EXCEPTION_NODE_IS_NULL_C1479F4A); } public T getNode() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/function/BoundSignature.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/function/BoundSignature.java index 65b8fd78788d6..538480e3acb3e 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/function/BoundSignature.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/function/BoundSignature.java @@ -19,6 +19,7 @@ package org.apache.iotdb.commons.queryengine.plan.relational.function; +import org.apache.iotdb.commons.i18n.QueryMessages; import org.apache.iotdb.commons.queryengine.plan.relational.utils.TypeUtil; import org.apache.tsfile.read.common.type.Type; @@ -41,8 +42,10 @@ public class BoundSignature { private final List argumentTypes; public BoundSignature(String functionName, Type returnType, List argumentTypes) { - this.functionName = requireNonNull(functionName, "functionName is null"); - this.returnType = requireNonNull(returnType, "returnType is null"); + this.functionName = + requireNonNull(functionName, QueryMessages.EXCEPTION_FUNCTIONNAME_IS_NULL_0818CBC7); + this.returnType = + requireNonNull(returnType, QueryMessages.EXCEPTION_RETURNTYPE_IS_NULL_07C7C6A5); this.argumentTypes = argumentTypes; } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/function/FunctionId.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/function/FunctionId.java index 34d195f44176b..5b44355e125e7 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/function/FunctionId.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/function/FunctionId.java @@ -31,7 +31,7 @@ public class FunctionId { private final String id; public FunctionId(String id) { - requireNonNull(id, "id is null"); + requireNonNull(id, QueryMessages.EXCEPTION_ID_IS_NULL_9D5D27B1); if (id.isEmpty()) { throw new IllegalArgumentException(QueryMessages.FUNCTION_ID_MUST_NOT_BE_EMPTY); } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/function/LongVariableConstraint.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/function/LongVariableConstraint.java index c6d105a3ad81c..4af79c129f7dd 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/function/LongVariableConstraint.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/function/LongVariableConstraint.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.function; +import org.apache.iotdb.commons.i18n.QueryMessages; + import java.util.Objects; import static java.util.Objects.requireNonNull; @@ -28,8 +30,9 @@ public class LongVariableConstraint { private final String expression; LongVariableConstraint(String name, String expression) { - this.name = requireNonNull(name, "name is null"); - this.expression = requireNonNull(expression, "expression is null"); + this.name = requireNonNull(name, QueryMessages.EXCEPTION_NAME_IS_NULL_C8B35959); + this.expression = + requireNonNull(expression, QueryMessages.EXCEPTION_EXPRESSION_IS_NULL_16C079B5); } public String getName() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/function/ResolvedFunctionCallBuilder.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/function/ResolvedFunctionCallBuilder.java index e36441116dfcd..61077159263c6 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/function/ResolvedFunctionCallBuilder.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/function/ResolvedFunctionCallBuilder.java @@ -19,6 +19,7 @@ package org.apache.iotdb.commons.queryengine.plan.relational.function; +import org.apache.iotdb.commons.i18n.QueryMessages; import org.apache.iotdb.commons.queryengine.plan.relational.metadata.ResolvedFunction; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Expression; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.FunctionCall; @@ -37,17 +38,18 @@ public static ResolvedFunctionCallBuilder builder(ResolvedFunction resolvedFunct } private ResolvedFunctionCallBuilder(ResolvedFunction resolvedFunction) { - this.resolvedFunction = requireNonNull(resolvedFunction, "resolvedFunction is null"); + this.resolvedFunction = + requireNonNull(resolvedFunction, QueryMessages.EXCEPTION_RESOLVEDFUNCTION_IS_NULL_81B5B93A); } public ResolvedFunctionCallBuilder addArgument(Expression value) { - requireNonNull(value, "value is null"); + requireNonNull(value, QueryMessages.EXCEPTION_VALUE_IS_NULL_192F6BFF); argumentValues.add(value); return this; } public ResolvedFunctionCallBuilder setArguments(List values) { - requireNonNull(values, "values is null"); + requireNonNull(values, QueryMessages.EXCEPTION_VALUES_IS_NULL_F1D7D3D8); argumentValues = new ArrayList<>(values); return this; } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/function/Signature.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/function/Signature.java index ae0797a71534f..7b30431508272 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/function/Signature.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/function/Signature.java @@ -19,6 +19,7 @@ package org.apache.iotdb.commons.queryengine.plan.relational.function; +import org.apache.iotdb.commons.i18n.QueryMessages; import org.apache.iotdb.commons.queryengine.plan.relational.type.TypeSignature; import java.util.ArrayList; @@ -44,13 +45,18 @@ private Signature( TypeSignature returnType, List argumentTypes, boolean variableArity) { - requireNonNull(typeVariableConstraints, "typeVariableConstraints is null"); - requireNonNull(longVariableConstraints, "longVariableConstraints is null"); + requireNonNull( + typeVariableConstraints, QueryMessages.EXCEPTION_TYPEVARIABLECONSTRAINTS_IS_NULL_0A86DA34); + requireNonNull( + longVariableConstraints, QueryMessages.EXCEPTION_LONGVARIABLECONSTRAINTS_IS_NULL_51F80E3C); this.typeVariableConstraints = new ArrayList<>(typeVariableConstraints); this.longVariableConstraints = new ArrayList<>(longVariableConstraints); - this.returnType = requireNonNull(returnType, "returnType is null"); - this.argumentTypes = new ArrayList<>(requireNonNull(argumentTypes, "argumentTypes is null")); + this.returnType = + requireNonNull(returnType, QueryMessages.EXCEPTION_RETURNTYPE_IS_NULL_07C7C6A5); + this.argumentTypes = + new ArrayList<>( + requireNonNull(argumentTypes, QueryMessages.EXCEPTION_ARGUMENTTYPES_IS_NULL_1E377BFD)); this.variableArity = variableArity; } @@ -158,13 +164,17 @@ public Builder variadicTypeParameter(String name, String variadicBound) { public Builder typeVariableConstraint(TypeVariableConstraint typeVariableConstraint) { this.typeVariableConstraints.add( - requireNonNull(typeVariableConstraint, "typeVariableConstraint is null")); + requireNonNull( + typeVariableConstraint, + QueryMessages.EXCEPTION_TYPEVARIABLECONSTRAINT_IS_NULL_18B97042)); return this; } public Builder typeVariableConstraints(List typeVariableConstraints) { this.typeVariableConstraints.addAll( - requireNonNull(typeVariableConstraints, "typeVariableConstraints is null")); + requireNonNull( + typeVariableConstraints, + QueryMessages.EXCEPTION_TYPEVARIABLECONSTRAINTS_IS_NULL_0A86DA34)); return this; } @@ -173,7 +183,8 @@ public Builder typeVariableConstraints(List typeVariable // } public Builder returnType(TypeSignature returnType) { - this.returnType = requireNonNull(returnType, "returnType is null"); + this.returnType = + requireNonNull(returnType, QueryMessages.EXCEPTION_RETURNTYPE_IS_NULL_07C7C6A5); return this; } @@ -187,12 +198,13 @@ public Builder longVariable(String name, String expression) { // } public Builder argumentType(TypeSignature type) { - argumentTypes.add(requireNonNull(type, "type is null")); + argumentTypes.add(requireNonNull(type, QueryMessages.EXCEPTION_TYPE_IS_NULL_16A3D3EB)); return this; } public Builder argumentTypes(List argumentTypes) { - this.argumentTypes.addAll(requireNonNull(argumentTypes, "argumentTypes is null")); + this.argumentTypes.addAll( + requireNonNull(argumentTypes, QueryMessages.EXCEPTION_ARGUMENTTYPES_IS_NULL_1E377BFD)); return this; } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/function/TypeVariableConstraint.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/function/TypeVariableConstraint.java index 8e15a9ed95023..745d7748f74e4 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/function/TypeVariableConstraint.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/function/TypeVariableConstraint.java @@ -46,16 +46,21 @@ private TypeVariableConstraint( Optional variadicBound, Set castableTo, Set castableFrom) { - this.name = requireNonNull(name, "name is null"); + this.name = requireNonNull(name, QueryMessages.EXCEPTION_NAME_IS_NULL_C8B35959); this.comparableRequired = comparableRequired; this.orderableRequired = orderableRequired; - this.variadicBound = requireNonNull(variadicBound, "variadicBound is null"); + this.variadicBound = + requireNonNull(variadicBound, QueryMessages.EXCEPTION_VARIADICBOUND_IS_NULL_33A6BCC2); if (variadicBound.map(bound -> !bound.equalsIgnoreCase("row")).orElse(false)) { throw new IllegalArgumentException( String.format(QueryMessages.VARIADIC_BOUND_MUST_BE_ROW, variadicBound.get())); } - this.castableTo = new HashSet<>(requireNonNull(castableTo, "castableTo is null")); - this.castableFrom = new HashSet<>(requireNonNull(castableFrom, "castableFrom is null")); + this.castableTo = + new HashSet<>( + requireNonNull(castableTo, QueryMessages.EXCEPTION_CASTABLETO_IS_NULL_0F2A5B36)); + this.castableFrom = + new HashSet<>( + requireNonNull(castableFrom, QueryMessages.EXCEPTION_CASTABLEFROM_IS_NULL_DE5158C7)); } public String getName() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/metadata/ColumnMetadata.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/metadata/ColumnMetadata.java index cd33806516378..05c00138eec72 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/metadata/ColumnMetadata.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/metadata/ColumnMetadata.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.metadata; +import org.apache.iotdb.commons.i18n.QueryMessages; + import org.apache.tsfile.read.common.type.Type; import java.util.LinkedHashMap; @@ -52,8 +54,8 @@ private ColumnMetadata( String extraInfo, boolean hidden, Map properties) { - requireNonNull(type, "type is null"); - requireNonNull(properties, "properties is null"); + requireNonNull(type, QueryMessages.EXCEPTION_TYPE_IS_NULL_16A3D3EB); + requireNonNull(properties, QueryMessages.EXCEPTION_PROPERTIES_IS_NULL_57B88B49); this.name = name.toLowerCase(ENGLISH); this.type = type; @@ -171,12 +173,12 @@ private Builder(ColumnMetadata columnMetadata) { } public Builder setName(String name) { - this.name = requireNonNull(name, "name is null"); + this.name = requireNonNull(name, QueryMessages.EXCEPTION_NAME_IS_NULL_C8B35959); return this; } public Builder setType(Type type) { - this.type = requireNonNull(type, "type is null"); + this.type = requireNonNull(type, QueryMessages.EXCEPTION_TYPE_IS_NULL_16A3D3EB); return this; } @@ -186,12 +188,13 @@ public Builder setNullable(boolean nullable) { } public Builder setComment(Optional comment) { - this.comment = requireNonNull(comment, "comment is null"); + this.comment = requireNonNull(comment, QueryMessages.EXCEPTION_COMMENT_IS_NULL_0AD46118); return this; } public Builder setExtraInfo(Optional extraInfo) { - this.extraInfo = requireNonNull(extraInfo, "extraInfo is null"); + this.extraInfo = + requireNonNull(extraInfo, QueryMessages.EXCEPTION_EXTRAINFO_IS_NULL_43AE989F); return this; } @@ -201,7 +204,8 @@ public Builder setHidden(boolean hidden) { } public Builder setProperties(Map properties) { - this.properties = requireNonNull(properties, "properties is null"); + this.properties = + requireNonNull(properties, QueryMessages.EXCEPTION_PROPERTIES_IS_NULL_57B88B49); return this; } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/metadata/ColumnSchema.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/metadata/ColumnSchema.java index 519fde8721356..0a9fd902e094f 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/metadata/ColumnSchema.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/metadata/ColumnSchema.java @@ -19,6 +19,7 @@ package org.apache.iotdb.commons.queryengine.plan.relational.metadata; +import org.apache.iotdb.commons.i18n.QueryMessages; import org.apache.iotdb.commons.queryengine.plan.relational.utils.TypeUtil; import org.apache.iotdb.commons.schema.table.column.TsTableColumnCategory; import org.apache.iotdb.commons.schema.table.column.TsTableColumnSchema; @@ -49,7 +50,7 @@ public ColumnSchema( final Type type, final boolean hidden, final TsTableColumnCategory columnCategory) { - requireNonNull(name, "name is null"); + requireNonNull(name, QueryMessages.EXCEPTION_NAME_IS_NULL_C8B35959); this.name = name.toLowerCase(ENGLISH); this.type = type; @@ -162,17 +163,18 @@ private Builder(ColumnMetadata columnMetadata) { } public Builder setName(String name) { - this.name = requireNonNull(name, "name is null"); + this.name = requireNonNull(name, QueryMessages.EXCEPTION_NAME_IS_NULL_C8B35959); return this; } public Builder setType(Type type) { - this.type = requireNonNull(type, "type is null"); + this.type = requireNonNull(type, QueryMessages.EXCEPTION_TYPE_IS_NULL_16A3D3EB); return this; } public Builder setColumnCategory(TsTableColumnCategory columnCategory) { - this.columnCategory = requireNonNull(columnCategory, "columnCategory is null"); + this.columnCategory = + requireNonNull(columnCategory, QueryMessages.EXCEPTION_COLUMNCATEGORY_IS_NULL_0075924B); return this; } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/metadata/FunctionNullability.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/metadata/FunctionNullability.java index 237b1cc73cef2..6555e5877153e 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/metadata/FunctionNullability.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/metadata/FunctionNullability.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.metadata; +import org.apache.iotdb.commons.i18n.QueryMessages; + import org.apache.tsfile.utils.ReadWriteIOUtils; import java.io.DataOutputStream; @@ -39,7 +41,9 @@ public class FunctionNullability { public FunctionNullability(boolean returnNullable, List argumentNullable) { this.returnNullable = returnNullable; this.argumentNullable = - new ArrayList<>(requireNonNull(argumentNullable, "argumentNullable is null")); + new ArrayList<>( + requireNonNull( + argumentNullable, QueryMessages.EXCEPTION_ARGUMENTNULLABLE_IS_NULL_0CC221D3)); } public static FunctionNullability getAggregationFunctionNullability(int argumentsNumber) { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/metadata/MetadataUtil.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/metadata/MetadataUtil.java index ab1787b965d2e..b138d5888faae 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/metadata/MetadataUtil.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/metadata/MetadataUtil.java @@ -59,14 +59,18 @@ public static String checkLowerCase(String value, String name) { if (value == null) { throw new NullPointerException(format(SchemaMessages.S_IS_NULL, name)); } - checkArgument(value.equals(value.toLowerCase(ENGLISH)), "%s is not lowercase: %s", name, value); + checkArgument( + value.equals(value.toLowerCase(ENGLISH)), + SchemaMessages.EXCEPTION_ARG_IS_NOT_LOWERCASE_COLON_ARG_D78298F6, + name, + value); return value; } public static QualifiedObjectName createQualifiedObjectName( final SessionInfo session, final QualifiedName name) { - requireNonNull(session, "session is null"); - requireNonNull(name, "name is null"); + requireNonNull(session, SchemaMessages.EXCEPTION_SESSION_IS_NULL_6CF0F47D); + requireNonNull(name, SchemaMessages.EXCEPTION_NAME_IS_NULL_C8B35959); if (name.getParts().size() > 2) { throw new SemanticException(String.format(SchemaMessages.TOO_MANY_DOTS_IN_TABLE_NAME, name)); } @@ -81,7 +85,8 @@ public static QualifiedObjectName createQualifiedObjectName( .orElseThrow( () -> new SemanticException( - "Database must be specified when session database is not set")); + SchemaMessages + .EXCEPTION_DATABASE_MUST_SPECIFIED_SESSION_DATABASE_NOT_SET_CBF6F21F)); return new QualifiedObjectName(databaseName, objectName); } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/metadata/QualifiedObjectName.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/metadata/QualifiedObjectName.java index 3c733b1a2bb3f..0e6aa7aaaffca 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/metadata/QualifiedObjectName.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/metadata/QualifiedObjectName.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.metadata; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.errorprone.annotations.Immutable; import java.util.Objects; @@ -37,9 +39,9 @@ public class QualifiedObjectName { Pattern.compile("(?" + COMPONENT + ")\\.(?" + COMPONENT + ")"); public static QualifiedObjectName valueOf(String name) { - requireNonNull(name, "name is null"); + requireNonNull(name, QueryMessages.EXCEPTION_NAME_IS_NULL_C8B35959); Matcher matcher = PATTERN.matcher(name); - checkArgument(matcher.matches(), "Invalid name %s", name); + checkArgument(matcher.matches(), QueryMessages.EXCEPTION_INVALID_NAME_ARG_AD3FA0BF, name); return new QualifiedObjectName( unquoteIfNeeded(matcher.group("database")), unquoteIfNeeded(matcher.group("table"))); } @@ -89,7 +91,10 @@ private static String unquoteIfNeeded(String name) { if (name.isEmpty() || name.charAt(0) != '"') { return name; } - checkArgument(name.charAt(name.length() - 1) == '"', "Invalid name: [%s]", name); + checkArgument( + name.charAt(name.length() - 1) == '"', + QueryMessages.EXCEPTION_INVALID_NAME_COLON_LEFT_BRACKET_ARG_RIGHT_BRACKET_C46F15A4, + name); return name.substring(1, name.length() - 1).replace("\"\"", "\""); } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/metadata/ResolvedFunction.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/metadata/ResolvedFunction.java index 09a285a8b3537..8471ec388d173 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/metadata/ResolvedFunction.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/metadata/ResolvedFunction.java @@ -19,6 +19,7 @@ package org.apache.iotdb.commons.queryengine.plan.relational.metadata; +import org.apache.iotdb.commons.i18n.QueryMessages; import org.apache.iotdb.commons.queryengine.plan.relational.function.BoundSignature; import org.apache.iotdb.commons.queryengine.plan.relational.function.FunctionId; import org.apache.iotdb.commons.queryengine.plan.relational.function.FunctionKind; @@ -46,11 +47,15 @@ public ResolvedFunction( FunctionKind functionKind, boolean deterministic, FunctionNullability functionNullability) { - this.signature = requireNonNull(signature, "signature is null"); - this.functionId = requireNonNull(functionId, "functionId is null"); - this.functionKind = requireNonNull(functionKind, "functionKind is null"); + this.signature = requireNonNull(signature, QueryMessages.EXCEPTION_SIGNATURE_IS_NULL_CA3D8772); + this.functionId = + requireNonNull(functionId, QueryMessages.EXCEPTION_FUNCTIONID_IS_NULL_F91F8E89); + this.functionKind = + requireNonNull(functionKind, QueryMessages.EXCEPTION_FUNCTIONKIND_IS_NULL_EDF86E36); this.deterministic = deterministic; - this.functionNullability = requireNonNull(functionNullability, "functionNullability is null"); + this.functionNullability = + requireNonNull( + functionNullability, QueryMessages.EXCEPTION_FUNCTIONNULLABILITY_IS_NULL_6EF52FB4); } public BoundSignature getSignature() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/Assignments.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/Assignments.java index 5374566055511..f7258d6bde974 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/Assignments.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/Assignments.java @@ -19,6 +19,7 @@ package org.apache.iotdb.commons.queryengine.plan.relational.planner; +import org.apache.iotdb.commons.i18n.QueryMessages; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Expression; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.SymbolReference; @@ -74,7 +75,8 @@ public static Assignments of( } public Assignments(Map assignments) { - this.assignments = requireNonNull(assignments, "assignments is null"); + this.assignments = + requireNonNull(assignments, QueryMessages.EXCEPTION_ASSIGNMENTS_IS_NULL_1FD6142D); } public List getOutputs() { @@ -191,8 +193,9 @@ public static class Assignment { private final Expression expression; public Assignment(Symbol output, Expression expression) { - this.output = requireNonNull(output, "output is null"); - this.expression = requireNonNull(expression, "expression is null"); + this.output = requireNonNull(output, QueryMessages.EXCEPTION_OUTPUT_IS_NULL_3CDA316E); + this.expression = + requireNonNull(expression, QueryMessages.EXCEPTION_EXPRESSION_IS_NULL_16C079B5); } public Symbol getOutput() { @@ -223,7 +226,8 @@ public Builder put(Symbol symbol, Expression expression) { Expression assignment = assignments.get(symbol); checkState( assignment.equals(expression), - "Symbol %s already has assignment %s, while adding %s", + QueryMessages + .EXCEPTION_SYMBOL_ARG_ALREADY_HAS_ASSIGNMENT_ARG_COMMA_WHILE_ADDING_ARG_EE8CADA3, symbol, assignment, expression); diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/DataOrganizationSpecification.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/DataOrganizationSpecification.java index 54a7e537a447b..9b3296f3e9275 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/DataOrganizationSpecification.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/DataOrganizationSpecification.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.planner; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.ReadWriteIOUtils; @@ -38,7 +40,8 @@ public class DataOrganizationSpecification { public DataOrganizationSpecification( List partitionBy, Optional orderingScheme) { this.partitionBy = ImmutableList.copyOf(partitionBy); - this.orderingScheme = requireNonNull(orderingScheme, "orderingScheme is null"); + this.orderingScheme = + requireNonNull(orderingScheme, QueryMessages.EXCEPTION_ORDERINGSCHEME_IS_NULL_4D4D2F6F); } public List getPartitionBy() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/OrderingScheme.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/OrderingScheme.java index 95a4503ef85a8..bfedcb5fc772c 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/OrderingScheme.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/OrderingScheme.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.planner; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; @@ -43,12 +45,12 @@ public class OrderingScheme { private final Map orderings; public OrderingScheme(List orderBy, Map orderings) { - requireNonNull(orderBy, "orderBy is null"); - requireNonNull(orderings, "orderings is null"); - checkArgument(!orderBy.isEmpty(), "orderBy is empty"); + requireNonNull(orderBy, QueryMessages.EXCEPTION_ORDERBY_IS_NULL_AA2494DE); + requireNonNull(orderings, QueryMessages.EXCEPTION_ORDERINGS_IS_NULL_59B1C097); + checkArgument(!orderBy.isEmpty(), QueryMessages.EXCEPTION_ORDERBY_IS_EMPTY_963405E0); checkArgument( orderings.keySet().equals(ImmutableSet.copyOf(orderBy)), - "orderBy keys and orderings don't match"); + QueryMessages.EXCEPTION_ORDERBY_KEYS_AND_ORDERINGS_DON_QUOTE_T_MATCH_E0334493); this.orderBy = ImmutableList.copyOf(orderBy); this.orderings = ImmutableMap.copyOf(orderings); } @@ -66,7 +68,10 @@ public List getOrderingList() { } public SortOrder getOrdering(Symbol symbol) { - checkArgument(orderings.containsKey(symbol), "No ordering for symbol: %s", symbol); + checkArgument( + orderings.containsKey(symbol), + QueryMessages.EXCEPTION_NO_ORDERING_FOR_SYMBOL_COLON_ARG_F54E70FC, + symbol); return orderings.get(symbol); } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/Symbol.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/Symbol.java index c96a7cd507207..a51787d698a93 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/Symbol.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/Symbol.java @@ -19,6 +19,7 @@ package org.apache.iotdb.commons.queryengine.plan.relational.planner; +import org.apache.iotdb.commons.i18n.QueryMessages; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Expression; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.SymbolReference; @@ -35,17 +36,20 @@ public class Symbol implements Comparable { private final String name; public static Symbol from(Expression expression) { - checkArgument(expression instanceof SymbolReference, "Unexpected expression: %s", expression); + checkArgument( + expression instanceof SymbolReference, + QueryMessages.EXCEPTION_UNEXPECTED_EXPRESSION_COLON_ARG_8E4AC833, + expression); return new Symbol(((SymbolReference) expression).getName()); } public Symbol(String name) { - requireNonNull(name, "name is null"); + requireNonNull(name, QueryMessages.EXCEPTION_NAME_IS_NULL_C8B35959); this.name = name; } public static Symbol of(String name) { - requireNonNull(name, "name is null"); + requireNonNull(name, QueryMessages.EXCEPTION_NAME_IS_NULL_C8B35959); return new Symbol(name); } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/AggregationNode.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/AggregationNode.java index 610e77ff97ed4..688dc0b4f0461 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/AggregationNode.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/AggregationNode.java @@ -19,6 +19,7 @@ package org.apache.iotdb.commons.queryengine.plan.relational.planner.node; +import org.apache.iotdb.commons.i18n.QueryMessages; import org.apache.iotdb.commons.queryengine.plan.expression.multi.FunctionType; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.ICoreQueryPlanVisitor; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.IPlanVisitor; @@ -90,15 +91,17 @@ public AggregationNode( Optional groupIdSymbol) { super(id); this.child = source; - this.aggregations = ImmutableMap.copyOf(requireNonNull(aggregations, "aggregations is null")); + this.aggregations = + ImmutableMap.copyOf( + requireNonNull(aggregations, QueryMessages.EXCEPTION_AGGREGATIONS_IS_NULL_CFE9CD2E)); aggregations.values().forEach(aggregation -> aggregation.verifyArguments(step)); - requireNonNull(groupingSets, "groupingSets is null"); + requireNonNull(groupingSets, QueryMessages.EXCEPTION_GROUPINGSETS_IS_NULL_8EE6D9BF); groupIdSymbol.ifPresent( symbol -> checkArgument( groupingSets.getGroupingKeys().contains(symbol), - "Grouping columns does not contain groupId column")); + QueryMessages.EXCEPTION_GROUPING_COLUMNS_DOES_NOT_CONTAIN_GROUPID_COLUMN_83976C83)); this.groupingSets = groupingSets; this.groupIdSymbol = requireNonNull(groupIdSymbol); @@ -108,16 +111,18 @@ public AggregationNode( .map(Aggregation::getOrderingScheme) .noneMatch(Optional::isPresent); checkArgument( - noOrderBy || step == Step.SINGLE, "ORDER BY does not support distributed aggregation"); + noOrderBy || step == Step.SINGLE, + QueryMessages.EXCEPTION_ORDER_BY_DOES_NOT_SUPPORT_DISTRIBUTED_AGGREGATION_05109B26); this.step = step; this.hashSymbol = hashSymbol; - requireNonNull(preGroupedSymbols, "preGroupedSymbols is null"); + requireNonNull(preGroupedSymbols, QueryMessages.EXCEPTION_PREGROUPEDSYMBOLS_IS_NULL_DC24FF7B); checkArgument( preGroupedSymbols.isEmpty() || groupingSets.getGroupingKeys().containsAll(preGroupedSymbols), - "Pre-grouped symbols must be a subset of the grouping keys"); + QueryMessages + .EXCEPTION_PRE_MINUS_GROUPED_SYMBOLS_MUST_BE_A_SUBSET_OF_THE_GROUPING_KEYS_AFC6C33D); this.preGroupedSymbols = ImmutableList.copyOf(preGroupedSymbols); ImmutableList.Builder outputs = ImmutableList.builder(); @@ -373,16 +378,21 @@ public static class GroupingSetDescriptor { public GroupingSetDescriptor( List groupingKeys, int groupingSetCount, Set globalGroupingSets) { - requireNonNull(globalGroupingSets, "globalGroupingSets is null"); - checkArgument(groupingSetCount > 0, "grouping set count must be larger than 0"); + requireNonNull( + globalGroupingSets, QueryMessages.EXCEPTION_GLOBALGROUPINGSETS_IS_NULL_5B175B47); + checkArgument( + groupingSetCount > 0, + QueryMessages.EXCEPTION_GROUPING_SET_COUNT_MUST_BE_LARGER_THAN_0_06FE609E); checkArgument( globalGroupingSets.size() <= groupingSetCount, - "list of empty global grouping sets must be no larger than grouping set count"); - requireNonNull(groupingKeys, "groupingKeys is null"); + QueryMessages + .EXCEPTION_LIST_OF_EMPTY_GLOBAL_GROUPING_SETS_MUST_BE_NO_LARGER_THAN_GROUPING_SET_COUNT_12DAD147); + requireNonNull(groupingKeys, QueryMessages.EXCEPTION_GROUPINGKEYS_IS_NULL_90D11F0C); if (groupingKeys.isEmpty()) { checkArgument( !globalGroupingSets.isEmpty(), - "no grouping keys implies at least one global grouping set, but none provided"); + QueryMessages + .EXCEPTION_NO_GROUPING_KEYS_IMPLIES_AT_LEAST_ONE_GLOBAL_GROUPING_SET_COMMA_BUT_NONE_PROVIDE_F099B6D2); } this.groupingKeys = ImmutableList.copyOf(groupingKeys); @@ -506,18 +516,23 @@ public Aggregation( Optional filter, Optional orderingScheme, Optional mask) { - this.resolvedFunction = requireNonNull(resolvedFunction, "resolvedFunction is null"); - this.arguments = ImmutableList.copyOf(requireNonNull(arguments, "arguments is null")); + this.resolvedFunction = + requireNonNull( + resolvedFunction, QueryMessages.EXCEPTION_RESOLVEDFUNCTION_IS_NULL_81B5B93A); + this.arguments = + ImmutableList.copyOf( + requireNonNull(arguments, QueryMessages.EXCEPTION_ARGUMENTS_IS_NULL_B1F6D4F2)); for (Expression argument : arguments) { checkArgument( argument instanceof SymbolReference, - "argument must be symbol: %s", + QueryMessages.EXCEPTION_ARGUMENT_MUST_BE_SYMBOL_COLON_ARG_9C176D4D, argument.getClass().getSimpleName()); } this.distinct = distinct; - this.filter = requireNonNull(filter, "filter is null"); - this.orderingScheme = requireNonNull(orderingScheme, "orderingScheme is null"); - this.mask = requireNonNull(mask, "mask is null"); + this.filter = requireNonNull(filter, QueryMessages.EXCEPTION_FILTER_IS_NULL_8F83BD19); + this.orderingScheme = + requireNonNull(orderingScheme, QueryMessages.EXCEPTION_ORDERINGSCHEME_IS_NULL_4D4D2F6F); + this.mask = requireNonNull(mask, QueryMessages.EXCEPTION_MASK_IS_NULL_5A7CEA49); } public ResolvedFunction getResolvedFunction() { @@ -586,7 +601,8 @@ public void verifyArguments(Step step) { checkArgument( expectedArgumentCount == arguments.size(), - "%s aggregation function %s has %s arguments, but %s arguments were provided to function call", + QueryMessages + .EXCEPTION_ARG_AGGREGATION_FUNCTION_ARG_HAS_ARG_ARGUMENTS_COMMA_BUT_ARG_ARGUMENTS_WERE_PROV_53CC06CF, step, resolvedFunction.getSignature(), expectedArgumentCount, @@ -668,7 +684,7 @@ public static class Builder { private Optional groupIdSymbol; public Builder(AggregationNode node) { - requireNonNull(node, "node is null"); + requireNonNull(node, QueryMessages.EXCEPTION_NODE_IS_NULL_C1479F4A); this.id = node.getPlanNodeId(); this.source = node.getChild(); this.aggregations = node.getAggregations(); @@ -680,42 +696,48 @@ public Builder(AggregationNode node) { } public Builder setId(PlanNodeId id) { - this.id = requireNonNull(id, "id is null"); + this.id = requireNonNull(id, QueryMessages.EXCEPTION_ID_IS_NULL_9D5D27B1); return this; } public Builder setSource(PlanNode source) { - this.source = requireNonNull(source, "source is null"); + this.source = requireNonNull(source, QueryMessages.EXCEPTION_SOURCE_IS_NULL_45946547); return this; } public Builder setAggregations(Map aggregations) { - this.aggregations = requireNonNull(aggregations, "aggregations is null"); + this.aggregations = + requireNonNull(aggregations, QueryMessages.EXCEPTION_AGGREGATIONS_IS_NULL_CFE9CD2E); return this; } public Builder setGroupingSets(GroupingSetDescriptor groupingSets) { - this.groupingSets = requireNonNull(groupingSets, "groupingSets is null"); + this.groupingSets = + requireNonNull(groupingSets, QueryMessages.EXCEPTION_GROUPINGSETS_IS_NULL_8EE6D9BF); return this; } public Builder setPreGroupedSymbols(List preGroupedSymbols) { - this.preGroupedSymbols = requireNonNull(preGroupedSymbols, "preGroupedSymbols is null"); + this.preGroupedSymbols = + requireNonNull( + preGroupedSymbols, QueryMessages.EXCEPTION_PREGROUPEDSYMBOLS_IS_NULL_DC24FF7B); return this; } public Builder setStep(Step step) { - this.step = requireNonNull(step, "step is null"); + this.step = requireNonNull(step, QueryMessages.EXCEPTION_STEP_IS_NULL_F83262DA); return this; } public Builder setHashSymbol(Optional hashSymbol) { - this.hashSymbol = requireNonNull(hashSymbol, "hashSymbol is null"); + this.hashSymbol = + requireNonNull(hashSymbol, QueryMessages.EXCEPTION_HASHSYMBOL_IS_NULL_1BD487F2); return this; } public Builder setGroupIdSymbol(Optional groupIdSymbol) { - this.groupIdSymbol = requireNonNull(groupIdSymbol, "groupIdSymbol is null"); + this.groupIdSymbol = + requireNonNull(groupIdSymbol, QueryMessages.EXCEPTION_GROUPIDSYMBOL_IS_NULL_BFD3763D); return this; } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/ApplyNode.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/ApplyNode.java index 17908dc4d6337..e5712c448beab 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/ApplyNode.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/ApplyNode.java @@ -19,6 +19,7 @@ package org.apache.iotdb.commons.queryengine.plan.relational.planner.node; +import org.apache.iotdb.commons.i18n.QueryMessages; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.ICoreQueryPlanVisitor; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.IPlanVisitor; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.PlanNode; @@ -74,14 +75,15 @@ public ApplyNode( List correlation, Node originSubquery) { super(id, input, subquery); - requireNonNull(subqueryAssignments, "subqueryAssignments is null"); - requireNonNull(correlation, "correlation is null"); - requireNonNull(originSubquery, "originSubquery is null"); + requireNonNull( + subqueryAssignments, QueryMessages.EXCEPTION_SUBQUERYASSIGNMENTS_IS_NULL_946CDC43); + requireNonNull(correlation, QueryMessages.EXCEPTION_CORRELATION_IS_NULL_F8327EAD); + requireNonNull(originSubquery, QueryMessages.EXCEPTION_ORIGINSUBQUERY_IS_NULL_8EFEB8D5); if (input != null) { checkArgument( input.getOutputSymbols().containsAll(correlation), - "Input does not contain symbols from correlation"); + QueryMessages.EXCEPTION_INPUT_DOES_NOT_CONTAIN_SYMBOLS_FROM_CORRELATION_1B3DB7BF); } this.subqueryAssignments = subqueryAssignments; @@ -124,7 +126,9 @@ public R accept(IPlanVisitor visitor, C context) { @Override public PlanNode replaceChildren(List newChildren) { - checkArgument(newChildren.size() == 2, "expected newChildren to contain 2 nodes"); + checkArgument( + newChildren.size() == 2, + QueryMessages.EXCEPTION_EXPECTED_NEWCHILDREN_TO_CONTAIN_2_NODES_25FE7927); return new ApplyNode( getPlanNodeId(), newChildren.get(0), diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/AssignUniqueId.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/AssignUniqueId.java index 62452561bc3ac..341446d381f86 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/AssignUniqueId.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/AssignUniqueId.java @@ -19,6 +19,7 @@ package org.apache.iotdb.commons.queryengine.plan.relational.planner.node; +import org.apache.iotdb.commons.i18n.QueryMessages; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.ICoreQueryPlanVisitor; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.IPlanVisitor; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.PlanNode; @@ -44,7 +45,7 @@ public class AssignUniqueId extends SingleChildProcessNode { public AssignUniqueId(PlanNodeId id, PlanNode child, Symbol idColumn) { super(id); this.child = child; - this.idColumn = requireNonNull(idColumn, "idColumn is null"); + this.idColumn = requireNonNull(idColumn, QueryMessages.EXCEPTION_IDCOLUMN_IS_NULL_FA206D71); } @Override @@ -65,7 +66,9 @@ public PlanNode clone() { @Override public PlanNode replaceChildren(List newChildren) { - checkArgument(newChildren.size() == 1, "expected newChildren to contain 1 node"); + checkArgument( + newChildren.size() == 1, + QueryMessages.EXCEPTION_EXPECTED_NEWCHILDREN_TO_CONTAIN_1_NODE_7A97D180); return new AssignUniqueId(getPlanNodeId(), Iterables.getOnlyElement(newChildren), idColumn); } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/CollectNode.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/CollectNode.java index 63c9040f6d319..6218f0613146e 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/CollectNode.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/CollectNode.java @@ -19,6 +19,7 @@ package org.apache.iotdb.commons.queryengine.plan.relational.planner.node; +import org.apache.iotdb.commons.i18n.QueryMessages; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.ICoreQueryPlanVisitor; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.IPlanVisitor; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.PlanNode; @@ -82,7 +83,9 @@ public List getOutputColumnNames() { @Override public PlanNode replaceChildren(List newChildren) { - checkArgument(children.size() == newChildren.size(), "wrong number of new children"); + checkArgument( + children.size() == newChildren.size(), + QueryMessages.EXCEPTION_WRONG_NUMBER_OF_NEW_CHILDREN_817AF800); return new CollectNode(id, newChildren, outputSymbols); } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/CorrelatedJoinNode.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/CorrelatedJoinNode.java index 3f76a779833f7..ef867bf263722 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/CorrelatedJoinNode.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/CorrelatedJoinNode.java @@ -19,6 +19,7 @@ package org.apache.iotdb.commons.queryengine.plan.relational.planner.node; +import org.apache.iotdb.commons.i18n.QueryMessages; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.ICoreQueryPlanVisitor; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.IPlanVisitor; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.PlanNode; @@ -66,21 +67,21 @@ public CorrelatedJoinNode( Expression filter, Node originSubquery) { super(id, input, subquery); - requireNonNull(correlation, "correlation is null"); - requireNonNull(filter, "filter is null"); + requireNonNull(correlation, QueryMessages.EXCEPTION_CORRELATION_IS_NULL_F8327EAD); + requireNonNull(filter, QueryMessages.EXCEPTION_FILTER_IS_NULL_8F83BD19); // The condition doesn't guarantee that filter is of type boolean, but was found to be a // practical way to identify // places where CorrelatedJoinNode could be created without appropriate coercions. checkArgument( !(filter instanceof NullLiteral), - "Filter must be an expression of boolean type: %s", + QueryMessages.EXCEPTION_FILTER_MUST_BE_AN_EXPRESSION_OF_BOOLEAN_TYPE_COLON_ARG_F358F1A8, filter); - requireNonNull(originSubquery, "originSubquery is null"); + requireNonNull(originSubquery, QueryMessages.EXCEPTION_ORIGINSUBQUERY_IS_NULL_8EFEB8D5); if (input != null) { checkArgument( input.getOutputSymbols().containsAll(correlation), - "Input does not contain symbols from correlation"); + QueryMessages.EXCEPTION_INPUT_DOES_NOT_CONTAIN_SYMBOLS_FROM_CORRELATION_1B3DB7BF); } this.correlation = ImmutableList.copyOf(correlation); @@ -127,7 +128,9 @@ public List getOutputSymbols() { @Override public PlanNode replaceChildren(List newChildren) { - checkArgument(newChildren.size() == 2, "expected newChildren to contain 2 nodes"); + checkArgument( + newChildren.size() == 2, + QueryMessages.EXCEPTION_EXPECTED_NEWCHILDREN_TO_CONTAIN_2_NODES_25FE7927); return new CorrelatedJoinNode( getPlanNodeId(), newChildren.get(0), diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/ExceptNode.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/ExceptNode.java index 268576e53e4ec..13c2d1e1c68d4 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/ExceptNode.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/ExceptNode.java @@ -19,6 +19,7 @@ package org.apache.iotdb.commons.queryengine.plan.relational.planner.node; +import org.apache.iotdb.commons.i18n.QueryMessages; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.ICoreQueryPlanVisitor; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.IPlanVisitor; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.PlanNode; @@ -78,18 +79,18 @@ public List getOutputColumnNames() { @Override protected void serializeAttributes(ByteBuffer byteBuffer) { throw new UnsupportedOperationException( - "ExceptNode should never be serialized in current version"); + QueryMessages.EXCEPTION_EXCEPTNODE_SHOULD_NEVER_SERIALIZED_CURRENT_VERSION_6F5B4EE0); } @Override protected void serializeAttributes(DataOutputStream stream) throws IOException { throw new UnsupportedOperationException( - "ExceptNode should never be serialized in current version"); + QueryMessages.EXCEPTION_EXCEPTNODE_SHOULD_NEVER_SERIALIZED_CURRENT_VERSION_6F5B4EE0); } public static ExceptNode deserialize(ByteBuffer byteBuffer) { throw new UnsupportedOperationException( - "ExceptNode should never be deserialized in current version"); + QueryMessages.EXCEPTION_EXCEPTNODE_SHOULD_NEVER_DESERIALIZED_CURRENT_VERSION_690C18F0); } @Override diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/IntersectNode.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/IntersectNode.java index f3e67f82eddf5..37a7467a65df8 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/IntersectNode.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/IntersectNode.java @@ -19,6 +19,7 @@ package org.apache.iotdb.commons.queryengine.plan.relational.planner.node; +import org.apache.iotdb.commons.i18n.QueryMessages; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.ICoreQueryPlanVisitor; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.IPlanVisitor; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.PlanNode; @@ -77,18 +78,18 @@ public List getOutputColumnNames() { @Override protected void serializeAttributes(ByteBuffer byteBuffer) { throw new UnsupportedOperationException( - "IntersectNode should never be serialized in current version"); + QueryMessages.EXCEPTION_INTERSECTNODE_SHOULD_NEVER_SERIALIZED_CURRENT_VERSION_68D2C0D3); } @Override protected void serializeAttributes(DataOutputStream stream) throws IOException { throw new UnsupportedOperationException( - "IntersectNode should never be serialized in current version"); + QueryMessages.EXCEPTION_INTERSECTNODE_SHOULD_NEVER_SERIALIZED_CURRENT_VERSION_68D2C0D3); } public static IntersectNode deserialize(ByteBuffer byteBuffer) { throw new UnsupportedOperationException( - "IntersectNode should never be deserialized in current version"); + QueryMessages.EXCEPTION_INTERSECTNODE_SHOULD_NEVER_DESERIALIZED_CURRENT_VERSION_A3614371); } @Override diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/JoinNode.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/JoinNode.java index 222e39eb7c795..4db22ed5b3ddb 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/JoinNode.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/JoinNode.java @@ -79,23 +79,23 @@ public JoinNode( Optional filter, Optional spillable) { super(id); - requireNonNull(joinType, "type is null"); - requireNonNull(leftChild, "left is null"); - requireNonNull(rightChild, "right is null"); - requireNonNull(criteria, "criteria is null"); - requireNonNull(leftOutputSymbols, "leftOutputSymbols is null"); - requireNonNull(rightOutputSymbols, "rightOutputSymbols is null"); - requireNonNull(filter, "filter is null"); + requireNonNull(joinType, QueryMessages.EXCEPTION_TYPE_IS_NULL_16A3D3EB); + requireNonNull(leftChild, QueryMessages.EXCEPTION_LEFT_IS_NULL_2C1080C5); + requireNonNull(rightChild, QueryMessages.EXCEPTION_RIGHT_IS_NULL_97BD6491); + requireNonNull(criteria, QueryMessages.EXCEPTION_CRITERIA_IS_NULL_2996D1A3); + requireNonNull(leftOutputSymbols, QueryMessages.EXCEPTION_LEFTOUTPUTSYMBOLS_IS_NULL_083AE900); + requireNonNull(rightOutputSymbols, QueryMessages.EXCEPTION_RIGHTOUTPUTSYMBOLS_IS_NULL_F44B848F); + requireNonNull(filter, QueryMessages.EXCEPTION_FILTER_IS_NULL_8F83BD19); // The condition doesn't guarantee that filter is of type boolean, but was found to be a // practical way to identify // places where JoinNode could be created without appropriate coercions. checkArgument( !filter.isPresent() || !(filter.get() instanceof NullLiteral), - "Filter must be an expression of boolean type: %s", + QueryMessages.EXCEPTION_FILTER_MUST_BE_AN_EXPRESSION_OF_BOOLEAN_TYPE_COLON_ARG_F358F1A8, filter); // requireNonNull(leftHashSymbol, "leftHashSymbol is null"); // requireNonNull(rightHashSymbol, "rightHashSymbol is null"); - requireNonNull(spillable, "spillable is null"); + requireNonNull(spillable, QueryMessages.EXCEPTION_SPILLABLE_IS_NULL_8226EA70); this.joinType = joinType; this.leftChild = leftChild; @@ -115,10 +115,11 @@ public JoinNode( checkArgument( leftSymbols.containsAll(leftOutputSymbols), - "Left source inputs do not contain all left output symbols"); + QueryMessages.EXCEPTION_LEFT_SOURCE_INPUTS_DO_NOT_CONTAIN_ALL_LEFT_OUTPUT_SYMBOLS_71459E3B); checkArgument( rightSymbols.containsAll(rightOutputSymbols), - "Right source inputs do not contain all right output symbols"); + QueryMessages + .EXCEPTION_RIGHT_SOURCE_INPUTS_DO_NOT_CONTAIN_ALL_RIGHT_OUTPUT_SYMBOLS_23EBC024); // checkArgument( // !(criteria.isEmpty() && leftHashSymbol.isPresent()), @@ -132,7 +133,8 @@ public JoinNode( checkArgument( leftSymbols.contains(equiJoinClause.getLeft()) && rightSymbols.contains(equiJoinClause.getRight()), - "Equality join criteria should be normalized according to join sides: %s", + QueryMessages + .EXCEPTION_EQUALITY_JOIN_CRITERIA_SHOULD_BE_NORMALIZED_ACCORDING_TO_JOIN_SIDES_COLON_ARG_76EB7C14, equiJoinClause)); } @@ -145,8 +147,8 @@ public JoinNode( List leftOutputSymbols, List rightOutputSymbols) { super(id); - requireNonNull(joinType, "type is null"); - requireNonNull(criteria, "criteria is null"); + requireNonNull(joinType, QueryMessages.EXCEPTION_TYPE_IS_NULL_16A3D3EB); + requireNonNull(criteria, QueryMessages.EXCEPTION_CRITERIA_IS_NULL_2996D1A3); this.leftOutputSymbols = leftOutputSymbols; this.rightOutputSymbols = rightOutputSymbols; @@ -182,7 +184,9 @@ public R accept(IPlanVisitor visitor, C context) { @Override public PlanNode replaceChildren(List newChildren) { - checkArgument(newChildren.size() == 2, "expected newChildren to contain 2 nodes for JoinNode"); + checkArgument( + newChildren.size() == 2, + QueryMessages.EXCEPTION_EXPECTED_NEWCHILDREN_TO_CONTAIN_2_NODES_FOR_JOINNODE_BEEC3D82); return new JoinNode( getPlanNodeId(), joinType, @@ -373,8 +377,8 @@ public static class EquiJoinClause { private final Symbol right; public EquiJoinClause(Symbol left, Symbol right) { - this.left = requireNonNull(left, "left is null"); - this.right = requireNonNull(right, "right is null"); + this.left = requireNonNull(left, QueryMessages.EXCEPTION_LEFT_IS_NULL_2C1080C5); + this.right = requireNonNull(right, QueryMessages.EXCEPTION_RIGHT_IS_NULL_97BD6491); } public Symbol getLeft() { @@ -433,8 +437,8 @@ public static class AsofJoinClause { public AsofJoinClause(ComparisonExpression.Operator operator, Symbol left, Symbol right) { this.operator = operator; - this.left = requireNonNull(left, "left is null"); - this.right = requireNonNull(right, "right is null"); + this.left = requireNonNull(left, QueryMessages.EXCEPTION_LEFT_IS_NULL_2C1080C5); + this.right = requireNonNull(right, QueryMessages.EXCEPTION_RIGHT_IS_NULL_97BD6491); } public Symbol getLeft() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/MarkDistinctNode.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/MarkDistinctNode.java index 541b50a2a38c4..bd21b487415de 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/MarkDistinctNode.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/MarkDistinctNode.java @@ -19,6 +19,7 @@ package org.apache.iotdb.commons.queryengine.plan.relational.planner.node; +import org.apache.iotdb.commons.i18n.QueryMessages; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.ICoreQueryPlanVisitor; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.IPlanVisitor; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.PlanNode; @@ -55,10 +56,14 @@ public MarkDistinctNode( Optional hashSymbol) { super(id); this.child = child; - this.markerSymbol = requireNonNull(markerSymbol, "markerSymbol is null"); - this.hashSymbol = requireNonNull(hashSymbol, "hashSymbol is null"); - requireNonNull(distinctSymbols, "distinctSymbols is null"); - checkArgument(!distinctSymbols.isEmpty(), "distinctSymbols cannot be empty"); + this.markerSymbol = + requireNonNull(markerSymbol, QueryMessages.EXCEPTION_MARKERSYMBOL_IS_NULL_0313F046); + this.hashSymbol = + requireNonNull(hashSymbol, QueryMessages.EXCEPTION_HASHSYMBOL_IS_NULL_1BD487F2); + requireNonNull(distinctSymbols, QueryMessages.EXCEPTION_DISTINCTSYMBOLS_IS_NULL_28B8DB52); + checkArgument( + !distinctSymbols.isEmpty(), + QueryMessages.EXCEPTION_DISTINCTSYMBOLS_CANNOT_BE_EMPTY_A44A693E); this.distinctSymbols = ImmutableList.copyOf(distinctSymbols); } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/Measure.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/Measure.java index 9a39d6c8b67d3..5b96286c0cfdc 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/Measure.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/Measure.java @@ -19,6 +19,7 @@ package org.apache.iotdb.commons.queryengine.plan.relational.planner.node; +import org.apache.iotdb.commons.i18n.QueryMessages; import org.apache.iotdb.commons.queryengine.plan.relational.planner.rowpattern.ExpressionAndValuePointers; import org.apache.iotdb.commons.queryengine.plan.relational.utils.TypeUtil; @@ -38,8 +39,10 @@ public class Measure { public Measure(ExpressionAndValuePointers expressionAndValuePointers, Type type) { this.expressionAndValuePointers = - requireNonNull(expressionAndValuePointers, "expressionAndValuePointers is null"); - this.type = requireNonNull(type, "type is null"); + requireNonNull( + expressionAndValuePointers, + QueryMessages.EXCEPTION_EXPRESSIONANDVALUEPOINTERS_IS_NULL_8A02F345); + this.type = requireNonNull(type, QueryMessages.EXCEPTION_TYPE_IS_NULL_16A3D3EB); } public ExpressionAndValuePointers getExpressionAndValuePointers() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/MergeSortNode.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/MergeSortNode.java index bc293ee36c3f5..731a62c5f6d9a 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/MergeSortNode.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/MergeSortNode.java @@ -18,6 +18,7 @@ */ package org.apache.iotdb.commons.queryengine.plan.relational.planner.node; +import org.apache.iotdb.commons.i18n.QueryMessages; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.ICoreQueryPlanVisitor; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.IPlanVisitor; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.PlanNode; @@ -112,7 +113,9 @@ public List getOutputSymbols() { @Override public PlanNode replaceChildren(List newChildren) { - checkArgument(children.size() == newChildren.size(), "wrong number of new children"); + checkArgument( + children.size() == newChildren.size(), + QueryMessages.EXCEPTION_WRONG_NUMBER_OF_NEW_CHILDREN_817AF800); return new MergeSortNode(id, newChildren, orderingScheme, outputSymbols); } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/OutputNode.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/OutputNode.java index 40deff74e10ae..bc051fe5d4875 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/OutputNode.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/OutputNode.java @@ -19,6 +19,7 @@ package org.apache.iotdb.commons.queryengine.plan.relational.planner.node; +import org.apache.iotdb.commons.i18n.QueryMessages; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.ICoreQueryPlanVisitor; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.IPlanVisitor; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.PlanNode; @@ -56,7 +57,7 @@ public OutputNode( this.child = child; checkArgument( columnNames.size() == outputSymbols.size(), - "columnNames and outputSymbols sizes don't match"); + QueryMessages.EXCEPTION_COLUMNNAMES_AND_OUTPUTSYMBOLS_SIZES_DON_QUOTE_T_MATCH_1BDF6B28); this.columnNames = ImmutableList.copyOf(columnNames); this.outputSymbols = ImmutableList.copyOf(outputSymbols); } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/PatternRecognitionNode.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/PatternRecognitionNode.java index 8c6a3c8b5430a..ab8ed1ddcd61e 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/PatternRecognitionNode.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/PatternRecognitionNode.java @@ -19,6 +19,7 @@ package org.apache.iotdb.commons.queryengine.plan.relational.planner.node; +import org.apache.iotdb.commons.i18n.QueryMessages; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.ICoreQueryPlanVisitor; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.IPlanVisitor; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.PlanNode; @@ -74,15 +75,23 @@ public PatternRecognitionNode( Map variableDefinitions) { super(id, child); - this.partitionBy = requireNonNull(partitionBy, "partitionBy is null"); - this.orderingScheme = requireNonNull(orderingScheme, "orderingScheme is null"); - this.hashSymbol = requireNonNull(hashSymbol, "hashSymbol is null"); - this.measures = requireNonNull(measures, "measures is null"); - this.rowsPerMatch = requireNonNull(rowsPerMatch, "rowsPerMatch is null"); - this.skipToLabels = requireNonNull(skipToLabels, "skipToLabels is null"); - this.skipToPosition = requireNonNull(skipToPosition, "skipToPosition is null"); - this.pattern = requireNonNull(pattern, "pattern is null"); - this.variableDefinitions = requireNonNull(variableDefinitions, "variableDefinitions is null"); + this.partitionBy = + requireNonNull(partitionBy, QueryMessages.EXCEPTION_PARTITIONBY_IS_NULL_84791B6B); + this.orderingScheme = + requireNonNull(orderingScheme, QueryMessages.EXCEPTION_ORDERINGSCHEME_IS_NULL_4D4D2F6F); + this.hashSymbol = + requireNonNull(hashSymbol, QueryMessages.EXCEPTION_HASHSYMBOL_IS_NULL_1BD487F2); + this.measures = requireNonNull(measures, QueryMessages.EXCEPTION_MEASURES_IS_NULL_EC9D2431); + this.rowsPerMatch = + requireNonNull(rowsPerMatch, QueryMessages.EXCEPTION_ROWSPERMATCH_IS_NULL_661EA4A9); + this.skipToLabels = + requireNonNull(skipToLabels, QueryMessages.EXCEPTION_SKIPTOLABELS_IS_NULL_0A543C09); + this.skipToPosition = + requireNonNull(skipToPosition, QueryMessages.EXCEPTION_SKIPTOPOSITION_IS_NULL_EFBA10CA); + this.pattern = requireNonNull(pattern, QueryMessages.EXCEPTION_PATTERN_IS_NULL_AC4E239A); + this.variableDefinitions = + requireNonNull( + variableDefinitions, QueryMessages.EXCEPTION_VARIABLEDEFINITIONS_IS_NULL_5F7B8ED4); } @Override diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/RowNumberNode.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/RowNumberNode.java index a32ff34936d92..a83f7976481fd 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/RowNumberNode.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/RowNumberNode.java @@ -19,6 +19,7 @@ package org.apache.iotdb.commons.queryengine.plan.relational.planner.node; +import org.apache.iotdb.commons.i18n.QueryMessages; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.ICoreQueryPlanVisitor; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.IPlanVisitor; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.PlanNode; @@ -177,7 +178,8 @@ public List getOutputSymbols() { @Override public PlanNode replaceChildren(List newChildren) { - checkArgument(newChildren.size() == 1, "wrong number of new children"); + checkArgument( + newChildren.size() == 1, QueryMessages.EXCEPTION_WRONG_NUMBER_OF_NEW_CHILDREN_817AF800); return new RowNumberNode( id, newChildren.get(0), diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/SemiJoinNode.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/SemiJoinNode.java index a0af86af7e889..94e1619dc63dc 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/SemiJoinNode.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/SemiJoinNode.java @@ -19,6 +19,7 @@ package org.apache.iotdb.commons.queryengine.plan.relational.planner.node; +import org.apache.iotdb.commons.i18n.QueryMessages; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.ICoreQueryPlanVisitor; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.IPlanVisitor; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.PlanNode; @@ -51,21 +52,25 @@ public SemiJoinNode( Symbol filteringSourceJoinSymbol, Symbol semiJoinOutput) { super(id, source, filteringSource); - this.sourceJoinSymbol = requireNonNull(sourceJoinSymbol, "sourceJoinSymbol is null"); + this.sourceJoinSymbol = + requireNonNull(sourceJoinSymbol, QueryMessages.EXCEPTION_SOURCEJOINSYMBOL_IS_NULL_A88AEC85); this.filteringSourceJoinSymbol = - requireNonNull(filteringSourceJoinSymbol, "filteringSourceJoinSymbol is null"); - this.semiJoinOutput = requireNonNull(semiJoinOutput, "semiJoinOutput is null"); + requireNonNull( + filteringSourceJoinSymbol, + QueryMessages.EXCEPTION_FILTERINGSOURCEJOINSYMBOL_IS_NULL_502C5BD5); + this.semiJoinOutput = + requireNonNull(semiJoinOutput, QueryMessages.EXCEPTION_SEMIJOINOUTPUT_IS_NULL_D961A39B); if (source != null) { checkArgument( source.getOutputSymbols().contains(sourceJoinSymbol), - "Source does not contain join symbol"); + QueryMessages.EXCEPTION_SOURCE_DOES_NOT_CONTAIN_JOIN_SYMBOL_FA572FD2); } if (filteringSource != null) { checkArgument( filteringSource.getOutputSymbols().contains(filteringSourceJoinSymbol), - "Filtering source does not contain filtering join symbol"); + QueryMessages.EXCEPTION_FILTERING_SOURCE_DOES_NOT_CONTAIN_FILTERING_JOIN_SYMBOL_0C7B1BE3); } } @@ -104,7 +109,9 @@ public R accept(IPlanVisitor visitor, C context) { @Override public PlanNode replaceChildren(List newChildren) { - checkArgument(newChildren.size() == 2, "expected newChildren to contain 2 nodes"); + checkArgument( + newChildren.size() == 2, + QueryMessages.EXCEPTION_EXPECTED_NEWCHILDREN_TO_CONTAIN_2_NODES_25FE7927); return new SemiJoinNode( getPlanNodeId(), newChildren.get(0), diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/SetOperationNode.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/SetOperationNode.java index 34a0b13144f20..9bd3804cc4ae3 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/SetOperationNode.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/SetOperationNode.java @@ -19,6 +19,7 @@ package org.apache.iotdb.commons.queryengine.plan.relational.planner.node; +import org.apache.iotdb.commons.i18n.QueryMessages; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.PlanNode; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.PlanNodeId; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.process.MultiChildProcessNode; @@ -56,10 +57,11 @@ protected SetOperationNode( List outputs) { super(id); - requireNonNull(children, "children is null"); - checkArgument(!children.isEmpty(), "Must have at least one source"); - requireNonNull(outputToInputs, "outputToInputs is null"); - requireNonNull(outputs, "outputs is null"); + requireNonNull(children, QueryMessages.EXCEPTION_CHILDREN_IS_NULL_0CB43CE2); + checkArgument( + !children.isEmpty(), QueryMessages.EXCEPTION_MUST_HAVE_AT_LEAST_ONE_SOURCE_4114F454); + requireNonNull(outputToInputs, QueryMessages.EXCEPTION_OUTPUTTOINPUTS_IS_NULL_4125312B); + requireNonNull(outputs, QueryMessages.EXCEPTION_OUTPUTS_IS_NULL_EFD078A2); this.children = ImmutableList.copyOf(children); this.outputToInputs = ImmutableListMultimap.copyOf(outputToInputs); @@ -68,7 +70,8 @@ protected SetOperationNode( for (Collection inputs : this.outputToInputs.asMap().values()) { checkArgument( inputs.size() == this.children.size(), - "Every child needs to map its symbols to an output %s operation symbol", + QueryMessages + .EXCEPTION_EVERY_CHILD_NEEDS_TO_MAP_ITS_SYMBOLS_TO_AN_OUTPUT_ARG_OPERATION_SYMBOL_7FA107A2, this.getClass().getSimpleName()); } @@ -78,7 +81,7 @@ protected SetOperationNode( for (Collection expectedInputs : this.outputToInputs.asMap().values()) { checkArgument( childSymbols.contains(Iterables.get(expectedInputs, i)), - "Child does not provide required symbols"); + QueryMessages.EXCEPTION_CHILD_DOES_NOT_PROVIDE_REQUIRED_SYMBOLS_B7CE956E); } } } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/TableFunctionNode.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/TableFunctionNode.java index 82fdf2c940050..adc2d6bf5bfbb 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/TableFunctionNode.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/TableFunctionNode.java @@ -60,7 +60,7 @@ public TableFunctionNode( List children, List tableArgumentProperties) { super(id, children); - this.name = requireNonNull(name, "name is null"); + this.name = requireNonNull(name, QueryMessages.EXCEPTION_NAME_IS_NULL_C8B35959); this.tableFunctionHandle = tableFunctionHandle; this.properOutputs = ImmutableList.copyOf(properOutputs); this.tableArgumentProperties = ImmutableList.copyOf(tableArgumentProperties); @@ -73,7 +73,7 @@ public TableFunctionNode( List properOutputs, List tableArgumentProperties) { super(id); - this.name = requireNonNull(name, "name is null"); + this.name = requireNonNull(name, QueryMessages.EXCEPTION_NAME_IS_NULL_C8B35959); this.tableFunctionHandle = tableFunctionHandle; this.properOutputs = ImmutableList.copyOf(properOutputs); this.tableArgumentProperties = ImmutableList.copyOf(tableArgumentProperties); @@ -130,7 +130,9 @@ public List getOutputColumnNames() { @Override public PlanNode replaceChildren(List newSources) { - checkArgument(children.size() == newSources.size(), "wrong number of new children"); + checkArgument( + children.size() == newSources.size(), + QueryMessages.EXCEPTION_WRONG_NUMBER_OF_NEW_CHILDREN_817AF800); return new TableFunctionNode( getPlanNodeId(), name, @@ -263,13 +265,18 @@ public TableArgumentProperties( List requiredColumns, Optional dataOrganizationSpecification, boolean requireRecordSnapshot) { - this.argumentName = requireNonNull(argumentName, "argumentName is null"); + this.argumentName = + requireNonNull(argumentName, QueryMessages.EXCEPTION_ARGUMENTNAME_IS_NULL_7F8F665F); this.rowSemantics = rowSemantics; this.passThroughSpecification = - requireNonNull(passThroughSpecification, "passThroughSpecification is null"); + requireNonNull( + passThroughSpecification, + QueryMessages.EXCEPTION_PASSTHROUGHSPECIFICATION_IS_NULL_2B48FE41); this.requiredColumns = ImmutableList.copyOf(requiredColumns); this.dataOrganizationSpecification = - requireNonNull(dataOrganizationSpecification, "specification is null"); + requireNonNull( + dataOrganizationSpecification, + QueryMessages.EXCEPTION_SPECIFICATION_IS_NULL_BB4AA029); this.requireRecordSnapshot = requireRecordSnapshot; } @@ -357,7 +364,7 @@ public static class PassThroughColumn { private final boolean isPartitioningColumn; public PassThroughColumn(Symbol symbol, boolean isPartitioningColumn) { - this.symbol = requireNonNull(symbol, "symbol is null"); + this.symbol = requireNonNull(symbol, QueryMessages.EXCEPTION_SYMBOL_IS_NULL_AE539B31); this.isPartitioningColumn = isPartitioningColumn; } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/TableFunctionProcessorNode.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/TableFunctionProcessorNode.java index a6bb8c44e5f22..c65097501687d 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/TableFunctionProcessorNode.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/TableFunctionProcessorNode.java @@ -19,6 +19,7 @@ package org.apache.iotdb.commons.queryengine.plan.relational.planner.node; +import org.apache.iotdb.commons.i18n.QueryMessages; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.ICoreQueryPlanVisitor; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.IPlanVisitor; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.PlanNode; @@ -78,12 +79,13 @@ public TableFunctionProcessorNode( TableFunctionHandle tableFunctionHandle, boolean requireRecordSnapshot) { super(id, source.orElse(null)); - this.name = requireNonNull(name, "name is null"); + this.name = requireNonNull(name, QueryMessages.EXCEPTION_NAME_IS_NULL_C8B35959); this.properOutputs = ImmutableList.copyOf(properOutputs); this.passThroughSpecification = passThroughSpecification; this.requiredSymbols = ImmutableList.copyOf(requiredSymbols); this.dataOrganizationSpecification = - requireNonNull(dataOrganizationSpecification, "specification is null"); + requireNonNull( + dataOrganizationSpecification, QueryMessages.EXCEPTION_SPECIFICATION_IS_NULL_BB4AA029); this.rowSemantic = rowSemantic; this.tableFunctionHandle = tableFunctionHandle; this.requireRecordSnapshot = requireRecordSnapshot; @@ -100,12 +102,13 @@ public TableFunctionProcessorNode( TableFunctionHandle tableFunctionHandle, boolean requireRecordSnapshot) { super(id); - this.name = requireNonNull(name, "name is null"); + this.name = requireNonNull(name, QueryMessages.EXCEPTION_NAME_IS_NULL_C8B35959); this.properOutputs = ImmutableList.copyOf(properOutputs); this.passThroughSpecification = passThroughSpecification; this.requiredSymbols = ImmutableList.copyOf(requiredSymbols); this.dataOrganizationSpecification = - requireNonNull(dataOrganizationSpecification, "specification is null"); + requireNonNull( + dataOrganizationSpecification, QueryMessages.EXCEPTION_SPECIFICATION_IS_NULL_BB4AA029); this.rowSemantic = rowSemantic; this.tableFunctionHandle = tableFunctionHandle; this.requireRecordSnapshot = requireRecordSnapshot; diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/TopKNode.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/TopKNode.java index 843b1296865db..34376dcdbd5f5 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/TopKNode.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/TopKNode.java @@ -19,6 +19,7 @@ package org.apache.iotdb.commons.queryengine.plan.relational.planner.node; +import org.apache.iotdb.commons.i18n.QueryMessages; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.ICoreQueryPlanVisitor; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.IPlanVisitor; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.PlanNode; @@ -135,7 +136,9 @@ public List getOutputSymbols() { @Override public PlanNode replaceChildren(List newChildren) { - checkArgument(children.size() == newChildren.size(), "wrong number of new children"); + checkArgument( + children.size() == newChildren.size(), + QueryMessages.EXCEPTION_WRONG_NUMBER_OF_NEW_CHILDREN_817AF800); return new TopKNode(id, newChildren, orderingScheme, count, outputSymbols, childrenDataInOrder); } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/ValuesNode.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/ValuesNode.java index 3dd6071e47557..3a6bf729d293d 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/ValuesNode.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/ValuesNode.java @@ -20,6 +20,7 @@ package org.apache.iotdb.commons.queryengine.plan.relational.planner.node; import org.apache.iotdb.common.rpc.thrift.TRegionReplicaSet; +import org.apache.iotdb.commons.i18n.QueryMessages; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.ICoreQueryPlanVisitor; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.IPlanVisitor; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.PlanNode; @@ -73,39 +74,45 @@ public ValuesNode( PlanNodeId id, List outputSymbols, int rowCount, Optional> rows) { super(id); this.outputSymbols = - ImmutableList.copyOf(requireNonNull(outputSymbols, "outputSymbols is null")); + ImmutableList.copyOf( + requireNonNull(outputSymbols, QueryMessages.EXCEPTION_OUTPUTSYMBOLS_IS_NULL_D7024804)); this.rowCount = rowCount; - requireNonNull(rows, "rows is null"); + requireNonNull(rows, QueryMessages.EXCEPTION_ROWS_IS_NULL_B8BF74DE); if (rows.isPresent()) { checkArgument( rowCount == rows.get().size(), - "declared and actual row counts don't match: %s vs %s", + QueryMessages + .EXCEPTION_DECLARED_AND_ACTUAL_ROW_COUNTS_DON_QUOTE_T_MATCH_COLON_ARG_VS_ARG_EC8361A5, rowCount, rows.get().size()); // check row size consistency (only for rows specified as Row) List rowSizes = rows.get().stream() - .map(row -> requireNonNull(row, "row is null")) + .map(row -> requireNonNull(row, QueryMessages.EXCEPTION_ROW_IS_NULL_36A3CCAA)) .filter(expression -> expression instanceof Row) .map(expression -> ((Row) expression).getItems().size()) .distinct() .collect(toImmutableList()); - checkState(rowSizes.size() <= 1, "mismatched rows. All rows must be the same size"); + checkState( + rowSizes.size() <= 1, + QueryMessages.EXCEPTION_MISMATCHED_ROWS_DOT_ALL_ROWS_MUST_BE_THE_SAME_SIZE_E98CF3BE); // check if row size matches the number of output symbols (only for rows specified as Row) if (rowSizes.size() == 1) { checkState( getOnlyElement(rowSizes).equals(outputSymbols.size()), - "row size doesn't match the number of output symbols: %s vs %s", + QueryMessages + .EXCEPTION_ROW_SIZE_DOESN_QUOTE_T_MATCH_THE_NUMBER_OF_OUTPUT_SYMBOLS_COLON_ARG_VS_ARG_5FBDF729, getOnlyElement(rowSizes), outputSymbols.size()); } } else { checkArgument( outputSymbols.isEmpty(), - "missing rows specification for Values with non-empty output symbols"); + QueryMessages + .EXCEPTION_MISSING_ROWS_SPECIFICATION_FOR_VALUES_WITH_NON_MINUS_EMPTY_OUTPUT_SYMBOLS_9BA9C169); } if (outputSymbols.isEmpty()) { @@ -220,7 +227,7 @@ public Optional> getRows() { @Override public PlanNode replaceChildren(List newChildren) { - checkArgument(newChildren.isEmpty(), "newChildren is not empty"); + checkArgument(newChildren.isEmpty(), QueryMessages.EXCEPTION_NEWCHILDREN_IS_NOT_EMPTY_170FCE18); return this; } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/WindowNode.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/WindowNode.java index 691d33805f04d..27649533fcb7d 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/WindowNode.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/node/WindowNode.java @@ -19,6 +19,7 @@ package org.apache.iotdb.commons.queryengine.plan.relational.planner.node; +import org.apache.iotdb.commons.i18n.QueryMessages; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.ICoreQueryPlanVisitor; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.IPlanVisitor; import org.apache.iotdb.commons.queryengine.plan.planner.plan.node.PlanNode; @@ -83,15 +84,16 @@ public WindowNode( Optional orderingScheme = specification.getOrderingScheme(); checkArgument( partitionBy.containsAll(prePartitionedInputs), - "prePartitionedInputs must be contained in partitionBy"); + QueryMessages.EXCEPTION_PREPARTITIONEDINPUTS_MUST_BE_CONTAINED_IN_PARTITIONBY_CE9DCE6F); checkArgument( preSortedOrderPrefix == 0 || (orderingScheme.isPresent() && preSortedOrderPrefix <= orderingScheme.get().getOrderBy().size()), - "Cannot have sorted more symbols than those requested"); + QueryMessages.EXCEPTION_CANNOT_HAVE_SORTED_MORE_SYMBOLS_THAN_THOSE_REQUESTED_52EEB7C9); checkArgument( preSortedOrderPrefix == 0 || partitionBy.equals(prePartitionedInputs), - "preSortedOrderPrefix can only be greater than zero if all partition symbols are pre-partitioned"); + QueryMessages + .EXCEPTION_PRESORTEDORDERPREFIX_CAN_ONLY_BE_GREATER_THAN_ZERO_IF_ALL_PARTITION_SYMBOLS_ARE__76BBC8DD); this.prePartitionedInputs = prePartitionedInputs; this.specification = specification; @@ -291,40 +293,51 @@ public Frame( Optional sortKeyCoercedForFrameEndComparison, Optional originalStartValue, Optional originalEndValue) { - this.startType = requireNonNull(startType, "startType is null"); - this.startValue = requireNonNull(startValue, "startValue is null"); + this.startType = + requireNonNull(startType, QueryMessages.EXCEPTION_STARTTYPE_IS_NULL_2EB77A1F); + this.startValue = + requireNonNull(startValue, QueryMessages.EXCEPTION_STARTVALUE_IS_NULL_4FD58C2B); this.sortKeyCoercedForFrameStartComparison = requireNonNull( sortKeyCoercedForFrameStartComparison, - "sortKeyCoercedForFrameStartComparison is null"); - this.endType = requireNonNull(endType, "endType is null"); - this.endValue = requireNonNull(endValue, "endValue is null"); + QueryMessages.EXCEPTION_SORTKEYCOERCEDFORFRAMESTARTCOMPARISON_IS_NULL_4E922E4D); + this.endType = requireNonNull(endType, QueryMessages.EXCEPTION_ENDTYPE_IS_NULL_6B9E47D2); + this.endValue = requireNonNull(endValue, QueryMessages.EXCEPTION_ENDVALUE_IS_NULL_69BD66CB); this.sortKeyCoercedForFrameEndComparison = requireNonNull( - sortKeyCoercedForFrameEndComparison, "sortKeyCoercedForFrameEndComparison is null"); - this.type = requireNonNull(type, "type is null"); - this.originalStartValue = requireNonNull(originalStartValue, "originalStartValue is null"); - this.originalEndValue = requireNonNull(originalEndValue, "originalEndValue is null"); + sortKeyCoercedForFrameEndComparison, + QueryMessages.EXCEPTION_SORTKEYCOERCEDFORFRAMEENDCOMPARISON_IS_NULL_CB0BAC41); + this.type = requireNonNull(type, QueryMessages.EXCEPTION_TYPE_IS_NULL_16A3D3EB); + this.originalStartValue = + requireNonNull( + originalStartValue, QueryMessages.EXCEPTION_ORIGINALSTARTVALUE_IS_NULL_6BCE78A9); + this.originalEndValue = + requireNonNull( + originalEndValue, QueryMessages.EXCEPTION_ORIGINALENDVALUE_IS_NULL_EBA46FFA); if (startValue.isPresent()) { checkArgument( originalStartValue.isPresent(), - "originalStartValue must be present if startValue is present"); + QueryMessages + .EXCEPTION_ORIGINALSTARTVALUE_MUST_BE_PRESENT_IF_STARTVALUE_IS_PRESENT_30B6FDFF); if (type == RANGE) { checkArgument( sortKeyCoercedForFrameStartComparison.isPresent(), - "for frame of type RANGE, sortKeyCoercedForFrameStartComparison must be present if startValue is present"); + QueryMessages + .EXCEPTION_FOR_FRAME_OF_TYPE_RANGE_COMMA_SORTKEYCOERCEDFORFRAMESTARTCOMPARISON_MUST_BE_PRES_7533A433); } } if (endValue.isPresent()) { checkArgument( originalEndValue.isPresent(), - "originalEndValue must be present if endValue is present"); + QueryMessages + .EXCEPTION_ORIGINALENDVALUE_MUST_BE_PRESENT_IF_ENDVALUE_IS_PRESENT_E79EF3D2); if (type == RANGE) { checkArgument( sortKeyCoercedForFrameEndComparison.isPresent(), - "for frame of type RANGE, sortKeyCoercedForFrameEndComparison must be present if endValue is present"); + QueryMessages + .EXCEPTION_FOR_FRAME_OF_TYPE_RANGE_COMMA_SORTKEYCOERCEDFORFRAMEENDCOMPARISON_MUST_BE_PRESEN_36A665AC); } } } @@ -533,9 +546,12 @@ public Function( List arguments, Frame frame, boolean ignoreNulls) { - this.resolvedFunction = requireNonNull(resolvedFunction, "resolvedFunction is null"); - this.arguments = requireNonNull(arguments, "arguments is null"); - this.frame = requireNonNull(frame, "frame is null"); + this.resolvedFunction = + requireNonNull( + resolvedFunction, QueryMessages.EXCEPTION_RESOLVEDFUNCTION_IS_NULL_81B5B93A); + this.arguments = + requireNonNull(arguments, QueryMessages.EXCEPTION_ARGUMENTS_IS_NULL_B1F6D4F2); + this.frame = requireNonNull(frame, QueryMessages.EXCEPTION_FRAME_IS_NULL_5A92D609); this.ignoreNulls = ignoreNulls; } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/AggregationLabelSet.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/AggregationLabelSet.java index 3dd30d2eb1b71..929e01ab78fee 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/AggregationLabelSet.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/AggregationLabelSet.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.planner.rowpattern; +import org.apache.iotdb.commons.i18n.QueryMessages; + import java.io.DataOutputStream; import java.io.IOException; import java.nio.ByteBuffer; @@ -40,7 +42,7 @@ public class AggregationLabelSet { private final boolean running; public AggregationLabelSet(Set labels, boolean running) { - this.labels = requireNonNull(labels, "labels is null"); + this.labels = requireNonNull(labels, QueryMessages.EXCEPTION_LABELS_IS_NULL_F4FBBECE); this.running = running; } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/AggregationValuePointer.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/AggregationValuePointer.java index be45e067304bb..b7219fad552b7 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/AggregationValuePointer.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/AggregationValuePointer.java @@ -19,6 +19,7 @@ package org.apache.iotdb.commons.queryengine.plan.relational.planner.rowpattern; +import org.apache.iotdb.commons.i18n.QueryMessages; import org.apache.iotdb.commons.queryengine.plan.relational.metadata.ResolvedFunction; import org.apache.iotdb.commons.queryengine.plan.relational.planner.Symbol; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.Expression; @@ -46,11 +47,15 @@ public AggregationValuePointer( List arguments, Optional classifierSymbol, Optional matchNumberSymbol) { - this.function = requireNonNull(function, "function is null"); - this.setDescriptor = requireNonNull(setDescriptor, "setDescriptor is null"); - this.arguments = requireNonNull(arguments, "arguments is null"); - this.classifierSymbol = requireNonNull(classifierSymbol, "classifierSymbol is null"); - this.matchNumberSymbol = requireNonNull(matchNumberSymbol, "matchNumberSymbol is null"); + this.function = requireNonNull(function, QueryMessages.EXCEPTION_FUNCTION_IS_NULL_E0FA4B62); + this.setDescriptor = + requireNonNull(setDescriptor, QueryMessages.EXCEPTION_SETDESCRIPTOR_IS_NULL_4ED0D19A); + this.arguments = requireNonNull(arguments, QueryMessages.EXCEPTION_ARGUMENTS_IS_NULL_B1F6D4F2); + this.classifierSymbol = + requireNonNull(classifierSymbol, QueryMessages.EXCEPTION_CLASSIFIERSYMBOL_IS_NULL_B92EE093); + this.matchNumberSymbol = + requireNonNull( + matchNumberSymbol, QueryMessages.EXCEPTION_MATCHNUMBERSYMBOL_IS_NULL_D88DC4EE); } public ResolvedFunction getFunction() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/ClassifierValuePointer.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/ClassifierValuePointer.java index 771fcc92ceb6a..e33b963f6da5d 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/ClassifierValuePointer.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/ClassifierValuePointer.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.planner.rowpattern; +import org.apache.iotdb.commons.i18n.QueryMessages; + import java.io.DataOutputStream; import java.io.IOException; import java.nio.ByteBuffer; @@ -30,7 +32,9 @@ public final class ClassifierValuePointer implements ValuePointer { private final LogicalIndexPointer logicalIndexPointer; public ClassifierValuePointer(LogicalIndexPointer logicalIndexPointer) { - this.logicalIndexPointer = requireNonNull(logicalIndexPointer, "logicalIndexPointer is null"); + this.logicalIndexPointer = + requireNonNull( + logicalIndexPointer, QueryMessages.EXCEPTION_LOGICALINDEXPOINTER_IS_NULL_BF8B516B); } public LogicalIndexPointer getLogicalIndexPointer() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/ExpressionAndValuePointers.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/ExpressionAndValuePointers.java index f92fc3a792f49..f915bdc640f32 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/ExpressionAndValuePointers.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/ExpressionAndValuePointers.java @@ -48,7 +48,8 @@ public class ExpressionAndValuePointers { private final List assignments; public ExpressionAndValuePointers(Expression expression, List assignments) { - this.expression = requireNonNull(expression, "expression is null"); + this.expression = + requireNonNull(expression, QueryMessages.EXCEPTION_EXPRESSION_IS_NULL_16C079B5); this.assignments = ImmutableList.copyOf(assignments); } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/IrAlternation.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/IrAlternation.java index 17e38f05add89..9f0c41a38fb9a 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/IrAlternation.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/IrAlternation.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.planner.rowpattern; +import org.apache.iotdb.commons.i18n.QueryMessages; + import org.apache.tsfile.utils.ReadWriteIOUtils; import java.io.DataOutputStream; @@ -36,10 +38,11 @@ public class IrAlternation extends IrRowPattern { private final List patterns; public IrAlternation(List patterns) { - this.patterns = requireNonNull(patterns, "patterns is null"); + this.patterns = requireNonNull(patterns, QueryMessages.EXCEPTION_PATTERNS_IS_NULL_7E0DDDF0); checkArgument( patterns.size() >= 2, - "pattern alternation must have at least 2 elements (actual: %s)", + QueryMessages + .EXCEPTION_PATTERN_ALTERNATION_MUST_HAVE_AT_LEAST_2_ELEMENTS_LEFT_PAREN_ACTUAL_COLON_ARG_RI_A03B40AC, patterns.size()); } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/IrAnchor.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/IrAnchor.java index bca1237e38984..cc4f056915dce 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/IrAnchor.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/IrAnchor.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.planner.rowpattern; +import org.apache.iotdb.commons.i18n.QueryMessages; + import org.apache.tsfile.utils.ReadWriteIOUtils; import java.io.DataOutputStream; @@ -38,7 +40,7 @@ public enum Type { private final Type type; public IrAnchor(Type type) { - this.type = requireNonNull(type, "type is null"); + this.type = requireNonNull(type, QueryMessages.EXCEPTION_TYPE_IS_NULL_16A3D3EB); } public Type getType() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/IrConcatenation.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/IrConcatenation.java index f698f67840f93..a5aace8665a39 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/IrConcatenation.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/IrConcatenation.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.planner.rowpattern; +import org.apache.iotdb.commons.i18n.QueryMessages; + import org.apache.tsfile.utils.ReadWriteIOUtils; import java.io.DataOutputStream; @@ -36,10 +38,11 @@ public class IrConcatenation extends IrRowPattern { private final List patterns; public IrConcatenation(List patterns) { - this.patterns = requireNonNull(patterns, "patterns is null"); + this.patterns = requireNonNull(patterns, QueryMessages.EXCEPTION_PATTERNS_IS_NULL_7E0DDDF0); checkArgument( patterns.size() >= 2, - "pattern concatenation must have at least 2 elements (actual: %s)", + QueryMessages + .EXCEPTION_PATTERN_CONCATENATION_MUST_HAVE_AT_LEAST_2_ELEMENTS_LEFT_PAREN_ACTUAL_COLON_ARG__8B283563, patterns.size()); } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/IrExclusion.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/IrExclusion.java index c9618e8f3c1cd..7d51486c978d0 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/IrExclusion.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/IrExclusion.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.planner.rowpattern; +import org.apache.iotdb.commons.i18n.QueryMessages; + import java.io.DataOutputStream; import java.io.IOException; import java.nio.ByteBuffer; @@ -30,7 +32,7 @@ public class IrExclusion extends IrRowPattern { private final IrRowPattern pattern; public IrExclusion(IrRowPattern pattern) { - this.pattern = requireNonNull(pattern, "pattern is null"); + this.pattern = requireNonNull(pattern, QueryMessages.EXCEPTION_PATTERN_IS_NULL_AC4E239A); } public IrRowPattern getPattern() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/IrLabel.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/IrLabel.java index e2bb562b1bff5..d60a44f6d0da4 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/IrLabel.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/IrLabel.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.planner.rowpattern; +import org.apache.iotdb.commons.i18n.QueryMessages; + import org.apache.tsfile.utils.ReadWriteIOUtils; import java.io.DataOutputStream; @@ -36,7 +38,7 @@ public class IrLabel extends IrRowPattern { * identifier semantics. */ public IrLabel(String name) { - this.name = requireNonNull(name, "name is null"); + this.name = requireNonNull(name, QueryMessages.EXCEPTION_NAME_IS_NULL_C8B35959); } public String getName() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/IrPatternAlternationOptimizer.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/IrPatternAlternationOptimizer.java index 197007dce1968..fc2f4f24a974d 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/IrPatternAlternationOptimizer.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/IrPatternAlternationOptimizer.java @@ -79,7 +79,8 @@ protected IrRowPattern visitIrAlternation(IrAlternation node, Void context) { if (children.get(i) instanceof IrEmpty) { checkState( emptyChildIndex < 0, - "run IrRowPatternFlattener first to remove redundant empty pattern"); + QueryMessages + .EXCEPTION_RUN_IRROWPATTERNFLATTENER_FIRST_TO_REMOVE_REDUNDANT_EMPTY_PATTERN_D2FB553C); emptyChildIndex = i; } } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/IrPermutation.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/IrPermutation.java index 3cf5b89ac9b5f..48b56bde8eb25 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/IrPermutation.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/IrPermutation.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.planner.rowpattern; +import org.apache.iotdb.commons.i18n.QueryMessages; + import org.apache.tsfile.utils.ReadWriteIOUtils; import java.io.DataOutputStream; @@ -36,8 +38,8 @@ public class IrPermutation extends IrRowPattern { private final List patterns; public IrPermutation(List patterns) { - this.patterns = requireNonNull(patterns, "patterns is null"); - checkArgument(!patterns.isEmpty(), "patterns list is empty"); + this.patterns = requireNonNull(patterns, QueryMessages.EXCEPTION_PATTERNS_IS_NULL_7E0DDDF0); + checkArgument(!patterns.isEmpty(), QueryMessages.EXCEPTION_PATTERNS_LIST_IS_EMPTY_D4D1802F); } public List getPatterns() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/IrQuantified.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/IrQuantified.java index 2a1f860e6fbd2..5ebd9509593d2 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/IrQuantified.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/IrQuantified.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.planner.rowpattern; +import org.apache.iotdb.commons.i18n.QueryMessages; + import java.io.DataOutputStream; import java.io.IOException; import java.nio.ByteBuffer; @@ -31,8 +33,9 @@ public class IrQuantified extends IrRowPattern { private final IrQuantifier quantifier; public IrQuantified(IrRowPattern pattern, IrQuantifier quantifier) { - this.pattern = requireNonNull(pattern, "pattern is null"); - this.quantifier = requireNonNull(quantifier, "quantifier is null"); + this.pattern = requireNonNull(pattern, QueryMessages.EXCEPTION_PATTERN_IS_NULL_AC4E239A); + this.quantifier = + requireNonNull(quantifier, QueryMessages.EXCEPTION_QUANTIFIER_IS_NULL_7B81C096); } public IrRowPattern getPattern() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/IrQuantifier.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/IrQuantifier.java index 7201d37f15089..781c2c1ae9ca4 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/IrQuantifier.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/IrQuantifier.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.planner.rowpattern; +import org.apache.iotdb.commons.i18n.QueryMessages; + import org.apache.tsfile.utils.ReadWriteIOUtils; import java.io.DataOutputStream; @@ -54,7 +56,7 @@ public static IrQuantifier range( public IrQuantifier(int atLeast, Optional atMost, boolean greedy) { this.atLeast = atLeast; - this.atMost = requireNonNull(atMost, "atMost is null"); + this.atMost = requireNonNull(atMost, QueryMessages.EXCEPTION_ATMOST_IS_NULL_778B3B3A); this.greedy = greedy; } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/LogicalIndexPointer.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/LogicalIndexPointer.java index ae3ff2864ad2c..ac1d0d7195086 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/LogicalIndexPointer.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/LogicalIndexPointer.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.planner.rowpattern; +import org.apache.iotdb.commons.i18n.QueryMessages; + import org.apache.tsfile.utils.ReadWriteIOUtils; import java.io.DataOutputStream; @@ -58,10 +60,14 @@ public class LogicalIndexPointer { public LogicalIndexPointer( Set labels, boolean last, boolean running, int logicalOffset, int physicalOffset) { - this.labels = requireNonNull(labels, "labels is null"); + this.labels = requireNonNull(labels, QueryMessages.EXCEPTION_LABELS_IS_NULL_F4FBBECE); this.last = last; this.running = running; - checkArgument(logicalOffset >= 0, "logical offset must be >= 0, actual: %s", logicalOffset); + checkArgument( + logicalOffset >= 0, + QueryMessages + .EXCEPTION_LOGICAL_OFFSET_MUST_BE_GREATER_THAN_EQUALS_0_COMMA_ACTUAL_COLON_ARG_539807BF, + logicalOffset); this.logicalOffset = logicalOffset; this.physicalOffset = physicalOffset; } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/ScalarValuePointer.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/ScalarValuePointer.java index 0a5895076c608..c15bdfe56abc6 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/ScalarValuePointer.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/planner/rowpattern/ScalarValuePointer.java @@ -19,6 +19,7 @@ package org.apache.iotdb.commons.queryengine.plan.relational.planner.rowpattern; +import org.apache.iotdb.commons.i18n.QueryMessages; import org.apache.iotdb.commons.queryengine.plan.relational.planner.Symbol; import java.io.DataOutputStream; @@ -33,8 +34,11 @@ public final class ScalarValuePointer implements ValuePointer { private final Symbol inputSymbol; public ScalarValuePointer(LogicalIndexPointer logicalIndexPointer, Symbol inputSymbol) { - this.logicalIndexPointer = requireNonNull(logicalIndexPointer, "logicalIndexPointer is null"); - this.inputSymbol = requireNonNull(inputSymbol, "inputSymbol is null"); + this.logicalIndexPointer = + requireNonNull( + logicalIndexPointer, QueryMessages.EXCEPTION_LOGICALINDEXPOINTER_IS_NULL_BF8B516B); + this.inputSymbol = + requireNonNull(inputSymbol, QueryMessages.EXCEPTION_INPUTSYMBOL_IS_NULL_F4B354EB); } public LogicalIndexPointer getLogicalIndexPointer() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/AliasedRelation.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/AliasedRelation.java index c92ff448b2330..c1f1722ae07a1 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/AliasedRelation.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/AliasedRelation.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -38,16 +40,16 @@ public class AliasedRelation extends Relation { public AliasedRelation(Relation relation, Identifier alias, List columnNames) { super(null); - this.relation = requireNonNull(relation, "relation is null"); - this.alias = requireNonNull(alias, "alias is null"); + this.relation = requireNonNull(relation, QueryMessages.EXCEPTION_RELATION_IS_NULL_890596ED); + this.alias = requireNonNull(alias, QueryMessages.EXCEPTION_ALIAS_IS_NULL_B2ED729A); this.columnNames = columnNames; } public AliasedRelation( NodeLocation location, Relation relation, Identifier alias, List columnNames) { - super(requireNonNull(location, "location is null")); - this.relation = requireNonNull(relation, "relation is null"); - this.alias = requireNonNull(alias, "alias is null"); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.relation = requireNonNull(relation, QueryMessages.EXCEPTION_RELATION_IS_NULL_890596ED); + this.alias = requireNonNull(alias, QueryMessages.EXCEPTION_ALIAS_IS_NULL_B2ED729A); this.columnNames = columnNames; } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/AllColumns.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/AllColumns.java index 92988b29feb31..a484574c02ddf 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/AllColumns.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/AllColumns.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.base.Joiner; import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -47,26 +49,32 @@ public AllColumns() { public AllColumns(Expression target) { super(null); - this.target = requireNonNull(target, "target is null"); + this.target = requireNonNull(target, QueryMessages.EXCEPTION_TARGET_IS_NULL_240F0372); this.aliases = ImmutableList.of(); } public AllColumns(Expression target, List aliases) { super(null); - this.target = requireNonNull(target, "target is null"); - this.aliases = ImmutableList.copyOf(requireNonNull(aliases, "aliases is null")); + this.target = requireNonNull(target, QueryMessages.EXCEPTION_TARGET_IS_NULL_240F0372); + this.aliases = + ImmutableList.copyOf( + requireNonNull(aliases, QueryMessages.EXCEPTION_ALIASES_IS_NULL_C481EE59)); } public AllColumns(NodeLocation location, Expression target, List aliases) { - super(requireNonNull(location, "location is null")); - this.target = requireNonNull(target, "target is null"); - this.aliases = ImmutableList.copyOf(requireNonNull(aliases, "aliases is null")); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.target = requireNonNull(target, QueryMessages.EXCEPTION_TARGET_IS_NULL_240F0372); + this.aliases = + ImmutableList.copyOf( + requireNonNull(aliases, QueryMessages.EXCEPTION_ALIASES_IS_NULL_C481EE59)); } public AllColumns(NodeLocation location, List aliases) { - super(requireNonNull(location, "location is null")); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); this.target = null; - this.aliases = ImmutableList.copyOf(requireNonNull(aliases, "aliases is null")); + this.aliases = + ImmutableList.copyOf( + requireNonNull(aliases, QueryMessages.EXCEPTION_ALIASES_IS_NULL_C481EE59)); } public List getAliases() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/AllRows.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/AllRows.java index fc194277672cd..fe55d2fa8a0a0 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/AllRows.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/AllRows.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -36,7 +38,7 @@ public AllRows() { } public AllRows(@Nonnull NodeLocation location) { - super(requireNonNull(location, "location is null")); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); } @Override diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/AnchorPattern.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/AnchorPattern.java index c7de79fea9fd0..a371c175790e7 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/AnchorPattern.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/AnchorPattern.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -41,7 +43,7 @@ public enum Type { public AnchorPattern(NodeLocation location, Type type) { super(location); - this.type = requireNonNull(type, "type is null"); + this.type = requireNonNull(type, QueryMessages.EXCEPTION_TYPE_IS_NULL_16A3D3EB); } public Type getType() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/ArithmeticBinaryExpression.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/ArithmeticBinaryExpression.java index 1d38eb44261d3..3b04c385f7daf 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/ArithmeticBinaryExpression.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/ArithmeticBinaryExpression.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; import org.apache.tsfile.utils.ReadWriteIOUtils; @@ -68,7 +70,7 @@ public ArithmeticBinaryExpression(Operator operator, Expression left, Expression public ArithmeticBinaryExpression( @Nonnull NodeLocation location, Operator operator, Expression left, Expression right) { - super(requireNonNull(location, "location is null")); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); this.operator = operator; this.left = left; this.right = right; diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/ArithmeticUnaryExpression.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/ArithmeticUnaryExpression.java index 8b2ed3ec77d58..4ccaed9505f2e 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/ArithmeticUnaryExpression.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/ArithmeticUnaryExpression.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; import org.apache.tsfile.utils.ReadWriteIOUtils; @@ -48,8 +50,8 @@ public enum Sign { public ArithmeticUnaryExpression(NodeLocation location, Sign sign, Expression value) { super(location); - requireNonNull(value, "value is null"); - requireNonNull(sign, "sign is null"); + requireNonNull(value, QueryMessages.EXCEPTION_VALUE_IS_NULL_192F6BFF); + requireNonNull(sign, QueryMessages.EXCEPTION_SIGN_IS_NULL_4AF91D16); this.value = value; this.sign = sign; @@ -57,8 +59,8 @@ public ArithmeticUnaryExpression(NodeLocation location, Sign sign, Expression va public ArithmeticUnaryExpression(Sign sign, Expression value) { super(null); - requireNonNull(value, "value is null"); - requireNonNull(sign, "sign is null"); + requireNonNull(value, QueryMessages.EXCEPTION_VALUE_IS_NULL_192F6BFF); + requireNonNull(sign, QueryMessages.EXCEPTION_SIGN_IS_NULL_4AF91D16); this.value = value; this.sign = sign; @@ -84,13 +86,17 @@ protected void serialize(DataOutputStream stream) throws IOException { public static ArithmeticUnaryExpression positive( @Nonnull NodeLocation location, Expression value) { return new ArithmeticUnaryExpression( - requireNonNull(location, "location is null"), Sign.PLUS, value); + requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388), + Sign.PLUS, + value); } public static ArithmeticUnaryExpression negative( @Nonnull NodeLocation location, Expression value) { return new ArithmeticUnaryExpression( - requireNonNull(location, "location is null"), Sign.MINUS, value); + requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388), + Sign.MINUS, + value); } public static ArithmeticUnaryExpression positive(Expression value) { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/BetweenPredicate.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/BetweenPredicate.java index d301b7f842b6e..af14a7f5dc580 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/BetweenPredicate.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/BetweenPredicate.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -43,9 +45,9 @@ public final class BetweenPredicate extends Expression { public BetweenPredicate(Expression value, Expression min, Expression max) { super(null); - requireNonNull(value, "value is null"); - requireNonNull(min, "min is null"); - requireNonNull(max, "max is null"); + requireNonNull(value, QueryMessages.EXCEPTION_VALUE_IS_NULL_192F6BFF); + requireNonNull(min, QueryMessages.EXCEPTION_MIN_IS_NULL_B80144C1); + requireNonNull(max, QueryMessages.EXCEPTION_MAX_IS_NULL_CCABB3BF); this.value = value; this.min = min; @@ -54,10 +56,10 @@ public BetweenPredicate(Expression value, Expression min, Expression max) { public BetweenPredicate( @Nonnull NodeLocation location, Expression value, Expression min, Expression max) { - super(requireNonNull(location, "location is null")); - requireNonNull(value, "value is null"); - requireNonNull(min, "min is null"); - requireNonNull(max, "max is null"); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + requireNonNull(value, QueryMessages.EXCEPTION_VALUE_IS_NULL_192F6BFF); + requireNonNull(min, QueryMessages.EXCEPTION_MIN_IS_NULL_B80144C1); + requireNonNull(max, QueryMessages.EXCEPTION_MAX_IS_NULL_CCABB3BF); this.value = value; this.min = min; diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/BinaryLiteral.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/BinaryLiteral.java index 3a2a44e233aca..7da79a155441f 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/BinaryLiteral.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/BinaryLiteral.java @@ -49,7 +49,7 @@ public class BinaryLiteral extends Literal { public BinaryLiteral(String value) { super(null); - requireNonNull(value, "value is null"); + requireNonNull(value, QueryMessages.EXCEPTION_VALUE_IS_NULL_192F6BFF); String hexString = WHITESPACE_MATCHER.removeFrom(value).toUpperCase(ENGLISH); if (!HEX_DIGIT_MATCHER.matchesAllOf(hexString)) { throw new ParsingException(QueryMessages.BINARY_LITERAL_HEX_ONLY); @@ -62,13 +62,13 @@ public BinaryLiteral(String value) { public BinaryLiteral(byte[] value) { super(null); - requireNonNull(value, "value is null"); + requireNonNull(value, QueryMessages.EXCEPTION_VALUE_IS_NULL_192F6BFF); this.value = value; } public BinaryLiteral(NodeLocation location, String value) { - super(requireNonNull(location, "location is null")); - requireNonNull(value, "value is null"); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + requireNonNull(value, QueryMessages.EXCEPTION_VALUE_IS_NULL_192F6BFF); String hexString = WHITESPACE_MATCHER.removeFrom(value).toUpperCase(ENGLISH); if (!HEX_DIGIT_MATCHER.matchesAllOf(hexString)) { throw new ParsingException(QueryMessages.BINARY_LITERAL_HEX_ONLY, location); diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/BooleanLiteral.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/BooleanLiteral.java index 4ba420bee0b66..daaf811e5db84 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/BooleanLiteral.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/BooleanLiteral.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import org.apache.tsfile.utils.RamUsageEstimator; import org.apache.tsfile.utils.ReadWriteIOUtils; @@ -43,7 +45,7 @@ public class BooleanLiteral extends Literal { public BooleanLiteral(String value) { super(null); - requireNonNull(value, "value is null"); + requireNonNull(value, QueryMessages.EXCEPTION_VALUE_IS_NULL_192F6BFF); checkArgument( value.toLowerCase(ENGLISH).equals("true") || value.toLowerCase(ENGLISH).equals("false")); @@ -51,8 +53,8 @@ public BooleanLiteral(String value) { } public BooleanLiteral(NodeLocation location, String value) { - super(requireNonNull(location, "location is null")); - requireNonNull(value, "value is null"); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + requireNonNull(value, QueryMessages.EXCEPTION_VALUE_IS_NULL_192F6BFF); checkArgument( value.toLowerCase(ENGLISH).equals("true") || value.toLowerCase(ENGLISH).equals("false")); diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Cast.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Cast.java index 6b7d15dfc0e21..a118353169cc9 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Cast.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Cast.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; import org.apache.tsfile.utils.ReadWriteIOUtils; @@ -52,7 +54,7 @@ public Cast(Expression expression, DataType type, boolean safe) { public Cast(Expression expression, DataType type, boolean safe, boolean typeOnly) { super(null); - requireNonNull(expression, "expression is null"); + requireNonNull(expression, QueryMessages.EXCEPTION_EXPRESSION_IS_NULL_16C079B5); this.expression = expression; this.type = type; @@ -61,11 +63,21 @@ public Cast(Expression expression, DataType type, boolean safe, boolean typeOnly } public Cast(@Nonnull NodeLocation location, Expression expression, DataType type) { - this(requireNonNull(location, "location is null"), expression, type, false, false); + this( + requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388), + expression, + type, + false, + false); } public Cast(@Nonnull NodeLocation location, Expression expression, DataType type, boolean safe) { - this(requireNonNull(location, "location is null"), expression, type, safe, false); + this( + requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388), + expression, + type, + safe, + false); } private Cast( @@ -75,7 +87,7 @@ private Cast( boolean safe, boolean typeOnly) { super(location); - requireNonNull(expression, "expression is null"); + requireNonNull(expression, QueryMessages.EXCEPTION_EXPRESSION_IS_NULL_16C079B5); this.expression = expression; this.type = type; diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/CoalesceExpression.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/CoalesceExpression.java index e6dff6dca5912..e7069f0c441b0 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/CoalesceExpression.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/CoalesceExpression.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; import org.apache.tsfile.utils.ReadWriteIOUtils; @@ -48,16 +50,18 @@ public CoalesceExpression(Expression first, Expression second, Expression... add public CoalesceExpression(List operands) { super(null); - requireNonNull(operands, "operands is null"); - checkArgument(operands.size() >= 2, "must have at least two operands"); + requireNonNull(operands, QueryMessages.EXCEPTION_OPERANDS_IS_NULL_135465B7); + checkArgument( + operands.size() >= 2, QueryMessages.EXCEPTION_MUST_HAVE_AT_LEAST_TWO_OPERANDS_CE7B0DCB); this.operands = ImmutableList.copyOf(operands); } public CoalesceExpression(@Nonnull NodeLocation location, List operands) { - super(requireNonNull(location, "location is null")); - requireNonNull(operands, "operands is null"); - checkArgument(operands.size() >= 2, "must have at least two operands"); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + requireNonNull(operands, QueryMessages.EXCEPTION_OPERANDS_IS_NULL_135465B7); + checkArgument( + operands.size() >= 2, QueryMessages.EXCEPTION_MUST_HAVE_AT_LEAST_TWO_OPERANDS_CE7B0DCB); this.operands = ImmutableList.copyOf(operands); } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Columns.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Columns.java index f36a5ead1ef92..7e10773fde6fb 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Columns.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Columns.java @@ -39,7 +39,7 @@ public final class Columns extends Expression { private final String pattern; public Columns(@Nonnull NodeLocation location, String pattern) { - super(requireNonNull(location, "location is null")); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); this.pattern = pattern; } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/ComparisonExpression.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/ComparisonExpression.java index e2bddc8e1f964..8b63a8bb4179a 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/ComparisonExpression.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/ComparisonExpression.java @@ -109,9 +109,9 @@ public Operator negate() { public ComparisonExpression(Operator operator, Expression left, Expression right) { super(null); - requireNonNull(operator, "operator is null"); - requireNonNull(left, "left is null"); - requireNonNull(right, "right is null"); + requireNonNull(operator, QueryMessages.EXCEPTION_OPERATOR_IS_NULL_F5BB9F59); + requireNonNull(left, QueryMessages.EXCEPTION_LEFT_IS_NULL_2C1080C5); + requireNonNull(right, QueryMessages.EXCEPTION_RIGHT_IS_NULL_97BD6491); this.operator = operator; this.left = left; @@ -120,10 +120,10 @@ public ComparisonExpression(Operator operator, Expression left, Expression right public ComparisonExpression( @Nonnull NodeLocation location, Operator operator, Expression left, Expression right) { - super(requireNonNull(location, "location is null")); - requireNonNull(operator, "operator is null"); - requireNonNull(left, "left is null"); - requireNonNull(right, "right is null"); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + requireNonNull(operator, QueryMessages.EXCEPTION_OPERATOR_IS_NULL_F5BB9F59); + requireNonNull(left, QueryMessages.EXCEPTION_LEFT_IS_NULL_2C1080C5); + requireNonNull(right, QueryMessages.EXCEPTION_RIGHT_IS_NULL_97BD6491); this.operator = operator; this.left = left; diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/CurrentDatabase.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/CurrentDatabase.java index bb92937b29b52..2f1c3ac0dc6d7 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/CurrentDatabase.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/CurrentDatabase.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -38,7 +40,7 @@ public CurrentDatabase() { } public CurrentDatabase(@Nonnull final NodeLocation location) { - super(requireNonNull(location, "location is null")); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); } @Override diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/CurrentTime.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/CurrentTime.java index 28df3b23bf4fc..86250b33a2027 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/CurrentTime.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/CurrentTime.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -57,17 +59,17 @@ public String getName() { } public CurrentTime(NodeLocation location, Function function) { - super(requireNonNull(location, "location is null")); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); - this.function = requireNonNull(function, "function is null"); + this.function = requireNonNull(function, QueryMessages.EXCEPTION_FUNCTION_IS_NULL_E0FA4B62); this.precision = null; } public CurrentTime(NodeLocation location, Function function, Integer precision) { - super(requireNonNull(location, "location is null")); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); - this.function = requireNonNull(function, "function is null"); - this.precision = requireNonNull(precision, "precision is null"); + this.function = requireNonNull(function, QueryMessages.EXCEPTION_FUNCTION_IS_NULL_E0FA4B62); + this.precision = requireNonNull(precision, QueryMessages.EXCEPTION_PRECISION_IS_NULL_73E48139); } public Function getFunction() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/CurrentUser.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/CurrentUser.java index a3a767dc46e00..89d2fecfead90 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/CurrentUser.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/CurrentUser.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -38,7 +40,7 @@ public CurrentUser() { } public CurrentUser(@Nonnull final NodeLocation location) { - super(requireNonNull(location, "location is null")); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); } @Override diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/DecimalLiteral.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/DecimalLiteral.java index 1ea253369575e..0842b68e39355 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/DecimalLiteral.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/DecimalLiteral.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import org.apache.tsfile.utils.Binary; import org.apache.tsfile.utils.RamUsageEstimator; import org.apache.tsfile.utils.ReadWriteIOUtils; @@ -40,13 +42,13 @@ public class DecimalLiteral extends Literal { public DecimalLiteral(String value) { super(null); - this.value = requireNonNull(value, "value is null"); + this.value = requireNonNull(value, QueryMessages.EXCEPTION_VALUE_IS_NULL_192F6BFF); } public DecimalLiteral(NodeLocation location, String value) { - super(requireNonNull(location, "location is null")); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); - this.value = requireNonNull(value, "value is null"); + this.value = requireNonNull(value, QueryMessages.EXCEPTION_VALUE_IS_NULL_192F6BFF); } public String getValue() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/DereferenceExpression.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/DereferenceExpression.java index 052741f26b2ce..8e2ec748764d4 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/DereferenceExpression.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/DereferenceExpression.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -40,26 +42,26 @@ public class DereferenceExpression extends Expression { public DereferenceExpression(Expression base, Identifier field) { super(null); - this.base = requireNonNull(base, "base is null"); - this.field = requireNonNull(field, "field is null"); + this.base = requireNonNull(base, QueryMessages.EXCEPTION_BASE_IS_NULL_AC445AD0); + this.field = requireNonNull(field, QueryMessages.EXCEPTION_FIELD_IS_NULL_80E8CE23); } public DereferenceExpression(NodeLocation location, Expression base, Identifier field) { - super(requireNonNull(location, "location is null")); - this.base = requireNonNull(base, "base is null"); - this.field = requireNonNull(field, "field is null"); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.base = requireNonNull(base, QueryMessages.EXCEPTION_BASE_IS_NULL_AC445AD0); + this.field = requireNonNull(field, QueryMessages.EXCEPTION_FIELD_IS_NULL_80E8CE23); } public DereferenceExpression(Identifier field) { super(null); this.base = null; - this.field = requireNonNull(field, "field is null"); + this.field = requireNonNull(field, QueryMessages.EXCEPTION_FIELD_IS_NULL_80E8CE23); } public DereferenceExpression(NodeLocation location, Identifier field) { - super(requireNonNull(location, "location is null")); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); this.base = null; - this.field = requireNonNull(field, "field is null"); + this.field = requireNonNull(field, QueryMessages.EXCEPTION_FIELD_IS_NULL_80E8CE23); } @Override diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/DoubleLiteral.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/DoubleLiteral.java index f0481473684be..3584dde5d02f2 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/DoubleLiteral.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/DoubleLiteral.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import org.apache.tsfile.utils.RamUsageEstimator; import org.apache.tsfile.utils.ReadWriteIOUtils; @@ -37,7 +39,8 @@ public class DoubleLiteral extends Literal { public DoubleLiteral(String value) { super(null); - this.value = Double.parseDouble(requireNonNull(value, "value is null")); + this.value = + Double.parseDouble(requireNonNull(value, QueryMessages.EXCEPTION_VALUE_IS_NULL_192F6BFF)); } public DoubleLiteral(double value) { @@ -46,8 +49,9 @@ public DoubleLiteral(double value) { } public DoubleLiteral(NodeLocation location, String value) { - super(requireNonNull(location, "location is null")); - this.value = Double.parseDouble(requireNonNull(value, "value is null")); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.value = + Double.parseDouble(requireNonNull(value, QueryMessages.EXCEPTION_VALUE_IS_NULL_192F6BFF)); } public double getValue() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Except.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Except.java index d9ad587f6e9b2..da7f224a483e8 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Except.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Except.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -37,15 +39,15 @@ public final class Except extends SetOperation { public Except(Relation left, Relation right, boolean distinct) { super(null, distinct); - this.left = requireNonNull(left, "left is null"); - this.right = requireNonNull(right, "right is null"); + this.left = requireNonNull(left, QueryMessages.EXCEPTION_LEFT_IS_NULL_2C1080C5); + this.right = requireNonNull(right, QueryMessages.EXCEPTION_RIGHT_IS_NULL_97BD6491); } public Except(NodeLocation location, Relation left, Relation right, boolean distinct) { - super(requireNonNull(location, "location is null"), distinct); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388), distinct); - this.left = requireNonNull(left, "left is null"); - this.right = requireNonNull(right, "right is null"); + this.left = requireNonNull(left, QueryMessages.EXCEPTION_LEFT_IS_NULL_2C1080C5); + this.right = requireNonNull(right, QueryMessages.EXCEPTION_RIGHT_IS_NULL_97BD6491); } public Relation getLeft() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/ExcludedPattern.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/ExcludedPattern.java index 672e78c405dc5..24198705c155f 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/ExcludedPattern.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/ExcludedPattern.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -36,7 +38,7 @@ public class ExcludedPattern extends RowPattern { public ExcludedPattern(NodeLocation location, RowPattern pattern) { super(location); - this.pattern = requireNonNull(pattern, "pattern is null"); + this.pattern = requireNonNull(pattern, QueryMessages.EXCEPTION_PATTERN_IS_NULL_AC4E239A); } public RowPattern getPattern() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/ExistsPredicate.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/ExistsPredicate.java index c5849adbf6362..bee57c12c560d 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/ExistsPredicate.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/ExistsPredicate.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -37,12 +39,12 @@ public class ExistsPredicate extends Expression { public ExistsPredicate(Expression subquery) { super(null); - this.subquery = requireNonNull(subquery, "subquery is null"); + this.subquery = requireNonNull(subquery, QueryMessages.EXCEPTION_SUBQUERY_IS_NULL_F0E1842F); } public ExistsPredicate(@Nonnull NodeLocation location, Expression subquery) { - super(requireNonNull(location, "location is null")); - this.subquery = requireNonNull(subquery, "subquery is null"); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.subquery = requireNonNull(subquery, QueryMessages.EXCEPTION_SUBQUERY_IS_NULL_F0E1842F); } public Expression getSubquery() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Extract.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Extract.java index ee8771ee1cd86..e81052ab654bc 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Extract.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Extract.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import com.google.errorprone.annotations.Immutable; import org.apache.tsfile.utils.RamUsageEstimator; @@ -65,8 +67,8 @@ public Extract(Expression expression, Field field) { public Extract(NodeLocation location, Expression expression, Field field) { super(location); - requireNonNull(expression, "expression is null"); - requireNonNull(field, "field is null"); + requireNonNull(expression, QueryMessages.EXCEPTION_EXPRESSION_IS_NULL_16C079B5); + requireNonNull(field, QueryMessages.EXCEPTION_FIELD_IS_NULL_80E8CE23); this.expression = expression; this.field = field; diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/FieldReference.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/FieldReference.java index 8f6d1ec997a75..21e5e1af0a08b 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/FieldReference.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/FieldReference.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -35,7 +37,8 @@ public class FieldReference extends Expression { public FieldReference(int fieldIndex) { super(null); - checkArgument(fieldIndex >= 0, "fieldIndex must be >= 0"); + checkArgument( + fieldIndex >= 0, QueryMessages.EXCEPTION_FIELDINDEX_MUST_BE_GREATER_THAN_EQUALS_0_4138C39B); this.fieldIndex = fieldIndex; } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Fill.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Fill.java index 303100aa74021..9329e10e36803 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Fill.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Fill.java @@ -19,6 +19,7 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; import org.apache.iotdb.commons.queryengine.plan.statement.component.FillPolicy; import com.google.common.base.MoreObjects; @@ -52,7 +53,7 @@ public class Fill extends Node { // used for constant fill public Fill(NodeLocation location, Literal fillValue) { - super(requireNonNull(location, "location is null")); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); this.fillValue = fillValue; this.timeBound = null; this.timeColumnIndex = null; @@ -76,10 +77,11 @@ public Fill( TimeDuration timeBound, LongLiteral timeColumnIndex, List fillGroupingElements) { - super(requireNonNull(location, "location is null")); - fillMethod = requireNonNull(fillMethod, "fillMethod is null"); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + fillMethod = requireNonNull(fillMethod, QueryMessages.EXCEPTION_FILLMETHOD_IS_NULL_2E5A83E6); if (fillMethod != FillPolicy.PREVIOUS && fillMethod != FillPolicy.NEXT) { - throw new IllegalArgumentException("Unsupported fill method: " + fillMethod); + throw new IllegalArgumentException( + QueryMessages.EXCEPTION_UNSUPPORTED_FILL_METHOD_0809912A + fillMethod); } this.fillValue = null; this.timeBound = timeBound; @@ -91,7 +93,7 @@ public Fill( // used for linear fill public Fill( NodeLocation location, LongLiteral timeColumnIndex, List fillGroupingElements) { - super(requireNonNull(location, "location is null")); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); this.fillValue = null; this.timeBound = null; this.timeColumnIndex = timeColumnIndex; diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/FloatLiteral.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/FloatLiteral.java index 1ce175e98416e..dc8c80abf11e9 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/FloatLiteral.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/FloatLiteral.java @@ -40,7 +40,8 @@ public class FloatLiteral extends Literal { public FloatLiteral(String value) { super(null); - this.value = Float.parseFloat(requireNonNull(value, "value is null")); + this.value = + Float.parseFloat(requireNonNull(value, QueryMessages.EXCEPTION_VALUE_IS_NULL_192F6BFF)); } public FloatLiteral(float value) { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/FrameBound.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/FrameBound.java index 50e70a2610d19..47f00e227e0ee 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/FrameBound.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/FrameBound.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; import org.apache.tsfile.utils.ReadWriteIOUtils; @@ -54,7 +56,7 @@ public FrameBound(NodeLocation location, Type type) { public FrameBound(NodeLocation location, Type type, Expression value) { super(location); - this.type = requireNonNull(type, "type is null"); + this.type = requireNonNull(type, QueryMessages.EXCEPTION_TYPE_IS_NULL_16A3D3EB); this.value = Optional.ofNullable(value); } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/FunctionCall.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/FunctionCall.java index ebb04a2a81f8b..64fd19a14899d 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/FunctionCall.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/FunctionCall.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; import org.apache.tsfile.utils.ReadWriteIOUtils; @@ -47,33 +49,34 @@ public class FunctionCall extends Expression { public FunctionCall(QualifiedName name, List arguments) { super(null); - this.name = requireNonNull(name, "name is null"); + this.name = requireNonNull(name, QueryMessages.EXCEPTION_NAME_IS_NULL_C8B35959); this.window = Optional.empty(); this.nullTreatment = Optional.empty(); this.distinct = false; this.processingMode = Optional.empty(); - this.arguments = requireNonNull(arguments, "arguments is null"); + this.arguments = requireNonNull(arguments, QueryMessages.EXCEPTION_ARGUMENTS_IS_NULL_B1F6D4F2); } public FunctionCall(QualifiedName name, boolean distinct, List arguments) { super(null); - this.name = requireNonNull(name, "name is null"); + this.name = requireNonNull(name, QueryMessages.EXCEPTION_NAME_IS_NULL_C8B35959); this.window = Optional.empty(); this.nullTreatment = Optional.empty(); this.distinct = distinct; this.processingMode = Optional.empty(); - this.arguments = requireNonNull(arguments, "arguments is null"); + this.arguments = requireNonNull(arguments, QueryMessages.EXCEPTION_ARGUMENTS_IS_NULL_B1F6D4F2); } public FunctionCall( QualifiedName name, Optional processingMode, List arguments) { super(null); - this.name = requireNonNull(name, "name is null"); + this.name = requireNonNull(name, QueryMessages.EXCEPTION_NAME_IS_NULL_C8B35959); this.window = Optional.empty(); this.nullTreatment = Optional.empty(); this.distinct = false; - this.processingMode = requireNonNull(processingMode, "processingMode is null"); - this.arguments = requireNonNull(arguments, "arguments is null"); + this.processingMode = + requireNonNull(processingMode, QueryMessages.EXCEPTION_PROCESSINGMODE_IS_NULL_F4D8AE91); + this.arguments = requireNonNull(arguments, QueryMessages.EXCEPTION_ARGUMENTS_IS_NULL_B1F6D4F2); } public FunctionCall( @@ -82,12 +85,13 @@ public FunctionCall( Optional processingMode, List arguments) { super(null); - this.name = requireNonNull(name, "name is null"); + this.name = requireNonNull(name, QueryMessages.EXCEPTION_NAME_IS_NULL_C8B35959); this.window = Optional.empty(); this.nullTreatment = Optional.empty(); this.distinct = distinct; - this.processingMode = requireNonNull(processingMode, "processingMode is null"); - this.arguments = requireNonNull(arguments, "arguments is null"); + this.processingMode = + requireNonNull(processingMode, QueryMessages.EXCEPTION_PROCESSINGMODE_IS_NULL_F4D8AE91); + this.arguments = requireNonNull(arguments, QueryMessages.EXCEPTION_ARGUMENTS_IS_NULL_B1F6D4F2); } public FunctionCall(NodeLocation location, QualifiedName name, List arguments) { @@ -100,13 +104,14 @@ public FunctionCall( boolean distinct, Optional processingMode, List arguments) { - super(requireNonNull(location, "location is null")); - this.name = requireNonNull(name, "name is null"); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.name = requireNonNull(name, QueryMessages.EXCEPTION_NAME_IS_NULL_C8B35959); this.window = Optional.empty(); this.nullTreatment = Optional.empty(); this.distinct = distinct; - this.processingMode = requireNonNull(processingMode, "processingMode is null"); - this.arguments = requireNonNull(arguments, "arguments is null"); + this.processingMode = + requireNonNull(processingMode, QueryMessages.EXCEPTION_PROCESSINGMODE_IS_NULL_F4D8AE91); + this.arguments = requireNonNull(arguments, QueryMessages.EXCEPTION_ARGUMENTS_IS_NULL_B1F6D4F2); } public FunctionCall( @@ -116,7 +121,7 @@ public FunctionCall( Optional nullTreatment, boolean distinct, List arguments) { - super(requireNonNull(location, "location is null")); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); this.name = name; this.window = window; @@ -134,13 +139,14 @@ public FunctionCall( boolean distinct, Optional processingMode, List arguments) { - super(requireNonNull(location, "location is null")); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); this.name = name; this.window = window; this.nullTreatment = nullTreatment; this.distinct = distinct; - this.processingMode = requireNonNull(processingMode, "processingMode is null"); + this.processingMode = + requireNonNull(processingMode, QueryMessages.EXCEPTION_PROCESSINGMODE_IS_NULL_F4D8AE91); this.arguments = arguments; } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/GenericDataType.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/GenericDataType.java index c1e7e97759592..da0f7f9446820 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/GenericDataType.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/GenericDataType.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -43,15 +45,15 @@ public final class GenericDataType extends DataType { public GenericDataType(Identifier name, List arguments) { super(null); - this.name = requireNonNull(name, "name is null"); - this.arguments = requireNonNull(arguments, "arguments is null"); + this.name = requireNonNull(name, QueryMessages.EXCEPTION_NAME_IS_NULL_C8B35959); + this.arguments = requireNonNull(arguments, QueryMessages.EXCEPTION_ARGUMENTS_IS_NULL_B1F6D4F2); } public GenericDataType( @Nonnull NodeLocation location, Identifier name, List arguments) { - super(requireNonNull(location, "location is null")); - this.name = requireNonNull(name, "name is null"); - this.arguments = requireNonNull(arguments, "arguments is null"); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.name = requireNonNull(name, QueryMessages.EXCEPTION_NAME_IS_NULL_C8B35959); + this.arguments = requireNonNull(arguments, QueryMessages.EXCEPTION_ARGUMENTS_IS_NULL_B1F6D4F2); } public Identifier getName() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/GenericLiteral.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/GenericLiteral.java index 958beaeda8aeb..87df4eabab3e6 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/GenericLiteral.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/GenericLiteral.java @@ -44,7 +44,7 @@ public class GenericLiteral extends Literal { public GenericLiteral(String type, String value) { super(null); - this.type = requireNonNull(type, "type is null"); + this.type = requireNonNull(type, QueryMessages.EXCEPTION_TYPE_IS_NULL_16A3D3EB); if (type.equalsIgnoreCase("X")) { // we explicitly disallow "X" as type name, so if the user arrived here, @@ -52,22 +52,20 @@ public GenericLiteral(String type, String value) { // added whitespace between the X and quote throw new ParsingException(QueryMessages.GENERIC_LITERAL_NO_SPACE); } - this.value = requireNonNull(value, "value is null"); + this.value = requireNonNull(value, QueryMessages.EXCEPTION_VALUE_IS_NULL_192F6BFF); } public GenericLiteral(NodeLocation location, String type, String value) { - super(requireNonNull(location, "location is null")); - this.type = requireNonNull(type, "type is null"); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.type = requireNonNull(type, QueryMessages.EXCEPTION_TYPE_IS_NULL_16A3D3EB); if (type.equalsIgnoreCase("X")) { // we explicitly disallow "X" as type name, so if the user arrived here, // it must be because that he intended to give a binaryLiteral instead, but // added whitespace between the X and quote - throw new ParsingException( - "Spaces are not allowed between 'X' and the starting quote of a binary literal", - location); + throw new ParsingException(QueryMessages.GENERIC_LITERAL_NO_SPACE, location); } - this.value = requireNonNull(value, "value is null"); + this.value = requireNonNull(value, QueryMessages.EXCEPTION_VALUE_IS_NULL_192F6BFF); } public String getType() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/GroupBy.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/GroupBy.java index 9a22e84243481..eff30c8ca51c5 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/GroupBy.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/GroupBy.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -43,7 +45,7 @@ public GroupBy(boolean isDistinct, List groupingElements) { public GroupBy( NodeLocation location, boolean isDistinct, List groupingElements) { - super(requireNonNull(location, "location is null")); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); this.isDistinct = isDistinct; this.groupingElements = ImmutableList.copyOf(requireNonNull(groupingElements)); } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/GroupingSets.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/GroupingSets.java index 31cf494a9a1d6..85abde03e23f7 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/GroupingSets.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/GroupingSets.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -46,17 +48,17 @@ public enum Type { public GroupingSets(Type type, List> sets) { super(null); - this.type = requireNonNull(type, "type is null"); - requireNonNull(sets, "sets is null"); - checkArgument(!sets.isEmpty(), "grouping sets cannot be empty"); + this.type = requireNonNull(type, QueryMessages.EXCEPTION_TYPE_IS_NULL_16A3D3EB); + requireNonNull(sets, QueryMessages.EXCEPTION_SETS_IS_NULL_C9A2FA67); + checkArgument(!sets.isEmpty(), QueryMessages.EXCEPTION_GROUPING_SETS_CANNOT_BE_EMPTY_8E0BE7DB); this.sets = sets.stream().map(ImmutableList::copyOf).collect(toImmutableList()); } public GroupingSets(NodeLocation location, Type type, List> sets) { - super(requireNonNull(location, "location is null")); - this.type = requireNonNull(type, "type is null"); - requireNonNull(sets, "sets is null"); - checkArgument(!sets.isEmpty(), "grouping sets cannot be empty"); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.type = requireNonNull(type, QueryMessages.EXCEPTION_TYPE_IS_NULL_16A3D3EB); + requireNonNull(sets, QueryMessages.EXCEPTION_SETS_IS_NULL_C9A2FA67); + checkArgument(!sets.isEmpty(), QueryMessages.EXCEPTION_GROUPING_SETS_CANNOT_BE_EMPTY_8E0BE7DB); this.sets = sets.stream().map(ImmutableList::copyOf).collect(toImmutableList()); } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Identifier.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Identifier.java index 7c492c641ca96..1f1ecd6d6cfc5 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Identifier.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Identifier.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.base.CharMatcher; import com.google.common.base.Strings; import com.google.common.collect.ImmutableList; @@ -55,39 +57,43 @@ public class Identifier extends Expression { private final boolean delimited; public Identifier(NodeLocation location, String value, boolean delimited) { - super(requireNonNull(location, "location is null")); - this.value = requireNonNull(value, "value is null"); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.value = requireNonNull(value, QueryMessages.EXCEPTION_VALUE_IS_NULL_192F6BFF); this.delimited = delimited; - checkArgument(!value.isEmpty(), "value is empty"); + checkArgument(!value.isEmpty(), QueryMessages.EXCEPTION_VALUE_IS_EMPTY_A42300DD); checkArgument( - delimited || isValidIdentifier(value), "value contains illegal characters: %s", value); + delimited || isValidIdentifier(value), + QueryMessages.EXCEPTION_VALUE_CONTAINS_ILLEGAL_CHARACTERS_COLON_ARG_C6DBFEBA, + value); } public Identifier(NodeLocation location, String value) { - super(requireNonNull(location, "location is null")); - this.value = requireNonNull(value, "value is null"); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.value = requireNonNull(value, QueryMessages.EXCEPTION_VALUE_IS_NULL_192F6BFF); this.delimited = !isValidIdentifier(value); - checkArgument(!value.isEmpty(), "value is empty"); + checkArgument(!value.isEmpty(), QueryMessages.EXCEPTION_VALUE_IS_EMPTY_A42300DD); } public Identifier(String value, boolean delimited) { super(null); - this.value = requireNonNull(value, "value is null"); + this.value = requireNonNull(value, QueryMessages.EXCEPTION_VALUE_IS_NULL_192F6BFF); this.delimited = delimited; - checkArgument(!value.isEmpty(), "value is empty"); + checkArgument(!value.isEmpty(), QueryMessages.EXCEPTION_VALUE_IS_EMPTY_A42300DD); checkArgument( - delimited || isValidIdentifier(value), "value contains illegal characters: %s", value); + delimited || isValidIdentifier(value), + QueryMessages.EXCEPTION_VALUE_CONTAINS_ILLEGAL_CHARACTERS_COLON_ARG_C6DBFEBA, + value); } public Identifier(String value) { super(null); - this.value = requireNonNull(value, "value is null"); + this.value = requireNonNull(value, QueryMessages.EXCEPTION_VALUE_IS_NULL_192F6BFF); this.delimited = !isValidIdentifier(value); - checkArgument(!value.isEmpty(), "value is empty"); + checkArgument(!value.isEmpty(), QueryMessages.EXCEPTION_VALUE_IS_EMPTY_A42300DD); } public String getValue() { @@ -145,7 +151,9 @@ public boolean shallowEquals(Node other) { } private static boolean isValidIdentifier(String value) { - verify(!Strings.isNullOrEmpty(value), "Identifier cannot be empty or null"); + verify( + !Strings.isNullOrEmpty(value), + QueryMessages.EXCEPTION_IDENTIFIER_CANNOT_BE_EMPTY_OR_NULL_9C70B87D); if (FIRST_CHAR_DISALLOWED_MATCHER.matches(value.charAt(0))) { return false; diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/IfExpression.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/IfExpression.java index ca3d7cf8a01d1..ee50c57ce7b0b 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/IfExpression.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/IfExpression.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -41,8 +43,8 @@ public class IfExpression extends Expression { public IfExpression(Expression condition, Expression trueValue, @Nullable Expression falseValue) { super(null); - this.condition = requireNonNull(condition, "condition is null"); - this.trueValue = requireNonNull(trueValue, "trueValue is null"); + this.condition = requireNonNull(condition, QueryMessages.EXCEPTION_CONDITION_IS_NULL_327EBA55); + this.trueValue = requireNonNull(trueValue, QueryMessages.EXCEPTION_TRUEVALUE_IS_NULL_99C09BA5); this.falseValue = falseValue; } @@ -51,9 +53,9 @@ public IfExpression( Expression condition, Expression trueValue, @Nullable Expression falseValue) { - super(requireNonNull(location, "location is null")); - this.condition = requireNonNull(condition, "condition is null"); - this.trueValue = requireNonNull(trueValue, "trueValue is null"); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.condition = requireNonNull(condition, QueryMessages.EXCEPTION_CONDITION_IS_NULL_327EBA55); + this.trueValue = requireNonNull(trueValue, QueryMessages.EXCEPTION_TRUEVALUE_IS_NULL_99C09BA5); this.falseValue = falseValue; } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/InListExpression.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/InListExpression.java index 9b7ea4a3e5877..24bf8976caad2 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/InListExpression.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/InListExpression.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; import org.apache.tsfile.utils.ReadWriteIOUtils; @@ -42,15 +44,15 @@ public class InListExpression extends Expression { public InListExpression(List values) { super(null); - requireNonNull(values, "values is null"); - checkArgument(!values.isEmpty(), "values cannot be empty"); + requireNonNull(values, QueryMessages.EXCEPTION_VALUES_IS_NULL_F1D7D3D8); + checkArgument(!values.isEmpty(), QueryMessages.EXCEPTION_VALUES_CANNOT_BE_EMPTY_F18F863D); this.values = ImmutableList.copyOf(values); } public InListExpression(NodeLocation location, List values) { - super(requireNonNull(location, "location is null")); - requireNonNull(values, "values is null"); - checkArgument(!values.isEmpty(), "values cannot be empty"); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + requireNonNull(values, QueryMessages.EXCEPTION_VALUES_IS_NULL_F1D7D3D8); + checkArgument(!values.isEmpty(), QueryMessages.EXCEPTION_VALUES_CANNOT_BE_EMPTY_F18F863D); this.values = ImmutableList.copyOf(values); } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/InPredicate.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/InPredicate.java index 976f0d25a9dff..2199ce57a71f0 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/InPredicate.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/InPredicate.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -40,14 +42,14 @@ public class InPredicate extends Expression { public InPredicate(Expression value, Expression valueList) { super(null); - this.value = requireNonNull(value, "value is null"); - this.valueList = requireNonNull(valueList, "valueList is null"); + this.value = requireNonNull(value, QueryMessages.EXCEPTION_VALUE_IS_NULL_192F6BFF); + this.valueList = requireNonNull(valueList, QueryMessages.EXCEPTION_VALUELIST_IS_NULL_9271DC51); } public InPredicate(NodeLocation location, Expression value, Expression valueList) { - super(requireNonNull(location, "location is null")); - this.value = requireNonNull(value, "value is null"); - this.valueList = requireNonNull(valueList, "valueList is null"); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.value = requireNonNull(value, QueryMessages.EXCEPTION_VALUE_IS_NULL_192F6BFF); + this.valueList = requireNonNull(valueList, QueryMessages.EXCEPTION_VALUELIST_IS_NULL_9271DC51); } public Expression getValue() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Intersect.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Intersect.java index cbe31fee92bc2..cf64028e98072 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Intersect.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Intersect.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -36,12 +38,16 @@ public final class Intersect extends SetOperation { public Intersect(List relations, boolean distinct) { super(null, distinct); - this.relations = ImmutableList.copyOf(requireNonNull(relations, "relations is null")); + this.relations = + ImmutableList.copyOf( + requireNonNull(relations, QueryMessages.EXCEPTION_RELATIONS_IS_NULL_0275CA3C)); } public Intersect(NodeLocation location, List relations, boolean distinct) { - super(requireNonNull(location, "location is null"), distinct); - this.relations = ImmutableList.copyOf(requireNonNull(relations, "relations is null")); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388), distinct); + this.relations = + ImmutableList.copyOf( + requireNonNull(relations, QueryMessages.EXCEPTION_RELATIONS_IS_NULL_0275CA3C)); } @Override diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/IsNotNullPredicate.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/IsNotNullPredicate.java index 2578710096a5f..f371d2cdf460a 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/IsNotNullPredicate.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/IsNotNullPredicate.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -39,12 +41,12 @@ public class IsNotNullPredicate extends Expression { public IsNotNullPredicate(Expression value) { super(null); - this.value = requireNonNull(value, "value is null"); + this.value = requireNonNull(value, QueryMessages.EXCEPTION_VALUE_IS_NULL_192F6BFF); } public IsNotNullPredicate(NodeLocation location, Expression value) { - super(requireNonNull(location, "location is null")); - this.value = requireNonNull(value, "value is null"); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.value = requireNonNull(value, QueryMessages.EXCEPTION_VALUE_IS_NULL_192F6BFF); } public IsNotNullPredicate(ByteBuffer byteBuffer) { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/IsNullPredicate.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/IsNullPredicate.java index ad52b29ce8a41..1fcbb778866fa 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/IsNullPredicate.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/IsNullPredicate.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -39,12 +41,12 @@ public class IsNullPredicate extends Expression { public IsNullPredicate(Expression value) { super(null); - this.value = requireNonNull(value, "value is null"); + this.value = requireNonNull(value, QueryMessages.EXCEPTION_VALUE_IS_NULL_192F6BFF); } public IsNullPredicate(NodeLocation location, Expression value) { - super(requireNonNull(location, "location is null")); - this.value = requireNonNull(value, "value is null"); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.value = requireNonNull(value, QueryMessages.EXCEPTION_VALUE_IS_NULL_192F6BFF); } public IsNullPredicate(ByteBuffer byteBuffer) { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Join.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Join.java index 2aaadc2d1bb1b..0acd05c60e334 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Join.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Join.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -54,44 +56,48 @@ public enum Type { public Join(Type type, Relation left, Relation right) { super(null); this.criteria = null; - checkArgument((type == Type.CROSS) || (type == Type.IMPLICIT), "No join criteria specified"); + checkArgument( + (type == Type.CROSS) || (type == Type.IMPLICIT), + QueryMessages.EXCEPTION_NO_JOIN_CRITERIA_SPECIFIED_44DED0B9); this.type = type; - this.left = requireNonNull(left, "left is null"); - this.right = requireNonNull(right, "right is null"); + this.left = requireNonNull(left, QueryMessages.EXCEPTION_LEFT_IS_NULL_2C1080C5); + this.right = requireNonNull(right, QueryMessages.EXCEPTION_RIGHT_IS_NULL_97BD6491); } public Join(NodeLocation location, Type type, Relation left, Relation right) { - super(requireNonNull(location, "location is null")); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); this.criteria = null; - checkArgument((type == Type.CROSS) || (type == Type.IMPLICIT), "No join criteria specified"); + checkArgument( + (type == Type.CROSS) || (type == Type.IMPLICIT), + QueryMessages.EXCEPTION_NO_JOIN_CRITERIA_SPECIFIED_44DED0B9); this.type = type; - this.left = requireNonNull(left, "left is null"); - this.right = requireNonNull(right, "right is null"); + this.left = requireNonNull(left, QueryMessages.EXCEPTION_LEFT_IS_NULL_2C1080C5); + this.right = requireNonNull(right, QueryMessages.EXCEPTION_RIGHT_IS_NULL_97BD6491); } public Join(Type type, Relation left, Relation right, JoinCriteria criteria) { super(null); - this.criteria = requireNonNull(criteria, "criteria is null"); + this.criteria = requireNonNull(criteria, QueryMessages.EXCEPTION_CRITERIA_IS_NULL_2996D1A3); checkArgument( !((type == Type.CROSS) || (type == Type.IMPLICIT)), - "%s join cannot have join criteria", + QueryMessages.EXCEPTION_ARG_JOIN_CANNOT_HAVE_JOIN_CRITERIA_3B23E0D1, type); this.type = type; - this.left = requireNonNull(left, "left is null"); - this.right = requireNonNull(right, "right is null"); + this.left = requireNonNull(left, QueryMessages.EXCEPTION_LEFT_IS_NULL_2C1080C5); + this.right = requireNonNull(right, QueryMessages.EXCEPTION_RIGHT_IS_NULL_97BD6491); } public Join( NodeLocation location, Type type, Relation left, Relation right, JoinCriteria criteria) { - super(requireNonNull(location, "location is null")); - this.criteria = requireNonNull(criteria, "criteria is null"); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.criteria = requireNonNull(criteria, QueryMessages.EXCEPTION_CRITERIA_IS_NULL_2996D1A3); checkArgument( !((type == Type.CROSS) || (type == Type.IMPLICIT)), - "%s join cannot have join criteria", + QueryMessages.EXCEPTION_ARG_JOIN_CANNOT_HAVE_JOIN_CRITERIA_3B23E0D1, type); this.type = type; - this.left = requireNonNull(left, "left is null"); - this.right = requireNonNull(right, "right is null"); + this.left = requireNonNull(left, QueryMessages.EXCEPTION_LEFT_IS_NULL_2C1080C5); + this.right = requireNonNull(right, QueryMessages.EXCEPTION_RIGHT_IS_NULL_97BD6491); } public Type getType() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/JoinUsing.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/JoinUsing.java index 8121280f87f4e..09e9781734a8f 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/JoinUsing.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/JoinUsing.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -36,8 +38,8 @@ public class JoinUsing extends JoinCriteria { private final List columns; public JoinUsing(List columns) { - requireNonNull(columns, "columns is null"); - checkArgument(!columns.isEmpty(), "columns is empty"); + requireNonNull(columns, QueryMessages.EXCEPTION_COLUMNS_IS_NULL_6C8F32B3); + checkArgument(!columns.isEmpty(), QueryMessages.EXCEPTION_COLUMNS_IS_EMPTY_C7A671C9); this.columns = ImmutableList.copyOf(columns); } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/LikePredicate.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/LikePredicate.java index 0db19609b5a32..cec7e2df0e5f5 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/LikePredicate.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/LikePredicate.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; import org.apache.tsfile.utils.ReadWriteIOUtils; @@ -45,31 +47,31 @@ public class LikePredicate extends Expression { public LikePredicate(Expression value, Expression pattern, Expression escape) { super(null); - this.value = requireNonNull(value, "value is null"); - this.pattern = requireNonNull(pattern, "pattern is null"); + this.value = requireNonNull(value, QueryMessages.EXCEPTION_VALUE_IS_NULL_192F6BFF); + this.pattern = requireNonNull(pattern, QueryMessages.EXCEPTION_PATTERN_IS_NULL_AC4E239A); this.escape = escape; } public LikePredicate(NodeLocation location, Expression value, Expression pattern) { - super(requireNonNull(location, "location is null")); - this.value = requireNonNull(value, "value is null"); - this.pattern = requireNonNull(pattern, "pattern is null"); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.value = requireNonNull(value, QueryMessages.EXCEPTION_VALUE_IS_NULL_192F6BFF); + this.pattern = requireNonNull(pattern, QueryMessages.EXCEPTION_PATTERN_IS_NULL_AC4E239A); this.escape = null; } public LikePredicate(Expression value, Expression pattern) { super(null); - this.value = requireNonNull(value, "value is null"); - this.pattern = requireNonNull(pattern, "pattern is null"); + this.value = requireNonNull(value, QueryMessages.EXCEPTION_VALUE_IS_NULL_192F6BFF); + this.pattern = requireNonNull(pattern, QueryMessages.EXCEPTION_PATTERN_IS_NULL_AC4E239A); this.escape = null; } public LikePredicate( NodeLocation location, Expression value, Expression pattern, Expression escape) { - super(requireNonNull(location, "location is null")); - this.value = requireNonNull(value, "value is null"); - this.pattern = requireNonNull(pattern, "pattern is null"); - this.escape = requireNonNull(escape, "escape is null"); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.value = requireNonNull(value, QueryMessages.EXCEPTION_VALUE_IS_NULL_192F6BFF); + this.pattern = requireNonNull(pattern, QueryMessages.EXCEPTION_PATTERN_IS_NULL_AC4E239A); + this.escape = requireNonNull(escape, QueryMessages.EXCEPTION_ESCAPE_IS_NULL_C9E4F69B); } public LikePredicate(ByteBuffer byteBuffer) { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Limit.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Limit.java index 1f16efb24308d..70c0b0be8555f 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Limit.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Limit.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -40,18 +42,18 @@ public Limit(Expression rowCount) { rowCount instanceof AllRows || rowCount instanceof LongLiteral || rowCount instanceof Parameter, - "unexpected rowCount class: %s", + QueryMessages.EXCEPTION_UNEXPECTED_ROWCOUNT_CLASS_COLON_ARG_170FC7CD, rowCount.getClass().getSimpleName()); this.rowCount = rowCount; } public Limit(NodeLocation location, Expression rowCount) { - super(requireNonNull(location, "location is null")); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); checkArgument( rowCount instanceof AllRows || rowCount instanceof LongLiteral || rowCount instanceof Parameter, - "unexpected rowCount class: %s", + QueryMessages.EXCEPTION_UNEXPECTED_ROWCOUNT_CLASS_COLON_ARG_170FC7CD, rowCount.getClass().getSimpleName()); this.rowCount = rowCount; } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/LogicalExpression.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/LogicalExpression.java index 72407bf23da03..3dc0326835e29 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/LogicalExpression.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/LogicalExpression.java @@ -61,15 +61,15 @@ public Operator flip() { public LogicalExpression(Operator operator, List terms) { super(null); - this.operator = requireNonNull(operator, "operator is null"); - checkArgument(terms.size() >= 2, "Expected at least 2 terms"); + this.operator = requireNonNull(operator, QueryMessages.EXCEPTION_OPERATOR_IS_NULL_F5BB9F59); + checkArgument(terms.size() >= 2, QueryMessages.EXCEPTION_EXPECTED_AT_LEAST_2_TERMS_87CD9010); this.terms = ImmutableList.copyOf(terms); } public LogicalExpression(NodeLocation location, Operator operator, List terms) { - super(requireNonNull(location, "location is null")); - this.operator = requireNonNull(operator, "operator is null"); - checkArgument(terms.size() >= 2, "Expected at least 2 terms"); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.operator = requireNonNull(operator, QueryMessages.EXCEPTION_OPERATOR_IS_NULL_F5BB9F59); + checkArgument(terms.size() >= 2, QueryMessages.EXCEPTION_EXPECTED_AT_LEAST_2_TERMS_87CD9010); this.terms = ImmutableList.copyOf(terms); } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/LongLiteral.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/LongLiteral.java index 64b314178a2cf..694e7af0019dc 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/LongLiteral.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/LongLiteral.java @@ -50,7 +50,7 @@ public LongLiteral(String value) { } public LongLiteral(NodeLocation location, String value) { - super(requireNonNull(location, "location is null")); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); try { this.value = value; this.parsedValue = parse(value); diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/MeasureDefinition.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/MeasureDefinition.java index b99e25270ce06..9a95c32c69b9d 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/MeasureDefinition.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/MeasureDefinition.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -37,8 +39,9 @@ public class MeasureDefinition extends Node { public MeasureDefinition(NodeLocation location, Expression expression, Identifier name) { super(location); - this.expression = requireNonNull(expression, "expression is null"); - this.name = requireNonNull(name, "name is null"); + this.expression = + requireNonNull(expression, QueryMessages.EXCEPTION_EXPRESSION_IS_NULL_16C079B5); + this.name = requireNonNull(name, QueryMessages.EXCEPTION_NAME_IS_NULL_C8B35959); } public Expression getExpression() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/NodeLocation.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/NodeLocation.java index c634ac27fc04c..6f060ef3897e9 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/NodeLocation.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/NodeLocation.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import java.util.Objects; import static com.google.common.base.Preconditions.checkArgument; @@ -29,8 +31,14 @@ public final class NodeLocation { private final int column; public NodeLocation(int line, int column) { - checkArgument(line >= 1, "line must be at least one, got: %s", line); - checkArgument(column >= 1, "column must be at least one, got: %s", column); + checkArgument( + line >= 1, + QueryMessages.EXCEPTION_LINE_MUST_BE_AT_LEAST_ONE_COMMA_GOT_COLON_ARG_6BA7A99C, + line); + checkArgument( + column >= 1, + QueryMessages.EXCEPTION_COLUMN_MUST_BE_AT_LEAST_ONE_COMMA_GOT_COLON_ARG_4A529240, + column); this.line = line; this.column = column; diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/NotExpression.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/NotExpression.java index 09f35a2fdf0a6..691950becb878 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/NotExpression.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/NotExpression.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -39,12 +41,12 @@ public class NotExpression extends Expression { public NotExpression(Expression value) { super(null); - this.value = requireNonNull(value, "value is null"); + this.value = requireNonNull(value, QueryMessages.EXCEPTION_VALUE_IS_NULL_192F6BFF); } public NotExpression(NodeLocation location, Expression value) { - super(requireNonNull(location, "location is null")); - this.value = requireNonNull(value, "value is null"); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.value = requireNonNull(value, QueryMessages.EXCEPTION_VALUE_IS_NULL_192F6BFF); } public Expression getValue() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/NullIfExpression.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/NullIfExpression.java index 564954920b349..7f45a956b5201 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/NullIfExpression.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/NullIfExpression.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -37,14 +39,14 @@ public class NullIfExpression extends Expression { public NullIfExpression(Expression first, Expression second) { super(null); - this.first = requireNonNull(first, "first is null"); - this.second = requireNonNull(first, "second is null"); + this.first = requireNonNull(first, QueryMessages.EXCEPTION_FIRST_IS_NULL_DC679129); + this.second = requireNonNull(first, QueryMessages.EXCEPTION_SECOND_IS_NULL_989FAA15); } public NullIfExpression(NodeLocation location, Expression first, Expression second) { - super(requireNonNull(location, "location is null")); - this.first = requireNonNull(first, "first is null"); - this.second = requireNonNull(first, "second is null"); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.first = requireNonNull(first, QueryMessages.EXCEPTION_FIRST_IS_NULL_DC679129); + this.second = requireNonNull(first, QueryMessages.EXCEPTION_SECOND_IS_NULL_989FAA15); } public Expression getFirst() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/NullLiteral.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/NullLiteral.java index ff305bbc9f051..d111def6af636 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/NullLiteral.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/NullLiteral.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import org.apache.tsfile.utils.RamUsageEstimator; import java.io.DataOutputStream; @@ -37,7 +39,7 @@ public NullLiteral() { } public NullLiteral(NodeLocation location) { - super(requireNonNull(location, "location is null")); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); } @Override diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/NumericParameter.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/NumericParameter.java index 842fd795d7e49..337eaaf46a53f 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/NumericParameter.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/NumericParameter.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -36,12 +38,12 @@ public class NumericParameter extends DataTypeParameter { public NumericParameter(String value) { super(null); - this.value = requireNonNull(value, "value is null"); + this.value = requireNonNull(value, QueryMessages.EXCEPTION_VALUE_IS_NULL_192F6BFF); } public NumericParameter(@Nonnull NodeLocation location, String value) { - super(requireNonNull(location, "location is null")); - this.value = requireNonNull(value, "value is null"); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.value = requireNonNull(value, QueryMessages.EXCEPTION_VALUE_IS_NULL_192F6BFF); } public String getValue() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Offset.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Offset.java index 3a4ed9f81283d..ac018a1c22379 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Offset.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Offset.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -39,17 +41,17 @@ public Offset(Expression rowCount) { super(null); checkArgument( rowCount instanceof LongLiteral || rowCount instanceof Parameter, - "unexpected rowCount class: %s", + QueryMessages.EXCEPTION_UNEXPECTED_ROWCOUNT_CLASS_COLON_ARG_170FC7CD, rowCount.getClass().getSimpleName()); this.rowCount = rowCount; } public Offset(NodeLocation location, Expression rowCount) { - super(requireNonNull(location, "location is null")); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); checkArgument( rowCount instanceof LongLiteral || rowCount instanceof Parameter, - "unexpected rowCount class: %s", + QueryMessages.EXCEPTION_UNEXPECTED_ROWCOUNT_CLASS_COLON_ARG_170FC7CD, rowCount.getClass().getSimpleName()); this.rowCount = rowCount; } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/OrderBy.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/OrderBy.java index 6a83489342b7a..43a7538271401 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/OrderBy.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/OrderBy.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; import org.apache.tsfile.utils.ReadWriteIOUtils; @@ -42,15 +44,17 @@ public class OrderBy extends Node { public OrderBy(List sortItems) { super(null); - requireNonNull(sortItems, "sortItems is null"); - checkArgument(!sortItems.isEmpty(), "sortItems should not be empty"); + requireNonNull(sortItems, QueryMessages.EXCEPTION_SORTITEMS_IS_NULL_DD277CDD); + checkArgument( + !sortItems.isEmpty(), QueryMessages.EXCEPTION_SORTITEMS_SHOULD_NOT_BE_EMPTY_78C26791); this.sortItems = ImmutableList.copyOf(sortItems); } public OrderBy(NodeLocation location, List sortItems) { - super(requireNonNull(location, "location is null")); - requireNonNull(sortItems, "sortItems is null"); - checkArgument(!sortItems.isEmpty(), "sortItems should not be empty"); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + requireNonNull(sortItems, QueryMessages.EXCEPTION_SORTITEMS_IS_NULL_DD277CDD); + checkArgument( + !sortItems.isEmpty(), QueryMessages.EXCEPTION_SORTITEMS_SHOULD_NOT_BE_EMPTY_78C26791); this.sortItems = ImmutableList.copyOf(sortItems); } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Parameter.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Parameter.java index bc0d7f02ca976..6c511e8d7f6d8 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Parameter.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Parameter.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -39,7 +41,7 @@ public Parameter(int id) { } public Parameter(NodeLocation location, int id) { - super(requireNonNull(location, "location is null")); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); this.id = id; } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/PatternAlternation.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/PatternAlternation.java index 98940ef838e33..9e21ad72ee27d 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/PatternAlternation.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/PatternAlternation.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -37,8 +39,8 @@ public class PatternAlternation extends RowPattern { public PatternAlternation(NodeLocation location, List patterns) { super(location); - this.patterns = requireNonNull(patterns, "patterns is null"); - checkArgument(!patterns.isEmpty(), "patterns list is empty"); + this.patterns = requireNonNull(patterns, QueryMessages.EXCEPTION_PATTERNS_IS_NULL_7E0DDDF0); + checkArgument(!patterns.isEmpty(), QueryMessages.EXCEPTION_PATTERNS_LIST_IS_EMPTY_D4D1802F); } public List getPatterns() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/PatternConcatenation.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/PatternConcatenation.java index bc380cec48f45..be6b80f05cd01 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/PatternConcatenation.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/PatternConcatenation.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -37,8 +39,8 @@ public class PatternConcatenation extends RowPattern { public PatternConcatenation(NodeLocation location, List patterns) { super(location); - this.patterns = requireNonNull(patterns, "patterns is null"); - checkArgument(!patterns.isEmpty(), "patterns list is empty"); + this.patterns = requireNonNull(patterns, QueryMessages.EXCEPTION_PATTERNS_IS_NULL_7E0DDDF0); + checkArgument(!patterns.isEmpty(), QueryMessages.EXCEPTION_PATTERNS_LIST_IS_EMPTY_D4D1802F); } public List getPatterns() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/PatternPermutation.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/PatternPermutation.java index a1467daa5e8a5..4b2fe7e102c7a 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/PatternPermutation.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/PatternPermutation.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -37,8 +39,8 @@ public class PatternPermutation extends RowPattern { public PatternPermutation(NodeLocation location, List patterns) { super(location); - this.patterns = requireNonNull(patterns, "patterns is null"); - checkArgument(!patterns.isEmpty(), "patterns list is empty"); + this.patterns = requireNonNull(patterns, QueryMessages.EXCEPTION_PATTERNS_IS_NULL_7E0DDDF0); + checkArgument(!patterns.isEmpty(), QueryMessages.EXCEPTION_PATTERNS_LIST_IS_EMPTY_D4D1802F); } public List getPatterns() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/PatternRecognitionRelation.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/PatternRecognitionRelation.java index 91d8569b68786..5097245e3ed39 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/PatternRecognitionRelation.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/PatternRecognitionRelation.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -56,16 +58,22 @@ public PatternRecognitionRelation( List subsets, List variableDefinitions) { super(location); - this.input = requireNonNull(input, "input is null"); - this.partitionBy = requireNonNull(partitionBy, "partitionBy is null"); - this.orderBy = requireNonNull(orderBy, "orderBy is null"); - this.measures = requireNonNull(measures, "measures is null"); - this.rowsPerMatch = requireNonNull(rowsPerMatch, "rowsPerMatch is null"); - this.afterMatchSkipTo = requireNonNull(afterMatchSkipTo, "afterMatchSkipTo is null"); - this.pattern = requireNonNull(pattern, "pattern is null"); - this.subsets = requireNonNull(subsets, "subsets is null"); - requireNonNull(variableDefinitions, "variableDefinitions is null"); - checkArgument(!variableDefinitions.isEmpty(), "variableDefinitions is empty"); + this.input = requireNonNull(input, QueryMessages.EXCEPTION_INPUT_IS_NULL_EE7EADB0); + this.partitionBy = + requireNonNull(partitionBy, QueryMessages.EXCEPTION_PARTITIONBY_IS_NULL_84791B6B); + this.orderBy = requireNonNull(orderBy, QueryMessages.EXCEPTION_ORDERBY_IS_NULL_AA2494DE); + this.measures = requireNonNull(measures, QueryMessages.EXCEPTION_MEASURES_IS_NULL_EC9D2431); + this.rowsPerMatch = + requireNonNull(rowsPerMatch, QueryMessages.EXCEPTION_ROWSPERMATCH_IS_NULL_661EA4A9); + this.afterMatchSkipTo = + requireNonNull(afterMatchSkipTo, QueryMessages.EXCEPTION_AFTERMATCHSKIPTO_IS_NULL_7623C3C0); + this.pattern = requireNonNull(pattern, QueryMessages.EXCEPTION_PATTERN_IS_NULL_AC4E239A); + this.subsets = requireNonNull(subsets, QueryMessages.EXCEPTION_SUBSETS_IS_NULL_AF77CD01); + requireNonNull( + variableDefinitions, QueryMessages.EXCEPTION_VARIABLEDEFINITIONS_IS_NULL_5F7B8ED4); + checkArgument( + !variableDefinitions.isEmpty(), + QueryMessages.EXCEPTION_VARIABLEDEFINITIONS_IS_EMPTY_9E324869); this.variableDefinitions = variableDefinitions; } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/PatternVariable.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/PatternVariable.java index 8ca766fc9d1ac..24d237fbb28c5 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/PatternVariable.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/PatternVariable.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -36,7 +38,7 @@ public class PatternVariable extends RowPattern { public PatternVariable(NodeLocation location, Identifier name) { super(location); - this.name = requireNonNull(name, "name is null"); + this.name = requireNonNull(name, QueryMessages.EXCEPTION_NAME_IS_NULL_C8B35959); } public Identifier getName() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/ProcessingMode.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/ProcessingMode.java index 2cecdee607ce3..fda29b6d5615c 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/ProcessingMode.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/ProcessingMode.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -36,7 +38,7 @@ public final class ProcessingMode extends Node { public ProcessingMode(NodeLocation location, Mode mode) { super(location); - this.mode = requireNonNull(mode, "mode is null"); + this.mode = requireNonNull(mode, QueryMessages.EXCEPTION_MODE_IS_NULL_54A948DB); } public Mode getMode() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/QualifiedName.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/QualifiedName.java index 4f5cc295f2595..ea1ae2ab2db7b 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/QualifiedName.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/QualifiedName.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; import org.apache.tsfile.utils.Accountable; @@ -56,18 +58,18 @@ public class QualifiedName implements Accountable { private final String suffix; public static QualifiedName of(String first, String... rest) { - requireNonNull(first, "first is null"); + requireNonNull(first, QueryMessages.EXCEPTION_FIRST_IS_NULL_DC679129); return of(Lists.asList(first, rest).stream().map(Identifier::new).collect(toImmutableList())); } public static QualifiedName of(String name) { - requireNonNull(name, "name is null"); + requireNonNull(name, QueryMessages.EXCEPTION_NAME_IS_NULL_C8B35959); return of(ImmutableList.of(new Identifier(name))); } public static QualifiedName of(Iterable originalParts) { - requireNonNull(originalParts, "originalParts is null"); - checkArgument(!isEmpty(originalParts), "originalParts is empty"); + requireNonNull(originalParts, QueryMessages.EXCEPTION_ORIGINALPARTS_IS_NULL_EA9B01F3); + checkArgument(!isEmpty(originalParts), QueryMessages.EXCEPTION_ORIGINALPARTS_IS_EMPTY_0D1EFAC4); return new QualifiedName(ImmutableList.copyOf(originalParts)); } @@ -80,7 +82,7 @@ public QualifiedName( String suffix) { this.originalParts = ImmutableList.copyOf(originalParts); this.parts = ImmutableList.copyOf(parts); - this.name = requireNonNull(name, "name is null"); + this.name = requireNonNull(name, QueryMessages.EXCEPTION_NAME_IS_NULL_C8B35959); this.prefix = prefix; this.suffix = suffix; } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/QuantifiedComparisonExpression.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/QuantifiedComparisonExpression.java index f724c4db709cf..241f89ceb95d0 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/QuantifiedComparisonExpression.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/QuantifiedComparisonExpression.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -49,10 +51,11 @@ public QuantifiedComparisonExpression( Expression value, Expression subquery) { super(null); - this.operator = requireNonNull(operator, "operator is null"); - this.quantifier = requireNonNull(quantifier, "quantifier is null"); - this.value = requireNonNull(value, "value is null"); - this.subquery = requireNonNull(subquery, "subquery is null"); + this.operator = requireNonNull(operator, QueryMessages.EXCEPTION_OPERATOR_IS_NULL_F5BB9F59); + this.quantifier = + requireNonNull(quantifier, QueryMessages.EXCEPTION_QUANTIFIER_IS_NULL_7B81C096); + this.value = requireNonNull(value, QueryMessages.EXCEPTION_VALUE_IS_NULL_192F6BFF); + this.subquery = requireNonNull(subquery, QueryMessages.EXCEPTION_SUBQUERY_IS_NULL_F0E1842F); } public QuantifiedComparisonExpression( @@ -61,11 +64,12 @@ public QuantifiedComparisonExpression( Quantifier quantifier, Expression value, Expression subquery) { - super(requireNonNull(location, "location is null")); - this.operator = requireNonNull(operator, "operator is null"); - this.quantifier = requireNonNull(quantifier, "quantifier is null"); - this.value = requireNonNull(value, "value is null"); - this.subquery = requireNonNull(subquery, "subquery is null"); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.operator = requireNonNull(operator, QueryMessages.EXCEPTION_OPERATOR_IS_NULL_F5BB9F59); + this.quantifier = + requireNonNull(quantifier, QueryMessages.EXCEPTION_QUANTIFIER_IS_NULL_7B81C096); + this.value = requireNonNull(value, QueryMessages.EXCEPTION_VALUE_IS_NULL_192F6BFF); + this.subquery = requireNonNull(subquery, QueryMessages.EXCEPTION_SUBQUERY_IS_NULL_F0E1842F); } public ComparisonExpression.Operator getOperator() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/QuantifiedPattern.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/QuantifiedPattern.java index b3145f3f69fe5..b8aef3460ae25 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/QuantifiedPattern.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/QuantifiedPattern.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -38,8 +40,10 @@ public class QuantifiedPattern extends RowPattern { public QuantifiedPattern( NodeLocation location, RowPattern pattern, PatternQuantifier patternQuantifier) { super(location); - this.pattern = requireNonNull(pattern, "pattern is null"); - this.patternQuantifier = requireNonNull(patternQuantifier, "patternQuantifier is null"); + this.pattern = requireNonNull(pattern, QueryMessages.EXCEPTION_PATTERN_IS_NULL_AC4E239A); + this.patternQuantifier = + requireNonNull( + patternQuantifier, QueryMessages.EXCEPTION_PATTERNQUANTIFIER_IS_NULL_0AC88BAB); } public RowPattern getPattern() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Query.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Query.java index 2e29e85c399eb..6c1d0395ad9db 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Query.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Query.java @@ -19,6 +19,7 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; import org.apache.iotdb.commons.queryengine.utils.cte.CteDataStore; import com.google.common.collect.ImmutableList; @@ -68,15 +69,15 @@ public Query( Optional offset, Optional limit) { super(location); - requireNonNull(with, "with is null"); - requireNonNull(queryBody, "queryBody is null"); - requireNonNull(fill, "fill is null"); - requireNonNull(orderBy, "orderBy is null"); - requireNonNull(offset, "offset is null"); - requireNonNull(limit, "limit is null"); + requireNonNull(with, QueryMessages.EXCEPTION_WITH_IS_NULL_20C2A1AE); + requireNonNull(queryBody, QueryMessages.EXCEPTION_QUERYBODY_IS_NULL_E3EB26CA); + requireNonNull(fill, QueryMessages.EXCEPTION_FILL_IS_NULL_3548C13D); + requireNonNull(orderBy, QueryMessages.EXCEPTION_ORDERBY_IS_NULL_AA2494DE); + requireNonNull(offset, QueryMessages.EXCEPTION_OFFSET_IS_NULL_82BA6093); + requireNonNull(limit, QueryMessages.EXCEPTION_LIMIT_IS_NULL_2EE9FA0F); checkArgument( !limit.isPresent() || limit.get() instanceof Limit, - "limit must be optional of either FetchFirst or Limit type"); + QueryMessages.EXCEPTION_LIMIT_MUST_BE_OPTIONAL_OF_EITHER_FETCHFIRST_OR_LIMIT_TYPE_0636CAA9); this.with = with; this.queryBody = queryBody; diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/QuerySpecification.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/QuerySpecification.java index 28489a91bbcc6..2fcc22498e5f7 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/QuerySpecification.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/QuerySpecification.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -73,16 +75,16 @@ public QuerySpecification( Optional limit) { super(location); - this.select = requireNonNull(select, "select is null"); - this.from = requireNonNull(from, "from is null"); - this.where = requireNonNull(where, "where is null"); - this.groupBy = requireNonNull(groupBy, "groupBy is null"); - this.having = requireNonNull(having, "having is null"); - this.fill = requireNonNull(fill, "fill is null"); - this.windows = requireNonNull(windows, "windows is null"); - this.orderBy = requireNonNull(orderBy, "orderBy is null"); - this.offset = requireNonNull(offset, "offset is null"); - this.limit = requireNonNull(limit, "limit is null"); + this.select = requireNonNull(select, QueryMessages.EXCEPTION_SELECT_IS_NULL_B45C440F); + this.from = requireNonNull(from, QueryMessages.EXCEPTION_FROM_IS_NULL_2651BF57); + this.where = requireNonNull(where, QueryMessages.EXCEPTION_WHERE_IS_NULL_A1A3FCBC); + this.groupBy = requireNonNull(groupBy, QueryMessages.EXCEPTION_GROUPBY_IS_NULL_4CF478F2); + this.having = requireNonNull(having, QueryMessages.EXCEPTION_HAVING_IS_NULL_700DC5B0); + this.fill = requireNonNull(fill, QueryMessages.EXCEPTION_FILL_IS_NULL_3548C13D); + this.windows = requireNonNull(windows, QueryMessages.EXCEPTION_WINDOWS_IS_NULL_549D8892); + this.orderBy = requireNonNull(orderBy, QueryMessages.EXCEPTION_ORDERBY_IS_NULL_AA2494DE); + this.offset = requireNonNull(offset, QueryMessages.EXCEPTION_OFFSET_IS_NULL_82BA6093); + this.limit = requireNonNull(limit, QueryMessages.EXCEPTION_LIMIT_IS_NULL_2EE9FA0F); } public Select getSelect() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/RangeQuantifier.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/RangeQuantifier.java index 560b6cef40344..a22ba6e916652 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/RangeQuantifier.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/RangeQuantifier.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -42,8 +44,8 @@ public RangeQuantifier( Optional atLeast, Optional atMost) { super(location, greedy); - this.atLeast = requireNonNull(atLeast, "atLeast is null"); - this.atMost = requireNonNull(atMost, "atMost is null"); + this.atLeast = requireNonNull(atLeast, QueryMessages.EXCEPTION_ATLEAST_IS_NULL_2FE8D701); + this.atMost = requireNonNull(atMost, QueryMessages.EXCEPTION_ATMOST_IS_NULL_778B3B3A); } public Optional getAtLeast() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Row.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Row.java index 4670908983c07..e7592e6ee5b81 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Row.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Row.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; import org.apache.tsfile.utils.ReadWriteIOUtils; @@ -39,12 +41,14 @@ public class Row extends Expression { public Row(List items) { super(null); - this.items = ImmutableList.copyOf(requireNonNull(items, "items is null")); + this.items = + ImmutableList.copyOf(requireNonNull(items, QueryMessages.EXCEPTION_ITEMS_IS_NULL_32A25379)); } public Row(NodeLocation location, List items) { - super(requireNonNull(location, "location is null")); - this.items = ImmutableList.copyOf(requireNonNull(items, "items is null")); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.items = + ImmutableList.copyOf(requireNonNull(items, QueryMessages.EXCEPTION_ITEMS_IS_NULL_32A25379)); } public Row(ByteBuffer byteBuffer) { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/SearchedCaseExpression.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/SearchedCaseExpression.java index e4d123d136880..fa99a71859282 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/SearchedCaseExpression.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/SearchedCaseExpression.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.external.commons.lang3.Validate; import org.apache.tsfile.utils.RamUsageEstimator; @@ -45,7 +47,9 @@ public class SearchedCaseExpression extends Expression { public SearchedCaseExpression(List whenClauses) { super(null); - this.whenClauses = ImmutableList.copyOf(requireNonNull(whenClauses, "whenClauses is null")); + this.whenClauses = + ImmutableList.copyOf( + requireNonNull(whenClauses, QueryMessages.EXCEPTION_WHENCLAUSES_IS_NULL_140535CF)); this.defaultValue = null; } @@ -53,7 +57,9 @@ public SearchedCaseExpression(ByteBuffer byteBuffer) { super(null); int len = ReadWriteIOUtils.readInt(byteBuffer); Validate.isTrue( - len > 0, "the length of SearchedCaseExpression's whenClauses must greater than 0"); + len > 0, + QueryMessages + .EXCEPTION_THE_LENGTH_OF_SEARCHEDCASEEXPRESSION_QUOTE_S_WHENCLAUSES_MUST_GREATER_THAN_0_D710DBF6); this.whenClauses = new ArrayList<>(); for (int i = 0; i < len; i++) { @@ -70,21 +76,29 @@ public TableExpressionType getExpressionType() { public SearchedCaseExpression(List whenClauses, Expression defaultValue) { super(null); - this.whenClauses = ImmutableList.copyOf(requireNonNull(whenClauses, "whenClauses is null")); - this.defaultValue = requireNonNull(defaultValue, "defaultValue is null"); + this.whenClauses = + ImmutableList.copyOf( + requireNonNull(whenClauses, QueryMessages.EXCEPTION_WHENCLAUSES_IS_NULL_140535CF)); + this.defaultValue = + requireNonNull(defaultValue, QueryMessages.EXCEPTION_DEFAULTVALUE_IS_NULL_B1C8490D); } public SearchedCaseExpression(NodeLocation location, List whenClauses) { - super(requireNonNull(location, "location is null")); - this.whenClauses = ImmutableList.copyOf(requireNonNull(whenClauses, "whenClauses is null")); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.whenClauses = + ImmutableList.copyOf( + requireNonNull(whenClauses, QueryMessages.EXCEPTION_WHENCLAUSES_IS_NULL_140535CF)); this.defaultValue = null; } public SearchedCaseExpression( NodeLocation location, List whenClauses, Expression defaultValue) { - super(requireNonNull(location, "location is null")); - this.whenClauses = ImmutableList.copyOf(requireNonNull(whenClauses, "whenClauses is null")); - this.defaultValue = requireNonNull(defaultValue, "defaultValue is null"); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.whenClauses = + ImmutableList.copyOf( + requireNonNull(whenClauses, QueryMessages.EXCEPTION_WHENCLAUSES_IS_NULL_140535CF)); + this.defaultValue = + requireNonNull(defaultValue, QueryMessages.EXCEPTION_DEFAULTVALUE_IS_NULL_B1C8490D); } public List getWhenClauses() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Select.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Select.java index 300524043ceba..e80936f7c7a84 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Select.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Select.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -38,13 +40,17 @@ public class Select extends Node { public Select(boolean distinct, List selectItems) { super(null); this.distinct = distinct; - this.selectItems = ImmutableList.copyOf(requireNonNull(selectItems, "selectItems")); + this.selectItems = + ImmutableList.copyOf( + requireNonNull(selectItems, QueryMessages.EXCEPTION_SELECTITEMS_16EC72CF)); } public Select(NodeLocation location, boolean distinct, List selectItems) { - super(requireNonNull(location, "location is null")); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); this.distinct = distinct; - this.selectItems = ImmutableList.copyOf(requireNonNull(selectItems, "selectItems")); + this.selectItems = + ImmutableList.copyOf( + requireNonNull(selectItems, QueryMessages.EXCEPTION_SELECTITEMS_16EC72CF)); } public boolean isDistinct() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/SimpleCaseExpression.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/SimpleCaseExpression.java index cce24b7bce0e1..f8075d55a4b1d 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/SimpleCaseExpression.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/SimpleCaseExpression.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.external.commons.lang3.Validate; import org.apache.tsfile.utils.RamUsageEstimator; @@ -47,24 +49,31 @@ public class SimpleCaseExpression extends Expression { public SimpleCaseExpression(Expression operand, List whenClauses) { super(null); - this.operand = requireNonNull(operand, "operand is null"); - this.whenClauses = ImmutableList.copyOf(requireNonNull(whenClauses, "whenClauses is null")); + this.operand = requireNonNull(operand, QueryMessages.EXCEPTION_OPERAND_IS_NULL_D0182140); + this.whenClauses = + ImmutableList.copyOf( + requireNonNull(whenClauses, QueryMessages.EXCEPTION_WHENCLAUSES_IS_NULL_140535CF)); this.defaultValue = null; } public SimpleCaseExpression( Expression operand, List whenClauses, Expression defaultValue) { super(null); - this.operand = requireNonNull(operand, "operand is null"); - this.whenClauses = ImmutableList.copyOf(requireNonNull(whenClauses, "whenClauses is null")); - this.defaultValue = requireNonNull(defaultValue, "defaultValue is null"); + this.operand = requireNonNull(operand, QueryMessages.EXCEPTION_OPERAND_IS_NULL_D0182140); + this.whenClauses = + ImmutableList.copyOf( + requireNonNull(whenClauses, QueryMessages.EXCEPTION_WHENCLAUSES_IS_NULL_140535CF)); + this.defaultValue = + requireNonNull(defaultValue, QueryMessages.EXCEPTION_DEFAULTVALUE_IS_NULL_B1C8490D); } public SimpleCaseExpression( NodeLocation location, Expression operand, List whenClauses) { - super(requireNonNull(location, "location is null")); - this.operand = requireNonNull(operand, "operand is null"); - this.whenClauses = ImmutableList.copyOf(requireNonNull(whenClauses, "whenClauses is null")); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.operand = requireNonNull(operand, QueryMessages.EXCEPTION_OPERAND_IS_NULL_D0182140); + this.whenClauses = + ImmutableList.copyOf( + requireNonNull(whenClauses, QueryMessages.EXCEPTION_WHENCLAUSES_IS_NULL_140535CF)); this.defaultValue = null; } @@ -73,17 +82,22 @@ public SimpleCaseExpression( Expression operand, List whenClauses, Expression defaultValue) { - super(requireNonNull(location, "location is null")); - this.operand = requireNonNull(operand, "operand is null"); - this.whenClauses = ImmutableList.copyOf(requireNonNull(whenClauses, "whenClauses is null")); - this.defaultValue = requireNonNull(defaultValue, "defaultValue is null"); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.operand = requireNonNull(operand, QueryMessages.EXCEPTION_OPERAND_IS_NULL_D0182140); + this.whenClauses = + ImmutableList.copyOf( + requireNonNull(whenClauses, QueryMessages.EXCEPTION_WHENCLAUSES_IS_NULL_140535CF)); + this.defaultValue = + requireNonNull(defaultValue, QueryMessages.EXCEPTION_DEFAULTVALUE_IS_NULL_B1C8490D); } public SimpleCaseExpression(ByteBuffer byteBuffer) { super(null); int len = ReadWriteIOUtils.readInt(byteBuffer); Validate.isTrue( - len > 0, "the length of SimpleCaseExpression's whenClauses must greater than 0"); + len > 0, + QueryMessages + .EXCEPTION_THE_LENGTH_OF_SIMPLECASEEXPRESSION_QUOTE_S_WHENCLAUSES_MUST_GREATER_THAN_0_5D2963B9); this.operand = Expression.deserialize(byteBuffer); this.whenClauses = new ArrayList<>(); for (int i = 0; i < len; i++) { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/SimpleGroupBy.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/SimpleGroupBy.java index c9c84bc423cd2..7cfa8c4e9f845 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/SimpleGroupBy.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/SimpleGroupBy.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -39,14 +41,18 @@ public SimpleGroupBy(List simpleGroupByExpressions) { super(null); this.columns = ImmutableList.copyOf( - requireNonNull(simpleGroupByExpressions, "simpleGroupByExpressions is null")); + requireNonNull( + simpleGroupByExpressions, + QueryMessages.EXCEPTION_SIMPLEGROUPBYEXPRESSIONS_IS_NULL_3F6A1ECC)); } public SimpleGroupBy(NodeLocation location, List simpleGroupByExpressions) { - super(requireNonNull(location, "location is null")); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); this.columns = ImmutableList.copyOf( - requireNonNull(simpleGroupByExpressions, "simpleGroupByExpressions is null")); + requireNonNull( + simpleGroupByExpressions, + QueryMessages.EXCEPTION_SIMPLEGROUPBYEXPRESSIONS_IS_NULL_3F6A1ECC)); } @Override diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/SingleColumn.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/SingleColumn.java index 97f377cafd747..fd261f50a2a8a 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/SingleColumn.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/SingleColumn.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -45,26 +47,30 @@ public class SingleColumn extends SelectItem { public SingleColumn(Expression expression) { super(null); - this.expression = requireNonNull(expression, "expression is null"); + this.expression = + requireNonNull(expression, QueryMessages.EXCEPTION_EXPRESSION_IS_NULL_16C079B5); this.alias = null; } public SingleColumn(NodeLocation location, Expression expression) { - super(requireNonNull(location, "location is null")); - this.expression = requireNonNull(expression, "expression is null"); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.expression = + requireNonNull(expression, QueryMessages.EXCEPTION_EXPRESSION_IS_NULL_16C079B5); this.alias = null; } public SingleColumn(Expression expression, Identifier alias) { super(null); - this.expression = requireNonNull(expression, "expression is null"); - this.alias = requireNonNull(alias, "alias is null"); + this.expression = + requireNonNull(expression, QueryMessages.EXCEPTION_EXPRESSION_IS_NULL_16C079B5); + this.alias = requireNonNull(alias, QueryMessages.EXCEPTION_ALIAS_IS_NULL_B2ED729A); } public SingleColumn(NodeLocation location, Expression expression, Identifier alias) { - super(requireNonNull(location, "location is null")); - this.expression = requireNonNull(expression, "expression is null"); - this.alias = requireNonNull(alias, "alias is null"); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.expression = + requireNonNull(expression, QueryMessages.EXCEPTION_EXPRESSION_IS_NULL_16C079B5); + this.alias = requireNonNull(alias, QueryMessages.EXCEPTION_ALIAS_IS_NULL_B2ED729A); } public Optional getAlias() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/SkipTo.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/SkipTo.java index 1a2768b6e28c0..c835a87eb82d9 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/SkipTo.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/SkipTo.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -66,15 +68,15 @@ public static SkipTo skipToLast(NodeLocation location, Identifier identifier) { private SkipTo(NodeLocation location, Position position, Optional identifier) { super(location); - requireNonNull(position, "position is null"); - requireNonNull(identifier, "identifier is null"); + requireNonNull(position, QueryMessages.EXCEPTION_POSITION_IS_NULL_5B14C61B); + requireNonNull(identifier, QueryMessages.EXCEPTION_IDENTIFIER_IS_NULL_8F8171C8); checkArgument( identifier.isPresent() || (position == PAST_LAST || position == NEXT), - "missing identifier in SKIP TO %s", + QueryMessages.EXCEPTION_MISSING_IDENTIFIER_IN_SKIP_TO_ARG_33E1A7C3, position.name()); checkArgument( !identifier.isPresent() || (position == FIRST || position == LAST), - "unexpected identifier in SKIP TO %s", + QueryMessages.EXCEPTION_UNEXPECTED_IDENTIFIER_IN_SKIP_TO_ARG_58438AFC, position.name()); this.position = position; this.identifier = identifier; diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/SortItem.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/SortItem.java index c9a4bb7bfdb35..eac65aaebd58b 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/SortItem.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/SortItem.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; import org.apache.tsfile.utils.ReadWriteIOUtils; @@ -60,7 +62,7 @@ public SortItem(Expression sortKey, Ordering ordering, NullOrdering nullOrdering public SortItem( NodeLocation location, Expression sortKey, Ordering ordering, NullOrdering nullOrdering) { - super(requireNonNull(location, "location is null")); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); this.ordering = ordering; this.sortKey = sortKey; this.nullOrdering = nullOrdering; diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/StringLiteral.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/StringLiteral.java index 9550da25a8d46..6309664623283 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/StringLiteral.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/StringLiteral.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import org.apache.tsfile.utils.Binary; import org.apache.tsfile.utils.RamUsageEstimator; import org.apache.tsfile.utils.ReadWriteIOUtils; @@ -41,13 +43,13 @@ public class StringLiteral extends Literal { public StringLiteral(String value) { super(null); - this.value = requireNonNull(value, "value is null"); + this.value = requireNonNull(value, QueryMessages.EXCEPTION_VALUE_IS_NULL_192F6BFF); this.length = value.codePointCount(0, value.length()); } public StringLiteral(NodeLocation location, String value) { - super(requireNonNull(location, "location is null")); - this.value = requireNonNull(value, "value is null"); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.value = requireNonNull(value, QueryMessages.EXCEPTION_VALUE_IS_NULL_192F6BFF); this.length = value.codePointCount(0, value.length()); } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/SubqueryExpression.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/SubqueryExpression.java index f5bb7c52bfd9e..a79fcc7f812c5 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/SubqueryExpression.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/SubqueryExpression.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -36,12 +38,12 @@ public class SubqueryExpression extends Expression { public SubqueryExpression(Query query) { super(null); - this.query = requireNonNull(query, "query is null"); + this.query = requireNonNull(query, QueryMessages.EXCEPTION_QUERY_IS_NULL_689B7978); } public SubqueryExpression(NodeLocation location, Query query) { - super(requireNonNull(location, "location is null")); - this.query = requireNonNull(query, "query is null"); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.query = requireNonNull(query, QueryMessages.EXCEPTION_QUERY_IS_NULL_689B7978); } public Query getQuery() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/SubsetDefinition.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/SubsetDefinition.java index ba5c506ce9c45..5d8764556c91f 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/SubsetDefinition.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/SubsetDefinition.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import org.apache.tsfile.utils.RamUsageEstimator; import java.util.List; @@ -37,9 +39,9 @@ public class SubsetDefinition extends Node { public SubsetDefinition(NodeLocation location, Identifier name, List identifiers) { super(location); - this.name = requireNonNull(name, "name is null"); - requireNonNull(identifiers, "identifiers is null"); - checkArgument(!identifiers.isEmpty(), "identifiers is empty"); + this.name = requireNonNull(name, QueryMessages.EXCEPTION_NAME_IS_NULL_C8B35959); + requireNonNull(identifiers, QueryMessages.EXCEPTION_IDENTIFIERS_IS_NULL_72CDC3BE); + checkArgument(!identifiers.isEmpty(), QueryMessages.EXCEPTION_IDENTIFIERS_IS_EMPTY_410ED65C); this.identifiers = identifiers; } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Table.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Table.java index 5909dc8af52e0..e0b9951364b7b 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Table.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Table.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -36,12 +38,12 @@ public class Table extends QueryBody { public Table(QualifiedName name) { super(null); - this.name = requireNonNull(name, "name is null"); + this.name = requireNonNull(name, QueryMessages.EXCEPTION_NAME_IS_NULL_C8B35959); } public Table(NodeLocation location, QualifiedName name) { - super(requireNonNull(location, "location is null")); - this.name = requireNonNull(name, "name is null"); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.name = requireNonNull(name, QueryMessages.EXCEPTION_NAME_IS_NULL_C8B35959); } public QualifiedName getName() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/TableFunctionArgument.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/TableFunctionArgument.java index 2175fcac60a04..9763636aa2bdd 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/TableFunctionArgument.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/TableFunctionArgument.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -38,8 +40,8 @@ public class TableFunctionArgument extends Node { public TableFunctionArgument(NodeLocation location, Optional name, Node value) { super(location); - this.name = requireNonNull(name, "name is null"); - requireNonNull(value, "value is null"); + this.name = requireNonNull(name, QueryMessages.EXCEPTION_NAME_IS_NULL_C8B35959); + requireNonNull(value, QueryMessages.EXCEPTION_VALUE_IS_NULL_192F6BFF); checkArgument(value instanceof TableFunctionTableArgument || value instanceof Expression); this.value = value; } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/TableFunctionInvocation.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/TableFunctionInvocation.java index 687b331c3e8af..b21f591d09ef6 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/TableFunctionInvocation.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/TableFunctionInvocation.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import org.apache.tsfile.utils.RamUsageEstimator; import java.util.List; @@ -37,8 +39,8 @@ public class TableFunctionInvocation extends Relation { public TableFunctionInvocation( NodeLocation location, QualifiedName name, List arguments) { super(location); - this.name = requireNonNull(name, "name is null"); - this.arguments = requireNonNull(arguments, "arguments is null"); + this.name = requireNonNull(name, QueryMessages.EXCEPTION_NAME_IS_NULL_C8B35959); + this.arguments = requireNonNull(arguments, QueryMessages.EXCEPTION_ARGUMENTS_IS_NULL_B1F6D4F2); } public QualifiedName getName() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/TableFunctionTableArgument.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/TableFunctionTableArgument.java index 5c176f2f5d6b2..bdd69a2388fc5 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/TableFunctionTableArgument.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/TableFunctionTableArgument.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -44,9 +46,10 @@ public TableFunctionTableArgument( Optional> partitionBy, Optional orderBy) { super(location); - this.table = requireNonNull(table, "table is null"); - this.partitionBy = requireNonNull(partitionBy, "partitionBy is null"); - this.orderBy = requireNonNull(orderBy, "orderBy is null"); + this.table = requireNonNull(table, QueryMessages.EXCEPTION_TABLE_IS_NULL_8DDD9098); + this.partitionBy = + requireNonNull(partitionBy, QueryMessages.EXCEPTION_PARTITIONBY_IS_NULL_84791B6B); + this.orderBy = requireNonNull(orderBy, QueryMessages.EXCEPTION_ORDERBY_IS_NULL_AA2494DE); } public Relation getTable() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/TableSubquery.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/TableSubquery.java index 4c5968a23cfa5..84e0e9b125721 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/TableSubquery.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/TableSubquery.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -41,7 +43,7 @@ public TableSubquery(Query query) { } public TableSubquery(NodeLocation location, Query query) { - super(requireNonNull(location, "location is null")); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); this.query = query; } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/TimeDurationLiteral.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/TimeDurationLiteral.java index 9a626b84548f4..8ceb5e9bad738 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/TimeDurationLiteral.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/TimeDurationLiteral.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import org.apache.tsfile.utils.RamUsageEstimator; import org.apache.tsfile.utils.TimeDuration; @@ -38,12 +40,12 @@ public class TimeDurationLiteral extends Literal { public TimeDurationLiteral(TimeDuration value) { super(null); - this.value = requireNonNull(value, "value is null"); + this.value = requireNonNull(value, QueryMessages.EXCEPTION_VALUE_IS_NULL_192F6BFF); } public TimeDurationLiteral(NodeLocation location, TimeDuration value) { - super(requireNonNull(location, "location is null")); - this.value = requireNonNull(value, "value is null"); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.value = requireNonNull(value, QueryMessages.EXCEPTION_VALUE_IS_NULL_192F6BFF); } public TimeDuration getValue() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Trim.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Trim.java index 2be6af1fda8b9..0b356c606650f 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Trim.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Trim.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -39,22 +41,28 @@ public class Trim extends Expression { public Trim(Specification specification, Expression trimSource) { super(null); - this.specification = requireNonNull(specification, "specification is null"); - this.trimSource = requireNonNull(trimSource, "trimSource is null"); + this.specification = + requireNonNull(specification, QueryMessages.EXCEPTION_SPECIFICATION_IS_NULL_BB4AA029); + this.trimSource = + requireNonNull(trimSource, QueryMessages.EXCEPTION_TRIMSOURCE_IS_NULL_C7E6B71D); this.trimCharacter = null; } public Trim(Specification specification, Expression trimSource, Expression trimCharacter) { super(null); - this.specification = requireNonNull(specification, "specification is null"); - this.trimSource = requireNonNull(trimSource, "trimSource is null"); + this.specification = + requireNonNull(specification, QueryMessages.EXCEPTION_SPECIFICATION_IS_NULL_BB4AA029); + this.trimSource = + requireNonNull(trimSource, QueryMessages.EXCEPTION_TRIMSOURCE_IS_NULL_C7E6B71D); this.trimCharacter = trimCharacter; } public Trim(NodeLocation location, Specification specification, Expression trimSource) { - super(requireNonNull(location, "location is null")); - this.specification = requireNonNull(specification, "specification is null"); - this.trimSource = requireNonNull(trimSource, "trimSource is null"); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.specification = + requireNonNull(specification, QueryMessages.EXCEPTION_SPECIFICATION_IS_NULL_BB4AA029); + this.trimSource = + requireNonNull(trimSource, QueryMessages.EXCEPTION_TRIMSOURCE_IS_NULL_C7E6B71D); this.trimCharacter = null; } @@ -63,10 +71,13 @@ public Trim( Specification specification, Expression trimSource, Expression trimCharacter) { - super(requireNonNull(location, "location is null")); - this.specification = requireNonNull(specification, "specification is null"); - this.trimSource = requireNonNull(trimSource, "trimSource is null"); - this.trimCharacter = requireNonNull(trimCharacter, "trimCharacter is null"); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.specification = + requireNonNull(specification, QueryMessages.EXCEPTION_SPECIFICATION_IS_NULL_BB4AA029); + this.trimSource = + requireNonNull(trimSource, QueryMessages.EXCEPTION_TRIMSOURCE_IS_NULL_C7E6B71D); + this.trimCharacter = + requireNonNull(trimCharacter, QueryMessages.EXCEPTION_TRIMCHARACTER_IS_NULL_4036C3D8); } public Specification getSpecification() { @@ -134,7 +145,8 @@ public enum Specification { private final String functionName; Specification(String functionName) { - this.functionName = requireNonNull(functionName, "functionName is null"); + this.functionName = + requireNonNull(functionName, QueryMessages.EXCEPTION_FUNCTIONNAME_IS_NULL_0818CBC7); } public String getFunctionName() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/TypeParameter.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/TypeParameter.java index 4e27dddb3bdab..a8a55b78728ed 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/TypeParameter.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/TypeParameter.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -36,7 +38,7 @@ public class TypeParameter extends DataTypeParameter { public TypeParameter(DataType type) { super(null); - this.type = requireNonNull(type, "type is null"); + this.type = requireNonNull(type, QueryMessages.EXCEPTION_TYPE_IS_NULL_16A3D3EB); } public DataType getValue() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Union.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Union.java index b99e7fd45a316..e57bf6a9c189d 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Union.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Union.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -36,12 +38,16 @@ public class Union extends SetOperation { public Union(List relations, boolean distinct) { super(null, distinct); - this.relations = ImmutableList.copyOf(requireNonNull(relations, "relations is null")); + this.relations = + ImmutableList.copyOf( + requireNonNull(relations, QueryMessages.EXCEPTION_RELATIONS_IS_NULL_0275CA3C)); } public Union(NodeLocation location, List relations, boolean distinct) { - super(requireNonNull(location, "location is null"), distinct); - this.relations = ImmutableList.copyOf(requireNonNull(relations, "relations is null")); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388), distinct); + this.relations = + ImmutableList.copyOf( + requireNonNull(relations, QueryMessages.EXCEPTION_RELATIONS_IS_NULL_0275CA3C)); } @Override diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Values.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Values.java index 5e6e094dbe72b..612ee8285d426 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Values.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/Values.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.base.Joiner; import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -35,12 +37,14 @@ public final class Values extends QueryBody { public Values(List rows) { super(null); - this.rows = ImmutableList.copyOf(requireNonNull(rows, "rows is null")); + this.rows = + ImmutableList.copyOf(requireNonNull(rows, QueryMessages.EXCEPTION_ROWS_IS_NULL_B8BF74DE)); } public Values(NodeLocation location, List rows) { - super(requireNonNull(location, "location is null")); - this.rows = ImmutableList.copyOf(requireNonNull(rows, "rows is null")); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.rows = + ImmutableList.copyOf(requireNonNull(rows, QueryMessages.EXCEPTION_ROWS_IS_NULL_B8BF74DE)); } public List getRows() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/VariableDefinition.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/VariableDefinition.java index 4a42a13f506e5..23e73d2280293 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/VariableDefinition.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/VariableDefinition.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -37,8 +39,9 @@ public class VariableDefinition extends Node { public VariableDefinition(NodeLocation location, Identifier name, Expression expression) { super(location); - this.name = requireNonNull(name, "name is null"); - this.expression = requireNonNull(expression, "expression is null"); + this.name = requireNonNull(name, QueryMessages.EXCEPTION_NAME_IS_NULL_C8B35959); + this.expression = + requireNonNull(expression, QueryMessages.EXCEPTION_EXPRESSION_IS_NULL_16C079B5); } public Identifier getName() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/WhenClause.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/WhenClause.java index 666dc9626c32c..f061f76b8e010 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/WhenClause.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/WhenClause.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -40,14 +42,14 @@ public class WhenClause extends Expression { public WhenClause(Expression operand, Expression result) { super(null); - this.operand = requireNonNull(operand, "operand is null"); - this.result = requireNonNull(result, "result is null"); + this.operand = requireNonNull(operand, QueryMessages.EXCEPTION_OPERAND_IS_NULL_D0182140); + this.result = requireNonNull(result, QueryMessages.EXCEPTION_RESULT_IS_NULL_031E2F89); } public WhenClause(NodeLocation location, Expression operand, Expression result) { - super(requireNonNull(location, "location is null")); - this.operand = requireNonNull(operand, "operand is null"); - this.result = requireNonNull(result, "result is null"); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); + this.operand = requireNonNull(operand, QueryMessages.EXCEPTION_OPERAND_IS_NULL_D0182140); + this.result = requireNonNull(result, QueryMessages.EXCEPTION_RESULT_IS_NULL_031E2F89); } public WhenClause(ByteBuffer byteBuffer) { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/WindowDefinition.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/WindowDefinition.java index b72033e403bfe..064486e92da7e 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/WindowDefinition.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/WindowDefinition.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -37,8 +39,8 @@ public class WindowDefinition extends Node { public WindowDefinition(NodeLocation location, Identifier name, WindowSpecification window) { super(location); - this.name = requireNonNull(name, "name is null"); - this.window = requireNonNull(window, "window is null"); + this.name = requireNonNull(name, QueryMessages.EXCEPTION_NAME_IS_NULL_C8B35959); + this.window = requireNonNull(window, QueryMessages.EXCEPTION_WINDOW_IS_NULL_7532B76A); } public Identifier getName() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/WindowFrame.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/WindowFrame.java index 20134c5b1cd18..2d8e04e0c0a29 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/WindowFrame.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/WindowFrame.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; import org.apache.tsfile.utils.ReadWriteIOUtils; @@ -49,9 +51,9 @@ public enum Type { public WindowFrame(NodeLocation location, Type type, FrameBound start, Optional end) { super(requireNonNull(location)); - this.type = requireNonNull(type, "type is null"); - this.start = requireNonNull(start, "start is null"); - this.end = requireNonNull(end, "end is null"); + this.type = requireNonNull(type, QueryMessages.EXCEPTION_TYPE_IS_NULL_16A3D3EB); + this.start = requireNonNull(start, QueryMessages.EXCEPTION_START_IS_NULL_5A075F04); + this.end = requireNonNull(end, QueryMessages.EXCEPTION_END_IS_NULL_C6C46BAA); } public Type getType() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/WindowReference.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/WindowReference.java index a086a644c934c..e4224263b1e6e 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/WindowReference.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/WindowReference.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -39,7 +41,7 @@ public class WindowReference extends Node implements Window { public WindowReference(NodeLocation location, Identifier name) { super(location); - this.name = requireNonNull(name, "name is null"); + this.name = requireNonNull(name, QueryMessages.EXCEPTION_NAME_IS_NULL_C8B35959); } public Identifier getName() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/WindowSpecification.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/WindowSpecification.java index 715e867fd177b..ff4d3e65d3cce 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/WindowSpecification.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/WindowSpecification.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; import org.apache.tsfile.utils.ReadWriteIOUtils; @@ -50,10 +52,13 @@ public WindowSpecification( Optional orderBy, Optional frame) { super(requireNonNull(location)); - this.existingWindowName = requireNonNull(existingWindowName, "existingWindowName is null"); - this.partitionBy = requireNonNull(partitionBy, "partitionBy is null"); - this.orderBy = requireNonNull(orderBy, "orderBy is null"); - this.frame = requireNonNull(frame, "frame is null"); + this.existingWindowName = + requireNonNull( + existingWindowName, QueryMessages.EXCEPTION_EXISTINGWINDOWNAME_IS_NULL_5D67FD72); + this.partitionBy = + requireNonNull(partitionBy, QueryMessages.EXCEPTION_PARTITIONBY_IS_NULL_84791B6B); + this.orderBy = requireNonNull(orderBy, QueryMessages.EXCEPTION_ORDERBY_IS_NULL_AA2494DE); + this.frame = requireNonNull(frame, QueryMessages.EXCEPTION_FRAME_IS_NULL_5A92D609); } public Optional getExistingWindowName() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/With.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/With.java index 86d8dd4994138..e6e68d7f3b958 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/With.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/With.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -39,18 +41,18 @@ public class With extends Node { public With(boolean recursive, List queries) { super(null); - requireNonNull(queries, "queries is null"); - checkArgument(!queries.isEmpty(), "queries is empty"); + requireNonNull(queries, QueryMessages.EXCEPTION_QUERIES_IS_NULL_94399651); + checkArgument(!queries.isEmpty(), QueryMessages.EXCEPTION_QUERIES_IS_EMPTY_FE480BBC); this.recursive = recursive; this.queries = ImmutableList.copyOf(queries); } public With(NodeLocation location, boolean recursive, List queries) { - super(requireNonNull(location, "location is null")); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); - requireNonNull(queries, "queries is null"); - checkArgument(!queries.isEmpty(), "queries is empty"); + requireNonNull(queries, QueryMessages.EXCEPTION_QUERIES_IS_NULL_94399651); + checkArgument(!queries.isEmpty(), QueryMessages.EXCEPTION_QUERIES_IS_EMPTY_FE480BBC); this.recursive = recursive; this.queries = ImmutableList.copyOf(queries); diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/WithQuery.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/WithQuery.java index a0b4f78d6f5e7..48dda83e42d72 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/WithQuery.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/ast/WithQuery.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.ast; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.common.collect.ImmutableList; import org.apache.tsfile.utils.RamUsageEstimator; @@ -45,7 +47,7 @@ public class WithQuery extends Node { public WithQuery(Identifier name, Query query, boolean materialized) { super(null); this.name = name; - this.query = requireNonNull(query, "query is null"); + this.query = requireNonNull(query, QueryMessages.EXCEPTION_QUERY_IS_NULL_689B7978); this.columnNames = null; this.materialized = materialized; } @@ -54,15 +56,16 @@ public WithQuery( Identifier name, Query query, List columnNames, boolean materialized) { super(null); this.name = name; - this.query = requireNonNull(query, "query is null"); - this.columnNames = requireNonNull(columnNames, "columnNames is null"); + this.query = requireNonNull(query, QueryMessages.EXCEPTION_QUERY_IS_NULL_689B7978); + this.columnNames = + requireNonNull(columnNames, QueryMessages.EXCEPTION_COLUMNNAMES_IS_NULL_C3BF708F); this.materialized = materialized; } public WithQuery(NodeLocation location, Identifier name, Query query, boolean materialized) { - super(requireNonNull(location, "location is null")); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); this.name = name; - this.query = requireNonNull(query, "query is null"); + this.query = requireNonNull(query, QueryMessages.EXCEPTION_QUERY_IS_NULL_689B7978); this.columnNames = null; this.materialized = materialized; } @@ -73,10 +76,11 @@ public WithQuery( Query query, List columnNames, boolean materialized) { - super(requireNonNull(location, "location is null")); + super(requireNonNull(location, QueryMessages.EXCEPTION_LOCATION_IS_NULL_F134D388)); this.name = name; - this.query = requireNonNull(query, "query is null"); - this.columnNames = requireNonNull(columnNames, "columnNames is null"); + this.query = requireNonNull(query, QueryMessages.EXCEPTION_QUERY_IS_NULL_689B7978); + this.columnNames = + requireNonNull(columnNames, QueryMessages.EXCEPTION_COLUMNNAMES_IS_NULL_C3BF708F); this.materialized = materialized; } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/parser/ParsingException.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/parser/ParsingException.java index f42b61545b08b..55175096187a9 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/parser/ParsingException.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/parser/ParsingException.java @@ -19,6 +19,7 @@ package org.apache.iotdb.commons.queryengine.plan.relational.sql.parser; +import org.apache.iotdb.commons.i18n.QueryMessages; import org.apache.iotdb.commons.queryengine.plan.relational.sql.ast.NodeLocation; import org.antlr.v4.runtime.RecognitionException; @@ -31,8 +32,8 @@ public class ParsingException extends RuntimeException { public ParsingException(String message, RecognitionException cause, int line, int column) { super(message, cause); - checkArgument(line > 0, "line must be > 0"); - checkArgument(column > 0, "column must be > 0"); + checkArgument(line > 0, QueryMessages.EXCEPTION_LINE_MUST_BE_GREATER_THAN_0_8D2C1802); + checkArgument(column > 0, QueryMessages.EXCEPTION_COLUMN_MUST_BE_GREATER_THAN_0_2481C561); this.line = line; this.column = column; diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/util/CommonQuerySqlFormatter.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/util/CommonQuerySqlFormatter.java index 7bb325fbc63f3..c63656f042e02 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/util/CommonQuerySqlFormatter.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/util/CommonQuerySqlFormatter.java @@ -102,7 +102,9 @@ public Void visitNode(Node node, Integer indent) { @Override public Void visitExpression(Expression node, Integer indent) { - checkArgument(indent == 0, "visitExpression should only be called at root"); + checkArgument( + indent == 0, + QueryMessages.EXCEPTION_VISITEXPRESSION_SHOULD_ONLY_BE_CALLED_AT_ROOT_93E4AAD4); builder.append(formatExpression(node)); return null; } @@ -379,7 +381,9 @@ protected void appendAliasColumns(SqlBuilder builder, List columns) @Override public Void visitRowPattern(RowPattern node, Integer indent) { - checkArgument(indent == 0, "visitRowPattern should only be called at root"); + checkArgument( + indent == 0, + QueryMessages.EXCEPTION_VISITROWPATTERN_SHOULD_ONLY_BE_CALLED_AT_ROOT_9DE9F574); builder.append(formatPattern(node)); return null; } @@ -576,7 +580,7 @@ protected static class SqlBuilder { private final StringBuilder builder; public SqlBuilder(StringBuilder builder) { - this.builder = requireNonNull(builder, "builder is null"); + this.builder = requireNonNull(builder, QueryMessages.EXCEPTION_BUILDER_IS_NULL_ADE64E9B); } @CanIgnoreReturnValue @@ -640,7 +644,8 @@ public Void visitPatternRecognitionRelation(PatternRecognitionRelation node, Int break; default: throw new IllegalStateException( - "unexpected rowsPerMatch: " + node.getRowsPerMatch().get()); + QueryMessages.EXCEPTION_UNEXPECTED_ROWSPERMATCH_F9B931C9 + + node.getRowsPerMatch().get()); } append(indent + 1, rowsPerMatch).append("\n"); } @@ -656,7 +661,7 @@ public Void visitPatternRecognitionRelation(PatternRecognitionRelation node, Int case LAST: checkState( node.getAfterMatchSkipTo().get().getIdentifier().isPresent(), - "missing identifier in AFTER MATCH SKIP TO LAST"); + QueryMessages.EXCEPTION_MISSING_IDENTIFIER_IN_AFTER_MATCH_SKIP_TO_LAST_82A12A21); skipTo = "AFTER MATCH SKIP TO LAST " + formatExpression(node.getAfterMatchSkipTo().get().getIdentifier().get()); @@ -664,7 +669,7 @@ public Void visitPatternRecognitionRelation(PatternRecognitionRelation node, Int case FIRST: checkState( node.getAfterMatchSkipTo().get().getIdentifier().isPresent(), - "missing identifier in AFTER MATCH SKIP TO FIRST"); + QueryMessages.EXCEPTION_MISSING_IDENTIFIER_IN_AFTER_MATCH_SKIP_TO_FIRST_F988B839); skipTo = "AFTER MATCH SKIP TO FIRST " + formatExpression(node.getAfterMatchSkipTo().get().getIdentifier().get()); diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/util/ExpressionFormatter.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/util/ExpressionFormatter.java index 3fce6b9f106e2..254f015a68412 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/util/ExpressionFormatter.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/util/ExpressionFormatter.java @@ -130,9 +130,13 @@ public static class Formatter implements CommonQueryAstVisitor { public Formatter( Optional> literalFormatter, Optional> symbolReferenceFormatter) { - this.literalFormatter = requireNonNull(literalFormatter, "literalFormatter is null"); + this.literalFormatter = + requireNonNull( + literalFormatter, QueryMessages.EXCEPTION_LITERALFORMATTER_IS_NULL_3F4F4A2B); this.symbolReferenceFormatter = - requireNonNull(symbolReferenceFormatter, "symbolReferenceFormatter is null"); + requireNonNull( + symbolReferenceFormatter, + QueryMessages.EXCEPTION_SYMBOLREFERENCEFORMATTER_IS_NULL_B9B540EC); } @Override diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/type/NamedTypeSignature.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/type/NamedTypeSignature.java index 63b1436e578b8..6ff1ee3c09124 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/type/NamedTypeSignature.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/type/NamedTypeSignature.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.type; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.errorprone.annotations.Immutable; import java.util.Objects; @@ -33,8 +35,9 @@ public final class NamedTypeSignature { private final TypeSignature typeSignature; public NamedTypeSignature(Optional fieldName, TypeSignature typeSignature) { - this.fieldName = requireNonNull(fieldName, "fieldName is null"); - this.typeSignature = requireNonNull(typeSignature, "typeSignature is null"); + this.fieldName = requireNonNull(fieldName, QueryMessages.EXCEPTION_FIELDNAME_IS_NULL_DEB1CA0C); + this.typeSignature = + requireNonNull(typeSignature, QueryMessages.EXCEPTION_TYPESIGNATURE_IS_NULL_E8B47305); } public Optional getFieldName() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/type/RowFieldName.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/type/RowFieldName.java index 18df01e3e24c6..35db53d69edd1 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/type/RowFieldName.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/type/RowFieldName.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.type; +import org.apache.iotdb.commons.i18n.QueryMessages; + import com.google.errorprone.annotations.Immutable; import java.util.Objects; @@ -30,7 +32,7 @@ public final class RowFieldName { private final String name; public RowFieldName(String name) { - this.name = requireNonNull(name, "name is null"); + this.name = requireNonNull(name, QueryMessages.EXCEPTION_NAME_IS_NULL_C8B35959); } public String getName() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/type/TypeId.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/type/TypeId.java index 4340249f49415..a78d9affb1b0c 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/type/TypeId.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/type/TypeId.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.queryengine.plan.relational.type; +import org.apache.iotdb.commons.i18n.QueryMessages; + import java.util.Objects; import static java.util.Objects.requireNonNull; @@ -31,7 +33,7 @@ public class TypeId { private final String id; private TypeId(String id) { - this.id = requireNonNull(id, "id is null"); + this.id = requireNonNull(id, QueryMessages.EXCEPTION_ID_IS_NULL_9D5D27B1); } public static TypeId of(String id) { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/type/TypeNotFoundException.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/type/TypeNotFoundException.java index 9d3460b9488cd..bae92aec8c8c7 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/type/TypeNotFoundException.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/type/TypeNotFoundException.java @@ -20,6 +20,7 @@ package org.apache.iotdb.commons.queryengine.plan.relational.type; import org.apache.iotdb.commons.exception.IoTDBRuntimeException; +import org.apache.iotdb.commons.i18n.QueryMessages; import static java.util.Objects.requireNonNull; import static org.apache.iotdb.rpc.TSStatusCode.TYPE_NOT_FOUND; @@ -33,8 +34,11 @@ public TypeNotFoundException(TypeSignature type) { } public TypeNotFoundException(TypeSignature type, Throwable cause) { - super("Unknown type: " + type, cause, TYPE_NOT_FOUND.getStatusCode()); - this.type = requireNonNull(type, "type is null"); + super( + QueryMessages.EXCEPTION_UNKNOWN_TYPE_BC7EAB78 + type, + cause, + TYPE_NOT_FOUND.getStatusCode()); + this.type = requireNonNull(type, QueryMessages.EXCEPTION_TYPE_IS_NULL_16A3D3EB); } public TypeSignature getType() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/type/TypeSignature.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/type/TypeSignature.java index b5e39164d2511..b4c2960b498f9 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/type/TypeSignature.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/type/TypeSignature.java @@ -52,11 +52,14 @@ public TypeSignature(String base, TypeSignatureParameter... parameters) { } public TypeSignature(String base, List parameters) { - checkArgument(base != null, "base is null"); + checkArgument(base != null, QueryMessages.EXCEPTION_BASE_IS_NULL_AC445AD0); this.base = base; - checkArgument(!base.isEmpty(), "base is empty"); - checkArgument(validateName(base), "Bad characters in base type: %s", base); - checkArgument(parameters != null, "parameters is null"); + checkArgument(!base.isEmpty(), QueryMessages.EXCEPTION_BASE_IS_EMPTY_E86FBC3A); + checkArgument( + validateName(base), + QueryMessages.EXCEPTION_BAD_CHARACTERS_IN_BASE_TYPE_COLON_ARG_FA811786, + base); + checkArgument(parameters != null, QueryMessages.EXCEPTION_PARAMETERS_IS_NULL_418C7892); this.parameters = new ArrayList<>(parameters); this.calculated = parameters.stream().anyMatch(TypeSignatureParameter::isCalculated); @@ -202,7 +205,7 @@ public static TypeSignature rowType(TypeSignatureParameter... fields) { public static TypeSignature rowType(List fields) { checkArgument( fields.stream().allMatch(parameter -> parameter.getKind() == ParameterKind.NAMED_TYPE), - "Parameters for ROW type must be NAMED_TYPE parameters"); + QueryMessages.EXCEPTION_PARAMETERS_FOR_ROW_TYPE_MUST_BE_NAMED_TYPE_PARAMETERS_6AADD078); return new TypeSignature(StandardTypes.ROW, fields); } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/type/TypeSignatureParameter.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/type/TypeSignatureParameter.java index 0fdb0981dbe23..04618a157200c 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/type/TypeSignatureParameter.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/type/TypeSignatureParameter.java @@ -62,8 +62,8 @@ public static TypeSignatureParameter typeVariable(String variable) { } private TypeSignatureParameter(ParameterKind kind, Object value) { - this.kind = requireNonNull(kind, "kind is null"); - this.value = requireNonNull(value, "value is null"); + this.kind = requireNonNull(kind, QueryMessages.EXCEPTION_KIND_IS_NULL_8C13BAB2); + this.value = requireNonNull(value, QueryMessages.EXCEPTION_VALUE_IS_NULL_192F6BFF); } @Override diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/type/TypeSignatureTranslator.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/type/TypeSignatureTranslator.java index a97ab1a6b944c..38b1dcd886315 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/type/TypeSignatureTranslator.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/type/TypeSignatureTranslator.java @@ -75,7 +75,7 @@ private static TypeSignature toTypeSignature(GenericDataType type, Set t checkArgument( !typeVariables.contains(type.getName().getValue()), - "Base type name cannot be a type variable"); + QueryMessages.EXCEPTION_BASE_TYPE_NAME_CANNOT_BE_A_TYPE_VARIABLE_71E810A9); for (DataTypeParameter parameter : type.getArguments()) { if (parameter instanceof NumericParameter) { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/schema/filter/impl/values/ComparisonFilter.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/schema/filter/impl/values/ComparisonFilter.java index a032919ada32e..0c9521d6f32c0 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/schema/filter/impl/values/ComparisonFilter.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/schema/filter/impl/values/ComparisonFilter.java @@ -19,6 +19,7 @@ package org.apache.iotdb.commons.schema.filter.impl.values; +import org.apache.iotdb.commons.i18n.SchemaMessages; import org.apache.iotdb.commons.schema.filter.SchemaFilter; import org.apache.iotdb.commons.schema.filter.SchemaFilterType; import org.apache.iotdb.commons.schema.filter.SchemaFilterVisitor; @@ -42,8 +43,8 @@ public class ComparisonFilter extends SchemaFilter { private final String value; public ComparisonFilter(final Operator operator, final String value) { - requireNonNull(operator, "operator is null"); - requireNonNull(value, "value is null"); + requireNonNull(operator, SchemaMessages.EXCEPTION_OPERATOR_IS_NULL_F5BB9F59); + requireNonNull(value, SchemaMessages.EXCEPTION_VALUE_IS_NULL_192F6BFF); this.operator = operator; this.value = value; diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/schema/table/TreeViewSchema.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/schema/table/TreeViewSchema.java index eea48fd2aeef7..207e54720d762 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/schema/table/TreeViewSchema.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/schema/table/TreeViewSchema.java @@ -21,6 +21,7 @@ import org.apache.iotdb.commons.exception.IllegalPathException; import org.apache.iotdb.commons.exception.IoTDBRuntimeException; +import org.apache.iotdb.commons.i18n.SchemaMessages; import org.apache.iotdb.commons.path.PartialPath; import org.apache.iotdb.commons.path.PathPatternUtil; import org.apache.iotdb.commons.schema.table.column.TsTableColumnSchema; @@ -45,8 +46,10 @@ public static PartialPath getPrefixPattern(final TsTable table) { () -> new IoTDBRuntimeException( String.format( - "Failed to get the original database, because the %s is null for table %s", - TreeViewSchema.TREE_PATH_PATTERN, table.getTableName()), + SchemaMessages + .EXCEPTION_FAILED_GET_ORIGINAL_DATABASE_BECAUSE_ARG_NULL_TABLE_ARG_5AE54514, + TreeViewSchema.TREE_PATH_PATTERN, + table.getTableName()), TSStatusCode.SEMANTIC_ERROR.getStatusCode())); } @@ -57,7 +60,8 @@ public static PartialPath forceSeparateStringToPartialPath(final String string) } catch (final IllegalPathException e) { throw new IoTDBRuntimeException( String.format( - "Failed to parse the tree view string %s when convert to IDeviceID", string), + SchemaMessages.EXCEPTION_FAILED_PARSE_TREE_VIEW_STRING_ARG_CONVERT_IDEVICEID_6E735586, + string), TSStatusCode.SEMANTIC_ERROR.getStatusCode()); } return partialPath; diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/schema/ttl/TTLCache.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/schema/ttl/TTLCache.java index d8640bceaa085..5c1a082a82960 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/schema/ttl/TTLCache.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/schema/ttl/TTLCache.java @@ -22,6 +22,7 @@ import org.apache.iotdb.common.rpc.thrift.TSStatus; import org.apache.iotdb.commons.conf.IoTDBConstant; import org.apache.iotdb.commons.exception.IllegalPathException; +import org.apache.iotdb.commons.i18n.SchemaMessages; import org.apache.iotdb.commons.utils.PathUtils; import org.apache.iotdb.commons.utils.StatusUtils; import org.apache.iotdb.rpc.TSStatusCode; @@ -90,7 +91,8 @@ public TSStatus unsetTTL(String[] nodes) { int start = nodes[0].equals("root") ? 1 : 0; if (nodes.length <= start) { return new TSStatus(TSStatusCode.ILLEGAL_PATH.getStatusCode()) - .setMessage(String.join(IoTDBConstant.PATH_SEPARATOR + "", nodes)); + .setMessage( + String.join(IoTDBConstant.PATH_SEPARATOR + SchemaMessages.EMPTY_MESSAGE, nodes)); } else if (nodes.length == start + 1) { // if path equals to root.**, then unset it to configured ttl if (nodes[0].equals(IoTDBConstant.PATH_ROOT) @@ -110,9 +112,10 @@ public TSStatus unsetTTL(String[] nodes) { // there is no matching path on ttl cache tree return new TSStatus(TSStatusCode.PATH_NOT_EXIST.getStatusCode()) .setMessage( - "Not TTL rule" - + " set for " - + String.join(IoTDBConstant.PATH_SEPARATOR + "", nodes)); + SchemaMessages.MESSAGE_NOT_TTL_RULE_669A7BA4 + + SchemaMessages.MESSAGE_SET_4BE61E08 + + String.join( + IoTDBConstant.PATH_SEPARATOR + SchemaMessages.EMPTY_MESSAGE, nodes)); } if (hasNonDefaultTTL) { parentOfSubPathToBeRemoved = current; diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/schema/view/LogicalViewSchema.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/schema/view/LogicalViewSchema.java index f3ecc0608bfa0..647fc5f4aef1d 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/schema/view/LogicalViewSchema.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/schema/view/LogicalViewSchema.java @@ -257,8 +257,9 @@ public PartialPath getSourcePathIfWritable() { throw new RuntimeException( new MetadataException( String.format( - "View with measurementID [%s] is broken. It stores illegal path [%s].", - this.measurementName, this.getSourcePathStringIfWritable()))); + SchemaMessages.VIEW_STORES_ILLEGAL_PATH, + this.measurementName, + this.getSourcePathStringIfWritable()))); } } return null; diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/security/encrypt/EncryptDecryptException.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/security/encrypt/EncryptDecryptException.java index 0bcae56af5f82..109ab5c3ef51f 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/security/encrypt/EncryptDecryptException.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/security/encrypt/EncryptDecryptException.java @@ -19,10 +19,12 @@ package org.apache.iotdb.commons.security.encrypt; +import org.apache.iotdb.commons.i18n.AuthMessages; + public class EncryptDecryptException extends RuntimeException { public EncryptDecryptException(Throwable e) { - super("Encrypt or decrypt failed.", e); + super(AuthMessages.EXCEPTION_ENCRYPT_DECRYPT_FAILED_163764B5, e); } public EncryptDecryptException(String message) { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/service/AbstractThriftServiceThread.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/service/AbstractThriftServiceThread.java index 84361727a32e0..d628d5cf6ee20 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/service/AbstractThriftServiceThread.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/service/AbstractThriftServiceThread.java @@ -102,13 +102,15 @@ private void catchFailedInitialization(TTransportException e) throws RPCServiceE threadStopLatch.countDown(); } logger.debug( - "{}: close TThreadPoolServer and TServerSocket for {}", + ServiceMessages.CLOSE_THREAD_POOL_SERVER_AND_SERVER_SOCKET, IoTDBConstant.GLOBAL_DB_NAME, serviceName); logger.error(ServiceMessages.FAILED_TO_START_BECAUSE, e.getCause()); throw new RPCServiceException( String.format( - "%s: failed to start %s, because ", IoTDBConstant.GLOBAL_DB_NAME, serviceName), + ServiceMessages.FAILED_TO_START_SERVICE_BECAUSE, + IoTDBConstant.GLOBAL_DB_NAME, + serviceName), e); } @@ -365,7 +367,7 @@ public void run() { threadStopLatch.countDown(); } logger.debug( - "{}: close TThreadPoolServer and TServerSocket for {}", + ServiceMessages.CLOSE_THREAD_POOL_SERVER_AND_SERVER_SOCKET, IoTDBConstant.GLOBAL_DB_NAME, serviceName); } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/service/ThriftService.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/service/ThriftService.java index 779d4fe4c3c66..75acc8d6f0096 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/service/ThriftService.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/service/ThriftService.java @@ -100,7 +100,7 @@ public abstract void initThriftServiceThread() public void startService() throws StartupException { if (STATUS_UP.equals(getRPCServiceStatus())) { logger.info( - "{}: {} has been already running now", + ServiceMessages.SERVICE_ALREADY_RUNNING, IoTDBConstant.GLOBAL_DB_NAME, this.getID().getName()); return; @@ -129,7 +129,7 @@ public void startService() throws StartupException { } logger.info( - "{}: start {} successfully, listening on ip {} port {}", + ServiceMessages.START_SERVICE_SUCCESSFULLY, IoTDBConstant.GLOBAL_DB_NAME, this.getID().getName(), getBindIP(), @@ -163,10 +163,15 @@ public void stopService() { stopLatch.await(); reset(); logger.info( - "{}: close {} successfully", IoTDBConstant.GLOBAL_DB_NAME, this.getID().getName()); + ServiceMessages.CLOSE_SERVICE_SUCCESSFULLY, + IoTDBConstant.GLOBAL_DB_NAME, + this.getID().getName()); } catch (InterruptedException e) { logger.error( - "{}: close {} failed because: ", IoTDBConstant.GLOBAL_DB_NAME, this.getID().getName(), e); + ServiceMessages.CLOSE_SERVICE_FAILED, + IoTDBConstant.GLOBAL_DB_NAME, + this.getID().getName(), + e); Thread.currentThread().interrupt(); } } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/subscription/config/SubscriptionConfig.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/subscription/config/SubscriptionConfig.java index 2fad6cb88da7c..436f0e4ed25d9 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/subscription/config/SubscriptionConfig.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/subscription/config/SubscriptionConfig.java @@ -195,7 +195,7 @@ public long getSubscriptionConsensusIdleSafeTimeBarrierIntervalMs() { private static final Logger LOGGER = LoggerFactory.getLogger(SubscriptionConfig.class); public void printAllConfigs() { - LOGGER.info("SubscriptionEnabled: {}", getSubscriptionEnabled()); + LOGGER.info(PipeMessages.LOG_SUBSCRIPTIONENABLED_ARG_6F9EC0F9, getSubscriptionEnabled()); LOGGER.info( PipeMessages.CONFIG_SUBSCRIPTION_CACHE_MEMORY_USAGE_PERCENTAGE, getSubscriptionCacheMemoryUsagePercentage()); @@ -203,7 +203,7 @@ public void printAllConfigs() { PipeMessages.CONFIG_SUBSCRIPTION_SUBTASK_EXECUTOR_MAX_THREAD_NUM, getSubscriptionSubtaskExecutorMaxThreadNum()); LOGGER.info( - "SubscriptionConsensusPrefetchExecutorMaxThreadNum: {}", + PipeMessages.LOG_SUBSCRIPTIONCONSENSUSPREFETCHEXECUTORMAXTHREADNUM_ARG_94D0BD76, getSubscriptionConsensusPrefetchExecutorMaxThreadNum()); LOGGER.info( @@ -281,18 +281,19 @@ public void printAllConfigs() { getSubscriptionMetaSyncerSyncIntervalMinutes()); LOGGER.info( - "SubscriptionConsensusBatchMaxDelayInMs: {}", getSubscriptionConsensusBatchMaxDelayInMs()); + PipeMessages.LOG_SUBSCRIPTIONCONSENSUSBATCHMAXDELAYINMS_ARG_38C2CB8B, + getSubscriptionConsensusBatchMaxDelayInMs()); LOGGER.info( - "SubscriptionConsensusBatchMaxSizeInBytes: {}", + PipeMessages.LOG_SUBSCRIPTIONCONSENSUSBATCHMAXSIZEINBYTES_ARG_F8D28441, getSubscriptionConsensusBatchMaxSizeInBytes()); LOGGER.info( - "SubscriptionConsensusBatchMaxTabletCount: {}", + PipeMessages.LOG_SUBSCRIPTIONCONSENSUSBATCHMAXTABLETCOUNT_ARG_60BB1D6A, getSubscriptionConsensusBatchMaxTabletCount()); LOGGER.info( - "SubscriptionConsensusBatchMaxWalEntries: {}", + PipeMessages.LOG_SUBSCRIPTIONCONSENSUSBATCHMAXWALENTRIES_ARG_9BF1CAE4, getSubscriptionConsensusBatchMaxWalEntries()); LOGGER.info( - "SubscriptionConsensusIdleSafeTimeBarrierIntervalMs: {}", + PipeMessages.LOG_SUBSCRIPTIONCONSENSUSIDLESAFETIMEBARRIERINTERVALMS_ARG_A6944544, getSubscriptionConsensusIdleSafeTimeBarrierIntervalMs()); } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/subscription/meta/consumer/CommitProgressKeeper.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/subscription/meta/consumer/CommitProgressKeeper.java index 9aceed7064310..4dc79a8f86155 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/subscription/meta/consumer/CommitProgressKeeper.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/subscription/meta/consumer/CommitProgressKeeper.java @@ -19,6 +19,8 @@ package org.apache.iotdb.commons.subscription.meta.consumer; +import org.apache.iotdb.commons.i18n.PipeMessages; + import java.io.DataOutputStream; import java.io.FileInputStream; import java.io.FileOutputStream; @@ -99,22 +101,26 @@ public void processLoadSnapshot(final FileInputStream fileInputStream) throws IO for (int i = 0; i < regionSize; i++) { final byte[] keyLenBytes = new byte[4]; if (fileInputStream.read(keyLenBytes) != 4) { - throw new IOException("Unexpected EOF reading region progress key length"); + throw new IOException( + PipeMessages.EXCEPTION_UNEXPECTED_EOF_READING_REGION_PROGRESS_KEY_LENGTH_EBC10484); } final int keyLen = ByteBuffer.wrap(keyLenBytes).getInt(); final byte[] keyBytes = new byte[keyLen]; if (fileInputStream.read(keyBytes) != keyLen) { - throw new IOException("Unexpected EOF reading region progress key"); + throw new IOException( + PipeMessages.EXCEPTION_UNEXPECTED_EOF_READING_REGION_PROGRESS_KEY_C1532EAE); } final String key = new String(keyBytes, StandardCharsets.UTF_8); final byte[] valueLenBytes = new byte[4]; if (fileInputStream.read(valueLenBytes) != 4) { - throw new IOException("Unexpected EOF reading region progress value length"); + throw new IOException( + PipeMessages.EXCEPTION_UNEXPECTED_EOF_READING_REGION_PROGRESS_VALUE_LENGTH_D95F9CE0); } final int valueLen = ByteBuffer.wrap(valueLenBytes).getInt(); final byte[] valueBytes = new byte[valueLen]; if (fileInputStream.read(valueBytes) != valueLen) { - throw new IOException("Unexpected EOF reading region progress value"); + throw new IOException( + PipeMessages.EXCEPTION_UNEXPECTED_EOF_READING_REGION_PROGRESS_VALUE_A459C521); } regionProgressMap.put(key, ByteBuffer.wrap(valueBytes).asReadOnlyBuffer()); } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/subscription/meta/consumer/ConsumerGroupMeta.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/subscription/meta/consumer/ConsumerGroupMeta.java index 2a4cbfd382e21..af07dffa2cc69 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/subscription/meta/consumer/ConsumerGroupMeta.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/subscription/meta/consumer/ConsumerGroupMeta.java @@ -19,6 +19,7 @@ package org.apache.iotdb.commons.subscription.meta.consumer; +import org.apache.iotdb.commons.i18n.PipeMessages; import org.apache.iotdb.rpc.subscription.exception.SubscriptionException; import org.apache.thrift.annotation.Nullable; @@ -259,8 +260,10 @@ public void addSubscription(final String consumerId, final Set topics) { if (!consumerIdToConsumerMeta.containsKey(consumerId)) { throw new SubscriptionException( String.format( - "Failed to add subscription to consumer group meta: consumer %s does not exist in consumer group %s", - consumerId, consumerGroupId)); + PipeMessages + .EXCEPTION_FAILED_ADD_SUBSCRIPTION_CONSUMER_GROUP_META_CONSUMER_ARG_DOES_NOT_EF08EE87, + consumerId, + consumerGroupId)); } for (final String topic : topics) { @@ -297,8 +300,10 @@ private Set removeSubscriptionInternal( if (!consumerIdToConsumerMeta.containsKey(consumerId)) { throw new SubscriptionException( String.format( - "Failed to remove subscription from consumer group meta: consumer %s does not exist in consumer group %s", - consumerId, consumerGroupId)); + PipeMessages + .EXCEPTION_FAILED_REMOVE_SUBSCRIPTION_CONSUMER_GROUP_META_CONSUMER_ARG_DOES_NOT_75C319C3, + consumerId, + consumerGroupId)); } final Set noSubscriptionTopicAfterRemoval = new HashSet<>(); diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/sync/PipeInfo.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/sync/PipeInfo.java index ddc264116d826..8a3235455fede 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/sync/PipeInfo.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/sync/PipeInfo.java @@ -128,7 +128,8 @@ public static PipeInfo deserializePipeInfo(ByteBuffer byteBuffer) { case WALPipe: default: throw new UnsupportedOperationException( - String.format("Can not recognize PipeType %s.", pipeType.name())); + String.format( + CommonMessages.EXCEPTION_CAN_NOT_RECOGNIZE_PIPETYPE_ARG_8850A249, pipeType.name())); } return pipeInfo; } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/udf/UDFType.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/udf/UDFType.java index 95de1260e516d..83c79a6060a85 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/udf/UDFType.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/udf/UDFType.java @@ -108,8 +108,10 @@ public static UDFType deserialize(ByteBuffer buffer) { } } throw new IllegalArgumentException( - "Unknown UDFType:" - + String.format("%8s", Integer.toBinaryString(readByte & 0xFF)).replace(' ', '0')); + CommonMessages.EXCEPTION_UNKNOWN_UDFTYPE_9A8D1B23 + + String.format( + CommonMessages.EXCEPTION_8S_5F5F831F, Integer.toBinaryString(readByte & 0xFF)) + .replace(' ', '0')); } public boolean isTreeModel() { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/udf/builtin/UDTFEqualSizeBucketAggSample.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/udf/builtin/UDTFEqualSizeBucketAggSample.java index 21506698605fe..c16445b48b68a 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/udf/builtin/UDTFEqualSizeBucketAggSample.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/udf/builtin/UDTFEqualSizeBucketAggSample.java @@ -20,6 +20,7 @@ package org.apache.iotdb.commons.udf.builtin; import org.apache.iotdb.commons.exception.MetadataException; +import org.apache.iotdb.commons.i18n.CommonMessages; import org.apache.iotdb.commons.udf.utils.UDFDataTypeTransformer; import org.apache.iotdb.udf.api.access.RowWindow; import org.apache.iotdb.udf.api.collector.PointCollector; @@ -461,7 +462,8 @@ public void beforeStart(UDFParameters parameters, UDTFConfigurations configurati break; default: throw new UDFParameterNotValidException( - "Illegal aggregation method. Aggregation type should be avg, min, max, sum, extreme, variance."); + CommonMessages + .EXCEPTION_ILLEGAL_AGGREGATION_METHOD_AGGREGATION_TYPE_SHOULD_AVG_MIN_MAX_SUM_2D7BEC96); } } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/udf/builtin/UDTFEqualSizeBucketOutlierSample.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/udf/builtin/UDTFEqualSizeBucketOutlierSample.java index 85490ac534e47..0e5cc3b60faec 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/udf/builtin/UDTFEqualSizeBucketOutlierSample.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/udf/builtin/UDTFEqualSizeBucketOutlierSample.java @@ -20,6 +20,7 @@ package org.apache.iotdb.commons.udf.builtin; import org.apache.iotdb.commons.exception.MetadataException; +import org.apache.iotdb.commons.i18n.CommonMessages; import org.apache.iotdb.commons.udf.utils.UDFDataTypeTransformer; import org.apache.iotdb.udf.api.access.Row; import org.apache.iotdb.udf.api.access.RowWindow; @@ -636,7 +637,8 @@ public void beforeStart(UDFParameters parameters, UDTFConfigurations configurati break; default: throw new UDFParameterNotValidException( - "Illegal outlier method. Outlier type should be avg, stendis, cos or prenextdis."); + CommonMessages + .EXCEPTION_ILLEGAL_OUTLIER_METHOD_OUTLIER_TYPE_SHOULD_AVG_STENDIS_COS_PRENEXTDIS_91D1C70A); } } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/udf/builtin/UDTFM4.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/udf/builtin/UDTFM4.java index 3de46df72a061..9665930c19925 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/udf/builtin/UDTFM4.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/udf/builtin/UDTFM4.java @@ -20,6 +20,7 @@ package org.apache.iotdb.commons.udf.builtin; import org.apache.iotdb.commons.exception.MetadataException; +import org.apache.iotdb.commons.i18n.CommonMessages; import org.apache.iotdb.commons.udf.utils.UDFDataTypeTransformer; import org.apache.iotdb.udf.api.UDTF; import org.apache.iotdb.udf.api.access.RowWindow; @@ -77,15 +78,17 @@ public void validate(UDFParameterValidator validator) throws UDFException { && !validator.getParameters().hasAttribute(TIME_INTERVAL_KEY)) { throw new UDFParameterNotValidException( String.format( - "attribute \"%s\"/\"%s\" is required but was not provided.", - WINDOW_SIZE_KEY, TIME_INTERVAL_KEY)); + CommonMessages.EXCEPTION_ATTRIBUTE_ARG_ARG_REQUIRED_BUT_WAS_NOT_PROVIDED_CD090883, + WINDOW_SIZE_KEY, + TIME_INTERVAL_KEY)); } if (validator.getParameters().hasAttribute(WINDOW_SIZE_KEY) && validator.getParameters().hasAttribute(TIME_INTERVAL_KEY)) { throw new UDFParameterNotValidException( String.format( - "use attribute \"%s\" or \"%s\" only one at a time.", - WINDOW_SIZE_KEY, TIME_INTERVAL_KEY)); + CommonMessages.EXCEPTION_USE_ATTRIBUTE_ARG_ARG_ONLY_ONE_AT_TIME_B431468C, + WINDOW_SIZE_KEY, + TIME_INTERVAL_KEY)); } if (validator.getParameters().hasAttribute(WINDOW_SIZE_KEY)) { accessStrategy = AccessStrategy.SIZE_WINDOW; diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/udf/builtin/relational/tvf/CumulateTableFunction.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/udf/builtin/relational/tvf/CumulateTableFunction.java index e6627491f2b3c..9fa095ebf1f09 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/udf/builtin/relational/tvf/CumulateTableFunction.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/udf/builtin/relational/tvf/CumulateTableFunction.java @@ -19,6 +19,7 @@ package org.apache.iotdb.commons.udf.builtin.relational.tvf; +import org.apache.iotdb.commons.i18n.CommonMessages; import org.apache.iotdb.udf.api.exception.UDFException; import org.apache.iotdb.udf.api.relational.TableFunction; import org.apache.iotdb.udf.api.relational.access.Record; @@ -92,7 +93,8 @@ public TableFunctionAnalysis analyze(Map arguments) throws UDF if (size % step != 0) { throw new UDFException( - "Cumulative table function requires size must be an integral multiple of step."); + CommonMessages + .EXCEPTION_CUMULATIVE_TABLE_FUNCTION_REQUIRES_SIZE_MUST_INTEGRAL_MULTIPLE_STEP_D8A9DA94); } TableArgument tableArgument = (TableArgument) arguments.get(DATA_PARAMETER_NAME); diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/udf/builtin/relational/tvf/VariationTableFunction.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/udf/builtin/relational/tvf/VariationTableFunction.java index c9e8d3877b433..0ad9e16ca5c39 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/udf/builtin/relational/tvf/VariationTableFunction.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/udf/builtin/relational/tvf/VariationTableFunction.java @@ -94,7 +94,9 @@ public TableFunctionAnalysis analyze(Map arguments) throws UDF } catch (UDFTypeMismatchException e) { // print more information for the exception throw new UDFTypeMismatchException( - e.getMessage() + " The column type must be numeric if DELTA is not 0.", e); + e.getMessage() + + CommonMessages.EXCEPTION_COLUMN_TYPE_MUST_NUMERIC_IF_DELTA_NOT_0_F7864D4E, + e); } DescribedSchema properColumnSchema = diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/udf/builtin/relational/tvf/WindowTVFUtils.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/udf/builtin/relational/tvf/WindowTVFUtils.java index f0f72858c005a..3271a30239abc 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/udf/builtin/relational/tvf/WindowTVFUtils.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/udf/builtin/relational/tvf/WindowTVFUtils.java @@ -19,6 +19,7 @@ package org.apache.iotdb.commons.udf.builtin.relational.tvf; +import org.apache.iotdb.commons.i18n.CommonMessages; import org.apache.iotdb.udf.api.exception.UDFColumnNotFoundException; import org.apache.iotdb.udf.api.exception.UDFException; import org.apache.iotdb.udf.api.exception.UDFTypeMismatchException; @@ -45,13 +46,16 @@ public static int findColumnIndex( if (fieldName.isPresent() && expectedFieldName.equalsIgnoreCase(fieldName.get())) { if (!expectedTypes.contains(tableArgument.getFieldTypes().get(i))) { throw new UDFTypeMismatchException( - String.format("The type of the column [%s] is not as expected.", expectedFieldName)); + String.format( + CommonMessages.EXCEPTION_TYPE_COLUMN_ARG_NOT_AS_EXPECTED_7A81636E, + expectedFieldName)); } return i; } } throw new UDFColumnNotFoundException( String.format( - "Required column [%s] not found in the source table argument.", expectedFieldName)); + CommonMessages.EXCEPTION_REQUIRED_COLUMN_ARG_NOT_FOUND_SOURCE_TABLE_ARGUMENT_993E1C08, + expectedFieldName)); } } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/udf/service/UDFClassLoaderManager.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/udf/service/UDFClassLoaderManager.java index 138e7e284b90c..19e06c4f7342d 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/udf/service/UDFClassLoaderManager.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/udf/service/UDFClassLoaderManager.java @@ -76,7 +76,9 @@ public void finalizeUDFQuery(String queryId) { } } catch (IOException e) { LOGGER.warn( - "Failed to close UDFClassLoader (queryId: {}), because {}", queryId, e.toString()); + CommonMessages.LOG_FAILED_CLOSE_UDFCLASSLOADER_QUERYID_ARG_BECAUSE_ARG_8B1C3739, + queryId, + e.toString()); } } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/utils/AuthUtils.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/utils/AuthUtils.java index 28f5de7e8882a..1e01dbeaee7c5 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/utils/AuthUtils.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/utils/AuthUtils.java @@ -177,10 +177,11 @@ public static void validateInternalBuiltinUsername(String username, long userId) if (!User.isSystemReservedUsername(username)) { throw new AuthException( TSStatusCode.ILLEGAL_PASSWORD, - "Internal user names (except the default superuser and separation-of-duties admins) must " - + "start with \"" + UtilMessages + .EXCEPTION_INTERNAL_USER_NAMES_EXCEPT_DEFAULT_SUPERUSER_SEPARATION_DUTIES_ADMINS_MUST_3F045FC1 + + UtilMessages.EXCEPTION_START_01CCD2EF + User.BUILTIN_USERNAME_PREFIX - + "\""); + + AuthMessages.EXCEPTION_BACKSLASH_QUOTE_D4C5D637); } } @@ -199,10 +200,10 @@ public static void validateNewUserUsername(String username) throws AuthException if (User.isSystemReservedUsername(username)) { throw new AuthException( TSStatusCode.ILLEGAL_PASSWORD, - "User names starting with \"" + UtilMessages.EXCEPTION_USER_NAMES_STARTING_8FDC637E + User.BUILTIN_USERNAME_PREFIX - + "\" are reserved for system use and cannot be used for new users or as a rename " - + "target"); + + UtilMessages.EXCEPTION_RESERVED_SYSTEM_USE_CANNOT_USED_NEW_USERS_AS_RENAME_CEB73835 + + UtilMessages.EXCEPTION_TARGET_42AEFBAE); } } @@ -221,18 +222,18 @@ public static void validateName(String str) throws AuthException { if (length < NAME_MIN_LENGTH) { throw new AuthException( TSStatusCode.ILLEGAL_PASSWORD, - "The length of name must be greater than or equal to " + NAME_MIN_LENGTH); + UtilMessages.EXCEPTION_LENGTH_NAME_MUST_GREATER_THAN_EQUAL_0387C3A5 + NAME_MIN_LENGTH); } else if (length > NAME_MAX_LENGTH) { throw new AuthException( TSStatusCode.ILLEGAL_PASSWORD, - "The length of name must be less than or equal to " + NAME_MAX_LENGTH); + UtilMessages.EXCEPTION_LENGTH_NAME_MUST_LESS_THAN_EQUAL_B7B31C94 + NAME_MAX_LENGTH); } else if (str.contains(" ")) { throw new AuthException( TSStatusCode.ILLEGAL_PASSWORD, AuthMessages.NAME_CANNOT_CONTAIN_SPACES); } else if (!str.matches(REX_PATTERN)) { throw new AuthException( TSStatusCode.ILLEGAL_PASSWORD, - "The name can only contain letters, numbers or !@#$%^*()_+-="); + UtilMessages.EXCEPTION_NAME_CAN_ONLY_CONTAIN_LETTERS_NUMBERS_A313856E); } } @@ -241,18 +242,20 @@ public static void validateAllPassword(String str) throws AuthException { if (length < PASSWORD_MIN_LENGTH) { throw new AuthException( TSStatusCode.ILLEGAL_PASSWORD, - "The length of password must be greater than or equal to " + PASSWORD_MIN_LENGTH); + UtilMessages.EXCEPTION_LENGTH_PASSWORD_MUST_GREATER_THAN_EQUAL_F95F3E8F + + PASSWORD_MIN_LENGTH); } else if (length > PASSWORD_MAX_LENGTH) { throw new AuthException( TSStatusCode.ILLEGAL_PASSWORD, - "The length of password must be less than or equal to " + PASSWORD_MAX_LENGTH); + UtilMessages.EXCEPTION_LENGTH_PASSWORD_MUST_LESS_THAN_EQUAL_C822ECBE + + PASSWORD_MAX_LENGTH); } else if (str.contains(" ")) { throw new AuthException( TSStatusCode.ILLEGAL_PASSWORD, AuthMessages.PASSWORD_CANNOT_CONTAIN_SPACES); } else if (!str.matches(REX_PATTERN)) { throw new AuthException( TSStatusCode.ILLEGAL_PASSWORD, - "The password can only contain letters, numbers or !@#$%^*()_+-="); + UtilMessages.EXCEPTION_PASSWORD_CAN_ONLY_CONTAIN_LETTERS_NUMBERS_D84EE152); } } @@ -267,7 +270,9 @@ public static void validatePath(PartialPath path) throws AuthException { throw new AuthException( TSStatusCode.ILLEGAL_PARAMETER, String.format( - "Illegal seriesPath %s, seriesPath should start with \"%s\"", path, ROOT_PREFIX)); + UtilMessages.EXCEPTION_ILLEGAL_SERIESPATH_ARG_SERIESPATH_SHOULD_START_ARG_FB9E3C07, + path, + ROOT_PREFIX)); } } @@ -280,14 +285,17 @@ public static void validatePatternPath(PartialPath path) throws AuthException { throw new AuthException( TSStatusCode.ILLEGAL_PARAMETER, String.format( - "Illegal pattern path: %s, only pattern path that end with ** are supported.", path)); + UtilMessages + .EXCEPTION_ILLEGAL_PATTERN_PATH_ARG_ONLY_PATTERN_PATH_END_SUPPORTED_16CBB77D, + path)); } for (int i = 0; i < path.getNodeLength() - 1; i++) { if (PathPatternUtil.hasWildcard(path.getNodes()[i])) { throw new AuthException( TSStatusCode.ILLEGAL_PARAMETER, String.format( - "Illegal pattern path: %s, only pattern path that end with wildcards are supported.", + UtilMessages + .EXCEPTION_ILLEGAL_PATTERN_PATH_ARG_ONLY_PATTERN_PATH_END_WILDCARDS_SUPPORTED_7183A896, path)); } } @@ -513,7 +521,8 @@ public static Set strToPermissions(String[] authorizationList) throws A } if (!legal) { throw new AuthException( - TSStatusCode.UNKNOWN_AUTH_PRIVILEGE, "No such privilege " + authorization); + TSStatusCode.UNKNOWN_AUTH_PRIVILEGE, + UtilMessages.EXCEPTION_NO_SUCH_PRIVILEGE_62644205 + authorization); } } return result; diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/utils/BlobUtils.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/utils/BlobUtils.java index b059b05c4252e..625d56255435e 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/utils/BlobUtils.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/utils/BlobUtils.java @@ -36,7 +36,7 @@ private BlobUtils() {} CharMatcher.inRange('A', 'F').or(CharMatcher.inRange('0', '9')).precomputed(); public static byte[] parseBlobString(String value) { - requireNonNull(value, "value is null"); + requireNonNull(value, UtilMessages.EXCEPTION_VALUE_IS_NULL_192F6BFF); if (value.length() < 3 || !value.startsWith("X'") || !value.endsWith("'")) { throw new IllegalArgumentException(UtilMessages.BLOB_MUST_BE_HEX_STRING); } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/utils/FileUtils.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/utils/FileUtils.java index be99503a3c9ef..26bc007a207ef 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/utils/FileUtils.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/utils/FileUtils.java @@ -106,12 +106,17 @@ public static void deleteFileOrDirectory(File file, boolean quietForNoSuchFile) Files.delete(file.toPath()); } catch (NoSuchFileException e) { if (!quietForNoSuchFile) { - LOGGER.warn("{}: {}", e.getMessage(), Arrays.toString(file.list()), e); + LOGGER.warn( + UtilMessages.LOG_ARG_COLON_ARG_DCE519A1, + e.getMessage(), + Arrays.toString(file.list()), + e); } } catch (DirectoryNotEmptyException e) { - LOGGER.warn("{}: {}", e.getMessage(), Arrays.toString(file.list()), e); + LOGGER.warn( + UtilMessages.LOG_ARG_COLON_ARG_DCE519A1, e.getMessage(), Arrays.toString(file.list()), e); } catch (Exception e) { - LOGGER.warn("{}: {}", e.getMessage(), file.getName(), e); + LOGGER.warn(UtilMessages.LOG_ARG_COLON_ARG_DCE519A1, e.getMessage(), file.getName(), e); } } @@ -131,9 +136,10 @@ public static void deleteFileOrDirectoryWithRetry(File file) { return null; }); } catch (DirectoryNotEmptyException e) { - LOGGER.warn("{}: {}", e.getMessage(), Arrays.toString(file.list()), e); + LOGGER.warn( + UtilMessages.LOG_ARG_COLON_ARG_DCE519A1, e.getMessage(), Arrays.toString(file.list()), e); } catch (Exception e) { - LOGGER.warn("{}: {}", e.getMessage(), file.getName(), e); + LOGGER.warn(UtilMessages.LOG_ARG_COLON_ARG_DCE519A1, e.getMessage(), file.getName(), e); } } diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/utils/JVMCommonUtils.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/utils/JVMCommonUtils.java index ccbe525d3d591..39432e9db367b 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/utils/JVMCommonUtils.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/utils/JVMCommonUtils.java @@ -92,11 +92,7 @@ public static double getDiskFreeRatio(String dir) { long totalSpace = dirFile.getTotalSpace(); double ratio = 1.0 * freeSpace / totalSpace; if (ratio <= diskSpaceWarningThreshold) { - LOGGER.warn( - "{} is above the warning threshold, free space {}, total space {}", - dir, - freeSpace, - totalSpace); + LOGGER.warn(UtilMessages.DISK_ABOVE_WARNING_THRESHOLD, dir, freeSpace, totalSpace); } return ratio; } catch (Exception e) { diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/utils/StatusUtils.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/utils/StatusUtils.java index e7df20935b27e..246cf6d0ea1d0 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/utils/StatusUtils.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/utils/StatusUtils.java @@ -22,6 +22,7 @@ import org.apache.iotdb.common.rpc.thrift.TSStatus; import org.apache.iotdb.commons.conf.CommonConfig; import org.apache.iotdb.commons.conf.CommonDescriptor; +import org.apache.iotdb.commons.i18n.UtilMessages; import org.apache.iotdb.rpc.RpcUtils; import org.apache.iotdb.rpc.TSStatusCode; @@ -90,118 +91,120 @@ public static TSStatus getStatus(TSStatusCode statusCode) { status.setCode(statusCode.getStatusCode()); switch (statusCode) { case SUCCESS_STATUS: - status.setMessage("Executed successfully."); + status.setMessage(UtilMessages.MESSAGE_EXECUTED_SUCCESSFULLY_1EAF1169); break; case INTERNAL_REQUEST_TIME_OUT: - status.setMessage("Request timed out."); + status.setMessage(UtilMessages.MESSAGE_REQUEST_TIMED_OUT_FD587FC4); break; case INCOMPATIBLE_VERSION: - status.setMessage("Incompatible version."); + status.setMessage(UtilMessages.MESSAGE_INCOMPATIBLE_VERSION_0C5CB2AF); break; case REMOVE_DATANODE_ERROR: - status.setMessage("Failed while removing DataNode."); + status.setMessage(UtilMessages.MESSAGE_FAILED_REMOVING_DATANODE_B4B7F050); break; case ALIAS_ALREADY_EXIST: - status.setMessage("Alias already exists."); + status.setMessage(UtilMessages.MESSAGE_ALIAS_ALREADY_EXISTS_C05A2E5A); break; case PATH_ALREADY_EXIST: - status.setMessage("Path already exist."); + status.setMessage(UtilMessages.MESSAGE_PATH_ALREADY_EXIST_56F8BFF9); break; case PATH_NOT_EXIST: - status.setMessage("Path does not exist."); + status.setMessage(UtilMessages.MESSAGE_PATH_DOES_NOT_EXIST_93310498); break; case METADATA_ERROR: - status.setMessage("Meet error when dealing with metadata."); + status.setMessage(UtilMessages.MESSAGE_MEET_ERROR_DEALING_METADATA_1C4A38B9); break; case OUT_OF_TTL: - status.setMessage("Insertion time is less than TTL time bound."); + status.setMessage(UtilMessages.MESSAGE_INSERTION_TIME_LESS_THAN_TTL_TIME_BOUND_0F1BB861); break; case COMPACTION_ERROR: - status.setMessage("Meet error while merging."); + status.setMessage(UtilMessages.MESSAGE_MEET_ERROR_MERGING_28424A77); break; case DISPATCH_ERROR: - status.setMessage("Meet error while dispatching."); + status.setMessage(UtilMessages.MESSAGE_MEET_ERROR_DISPATCHING_73E4FD5E); break; case DATAREGION_PROCESS_ERROR: - status.setMessage("Database processor related error."); + status.setMessage(UtilMessages.MESSAGE_DATABASE_PROCESSOR_RELATED_ERROR_C58690B1); break; case STORAGE_ENGINE_ERROR: - status.setMessage("Storage engine related error."); + status.setMessage(UtilMessages.MESSAGE_STORAGE_ENGINE_RELATED_ERROR_94DEBBCF); break; case TSFILE_PROCESSOR_ERROR: - status.setMessage("TsFile processor related error."); + status.setMessage(UtilMessages.MESSAGE_TSFILE_PROCESSOR_RELATED_ERROR_B6C57C3E); break; case ILLEGAL_PATH: - status.setMessage("Illegal path."); + status.setMessage(UtilMessages.MESSAGE_ILLEGAL_PATH_020B26BC); break; case LOAD_FILE_ERROR: - status.setMessage("Meet error while loading file."); + status.setMessage(UtilMessages.MESSAGE_MEET_ERROR_LOADING_FILE_A90EBC21); break; case EXECUTE_STATEMENT_ERROR: - status.setMessage("Execute statement error."); + status.setMessage(UtilMessages.MESSAGE_EXECUTE_STATEMENT_ERROR_54E4A395); break; case SQL_PARSE_ERROR: - status.setMessage("Meet error while parsing SQL."); + status.setMessage(UtilMessages.MESSAGE_MEET_ERROR_PARSING_SQL_3C5A3B80); break; case GENERATE_TIME_ZONE_ERROR: - status.setMessage("Meet error while generating time zone."); + status.setMessage(UtilMessages.MESSAGE_MEET_ERROR_GENERATING_TIME_ZONE_94E03CA3); break; case SET_TIME_ZONE_ERROR: - status.setMessage("Meet error while setting time zone."); + status.setMessage(UtilMessages.MESSAGE_MEET_ERROR_SETTING_TIME_ZONE_CBE88DCF); break; case QUERY_NOT_ALLOWED: - status.setMessage("Query statements are not allowed error."); + status.setMessage(UtilMessages.MESSAGE_QUERY_STATEMENTS_NOT_ALLOWED_ERROR_58D30C99); break; case LOGICAL_OPERATOR_ERROR: - status.setMessage("Logical operator related error."); + status.setMessage(UtilMessages.MESSAGE_LOGICAL_OPERATOR_RELATED_ERROR_D94D5972); break; case LOGICAL_OPTIMIZE_ERROR: - status.setMessage("Logical optimize related error."); + status.setMessage(UtilMessages.MESSAGE_LOGICAL_OPTIMIZE_RELATED_ERROR_36D63CB3); break; case UNSUPPORTED_FILL_TYPE: - status.setMessage("Unsupported fill type related error."); + status.setMessage(UtilMessages.MESSAGE_UNSUPPORTED_FILL_TYPE_RELATED_ERROR_67BE2CF2); break; case QUERY_PROCESS_ERROR: - status.setMessage("Query process related error."); + status.setMessage(UtilMessages.MESSAGE_QUERY_PROCESS_RELATED_ERROR_93FA1016); break; case WRITE_PROCESS_ERROR: - status.setMessage("Writing data related error."); + status.setMessage(UtilMessages.MESSAGE_WRITING_DATA_RELATED_ERROR_0CA06C4D); break; case INTERNAL_SERVER_ERROR: - status.setMessage("Internal server error."); + status.setMessage(UtilMessages.MESSAGE_INTERNAL_SERVER_ERROR_12F61DF7); break; case CLOSE_OPERATION_ERROR: - status.setMessage("Meet error in close operation."); + status.setMessage(UtilMessages.MESSAGE_MEET_ERROR_CLOSE_OPERATION_1C7D0589); break; case SYSTEM_READ_ONLY: - status.setMessage("Fail to do non-query operations because system is read-only."); + status.setMessage( + UtilMessages.MESSAGE_FAIL_DO_NON_QUERY_OPERATIONS_BECAUSE_SYSTEM_READ_ONLY_10CA1ED2); break; case DISK_SPACE_INSUFFICIENT: - status.setMessage("Disk space is insufficient."); + status.setMessage(UtilMessages.MESSAGE_DISK_SPACE_INSUFFICIENT_DF6205B0); break; case START_UP_ERROR: - status.setMessage("Meet error while starting up."); + status.setMessage(UtilMessages.MESSAGE_MEET_ERROR_STARTING_UP_22A4CBFE); break; case WRONG_LOGIN_PASSWORD: - status.setMessage("Username or password is wrong."); + status.setMessage(UtilMessages.MESSAGE_USERNAME_PASSWORD_WRONG_C44C4AF0); break; case NOT_LOGIN: - status.setMessage("Has not logged in."); + status.setMessage(UtilMessages.MESSAGE_HAS_NOT_LOGGED_A2BA0267); break; case NO_PERMISSION: - status.setMessage("No permissions for this operation, please add privilege."); + status.setMessage( + UtilMessages.MESSAGE_NO_PERMISSIONS_OPERATION_PLEASE_ADD_PRIVILEGE_64047D1E); break; case INIT_AUTH_ERROR: - status.setMessage("Failed to init authorizer."); + status.setMessage(UtilMessages.MESSAGE_FAILED_INIT_AUTHORIZER_1E2B017E); break; case UNSUPPORTED_OPERATION: - status.setMessage("Unsupported operation."); + status.setMessage(UtilMessages.MESSAGE_UNSUPPORTED_OPERATION_295CDB21); break; case CAN_NOT_CONNECT_DATANODE: - status.setMessage("Node cannot be reached."); + status.setMessage(UtilMessages.MESSAGE_NODE_CANNOT_REACHED_D3FD04A8); break; default: - status.setMessage(""); + status.setMessage(UtilMessages.EMPTY_MESSAGE); break; } return status;