Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[KYUUBI #6253] Support running JDBC engine on YARN AM #6275

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ object JdbcSQLEngine extends Logging {

def main(args: Array[String]): Unit = {
SignalRegister.registerLogger(logger)

try {
Utils.fromCommandLineArgs(args, kyuubiConf)
kyuubiConf.setIfMissing(KyuubiConf.FRONTEND_THRIFT_BINARY_BIND_PORT, 0)
Expand All @@ -88,17 +89,7 @@ object JdbcSQLEngine extends Logging {
UserGroupInformation.loginUserFromKeytab(principal.get, keytab.get)
UserGroupInformation.getCurrentUser
case DeployMode.LOCAL if proxyUser.get != realUser.getShortUserName =>
val newUGI = UserGroupInformation.createProxyUser(proxyUser.get, realUser)
newUGI.doAs(new PrivilegedExceptionAction[Unit] {
override def run(): Unit = {
val engineCredentials =
kyuubiConf.getOption(KyuubiReservedKeys.KYUUBI_ENGINE_CREDENTIALS_KEY)
kyuubiConf.unset(KyuubiReservedKeys.KYUUBI_ENGINE_CREDENTIALS_KEY)
engineCredentials.filter(_.nonEmpty).foreach { credentials =>
}
}
})
newUGI
UserGroupInformation.createProxyUser(proxyUser.get, realUser)
case _ =>
UserGroupInformation.getCurrentUser
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ abstract class EngineYarnModeSubmitter extends Logging {

def listConfFiles(): Seq[File] = {
// respect the following priority loading configuration, and distinct files
// hadoop configuration -> yarn configuration
// hive configuration -> hadoop configuration -> yarn configuration
val hadoopConf = kyuubiConf.getOption(KYUUBI_ENGINE_DEPLOY_YARN_MODE_HADOOP_CONF_KEY)
val yarnConf = kyuubiConf.getOption(KYUUBI_ENGINE_DEPLOY_YARN_MODE_YARN_CONF_KEY)
listDistinctFiles(hadoopConf.get) ++ listDistinctFiles(yarnConf.get)
Expand Down
Loading