You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Rui Li (JIRA)" <ji...@apache.org> on 2016/06/13 10:45:21 UTC
[jira] [Commented] (HIVE-13997) Insert overwrite directory doesn't
overwrite existing files
[ https://issues.apache.org/jira/browse/HIVE-13997?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15327149#comment-15327149 ]
Rui Li commented on HIVE-13997:
-------------------------------
The patch deletes all existing files in dest dir if we're told to overwrite the directory. And it adds a new test to cover this.
Please note it's not enough just to overwrite existing files - we need to delete all of them. As in the new test, the two count( * ) should give the same result.
One interesting finding is that, when target file exists, whether {{FileSystem::rename}} succeeds is inconsistent among different implementations, or even platform-dependent. In my local test, the rename succeeds for {{TestCliDriver}} which runs on local FS, but it fails for tests that run on a mini DFS like {{TestMiniSparkOnYarnCliDriver}}.
> Insert overwrite directory doesn't overwrite existing files
> -----------------------------------------------------------
>
> Key: HIVE-13997
> URL: https://issues.apache.org/jira/browse/HIVE-13997
> Project: Hive
> Issue Type: Bug
> Reporter: Rui Li
> Assignee: Rui Li
> Attachments: HIVE-13997.1.patch
>
>
> Can be easily reproduced by running {{INSERT OVERWRITE DIRECTORY}} to the same dir twice.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)