sv2000 commented on a change in pull request #2839: [GOBBLIN-993] Support job
level hive configuration override
URL: https://github.com/apache/incubator-gobblin/pull/2839#discussion_r354065874
##########
File path:
gobblin-hive-registration/src/main/java/org/apache/gobblin/hive/HiveMetastoreClientPool.java
##########
@@ -139,7 +146,21 @@ public HiveMetastoreClientPool(Properties properties,
Optional<String> metastore
config.setMaxTotal(this.hiveRegProps.getNumThreads());
config.setMaxIdle(this.hiveRegProps.getNumThreads());
+ String extraConfigTarget =
properties.getProperty(POOL_HIVE_EXTRA_CONFIG_TARGET, "");
+
this.factory = new HiveMetaStoreClientFactory(metastoreURI);
+ if (metastoreURI.isPresent() && StringUtils.isNotEmpty(extraConfigTarget)
+ && metastoreURI.get().equals(extraConfigTarget)) {
+ log.info("Setting extra hive config for metastore {}",
extraConfigTarget);
+ properties.forEach((key, value) -> {
+ String configKey = key.toString();
+ if (configKey.startsWith(POOL_HIVE_EXTRA_CONFIG_PREFIX) &&
!configKey.equals(POOL_HIVE_EXTRA_CONFIG_TARGET)) {
+ log.info("Set extra hive config {}={}",
configKey.substring(POOL_HIVE_EXTRA_CONFIG_PREFIX.length()),
Review comment:
"Setting additional hive config ..."?
----------------------------------------------------------------
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