phoenix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmaho...@apache.org
Subject phoenix git commit: PHOENIX-4056 Spark 2.2 empty path fix (Stepan Migunov)
Date Fri, 09 Feb 2018 20:13:57 GMT
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-0.98 d2801ef98 -> 1d34ad38b


PHOENIX-4056 Spark 2.2 empty path fix (Stepan Migunov)


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/1d34ad38
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/1d34ad38
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/1d34ad38

Branch: refs/heads/4.x-HBase-0.98
Commit: 1d34ad38bb90d2c87b518c49832d33bc4c391999
Parents: d2801ef
Author: Josh Mahonin <jmahonin@gmail.com>
Authored: Fri Feb 9 15:03:25 2018 -0500
Committer: Josh Mahonin <jmahonin@gmail.com>
Committed: Fri Feb 9 15:13:34 2018 -0500

----------------------------------------------------------------------
 .../scala/org/apache/phoenix/spark/DataFrameFunctions.scala    | 6 +++++-
 .../scala/org/apache/phoenix/spark/ProductRDDFunctions.scala   | 6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/1d34ad38/phoenix-spark/src/main/scala/org/apache/phoenix/spark/DataFrameFunctions.scala
----------------------------------------------------------------------
diff --git a/phoenix-spark/src/main/scala/org/apache/phoenix/spark/DataFrameFunctions.scala
b/phoenix-spark/src/main/scala/org/apache/phoenix/spark/DataFrameFunctions.scala
index 92f4c58..be4a32b 100644
--- a/phoenix-spark/src/main/scala/org/apache/phoenix/spark/DataFrameFunctions.scala
+++ b/phoenix-spark/src/main/scala/org/apache/phoenix/spark/DataFrameFunctions.scala
@@ -57,7 +57,11 @@ class DataFrameFunctions(data: DataFrame) extends Serializable {
 
     // Save it
     phxRDD.saveAsNewAPIHadoopFile(
-      "",
+      Option(
+        conf.get("mapreduce.output.fileoutputformat.outputdir")
+      ).getOrElse(
+        Option(conf.get("mapred.output.dir")).getOrElse("")
+      ),
       classOf[NullWritable],
       classOf[PhoenixRecordWritable],
       classOf[PhoenixOutputFormat[PhoenixRecordWritable]],

http://git-wip-us.apache.org/repos/asf/phoenix/blob/1d34ad38/phoenix-spark/src/main/scala/org/apache/phoenix/spark/ProductRDDFunctions.scala
----------------------------------------------------------------------
diff --git a/phoenix-spark/src/main/scala/org/apache/phoenix/spark/ProductRDDFunctions.scala
b/phoenix-spark/src/main/scala/org/apache/phoenix/spark/ProductRDDFunctions.scala
index 9b368b6..1b33e6e 100644
--- a/phoenix-spark/src/main/scala/org/apache/phoenix/spark/ProductRDDFunctions.scala
+++ b/phoenix-spark/src/main/scala/org/apache/phoenix/spark/ProductRDDFunctions.scala
@@ -49,7 +49,11 @@ class ProductRDDFunctions[A <: Product](data: RDD[A]) extends Serializable
{
 
     // Save it
     phxRDD.saveAsNewAPIHadoopFile(
-      "",
+      Option(
+        conf.get("mapreduce.output.fileoutputformat.outputdir")
+      ).getOrElse(
+        Option(conf.get("mapred.output.dir")).getOrElse("")
+      ),
       classOf[NullWritable],
       classOf[PhoenixRecordWritable],
       classOf[PhoenixOutputFormat[PhoenixRecordWritable]],


Mime
View raw message