Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-5051

StorageBasedAuthorizationProvider masks lower level exception with IllegalStateException

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.12.0
    • Fix Version/s: 0.12.0
    • Component/s: Authorization
    • Labels:
      None

      Description

      org.apache.hadoop.hive.ql.security.authorization.StorageBasedAuthorizationProvider

      has the following 2 methods

      private HiveException hiveException(Exception e)

      { HiveException ex = new HiveException(e); ex.initCause(e); return ex; }

      private AuthorizationException authorizationException(Exception e)

      { AuthorizationException ex = new AuthorizationException(e); ex.initCause(e); return ex; }

      both, when called, will cause
      throw new IllegalStateException("Can't overwrite cause"); to be thrown and the original Exception is lost.

      See http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/java/lang/Throwable.java#Throwable.initCause%28java.lang.Throwable%29

        Attachments

        1. HIVE-5051.patch
          1.0 kB
          Eugene Koifman

          Issue Links

            Activity

              People

              • Assignee:
                ekoifman Eugene Koifman
                Reporter:
                ekoifman Eugene Koifman
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: