use of alluxio.grpc.ScheduleAsyncPersistencePOptions in project alluxio by Alluxio.
the class ScheduleAsyncPersistenceContext method mergeFrom.
/**
* Merges and embeds the given {@link ScheduleAsyncPersistencePOptions}
* with the corresponding master options.
*
* @param optionsBuilder Builder for proto {@link ScheduleAsyncPersistencePOptions} to embed
* @return the instance of {@link ScheduleAsyncPersistenceContext} with default values for master
*/
public static ScheduleAsyncPersistenceContext mergeFrom(ScheduleAsyncPersistencePOptions.Builder optionsBuilder) {
ScheduleAsyncPersistencePOptions masterOptions = FileSystemOptions.scheduleAsyncPersistenceDefaults(ServerConfiguration.global());
ScheduleAsyncPersistencePOptions.Builder mergedOptionsBuilder = masterOptions.toBuilder().mergeFrom(optionsBuilder.build());
return create(mergedOptionsBuilder);
}
use of alluxio.grpc.ScheduleAsyncPersistencePOptions in project alluxio by Alluxio.
the class BaseFileSystem method persist.
@Override
public void persist(final AlluxioURI path, final ScheduleAsyncPersistencePOptions options) throws FileDoesNotExistException, IOException, AlluxioException {
checkUri(path);
rpc(client -> {
ScheduleAsyncPersistencePOptions mergedOptions = FileSystemOptions.scheduleAsyncPersistDefaults(mFsContext.getPathConf(path)).toBuilder().mergeFrom(options).build();
client.scheduleAsyncPersist(path, mergedOptions);
LOG.debug("Scheduled persist for {}, options: {}", path.getPath(), mergedOptions);
return null;
});
}
Aggregations