[ 
https://issues.apache.org/jira/browse/BEAM-13468?focusedWorklogId=756151&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-756151
 ]

ASF GitHub Bot logged work on BEAM-13468:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 13/Apr/22 03:46
            Start Date: 13/Apr/22 03:46
    Worklog Time Spent: 10m 
      Work Description: emilymye commented on code in PR #17274:
URL: https://github.com/apache/beam/pull/17274#discussion_r849046219


##########
runners/core-construction-java/src/main/java/org/apache/beam/runners/core/construction/Environments.java:
##########
@@ -117,8 +121,12 @@ public static JavaVersion forSpecification(String 
specification) {
           return ver;
         }
       }
-      throw new UnsupportedOperationException(
-          String.format("unsupported Java version: %s", specification));
+      JavaVersion fallback = java11;

Review Comment:
   Could we have two methods here, where one is "fromSpecificationOrDefault" or 
similar? There are some cases where we probably want to have a strict check 
(i.e. expecting translatation from one of the existing enums, looking for a 
specific supported Docker container version where defaulting can lead to 
confusing behavior)



##########
runners/core-construction-java/src/main/java/org/apache/beam/runners/core/construction/Environments.java:
##########
@@ -117,8 +121,12 @@ public static JavaVersion forSpecification(String 
specification) {
           return ver;
         }
       }
-      throw new UnsupportedOperationException(
-          String.format("unsupported Java version: %s", specification));
+      JavaVersion fallback = java11;

Review Comment:
   Could we have two methods here, where one is "forSpecificationOrDefault" or 
similar? There are some cases where we probably want to have a strict check 
(i.e. expecting translatation from one of the existing enums, looking for a 
specific supported Docker container version where defaulting can lead to 
confusing behavior)





Issue Time Tracking
-------------------

    Worklog Id:     (was: 756151)
    Time Spent: 1h 40m  (was: 1.5h)

> Dataflow runner - be more lenient with agent java version
> ---------------------------------------------------------
>
>                 Key: BEAM-13468
>                 URL: https://issues.apache.org/jira/browse/BEAM-13468
>             Project: Beam
>          Issue Type: New Feature
>          Components: runner-dataflow
>            Reporter: Clément Guillaume
>            Assignee: Clément Guillaume
>            Priority: P2
>         Attachments: BEAM-13468-version-as-option.patch, Screenshot from 
> 2022-01-21 16-10-20.png
>
>          Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> DataflowRunner currently uses {{Environments.getJavaVersion}} to detect java 
> version and build the Dataflow user agent string.
> {{Environments.getJavaVersion}} only accept a small subset of java version 
> (8, 11 and 17)
> It would be nice the user agent string to accept more exotic java versions to 
> allow running the agent on more exotic jvm (still keeping the beam model 
> itself in java 11).



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to