accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] keith-turner commented on a change in pull request #364: ACCUMULO-4778 Initial feedback for table name to id mapping cache
Date Thu, 01 Jan 1970 00:00:00 GMT
keith-turner commented on a change in pull request #364: ACCUMULO-4778 Initial feedback for
table name to id mapping cache
URL: https://github.com/apache/accumulo/pull/364#discussion_r163586655
 
 

 ##########
 File path: core/src/main/java/org/apache/accumulo/core/client/impl/Tables.java
 ##########
 @@ -37,66 +35,25 @@
 import org.apache.accumulo.core.zookeeper.ZooUtil;
 import org.apache.accumulo.fate.zookeeper.ZooCache;
 import org.apache.accumulo.fate.zookeeper.ZooCacheFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 public class Tables {
-  private static final Logger log = LoggerFactory.getLogger(Tables.class);
 
   public static final String VALID_NAME_REGEX = "^(\\w+\\.)?(\\w+)$";
+  public static final Long TABLE_MAP_CACHE_EXPIRATION = TimeUnit.SECONDS.toNanos(1L);
+  private static final AtomicLong tableMapTimestamp = new AtomicLong(System.nanoTime());
 
   private static final SecurityPermission TABLES_PERMISSION = new SecurityPermission("tablesPermission");
   private static final AtomicLong cacheResetCount = new AtomicLong(0);
+  private static volatile TableMap tableMapCache;
 
-  private static ZooCache getZooCache(Instance instance) {
+  public static ZooCache getZooCache(Instance instance) {
 
 Review comment:
   Could make this package private

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message