[ https://issues.apache.org/jira/browse/HIVE-26401?focusedWorklogId=796587&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-796587 ]
ASF GitHub Bot logged work on HIVE-26401: ----------------------------------------- Author: ASF GitHub Bot Created on: 30/Jul/22 09:08 Start Date: 30/Jul/22 09:08 Worklog Time Spent: 10m Work Description: wecharyu commented on PR #3447: URL: https://github.com/apache/hive/pull/3447#issuecomment-1200121540 > Better not to mix two thing: refactor & log stuff together. Can you just restrict this PR to just Log refinement Hi @ayushtkn , do you mean do not refactor `validatePartition()` method in this PR? I make this refactor to get partition keys from table, how about logging partition information in the format `tableName[part_val1,part_val2...]` without refactor? Issue Time Tracking ------------------- Worklog Id: (was: 796587) Time Spent: 20m (was: 10m) > 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: 20m > 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)