accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher Tubbs (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ACCUMULO-4556) Monitor shows stack trace for NPE while viewing table details for accumulo.root if tablet is offline
Date Fri, 06 Jan 2017 23:19:58 GMT

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

Christopher Tubbs commented on ACCUMULO-4556:
---------------------------------------------

[~lstav] might want to see how this affects what he's doing with ACCUMULO-3005

> Monitor shows stack trace for NPE while viewing table details for accumulo.root if tablet
is offline
> ----------------------------------------------------------------------------------------------------
>
>                 Key: ACCUMULO-4556
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-4556
>             Project: Accumulo
>          Issue Type: Bug
>          Components: monitor
>    Affects Versions: 1.7.1, 1.7.2, 1.8.0
>            Reporter: Sean Busbey
>              Labels: beginner
>             Fix For: 1.7.3, 1.8.1, 2.0.0
>
>
> AFAICT this is a problem in atleast 1.6.0 - current master (2.0-SNAPSHOT)
> Noticed this while debugging a cluster with offline root tablet:
> monitor -> Tables -> (shows accumulo.root with 1 offline tablet) -> accumulo.root
->
> {code}
> java.lang.NullPointerException
> 	at java.util.TreeMap.compare(TreeMap.java:1188)
> 	at java.util.TreeMap.put(TreeMap.java:531)
> 	at java.util.TreeSet.add(TreeSet.java:255)
> 	at org.apache.accumulo.monitor.servlets.TablesServlet.doTableDetails(TablesServlet.java:152)
> 	at org.apache.accumulo.monitor.servlets.TablesServlet.pageBody(TablesServlet.java:75)
> 	at org.apache.accumulo.monitor.servlets.BasicServlet.doGet(BasicServlet.java:65)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> 	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
> 	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)
> 	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
> 	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:767)
> 	at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
> 	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
> 	at org.mortbay.jetty.Server.handle(Server.java:326)
> 	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
> 	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
> 	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
> 	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
> 	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
> 	at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
> 	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
> {code}
> Looking at master branch our handling in TablesServlet looks like
> {code}
>   private void doTableDetails(HttpServletRequest req, StringBuilder sb, Map<String,String>
tidToNameMap, String tableId) {
>     String displayName = Tables.getPrintableTableNameFromId(tidToNameMap, tableId);
>     Instance instance = Monitor.getContext().getInstance();
>     TreeSet<String> locs = new TreeSet<>();
>     if (RootTable.ID.equals(tableId)) {
>       locs.add(instance.getRootTabletLocation());
>     } else {
> ...
> {code}
> The Instance API doesn't say it, but all of our current implementations return {{null}}
for {{getRootTabletLocation}} when the root tablet is offline. Since we create {{locs}} with
the empty constructor, it uses natural ordering and doesn't allow {{null}} members, so things
explode.



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

Mime
View raw message