hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Konstantin Shvachko (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HADOOP-1632) IllegalArgumentException in fsck
Date Wed, 18 Jul 2007 19:29:04 GMT

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

Konstantin Shvachko commented on HADOOP-1632:
---------------------------------------------

Also TestFsck should be able to catch this.


> 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
>
>
> 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.


Mime
View raw message