PageRenderTime 14ms CodeModel.GetById 9ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/tags/release-0.1-rc2/hive/external/hwi/web/session_kill.jsp

#
JavaServer Pages | 55 lines | 53 code | 2 blank | 0 comment | 5 complexity | ad3280afb03128811df2559b077c8eb2 MD5 | raw file
 1<%--
 2   Licensed to the Apache Software Foundation (ASF) under one or more
 3   contributor license agreements.  See the NOTICE file distributed with
 4   this work for additional information regarding copyright ownership.
 5   The ASF licenses this file to You under the Apache License, Version 2.0
 6   (the "License"); you may not use this file except in compliance with
 7   the License.  You may obtain a copy of the License at
 8
 9       http://www.apache.org/licenses/LICENSE-2.0
10
11   Unless required by applicable law or agreed to in writing, software
12   distributed under the License is distributed on an "AS IS" BASIS,
13   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   See the License for the specific language governing permissions and
15   limitations under the License.
16--%>
17<%@ page import="org.apache.hadoop.hive.hwi.*" %>
18<%@ page errorPage="error_page.jsp" %>
19<% HWIAuth auth = (HWIAuth) session.getAttribute("auth"); %>
20<% if (auth==null) { %>
21	<jsp:forward page="/authorize.jsp" />
22<% } %>
23<% HWISessionManager hs = (HWISessionManager) application.getAttribute("hs"); %>
24<% String sessionName=request.getParameter("sessionName"); %>
25<% String message=null; %>
26<% 
27  if (request.getParameter("confirm")!=null){ 
28    HWISessionItem i = hs.findSessionItemByName(auth,sessionName);	  
29	i.clientKill();
30	message="Query will be killed";
31  }
32%>
33<html>
34  <head>
35    <title>Hive Web Interface</title>
36  </head>
37  <body>
38    <table>
39      <tr>
40        <td valign="top" valign="top" width="100">
41	  <jsp:include page="/left_navigation.jsp"/></td>
42        <td valign="top">
43          <h2>Hive Web Interface</h2>
44          <% if (message!=null){ %><font color="red"><%=message%></font><% } %>
45          <br>
46          <form action="session_kill.jsp">
47          	<input type="hidden" name="sessionName" value="<%=sessionName%>">
48          	Are you sure you want to kill this session?
49          	<input type="submit" name="confirm" value="yes">
50          </form>
51        </td>
52      </tr>
53    </table>
54  </body>
55</html>