[
https://issues.apache.org/jira/browse/HIVE-23451?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17105873#comment-17105873
]
Ashutosh Chauhan commented on HIVE-23451:
-----------------------------------------
How is totalFiles used? Can you explain how is this suppose to work? I wonder
alternative approach could be following.
This deletion is invoked in createBucketForFileIdx(). createBucketFiles() calls
the first one, so it will be called twice. I wonder whether we shall just
remove this if() call altogether at:
https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/exec/FileSinkOperator.java#L796
since invocation from
https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/exec/FileSinkOperator.java#L790
will already result in call at
https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/exec/FileSinkOperator.java#L826
for all indices.
I dont see any reason to treat index 0 especially as its done currently.
> FileSinkOperator calls deleteOnExit (hdfs call) twice for the same file
> -----------------------------------------------------------------------
>
> Key: HIVE-23451
> URL: https://issues.apache.org/jira/browse/HIVE-23451
> Project: Hive
> Issue Type: Improvement
> Reporter: Rajesh Balamohan
> Assignee: Rajesh Balamohan
> Priority: Minor
> Attachments: HIVE-23451.1.patch
>
>
> [https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/exec/FileSinkOperator.java#L826]
> [https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/exec/FileSinkOperator.java#L797]
> Can avoid a NN call here (i.e, mainly for small queries).
--
This message was sent by Atlassian Jira
(v8.3.4#803005)