pseudomuto commented on a change in pull request #672: [HUDI-113]: Use Pair
over # delimited string
URL: https://github.com/apache/incubator-hudi/pull/672#discussion_r284391165
##########
File path:
hoodie-client/src/main/java/com/uber/hoodie/index/bloom/BucketizedBloomCheckPartitioner.java
##########
@@ -139,11 +140,10 @@ public int numPartitions() {
@Override
public int getPartition(Object key) {
- String[] parts = ((String) key).split("#");
- String fileName = parts[0];
+ final String[] parts = ((String) key).split("#", 2);
final long hashOfKey = Hashing.md5().hashString(parts[1],
StandardCharsets.UTF_8).asLong();
- List<Integer> candidatePartitions = fileGroupToPartitions.get(fileName);
- int idx = (int) Math.floorMod(hashOfKey, candidatePartitions.size());
+ final List<Integer> candidatePartitions =
fileGroupToPartitions.get(parts[0]);
+ final int idx = (int) Math.floorMod(hashOfKey, candidatePartitions.size());
Review comment:
~~I can back these changes out, no need to update this file here~~ Updated
to use Pair now
----------------------------------------------------------------
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]
With regards,
Apache Git Services