aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCheng Lian <lian@databricks.com>2016-04-25 20:42:49 +0800
committerCheng Lian <lian@databricks.com>2016-04-25 20:42:49 +0800
commite66afd5c66a6d8f33c90ce08c35c3823735bde83 (patch)
treebf57370b9996d5b1b03d9dcd3b5ee6e35f175336
parentcef77d1f68afab56c9de8690133241dc0563e55c (diff)
downloadspark-e66afd5c66a6d8f33c90ce08c35c3823735bde83.tar.gz
spark-e66afd5c66a6d8f33c90ce08c35c3823735bde83.tar.bz2
spark-e66afd5c66a6d8f33c90ce08c35c3823735bde83.zip
[SPARK-14875][SQL] Makes OutputWriterFactory.newInstance public
## What changes were proposed in this pull request? This method was accidentally made `private[sql]` in Spark 2.0. This PR makes it public again, since 3rd party data sources like spark-avro depend on it. ## How was this patch tested? N/A Author: Cheng Lian <lian@databricks.com> Closes #12652 from liancheng/spark-14875.
-rw-r--r--sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/fileSourceInterfaces.scala2
-rw-r--r--sql/hive/src/test/scala/org/apache/spark/sql/sources/SimpleTextRelation.scala2
2 files changed, 2 insertions, 2 deletions
diff --git a/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/fileSourceInterfaces.scala b/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/fileSourceInterfaces.scala
index ed24bdd77f..4063c6ebce 100644
--- a/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/fileSourceInterfaces.scala
+++ b/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/fileSourceInterfaces.scala
@@ -59,7 +59,7 @@ abstract class OutputWriterFactory extends Serializable {
* @param context The Hadoop MapReduce task context.
* @since 1.4.0
*/
- private[sql] def newInstance(
+ def newInstance(
path: String,
bucketId: Option[Int], // TODO: This doesn't belong here...
dataSchema: StructType,
diff --git a/sql/hive/src/test/scala/org/apache/spark/sql/sources/SimpleTextRelation.scala b/sql/hive/src/test/scala/org/apache/spark/sql/sources/SimpleTextRelation.scala
index 16996ae036..dad4f87ae3 100644
--- a/sql/hive/src/test/scala/org/apache/spark/sql/sources/SimpleTextRelation.scala
+++ b/sql/hive/src/test/scala/org/apache/spark/sql/sources/SimpleTextRelation.scala
@@ -48,7 +48,7 @@ class SimpleTextSource extends FileFormat with DataSourceRegister {
job: Job,
options: Map[String, String],
dataSchema: StructType): OutputWriterFactory = new OutputWriterFactory {
- override private[sql] def newInstance(
+ override def newInstance(
path: String,
bucketId: Option[Int],
dataSchema: StructType,