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


##########
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:
   Don't new flink conf, just use `defaultContext.getFlinkConfig()`.



##########
flink-table/flink-sql-gateway/src/main/java/org/apache/flink/table/gateway/SqlGateway.java:
##########
@@ -60,7 +63,7 @@ public SqlGateway(Configuration defaultConfig, SessionManager 
sessionManager) {
         this.latch = new CountDownLatch(1);
     }
 
-    public void start() throws Exception {
+    public int start() throws Exception {

Review Comment:
   don't change this, you can use a `Callable<Void>` and return null.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to