accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [08/10] accumulo git commit: ACCUMULO-3147 Fix ReplicationServlet
Date Fri, 07 Nov 2014 22:31:23 GMT
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 <ctubbsii@apache.org>
Authored: Fri Nov 7 15:12:39 2014 -0500
Committer: Christopher Tubbs <ctubbsii@apache.org>
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");


Mime
View raw message