You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "felixzh2020 (via GitHub)" <gi...@apache.org> on 2023/04/11 06:33:21 UTC

[GitHub] [flink] felixzh2020 commented on a diff in pull request #22118: [FLINK-31335][sql-gateway] When submit job to yarn, support kerberos

felixzh2020 commented on code in PR #22118:
URL: https://github.com/apache/flink/pull/22118#discussion_r1162357805


##########
flink-table/flink-sql-gateway/src/main/java/org/apache/flink/table/gateway/SqlGateway.java:
##########
@@ -109,18 +113,21 @@ static void startSqlGateway(PrintStream stream, String[] args) {
         SignalHandler.register(LOG);
         JvmShutdownSafeguard.installAsShutdownHook(LOG);
 
+        Configuration dynamicConfiguration =
+                ConfigurationUtils.createConfiguration(cliOptions.getDynamicConfigs());
         DefaultContext defaultContext =
-                DefaultContext.load(
-                        ConfigurationUtils.createConfiguration(cliOptions.getDynamicConfigs()),
-                        Collections.emptyList(),
-                        true,
-                        true);
+                DefaultContext.load(dynamicConfiguration, Collections.emptyList(), true, true);
         SqlGateway gateway =
                 new SqlGateway(
                         defaultContext.getFlinkConfig(), SessionManager.create(defaultContext));
+
+        final Configuration flinkConfiguration = GlobalConfiguration.loadConfiguration();
+        flinkConfiguration.addAll(dynamicConfiguration);
+
         try {
             Runtime.getRuntime().addShutdownHook(new ShutdownThread(gateway));
-            gateway.start();
+            SecurityUtils.install(new SecurityConfiguration(flinkConfiguration));

Review Comment:
   Thanks for your review.  I have made modifications and resubmitted. @JingsongLi 



-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org