File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/kubernetes/submit Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ private[spark] object ClientArguments {
42
42
var otherPyFiles = Seq .empty[String ]
43
43
var mainClass : Option [String ] = None
44
44
val driverArgs = mutable.Buffer .empty[String ]
45
- args.sliding(2 ).toList.collect {
45
+ args.sliding(2 , 2 ).toList.collect {
46
46
case Array (" --primary-py-file" , mainPyFile : String ) =>
47
47
mainAppResource = Some (PythonMainAppResource (mainPyFile))
48
48
case Array (" --primary-java-resource" , primaryJavaResource : String ) =>
@@ -54,7 +54,8 @@ private[spark] object ClientArguments {
54
54
case Array (" --arg" , arg : String ) =>
55
55
driverArgs += arg
56
56
case other =>
57
- throw new RuntimeException (s " Unknown arguments: $other" )
57
+ val invalid = other.mkString(" " )
58
+ throw new RuntimeException (s " Unknown arguments: $invalid" )
58
59
}
59
60
require(mainAppResource.isDefined,
60
61
" Main app resource must be defined by either --primary-py-file or --primary-java-resource." )
You can’t perform that action at this time.
0 commit comments