You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by br...@apache.org on 2019/12/03 06:37:48 UTC

[hbase] branch branch-2.2 updated: HBASE-22096 /storeFile.jsp shows CorruptHFileException when the storeFile is a reference file (#888)

This is an automated email from the ASF dual-hosted git repository.

brfrn169 pushed a commit to branch branch-2.2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.2 by this push:
     new 20a3c3f  HBASE-22096 /storeFile.jsp shows CorruptHFileException when the storeFile is a reference file (#888)
20a3c3f is described below

commit 20a3c3f5f903a829a58f6a306399781782dc9375
Author: Toshihiro Suzuki <br...@gmail.com>
AuthorDate: Tue Dec 3 15:15:40 2019 +0900

    HBASE-22096 /storeFile.jsp shows CorruptHFileException when the storeFile is a reference file (#888)
    
    Signed-off-by: Lijin Bin <bi...@apache.org>
---
 .../src/main/resources/hbase-webapps/regionserver/storeFile.jsp     | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/hbase-server/src/main/resources/hbase-webapps/regionserver/storeFile.jsp b/hbase-server/src/main/resources/hbase-webapps/regionserver/storeFile.jsp
index c1de41c..b538cb7 100644
--- a/hbase-server/src/main/resources/hbase-webapps/regionserver/storeFile.jsp
+++ b/hbase-server/src/main/resources/hbase-webapps/regionserver/storeFile.jsp
@@ -21,14 +21,17 @@
   import="java.io.ByteArrayOutputStream"
   import="java.io.PrintStream"
   import="org.apache.hadoop.conf.Configuration"
+  import="org.apache.hadoop.fs.FileSystem"
   import="org.apache.hadoop.fs.Path"
   import="org.apache.hadoop.hbase.io.hfile.HFilePrettyPrinter"
   import="org.apache.hadoop.hbase.regionserver.HRegionServer"
+  import="org.apache.hadoop.hbase.regionserver.StoreFileInfo"
 %>
 <%
   String storeFile = request.getParameter("name");
   HRegionServer rs = (HRegionServer) getServletContext().getAttribute(HRegionServer.REGIONSERVER);
   Configuration conf = rs.getConfiguration();
+  FileSystem fs = FileSystem.get(conf);
   pageContext.setAttribute("pageTitle", "HBase RegionServer: " + rs.getServerName());
 %>
 <jsp:include page="header.jsp">
@@ -51,7 +54,8 @@
      printer.setConf(conf);
      String[] options = {"-s"};
      printer.parseOptions(options);
-     printer.processFile(new Path(storeFile), true);
+     StoreFileInfo sfi = new StoreFileInfo(conf, fs, new Path(storeFile), true);
+     printer.processFile(sfi.getFileStatus().getPath(), true);
      String text = byteStream.toString();%>
      <%=
        text