You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by td...@apache.org on 2019/02/16 01:42:02 UTC
[phoenix] branch 4.x-HBase-1.3 updated: PHOENIX-5141 Use
HBaseFactoryProvider.getConfigurationFactory to get the config in
PhoenixRDD
This is an automated email from the ASF dual-hosted git repository.
tdsilva pushed a commit to branch 4.x-HBase-1.3
in repository https://gitbox.apache.org/repos/asf/phoenix.git
The following commit(s) were added to refs/heads/4.x-HBase-1.3 by this push:
new 866c75d PHOENIX-5141 Use HBaseFactoryProvider.getConfigurationFactory to get the config in PhoenixRDD
866c75d is described below
commit 866c75df01d86585c66e62b83e6292428d7e480d
Author: Thomas D'Silva <td...@apache.org>
AuthorDate: Fri Feb 15 16:44:02 2019 -0800
PHOENIX-5141 Use HBaseFactoryProvider.getConfigurationFactory to get the config in PhoenixRDD
---
.../src/main/scala/org/apache/phoenix/spark/PhoenixRDD.scala | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/phoenix-spark/src/main/scala/org/apache/phoenix/spark/PhoenixRDD.scala b/phoenix-spark/src/main/scala/org/apache/phoenix/spark/PhoenixRDD.scala
index cca2e6d..34033b7 100644
--- a/phoenix-spark/src/main/scala/org/apache/phoenix/spark/PhoenixRDD.scala
+++ b/phoenix-spark/src/main/scala/org/apache/phoenix/spark/PhoenixRDD.scala
@@ -21,6 +21,7 @@ import org.apache.hadoop.io.NullWritable
import org.apache.phoenix.jdbc.PhoenixDriver
import org.apache.phoenix.mapreduce.PhoenixInputFormat
import org.apache.phoenix.mapreduce.util.PhoenixConfigurationUtil
+import org.apache.phoenix.query.HBaseFactoryProvider
import org.apache.spark._
import org.apache.spark.annotation.DeveloperApi
import org.apache.spark.rdd.RDD
@@ -76,9 +77,7 @@ class PhoenixRDD(sc: SparkContext, table: String, columns: Seq[String],
def getPhoenixConfiguration: Configuration = {
- // This is just simply not serializable, so don't try, but clone it because
- // PhoenixConfigurationUtil mutates it.
- val config = HBaseConfiguration.create(conf)
+ val config = HBaseFactoryProvider.getConfigurationFactory.getConfiguration(conf);
PhoenixConfigurationUtil.setInputClass(config, classOf[PhoenixRecordWritable])
PhoenixConfigurationUtil.setInputTableName(config, table)