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