Search in sources :

Example 1 with InstanceOperations

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);
}
Also used : InstanceOperations(org.apache.accumulo.core.client.admin.InstanceOperations) Before(org.junit.Before)

Example 2 with InstanceOperations

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);
    }
}
Also used : InstanceOperations(org.apache.accumulo.core.client.admin.InstanceOperations) After(org.junit.After)

Example 3 with InstanceOperations

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;
}
Also used : InstanceOperations(org.apache.accumulo.core.client.admin.InstanceOperations)

Example 4 with InstanceOperations

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());
}
Also used : InstanceOperations(org.apache.accumulo.core.client.admin.InstanceOperations) Before(org.junit.Before)

Example 5 with InstanceOperations

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");
}
Also used : InstanceOperations(org.apache.accumulo.core.client.admin.InstanceOperations) Before(org.junit.Before)

Aggregations

InstanceOperations (org.apache.accumulo.core.client.admin.InstanceOperations)13 Before (org.junit.Before)6 After (org.junit.After)3 AccumuloException (org.apache.accumulo.core.client.AccumuloException)1 Instance (org.apache.accumulo.core.client.Instance)1 ZooCache (org.apache.accumulo.fate.zookeeper.ZooCache)1