BELUGA BEHR created HIVE-20237:
----------------------------------

             Summary: Do Not Print StackTraces to STDERR in HiveMetaStore
                 Key: HIVE-20237
                 URL: https://issues.apache.org/jira/browse/HIVE-20237
             Project: Hive
          Issue Type: Improvement
          Components: Standalone Metastore
    Affects Versions: 3.0.0, 4.0.0
            Reporter: BELUGA BEHR


{code:java|title=HiveMetaStore.java}
    } catch (Throwable x) {
      x.printStackTrace();
      HMSHandler.LOG.error(StringUtils.stringifyException(x));
      throw x;
    }
{code}

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:

{code}
HMSHandler.LOG.error("Error", e);
{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to