hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mukul Kumar Singh (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-11763) Ozone: Add finer error codes for container operaions
Date Mon, 08 May 2017 08:01:04 GMT

    [ https://issues.apache.org/jira/browse/HDFS-11763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16000406#comment-16000406
] 

Mukul Kumar Singh commented on HDFS-11763:
------------------------------------------

Thanks for the patch [~linyiqun], Please find my patches here.

1) The error code are per message type error code, However the msg command type can be extracted
in getContainerResponse to construct this error code.

I feel that that for an exception, a check should be performed to check if it of type StorageContainerException.
and then the error code should be extracted out of it and then used to construct the response.

For example look at updateContainer in ContainerManagerImpl
{code}
    try {
      Path location = locationManager.getContainerPath();
      ContainerData orgData = containerMap.get(containerName).getContainer();
      if (!orgData.isOpen()) {
        throw new StorageContainerException(
            "Update a closed container is not allowed. Name: " + containerName,
            UNSUPPORTED_REQUEST);
      }
{code}

> Ozone: Add finer error codes for container operaions
> ----------------------------------------------------
>
>                 Key: HDFS-11763
>                 URL: https://issues.apache.org/jira/browse/HDFS-11763
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: ozone
>    Affects Versions: HDFS-7240
>            Reporter: Yiqun Lin
>            Assignee: Yiqun Lin
>            Priority: Minor
>         Attachments: HDFS-11763-HDFS-7240.001.patch
>
>
> Ii would be better to add more finer error codes for operation relevant operations as
this suggested in the codes. It will benefit for us to find and describe the exception cause.
Currently all the container operation error was using the same result code {{CONTAINER_INTERNAL_ERROR}}.
This seems too coarse-grained.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org


Mime
View raw message