WeichenXu123 commented on code in PR #50665:
URL: https://github.com/apache/spark/pull/50665#discussion_r2055233400
##########
mllib/src/main/scala/org/apache/spark/ml/clustering/KMeans.scala:
##########
@@ -233,7 +233,7 @@ private class InternalKMeansModelWriter extends
MLWriterFormat with MLFormatRegi
ClusterData(idx, center)
}
val dataPath = new Path(path, "data").toString
-
sparkSession.createDataFrame(data.toImmutableArraySeq).repartition(1).write.parquet(dataPath)
+ ReadWriteUtils.saveArray(dataPath, data, sparkSession)
Review Comment:
if we use `spark_dataframe.write.save("file:///....")`, then it result in
writing data to remote worker local disk.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]