@@ -139,7 +139,7 @@ public static ParamsInfo parseParams(String[] args) throws Exception {
139139 * @param pluginLoadMode
140140 * @return
141141 */
142- public static boolean checkRemoteSqlPluginPath (String remoteSqlPluginPath , String deployMode , String pluginLoadMode ) {
142+ private static boolean checkRemoteSqlPluginPath (String remoteSqlPluginPath , String deployMode , String pluginLoadMode ) {
143143 if (StringUtils .isEmpty (remoteSqlPluginPath )) {
144144 return StringUtils .equalsIgnoreCase (pluginLoadMode , EPluginLoadMode .SHIPFILE .name ())
145145 || StringUtils .equalsIgnoreCase (deployMode , ClusterMode .local .name ());
@@ -176,7 +176,7 @@ public static StreamExecutionEnvironment getStreamExecution(ParamsInfo paramsInf
176176 }
177177
178178
179- public static List <URL > getExternalJarUrls (String addJarListStr ) throws java .io .IOException {
179+ private static List <URL > getExternalJarUrls (String addJarListStr ) throws java .io .IOException {
180180 List <URL > jarUrlList = Lists .newArrayList ();
181181 if (Strings .isNullOrEmpty (addJarListStr )) {
182182 return jarUrlList ;
@@ -240,7 +240,7 @@ private static void sqlTranslation(String localSqlPluginPath,
240240 }
241241 }
242242
243- public static void registerUserDefinedFunction (SqlTree sqlTree , List <URL > jarUrlList , TableEnvironment tableEnv )
243+ private static void registerUserDefinedFunction (SqlTree sqlTree , List <URL > jarUrlList , TableEnvironment tableEnv )
244244 throws IllegalAccessException , InvocationTargetException {
245245 // udf和tableEnv须由同一个类加载器加载
246246 ClassLoader levelClassLoader = tableEnv .getClass ().getClassLoader ();
@@ -269,9 +269,9 @@ public static void registerUserDefinedFunction(SqlTree sqlTree, List<URL> jarUrl
269269 * @return
270270 * @throws Exception
271271 */
272- public static Set <URL > registerTable (SqlTree sqlTree , StreamExecutionEnvironment env , StreamTableEnvironment tableEnv , String localSqlPluginPath ,
272+ private static Set <URL > registerTable (SqlTree sqlTree , StreamExecutionEnvironment env , StreamTableEnvironment tableEnv , String localSqlPluginPath ,
273273 String remoteSqlPluginPath , String pluginLoadMode , Map <String , SideTableInfo > sideTableMap , Map <String , Table > registerTableCache ) throws Exception {
274- Set <URL > pluginClassPatshSets = Sets .newHashSet ();
274+ Set <URL > pluginClassPathSets = Sets .newHashSet ();
275275 WaterMarkerAssigner waterMarkerAssigner = new WaterMarkerAssigner ();
276276 for (TableInfo tableInfo : sqlTree .getTableInfoMap ().values ()) {
277277
@@ -325,26 +325,26 @@ public static Set<URL> registerTable(SqlTree sqlTree, StreamExecutionEnvironment
325325 registerTableCache .put (tableInfo .getName (), regTable );
326326
327327 URL sourceTablePathUrl = PluginUtil .buildSourceAndSinkPathByLoadMode (tableInfo .getType (), SourceTableInfo .SOURCE_SUFFIX , localSqlPluginPath , remoteSqlPluginPath , pluginLoadMode );
328- pluginClassPatshSets .add (sourceTablePathUrl );
328+ pluginClassPathSets .add (sourceTablePathUrl );
329329 } else if (tableInfo instanceof TargetTableInfo ) {
330330
331331 TableSink tableSink = StreamSinkFactory .getTableSink ((TargetTableInfo ) tableInfo , localSqlPluginPath );
332332 TypeInformation [] flinkTypes = FunctionManager .transformTypes (tableInfo .getFieldClasses ());
333333 tableEnv .registerTableSink (tableInfo .getName (), tableInfo .getFields (), flinkTypes , tableSink );
334334
335335 URL sinkTablePathUrl = PluginUtil .buildSourceAndSinkPathByLoadMode (tableInfo .getType (), TargetTableInfo .TARGET_SUFFIX , localSqlPluginPath , remoteSqlPluginPath , pluginLoadMode );
336- pluginClassPatshSets .add (sinkTablePathUrl );
336+ pluginClassPathSets .add (sinkTablePathUrl );
337337 } else if (tableInfo instanceof SideTableInfo ) {
338338 String sideOperator = ECacheType .ALL .name ().equals (((SideTableInfo ) tableInfo ).getCacheType ()) ? "all" : "async" ;
339339 sideTableMap .put (tableInfo .getName (), (SideTableInfo ) tableInfo );
340340
341341 URL sideTablePathUrl = PluginUtil .buildSidePathByLoadMode (tableInfo .getType (), sideOperator , SideTableInfo .TARGET_SUFFIX , localSqlPluginPath , remoteSqlPluginPath , pluginLoadMode );
342- pluginClassPatshSets .add (sideTablePathUrl );
342+ pluginClassPathSets .add (sideTablePathUrl );
343343 } else {
344344 throw new RuntimeException ("not support table type:" + tableInfo .getType ());
345345 }
346346 }
347- return pluginClassPatshSets ;
347+ return pluginClassPathSets ;
348348 }
349349
350350 /**
@@ -353,7 +353,7 @@ public static Set<URL> registerTable(SqlTree sqlTree, StreamExecutionEnvironment
353353 * @param env
354354 * @param classPathSet
355355 */
356- public static void registerPluginUrlToCachedFile (StreamExecutionEnvironment env , Set <URL > classPathSet ) {
356+ private static void registerPluginUrlToCachedFile (StreamExecutionEnvironment env , Set <URL > classPathSet ) {
357357 int i = 0 ;
358358 for (URL url : classPathSet ) {
359359 String classFileName = String .format (CLASS_FILE_NAME_FMT , i );
@@ -362,7 +362,7 @@ public static void registerPluginUrlToCachedFile(StreamExecutionEnvironment env,
362362 }
363363 }
364364
365- public static StreamExecutionEnvironment getStreamExeEnv (Properties confProperties , String deployMode ) throws Exception {
365+ private static StreamExecutionEnvironment getStreamExeEnv (Properties confProperties , String deployMode ) throws Exception {
366366 StreamExecutionEnvironment env = !ClusterMode .local .name ().equals (deployMode ) ?
367367 StreamExecutionEnvironment .getExecutionEnvironment () :
368368 new MyLocalStreamEnvironment ();
0 commit comments