Search in sources :

Example 1 with GetClusterIdResponse

use of org.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.GetClusterIdResponse in project hbase by apache.

the class TestClientMetaServiceRPCs method TestClusterID.

/**
 * Verifies the cluster ID from all running masters.
 */
@Test
public void TestClusterID() throws Exception {
    HBaseRpcController rpcController = getRpcController();
    String clusterID = TEST_UTIL.getMiniHBaseCluster().getMaster().getClusterId();
    int rpcCount = 0;
    for (JVMClusterUtil.MasterThread masterThread : TEST_UTIL.getMiniHBaseCluster().getMasterThreads()) {
        ClientMetaService.BlockingInterface stub = getMasterStub(masterThread.getMaster().getServerName());
        GetClusterIdResponse resp = stub.getClusterId(rpcController, GetClusterIdRequest.getDefaultInstance());
        assertEquals(clusterID, resp.getClusterId());
        rpcCount++;
    }
    assertEquals(MASTER_COUNT, rpcCount);
}
Also used : HBaseRpcController(org.apache.hadoop.hbase.ipc.HBaseRpcController) JVMClusterUtil(org.apache.hadoop.hbase.util.JVMClusterUtil) ClientMetaService(org.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.ClientMetaService) GetClusterIdResponse(org.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.GetClusterIdResponse) Test(org.junit.Test)

Aggregations

HBaseRpcController (org.apache.hadoop.hbase.ipc.HBaseRpcController)1 ClientMetaService (org.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.ClientMetaService)1 GetClusterIdResponse (org.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.GetClusterIdResponse)1 JVMClusterUtil (org.apache.hadoop.hbase.util.JVMClusterUtil)1 Test (org.junit.Test)1