Github user ctubbsii commented on a diff in the pull request:
https://github.com/apache/accumulo/pull/292#discussion_r133335283
--- Diff:
server/master/src/main/java/org/apache/accumulo/master/tableOps/Utils.java ---
@@ -59,21 +57,16 @@ static void checkTableDoesNotExist(Instance instance,
String tableName, Table.ID
throw new AcceptableThriftTableOperationException(null, tableName,
operation, TableOperationExceptionType.EXISTS, null);
}
- static <T extends AbstractId> T getNextTableId(String tableName,
Instance instance, Class<T> idClassType) throws
AcceptableThriftTableOperationException {
+ static String getNextTableId(String tableName, Instance instance) throws
AcceptableThriftTableOperationException {
--- End diff --
If you wanted to keep the original return type, you could pass in a
function to map from String to ID:
```java
static <T extends AbstractId> T getNextId(String name, Instance instance,
Function<String, T> newIdFunction) throws
AcceptableThriftTableOperationException {
// ...
return newIdFunction.apply(new String(nid, UTF_8));
}
```
Can use it like this:
```java
Table.ID tableId = Util.getNextId(tableName, instance, Table.ID::of);
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---