示例#1
0
 public static void rollBackSplit(
     Text metadataEntry, Text oldPrevEndRow, Credentials credentials, ZooLock zooLock) {
   KeyExtent ke = new KeyExtent(metadataEntry, oldPrevEndRow);
   Mutation m = ke.getPrevRowUpdateMutation();
   TabletsSection.TabletColumnFamily.SPLIT_RATIO_COLUMN.putDelete(m);
   TabletsSection.TabletColumnFamily.OLD_PREV_ROW_COLUMN.putDelete(m);
   update(credentials, zooLock, m, new KeyExtent(metadataEntry, (Text) null));
 }
示例#2
0
  public static void finishSplit(
      Text metadataEntry,
      Map<FileRef, DataFileValue> datafileSizes,
      List<FileRef> highDatafilesToRemove,
      Credentials credentials,
      ZooLock zooLock) {
    Mutation m = new Mutation(metadataEntry);
    TabletsSection.TabletColumnFamily.SPLIT_RATIO_COLUMN.putDelete(m);
    TabletsSection.TabletColumnFamily.OLD_PREV_ROW_COLUMN.putDelete(m);
    ChoppedColumnFamily.CHOPPED_COLUMN.putDelete(m);

    for (Entry<FileRef, DataFileValue> entry : datafileSizes.entrySet()) {
      m.put(DataFileColumnFamily.NAME, entry.getKey().meta(), new Value(entry.getValue().encode()));
    }

    for (FileRef pathToRemove : highDatafilesToRemove) {
      m.putDelete(DataFileColumnFamily.NAME, pathToRemove.meta());
    }

    update(credentials, zooLock, m, new KeyExtent(metadataEntry, (Text) null));
  }