use of org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.LookupFileRequest in project ozone by apache.
the class OzoneManagerProtocolClientSideTranslatorPB method lookupFile.
@Override
public OmKeyInfo lookupFile(OmKeyArgs args) throws IOException {
KeyArgs keyArgs = KeyArgs.newBuilder().setVolumeName(args.getVolumeName()).setBucketName(args.getBucketName()).setKeyName(args.getKeyName()).setSortDatanodes(args.getSortDatanodes()).setLatestVersionLocation(args.getLatestVersionLocation()).build();
LookupFileRequest lookupFileRequest = LookupFileRequest.newBuilder().setKeyArgs(keyArgs).build();
OMRequest omRequest = createOMRequest(Type.LookupFile).setLookupFileRequest(lookupFileRequest).build();
LookupFileResponse resp = handleError(submitRequest(omRequest)).getLookupFileResponse();
return OmKeyInfo.getFromProtobuf(resp.getKeyInfo());
}
Aggregations