bharatviswa504 commented on a change in pull request #428: HDDS-2868. Add
ObjectID and UpdateID to OMKeyInfo.
URL: https://github.com/apache/hadoop-ozone/pull/428#discussion_r366092550
##########
File path:
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmMultipartKeyInfo.java
##########
@@ -35,22 +35,67 @@
private final ReplicationType replicationType;
private final ReplicationFactor replicationFactor;
private TreeMap<Integer, PartKeyInfo> partKeyInfoList;
+ private long objectID;
+ private long updateID;
/**
* Construct OmMultipartKeyInfo object which holds multipart upload
* information for a key.
*/
public OmMultipartKeyInfo(String id, long creationTime,
- ReplicationType replicationType,
- ReplicationFactor replicationFactor,
- Map<Integer, PartKeyInfo> list) {
+ ReplicationType replicationType, ReplicationFactor replicationFactor,
+ Map<Integer, PartKeyInfo> list, long objectID, long updateID) {
this.uploadID = id;
this.creationTime = creationTime;
this.replicationType = replicationType;
this.replicationFactor = replicationFactor;
this.partKeyInfoList = new TreeMap<>(list);
+ this.objectID = objectID;
+ this.updateID = updateID;
}
+ /**
+ * Set the Object ID. If this value is already set then this function throws.
+ * There is a reason why we cannot use the final here. The
+ * OMMultipartKeyInfo is deserialized from the protobuf in many places in
+ * code. We need to set this object ID, after it is deserialized.
+ *
+ * @param obId - long
+ */
+ public void setObjectID(long obId) {
Review comment:
This method is not called any where, as we use builder methods.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]