johnyangk commented on a change in pull request #91: [NEMO-3] Bump up the Beam
version to 2.5.0
URL: https://github.com/apache/incubator-nemo/pull/91#discussion_r208189453
##########
File path:
runtime/executor/src/main/java/edu/snu/nemo/runtime/executor/data/partitioner/HashPartitioner.java
##########
@@ -40,6 +40,11 @@ public HashPartitioner(final int dstParallelism,
@Override
public Integer partition(final Object element) {
- return Math.abs(keyExtractor.extractKey(element).hashCode() %
dstParallelism);
+ final Object key = keyExtractor.extractKey(element);
+ if (key == null) {
Review comment:
What's causing the key to be `null`?
I'd think changing `BeamKeyExtractor` to `return 0` would be better than
changing `HashPartitioner`, as this behavior seems to be specific to Beam. (and
does not apply to Spark)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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