hbgstc123 commented on code in PR #9679:
URL: https://github.com/apache/hudi/pull/9679#discussion_r1322601744


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/index/bucket/ConsistentBucketIdentifier.java:
##########
@@ -115,6 +115,21 @@ public ConsistentHashingNode getFormerBucket(int 
hashValue) {
     return headMap.isEmpty() ? ring.lastEntry().getValue() : 
headMap.get(headMap.lastKey());
   }
 
+  /**
+   * Get the latter node of the given node (inferred from file id).
+   */
+  public ConsistentHashingNode getLatterBucket(String fileId) {
+    return getLatterBucket(getBucketByFileId(fileId).getValue());
+  }
+
+  /**
+   * Get the latter node of the given node (inferred from hash value).
+   */
+  public ConsistentHashingNode getLatterBucket(int hashValue) {
+    SortedMap<Integer, ConsistentHashingNode> tailMap = 
ring.tailMap(hashValue);

Review Comment:
   should be exclusive, thanks~



-- 
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