keith-turner commented on code in PR #5781:
URL: https://github.com/apache/accumulo/pull/5781#discussion_r2263781623
##########
core/src/main/java/org/apache/accumulo/core/client/admin/TableOperations.java:
##########
@@ -1069,4 +1070,13 @@ default Stream<TabletInformation>
getTabletInformation(final String tableName, f
throw new UnsupportedOperationException();
}
+ /**
+ * Returns the namespace for the given table name
+ *
+ * @param table fully qualified table name
+ * @return namespace id
+ * @throws IllegalArgumentException if table name is null, empty, or invalid
format
+ * @since 4.0.0
+ */
+ NamespaceId getNamespace(String table);
Review Comment:
The impl of this seems to return the namespace name and not the id. Looking
at the code that uses this it wants the name and not the id.
```suggestion
String getNamespaceName(String table);
```
##########
server/manager/src/main/java/org/apache/accumulo/manager/upgrade/Upgrader12to13.java:
##########
@@ -438,4 +447,50 @@ void addTableMappingsToZooKeeper(ServerContext context) {
"Could not read or write metadata in ZooKeeper because of ZooKeeper
exception", ex);
}
}
+
+ void moveTableProperties(ServerContext context) {
+ try {
+ final SystemPropKey spk = SystemPropKey.of();
+ final VersionedProperties sysProps = context.getPropStore().get(spk);
+ final Map<String,String> sysTableProps = new HashMap<>();
+ sysProps.asMap().entrySet().stream()
+ .filter(e -> e.getKey().startsWith(Property.TABLE_PREFIX.getKey()))
+ .forEach(e -> sysTableProps.put(e.getKey(), e.getValue()));
+ LOG.info("Adding the following table properties to namespaces unless
overridden, {}",
Review Comment:
logging an entire map in one line can be hard to read in the logs when its a
large map, could log one line per prop
--
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]