This is an automated email from the ASF dual-hosted git repository.
yao pushed a commit to branch branch-1.5
in repository https://gitbox.apache.org/repos/asf/incubator-kyuubi.git
The following commit(s) were added to refs/heads/branch-1.5 by this push:
new 46638d7 [KYUUBI #2070][FLINK] Support Flink job submission on
yarn-session mode
46638d7 is described below
commit 46638d70d1e969d6a3c95a400ba34bde380e1cc2
Author: Ada Wong <[email protected]>
AuthorDate: Fri Mar 11 13:23:08 2022 +0800
[KYUUBI #2070][FLINK] Support Flink job submission on yarn-session mode
### _Why are the changes needed?_
Support submitting a job to Yarn. The 'flink-sql-client.jar' has supported
submitting a job to Yarn. We only make a few changes.
### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including
negative and positive cases if possible
- [ ] Add screenshots for manual tests if appropriate
- [x] [Run
test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests)
locally before make a pull request
Closes #2074 from deadwind4/KYUUBI-2070.
Closes #2070
b9223f4a [Ada Wong] remove ${HADOOP_CLASSPATH} for supporting only
yarn-session
59d692fc [Ada Wong] update HADDOP_CLASSPATH
c0496e91 [Ada Wong] [KYUUBI #2070][FLINK] Support Flink job submission on
yarn-session mode
Authored-by: Ada Wong <[email protected]>
Signed-off-by: Kent Yao <[email protected]>
(cherry picked from commit 7d66e9aa50ed012c545df8f99c8991705e6635b7)
Signed-off-by: Kent Yao <[email protected]>
---
externals/kyuubi-flink-sql-engine/bin/flink-sql-engine.sh | 2 +-
.../main/scala/org/apache/kyuubi/engine/flink/FlinkSQLEngine.scala | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/externals/kyuubi-flink-sql-engine/bin/flink-sql-engine.sh
b/externals/kyuubi-flink-sql-engine/bin/flink-sql-engine.sh
index 8330a5b..db63422 100755
--- a/externals/kyuubi-flink-sql-engine/bin/flink-sql-engine.sh
+++ b/externals/kyuubi-flink-sql-engine/bin/flink-sql-engine.sh
@@ -46,7 +46,7 @@ else
FLINK_SQL_ENGINE_LIB_DIR="$FLINK_SQL_ENGINE_HOME/target"
FLINK_SQL_ENGINE_JAR=$(find "$FLINK_SQL_ENGINE_LIB_DIR" -regex
'.*/kyuubi-flink-sql-engine_.*\.jar$' | grep -v '\-javadoc.jar$' | grep -v
'\-tests.jar$')
_FLINK_SQL_ENGINE_HADOOP_CLIENT_JARS=$(find $FLINK_SQL_ENGINE_LIB_DIR -regex
'.*/hadoop-client-.*\.jar$' | tr '\n' ':')
- FLINK_HADOOP_CLASSPATH="${_FLINK_SQL_ENGINE_HADOOP_CLIENT_JARS%:}"
+
FLINK_HADOOP_CLASSPATH="${_FLINK_SQL_ENGINE_HADOOP_CLIENT_JARS%:}:${HADOOP_CONF_DIR}:${YARN_CONF_DIR}"
log_file="unused.log"
log4j2_conf_file="file:$FLINK_CONF_DIR/log4j-session.properties" # which
send all logs to console
logback_conf_file="unused.xml"
diff --git
a/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/FlinkSQLEngine.scala
b/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/FlinkSQLEngine.scala
index a242df9..127faad 100644
---
a/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/FlinkSQLEngine.scala
+++
b/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/FlinkSQLEngine.scala
@@ -25,7 +25,7 @@ import java.util.concurrent.CountDownLatch
import scala.collection.JavaConverters._
import scala.collection.mutable.ListBuffer
-import org.apache.flink.client.cli.{CliFrontend, CustomCommandLine, DefaultCLI}
+import org.apache.flink.client.cli.{CliFrontend, CustomCommandLine,
DefaultCLI, GenericCLI}
import org.apache.flink.configuration.DeploymentOptions
import org.apache.flink.configuration.GlobalConfiguration
import org.apache.flink.table.client.SqlClientException
@@ -103,7 +103,7 @@ object FlinkSQLEngine extends Logging {
val engineContext = new DefaultContext(
dependencies.asJava,
flinkConf,
- List[CustomCommandLine](new DefaultCLI).asJava)
+ List[CustomCommandLine](new GenericCLI(flinkConf, flinkConfDir), new
DefaultCLI).asJava)
kyuubiConf.setIfMissing(KyuubiConf.FRONTEND_THRIFT_BINARY_BIND_PORT, 0)