swamirishi commented on code in PR #8450:
URL: https://github.com/apache/ozone/pull/8450#discussion_r2103453374
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/AbstractKeyDeletingService.java:
##########
@@ -637,4 +644,35 @@ public long getMovedFilesCount() {
public BootstrapStateHandler.Lock getBootstrapStateLock() {
return lock;
}
+
+ /**
+ * Submits SetSnapsnapshotPropertyRequest to OM.
+ * @param setSnapshotPropertyRequests request to be sent to OM
+ */
+ protected void submitSetSnapshotRequest(
+ List<OzoneManagerProtocolProtos.SetSnapshotPropertyRequest>
setSnapshotPropertyRequests) {
+ if (setSnapshotPropertyRequests.isEmpty()) {
+ return;
+ }
+ OzoneManagerProtocolProtos.OMRequest omRequest =
OzoneManagerProtocolProtos.OMRequest.newBuilder()
+ .setCmdType(OzoneManagerProtocolProtos.Type.SetSnapshotProperty)
+ .addAllSetSnapshotPropertyRequests(setSnapshotPropertyRequests)
+ .setClientId(clientId.toString())
+ .build();
+ Map<String, SnapshotInfo> val = new HashMap<>();
+ setSnapshotPropertyRequests
+ .forEach(i -> {
+ try {
+ val.put(i.getSnapshotKey(),
+
ozoneManager.getMetadataManager().getSnapshotInfoTable().get(i.getSnapshotKey()));
Review Comment:
Removed the entire block
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/SnapshotUtils.java:
##########
@@ -93,6 +93,11 @@ public static SnapshotInfo getSnapshotInfo(OzoneManager
ozoneManager,
SnapshotChainManager chainManager,
UUID snapshotId) throws
IOException {
String tableKey = chainManager.getTableKey(snapshotId);
+ if (tableKey == null) {
+ LOG.error("Snapshot with ID: '{}' is not found.", snapshotId);
+ throw new OMException("Snapshot with ID: '" + snapshotId + "' is not
found.",
Review Comment:
done
--
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]