SammyVimes commented on code in PR #1016:
URL: https://github.com/apache/ignite-3/pull/1016#discussion_r957416780


##########
modules/table/src/main/java/org/apache/ignite/internal/utils/RebalanceUtil.java:
##########
@@ -202,13 +222,46 @@ public static ByteArray stablePartAssignmentsKey(String 
partId) {
     }
 
     /**
-     * Extract table id from pending key of partition.
+     * Key that is needed for the rebalance algorithm.
+     *
+     * @param partId Unique identifier of a partition.
+     * @return Key for a partition.
+     * @see <a 
href="https://github.com/apache/ignite-3/blob/main/modules/table/tech-notes/rebalance.md";>Rebalnce
 documentation</a>
+     */
+    public static ByteArray switchReduceKey(String partId) {
+        return new ByteArray(ASSIGNMENTS_SWITCH_REDUCE_PREFIX + partId);
+    }
+
+    /**
+     * Key that is needed for the rebalance algorithm.
+     *
+     * @param partId Unique identifier of a partition.
+     * @return Key for a partition.
+     * @see <a 
href="https://github.com/apache/ignite-3/blob/main/modules/table/tech-notes/rebalance.md";>Rebalnce
 documentation</a>
+     */
+    public static ByteArray switchAppendKey(String partId) {
+        return new ByteArray(ASSIGNMENTS_SWITCH_APPEND_PREFIX + partId);
+    }
+
+    /**
+     * Extract table id from a metastorage key of partition.
+     *
+     * @param key Key.
+     * @return Table id.
+     */
+    public static UUID extractTableId(ByteArray key) {
+        return extractTableId(key, "");
+    }
+
+    /**
+     * Extract table id from a metastorage key of partition.
      *
      * @param key Key.
+     * @param prefix Key prefix.
      * @return Table id.
      */
     public static UUID extractTableId(ByteArray key, String prefix) {
-        var strKey = key.toString();
+        String strKey = key.toString();

Review Comment:
   There is no method that accepts encoding



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