hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sahil Takiar (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-18639) HiveMetaStoreFsImpl#deleteDir should check return value of FileUtils#moveToTrash
Date Tue, 06 Feb 2018 18:52:00 GMT

     [ https://issues.apache.org/jira/browse/HIVE-18639?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sahil Takiar updated HIVE-18639:
--------------------------------
    Attachment: HIVE-18639.1.patch

> HiveMetaStoreFsImpl#deleteDir should check return value of FileUtils#moveToTrash
> --------------------------------------------------------------------------------
>
>                 Key: HIVE-18639
>                 URL: https://issues.apache.org/jira/browse/HIVE-18639
>             Project: Hive
>          Issue Type: Bug
>          Components: Metastore
>            Reporter: Sahil Takiar
>            Assignee: Sahil Takiar
>            Priority: Major
>         Attachments: HIVE-18639.1.patch
>
>
> {{HiveMetaStoreFsImpl#deleteDir}} moves a dir to a the trash, but then doesn't check
if {{FileUtils#moveToTrash}} returns true or not. Then it checks if the file exists, and throes
an exception if it doesn't. If {{FileUtils#moveToTrash}} returns {{true}} then the {{exists}}
check is not necessary. Before HIVE-15880 the code was reading the return value of {{delete}}
and then conditionally ran the {{exists}} check, we should go back to the old behavior. This
can also cause problems on filesystems like S3.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message