HBASE-16657 addendum handle null RegionLoad
This commit is contained in:
parent
fa98c506d0
commit
bbaa0e851d
|
@ -201,15 +201,16 @@
|
|||
<%java>
|
||||
RegionLoad load = regionServer.createRegionLoad(r.getEncodedName());
|
||||
String percentDone = "";
|
||||
if (load != null && load.getTotalCompactingKVs() > 0) {
|
||||
String compactTime = "";
|
||||
if (load != null) {
|
||||
if (load.getTotalCompactingKVs() > 0) {
|
||||
percentDone = String.format("%.2f", 100 *
|
||||
((float) load.getCurrentCompactedKVs() / load.getTotalCompactingKVs())) + "%";
|
||||
}
|
||||
long lastMajorCompactionTs = load.getLastMajorCompactionTs();
|
||||
String compactTime = "";
|
||||
if (lastMajorCompactionTs > 0) {
|
||||
if (load.getLastMajorCompactionTs() > 0) {
|
||||
FastDateFormat fdf = FastDateFormat.getInstance("yyyy-MM-dd HH:mm ZZ");
|
||||
compactTime = fdf.format(lastMajorCompactionTs);
|
||||
compactTime = fdf.format(load.getLastMajorCompactionTs());
|
||||
}
|
||||
}
|
||||
</%java>
|
||||
<td><a href="region.jsp?name=<% r.getEncodedName() %>">
|
||||
|
|
Loading…
Reference in New Issue