Skip to content

Commit a7a0f99

Browse files
committed
Change code comments per review comments.
1 parent 7cca1dc commit a7a0f99

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

mllib/src/main/scala/org/apache/spark/mllib/clustering/KMeans.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ class KMeans private (
120120
def run(data: RDD[Vector]): KMeansModel = {
121121

122122
if (data.getStorageLevel == StorageLevel.NONE) {
123-
// Warn when running an iterative algorithm on uncached data. SPARK-1484
124123
logWarning("The input data is not directly cached, which may hurt performance if its"
125124
+ " parent RDDs are also uncached.")
126125
}
@@ -134,6 +133,7 @@ class KMeans private (
134133
val model = runBreeze(breezeData)
135134
norms.unpersist()
136135

136+
// Warn at the end of the run as well, for increased visibility.
137137
if (data.getStorageLevel == StorageLevel.NONE) {
138138
logWarning("The input data was not directly cached, which may hurt performance if its"
139139
+ " parent RDDs are also uncached.")

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
@@ -233,7 +233,6 @@ class RowMatrix(
233233
(sigmaSquaresFull, uFull)
234234
case SVDMode.DistARPACK =>
235235
if (rows.getStorageLevel == StorageLevel.NONE) {
236-
// Warn when running an iterative algorithm on uncached data. SPARK-1484
237236
logWarning("The input data is not directly cached, which may hurt performance if its"
238237
+ " parent RDDs are also uncached.")
239238
}
@@ -262,6 +261,7 @@ class RowMatrix(
262261
logWarning(s"Requested $k singular values but only found $sk nonzeros.")
263262
}
264263

264+
// Warn at the end of the run as well, for increased visibility.
265265
if (computeMode == SVDMode.DistARPACK && rows.getStorageLevel == StorageLevel.NONE) {
266266
logWarning("The input data was not directly cached, which may hurt performance if its"
267267
+ " parent RDDs are also uncached.")

mllib/src/main/scala/org/apache/spark/mllib/regression/GeneralizedLinearAlgorithm.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ abstract class GeneralizedLinearAlgorithm[M <: GeneralizedLinearModel]
151151
def run(input: RDD[LabeledPoint], initialWeights: Vector): M = {
152152

153153
if (input.getStorageLevel == StorageLevel.NONE) {
154-
// Warn when running an iterative algorithm on uncached data. SPARK-1484
155154
logWarning("The input data is not directly cached, which may hurt performance if its"
156155
+ " parent RDDs are also uncached.")
157156
}
@@ -230,6 +229,7 @@ abstract class GeneralizedLinearAlgorithm[M <: GeneralizedLinearModel]
230229
weights = scaler.transform(weights)
231230
}
232231

232+
// Warn at the end of the run as well, for increased visibility.
233233
if (input.getStorageLevel == StorageLevel.NONE) {
234234
logWarning("The input data was not directly cached, which may hurt performance if its"
235235
+ " parent RDDs are also uncached.")

0 commit comments

Comments
 (0)