hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Haohui Mai (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-5939) WebHdfs returns misleading error code and logs nothing if trying to create a file with no DNs in cluster
Date Thu, 20 Feb 2014 19:31:21 GMT

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

Haohui Mai commented on HDFS-5939:

bq. But thinking about it a bit more, why can't we also let it also deal with RuntimeException?
I will give it a try later today too. Do you agree?

No. This is a fundamental contract of the RPC layer which defines what kinds of exceptions
can be transferred over the wire. At least I don't think it is a good idea to address it in
this jira.

bq. In production, it's an error that user need to deal with I think.

Agree. The client explicitly says this is an error, which the user needs to deal with anyway.
What I'm yet to be convinced is that why you're logging it into the server log. As a rule
of thumb, you only log operations in the server side if it provides valuable information for
debugging or auditing. Otherwise it does no good but confuses the operator. (e.g., HADOOP-10274)

bq. Of course, I can try to see if there is "no datanode" string in the exception's message.
But what about if there is other IOException thrown and it also has the "no datanode" message.

The exception is actually a public interface from the client's prospective. We need to be
very conservative on it. We can kind of get away from it by throwing an {{IOException}} with
specific message. If the code throws a new type of exception we need to reason through whether
it'll introduce backward compatibility issues in the future.

> WebHdfs returns misleading error code and logs nothing if trying to create a file with
no DNs in cluster
> --------------------------------------------------------------------------------------------------------
>                 Key: HDFS-5939
>                 URL: https://issues.apache.org/jira/browse/HDFS-5939
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: hdfs-client
>    Affects Versions: 2.3.0
>            Reporter: Yongjun Zhang
>            Assignee: Yongjun Zhang
>         Attachments: HDFS-5939.001.patch, HDFS-5939.002.patch
> When trying to access hdfs via webhdfs, and when datanode is dead, user will see an exception
below without any clue that it's caused by dead datanode:
> $ curl -i -X PUT ".../webhdfs/v1/t1?op=CREATE&user.name=<userName>&overwrite=false"
> ...
> {"RemoteException":{"exception":"IllegalArgumentException","javaClassName":"java.lang.IllegalArgumentException","message":"n
must be positive"}}
> Need to fix the report to give user hint about dead datanode.

This message was sent by Atlassian JIRA

View raw message