wangyang0918 commented on a change in pull request #9985: 
[FLINK-10968][kubernetes] Implement TaskManager Entrypoint for Kubernetes.
URL: https://github.com/apache/flink/pull/9985#discussion_r352600461
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/TaskManagerRunner.java
 ##########
 @@ -286,29 +285,10 @@ public static void main(String[] args) throws Exception {
                        LOG.info("Cannot determine the maximum number of open 
file descriptors");
                }
 
-               final Configuration configuration = loadConfiguration(args);
-
-               FileSystem.initialize(configuration, 
PluginUtils.createPluginManagerFromRootFolder(configuration));
-
-               SecurityUtils.install(new SecurityConfiguration(configuration));
-
-               try {
-                       SecurityUtils.getInstalledContext().runSecured(new 
Callable<Void>() {
-                               @Override
-                               public Void call() throws Exception {
-                                       runTaskManager(configuration, 
ResourceID.generate());
-                                       return null;
-                               }
-                       });
-               } catch (Throwable t) {
-                       final Throwable strippedThrowable = 
ExceptionUtils.stripException(t, UndeclaredThrowableException.class);
-                       LOG.error("TaskManager initialization failed.", 
strippedThrowable);
-                       System.exit(STARTUP_FAILURE_RETURN_CODE);
-               }
+               runTaskManagerSecurely(args, ResourceID.generate());
        }
 
-       @VisibleForTesting
-       static Configuration loadConfiguration(String[] args) throws 
FlinkParseException {
+       public static Configuration loadConfiguration(String[] args) throws 
FlinkParseException {
 
 Review comment:
   Make sense. I will squash the two commit to one.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to