Search in sources :

Example 6 with RetryHandlingMetaMasterConfigClient

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

the class PathConfigurationIntegrationTest method before.

@Before
public void before() throws Exception {
    FileSystemContext metaCtx = FileSystemContext.create(ServerConfiguration.global());
    mMetaConfig = new RetryHandlingMetaMasterConfigClient(MasterClientContext.newBuilder(metaCtx.getClientContext()).build());
    setPathConfigurations(mMetaConfig);
    FileSystemContext fsCtx = FileSystemContext.create(ServerConfiguration.global());
    fsCtx.getClientContext().loadConf(fsCtx.getMasterAddress(), true, true);
    mFileSystem = mLocalAlluxioClusterResource.get().getClient(fsCtx);
    mWriteThrough = CreateFilePOptions.newBuilder().setRecursive(true).setWriteType(WritePType.THROUGH).build();
}
Also used : FileSystemContext(alluxio.client.file.FileSystemContext) RetryHandlingMetaMasterConfigClient(alluxio.client.meta.RetryHandlingMetaMasterConfigClient) Before(org.junit.Before)

Example 7 with RetryHandlingMetaMasterConfigClient

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

the class ListCommandIntegrationTest method setPathConfigurations.

/**
 * Sets path level configurations through meta master client, and update client configurations
 * from meta master afterwards.
 *
 * @return the configuration after updating from meta master
 */
private InstancedConfiguration setPathConfigurations() throws Exception {
    FileSystemContext metaCtx = FileSystemContext.create(ServerConfiguration.global());
    MetaMasterConfigClient client = new RetryHandlingMetaMasterConfigClient(MasterClientContext.newBuilder(metaCtx.getClientContext()).build());
    client.setPathConfiguration(new AlluxioURI(DIR1), PROPERTY_KEY1, PROPERTY_VALUE1);
    client.setPathConfiguration(new AlluxioURI(DIR2), PROPERTY_KEY2, PROPERTY_VALUE2);
    InetSocketAddress address = sLocalAlluxioClusterResource.get().getLocalAlluxioMaster().getAddress();
    FileSystemContext fsCtx = FileSystemContext.create(ServerConfiguration.global());
    fsCtx.getClientContext().loadConf(address, true, true);
    return (InstancedConfiguration) fsCtx.getClusterConf();
}
Also used : InstancedConfiguration(alluxio.conf.InstancedConfiguration) RetryHandlingMetaMasterConfigClient(alluxio.client.meta.RetryHandlingMetaMasterConfigClient) MetaMasterConfigClient(alluxio.client.meta.MetaMasterConfigClient) InetSocketAddress(java.net.InetSocketAddress) FileSystemContext(alluxio.client.file.FileSystemContext) RetryHandlingMetaMasterConfigClient(alluxio.client.meta.RetryHandlingMetaMasterConfigClient) AlluxioURI(alluxio.AlluxioURI)

Example 8 with RetryHandlingMetaMasterConfigClient

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

the class ShowCommandIntegrationTest method setPathConfigurations.

/**
 * Sets path level configurations through meta master client, and update client configurations
 * from meta master afterwards.
 *
 * @return the configuration after updating from meta master
 */
private InstancedConfiguration setPathConfigurations() throws Exception {
    FileSystemContext metaCtx = FileSystemContext.create(ServerConfiguration.global());
    MetaMasterConfigClient client = new RetryHandlingMetaMasterConfigClient(MasterClientContext.newBuilder(metaCtx.getClientContext()).build());
    client.setPathConfiguration(new AlluxioURI(DIR1), PROPERTY_KEY11, PROPERTY_VALUE11);
    client.setPathConfiguration(new AlluxioURI(DIR1), PROPERTY_KEY12, PROPERTY_VALUE12);
    client.setPathConfiguration(new AlluxioURI(DIR2), PROPERTY_KEY2, PROPERTY_VALUE2);
    InetSocketAddress address = sLocalAlluxioClusterResource.get().getLocalAlluxioMaster().getAddress();
    FileSystemContext fsCtx = FileSystemContext.create(ServerConfiguration.global());
    fsCtx.getClientContext().loadConf(address, true, true);
    return (InstancedConfiguration) fsCtx.getClusterConf();
}
Also used : InstancedConfiguration(alluxio.conf.InstancedConfiguration) RetryHandlingMetaMasterConfigClient(alluxio.client.meta.RetryHandlingMetaMasterConfigClient) MetaMasterConfigClient(alluxio.client.meta.MetaMasterConfigClient) InetSocketAddress(java.net.InetSocketAddress) FileSystemContext(alluxio.client.file.FileSystemContext) RetryHandlingMetaMasterConfigClient(alluxio.client.meta.RetryHandlingMetaMasterConfigClient) AlluxioURI(alluxio.AlluxioURI)

Example 9 with RetryHandlingMetaMasterConfigClient

use of alluxio.client.meta.RetryHandlingMetaMasterConfigClient 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)

Aggregations

RetryHandlingMetaMasterConfigClient (alluxio.client.meta.RetryHandlingMetaMasterConfigClient)9 FileSystemContext (alluxio.client.file.FileSystemContext)3 MetaMasterConfigClient (alluxio.client.meta.MetaMasterConfigClient)3 AlluxioURI (alluxio.AlluxioURI)2 InstancedConfiguration (alluxio.conf.InstancedConfiguration)2 InetSocketAddress (java.net.InetSocketAddress)2 Test (org.junit.Test)2 ClientContext (alluxio.ClientContext)1 Context (alluxio.cli.fsadmin.command.Context)1 RetryHandlingBlockMasterClient (alluxio.client.block.RetryHandlingBlockMasterClient)1 RetryHandlingFileSystemMasterClient (alluxio.client.file.RetryHandlingFileSystemMasterClient)1 RetryHandlingJobMasterClient (alluxio.client.job.RetryHandlingJobMasterClient)1 RetryHandlingJournalMasterClient (alluxio.client.journal.RetryHandlingJournalMasterClient)1 RetryHandlingMetaMasterClient (alluxio.client.meta.RetryHandlingMetaMasterClient)1 RetryHandlingMetricsMasterClient (alluxio.client.metrics.RetryHandlingMetricsMasterClient)1 PropertyKey (alluxio.conf.PropertyKey)1 ConfigProperty (alluxio.grpc.ConfigProperty)1 MasterClientContext (alluxio.master.MasterClientContext)1 JobMasterClientContext (alluxio.worker.job.JobMasterClientContext)1 VisibleForTesting (com.google.common.annotations.VisibleForTesting)1