소스 검색

HUE-9280 [flink] Extract server url from the connector options

Romain 5 년 전
부모
커밋
5086985bcf
2개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      desktop/core/src/desktop/lib/connectors/types.py
  2. 3 1
      desktop/libs/notebook/src/notebook/connectors/flink_sql.py

+ 1 - 1
desktop/core/src/desktop/lib/connectors/types.py

@@ -142,7 +142,7 @@ CONNECTOR_TYPES = [
     'dialect': 'flink',
     'interface': 'flink',
     'settings': [
-      {'name': 'api_url', 'value': 'http://127.0.0.1:8083'},
+      {'name': 'url', 'value': 'http://127.0.0.1:8083'},
       {'name': 'has_ssh', 'value': False},
       {'name': 'ssh_server_host', 'value': '127.0.0.1'},
     ],

+ 3 - 1
desktop/libs/notebook/src/notebook/connectors/flink_sql.py

@@ -64,7 +64,9 @@ class FlinkSqlApi(Api):
     Api.__init__(self, user, interpreter=interpreter)
 
     self.options = interpreter['options']
-    self.db = FlinkSqlClient(user=user, api_url=self.options['api_url'])
+    api_url = self.options['url']
+
+    self.db = FlinkSqlClient(user=user, api_url=api_url)
 
 
   @query_error_handler