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/04 12:52:06 UTC
[hbase] branch branch-1 updated: HBASE-22096 /storeFile.jsp shows
CorruptHFileException when the storeFile is a reference file
This is an automated email from the ASF dual-hosted git repository.
brfrn169 pushed a commit to branch branch-1
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-1 by this push:
new ec55c2a HBASE-22096 /storeFile.jsp shows CorruptHFileException when the storeFile is a reference file
ec55c2a is described below
commit ec55c2a5d976ae1b2f797854419146bbef2fccc2
Author: Toshihiro Suzuki <br...@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 <bi...@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