Search in sources :

Example 6 with VersionEndpointTask

use of org.apache.hadoop.ozone.container.common.states.endpoint.VersionEndpointTask in project ozone by apache.

the class TestDatanodeUpgradeToScmHA method callVersionEndpointTask.

/**
 * Get the cluster ID and SCM ID from SCM to the datanode.
 */
public void callVersionEndpointTask() throws Exception {
    try (EndpointStateMachine esm = ContainerTestUtils.createEndpoint(conf, address, 1000)) {
        VersionEndpointTask vet = new VersionEndpointTask(esm, conf, dsm.getContainer());
        esm.setState(EndpointStateMachine.EndPointStates.GETVERSION);
        vet.call();
    }
}
Also used : EndpointStateMachine(org.apache.hadoop.ozone.container.common.statemachine.EndpointStateMachine) VersionEndpointTask(org.apache.hadoop.ozone.container.common.states.endpoint.VersionEndpointTask)

Aggregations

EndpointStateMachine (org.apache.hadoop.ozone.container.common.statemachine.EndpointStateMachine)6 VersionEndpointTask (org.apache.hadoop.ozone.container.common.states.endpoint.VersionEndpointTask)6 OzoneConfiguration (org.apache.hadoop.hdds.conf.OzoneConfiguration)4 DatanodeDetails (org.apache.hadoop.hdds.protocol.DatanodeDetails)4 MockDatanodeDetails.randomDatanodeDetails (org.apache.hadoop.hdds.protocol.MockDatanodeDetails.randomDatanodeDetails)4 OzoneContainer (org.apache.hadoop.ozone.container.ozoneimpl.OzoneContainer)4 Test (org.junit.Test)4 ReplicationConfig (org.apache.hadoop.ozone.container.replication.ReplicationServer.ReplicationConfig)2 InetSocketAddress (java.net.InetSocketAddress)1 EnumMap (java.util.EnumMap)1 Callable (java.util.concurrent.Callable)1 EndPointStates (org.apache.hadoop.ozone.container.common.statemachine.EndpointStateMachine.EndPointStates)1 HddsVolume (org.apache.hadoop.ozone.container.common.volume.HddsVolume)1 GenericTestUtils (org.apache.ozone.test.GenericTestUtils)1