[ https://issues.apache.org/jira/browse/ACCUMULO-4556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Christopher Tubbs resolved ACCUMULO-4556. ----------------------------------------- Resolution: Fixed Fix Version/s: (was: 1.7.4) (was: 1.9.0) I believe this was fixed in 2.0 with ACCUMULO-3005. Please open a new issue at https://github.com/apache/accumulo/issues if it persists. > 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 > Priority: Major > Labels: beginner > Fix For: 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 (v7.6.3#76005)