HBASE-4291 Improve display of regions in transition in UI to be more readable.
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1163321 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0ad9dacedb
commit
9e9d802f45
|
@ -419,6 +419,8 @@ Release 0.91.0 - Unreleased
|
|||
the Thrift API (Anirudh Todi)
|
||||
HBASE-3900 Expose progress of a major compaction in UI and/or in shell
|
||||
(Brad Anderson)
|
||||
HBASE-4291 Improve display of regions in transition in UI to be more
|
||||
readable (todd)
|
||||
|
||||
TASKS
|
||||
HBASE-3559 Move report of split to master OFF the heartbeat channel
|
||||
|
|
|
@ -36,7 +36,7 @@ No regions in transition.
|
|||
<table>
|
||||
<tr><th>Region</th><th>State</th></tr>
|
||||
<%for Map.Entry<String, RegionState> entry : rit.entrySet() %>
|
||||
<tr><td><% entry.getKey() %></td><td><% entry.getValue() %></td>
|
||||
<tr><td><% entry.getKey() %></td><td><% entry.getValue().toDescriptiveString() %></td>
|
||||
</%for>
|
||||
</table>
|
||||
</%if>
|
|
@ -24,6 +24,7 @@ import java.io.DataOutput;
|
|||
import java.io.IOException;
|
||||
import java.lang.Thread.UncaughtExceptionHandler;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
|
@ -2520,6 +2521,19 @@ public class AssignmentManager extends ZooKeeperListener {
|
|||
+ ", server=" + serverName;
|
||||
}
|
||||
|
||||
/**
|
||||
* A slower (but more easy-to-read) stringification
|
||||
*/
|
||||
public String toDescriptiveString() {
|
||||
long lstamp = stamp.get();
|
||||
long relTime = System.currentTimeMillis() - lstamp;
|
||||
|
||||
return region.getRegionNameAsString()
|
||||
+ " state=" + state
|
||||
+ ", ts=" + new Date(lstamp) + " (" + (relTime/1000) + "s ago)"
|
||||
+ ", server=" + serverName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFields(DataInput in) throws IOException {
|
||||
region = new HRegionInfo();
|
||||
|
|
Loading…
Reference in New Issue