Search in sources :

Example 6 with RenamePOptions

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

the class RenameContext method mergeFrom.

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

Aggregations

RenamePOptions (alluxio.grpc.RenamePOptions)6 AlluxioURI (alluxio.AlluxioURI)4 Test (org.junit.Test)4 BaseIntegrationTest (alluxio.testutils.BaseIntegrationTest)2 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)2 FileDoesNotExistException (alluxio.exception.FileDoesNotExistException)1