use of alluxio.grpc.FileSystemMasterCommonPOptions in project alluxio by Alluxio.
the class DefaultFileSystemMaster method loadMetadataIfNotExist.
/**
* Loads metadata for the path if it is (non-existing || load direct children is set).
*
* See {@link #shouldLoadMetadataIfNotExists(LockedInodePath, LoadMetadataContext)}.
*
* @param rpcContext the rpc context
* @param path the path to load metadata for
* @param context the {@link LoadMetadataContext}
* @param isGetFileInfo whether this is loading for a {@link #getFileInfo} call
*/
private void loadMetadataIfNotExist(RpcContext rpcContext, AlluxioURI path, LoadMetadataContext context, boolean isGetFileInfo) throws InvalidPathException, AccessControlException {
DescendantType syncDescendantType = GrpcUtils.fromProto(context.getOptions().getLoadDescendantType());
FileSystemMasterCommonPOptions commonOptions = context.getOptions().getCommonOptions();
boolean loadAlways = context.getOptions().hasLoadType() && (context.getOptions().getLoadType().equals(LoadMetadataPType.ALWAYS));
// load metadata only and force sync
InodeSyncStream sync = new InodeSyncStream(new LockingScheme(path, LockPattern.READ, false), this, rpcContext, syncDescendantType, commonOptions, isGetFileInfo, true, true, loadAlways);
if (sync.sync().equals(FAILED)) {
LOG.debug("Failed to load metadata for path from UFS: {}", path);
}
}
Aggregations