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

Improve ERROR Logging in QL Package

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None

    Description

      I went through and reviewed all of the ERROR logging in the HS2 ql module and I removed (most of) the following bad habits:

       

      • Log-and-Throw (log or throw, not both)
      • Pass in the Exception to the logging framework instead of logging its toString() : LOG.error("alter table update columns: {}", e);
      • Add additional context instead of copying the message from the wrapped Exception : throw new SemanticException(e.getMessage(), e);
      • The wrapped exception is being lost in some case, though the message survives :  throw new HiveException(e.getMessage());
      • Remove new-lines from Exception messages, this is annoying as log messages should all be on a single line for GREP
      • Not logging the Exception stack trace :  LOG.error("Error in close loader: " + ie);
      • Logging information but not passing it into an Exception for bubbling up:  LOG.error("Failed to return session: {} to pool", session, e); throw e;
      • Other miscellaneous improvements

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m