You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/09/22 13:12:19 UTC

[GitHub] [flink] lirui-apache commented on a change in pull request #13434: [FLINK-19292][hive] HiveCatalog should support specifying Hadoop conf dir with configuration

lirui-apache commented on a change in pull request #13434:
URL: https://github.com/apache/flink/pull/13434#discussion_r492720329



##########
File path: flink-connectors/flink-connector-hive/src/test/java/org/apache/flink/table/catalog/hive/factories/HiveCatalogFactoryTest.java
##########
@@ -57,10 +59,10 @@
 	public ExpectedException expectedException = ExpectedException.none();
 
 	@Test
-	public void test() {
+	public void test() throws IOException {

Review comment:
       Besides, we need to add a test case for the hadoop conf dir configuration.

##########
File path: flink-connectors/flink-connector-hive/src/test/java/org/apache/flink/table/catalog/hive/factories/HiveCatalogFactoryTest.java
##########
@@ -57,10 +59,10 @@
 	public ExpectedException expectedException = ExpectedException.none();
 
 	@Test
-	public void test() {
+	public void test() throws IOException {

Review comment:
       Create a new test case for this

##########
File path: flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/table/catalog/hive/HiveCatalog.java
##########
@@ -199,7 +207,7 @@ private static HiveConf createHiveConf(@Nullable String hiveConfDir) {
 		Configuration hadoopConf = HadoopUtils.getHadoopConfiguration(new org.apache.flink.configuration.Configuration());
 
 		// Add mapred-site.xml. We need to read configurations like compression codec.
-		for (String possibleHadoopConfPath : HadoopUtils.possibleHadoopConfPaths(new org.apache.flink.configuration.Configuration())) {
+		for (String possibleHadoopConfPath : HadoopUtils.possibleHadoopConfPaths(new org.apache.flink.configuration.Configuration(), hadoopConfDir)) {

Review comment:
       Let's not modify `HadoopUtils`. Instead, if `hadoopConfDir` is not null, set `ConfigConstants.PATH_HADOOP_CONFIG` in the `Configuration` instance.




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

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