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>
|
</%if>
|
||||||
<%java>
|
<%java>
|
||||||
String retryStatus = "0";
|
String retryStatus = "0";
|
||||||
String name = rs.getRegion().getEncodedName();
|
AtomicInteger numOpenRetries = failedRegionTracker.get(
|
||||||
RegionState state = assignmentManager.getState(name);
|
rs.getRegion().getEncodedName());
|
||||||
AtomicInteger numOpenRetries = failedRegionTracker.get(name);
|
|
||||||
if (numOpenRetries != null ) {
|
if (numOpenRetries != null ) {
|
||||||
retryStatus = Integer.toString(numOpenRetries.get());
|
retryStatus = Integer.toString(numOpenRetries.get());
|
||||||
} else if (state.getState() == RegionState.State.FAILED_OPEN) {
|
} else if (rs.getState() == RegionState.State.FAILED_OPEN) {
|
||||||
retryStatus = "Failed";
|
retryStatus = "Failed";
|
||||||
}
|
}
|
||||||
</%java>
|
</%java>
|
||||||
|
|
|
@ -2768,8 +2768,6 @@ public class AssignmentManager {
|
||||||
|
|
||||||
public Map<String, AtomicInteger> getFailedOpenTracker() {return failedOpenTracker;}
|
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,
|
* 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.
|
* 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(rs).when(am).getRegionStates();
|
||||||
Mockito.doReturn(regionsInTransition).when(rs).getRegionsInTransition();
|
Mockito.doReturn(regionsInTransition).when(rs).getRegionsInTransition();
|
||||||
Mockito.doReturn(regionsInTransition).when(rs).getRegionsInTransitionOrderedByTimestamp();
|
Mockito.doReturn(regionsInTransition).when(rs).getRegionsInTransitionOrderedByTimestamp();
|
||||||
Mockito.when(
|
|
||||||
am.getState(
|
|
||||||
any(String.class)
|
|
||||||
)
|
|
||||||
).thenReturn(new RegionState(null, null));
|
|
||||||
|
|
||||||
// Render to a string
|
// Render to a string
|
||||||
StringWriter sw = new StringWriter();
|
StringWriter sw = new StringWriter();
|
||||||
|
|
Loading…
Reference in New Issue