Skip to content

Commit 1aa2276

Browse files
committed
remove useless code
1 parent 8ddff8b commit 1aa2276

File tree

2 files changed

+0
-21
lines changed

2 files changed

+0
-21
lines changed

core/src/main/java/com/dtstack/flink/sql/Main.java

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -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);

core/src/main/java/com/dtstack/flink/sql/util/FlinkUtil.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,6 @@ public static void setTableEnvTTL(Properties properties, TableEnvironment tableE
296296
ttlMaxtime = getTtlTime(Integer.parseInt(ttlMaxtimeStrMatcher.group(1)), ttlMaxtimeStrMatcher.group(2));
297297
}
298298
if (0L != ttlMintime && 0L != ttlMaxtime) {
299-
// StreamQueryConfig qConfig = tableEnv.queryConfig();
300-
// qConfig.withIdleStateRetentionTime(Time.milliseconds(ttlMintime), Time.milliseconds(ttlMaxtime));
301299
TableConfig qConfig = tableEnv.getConfig();
302300
qConfig.setIdleStateRetentionTime(Time.milliseconds(ttlMintime), Time.milliseconds(ttlMaxtime));
303301
}

0 commit comments

Comments
 (0)