Skip to content

Commit 7892207

Browse files
authored
HBASE-29531 Migrate RegionServer Status Jamon page back to JSP (#7371)
This is the 2/3 step of the Jamon to JSP migration: the Region Server Status page. Did the migration the same way as for the Master Status page: #6875 Migrated the Jamon code to JSP as close as possible. Extracted the duplicated `formatZKString` method to new java class: ZKStringFormatter and added unit tests. Changed the Region Server Status page back to `/regionserver.jsp`. Made sure that `/rs-status` redirects to `/regionserver.jsp`. Extracted the BlockCache inline CSS styles to `hbase.css` file. Also extracted the large BlockCache Hit Ratio periods paging JavaScript code to separate .js file. Introduced a `src/main/resources/hbase-webapps/common` directory where we can place common JSP files which are used by both Master and RegionServer JSP pages. This required to adjust the JSP compiler Maven Antrun plugin a bit. Extracted the inline tablesorter initialization JavaScript code to separate file. Signed-off-by: Duo Zhang <[email protected]>
1 parent fafa03c commit 7892207

File tree

59 files changed

+2547
-2068
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+2547
-2068
lines changed

hbase-server/pom.xml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -564,12 +564,26 @@
564564
<exclude name="**/*~"/>
565565
</fileset>
566566
</copy>
567+
<!-- Create a "staging" JSP directory where we copy the common JSP files into master and rs directories.
568+
Compilation is done using this "staging" JSP directory. -->
569+
<mkdir dir="${project.build.directory}/jsp"/>
570+
<copy todir="${project.build.directory}/jsp">
571+
<fileset dir="${src.webapps}">
572+
<include name="**/*.jsp"/>
573+
</fileset>
574+
</copy>
575+
<copy todir="${project.build.directory}/jsp/master">
576+
<fileset dir="${project.build.directory}/jsp/common"/>
577+
</copy>
578+
<copy todir="${project.build.directory}/jsp/regionserver">
579+
<fileset dir="${project.build.directory}/jsp/common"/>
580+
</copy>
567581
<!--The compile.classpath is passed in by maven -->
568582
<taskdef classname="org.apache.jasper.JspC" classpathref="maven.compile.classpath" name="jspcompiler"/>
569583
<mkdir dir="${build.webapps}/master/WEB-INF"/>
570-
<jspcompiler outputdir="${generated.sources}/java" package="org.apache.hadoop.hbase.generated.master" uriroot="${src.webapps}/master" webxml="${build.webapps}/master/WEB-INF/web.xml"/>
584+
<jspcompiler outputdir="${generated.sources}/java" package="org.apache.hadoop.hbase.generated.master" uriroot="${project.build.directory}/jsp/master" webxml="${build.webapps}/master/WEB-INF/web.xml"/>
571585
<mkdir dir="${build.webapps}/regionserver/WEB-INF"/>
572-
<jspcompiler outputdir="${generated.sources}/java" package="org.apache.hadoop.hbase.generated.regionserver" uriroot="${src.webapps}/regionserver" webxml="${build.webapps}/regionserver/WEB-INF/web.xml"/>
586+
<jspcompiler outputdir="${generated.sources}/java" package="org.apache.hadoop.hbase.generated.regionserver" uriroot="${project.build.directory}/jsp/regionserver" webxml="${build.webapps}/regionserver/WEB-INF/web.xml"/>
573587
</target>
574588
</configuration>
575589
</execution>

hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/common/TaskMonitorTmpl.jamon

Lines changed: 0 additions & 140 deletions
This file was deleted.

0 commit comments

Comments
 (0)