DomGarguilo commented on code in PR #5952:
URL: https://github.com/apache/accumulo/pull/5952#discussion_r2417581388
##########
core/src/main/java/org/apache/accumulo/core/clientImpl/TableOperationsImpl.java:
##########
@@ -2221,16 +2221,18 @@ private void validatePropertiesToSet(Map<String,String>
opts, Map<String,String>
}
@Override
- public void setTabletAvailability(String tableName, Range range,
TabletAvailability availability)
- throws AccumuloSecurityException, AccumuloException {
+ public void setTabletAvailability(String tableName, RowRange rowRange,
+ TabletAvailability availability) throws AccumuloSecurityException,
AccumuloException {
EXISTING_TABLE_NAME.validate(tableName);
if (SystemTables.containsTableName(tableName)) {
throw new AccumuloException("Cannot set set tablet availability for
table " + tableName);
}
- checkArgument(range != null, "range is null");
+ checkArgument(rowRange != null, "rowRange is null");
checkArgument(availability != null, "tabletAvailability is null");
+ Range range = rowRange.asRange();
+
byte[] bRange;
Review Comment:
We convert back to Range in a few places since that is what we can send over
thrift at the moment. The big improvement in this PR is that it makes it clear
that we do not use the extra parts of the Range object (cf/cq bounds) that are
not used at all here. By accepting a RowRange it makes it clear and enforced
what we need.
--
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]