hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bharathkrishna Guruvayoor Murali (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-13157) MetaStoreEventListener.onAlter triggered for INSERT and SELECT
Date Fri, 05 Oct 2018 23:25:00 GMT

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

Bharathkrishna Guruvayoor Murali commented on HIVE-13157:
---------------------------------------------------------

This is still present in master. I was looking into the same issue, basically my understanding
is that the loadTable in Hive.java : [Hive.java#L2630|https://github.com/apache/hive/blob/a4b087b18bd5b0b4023bced68c85cf1e16301fed/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java#L2630]
calls alterTable even when there is a stats change, and only change happening is transient_lastDdl
because actual alter of stats happens in the next alter_table event that follows this.

I wanted to change the code in the following way :
{code:java}
  if (hasFollowingStatsTask) {
      environmentContext = new EnvironmentContext();
      environmentContext.putToProperties(StatsSetupConst.DO_NOT_UPDATE_STATS, StatsSetupConst.TRUE);
    }
else {
    alterTable(tbl, false, environmentContext, true);
}
{code}
Change above is adding alterTable in else part, ie. when there is no stat task to follow.
But I do not know if loadTable is used in a different code path where this alterTable is useful
irrespective of stat change.

 

+ [~sershe] [~vihangk1] [~akolb] [~pvary] What do you think about this, can you think of
any case where the alterTable should not be in the else part.

> MetaStoreEventListener.onAlter triggered for INSERT and SELECT
> --------------------------------------------------------------
>
>                 Key: HIVE-13157
>                 URL: https://issues.apache.org/jira/browse/HIVE-13157
>             Project: Hive
>          Issue Type: Bug
>          Components: Metastore
>    Affects Versions: 1.2.1
>            Reporter: Eugen Stoianovici
>            Priority: Critical
>
> The event onAlter from org.apache.hadoop.hive.metastore.MetaStoreEventListener is triggered
when INSERT or SELECT statements are executed on the target table.
> Furthermore, the value of transient_lastDdl is updated in table properties for INSERT
statements.



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

Mime
View raw message