Search in sources :

Example 1 with LoadMetadataPOptions

use of alluxio.grpc.LoadMetadataPOptions in project alluxio by Alluxio.

the class LoadMetadataContext method mergeFrom.

/**
 * Merges and embeds the given {@link LoadMetadataPOptions} with the corresponding master options.
 *
 * @param optionsBuilder Builder for proto {@link LoadMetadataPOptions} to embed
 * @return the instance of {@link LoadMetadataContext} with default values for master
 */
public static LoadMetadataContext mergeFrom(LoadMetadataPOptions.Builder optionsBuilder) {
    LoadMetadataPOptions masterOptions = FileSystemOptions.loadMetadataDefaults(ServerConfiguration.global());
    LoadMetadataPOptions.Builder mergedOptionsBuilder = masterOptions.toBuilder().mergeFrom(optionsBuilder.build());
    return create(mergedOptionsBuilder);
}
Also used : LoadMetadataPOptions(alluxio.grpc.LoadMetadataPOptions)

Example 2 with LoadMetadataPOptions

use of alluxio.grpc.LoadMetadataPOptions in project alluxio by Alluxio.

the class FileSystemOptionsTest method loadMetadataOptionsDefaults.

@Test
public void loadMetadataOptionsDefaults() {
    LoadMetadataPOptions options = FileSystemOptions.loadMetadataDefaults(mConf);
    assertNotNull(options);
    assertFalse(options.getCreateAncestors());
    assertFalse(options.getRecursive());
    assertEquals(options.getLoadDescendantType(), LoadDescendantPType.NONE);
}
Also used : LoadMetadataPOptions(alluxio.grpc.LoadMetadataPOptions) Test(org.junit.Test)

Aggregations

LoadMetadataPOptions (alluxio.grpc.LoadMetadataPOptions)2 Test (org.junit.Test)1