meatballspaghetti commented on code in PR #5451:
URL: https://github.com/apache/accumulo/pull/5451#discussion_r2033839674


##########
core/src/main/java/org/apache/accumulo/core/util/tables/TableZooHelper.java:
##########
@@ -198,17 +189,15 @@ public NamespaceId getNamespaceId(TableId tableId) throws 
TableNotFoundException
       return Namespace.ACCUMULO.id();
     }
 
-    ZooCache zc = context.getZooCache();
-    byte[] n = zc.get(Constants.ZTABLES + "/" + tableId + 
Constants.ZTABLE_NAMESPACE);
-    // We might get null out of ZooCache if this tableID doesn't exist
-    if (n == null) {
-      throw new TableNotFoundException(tableId.canonical(), null, null);
+    for (NamespaceId namespaceId : 
context.getNamespaces().getIdToNameMap().keySet()) {
+      for (Map.Entry<TableId,String> entry : 
context.getTableMapping(namespaceId).getIdToNameMap()

Review Comment:
   Fixed. Further simplified by using stream.



-- 
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