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

jiangtian pushed a commit to branch cluster_new
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git


The following commit(s) were added to refs/heads/cluster_new by this push:
     new 5ad1ba4  add error message
     new aad6e09  Merge pull request #1167 from Ring-k/cluster_new
5ad1ba4 is described below

commit 5ad1ba4424499b9e70ab3e1d364f3e2407103e77
Author: Yuyuan Kang <[email protected]>
AuthorDate: Thu May 7 23:13:03 2020 +0800

    add error message
---
 .../apache/iotdb/cluster/utils/StatusUtils.java    | 131 ++++++++++++++++++++-
 1 file changed, 129 insertions(+), 2 deletions(-)

diff --git 
a/cluster/src/main/java/org/apache/iotdb/cluster/utils/StatusUtils.java 
b/cluster/src/main/java/org/apache/iotdb/cluster/utils/StatusUtils.java
index e37ebdd..335bd54 100644
--- a/cluster/src/main/java/org/apache/iotdb/cluster/utils/StatusUtils.java
+++ b/cluster/src/main/java/org/apache/iotdb/cluster/utils/StatusUtils.java
@@ -34,9 +34,9 @@ public class StatusUtils {
   public static final TSStatus NO_LEADER = getStatus(TSStatusCode.NO_LEADER);
   public static final TSStatus INTERNAL_ERROR = 
getStatus(TSStatusCode.INTERNAL_SERVER_ERROR);
   public static final TSStatus UNSUPPORTED_OPERATION =
-      getStatus(TSStatusCode.UNSUPPORTED_OPERATION);
+          getStatus(TSStatusCode.UNSUPPORTED_OPERATION);
   public static final TSStatus EXECUTE_STATEMENT_ERROR =
-      getStatus(TSStatusCode.EXECUTE_STATEMENT_ERROR);
+          getStatus(TSStatusCode.EXECUTE_STATEMENT_ERROR);
   public static final TSStatus NO_STORAGE_GROUP = 
getStatus(TSStatusCode.STORAGE_GROUP_ERROR);
   public static final TSStatus NODE_READ_ONLY = 
getStatus(TSStatusCode.NODE_READ_ONLY);
 
@@ -56,6 +56,133 @@ public class StatusUtils {
       case NODE_READ_ONLY:
         status.setMessage("Current node is read-only, please retry to find 
another available node");
         break;
+
+      case INCOMPATIBLE_VERSION:
+        status.setMessage("Incompatible version.");
+        break;
+      case NODE_DELETE_FAILED_ERROR:
+        status.setMessage("Failed while deleting node.");
+        break;
+      case ALIAS_ALREADY_EXIST_ERROR:
+        status.setMessage("Alias already exists");
+        break;
+      case PATH_ALREADY_EXIST_ERROR:
+        status.setMessage("Path already exist.");
+        break;
+      case PATH_NOT_EXIST_ERROR:
+        status.setMessage("Path does not exist.");
+        break;
+      case UNSUPPORTED_FETCH_METADATA_OPERATION_ERROR:
+        status.setMessage("Unsupported fetch metadata operation.");
+        break;
+      case METADATA_ERROR:
+        status.setMessage("Meet error when dealing with metadata");
+        break;
+      case OUT_OF_TTL_ERROR:
+        status.setMessage("Insertion time is less than TTL time bound.");
+        break;
+      case CONFIG_ADJUSTER:
+        status.setMessage("IoTDB system load is too large.");
+        break;
+      case MERGE_ERROR:
+        status.setMessage("Meet error while merging.");
+        break;
+      case SYSTEM_CHECK_ERROR:
+        status.setMessage("Meet error while system checking.");
+        break;
+      case SYNC_DEVICE_OWNER_CONFLICT_ERROR:
+        status.setMessage("Sync device owners conflict.");
+        break;
+      case SYNC_CONNECTION_EXCEPTION:
+        status.setMessage("Meet error while sync connecting.");
+        break;
+      case STORAGE_GROUP_PROCESSOR_ERROR:
+        status.setMessage("Storage group processor related error.");
+        break;
+      case STORAGE_GROUP_ERROR:
+        status.setMessage("Storage group related error.");
+        break;
+      case STORAGE_ENGINE_ERROR:
+        status.setMessage("Storage engine related error.");
+        break;
+      case TSFILE_PROCESSOR_ERROR:
+        status.setMessage("TsFile processor related error.");
+        break;
+      case PATH_ILLEGAL:
+        status.setMessage("Illegal path.");
+        break;
+      case LOAD_FILE_ERROR:
+        status.setMessage("Meet error while loading file.");
+        break;
+      case EXECUTE_STATEMENT_ERROR:
+        status.setMessage("Execute statement error.");
+        break;
+      case SQL_PARSE_ERROR:
+        status.setMessage("Meet error while parsing SQL.");
+        break;
+      case GENERATE_TIME_ZONE_ERROR:
+        status.setMessage("Meet error while generating time zone.");
+        break;
+      case SET_TIME_ZONE_ERROR:
+        status.setMessage("Meet error while setting time zone.");
+        break;
+      case NOT_STORAGE_GROUP_ERROR:
+        status.setMessage("Operating object is not a storage group.");
+        break;
+      case QUERY_NOT_ALLOWED:
+        status.setMessage("Query statements are not allowed error.");
+        break;
+      case AST_FORMAT_ERROR:
+        status.setMessage("AST format related error.");
+        break;
+      case LOGICAL_OPERATOR_ERROR:
+        status.setMessage("Logical operator related error.");
+        break;
+      case LOGICAL_OPTIMIZE_ERROR:
+        status.setMessage("Logical optimize related error.");
+        break;
+      case UNSUPPORTED_FILL_TYPE_ERROR:
+        status.setMessage("Unsupported fill type related error.");
+        break;
+      case PATH_ERROR:
+        status.setMessage("Path related error.");
+        break;
+      case QUERY_PROCESS_ERROR:
+        status.setMessage("Query process related error.");
+        break;
+      case WRITE_PROCESS_ERROR:
+        status.setMessage("Writing data related error.");
+        break;
+      case INTERNAL_SERVER_ERROR:
+        status.setMessage("Internal server error.");
+        break;
+      case CLOSE_OPERATION_ERROR:
+        status.setMessage("Meet error in close operation.");
+        break;
+      case READ_ONLY_SYSTEM_ERROR:
+        status.setMessage("Operating system is read only.");
+        break;
+      case DISK_SPACE_INSUFFICIENT_ERROR:
+        status.setMessage("Disk space is insufficient.");
+        break;
+      case START_UP_ERROR:
+        status.setMessage("Meet error while starting up.");
+        break;
+      case WRONG_LOGIN_PASSWORD_ERROR:
+        status.setMessage("Username or password is wrong.");
+        break;
+      case NOT_LOGIN_ERROR:
+        status.setMessage("Has not logged in.");
+        break;
+      case NO_PERMISSION_ERROR:
+        status.setMessage("No permissions for this operation.");
+        break;
+      case UNINITIALIZED_AUTH_ERROR:
+        status.setMessage("Uninitialized authorizer.");
+        break;
+      case UNSUPPORTED_OPERATION:
+        status.setMessage("unsupported operation.");
+        break;
       default:
         status.setMessage("");
         break;

Reply via email to