@@ -200,23 +200,6 @@ private static void sqlTranslation(String localSqlPluginPath, StreamTableEnviron
200200
201201
202202 }
203- /**
204- * This part is just to add classpath for the jar when reading remote execution, and will not submit jar from a local
205- * @param env
206- * @param classPathSet
207- * @throws NoSuchFieldException
208- * @throws IllegalAccessException
209- */
210- private static void addEnvClassPath (StreamExecutionEnvironment env , Set <URL > classPathSet ) throws NoSuchFieldException , IllegalAccessException {
211- if (env instanceof StreamContextEnvironment ){
212- Field field = env .getClass ().getDeclaredField ("ctx" );
213- field .setAccessible (true );
214- ContextEnvironment contextEnvironment = (ContextEnvironment ) field .get (env );
215- for (URL url : classPathSet ){
216- contextEnvironment .getClasspaths ().add (url );
217- }
218- }
219- }
220203
221204 private static void registerUDF (SqlTree sqlTree , List <URL > jarURList , TableEnvironment tableEnv )
222205 throws NoSuchMethodException , IllegalAccessException , InvocationTargetException {
@@ -288,8 +271,6 @@ private static void registerTable(SqlTree sqlTree, StreamExecutionEnvironment en
288271 }
289272 }
290273
291- //The plug-in information corresponding to the table is loaded into the classPath env
292- addEnvClassPath (env , classPathSet );
293274 int i = 0 ;
294275 for (URL url : classPathSet ){
295276 String classFileName = String .format (CLASS_FILE_NAME_FMT , i );
0 commit comments