Wechar created HIVE-27469:
-----------------------------

             Summary: HMSHandler lost root cause of MetaStorePreEventListener
                 Key: HIVE-27469
                 URL: https://issues.apache.org/jira/browse/HIVE-27469
             Project: Hive
          Issue Type: Improvement
          Components: Hive
            Reporter: Wechar
            Assignee: Wechar


Currently {{HMSHandler}} will convert {{NoSuchObjectException}} and 
{{InvalidOperationException}} to {{MetaException}}, but it will lose the root 
cause. The related code as follows:
{code:java}
  // HMSHandler.java#L3956
  private void firePreEvent(PreEventContext event) throws MetaException {
    for (MetaStorePreEventListener listener : preListeners) {
      try {
        listener.onEvent(event);
      } catch (NoSuchObjectException e) {
        throw new MetaException(e.getMessage());
      } catch (InvalidOperationException e) {
        throw new MetaException(e.getMessage());
      }
    }
  }
{code}

In this patch, we want to add the root cause and it can help troubleshooting 
through HMS log.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to