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();
}
Aggregations