PageRenderTime 44ms CodeModel.GetById 19ms RepoModel.GetById 0ms 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
Possible License(s): Apache-2.0, BSD-3-Clause, JSON, CPL-1.0
  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. http://www.apache.org/licenses/LICENSE-2.0
  9. Unless required by applicable law or agreed to in writing, software
  10. distributed under the License is distributed on an "AS IS" BASIS,
  11. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. See the License for the specific language governing permissions and
  13. limitations under the License.
  14. --%>
  15. <%@ page import="org.apache.hadoop.hive.hwi.*" %>
  16. <%@ page errorPage="error_page.jsp" %>
  17. <% HWIAuth auth = (HWIAuth) session.getAttribute("auth"); %>
  18. <% if (auth==null) { %>
  19. <jsp:forward page="/authorize.jsp" />
  20. <% } %>
  21. <% HWISessionManager hs = (HWISessionManager) application.getAttribute("hs"); %>
  22. <% String sessionName=request.getParameter("sessionName"); %>
  23. <% String message=null; %>
  24. <%
  25. if (request.getParameter("confirm")!=null){
  26. HWISessionItem i = hs.findSessionItemByName(auth,sessionName);
  27. i.clientKill();
  28. message="Query will be killed";
  29. }
  30. %>
  31. <html>
  32. <head>
  33. <title>Hive Web Interface</title>
  34. </head>
  35. <body>
  36. <table>
  37. <tr>
  38. <td valign="top" valign="top" width="100">
  39. <jsp:include page="/left_navigation.jsp"/></td>
  40. <td valign="top">
  41. <h2>Hive Web Interface</h2>
  42. <% if (message!=null){ %><font color="red"><%=message%></font><% } %>
  43. <br>
  44. <form action="session_kill.jsp">
  45. <input type="hidden" name="sessionName" value="<%=sessionName%>">
  46. Are you sure you want to kill this session?
  47. <input type="submit" name="confirm" value="yes">
  48. </form>
  49. </td>
  50. </tr>
  51. </table>
  52. </body>
  53. </html>