Search in sources :

Example 1 with SetBucketPropertyResponse

use of org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.SetBucketPropertyResponse in project ozone by apache.

the class OzoneManagerProtocolClientSideTranslatorPB method setBucketOwner.

/**
 * {@inheritDoc}
 */
@Override
public boolean setBucketOwner(OmBucketArgs args) throws IOException {
    SetBucketPropertyRequest.Builder req = SetBucketPropertyRequest.newBuilder();
    BucketArgs bucketArgs = args.getProtobuf();
    req.setBucketArgs(bucketArgs);
    OMRequest omRequest = createOMRequest(Type.SetBucketProperty).setSetBucketPropertyRequest(req).build();
    OMResponse omResponse = submitRequest(omRequest);
    SetBucketPropertyResponse response = handleError(omResponse).getSetBucketPropertyResponse();
    return response.getResponse();
}
Also used : OMRequest(org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.OMRequest) OmBucketArgs(org.apache.hadoop.ozone.om.helpers.OmBucketArgs) BucketArgs(org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.BucketArgs) SetBucketPropertyRequest(org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.SetBucketPropertyRequest) SetBucketPropertyResponse(org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.SetBucketPropertyResponse) OMResponse(org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.OMResponse)

Aggregations

OmBucketArgs (org.apache.hadoop.ozone.om.helpers.OmBucketArgs)1 BucketArgs (org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.BucketArgs)1 OMRequest (org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.OMRequest)1 OMResponse (org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.OMResponse)1 SetBucketPropertyRequest (org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.SetBucketPropertyRequest)1 SetBucketPropertyResponse (org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.SetBucketPropertyResponse)1