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 2015/12/01 05:18:39 UTC

[14/19] phoenix git commit: PHOENIX-2451 Use ReadOnlyProps instead of Configuration in ConnectionQueryServicesImpl

PHOENIX-2451 Use ReadOnlyProps instead of Configuration in ConnectionQueryServicesImpl


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/b5504607
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/b5504607
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/b5504607

Branch: refs/heads/4.x-HBase-0.98
Commit: b5504607281a900ffa80ad0470802e926c0068a1
Parents: 10b6b32
Author: James Taylor <jt...@salesforce.com>
Authored: Tue Nov 24 20:36:31 2015 -0800
Committer: Thomas D'Silva <td...@salesforce.com>
Committed: Mon Nov 30 15:03:35 2015 -0800

----------------------------------------------------------------------
 .../phoenix/query/ConnectionQueryServicesImpl.java      | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/b5504607/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
index 41951fc..c564524 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
@@ -294,7 +294,7 @@ public class ConnectionQueryServicesImpl extends DelegateQueryServices implement
                 .maximumSize(MAX_TABLE_STATS_CACHE_ENTRIES)
                 .expireAfterWrite(halfStatsUpdateFreq, TimeUnit.MILLISECONDS)
                 .build();
-        this.returnSequenceValues = config.getBoolean(QueryServices.RETURN_SEQUENCE_VALUES_ATTRIB, QueryServicesOptions.DEFAULT_RETURN_SEQUENCE_VALUES);
+        this.returnSequenceValues = props.getBoolean(QueryServices.RETURN_SEQUENCE_VALUES_ATTRIB, QueryServicesOptions.DEFAULT_RETURN_SEQUENCE_VALUES);
     }
 
     @Override
@@ -308,7 +308,7 @@ public class ConnectionQueryServicesImpl extends DelegateQueryServices implement
                   ZKClients.reWatchOnExpire(
                     ZKClients.retryOnFailure(
                       ZKClientService.Builder.of(zkQuorumServersString)
-                        .setSessionTimeout(config.getInt(HConstants.ZK_SESSION_TIMEOUT, HConstants.DEFAULT_ZK_SESSION_TIMEOUT))
+                        .setSessionTimeout(props.getInt(HConstants.ZK_SESSION_TIMEOUT, HConstants.DEFAULT_ZK_SESSION_TIMEOUT))
                         .build(),
                       RetryStrategies.exponentialDelay(500, 2000, TimeUnit.MILLISECONDS)
                     )
@@ -332,7 +332,7 @@ public class ConnectionQueryServicesImpl extends DelegateQueryServices implement
                 User.login(config, HBASE_CLIENT_KEYTAB, HBASE_CLIENT_PRINCIPAL, null);
                 logger.info("Successfull login to secure cluster!!");
             }
-			boolean transactionsEnabled = config.getBoolean(
+			boolean transactionsEnabled = props.getBoolean(
 					QueryServices.TRANSACTIONS_ENABLED,
 					QueryServicesOptions.DEFAULT_TRANSACTIONS_ENABLED);
 			// only initialize the tx service client if needed
@@ -921,7 +921,7 @@ public class ConnectionQueryServicesImpl extends DelegateQueryServices implement
         boolean tableExist = true;
         try {
             final String quorum = ZKConfig.getZKQuorumServersString(config);
-            final String znode = config.get(HConstants.ZOOKEEPER_ZNODE_PARENT);
+            final String znode = this.props.get(HConstants.ZOOKEEPER_ZNODE_PARENT);
             logger.debug("Found quorum: " + quorum + ":" + znode);
             admin = new HBaseAdmin(config);
             try {
@@ -1183,7 +1183,7 @@ public class ConnectionQueryServicesImpl extends DelegateQueryServices implement
     private void ensureViewIndexTableCreated(byte[] physicalTableName, Map<String,Object> tableProps, List<Pair<byte[],Map<String,Object>>> families, byte[][] splits, long timestamp) throws SQLException {
         Long maxFileSize = (Long)tableProps.get(HTableDescriptor.MAX_FILESIZE);
         if (maxFileSize == null) {
-            maxFileSize = this.config.getLong(HConstants.HREGION_MAX_FILESIZE, HConstants.DEFAULT_MAX_FILE_SIZE);
+            maxFileSize = this.props.getLong(HConstants.HREGION_MAX_FILESIZE, HConstants.DEFAULT_MAX_FILE_SIZE);
         }
         byte[] physicalIndexName = MetaDataUtil.getViewIndexPhysicalName(physicalTableName);
 
@@ -1191,7 +1191,7 @@ public class ConnectionQueryServicesImpl extends DelegateQueryServices implement
         // Get percentage to use from table props first and then fallback to config
         Integer indexMaxFileSizePercProp = (Integer)tableProps.remove(QueryServices.INDEX_MAX_FILESIZE_PERC_ATTRIB);
         if (indexMaxFileSizePercProp == null) {
-            indexMaxFileSizePerc = config.getInt(QueryServices.INDEX_MAX_FILESIZE_PERC_ATTRIB, QueryServicesOptions.DEFAULT_INDEX_MAX_FILESIZE_PERC);
+            indexMaxFileSizePerc = this.props.getInt(QueryServices.INDEX_MAX_FILESIZE_PERC_ATTRIB, QueryServicesOptions.DEFAULT_INDEX_MAX_FILESIZE_PERC);
         } else {
             indexMaxFileSizePerc = indexMaxFileSizePercProp;
         }