You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GJL <gi...@git.apache.org> on 2018/01/02 14:28:31 UTC
[GitHub] flink pull request #5215: [FLINK-8328] [flip6] Move Yarn ApplicationStatus p...
Github user GJL commented on a diff in the pull request:
https://github.com/apache/flink/pull/5215#discussion_r159227421
--- Diff: flink-yarn/src/main/java/org/apache/flink/yarn/cli/FlinkYarnSessionCli.java ---
@@ -660,7 +570,25 @@ public int run(
"yarn application -kill " + applicationId.getOpt());
yarnCluster.disconnect();
} else {
- runInteractiveCli(yarnCluster, true);
+ ScheduledThreadPoolExecutor scheduledExecutorService = new ScheduledThreadPoolExecutor(1);
+
+ try (YarnApplicationStatusMonitor yarnApplicationStatusMonitor = new YarnApplicationStatusMonitor(
+ yarnDescriptor.getYarnClient(),
+ yarnCluster.getApplicationId(),
+ new ScheduledExecutorServiceAdapter(scheduledExecutorService))) {
--- End diff --
Why do we need to use the `ScheduledExecutor` interface from Flink? Why not use Java's `ScheduledExecutorService` directly?
---