You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by jv...@apache.org on 2010/07/31 07:08:50 UTC
svn commit: r981002 - in /hadoop/hive/trunk: CHANGES.txt hwi/web/index.jsp
hwi/web/session_result.jsp hwi/web/set_processor.jsp
hwi/web/show_database.jsp
Author: jvs
Date: Sat Jul 31 05:08:50 2010
New Revision: 981002
URL: http://svn.apache.org/viewvc?rev=981002&view=rev
Log:
HIVE-1401. Web Interface can only browse default
(Edward Capriolo via jvs)
Modified:
hadoop/hive/trunk/CHANGES.txt
hadoop/hive/trunk/hwi/web/index.jsp
hadoop/hive/trunk/hwi/web/session_result.jsp
hadoop/hive/trunk/hwi/web/set_processor.jsp
hadoop/hive/trunk/hwi/web/show_database.jsp
Modified: hadoop/hive/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/CHANGES.txt?rev=981002&r1=981001&r2=981002&view=diff
==============================================================================
--- hadoop/hive/trunk/CHANGES.txt (original)
+++ hadoop/hive/trunk/CHANGES.txt Sat Jul 31 05:08:50 2010
@@ -55,6 +55,9 @@ Trunk - Unreleased
HIVE-1229. Replace dependencies on HBase deprecated API.
(Basab Maulik via jvs)
+ HIVE-1401. Web Interface can only browse default
+ (Edward Capriolo via jvs)
+
OPTIMIZATIONS
BUG FIXES
Modified: hadoop/hive/trunk/hwi/web/index.jsp
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/hwi/web/index.jsp?rev=981002&r1=981001&r2=981002&view=diff
==============================================================================
--- hadoop/hive/trunk/hwi/web/index.jsp (original)
+++ hadoop/hive/trunk/hwi/web/index.jsp Sat Jul 31 05:08:50 2010
@@ -16,9 +16,8 @@
<td valign="top">
<h2>Hive Web Interface</h2>
<p>The Hive Web Interface (HWI) offers an alternative to the command line interface (CLI). Once authenticated
- a user can start HWIWebSessions. A HWIWebSession is roughly equal to the hive shell from the console window.
- Users have access to the SetProcessor and QueryProcessor. After initiating a query the state is kept on the
- web server. They can return later to view the status of the query and view any results it produced. </p>
+ users can start HWIWebSessions. A HWIWebSession lives on the server users can submit queries and return later
+ to view the status of the query and view any results it produced. </p>
</td>
</tr>
</table>
Modified: hadoop/hive/trunk/hwi/web/session_result.jsp
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/hwi/web/session_result.jsp?rev=981002&r1=981001&r2=981002&view=diff
==============================================================================
--- hadoop/hive/trunk/hwi/web/session_result.jsp (original)
+++ hadoop/hive/trunk/hwi/web/session_result.jsp Sat Jul 31 05:08:50 2010
@@ -50,14 +50,14 @@
<% if (si!=null) { %>
<table border=1">
- <% for (Vector<String> row : si.getResultBucket() ) { %>
+ <% for (List<String> rows : si.getResultBucket() ) { %>
<tr>
- <% for (String col : row ) { %>
- <td><%=col%></td>
- <% } %>
+ <% for (String row : rows ) { %>
+ <td><%=row%></td>
+ <% } %>
</tr>
<% } %>
- </table>
+ </table>
<% } %>
</td>
Modified: hadoop/hive/trunk/hwi/web/set_processor.jsp
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/hwi/web/set_processor.jsp?rev=981002&r1=981001&r2=981002&view=diff
==============================================================================
--- hadoop/hive/trunk/hwi/web/set_processor.jsp (original)
+++ hadoop/hive/trunk/hwi/web/set_processor.jsp Sat Jul 31 05:08:50 2010
@@ -1,57 +0,0 @@
-<%@page contentType="text/html" pageEncoding="UTF-8" %>
-<%@page errorPage="error_page.jsp" %>
-<%@page import="org.apache.hadoop.hive.hwi.*" %>
-<%@page import="org.apache.hadoop.hive.conf.*" %>
-<%@page import="java.util.*" %>
-<% HWISessionManager hs = (HWISessionManager) application.getAttribute("hs"); %>
-
-<% HWIAuth auth = (HWIAuth) session.getAttribute("auth"); %>
-<% if (auth==null) { %>
- <jsp:forward page="/authorize.jsp" />
-<% } %>
-
-
-<% String sessionName = request.getParameter("sessionName"); %>
-<% HWISessionItem sess = hs.findSessionItemByName(auth,sessionName); %>
-
-<%
-String setquery= request.getParameter("setquery");
-String setaction= request.getParameter("setaction");
-String message = null;
-if (setaction != null){
- int ret = sess.runSetProcessorQuery(setquery);
- message =" Action taken "+ret;
-}
-%>
-<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>HWI Set Processor</title>
- </head>
- <body>
- <% if (message !=null){ %>
- <font color="red"><b><%=message%></b></font>
- <% } %>
- <table>
- <tr>
- <td valign="top" width="100"><jsp:include page="/left_navigation.jsp"/></td>
- <td valign="top">
- <form action="set_processor.jsp">
- <table border="1">
- <tr>
- <td>Set Query</td>
- <td><input type="text" name="setquery"></td>
- </tr>
- <tr>
- <td colspan="2">
- <input type="hidden" name="sessionName" value="<%=sessionName%>">
- <input type="submit" name="setaction" value="setaction"></td>
- </tr>
- </table>
- </form>
-
- </td>
- </tr>
- </table>
- </body>
-</html>
\ No newline at end of file
Modified: hadoop/hive/trunk/hwi/web/show_database.jsp
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/hwi/web/show_database.jsp?rev=981002&r1=981001&r2=981002&view=diff
==============================================================================
--- hadoop/hive/trunk/hwi/web/show_database.jsp (original)
+++ hadoop/hive/trunk/hwi/web/show_database.jsp Sat Jul 31 05:08:50 2010
@@ -1,6 +1,4 @@
-<% String db = request.getParameter("db"); %>
<%@page errorPage="error_page.jsp" %>
-<jsp:include page="/include/session_credentials.jsp" />
<%@page import="org.apache.hadoop.hive.metastore.*,
org.apache.hadoop.hive.metastore.api.*,
org.apache.hadoop.hive.conf.HiveConf,
@@ -14,7 +12,8 @@ org.apache.hadoop.hive.cli.*" %>
<%
HiveConf hiveConf = new HiveConf(SessionState.class);
HiveMetaStoreClient client = new HiveMetaStoreClient(hiveConf);
- Database db2 = client.getDatabase("default");
+ String db = request.getParameter("db");
+ Database db2 = client.getDatabase(db);
List<String> tables = client.getTables(".*");
client.close();
%>