Search in sources :

Example 6 with ContainerOperationClient

use of org.apache.hadoop.hdds.scm.cli.ContainerOperationClient in project ozone by apache.

the class TestDecommissionAndMaintenance method setUp.

@Before
public void setUp() throws Exception {
    cluster = clusterProvider.provide();
    setManagers();
    bucket = TestDataUtil.createVolumeAndBucket(cluster, volName, bucketName);
    scmClient = new ContainerOperationClient(cluster.getConf());
}
Also used : ContainerOperationClient(org.apache.hadoop.hdds.scm.cli.ContainerOperationClient) Before(org.junit.Before)

Example 7 with ContainerOperationClient

use of org.apache.hadoop.hdds.scm.cli.ContainerOperationClient in project ozone by apache.

the class TestQueryNode method setUp.

@Before
public void setUp() throws Exception {
    OzoneConfiguration conf = new OzoneConfiguration();
    final int interval = 100;
    conf.setTimeDuration(OZONE_SCM_HEARTBEAT_PROCESS_INTERVAL, interval, TimeUnit.MILLISECONDS);
    conf.setTimeDuration(HDDS_HEARTBEAT_INTERVAL, 1, SECONDS);
    conf.setTimeDuration(HDDS_PIPELINE_REPORT_INTERVAL, 1, SECONDS);
    conf.setTimeDuration(HDDS_COMMAND_STATUS_REPORT_INTERVAL, 1, SECONDS);
    conf.setTimeDuration(HDDS_CONTAINER_REPORT_INTERVAL, 1, SECONDS);
    conf.setTimeDuration(HDDS_NODE_REPORT_INTERVAL, 1, SECONDS);
    conf.setTimeDuration(OZONE_SCM_STALENODE_INTERVAL, 3, SECONDS);
    conf.setTimeDuration(OZONE_SCM_DEADNODE_INTERVAL, 6, SECONDS);
    conf.setInt(ScmConfigKeys.OZONE_DATANODE_PIPELINE_LIMIT, 3);
    cluster = MiniOzoneCluster.newBuilder(conf).setNumDatanodes(numOfDatanodes).setTotalPipelineNumLimit(numOfDatanodes + numOfDatanodes / 2).build();
    cluster.waitForClusterToBeReady();
    scmClient = new ContainerOperationClient(conf);
}
Also used : OzoneConfiguration(org.apache.hadoop.hdds.conf.OzoneConfiguration) ContainerOperationClient(org.apache.hadoop.hdds.scm.cli.ContainerOperationClient) Before(org.junit.Before)

Aggregations

ContainerOperationClient (org.apache.hadoop.hdds.scm.cli.ContainerOperationClient)7 OzoneConfiguration (org.apache.hadoop.hdds.conf.OzoneConfiguration)5 Before (org.junit.Before)3 DatanodeDetails (org.apache.hadoop.hdds.protocol.DatanodeDetails)2 BeforeClass (org.junit.BeforeClass)2 Gson (com.google.gson.Gson)1 GsonBuilder (com.google.gson.GsonBuilder)1 JsonArray (com.google.gson.JsonArray)1 JsonElement (com.google.gson.JsonElement)1 JsonObject (com.google.gson.JsonObject)1 File (java.io.File)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1 Map (java.util.Map)1 ContainerProtos (org.apache.hadoop.hdds.protocol.datanode.proto.ContainerProtos)1 ContainerInfo (org.apache.hadoop.hdds.scm.container.ContainerInfo)1 ContainerWithPipeline (org.apache.hadoop.hdds.scm.container.common.helpers.ContainerWithPipeline)1 Pipeline (org.apache.hadoop.hdds.scm.pipeline.Pipeline)1 ChunkInfo (org.apache.hadoop.ozone.container.common.helpers.ChunkInfo)1