parent
8baebb54e1
commit
e6fb6ee94d
@ -28,6 +28,9 @@
|
||||
.OMResponse;
|
||||
import org.apache.hadoop.hdds.utils.db.BatchOperation;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
/**
|
||||
* Response for CreateBucket request.
|
||||
*/
|
||||
@ -35,8 +38,8 @@ public final class OMBucketCreateResponse extends OMClientResponse {
|
||||
|
||||
private final OmBucketInfo omBucketInfo;
|
||||
|
||||
public OMBucketCreateResponse(OmBucketInfo omBucketInfo,
|
||||
OMResponse omResponse) {
|
||||
public OMBucketCreateResponse(@Nullable OmBucketInfo omBucketInfo,
|
||||
@Nonnull OMResponse omResponse) {
|
||||
super(omResponse);
|
||||
this.omBucketInfo = omBucketInfo;
|
||||
}
|
||||
@ -56,6 +59,7 @@ public void addToDBBatch(OMMetadataManager omMetadataManager,
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public OmBucketInfo getOmBucketInfo() {
|
||||
return omBucketInfo;
|
||||
}
|
||||
|
@ -25,6 +25,9 @@
|
||||
import org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos;
|
||||
import org.apache.hadoop.hdds.utils.db.BatchOperation;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
/**
|
||||
* Response for DeleteBucket request.
|
||||
*/
|
||||
@ -35,7 +38,7 @@ public final class OMBucketDeleteResponse extends OMClientResponse {
|
||||
|
||||
public OMBucketDeleteResponse(
|
||||
String volumeName, String bucketName,
|
||||
OzoneManagerProtocolProtos.OMResponse omResponse) {
|
||||
@Nonnull OzoneManagerProtocolProtos.OMResponse omResponse) {
|
||||
super(omResponse);
|
||||
this.volumeName = volumeName;
|
||||
this.bucketName = bucketName;
|
||||
|
@ -27,14 +27,17 @@
|
||||
.OMResponse;
|
||||
import org.apache.hadoop.hdds.utils.db.BatchOperation;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
/**
|
||||
* Response for SetBucketProperty request.
|
||||
*/
|
||||
public class OMBucketSetPropertyResponse extends OMClientResponse {
|
||||
private OmBucketInfo omBucketInfo;
|
||||
|
||||
public OMBucketSetPropertyResponse(OmBucketInfo omBucketInfo,
|
||||
OMResponse omResponse) {
|
||||
public OMBucketSetPropertyResponse(@Nullable OmBucketInfo omBucketInfo,
|
||||
@Nonnull OMResponse omResponse) {
|
||||
super(omResponse);
|
||||
this.omBucketInfo = omBucketInfo;
|
||||
}
|
||||
|
@ -29,6 +29,7 @@
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import javax.annotation.Nonnull;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
@ -41,7 +42,7 @@ public class OMDirectoryCreateResponse extends OMClientResponse {
|
||||
private OmKeyInfo dirKeyInfo;
|
||||
|
||||
public OMDirectoryCreateResponse(@Nullable OmKeyInfo dirKeyInfo,
|
||||
OMResponse omResponse) {
|
||||
@Nonnull OMResponse omResponse) {
|
||||
super(omResponse);
|
||||
this.dirKeyInfo = dirKeyInfo;
|
||||
}
|
||||
|
@ -19,6 +19,7 @@
|
||||
package org.apache.hadoop.ozone.om.response.file;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import org.apache.hadoop.ozone.om.helpers.OmKeyInfo;
|
||||
import org.apache.hadoop.ozone.om.response.key.OMKeyCreateResponse;
|
||||
@ -33,7 +34,7 @@
|
||||
public class OMFileCreateResponse extends OMKeyCreateResponse {
|
||||
|
||||
public OMFileCreateResponse(@Nullable OmKeyInfo omKeyInfo,
|
||||
long openKeySessionID, OMResponse omResponse) {
|
||||
long openKeySessionID, @Nonnull OMResponse omResponse) {
|
||||
super(omKeyInfo, openKeySessionID, omResponse);
|
||||
}
|
||||
|
||||
|
@ -27,6 +27,8 @@
|
||||
import org.apache.hadoop.hdds.utils.db.BatchOperation;
|
||||
|
||||
import java.io.IOException;
|
||||
import javax.annotation.Nullable;
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
/**
|
||||
* Response for AllocateBlock request.
|
||||
@ -36,8 +38,8 @@ public class OMAllocateBlockResponse extends OMClientResponse {
|
||||
private final OmKeyInfo omKeyInfo;
|
||||
private final long clientID;
|
||||
|
||||
public OMAllocateBlockResponse(OmKeyInfo omKeyInfo,
|
||||
long clientID, OMResponse omResponse) {
|
||||
public OMAllocateBlockResponse(@Nullable OmKeyInfo omKeyInfo,
|
||||
long clientID, @Nonnull OMResponse omResponse) {
|
||||
super(omResponse);
|
||||
this.omKeyInfo = omKeyInfo;
|
||||
this.clientID = clientID;
|
||||
|
@ -25,6 +25,8 @@
|
||||
import org.apache.hadoop.hdds.utils.db.BatchOperation;
|
||||
|
||||
import java.io.IOException;
|
||||
import javax.annotation.Nullable;
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
/**
|
||||
* Response for CommitKey request.
|
||||
@ -34,8 +36,8 @@ public class OMKeyCommitResponse extends OMClientResponse {
|
||||
private OmKeyInfo omKeyInfo;
|
||||
private long openKeySessionID;
|
||||
|
||||
public OMKeyCommitResponse(OmKeyInfo omKeyInfo, long openKeySessionID,
|
||||
OzoneManagerProtocolProtos.OMResponse omResponse) {
|
||||
public OMKeyCommitResponse(@Nullable OmKeyInfo omKeyInfo, long openKeySessionID,
|
||||
@Nonnull OzoneManagerProtocolProtos.OMResponse omResponse) {
|
||||
super(omResponse);
|
||||
this.omKeyInfo = omKeyInfo;
|
||||
this.openKeySessionID = openKeySessionID;
|
||||
|
@ -20,6 +20,7 @@
|
||||
|
||||
import java.io.IOException;
|
||||
import javax.annotation.Nullable;
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import org.apache.hadoop.ozone.om.OMMetadataManager;
|
||||
import org.apache.hadoop.ozone.om.helpers.OmKeyInfo;
|
||||
@ -38,7 +39,7 @@ public class OMKeyCreateResponse extends OMClientResponse {
|
||||
private long openKeySessionID;
|
||||
|
||||
public OMKeyCreateResponse(@Nullable OmKeyInfo omKeyInfo,
|
||||
long openKeySessionID, OMResponse omResponse) {
|
||||
long openKeySessionID, @Nonnull OMResponse omResponse) {
|
||||
super(omResponse);
|
||||
this.omKeyInfo = omKeyInfo;
|
||||
this.openKeySessionID = openKeySessionID;
|
||||
|
@ -29,6 +29,8 @@
|
||||
import org.apache.hadoop.hdds.utils.db.BatchOperation;
|
||||
|
||||
import java.io.IOException;
|
||||
import javax.annotation.Nullable;
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
/**
|
||||
* Response for DeleteKey request.
|
||||
@ -36,7 +38,8 @@
|
||||
public class OMKeyDeleteResponse extends OMClientResponse {
|
||||
private OmKeyInfo omKeyInfo;
|
||||
|
||||
public OMKeyDeleteResponse(OmKeyInfo omKeyInfo, OMResponse omResponse) {
|
||||
|
||||
public OMKeyDeleteResponse(@Nullable OmKeyInfo omKeyInfo, @Nonnull OMResponse omResponse) {
|
||||
super(omResponse);
|
||||
this.omKeyInfo = omKeyInfo;
|
||||
}
|
||||
@ -83,7 +86,7 @@ public void addToDBBatch(OMMetadataManager omMetadataManager,
|
||||
* @param keyInfo
|
||||
* @return if empty true, else false.
|
||||
*/
|
||||
private boolean isKeyEmpty(OmKeyInfo keyInfo) {
|
||||
private boolean isKeyEmpty(@Nullable OmKeyInfo keyInfo) {
|
||||
for (OmKeyLocationInfoGroup keyLocationList : keyInfo
|
||||
.getKeyLocationVersions()) {
|
||||
if (keyLocationList.getLocationList().size() != 0) {
|
||||
|
@ -27,6 +27,7 @@
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
/**
|
||||
* Response for {@link OMKeyPurgeRequest} request.
|
||||
@ -35,7 +36,7 @@ public class OMKeyPurgeResponse extends OMClientResponse {
|
||||
|
||||
private List<String> purgeKeyList;
|
||||
|
||||
public OMKeyPurgeResponse(List<String> keyList, OMResponse omResponse) {
|
||||
public OMKeyPurgeResponse(List<String> keyList, @Nonnull OMResponse omResponse) {
|
||||
super(omResponse);
|
||||
this.purgeKeyList = keyList;
|
||||
}
|
||||
|
@ -27,6 +27,8 @@
|
||||
import org.apache.hadoop.hdds.utils.db.BatchOperation;
|
||||
|
||||
import java.io.IOException;
|
||||
import javax.annotation.Nullable;
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
/**
|
||||
* Response for RenameKey request.
|
||||
@ -37,8 +39,8 @@ public class OMKeyRenameResponse extends OMClientResponse {
|
||||
private final String toKeyName;
|
||||
private final String fromKeyName;
|
||||
|
||||
public OMKeyRenameResponse(OmKeyInfo renameKeyInfo, String toKeyName,
|
||||
String fromKeyName, OMResponse omResponse) {
|
||||
public OMKeyRenameResponse(@Nullable OmKeyInfo renameKeyInfo, String toKeyName,
|
||||
String fromKeyName, @Nonnull OMResponse omResponse) {
|
||||
super(omResponse);
|
||||
this.renameKeyInfo = renameKeyInfo;
|
||||
this.toKeyName = toKeyName;
|
||||
|
@ -33,6 +33,8 @@
|
||||
import java.io.IOException;
|
||||
import java.util.Map;
|
||||
import java.util.TreeMap;
|
||||
import javax.annotation.Nullable;
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
/**
|
||||
* Response for Multipart Abort Request.
|
||||
@ -43,7 +45,7 @@ public class S3MultipartUploadAbortResponse extends OMClientResponse {
|
||||
private OmMultipartKeyInfo omMultipartKeyInfo;
|
||||
|
||||
public S3MultipartUploadAbortResponse(String multipartKey,
|
||||
OmMultipartKeyInfo omMultipartKeyInfo, OMResponse omResponse) {
|
||||
@Nullable OmMultipartKeyInfo omMultipartKeyInfo, @Nonnull OMResponse omResponse) {
|
||||
super(omResponse);
|
||||
this.multipartKey = multipartKey;
|
||||
this.omMultipartKeyInfo = omMultipartKeyInfo;
|
||||
|
@ -34,6 +34,9 @@
|
||||
import static org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos
|
||||
.Status.OK;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
/**
|
||||
* Response for S3MultipartUploadCommitPart request.
|
||||
*/
|
||||
@ -47,10 +50,10 @@ public class S3MultipartUploadCommitPartResponse extends OMClientResponse {
|
||||
|
||||
|
||||
public S3MultipartUploadCommitPartResponse(String multipartKey,
|
||||
String openKey, OmKeyInfo deletePartKeyInfo,
|
||||
OmMultipartKeyInfo omMultipartKeyInfo,
|
||||
OzoneManagerProtocolProtos.PartKeyInfo oldPartKeyInfo,
|
||||
OMResponse omResponse) {
|
||||
String openKey, @Nullable OmKeyInfo deletePartKeyInfo,
|
||||
@Nullable OmMultipartKeyInfo omMultipartKeyInfo,
|
||||
@Nullable OzoneManagerProtocolProtos.PartKeyInfo oldPartKeyInfo,
|
||||
@Nonnull OMResponse omResponse) {
|
||||
super(omResponse);
|
||||
this.multipartKey = multipartKey;
|
||||
this.openKey = openKey;
|
||||
|
@ -29,6 +29,7 @@
|
||||
import org.apache.hadoop.hdds.utils.db.BatchOperation;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
/**
|
||||
* Response for Multipart Upload Complete request.
|
||||
@ -39,7 +40,7 @@ public class S3MultipartUploadCompleteResponse extends OMClientResponse {
|
||||
|
||||
|
||||
public S3MultipartUploadCompleteResponse(@Nullable String multipartKey,
|
||||
@Nullable OmKeyInfo omKeyInfo, OMResponse omResponse) {
|
||||
@Nullable OmKeyInfo omKeyInfo, @Nonnull OMResponse omResponse) {
|
||||
super(omResponse);
|
||||
this.multipartKey = multipartKey;
|
||||
this.omKeyInfo = omKeyInfo;
|
||||
|
@ -25,6 +25,7 @@
|
||||
import org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.OMResponse;
|
||||
import org.apache.hadoop.hdds.utils.db.BatchOperation;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
@ -35,7 +36,7 @@ public class OMVolumeAclOpResponse extends OMClientResponse {
|
||||
private OmVolumeArgs omVolumeArgs;
|
||||
|
||||
public OMVolumeAclOpResponse(OmVolumeArgs omVolumeArgs,
|
||||
OMResponse omResponse) {
|
||||
@Nonnull OMResponse omResponse) {
|
||||
super(omResponse);
|
||||
this.omVolumeArgs = omVolumeArgs;
|
||||
}
|
||||
|
@ -32,6 +32,8 @@
|
||||
|
||||
import org.apache.hadoop.hdds.utils.db.BatchOperation;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
/**
|
||||
* Response for CreateBucket request.
|
||||
*/
|
||||
@ -41,7 +43,7 @@ public class OMVolumeCreateResponse extends OMClientResponse {
|
||||
private OmVolumeArgs omVolumeArgs;
|
||||
|
||||
public OMVolumeCreateResponse(OmVolumeArgs omVolumeArgs,
|
||||
VolumeList volumeList, OMResponse omResponse) {
|
||||
VolumeList volumeList, @Nonnull OMResponse omResponse) {
|
||||
super(omResponse);
|
||||
this.omVolumeArgs = omVolumeArgs;
|
||||
this.volumeList = volumeList;
|
||||
|
@ -29,6 +29,8 @@
|
||||
.VolumeList;
|
||||
import org.apache.hadoop.hdds.utils.db.BatchOperation;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
/**
|
||||
* Response for CreateVolume request.
|
||||
*/
|
||||
@ -38,7 +40,7 @@ public class OMVolumeDeleteResponse extends OMClientResponse {
|
||||
private VolumeList updatedVolumeList;
|
||||
|
||||
public OMVolumeDeleteResponse(String volume, String owner,
|
||||
VolumeList updatedVolumeList, OMResponse omResponse) {
|
||||
VolumeList updatedVolumeList, @Nonnull OMResponse omResponse) {
|
||||
super(omResponse);
|
||||
this.volume = volume;
|
||||
this.owner = owner;
|
||||
|
@ -31,6 +31,8 @@
|
||||
.OMResponse;
|
||||
import org.apache.hadoop.hdds.utils.db.BatchOperation;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
/**
|
||||
* Response for set owner request.
|
||||
*/
|
||||
@ -43,7 +45,7 @@ public class OMVolumeSetOwnerResponse extends OMClientResponse {
|
||||
|
||||
public OMVolumeSetOwnerResponse(String oldOwner,
|
||||
VolumeList oldOwnerVolumeList, VolumeList newOwnerVolumeList,
|
||||
OmVolumeArgs newOwnerVolumeArgs, OMResponse omResponse) {
|
||||
OmVolumeArgs newOwnerVolumeArgs, @Nonnull OMResponse omResponse) {
|
||||
super(omResponse);
|
||||
this.oldOwner = oldOwner;
|
||||
this.oldOwnerVolumeList = oldOwnerVolumeList;
|
||||
|
@ -28,6 +28,8 @@
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
/**
|
||||
* Response for set quota request.
|
||||
*/
|
||||
@ -35,7 +37,7 @@ public class OMVolumeSetQuotaResponse extends OMClientResponse {
|
||||
private OmVolumeArgs omVolumeArgs;
|
||||
|
||||
public OMVolumeSetQuotaResponse(OmVolumeArgs omVolumeArgs,
|
||||
OMResponse omResponse) {
|
||||
@Nonnull OMResponse omResponse) {
|
||||
super(omResponse);
|
||||
this.omVolumeArgs = omVolumeArgs;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user