aboutsummaryrefslogtreecommitdiff
path: root/mllib/src/main/scala
diff options
context:
space:
mode:
authorReynold Xin <rxin@databricks.com>2016-05-25 23:54:24 -0700
committerReynold Xin <rxin@databricks.com>2016-05-25 23:54:24 -0700
commit361ebc282b2d09dc6dcf21419a53c5c617b1b6bd (patch)
tree0ed7e06fed5e03fec1516386bb16005b3bbc677e /mllib/src/main/scala
parentdfc9fc02ccbceb09213c394177d54b9ca56b6f24 (diff)
downloadspark-361ebc282b2d09dc6dcf21419a53c5c617b1b6bd.tar.gz
spark-361ebc282b2d09dc6dcf21419a53c5c617b1b6bd.tar.bz2
spark-361ebc282b2d09dc6dcf21419a53c5c617b1b6bd.zip
[SPARK-15543][SQL] Rename DefaultSources to make them more self-describing
## What changes were proposed in this pull request? This patch renames various DefaultSources to make their names more self-describing. The choice of "DefaultSource" was from the days when we did not have a good way to specify short names. They are now named: - LibSVMFileFormat - CSVFileFormat - JdbcRelationProvider - JsonFileFormat - ParquetFileFormat - TextFileFormat Backward compatibility is maintained through aliasing. ## How was this patch tested? Updated relevant test cases too. Author: Reynold Xin <rxin@databricks.com> Closes #13311 from rxin/SPARK-15543.
Diffstat (limited to 'mllib/src/main/scala')
-rw-r--r--mllib/src/main/scala/org/apache/spark/ml/source/libsvm/LibSVMRelation.scala8
1 files changed, 6 insertions, 2 deletions
diff --git a/mllib/src/main/scala/org/apache/spark/ml/source/libsvm/LibSVMRelation.scala b/mllib/src/main/scala/org/apache/spark/ml/source/libsvm/LibSVMRelation.scala
index 5ba768d551..64ebf0c982 100644
--- a/mllib/src/main/scala/org/apache/spark/ml/source/libsvm/LibSVMRelation.scala
+++ b/mllib/src/main/scala/org/apache/spark/ml/source/libsvm/LibSVMRelation.scala
@@ -90,7 +90,7 @@ private[libsvm] class LibSVMOutputWriter(
* .load("data/mllib/sample_libsvm_data.txt")
*
* // Java
- * DataFrame df = spark.read().format("libsvm")
+ * Dataset<Row> df = spark.read().format("libsvm")
* .option("numFeatures, "780")
* .load("data/mllib/sample_libsvm_data.txt");
* }}}
@@ -105,9 +105,13 @@ private[libsvm] class LibSVMOutputWriter(
* - "vectorType": feature vector type, "sparse" (default) or "dense".
*
* @see [[https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/ LIBSVM datasets]]
+ *
+ * Note that this class is public for documentation purpose. Please don't use this class directly.
+ * Rather, use the data source API as illustrated above.
*/
+// If this is moved or renamed, please update DataSource's backwardCompatibilityMap.
@Since("1.6.0")
-class DefaultSource extends FileFormat with DataSourceRegister {
+class LibSVMFileFormat extends FileFormat with DataSourceRegister {
@Since("1.6.0")
override def shortName(): String = "libsvm"