You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2009/04/03 16:18:31 UTC
svn commit: r761689 - in /hadoop/hbase/trunk: CHANGES.txt
src/webapps/master/master.jsp src/webapps/master/regionhistorian.jsp
src/webapps/master/table.jsp
Author: stack
Date: Fri Apr 3 14:18:31 2009
New Revision: 761689
URL: http://svn.apache.org/viewvc?rev=761689&view=rev
Log:
HBASE-1298 master.jsp & table.jsp do not URI Encode table or region names in links
Modified:
hadoop/hbase/trunk/CHANGES.txt
hadoop/hbase/trunk/src/webapps/master/master.jsp
hadoop/hbase/trunk/src/webapps/master/regionhistorian.jsp
hadoop/hbase/trunk/src/webapps/master/table.jsp
Modified: hadoop/hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/CHANGES.txt?rev=761689&r1=761688&r2=761689&view=diff
==============================================================================
--- hadoop/hbase/trunk/CHANGES.txt (original)
+++ hadoop/hbase/trunk/CHANGES.txt Fri Apr 3 14:18:31 2009
@@ -70,6 +70,8 @@
Joffe via Andrew Purtell)
HBASE-1303 Secondary index configuration prevents HBase from starting
(Ken Weiner via Stack)
+ HBASE-1298 master.jsp & table.jsp do not URI Encode table or region
+ names in links (Lars George via Stack)
IMPROVEMENTS
HBASE-1089 Add count of regions on filesystem to master UI; add percentage
Modified: hadoop/hbase/trunk/src/webapps/master/master.jsp
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/webapps/master/master.jsp?rev=761689&r1=761688&r2=761689&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/webapps/master/master.jsp (original)
+++ hadoop/hbase/trunk/src/webapps/master/master.jsp Fri Apr 3 14:18:31 2009
@@ -1,5 +1,6 @@
<%@ page contentType="text/html;charset=UTF-8"
import="java.util.*"
+ import="java.net.URLEncoder"
import="org.apache.hadoop.io.Text"
import="org.apache.hadoop.hbase.util.Bytes"
import="org.apache.hadoop.hbase.master.HMaster"
@@ -54,10 +55,10 @@
if (rootLocation != null) { %>
<table>
<tr><th>Table</th><th>Description</th></tr>
-<tr><td><a href=/table.jsp?name=<%= Bytes.toString(HConstants.ROOT_TABLE_NAME) %>><%= Bytes.toString(HConstants.ROOT_TABLE_NAME) %></a></td><td>The -ROOT- table holds references to all .META. regions.</td></tr>
+<tr><td><a href=/table.jsp?name=<%= URLEncoder.encode(Bytes.toString(HConstants.ROOT_TABLE_NAME), "UTF-8") %>><%= Bytes.toString(HConstants.ROOT_TABLE_NAME) %></a></td><td>The -ROOT- table holds references to all .META. regions.</td></tr>
<%
if (onlineRegions != null && onlineRegions.size() > 0) { %>
-<tr><td><a href=/table.jsp?name=<%= Bytes.toString(HConstants.META_TABLE_NAME) %>><%= Bytes.toString(HConstants.META_TABLE_NAME) %></a></td><td>The .META. table holds references to all User Table regions</td></tr>
+<tr><td><a href=/table.jsp?name=<%= URLEncoder.encode(Bytes.toString(HConstants.META_TABLE_NAME), "UTF-8") %>><%= Bytes.toString(HConstants.META_TABLE_NAME) %></a></td><td>The .META. table holds references to all User Table regions</td></tr>
<% } %>
</table>
@@ -69,7 +70,7 @@
<table>
<tr><th>Table</th><th>Description</th></tr>
<% for(HTableDescriptor htDesc : tables ) { %>
-<tr><td><a href=/table.jsp?name=<%= htDesc.getNameAsString() %>><%= htDesc.getNameAsString() %></a> </td><td><%= htDesc.toString() %></td></tr>
+<tr><td><a href=/table.jsp?name=<%= URLEncoder.encode(htDesc.getNameAsString(), "UTF-8") %>><%= htDesc.getNameAsString() %></a> </td><td><%= htDesc.toString() %></td></tr>
<% } %>
<p> <%= tables.length %> table(s) in set.</p>
</table>
Modified: hadoop/hbase/trunk/src/webapps/master/regionhistorian.jsp
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/webapps/master/regionhistorian.jsp?rev=761689&r1=761688&r2=761689&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/webapps/master/regionhistorian.jsp (original)
+++ hadoop/hbase/trunk/src/webapps/master/regionhistorian.jsp Fri Apr 3 14:18:31 2009
@@ -1,6 +1,7 @@
<%@ page contentType="text/html;charset=UTF-8"
import="java.util.List"
import="java.util.regex.*"
+ import="java.net.URLEncoder"
import="org.apache.hadoop.hbase.RegionHistorian"
import="org.apache.hadoop.hbase.master.HMaster"
import="org.apache.hadoop.hbase.RegionHistorian.RegionHistoryInformation"
@@ -33,7 +34,7 @@
if (m.matches()) {
// Wrap the region name in an href so user can click on it.
description = RegionHistorian.SPLIT_PREFIX +
- "<a href=\"regionhistorian.jsp?regionname=" + m.group(1) + "\">" +
+ "<a href=\"regionhistorian.jsp?regionname=" + URLEncoder.encode(m.group(1), "UTF-8") + "\">" +
m.group(1) + "</a>";
}
Modified: hadoop/hbase/trunk/src/webapps/master/table.jsp
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/webapps/master/table.jsp?rev=761689&r1=761688&r2=761689&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/webapps/master/table.jsp (original)
+++ hadoop/hbase/trunk/src/webapps/master/table.jsp Fri Apr 3 14:18:31 2009
@@ -1,4 +1,7 @@
<%@ page contentType="text/html;charset=UTF-8"
+ import="java.io.IOException"
+ import="java.util.Map"
+ import="java.net.URLEncoder"
import="org.apache.hadoop.io.Text"
import="org.apache.hadoop.io.Writable"
import="org.apache.hadoop.hbase.HTableDescriptor"
@@ -12,8 +15,6 @@
import="org.apache.hadoop.hbase.master.HMaster"
import="org.apache.hadoop.hbase.master.MetaRegion"
import="org.apache.hadoop.hbase.util.Bytes"
- import="java.io.IOException"
- import="java.util.Map"
import="org.apache.hadoop.hbase.HConstants"%><%
HMaster master = (HMaster)getServletContext().getAttribute(HMaster.MASTER);
HBaseConfiguration conf = master.getConfiguration();
@@ -131,7 +132,8 @@
hriEntry.getValue()).getInfoPort();
String urlRegionHistorian =
- "/regionhistorian.jsp?regionname="+hriEntry.getKey().getRegionNameAsString();
+ "/regionhistorian.jsp?regionname=" +
+ URLEncoder.encode(hriEntry.getKey().getRegionNameAsString(), "UTF-8");
String urlRegionServer =
"http://" + hriEntry.getValue().getHostname().toString() + ":" + infoPort + "/";