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

Rakesh R commented on HADOOP-6359:
----------------------------------

Hi [~szetszwo],

I could see {{numOfDatanodes == 0}} scenario has been taken care. Anything else 
needs to be taken care. Otw can we close this?

NetworkTopology.java
{code}
    if (numOfDatanodes == 0) {
      throw new InvalidTopologyException(
          "Failed to find datanode (scope=\"" + String.valueOf(scope) +
          "\" excludedScope=\"" + String.valueOf(excludedScope) + "\").");
    }
{code}

> NetworkTopology.chooseRandom(..) throws an IllegalArgumentException
> -------------------------------------------------------------------
>
>                 Key: HADOOP-6359
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6359
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: Tsz Wo Nicholas Sze
>              Labels: newbie
>
> When numOfDatanodes == 0, NetworkTopology.chooseRandom(..) throws an 
> IllegalArgumentException.
> {noformat}
> 2009-09-30 00:12:50,768 ERROR org.mortbay.log: /nn_browsedfscontent.jsp
> java.lang.IllegalArgumentException: n must be positive
>         at java.util.Random.nextInt(Random.java:250)
>         at 
> org.apache.hadoop.net.NetworkTopology.chooseRandom(NetworkTopology.java:536)
>         at 
> org.apache.hadoop.net.NetworkTopology.chooseRandom(NetworkTopology.java:504)
>         ...
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to