use of org.apache.accumulo.core.client.admin.InstanceOperations in project accumulo by apache.
the class BinaryStressIT method alterConfig.
@Before
public void alterConfig() throws Exception {
if (ClusterType.MINI == getClusterType()) {
return;
}
InstanceOperations iops = getConnector().instanceOperations();
Map<String, String> conf = iops.getSystemConfiguration();
majcDelay = conf.get(Property.TSERV_MAJC_DELAY.getKey());
maxMem = conf.get(Property.TSERV_MAXMEM.getKey());
iops.setProperty(Property.TSERV_MAJC_DELAY.getKey(), "0");
iops.setProperty(Property.TSERV_MAXMEM.getKey(), "50K");
getClusterControl().stopAllServers(ServerType.TABLET_SERVER);
getClusterControl().startAllServers(ServerType.TABLET_SERVER);
}
use of org.apache.accumulo.core.client.admin.InstanceOperations in project accumulo by apache.
the class BinaryStressIT method resetConfig.
@After
public void resetConfig() throws Exception {
if (null != majcDelay) {
InstanceOperations iops = getConnector().instanceOperations();
iops.setProperty(Property.TSERV_MAJC_DELAY.getKey(), majcDelay);
iops.setProperty(Property.TSERV_MAXMEM.getKey(), maxMem);
getClusterControl().stopAllServers(ServerType.TABLET_SERVER);
getClusterControl().startAllServers(ServerType.TABLET_SERVER);
}
}
use of org.apache.accumulo.core.client.admin.InstanceOperations in project accumulo by apache.
the class PingCommand 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 PingIterator(tservers, instanceOps), paginate);
return 0;
}
use of org.apache.accumulo.core.client.admin.InstanceOperations in project accumulo by apache.
the class MaxOpenIT method alterConfig.
@Before
public void alterConfig() throws Exception {
InstanceOperations iops = getConnector().instanceOperations();
Map<String, String> sysConfig = iops.getSystemConfiguration();
scanMaxOpenFiles = sysConfig.get(Property.TSERV_SCAN_MAX_OPENFILES.getKey());
majcConcurrent = sysConfig.get(Property.TSERV_MAJC_MAXCONCURRENT.getKey());
majcThreadMaxOpen = sysConfig.get(Property.TSERV_MAJC_THREAD_MAXOPEN.getKey());
}
use of org.apache.accumulo.core.client.admin.InstanceOperations in project accumulo by apache.
the class ScanSessionTimeOutIT method reduceSessionIdle.
@Before
public void reduceSessionIdle() throws Exception {
InstanceOperations ops = getConnector().instanceOperations();
sessionIdle = ops.getSystemConfiguration().get(Property.TSERV_SESSION_MAXIDLE.getKey());
ops.setProperty(Property.TSERV_SESSION_MAXIDLE.getKey(), getMaxIdleTimeString());
log.info("Waiting for existing session idle time to expire");
Thread.sleep(ConfigurationTypeHelper.getTimeInMillis(sessionIdle));
log.info("Finished waiting");
}
Aggregations