You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by cd...@apache.org on 2008/12/05 21:30:21 UTC
svn commit: r723855 [23/23] - in /hadoop/core/trunk: ./ src/contrib/
src/contrib/chukwa/ src/contrib/chukwa/bin/ src/contrib/chukwa/conf/
src/contrib/chukwa/docs/ src/contrib/chukwa/docs/paper/
src/contrib/chukwa/hadoop-packaging/ src/contrib/chukwa/li...
Added: hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/host_selector.jsp
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/host_selector.jsp?rev=723855&view=auto
==============================================================================
--- hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/host_selector.jsp (added)
+++ hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/host_selector.jsp Fri Dec 5 12:30:14 2008
@@ -0,0 +1,151 @@
+<%
+/*
+ * 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.
+ */
+%>
+<%
+ response.setHeader("boxId", request.getParameter("boxId"));
+%>
+<%@ page import = "javax.servlet.http.*, java.sql.*,java.io.*, java.util.Calendar, java.util.Date, java.text.SimpleDateFormat, java.util.*, org.apache.hadoop.chukwa.hicc.ClusterConfig, org.apache.hadoop.chukwa.hicc.TimeHandler, org.apache.hadoop.chukwa.database.DatabaseConfig" %>
+<% String boxId = request.getParameter("boxId"); %>
+<div class="panel">
+<h2>Hosts</h2>
+<fieldset>
+<div class="row">
+<select id="<%= boxId %>group_items" name="<%= boxId %>group_items" MULTIPLE size=10 class="formSelect" style="width:200px;">
+<%
+ String[] machineNames = (String [])session.getAttribute("machine_names");
+ String cluster=request.getParameter("cluster");
+ if(cluster!=null && !cluster.equals("null")) {
+ session.setAttribute("cluster",cluster);
+ } else {
+ cluster = (String) session.getAttribute("cluster");
+ if(cluster==null || cluster.equals("null")) {
+ cluster="demo";
+ session.setAttribute("cluster",cluster);
+ }
+ }
+ ClusterConfig cc = new ClusterConfig();
+ String jdbc = cc.getURL(cluster);
+ TimeHandler time = new TimeHandler(request,(String)session.getAttribute("time_zone"));
+ String startS = time.getStartTimeText();
+ String endS = time.getEndTimeText();
+ String timefield = "timestamp";
+ String dateclause = timefield+" >= '"+startS+"' and "+timefield+" <= '"+endS+"'";
+ Connection conn = null;
+ Statement stmt = null;
+ ResultSet rs = null;
+ try {
+ HashMap<String, String> hosts = new HashMap<String, String>();
+ try {
+ String[] selected_hosts = ((String)session.getAttribute("hosts")).split(",");
+ for(String name: selected_hosts) {
+ hosts.put(name,name);
+ }
+ } catch (NullPointerException e) {
+ }
+ conn = DriverManager.getConnection(jdbc);
+ stmt = conn.createStatement();
+ String query = "";
+ String HodID = (String)session.getAttribute("HodID");
+ if(HodID!=null && !HodID.equals("null") && !HodID.equals("")) {
+ query = "select DISTINCT Machine from HodMachine where HodID='"+HodID+"' order by Machine;";
+ } else if(machineNames==null) {
+ long start = time.getStartTime();
+ long end = time.getEndTime();
+ String table = "system_metrics";
+ DatabaseConfig dbc = new DatabaseConfig();
+ String[] tables = dbc.findTableName(table, start, end);
+ table=tables[0];
+ query="select DISTINCT host from "+table+" order by host";
+ }
+ // or alternatively, if you don't know ahead of time that
+ // the query will be a SELECT...
+ if(!query.equals("")) {
+ if (stmt.execute(query)) {
+ int i=0;
+ rs = stmt.getResultSet();
+ rs.last();
+ int size = rs.getRow();
+ machineNames = new String[size];
+ rs.beforeFirst();
+ while (rs.next()) {
+ String machine = rs.getString(1);
+ machineNames[i]=machine;
+ if(hosts.containsKey(machine)) {
+ out.println("<option selected>"+machine+"</option>");
+ } else {
+ out.println("<option>"+machine+"</option>");
+ }
+ i++;
+ }
+ if(HodID==null || HodID.equals("null") || HodID.equals("")) {
+ session.setAttribute("machine_names",machineNames);
+ }
+ }
+ } else {
+ for(String machine : machineNames) {
+ if(hosts.containsKey(machine)) {
+ out.println("<option selected>"+machine+"</option>");
+ } else {
+ out.println("<option>"+machine+"</option>");
+ }
+ }
+ }
+ // Now do something with the ResultSet ....
+ } catch (SQLException ex) {
+ // handle any errors
+ out.println("SQLException: " + ex.getMessage());
+ out.println("SQLState: " + ex.getSQLState());
+ out.println("VendorError: " + ex.getErrorCode());
+ } finally {
+ // it is a good idea to release
+ // resources in a finally{} block
+ // in reverse-order of their creation
+ // if they are no-longer needed
+ if (rs != null) {
+ try {
+ rs.close();
+ } catch (SQLException sqlEx) {
+ // ignore
+ }
+ rs = null;
+ }
+ if (stmt != null) {
+ try {
+ stmt.close();
+ } catch (SQLException sqlEx) {
+ // ignore
+ }
+ stmt = null;
+ }
+ if (conn != null) {
+ try {
+ conn.close();
+ } catch (SQLException sqlEx) {
+ // ignore
+ }
+ conn = null;
+ }
+ }
+%>
+</select></div>
+<div class="row">
+<input type="button" onClick="save_host('<%= boxId %>');" name="Apply" value="Apply" class="formButton">
+</div>
+</fieldset>
+</div>
Added: hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/session.jsp
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/session.jsp?rev=723855&view=auto
==============================================================================
--- hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/session.jsp (added)
+++ hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/session.jsp Fri Dec 5 12:30:14 2008
@@ -0,0 +1,30 @@
+<%
+/*
+ * 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.*, org.apache.tomcat.util.http.Parameters" %>
+<%
+ for (Enumeration e = request.getParameterNames() ; e.hasMoreElements() ;) {
+ String name = (String) e.nextElement();
+ if(name.equals("_delete")) {
+ session.setAttribute(request.getParameter(name),null);
+ } else {
+ session.setAttribute(name,request.getParameter(name));
+ }
+ }
+%>
Added: hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/single-series-chart-javascript.jsp
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/single-series-chart-javascript.jsp?rev=723855&view=auto
==============================================================================
--- hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/single-series-chart-javascript.jsp (added)
+++ hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/single-series-chart-javascript.jsp Fri Dec 5 12:30:14 2008
@@ -0,0 +1,205 @@
+<%
+/*
+ * 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.
+ */
+%>
+<%
+ response.setHeader("boxId", request.getParameter("boxId"));
+%>
+<%@ page import = "java.sql.*,java.io.*, java.util.Calendar, java.util.Date, java.text.SimpleDateFormat, java.util.*, org.apache.hadoop.chukwa.hicc.ClusterConfig, org.apache.hadoop.chukwa.hicc.TimeHandler, org.apache.hadoop.chukwa.hicc.Chart, org.apache.hadoop.chukwa.hicc.DatasetMapper, org.apache.hadoop.chukwa.database.DatabaseConfig" %>
+<%
+ String boxId=request.getParameter("boxId");
+ String render="line";
+ String cluster = (String) session.getAttribute("cluster");
+ String graphType = request.getParameter("graph_type");
+ int width=300;
+ int height=200;
+ if(request.getParameter("width")!=null) {
+ width=Integer.parseInt(request.getParameter("width"));
+ }
+ if(request.getParameter("height")!=null) {
+ height=Integer.parseInt(request.getParameter("height"));
+ }
+ String title = request.getParameter("title");
+ if(cluster==null) {
+ cluster="demo";
+ }
+ String match=request.getParameter("match");
+ String group = request.getParameter("group");
+ if(match!=null) {
+ String matched = (String)session.getAttribute(match);
+ if(matched==null || matched.equals("")) {
+ match="";
+ } else {
+ match=match+"="+matched;
+ }
+ } else {
+ match="";
+ }
+ ClusterConfig cc = new ClusterConfig();
+ String jdbc = cc.getURL(cluster);
+ String path = "";
+ Calendar now = Calendar.getInstance();
+ long start = 0;
+ long end = now.getTimeInMillis();
+ String startS="";
+ String endS="";
+ String[] metric = request.getParameterValues("metric");
+ StringBuffer metrics=new StringBuffer();
+ for(int i=0;i<metric.length;i++) {
+ if(i==0) {
+ metrics.append(metric[i]);
+ } else {
+ metrics.append(",");
+ metrics.append(metric[i]);
+ }
+ }
+ String random = request.getParameter("_s");
+ TimeHandler time = new TimeHandler(request, (String)session.getAttribute("time_zone"));
+ startS = time.getStartTimeText();
+ endS = time.getEndTimeText();
+ start = time.getStartTime();
+ end = time.getEndTime();
+ String timestamp = "timestamp";
+ if(request.getParameter("normalize_time")!=null) {
+ timestamp = "from_unixtime(unix_timestamp(Timestamp)-unix_timestamp(timestamp)%60) as timestamp";
+ }
+ if(start<=0 || end<=0) { %>
+No time range specified. Select a time range through widget preference, or use Time widget.
+<% } else {
+ String timefield = "timestamp";
+ String dateclause = timefield+" >= '"+startS+"' and "+timefield+" <= '"+endS+"'";
+ if(request.getParameter("period")!=null && request.getParameter("period").equals("0")) {
+ dateclause = "";
+ }
+ String minclause = "";
+ if(request.getParameter("minnodes")!=null) {
+ minclause="and j.NumOfMachines >= "+request.getParameter("minnodes");
+ }
+ String whereclause = "";
+ if(request.getParameter("user")!=null && !request.getParameter("user").equals("")) {
+ whereclause="and j.UserID = "+request.getParameter("user");
+ }
+ String mrtimeclause = "";
+ try {
+ String jdbcDriver = System.getenv("JDBC_DRIVER");
+ Class.forName(jdbcDriver).newInstance();
+ } catch (Exception ex) {
+ }
+ Connection conn = null;
+ Statement stmt = null;
+ ResultSet rs = null;
+ if(request.getParameter("group_items")!=null) {
+ if(session.getAttribute(request.getParameter("group_items"))==null) {
+ session.setAttribute(request.getParameter("group_items"),"");
+ }
+ int counter = 0;
+ String[] group_items = ((String)session.getAttribute(request.getParameter("group_items"))).split(",");
+ String appendDomain = request.getParameter("append_domain");
+ if(appendDomain==null) {
+ appendDomain="";
+ }
+ if(group_items!=null) {
+ for(String item : group_items) {
+ if(counter!=0) {
+ match = match + " or ";
+ } else {
+ match = "(";
+ }
+ match = match + group + " = '"+ item+ appendDomain +"'";
+ counter++;
+ }
+ if(!match.equals("")) {
+ match = match + ")";
+ }
+ }
+ }
+ String table = (String)request.getParameter("table");
+ if(table==null) {
+ table = "cluster_system_metrics";
+ }
+ if(request.getParameter("group_override")!=null) {
+ group=request.getParameter("group_override");
+ }
+ String[] tables = null;
+ DatabaseConfig dbc = new DatabaseConfig();
+ tables = dbc.findTableNameForCharts(table,start,end);
+ ArrayList<String> labels = new ArrayList<String>();
+ TreeMap<String, TreeMap<String, Double>> dataMap = new TreeMap<String, TreeMap<String, Double>>();
+ for(String tmpTable : tables) {
+ String query = null;
+ if(!dateclause.equals("") && !match.equals("")) {
+ dateclause=" and "+dateclause;
+ }
+ if(group!=null) {
+ query = "select "+timestamp+","+group+","+metrics+" from "+tmpTable+" where "+match+dateclause+" order by timestamp";
+ } else {
+ query = "select "+timestamp+","+metrics+" from "+tmpTable+" where "+match+dateclause+" order by timestamp";
+ }
+ DatasetMapper dataFinder = new DatasetMapper(jdbc);
+ boolean groupBySecondColumn=false;
+ if(group!=null) {
+ groupBySecondColumn=true;
+ }
+ boolean odometer=false;
+ if(request.getParameter("find_slope")!=null) {
+ odometer=true;
+ }
+ dataFinder.execute(query,groupBySecondColumn,odometer,graphType);
+ List<String> tmpLabels = dataFinder.getXAxisMap();
+ TreeMap<String, TreeMap<String, Double>> tmpDataMap = dataFinder.getDataset();
+ for(int t=0;t<tmpLabels.size();t++) {
+ labels.add(tmpLabels.get(t));
+ }
+ Iterator<String> ki = tmpDataMap.keySet().iterator();
+ while(ki.hasNext()) {
+ String ts = ki.next();
+ dataMap.put(ts,tmpDataMap.get(ts));
+ }
+ }
+ if(dataMap.size()!=0) {
+ if(request.getParameter("render")!=null) {
+ render=request.getParameter("render");
+ }
+ Chart c = new Chart(request);
+ c.setYAxisLabels(false);
+ if(request.getParameter("x_label")!=null && request.getParameter("x_label").equals("on")) {
+ c.setXAxisLabels(true);
+ } else {
+ c.setXAxisLabels(false);
+ }
+ c.setYAxisLabel("");
+ c.setXAxisLabel("Time");
+ c.setTitle(metrics.toString());
+ if(request.getParameter("y_axis_max")!=null) {
+ double max = Double.parseDouble(request.getParameter("y_axis_max"));
+ c.setYMax(max);
+ }
+ if(request.getParameter("legend")!=null && request.getParameter("legend").equals("off")) {
+ c.setLegend(false);
+ }
+ c.setGraphType(graphType);
+ c.setXLabelsRange(labels);
+ c.setSize(width,height);
+ c.setDataSet(render,dataMap);
+ if(metric.length>1) {
+ c.setSeriesOrder(metric);
+ }
+ out.println(c.plot());
+ }
+ }
+%>
Added: hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/time.jsp
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/time.jsp?rev=723855&view=auto
==============================================================================
--- hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/time.jsp (added)
+++ hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/time.jsp Fri Dec 5 12:30:14 2008
@@ -0,0 +1,48 @@
+<%
+/*
+ * 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.
+ */
+%>
+<%
+ response.setHeader("boxId", request.getParameter("boxId"));
+%>
+<%@ page import = "java.util.Hashtable, java.util.Enumeration, java.util.Calendar, java.util.Date, java.text.SimpleDateFormat, org.apache.hadoop.chukwa.hicc.TimeHandler, java.text.NumberFormat" %>
+<%
+ if(request.getParameter("time_zone")!=null) {
+ session.setAttribute("time_zone",request.getParameter("time_zone"));
+ }
+ String timeType="combo";
+ if(request.getParameter("time_type")!=null) {
+ timeType=request.getParameter("time_type");
+ }
+ if(((String)request.getHeader("user-agent")).indexOf("iPhone")>0) {
+%>
+ <jsp:include page="workspace/time_iphone.jsp" flush="true" />
+<%
+ } else if(timeType.equals("date")) {
+%>
+ <jsp:include page="time_frame.jsp" flush="true" />
+<%
+ } else if(timeType.equals("range")) {
+%>
+ <jsp:include page="time_range.jsp" flush="true" />
+<%
+ } else if(timeType.equals("slider")) {
+%>
+ <jsp:include page="time_slider_wrapper.jsp" flush="true" />
+<%
+ } %>
Added: hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/time_frame.jsp
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/time_frame.jsp?rev=723855&view=auto
==============================================================================
--- hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/time_frame.jsp (added)
+++ hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/time_frame.jsp Fri Dec 5 12:30:14 2008
@@ -0,0 +1,60 @@
+<%
+/*
+ * 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.
+ */
+%>
+<%
+ response.setHeader("boxId", request.getParameter("boxId"));
+%>
+<%@ page import = "java.util.Hashtable, java.util.Enumeration, java.util.Calendar, java.util.Date, java.text.SimpleDateFormat, org.apache.hadoop.chukwa.hicc.TimeHandler, java.text.NumberFormat" %>
+<% String boxId = request.getParameter("boxId");
+ TimeHandler time = new TimeHandler(request, (String)session.getAttribute("time_zone"));
+%>
+<table width="100%" class="clear_table">
+<tr><td align="center">
+<a href="#" onclick="return false;" id="<%= boxId %>previous"><img src="/hicc/images/arrow_left.png" border="0"></a>
+</td><td align="center">
+<a href="#" onclick="return false;" id="<%= boxId %>today">Today</a>
+</td><td align="center">
+<a href="#" onclick="return false;" id="<%= boxId %>next"><img src="/hicc/images/arrow_right.png" border="0"></a>
+</td></tr>
+<tr><td colspan="3" align="center">
+<div id="<%= boxId %>calendars" class="timeframe_calendar"></div>
+</td></tr>
+<tr><td colspan="3" align="center">
+<span>
+ <input type="text" name="<%= boxId %>start" value="<%= time.getStartDate("MMMMM dd, yyyy") %>" id="<%= boxId %>start" class="formInput" size="10"/>
+ –
+ <input type="text" name="<%= boxId %>end" value="<%= time.getEndDate("MMMMM dd, yyyy") %>" id="<%= boxId %>end" class="formInput" size="10"/>
+</span>
+</td></tr>
+</table>
+<div style="display:none"><a href="#" onclick="return false;" id="<%= boxId %>reset">Reset</a></a></div>
+<input type="button" name="<%=boxId%>apply" value="Apply" class="formButton" onclick="save_timeframe('<%= boxId %>');">
+<script type="text/javascript">
+ new Timeframe('<%= boxId %>calendars', {
+ previousButton: "<%= boxId %>previous",
+ todayButton: "<%= boxId %>today",
+ nextButton: "<%= boxId %>next",
+ resetButton: "<%= boxId %>reset",
+ months: 1,
+ format: '%Y-%m-%d',
+ startField: '<%= boxId %>start',
+ endField: '<%= boxId %>end'
+ }
+ );
+</script>
Added: hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/time_range.jsp
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/time_range.jsp?rev=723855&view=auto
==============================================================================
--- hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/time_range.jsp (added)
+++ hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/time_range.jsp Fri Dec 5 12:30:14 2008
@@ -0,0 +1,56 @@
+<%
+/*
+ * 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.
+ */
+%>
+<%
+ response.setHeader("boxId", request.getParameter("boxId"));
+%>
+<%@ page import = "java.util.Hashtable, java.util.Enumeration, java.util.Calendar, java.util.Date, java.text.SimpleDateFormat, org.apache.hadoop.chukwa.hicc.TimeHandler, java.text.NumberFormat" %>
+<% String boxId = request.getParameter("boxId");
+ TimeHandler time = new TimeHandler(request, (String)session.getAttribute("time_zone")); %>
+Time Period
+<select id="<%= boxId %>period" name="<%= boxId %>time_period" class="formSelect">
+<%
+ String period = (String) session.getAttribute("period");
+ String[][] periodMap = new String[8][2];
+ periodMap[0][0]="last1hr";
+ periodMap[0][1]="Last 1 Hour";
+ periodMap[1][0]="last2hr";
+ periodMap[1][1]="Last 2 Hours";
+ periodMap[2][0]="last3hr";
+ periodMap[2][1]="Last 3 Hours";
+ periodMap[3][0]="last6hr";
+ periodMap[3][1]="Last 6 Hours";
+ periodMap[4][0]="last12hr";
+ periodMap[4][1]="Last 12 Hours";
+ periodMap[5][0]="last24hr";
+ periodMap[5][1]="Last 24 Hours";
+ periodMap[6][0]="last7d";
+ periodMap[6][1]="Last 7 Days";
+ periodMap[7][0]="last30d";
+ periodMap[7][1]="Last 30 Days";
+ for (int i=0;i<periodMap.length;i++) {
+ String meta = "";
+ if(period!=null && period.equals(periodMap[i][0])) {
+ meta = "selected";
+ }
+ out.println("<option value='"+periodMap[i][0]+"' "+meta+">"+periodMap[i][1]+"</option>");
+ }
+ %>
+</select>
+<input type="button" name="<%= boxId %>apply" value="Apply" onclick="save_time_range('<%= boxId %>')" class="formButton">
Added: hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/time_slider.jsp
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/time_slider.jsp?rev=723855&view=auto
==============================================================================
--- hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/time_slider.jsp (added)
+++ hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/time_slider.jsp Fri Dec 5 12:30:14 2008
@@ -0,0 +1,155 @@
+<%
+/*
+ * 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 = "java.io.*, java.util.Calendar, java.util.Date, java.text.SimpleDateFormat, org.apache.hadoop.chukwa.hicc.TimeHandler" %>
+<% TimeHandler time = new TimeHandler(request,(String)session.getAttribute("time_zone"));
+ String startDate = time.getStartDate();
+ String endDate = time.getEndDate();
+ SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
+ long start = formatter.parse(startDate).getTime();
+ long end = formatter.parse(endDate).getTime();
+ end = end + (60*60*24*1000-1);
+ String label = "";
+ String label2 = "";
+ String label3 = "";
+ if(end-start>(60*60*24*1000*2)) {
+ label = formatter.format(start);
+ long mid = (end+start)/2;
+ label2 = formatter.format(mid);
+ label3 = formatter.format(end);
+ } else {
+ SimpleDateFormat formatter2 = new SimpleDateFormat("HH:mm");
+ label = formatter2.format(start);
+ long mid = (end+start)/2;
+ label2 = formatter2.format(mid);
+ label3 = formatter2.format(end);
+ }
+%>
+<html><head>
+<script type='text/javascript' src='/hicc/js/workspace/prototype.js'></script>
+<script type='text/javascript' src='/hicc/js/workspace/scriptaculous.js'></script>
+<link href="/hicc/css/default.css" rel="stylesheet" type="text/css">
+<style type="text/css">
+ div.slider3 { width:96%; margin:0px; height:15px; position: relative; opacity: 0.6; z-index:5; white-space: nowrap;}
+ div.slider { width:96%; margin:0px; height:10px; position: relative; opacity: 0.6; z-index:5; white-space:nowrap;}
+ div.slider2 { width:96%; margin:0px; background-color:#ccc; height:4px; position: relative; opacity: 0.4; z-index:5; white-space:nowrap;}
+ div.handle { cursor:move; position: absolute; z-index:10; opacity: 1.0; }
+ div.label { display: inline-block; text-align: center; position:absolute; z-index:4;}
+ span.label { text-align: center; }
+</style>
+</head>
+<body>
+ <table class="clear_table"><tr><td align="right">
+ Start Time</td><td>
+ <div id="start_time" style="display:inline;white-space: nowrap;"></div></td></tr>
+ <tr><td align="right">End Time</td><td>
+ <div id="end_time" style="display:inline;white-space: nowrap;"></div></td></tr>
+ </table>
+ <div id="time_slider" class="slider3">
+ <div class="handle" style="width:19px; height:30px;"><img src="/hicc/images/slider-images-handle.png" alt="" style="float: left;" /></div>
+ <div class="handle" style="width:19px; height:30px;"><img src="/hicc/images/slider-images-handle.png" alt="" style="float: left;" /></div>
+ </div>
+ <div class="slider2"></div>
+ <div id="range_slider" class="slider">
+ <div class="handle" style="width:19px; height:20px;"><img src="/hicc/images/slider-images-handle2.png" alt="" style="float: left;"/></div>
+ </div>
+ <div style="width:100%; height: 1em; font-size: 9px; color: gray;">
+ <div class="label" style="left:0%;"><span class="label"><%=label%></span></div>
+ <div class="label" style="left:45%;"><span class="label"><%=label2%></span></div>
+ <div class="label" style="right:3%;"><span class="label"><%=label3%></span></div>
+ </div>
+<div id="hidden_start" style="display:none;"></div>
+<div id="hidden_end" style="display:none;"></div>
+<script type="text/javascript">
+ var time_slider = $('time_slider');
+ var range_slider = $('range_slider');
+ var mid=(<%= time.getStartTime() %>+<%= time.getEndTime() %>)/2;
+ var slider = new Control.Slider(time_slider.select('.handle'), time_slider, {
+ range: $R(<%= start %>, <%= end %>),
+ sliderValue: [<%= time.getStartTime() %>, <%= time.getEndTime() %>],
+ restricted: true,
+ onSlide: function(values) {
+ display_dates(values[0],values[1]);
+ },
+ onChange: function(values) {
+ display_dates(values[0],values[1]);
+ }
+ });
+ var slider_range = new Control.Slider(range_slider.select('.handle'), range_slider, {
+ range: $R(<%= start %>, <%= end %>),
+ sliderValue: mid,
+ onSlide: function(values) {
+ var delta = values-mid;
+ mid = values;
+ slider.setValue(slider.values[0]+delta,0);
+ slider.setValue(slider.values[1]+delta,1);
+ display_dates(slider.values[0]+delta,slider.values[1]+delta);
+ },
+ onChange: function(values) {
+ }
+ });
+
+function display_dates(start, end) {
+ var s = new Date();
+ s.setTime(start);
+ var sm = s.getUTCMonth();
+ sm = sm + 1;
+ if(sm<10) {
+ sm = "0" + sm;
+ }
+ var sd = s.getUTCDate();
+ if(sd<10) {
+ sd = "0" + sd;
+ }
+ var sh = s.getUTCHours();
+ if(sh<10) {
+ sh = "0" + sh;
+ }
+ var smin = s.getUTCMinutes();
+ if(smin<10) {
+ smin = "0" + smin;
+ }
+ var e = new Date();
+ e.setTime(end);
+ var em = e.getUTCMonth();
+ em = em + 1;
+ if(em<10) {
+ em = "0" + em;
+ }
+ var ed = e.getUTCDate();
+ if(ed<10) {
+ ed = "0" + ed;
+ }
+ var eh = e.getUTCHours();
+ if(eh<10) {
+ eh = "0" + eh;
+ }
+ var emin = e.getUTCMinutes();
+ if(emin<10) {
+ emin = "0" + emin;
+ }
+ $('start_time').innerHTML=s.getUTCFullYear()+"-"+sm+"-"+sd+" "+sh+":"+smin;
+ $('end_time').innerHTML=e.getUTCFullYear()+"-"+em+"-"+ed+" "+eh+":"+emin;
+ $('hidden_start').innerHTML=start;
+ $('hidden_end').innerHTML=end;
+}
+
+display_dates(<%= time.getStartTime() %>,<%= time.getEndTime() %>);
+</script>
+</body></html>
Added: hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/time_slider_wrapper.jsp
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/time_slider_wrapper.jsp?rev=723855&view=auto
==============================================================================
--- hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/time_slider_wrapper.jsp (added)
+++ hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/time_slider_wrapper.jsp Fri Dec 5 12:30:14 2008
@@ -0,0 +1,25 @@
+<%
+/*
+ * 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.
+ */
+%>
+<%
+ response.setHeader("boxId", request.getParameter("boxId"));
+%>
+<IFRAME id="<%= request.getParameter("boxId") %>iframe" src="/hicc/jsp/time_slider.jsp" width="100%" frameborder="0" height="80" scrolling="no"></IFRAME>
+ <input type=button id="time_slider_apply" name="time_slider_apply" value="Apply" onclick="save_time_slider(document.getElementById('<%= request.getParameter("boxId") %>iframe').contentDocument.getElementById('hidden_start').innerHTML,document.getElementById('<%= request.getParameter("boxId") %>iframe').contentDocument.getElementById('hidden_end').innerHTML);" class="formButton">
+
Added: hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/workspace/manage_view.jsp
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/workspace/manage_view.jsp?rev=723855&view=auto
==============================================================================
--- hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/workspace/manage_view.jsp (added)
+++ hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/workspace/manage_view.jsp Fri Dec 5 12:30:14 2008
@@ -0,0 +1,132 @@
+<%
+/*
+ * 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.
+ */
+%>
+<%@ taglib prefix="my" uri="/WEB-INF/jsp2/taglib.tld" %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
+<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
+<table class="portal_table" cellpadding="2" cellspacing="0" width="100%">
+<thead><tr bgcolor="lightgrey">
+<th>Name</th>
+<th>Owner</th>
+<th>Permission</th>
+<th colspan="4">Operations</th>
+</tr></thead>
+<%
+ String[] users= {"Mac", "Eric", "Linyun", "Rounpin", "Jerome", "admin"};
+ pageContext.setAttribute("users", users);
+ pageContext.setAttribute("user","admin");
+ pageContext.setAttribute("permission.all.read","1");
+ pageContext.setAttribute("permission.all.write","2");
+ pageContext.setAttribute("default_view","default");
+%>
+<my:findViews>
+ <tr><td>
+<div id="displayViewNameBlock${key}">
+<a href="#" onClick="javascript:set_current_view('${key}');initScript('${key}');">${description}</a></div>
+<div id="changeViewNameBlock${key}" style="display:none;">
+<input type=text class=formInput name="changeViewNameField${key}" id="changeViewNameField${key}" value='${description}'/>
+</div>
+</td><td align='center'>${owner}</td>
+<td align='center' width="270">
+<!-- begin permission -->
+<div id="displayViewPermissionBlock${key}" style="display:block;">
+<c:choose>
+ <c:when test="${permission.all.read=='1'}">
+ Public
+ </c:when>
+ <c:otherwise>
+ Private
+ </c:otherwise>
+</c:choose>
+</div>
+<div id="editViewPermissionBlock${key}" style="display:none;">
+ <div id="permission${key}">
+<input type=hidden name="permissionRowCount${key}" value="${fn:length(permissions)}"/>
+<table class="portal_table" id="permissionTable${key}" cellspacing=0 cellpadding=0>
+<thead><tr bgcolor="lightgrey"><th>User</th><th>Allow To Read</th><th>Allow to Modify</th><th></th></tr></thead>
+<tbody>
+<!-- begin permission -->
+<c:forEach items="${permission}" var="pK">
+ <tr><td>
+ <select id='userid_permission' class='formSelect'>
+ <c:forEach items="${users}" var="user">
+ <c:choose>
+ <c:when test="${user==pK}">
+ <option value='${user}' selected>${user}</option>
+ </c:when>
+ <c:otherwise>
+ <option value='${user}'>${user}</option>
+ </c:otherwise>
+ </c:choose>
+ </c:forEach>
+ </select>
+ </td><td align="middle">
+ <input type='checkbox' class='formCheckbox' id='read_permission' name='read_permission' ${permission.[permissionKey].read ? "checked":""}>
+ </td><td align="middle">
+ <input type='checkbox' class='formCheckbox' id='modify_permission' name='modify_permission' ${permission.[permissionKey].modify ? "checked":""}>
+ </td><td>
+ <img src='/sim/images/close16.gif' onClick="deleteCurrentRow('${key}',this);"/>
+ </td></tr>
+</c:forEach>
+<!-- end permission -->
+</tbody>
+</table>
+<br/>
+<input type=button class=formButton name="addPermissionRowButton" value="Add More Permission" onClick="addPermissionRow('${key}','',false,false);"/>
+ </div>
+</div>
+<!-- end permission -->
+</td><td width="115">
+<!-- begin operations -->
+<!--c:if test="${permission.all.modify=='1'} || ${permission.user.modify=='1'}"-->
+ <div id="changeViewNameButtonBlock${key}" style="display:block;">
+ <input class="formButton" name="changeNameButton${key}" id="changeNameButton${key}" value="Change" type="button" onClick="changeViewName('${key}',false);"/>
+ </div>
+ <div id="cancelChangeViewNameBlock${key}" style="display:none;">
+ <input class="formButton" name="saveNameButton${key}" id="saveNameButton${key}" value="Save" type="button" onClick="changeViewName('${key}',true);"/>
+ <input class="formButton" name="cancelChangeNameButton${key}" id="cancelChangeNameButton${key}" value="Cancel" type="button" onClick="changeViewName('${key}',false);"/>
+ </div>
+<!--/c:if-->
+</td>
+<td nowrap width="60">
+<input class="formButton" name="cloneview" value="Clone" type="button" onClick="cloneView('${key}');"/>
+</td>
+<td nowrap width="60">
+<!--c:if test="${key=='default'}"-->
+<!-- <input class="formButton" name="restoreview" value="Restore" type="button" onClick="if (confirm(Are you sure you want to restore the default workspace?)){ restoreView('${key}');}"/> -->
+<!--/c:if-->
+
+<!--c:if test="${permision.all.modify=='1'} || ${permission.user.modify=='1'} && ${key!='default'}"-->
+ <input class="formButton" name="delelete" value="Delete" type="button" onClick="if (confirm('Are you sure you want to delete the workspace?')){ deleteView('${key}');}"/>
+<!--/c:if-->
+</td>
+<td nowrap width="60">
+<c:choose>
+ <c:when test="${key}!=${default_view}">
+ <input class="formButton" name="setDefault" value="Set As Default" type="button" onClick="setDefaultView('${key}');"/>
+ </c:when>
+ <c:otherwise>
+ Default View
+ </c:otherwise>
+</c:choose>
+</td>
+<!-- end operation -->
+</td></tr>
+</my:findViews>
+</table>
Added: hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/workspace/time_iphone.jsp
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/workspace/time_iphone.jsp?rev=723855&view=auto
==============================================================================
--- hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/workspace/time_iphone.jsp (added)
+++ hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/jsp/workspace/time_iphone.jsp Fri Dec 5 12:30:14 2008
@@ -0,0 +1,113 @@
+<%
+/*
+ * 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.
+ */
+%>
+<%
+ response.setHeader("boxId", request.getParameter("boxId"));
+%>
+<%@ page import = "java.util.Hashtable, java.util.Enumeration, java.util.Calendar, java.util.Date, java.text.SimpleDateFormat, org.apache.hadoop.chukwa.hicc.TimeHandler, java.text.NumberFormat" %>
+<% String boxId = request.getParameter("boxId");
+ session.setAttribute("time_type","range");
+ TimeHandler time = new TimeHandler(request,(String)session.getAttribute("time_zone"));
+%>
+<div class="panel">
+<h2>Date/Time</h2>
+<fieldset>
+<div class="row">
+ <label>Start Date</label>
+<input type=text id="<%= boxId %>start" name="<%= boxId %>start" value="<%= time.getStartDate() %>" size="10"/>
+</div>
+<div class="row">
+ <label>Start Time</label>
+<select id="<%= boxId %>start_hour" name="<%= boxId %>start_hour">
+<%
+ String startHour = time.getStartHour();
+ for(int i=0;i < 24; i++) {
+ String meta = "";
+ String hour = ""+i;
+ if(i<10) {
+ hour = "0"+i;
+ }
+ if(startHour.equals(hour)) {
+ meta = "selected";
+ }
+ out.println("<option value='"+hour+"' "+meta+">"+hour+"</option>");
+ }
+%>
+</select> :
+<select id="<%= boxId %>start_min" name="<%= boxId %>start_min">
+<%
+ String startMin = time.getStartMinute();
+ for(int i=0;i < 60; i++) {
+ String meta = "";
+ String minute = ""+i;
+ if(i<10) {
+ minute = "0"+i;
+ }
+ if(startMin.equals(minute)) {
+ meta = "selected";
+ }
+ out.println("<option value='"+minute+"' "+meta+">"+minute+"</option>");
+ }
+%>
+</select>
+</div>
+<div class="row">
+ <label>End Date</label>
+<input type=text id="<%= boxId %>end" name="<%= boxId %>end" value="<%= time.getEndDate() %>" size="10"/>
+</div>
+<div class="row">
+ <label>End Time</label>
+<select id="<%= boxId %>end_hour" name="<%= boxId %>end_hour">
+<%
+ String endHour = time.getEndHour();
+ for(int i=0;i < 24; i++) {
+ String meta = "";
+ String hour = ""+i;
+ if(i<10) {
+ hour = "0"+i;
+ }
+ if(endHour.equals(hour)) {
+ meta = "selected";
+ }
+ out.println("<option value='"+hour+"' "+meta+">"+hour+"</option>");
+ }
+%>
+</select> :
+<select id="<%= boxId %>end_min" name="<%= boxId %>end_min">
+<%
+ String endMin = time.getEndMinute();
+ for(int i=0;i < 60; i++) {
+ String meta = "";
+ String minute = ""+i;
+ if(i<10) {
+ minute = "0"+i;
+ }
+ if(endMin.equals(minute)) {
+ meta = "selected";
+ }
+ out.println("<option value='"+minute+"' "+meta+">"+minute+"</option>");
+ }
+%>
+</select>
+</div>
+<div class="row">
+<input type="button" name="apply" value="Apply" onclick="save_time('<%= boxId %>');" class="formButton">
+</div>
+</fieldset>
+</div>
Added: hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/views/default.view
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/views/default.view?rev=723855&view=auto
==============================================================================
--- hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/views/default.view (added)
+++ hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/views/default.view Fri Dec 5 12:30:14 2008
@@ -0,0 +1 @@
+{"description": "Default view", "pages_count": 2, "pages": [{"title": "Cluster Status", "columns": 2, "layout": [[{"id": "time", "module": "jsp/time.jsp", "title": "Time", "javascripts": "time.js", "description": "Global control to manipulate time across widgets", "categories": "Global,Utility", "parameters": [{"name": "time_zone", "callback": "/hicc/jsp/get_timezone_list.jsp", "value": "UTC", "label": "Time Zone", "type": "select_callback"}, {"name": "time_type", "value": "range", "label": "Style", "type": "select", "options": [{"value": "date", "label": "Date Picker"}, {"value": "range", "label": "Time Period"}, {"value": "slider", "label": "Slider"}]}], "refresh": "0", "version": "0.1"}, {"id": "cluster_metrics_pcnt", "module": "iframe/jsp/single-series-chart-javascript.jsp", "title": "Cluster Metrics by Percentage", "description": "Display cluster related stats by percentage", "categories": "System,Status", "parameters": [{"name": "y_axis_max", "edit": "0", "value": "100
", "type": "string"}, {"name": "table", "edit": "0", "value": "cluster_system_metrics", "type": "string"}, {"name": "period", "value": "", "label": "Period", "type": "select", "options": [{"value": "", "label": "Use Time Widget"}, {"value": "last1hr", "label": "Last 1 Hour"}, {"value": "last2hr", "label": "Last 2 Hours"}, {"value": "last3hr", "label": "Last 3 Hours"}, {"value": "last6hr", "label": "Last 6 Hours"}, {"value": "last12hr", "label": "Last 12 Hours"}, {"value": "last24hr", "label": "Last 24 Hours"}, {"value": "yesterday", "label": "Yesterday"}, {"value": "last7d", "label": "Last 7 Days"}, {"value": "last30d", "label": "Last 30 Days"}]}, {"name": "metric", "value": ["cpu_idle_pcnt", "cpu_system_pcnt", "cpu_user_pcnt"], "label": "Metric", "type": "select_multiple", "options": [{"value": "cpu_idle_pcnt", "label": "cpu_idle_pcnt"}, {"value": "cpu_nice_pcnt", "label": "cpu_nice_pcnt"}, {"value": "cpu_system_pcnt", "label": "cpu_system_pcnt"}, {"value": "cpu_user_pcnt",
"label": "cpu_user_pcnt"}, {"value": "cpu_hirq_pcnt", "label": "cpu_hirq_pcnt"}, {"value": "cpu_sirq_pcnt", "label": "cpu_sirq_pcnt"}, {"value": "iowait_pcnt", "label": "iowait_pcnt"}, {"value": "mem_buffers_pcnt", "label": "mem_buffers_pcnt"}, {"value": "mem_used_pcnt", "label": "mem_used_pcnt"}, {"value": "eth0_busy_pcnt", "label": "eth0_busy_pcnt"}, {"value": "eth1_busy_pcnt", "label": "eth1_busy_pcnt"}, {"value": "sda_busy_pcnt", "label": "sda_busy_pcnt"}, {"value": "sdb_busy_pcnt", "label": "sdb_busy_pcnt"}, {"value": "sdc_busy_pcnt", "label": "sdc_busy_pcnt"}, {"value": "sdd_busy_pcnt", "label": "sdd_busy_pcnt"}, {"value": "swap_used_pcnt", "label": "swap_used_pcnt"}]}, {"name": "width", "value": "300", "label": "Width", "type": "select", "options": [{"value": "300", "label": "300"}, {"value": "400", "label": "400"}, {"value": "500", "label": "500"}, {"value": "600", "label": "600"}, {"value": "800", "label": "800"}, {"value": "1200", "label": "1200"}]}, {"name": "hei
ght", "value": "200", "label": "Height", "type": "select", "options": [{"value": "200", "label": "200"}, {"value": "400", "label": "400"}, {"value": "600", "label": "600"}, {"value": "1000", "label": "1000"}]}, {"name": "legend", "value": "on", "label": "Show Legends", "type": "radio", "options": [{"value": "on", "label": "On"}, {"value": "off", "label": "Off"}]}], "screendump": "/images/server_load.gif", "refresh": "15", "version": "0.1"}, {"id": "cluster_metrics_pcnt", "module": "iframe/jsp/single-series-chart-javascript.jsp", "title": "Cluster Metrics by Percentage", "description": "Display cluster related stats by percentage", "categories": "System,Status", "parameters": [{"name": "y_axis_max", "edit": "0", "value": "100", "type": "string"}, {"name": "table", "edit": "0", "value": "cluster_system_metrics", "type": "string"}, {"name": "period", "value": "", "label": "Period", "type": "select", "options": [{"value": "", "label": "Use Time Widget"}, {"value": "last1hr", "la
bel": "Last 1 Hour"}, {"value": "last2hr", "label": "Last 2 Hours"}, {"value": "last3hr", "label": "Last 3 Hours"}, {"value": "last6hr", "label": "Last 6 Hours"}, {"value": "last12hr", "label": "Last 12 Hours"}, {"value": "last24hr", "label": "Last 24 Hours"}, {"value": "yesterday", "label": "Yesterday"}, {"value": "last7d", "label": "Last 7 Days"}, {"value": "last30d", "label": "Last 30 Days"}]}, {"name": "metric", "value": ["eth0_busy_pcnt", "eth1_busy_pcnt"], "label": "Metric", "type": "select_multiple", "options": [{"value": "cpu_idle_pcnt", "label": "cpu_idle_pcnt"}, {"value": "cpu_nice_pcnt", "label": "cpu_nice_pcnt"}, {"value": "cpu_system_pcnt", "label": "cpu_system_pcnt"}, {"value": "cpu_user_pcnt", "label": "cpu_user_pcnt"}, {"value": "cpu_hirq_pcnt", "label": "cpu_hirq_pcnt"}, {"value": "cpu_sirq_pcnt", "label": "cpu_sirq_pcnt"}, {"value": "iowait_pcnt", "label": "iowait_pcnt"}, {"value": "mem_buffers_pcnt", "label": "mem_buffers_pcnt"}, {"value": "mem_used_pcnt",
"label": "mem_used_pcnt"}, {"value": "eth0_busy_pcnt", "label": "eth0_busy_pcnt"}, {"value": "eth1_busy_pcnt", "label": "eth1_busy_pcnt"}, {"value": "sda_busy_pcnt", "label": "sda_busy_pcnt"}, {"value": "sdb_busy_pcnt", "label": "sdb_busy_pcnt"}, {"value": "sdc_busy_pcnt", "label": "sdc_busy_pcnt"}, {"value": "sdd_busy_pcnt", "label": "sdd_busy_pcnt"}, {"value": "swap_used_pcnt", "label": "swap_used_pcnt"}]}, {"name": "width", "value": "300", "label": "Width", "type": "select", "options": [{"value": "300", "label": "300"}, {"value": "400", "label": "400"}, {"value": "500", "label": "500"}, {"value": "600", "label": "600"}, {"value": "800", "label": "800"}, {"value": "1200", "label": "1200"}]}, {"name": "height", "value": "200", "label": "Height", "type": "select", "options": [{"value": "200", "label": "200"}, {"value": "400", "label": "400"}, {"value": "600", "label": "600"}, {"value": "1000", "label": "1000"}]}, {"name": "legend", "value": "on", "label": "Show Legends", "t
ype": "radio", "options": [{"value": "on", "label": "On"}, {"value": "off", "label": "Off"}]}], "screendump": "/images/server_load.gif", "refresh": "15", "version": "0.1"}], [{"parameters": [], "title": "Cluster Selector", "description": "Global control to manipulate cluster selection across widgets", "categories": "Global,Utility", "screendump": "", "refresh": "0", "module": "jsp/cluster_selector.jsp", "id": "cluster_selector", "version": "0.1"}, {"id": "cluster_metrics", "module": "iframe/jsp/single-series-chart-javascript.jsp", "title": "Cluster Metrics", "description": "Display cluster related stats", "categories": "System,Status", "parameters": [{"name": "table", "edit": "0", "value": "cluster_system_metrics", "type": "string"}, {"name": "period", "value": "", "label": "Period", "type": "select", "options": [{"value": "", "label": "Use Time Widget"}, {"value": "last1hr", "label": "Last 1 Hour"}, {"value": "last2hr", "label": "Last 2 Hours"}, {"value": "last3hr", "label"
: "Last 3 Hours"}, {"value": "last6hr", "label": "Last 6 Hours"}, {"value": "last12hr", "label": "Last 12 Hours"}, {"value": "last24hr", "label": "Last 24 Hours"}, {"value": "yesterday", "label": "Yesterday"}, {"value": "last7d", "label": "Last 7 Days"}, {"value": "last30d", "label": "Last 30 Days"}]}, {"name": "metric", "value": ["mem_total", "mem_buffers", "mem_cached", "mem_used", "mem_free"], "label": "Metric", "type": "select_multiple", "options": [{"value": "load_15", "label": "load_15"}, {"value": "load_5", "label": "load_5"}, {"value": "load_1", "label": "load_1"}, {"value": "task_total", "label": "task_total"}, {"value": "task_running", "label": "task_running"}, {"value": "task_sleep", "label": "task_sleep"}, {"value": "task_stopped", "label": "task_stopped"}, {"value": "task_zombie", "label": "task_zombie"}, {"value": "mem_total", "label": "mem_total"}, {"value": "mem_buffers", "label": "mem_buffers"}, {"value": "mem_cached", "label": "mem_cached"}, {"value": "mem_
used", "label": "mem_used"}, {"value": "mem_free", "label": "mem_free"}, {"value": "eth0_rxerrs", "label": "eth0_rxerrs"}, {"value": "eth0_rxbyts", "label": "eth0_rxbyts"}, {"value": "eth0_rxpcks", "label": "eth0_rxpcks"}, {"value": "eth0_rxdrops", "label": "eth0_rxdrops"}, {"value": "eth0_txerrs", "label": "eth0_txerrs"}, {"value": "eth0_txbyts", "label": "eth0_txbyts"}, {"value": "eth0_txpcks", "label": "eth0_txpcks"}, {"value": "eth0_txdrops", "label": "eth0_txdrops"}, {"value": "eth1_rxerrs", "label": "eth1_rxerrs"}, {"value": "eth1_rxbyts", "label": "eth1_rxbyts"}, {"value": "eth1_rxpcks", "label": "eth1_rxpcks"}, {"value": "eth1_rxdrops", "label": "eth1_rxdrops"}, {"value": "eth1_txerrs", "label": "eth1_txerrs"}, {"value": "eth1_txbyts", "label": "eth1_txbyts"}, {"value": "eth1_txpcks", "label": "eth1_txpcks"}, {"value": "eth1_txdrops", "label": "eth1_txdrops"}, {"value": "sda_rkbs", "label": "sda_rkbs"}, {"value": "sda_wkbs", "label": "sda_wkbs"}, {"value": "sdb_rkbs"
, "label": "sdb_rkbs"}, {"value": "sdb_wkbs", "label": "sdb_wkbs"}, {"value": "sdc_rkbs", "label": "sdc_rkbs"}, {"value": "sdc_wkbs", "label": "sdc_wkbs"}, {"value": "sdd_rkbs", "label": "sdd_rkbs"}, {"value": "sdd_wkbs", "label": "sdd_wkbs"}]}, {"name": "width", "value": "300", "label": "Width", "type": "select", "options": [{"value": "300", "label": "300"}, {"value": "400", "label": "400"}, {"value": "500", "label": "500"}, {"value": "600", "label": "600"}, {"value": "800", "label": "800"}, {"value": "1200", "label": "1200"}]}, {"name": "height", "value": "200", "label": "Height", "type": "select", "options": [{"value": "200", "label": "200"}, {"value": "400", "label": "400"}, {"value": "600", "label": "600"}, {"value": "1000", "label": "1000"}]}, {"name": "legend", "value": "on", "label": "Show Legends", "type": "radio", "options": [{"value": "on", "label": "On"}, {"value": "off", "label": "Off"}]}], "screendump": "/images/server_load.gif", "refresh": "15", "version": "0.
1"}, {"id": "cluster_metrics", "module": "iframe/jsp/single-series-chart-javascript.jsp", "title": "Cluster Metrics", "description": "Display cluster related stats", "categories": "System,Status", "parameters": [{"name": "table", "edit": "0", "value": "cluster_system_metrics", "type": "string"}, {"name": "period", "value": "", "label": "Period", "type": "select", "options": [{"value": "", "label": "Use Time Widget"}, {"value": "last1hr", "label": "Last 1 Hour"}, {"value": "last2hr", "label": "Last 2 Hours"}, {"value": "last3hr", "label": "Last 3 Hours"}, {"value": "last6hr", "label": "Last 6 Hours"}, {"value": "last12hr", "label": "Last 12 Hours"}, {"value": "last24hr", "label": "Last 24 Hours"}, {"value": "yesterday", "label": "Yesterday"}, {"value": "last7d", "label": "Last 7 Days"}, {"value": "last30d", "label": "Last 30 Days"}]}, {"name": "metric", "value": ["load_15", "load_5", "load_1"], "label": "Metric", "type": "select_multiple", "options": [{"value": "load_15", "la
bel": "load_15"}, {"value": "load_5", "label": "load_5"}, {"value": "load_1", "label": "load_1"}, {"value": "task_total", "label": "task_total"}, {"value": "task_running", "label": "task_running"}, {"value": "task_sleep", "label": "task_sleep"}, {"value": "task_stopped", "label": "task_stopped"}, {"value": "task_zombie", "label": "task_zombie"}, {"value": "mem_total", "label": "mem_total"}, {"value": "mem_buffers", "label": "mem_buffers"}, {"value": "mem_cached", "label": "mem_cached"}, {"value": "mem_used", "label": "mem_used"}, {"value": "mem_free", "label": "mem_free"}, {"value": "eth0_rxerrs", "label": "eth0_rxerrs"}, {"value": "eth0_rxbyts", "label": "eth0_rxbyts"}, {"value": "eth0_rxpcks", "label": "eth0_rxpcks"}, {"value": "eth0_rxdrops", "label": "eth0_rxdrops"}, {"value": "eth0_txerrs", "label": "eth0_txerrs"}, {"value": "eth0_txbyts", "label": "eth0_txbyts"}, {"value": "eth0_txpcks", "label": "eth0_txpcks"}, {"value": "eth0_txdrops", "label": "eth0_txdrops"}, {"val
ue": "eth1_rxerrs", "label": "eth1_rxerrs"}, {"value": "eth1_rxbyts", "label": "eth1_rxbyts"}, {"value": "eth1_rxpcks", "label": "eth1_rxpcks"}, {"value": "eth1_rxdrops", "label": "eth1_rxdrops"}, {"value": "eth1_txerrs", "label": "eth1_txerrs"}, {"value": "eth1_txbyts", "label": "eth1_txbyts"}, {"value": "eth1_txpcks", "label": "eth1_txpcks"}, {"value": "eth1_txdrops", "label": "eth1_txdrops"}, {"value": "sda_rkbs", "label": "sda_rkbs"}, {"value": "sda_wkbs", "label": "sda_wkbs"}, {"value": "sdb_rkbs", "label": "sdb_rkbs"}, {"value": "sdb_wkbs", "label": "sdb_wkbs"}, {"value": "sdc_rkbs", "label": "sdc_rkbs"}, {"value": "sdc_wkbs", "label": "sdc_wkbs"}, {"value": "sdd_rkbs", "label": "sdd_rkbs"}, {"value": "sdd_wkbs", "label": "sdd_wkbs"}]}, {"name": "width", "value": "300", "label": "Width", "type": "select", "options": [{"value": "300", "label": "300"}, {"value": "400", "label": "400"}, {"value": "500", "label": "500"}, {"value": "600", "label": "600"}, {"value": "800", "
label": "800"}, {"value": "1200", "label": "1200"}]}, {"name": "height", "value": "200", "label": "Height", "type": "select", "options": [{"value": "200", "label": "200"}, {"value": "400", "label": "400"}, {"value": "600", "label": "600"}, {"value": "1000", "label": "1000"}]}, {"name": "legend", "value": "on", "label": "Show Legends", "type": "radio", "options": [{"value": "on", "label": "On"}, {"value": "off", "label": "Off"}]}], "screendump": "/images/server_load.gif", "refresh": "15", "version": "0.1"}]], "colSize": [50, 49]}, {"title": "DFS Status", "columns": 2, "layout": [[{"id": "time", "module": "jsp/time.jsp", "title": "Time", "javascripts": "time.js", "description": "Global control to manipulate time across widgets", "categories": "Global,Utility", "parameters": [{"name": "time_zone", "callback": "/hicc/jsp/get_timezone_list.jsp", "value": "UTC", "label": "Time Zone", "type": "select_callback"}, {"name": "time_type", "value": "range", "label": "Style", "type": "sel
ect", "options": [{"value": "date", "label": "Date Picker"}, {"value": "range", "label": "Time Period"}, {"value": "slider", "label": "Slider"}]}], "refresh": "0", "version": "0.1"}, {"id": "dfs_fsnamesystem", "module": "iframe/jsp/single-series-chart-javascript.jsp", "title": "DFS FS Name System Metrics", "description": "Display File System Name System related stats", "categories": "Hadoop,Status", "parameters": [{"name": "table", "edit": "0", "value": "dfs_fsnamesystem", "type": "string"}, {"name": "period", "value": "", "label": "Period", "type": "select", "options": [{"value": "", "label": "Use Time Widget"}, {"value": "last1hr", "label": "Last 1 Hour"}, {"value": "last2hr", "label": "Last 2 Hours"}, {"value": "last3hr", "label": "Last 3 Hours"}, {"value": "last6hr", "label": "Last 6 Hours"}, {"value": "last12hr", "label": "Last 12 Hours"}, {"value": "last24hr", "label": "Last 24 Hours"}, {"value": "yesterday", "label": "Yesterday"}, {"value": "last7d", "label": "Last 7
Days"}, {"value": "last30d", "label": "Last 30 Days"}]}, {"name": "metric", "value": ["capacity_remaining_gb", "capacity_total_gb", "capacity_used_gb"], "label": "Metric", "type": "select_multiple", "options": [{"value": "blocks_total", "label": "blocks_total"}, {"value": "capacity_remaining_gb", "label": "capacity_remaining_gb"}, {"value": "capacity_total_gb", "label": "capacity_total_gb"}, {"value": "capacity_used_gb", "label": "capacity_used_gb"}, {"value": "files_total", "label": "files_total"}, {"value": "pending_replication_blocks", "label": "pending_replication_blocks"}, {"value": "scheduled_replication_blocks", "label": "scheduled_replication_blocks"}, {"value": "total_load", "label": "total_load"}, {"value": "under_replicated_blocks", "label": "under_replicated_blocks"}]}, {"name": "width", "value": "300", "label": "Width", "type": "select", "options": [{"value": "300", "label": "300"}, {"value": "400", "label": "400"}, {"value": "500", "label": "500"}, {"value": "6
00", "label": "600"}, {"value": "800", "label": "800"}, {"value": "1200", "label": "1200"}]}, {"name": "height", "value": "200", "label": "Height", "type": "select", "options": [{"value": "200", "label": "200"}, {"value": "400", "label": "400"}, {"value": "600", "label": "600"}, {"value": "1000", "label": "1000"}]}, {"name": "legend", "value": "on", "label": "Show Legends", "type": "radio", "options": [{"value": "on", "label": "On"}, {"value": "off", "label": "Off"}]}], "screendump": "/images/server_load.gif", "refresh": "15", "version": "0.1"}, {"id": "dfs_namenode", "module": "iframe/jsp/single-series-chart-javascript.jsp", "title": "DFS Name Node Metrics", "description": "Display system related stats", "categories": "Hadoop,Status", "parameters": [{"name": "find_slope", "edit": "0", "value": "true", "type": "string"}, {"name": "table", "edit": "0", "value": "dfs_namenode", "type": "string"}, {"name": "period", "value": "", "label": "Period", "type": "select", "options": [
{"value": "", "label": "Use Time Widget"}, {"value": "last1hr", "label": "Last 1 Hour"}, {"value": "last2hr", "label": "Last 2 Hours"}, {"value": "last3hr", "label": "Last 3 Hours"}, {"value": "last6hr", "label": "Last 6 Hours"}, {"value": "last12hr", "label": "Last 12 Hours"}, {"value": "last24hr", "label": "Last 24 Hours"}, {"value": "yesterday", "label": "Yesterday"}, {"value": "last7d", "label": "Last 7 Days"}, {"value": "last30d", "label": "Last 30 Days"}]}, {"name": "metric", "value": ["files_created", "files_renamed", "files_deleted"], "label": "Metric", "type": "select_multiple", "options": [{"value": "add_block_ops", "label": "add_block_ops"}, {"value": "blocks_corrupted", "label": "blocks_corrupted"}, {"value": "create_file_ops", "label": "create_file_ops"}, {"value": "delete_file_ops", "label": "delete_file_ops"}, {"value": "files_created", "label": "files_created"}, {"value": "files_renamed", "label": "files_renamed"}, {"value": "files_deleted", "label": "files_d
eleted"}, {"value": "get_block_locations", "label": "get_block_locations"}, {"value": "get_listing_ops", "label": "get_listing_ops"}, {"value": "safe_mode_time", "label": "safe_mode_time"}, {"value": "syncs_avg_time", "label": "syncs_avg_time"}, {"value": "syncs_num_ops", "label": "syncs_num_ops"}, {"value": "transactions_avg_time", "label": "transactions_avg_time"}, {"value": "transactions_num_ops", "label": "transactions_num_ops"}, {"value": "block_report_avg_time", "label": "block_report_avg_time"}, {"value": "block_report_num_ops", "label": "block_report_num_ops"}, {"value": "fs_image_load_time", "label": "fs_image_load_time"}]}, {"name": "legend", "value": "on", "label": "Show Legends", "type": "radio", "options": [{"value": "on", "label": "On"}, {"value": "off", "label": "Off"}]}], "screendump": "/images/server_load.gif", "refresh": "15", "version": "0.1"}], [{"parameters": [], "title": "Cluster Selector", "description": "Global control to manipulate cluster selection
across widgets", "categories": "Global,Utility", "screendump": "", "refresh": "0", "module": "jsp/cluster_selector.jsp", "id": "cluster_selector", "version": "0.1"}, {"id": "dfs_throughput", "module": "iframe/jsp/single-series-chart-javascript.jsp", "title": "DFS Throughput Metrics", "description": "Display DFS throughput stats", "categories": "Hadoop,Status", "parameters": [{"name": "table", "edit": "0", "value": "dfs_throughput", "type": "string"}, {"name": "find_slope", "edit": "0", "value": "true", "type": "string"}, {"name": "period", "value": "", "label": "Period", "type": "select", "options": [{"value": "", "label": "Use Time Widget"}, {"value": "last1hr", "label": "Last 1 Hour"}, {"value": "last2hr", "label": "Last 2 Hours"}, {"value": "last3hr", "label": "Last 3 Hours"}, {"value": "last6hr", "label": "Last 6 Hours"}, {"value": "last12hr", "label": "Last 12 Hours"}, {"value": "last24hr", "label": "Last 24 Hours"}, {"value": "yesterday", "label": "Yesterday"}, {"value
": "last7d", "label": "Last 7 Days"}, {"value": "last30d", "label": "Last 30 Days"}]}, {"name": "metric", "value": ["bytes_read", "bytes_written"], "label": "Metric", "type": "select_multiple", "options": [{"value": "hosts", "label": "hosts"}, {"value": "block_reports_avg_time", "label": "block_reports_avg_time"}, {"value": "block_reports_num_ops", "label": "block_reports_num_ops"}, {"value": "block_verification_failures", "label": "block_verification_failures"}, {"value": "blocks_read", "label": "blocks_read"}, {"value": "blocks_removed", "label": "blocks_removed"}, {"value": "blocks_replicated", "label": "blocks_replicated"}, {"value": "blocks_verified", "label": "blocks_verified"}, {"value": "blocks_written", "label": "blocks_written"}, {"value": "bytes_read", "label": "bytes_read"}, {"value": "bytes_written", "label": "bytes_written"}, {"value": "copy_block_op_avg_time", "label": "copy_block_op_avg_time"}, {"value": "copy_block_op_num_ops", "label": "copy_block_op_num_op
s"}, {"value": "heart_beats_avg_time", "label": "heart_beats_avg_time"}, {"value": "heart_beats_num_ops", "label": "heart_beats_num_ops"}, {"value": "read_block_op_avg_time", "label": "read_block_op_avg_time"}, {"value": "read_block_op_num_ops", "label": "read_block_op_num_ops"}, {"value": "read_metadata_op_avg_time", "label": "read_metadata_op_avg_time"}, {"value": "read_metadata_op_num_ops", "label": "read_metadata_op_num_ops"}, {"value": "reads_from_local_client", "label": "reads_from_local_client"}, {"value": "reads_from_remote_client", "label": "reads_from_remote_client"}, {"value": "replace_block_op_avg_time", "label": "replace_block_op_avg_time"}, {"value": "replace_block_op_num_ops", "label": "replace_block_op_num_ops"}, {"value": "write_block_op_avg_time", "label": "write_block_op_avg_time"}, {"value": "write_block_op_num_ops", "label": "write_block_op_num_ops"}, {"value": "writes_from_local_client", "label": "writes_from_local_client"}, {"value": "writes_from_remot
e_client", "label": "writes_from_remote_client"}]}, {"name": "legend", "value": "on", "label": "Show Legends", "type": "radio", "options": [{"value": "on", "label": "On"}, {"value": "off", "label": "Off"}]}], "screendump": "/images/server_load.gif", "refresh": "15", "version": "0.1"}, {"id": "dfs_datanode", "module": "iframe/jsp/single-series-chart-javascript.jsp", "title": "DFS Data Node Metrics", "description": "Display DFS data node related stats", "categories": "Hadoop,Status", "parameters": [{"name": "table", "edit": "0", "value": "dfs_datanode", "type": "string"}, {"name": "normalize_time", "edit": "0", "value": "true", "type": "string"}, {"name": "find_slope", "edit": "0", "value": "true", "type": "string"}, {"name": "group_items", "edit": "0", "value": "hosts", "type": "string"}, {"name": "group", "edit": "0", "value": "host", "type": "string"}, {"name": "period", "value": "", "label": "Period", "type": "select", "options": [{"value": "", "label": "Use Time Widget"},
{"value": "last1hr", "label": "Last 1 Hour"}, {"value": "last2hr", "label": "Last 2 Hours"}, {"value": "last3hr", "label": "Last 3 Hours"}, {"value": "last6hr", "label": "Last 6 Hours"}, {"value": "last12hr", "label": "Last 12 Hours"}, {"value": "last24hr", "label": "Last 24 Hours"}, {"value": "yesterday", "label": "Yesterday"}, {"value": "last7d", "label": "Last 7 Days"}, {"value": "last30d", "label": "Last 30 Days"}]}, {"name": "metric", "value": "bytes_read", "label": "Metric", "type": "select", "options": [{"value": "block_reports_avg_time", "label": "block_reports_avg_time"}, {"value": "block_reports_num_ops", "label": "block_reports_num_ops"}, {"value": "block_verification_failures", "label": "block_verification_failures"}, {"value": "blocks_read", "label": "blocks_read"}, {"value": "blocks_removed", "label": "blocks_removed"}, {"value": "blocks_replicated", "label": "blocks_replicated"}, {"value": "blocks_verified", "label": "blocks_verified"}, {"value": "blocks_writ
ten", "label": "blocks_written"}, {"value": "bytes_read", "label": "bytes_read"}, {"value": "bytes_written", "label": "bytes_written"}, {"value": "copy_block_op_avg_time", "label": "copy_block_op_avg_time"}, {"value": "copy_block_op_num_ops", "label": "copy_block_op_num_ops"}, {"value": "heart_beats_avg_time", "label": "heart_beats_avg_time"}, {"value": "heart_beats_num_ops", "label": "heart_beats_num_ops"}, {"value": "read_block_op_avg_time", "label": "read_block_op_avg_time"}, {"value": "read_block_op_num_ops", "label": "read_block_op_num_ops"}, {"value": "read_metadata_op_avg_time", "label": "read_metadata_op_avg_time"}, {"value": "read_metadata_op_num_ops", "label": "read_metadata_op_num_ops"}, {"value": "reads_from_local_client", "label": "reads_from_local_client"}, {"value": "reads_from_remote_client", "label": "reads_from_remote_client"}, {"value": "replace_block_op_avg_time", "label": "replace_block_op_avg_time"}, {"value": "replace_block_op_num_ops", "label": "repla
ce_block_op_num_ops"}, {"value": "write_block_op_avg_time", "label": "write_block_op_avg_time"}, {"value": "write_block_op_num_ops", "label": "write_block_op_num_ops"}, {"value": "writes_from_local_client", "label": "writes_from_local_client"}, {"value": "writes_from_remote_client", "label": "writes_from_remote_client"}]}, {"name": "width", "value": "300", "label": "Width", "type": "select", "options": [{"value": "300", "label": "300"}, {"value": "400", "label": "400"}, {"value": "500", "label": "500"}, {"value": "600", "label": "600"}, {"value": "800", "label": "800"}, {"value": "1200", "label": "1200"}]}, {"name": "height", "value": "200", "label": "Height", "type": "select", "options": [{"value": "200", "label": "200"}, {"value": "400", "label": "400"}, {"value": "600", "label": "600"}, {"value": "1000", "label": "1000"}]}, {"name": "legend", "value": "on", "label": "Show Legends", "type": "radio", "options": [{"value": "on", "label": "On"}, {"value": "off", "label": "Off
"}]}], "screendump": "/images/server_load.gif", "refresh": "15", "version": "0.1"}]], "colSize": [52, 47]}]}
\ No newline at end of file
Added: hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/views/newview.tpl
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/views/newview.tpl?rev=723855&view=auto
==============================================================================
--- hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/views/newview.tpl (added)
+++ hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/views/newview.tpl Fri Dec 5 12:30:14 2008
@@ -0,0 +1 @@
+{"pages_count":1,"description":"New View","pages":[{"title":"Default Page","columns":1,"layout":[[{"module":"welcome.html","version":"1.0","parameters":[],"refresh":"0","title":"Default Widget","id":"defaultwidget"}]],"colSize":[99]}]}
Added: hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/views/view.permission
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/views/view.permission?rev=723855&view=auto
==============================================================================
--- hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/views/view.permission (added)
+++ hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/views/view.permission Fri Dec 5 12:30:14 2008
@@ -0,0 +1 @@
+{"default":{"all":{"read":"1","modify":"1"}}}
Added: hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/views/workspace_view_list.cache
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/views/workspace_view_list.cache?rev=723855&view=auto
==============================================================================
--- hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/views/workspace_view_list.cache (added)
+++ hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/views/workspace_view_list.cache Fri Dec 5 12:30:14 2008
@@ -0,0 +1 @@
+[{"description":"Default view","owner":"","permission":{"all":{"modify":1,"read":1}},"key":"default"}]
\ No newline at end of file
Added: hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/welcome.html
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/welcome.html?rev=723855&view=auto
==============================================================================
--- hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/welcome.html (added)
+++ hadoop/core/trunk/src/contrib/chukwa/src/web/hicc/welcome.html Fri Dec 5 12:30:14 2008
@@ -0,0 +1 @@
+Welcome to Hadoop Infrastructure Care Center.
Modified: hadoop/core/trunk/src/contrib/chukwa/tools/expire.sh
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/chukwa/tools/expire.sh?rev=723855&r1=723854&r2=723855&view=diff
==============================================================================
--- hadoop/core/trunk/src/contrib/chukwa/tools/expire.sh (original)
+++ hadoop/core/trunk/src/contrib/chukwa/tools/expire.sh Fri Dec 5 12:30:14 2008
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
Added: hadoop/core/trunk/src/contrib/chukwa/tools/init.d/chukwa-agent
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/chukwa/tools/init.d/chukwa-agent?rev=723855&view=auto
==============================================================================
--- hadoop/core/trunk/src/contrib/chukwa/tools/init.d/chukwa-agent (added)
+++ hadoop/core/trunk/src/contrib/chukwa/tools/init.d/chukwa-agent Fri Dec 5 12:30:14 2008
@@ -0,0 +1,96 @@
+#!/bin/bash
+
+# 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.
+
+# chkconfig: - 90 89
+
+if [ -f /etc/init.d/functions ] ; then
+ . /etc/init.d/functions
+elif [ -f /etc/rc.d/init.d/functions ] ; then
+ . /etc/rc.d/init.d/functions
+else
+ exit 0
+fi
+
+DAEMON=agent.sh
+
+prog=chukwa-agent
+
+config () {
+ if [ -f /grid/0/chukwa/bin/chukwa-daemon.sh ]; then
+ CHUKWA_HOME=/grid/0/chukwa
+ else
+ CHUKWA_HOME=/usr/local/chukwa
+ fi
+}
+
+start () {
+ echo -n $"Starting $prog: "
+ config
+ # start daemon
+ sudo -u gmon ${CHUKWA_HOME}/bin/chukwa-daemon.sh --watchdog start agent.sh
+ RETVAL=$?
+ echo
+ [ $RETVAL = 0 ] && touch /var/lock/subsys/$prog
+ return $RETVAL
+}
+
+stop () {
+ # stop daemon
+ echo -n $"Stopping $prog: "
+ config
+ sudo -u gmon ${CHUKWA_HOME}/bin/chukwa-daemon.sh --watchdog stop agent.sh
+ RETVAL=$?
+ echo
+ [ $RETVAL = 0 ] && rm -f /var/lock/subsys/$prog
+}
+
+restart() {
+ stop
+ sleep 5
+ start
+}
+
+case $1 in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ restart
+ ;;
+ condrestart)
+ [ -f /var/lock/subsys/$prog ] && restart || :
+ ;;
+ reload)
+ echo -n $"Reloading $prog: "
+ config
+ echo "reloadCollectors" | nc localhost 9093 & kill -1
+ RETVAL=$?
+ ;;
+ status)
+ status $DAEMON
+ ;;
+ *)
+
+ echo $"Usage: $prog {start|stop|restart|condrestart|reload|status}"
+ exit 1
+esac
+
+exit $RETVAL
+
Added: hadoop/core/trunk/src/contrib/chukwa/tools/init.d/chukwa-collector
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/chukwa/tools/init.d/chukwa-collector?rev=723855&view=auto
==============================================================================
--- hadoop/core/trunk/src/contrib/chukwa/tools/init.d/chukwa-collector (added)
+++ hadoop/core/trunk/src/contrib/chukwa/tools/init.d/chukwa-collector Fri Dec 5 12:30:14 2008
@@ -0,0 +1,96 @@
+#!/bin/bash
+
+# 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.
+
+# chkconfig: - 90 91
+
+if [ -f /etc/init.d/functions ] ; then
+ . /etc/init.d/functions
+elif [ -f /etc/rc.d/init.d/functions ] ; then
+ . /etc/rc.d/init.d/functions
+else
+ exit 0
+fi
+
+DAEMON=jettyCollector.sh
+
+prog=chukwa-collector
+
+config () {
+ if [ -f /grid/0/chukwa/bin/chukwa-daemon.sh ]; then
+ CHUKWA_HOME=/grid/0/chukwa
+ else
+ CHUKWA_HOME=/usr/local/chukwa
+ fi
+}
+
+start () {
+ echo -n $"Starting $prog: "
+ config
+ # start daemon
+ sudo -u gmon ${CHUKWA_HOME}/bin/chukwa-daemon.sh --watchdog start jettyCollector.sh
+ RETVAL=$?
+ echo
+ [ $RETVAL = 0 ] && touch /var/lock/subsys/$prog
+ return $RETVAL
+}
+
+stop () {
+ # stop daemon
+ config
+ echo -n $"Stopping $prog: "
+ sudo -u gmon ${CHUKWA_HOME}/bin/chukwa-daemon.sh --watchdog stop jettyCollector.sh
+ RETVAL=$?
+ echo
+ [ $RETVAL = 0 ] && rm -f /var/lock/subsys/$prog
+}
+
+restart() {
+ stop
+ sleep 5
+ start
+}
+
+case $1 in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ restart
+ ;;
+ condrestart)
+ [ -f /var/lock/subsys/$prog ] && restart || :
+ ;;
+ status)
+ ps ax | grep $DAEMON | grep -v grep >&/dev/null
+ RETVAL=$?
+ if [ "x$RETVAL" == "x0" ]; then
+ echo "$DAEMON is running..."
+ else
+ echo "$DAEMON is stopped"
+ fi
+ ;;
+ *)
+
+ echo $"Usage: $prog {start|stop|restart|condrestart|status}"
+ exit 1
+esac
+
+exit $RETVAL
+
Added: hadoop/core/trunk/src/contrib/chukwa/tools/init.d/chukwa-data-processors
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/chukwa/tools/init.d/chukwa-data-processors?rev=723855&view=auto
==============================================================================
--- hadoop/core/trunk/src/contrib/chukwa/tools/init.d/chukwa-data-processors (added)
+++ hadoop/core/trunk/src/contrib/chukwa/tools/init.d/chukwa-data-processors Fri Dec 5 12:30:14 2008
@@ -0,0 +1,88 @@
+#!/bin/bash
+
+# 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.
+
+# chkconfig: - 90 92
+
+if [ -f /etc/init.d/functions ] ; then
+ . /etc/init.d/functions
+elif [ -f /etc/rc.d/init.d/functions ] ; then
+ . /etc/rc.d/init.d/functions
+else
+ exit 0
+fi
+
+prog=chukwa-data-processors
+
+config () {
+ if [ -f /grid/0/chukwa/bin/chukwa-daemon.sh ]; then
+ CHUKWA_HOME=/grid/0/chukwa
+ else
+ CHUKWA_HOME=/usr/local/chukwa
+ fi
+}
+
+start () {
+ echo -n $"Starting $prog: "
+ config
+ # start daemon
+ sudo -u gmon ${CHUKWA_HOME}/bin/start-data-processors.sh
+ RETVAL=$?
+ echo
+ [ $RETVAL = 0 ] && touch /var/lock/subsys/$prog
+ return $RETVAL
+}
+
+stop () {
+ # stop daemon
+ echo -n $"Stopping $prog: "
+ config
+ sudo -u gmon ${CHUKWA_HOME}/bin/stop-data-processors.sh
+ RETVAL=$?
+ echo
+ [ $RETVAL = 0 ] && rm -f /var/lock/subsys/$prog
+}
+
+restart() {
+ stop
+ sleep 5
+ start
+}
+
+case $1 in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ restart
+ ;;
+ condrestart)
+ [ -f /var/lock/subsys/$prog ] && restart || :
+ ;;
+ status)
+ status $DAEMON
+ ;;
+ *)
+
+ echo $"Usage: $prog {start|stop|restart|condrestart|status}"
+ exit 1
+esac
+
+exit $RETVAL
+
Added: hadoop/core/trunk/src/contrib/chukwa/tools/init.d/chukwa-system-metrics
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/chukwa/tools/init.d/chukwa-system-metrics?rev=723855&view=auto
==============================================================================
--- hadoop/core/trunk/src/contrib/chukwa/tools/init.d/chukwa-system-metrics (added)
+++ hadoop/core/trunk/src/contrib/chukwa/tools/init.d/chukwa-system-metrics Fri Dec 5 12:30:14 2008
@@ -0,0 +1,96 @@
+#!/bin/bash
+
+# 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.
+
+# chkconfig: - 90 90
+
+if [ -f /etc/init.d/functions ] ; then
+ . /etc/init.d/functions
+elif [ -f /etc/rc.d/init.d/functions ] ; then
+ . /etc/rc.d/init.d/functions
+else
+ exit 0
+fi
+
+DAEMON=systemDataLoader.sh
+
+prog=chukwa-system-metrics
+
+config () {
+ if [ -f /grid/0/chukwa/bin/chukwa-daemon.sh ]; then
+ CHUKWA_HOME=/grid/0/chukwa
+ else
+ CHUKWA_HOME=/usr/local/chukwa
+ fi
+}
+
+start () {
+ echo -n $"Starting $prog: "
+ config
+ # start daemon
+ sudo -u gmon ${CHUKWA_HOME}/bin/chukwa-daemon.sh start systemDataLoader.sh
+ RETVAL=$?
+ echo
+ [ $RETVAL = 0 ] && touch /var/lock/subsys/$prog
+ return $RETVAL
+}
+
+stop () {
+ # stop daemon
+ echo -n $"Stopping $prog: "
+ config
+ sudo -u gmon ${CHUKWA_HOME}/bin/chukwa-daemon.sh stop systemDataLoader.sh
+ RETVAL=$?
+ echo
+ [ $RETVAL = 0 ] && rm -f /var/lock/subsys/$prog
+}
+
+restart() {
+ stop
+ sleep 5
+ start
+}
+
+case $1 in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ restart
+ ;;
+ condrestart)
+ [ -f /var/lock/subsys/$prog ] && restart || :
+ ;;
+ status)
+ ps ax | grep $DAEMON | grep -v grep >&/dev/null
+ RETVAL=$?
+ if [ "x$RETVAL" == "x0" ]; then
+ echo "$DAEMON is running..."
+ else
+ echo "$DAEMON is stopped"
+ fi
+ ;;
+ *)
+
+ echo $"Usage: $prog {start|stop|restart|condrestart|status}"
+ exit 1
+esac
+
+exit $RETVAL
+
Added: hadoop/core/trunk/src/contrib/chukwa/tools/packetcapture.sh
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/chukwa/tools/packetcapture.sh?rev=723855&view=auto
==============================================================================
--- hadoop/core/trunk/src/contrib/chukwa/tools/packetcapture.sh (added)
+++ hadoop/core/trunk/src/contrib/chukwa/tools/packetcapture.sh Fri Dec 5 12:30:14 2008
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+CAPTURETIME=30 #seconds
+OUTFILE=/scratch/packets
+echo "capturing $CAPTURETIME seconds of traffic"
+sudo tcpdump -w $OUTFILE &
+sleep $CAPTURETIME
+kill $!
+echo -n "done capturing; output size in bytes: "
+wc -c $OUTFILE | grep -o '[0-9]*'
+sleep 2
+/usr/sbin/tcpdump -r $OUTFILE | wc -c
+#do chukwa collection here
+
+echo ""
Added: hadoop/core/trunk/src/contrib/chukwa/tools/startpacketcapture.sh
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/chukwa/tools/startpacketcapture.sh?rev=723855&view=auto
==============================================================================
--- hadoop/core/trunk/src/contrib/chukwa/tools/startpacketcapture.sh (added)
+++ hadoop/core/trunk/src/contrib/chukwa/tools/startpacketcapture.sh Fri Dec 5 12:30:14 2008
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+OUTFILE=/scratch/packets
+rm -f $OUTFILE
+sudo tcpdump -w $OUTFILE &
+CAPTUREPID=$!
+echo $CAPTUREPID > /var/tmp/packetcapturepid
+chmod 644 /var/tmp/packetcapturepid #to avoid stop being a huge security hole
+echo "capture process has PID $CAPTUREPID"
Added: hadoop/core/trunk/src/contrib/chukwa/tools/stoppacketcapture.sh
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/chukwa/tools/stoppacketcapture.sh?rev=723855&view=auto
==============================================================================
--- hadoop/core/trunk/src/contrib/chukwa/tools/stoppacketcapture.sh (added)
+++ hadoop/core/trunk/src/contrib/chukwa/tools/stoppacketcapture.sh Fri Dec 5 12:30:14 2008
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+
+OUTFILE=/scratch/packets
+CAPTUREPID=`cat /var/tmp/packetcapturepid`
+TMPPARSED=/scratch/parsedpackets
+echo "capture running as process $CAPTUREPID"
+sudo kill $CAPTUREPID
+rm /var/tmp/packetcapturepid
+/usr/sbin/tcpdump -vr $OUTFILE >$TMPPARSED
+nc localhost 9093 <<HERE
+add org.apache.hadoop.chukwa.datacollection.adaptor.filetailer.CharFileTailingAdaptorUTF8 TcpDumpV 0 $TMPPARSED 0
+close
+HERE
+