Search in sources :

Example 6 with AlluxioBlockStore

use of alluxio.client.block.AlluxioBlockStore in project alluxio by Alluxio.

the class MasterFaultToleranceIntegrationTest method workerReRegister.

@Test
public void workerReRegister() throws Exception {
    AlluxioBlockStore store = AlluxioBlockStore.create();
    Assert.assertEquals(WORKER_CAPACITY_BYTES, store.getCapacityBytes());
    for (int kills = 0; kills < MASTERS - 1; kills++) {
        Assert.assertTrue(mMultiMasterLocalAlluxioCluster.stopLeader());
        mMultiMasterLocalAlluxioCluster.waitForNewMaster(CLUSTER_WAIT_TIMEOUT_MS);
        waitForWorkerRegistration(store, 1, 5 * Constants.SECOND_MS);
        // If worker is successfully re-registered, the capacity bytes should not change.
        Assert.assertEquals(WORKER_CAPACITY_BYTES, store.getCapacityBytes());
    }
}
Also used : AlluxioBlockStore(alluxio.client.block.AlluxioBlockStore) Test(org.junit.Test)

Aggregations

AlluxioBlockStore (alluxio.client.block.AlluxioBlockStore)6 URIStatus (alluxio.client.file.URIStatus)2 Test (org.junit.Test)2 AlluxioURI (alluxio.AlluxioURI)1 RemoteBlockInStream (alluxio.client.block.RemoteBlockInStream)1 BlockInfo (alluxio.wire.BlockInfo)1 BlockLocation (alluxio.wire.BlockLocation)1 WorkerNetAddress (alluxio.wire.WorkerNetAddress)1