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/15 02:46:20 UTC

[phoenix] branch 4.x-HBase-1.2 updated: PHOENIX-5124 Add config to enable PropertyPolicyProvider (addendum)

This is an automated email from the ASF dual-hosted git repository.

tdsilva pushed a commit to branch 4.x-HBase-1.2
in repository https://gitbox.apache.org/repos/asf/phoenix.git


The following commit(s) were added to refs/heads/4.x-HBase-1.2 by this push:
     new f2924e5  PHOENIX-5124 Add config to enable PropertyPolicyProvider (addendum)
f2924e5 is described below

commit f2924e592403131b805b6d9267df6585d29aabad
Author: Thomas D'Silva <td...@apache.org>
AuthorDate: Thu Feb 14 18:45:12 2019 -0800

    PHOENIX-5124 Add config to enable PropertyPolicyProvider (addendum)
---
 .../org/apache/phoenix/mapreduce/util/PhoenixConfigurationUtil.java | 6 ++++++
 .../src/main/scala/org/apache/phoenix/spark/PhoenixRDD.scala        | 1 +
 2 files changed, 7 insertions(+)

diff --git a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/util/PhoenixConfigurationUtil.java b/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/util/PhoenixConfigurationUtil.java
index b0ea17b..b81394b 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/util/PhoenixConfigurationUtil.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/util/PhoenixConfigurationUtil.java
@@ -47,6 +47,7 @@ import org.apache.phoenix.mapreduce.ImportPreUpsertKeyValueProcessor;
 import org.apache.phoenix.mapreduce.PhoenixInputFormat;
 import org.apache.phoenix.mapreduce.index.IndexScrutinyTool.OutputFormat;
 import org.apache.phoenix.mapreduce.index.IndexScrutinyTool.SourceTable;
+import org.apache.phoenix.query.QueryServices;
 import org.apache.phoenix.schema.PName;
 import org.apache.phoenix.schema.PTable;
 import org.apache.phoenix.schema.PTableKey;
@@ -212,6 +213,11 @@ public final class PhoenixConfigurationUtil {
         Preconditions.checkNotNull(inputQuery);
         configuration.set(SELECT_STATEMENT, inputQuery);
     }
+
+    public static void setPropertyPolicyProviderDisabled(final Configuration configuration) {
+        Preconditions.checkNotNull(configuration);
+        configuration.set(QueryServices.PROPERTY_POLICY_PROVIDER_ENABLED, "false");
+    }
     
     public static void setSchemaType(Configuration configuration, final SchemaType schemaType) {
         Preconditions.checkNotNull(configuration);
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 7331a5f..cca2e6d 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
@@ -82,6 +82,7 @@ class PhoenixRDD(sc: SparkContext, table: String, columns: Seq[String],
 
     PhoenixConfigurationUtil.setInputClass(config, classOf[PhoenixRecordWritable])
     PhoenixConfigurationUtil.setInputTableName(config, table)
+    PhoenixConfigurationUtil.setPropertyPolicyProviderDisabled(config);
 
     if(!columns.isEmpty) {
       PhoenixConfigurationUtil.setSelectColumnNames(config, columns.toArray)