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 2007/07/18 21:16:04 UTC

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

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.


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

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

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

    Status: Patch Available  (was: Open)

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


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

Posted by "Konstantin Shvachko (JIRA)" <ji...@apache.org>.
    [ 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.


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

Posted by "Hairong Kuang (JIRA)" <ji...@apache.org>.
     [ 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

Add a unit test to TestFsck.

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


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

Posted by "Hairong Kuang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-1632?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12514324 ] 

Hairong Kuang commented on HADOOP-1632:
---------------------------------------

This is a corner case. It occurs when a block has an empty location list. So the namenode is either in Safemode or a block is lost in the cluster.

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


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

Posted by "Konstantin Shvachko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-1632?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12514371 ] 

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

+1
The test fails without the fix and succeeds with it.
I wonder why fsck does not throw the exception passed to it from the name-node, but this is a different issue.

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


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

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

Doug Cutting updated HADOOP-1632:
---------------------------------

    Resolution: Fixed
        Status: Resolved  (was: Patch Available)

I just committed this.  Thanks, Hairong!

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


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

Posted by "Hairong Kuang (JIRA)" <ji...@apache.org>.
     [ 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.


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

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-1632?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12514389 ] 

Hadoop QA commented on HADOOP-1632:
-----------------------------------

+1

http://issues.apache.org/jira/secure/attachment/12362272/sort.patch applied and successfully tested against trunk revision r558243.

Test results:   http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/447/testReport/
Console output: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/447/console

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