lirui-apache commented on a change in pull request #10062: [FLINK-14588][hive] 
Support Hive version 1.0.0 and 1.0.1
URL: https://github.com/apache/flink/pull/10062#discussion_r341433876
 
 

 ##########
 File path: 
flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/connectors/hive/HiveTableOutputFormat.java
 ##########
 @@ -441,17 +444,6 @@ public void close() throws IOException {
        private HivePartitionWriter writerForLocation(String location) throws 
IOException {
                JobConf clonedConf = new JobConf(jobConf);
                clonedConf.set(OUTDIR, location);
-               OutputFormat outputFormat;
-               try {
-                       StorageDescriptor sd = 
hiveTablePartition.getStorageDescriptor();
-                       Class outputFormatClz = 
Class.forName(sd.getOutputFormat(), true,
-                               Thread.currentThread().getContextClassLoader());
-                       outputFormatClz = 
HiveFileFormatUtils.getOutputFormatSubstitute(outputFormatClz);
-                       outputFormat = (OutputFormat) 
outputFormatClz.newInstance();
-               } catch (InstantiationException | IllegalAccessException | 
ClassNotFoundException e) {
-                       throw new FlinkRuntimeException("Unable to instantiate 
the hadoop output format", e);
-               }
-               ReflectionUtils.setConf(outputFormat, clonedConf);
 
 Review comment:
   I have checked and what's missing is not really needed.

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


With regards,
Apache Git Services

Reply via email to