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

Do Not Print StackTraces to STDERR in HiveMetaStore

    XMLWordPrintableJSON

Details

    Description

      HiveMetaStore.java
          } catch (Throwable x) {
            x.printStackTrace();
            HMSHandler.LOG.error(StringUtils.stringifyException(x));
            throw x;
          }
      

      Bad design here of "log and throw". Don't do it. Just throw the exception and let it be handled, and logged, in one place. At the very least, we don't need the error message to go into the STDERR logs with printStackTrace, please remove. And remove the stringifyException code. Just use the normal logging faciltiies at the 'debug' level logging to hide the stack trace during normal operations.

      HMSHandler.LOG.debug("Error", e);
      

      Attachments

        1. HIVE-20237.1.patch
          2 kB
          Alice Fan
        2. HIVE-20237.2.patch
          15 kB
          Alice Fan

        Activity

          People

            afan Alice Fan
            belugabehr David Mollitor
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: