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 "Konstantin Shvachko (JIRA)" <ji...@apache.org> on 2006/03/23 02:03:33 UTC

[jira] Commented: (HADOOP-83) infinite retries accessing a missing block

    [ http://issues.apache.org/jira/browse/HADOOP-83?page=comments#action_12371503 ] 

Konstantin Shvachko commented on HADOOP-83:
-------------------------------------------

In order to prevent the client from looping infinitely retrying to locate missing block the following line
-                   /**
                    if (failures >= MAX_BLOCK_ACQUIRE_FAILURES) {
                        throw new IOException("Could not obtain block " + blocks[targetBlock]);
                    }
-                   **/
in DFSClient.blockSeekTo(long) should be uncommented.
It is also desired to reduce the value of the MAX_BLOCK_ACQUIRE_FAILURES constant
which is set to 10 now. In current settings it will take at least 100 seconds to detect missing block.
So additionally to uncommenting the lines above I'd set
-   static int MAX_BLOCK_ACQUIRE_FAILURES = 10;
+   static int MAX_BLOCK_ACQUIRE_FAILURES = 3;
and reduce sleeping time between retries to 3 seconds from current 10
                    LOG.info("Could not obtain block from any node:  " + ie);
                    try {
-                       Thread.sleep(10000);
+                       Thread.sleep(3000);
                    } catch (InterruptedException iex) {
                    }


> infinite retries accessing a missing block
> ------------------------------------------
>
>          Key: HADOOP-83
>          URL: http://issues.apache.org/jira/browse/HADOOP-83
>      Project: Hadoop
>         Type: Bug
>   Components: dfs
>     Versions: 0.1
>     Reporter: Yoram Arnon
>     Assignee: Konstantin Shvachko

>
> A file in the DFS got corrupted - the reason for that is unknown, but might be justified.
> when accessing the file, I get an infinite stream of error messages from the client - attached below.
> The client aparently increments an error counter, but never checks it.
> Correct behaviour is for the client to retry a few times, then abort.
> 060315 105436 No node available for block blk_2690692619196463439
> 060315 105436 Could not obtain block from any node:  java.io.IOException: No live nodes contain current block
> 060315 105446 No node available for block blk_2690692619196463439
> 060315 105446 Could not obtain block from any node:  java.io.IOException: No live nodes contain current block
> 060315 105456 No node available for block blk_2690692619196463439
> 060315 105456 Could not obtain block from any node:  java.io.IOException: No live nodes contain current block
> 060315 105506 No node available for block blk_2690692619196463439
> 060315 105506 Could not obtain block from any node:  java.io.IOException: No live nodes contain current block
> 060315 105516 No node available for block blk_2690692619196463439
> 060315 105516 Could not obtain block from any node:  java.io.IOException: No live nodes contain current block
> 060315 105526 No node available for block blk_2690692619196463439
> 060315 105526 Could not obtain block from any node:  java.io.IOException: No live nodes contain current block
> 060315 105536 No node available for block blk_2690692619196463439
> 060315 105536 Could not obtain block from any node:  java.io.IOException: No live nodes contain current block
> 060315 105546 No node available for block blk_2690692619196463439
> 060315 105546 Could not obtain block from any node:  java.io.IOException: No live nodes contain current block
> 060315 105556 No node available for block blk_2690692619196463439
> 060315 105556 Could not obtain block from any node:  java.io.IOException: No live nodes contain current block
> 060315 105606 No node available for block blk_2690692619196463439
> 060315 105606 Could not obtain block from any node:  java.io.IOException: No live nodes contain current block
> 060315 105616 No node available for block blk_2690692619196463439
> 060315 105616 Could not obtain block from any node:  java.io.IOException: No live nodes contain current block
> 060315 105626 No node available for block blk_2690692619196463439
> 060315 105626 Could not obtain block from any node:  java.io.IOException: No live nodes contain current block
> 060315 105636 No node available for block blk_2690692619196463439
> 060315 105636 Could not obtain block from any node:  java.io.IOException: No live nodes contain current block
> 060315 105646 No node available for block blk_2690692619196463439
> 060315 105646 Could not obtain block from any node:  java.io.IOException: No live nodes contain current block
> 060315 105657 No node available for block blk_2690692619196463439
> 060315 105657 Could not obtain block from any node:  java.io.IOException: No live nodes contain current block
> 060315 105707 No node available for block blk_2690692619196463439
> 060315 105707 Could not obtain block from any node:  java.io.IOException: No live nodes contain current block
> 060315 105717 No node available for block blk_2690692619196463439
> 060315 105717 Could not obtain block from any node:  java.io.IOException: No live nodes contain current block
> 060315 105727 No node available for block blk_2690692619196463439
> 060315 105727 Could not obtain block from any node:  java.io.IOException: No live nodes contain current block
> 060315 105737 No node available for block blk_2690692619196463439
> 060315 105737 Could not obtain block from any node:  java.io.IOException: No live nodes contain current block
> 060315 105747 No node available for block blk_2690692619196463439
> 060315 105747 Could not obtain block from any node:  java.io.IOException: No live nodes contain current block
> 060315 105757 No node available for block blk_2690692619196463439
> 060315 105757 Could not obtain block from any node:  java.io.IOException: No live nodes contain current block
> 060315 105807 No node available for block blk_2690692619196463439
> 060315 105807 Could not obtain block from any node:  java.io.IOException: No live nodes contain current block
> 060315 105817 No node available for block blk_2690692619196463439

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira