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

Improve ugly exception handling in HiveMetaStore

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 4.0.0-alpha-1
    • Standalone Metastore
    • None

    Description

      In HiveMetaStore class we have a lot of ugly exception handling code using which use instanceof

       catch (Exception e) {
              ex = e;
              if (e instanceof MetaException) {
                throw (MetaException) e;
              } else if (e instanceof InvalidObjectException) {
                throw (InvalidObjectException) e;
              } else if (e instanceof AlreadyExistsException) {
                throw (AlreadyExistsException) e;
              } else {
                throw newMetaException(e);
              }
      

      Attachments

        1. HIVE-19263.01.patch
          33 kB
          Igor Kryvenko
        2. HIVE-19263.02.patch
          33 kB
          Igor Kryvenko

        Activity

          People

            ikryvenko Igor Kryvenko
            ikryvenko Igor Kryvenko
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: