Repository: phoenix Updated Branches: refs/heads/4.x-HBase-0.98 234e427b3 -> f48aa81a0 refs/heads/4.x-HBase-1.1 dbb0c1ea0 -> 222388b03 refs/heads/master 8f2d0fbc5 -> 7567fcd6d
Amend PHOENIX-3611 ConnectionQueryService should expire LRU entries Signed-off-by: Andrew Purtell <[email protected]> Do not enforce a maximum size on the client connection cache. Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/beea861b Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/beea861b Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/beea861b Branch: refs/heads/4.x-HBase-1.1 Commit: beea861be4dab1f2bcb61e7c97f1ac8de742af74 Parents: dbb0c1e Author: gjacoby <[email protected]> Authored: Wed Jan 25 13:49:26 2017 -0800 Committer: Andrew Purtell <[email protected]> Committed: Mon Feb 13 15:22:59 2017 -0800 ---------------------------------------------------------------------- .../src/main/java/org/apache/phoenix/jdbc/PhoenixDriver.java | 3 --- .../src/main/java/org/apache/phoenix/query/QueryServices.java | 1 - .../main/java/org/apache/phoenix/query/QueryServicesOptions.java | 1 - 3 files changed, 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/phoenix/blob/beea861b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDriver.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDriver.java b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDriver.java index b2acacf..67ac9c9 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDriver.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDriver.java @@ -149,8 +149,6 @@ public final class PhoenixDriver extends PhoenixEmbeddedDriver { private Cache<ConnectionInfo, ConnectionQueryServices> initializeConnectionCache() { Configuration config = HBaseFactoryProvider.getConfigurationFactory().getConfiguration(); - int maxCacheSize = config.getInt(QueryServices.CLIENT_CONNECTION_CACHE_MAX_SIZE, - QueryServicesOptions.DEFAULT_CLIENT_CONNECTION_CACHE_MAX_SIZE); int maxCacheDuration = config.getInt(QueryServices.CLIENT_CONNECTION_CACHE_MAX_DURATION_MILLISECONDS, QueryServicesOptions.DEFAULT_CLIENT_CONNECTION_CACHE_MAX_DURATION); RemovalListener<ConnectionInfo, ConnectionQueryServices> cacheRemovalListener = @@ -170,7 +168,6 @@ public final class PhoenixDriver extends PhoenixEmbeddedDriver { } }; return CacheBuilder.newBuilder() - .maximumSize(maxCacheSize) .expireAfterAccess(maxCacheDuration, TimeUnit.MILLISECONDS) .removalListener(cacheRemovalListener) .build(); http://git-wip-us.apache.org/repos/asf/phoenix/blob/beea861b/phoenix-core/src/main/java/org/apache/phoenix/query/QueryServices.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/query/QueryServices.java b/phoenix-core/src/main/java/org/apache/phoenix/query/QueryServices.java index 2035de8..0307e4c 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/query/QueryServices.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/query/QueryServices.java @@ -237,7 +237,6 @@ public interface QueryServices extends SQLCloseable { public static final String CLIENT_CACHE_ENCODING = "phoenix.table.client.cache.encoding"; public static final String AUTO_UPGRADE_ENABLED = "phoenix.autoupgrade.enabled"; - public static final String CLIENT_CONNECTION_CACHE_MAX_SIZE = "phoenix.client.connection.cache.max.size"; public static final String CLIENT_CONNECTION_CACHE_MAX_DURATION_MILLISECONDS = "phoenix.client.connection.max.duration"; /** http://git-wip-us.apache.org/repos/asf/phoenix/blob/beea861b/phoenix-core/src/main/java/org/apache/phoenix/query/QueryServicesOptions.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/query/QueryServicesOptions.java b/phoenix-core/src/main/java/org/apache/phoenix/query/QueryServicesOptions.java index de0796f..39a7d7e 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/query/QueryServicesOptions.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/query/QueryServicesOptions.java @@ -265,7 +265,6 @@ public class QueryServicesOptions { public static final String DEFAULT_CLIENT_CACHE_ENCODING = PTableRefFactory.Encoding.OBJECT.toString(); public static final boolean DEFAULT_AUTO_UPGRADE_ENABLED = true; - public static final int DEFAULT_CLIENT_CONNECTION_CACHE_MAX_SIZE = 100; public static final int DEFAULT_CLIENT_CONNECTION_CACHE_MAX_DURATION = 86400000; @SuppressWarnings("serial")
