hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Sherman (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (HIVE-19391) RowContainer.setupWriter hangs when the file creation failed
Date Thu, 21 Jun 2018 23:23:00 GMT

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

Andrew Sherman reassigned HIVE-19391:
-------------------------------------

    Assignee: Andrew Sherman

> RowContainer.setupWriter hangs when the file creation failed
> ------------------------------------------------------------
>
>                 Key: HIVE-19391
>                 URL: https://issues.apache.org/jira/browse/HIVE-19391
>             Project: Hive
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 1.0.0
>            Reporter: John Doe
>            Assignee: Andrew Sherman
>            Priority: Major
>
> The while loop in the RowContainer.setupWriter function hangs endlessly when the file
creation failed, causing the delete() returns false.
> The file creation failure can be caused by different reasons, e.g., disk full.
> Here is the code snippet.
>  
> {code:java}
>   protected void setupWriter() throws HiveException {
>     try {
>       if ( tmpFile != null ) {
>         return;
>       }
>       String suffix = ".tmp";
>       if (this.keyObject != null) {
>         suffix = "." + this.keyObject.toString() + suffix;
>       }
>       while (true) {
>         parentFile = File.createTempFile("hive-rowcontainer", ""); //file creation failed
>         boolean success = parentFile.delete() && parentFile.mkdir(); //delete
returns false
>         if (success) {
>           break;
>         }
>         LOG.debug("retry creating tmp row-container directory...");
>       }
>       ...
>   }
> {code}



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

Mime
View raw message