Package org.apache.spark.api.java

Examples of org.apache.spark.api.java.JavaSparkContext.stop()


    LogisticRegressionModel model = LogisticRegressionWithSGD.train(points.rdd(),
      iterations, stepSize);

    System.out.print("Final w: " + model.weights());

    sc.stop();
  }
}
View Full Code Here


      System.out.println(" " + center);
    }
    double cost = model.computeCost(points.rdd());
    System.out.println("Cost: " + cost);

    sc.stop();
  }
}
View Full Code Here

      System.out.println("Learned regression tree model:\n" + model);
    } else {
      usage();
    }

    sc.stop();
  }
}
View Full Code Here

                        return cassandraRow.toString();
                    }
                });
        System.out.println("Data with only 'id' column fetched: \n" + StringUtils.join("\n", rdd4.toArray()));

        sc.stop();
    }

    public static void main(String[] args) {
        new JavaApiDemo();
    }
View Full Code Here

                        return cassandraRow.toString();
                    }
                });
        System.out.println("Data with only 'id' column fetched: \n" + StringUtils.join("\n", rdd4.collect()));

        sc.stop();
    }

    public static void main(String[] args) {
        new JavaApiDemo();
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.