HBASE-16209 Removed unnecessary method and method calls from AssignmentManager and AssignmentManager UI (addendum)
Signed-off-by: Matteo Bertozzi <matteo.bertozzi@cloudera.com>
This commit is contained in:
parent
26c0426689
commit
3729320099
|
@ -99,12 +99,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>
|
||||
|
|
|
@ -2768,8 +2768,6 @@ public class AssignmentManager {
|
|||
|
||||
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.
|
||||
|
|
|
@ -177,11 +177,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();
|
||||
|
|
Loading…
Reference in New Issue