yihua commented on a change in pull request #4451: URL: https://github.com/apache/hudi/pull/4451#discussion_r779926852
########## File path: hudi-kafka-connect/src/test/java/org/apache/hudi/connect/TestHdfsConfiguration.java ########## @@ -0,0 +1,69 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hudi.connect; + +import org.apache.hudi.connect.utils.KafkaConnectUtils; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.apache.hudi.connect.writers.KafkaConnectConfigs; +import org.junit.jupiter.api.Test; + +import java.nio.file.Path; +import java.util.List; + +import static com.github.stefanbirkner.systemlambda.SystemLambda.withEnvironmentVariable; Review comment: Could you use mocks to get rid of this import? ########## File path: hudi-kafka-connect/pom.xml ########## @@ -271,5 +271,12 @@ <artifactId>junit-platform-commons</artifactId> <scope>test</scope> </dependency> + + <dependency> Review comment: Besides, this dependency uses MIT License. Not sure if we allow it. ########## File path: hudi-kafka-connect/src/main/java/org/apache/hudi/connect/writers/KafkaConnectConfigs.java ########## @@ -93,6 +93,17 @@ .defaultValue(true) .withDocumentation("Commit even when some records failed to be written"); + // Reference https://docs.confluent.io/kafka-connect-hdfs/current/configuration_options.html#hdfs + public static final ConfigProperty<String> HADOOP_CONF_DIR = ConfigProperty + .key("hadoop.conf.dir") + .defaultValue("") Review comment: Use `.noDefault()`? ########## File path: hudi-kafka-connect/pom.xml ########## @@ -271,5 +271,12 @@ <artifactId>junit-platform-commons</artifactId> <scope>test</scope> </dependency> + + <dependency> Review comment: +1 ########## File path: hudi-kafka-connect/src/main/java/org/apache/hudi/connect/writers/KafkaConnectConfigs.java ########## @@ -93,6 +93,17 @@ .defaultValue(true) .withDocumentation("Commit even when some records failed to be written"); + // Reference https://docs.confluent.io/kafka-connect-hdfs/current/configuration_options.html#hdfs + public static final ConfigProperty<String> HADOOP_CONF_DIR = ConfigProperty + .key("hadoop.conf.dir") + .defaultValue("") + .withDocumentation("The Hadoop configuration directory."); + + public static final ConfigProperty<String> HADOOP_HOME = ConfigProperty + .key("hadoop.home") + .defaultValue("") 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]
