diff --git a/hbase-server/src/main/resources/hbase-webapps/master/table.jsp b/hbase-server/src/main/resources/hbase-webapps/master/table.jsp index 2c4497ccefea..296e0e77f735 100644 --- a/hbase-server/src/main/resources/hbase-webapps/master/table.jsp +++ b/hbase-server/src/main/resources/hbase-webapps/master/table.jsp @@ -233,7 +233,7 @@ <% return; } %> -<% // table split/compact/merge actions +<% // table split/major compact/compact/merge actions if ( !readOnly && action != null ) { %>
@@ -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 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 regions = admin.getRegions(TableName.valueOf(fqtn)).get(); @@ -1152,6 +1166,23 @@ Actions:

+ + + + + + + + +
+ + + + + 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. +