phoenix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maryann...@apache.org
Subject [12/52] [abbrv] phoenix git commit: PHOENIX-2451 Use ReadOnlyProps instead of Configuration in ConnectionQueryServicesImpl
Date Fri, 11 Dec 2015 02:43:50 GMT
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/b621c7fd
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/b621c7fd
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/b621c7fd

Branch: refs/heads/calcite
Commit: b621c7fdc9ca29acfd41bb206ace679eb67ed7bd
Parents: dec2ad9
Author: James Taylor <jtaylor@salesforce.com>
Authored: Tue Nov 24 20:36:31 2015 -0800
Committer: James Taylor <jtaylor@salesforce.com>
Committed: Tue Nov 24 20:36:31 2015 -0800

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


http://git-wip-us.apache.org/repos/asf/phoenix/blob/b621c7fd/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 6d2cea1..17df42d 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
@@ -295,7 +295,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
@@ -309,7 +309,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)
                     )
@@ -333,7 +333,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
@@ -922,7 +922,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 {
@@ -1184,7 +1184,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);
 
@@ -1192,7 +1192,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;
         }


Mime
View raw message