You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Ranith Sardar (Jira)" <ji...@apache.org> on 2019/09/19 08:31:00 UTC

[jira] [Commented] (HADOOP-16585) [Tool:NNloadGeneratorMR] Multiple threads are using same id for creating file LoadGenerator#write

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

Ranith Sardar commented on HADOOP-16585:
----------------------------------------

Attached the initial patch.

>  [Tool:NNloadGeneratorMR] Multiple threads are using same id for creating file LoadGenerator#write 
> ---------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-16585
>                 URL: https://issues.apache.org/jira/browse/HADOOP-16585
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: Ranith Sardar
>            Assignee: Ranith Sardar
>            Priority: Major
>         Attachments: HADOOP-16585.001.patch
>
>
> {code:java}
> // id would be same for multiple file, so it may occur file not found exception
> private void write() throws IOException {
>   String dirName = dirs.get(r.nextInt(dirs.size()));
>   Path file = new Path(dirName, hostname+id);
>   ....
>   fc.delete(file, true);
>   ..
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org