You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "he yongqiang (JIRA)" <ji...@apache.org> on 2009/03/09 07:02:50 UTC

[jira] Created: (HADOOP-5439) FileSystem.create() with overwrite param specified sometimes takes a long time to return.

FileSystem.create() with overwrite param specified sometimes takes a long time to return.
-----------------------------------------------------------------------------------------

                 Key: HADOOP-5439
                 URL: https://issues.apache.org/jira/browse/HADOOP-5439
             Project: Hadoop Core
          Issue Type: Bug
    Affects Versions: 0.19.0
            Reporter: he yongqiang


If a file already exists, it takes a long time for the overwrite create to return.
{code}
fs.create(path_1, true);
{code}
sometimes takes a long time. 

Instead, the code:
{code}
if (fs.exists(path_1))
    fs.delete(path_1);
fs.create(path_1);
{code}
works pretty well.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-5439) FileSystem.create() with overwrite param specified sometimes takes a long time to return.

Posted by "He Yongqiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-5439?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12712505#action_12712505 ] 

He Yongqiang commented on HADOOP-5439:
--------------------------------------

It seems this issue is related to HADOOP-5859 and HADOOP-5904.

> FileSystem.create() with overwrite param specified sometimes takes a long time to return.
> -----------------------------------------------------------------------------------------
>
>                 Key: HADOOP-5439
>                 URL: https://issues.apache.org/jira/browse/HADOOP-5439
>             Project: Hadoop Core
>          Issue Type: Bug
>    Affects Versions: 0.19.0
>            Reporter: He Yongqiang
>
> If a file already exists, it takes a long time for the overwrite create to return.
> {code}
> fs.create(path_1, true);
> {code}
> sometimes takes a long time. 
> Instead, the code:
> {code}
> if (fs.exists(path_1))
>     fs.delete(path_1);
> fs.create(path_1);
> {code}
> works pretty well.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-5439) FileSystem.create() with overwrite param specified sometimes takes a long time to return.

Posted by "Zheng Shao (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-5439?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12680075#action_12680075 ] 

Zheng Shao commented on HADOOP-5439:
------------------------------------

The new code block may have a concurrent issue in case 2 clients are operating on the same file.

We should fix the slow response of create with overwrite. Some profiling will be very useful here to identify the real cause.


> FileSystem.create() with overwrite param specified sometimes takes a long time to return.
> -----------------------------------------------------------------------------------------
>
>                 Key: HADOOP-5439
>                 URL: https://issues.apache.org/jira/browse/HADOOP-5439
>             Project: Hadoop Core
>          Issue Type: Bug
>    Affects Versions: 0.19.0
>            Reporter: he yongqiang
>
> If a file already exists, it takes a long time for the overwrite create to return.
> {code}
> fs.create(path_1, true);
> {code}
> sometimes takes a long time. 
> Instead, the code:
> {code}
> if (fs.exists(path_1))
>     fs.delete(path_1);
> fs.create(path_1);
> {code}
> works pretty well.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-5439) FileSystem.create() with overwrite param specified sometimes takes a long time to return.

Posted by "dhruba borthakur (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-5439?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12680794#action_12680794 ] 

dhruba borthakur commented on HADOOP-5439:
------------------------------------------

Also, the proposed code needs two RPCs to the namenode (instead of one). This might not be acceptable. It is better to find out the cause of the slowness.

> FileSystem.create() with overwrite param specified sometimes takes a long time to return.
> -----------------------------------------------------------------------------------------
>
>                 Key: HADOOP-5439
>                 URL: https://issues.apache.org/jira/browse/HADOOP-5439
>             Project: Hadoop Core
>          Issue Type: Bug
>    Affects Versions: 0.19.0
>            Reporter: he yongqiang
>
> If a file already exists, it takes a long time for the overwrite create to return.
> {code}
> fs.create(path_1, true);
> {code}
> sometimes takes a long time. 
> Instead, the code:
> {code}
> if (fs.exists(path_1))
>     fs.delete(path_1);
> fs.create(path_1);
> {code}
> works pretty well.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.