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 "Hairong Kuang (JIRA)" <ji...@apache.org> on 2007/07/20 22:47:06 UTC

[jira] Updated: (HADOOP-1632) IllegalArgumentException in fsck

     [ https://issues.apache.org/jira/browse/HADOOP-1632?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hairong Kuang updated HADOOP-1632:
----------------------------------

    Attachment: sort.patch

Here is a simple fix.

> IllegalArgumentException in fsck
> --------------------------------
>
>                 Key: HADOOP-1632
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1632
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.14.0
>            Reporter: Konstantin Shvachko
>            Assignee: Hairong Kuang
>            Priority: Blocker
>             Fix For: 0.14.0
>
>         Attachments: sort.patch
>
>
> The easy way to reproduce this bug is to run fsck when only the name-node is up.
> The problem is that NetworkTopology.pseudoSortByDistance() is trying to get nextInt() to the length of 
> the array of node locations, which is empty in this case, and nextInt() throws an exception when the argument is not positive.
> java.lang.IllegalArgumentException: n must be positive
> 	at java.util.Random.nextInt(Random.java:248)
> 	at org.apache.hadoop.net.NetworkTopology.pseudoSortByDistance(NetworkTopology.java:642)
> 	at org.apache.hadoop.dfs.FSNamesystem.getBlockLocations(FSNamesystem.java:556)
> 	at org.apache.hadoop.dfs.NameNode.getBlockLocations(NameNode.java:280)
> 	at org.apache.hadoop.dfs.NamenodeFsck.check(NamenodeFsck.java:154)
> 	at org.apache.hadoop.dfs.NamenodeFsck.fsck(NamenodeFsck.java:123)
> 	at org.apache.hadoop.dfs.FsckServlet.doGet(FsckServlet.java:49)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> 	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:427)
> 	at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:475)
> 	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)
> 	at org.mortbay.http.HttpContext.handle(HttpContext.java:1565)
> 	at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:635)
> 	at org.mortbay.http.HttpContext.handle(HttpContext.java:1517)
> 	at org.mortbay.http.HttpServer.service(HttpServer.java:954)
> 	at org.mortbay.http.HttpConnection.service(HttpConnection.java:814)
> 	at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:981)
> 	at org.mortbay.http.HttpConnection.handle(HttpConnection.java:831)
> 	at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
> 	at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
> 	at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)

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