swamirishi commented on code in PR #9141:
URL: https://github.com/apache/ozone/pull/9141#discussion_r2430688740
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmSnapshotLocalDataYaml.java:
##########
@@ -165,7 +165,8 @@ public Object construct(Node node) {
MappingNode mnode = (MappingNode) node;
Map<Object, Object> nodes = constructMapping(mnode);
UUID snapId = UUID.fromString((String)
nodes.get(OzoneConsts.OM_SLD_SNAP_ID));
- UUID prevSnapId = UUID.fromString((String)
nodes.get(OzoneConsts.OM_SLD_PREV_SNAP_ID));
+ String prevNodeStr = (String)
nodes.get(OzoneConsts.OM_SLD_PREV_SNAP_ID);
+ UUID prevSnapId = prevNodeStr == null ? null :
UUID.fromString(prevNodeStr);
Review Comment:
prevSnapshotId would be null when the snapshot is the first snapshot in the
chain
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]