use of org.apache.accumulo.core.client.admin.InstanceOperations in project accumulo by apache.
the class ListCompactionsCommand method execute.
@Override
public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws Exception {
List<String> tservers;
final InstanceOperations instanceOps = shellState.getConnector().instanceOperations();
final boolean paginate = !cl.hasOption(disablePaginationOpt.getOpt());
if (cl.hasOption(tserverOption.getOpt())) {
tservers = new ArrayList<>();
tservers.add(cl.getOptionValue(tserverOption.getOpt()));
} else {
tservers = instanceOps.getTabletServers();
}
shellState.printLines(new ActiveCompactionIterator(tservers, instanceOps), paginate);
return 0;
}
use of org.apache.accumulo.core.client.admin.InstanceOperations in project accumulo by apache.
the class ListScansCommand method execute.
@Override
public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws Exception {
List<String> tservers;
final InstanceOperations instanceOps = shellState.getConnector().instanceOperations();
final boolean paginate = !cl.hasOption(disablePaginationOpt.getOpt());
if (cl.hasOption(tserverOption.getOpt())) {
tservers = new ArrayList<>();
tservers.add(cl.getOptionValue(tserverOption.getOpt()));
} else {
tservers = instanceOps.getTabletServers();
}
shellState.printLines(new ActiveScanIterator(tservers, instanceOps), paginate);
return 0;
}
use of org.apache.accumulo.core.client.admin.InstanceOperations in project accumulo by apache.
the class BadDeleteMarkersCreatedIT method restoreConfig.
@After
public void restoreConfig() throws Exception {
InstanceOperations iops = getConnector().instanceOperations();
if (null != gcCycleDelay) {
iops.setProperty(Property.GC_CYCLE_DELAY.getKey(), gcCycleDelay);
}
if (null != gcCycleStart) {
iops.setProperty(Property.GC_CYCLE_START.getKey(), gcCycleStart);
}
log.info("Restarting garbage collector");
getCluster().getClusterControl().stopAllServers(ServerType.GARBAGE_COLLECTOR);
getCluster().getClusterControl().startAllServers(ServerType.GARBAGE_COLLECTOR);
log.info("Garbage collector was restarted");
}
Aggregations