Пример #1
0
 private boolean isLatestValueEmpty(Cell cell, PeekingIterator<RowResult<Value>> values) {
   while (values.hasNext()) {
     RowResult<Value> result = values.peek();
     int comparison =
         UnsignedBytes.lexicographicalComparator().compare(cell.getRowName(), result.getRowName());
     if (comparison == 0) {
       Value matchingValue = result.getColumns().get(cell.getColumnName());
       return matchingValue != null && matchingValue.getContents().length == 0;
     } else if (comparison < 0) {
       return false;
     } else {
       values.next();
     }
   }
   return false;
 }
Пример #2
0
 static Cell getMetadataCell(String tableName) {
   return Cell.create(tableName.getBytes(), "m".getBytes());
 }