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

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

                Author: ASF GitHub Bot
            Created on: 03/Aug/18 19:12
            Start Date: 03/Aug/18 19:12
    Worklog Time Spent: 10m 
      Work Description: akedin commented on a change in pull request #6127: 
[BEAM-4761] Run Nexmark in thread pool
URL: https://github.com/apache/beam/pull/6127#discussion_r207641674
 
 

 ##########
 File path: 
sdks/java/nexmark/src/main/java/org/apache/beam/sdk/nexmark/Main.java
 ##########
 @@ -74,30 +80,92 @@
  * <p>See <a href="http://datalab.cs.pdx.edu/niagaraST/NEXMark/";>
  * http://datalab.cs.pdx.edu/niagaraST/NEXMark/</a>
  */
-public class Main<OptionT extends NexmarkOptions> {
+public class Main {
+
+  private static class Run implements Runnable {
+    final NexmarkLauncher<NexmarkOptions> nexmarkLauncher;
+    final NexmarkConfiguration configuration;
+    final BlockingQueue results;
+    NexmarkPerf perf = null;
+    Exception exception = null;
+
+    private Run(String[] args, NexmarkConfiguration configuration, 
BlockingQueue results) {
+      NexmarkOptions options = 
PipelineOptionsFactory.fromArgs(args).as(NexmarkOptions.class);
+      this.nexmarkLauncher = new NexmarkLauncher<>(options);
+      this.configuration = configuration;
+      this.results = results;
 
 Review comment:
   Can you avoid using global blocking state by using 
`ExecutorService.submit(Callable)` override? 
https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ExecutorService.html#submit(java.util.concurrent.Callable)
   
   With `Callable` you are allowed to return the value which you then extract 
from the `Future`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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: 131021)
    Time Spent: 6.5h  (was: 6h 20m)

> Add postCommit scripts and perfkit dashboards for nexmark on Dataflow runner
> ----------------------------------------------------------------------------
>
>                 Key: BEAM-4761
>                 URL: https://issues.apache.org/jira/browse/BEAM-4761
>             Project: Beam
>          Issue Type: Test
>          Components: examples-nexmark
>            Reporter: Etienne Chauchot
>            Assignee: Andrew Pilloud
>            Priority: Major
>          Time Spent: 6.5h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to