Examples of BatchDeleter


Examples of org.apache.accumulo.core.client.BatchDeleter

  @Override
  public boolean deleteAll(
      final String tableName,
      final String columnFamily,
      final String... additionalAuthorizations ) {
    BatchDeleter deleter = null;
    try {
      deleter = createBatchDeleter(
          tableName,
          additionalAuthorizations);
      deleter.setRanges(Arrays.asList(new Range()));
      deleter.fetchColumnFamily(new Text(
          columnFamily));
      deleter.delete();
      return true;
    }
    catch (final TableNotFoundException | MutationsRejectedException e) {
      LOGGER.warn(
          "Unable to delete row from table [" + tableName + "].",
          e);
      return false;
    }
    finally {
      if (deleter != null) {
        deleter.close();
      }
    }

  }
View Full Code Here

Examples of org.apache.accumulo.core.client.BatchDeleter

    MergeStats stats = scan(state, metaDataStateStore);
    MergeState newState = stats.nextMergeState(connector, state);
    Assert.assertEquals(MergeState.WAITING_FOR_OFFLINE, newState);
   
    // unassign the tablets
    BatchDeleter deleter = connector.createBatchDeleter("!METADATA", Constants.NO_AUTHS, 1000, 1000l, 1000l, 1);
    deleter.fetchColumnFamily(Constants.METADATA_CURRENT_LOCATION_COLUMN_FAMILY);
    deleter.setRanges(Collections.singletonList(new Range()));
    deleter.delete();
   
    // now we should be ready to merge but, we have an inconsistent !METADATA table
    stats = scan(state, metaDataStateStore);
    Assert.assertEquals(MergeState.WAITING_FOR_OFFLINE, stats.nextMergeState(connector, state));
   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.