You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/01/06 06:36:42 UTC

[GitHub] [hudi] codope commented on a change in pull request #4451: [HUDI-3104] Kafka-connect support hadoop config environments and properties

codope commented on a change in pull request #4451:
URL: https://github.com/apache/hudi/pull/4451#discussion_r779328474



##########
File path: hudi-kafka-connect/pom.xml
##########
@@ -271,5 +271,12 @@
             <artifactId>junit-platform-commons</artifactId>
             <scope>test</scope>
         </dependency>
+
+        <dependency>

Review comment:
       I see this dependency is required to set env vars at test time. Is there a way to avoid this? Maybe add a wrapper class for system.getEnv calls and mock that class in test?

##########
File path: hudi-kafka-connect/src/main/java/org/apache/hudi/connect/utils/KafkaConnectUtils.java
##########
@@ -65,6 +70,47 @@
 
   private static final Logger LOG = LogManager.getLogger(KafkaConnectUtils.class);
   private static final String HOODIE_CONF_PREFIX = "hoodie.";
+  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");

Review comment:
       Extract HADOOP_CONF_DIR and HADOOP_HOME to constants?




-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org