pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aniket Mokashi (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PIG-3874) FileLocalizer temp path can sometimes be non-unique
Date Wed, 28 May 2014 16:04:02 GMT

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

Aniket Mokashi commented on PIG-3874:
-------------------------------------

Patch needs to be rebased.
Why not try n-times instead of two-  that will also avoid code duplication.

Something like-
{code}
int retryCount = 0;
Exception caughtException = null;
while (true) {
  try {
     // createRelativeRoot etc.
     // and then
     break;
   } catch (IOException ioe) {
     caughtException = ioe;
   }
   if (retryCount >= retryLimit) { // retryLimit = 5 hardcoded
     throw new IOException(caughtException);
   }
   retryCount++;
   //Thread.sleep() etc.
}
{code}


> FileLocalizer temp path can sometimes be non-unique
> ---------------------------------------------------
>
>                 Key: PIG-3874
>                 URL: https://issues.apache.org/jira/browse/PIG-3874
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.13.0
>            Reporter: Mona Chitnis
>            Assignee: Mona Chitnis
>             Fix For: 0.13.0
>
>         Attachments: PIG-3874-1.patch, PIG-3874-2.patch, PIG-3874.patch
>
>
> In some rare corner cases, more than one process can arrive at the same randomly generated
temporary path to localize task files. This needs to be handled with a check to see if location
already exists and to get a unique path.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message