fix #114 kyuubi should work well with spark local mode
This commit is contained in:
parent
8a30b63c37
commit
65448dda04
@ -89,16 +89,25 @@ object KyuubiSubmit extends Logging {
|
||||
*/
|
||||
private[deploy]
|
||||
def prepareSubmitEnvironment(args: SparkSubmitArguments): (Seq[String], Map[String, String]) = {
|
||||
// Return values
|
||||
// Make sure YARN is included in our build if we're trying to use it
|
||||
def checkYarnSupport: Unit = {
|
||||
if (!Utils.classIsLoadable("org.apache.spark.deploy.yarn.Client")) {
|
||||
printErrorAndExit(
|
||||
"Could not load YARN classes. Spark may not have been compiled with YARN support.")
|
||||
}
|
||||
}
|
||||
|
||||
val childClasspath = new ArrayBuffer[String]()
|
||||
val sysProps = new HashMap[String, String]()
|
||||
|
||||
args.master match {
|
||||
case "yarn" =>
|
||||
case "yarn-client" =>
|
||||
case "yarn" => checkYarnSupport
|
||||
case "yarn-client" | "yarn-cluster" =>
|
||||
checkYarnSupport
|
||||
printWarning(s"Master ${args.master} is deprecated since 2.0." +
|
||||
" Please use master \"yarn\" with specified deploy mode instead.")
|
||||
args.master = "yarn"
|
||||
case m if m.startsWith("local") => args.master = "local"
|
||||
case _ => printErrorAndExit("Kyuubi only supports yarn as master.")
|
||||
}
|
||||
|
||||
@ -110,12 +119,6 @@ object KyuubiSubmit extends Logging {
|
||||
|
||||
}
|
||||
|
||||
// Make sure YARN is included in our build if we're trying to use it
|
||||
if (!Utils.classIsLoadable("org.apache.spark.deploy.yarn.Client")) {
|
||||
printErrorAndExit(
|
||||
"Could not load YARN classes. Spark may not have been compiled with YARN support.")
|
||||
}
|
||||
|
||||
Seq(
|
||||
"spark.master" -> args.master,
|
||||
"spark.submit.deployMode" -> args.deployMode,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user