[
https://issues.apache.org/jira/browse/BEAM-8137?focusedWorklogId=608869&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-608869
]
ASF GitHub Bot logged work on BEAM-8137:
----------------------------------------
Author: ASF GitHub Bot
Created on: 09/Jun/21 01:32
Start Date: 09/Jun/21 01:32
Worklog Time Spent: 10m
Work Description: kw2542 edited a comment on pull request #14942:
URL: https://github.com/apache/beam/pull/14942#issuecomment-857302405
> > > Can you fix this? (It may be best to just move the
`main(environmentVarGetter)` method body into the regular `main(args)`, I don't
think we really need two separate methods.)
> > > ```
> > > > Task :runners:portability:java:compileJava
> > >
/home/jenkins/jenkins-slave/workspace/beam_PreCommit_Java_Commit/src/runners/portability/java/src/main/java/org/apache/beam/runners/portability/ExternalWorkerService.java:134:
error: [methodref.return.invalid] Incompatible return type
> > > main(System::getenv);
> > > ^
> > > found : @Initialized @Nullable String
> > > required: @Initialized @NonNull String
> > > Consequence: method
> > > @Initialized @Nullable String getenv(@Initialized @NonNull String
p0) in java.lang.System
> > > is not a valid method reference for
> > > @Initialized @NonNull String apply(@Initialized @NonNull
Function<@Initialized @NonNull String, @Initialized @NonNull String> this,
@Initialized @NonNull String p0) in java.util.function.Function
> > > 1 error
> > > ```
> >
> >
> > Sure. Could you help me point to where did you find this error?
> > The failed "Java ("Run Java PreCommit")" task seems to be failing on
flaky `ElasticsearchIOTest` and I could not find the above error. I am
wondering if I missed anything when looking at test results.
> > In addition, when I run
> > ```
> > $ ./gradlew :runners:portability:java:compileJava
> > ```
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > locally, I could not find the error either
>
> The error is farther up in the Console Output. Since the logs are very
large I usually use the command line to view them since it's more efficient:
`curl
https://ci-beam.apache.org/job/beam_PreCommit_Java_Commit/17953/consoleText |
less`
>
> You aren't seeing the error locally because the null checker isn't
enabled. The null checker disabled by default except on Jenkins because it
takes forever. You can enable it by passing a flag:
> `./gradlew :runners:portability:java:compileJava
-PenableCheckerFramework=true`
Thanks for the pointer! I did not realize this earlier!
Updated the PR to do null checks to fix the checker error since
System.getenv returns nullable object.
I can follow up to fix the `org.apache.beam.fn.harness.FnHarness` too to get
rid one more nullable
--
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]
Issue Time Tracking
-------------------
Worklog Id: (was: 608869)
Time Spent: 5h 20m (was: 5h 10m)
> Worker pool option for Java SDK container
> -----------------------------------------
>
> Key: BEAM-8137
> URL: https://issues.apache.org/jira/browse/BEAM-8137
> Project: Beam
> Issue Type: Improvement
> Components: sdk-java-harness
> Reporter: Thomas Weise
> Priority: P3
> Labels: Clarified
> Time Spent: 5h 20m
> Remaining Estimate: 0h
>
> The worker pool option was added to the Python SDK container in BEAM-7980.
> Support in the Java SDK container is simpler since it can rely on threading
> and it should be added for feature parity.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)