bharatviswa504 commented on a change in pull request #2629:
URL: https://github.com/apache/ozone/pull/2629#discussion_r710669274
##########
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:
> As of right now, I think they can be handled in separate PR's. And I
think 1 is much higher priority, because as you've said, the code is causing so
much confusion. What do you think, @bharatviswa504 ?
Yes lets remove old code first which is causing confusion.
> In other words, finish removing all the methods from OzoneManager.java
first. And fix all the tests that that breaks. Then all the methods from the
KeyManager.java and fix the tests that those break, and so on. Does that sound
ok, @bharatviswa504 ?
Yes. I am +1.
I agree with all other responses also. Lets continue cleanup by class and
make progress.
--
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]