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

Minor Logging Improvements in Hive Metastore Client Connection

    XMLWordPrintableJSON

Details

    Description

      https://github.com/apache/hive/blob/4047befe48c8f762c58d8854e058385c1df151c6/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java#L526-L531

       

      if (LOG.isDebugEnabled()) {
        LOG.warn("Failed to connect to the MetaStore Server...", e);
      } else {
        // Don't print full exception trace if DEBUG is not on.
        LOG.warn("Failed to connect to the MetaStore Server...");
      }
      

      I do not understand the logic here. I always want to see the reason for the failure. Otherwise, I do not know why it is failing unless I restart the server with debug logging enabled. By that point, the error may have cleared. Please just use the Exception in the WARN output without adding confusing logging for debugging. This is never an expected behavior... that enabling debug would change a warn level log message.

      Also... please remove the ellipsis, they add no value.

      Attachments

        1. HIVE-18882.patch
          1 kB
          Manoj Narayanan
        2. HIVE-18882.5.patch
          3 kB
          David Mollitor
        3. HIVE-18882.5.patch
          3 kB
          David Mollitor
        4. HIVE-18882.4.patch
          7 kB
          David Mollitor
        5. HIVE-18882.3.patch
          6 kB
          David Mollitor
        6. HIVE-18882.2.patch
          1 kB
          Manoj Narayanan
        7. HIVE-18882.1.patch
          1 kB
          Manoj Narayanan

        Issue Links

          Activity

            People

              belugabehr David Mollitor
              belugabehr David Mollitor
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: