fanhualta commented on a change in pull request #3191:
URL: https://github.com/apache/iotdb/pull/3191#discussion_r639852107
##########
File path:
cluster/src/main/java/org/apache/iotdb/cluster/partition/PartitionTable.java
##########
@@ -79,19 +84,39 @@
List<PartitionGroup> getLocalGroups();
/**
- * @param header
+ * @param raftNode
* @return the partition group starting from the header.
*/
- PartitionGroup getHeaderGroup(Node header);
+ PartitionGroup getHeaderGroup(RaftNode raftNode);
+
+ PartitionGroup getHeaderGroup(Node node);
ByteBuffer serialize();
- void deserialize(ByteBuffer buffer);
+ /**
+ * Deserialize partition table and check whether the partition table in byte
buffer is valid
+ *
+ * @param buffer
+ * @return true if the partition table is valid
+ */
+ boolean deserialize(ByteBuffer buffer);
List<Node> getAllNodes();
List<PartitionGroup> getGlobalGroups();
+ List<PartitionGroup> calculateGlobalGroups(List<Node> nodeRing);
+
+ /**
+ * Judge whether the data of slot is held by node
+ *
+ * @param node target node
+ */
+ boolean judgeHoldSlot(Node node, int slot);
Review comment:
Good suggestion. I have removed it from the interface.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]