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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to