rdblue commented on code in PR #4622:
URL: https://github.com/apache/iceberg/pull/4622#discussion_r857184350


##########
flink/v1.13/flink/src/main/java/org/apache/iceberg/flink/FlinkCatalogFactory.java:
##########
@@ -153,6 +156,17 @@ private static Configuration mergeHiveConf(Configuration 
hadoopConf, String hive
         newConf.addResource(configFile);
       }
     }
+
+    if (!Strings.isNullOrEmpty(hadoopConfDir)) {
+      if (new File(hadoopConfDir).exists()) {
+        Preconditions.checkState(Files.exists(Paths.get(hadoopConfDir, 
"hdfs-site.xml")),
+                "There should be a hdfs-site.xml file under the directory %s", 
hadoopConfDir);

Review Comment:
   The indentation is off; please fix this to match the rest of the file.
   
   This error message (and the existing one) aren't very good. In Iceberg, we 
are clear about what was attempted and what happened, then clarify why. Here, 
the error message should be `"Failed to load Hadoop configuration: missing %s", 
hiveSitePath`



-- 
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]

Reply via email to