From chukwa-commits-return-martinezgary@example.org Sat Dec 04 22:30:12 2010 Return-Path: <chukwa-commits-return-martinezgary@example.org> Delivered-To: martinezgary@example.org Received: (qmail 89053 invoked from network); 4 Dec 2010 22:30:12 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 4 Dec 2010 22:30:12 -0000 Received: (qmail 5716 invoked by uid 500); 4 Dec 2010 22:30:12 -0000 Delivered-To: martinezgary@example.org Received: (qmail 5696 invoked by uid 500); 4 Dec 2010 22:30:12 -0000 Mailing-List: contact martinezgary@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:martinezgary@example.org> List-Unsubscribe: <mailto:martinezgary@example.org> List-Post: <mailto:martinezgary@example.org> List-Id: <chukwa-commits.incubator.apache.org> Reply-To: martinezgary@example.org Delivered-To: mailing list martinezgary@example.org Received: (qmail 5688 invoked by uid 99); 4 Dec 2010 22:30:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Dec 2010 22:30:11 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Dec 2010 22:30:06 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 149452388A38; Sat, 4 Dec 2010 22:29:44 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1042251 - in /incubator/chukwa/trunk: ./ ivy/ src/java/org/apache/hadoop/chukwa/datastore/ src/java/org/apache/hadoop/chukwa/hicc/rest/ src/java/org/apache/hadoop/chukwa/inputtools/log4j/ src/java/org/apache/hadoop/chukwa/rest/actions/ src... Date: Sat, 04 Dec 2010 22:29:43 -0000 To: martinezgary@example.org From: martinezgary@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <martinezgary@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: eyang Date: Sat Dec 4 22:29:42 2010 New Revision: 1042251 URL: http://svn.apache.org/viewvc?rev=1042251&view=rev Log: CHUKWA-474. Replaced JSON library with JSON-Simple. (Eric Yang) Removed: incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/rest/actions/ incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/rest/objects/ incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/rest/services/ incubator/chukwa/trunk/src/test/org/apache/hadoop/chukwa/rest/DatabaseRestServerSetup.java incubator/chukwa/trunk/src/test/org/apache/hadoop/chukwa/rest/TestDatabaseClientTraceTest.java incubator/chukwa/trunk/src/test/org/apache/hadoop/chukwa/rest/TestDatabaseClusterDiskTest.java incubator/chukwa/trunk/src/test/org/apache/hadoop/chukwa/rest/TestDatabaseClusterHadoopRpcTest.java incubator/chukwa/trunk/src/test/org/apache/hadoop/chukwa/rest/TestDatabaseDfsDataNodeTest.java incubator/chukwa/trunk/src/test/org/apache/hadoop/chukwa/rest/TestDatabaseDfsFsNameSystemTest.java incubator/chukwa/trunk/src/test/org/apache/hadoop/chukwa/rest/TestDatabaseDfsNameNodeTest.java incubator/chukwa/trunk/src/test/org/apache/hadoop/chukwa/rest/TestDatabaseDfsThroughputTest.java incubator/chukwa/trunk/src/test/org/apache/hadoop/chukwa/rest/TestDatabaseDiskTest.java incubator/chukwa/trunk/src/test/org/apache/hadoop/chukwa/rest/TestDatabaseHadoopJvmTest.java incubator/chukwa/trunk/src/test/org/apache/hadoop/chukwa/rest/TestDatabaseHadoopRpcTest.java incubator/chukwa/trunk/src/test/org/apache/hadoop/chukwa/rest/TestDatabaseMrJobConfTest.java incubator/chukwa/trunk/src/test/org/apache/hadoop/chukwa/rest/TestDatabaseMrJobTest.java incubator/chukwa/trunk/src/test/org/apache/hadoop/chukwa/rest/TestDatabaseMrTaskTest.java incubator/chukwa/trunk/src/test/org/apache/hadoop/chukwa/rest/TestDatabaseSystemMetricsTest.java Modified: incubator/chukwa/trunk/ivy.xml incubator/chukwa/trunk/ivy/ivysettings.xml incubator/chukwa/trunk/ivy/libraries.properties incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datastore/UserStore.java incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datastore/ViewStore.java incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datastore/WidgetStore.java incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/hicc/rest/MetricsController.java incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/inputtools/log4j/Log4JMetricsContext.java incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/rest/bean/ColumnBean.java incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/rest/bean/ConfigBean.java incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/rest/bean/OptionBean.java incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/rest/bean/PagesBean.java incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/rest/bean/ParametersBean.java incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/rest/bean/UserBean.java incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/rest/bean/ViewBean.java incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/rest/bean/WidgetBean.java incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/rest/resource/ViewResource.java incubator/chukwa/trunk/src/test/org/apache/hadoop/chukwa/database/TestDatabaseWebJson.java incubator/chukwa/trunk/src/test/org/apache/hadoop/chukwa/rest/resource/TestUserResource.java Modified: incubator/chukwa/trunk/ivy.xml URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/ivy.xml?rev=1042251&r1=1042250&r2=1042251&view=diff ============================================================================== --- incubator/chukwa/trunk/ivy.xml (original) +++ incubator/chukwa/trunk/ivy.xml Sat Dec 4 22:29:42 2010 @@ -61,6 +61,10 @@ name="hadoop-test" rev="${hadoop.version}" conf="common->master"/> + <dependency org="com.googlecode.json-simple" + name="json-simple" + rev="${json-simple.version}" + conf="common->master"/> <!-- <dependency org="org.apache.hbase" name="hbase" rev="${hbase.version}" Modified: incubator/chukwa/trunk/ivy/ivysettings.xml URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/ivy/ivysettings.xml?rev=1042251&r1=1042250&r2=1042251&view=diff ============================================================================== --- incubator/chukwa/trunk/ivy/ivysettings.xml (original) +++ incubator/chukwa/trunk/ivy/ivysettings.xml Sat Dec 4 22:29:42 2010 @@ -45,6 +45,12 @@ <property name="google.com" value="http://google-maven-repository.googlecode.com/svn/repository/" override="false"/> + <property name="googlecode" + value="http://mirrors.ibiblio.org/pub/mirrors/maven2/" + override="false"/> + <property name="jboss.org" + value="http://repository.jboss.org/maven2/" + override="false"/> <property name="maven2.pattern" value="[organisation]/[module]/[revision]/[module]-[revision]"/> <property name="maven2.pattern.ext" @@ -82,6 +88,14 @@ root="${google.com}" m2compatible="true" /> + <ibiblio name="googlecode" + root="${googlecode}" + m2compatible="true" + /> + <ibiblio name="jboss" + root="${jboss.org}" + m2compatible="true" + /> <chain name="default" dual="true"> <resolver ref="local"/> <resolver ref="apache"/> @@ -89,6 +103,8 @@ <resolver ref="facebook"/> <resolver ref="ibiblio"/> <resolver ref="google"/> + <resolver ref="googlecode"/> + <resolver ref="jboss"/> </chain> <chain name="internal"> <resolver ref="local"/> @@ -98,6 +114,8 @@ <resolver ref="maven2"/> <resolver ref="facebook"/> <resolver ref="google"/> + <resolver ref="googlecode"/> + <resolver ref="jboss"/> </chain> <chain name="external-and-snapshots"> <resolver ref="maven2"/> Modified: incubator/chukwa/trunk/ivy/libraries.properties URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/ivy/libraries.properties?rev=1042251&r1=1042250&r2=1042251&view=diff ============================================================================== --- incubator/chukwa/trunk/ivy/libraries.properties (original) +++ incubator/chukwa/trunk/ivy/libraries.properties Sat Dec 4 22:29:42 2010 @@ -50,9 +50,10 @@ jdiff.version=1.0.9 xmlenc.version=0.52 xerces.version=1.4.4 #jaxb.version=2.1.12 -hbase.version=0.89.0-SNAPSHOT +hbase.version=0.21.0-SNAPSHOT thrift.version=0.2.0 zookeeper.version=3.2.2 jersey.version=83.161.120.155 guava.version=r05 #avro.version=1.3.2 +json-simple.version=1.1 Modified: incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datastore/UserStore.java URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datastore/UserStore.java?rev=1042251&r1=1042250&r2=1042251&view=diff ============================================================================== --- incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datastore/UserStore.java (original) +++ incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datastore/UserStore.java Sat Dec 4 22:29:42 2010 @@ -23,8 +23,9 @@ import java.io.IOException; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.json.JSONArray; -import org.json.JSONObject; +import org.json.simple.JSONArray; +import org.json.simple.JSONObject; +import org.json.simple.JSONValue; import org.apache.hadoop.chukwa.conf.ChukwaConfiguration; import org.apache.hadoop.chukwa.hicc.HiccWebServer; @@ -72,7 +73,7 @@ public class UserStore { viewStream.readFully(buffer); viewStream.close(); try { - JSONObject json = new JSONObject(new String(buffer)); + JSONObject json = (JSONObject) JSONValue.parse(new String(buffer)); profile = new UserBean(json); } catch (Exception e) { log.error(ExceptionUtil.getStackTrace(e)); @@ -137,8 +138,8 @@ public class UserStore { profileStream.readFully(buffer); profileStream.close(); try { - UserBean user = new UserBean(new JSONObject(new String(buffer))); - list.put(user.getId()); + UserBean user = new UserBean((JSONObject) JSONValue.parse(new String(buffer))); + list.add(user.getId()); } catch (Exception e) { log.error(ExceptionUtil.getStackTrace(e)); } Modified: incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datastore/ViewStore.java URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datastore/ViewStore.java?rev=1042251&r1=1042250&r2=1042251&view=diff ============================================================================== --- incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datastore/ViewStore.java (original) +++ incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datastore/ViewStore.java Sat Dec 4 22:29:42 2010 @@ -20,11 +20,12 @@ package org.apache.hadoop.chukwa.datasto import java.io.File; import java.io.IOException; +import java.util.LinkedHashMap; +import java.util.Map; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.json.JSONArray; -import org.json.JSONObject; + import org.apache.hadoop.chukwa.conf.ChukwaConfiguration; import org.apache.hadoop.chukwa.hicc.HiccWebServer; @@ -36,6 +37,10 @@ import org.apache.hadoop.fs.FSDataOutput import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; +import org.json.simple.JSONArray; +import org.json.simple.JSONObject; +import org.json.simple.JSONValue; +import org.json.simple.parser.JSONParser; public class ViewStore { private String vid = null; @@ -87,7 +92,7 @@ public class ViewStore { viewStream.readFully(buffer); viewStream.close(); try { - view = new ViewBean(new JSONObject(new String(buffer))); + view = new ViewBean(buffer); view.update(); } catch (Exception e) { log.error(ExceptionUtil.getStackTrace(e)); @@ -217,8 +222,8 @@ public class ViewStore { viewStream.readFully(buffer); viewStream.close(); try { - ViewBean view = new ViewBean(new JSONObject(new String(buffer))); - JSONObject json = new JSONObject(); + ViewBean view = new ViewBean(buffer); + Map<String, String> json=new LinkedHashMap<String, String>(); json.put("name", view.getName()); json.put("type", view.getPermissionType()); json.put("owner", view.getOwner()); @@ -227,7 +232,7 @@ public class ViewStore { } else { json.put("editable","false"); } - list.put(json); + list.add(json); } catch (Exception e) { log.error(ExceptionUtil.getStackTrace(e)); } Modified: incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datastore/WidgetStore.java URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datastore/WidgetStore.java?rev=1042251&r1=1042250&r2=1042251&view=diff ============================================================================== --- incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datastore/WidgetStore.java (original) +++ incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datastore/WidgetStore.java Sat Dec 4 22:29:42 2010 @@ -24,7 +24,8 @@ import java.util.HashMap; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.json.JSONObject; +import org.json.simple.JSONObject; +import org.json.simple.JSONValue; import org.apache.hadoop.chukwa.conf.ChukwaConfiguration; import org.apache.hadoop.chukwa.hicc.HiccWebServer; @@ -93,7 +94,8 @@ public class WidgetStore { widgetStream.readFully(buffer); widgetStream.close(); try { - WidgetBean widget = new WidgetBean(new JSONObject(new String(buffer))); + JSONObject widgetBuffer = (JSONObject) JSONValue.parse(new String(buffer)); + WidgetBean widget = new WidgetBean(widgetBuffer); catalog.addCatalog(widget); list.put(widget.getId(),widget); } catch (Exception e) { Modified: incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/hicc/rest/MetricsController.java URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/hicc/rest/MetricsController.java?rev=1042251&r1=1042250&r2=1042251&view=diff ============================================================================== --- incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/hicc/rest/MetricsController.java (original) +++ incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/hicc/rest/MetricsController.java Sat Dec 4 22:29:42 2010 @@ -21,7 +21,7 @@ import org.apache.hadoop.chukwa.datastor import org.apache.hadoop.chukwa.hicc.TimeHandler; import org.apache.hadoop.chukwa.hicc.bean.Series; import org.apache.log4j.Logger; -import org.json.JSONArray; +import org.json.simple.JSONArray; @Path("/metrics") public class MetricsController { @@ -89,7 +89,7 @@ public class MetricsController { JSONArray seriesList = new JSONArray(); for(String rowKey : rkeys) { Series output = ChukwaHBaseStore.getSeries(table, rowKey, column, startTime, endTime, true); - seriesList.put(output.toJSONObject()); + seriesList.add(output.toJSONObject()); } buffer = seriesList.toString(); } else { @@ -110,7 +110,7 @@ public class MetricsController { Set<String> tableNames = ChukwaHBaseStore.getTableNames(); JSONArray tables = new JSONArray(); for(String table : tableNames) { - tables.put(table); + tables.add(table); } return tables.toString(); } @@ -122,7 +122,7 @@ public class MetricsController { Set<String> familyNames = ChukwaHBaseStore.getFamilyNames(tableName); JSONArray families = new JSONArray(); for(String family : familyNames) { - families.put(family); + families.add(family); } return families.toString(); } @@ -155,7 +155,7 @@ public class MetricsController { Set<String> columnNames = ChukwaHBaseStore.getColumnNames(tableName, family, startTime, endTime); JSONArray columns = new JSONArray(); for(String column : columnNames) { - columns.put(column); + columns.add(column); } return columns.toString(); } @@ -188,7 +188,7 @@ public class MetricsController { Set<String> columnNames = ChukwaHBaseStore.getRowNames(tableName, column, startTime, endTime); JSONArray rows = new JSONArray(); for(String row : columnNames) { - rows.put(row); + rows.add(row); } return rows.toString(); } Modified: incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/inputtools/log4j/Log4JMetricsContext.java URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/inputtools/log4j/Log4JMetricsContext.java?rev=1042251&r1=1042250&r2=1042251&view=diff ============================================================================== --- incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/inputtools/log4j/Log4JMetricsContext.java (original) +++ incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/inputtools/log4j/Log4JMetricsContext.java Sat Dec 4 22:29:42 2010 @@ -34,8 +34,7 @@ import org.apache.hadoop.metrics.spi.Abs import org.apache.hadoop.metrics.spi.OutputRecord; import org.apache.log4j.Logger; import org.apache.log4j.PatternLayout; -import org.json.JSONException; -import org.json.JSONObject; +import org.json.simple.JSONObject; public class Log4JMetricsContext extends AbstractMetricsContext { Logger log = Logger.getLogger(Log4JMetricsContext.class); @@ -116,7 +115,7 @@ public class Log4JMetricsContext extends for (String metricName : outRec.getMetricNames()) { json.put(metricName, outRec.getMetric(metricName)); } - } catch (JSONException e) { + } catch (Exception e) { log.warn("exception in Log4jMetricsContext:" , e); } out.info(json.toString()); Modified: incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/rest/bean/ColumnBean.java URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/rest/bean/ColumnBean.java?rev=1042251&r1=1042250&r2=1042251&view=diff ============================================================================== --- incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/rest/bean/ColumnBean.java (original) +++ incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/rest/bean/ColumnBean.java Sat Dec 4 22:29:42 2010 @@ -26,9 +26,8 @@ import javax.xml.bind.annotation.XmlTran import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; +import org.json.simple.JSONArray; +import org.json.simple.JSONObject; import org.apache.hadoop.chukwa.util.ExceptionUtil; @@ -42,11 +41,11 @@ public class ColumnBean { public ColumnBean(JSONArray json) throws ParseException { try { - widgets = new WidgetBean[json.length()]; - for(int i=0;i<json.length();i++) { - widgets[i]=new WidgetBean(json.getJSONObject(i)); + widgets = new WidgetBean[json.size()]; + for(int i=0;i<json.size();i++) { + widgets[i]=new WidgetBean((JSONObject) json.get(i)); } - } catch (JSONException e) { + } catch (Exception e) { log.error(ExceptionUtil.getStackTrace(e)); throw new ParseException(ExceptionUtil.getStackTrace(e), 0); } @@ -70,7 +69,7 @@ public class ColumnBean { public JSONArray deserialize() { JSONArray ja = new JSONArray(); for(int i=0;i<widgets.length;i++) { - ja.put(widgets[i].deserialize()); + ja.add(widgets[i].deserialize()); } return ja; } Modified: incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/rest/bean/ConfigBean.java URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/rest/bean/ConfigBean.java?rev=1042251&r1=1042250&r2=1042251&view=diff ============================================================================== --- incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/rest/bean/ConfigBean.java (original) +++ incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/rest/bean/ConfigBean.java Sat Dec 4 22:29:42 2010 @@ -26,7 +26,7 @@ import javax.xml.bind.annotation.XmlType import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.json.JSONObject; +import org.json.simple.JSONObject; import org.apache.hadoop.chukwa.util.ExceptionUtil; @@ -42,8 +42,8 @@ public class ConfigBean { public ConfigBean(JSONObject json) throws ParseException { try { - key = json.getString("key"); - value = json.getString("value"); + key = (String) json.get("key"); + value = (String) json.get("value"); } catch (Exception e) { log.error(ExceptionUtil.getStackTrace(e)); throw new ParseException("Error parsing user object.",0); Modified: incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/rest/bean/OptionBean.java URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/rest/bean/OptionBean.java?rev=1042251&r1=1042250&r2=1042251&view=diff ============================================================================== --- incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/rest/bean/OptionBean.java (original) +++ incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/rest/bean/OptionBean.java Sat Dec 4 22:29:42 2010 @@ -24,8 +24,7 @@ import javax.xml.bind.annotation.XmlElem import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.json.JSONException; -import org.json.JSONObject; +import org.json.simple.JSONObject; import org.apache.hadoop.chukwa.util.ExceptionUtil; @@ -39,9 +38,9 @@ public class OptionBean { public OptionBean(JSONObject json) throws ParseException { try { - label = json.getString("label"); - value = json.getString("value"); - } catch (JSONException e) { + label = (String) json.get("label"); + value = (String) json.get("value"); + } catch (Exception e) { throw new ParseException(ExceptionUtil.getStackTrace(e), 0); } } Modified: incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/rest/bean/PagesBean.java URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/rest/bean/PagesBean.java?rev=1042251&r1=1042250&r2=1042251&view=diff ============================================================================== --- incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/rest/bean/PagesBean.java (original) +++ incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/rest/bean/PagesBean.java Sat Dec 4 22:29:42 2010 @@ -27,9 +27,8 @@ import javax.xml.bind.annotation.XmlType import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; +import org.json.simple.JSONArray; +import org.json.simple.JSONObject; import org.apache.hadoop.chukwa.util.ExceptionUtil; @@ -46,22 +45,22 @@ public class PagesBean { public PagesBean(JSONObject json) throws ParseException { try { - title = json.getString("title"); - columns = json.getInt("columns"); - JSONArray layout = json.getJSONArray("layout"); - this.layout = new ColumnBean[layout.length()]; - for(int i=0;i<layout.length();i++) { - ColumnBean c = new ColumnBean(layout.getJSONArray(i)); + title = (String) json.get("title"); + columns = ((Long) json.get("columns")).intValue(); + JSONArray layout = (JSONArray) json.get("layout"); + this.layout = new ColumnBean[layout.size()]; + for(int i=0;i<layout.size();i++) { + ColumnBean c = new ColumnBean((JSONArray) layout.get(i)); this.layout[i]=c; } - if(json.has("colSize")) { - JSONArray ja = json.getJSONArray("colSize"); - columnSizes = new int[ja.length()]; - for(int i=0; i< ja.length(); i++) { - columnSizes[i] = ja.getInt(i); + if(json.containsKey("colSize")) { + JSONArray ja = (JSONArray) json.get("colSize"); + columnSizes = new int[ja.size()]; + for(int i=0; i< ja.size(); i++) { + columnSizes[i] = ((Long) ja.get(i)).intValue(); } } - } catch (JSONException e) { + } catch (Exception e) { log.error(ExceptionUtil.getStackTrace(e)); throw new ParseException(ExceptionUtil.getStackTrace(e), 0); } @@ -121,13 +120,13 @@ public class PagesBean { try { json.put("title", this.title); for(int i=0;i<layout.length;i++) { - ja.put(layout[i].deserialize()); + ja.add(layout[i].deserialize()); } json.put("layout", (JSONArray) ja); json.put("columns", layout.length); if(columnSizes!=null) { for(int colSize : columnSizes) { - sizes.put(colSize); + sizes.add(colSize); } } json.put("colSize", (JSONArray) sizes); Modified: incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/rest/bean/ParametersBean.java URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/rest/bean/ParametersBean.java?rev=1042251&r1=1042250&r2=1042251&view=diff ============================================================================== --- incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/rest/bean/ParametersBean.java (original) +++ incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/rest/bean/ParametersBean.java Sat Dec 4 22:29:42 2010 @@ -25,8 +25,8 @@ import java.util.HashSet; import javax.xml.bind.annotation.XmlElement; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.json.JSONArray; -import org.json.JSONObject; +import org.json.simple.JSONArray; +import org.json.simple.JSONObject; import org.apache.hadoop.chukwa.util.ExceptionUtil; @@ -46,43 +46,47 @@ public class ParametersBean { public ParametersBean(JSONObject json) throws ParseException { try { - name=json.getString("name"); - type=json.getString("type"); - if(json.has("value")) { + name=(String) json.get("name"); + type=(String) json.get("type"); + if(json.containsKey("value")) { if(json.get("value").getClass()==JSONArray.class) { - JSONArray ja = json.getJSONArray("value"); + JSONArray ja = (JSONArray) json.get("value"); Collection<String> c = new HashSet<String>(); - for(int i = 0; i < ja.length(); i++) { - c.add(ja.getString(i)); + for(int i = 0; i < ja.size(); i++) { + c.add((String) ja.get(i)); } this.value = c; } else { Collection<String> c = new HashSet<String>(); - c.add(json.getString("value")); + c.add((String)json.get("value")); this.value = c; } } - if(json.has("label")) { - label=json.getString("label"); + if(json.containsKey("label")) { + label=(String) json.get("label"); } else { - label=json.getString("name"); + label=(String) json.get("name"); } if(json.get("type").toString().intern()=="custom".intern()) { - control=json.getString("control"); + control=(String) json.get("control"); } - if(json.has("callback")) { - callback=json.getString("callback"); + if(json.containsKey("callback")) { + callback=(String) json.get("callback"); } - if(json.has("options")) { - JSONArray aj = json.getJSONArray("options"); - options = new OptionBean[aj.length()]; - for(int i=0;i<aj.length();i++) { - OptionBean o = new OptionBean(aj.getJSONObject(i)); + if(json.containsKey("options")) { + JSONArray aj = (JSONArray) json.get("options"); + options = new OptionBean[aj.size()]; + for(int i=0;i<aj.size();i++) { + OptionBean o = new OptionBean((JSONObject) aj.get(i)); options[i]=o; } } - if(json.has("edit")) { - edit=json.getInt("edit"); + if(json.containsKey("edit")) { + if(json.get("edit").getClass().equals(String.class)) { + edit=(new Integer((String)json.get("edit"))).intValue(); + } else if(json.get("edit").getClass().equals(Long.class)) { + edit=((Long)json.get("edit")).intValue(); + } } } catch (Exception e) { log.error(ExceptionUtil.getStackTrace(e)); @@ -170,7 +174,7 @@ public class ParametersBean { if(this.value!=null) { JSONArray ja = new JSONArray(); for(String s : this.value) { - ja.put(s); + ja.add(s); } json.put("value", ja); } @@ -185,7 +189,7 @@ public class ParametersBean { if(options!=null) { JSONArray ja = new JSONArray(); for(int i=0;i<options.length;i++) { - ja.put(this.options[i].deserialize()); + ja.add(this.options[i].deserialize()); } json.put("options", ja); } Modified: incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/rest/bean/UserBean.java URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/rest/bean/UserBean.java?rev=1042251&r1=1042250&r2=1042251&view=diff ============================================================================== --- incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/rest/bean/UserBean.java (original) +++ incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/rest/bean/UserBean.java Sat Dec 4 22:29:42 2010 @@ -26,9 +26,9 @@ import javax.xml.bind.annotation.XmlType import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; +import org.json.simple.JSONArray; +import org.json.simple.JSONObject; +import org.json.simple.JSONValue; import org.apache.hadoop.chukwa.util.ExceptionUtil; @@ -47,10 +47,10 @@ public class UserBean { public UserBean(JSONObject json) throws ParseException { try { - id = json.getString("id"); - views = json.getJSONArray("views"); - if(json.has("properties")) { - properties = json.getJSONObject("properties"); + id = (String) json.get("id"); + views = (JSONArray) json.get("views"); + if(json.containsKey("properties")) { + properties = (JSONObject) json.get("properties"); } else { properties = new JSONObject(); } @@ -77,14 +77,14 @@ public class UserBean { public void setProperties(String buffer) { try { - this.properties = new JSONObject(buffer); + this.properties = (JSONObject) JSONValue.parse(buffer); } catch (Exception e) { log.error(ExceptionUtil.getStackTrace(e)); } } - public String getPropertyValue(String key) throws JSONException { - return this.properties.getString(key); + public String getPropertyValue(String key) { + return (String) this.properties.get(key); } public void setId(String id) { Modified: incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/rest/bean/ViewBean.java URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/rest/bean/ViewBean.java?rev=1042251&r1=1042250&r2=1042251&view=diff ============================================================================== --- incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/rest/bean/ViewBean.java (original) +++ incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/rest/bean/ViewBean.java Sat Dec 4 22:29:42 2010 @@ -26,9 +26,9 @@ import javax.xml.bind.annotation.XmlType import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; +import org.json.simple.JSONArray; +import org.json.simple.JSONObject; +import org.json.simple.parser.JSONParser; import org.apache.hadoop.chukwa.util.ExceptionUtil; @@ -46,23 +46,26 @@ public class ViewBean { public ViewBean() { } - public ViewBean(JSONObject json) throws ParseException { + public ViewBean(byte[] buffer) throws ParseException { + JSONParser parser = new JSONParser(); try { - if(json.has("description")) { - this.description = json.getString("description"); + JSONObject json = (JSONObject) parser.parse(new String(buffer)); + if(json.containsKey("description")) { + this.description = (String) json.get("description"); } else { this.description = ""; } - this.owner=json.getString("owner"); - this.name=json.getString("name"); - this.permissionType=json.getString("permissionType"); - int size = json.getJSONArray("pages").length(); + this.owner= (String) json.get("owner"); + this.name= (String) json.get("name"); + this.permissionType= (String) json.get("permissionType"); + int size = ((JSONArray) json.get("pages")).size(); PagesBean[] pages = new PagesBean[size]; + JSONArray pagesArray = (JSONArray) json.get("pages"); for(int i=0;i<size;i++) { - pages[i] = new PagesBean(json.getJSONArray("pages").getJSONObject(i)); + pages[i] = new PagesBean((JSONObject) pagesArray.get(i)); } this.pages=pages; - } catch (JSONException e) { + } catch (Exception e) { log.error(ExceptionUtil.getStackTrace(e)); throw new ParseException(ExceptionUtil.getStackTrace(e), 0); } @@ -126,22 +129,23 @@ public class ViewBean { } } - public String deserialize() { + @SuppressWarnings("unchecked") + public JSONObject deserialize() { update(); - JSONObject json = new JSONObject(); + JSONObject view = new JSONObject(); try { - json.put("name", this.name); - json.put("owner", this.owner); - json.put("permissionType", this.permissionType); - json.put("description", this.description); + view.put("name", this.name); + view.put("owner", this.owner); + view.put("permissionType", this.permissionType); + view.put("description", this.description); JSONArray ja = new JSONArray(); for(int i=0;i<this.pages.length;i++) { - ja.put(this.pages[i].deserialize()); + ja.add(this.pages[i].deserialize()); } - json.put("pages", (JSONArray) ja); + view.put("pages", (JSONArray) ja); } catch (Exception e){ log.error(ExceptionUtil.getStackTrace(e)); } - return json.toString(); + return view; } } Modified: incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/rest/bean/WidgetBean.java URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/rest/bean/WidgetBean.java?rev=1042251&r1=1042250&r2=1042251&view=diff ============================================================================== --- incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/rest/bean/WidgetBean.java (original) +++ incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/rest/bean/WidgetBean.java Sat Dec 4 22:29:42 2010 @@ -27,9 +27,8 @@ import javax.xml.bind.annotation.XmlType import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; +import org.json.simple.JSONArray; +import org.json.simple.JSONObject; import org.apache.hadoop.chukwa.datastore.WidgetStore; import org.apache.hadoop.chukwa.util.ExceptionUtil; @@ -53,24 +52,30 @@ public class WidgetBean { public WidgetBean(JSONObject json) throws ParseException { try { - this.id=json.getString("id"); - this.title=json.getString("title"); - this.version=json.getString("version"); - this.categories=json.getString("categories"); - this.url=json.getString("url"); - this.description=json.getString("description"); - this.refresh=json.getInt("refresh"); + this.id=(String) json.get("id"); + this.title=(String) json.get("title"); + this.version=(String) json.get("version"); + this.categories=(String) json.get("categories"); + this.url=(String) json.get("url"); + this.description=(String) json.get("description"); + if(json.get("refresh").getClass().equals("String")) { + int refresh = Integer.parseInt((String) json.get("refresh")); + this.refresh = refresh; + } else if(json.get("refresh").getClass().equals("Long")) { + this.refresh = ((Long) json.get("refresh")).intValue(); + } try { - int size = json.getJSONArray("parameters").length(); + int size = ((JSONArray) json.get("parameters")).size(); ParametersBean[] list = new ParametersBean[size]; for(int i=0;i<size;i++) { - list[i] = new ParametersBean(json.getJSONArray("parameters").getJSONObject(i)); + JSONArray jsonArray = (JSONArray) json.get("parameters"); + list[i] = new ParametersBean((JSONObject) jsonArray.get(i)); } this.parameters=list; - } catch (JSONException e) { + } catch (Exception e) { this.parameters=null; } - } catch (JSONException e) { + } catch (Exception e) { log.error(ExceptionUtil.getStackTrace(e)); throw new ParseException(ExceptionUtil.getStackTrace(e), 0); } @@ -186,12 +191,12 @@ public class WidgetBean { json.put("description", this.description); json.put("version", this.version); json.put("categories", this.categories); - json.put("refresh",this.refresh); + json.put("refresh", this.refresh); json.put("url", this.url); JSONArray ja = new JSONArray(); if(this.parameters!=null) { for(int i=0;i<this.parameters.length;i++) { - ja.put(this.parameters[i].deserialize()); + ja.add(this.parameters[i].deserialize()); } } json.put("parameters", (JSONArray) ja); Modified: incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/rest/resource/ViewResource.java URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/rest/resource/ViewResource.java?rev=1042251&r1=1042250&r2=1042251&view=diff ============================================================================== --- incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/rest/resource/ViewResource.java (original) +++ incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/rest/resource/ViewResource.java Sat Dec 4 22:29:42 2010 @@ -88,6 +88,7 @@ public class ViewResource { if(owner.intern()==request.getRemoteUser().intern()) { ViewStore vs = new ViewStore(owner, vid); ViewBean view = vs.get(); + vs.delete(); view.setPermissionType(permission); vs.set(view); } else { @@ -132,7 +133,6 @@ public class ViewResource { public ReturnCodeBean deleteView(@Context HttpServletRequest request, @PathParam("owner") String owner, @PathParam("vid") String vid) { try { if(owner.intern()==request.getRemoteUser().intern()) { - log.info("owner: "+owner+" vid: "+vid); ViewStore vs = new ViewStore(owner, vid); vs.delete(); } else { @@ -156,7 +156,7 @@ public class ViewResource { if(uid==null) { uid = request.getRemoteUser(); } - result = ViewStore.list(uid).toString(); + result = ViewStore.list(uid).toJSONString(); } catch (Exception e) { throw new WebApplicationException(Response.status(Response.Status.NOT_FOUND) .entity("View does not exist.").build()); Modified: incubator/chukwa/trunk/src/test/org/apache/hadoop/chukwa/database/TestDatabaseWebJson.java URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/src/test/org/apache/hadoop/chukwa/database/TestDatabaseWebJson.java?rev=1042251&r1=1042250&r2=1042251&view=diff ============================================================================== --- incubator/chukwa/trunk/src/test/org/apache/hadoop/chukwa/database/TestDatabaseWebJson.java (original) +++ incubator/chukwa/trunk/src/test/org/apache/hadoop/chukwa/database/TestDatabaseWebJson.java Sat Dec 4 22:29:42 2010 @@ -29,6 +29,9 @@ import org.apache.commons.httpclient.par import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.json.*; +import org.json.simple.JSONArray; +import org.json.simple.JSONObject; +import org.json.simple.JSONValue; import org.mortbay.jetty.Server; import org.mortbay.xml.XmlConfiguration; import org.apache.hadoop.chukwa.util.*; @@ -202,9 +205,9 @@ public class TestDatabaseWebJson extends String cluster = "demo"; DatabaseWriter db = new DatabaseWriter(cluster); - JSONArray json_array=new JSONArray(json_str); - for (int i=0; i < json_array.length(); i++) { - JSONObject row_obj=json_array.getJSONObject(i); + JSONArray json_array=(JSONArray)JSONValue.parse(json_str); + for (int i=0; i < json_array.size(); i++) { + JSONObject row_obj=(JSONObject) json_array.get(i); // get the database row @@ -214,7 +217,7 @@ public class TestDatabaseWebJson extends // move to the first record rs.next(); ResultSetMetaData md=rs.getMetaData(); - Iterator names=row_obj.keys(); + Iterator names=row_obj.keySet().iterator(); while (names.hasNext()) { String name=(String)names.next(); String jsonValue=(String)row_obj.get(name); Modified: incubator/chukwa/trunk/src/test/org/apache/hadoop/chukwa/rest/resource/TestUserResource.java URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/src/test/org/apache/hadoop/chukwa/rest/resource/TestUserResource.java?rev=1042251&r1=1042250&r2=1042251&view=diff ============================================================================== --- incubator/chukwa/trunk/src/test/org/apache/hadoop/chukwa/rest/resource/TestUserResource.java (original) +++ incubator/chukwa/trunk/src/test/org/apache/hadoop/chukwa/rest/resource/TestUserResource.java Sat Dec 4 22:29:42 2010 @@ -17,12 +17,12 @@ */ package org.apache.hadoop.chukwa.rest.resource; -import org.json.JSONObject; +import org.json.simple.JSONObject; import org.apache.hadoop.chukwa.rest.bean.ReturnCodeBean; import org.apache.hadoop.chukwa.rest.bean.UserBean; import org.apache.hadoop.chukwa.util.ExceptionUtil; -import org.json.JSONArray; +import org.json.simple.JSONArray; import com.sun.jersey.api.client.Client; From chukwa-commits-return-martinezgary@example.org Sat Dec 04 22:31:08 2010 Return-Path: <chukwa-commits-return-martinezgary@example.org> Delivered-To: martinezgary@example.org Received: (qmail 89220 invoked from network); 4 Dec 2010 22:31:08 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 4 Dec 2010 22:31:08 -0000 Received: (qmail 5867 invoked by uid 500); 4 Dec 2010 22:31:08 -0000 Delivered-To: martinezgary@example.org Received: (qmail 5844 invoked by uid 500); 4 Dec 2010 22:31:08 -0000 Mailing-List: contact martinezgary@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:martinezgary@example.org> List-Unsubscribe: <mailto:martinezgary@example.org> List-Post: <mailto:martinezgary@example.org> List-Id: <chukwa-commits.incubator.apache.org> Reply-To: martinezgary@example.org Delivered-To: mailing list martinezgary@example.org Received: (qmail 5836 invoked by uid 99); 4 Dec 2010 22:31:08 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Dec 2010 22:31:08 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Dec 2010 22:31:06 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 4094F23888E8; Sat, 4 Dec 2010 22:30:45 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1042253 - /incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/hicc/bean/Series.java Date: Sat, 04 Dec 2010 22:30:45 -0000 To: martinezgary@example.org From: martinezgary@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <martinezgary@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: eyang Date: Sat Dec 4 22:30:44 2010 New Revision: 1042253 URL: http://svn.apache.org/viewvc?rev=1042253&view=rev Log: CHUKWA-474. Replaced JSON library with JSON-Simple. (Eric Yang) Modified: incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/hicc/bean/Series.java Modified: incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/hicc/bean/Series.java URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/hicc/bean/Series.java?rev=1042253&r1=1042252&r2=1042253&view=diff ============================================================================== --- incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/hicc/bean/Series.java (original) +++ incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/hicc/bean/Series.java Sat Dec 4 22:30:44 2010 @@ -13,9 +13,8 @@ import javax.xml.bind.annotation.XmlValu import org.apache.hadoop.chukwa.datastore.ChukwaHBaseStore; import org.apache.hadoop.chukwa.util.ExceptionUtil; import org.apache.log4j.Logger; -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; +import org.json.simple.JSONArray; +import org.json.simple.JSONObject; @XmlRootElement @XmlAccessorType(XmlAccessType.FIELD) @@ -28,20 +27,20 @@ public class Series { series = new JSONObject(); try { series.put("name", name); - } catch (JSONException e) { + } catch (Exception e) { log.error(ExceptionUtil.getStackTrace(e)); } } public void add(long x, double y) { try { - if(!series.has("data")) { + if(!series.containsKey("data")) { series.put("data", new JSONArray()); } JSONArray xy = new JSONArray(); - xy.put(x); - xy.put(y); - series.getJSONArray("data").put(xy); + xy.add(x); + xy.add(y); + ((JSONArray)series.get("data")).add(xy); } catch(Exception e) { log.error(ExceptionUtil.getStackTrace(e)); } From chukwa-commits-return-martinezgary@example.org Sun Dec 05 02:49:53 2010 Return-Path: <chukwa-commits-return-martinezgary@example.org> Delivered-To: martinezgary@example.org Received: (qmail 68003 invoked from network); 5 Dec 2010 02:49:53 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 5 Dec 2010 02:49:53 -0000 Received: (qmail 11988 invoked by uid 500); 5 Dec 2010 02:49:52 -0000 Delivered-To: martinezgary@example.org Received: (qmail 11962 invoked by uid 500); 5 Dec 2010 02:49:52 -0000 Mailing-List: contact martinezgary@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:martinezgary@example.org> List-Unsubscribe: <mailto:martinezgary@example.org> List-Post: <mailto:martinezgary@example.org> List-Id: <chukwa-commits.incubator.apache.org> Reply-To: martinezgary@example.org Delivered-To: mailing list martinezgary@example.org Received: (qmail 11954 invoked by uid 99); 5 Dec 2010 02:49:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Dec 2010 02:49:52 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Dec 2010 02:49:49 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id E03272388903; Sun, 5 Dec 2010 02:49:28 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1042276 - /incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/util/PidFile.java Date: Sun, 05 Dec 2010 02:49:28 -0000 To: martinezgary@example.org From: martinezgary@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <martinezgary@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: eyang Date: Sun Dec 5 02:49:28 2010 New Revision: 1042276 URL: http://svn.apache.org/viewvc?rev=1042276&view=rev Log: CHUKWA-7. Handle pid in /tmp in case CHUKWA_HOME is not defined. (Ari Rabkin via Eric Yang) Modified: incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/util/PidFile.java Modified: incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/util/PidFile.java URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/util/PidFile.java?rev=1042276&r1=1042275&r2=1042276&view=diff ============================================================================== --- incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/util/PidFile.java (original) +++ incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/util/PidFile.java Sun Dec 5 02:49:28 2010 @@ -31,6 +31,22 @@ public class PidFile extends Thread { private static Log log = LogFactory.getLog(PidFile.class); private static FileLock lock = null; private static FileOutputStream pidFileOutput = null; + private static final String DEFAULT_CHUKWA_HOME; + + static { + //use /tmp as a default, only if we can't create tmp files via Java. + File chukwaHome = new File(System.getProperty("java.io.tmpdir"), "chukwa"); + try { + File tmpFile = File.createTempFile("chukwa", "discovertmp"); + File tmpDir = tmpFile.getParentFile(); + tmpFile.delete(); + chukwaHome = new File(tmpDir, "chukwa"); + chukwaHome.mkdir(); + } catch(IOException e) { + } finally { + DEFAULT_CHUKWA_HOME = chukwaHome.getAbsolutePath(); + } + }; public PidFile(String name) { this.name = name; @@ -47,6 +63,9 @@ public class PidFile extends Thread { String[] items = pidLong.split("@"); String pid = items[0]; String chukwaPath = System.getProperty("CHUKWA_HOME"); + if(chukwaPath == null) { + chukwaPath = DEFAULT_CHUKWA_HOME; + } StringBuffer pidFilesb = new StringBuffer(); String pidDir = System.getenv("CHUKWA_PID_DIR"); if (pidDir == null) { @@ -86,6 +105,9 @@ public class PidFile extends Thread { public void clean() { String chukwaPath = System.getenv("CHUKWA_HOME"); + if(chukwaPath == null) { + chukwaPath = DEFAULT_CHUKWA_HOME; + } StringBuffer pidFilesb = new StringBuffer(); String pidDir = System.getenv("CHUKWA_PID_DIR"); if (pidDir == null) { From chukwa-commits-return-martinezgary@example.org Sun Dec 05 02:51:41 2010 Return-Path: <chukwa-commits-return-martinezgary@example.org> Delivered-To: martinezgary@example.org Received: (qmail 68129 invoked from network); 5 Dec 2010 02:51:41 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 5 Dec 2010 02:51:41 -0000 Received: (qmail 13729 invoked by uid 500); 5 Dec 2010 02:51:40 -0000 Delivered-To: martinezgary@example.org Received: (qmail 13705 invoked by uid 500); 5 Dec 2010 02:51:40 -0000 Mailing-List: contact martinezgary@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:martinezgary@example.org> List-Unsubscribe: <mailto:martinezgary@example.org> List-Post: <mailto:martinezgary@example.org> List-Id: <chukwa-commits.incubator.apache.org> Reply-To: martinezgary@example.org Delivered-To: mailing list martinezgary@example.org Received: (qmail 13697 invoked by uid 99); 5 Dec 2010 02:51:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Dec 2010 02:51:40 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Dec 2010 02:51:38 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 9F3212388903; Sun, 5 Dec 2010 02:51:17 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1042277 - /incubator/chukwa/trunk/CHANGES.txt Date: Sun, 05 Dec 2010 02:51:17 -0000 To: martinezgary@example.org From: martinezgary@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <martinezgary@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: eyang Date: Sun Dec 5 02:51:17 2010 New Revision: 1042277 URL: http://svn.apache.org/viewvc?rev=1042277&view=rev Log: CHUKWA-474. Replaced JSON library with JSON-Simple. (Eric Yang) Modified: incubator/chukwa/trunk/CHANGES.txt Modified: incubator/chukwa/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/CHANGES.txt?rev=1042277&r1=1042276&r2=1042277&view=diff ============================================================================== --- incubator/chukwa/trunk/CHANGES.txt (original) +++ incubator/chukwa/trunk/CHANGES.txt Sun Dec 5 02:51:17 2010 @@ -26,6 +26,8 @@ Trunk (unreleased changes) IMPROVEMENTS + CHUKWA-474. Replaced JSON library with JSON-Simple. (Eric Yang) + CHUKWA-560. Improve HBaseWriter performance. (Jerome Boulon via Eric Yang) CHUKWA-555. Update descriptor files to use HBase REST API. (Eric Yang) @@ -68,6 +70,8 @@ Trunk (unreleased changes) BUG FIXES + CHUKWA-7. Handle pid in /tmp in case CHUKWA_HOME is not defined. (Ari Rabkin via Eric Yang) + CHUKWA-553. Retain file filter argument for DirTailingAdaptor. (Deepak Deshpande via Eric Yang) CHUKWA-559. Switched unit test HICC port to 4080. (Eric Yang) From chukwa-commits-return-martinezgary@example.org Sun Dec 05 21:09:47 2010 Return-Path: <chukwa-commits-return-martinezgary@example.org> Delivered-To: martinezgary@example.org Received: (qmail 11655 invoked from network); 5 Dec 2010 21:09:47 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 5 Dec 2010 21:09:47 -0000 Received: (qmail 78880 invoked by uid 500); 5 Dec 2010 21:09:47 -0000 Delivered-To: martinezgary@example.org Received: (qmail 78856 invoked by uid 500); 5 Dec 2010 21:09:47 -0000 Mailing-List: contact martinezgary@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:martinezgary@example.org> List-Unsubscribe: <mailto:martinezgary@example.org> List-Post: <mailto:martinezgary@example.org> List-Id: <chukwa-commits.incubator.apache.org> Reply-To: martinezgary@example.org Delivered-To: mailing list martinezgary@example.org Received: (qmail 78848 invoked by uid 99); 5 Dec 2010 21:09:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Dec 2010 21:09:47 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Dec 2010 21:09:44 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id F332A2388865; Sun, 5 Dec 2010 21:09:22 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1042449 - in /incubator/chukwa/trunk: CHANGES.txt conf/chukwa-collector-conf.xml.template src/java/org/apache/hadoop/chukwa/datacollection/writer/hbase/HBaseWriter.java Date: Sun, 05 Dec 2010 21:09:22 -0000 To: martinezgary@example.org From: martinezgary@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <martinezgary@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: eyang Date: Sun Dec 5 21:09:22 2010 New Revision: 1042449 URL: http://svn.apache.org/viewvc?rev=1042449&view=rev Log: CHUKWA-563. Added configuration to skip HBase schema validation for HBaseWriter. (Eric Yang) Modified: incubator/chukwa/trunk/CHANGES.txt incubator/chukwa/trunk/conf/chukwa-collector-conf.xml.template incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/writer/hbase/HBaseWriter.java Modified: incubator/chukwa/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/CHANGES.txt?rev=1042449&r1=1042448&r2=1042449&view=diff ============================================================================== --- incubator/chukwa/trunk/CHANGES.txt (original) +++ incubator/chukwa/trunk/CHANGES.txt Sun Dec 5 21:09:22 2010 @@ -4,6 +4,8 @@ Trunk (unreleased changes) NEW FEATURES + CHUKWA-563. Added configuration to skip HBase schema validation for HBaseWriter. (Eric Yang) + CHUKWA-558. Update default Chukwa configuration files to use SocketAdaptor for Hadoop metrics streaming. (Eric Yang) CHUKWA-527 Configuration spellcheck. (Ari Rabkin) Modified: incubator/chukwa/trunk/conf/chukwa-collector-conf.xml.template URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/conf/chukwa-collector-conf.xml.template?rev=1042449&r1=1042448&r2=1042449&view=diff ============================================================================== --- incubator/chukwa/trunk/conf/chukwa-collector-conf.xml.template (original) +++ incubator/chukwa/trunk/conf/chukwa-collector-conf.xml.template Sun Dec 5 21:09:22 2010 @@ -59,7 +59,7 @@ <property> <name>hbase.zookeeper.quorum</name> - <value>host1.mydomain.com,host2.mydomain.com,host3.mydomain.com</value> + <value>localhost</value> <description>Comma separated list of servers in the ZooKeeper Quorum. For example, "host1.mydomain.com,host2.mydomain.com,host3.mydomain.com". By default this is set to localhost for local and pseudo-distributed modes @@ -69,6 +69,22 @@ </description> </property> + <property> + <name>hbase.writer.verify.schema</name> + <value>false</value> + <description>Verify HBase Table schema with demux parser schema, log + warning if there are mismatch between hbase schema and demux parsers. + </description> + </property> + + <property> + <name>hbase.writer.halt.on.schema.mismatch</name> + <value>false</value> + <description>If this option is set to true, and HBase table schema + is mismatched with demux parser, collector will shut down itself. + </description> + </property> + --> <property> Modified: incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/writer/hbase/HBaseWriter.java URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/writer/hbase/HBaseWriter.java?rev=1042449&r1=1042448&r2=1042449&view=diff ============================================================================== --- incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/writer/hbase/HBaseWriter.java (original) +++ incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/writer/hbase/HBaseWriter.java Sun Dec 5 21:09:22 2010 @@ -113,7 +113,9 @@ public class HBaseWriter extends Pipelin statTimer.schedule(new StatReportingTask(), 1000, 10 * 1000); output = new OutputCollector(); reporter = new Reporter(); - verifyHbaseSchema(); + if(conf.getBoolean("hbase.writer.verify.schema", false)) { + verifyHbaseSchema(); + } pool = new HTablePool(hconf, 60); } @@ -141,7 +143,7 @@ public class HBaseWriter extends Pipelin private void verifyHbaseSchema() { log.debug("Verify Demux parser with HBase schema"); - boolean schemaVerified = false; + boolean schemaVerified = true; try { HBaseAdmin admin = new HBaseAdmin(hconf); List<Class> demuxParsers = ClassUtils.getClassesForPackage(conf.get("hbase.demux.package")); @@ -150,23 +152,25 @@ public class HBaseWriter extends Pipelin Tables list = x.getAnnotation(Tables.class); for(Table table : list.annotations()) { if(!verifyHbaseTable(admin, table)) { - throw new Exception("Validation failed - table: "+table.name()+" column family: "+table.columnFamily()+" does not exist."); + schemaVerified = false; + log.warn("Validation failed - table: "+table.name()+" column family: "+table.columnFamily()+" does not exist."); } } } else if(x.isAnnotationPresent(Table.class)) { Table table = x.getAnnotation(Table.class); if(!verifyHbaseTable(admin, table)) { - throw new Exception("Validation failed - table: "+table.name()+" column family: "+table.columnFamily()+" does not exist."); + schemaVerified = false; + log.warn("Validation failed - table: "+table.name()+" column family: "+table.columnFamily()+" does not exist."); } } } - schemaVerified = true; } catch (Exception e) { + schemaVerified = false; log.error(ExceptionUtil.getStackTrace(e)); } if(!schemaVerified) { log.error("Hbase schema mismatch with demux parser."); - if(conf.getBoolean("halt.on.schema.mismatch", true)) { + if(conf.getBoolean("hbase.writer.halt.on.schema.mismatch", true)) { log.error("Exiting..."); DaemonWatcher.bailout(-1); } From chukwa-commits-return-martinezgary@example.org Fri Dec 10 23:27:34 2010 Return-Path: <chukwa-commits-return-martinezgary@example.org> Delivered-To: martinezgary@example.org Received: (qmail 6571 invoked from network); 10 Dec 2010 23:27:34 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 10 Dec 2010 23:27:34 -0000 Received: (qmail 54045 invoked by uid 500); 10 Dec 2010 23:27:34 -0000 Delivered-To: martinezgary@example.org Received: (qmail 54027 invoked by uid 500); 10 Dec 2010 23:27:33 -0000 Mailing-List: contact martinezgary@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:martinezgary@example.org> List-Unsubscribe: <mailto:martinezgary@example.org> List-Post: <mailto:martinezgary@example.org> List-Id: <chukwa-commits.incubator.apache.org> Reply-To: martinezgary@example.org Delivered-To: mailing list martinezgary@example.org Received: (qmail 54019 invoked by uid 99); 10 Dec 2010 23:27:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Dec 2010 23:27:33 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Dec 2010 23:27:33 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id BF1B523888E8; Fri, 10 Dec 2010 23:27:12 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1044535 - /incubator/chukwa/trunk/conf/chukwa-collector-conf.xml.template Date: Fri, 10 Dec 2010 23:27:12 -0000 To: martinezgary@example.org From: martinezgary@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <martinezgary@example.org> Author: billgraham Date: Fri Dec 10 23:27:12 2010 New Revision: 1044535 URL: http://svn.apache.org/viewvc?rev=1044535&view=rev Log: CHUKWA-566. Removing hbase.zookeeper.quorum from collector conf and documenting how it should be in hbase-site.xml Modified: incubator/chukwa/trunk/conf/chukwa-collector-conf.xml.template Modified: incubator/chukwa/trunk/conf/chukwa-collector-conf.xml.template URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/conf/chukwa-collector-conf.xml.template?rev=1044535&r1=1044534&r2=1044535&view=diff ============================================================================== --- incubator/chukwa/trunk/conf/chukwa-collector-conf.xml.template (original) +++ incubator/chukwa/trunk/conf/chukwa-collector-conf.xml.template Fri Dec 10 23:27:12 2010 @@ -45,6 +45,9 @@ </property> --> +<!-- When writing to HBase, uncomment the following parameters. If you're running +HBase in distributed mode, you'll also need to copy your hbase-site.xml file with +your hbase.zookeeper.quorum setting to the conf/ dir. --> <!-- HBaseWriter parameters <property> <name>chukwaCollector.pipeline</name> @@ -58,18 +61,6 @@ </property> <property> - <name>hbase.zookeeper.quorum</name> - <value>localhost</value> - <description>Comma separated list of servers in the ZooKeeper Quorum. - For example, "host1.mydomain.com,host2.mydomain.com,host3.mydomain.com". - By default this is set to localhost for local and pseudo-distributed modes - of operation. For a fully-distributed setup, this should be set to a full - list of ZooKeeper quorum servers. If HBASE_MANAGES_ZK is set in hbase-env.sh - this is the list of servers which we will start/stop ZooKeeper on. - </description> - </property> - - <property> <name>hbase.writer.verify.schema</name> <value>false</value> <description>Verify HBase Table schema with demux parser schema, log From chukwa-commits-return-martinezgary@example.org Sun Dec 12 01:37:22 2010 Return-Path: <chukwa-commits-return-martinezgary@example.org> Delivered-To: martinezgary@example.org Received: (qmail 25095 invoked from network); 12 Dec 2010 01:37:22 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 12 Dec 2010 01:37:22 -0000 Received: (qmail 38483 invoked by uid 500); 12 Dec 2010 01:37:22 -0000 Delivered-To: martinezgary@example.org Received: (qmail 38460 invoked by uid 500); 12 Dec 2010 01:37:22 -0000 Mailing-List: contact martinezgary@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:martinezgary@example.org> List-Unsubscribe: <mailto:martinezgary@example.org> List-Post: <mailto:martinezgary@example.org> List-Id: <chukwa-commits.incubator.apache.org> Reply-To: martinezgary@example.org Delivered-To: mailing list martinezgary@example.org Received: (qmail 38450 invoked by uid 99); 12 Dec 2010 01:37:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Dec 2010 01:37:22 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Dec 2010 01:37:19 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 6C89E238897A; Sun, 12 Dec 2010 01:36:58 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1044751 - in /incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor: DirTailingAdaptor.java RegExDirTailingAdaptor.java Date: Sun, 12 Dec 2010 01:36:58 -0000 To: martinezgary@example.org From: martinezgary@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <martinezgary@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: eyang Date: Sun Dec 12 01:36:58 2010 New Revision: 1044751 URL: http://svn.apache.org/viewvc?rev=1044751&view=rev Log: CHUKWA-562. Added RegExDirTailingAdaptor. (Deepak Deshpande via Eric Yang) Added: incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/RegExDirTailingAdaptor.java Modified: incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/DirTailingAdaptor.java Modified: incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/DirTailingAdaptor.java URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/DirTailingAdaptor.java?rev=1044751&r1=1044750&r2=1044751&view=diff ============================================================================== --- incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/DirTailingAdaptor.java (original) +++ incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/DirTailingAdaptor.java Sun Dec 12 01:36:58 2010 @@ -133,7 +133,7 @@ public class DirTailingAdaptor extends A }else if(args.length == 3){ baseDir = new File(args[0]); this.wildCharacter = args[ 1 ]; - fileFilter = new WildcardFileFilter( this.wildCharacter ); + fileFilter = getFileFilter(); adaptorName = args[2]; }else{ log.warn("bad syntax in DirTailingAdaptor args"); @@ -150,4 +150,14 @@ public class DirTailingAdaptor extends A return lastSweepStartTime; } + /** + * Returns {@link IOFileFilter} constructed using the wild character. Subclasses can override this method + * return their own version of {@link IOFileFilter} instance. + * + * @return {@link IOFileFilter} constructed using the wild character. Subclasses can override this method + * return their own version of {@link IOFileFilter} instance. + */ + protected IOFileFilter getFileFilter() { + return new WildcardFileFilter( this.wildCharacter ); + } } Added: incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/RegExDirTailingAdaptor.java URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/RegExDirTailingAdaptor.java?rev=1044751&view=auto ============================================================================== --- incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/RegExDirTailingAdaptor.java (added) +++ incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/RegExDirTailingAdaptor.java Sun Dec 12 01:36:58 2010 @@ -0,0 +1,38 @@ +/* + * 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. + */ + +package org.apache.hadoop.chukwa.datacollection.adaptor; + +import org.apache.commons.io.filefilter.IOFileFilter; +import org.apache.commons.io.filefilter.RegexFileFilter; + +/** + * + */ +public class RegExDirTailingAdaptor extends DirTailingAdaptor { + + /* + * (non-Javadoc) + * @see org.apache.hadoop.chukwa.datacollection.adaptor.DirTailingAdaptor#getFileFilter() + */ + @Override + public IOFileFilter getFileFilter ( ) { + return new RegexFileFilter( this.wildCharacter); + } + +} From chukwa-commits-return-martinezgary@example.org Sun Dec 12 01:37:36 2010 Return-Path: <chukwa-commits-return-martinezgary@example.org> Delivered-To: martinezgary@example.org Received: (qmail 25118 invoked from network); 12 Dec 2010 01:37:36 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 12 Dec 2010 01:37:36 -0000 Received: (qmail 38556 invoked by uid 500); 12 Dec 2010 01:37:36 -0000 Delivered-To: martinezgary@example.org Received: (qmail 38532 invoked by uid 500); 12 Dec 2010 01:37:36 -0000 Mailing-List: contact martinezgary@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:martinezgary@example.org> List-Unsubscribe: <mailto:martinezgary@example.org> List-Post: <mailto:martinezgary@example.org> List-Id: <chukwa-commits.incubator.apache.org> Reply-To: martinezgary@example.org Delivered-To: mailing list martinezgary@example.org Received: (qmail 38524 invoked by uid 99); 12 Dec 2010 01:37:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Dec 2010 01:37:36 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Dec 2010 01:37:35 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id C3AD323889E1; Sun, 12 Dec 2010 01:37:15 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1044752 - /incubator/chukwa/trunk/CHANGES.txt Date: Sun, 12 Dec 2010 01:37:15 -0000 To: martinezgary@example.org From: martinezgary@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <martinezgary@example.org> Author: eyang Date: Sun Dec 12 01:37:15 2010 New Revision: 1044752 URL: http://svn.apache.org/viewvc?rev=1044752&view=rev Log: CHUKWA-562. Added RegExDirTailingAdaptor. (Deepak Deshpande via Eric Yang) Modified: incubator/chukwa/trunk/CHANGES.txt Modified: incubator/chukwa/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/CHANGES.txt?rev=1044752&r1=1044751&r2=1044752&view=diff ============================================================================== --- incubator/chukwa/trunk/CHANGES.txt (original) +++ incubator/chukwa/trunk/CHANGES.txt Sun Dec 12 01:37:15 2010 @@ -28,6 +28,8 @@ Trunk (unreleased changes) IMPROVEMENTS + CHUKWA-562. Added RegExDirTailingAdaptor. (Deepak Deshpande via Eric Yang) + CHUKWA-474. Replaced JSON library with JSON-Simple. (Eric Yang) CHUKWA-560. Improve HBaseWriter performance. (Jerome Boulon via Eric Yang) From chukwa-commits-return-martinezgary@example.org Sat Dec 18 07:31:27 2010 Return-Path: <chukwa-commits-return-martinezgary@example.org> Delivered-To: martinezgary@example.org Received: (qmail 76881 invoked from network); 18 Dec 2010 07:31:27 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 18 Dec 2010 07:31:27 -0000 Received: (qmail 88627 invoked by uid 500); 18 Dec 2010 07:31:27 -0000 Delivered-To: martinezgary@example.org Received: (qmail 88601 invoked by uid 500); 18 Dec 2010 07:31:26 -0000 Mailing-List: contact martinezgary@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:martinezgary@example.org> List-Unsubscribe: <mailto:martinezgary@example.org> List-Post: <mailto:martinezgary@example.org> List-Id: <chukwa-commits.incubator.apache.org> Reply-To: martinezgary@example.org Delivered-To: mailing list martinezgary@example.org Received: (qmail 88593 invoked by uid 99); 18 Dec 2010 07:31:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 18 Dec 2010 07:31:25 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 18 Dec 2010 07:31:23 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 10B4B23889C5; Sat, 18 Dec 2010 07:31:03 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1050591 - in /incubator/chukwa/trunk: CHANGES.txt src/web/hicc/descriptors/graph_explorer.descriptor src/web/hicc/views/default.view Date: Sat, 18 Dec 2010 07:31:02 -0000 To: martinezgary@example.org From: martinezgary@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <martinezgary@example.org> Author: eyang Date: Sat Dec 18 07:31:02 2010 New Revision: 1050591 URL: http://svn.apache.org/viewvc?rev=1050591&view=rev Log: CHUKWA-231. Update default view to show graph explorer and remove deprecated widgets. (Eric Yang) Added: incubator/chukwa/trunk/src/web/hicc/descriptors/graph_explorer.descriptor Modified: incubator/chukwa/trunk/CHANGES.txt incubator/chukwa/trunk/src/web/hicc/views/default.view Modified: incubator/chukwa/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/CHANGES.txt?rev=1050591&r1=1050590&r2=1050591&view=diff ============================================================================== --- incubator/chukwa/trunk/CHANGES.txt (original) +++ incubator/chukwa/trunk/CHANGES.txt Sat Dec 18 07:31:02 2010 @@ -74,6 +74,8 @@ Trunk (unreleased changes) BUG FIXES + CHUKWA-231. Update default view to show graph explorer and remove deprecated widgets. (Eric Yang) + CHUKWA-7. Handle pid in /tmp in case CHUKWA_HOME is not defined. (Ari Rabkin via Eric Yang) CHUKWA-553. Retain file filter argument for DirTailingAdaptor. (Deepak Deshpande via Eric Yang) Added: incubator/chukwa/trunk/src/web/hicc/descriptors/graph_explorer.descriptor URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/src/web/hicc/descriptors/graph_explorer.descriptor?rev=1050591&view=auto ============================================================================== --- incubator/chukwa/trunk/src/web/hicc/descriptors/graph_explorer.descriptor (added) +++ incubator/chukwa/trunk/src/web/hicc/descriptors/graph_explorer.descriptor Sat Dec 18 07:31:02 2010 @@ -0,0 +1,28 @@ +{ +"id":"graph_explorer", +"title":"Graph Explorer", +"version":"0.1", +"categories":"Developer,Utilities", +"url":"iframe/jsp/graph_explorer.jsp", +"description":"Graph explorer for visualize data on Hbase.", +"refresh":"0", +"parameters":[ +{"name":"width","type":"select","value":"300","label":"Width","options":[ +{"label":"300","value":"300"}, +{"label":"400","value":"400"}, +{"label":"500","value":"500"}, +{"label":"600","value":"600"}, +{"label":"800","value":"800"}, +{"label":"1000","value":"1000"}, +{"label":"1200","value":"1200"} +]}, +{"name":"height","type":"select","value":"1000","label":"Height","options":[ +{"label":"300","value":"300"}, +{"label":"450","value":"400"}, +{"label":"600","value":"500"}, +{"label":"800","value":"800"}, +{"label":"1000","value":"1000"}, +{"label":"1200","value":"1200"} +]} +] +} Modified: incubator/chukwa/trunk/src/web/hicc/views/default.view URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/src/web/hicc/views/default.view?rev=1050591&r1=1050590&r2=1050591&view=diff ============================================================================== --- incubator/chukwa/trunk/src/web/hicc/views/default.view (original) +++ incubator/chukwa/trunk/src/web/hicc/views/default.view Sat Dec 18 07:31:02 2010 @@ -1,4 +1 @@ -{"owner":"system","name":"default","permissionType":"public","description": "Default view", "pages_count": 2, "pages": [{"title": "Cluster Status", "columns": 2, "layout": [[{"id": "time", "url": "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", "url": "iframe/jsp/single-series-chart-javascript.jsp", "title": "Cluster Metrics by Percentage", "description": "Display cluster related stats by percentage", "categories": "System,Status", "parameter s": [{"name": "y_axis_max", "edit": "0", "value": "100", "type": "string"}, {"name": "table", "edit": "0", "value": "cluster_system_metrics", "type": "string"}, {"name":"period","type":"custom","control":"period_control","value":"","label":"Period"}, - {"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": "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_pcnt", "url": "iframe/jsp/single-series-chart-javascript.jsp", "title": "Cluster Metrics by Percentage", "description": "Display cluster related stats by percentage", "categories": "Syst em,Status", "parameters": [{"name": "y_axis_max", "edit": "0", "value": "100", "type": "string"}, {"name": "table", "edit": "0", "value": "cluster_system_metrics", "type": "string"}, {"name":"period","type":"custom","control":"period_control","value":"","label":"Period"}, {"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_b usy_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", "type": "radio", "options": [{"value": "on", "label": "On"}, {"value": "off", "label": "Off"}]}], "screendump": "/images/server_lo ad.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", "url": "jsp/cluster_selector.jsp", "id": "cluster_selector", "version": "0.1"}, {"id": "cluster_metrics", "url": "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","type":"custom","control":"period_control","value":"","label":"Period"}, {"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": "ta sk_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", "ty pe": "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", "url": "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","type":"custom","control":"period_control","value":"","label":"Period"}, -{"name": "metric", "value": ["load_15", "load_5", "load_1"], "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": "eth 0_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"}]], "colSize": [50, 49]}, {"title": "DFS Status", "columns": 2, "layout": [[{"id": "time", "url": "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.js p", "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": "dfs_fsnamesystem", "url": "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","type":"custom","control":"period_control","value":"","label":"Period"}, {"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_remai ning_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": "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"}]}, {"na me": "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", "url": "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","type":"custom","control":"period_control","value":"","label":"Period"}, {"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"}, {"val ue": "delete_file_ops", "label": "delete_file_ops"}, {"value": "files_created", "label": "files_created"}, {"value": "files_renamed", "label": "files_renamed"}, {"value": "files_deleted", "label": "files_deleted"}, {"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", "labe l": "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", "url": "jsp/cluster_selector.jsp", "id": "cluster_selector", "version": "0.1"}, {"id": "dfs_throughput", "url": "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","type":"custom","control":"period_control","value":"","label":"Period"}, {"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_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": "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_remote_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", "url": "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","type":"custom","control":"period_control","value":"","label":"Period"}, {"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_verifi cation_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_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": "rea ds_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_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]}]} +{"description":"default","pages":[{"title":"Cluster Status","layout":[[{"id":"time","title":"Time","description":"Global control to manipulate time across widgets","categories":"Global,Utility","parameters":[{"name":"time_zone","callback":"\/hicc\/jsp\/get_timezone_list.jsp","edit":1,"value":["UTC"],"label":"Time Zone","type":"select_callback"},{"name":"time_type","edit":1,"value":["range"],"label":"Style","type":"select","options":[{"value":"date","label":"Date Picker"},{"value":"range","label":"Time Period"},{"value":"slider","label":"Slider"}]}],"refresh":0,"url":"jsp\/time.jsp","version":"0.1"},{"id":"graph_explorer","title":"Graph Explorer","description":"Graph explorer for visualize data on Hbase.","categories":"Developer,Utilities","parameters":[{"name":"width","edit":1,"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":"1000","label":"1000"},{"value":"1200","label":"1200"}]},{"name":"height","edit":1,"value":["1000"],"label":"Height","type":"select","options":[{"value":"300","label":"300"},{"value":"400","label":"450"},{"value":"500","label":"600"},{"value":"800","label":"800"},{"value":"1000","label":"1000"},{"value":"1200","label":"1200"}]}],"refresh":0,"url":"iframe\/jsp\/graph_explorer.jsp","version":"0.1"}]],"columns":1,"colSize":[99]}],"name":"default","owner":"system","permissionType":"public"} From chukwa-commits-return-martinezgary@example.org Sat Dec 18 07:35:23 2010 Return-Path: <chukwa-commits-return-martinezgary@example.org> Delivered-To: martinezgary@example.org Received: (qmail 77508 invoked from network); 18 Dec 2010 07:35:23 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 18 Dec 2010 07:35:23 -0000 Received: (qmail 90515 invoked by uid 500); 18 Dec 2010 07:35:23 -0000 Delivered-To: martinezgary@example.org Received: (qmail 90492 invoked by uid 500); 18 Dec 2010 07:35:22 -0000 Mailing-List: contact martinezgary@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:martinezgary@example.org> List-Unsubscribe: <mailto:martinezgary@example.org> List-Post: <mailto:martinezgary@example.org> List-Id: <chukwa-commits.incubator.apache.org> Reply-To: martinezgary@example.org Delivered-To: mailing list martinezgary@example.org Received: (qmail 90484 invoked by uid 99); 18 Dec 2010 07:35:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 18 Dec 2010 07:35:21 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 18 Dec 2010 07:35:20 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 5C04123889E1; Sat, 18 Dec 2010 07:35:00 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1050592 - in /incubator/chukwa/trunk: ./ conf/ src/docs/src/documentation/content/xdocs/ src/java/org/apache/hadoop/chukwa/datastore/ src/java/org/apache/hadoop/chukwa/hicc/ src/java/org/apache/hadoop/chukwa/util/ src/web/hicc/jsp/ Date: Sat, 18 Dec 2010 07:35:00 -0000 To: martinezgary@example.org From: martinezgary@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <martinezgary@example.org> Author: eyang Date: Sat Dec 18 07:34:59 2010 New Revision: 1050592 URL: http://svn.apache.org/viewvc?rev=1050592&view=rev Log: CHUKWA-554. Remove jdbc.conf dependency from Chukwa. (Eric Yang) Removed: incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/util/WatchDog.java incubator/chukwa/trunk/src/web/hicc/jsp/get_user_list.jsp incubator/chukwa/trunk/src/web/hicc/jsp/hod_job.jsp incubator/chukwa/trunk/src/web/hicc/jsp/single-series-chart-javascript.jsp Modified: incubator/chukwa/trunk/CHANGES.txt incubator/chukwa/trunk/conf/README incubator/chukwa/trunk/src/docs/src/documentation/content/xdocs/admin.xml incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datastore/ChukwaHBaseStore.java incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/hicc/ClusterConfig.java incubator/chukwa/trunk/src/web/hicc/jsp/cluster_selector.jsp incubator/chukwa/trunk/src/web/hicc/jsp/event2_viewer.jsp Modified: incubator/chukwa/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/CHANGES.txt?rev=1050592&r1=1050591&r2=1050592&view=diff ============================================================================== --- incubator/chukwa/trunk/CHANGES.txt (original) +++ incubator/chukwa/trunk/CHANGES.txt Sat Dec 18 07:34:59 2010 @@ -28,6
{'source': 'Apache Software Foundation Public Mail Archives'}