Repository: hbase Updated Branches: refs/heads/branch-1 e4ee7ee89 -> 4588bdee9 refs/heads/master 06a260f10 -> 1b041a4fc
HBASE-17609 Allow for region merging in the UI Signed-off-by: Andrew Purtell <apurt...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/4588bdee Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/4588bdee Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/4588bdee Branch: refs/heads/branch-1 Commit: 4588bdee9fb7314e318c867ae513790fbc3b9374 Parents: e4ee7ee Author: rgidwani <rgidw...@salesforce.com> Authored: Tue Feb 7 11:30:47 2017 -0800 Committer: Andrew Purtell <apurt...@apache.org> Committed: Thu Feb 9 14:06:48 2017 -0800 ---------------------------------------------------------------------- .../resources/hbase-webapps/master/table.jsp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/4588bdee/hbase-server/src/main/resources/hbase-webapps/master/table.jsp ---------------------------------------------------------------------- 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 37209c7..7c2770d 100644 --- a/hbase-server/src/main/resources/hbase-webapps/master/table.jsp +++ b/hbase-server/src/main/resources/hbase-webapps/master/table.jsp @@ -72,6 +72,8 @@ } String action = request.getParameter("action"); String key = request.getParameter("key"); + String left = request.getParameter("left"); + String right = request.getParameter("right"); long totalStoreFileSizeMB = 0; final String numRegionsParam = request.getParameter("numRegions"); @@ -186,6 +188,11 @@ if ( fqtn != null ) { admin.compact(TableName.valueOf(fqtn)); } %> Compact request accepted. <% + } else if (action.equals("merge")) { + if (left != null && left.length() > 0 && right != null && right.length() > 0) { + admin.mergeRegions(Bytes.toBytesBinary(left), Bytes.toBytesBinary(right), false); + } + %> Merge request accepted. <% } } %> @@ -698,6 +705,19 @@ Actions: other regions. Split requests for noneligible regions will be ignored.</td> </form> </tr> +<tr> + <form method="get"> + <input type="hidden" name="action" value="merge"> + <input type="hidden" name="name" value="<%= fqtn %>"> + <td style="border-style: none; text-align: center"> + <input style="font-size: 12pt; width: 10em" type="submit" value="Merge" class="btn"></td> + <td style="border-style: none" width="5%"> </td> + <td style="border-style: none">Region Key (Required):<input type="text" name="left" size="40"> + Region Key (Required) :<input type="text" name="right" size="40"></td> + <td style="border-style: none">This action will merge two + regions of the table, Merge requests for noneligible regions will be ignored.</td> + </form> +</tr> </table> </center> </p>