You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nemo.apache.org by GitBox <gi...@apache.org> on 2018/08/07 12:06:56 UTC

[GitHub] shpark commented on a change in pull request #91: [NEMO-3] Bump up the Beam version to 2.5.0

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

 ##########
 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:
   Beam WriteFiles produces KV.of(null, something), during the sink. I will change BeamKeyExtractor to return 0 for null key pairs.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services