HADOOP-12284. UserGroupInformation doAs can throw misleading exception (Aaron Dosset via stevel)

This commit is contained in:
Steve Loughran 2015-10-06 21:39:33 +01:00
parent 29a582ada0
commit 6d5713a8a8
2 changed files with 7 additions and 1 deletions

View File

@ -1124,6 +1124,9 @@ Release 2.8.0 - UNRELEASED
HADOOP-11098. [JDK8] Max Non Heap Memory default changed between JDK7
and 8. (ozawa)
HADOOP-12284. UserGroupInformation doAs can throw misleading exception
(Aaron Dosset via stevel)
OPTIMIZATIONS
HADOOP-12051. ProtobufRpcEngine.invoke() should use Exception.toString()

View File

@ -1670,7 +1670,10 @@ public class UserGroupInformation {
if (LOG.isDebugEnabled()) {
LOG.debug("PrivilegedActionException as:" + this + " cause:" + cause);
}
if (cause instanceof IOException) {
if (cause == null) {
throw new RuntimeException("PrivilegedActionException with no " +
"underlying cause. UGI [" + this + "]", pae);
} else if (cause instanceof IOException) {
throw (IOException) cause;
} else if (cause instanceof Error) {
throw (Error) cause;