Search in sources :

Example 1 with MetaMasterConfigClient

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

the class FileSystemContextReinitIntegrationTest method updatePathConf.

private void updatePathConf() throws Exception {
    MetaMasterConfigClient client = new RetryHandlingMetaMasterConfigClient(MasterClientContext.newBuilder(mContext.getClientContext()).build());
    client.setPathConfiguration(PATH_TO_UPDATE, KEY_TO_UPDATE, UPDATED_VALUE);
}
Also used : RetryHandlingMetaMasterConfigClient(alluxio.client.meta.RetryHandlingMetaMasterConfigClient) MetaMasterConfigClient(alluxio.client.meta.MetaMasterConfigClient) RetryHandlingMetaMasterConfigClient(alluxio.client.meta.RetryHandlingMetaMasterConfigClient)

Example 2 with MetaMasterConfigClient

use of alluxio.client.meta.MetaMasterConfigClient 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 3 with MetaMasterConfigClient

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

Aggregations

MetaMasterConfigClient (alluxio.client.meta.MetaMasterConfigClient)3 RetryHandlingMetaMasterConfigClient (alluxio.client.meta.RetryHandlingMetaMasterConfigClient)3 AlluxioURI (alluxio.AlluxioURI)2 FileSystemContext (alluxio.client.file.FileSystemContext)2 InstancedConfiguration (alluxio.conf.InstancedConfiguration)2 InetSocketAddress (java.net.InetSocketAddress)2