You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2020/06/25 22:51:22 UTC

[GitHub] [beam] TheNeuralBit commented on a change in pull request #10900: [BEAM-9335] update hard-coded coder id when translating Java external transforms

TheNeuralBit commented on a change in pull request #10900:
URL: https://github.com/apache/beam/pull/10900#discussion_r445880888



##########
File path: runners/core-construction-java/src/main/java/org/apache/beam/runners/core/construction/External.java
##########
@@ -222,6 +226,20 @@ public OutputT expand(InputT input) {
               });
       externalPCollectionIdMap = externalPCollectionIdMapBuilder.build();
 
+      Map<Coder, String> externalCoderIdMapBuilder = new HashMap<>();
+      expandedComponents
+          .getPcollectionsMap()
+          .forEach(
+              (pcolId, pCol) -> {
+                try {
+                  Coder coder = rehydratedComponents.getCoder(pCol.getCoderId());
+                  externalCoderIdMapBuilder.putIfAbsent(coder, pCol.getCoderId());
+                } catch (IOException e) {
+                  throw new RuntimeException("cannot rehydrate Coder.");

Review comment:
       Won't it often be the case that we can't rehydrate the coder, because it's specific to another SDK?




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