hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xuefu Zhang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-10768) In QTestGenTask.execute() we should not throw an exception right away if we are unable to clean any old files
Date Wed, 20 May 2015 13:33:59 GMT

    [ https://issues.apache.org/jira/browse/HIVE-10768?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14552322#comment-14552322
] 

Xuefu Zhang commented on HIVE-10768:
------------------------------------

Hi [~hsubramaniyan], thanks for looking into this. A couple of comments/questions:
1. In what situation the file to be deleted might be locked by other process?
2. Would you consider using File.createTempFile(String prefix, String suffix) to generate
unique file names rather than having your own?

> In QTestGenTask.execute() we should not throw an exception right away if we are unable
to clean any old files
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-10768
>                 URL: https://issues.apache.org/jira/browse/HIVE-10768
>             Project: Hive
>          Issue Type: Bug
>          Components: Testing Infrastructure
>            Reporter: Hari Sankar Sivarama Subramaniyan
>            Assignee: Hari Sankar Sivarama Subramaniyan
>         Attachments: HIVE-10768.1.patch
>
>
> Currently in QTestGenTask.execute(), we have code like :
> {code}
>        if (logFile != null) {
>          File lf = new File(logFile);
>          if (lf.exists()) {
>            if (!lf.delete()) {
>              throw new Exception("Could not delete log file " + lf.getCanonicalPath());
>          }
> {code}
> If the log file gets locked due to some other process, it throws the above exception
and short circuits the entire test suite. We should provide a mechanism to generate alternative
new log files/temporary files whenever possible to avoid unit test failures.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message