lirui-apache commented on a change in pull request #15274:
URL: https://github.com/apache/flink/pull/15274#discussion_r598476652
##########
File path:
flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/table/catalog/hive/util/HiveTableUtil.java
##########
@@ -454,22 +454,34 @@ public static void checkAcidTable(CatalogTable
catalogTable, ObjectPath tablePat
*/
public static Configuration getHadoopConfiguration(String hadoopConfDir) {
if (new File(hadoopConfDir).exists()) {
- Configuration hadoopConfiguration = new Configuration();
+ Configuration hadoopConfiguration = null;
File coreSite = new File(hadoopConfDir, "core-site.xml");
if (coreSite.exists()) {
+ if (hadoopConfiguration == null) {
Review comment:
Instead of checking this for each conf file, we can create a list to
remember all the existing files. If the list is not empty, create the
configuration and add the resources. Otherwise return null.
--
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]