@Override protected void doTableOp(final Shell shellState, final String tableName) throws AccumuloException, AccumuloSecurityException { // compact the tables if (cancel) { try { shellState.getAccumuloClient().tableOperations().cancelCompaction(tableName); Shell.log.info("Compaction canceled for table " + tableName); } catch (TableNotFoundException e) { throw new AccumuloException(e); } } else { try { if (compactionConfig.getWait()) { Shell.log.info("Compacting table ..."); } for (IteratorSetting iteratorSetting : compactionConfig.getIterators()) { ScanCommand.ensureTserversCanLoadIterator(shellState, tableName, iteratorSetting.getIteratorClass()); } shellState.getAccumuloClient().tableOperations().compact(tableName, compactionConfig); Shell.log.info("Compaction of table " + tableName + " " + (compactionConfig.getWait() ? "completed" : "started") + " for given range"); } catch (Exception ex) { throw new AccumuloException(ex); } } }
doFateOperation(FateOperation.TABLE_COMPACT, args, opts, tableName, config.getWait()); } catch (TableExistsException | NamespaceExistsException e) {
@Override protected void doTableOp(final Shell shellState, final String tableName) throws AccumuloException, AccumuloSecurityException { // compact the tables if (cancel) { try { shellState.getConnector().tableOperations().cancelCompaction(tableName); Shell.log.info("Compaction canceled for table " + tableName); } catch (TableNotFoundException e) { throw new AccumuloException(e); } } else { try { if (compactionConfig.getWait()) { Shell.log.info("Compacting table ..."); } for (IteratorSetting iteratorSetting : compactionConfig.getIterators()) { ScanCommand.ensureTserversCanLoadIterator(shellState, tableName, iteratorSetting.getIteratorClass()); } shellState.getConnector().tableOperations().compact(tableName, compactionConfig); Shell.log.info("Compaction of table " + tableName + " " + (compactionConfig.getWait() ? "completed" : "started") + " for given range"); } catch (Exception ex) { throw new AccumuloException(ex); } } }
doFateOperation(FateOperation.TABLE_COMPACT, args, opts, tableName, config.getWait()); } catch (TableExistsException e) {