use of alluxio.client.file.RetryHandlingFileSystemMasterClient in project alluxio by Alluxio.
the class JournalCheckpointIntegrationTest method recoverUfsState.
@Test
public void recoverUfsState() throws Exception {
FileSystemMasterClient client = new RetryHandlingFileSystemMasterClient(MasterClientContext.newBuilder(ClientContext.create(ServerConfiguration.global())).build());
client.updateUfsMode(new AlluxioURI(""), UpdateUfsModePOptions.newBuilder().setUfsMode(UfsPMode.READ_ONLY).build());
backupAndRestore();
try {
mCluster.getClient().createDirectory(new AlluxioURI("/test"), CreateDirectoryPOptions.newBuilder().setWriteType(WritePType.THROUGH).build());
fail("Expected an exception to be thrown");
} catch (AccessControlException e) {
// Expected
}
}
use of alluxio.client.file.RetryHandlingFileSystemMasterClient in project alluxio by Alluxio.
the class MultiProcessCluster method getClients.
/**
* @return clients for communicating with the cluster
*/
public synchronized Clients getClients() {
Preconditions.checkState(mState == State.STARTED, "must be in the started state to create a meta master client, but state was %s", mState);
MasterClientContext config = MasterClientContext.newBuilder(ClientContext.create(ServerConfiguration.global())).setMasterInquireClient(getMasterInquireClient()).build();
return new Clients(getFileSystemClient(), new RetryHandlingFileSystemMasterClient(config), new RetryHandlingMetaMasterClient(config), new RetryHandlingBlockMasterClient(config));
}
use of alluxio.client.file.RetryHandlingFileSystemMasterClient in project alluxio by Alluxio.
the class FileSystemAdminShell method loadCommands.
@Override
protected Map<String, Command> loadCommands() {
ClientContext ctx = ClientContext.create(mConfiguration);
MasterClientContext masterConfig = MasterClientContext.newBuilder(ctx).build();
JobMasterClientContext jobMasterConfig = JobMasterClientContext.newBuilder(ctx).build();
Context adminContext = new Context(new RetryHandlingFileSystemMasterClient(masterConfig), new RetryHandlingBlockMasterClient(masterConfig), new RetryHandlingMetaMasterClient(masterConfig), new RetryHandlingMetaMasterConfigClient(masterConfig), new RetryHandlingMetricsMasterClient(masterConfig), new RetryHandlingJournalMasterClient(masterConfig), new RetryHandlingJournalMasterClient(jobMasterConfig), new RetryHandlingJobMasterClient(jobMasterConfig), System.out);
return CommandUtils.loadCommands(FileSystemAdminShell.class.getPackage().getName(), new Class[] { Context.class, AlluxioConfiguration.class }, new Object[] { mCloser.register(adminContext), mConfiguration });
}
Aggregations