Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 32 additions & 1 deletion hbase-server/src/main/resources/hbase-webapps/master/table.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@
<% return;
} %>

<% // table split/compact/merge actions
<% // table split/major compact/compact/merge actions
if ( !readOnly && action != null ) { %>
<div class="container-fluid content">
<div class="row inner_header">
Expand All @@ -249,6 +249,20 @@
admin.split(TableName.valueOf(fqtn));
}
%> Split request accepted. <%
} else if (action.equals("major compact")) {
if (key != null && key.length() > 0) {
List<RegionInfo> regions = admin.getRegions(TableName.valueOf(fqtn)).get();
byte[] row = Bytes.toBytes(key);

for (RegionInfo region : regions) {
if (region.containsRow(row)) {
admin.majorCompactRegion(region.getRegionName());
}
}
} else {
admin.majorCompact(TableName.valueOf(fqtn));
}
%> major Compact request accepted. <%
} else if (action.equals("compact")) {
if (key != null && key.length() > 0) {
List<RegionInfo> regions = admin.getRegions(TableName.valueOf(fqtn)).get();
Expand Down Expand Up @@ -1152,6 +1166,23 @@ Actions:
<p>
<center>
<table class="table" style="border: 0;" width="95%" >
<tr>
<form method="get">
<input type="hidden" name="action" value="major compact" />
<input type="hidden" name="name" value="<%= escaped_fqtn %>" />
<td class="centered">
<input style="font-size: 12pt; width: 10em" type="submit" value="Major Compact" class="btn" />
</td>
<td style="text-align: center;">
<input type="text" name="key" size="40" placeholder="Row Key (optional)" />
</td>
<td>
This action will force a major compaction of all regions of the table, or,
if a key is supplied, only the region major containing the
given key.
</td>
</form>
</tr>
<tr>
<form method="get">
<input type="hidden" name="action" value="compact" />
Expand Down