1818
1919package com .dtstack .flink .sql .exec ;
2020
21- import ch .qos .logback .classic .Level ;
22- import ch .qos .logback .classic .LoggerContext ;
21+ import org .apache .flink .api .common .typeinfo .TypeInformation ;
22+ import org .apache .flink .api .java .tuple .Tuple2 ;
23+ import org .apache .flink .api .java .typeutils .RowTypeInfo ;
24+ import org .apache .flink .streaming .api .datastream .DataStream ;
25+ import org .apache .flink .streaming .api .environment .StreamExecutionEnvironment ;
26+ import org .apache .flink .table .api .StreamQueryConfig ;
27+ import org .apache .flink .table .api .Table ;
28+ import org .apache .flink .table .api .TableEnvironment ;
29+ import org .apache .flink .table .api .java .StreamTableEnvironment ;
30+ import org .apache .flink .table .sinks .TableSink ;
31+ import org .apache .flink .types .Row ;
32+
2333import com .dtstack .flink .sql .classloader .ClassLoaderManager ;
2434import com .dtstack .flink .sql .config .CalciteConfig ;
2535import com .dtstack .flink .sql .enums .ClusterMode ;
5565import org .apache .calcite .sql .SqlNode ;
5666import org .apache .commons .io .Charsets ;
5767import org .apache .commons .lang3 .StringUtils ;
58- import org .apache .flink .api .common .typeinfo .TypeInformation ;
59- import org .apache .flink .api .java .tuple .Tuple2 ;
60- import org .apache .flink .api .java .typeutils .RowTypeInfo ;
61- import org .apache .flink .streaming .api .datastream .DataStream ;
62- import org .apache .flink .streaming .api .environment .StreamExecutionEnvironment ;
63- import org .apache .flink .table .api .StreamQueryConfig ;
64- import org .apache .flink .table .api .Table ;
65- import org .apache .flink .table .api .TableEnvironment ;
66- import org .apache .flink .table .api .java .StreamTableEnvironment ;
67- import org .apache .flink .table .sinks .TableSink ;
68- import org .apache .flink .types .Row ;
6968import org .slf4j .Logger ;
7069import org .slf4j .LoggerFactory ;
7170
@@ -110,7 +109,6 @@ public static ParamsInfo parseParams(String[] args) throws Exception {
110109 String remoteSqlPluginPath = options .getRemoteSqlPluginPath ();
111110 String pluginLoadMode = options .getPluginLoadMode ();
112111 String deployMode = options .getMode ();
113- String logLevel = options .getLogLevel ();
114112
115113 Preconditions .checkArgument (checkRemoteSqlPluginPath (remoteSqlPluginPath , deployMode , pluginLoadMode ),
116114 "Non-local mode or shipfile deployment mode, remoteSqlPluginPath is required" );
@@ -128,7 +126,6 @@ public static ParamsInfo parseParams(String[] args) throws Exception {
128126 .setDeployMode (deployMode )
129127 .setConfProp (confProperties )
130128 .setJarUrlList (jarURList )
131- .setLogLevel (logLevel )
132129 .build ();
133130
134131 }
@@ -154,8 +151,6 @@ public static StreamExecutionEnvironment getStreamExecution(ParamsInfo paramsInf
154151 StreamTableEnvironment tableEnv = StreamTableEnvironment .create (env );
155152 StreamQueryConfig streamQueryConfig = StreamEnvConfigManager .getStreamQueryConfig (tableEnv , paramsInfo .getConfProp ());
156153
157- setLogLevel (paramsInfo .getLogLevel ());
158-
159154 SqlParser .setLocalSqlPluginRoot (paramsInfo .getLocalSqlPluginPath ());
160155 SqlTree sqlTree = SqlParser .parseSql (paramsInfo .getSql ());
161156
@@ -348,11 +343,5 @@ public static StreamExecutionEnvironment getStreamExeEnv(Properties confProperti
348343 return env ;
349344 }
350345
351- private static void setLogLevel (String level ){
352- LoggerContext loggerContext = (LoggerContext ) LoggerFactory .getILoggerFactory ();
353- //设置全局日志级别
354- ch .qos .logback .classic .Logger logger = loggerContext .getLogger ("root" );
355- logger .setLevel (Level .toLevel (level , Level .INFO ));
356- }
357346
358347}
0 commit comments