Github user andrewor14 commented on a diff in the pull request:
https://github.com/apache/spark/pull/552#discussion_r12354631
--- Diff: examples/src/main/scala/org/apache/spark/examples/SparkALS.scala
---
@@ -88,32 +88,24 @@ object SparkALS {
}
def main(args: Array[String]) {
- if (args.length == 0) {
- System.err.println("Usage: SparkALS <master> [<M> <U> <F> <iters>
<slices>]")
- System.exit(1)
- }
-
- var host = ""
var slices = 0
- val options = (0 to 5).map(i => if (i < args.length) Some(args(i))
else None)
+ val options = (0 to 4).map(i => if (i < args.length) Some(args(i))
else None)
options.toArray match {
- case Array(host_, m, u, f, iters, slices_) =>
- host = host_.get
+ case Array(m, u, f, iters, slices_) =>
M = m.getOrElse("100").toInt
U = u.getOrElse("500").toInt
F = f.getOrElse("10").toInt
ITERATIONS = iters.getOrElse("5").toInt
slices = slices_.getOrElse("2").toInt
case _ =>
- System.err.println("Usage: SparkALS <master> [<M> <U> <F> <iters>
<slices>]")
+ System.err.println("Usage: Please specify [<M> <U> <F> <iters>
<slices>]")
--- End diff --
I would just do `Usage: SparkALS [M] [U] [F] ...`
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---