Search in sources :

Example 1 with LookupFileRequest

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());
}
Also used : OMRequest(org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.OMRequest) OmKeyArgs(org.apache.hadoop.ozone.om.helpers.OmKeyArgs) DeleteKeyArgs(org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.DeleteKeyArgs) KeyArgs(org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.KeyArgs) LookupFileRequest(org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.LookupFileRequest) LookupFileResponse(org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.LookupFileResponse)

Aggregations

OmKeyArgs (org.apache.hadoop.ozone.om.helpers.OmKeyArgs)1 DeleteKeyArgs (org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.DeleteKeyArgs)1 KeyArgs (org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.KeyArgs)1 LookupFileRequest (org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.LookupFileRequest)1 LookupFileResponse (org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.LookupFileResponse)1 OMRequest (org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.OMRequest)1