codope commented on a change in pull request #4451:
URL: https://github.com/apache/hudi/pull/4451#discussion_r780683636
##########
File path:
hudi-kafka-connect/src/main/java/org/apache/hudi/connect/utils/KafkaConnectUtils.java
##########
@@ -65,6 +70,52 @@
private static final Logger LOG =
LogManager.getLogger(KafkaConnectUtils.class);
private static final String HOODIE_CONF_PREFIX = "hoodie.";
+ public static final String HADOOP_CONF_DIR = "HADOOP_CONF_DIR";
+ public static final String HADOOP_HOME = "HADOOP_HOME";
+ private static final List<Path> DEFAULT_HADOOP_CONF_FILES;
+
+ static {
+ DEFAULT_HADOOP_CONF_FILES = new ArrayList<>();
+ try {
+ String hadoopConfigPath = System.getenv(HADOOP_CONF_DIR);
+ String hadoopHomePath = System.getenv(HADOOP_HOME);
+ DEFAULT_HADOOP_CONF_FILES.addAll(getHadoopConfigFiles(hadoopConfigPath,
hadoopHomePath));
+ if (!DEFAULT_HADOOP_CONF_FILES.isEmpty()) {
+ LOG.info(String.format("Found Hadoop default config files %s",
DEFAULT_HADOOP_CONF_FILES));
+ }
Review comment:
Is this check needed? If yes, can we make the log level debug?
##########
File path:
hudi-kafka-connect/src/main/java/org/apache/hudi/connect/utils/KafkaConnectUtils.java
##########
@@ -89,6 +140,23 @@ public static int getLatestNumPartitions(String
bootstrapServers, String topicNa
*/
public static Configuration getDefaultHadoopConf(KafkaConnectConfigs
connectConfigs) {
Configuration hadoopConf = new Configuration();
+
+ // add hadoop config files
+ if (!StringUtils.isNullOrEmpty(connectConfigs.getHadoopConfDir())
Review comment:
Since, `DEFAULT_HADOOP_CONF_FILES` is being populated in the static
block above, why not check `DEFAULT_HADOOP_CONF_FILES.isEmpty()`?
--
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]