kaijchen commented on code in PR #38:
URL: https://github.com/apache/incubator-uniffle/pull/38#discussion_r916628756


##########
storage/src/main/java/org/apache/uniffle/storage/util/ShuffleStorageUtils.java:
##########
@@ -199,7 +200,7 @@ public static int[] getPartitionRange(int partitionId, int 
partitionNumPerRange,
 
   public static int getStorageIndex(int max, String appId, int shuffleId, int 
startPartition) {
     String hash = appId + "_" + shuffleId + "_" + startPartition;
-    int index = MurmurHash.getInstance().hash(hash.getBytes()) % max;
+    int index = 
MurmurHash.getInstance().hash(hash.getBytes(StandardCharsets.UTF_8)) % max;

Review Comment:
   Encoding a string with only `ASCII` text in `UTF-8` is same as in `ASCII`.
   So it's not necessary to change it.
   
   ```java
     @Test
     public void testEncoding() {
       assertArrayEquals("123_456_789".getBytes(StandardCharsets.UTF_8),
           "123_456_789".getBytes(StandardCharsets.US_ASCII));
     }
   ```



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to