Github user suez1224 commented on a diff in the pull request: https://github.com/apache/flink/pull/5172#discussion_r162204277 --- Diff: flink-yarn/src/main/java/org/apache/flink/yarn/YarnTaskManagerRunner.java --- @@ -142,19 +134,22 @@ public static void runYarnTaskManager(String[] args, final Class<? extends YarnT SecurityUtils.install(sc); - SecurityUtils.getInstalledContext().runSecured(new Callable<Object>() { - @Override - public Integer call() { - try { - TaskManager.selectNetworkInterfaceAndRunTaskManager(configuration, resourceId, taskManager); - } - catch (Throwable t) { - LOG.error("Error while starting the TaskManager", t); - System.exit(TaskManager.STARTUP_FAILURE_RETURN_CODE()); + if (mainRunner == null) { --- End diff -- Refactored. Since the method is only used in this class and it need access to variable in its outer scope, I just put it in the same method.
---