[
https://issues.apache.org/jira/browse/HDFS-9792?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15152574#comment-15152574
]
James Clampffer commented on HDFS-9792:
---------------------------------------
The errno fix is a clear improvement. It looks like a side effect of this is
getting rid of the possibility that Status could contain
"org.apache.hadoop.security.AccessControlException". I think getting rid of
that is a good thing anyway; keeping it is a maintenance burden if the java
side moves. Getting rid of that string in status.cc and setting the message to
"Permission Denied" in the Status::Exception factory function would make the
patch consistent overall.
> libhdfs++: EACCES not setting errno correctly
> ---------------------------------------------
>
> Key: HDFS-9792
> URL: https://issues.apache.org/jira/browse/HDFS-9792
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: hdfs-client
> Reporter: Bob Hansen
> Assignee: Bob Hansen
> Attachments: HDFS-9792.HDFS-8707.000.patch,
> HDFS-9792.HDFS-8707.000.patch
>
>
> When libhdfs++ gets a permissions error, it is failing to initialize errnum.
> Due to changes passing in the night, the code in hdfs.cc that reads
> {code}
> case Status::Code::kPermissionDenied:
> if (!stat.ToString().empty())
> ReportError(EACCES, stat.ToString().c_str());
> else
> ReportError(EACCES, "Permission denied");
> break;
> {code}
> should read
> {code}
> case Status::Code::kPermissionDenied:
> errnum = EACCES;
> default_message = "Permission denied";
> break;
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)