ashutosh-bapat commented on a change in pull request #735: HIVE-21960 : Avoid
running stats updater and partition management task on a replicated table.
URL: https://github.com/apache/hive/pull/735#discussion_r309547312
##########
File path:
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/PartitionManagementTask.java
##########
@@ -80,6 +82,16 @@ public Configuration getConf() {
return conf;
}
+ private static boolean partitionDiscoveryEnabled(Map<String, String> params)
{
+ return params != null &&
params.containsKey(DISCOVER_PARTITIONS_TBLPROPERTY) &&
+
params.get(DISCOVER_PARTITIONS_TBLPROPERTY).equalsIgnoreCase("true");
+ }
+
+ private static boolean tblBeingReplicatedInto(Map<String, String> params) {
+ return params != null &&
params.containsKey(ReplConst.REPL_TARGET_TABLE_PROPERTY) &&
+ !params.get(ReplConst.REPL_TARGET_TABLE_PROPERTY).trim().isEmpty();
Review comment:
params may contain REPL_TARGET_TABLE_PROPERTY but it may be an empty string
''. That will not happen through the code since we always add non-empty string.
But this is an extra check to cover that possibility in case somebody adds an
empty string there.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]