[
https://issues.apache.org/jira/browse/HIVE-26401?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated HIVE-26401:
----------------------------------
Labels: pull-request-available (was: )
> Refine the log of add_partitions if the partition already exists
> ----------------------------------------------------------------
>
> Key: HIVE-26401
> URL: https://issues.apache.org/jira/browse/HIVE-26401
> Project: Hive
> Issue Type: Improvement
> Components: Hive
> Affects Versions: 4.0.0-alpha-1
> Reporter: Wechar
> Assignee: Wechar
> Priority: Minor
> Labels: pull-request-available
> Fix For: 4.0.0-alpha-2
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Currently {{*add_partitions_xxx*}} will log the complete information of a
> partition if it already exists, see in
> [HMSHandler.java#L4320|https://github.com/apache/hive/blob/e3751ab545370f9b252d0b4a07bc315037541a95/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HMSHandler.java#L4320]:
> {code:java}
> if (!shouldAdd) {
> LOG.info("Not adding partition {} as it already exists", part);
> return false;
> }
> {code}
> It will print a long message including the columns of this partition, we
> think it is unnecessary based on the following two points:
> {color:red}1. The long message is redundant.{color}
> We can get enough information from just
> *cat_name.db_name.tbl_name[part_col1=part_val1/part_col2=part_val2...]*
> {color:red}2. The long message is not friendly to save and query.{color}
> This log message will take up a large log space especially when the user need
> to execute *MSCK REPAIR TABLE* operation regularly because the old partition
> must be already existed.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)