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

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

Discussed offline with [~bslim]
The logging of exception happens at higher levels in Hive. Logging this in 
metastore client would means the log message gets duplicated.
However, it seems in case of rollback in finally block of 
HiveMetastoreClient.createTable giving an error the exception is lost. The 
right fix would be to not throw an exception from finally block and just log 
that one.


> Failures in TestRemoteHiveMetaStore, TestSetUGIOnOnlyServer
> -----------------------------------------------------------
>
>                 Key: HIVE-15969
>                 URL: https://issues.apache.org/jira/browse/HIVE-15969
>             Project: Hive
>          Issue Type: Sub-task
>    Affects Versions: 2.2.0
>            Reporter: Thejas M Nair
>            Assignee: slim bouguerra
>         Attachments: HIVE-15969.patch
>
>
> Looks like the additional failures in TestRemoteHiveMetaStore, 
> TestSetUGIOnOnlyServer
>  are related to this patch in HIVE-15877. 
> I don't think that change was intended.
> {code}
> --- 
> metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
> +++ 
> metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
> @@ -739,7 +739,10 @@ public void createTable(Table tbl, EnvironmentContext 
> envContext) throws Already
>          hook.commitCreateTable(tbl);
>        }
>        success = true;
> -    } finally {
> +    } catch (Exception e){
> +      LOG.error("Got exception from createTable", e);
> +    }
> +    finally {
>        if (!success && (hook != null)) {
>          hook.rollbackCreateTable(tbl);
>        }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to