gaborgsomogyi commented on code in PR #19986:
URL: https://github.com/apache/flink/pull/19986#discussion_r898783437


##########
flink-filesystems/flink-hadoop-fs/src/main/java/org/apache/flink/runtime/util/HadoopUtils.java:
##########
@@ -77,47 +75,18 @@ public static Configuration getHadoopConfiguration(
 
         for (String possibleHadoopConfPath : possibleHadoopConfPaths) {
             if (possibleHadoopConfPath != null) {
-                foundHadoopConfiguration = addHadoopConfIfFound(result, 
possibleHadoopConfPath);
+                foundHadoopConfiguration |= addHadoopConfIfFound(result, 
possibleHadoopConfPath);
             }
         }
 
-        // Approach 2: Flink configuration (deprecated)
-        final String hdfsDefaultPath =
-                
flinkConfiguration.getString(ConfigConstants.HDFS_DEFAULT_CONFIG, null);
-        if (hdfsDefaultPath != null) {
-            result.addResource(new org.apache.hadoop.fs.Path(hdfsDefaultPath));
-            LOG.debug(
-                    "Using hdfs-default configuration-file path from Flink 
config: {}",
-                    hdfsDefaultPath);
-            foundHadoopConfiguration = true;
-        }
-
-        final String hdfsSitePath =
-                flinkConfiguration.getString(ConfigConstants.HDFS_SITE_CONFIG, 
null);
-        if (hdfsSitePath != null) {
-            result.addResource(new org.apache.hadoop.fs.Path(hdfsSitePath));
-            LOG.debug(
-                    "Using hdfs-site configuration-file path from Flink 
config: {}", hdfsSitePath);
-            foundHadoopConfiguration = true;
-        }
-
-        final String hadoopConfigPath =
-                
flinkConfiguration.getString(ConfigConstants.PATH_HADOOP_CONFIG, null);
-        if (hadoopConfigPath != null) {
-            LOG.debug("Searching Hadoop configuration files in Flink config: 
{}", hadoopConfigPath);
-            foundHadoopConfiguration =
-                    addHadoopConfIfFound(result, hadoopConfigPath) || 
foundHadoopConfiguration;
-        }
-
-        // Approach 3: HADOOP_CONF_DIR environment variable
+        // Approach 2: HADOOP_CONF_DIR environment variable
         String hadoopConfDir = System.getenv("HADOOP_CONF_DIR");
         if (hadoopConfDir != null) {
             LOG.debug("Searching Hadoop configuration files in 
HADOOP_CONF_DIR: {}", hadoopConfDir);
-            foundHadoopConfiguration =
-                    addHadoopConfIfFound(result, hadoopConfDir) || 
foundHadoopConfiguration;
+            foundHadoopConfiguration |= addHadoopConfIfFound(result, 
hadoopConfDir);

Review Comment:
   Same here.



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

Reply via email to