Skip to content

Commit

Permalink
[BEAM-7412] shut down executor service in fn harness
Browse files Browse the repository at this point in the history
  • Loading branch information
ibzib committed May 30, 2019
1 parent e8666a4 commit 43660a0
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -19,6 +19,7 @@

import java.util.EnumMap;
import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.function.Function;
import org.apache.beam.fn.harness.control.AddHarnessIdInterceptor;
import org.apache.beam.fn.harness.control.BeamFnControlClient;
Expand Down Expand Up @@ -203,7 +204,9 @@ public static void main(
JvmInitializers.runBeforeProcessing(options);

LOG.info("Entering instruction processing loop");
control.processInstructionRequests(options.as(GcsOptions.class).getExecutorService());
ExecutorService executorService = options.as(GcsOptions.class).getExecutorService();
control.processInstructionRequests(executorService);
executorService.shutdown();
} finally {
System.out.println("Shutting SDK harness down.");
}
Expand Down

0 comments on commit 43660a0

Please sign in to comment.