Search in sources :

Example 6 with MasterClientContext

use of alluxio.master.MasterClientContext 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 });
}
Also used : Context(alluxio.cli.fsadmin.command.Context) MasterClientContext(alluxio.master.MasterClientContext) ClientContext(alluxio.ClientContext) JobMasterClientContext(alluxio.worker.job.JobMasterClientContext) RetryHandlingFileSystemMasterClient(alluxio.client.file.RetryHandlingFileSystemMasterClient) RetryHandlingJournalMasterClient(alluxio.client.journal.RetryHandlingJournalMasterClient) RetryHandlingJobMasterClient(alluxio.client.job.RetryHandlingJobMasterClient) JobMasterClientContext(alluxio.worker.job.JobMasterClientContext) MasterClientContext(alluxio.master.MasterClientContext) ClientContext(alluxio.ClientContext) JobMasterClientContext(alluxio.worker.job.JobMasterClientContext) MasterClientContext(alluxio.master.MasterClientContext) JobMasterClientContext(alluxio.worker.job.JobMasterClientContext) RetryHandlingMetaMasterClient(alluxio.client.meta.RetryHandlingMetaMasterClient) RetryHandlingMetaMasterConfigClient(alluxio.client.meta.RetryHandlingMetaMasterConfigClient) RetryHandlingMetricsMasterClient(alluxio.client.metrics.RetryHandlingMetricsMasterClient) RetryHandlingBlockMasterClient(alluxio.client.block.RetryHandlingBlockMasterClient)

Example 7 with MasterClientContext

use of alluxio.master.MasterClientContext in project alluxio by Alluxio.

the class TableMasterClientTest method before.

@Before
public final void before() throws Exception {
    mFileSystem = mLocalAlluxioClusterResource.get().getClient();
    MasterClientContext context = MasterClientContext.newBuilder(ClientContext.create(ServerConfiguration.global())).build();
    mTableMasterClient = new RetryHandlingTableMasterClient(context);
    mFSMasterClient = new FileSystemMasterClient(context);
}
Also used : FileSystemMasterClient(alluxio.worker.file.FileSystemMasterClient) MasterClientContext(alluxio.master.MasterClientContext) Before(org.junit.Before)

Aggregations

MasterClientContext (alluxio.master.MasterClientContext)7 ClientContext (alluxio.ClientContext)3 Test (org.junit.Test)3 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)3 RetryHandlingBlockMasterClient (alluxio.client.block.RetryHandlingBlockMasterClient)2 RetryHandlingFileSystemMasterClient (alluxio.client.file.RetryHandlingFileSystemMasterClient)2 RetryHandlingMetaMasterClient (alluxio.client.meta.RetryHandlingMetaMasterClient)2 MasterInquireClient (alluxio.master.MasterInquireClient)2 Context (alluxio.cli.fsadmin.command.Context)1 RetryHandlingJobMasterClient (alluxio.client.job.RetryHandlingJobMasterClient)1 RetryHandlingJournalMasterClient (alluxio.client.journal.RetryHandlingJournalMasterClient)1 RetryHandlingMetaMasterConfigClient (alluxio.client.meta.RetryHandlingMetaMasterConfigClient)1 RetryHandlingMetricsMasterClient (alluxio.client.metrics.RetryHandlingMetricsMasterClient)1 RetryHandlingTableMasterClient (alluxio.client.table.RetryHandlingTableMasterClient)1 AlluxioConfiguration (alluxio.conf.AlluxioConfiguration)1 InstancedConfiguration (alluxio.conf.InstancedConfiguration)1 DeadlineExceededException (alluxio.exception.status.DeadlineExceededException)1 InternalException (alluxio.exception.status.InternalException)1 NotFoundException (alluxio.exception.status.NotFoundException)1 BlockMasterWorkerServiceStub (alluxio.grpc.BlockMasterWorkerServiceGrpc.BlockMasterWorkerServiceStub)1