hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject [2/2] hbase git commit: HBASE-17609 Allow for region merging in the UI
Date Thu, 09 Feb 2017 22:21:06 GMT
HBASE-17609 Allow for region merging in the UI

Signed-off-by: Andrew Purtell <apurtell@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/1b041a4f
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/1b041a4f
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/1b041a4f

Branch: refs/heads/master
Commit: 1b041a4fc7d262d2b1ede5a88dfe45adfd90b9ca
Parents: 06a260f
Author: rgidwani <rgidwani@salesforce.com>
Authored: Tue Feb 7 11:30:47 2017 -0800
Committer: Andrew Purtell <apurtell@apache.org>
Committed: Thu Feb 9 14:06:56 2017 -0800

----------------------------------------------------------------------
 .../resources/hbase-webapps/master/table.jsp    | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/1b041a4f/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 343754b..575bd10 100644
--- a/hbase-server/src/main/resources/hbase-webapps/master/table.jsp
+++ b/hbase-server/src/main/resources/hbase-webapps/master/table.jsp
@@ -86,6 +86,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");
@@ -208,6 +210,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. <%
     }
   }
 %>
@@ -759,6 +766,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%">&nbsp;</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>


Mime
View raw message