Class OMVolumeSetOwnerResponse
java.lang.Object
org.apache.hadoop.ozone.om.response.OMClientResponse
org.apache.hadoop.ozone.om.response.volume.OMVolumeSetOwnerResponse
Response for set owner request.
-
Constructor Summary
ConstructorsConstructorDescriptionOMVolumeSetOwnerResponse(org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.OMResponse omResponse) For when the request is not successful or when newOwner is the same as oldOwner.OMVolumeSetOwnerResponse(org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.OMResponse omResponse, String oldOwner, org.apache.hadoop.ozone.storage.proto.OzoneManagerStorageProtos.PersistedUserVolumeInfo oldOwnerVolumeList, org.apache.hadoop.ozone.storage.proto.OzoneManagerStorageProtos.PersistedUserVolumeInfo newOwnerVolumeList, org.apache.hadoop.ozone.om.helpers.OmVolumeArgs newOwnerVolumeArgs) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddToDBBatch(org.apache.hadoop.ozone.om.OMMetadataManager omMetadataManager, org.apache.hadoop.hdds.utils.db.BatchOperation batchOperation) Implement logic to add the response to batch.voidcheckAndUpdateDB(org.apache.hadoop.ozone.om.OMMetadataManager omMetadataManager, org.apache.hadoop.hdds.utils.db.BatchOperation batchOperation) Check if omResponse status is OK.Methods inherited from class org.apache.hadoop.ozone.om.response.OMClientResponse
checkStatusNotOK, getBucketLayout, getOmLockDetails, getOMResponse, setOmLockDetails
-
Constructor Details
-
OMVolumeSetOwnerResponse
public OMVolumeSetOwnerResponse(@Nonnull org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.OMResponse omResponse, @Nonnull String oldOwner, @Nonnull org.apache.hadoop.ozone.storage.proto.OzoneManagerStorageProtos.PersistedUserVolumeInfo oldOwnerVolumeList, @Nonnull org.apache.hadoop.ozone.storage.proto.OzoneManagerStorageProtos.PersistedUserVolumeInfo newOwnerVolumeList, @Nonnull org.apache.hadoop.ozone.om.helpers.OmVolumeArgs newOwnerVolumeArgs) -
OMVolumeSetOwnerResponse
public OMVolumeSetOwnerResponse(@Nonnull org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.OMResponse omResponse) For when the request is not successful or when newOwner is the same as oldOwner. For other successful requests, the other constructor should be used.
-
-
Method Details
-
checkAndUpdateDB
public void checkAndUpdateDB(org.apache.hadoop.ozone.om.OMMetadataManager omMetadataManager, org.apache.hadoop.hdds.utils.db.BatchOperation batchOperation) throws IOException Description copied from class:OMClientResponseCheck if omResponse status is OK. If yes, add to DB. For OmResponse with failure, this should do nothing. This method is not called in failure scenario in OM code.- Overrides:
checkAndUpdateDBin classOMClientResponse- Throws:
IOException
-
addToDBBatch
protected void addToDBBatch(org.apache.hadoop.ozone.om.OMMetadataManager omMetadataManager, org.apache.hadoop.hdds.utils.db.BatchOperation batchOperation) throws IOException Description copied from class:OMClientResponseImplement logic to add the response to batch. This function should be called from checkAndUpdateDB only.- Specified by:
addToDBBatchin classOMClientResponse- Throws:
IOException
-