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:
us...@infra.apache.org


Reply via email to