dlmarion commented on code in PR #6156:
URL: https://github.com/apache/accumulo/pull/6156#discussion_r2879302172


##########
core/src/main/java/org/apache/accumulo/core/clientImpl/TabletLocator.java:
##########
@@ -135,24 +138,31 @@ static synchronized void enable() {
   public static synchronized TabletLocator getLocator(ClientContext context, 
TableId tableId) {
     Preconditions.checkState(enabled, "The Accumulo singleton that that tracks 
tablet locations is "
         + "disabled. This is likely caused by all AccumuloClients being closed 
or garbage collected");
-    LocatorKey key = new LocatorKey(context.getInstanceID(), tableId);
-    TabletLocator tl = locators.get(key);
-    if (tl == null) {
-      MetadataLocationObtainer mlo = new MetadataLocationObtainer();
-
-      if (RootTable.ID.equals(tableId)) {
-        tl = new RootTabletLocator(context.getTServerLockChecker());
-      } else if (MetadataTable.ID.equals(tableId)) {
-        tl = new TabletLocatorImpl(MetadataTable.ID, getLocator(context, 
RootTable.ID), mlo,
-            context.getTServerLockChecker());
-      } else {
-        tl = new TabletLocatorImpl(tableId, getLocator(context, 
MetadataTable.ID), mlo,
-            context.getTServerLockChecker());
+    TableState state = context.getTableState(tableId);
+    if (state == TableState.OFFLINE) {

Review Comment:
   Yeah, I think that's possible. I'll add that to this change.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to