robertwb commented on a change in pull request #13208:
URL: https://github.com/apache/beam/pull/13208#discussion_r518911465



##########
File path: 
runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/GroupIntoBatchesOverride.java
##########
@@ -210,20 +211,23 @@ public StreamingGroupIntoBatchesWithShardedKey(
     }
   }
 
-  private static <K, V> PCollection<KV<ShardedKey<K>, V>> 
ShardKeys(PCollection<KV<K, V>> input) {
+  private static <K, V> PCollection<KV<ShardedKey<K>, V>> 
shardKeys(PCollection<KV<K, V>> input) {
     KvCoder<K, V> inputCoder = (KvCoder<K, V>) input.getCoder();
     org.apache.beam.sdk.coders.Coder<K> keyCoder =
         (org.apache.beam.sdk.coders.Coder<K>) 
inputCoder.getCoderArguments().get(0);
     org.apache.beam.sdk.coders.Coder<V> valueCoder =
         (org.apache.beam.sdk.coders.Coder<V>) 
inputCoder.getCoderArguments().get(1);
     return input
         .apply(
-            "ShardKeys",
+            "Shard Keys",
             MapElements.via(
                 new SimpleFunction<KV<K, V>, KV<ShardedKey<K>, V>>() {
                   @Override
                   public KV<ShardedKey<K>, V> apply(KV<K, V> input) {
-                    return KV.of(ShardedKey.of(input.getKey(), new byte[0]), 
input.getValue());
+                    long tid = Thread.currentThread().getId();

Review comment:
       I meant you could have a static-level long created by java.util.UUID or 
similar, plus the thread id queried here. 




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


Reply via email to