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

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


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

commit 5d2bd77725ded7aeb78f6ddb848d07f836780216
Author: Toshihiro Suzuki <brfrn...@gmail.com>
AuthorDate: Wed Dec 4 21:44:42 2019 +0900

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

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 05d8783..0b7117c 100644
--- a/hbase-server/src/main/resources/hbase-webapps/regionserver/storeFile.jsp
+++ b/hbase-server/src/main/resources/hbase-webapps/regionserver/storeFile.jsp
@@ -21,16 +21,18 @@
   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.HBaseConfiguration"
   import="org.apache.hadoop.hbase.io.hfile.HFilePrettyPrinter"
   import="org.apache.hadoop.hbase.regionserver.HRegionServer"
-  import="org.apache.hadoop.hbase.regionserver.StoreFile"
+  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);
 %>
 <!--[if IE]>
 <!DOCTYPE html>
@@ -43,8 +45,6 @@
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <meta name="description" content="">
     <meta name="author" content="">
-
-
       <link href="/static/css/bootstrap.min.css" rel="stylesheet">
       <link href="/static/css/bootstrap-theme.min.css" rel="stylesheet">
       <link href="/static/css/hbase.css" rel="stylesheet">
@@ -94,7 +94,8 @@
      printer.setConf(conf);
      String[] options = {"-s"};
      printer.parseOptions(options);
-     printer.processFile(new Path(storeFile));
+     StoreFileInfo sfi = new StoreFileInfo(conf, fs, new Path(storeFile));
+     printer.processFile(sfi.getFileStatus().getPath());
      String text = byteStream.toString();%>
      <%=
        text

Reply via email to