Skip to content
Snippets Groups Projects
Commit b05c9d22 authored by Mridul Muralidharan's avatar Mridul Muralidharan
Browse files

Remove explicit hardcoding of yarn-standalone as args(0) if it is missing.

parent 25198d7e
No related branches found
No related tags found
No related merge requests found
......@@ -148,22 +148,9 @@ class ApplicationMaster(args: ApplicationMasterArguments, conf: Configuration) e
.getMethod("main", classOf[Array[String]])
val t = new Thread {
override def run() {
var mainArgs: Array[String] = null
var startIndex = 0
// I am sure there is a better 'scala' way to do this .... but I am just trying to get things to work right now !
if (args.userArgs.isEmpty || args.userArgs.get(0) != "yarn-standalone") {
// ensure that first param is ALWAYS "yarn-standalone"
mainArgs = new Array[String](args.userArgs.size() + 1)
mainArgs.update(0, "yarn-standalone")
startIndex = 1
}
else {
mainArgs = new Array[String](args.userArgs.size())
}
args.userArgs.copyToArray(mainArgs, startIndex, args.userArgs.size())
// Copy
var mainArgs: Array[String] = new Array[String](args.userArgs.size())
args.userArgs.copyToArray(mainArgs, 0, args.userArgs.size())
mainMethod.invoke(null, mainArgs)
}
}
......
......@@ -69,7 +69,6 @@ class ApplicationMasterArguments(val args: Array[String]) {
" --class CLASS_NAME Name of your application's main class (required)\n" +
" --args ARGS Arguments to be passed to your application's main class.\n" +
" Mutliple invocations are possible, each will be passed in order.\n" +
" Note that first argument will ALWAYS be yarn-standalone : will be added if missing.\n" +
" --num-workers NUM Number of workers to start (Default: 2)\n" +
" --worker-cores NUM Number of cores for the workers (Default: 1)\n" +
" --worker-memory MEM Memory per Worker (e.g. 1000M, 2G) (Default: 1G)\n")
......
......@@ -92,7 +92,6 @@ class ClientArguments(val args: Array[String]) {
" --class CLASS_NAME Name of your application's main class (required)\n" +
" --args ARGS Arguments to be passed to your application's main class.\n" +
" Mutliple invocations are possible, each will be passed in order.\n" +
" Note that first argument will ALWAYS be yarn-standalone : will be added if missing.\n" +
" --num-workers NUM Number of workers to start (Default: 2)\n" +
" --worker-cores NUM Number of cores for the workers (Default: 1). This is unsused right now.\n" +
" --master-memory MEM Memory for Master (e.g. 1000M, 2G) (Default: 512 Mb)\n" +
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment