-
Notifications
You must be signed in to change notification settings - Fork 930
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[KYUUBI #6253] Support running JDBC engine on YARN AM
# 🔍 Description ## Issue References 🔗 This pull request fixes #6253 ## Describe Your Solution 🔧 Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. ## Types of changes 🔖 - [ ] Bugfix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) ## Test Plan 🧪 #### Behavior Without This Pull Request ⚰️ #### Behavior With This Pull Request 🎉 <img width="1251" alt="image" src="https://github.com/apache/kyuubi/assets/18713676/b654a300-8c79-4461-9fba-4ad1c913accc"> #### Related Unit Tests --- # Checklist 📝 - [ ] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html) **Be nice. Be informative.** Closes #6275 from lsm1/branch-jdbc-engine-on-yarn. Closes #6253 5ed4af0 [senmiaoliu] fix style 86e0326 [senmiaoliu] fix style b3e1144 [senmiaoliu] fix style bf33de3 [senmiaoliu] fix style c384049 [senmiaoliu] jdbc engine on yarn Authored-by: senmiaoliu <[email protected]> Signed-off-by: Shaoyun Chen <[email protected]>
- Loading branch information
Showing
24 changed files
with
558 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 0 additions & 40 deletions
40
...gine/src/test/scala/org/apache/kyuubi/engine/hive/deploy/HiveYarnModeSubmitterSuite.scala
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
...bc-engine/src/main/scala/org/apache/kyuubi/engine/jdbc/deploy/JdbcYarnModeSubmitter.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.apache.kyuubi.engine.jdbc.deploy | ||
|
||
import java.io.File | ||
|
||
import scala.collection.mutable.ListBuffer | ||
|
||
import org.apache.hadoop.security.UserGroupInformation | ||
|
||
import org.apache.kyuubi.Utils | ||
import org.apache.kyuubi.config.KyuubiConf | ||
import org.apache.kyuubi.config.KyuubiConf.ENGINE_JDBC_EXTRA_CLASSPATH | ||
import org.apache.kyuubi.engine.deploy.yarn.EngineYarnModeSubmitter | ||
import org.apache.kyuubi.engine.jdbc.JdbcSQLEngine | ||
|
||
object JdbcYarnModeSubmitter extends EngineYarnModeSubmitter { | ||
|
||
def main(args: Array[String]): Unit = { | ||
Utils.fromCommandLineArgs(args, kyuubiConf) | ||
|
||
if (UserGroupInformation.isSecurityEnabled) { | ||
require( | ||
kyuubiConf.get(KyuubiConf.ENGINE_PRINCIPAL).isDefined | ||
&& kyuubiConf.get(KyuubiConf.ENGINE_KEYTAB).isDefined, | ||
s"${KyuubiConf.ENGINE_PRINCIPAL.key} and " + | ||
s"${KyuubiConf.ENGINE_KEYTAB.key} must be set when submit " + | ||
s"${JdbcSQLEngine.getClass.getSimpleName.stripSuffix("$")} to YARN") | ||
} | ||
run() | ||
} | ||
|
||
override var engineType: String = "jdbc" | ||
|
||
override def engineMainClass(): String = JdbcSQLEngine.getClass.getName | ||
|
||
/** | ||
* Jar list for the JDBC engine. | ||
*/ | ||
override def engineExtraJars(): Seq[File] = { | ||
val extraCp = kyuubiConf.get(ENGINE_JDBC_EXTRA_CLASSPATH) | ||
val jars = new ListBuffer[File] | ||
extraCp.foreach(cp => parseClasspath(cp, jars)) | ||
jars.toSeq | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.