<% /* * 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 = "javax.servlet.http.*, java.sql.*,java.io.*, java.util.Calendar, java.util.Date, java.text.SimpleDateFormat, java.util.regex.Pattern, java.util.regex.Matcher, java.util.*, org.apache.hadoop.chukwa.hicc.ClusterConfig, org.apache.hadoop.chukwa.hicc.TimeHandler, org.apache.hadoop.chukwa.util.XssFilter" %> <% XssFilter xf = new XssFilter(request); for (Enumeration e = request.getParameterNames() ; e.hasMoreElements() ;) { Pattern p = Pattern.compile("_session.(.*)"); String name = (String) e.nextElement(); Matcher matcher = p.matcher(name); if(matcher.find()) { String realName = matcher.group(1); session.setAttribute(realName,request.getParameter(name)); } } if(session.getAttribute("cluster")==null) { ClusterConfig cc = new ClusterConfig(); Iterator ci = cc.getClusters(); String cluster = (String) ci.next(); session.setAttribute("cluster", cluster); } if(session.getAttribute("period")==null || session.getAttribute("start")==null || session.getAttribute("end")==null || session.getAttribute("time_type")==null) { session.setAttribute("time_type","last"); session.setAttribute("period","last24hr"); long now = Calendar.getInstance().getTime().getTime(); session.setAttribute("start",now-(60*60*1000)); session.setAttribute("end",now); TimeHandler time = new TimeHandler(request); } String machine=""; if(session.getAttribute("hosts")==null) { session.setAttribute("hosts",machine); } if(((String)request.getHeader("user-agent")).indexOf("iPhone")>0) { %> <% } %> Hadoop Infrastructure Care Center
 Loading...  
Hadoop Infrastructure Care Center