Github user andrewor14 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/552#discussion_r12304704
  
    --- Diff: 
examples/src/main/java/org/apache/spark/mllib/examples/JavaKMeans.java ---
    @@ -49,23 +50,16 @@ public Vector call(String line) {
     
       public static void main(String[] args) {
     
    -    if (args.length < 4) {
    -      System.err.println(
    -          "Usage: JavaKMeans <master> <input_file> <k> <max_iterations> 
[<runs>]");
    -      System.exit(1);
    -    }
    -
    -    String inputFile = args[1];
    -    int k = Integer.parseInt(args[2]);
    -    int iterations = Integer.parseInt(args[3]);
    +    String inputFile = args[0];
    --- End diff --
    
    Same here, need args.length check


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to