Skip to content

Commit c28fdb8

Browse files
committed
revert some code
1 parent 2f879e2 commit c28fdb8

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

examples/src/main/java/org/apache/spark/examples/mllib/JavaDataTypesExamples.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ private static void rowMatrixExample() {
118118
Vector v3 = Vectors.dense(3.0, 30.0, 300.0);
119119

120120
// a JavaRDD of local vectors
121-
JavaRDD<Vector> rows = jsc.parallelize(Arrays.asList(v1, v2, v3), 1);
121+
JavaRDD<Vector> rows = jsc.parallelize(Arrays.asList(v1, v2, v3));
122122

123123
// Create a RowMatrix from an JavaRDD<Vector>.
124124
RowMatrix mat = new RowMatrix(rows.rdd());
@@ -189,7 +189,7 @@ private static void blockMatrixExample() {
189189
MatrixEntry me2 = new MatrixEntry(1, 0, 2.1);
190190
MatrixEntry me3 = new MatrixEntry(6, 1, 3.7);
191191

192-
// a JavaRDD of (i, j, v) Matrix Entries
192+
// A JavaRDD of (i, j, v) Matrix Entries
193193
JavaRDD<MatrixEntry> entries = jsc.parallelize(Arrays.asList(me1, me2, me3));
194194

195195
// Create a CoordinateMatrix from a JavaRDD<MatrixEntry>.

examples/src/main/scala/org/apache/spark/examples/mllib/DataTypesExamples.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ object DataTypesExamples {
8585
val v2 = Vectors.dense(2.0, 20.0, 200.0)
8686
val v3 = Vectors.dense(3.0, 30.0, 300.0)
8787

88-
val rows: RDD[Vector] = sc.parallelize(Seq(v1, v2, v3), 1) // an RDD of local vectors
88+
val rows: RDD[Vector] = sc.parallelize(Seq(v1, v2, v3)) // an RDD of local vectors
8989
// Create a RowMatrix from an RDD[Vector].
9090
val mat: RowMatrix = new RowMatrix(rows)
9191

mllib/src/main/scala/org/apache/spark/mllib/linalg/distributed/RowMatrix.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class RowMatrix @Since("1.0.0") (
5050

5151
/** Alternative constructor leaving matrix dimensions to be determined automatically. */
5252
@Since("1.0.0")
53-
def this(rows: RDD[Vector]) = this(rows.retag(classOf[Vector]), 0L, 0)
53+
def this(rows: RDD[Vector]) = this(rows, 0L, 0)
5454

5555
/** Gets or computes the number of columns. */
5656
@Since("1.0.0")

0 commit comments

Comments
 (0)