Pengzna commented on code in PR #12355:
URL: https://github.com/apache/iotdb/pull/12355#discussion_r1616727438


##########
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/connector/payload/pipeconsensus/request/PipeConsensusRequestType.java:
##########
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.iotdb.commons.pipe.connector.payload.pipeconsensus.request;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+public enum PipeConsensusRequestType {
+
+  // Data region
+  TRANSFER_TABLET_INSERT_NODE((short) 100),
+  TRANSFER_TABLET_RAW((short) 101),
+  TRANSFER_TS_FILE_PIECE((short) 102),
+  TRANSFER_TS_FILE_SEAL((short) 103),
+  TRANSFER_TABLET_BATCH((short) 104),
+  TRANSFER_TABLET_BINARY((short) 105),
+  TRANSFER_TS_FILE_PIECE_WITH_MOD((short) 106),
+  TRANSFER_TS_FILE_SEAL_WITH_MOD((short) 107),
+
+// Note: temporarily PipeConsensus only support data region. But we put this 
class in `node-common`
+// to reserve the scalability
+;
+
+  private final short type;
+
+  PipeConsensusRequestType(short type) {
+    this.type = type;
+  }
+
+  public short getType() {
+    return type;
+  }
+
+  private static final Map<Short, PipeConsensusRequestType> TYPE_MAP =

Review Comment:
   we intend to use `Short` as key here, since we can get short value from 
thrift reqs directly. So maybe it's more convenient for us to use HashMap here?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to