HBASE-24653 Show snapshot owner on Master WebUI (#2016)
Signed-off-by: Guanghao Zhang <zghao@apache.org>
This commit is contained in:
parent
1d0e285a6f
commit
5de1dff8f6
|
@ -60,6 +60,7 @@ org.apache.hadoop.hbase.tool.CanaryTool;
|
||||||
org.apache.hadoop.hbase.util.Bytes;
|
org.apache.hadoop.hbase.util.Bytes;
|
||||||
org.apache.hadoop.hbase.util.CommonFSUtils;
|
org.apache.hadoop.hbase.util.CommonFSUtils;
|
||||||
org.apache.hadoop.hbase.util.JvmVersion;
|
org.apache.hadoop.hbase.util.JvmVersion;
|
||||||
|
org.apache.hadoop.hbase.util.PrettyPrinter;
|
||||||
org.apache.hadoop.util.StringUtils;
|
org.apache.hadoop.util.StringUtils;
|
||||||
</%import>
|
</%import>
|
||||||
|
|
||||||
|
@ -663,6 +664,8 @@ AssignmentManager assignmentManager = master.getAssignmentManager();
|
||||||
<th>Snapshot Name</th>
|
<th>Snapshot Name</th>
|
||||||
<th>Table</th>
|
<th>Table</th>
|
||||||
<th>Creation Time</th>
|
<th>Creation Time</th>
|
||||||
|
<th>Owner</th>
|
||||||
|
<th>TTL</th>
|
||||||
</tr>
|
</tr>
|
||||||
<%for SnapshotDescription snapshotDesc : snapshots%>
|
<%for SnapshotDescription snapshotDesc : snapshots%>
|
||||||
<%java>
|
<%java>
|
||||||
|
@ -673,6 +676,11 @@ AssignmentManager assignmentManager = master.getAssignmentManager();
|
||||||
<td><a href="table.jsp?name=<% snapshotTable.getNameAsString() %>"><% snapshotTable.getNameAsString() %></a>
|
<td><a href="table.jsp?name=<% snapshotTable.getNameAsString() %>"><% snapshotTable.getNameAsString() %></a>
|
||||||
</td>
|
</td>
|
||||||
<td><% new Date(snapshotDesc.getCreationTime()) %></td>
|
<td><% new Date(snapshotDesc.getCreationTime()) %></td>
|
||||||
|
<td><% snapshotDesc.getOwner() %></td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
<% snapshotDesc.getTtl() == 0 ? "FOREVER": PrettyPrinter.format(String.valueOf(snapshotDesc.getTtl()), PrettyPrinter.Unit.TIME_INTERVAL) %>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</%for>
|
</%for>
|
||||||
<p><% snapshots.size() %> snapshot(s) in set. [<a href="/snapshotsStats.jsp">Snapshot Storefile stats</a>]</p>
|
<p><% snapshots.size() %> snapshot(s) in set. [<a href="/snapshotsStats.jsp">Snapshot Storefile stats</a>]</p>
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
import="org.apache.hadoop.util.StringUtils"
|
import="org.apache.hadoop.util.StringUtils"
|
||||||
import="org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription"
|
import="org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription"
|
||||||
%>
|
%>
|
||||||
|
<%@ page import="org.apache.hadoop.hbase.util.PrettyPrinter" %>
|
||||||
<%
|
<%
|
||||||
HMaster master = (HMaster)getServletContext().getAttribute(HMaster.MASTER);
|
HMaster master = (HMaster)getServletContext().getAttribute(HMaster.MASTER);
|
||||||
Configuration conf = master.getConfiguration();
|
Configuration conf = master.getConfiguration();
|
||||||
|
@ -65,7 +66,8 @@
|
||||||
<th>Snapshot Name</th>
|
<th>Snapshot Name</th>
|
||||||
<th>Table</th>
|
<th>Table</th>
|
||||||
<th>Creation Time</th>
|
<th>Creation Time</th>
|
||||||
<th>TTL(Sec)</th>
|
<th>Owner</th>
|
||||||
|
<th>TTL</th>
|
||||||
<th>Shared Storefile Size</th>
|
<th>Shared Storefile Size</th>
|
||||||
<th>Mob Storefile Size</th>
|
<th>Mob Storefile Size</th>
|
||||||
<th>Archived Storefile Size</th>
|
<th>Archived Storefile Size</th>
|
||||||
|
@ -83,11 +85,13 @@
|
||||||
<td><a href="/table.jsp?name=<%= snapshotTable.getNameAsString() %>">
|
<td><a href="/table.jsp?name=<%= snapshotTable.getNameAsString() %>">
|
||||||
<%= snapshotTable.getNameAsString() %></a></td>
|
<%= snapshotTable.getNameAsString() %></a></td>
|
||||||
<td><%= new Date(snapshotDesc.getCreationTime()) %></td>
|
<td><%= new Date(snapshotDesc.getCreationTime()) %></td>
|
||||||
|
<td><%= snapshotDesc.getOwner() %></td>
|
||||||
<td>
|
<td>
|
||||||
<% if (snapshotDesc.getTtl() == 0) { %>
|
<% if (snapshotDesc.getTtl() == 0) { %>
|
||||||
FOREVER
|
FOREVER
|
||||||
<% } else { %>
|
<% } else { %>
|
||||||
<%= snapshotDesc.getTtl() %>
|
<%=PrettyPrinter
|
||||||
|
.format(String.valueOf(snapshotDesc.getTtl()), PrettyPrinter.Unit.TIME_INTERVAL)%>
|
||||||
<% } %>
|
<% } %>
|
||||||
</td>
|
</td>
|
||||||
<td><%= StringUtils.humanReadableInt(stats.getSharedStoreFilesSize()) %></td>
|
<td><%= StringUtils.humanReadableInt(stats.getSharedStoreFilesSize()) %></td>
|
||||||
|
|
Loading…
Reference in New Issue