You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by "Suresh Srinivas (JIRA)" <ji...@apache.org> on 2011/03/03 22:00:37 UTC

[jira] Created: (HDFS-1718) HDFS Federation: MiniDFSCluster#waitActive() bug causes some tests to fail

HDFS Federation: MiniDFSCluster#waitActive() bug causes some tests to fail 
---------------------------------------------------------------------------

                 Key: HDFS-1718
                 URL: https://issues.apache.org/jira/browse/HDFS-1718
             Project: Hadoop HDFS
          Issue Type: Sub-task
          Components: test
    Affects Versions: Federation Branch
            Reporter: Suresh Srinivas
            Assignee: Suresh Srinivas
             Fix For: Federation Branch


MiniDFSCluster#shouldWait() method waits for all the datanodes to come up and register with the namenode.

Due to threading issues some of the tests fail for two reasons:
# Datanode#isDatanodeUp() fails even if all the BPOfferService threads have exited. This is due to Thread.isAlive()
returning true, even though the thread has exited. Adding a check to BPOfferService#shouldService run as an addition,
fixes this issues.
# shouldWait(), where isBPServiceAlive() is called, does not work when a BPOfferService thread fails before the
datanode has discovered the BPID, from handshake with namenode. This can be fixed by checking the thread state using
InetSocketAddress to determine the BPOfferService, instead of BPID.


-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (HDFS-1718) HDFS Federation: MiniDFSCluster#waitActive() bug causes some tests to fail

Posted by "Suresh Srinivas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HDFS-1718?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Suresh Srinivas resolved HDFS-1718.
-----------------------------------

      Resolution: Fixed
    Hadoop Flags: [Reviewed]

I committed the patch.

> HDFS Federation: MiniDFSCluster#waitActive() bug causes some tests to fail 
> ---------------------------------------------------------------------------
>
>                 Key: HDFS-1718
>                 URL: https://issues.apache.org/jira/browse/HDFS-1718
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: test
>    Affects Versions: Federation Branch
>            Reporter: Suresh Srinivas
>            Assignee: Suresh Srinivas
>             Fix For: Federation Branch
>
>         Attachments: HDFS-1718.patch
>
>
> MiniDFSCluster#shouldWait() method waits for all the datanodes to come up and register with the namenode.
> Due to threading issues some of the tests fail for two reasons:
> # Datanode#isDatanodeUp() fails even if all the BPOfferService threads have exited. This is due to Thread.isAlive()
> returning true, even though the thread has exited. Adding a check to BPOfferService#shouldService run as an addition,
> fixes this issues.
> # shouldWait(), where isBPServiceAlive() is called, does not work when a BPOfferService thread fails before the
> datanode has discovered the BPID, from handshake with namenode. This can be fixed by checking the thread state using
> InetSocketAddress to determine the BPOfferService, instead of BPID.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira