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 c0824af PHOENIX-5124 PropertyPolicyProvider should not evaluate
default hbase config properties
c0824af is described below
commit c0824affd9a85eaa59dc03955af8ac0c59b883ce
Author: Thomas D'Silva
AuthorDate: Mon Feb 4 23:17:37 2019 -0800
PHOENIX-5124 PropertyPolicyProvider should not evaluate default hbase
config properties
---
.../apache/phoenix/end2end/AppendOnlySchemaIT.java | 2 +-
.../phoenix/end2end/PropertyPolicyProviderIT.java | 26
.../java/org/apache/phoenix/rpc/UpdateCacheIT.java | 2 +-
.../org/apache/phoenix/jdbc/PhoenixConnection.java | 2 +-
.../apache/phoenix/jdbc/PhoenixEmbeddedDriver.java | 7 ++
.../org/apache/phoenix/util/PropertiesUtil.java| 28 +-
6 files changed, 58 insertions(+), 9 deletions(-)
diff --git
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AppendOnlySchemaIT.java
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AppendOnlySchemaIT.java
index b39c4f0..e1c56ea 100644
---
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AppendOnlySchemaIT.java
+++
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AppendOnlySchemaIT.java
@@ -70,7 +70,7 @@ public class AppendOnlySchemaIT extends
ParallelStatsDisabledIT {
Mockito.spy(driver.getConnectionQueryServices(getUrl(),
PropertiesUtil.deepCopy(TEST_PROPERTIES)));
Properties props = new Properties();
-props.putAll(PhoenixEmbeddedDriver.DEFFAULT_PROPS.asMap());
+props.putAll(PhoenixEmbeddedDriver.DEFAULT_PROPS.asMap());
try (Connection conn1 = connectionQueryServices.connect(getUrl(),
props);
Connection conn2 = sameClient ? conn1 :
connectionQueryServices.connect(getUrl(), props)) {
diff --git
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/PropertyPolicyProviderIT.java
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/PropertyPolicyProviderIT.java
new file mode 100644
index 000..48508a9
--- /dev/null
+++
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/PropertyPolicyProviderIT.java
@@ -0,0 +1,26 @@
+package org.apache.phoenix.end2end;
+
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.HBaseConfiguration;
+import org.apache.hadoop.hbase.HConstants;
+import org.apache.phoenix.mapreduce.util.ConnectionUtil;
+import org.junit.Test;
+
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.util.Properties;
+
+public class PropertyPolicyProviderIT extends ParallelStatsDisabledIT {
+
+@Test
+public void testUsingDefaultHBaseConfigs() throws SQLException {
+Configuration config = HBaseConfiguration.create();
+config.set(HConstants.ZOOKEEPER_QUORUM, getUrl());
+Properties properties=new Properties();
+properties.put("allowedProperty","value");
+try(
+Connection conn = ConnectionUtil.getInputConnection(config,
properties)
+){}
+}
+
+}
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/rpc/UpdateCacheIT.java
b/phoenix-core/src/it/java/org/apache/phoenix/rpc/UpdateCacheIT.java
index 2959b99..a1bdad7 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/rpc/UpdateCacheIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/rpc/UpdateCacheIT.java
@@ -192,7 +192,7 @@ public class UpdateCacheIT extends ParallelStatsDisabledIT {
// use a spyed ConnectionQueryServices so we can verify calls
to getTable
ConnectionQueryServices connectionQueryServices =
Mockito.spy(driver.getConnectionQueryServices(getUrl(),
PropertiesUtil.deepCopy(TEST_PROPERTIES)));
Properties props = new Properties();
- props.putAll(PhoenixEmbeddedDriver.DEFFAULT_PROPS.asMap());
+ props.putAll(PhoenixEmbeddedDriver.DEFAULT_PROPS.asMap());
Connection conn = connectionQueryServices.connect(getUrl(),
props);
try {
conn.setAutoCommit(false);
diff --git
a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixConnection.java
b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixConnection.java
index 596e27c..d74 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixConnection.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixConnection.java
@@ -245,7 +245,7 @@ public class PhoenixConnection implements Connection,
MetaDataMutated, SQLClosea
// Filter user provided properties based on property policy, if
// provided.
-PropertyPolicyProvider.getPropertyPolicy().evaluate(info);
+
PropertyPolicyProvider.getPropertyPolicy().evaluate(PropertiesUtil.removeStandardHBasePhoenixConfig(in