<%-- /** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ --%> <%@page import="org.apache.hadoop.hive.hwi.*" %> <%@page errorPage="error_page.jsp" %> <% HWISessionManager hs = (HWISessionManager) application.getAttribute("hs");; %> <% HWIAuth auth = (HWIAuth) session.getAttribute("auth"); %> <% if (auth==null) { %> <% } %> <% String sessionName=request.getParameter("sessionName"); %> <% HWISessionItem sess = hs.findSessionItemByName(auth,sessionName); %> <% String message=null; %> <% String errorFile=request.getParameter("errorFile"); String resultFile=request.getParameter("resultFile"); String query = request.getParameter("query"); String silent = request.getParameter("silent"); String start = request.getParameter("start"); %> <% if (request.getParameter("start")!=null ){ if ( sess.getStatus()==HWISessionItem.WebSessionItemStatus.READY){ sess.setErrorFile(errorFile); sess.setResultFile(resultFile); sess.clearQueries(); for (String q : query.split(";") ){ sess.addQuery(q); } if (query.length()==0){ message="You did not specify a query"; start="NO"; } if (silent.equalsIgnoreCase("YES") ) sess.setSSIsSilent(true); else sess.setSSIsSilent(false); message="Changes accepted."; if (start.equalsIgnoreCase("YES") ){ sess.clientStart(); message="Session is set to start."; } } } %> Manage Session <%=sessionName%>

Manage Session <%=sessionName%>

<% if (message != null) { %>
<%=message %>
<% } %> <% if (sess.getStatus()==HWISessionItem.WebSessionItemStatus.QUERY_RUNNING) { %>
Session is in QUERY_RUNNING state. Changes are not possible!
<% } %> <% if (sess.getStatus()==HWISessionItem.WebSessionItemStatus.QUERY_RUNNING){ %> <%-- View JobTracker: View Job
Kill Command: <%= sess.getKillCommand() %> Session Kill: <%=sessionName%>
--%> <% } %>
Session Details
"> <% if (sess.getResultFile()!=null) { %> View File <% } %>
">

Query Return Codes

<% for (int i=0; i< sess.getQueryRet().size();++i ){ %> <%=i%> : <%=sess.getQueryRet().get(i)%>
<% } %>

<% if (sess.getStatus()!=HWISessionItem.WebSessionItemStatus.QUERY_RUNNING) { %>
<% } %>