kennknowles commented on a change in pull request #14814:
URL: https://github.com/apache/beam/pull/14814#discussion_r637259221



##########
File path: 
runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/DataflowRunner.java
##########
@@ -2195,25 +2195,36 @@ static String 
getDefaultContainerImageUrl(DataflowPipelineOptions options) {
         "%s/%s:%s",
         dataflowRunnerInfo.getContainerImageBaseRepository(),
         getDefaultContainerImageNameForJob(options),
-        dataflowRunnerInfo.getContainerVersion());
+        getDefaultContainerVersion(options));
   }
 
   /**
-   * Construct the default Dataflow container image name based on pipeline 
type and Environment Java
-   * version.
+   * Construct the default Dataflow container image name based on pipeline 
type and Java version.
    */
   static String getDefaultContainerImageNameForJob(DataflowPipelineOptions 
options) {
     Environments.JavaVersion javaVersion = Environments.getJavaVersion();
-    String legacyJavaVersionId =
-        (javaVersion == Environments.JavaVersion.v8) ? "java" : 
javaVersion.toString();
-
     if (useUnifiedWorker(options)) {
-      return "java";
+      return String.format("beam_%s_sdk", javaVersion.name());

Review comment:
       This works for me. But what I really want is to eliminate this `if` 
statement. I would like for the runner v2 and runner v1 codepaths to not share 
`getDefaultContainerImageNameForJob`, since it is essentially not type correct. 
(the two containers implement different types)




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