Search in sources :

Example 6 with MetaMasterClient

use of alluxio.client.meta.MetaMasterClient in project alluxio by Alluxio.

the class JournalCheckpointIntegrationTest method backupAndRestore.

private void backupAndRestore() throws Exception {
    File backup = mFolder.newFolder("backup");
    MetaMasterClient metaClient = new RetryHandlingMetaMasterClient(MasterClientContext.newBuilder(ClientContext.create(ServerConfiguration.global())).build());
    AlluxioURI backupURI = metaClient.backup(BackupPRequest.newBuilder().setTargetDirectory(backup.getAbsolutePath()).setOptions(BackupPOptions.newBuilder().setLocalFileSystem(true)).build()).getBackupUri();
    ServerConfiguration.set(PropertyKey.MASTER_JOURNAL_INIT_FROM_BACKUP, backupURI);
    mCluster.formatAndRestartMasters();
}
Also used : RetryHandlingMetaMasterClient(alluxio.client.meta.RetryHandlingMetaMasterClient) MetaMasterClient(alluxio.client.meta.MetaMasterClient) RetryHandlingMetaMasterClient(alluxio.client.meta.RetryHandlingMetaMasterClient) File(java.io.File) AlluxioURI(alluxio.AlluxioURI)

Aggregations

MetaMasterClient (alluxio.client.meta.MetaMasterClient)6 RetryHandlingMetaMasterClient (alluxio.client.meta.RetryHandlingMetaMasterClient)5 AlluxioURI (alluxio.AlluxioURI)4 File (java.io.File)4 FileSystem (alluxio.client.file.FileSystem)3 BlockMasterClient (alluxio.client.block.BlockMasterClient)1 RetryHandlingBlockMasterClient (alluxio.client.block.RetryHandlingBlockMasterClient)1 URIStatus (alluxio.client.file.URIStatus)1 UnavailableException (alluxio.exception.status.UnavailableException)1 MasterInfo (alluxio.grpc.MasterInfo)1 MultiProcessCluster (alluxio.multi.process.MultiProcessCluster)1 AlluxioOperationThread (alluxio.testutils.AlluxioOperationThread)1 BaseIntegrationTest (alluxio.testutils.BaseIntegrationTest)1 IOException (java.io.IOException)1 ArrayList (java.util.ArrayList)1 TimeoutException (java.util.concurrent.TimeoutException)1 Test (org.junit.Test)1