You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/07/16 11:44:00 UTC
[jira] [Work logged] (HIVE-26401) Refine the log of add_partitions if the partition already exists
[ https://issues.apache.org/jira/browse/HIVE-26401?focusedWorklogId=791645&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-791645 ]
ASF GitHub Bot logged work on HIVE-26401:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 16/Jul/22 11:43
Start Date: 16/Jul/22 11:43
Worklog Time Spent: 10m
Work Description: wecharyu opened a new pull request, #3447:
URL: https://github.com/apache/hive/pull/3447
### What changes were proposed in this pull request?
1. check if the table if a partitioned table before execute `add_partitions`.
2. only log the full table name and partition names if the partition already exists.
### Why are the changes needed?
To improve the log preservation and readability.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Only refine the log, do not add any tests.
Issue Time Tracking
-------------------
Worklog Id: (was: 791645)
Remaining Estimate: 0h
Time Spent: 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
> 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)