hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thejas M Nair (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-5603) several classes call initCause which masks lower level exceptions
Date Tue, 22 Oct 2013 01:21:42 GMT

    [ https://issues.apache.org/jira/browse/HIVE-5603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13801374#comment-13801374
] 

Thejas M Nair commented on HIVE-5603:
-------------------------------------

Similar to AuthorizationPreEventListener class, there are other places where initCause is
being called, that need to be reviewed -.

{code}
 git grep initCause
hcatalog/server-extensions/src/main/java/org/apache/hcatalog/listener/NotificationListener.java:
       me.initCause(e);
hcatalog/server-extensions/src/main/java/org/apache/hcatalog/listener/NotificationListener.java:
       me.initCause(e);
hcatalog/server-extensions/src/main/java/org/apache/hive/hcatalog/listener/NotificationListener.java:
       me.initCause(e);
hcatalog/server-extensions/src/main/java/org/apache/hive/hcatalog/listener/NotificationListener.java:
       me.initCause(e);
hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/snapshot/lock/WriteLock.java:
         initCause(e);
hwi/src/java/org/apache/hadoop/hive/hwi/HWIServer.java:      ie.initCause(e);
metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java:          me.initCause(e);
metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java:          me.initCause(e);
metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java:          me.initCause(e);
metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java:          me.initCause(e);
metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java:          me.initCause(e);
metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java:          me.initCause(e);
metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java:          me.initCause(e);
metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java:          me.initCause(e);
metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java:          me.initCause(e);
metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java:          me.initCause(e);
metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java:          me.initCause(e);
metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java:          me.initCause(e);
metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java:          me.initCause(e);
metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java:          me.initCause(e);
metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java:          me.initCause(e);
metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java:          me.initCause(e);
metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java:          me.initCause(e);
metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java:          me.initCause(e);
metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java:          me.initCause(e);
metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java:          me.initCause(e);
metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java:          me.initCause(e);
metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java:          me.initCause(e);
metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java:          me.initCause(e);
metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java:          me.initCause(e);
metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java:          me.initCause(e);
metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java:          me.initCause(e);
metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java:          te.initCause(e);
metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java:          me.initCause(e);
metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java:          me.initCause(e);
metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java:          me.initCause(e);
metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java:        me.initCause(e);
metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java:          me.initCause(e);
metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java:          me.initCause(e);
metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java:          me.initCause(e);
metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java:          me.initCause(original);
metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java:          me.initCause(original);
metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java:          me.initCause(e);
metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java:          metaException.initCause(e);
metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java:          metaException.initCause(e);
ql/src/java/org/apache/hadoop/hive/ql/security/authorization/AuthorizationPreEventListener.java:
   ex.initCause(e.getCause());
ql/src/java/org/apache/hadoop/hive/ql/security/authorization/AuthorizationPreEventListener.java:
   ex.initCause(e);
ql/src/java/org/apache/hadoop/hive/ql/security/authorization/StorageBasedAuthorizationProvider.java:
   ace.initCause(e);

{code}

> several classes call initCause which masks lower level exceptions
> -----------------------------------------------------------------
>
>                 Key: HIVE-5603
>                 URL: https://issues.apache.org/jira/browse/HIVE-5603
>             Project: Hive
>          Issue Type: Bug
>          Components: Authorization
>    Affects Versions: 0.12.0
>            Reporter: Thejas M Nair
>
> AuthorizationPreEventListener has following code that will result in "Can't overwrite
exception" being thrown, and also mask the lower level exception.
> {code}
>   private InvalidOperationException invalidOperationException(Exception e) {
>     InvalidOperationException ex = new InvalidOperationException();
>     ex.initCause(e.getCause());
>     return ex;
>   }
>   private MetaException metaException(HiveException e) {
>     MetaException ex =  new MetaException(e.getMessage());
>     ex.initCause(e);
>     return ex;
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message