You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2021/03/17 01:39:37 UTC

[GitHub] [flink] SteNicholas commented on a change in pull request #15244: [FLINK-21829][Hive Connect]Fix to create HiveCatalog with custom hadoopconfdir first

SteNicholas commented on a change in pull request #15244:
URL: https://github.com/apache/flink/pull/15244#discussion_r595653041



##########
File path: flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/table/catalog/hive/HiveCatalog.java
##########
@@ -212,7 +212,10 @@ private static HiveConf createHiveConf(
             @Nullable String hiveConfDir, @Nullable String hadoopConfDir) {
         // create HiveConf from hadoop configuration with hadoop conf directory configured.
         Configuration hadoopConf = null;
-        if (isNullOrWhitespaceOnly(hadoopConfDir)) {
+        if (!isNullOrWhitespaceOnly(hadoopConfDir)) {
+            hadoopConf = getHadoopConfiguration(hadoopConfDir);
+        }
+        if (hadoopConf == null) {

Review comment:
       @hehuiyuan , if the `hadoopConfDir ` has been configured and the `hadoopConf` is null, it should create new `Configuration`. Otherwise, it causes that the `hadoopConfDir` configured looks like correct for the users.




----------------------------------------------------------------
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:
users@infra.apache.org