I am totally new to spark and I want to create a JavaRDD from labeled points programmatically without reading input from file. Say I create few Labeledpoints as following,
LabeledPoint pos = new LabeledPoint(1.0, Vectors.dense(1.0, 0.0, 3.0));
LabeledPoint pos = new LabeledPoint(1.0, Vectors.dense(1.0, 5.0, 3.0));
LabeledPoint pos = new LabeledPoint(1.0, Vectors.dense(1.0, 0.0, 3.0));
LabeledPoint pos = new LabeledPoint(1.0, Vectors.dense(1.0, 7.0, 3.0));
Then I want to create a JavaRDD using these vectors. How can I do that.