apache / apache/beam

Java creates an incorrect pipeline proto when core-construction-java jar is not in the CLASSPATH

Open
#21,111 6 comments 0 reactions 0 assignees View on GitHub
core improvement java P2
Dominant language
Java
Stars
8.7k
Forks
4.7k
Avg merge
1d 20h
Merged PRs (30d)
196

Description

Seems like Java ends up creating incorrect pipeline API proto segments when "core-construction-java" is not available in the system.

 

For example, this may create  a GBK transform without the URN. 

 

This can be reproduced by running the wordcount example in [1] after  removing the following dependency from the pom.xml file.

   
      org.apache.beam
      beam-runners-core-construction-java
      ${beam.version}
   
 
Seems like this is because Java is unable to register corresponding XYZTranslation classes (for example [2]). 
 

I think we should fail here instead of generating default incorrect proto segments.

 

[1] [https://github.com/chamikaramj/multi-language-pipelines](https://github.com/chamikaramj/multi-language-pipelines)

[2] [https://github.com/apache/beam/blob/master/runners/core-construction-java/src/main/java/org/apache/beam/runners/core/construction/GroupByKeyTranslation.java](https://github.com/apache/beam/blob/master/runners/core-construction-java/src/main/java/org/apache/beam/runners/core/construction/GroupByKeyTranslation.java)

 

Imported from Jira [BEAM-12807](https://issues.apache.org/jira/browse/BEAM-12807). Original Jira may contain additional context.
Reported by: chamikara.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.