kbendick commented on a change in pull request #3034:
URL: https://github.com/apache/iceberg/pull/3034#discussion_r696983585
##########
File path: flink/src/main/java/org/apache/iceberg/flink/FlinkCatalogFactory.java
##########
@@ -138,6 +139,21 @@ private static Configuration mergeHiveConf(Configuration
hadoopConf, String hive
"There should be a hive-site.xml file under the directory %s",
hiveConfDir);
newConf.addResource(new Path(hiveConfDir, "hive-site.xml"));
} else {
+ // If don't provide the hive-site.xml path explicitly, it will try to
load resource from hive
+ // configuration with hive conf directory.
+ if(System.getenv("HIVE_HOME") != null){
+ File hiveSite = new File(System.getenv("HIVE_HOME") + "/conf",
"hive-site.xml");
+ if(hiveSite.exists()){
Review comment:
Same nit about `if (`.
##########
File path: flink/src/main/java/org/apache/iceberg/flink/FlinkCatalogFactory.java
##########
@@ -138,6 +139,21 @@ private static Configuration mergeHiveConf(Configuration
hadoopConf, String hive
"There should be a hive-site.xml file under the directory %s",
hiveConfDir);
newConf.addResource(new Path(hiveConfDir, "hive-site.xml"));
} else {
+ // If don't provide the hive-site.xml path explicitly, it will try to
load resource from hive
+ // configuration with hive conf directory.
+ if(System.getenv("HIVE_HOME") != null){
Review comment:
Nit: Missing space after `if`
##########
File path: flink/src/main/java/org/apache/iceberg/flink/FlinkCatalogFactory.java
##########
@@ -138,6 +139,21 @@ private static Configuration mergeHiveConf(Configuration
hadoopConf, String hive
"There should be a hive-site.xml file under the directory %s",
hiveConfDir);
newConf.addResource(new Path(hiveConfDir, "hive-site.xml"));
} else {
+ // If don't provide the hive-site.xml path explicitly, it will try to
load resource from hive
+ // configuration with hive conf directory.
+ if(System.getenv("HIVE_HOME") != null){
+ File hiveSite = new File(System.getenv("HIVE_HOME") + "/conf",
"hive-site.xml");
+ if(hiveSite.exists()){
+ newConf.addResource(new Path(hiveSite.getAbsolutePath()));
+ }
+ }
+ if(System.getenv("HIVE_CONF_DIR") != null){
Review comment:
Same nit about `if ()`.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]