Text endRow = ByteBufferUtil.toText(arguments.get(2));
final String tableId = checkTableId(tableName, TableOperation.MERGE);
if (tableName.equals(Constants.METADATA_TABLE_NAME)) {
if (startRow.compareTo(new Text("0")) < 0) {
startRow = new Text("0");
if (endRow.getLength() != 0 && endRow.compareTo(startRow) < 0)
throw new ThriftTableOperationException(null, tableName, TableOperation.MERGE, TableOperationExceptionType.OTHER,
"end-row specification is in the root tablet, which cannot be merged or split");
}
}
log.debug("Creating merge op: " + tableId + " " + startRow + " " + endRow);