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:42 UTC

[phoenix] branch master 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 master
in repository https://gitbox.apache.org/repos/asf/phoenix.git


The following commit(s) were added to refs/heads/master by this push:
     new 5f56a4b  PHOENIX-5124 Add config to enable PropertyPolicyProvider (addendum)
5f56a4b is described below

commit 5f56a4b993435f6b127d0c561d4a6c458f263e46
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 5a561ea..8c76bde 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
@@ -48,6 +48,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;
@@ -225,6 +226,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)