You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2015/05/20 22:32:53 UTC
hbase git commit: HBASE-13656 Rename getDeadServers to
getDeadServersSize in Admin
Repository: hbase
Updated Branches:
refs/heads/master e2e9ea5bd -> 315f59679
HBASE-13656 Rename getDeadServers to getDeadServersSize in Admin
Replace JIRA
Signed-off-by: stack <st...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/315f5967
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/315f5967
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/315f5967
Branch: refs/heads/master
Commit: 315f596798d78d54c09d9d6b3c5751548cd68468
Parents: e2e9ea5
Author: Lars Francke <la...@gmail.com>
Authored: Sun May 10 22:22:40 2015 +0200
Committer: stack <st...@apache.org>
Committed: Wed May 20 13:32:06 2015 -0700
----------------------------------------------------------------------
.../java/org/apache/hadoop/hbase/ClusterStatus.java | 14 +++++++++++++-
hbase-shell/src/main/ruby/hbase/admin.rb | 2 +-
2 files changed, 14 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/315f5967/hbase-client/src/main/java/org/apache/hadoop/hbase/ClusterStatus.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/ClusterStatus.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/ClusterStatus.java
index edfaa6f..4b73dda 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/ClusterStatus.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/ClusterStatus.java
@@ -124,11 +124,23 @@ public class ClusterStatus extends VersionedWritable {
/**
* @return the number of dead region servers in the cluster
+ * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
+ * (<a href="https://issues.apache.org/jira/browse/HBASE-13656">HBASE-13656</a>).
+ * Use {@link #getDeadServersSize()}.
*/
+ @Deprecated
public int getDeadServers() {
+ return getDeadServersSize();
+ }
+
+ /**
+ * @return the number of dead region servers in the cluster
+ */
+ public int getDeadServersSize() {
return deadServers != null ? deadServers.size() : 0;
}
+
/**
* @return the average cluster load
*/
@@ -313,7 +325,7 @@ public class ClusterStatus extends VersionedWritable {
}
}
- int deadServerSize = getDeadServers();
+ int deadServerSize = getDeadServersSize();
sb.append("\nNumber of dead region servers: " + deadServerSize);
if (deadServerSize > 0) {
for (ServerName serverName: deadServers) {
http://git-wip-us.apache.org/repos/asf/hbase/blob/315f5967/hbase-shell/src/main/ruby/hbase/admin.rb
----------------------------------------------------------------------
diff --git a/hbase-shell/src/main/ruby/hbase/admin.rb b/hbase-shell/src/main/ruby/hbase/admin.rb
index e10e2be..9cdfe66 100644
--- a/hbase-shell/src/main/ruby/hbase/admin.rb
+++ b/hbase-shell/src/main/ruby/hbase/admin.rb
@@ -647,7 +647,7 @@ module Hbase
puts(" %s" % [ region.toString() ])
end
end
- puts("%d dead servers" % [ status.getDeadServers() ])
+ puts("%d dead servers" % [ status.getDeadServersSize() ])
for server in status.getDeadServerNames()
puts(" %s" % [ server ])
end