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

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


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

commit c08acfc00d9b89cc2e86ffd315a2c3c819566d6f
Author: Thomas D'Silva <tdsi...@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 83e6607..8fa21fe 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;
@@ -224,6 +225,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)

Reply via email to