cxorm commented on a change in pull request #2629:
URL: https://github.com/apache/ozone/pull/2629#discussion_r705887099
##########
File path:
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
##########
@@ -2682,27 +2682,8 @@ public void renameKey(OmKeyArgs args, String toKeyName)
throws IOException {
*/
@Override
public void deleteKey(OmKeyArgs args) throws IOException {
- Map<String, String> auditMap = args.toAuditMap();
- try {
- ResolvedBucket bucket = resolveBucketLink(args);
- args = bucket.update(args);
-
- if (isAclEnabled) {
- checkAcls(ResourceType.KEY, StoreType.OZONE, ACLType.DELETE,
- bucket.realVolume(), bucket.realBucket(), args.getKeyName());
- }
-
- metrics.incNumKeyDeletes();
- keyManager.deleteKey(args);
- AUDIT.logWriteSuccess(buildAuditMessageForSuccess(OMAction.DELETE_KEY,
- auditMap));
- metrics.decNumKeys();
- } catch (Exception ex) {
- metrics.incNumKeyDeleteFails();
- AUDIT.logWriteFailure(buildAuditMessageForFailure(OMAction.DELETE_KEY,
- auditMap, ex));
- throw ex;
- }
+ throw new UnsupportedOperationException("OzoneManager does not require " +
Review comment:
I'm +1 for removing these methods.
IMHO there are two ways to do it,
1. Change the `OzoneManagerProtocol`.
> It is a **huge** patch, and we would encounter many issues like
backward-compatibility and API compatibility.
2. Deprecating `OzoneManager.java`.
> In this case, we should update those part of using `OzoneManager.java`.
(Still a `huge` patch.)
These ways are too complicated to archive in a clear manner.
I ever used to the same throw-Exception manner and I think it doesn't solve
the problem fully.
Feel free to correct me if you have any idea.
--
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]