use of org.apache.zeppelin.flink.sql.SqlCommandParser in project zeppelin by apache.
the class FlinkSqlInterpreter method open.
@Override
public void open() throws InterpreterException {
this.sqlCommandParser = new SqlCommandParser(flinkInterpreter.getFlinkShims(), tbenv);
this.sqlSplitter = new SqlSplitter();
JobListener jobListener = new JobListener() {
@Override
public void onJobSubmitted(@Nullable JobClient jobClient, @Nullable Throwable throwable) {
if (lock.isHeldByCurrentThread()) {
lock.unlock();
LOGGER.info("UnLock JobSubmitLock");
}
}
@Override
public void onJobExecuted(@Nullable JobExecutionResult jobExecutionResult, @Nullable Throwable throwable) {
}
};
flinkInterpreter.getExecutionEnvironment().getJavaEnv().registerJobListener(jobListener);
flinkInterpreter.getStreamExecutionEnvironment().getJavaEnv().registerJobListener(jobListener);
this.defaultSqlParallelism = flinkInterpreter.getDefaultSqlParallelism();
this.tableConfigOptions = flinkInterpreter.getFlinkShims().extractTableConfigOptions();
}
Aggregations