Search in sources :

Example 1 with SetVolumePropertyResponse

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

the class OzoneManagerProtocolClientSideTranslatorPB method setOwner.

/**
 * {@inheritDoc}
 */
@Override
public boolean setOwner(String volume, String owner) throws IOException {
    SetVolumePropertyRequest.Builder req = SetVolumePropertyRequest.newBuilder();
    req.setVolumeName(volume).setOwnerName(owner);
    OMRequest omRequest = createOMRequest(Type.SetVolumeProperty).setSetVolumePropertyRequest(req).build();
    OMResponse omResponse = submitRequest(omRequest);
    SetVolumePropertyResponse response = handleError(omResponse).getSetVolumePropertyResponse();
    return response.getResponse();
}
Also used : OMRequest(org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.OMRequest) SetVolumePropertyRequest(org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.SetVolumePropertyRequest) SetVolumePropertyResponse(org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.SetVolumePropertyResponse) OMResponse(org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.OMResponse)

Aggregations

OMRequest (org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.OMRequest)1 OMResponse (org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.OMResponse)1 SetVolumePropertyRequest (org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.SetVolumePropertyRequest)1 SetVolumePropertyResponse (org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.SetVolumePropertyResponse)1