kaijchen commented on code in PR #38:
URL: https://github.com/apache/incubator-uniffle/pull/38#discussion_r916610487
##########
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:
The method `getBytes()` encodes a String into a byte array using the
platform's default charset if no argument is passed. This will cause the
application behavior to vary between platforms.
The default charset is determined during virtual-machine startup and
typically depends upon the locale and charset of the underlying operating
system.
If you think `UTF-8` is a overkill here, we can change it to `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]