Return-Path: X-Original-To: apmail-accumulo-commits-archive@www.apache.org Delivered-To: apmail-accumulo-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 42E8117959 for ; Fri, 7 Nov 2014 22:31:17 +0000 (UTC) Received: (qmail 74521 invoked by uid 500); 7 Nov 2014 22:31:17 -0000 Delivered-To: apmail-accumulo-commits-archive@accumulo.apache.org Received: (qmail 74414 invoked by uid 500); 7 Nov 2014 22:31:17 -0000 Mailing-List: contact commits-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@accumulo.apache.org Delivered-To: mailing list commits@accumulo.apache.org Received: (qmail 74261 invoked by uid 99); 7 Nov 2014 22:31:17 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Nov 2014 22:31:17 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id C3A9499DF43; Fri, 7 Nov 2014 22:31:16 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ctubbsii@apache.org To: commits@accumulo.apache.org Date: Fri, 07 Nov 2014 22:31:23 -0000 Message-Id: <349fc49c8aaf4abfb4a06417b3e2f1a9@git.apache.org> In-Reply-To: <9313f972d3194f7da5001b7a5d2bc131@git.apache.org> References: <9313f972d3194f7da5001b7a5d2bc131@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [08/10] accumulo git commit: ACCUMULO-3147 Fix ReplicationServlet ACCUMULO-3147 Fix ReplicationServlet Properly show an informative banner message when the replication table is offline. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/5cf1888e Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/5cf1888e Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/5cf1888e Branch: refs/heads/master Commit: 5cf1888eb402dd3d22e94decedb75fb86a2264b1 Parents: 5753e16 Author: Christopher Tubbs Authored: Fri Nov 7 15:12:39 2014 -0500 Committer: Christopher Tubbs Committed: Fri Nov 7 15:12:39 2014 -0500 ---------------------------------------------------------------------- .../apache/accumulo/monitor/servlets/ReplicationServlet.java | 5 +++++ 1 file changed, 5 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/accumulo/blob/5cf1888e/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/ReplicationServlet.java ---------------------------------------------------------------------- diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/ReplicationServlet.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/ReplicationServlet.java index 7d3cb14..94765f8 100644 --- a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/ReplicationServlet.java +++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/ReplicationServlet.java @@ -28,6 +28,7 @@ import org.apache.accumulo.core.client.Instance; import org.apache.accumulo.core.client.admin.TableOperations; import org.apache.accumulo.core.master.thrift.MasterMonitorInfo; import org.apache.accumulo.core.replication.ReplicationConstants; +import org.apache.accumulo.core.replication.ReplicationTable; import org.apache.accumulo.core.replication.ReplicationTarget; import org.apache.accumulo.core.security.Credentials; import org.apache.accumulo.core.zookeeper.ZooUtil; @@ -75,6 +76,10 @@ public class ReplicationServlet extends BasicServlet { int totalWorkQueueSize = replicationUtil.getMaxReplicationThreads(systemProps, mmi); TableOperations tops = conn.tableOperations(); + if (!ReplicationTable.isOnline(conn)) { + banner(sb, "", "Replication table is offline"); + return; + } Table replicationStats = new Table("replicationStats", "Replication Status"); replicationStats.addSortableColumn("Table");