hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daryn Sharp (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-9094) Add interface audience and stability annotation to PathExceptions
Date Sat, 01 Dec 2012 00:41:58 GMT

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

Daryn Sharp commented on HADOOP-9094:
-------------------------------------

bq. Question is why is this necessary? This is an error condition and what can you programmatically
do?

Mincing strings is always problematic and makes it difficult to enhance error messages w/o
breaking compatibility.  Allowing an exception to be interrogated for information frees us
to change the message string.

When performing an operation on multiple paths you have the ability to easily determine which
failed and why, so perhaps corrective or cleanup action can be performed.  Awhile back I think
pig requested this ability to avoid mincing strings.  Since they call into FsShell for some
operations we'd need to ensure we don't break them if a change is deemed necessary.

bq. I feel adding equivalent exceptions already available in java and used in hadoop code
to me seems unnecessary, even at the expense of losing some grouping.

I understand where you're coming from, and I pondered the same issues when initially creating
the exceptions.  Since the exceptions were confined to FsShell, I favored consistent and easy
manipulation of exceptions.  If we change the existing exceptions, I'd reluctantly (in the
sense of more catch clauses) lean towards subclasses of FNF and ACE to maintain consistent
manipulation of path based exceptions.  Those that don't care to interrogate path exceptions
can catch the base FNF or ACE directly?
                
> Add interface audience and stability annotation to PathExceptions
> -----------------------------------------------------------------
>
>                 Key: HADOOP-9094
>                 URL: https://issues.apache.org/jira/browse/HADOOP-9094
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 3.0.0
>            Reporter: Suresh Srinivas
>            Assignee: Suresh Srinivas
>
> HADOOP-9093 moved path related exceptions to o.a.h.fs. This jira tracks adding interface
audience and stability to notation to those exceptions. It also tracks the comment from HADOOP-9093:
> bq. I propose using FileNotFoundException instead of PathNotFoundException as it is already
extensively used. Similarly use AccessControlException instead of PathAccessException. If
folks agree, I will make that change in the next patch. Alternatively we could at least make
these exceptions subclasses of the exception that I am proposing replacing them with.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message