|
+1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12378838/getNodeNPE.patch against trunk revision 619744. @author +1. The patch does not contain any @author tags. tests included +1. The patch appears to include 6 new or modified tests. javadoc +1. The javadoc tool did not generate any warning messages. javac +1. The applied patch does not generate any new javac compiler warnings. release audit +1. The applied patch does not generate any new release audit warnings. findbugs +1. The patch does not introduce any new Findbugs warnings. core tests +1. The patch passed core unit tests. contrib tests +1. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2096/testReport/ This message is automatically generated. Can we unwrap the RemoteException at the ipc level?
When unwrapping RemoteException in DFSClient, I do not think we need to introduce a varaible "result" in every method. Import "StringUtils" in FsShell is unneccessary. In src/test/org/apache/hadoop/security/TestPermission.java, canXX methods only need to catch AccessControlException not IOException. RemoteException.unwrapRemoteException methods waste an instantiation of an exception if this exception is not an IOException. Better to use Class.isAssignableFrom to determine the exception class is a subclass of IOException before the instantiation.
I modified patch per Hairongs comments.
unwrapRemoteException accepets now a variable number of classes to look for unwrapping and returns an exception rather than throwing it as in the previous patch. This make DFSClient code less polluted. -1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12379209/getNodeNPE.patch against trunk revision 643282. @author +1. The patch does not contain any @author tags. tests included +1. The patch appears to include 6 new or modified tests. javadoc -1. The javadoc tool appears to have generated 1 warning messages. javac +1. The applied patch does not generate any new javac compiler warnings. release audit +1. The applied patch does not generate any new release audit warnings. findbugs +1. The patch does not introduce any new Findbugs warnings. core tests +1. The patch passed core unit tests. contrib tests +1. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2132/testReport/ This message is automatically generated. Corrected javaDoc, removed trace stack printing in FsShell, used isAssignableFrom one more time.
Reflect current trunk.
Merging with the trunk again.
I verified this patch on Windows and Linux. Nigel ran the test-patch target. The results are positive:
exec] +1 overall. [exec] [exec] @author +1. The patch does not contain any @author tags. [exec] [exec] tests included +1. The patch appears to include 6 new or modified tests. [exec] [exec] javadoc +1. The javadoc tool did not generate any warning messages. [exec] [exec] javac +1. The applied patch does not generate any new javac compiler warnings. [exec] [exec] findbugs +1. The patch does not introduce any new Findbugs warnings. I just committed this.
Integrated in Hadoop-trunk #451 (See http://hudson.zones.apache.org/hudson/job/Hadoop-trunk/451/
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
so that there were no more reason for analyze RemoteException in higher level classes.
This was initially submitted under
HADOOP-3108.This patch introduces two unwrapping methods for RemoteException, which unwrap and throw original
exceptions contained inside. There are 2 conditions for successful unwrapping:
Otherwise the RemoteException is re-thrown.
The first method throws only exceptions of the specified type.
While the second one unwraps anything. The second can be potentially used as a generic
unwrapping method directly inside RPC. For now I use just the first one for unwrapping
AccessControlException and FileNotFoundException exceptions.
More details about the changes are here
http://issues.apache.org/jira/browse/HADOOP-3108#action_12583010
I think this patch is important for 0.17 because currently in many place we rely on exception message text
to determine which exception was originally thrown, which imo is a totally unacceptable practice.