keith-turner commented on code in PR #5451:
URL: https://github.com/apache/accumulo/pull/5451#discussion_r2031680042
##########
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:
Could looping over the map be avoided and a map lookup be done instead here?
--
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]