Index: metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java =================================================================== --- metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java (revision 1232534) +++ metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java (working copy) @@ -26,17 +26,14 @@ import java.io.IOException; import java.util.AbstractMap; import java.util.ArrayList; -import java.util.Arrays; import java.util.Collections; import java.util.Formatter; import java.util.HashMap; -import java.util.HashSet; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Properties; -import java.util.Set; import java.util.Timer; import java.util.regex.Pattern; @@ -1566,23 +1563,6 @@ part.putToParameters(Constants.DDL_TIME, Long.toString(time)); } - - Map tblParams = tbl.getParameters(); - String inheritProps = hiveConf.getVar(ConfVars.METASTORE_PART_INHERIT_TBL_PROPS).trim(); - // Default value is empty string in which case no properties will be inherited. - // * implies all properties needs to be inherited - Set inheritKeys = new HashSet(Arrays.asList(inheritProps.split(","))); - if(inheritKeys.contains("*")){ - inheritKeys = tblParams.keySet(); - } - - for (String key : inheritKeys) { - String paramVal = tblParams.get(key); - if(null != paramVal){ // add the property only if it exists in table properties - part.putToParameters(key, paramVal); - } - } - success = ms.addPartition(part); } finally { Index: common/src/java/org/apache/hadoop/hive/conf/HiveConf.java =================================================================== --- common/src/java/org/apache/hadoop/hive/conf/HiveConf.java (revision 1232534) +++ common/src/java/org/apache/hadoop/hive/conf/HiveConf.java (working copy) @@ -119,7 +119,6 @@ HiveConf.ConfVars.METASTORE_EVENT_EXPIRY_DURATION, HiveConf.ConfVars.METASTORE_RAW_STORE_IMPL, HiveConf.ConfVars.METASTORE_END_FUNCTION_LISTENERS, - HiveConf.ConfVars.METASTORE_PART_INHERIT_TBL_PROPS, }; /** @@ -297,7 +296,6 @@ METASTORE_NON_TRANSACTIONAL_READ("javax.jdo.option.NonTransactionalRead", true), METASTORE_CONNECTION_USER_NAME("javax.jdo.option.ConnectionUserName", "APP"), METASTORE_END_FUNCTION_LISTENERS("hive.metastore.end.function.listeners", ""), - METASTORE_PART_INHERIT_TBL_PROPS("hive.metastore.partition.inherit.table.properties",""), // CLI CLIIGNOREERRORS("hive.cli.errors.ignore", false), Index: ql/src/test/results/clientpositive/part_inherit_tbl_props.q.out =================================================================== --- ql/src/test/results/clientpositive/part_inherit_tbl_props.q.out (revision 1232534) +++ ql/src/test/results/clientpositive/part_inherit_tbl_props.q.out (working copy) @@ -1,47 +0,0 @@ -PREHOOK: query: create table mytbl (c1 tinyint) partitioned by (c2 string) tblproperties ('a'='myval','b'='yourval','c'='noval') -PREHOOK: type: CREATETABLE -POSTHOOK: query: create table mytbl (c1 tinyint) partitioned by (c2 string) tblproperties ('a'='myval','b'='yourval','c'='noval') -POSTHOOK: type: CREATETABLE -POSTHOOK: Output: default@mytbl -PREHOOK: query: alter table mytbl add partition (c2 = 'v1') -PREHOOK: type: ALTERTABLE_ADDPARTS -PREHOOK: Input: default@mytbl -POSTHOOK: query: alter table mytbl add partition (c2 = 'v1') -POSTHOOK: type: ALTERTABLE_ADDPARTS -POSTHOOK: Input: default@mytbl -POSTHOOK: Output: default@mytbl@c2=v1 -PREHOOK: query: describe formatted mytbl partition (c2='v1') -PREHOOK: type: DESCTABLE -POSTHOOK: query: describe formatted mytbl partition (c2='v1') -POSTHOOK: type: DESCTABLE -# col_name data_type comment - -c1 tinyint None - -# Partition Information -# col_name data_type comment - -c2 string None - -# Detailed Partition Information -Partition Value: [v1] -Database: default -Table: mytbl -#### A masked pattern was here #### -Protect Mode: None -#### A masked pattern was here #### -Partition Parameters: - a myval - b yourval -#### A masked pattern was here #### - -# Storage Information -SerDe Library: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe -InputFormat: org.apache.hadoop.mapred.TextInputFormat -OutputFormat: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat -Compressed: No -Num Buckets: -1 -Bucket Columns: [] -Sort Columns: [] -Storage Desc Params: - serialization.format 1 Index: ql/src/test/results/clientpositive/part_inherit_tbl_props_empty.q.out =================================================================== --- ql/src/test/results/clientpositive/part_inherit_tbl_props_empty.q.out (revision 1232534) +++ ql/src/test/results/clientpositive/part_inherit_tbl_props_empty.q.out (working copy) @@ -1,45 +0,0 @@ -PREHOOK: query: create table mytbl (c1 tinyint) partitioned by (c2 string) tblproperties ('a'='myval','b'='yourval','c'='noval') -PREHOOK: type: CREATETABLE -POSTHOOK: query: create table mytbl (c1 tinyint) partitioned by (c2 string) tblproperties ('a'='myval','b'='yourval','c'='noval') -POSTHOOK: type: CREATETABLE -POSTHOOK: Output: default@mytbl -PREHOOK: query: alter table mytbl add partition (c2 = 'v1') -PREHOOK: type: ALTERTABLE_ADDPARTS -PREHOOK: Input: default@mytbl -POSTHOOK: query: alter table mytbl add partition (c2 = 'v1') -POSTHOOK: type: ALTERTABLE_ADDPARTS -POSTHOOK: Input: default@mytbl -POSTHOOK: Output: default@mytbl@c2=v1 -PREHOOK: query: describe formatted mytbl partition (c2='v1') -PREHOOK: type: DESCTABLE -POSTHOOK: query: describe formatted mytbl partition (c2='v1') -POSTHOOK: type: DESCTABLE -# col_name data_type comment - -c1 tinyint None - -# Partition Information -# col_name data_type comment - -c2 string None - -# Detailed Partition Information -Partition Value: [v1] -Database: default -Table: mytbl -#### A masked pattern was here #### -Protect Mode: None -#### A masked pattern was here #### -Partition Parameters: -#### A masked pattern was here #### - -# Storage Information -SerDe Library: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe -InputFormat: org.apache.hadoop.mapred.TextInputFormat -OutputFormat: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat -Compressed: No -Num Buckets: -1 -Bucket Columns: [] -Sort Columns: [] -Storage Desc Params: - serialization.format 1 Index: ql/src/test/results/clientpositive/part_inherit_tbl_props_with_star.q.out =================================================================== --- ql/src/test/results/clientpositive/part_inherit_tbl_props_with_star.q.out (revision 1232534) +++ ql/src/test/results/clientpositive/part_inherit_tbl_props_with_star.q.out (working copy) @@ -1,48 +0,0 @@ -PREHOOK: query: create table mytbl (c1 tinyint) partitioned by (c2 string) tblproperties ('a'='myval','b'='yourval','c'='noval') -PREHOOK: type: CREATETABLE -POSTHOOK: query: create table mytbl (c1 tinyint) partitioned by (c2 string) tblproperties ('a'='myval','b'='yourval','c'='noval') -POSTHOOK: type: CREATETABLE -POSTHOOK: Output: default@mytbl -PREHOOK: query: alter table mytbl add partition (c2 = 'v1') -PREHOOK: type: ALTERTABLE_ADDPARTS -PREHOOK: Input: default@mytbl -POSTHOOK: query: alter table mytbl add partition (c2 = 'v1') -POSTHOOK: type: ALTERTABLE_ADDPARTS -POSTHOOK: Input: default@mytbl -POSTHOOK: Output: default@mytbl@c2=v1 -PREHOOK: query: describe formatted mytbl partition (c2='v1') -PREHOOK: type: DESCTABLE -POSTHOOK: query: describe formatted mytbl partition (c2='v1') -POSTHOOK: type: DESCTABLE -# col_name data_type comment - -c1 tinyint None - -# Partition Information -# col_name data_type comment - -c2 string None - -# Detailed Partition Information -Partition Value: [v1] -Database: default -Table: mytbl -#### A masked pattern was here #### -Protect Mode: None -#### A masked pattern was here #### -Partition Parameters: - a myval - b yourval - c noval -#### A masked pattern was here #### - -# Storage Information -SerDe Library: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe -InputFormat: org.apache.hadoop.mapred.TextInputFormat -OutputFormat: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat -Compressed: No -Num Buckets: -1 -Bucket Columns: [] -Sort Columns: [] -Storage Desc Params: - serialization.format 1 Index: ql/src/test/queries/clientpositive/part_inherit_tbl_props_with_star.q =================================================================== --- ql/src/test/queries/clientpositive/part_inherit_tbl_props_with_star.q (revision 1232534) +++ ql/src/test/queries/clientpositive/part_inherit_tbl_props_with_star.q (working copy) @@ -1,5 +0,0 @@ -set hive.metastore.partition.inherit.table.properties=key1,*; - -create table mytbl (c1 tinyint) partitioned by (c2 string) tblproperties ('a'='myval','b'='yourval','c'='noval'); -alter table mytbl add partition (c2 = 'v1'); -describe formatted mytbl partition (c2='v1'); Index: ql/src/test/queries/clientpositive/part_inherit_tbl_props.q =================================================================== --- ql/src/test/queries/clientpositive/part_inherit_tbl_props.q (revision 1232534) +++ ql/src/test/queries/clientpositive/part_inherit_tbl_props.q (working copy) @@ -1,5 +0,0 @@ -set hive.metastore.partition.inherit.table.properties=a,b; - -create table mytbl (c1 tinyint) partitioned by (c2 string) tblproperties ('a'='myval','b'='yourval','c'='noval'); -alter table mytbl add partition (c2 = 'v1'); -describe formatted mytbl partition (c2='v1'); Index: ql/src/test/queries/clientpositive/part_inherit_tbl_props_empty.q =================================================================== --- ql/src/test/queries/clientpositive/part_inherit_tbl_props_empty.q (revision 1232534) +++ ql/src/test/queries/clientpositive/part_inherit_tbl_props_empty.q (working copy) @@ -1,3 +0,0 @@ -create table mytbl (c1 tinyint) partitioned by (c2 string) tblproperties ('a'='myval','b'='yourval','c'='noval'); -alter table mytbl add partition (c2 = 'v1'); -describe formatted mytbl partition (c2='v1');