You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Rakesh Radhakrishnan (Jira)" <ji...@apache.org> on 2022/04/06 07:37:00 UTC
[jira] [Commented] (HDDS-6545) KeyManagerImpl#getBucketLayout should not suppress bucket key lookup errors.
[ https://issues.apache.org/jira/browse/HDDS-6545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17517908#comment-17517908 ]
Rakesh Radhakrishnan commented on HDDS-6545:
--------------------------------------------
Thanks for working on this.
Please consider the below code parts. Also, many are duplicated methods, could you please re-use utility method by removing the duplicate methods.
case-1)
{code:java}
} else {
LOG.error("Bucket not found: {}/{} ", volName, buckName);
// TODO: Handle bucket validation
}
return BucketLayout.DEFAULT;
{code}
[OzoneManagerUtils.java#L126|https://github.com/apache/ozone/blob/master/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManagerUtils.java#L126]
case-2)
{code:java}
OmBucketInfo buckInfo = omMetadataManager.getBucketTable().get(buckKey);
return buckInfo.getBucketLayout();
} catch (IOException e) {
LOG.error("Cannot find the key: " + buckKey);
}
return BucketLayout.DEFAULT;
{code}
[KeyManagerImpl.java#L2395|https://github.com/apache/ozone/blob/master/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java#L2395]
case-3)
{code:java}
OmBucketInfo buckInfo = omMetadataManager.getBucketTable().get(buckKey);
return buckInfo.getBucketLayout();
} catch (IOException e) {
LOG.error("Cannot find the key: " + buckKey, e);
}
return BucketLayout.DEFAULT;
{code}
[OMClientResponse.java#L65|https://github.com/apache/ozone/blob/master/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/response/OMClientResponse.java#L65]
case-4)
{code}
OmBucketInfo buckInfo = omMetadataManager.getBucketTable().get(buckKey);
return buckInfo.getBucketLayout();
} catch (IOException e) {
LOG.error("Cannot find the key: " + buckKey, e);
}
return BucketLayout.DEFAULT;
{code}
[OMFileRequest.java#L517|https://github.com/apache/ozone/blob/master/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/file/OMFileRequest.java#L517]
> KeyManagerImpl#getBucketLayout should not suppress bucket key lookup errors.
> ----------------------------------------------------------------------------
>
> Key: HDDS-6545
> URL: https://issues.apache.org/jira/browse/HDDS-6545
> Project: Apache Ozone
> Issue Type: Sub-task
> Reporter: Jyotinder Singh
> Assignee: Jyotinder Singh
> Priority: Major
>
> org.apache.hadoop.ozone.om.KeyManagerImpl#getBucketLayout catches the bucket key lookup errors that might occur and returns BucketLayout.DEFAULT.
> This behavior should be changed to throwing an error - since it creates uncertainty.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org