hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mberto...@apache.org
Subject [1/2] hbase git commit: HBASE-16209 Removed unnecessary method and method calls from AssignmentManager and AssignmentManager UI (addendum)
Date Fri, 29 Jul 2016 23:08:15 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1 7c97acf6e -> 39153b882
  refs/heads/master 26c042668 -> 372932009


HBASE-16209 Removed unnecessary method and method calls from AssignmentManager and AssignmentManager
UI (addendum)

Signed-off-by: Matteo Bertozzi <matteo.bertozzi@cloudera.com>


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/39153b88
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/39153b88
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/39153b88

Branch: refs/heads/branch-1
Commit: 39153b88249ed63ed35b2b88fcc75eb1452951a8
Parents: 7c97acf
Author: Joseph Hwang <jzh@fb.com>
Authored: Fri Jul 29 13:21:50 2016 -0700
Committer: Matteo Bertozzi <matteo.bertozzi@cloudera.com>
Committed: Fri Jul 29 15:55:11 2016 -0700

----------------------------------------------------------------------
 .../hbase/tmpl/master/AssignmentManagerStatusTmpl.jamon       | 7 +++----
 .../org/apache/hadoop/hbase/master/AssignmentManager.java     | 2 --
 .../apache/hadoop/hbase/master/TestMasterStatusServlet.java   | 1 -
 3 files changed, 3 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/39153b88/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/AssignmentManagerStatusTmpl.jamon
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/AssignmentManagerStatusTmpl.jamon
b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/AssignmentManagerStatusTmpl.jamon
index 20a9ae3..f97860b 100644
--- a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/AssignmentManagerStatusTmpl.jamon
+++ b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/AssignmentManagerStatusTmpl.jamon
@@ -108,12 +108,11 @@ int numOfPages = (int) Math.ceil(numOfRITs * 1.0 / ritsPerPage);
               </%if>
                <%java>
                   String retryStatus = "0";
-                  String name = rs.getRegion().getEncodedName();
-                  RegionState state = assignmentManager.getState(name);
-                  AtomicInteger numOpenRetries = failedRegionTracker.get(name);
+                  AtomicInteger numOpenRetries = failedRegionTracker.get(
+                      rs.getRegion().getEncodedName());
                   if (numOpenRetries != null ) {
                     retryStatus = Integer.toString(numOpenRetries.get());
-                  } else if (state.getState() ==  RegionState.State.FAILED_OPEN) {
+                  } else if (rs.getState() ==  RegionState.State.FAILED_OPEN) {
                      retryStatus = "Failed";
                   }
                 </%java>

http://git-wip-us.apache.org/repos/asf/hbase/blob/39153b88/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
index b2e6e71..c21844a 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
@@ -4275,8 +4275,6 @@ public class AssignmentManager extends ZooKeeperListener {
 
   public Map<String, AtomicInteger> getFailedOpenTracker() {return failedOpenTracker;}
 
-  public RegionState getState(String encodedName) {return regionStates.getRegionState(encodedName);}
-
   /**
    * A region is offline.  The new state should be the specified one,
    * if not null.  If the specified state is null, the new state is Offline.

http://git-wip-us.apache.org/repos/asf/hbase/blob/39153b88/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterStatusServlet.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterStatusServlet.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterStatusServlet.java
index 7ab5703..5e9b41c 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterStatusServlet.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterStatusServlet.java
@@ -173,7 +173,6 @@ public class TestMasterStatusServlet {
     Mockito.doReturn(rs).when(am).getRegionStates();
     Mockito.doReturn(regionsInTransition).when(rs).getRegionsInTransition();
     Mockito.doReturn(regionsInTransition).when(rs).getRegionsInTransitionOrderedByTimestamp();
-    Mockito.when(am.getState(any(String.class))).thenReturn(new RegionState(null, null));
 
     // Render to a string
     StringWriter sw = new StringWriter();


Mime
View raw message