You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chukwa.apache.org by ey...@apache.org on 2016/04/03 01:14:39 UTC
[1/3] chukwa git commit: CHUKWA-802. Updated Javadoc for Java 8
support. (Eric Yang)
Repository: chukwa
Updated Branches:
refs/heads/master 8329221c4 -> 8011ff1f5
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/util/XssFilter.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/util/XssFilter.java b/src/main/java/org/apache/hadoop/chukwa/util/XssFilter.java
index 1cf1267..56312cf 100644
--- a/src/main/java/org/apache/hadoop/chukwa/util/XssFilter.java
+++ b/src/main/java/org/apache/hadoop/chukwa/util/XssFilter.java
@@ -65,8 +65,8 @@ public class XssFilter {
/**
* Strips any potential XSS threats out of the value
- * @param value
- * @return
+ * @param value is a string
+ * @return filtered string
*/
public String filter( String value ) {
if( value == null )
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/metrics/spi/AbstractMetricsContext.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/metrics/spi/AbstractMetricsContext.java b/src/main/java/org/apache/hadoop/metrics/spi/AbstractMetricsContext.java
index 6ab1e39..60f18d4 100644
--- a/src/main/java/org/apache/hadoop/metrics/spi/AbstractMetricsContext.java
+++ b/src/main/java/org/apache/hadoop/metrics/spi/AbstractMetricsContext.java
@@ -42,12 +42,12 @@ import org.apache.hadoop.metrics.Updater;
/**
* The main class of the Service Provider Interface. This class should be
* extended in order to integrate the Metrics API with a specific metrics
- * client library. <p/>
+ * client library.
*
* This class implements the internal table of metric data, and the timer
* on which data is to be sent to the metrics system. Subclasses must
* override the abstract <code>emitRecord</code> method in order to transmit
- * the data. <p/>
+ * the data.
*/
public abstract class AbstractMetricsContext implements MetricsContext {
@@ -70,6 +70,8 @@ public abstract class AbstractMetricsContext implements MetricsContext {
}
/**
* Returns true if this tagmap contains every tag in other.
+ * @param other
+ * @return
*/
public boolean containsAll(TagMap other) {
for (Map.Entry<String,Object> entry : other.entrySet()) {
@@ -145,6 +147,7 @@ public abstract class AbstractMetricsContext implements MetricsContext {
/**
* Returns the factory by which this context was created.
+ * @return the factory by which the context was created
*/
public ContextFactory getContextFactory() {
return factory;
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/web/hicc/home/css/jquery.gridster.css
----------------------------------------------------------------------
diff --git a/src/main/web/hicc/home/css/jquery.gridster.css b/src/main/web/hicc/home/css/jquery.gridster.css
index 7f0d6ee..5b746b9 100755
--- a/src/main/web/hicc/home/css/jquery.gridster.css
+++ b/src/main/web/hicc/home/css/jquery.gridster.css
@@ -52,6 +52,15 @@ body {
width: 99%;
}
+ul.gridster {
+ white-space: nowrap;
+}
+
+ul.gridster li[class*="span"] {
+ display: inline-block;
+ float: none;
+}
+
.gridster > * {
-webkit-transition: height .4s, width .4s;
-moz-transition: height .4s, width .4s;
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/site/apt/user.apt
----------------------------------------------------------------------
diff --git a/src/site/apt/user.apt b/src/site/apt/user.apt
deleted file mode 100644
index 22d9790..0000000
--- a/src/site/apt/user.apt
+++ /dev/null
@@ -1,325 +0,0 @@
-~~ 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.
-~~
-
-Chukwa User Guide
-
- This chapter is the detailed configuration guide to Chukwa configuration.
-
- Please read this chapter carefully and ensure that all requirements have
-been satisfied. Failure to do so will cause you (and us) grief debugging
-strange errors and/or data loss.
-
- Chukwa uses the same configuration system as Hadoop. To configure a deploy,
-edit a file of environment variables in etc/chukwa/chukwa-env.sh -- this
-configuration is used mostly by the launcher shell scripts getting the
-cluster off the ground -- and then add configuration to an XML file to do
-things like override Chukwa defaults, tell Chukwa what Filesystem to use,
-or the location of the HBase configuration.
-
- When running in distributed mode, after you make an edit to an Chukwa
-configuration, make sure you copy the content of the conf directory to all
-nodes of the cluster. Chukwa will not do this for you. Use rsync.
-
-Pre-requisites
-
- Chukwa should work on any POSIX platform, but GNU/Linux is the only
-production platform that has been tested extensively. Chukwa has also been used
-successfully on Mac OS X, which several members of the Chukwa team use for
-development.
-
- The only absolute software requirements are Java 1.6 or better,
-ZooKeeper 3.4.x, HBase 0.96.x and Hadoop 1.x.
-
- The Chukwa cluster management scripts rely on <ssh>; these scripts, however,
-are not required if you have some alternate mechanism for starting and stopping
-daemons.
-
-Installing Chukwa
-
- A minimal Chukwa deployment has five components:
-
- * A Hadoop and HBase cluster on which Chukwa will process data (referred to as the Chukwa cluster).
-
- * One or more agent processes, that send monitoring data to HBase.
- The nodes with active agent processes are referred to as the monitored
- source nodes.
-
- * Data analytics script, summarize Hadoop Cluster Health.
-
- * HICC, the Chukwa visualization tool.
-
-[]
-
-[./images/chukwa_architecture.png] Chukwa Components
-
-* First Steps
-
- * Obtain a copy of Chukwa. You can find the latest release on the
- {{{http://hadoop.apache.org/chukwa/releases.html} Chukwa release page}}.
-
- * Un-tar the release, via <tar xzf>.
-
- * Make sure a copy of Chukwa is available on each node being monitored.
-
- * We refer to the directory containing Chukwa as <CHUKWA_HOME>. It may
-be helpful to set <CHUKWA_HOME> explicitly in your environment,
-but Chukwa does not require that you do so.
-
-* General Configuration
-
- * Make sure that <JAVA_HOME> is set correctly and points to a Java 1.6 JRE.
-It's generally best to set this in <etc/chukwa/chukwa-env.sh>.
-
- * In <etc/chukwa/chukwa-env.sh>, set <CHUKWA_LOG_DIR> and
-<CHUKWA_PID_DIR> to the directories where Chukwa should store its
-console logs and pid files. The pid directory must not be shared between
-different Chukwa instances: it should be local, not NFS-mounted.
-
- * Optionally, set CHUKWA_IDENT_STRING. This string is
- used to name Chukwa's own console log files.
-
-Agents
-
- Agents are the Chukwa processes that actually produce data. This section
-describes how to configure and run them. More details are available in the
-{{{./agent.html} Agent configuration guide}}.
-
-* Configuration
-
- First, edit <$CHUKWA_HOME/etc/chukwa/chukwa-env.sh> In addition to
-the general directions given above, you should set <HADOOP_CONF_DIR> and
-<HBASE_CONF_DIR>. This should be the Hadoop deployment Chukwa will use to
-store collected data. You will get a version mismatch error if this is
-configured incorrectly.
-
- Edit the <CHUKWA_HOME/etc/chukwa/initial_adaptors> configuration file.
-This is where you tell Chukwa what log files to monitor. See
-{{{./agent.html#Adaptors} the adaptor configuration guide}} for
-a list of available adaptors.
-
- There are a number of optional settings in
-<$CHUKWA_HOME/etc/chukwa/chukwa-agent-conf.xml>:
-
- * The most important of these is the cluster/group name that identifies the
-monitored source nodes. This value is stored in each Chunk of collected data;
-you can therefore use it to distinguish data coming from different groups of
-machines.
-
----
- <property>
- <name>chukwaAgent.tags</name>
- <value>cluster="demo"</value>
- <description>The cluster's name for this agent</description>
- </property>
----
-
- * Another important option is <chukwaAgent.checkpoint.dir>.
-This is the directory Chukwa will use for its periodic checkpoints of
-running adaptors. It <<must not>> be a shared directory; use a local,
-not NFS-mount, directory.
-
- * Setting the option <chukwaAgent.control.remote> will disallow remote
-connections to the agent control socket.
-
-** Use HBase For Data Storage
-
- * Configuring the pipeline: set HBaseWriter as your writer, or add it
- to the pipeline if you are using
-
----
- <property>
- <name>chukwa.agent.connector</name>
- <value>org.apache.hadoop.chukwa.datacollection.connector.PipelineConnector</value>
- </property>
-
- <property>
- <name>chukwa.pipeline</name>
- <value>org.apache.hadoop.chukwa.datacollection.writer.hbase.HBaseWriter</value>
- </property>
----
-
-** Use HDFS For Data Storage
-
- The one mandatory configuration parameter is <writer.hdfs.filesystem>.
-This should be set to the HDFS root URL on which Chukwa will store data.
-Various optional configuration options are described in
-{{{./pipeline.html} the pipeline configuration guide}}.
-
-* Starting, Stopping, And Monitoring
-
- To run an agent process on a single node, use <bin/chukwa agent>.
-
- Typically, agents run as daemons. The script <bin/start-agents.sh>
-will ssh to each machine listed in <etc/chukwa/agents> and start an agent,
-running in the background. The script <bin/stop-agents.sh>
-does the reverse.
-
- You can, of course, use any other daemon-management system you like.
-For instance, <tools/init.d> includes init scripts for running
-Chukwa agents.
-
- To check if an agent is working properly, you can telnet to the control
-port (9093 by default) and hit "enter". You will get a status message if
-the agent is running normally.
-
-Configuring Hadoop For Monitoring
-
- One of the key goals for Chukwa is to collect logs from Hadoop clusters.
-This section describes how to configure Hadoop to send its logs to Chukwa.
-Note that these directions require Hadoop 0.20.205.0+. Earlier versions of
-Hadoop do not have the hooks that Chukwa requires in order to grab
-MapReduce job logs.
-
- The Hadoop configuration files are located in <HADOOP_HOME/etc/hadoop>.
-To setup Chukwa to collect logs from Hadoop, you need to change some of the
-Hadoop configuration files.
-
- * Copy CHUKWA_HOME/etc/chukwa/hadoop-log4j.properties file to HADOOP_CONF_DIR/log4j.properties
-
- * Copy CHUKWA_HOME/etc/chukwa/hadoop-metrics2.properties file to HADOOP_CONF_DIR/hadoop-metrics2.properties
-
- * Edit HADOOP_HOME/etc/hadoop/hadoop-metrics2.properties file and change $CHUKWA_LOG_DIR to your actual CHUKWA log dirctory (ie, CHUKWA_HOME/var/log)
-
-Setup HBase Table
-
- Chukwa is moving towards a model of using HBase to store metrics data to
-allow real-time charting. This section describes how to configure HBase and
-HICC to work together.
-
- * Presently, we support HBase 0.96+. If you have older HBase jars anywhere,
-they will cause linkage errors. Check for and remove them.
-
- * Setting up tables:
-
----
-hbase/bin/hbase shell < etc/chukwa/hbase.schema
----
-
-ETL Processes (Optional)
-
- For storing data to HDFS, the archive and demux mapreduce jobs can be
-started by running:
-
----
-CHUKWA_HOME/bin/chukwa archive
----
-
- Demux mapreduce jobs can be started by rnning:
-
----
-CHUKWA_HOME/bin/chukwa demux
----
-
-Setup Cluster Aggregation Script
-
- For data analytics with Apache Pig, there are some additional environment setup. Apache Pig does not use the same environment variable name as Hadoop, therefore make sure the following environment are setup correctly:
-
- [[1]] Download and setup Apache Pig 0.9.1.
-
- [[2]] Define Apache Pig class path:
-
----
-export PIG_CLASSPATH=$HADOOP_CONF_DIR:$HBASE_CONF_DIR
----
-
- [[3]] Create a jar file of HBASE_CONF_DIR, run:
-
----
-jar cf $CHUKWA_HOME/hbase-env.jar $HBASE_CONF_DIR
----
-
- [[4]] Setup a cron job or Hudson job for analytics script to run periodically:
-
----
-pig -Dpig.additional.jars=${HBASE_HOME}/hbase-0.90.4.jar:${HBASE_HOME}/lib/zookeeper-3.3.2.jar:${PIG_PATH}/pig.jar:${CHUKWA_HOME}/hbase-env.jar ${CHUKWA_HOME}/script/pig/ClusterSummary.pig
----
-
-HICC
-
-* Configuration
-
- Edit <etc/chukwa/auth.conf> and add authorized user to the list.
-
-* Starting, Stopping, And Monitoring
-
- The Hadoop Infrastructure Care Center (HICC) is the Chukwa web user interface.
-HICC is started by invoking
-
----
-bin/chukwa hicc
----
-
- Once the webcontainer with HICC has been started, point your favorite
-browser to:
-
----
-http://<server>:4080/hicc
----
-
-Troubleshooting Tips
-
-* UNIX Processes For Chukwa Agents
-
- The Chukwa agent process name is identified by:
-
----
-org.apache.hadoop.chukwa.datacollection.agent.ChukwaAgent
----
-
- Command line to use to search for the process name:
-
----
-ps ax | grep org.apache.hadoop.chukwa.datacollection.agent.ChukwaAgent
----
-
-* UNIX Processes For Chukwa Data Processes
-
- Chukwa Data Processors are identified by:
-
----
-org.apache.hadoop.chukwa.extraction.demux.Demux
-org.apache.hadoop.chukwa.extraction.database.DatabaseLoader
-org.apache.hadoop.chukwa.extraction.archive.ChukwaArchiveBuilder
----
-
- The processes are scheduled execution, therefore they are not always
-visible from the process list.
-
-* Checks For Disk Full
-
- If anything is wrong, use /etc/init.d/chukwa-agent stop to shutdown Chukwa.
-Look at agent.log file to determine the problems.
-
- The most common problem is the log files are growing unbounded. Set up a
-cron job to remove old log files:
-
----
- 0 12 * * * CHUKWA_HOME/tools/expiration.sh 10 $CHUKWA_HOME/var/log nowait
----
-
- This will set up the log file expiration for CHUKWA_HOME/var/log for
-log files older than 10 days.
-
-* Emergency Shutdown Procedure
-
- If the system is not functioning properly and you cannot find an answer in
-the Administration Guide, execute the kill command. The current state of
-the java process will be written to the log files. You can analyze
-these files to determine the cause of the problem.
-
----
-kill -3 <pid>
----
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/test/java/org/apache/hadoop/chukwa/extraction/archive/TestArchive.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/hadoop/chukwa/extraction/archive/TestArchive.java b/src/test/java/org/apache/hadoop/chukwa/extraction/archive/TestArchive.java
index e6de381..c2ca9c1 100644
--- a/src/test/java/org/apache/hadoop/chukwa/extraction/archive/TestArchive.java
+++ b/src/test/java/org/apache/hadoop/chukwa/extraction/archive/TestArchive.java
@@ -67,6 +67,7 @@ public class TestArchive extends TestCase {
/**
* Writes a single chunk to a file, checks that archiver delivers it
* to an archive file with correct filename.
+ * @throws Exception
*/
public void testArchiving() throws Exception {
FileSystem fileSys;
[2/3] chukwa git commit: CHUKWA-802. Updated Javadoc for Java 8
support. (Eric Yang)
Posted by ey...@apache.org.
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/datacollection/writer/gora/ChukwaChunk.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/datacollection/writer/gora/ChukwaChunk.java b/src/main/java/org/apache/hadoop/chukwa/datacollection/writer/gora/ChukwaChunk.java
index 61c61f0..cde6d90 100644
--- a/src/main/java/org/apache/hadoop/chukwa/datacollection/writer/gora/ChukwaChunk.java
+++ b/src/main/java/org/apache/hadoop/chukwa/datacollection/writer/gora/ChukwaChunk.java
@@ -20,21 +20,29 @@
*
* DO NOT EDIT DIRECTLY
*/
-package org.apache.hadoop.chukwa.datacollection.writer.gora;
-/** Chukwa Adaptors emit data in Chunks. A Chunk is a sequence of bytes, with some metadata. Several of these are set automatically by the Agent or Adaptors. Two of them require user intervention: cluster name and datatype. Cluster name is specified in conf/chukwa-agent-conf.xml, and is global to each Agent process. Datatype describes the expected format of the data collected by an Adaptor instance, and it is specified when that instance is started. */
+package org.apache.hadoop.chukwa.datacollection.writer.gora;
+
+/**
+ * Chukwa Adaptors emit data in Chunks. A Chunk is a sequence of bytes, with
+ * some metadata. Several of these are set automatically by the Agent or
+ * Adaptors. Two of them require user intervention: cluster name and datatype.
+ * Cluster name is specified in conf/chukwa-agent-conf.xml, and is global to
+ * each Agent process. Datatype describes the expected format of the data
+ * collected by an Adaptor instance, and it is specified when that instance is
+ * started.
+ */
@SuppressWarnings("all")
-public class ChukwaChunk extends org.apache.gora.persistency.impl.PersistentBase implements org.apache.avro.specific.SpecificRecord, org.apache.gora.persistency.Persistent {
- public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"ChukwaChunk\",\"namespace\":\"org.apache.hadoop.chukwa.datacollection.writer.gora\",\"doc\":\"Chukwa Adaptors emit data in Chunks. A Chunk is a sequence of bytes, with some metadata. Several of these are set automatically by the Agent or Adaptors. Two of them require user intervention: cluster name and datatype. Cluster name is specified in conf/chukwa-agent-conf.xml, and is global to each Agent process. Datatype describes the expected format of the data collected by an Adaptor instance, and it is specified when that instance is started. \",\"fields\":[{\"name\":\"source\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"tags\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"datatype\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"sequenceID\",\"type\":[\"null\",\"long\"],\"default\":null},{\"name\":\"name\",\"type\
":[\"null\",\"string\"],\"default\":null},{\"name\":\"data\",\"type\":[\"null\",\"bytes\"],\"default\":null}]}");
+public class ChukwaChunk extends org.apache.gora.persistency.impl.PersistentBase
+ implements org.apache.avro.specific.SpecificRecord,
+ org.apache.gora.persistency.Persistent {
+ public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser()
+ .parse(
+ "{\"type\":\"record\",\"name\":\"ChukwaChunk\",\"namespace\":\"org.apache.hadoop.chukwa.datacollection.writer.gora\",\"doc\":\"Chukwa Adaptors emit data in Chunks. A Chunk is a sequence of bytes, with some metadata. Several of these are set automatically by the Agent or Adaptors. Two of them require user intervention: cluster name and datatype. Cluster name is specified in conf/chukwa-agent-conf.xml, and is global to each Agent process. Datatype describes the expected format of the data collected by an Adaptor instance, and it is specified when that instance is started. \",\"fields\":[{\"name\":\"source\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"tags\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"datatype\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"sequenceID\",\"type\":[\"null\",\"long\"],\"default\":null},{\"name\":\"name\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"data\",\"type\":[\"null\",\"bytes
\"],\"default\":null}]}");
/** Enum containing all data bean's fields. */
public static enum Field {
- SOURCE(0, "source"),
- TAGS(1, "tags"),
- DATATYPE(2, "datatype"),
- SEQUENCE_ID(3, "sequenceID"),
- NAME(4, "name"),
- DATA(5, "data"),
- ;
+ SOURCE(0, "source"), TAGS(1, "tags"), DATATYPE(2, "datatype"), SEQUENCE_ID(
+ 3, "sequenceID"), NAME(4, "name"), DATA(5, "data"),;
/**
* Field's index.
*/
@@ -47,41 +55,51 @@ public class ChukwaChunk extends org.apache.gora.persistency.impl.PersistentBase
/**
* Field's constructor
- * @param index field's index.
- * @param name field's name.
+ *
+ * @param index
+ * field's index.
+ * @param name
+ * field's name.
*/
- Field(int index, String name) {this.index=index;this.name=name;}
+ Field(int index, String name) {
+ this.index = index;
+ this.name = name;
+ }
/**
* Gets field's index.
+ *
* @return int field's index.
*/
- public int getIndex() {return index;}
+ public int getIndex() {
+ return index;
+ }
/**
* Gets field's name.
+ *
* @return String field's name.
*/
- public String getName() {return name;}
+ public String getName() {
+ return name;
+ }
/**
* Gets field's attributes to string.
+ *
* @return String field's attributes to string.
*/
- public String toString() {return name;}
+ public String toString() {
+ return name;
+ }
};
- public static final String[] _ALL_FIELDS = {
- "source",
- "tags",
- "datatype",
- "sequenceID",
- "name",
- "data",
- };
+ public static final String[] _ALL_FIELDS = { "source", "tags", "datatype",
+ "sequenceID", "name", "data", };
/**
* Gets the total field count.
+ *
* @return int field count
*/
public int getFieldsCount() {
@@ -94,36 +112,62 @@ public class ChukwaChunk extends org.apache.gora.persistency.impl.PersistentBase
private java.lang.Long sequenceID;
private java.lang.CharSequence name;
private java.nio.ByteBuffer data;
- public org.apache.avro.Schema getSchema() { return SCHEMA$; }
- // Used by DatumWriter. Applications should not call.
+
+ public org.apache.avro.Schema getSchema() {
+ return SCHEMA$;
+ }
+
+ // Used by DatumWriter. Applications should not call.
public java.lang.Object get(int field$) {
switch (field$) {
- case 0: return source;
- case 1: return tags;
- case 2: return datatype;
- case 3: return sequenceID;
- case 4: return name;
- case 5: return data;
- default: throw new org.apache.avro.AvroRuntimeException("Bad index");
+ case 0:
+ return source;
+ case 1:
+ return tags;
+ case 2:
+ return datatype;
+ case 3:
+ return sequenceID;
+ case 4:
+ return name;
+ case 5:
+ return data;
+ default:
+ throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
-
- // Used by DatumReader. Applications should not call.
- @SuppressWarnings(value="unchecked")
+
+ // Used by DatumReader. Applications should not call.
+ @SuppressWarnings(value = "unchecked")
public void put(int field$, java.lang.Object value) {
switch (field$) {
- case 0: source = (java.lang.CharSequence)(value); break;
- case 1: tags = (java.lang.CharSequence)(value); break;
- case 2: datatype = (java.lang.CharSequence)(value); break;
- case 3: sequenceID = (java.lang.Long)(value); break;
- case 4: name = (java.lang.CharSequence)(value); break;
- case 5: data = (java.nio.ByteBuffer)(value); break;
- default: throw new org.apache.avro.AvroRuntimeException("Bad index");
+ case 0:
+ source = (java.lang.CharSequence) (value);
+ break;
+ case 1:
+ tags = (java.lang.CharSequence) (value);
+ break;
+ case 2:
+ datatype = (java.lang.CharSequence) (value);
+ break;
+ case 3:
+ sequenceID = (java.lang.Long) (value);
+ break;
+ case 4:
+ name = (java.lang.CharSequence) (value);
+ break;
+ case 5:
+ data = (java.nio.ByteBuffer) (value);
+ break;
+ default:
+ throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
/**
* Gets the value of the 'source' field.
+ *
+ * @return source
*/
public java.lang.CharSequence getSource() {
return source;
@@ -131,16 +175,19 @@ public class ChukwaChunk extends org.apache.gora.persistency.impl.PersistentBase
/**
* Sets the value of the 'source' field.
- * @param value the value to set.
+ *
+ * @param value is the value to set.
*/
public void setSource(java.lang.CharSequence value) {
this.source = value;
setDirty(0);
}
-
+
/**
- * Checks the dirty status of the 'source' field. A field is dirty if it represents a change that has not yet been written to the database.
- * @param value the value to set.
+ * Checks the dirty status of the 'source' field. A field is dirty if it
+ * represents a change that has not yet been written to the database.
+ *
+ * @return true if a sourcefield has not been written to database
*/
public boolean isSourceDirty() {
return isDirty(0);
@@ -148,6 +195,8 @@ public class ChukwaChunk extends org.apache.gora.persistency.impl.PersistentBase
/**
* Gets the value of the 'tags' field.
+ *
+ * @return value of tags field
*/
public java.lang.CharSequence getTags() {
return tags;
@@ -155,16 +204,19 @@ public class ChukwaChunk extends org.apache.gora.persistency.impl.PersistentBase
/**
* Sets the value of the 'tags' field.
- * @param value the value to set.
+ *
+ * @param value is the value to set.
*/
public void setTags(java.lang.CharSequence value) {
this.tags = value;
setDirty(1);
}
-
+
/**
- * Checks the dirty status of the 'tags' field. A field is dirty if it represents a change that has not yet been written to the database.
- * @param value the value to set.
+ * Checks the dirty status of the 'tags' field. A field is dirty if it
+ * represents a change that has not yet been written to the database.
+ *
+ * @return true if tags field has not been written to database
*/
public boolean isTagsDirty() {
return isDirty(1);
@@ -172,6 +224,8 @@ public class ChukwaChunk extends org.apache.gora.persistency.impl.PersistentBase
/**
* Gets the value of the 'datatype' field.
+ *
+ * @return datatype field
*/
public java.lang.CharSequence getDatatype() {
return datatype;
@@ -179,16 +233,19 @@ public class ChukwaChunk extends org.apache.gora.persistency.impl.PersistentBase
/**
* Sets the value of the 'datatype' field.
- * @param value the value to set.
+ *
+ * @param value is the value to set.
*/
public void setDatatype(java.lang.CharSequence value) {
this.datatype = value;
setDirty(2);
}
-
+
/**
- * Checks the dirty status of the 'datatype' field. A field is dirty if it represents a change that has not yet been written to the database.
- * @param value the value to set.
+ * Checks the dirty status of the 'datatype' field. A field is dirty if it
+ * represents a change that has not yet been written to the database.
+ *
+ * @return true if datatype field has not been written to database
*/
public boolean isDatatypeDirty() {
return isDirty(2);
@@ -196,6 +253,8 @@ public class ChukwaChunk extends org.apache.gora.persistency.impl.PersistentBase
/**
* Gets the value of the 'sequenceID' field.
+ *
+ * @return sequenceID
*/
public java.lang.Long getSequenceID() {
return sequenceID;
@@ -203,16 +262,19 @@ public class ChukwaChunk extends org.apache.gora.persistency.impl.PersistentBase
/**
* Sets the value of the 'sequenceID' field.
- * @param value the value to set.
+ *
+ * @param value is the value to set.
*/
public void setSequenceID(java.lang.Long value) {
this.sequenceID = value;
setDirty(3);
}
-
+
/**
- * Checks the dirty status of the 'sequenceID' field. A field is dirty if it represents a change that has not yet been written to the database.
- * @param value the value to set.
+ * Checks the dirty status of the 'sequenceID' field. A field is dirty if it
+ * represents a change that has not yet been written to the database.
+ *
+ * @return true if sequenceID has not been commit to database
*/
public boolean isSequenceIDDirty() {
return isDirty(3);
@@ -220,6 +282,8 @@ public class ChukwaChunk extends org.apache.gora.persistency.impl.PersistentBase
/**
* Gets the value of the 'name' field.
+ *
+ * @return name
*/
public java.lang.CharSequence getName() {
return name;
@@ -227,16 +291,19 @@ public class ChukwaChunk extends org.apache.gora.persistency.impl.PersistentBase
/**
* Sets the value of the 'name' field.
- * @param value the value to set.
+ *
+ * @param value is the value to set.
*/
public void setName(java.lang.CharSequence value) {
this.name = value;
setDirty(4);
}
-
+
/**
- * Checks the dirty status of the 'name' field. A field is dirty if it represents a change that has not yet been written to the database.
- * @param value the value to set.
+ * Checks the dirty status of the 'name' field. A field is dirty if it
+ * represents a change that has not yet been written to the database.
+ *
+ * @return true if name has not been committed to database
*/
public boolean isNameDirty() {
return isDirty(4);
@@ -244,6 +311,8 @@ public class ChukwaChunk extends org.apache.gora.persistency.impl.PersistentBase
/**
* Gets the value of the 'data' field.
+ *
+ * @return data field
*/
public java.nio.ByteBuffer getData() {
return data;
@@ -251,36 +320,59 @@ public class ChukwaChunk extends org.apache.gora.persistency.impl.PersistentBase
/**
* Sets the value of the 'data' field.
- * @param value the value to set.
+ *
+ * @param value is a string
+ * the value to set.
*/
public void setData(java.nio.ByteBuffer value) {
this.data = value;
setDirty(5);
}
-
+
/**
- * Checks the dirty status of the 'data' field. A field is dirty if it represents a change that has not yet been written to the database.
- * @param value the value to set.
+ * Checks the dirty status of the 'data' field. A field is dirty if it
+ * represents a change that has not yet been written to the database.
+ *
+ * @return true if data field has not been committed to database
*/
public boolean isDataDirty() {
return isDirty(5);
}
- /** Creates a new ChukwaChunk RecordBuilder */
+ /**
+ * Creates a new ChukwaChunk RecordBuilder
+ *
+ * @return RecordBuilder
+ */
public static org.apache.hadoop.chukwa.datacollection.writer.gora.ChukwaChunk.Builder newBuilder() {
return new org.apache.hadoop.chukwa.datacollection.writer.gora.ChukwaChunk.Builder();
}
-
- /** Creates a new ChukwaChunk RecordBuilder by copying an existing Builder */
- public static org.apache.hadoop.chukwa.datacollection.writer.gora.ChukwaChunk.Builder newBuilder(org.apache.hadoop.chukwa.datacollection.writer.gora.ChukwaChunk.Builder other) {
- return new org.apache.hadoop.chukwa.datacollection.writer.gora.ChukwaChunk.Builder(other);
+
+ /**
+ * Creates a new ChukwaChunk RecordBuilder by copying an existing Builder
+ *
+ * @param other is Chukwa chunk
+ * @return RecordBuilder
+ */
+ public static org.apache.hadoop.chukwa.datacollection.writer.gora.ChukwaChunk.Builder newBuilder(
+ org.apache.hadoop.chukwa.datacollection.writer.gora.ChukwaChunk.Builder other) {
+ return new org.apache.hadoop.chukwa.datacollection.writer.gora.ChukwaChunk.Builder(
+ other);
}
-
- /** Creates a new ChukwaChunk RecordBuilder by copying an existing ChukwaChunk instance */
- public static org.apache.hadoop.chukwa.datacollection.writer.gora.ChukwaChunk.Builder newBuilder(org.apache.hadoop.chukwa.datacollection.writer.gora.ChukwaChunk other) {
- return new org.apache.hadoop.chukwa.datacollection.writer.gora.ChukwaChunk.Builder(other);
+
+ /**
+ * Creates a new ChukwaChunk RecordBuilder by copying an existing ChukwaChunk
+ * instance
+ *
+ * @param other is Chukwa chunk
+ * @return RecordBuilder
+ */
+ public static org.apache.hadoop.chukwa.datacollection.writer.gora.ChukwaChunk.Builder newBuilder(
+ org.apache.hadoop.chukwa.datacollection.writer.gora.ChukwaChunk other) {
+ return new org.apache.hadoop.chukwa.datacollection.writer.gora.ChukwaChunk.Builder(
+ other);
}
-
+
private static java.nio.ByteBuffer deepCopyToReadOnlyBuffer(
java.nio.ByteBuffer input) {
java.nio.ByteBuffer copy = java.nio.ByteBuffer.allocate(input.capacity());
@@ -303,12 +395,13 @@ public class ChukwaChunk extends org.apache.gora.persistency.impl.PersistentBase
copy.limit(limit);
return copy.asReadOnlyBuffer();
}
-
+
/**
* RecordBuilder for ChukwaChunk instances.
*/
- public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<ChukwaChunk>
- implements org.apache.avro.data.RecordBuilder<ChukwaChunk> {
+ public static class Builder
+ extends org.apache.avro.specific.SpecificRecordBuilderBase<ChukwaChunk>
+ implements org.apache.avro.data.RecordBuilder<ChukwaChunk> {
private java.lang.CharSequence source;
private java.lang.CharSequence tags;
@@ -319,364 +412,518 @@ public class ChukwaChunk extends org.apache.gora.persistency.impl.PersistentBase
/** Creates a new Builder */
private Builder() {
- super(org.apache.hadoop.chukwa.datacollection.writer.gora.ChukwaChunk.SCHEMA$);
+ super(
+ org.apache.hadoop.chukwa.datacollection.writer.gora.ChukwaChunk.SCHEMA$);
}
-
+
/** Creates a Builder by copying an existing Builder */
- private Builder(org.apache.hadoop.chukwa.datacollection.writer.gora.ChukwaChunk.Builder other) {
+ private Builder(
+ org.apache.hadoop.chukwa.datacollection.writer.gora.ChukwaChunk.Builder other) {
super(other);
}
-
+
/** Creates a Builder by copying an existing ChukwaChunk instance */
- private Builder(org.apache.hadoop.chukwa.datacollection.writer.gora.ChukwaChunk other) {
- super(org.apache.hadoop.chukwa.datacollection.writer.gora.ChukwaChunk.SCHEMA$);
+ private Builder(
+ org.apache.hadoop.chukwa.datacollection.writer.gora.ChukwaChunk other) {
+ super(
+ org.apache.hadoop.chukwa.datacollection.writer.gora.ChukwaChunk.SCHEMA$);
if (isValidValue(fields()[0], other.source)) {
- this.source = (java.lang.CharSequence) data().deepCopy(fields()[0].schema(), other.source);
+ this.source = (java.lang.CharSequence) data()
+ .deepCopy(fields()[0].schema(), other.source);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.tags)) {
- this.tags = (java.lang.CharSequence) data().deepCopy(fields()[1].schema(), other.tags);
+ this.tags = (java.lang.CharSequence) data()
+ .deepCopy(fields()[1].schema(), other.tags);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.datatype)) {
- this.datatype = (java.lang.CharSequence) data().deepCopy(fields()[2].schema(), other.datatype);
+ this.datatype = (java.lang.CharSequence) data()
+ .deepCopy(fields()[2].schema(), other.datatype);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.sequenceID)) {
- this.sequenceID = (java.lang.Long) data().deepCopy(fields()[3].schema(), other.sequenceID);
+ this.sequenceID = (java.lang.Long) data().deepCopy(fields()[3].schema(),
+ other.sequenceID);
fieldSetFlags()[3] = true;
}
if (isValidValue(fields()[4], other.name)) {
- this.name = (java.lang.CharSequence) data().deepCopy(fields()[4].schema(), other.name);
+ this.name = (java.lang.CharSequence) data()
+ .deepCopy(fields()[4].schema(), other.name);
fieldSetFlags()[4] = true;
}
if (isValidValue(fields()[5], other.data)) {
- this.data = (java.nio.ByteBuffer) data().deepCopy(fields()[5].schema(), other.data);
+ this.data = (java.nio.ByteBuffer) data().deepCopy(fields()[5].schema(),
+ other.data);
fieldSetFlags()[5] = true;
}
}
- /** Gets the value of the 'source' field */
+ /**
+ * Gets the value of the 'source' field
+ *
+ * @return source field
+ */
public java.lang.CharSequence getSource() {
return source;
}
-
- /** Sets the value of the 'source' field */
- public org.apache.hadoop.chukwa.datacollection.writer.gora.ChukwaChunk.Builder setSource(java.lang.CharSequence value) {
+
+ /**
+ * Sets the value of the 'source' field
+ *
+ * @param value is a string
+ * @return RecordBuilder
+ */
+ public org.apache.hadoop.chukwa.datacollection.writer.gora.ChukwaChunk.Builder setSource(
+ java.lang.CharSequence value) {
validate(fields()[0], value);
this.source = value;
fieldSetFlags()[0] = true;
- return this;
+ return this;
}
-
- /** Checks whether the 'source' field has been set */
+
+ /**
+ * Checks whether the 'source' field has been set
+ *
+ * @return true if source field has been set
+ */
public boolean hasSource() {
return fieldSetFlags()[0];
}
-
- /** Clears the value of the 'source' field */
+
+ /**
+ * Clears the value of the 'source' field
+ *
+ * @return RecordBuilder
+ */
public org.apache.hadoop.chukwa.datacollection.writer.gora.ChukwaChunk.Builder clearSource() {
source = null;
fieldSetFlags()[0] = false;
return this;
}
-
- /** Gets the value of the 'tags' field */
+
+ /**
+ * Gets the value of the 'tags' field
+ *
+ * @return tags field
+ */
public java.lang.CharSequence getTags() {
return tags;
}
-
- /** Sets the value of the 'tags' field */
- public org.apache.hadoop.chukwa.datacollection.writer.gora.ChukwaChunk.Builder setTags(java.lang.CharSequence value) {
+
+ /**
+ * Sets the value of the 'tags' field
+ *
+ * @param value is a string
+ * @return RecordBuilder
+ */
+ public org.apache.hadoop.chukwa.datacollection.writer.gora.ChukwaChunk.Builder setTags(
+ java.lang.CharSequence value) {
validate(fields()[1], value);
this.tags = value;
fieldSetFlags()[1] = true;
- return this;
+ return this;
}
-
- /** Checks whether the 'tags' field has been set */
+
+ /**
+ * Checks whether the 'tags' field has been set
+ *
+ * @return true if tags has been set
+ */
public boolean hasTags() {
return fieldSetFlags()[1];
}
-
- /** Clears the value of the 'tags' field */
+
+ /**
+ * Clears the value of the 'tags' field
+ *
+ * @return RecordBuilder
+ */
public org.apache.hadoop.chukwa.datacollection.writer.gora.ChukwaChunk.Builder clearTags() {
tags = null;
fieldSetFlags()[1] = false;
return this;
}
-
- /** Gets the value of the 'datatype' field */
+
+ /**
+ * Gets the value of the 'datatype' field
+ *
+ * @return datatype field
+ */
public java.lang.CharSequence getDatatype() {
return datatype;
}
-
- /** Sets the value of the 'datatype' field */
- public org.apache.hadoop.chukwa.datacollection.writer.gora.ChukwaChunk.Builder setDatatype(java.lang.CharSequence value) {
+
+ /**
+ * Sets the value of the 'datatype' field
+ *
+ * @param value is a string
+ * @return RecordBuilder
+ */
+ public org.apache.hadoop.chukwa.datacollection.writer.gora.ChukwaChunk.Builder setDatatype(
+ java.lang.CharSequence value) {
validate(fields()[2], value);
this.datatype = value;
fieldSetFlags()[2] = true;
- return this;
+ return this;
}
-
- /** Checks whether the 'datatype' field has been set */
+
+ /**
+ * Checks whether the 'datatype' field has been set
+ *
+ * @return true if datatype field has been set
+ */
public boolean hasDatatype() {
return fieldSetFlags()[2];
}
-
- /** Clears the value of the 'datatype' field */
+
+ /**
+ * Clears the value of the 'datatype' field
+ *
+ * @return RecordBuilder
+ */
public org.apache.hadoop.chukwa.datacollection.writer.gora.ChukwaChunk.Builder clearDatatype() {
datatype = null;
fieldSetFlags()[2] = false;
return this;
}
-
- /** Gets the value of the 'sequenceID' field */
+
+ /**
+ * Gets the value of the 'sequenceID' field
+ *
+ * @return sequenceID
+ */
public java.lang.Long getSequenceID() {
return sequenceID;
}
-
- /** Sets the value of the 'sequenceID' field */
- public org.apache.hadoop.chukwa.datacollection.writer.gora.ChukwaChunk.Builder setSequenceID(java.lang.Long value) {
+
+ /**
+ * Sets the value of the 'sequenceID' field
+ *
+ * @param value is a string
+ * @return RecordBuilder
+ */
+ public org.apache.hadoop.chukwa.datacollection.writer.gora.ChukwaChunk.Builder setSequenceID(
+ java.lang.Long value) {
validate(fields()[3], value);
this.sequenceID = value;
fieldSetFlags()[3] = true;
- return this;
+ return this;
}
-
- /** Checks whether the 'sequenceID' field has been set */
+
+ /**
+ * Checks whether the 'sequenceID' field has been set
+ *
+ * @return true if sequenceID has been set
+ */
public boolean hasSequenceID() {
return fieldSetFlags()[3];
}
-
- /** Clears the value of the 'sequenceID' field */
+
+ /**
+ * Clears the value of the 'sequenceID' field
+ *
+ * @return RecordBuilder
+ */
public org.apache.hadoop.chukwa.datacollection.writer.gora.ChukwaChunk.Builder clearSequenceID() {
sequenceID = null;
fieldSetFlags()[3] = false;
return this;
}
-
- /** Gets the value of the 'name' field */
+
+ /**
+ * Gets the value of the 'name' field
+ *
+ * @return name
+ */
public java.lang.CharSequence getName() {
return name;
}
-
- /** Sets the value of the 'name' field */
- public org.apache.hadoop.chukwa.datacollection.writer.gora.ChukwaChunk.Builder setName(java.lang.CharSequence value) {
+
+ /**
+ * Sets the value of the 'name' field
+ *
+ * @param value is a string
+ * @return RecordBuilder
+ */
+ public org.apache.hadoop.chukwa.datacollection.writer.gora.ChukwaChunk.Builder setName(
+ java.lang.CharSequence value) {
validate(fields()[4], value);
this.name = value;
fieldSetFlags()[4] = true;
- return this;
+ return this;
}
-
- /** Checks whether the 'name' field has been set */
+
+ /**
+ * Checks whether the 'name' field has been set
+ *
+ * @return true if name field has been set
+ */
public boolean hasName() {
return fieldSetFlags()[4];
}
-
- /** Clears the value of the 'name' field */
+
+ /**
+ * Clears the value of the 'name' field
+ *
+ * @return RecordBuilder
+ */
public org.apache.hadoop.chukwa.datacollection.writer.gora.ChukwaChunk.Builder clearName() {
name = null;
fieldSetFlags()[4] = false;
return this;
}
-
- /** Gets the value of the 'data' field */
+
+ /**
+ * Gets the value of the 'data' field
+ *
+ * @return data
+ */
public java.nio.ByteBuffer getData() {
return data;
}
-
- /** Sets the value of the 'data' field */
- public org.apache.hadoop.chukwa.datacollection.writer.gora.ChukwaChunk.Builder setData(java.nio.ByteBuffer value) {
+
+ /**
+ * Sets the value of the 'data' field
+ *
+ * @param value is a string
+ * @return RecordBudiler
+ */
+ public org.apache.hadoop.chukwa.datacollection.writer.gora.ChukwaChunk.Builder setData(
+ java.nio.ByteBuffer value) {
validate(fields()[5], value);
this.data = value;
fieldSetFlags()[5] = true;
- return this;
+ return this;
}
-
- /** Checks whether the 'data' field has been set */
+
+ /**
+ * Checks whether the 'data' field has been set
+ *
+ * @return true if data field has been set
+ */
public boolean hasData() {
return fieldSetFlags()[5];
}
-
- /** Clears the value of the 'data' field */
+
+ /**
+ * Clears the value of the 'data' field
+ *
+ * @return RecordBuilder
+ */
public org.apache.hadoop.chukwa.datacollection.writer.gora.ChukwaChunk.Builder clearData() {
data = null;
fieldSetFlags()[5] = false;
return this;
}
-
+
@Override
public ChukwaChunk build() {
try {
ChukwaChunk record = new ChukwaChunk();
- record.source = fieldSetFlags()[0] ? this.source : (java.lang.CharSequence) defaultValue(fields()[0]);
- record.tags = fieldSetFlags()[1] ? this.tags : (java.lang.CharSequence) defaultValue(fields()[1]);
- record.datatype = fieldSetFlags()[2] ? this.datatype : (java.lang.CharSequence) defaultValue(fields()[2]);
- record.sequenceID = fieldSetFlags()[3] ? this.sequenceID : (java.lang.Long) defaultValue(fields()[3]);
- record.name = fieldSetFlags()[4] ? this.name : (java.lang.CharSequence) defaultValue(fields()[4]);
- record.data = fieldSetFlags()[5] ? this.data : (java.nio.ByteBuffer) defaultValue(fields()[5]);
+ record.source = fieldSetFlags()[0] ? this.source
+ : (java.lang.CharSequence) defaultValue(fields()[0]);
+ record.tags = fieldSetFlags()[1] ? this.tags
+ : (java.lang.CharSequence) defaultValue(fields()[1]);
+ record.datatype = fieldSetFlags()[2] ? this.datatype
+ : (java.lang.CharSequence) defaultValue(fields()[2]);
+ record.sequenceID = fieldSetFlags()[3] ? this.sequenceID
+ : (java.lang.Long) defaultValue(fields()[3]);
+ record.name = fieldSetFlags()[4] ? this.name
+ : (java.lang.CharSequence) defaultValue(fields()[4]);
+ record.data = fieldSetFlags()[5] ? this.data
+ : (java.nio.ByteBuffer) defaultValue(fields()[5]);
return record;
} catch (Exception e) {
throw new org.apache.avro.AvroRuntimeException(e);
}
}
}
-
- public ChukwaChunk.Tombstone getTombstone(){
- return TOMBSTONE;
+
+ public ChukwaChunk.Tombstone getTombstone() {
+ return TOMBSTONE;
}
- public ChukwaChunk newInstance(){
+ public ChukwaChunk newInstance() {
return newBuilder().build();
}
private static final Tombstone TOMBSTONE = new Tombstone();
-
- public static final class Tombstone extends ChukwaChunk implements org.apache.gora.persistency.Tombstone {
-
- private Tombstone() { }
-
- /**
- * Gets the value of the 'source' field.
- */
- public java.lang.CharSequence getSource() {
- throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones");
- }
-
- /**
- * Sets the value of the 'source' field.
- * @param value the value to set.
- */
- public void setSource(java.lang.CharSequence value) {
- throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones");
- }
-
- /**
- * Checks the dirty status of the 'source' field. A field is dirty if it represents a change that has not yet been written to the database.
- * @param value the value to set.
- */
- public boolean isSourceDirty() {
- throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones");
- }
-
- /**
- * Gets the value of the 'tags' field.
- */
- public java.lang.CharSequence getTags() {
- throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones");
- }
-
- /**
- * Sets the value of the 'tags' field.
- * @param value the value to set.
- */
- public void setTags(java.lang.CharSequence value) {
- throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones");
- }
-
- /**
- * Checks the dirty status of the 'tags' field. A field is dirty if it represents a change that has not yet been written to the database.
- * @param value the value to set.
- */
- public boolean isTagsDirty() {
- throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones");
- }
-
- /**
- * Gets the value of the 'datatype' field.
- */
- public java.lang.CharSequence getDatatype() {
- throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones");
- }
-
- /**
- * Sets the value of the 'datatype' field.
- * @param value the value to set.
- */
- public void setDatatype(java.lang.CharSequence value) {
- throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones");
- }
-
- /**
- * Checks the dirty status of the 'datatype' field. A field is dirty if it represents a change that has not yet been written to the database.
- * @param value the value to set.
- */
- public boolean isDatatypeDirty() {
- throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones");
- }
-
- /**
- * Gets the value of the 'sequenceID' field.
- */
- public java.lang.Long getSequenceID() {
- throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones");
- }
-
- /**
- * Sets the value of the 'sequenceID' field.
- * @param value the value to set.
- */
- public void setSequenceID(java.lang.Long value) {
- throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones");
- }
-
- /**
- * Checks the dirty status of the 'sequenceID' field. A field is dirty if it represents a change that has not yet been written to the database.
- * @param value the value to set.
- */
- public boolean isSequenceIDDirty() {
- throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones");
- }
-
- /**
- * Gets the value of the 'name' field.
- */
- public java.lang.CharSequence getName() {
- throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones");
- }
-
- /**
- * Sets the value of the 'name' field.
- * @param value the value to set.
- */
- public void setName(java.lang.CharSequence value) {
- throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones");
- }
-
- /**
- * Checks the dirty status of the 'name' field. A field is dirty if it represents a change that has not yet been written to the database.
- * @param value the value to set.
- */
- public boolean isNameDirty() {
- throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones");
- }
-
- /**
- * Gets the value of the 'data' field.
- */
- public java.nio.ByteBuffer getData() {
- throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones");
- }
-
- /**
- * Sets the value of the 'data' field.
- * @param value the value to set.
- */
- public void setData(java.nio.ByteBuffer value) {
- throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones");
- }
-
- /**
- * Checks the dirty status of the 'data' field. A field is dirty if it represents a change that has not yet been written to the database.
- * @param value the value to set.
- */
- public boolean isDataDirty() {
- throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones");
- }
-
-
+
+ public static final class Tombstone extends ChukwaChunk
+ implements org.apache.gora.persistency.Tombstone {
+
+ private Tombstone() {
+ }
+
+ /**
+ * Gets the value of the 'source' field.
+ */
+ public java.lang.CharSequence getSource() {
+ throw new java.lang.UnsupportedOperationException(
+ "Get is not supported on tombstones");
+ }
+
+ /**
+ * Sets the value of the 'source' field.
+ *
+ * @param value
+ * the value to set.
+ */
+ public void setSource(java.lang.CharSequence value) {
+ throw new java.lang.UnsupportedOperationException(
+ "Set is not supported on tombstones");
+ }
+
+ /**
+ * Checks the dirty status of the 'source' field. A field is dirty if it
+ * represents a change that has not yet been written to the database.
+ */
+ public boolean isSourceDirty() {
+ throw new java.lang.UnsupportedOperationException(
+ "IsDirty is not supported on tombstones");
+ }
+
+ /**
+ * Gets the value of the 'tags' field.
+ */
+ public java.lang.CharSequence getTags() {
+ throw new java.lang.UnsupportedOperationException(
+ "Get is not supported on tombstones");
+ }
+
+ /**
+ * Sets the value of the 'tags' field.
+ *
+ * @param value
+ * the value to set.
+ */
+ public void setTags(java.lang.CharSequence value) {
+ throw new java.lang.UnsupportedOperationException(
+ "Set is not supported on tombstones");
+ }
+
+ /**
+ * Checks the dirty status of the 'tags' field. A field is dirty if it
+ * represents a change that has not yet been written to the database.
+ */
+ public boolean isTagsDirty() {
+ throw new java.lang.UnsupportedOperationException(
+ "IsDirty is not supported on tombstones");
+ }
+
+ /**
+ * Gets the value of the 'datatype' field.
+ */
+ public java.lang.CharSequence getDatatype() {
+ throw new java.lang.UnsupportedOperationException(
+ "Get is not supported on tombstones");
+ }
+
+ /**
+ * Sets the value of the 'datatype' field.
+ *
+ * @param value
+ * the value to set.
+ */
+ public void setDatatype(java.lang.CharSequence value) {
+ throw new java.lang.UnsupportedOperationException(
+ "Set is not supported on tombstones");
+ }
+
+ /**
+ * Checks the dirty status of the 'datatype' field. A field is dirty if it
+ * represents a change that has not yet been written to the database.
+ */
+ public boolean isDatatypeDirty() {
+ throw new java.lang.UnsupportedOperationException(
+ "IsDirty is not supported on tombstones");
+ }
+
+ /**
+ * Gets the value of the 'sequenceID' field.
+ */
+ public java.lang.Long getSequenceID() {
+ throw new java.lang.UnsupportedOperationException(
+ "Get is not supported on tombstones");
+ }
+
+ /**
+ * Sets the value of the 'sequenceID' field.
+ *
+ * @param value
+ * the value to set.
+ */
+ public void setSequenceID(java.lang.Long value) {
+ throw new java.lang.UnsupportedOperationException(
+ "Set is not supported on tombstones");
+ }
+
+ /**
+ * Checks the dirty status of the 'sequenceID' field. A field is dirty if it
+ * represents a change that has not yet been written to the database.
+ */
+ public boolean isSequenceIDDirty() {
+ throw new java.lang.UnsupportedOperationException(
+ "IsDirty is not supported on tombstones");
+ }
+
+ /**
+ * Gets the value of the 'name' field.
+ */
+ public java.lang.CharSequence getName() {
+ throw new java.lang.UnsupportedOperationException(
+ "Get is not supported on tombstones");
+ }
+
+ /**
+ * Sets the value of the 'name' field.
+ *
+ * @param value
+ * the value to set.
+ */
+ public void setName(java.lang.CharSequence value) {
+ throw new java.lang.UnsupportedOperationException(
+ "Set is not supported on tombstones");
+ }
+
+ /**
+ * Checks the dirty status of the 'name' field. A field is dirty if it
+ * represents a change that has not yet been written to the database.
+ */
+ public boolean isNameDirty() {
+ throw new java.lang.UnsupportedOperationException(
+ "IsDirty is not supported on tombstones");
+ }
+
+ /**
+ * Gets the value of the 'data' field.
+ */
+ public java.nio.ByteBuffer getData() {
+ throw new java.lang.UnsupportedOperationException(
+ "Get is not supported on tombstones");
+ }
+
+ /**
+ * Sets the value of the 'data' field.
+ *
+ * @param value
+ * the value to set.
+ */
+ public void setData(java.nio.ByteBuffer value) {
+ throw new java.lang.UnsupportedOperationException(
+ "Set is not supported on tombstones");
+ }
+
+ /**
+ * Checks the dirty status of the 'data' field. A field is dirty if it
+ * represents a change that has not yet been written to the database.
+ */
+ public boolean isDataDirty() {
+ throw new java.lang.UnsupportedOperationException(
+ "IsDirty is not supported on tombstones");
+ }
+
}
-
-}
+}
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/datacollection/writer/gora/GoraWriter.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/datacollection/writer/gora/GoraWriter.java b/src/main/java/org/apache/hadoop/chukwa/datacollection/writer/gora/GoraWriter.java
index bdf66f2..a3771f2 100644
--- a/src/main/java/org/apache/hadoop/chukwa/datacollection/writer/gora/GoraWriter.java
+++ b/src/main/java/org/apache/hadoop/chukwa/datacollection/writer/gora/GoraWriter.java
@@ -47,6 +47,7 @@ public class GoraWriter extends PipelineableWriter {
/**
* Default constructor for this class.
+ * @throws WriterException if error writing
*/
public GoraWriter() throws WriterException {
log.debug("Initializing configuration for GoraWriter pipeline...");
@@ -57,8 +58,7 @@ public class GoraWriter extends PipelineableWriter {
* {@link org.apache.gora.store.DataStore} objects are created from a factory. It is necessary to
* provide the key and value class. The datastore class parameters is optional,
* and if not specified it will be read from the <code>gora.properties</code> file.
- * @throws WriterException
- * @throws GoraException
+ * @throws WriterException if error occurs
* @see org.apache.hadoop.chukwa.datacollection.writer.ChukwaWriter#init(org.apache.hadoop.conf.Configuration)
*/
@Override
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/dataloader/DataLoaderFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/dataloader/DataLoaderFactory.java b/src/main/java/org/apache/hadoop/chukwa/dataloader/DataLoaderFactory.java
index 3b8b946..a49aaa0 100644
--- a/src/main/java/org/apache/hadoop/chukwa/dataloader/DataLoaderFactory.java
+++ b/src/main/java/org/apache/hadoop/chukwa/dataloader/DataLoaderFactory.java
@@ -35,8 +35,10 @@ public abstract class DataLoaderFactory {
}
/**
- * @param args
- * @throws IOException
+ * @param conf Chukwa Configuration
+ * @param fs Hadoop File System
+ * @param src List of files to load
+ * @throws IOException if error loading files
*/
public void load(ChukwaConfiguration conf, FileSystem fs, FileStatus[] src) throws IOException {
this.source=src.clone();
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/dataloader/MetricDataLoader.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/dataloader/MetricDataLoader.java b/src/main/java/org/apache/hadoop/chukwa/dataloader/MetricDataLoader.java
index 5538a40..baf833d 100644
--- a/src/main/java/org/apache/hadoop/chukwa/dataloader/MetricDataLoader.java
+++ b/src/main/java/org/apache/hadoop/chukwa/dataloader/MetricDataLoader.java
@@ -72,7 +72,10 @@ public class MetricDataLoader implements Callable {
fs = FileSystem.get(conf);
}
- /** Creates a new instance of DBWriter */
+ /** Creates a new instance of DBWriter
+ * @param conf Chukwa Configuration
+ * @param fs Hadoop File System
+ * @param fileName Chukwa Sequence file */
public MetricDataLoader(ChukwaConfiguration conf, FileSystem fs, String fileName) {
source = new Path(fileName);
this.conf = conf;
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/datastore/ChukwaHBaseStore.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/datastore/ChukwaHBaseStore.java b/src/main/java/org/apache/hadoop/chukwa/datastore/ChukwaHBaseStore.java
index bdd765d..889e980 100644
--- a/src/main/java/org/apache/hadoop/chukwa/datastore/ChukwaHBaseStore.java
+++ b/src/main/java/org/apache/hadoop/chukwa/datastore/ChukwaHBaseStore.java
@@ -111,12 +111,12 @@ public class ChukwaHBaseStore {
* Scan chukwa table for a particular metric group and metric name based on
* time ranges.
*
- * @param metricGroup
- * @param metric
- * @param source
- * @param startTime
- * @param endTime
- * @return
+ * @param metricGroup metric group name
+ * @param metric metric name
+ * @param source source of the metric
+ * @param startTime start time
+ * @param endTime end time
+ * @return Series object
*/
public static Series getSeries(String metricGroup, String metric,
String source, long startTime, long endTime) {
@@ -128,11 +128,11 @@ public class ChukwaHBaseStore {
/**
* Scan chukwa table for a full metric name based on time ranges.
*
- * @param metric
- * @param source
- * @param startTime
- * @param endTime
- * @return
+ * @param metric metric group name and metric name combined
+ * @param source source of the metric
+ * @param startTime start time
+ * @param endTime end time
+ * @return Series object
*/
public static synchronized Series getSeries(String metric, String source, long startTime,
long endTime) {
@@ -341,9 +341,9 @@ public class ChukwaHBaseStore {
* Scan chukwa table and find cluster tag from annotation column family from a
* range of entries.
*
- * @param startTime
- * @param endTime
- * @return
+ * @param startTime start time in epoch
+ * @param endTime start time in epoch
+ * @return Set of cluster names
*/
public static Set<String> getClusterNames(long startTime, long endTime) {
Set<String> clusters = new HashSet<String>();
@@ -374,8 +374,8 @@ public class ChukwaHBaseStore {
/**
* Get a chart from HBase by ID.
*
- * @param id
- * @return
+ * @param id Chart ID
+ * @return Chart object
*/
public static Chart getChart(String id) {
Chart chart = null;
@@ -400,8 +400,8 @@ public class ChukwaHBaseStore {
/**
* Update a chart in HBase by ID.
*
- * @param id
- * @param chart
+ * @param id Chart ID
+ * @param chart Chart Object
*/
public static void putChart(String id, Chart chart) {
try {
@@ -422,7 +422,13 @@ public class ChukwaHBaseStore {
/**
* Create a chart in HBase by specifying parameters.
- * @throws URISyntaxException
+ * @param id is unique chart identifier
+ * @param title is searchable name of the chart
+ * @param metrics is list of metric names to render chart
+ * @param source is data source name
+ * @param yunitType is y axis unit type
+ * @return Chart ID
+ * @throws URISyntaxException if metrics name can not compose valid URL syntax
*/
public static synchronized String createChart(String id,
String title, String[] metrics, String source, String yunitType) throws URISyntaxException {
@@ -446,7 +452,14 @@ public class ChukwaHBaseStore {
/**
* Create a chart in HBase by specifying parameters.
- * @throws URISyntaxException
+ * @param id is unique chart identifier
+ * @param title is searchable name of the chart
+ * @param metrics is list of metric names to render ring chart
+ * @param source is data source name
+ * @param suffixLabel is text label to append to metric values
+ * @param direction sets the threshold to have either upper limit or lower limit
+ * @return Chart ID
+ * @throws URISyntaxException if metrics name can not compose valid URL syntax
*/
public static synchronized String createCircle(String id,
String title, String[] metrics, String source, String suffixLabel, String direction) throws URISyntaxException {
@@ -469,15 +482,15 @@ public class ChukwaHBaseStore {
/**
* Create a tile in HBase by specifying parameters.
- * @param id
- * @param title
- * @param bannerText
- * @param suffixLabel
- * @param metrics
- * @param source
- * @param icon
- * @return
- * @throws URISyntaxException
+ * @param id is unique tile identifier
+ * @param title is searchable name of the tile widget
+ * @param bannerText is description of the tile widget
+ * @param suffixLabel is text label to append to metric values
+ * @param metrics is list of metric names to render tile widget
+ * @param source is data source name
+ * @param icon is emoji symbol to render beside tile widget
+ * @return Widget ID
+ * @throws URISyntaxException if metrics name can not compose valid URL syntax
*/
public static synchronized String createTile(String id, String title,
String bannerText, String suffixLabel, String[] metrics, String source,
@@ -500,9 +513,8 @@ public class ChukwaHBaseStore {
/**
* Create a chart in HBase.
*
- * @param chart
+ * @param chart is a chukwa Chart object
* @return id of newly created chart
- * @throws IOException
*/
public static synchronized String createChart(Chart chart) {
String id = chart.getId();
@@ -538,10 +550,10 @@ public class ChukwaHBaseStore {
/**
* Return data for multiple series of metrics stored in HBase.
*
- * @param series
- * @param startTime
- * @param endTime
- * @return
+ * @param series is SeriesMetaData object
+ * @param startTime sets the start time of metrics
+ * @param endTime sets the end time of metrics
+ * @return A list of Series meta data
*/
public static synchronized ArrayList<org.apache.hadoop.chukwa.hicc.bean.SeriesMetaData> getChartSeries(ArrayList<org.apache.hadoop.chukwa.hicc.bean.SeriesMetaData> series, long startTime, long endTime) {
ArrayList<org.apache.hadoop.chukwa.hicc.bean.SeriesMetaData> list = new ArrayList<org.apache.hadoop.chukwa.hicc.bean.SeriesMetaData>();
@@ -652,9 +664,9 @@ public class ChukwaHBaseStore {
/**
* List widgets stored in HBase.
*
- * @param limit
- * @param offset
- * @return
+ * @param limit sets the number of widgets to return
+ * @param offset sets the starting point to return widgets
+ * @return List of Widgets
*/
public static synchronized List<Widget> listWidget(int limit, int offset) {
ArrayList<Widget> list = new ArrayList<Widget>();
@@ -738,8 +750,8 @@ public class ChukwaHBaseStore {
/**
* Find widget by title prefix in HBase.
*
- * @param query - Prefix query of widget title.
- * @return
+ * @param query is prefix query of widget title.
+ * @return List of Widgets
*/
public static synchronized List<Widget> searchWidget(String query) {
ArrayList<Widget> list = new ArrayList<Widget>();
@@ -773,8 +785,8 @@ public class ChukwaHBaseStore {
/**
* View a widget information in HBase.
*
- * @param title - Title of the widget.
- * @return
+ * @param title is title of the widget.
+ * @return List of Widgets
*/
public static synchronized Widget viewWidget(String title) {
Widget w = null;
@@ -798,7 +810,8 @@ public class ChukwaHBaseStore {
/**
* Create a widget in HBase.
*
- * @param widget
+ * @param widget is chukwa Widget object
+ * @return true if widget is created
*/
public static synchronized boolean createWidget(Widget widget) {
boolean created = false;
@@ -830,9 +843,9 @@ public class ChukwaHBaseStore {
/**
* Update a widget in HBase.
*
- * @param title
- * @param widget
- * @throws IOException
+ * @param title is searchable title in a widget
+ * @param widget is Chukwa Widget object
+ * @return true if widget has been updated
*/
public static synchronized boolean updateWidget(String title, Widget widget) {
boolean result = false;
@@ -861,9 +874,8 @@ public class ChukwaHBaseStore {
/**
* Delete a widget in HBase.
*
- * @param title
- * @param widget
- * @throws IOException
+ * @param title is searchable title in a widget
+ * @return true if widget has been deleted
*/
public static synchronized boolean deleteWidget(String title) {
boolean result = false;
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/datatrigger/HttpTriggerAction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/datatrigger/HttpTriggerAction.java b/src/main/java/org/apache/hadoop/chukwa/datatrigger/HttpTriggerAction.java
index db71668..4e94167 100644
--- a/src/main/java/org/apache/hadoop/chukwa/datatrigger/HttpTriggerAction.java
+++ b/src/main/java/org/apache/hadoop/chukwa/datatrigger/HttpTriggerAction.java
@@ -78,11 +78,11 @@ public class HttpTriggerAction implements TriggerAction {
* Iterates over each URL found, fetched other settings and fires and HTTP
* request.
*
- * @param conf
- * @param fs
- * @param src
- * @param triggerEvent
- * @throws IOException
+ * @param conf is Chukwa configuration
+ * @param fs is HDFS File System
+ * @param src is list of sources to look for data
+ * @param triggerEvent is type of processing to happen
+ * @throws IOException if error in process triggers
*/
public void execute(Configuration conf, FileSystem fs,
FileStatus[] src, TriggerEvent triggerEvent) throws IOException {
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/extraction/archive/SinkArchiver.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/extraction/archive/SinkArchiver.java b/src/main/java/org/apache/hadoop/chukwa/extraction/archive/SinkArchiver.java
index 6140dca..bb050af 100644
--- a/src/main/java/org/apache/hadoop/chukwa/extraction/archive/SinkArchiver.java
+++ b/src/main/java/org/apache/hadoop/chukwa/extraction/archive/SinkArchiver.java
@@ -148,7 +148,7 @@ public class SinkArchiver implements CHUKWA_CONSTANT {
* @param fs the filesystem in question
* @param src a file or directory to merge into dest
* @param dest a directory to merge into
- * @throws IOException
+ * @throws IOException if error in promote and merge
*/
public void promoteAndMerge(FileSystem fs, Path src, Path dest)
throws IOException {
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/extraction/demux/DailyChukwaRecordRolling.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/extraction/demux/DailyChukwaRecordRolling.java b/src/main/java/org/apache/hadoop/chukwa/extraction/demux/DailyChukwaRecordRolling.java
index ebdbca5..7af43b4 100644
--- a/src/main/java/org/apache/hadoop/chukwa/extraction/demux/DailyChukwaRecordRolling.java
+++ b/src/main/java/org/apache/hadoop/chukwa/extraction/demux/DailyChukwaRecordRolling.java
@@ -202,8 +202,8 @@ public class DailyChukwaRecordRolling extends Configured implements Tool {
}
/**
- * @param args
- * @throws Exception
+ * @param args is command line parameters
+ * @throws Exception if unable to process data
*/
public static void main(String[] args) throws Exception {
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/extraction/demux/DemuxManager.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/extraction/demux/DemuxManager.java b/src/main/java/org/apache/hadoop/chukwa/extraction/demux/DemuxManager.java
index 9fcb65b..a088546 100644
--- a/src/main/java/org/apache/hadoop/chukwa/extraction/demux/DemuxManager.java
+++ b/src/main/java/org/apache/hadoop/chukwa/extraction/demux/DemuxManager.java
@@ -98,7 +98,7 @@ public class DemuxManager implements CHUKWA_CONSTANT {
/**
* Start the Demux Manager daemon
- * @throws Exception
+ * @throws Exception if error in processing data
*/
public void start() throws Exception {
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/extraction/demux/HourlyChukwaRecordRolling.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/extraction/demux/HourlyChukwaRecordRolling.java b/src/main/java/org/apache/hadoop/chukwa/extraction/demux/HourlyChukwaRecordRolling.java
index e272ea8..9b87cfd 100644
--- a/src/main/java/org/apache/hadoop/chukwa/extraction/demux/HourlyChukwaRecordRolling.java
+++ b/src/main/java/org/apache/hadoop/chukwa/extraction/demux/HourlyChukwaRecordRolling.java
@@ -152,8 +152,8 @@ public class HourlyChukwaRecordRolling extends Configured implements Tool {
}
/**
- * @param args
- * @throws Exception
+ * @param args is command line parameters
+ * @throws Exception if error in processing data
*/
public static void main(String[] args) throws Exception {
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/extraction/demux/MoveOrMergeRecordFile.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/extraction/demux/MoveOrMergeRecordFile.java b/src/main/java/org/apache/hadoop/chukwa/extraction/demux/MoveOrMergeRecordFile.java
index 7d83ec8..1d09096 100644
--- a/src/main/java/org/apache/hadoop/chukwa/extraction/demux/MoveOrMergeRecordFile.java
+++ b/src/main/java/org/apache/hadoop/chukwa/extraction/demux/MoveOrMergeRecordFile.java
@@ -140,8 +140,8 @@ public class MoveOrMergeRecordFile extends Configured implements Tool {
}
/**
- * @param args
- * @throws Exception
+ * @param args is command line parameters
+ * @throws Exception if unable to process data
*/
public static void main(String[] args) throws Exception {
conf = new ChukwaConfiguration();
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/extraction/demux/MoveToRepository.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/extraction/demux/MoveToRepository.java b/src/main/java/org/apache/hadoop/chukwa/extraction/demux/MoveToRepository.java
index 25d2340..899baa7 100644
--- a/src/main/java/org/apache/hadoop/chukwa/extraction/demux/MoveToRepository.java
+++ b/src/main/java/org/apache/hadoop/chukwa/extraction/demux/MoveToRepository.java
@@ -292,8 +292,8 @@ public class MoveToRepository {
}
/**
- * @param args
- * @throws Exception
+ * @param args is command line parameter
+ * @throws Exception if error in processing data
*/
public static void main(String[] args) throws Exception {
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/ProcessorFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/ProcessorFactory.java b/src/main/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/ProcessorFactory.java
index 4f10532..04a7e63 100644
--- a/src/main/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/ProcessorFactory.java
+++ b/src/main/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/ProcessorFactory.java
@@ -65,6 +65,8 @@ public class ProcessorFactory {
/**
* Register a specific parser for a {@link ChunkProcessor} implementation.
+ * @param recordType is data type assigned during adaptor creation
+ * @param processor is parser class to process data
*/
public static synchronized void register(String recordType,
ChunkProcessor processor) {
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/extraction/demux/processor/reducer/ReduceProcessorFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/extraction/demux/processor/reducer/ReduceProcessorFactory.java b/src/main/java/org/apache/hadoop/chukwa/extraction/demux/processor/reducer/ReduceProcessorFactory.java
index 19b3f45..f695368 100644
--- a/src/main/java/org/apache/hadoop/chukwa/extraction/demux/processor/reducer/ReduceProcessorFactory.java
+++ b/src/main/java/org/apache/hadoop/chukwa/extraction/demux/processor/reducer/ReduceProcessorFactory.java
@@ -44,6 +44,8 @@ public class ReduceProcessorFactory {
/**
* Register a specific parser for a {@link ReduceProcessor} implementation.
+ * @param reduceType is data type assigned by mapper
+ * @param processor is parser class for reducer
*/
public static synchronized void register(String reduceType,
ReduceProcessor processor) {
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/extraction/engine/RecordUtil.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/extraction/engine/RecordUtil.java b/src/main/java/org/apache/hadoop/chukwa/extraction/engine/RecordUtil.java
index 291e509..6d27cda 100644
--- a/src/main/java/org/apache/hadoop/chukwa/extraction/engine/RecordUtil.java
+++ b/src/main/java/org/apache/hadoop/chukwa/extraction/engine/RecordUtil.java
@@ -43,8 +43,10 @@ public class RecordUtil {
return "undefined";
}
/**
- * Uses a precompiled pattern, so theoretically faster than
+ * Uses a compiled pattern, so theoretically faster than
* Chunk.getTag().
+ * @param chunk - a chunk of binary blob
+ * @return cluster name
*
*/
public static String getClusterName(Chunk chunk) {
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/extraction/hbase/AbstractProcessor.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/extraction/hbase/AbstractProcessor.java b/src/main/java/org/apache/hadoop/chukwa/extraction/hbase/AbstractProcessor.java
index 4f5f289..eecc9ad 100644
--- a/src/main/java/org/apache/hadoop/chukwa/extraction/hbase/AbstractProcessor.java
+++ b/src/main/java/org/apache/hadoop/chukwa/extraction/hbase/AbstractProcessor.java
@@ -58,11 +58,11 @@ public abstract class AbstractProcessor {
* Generic metric function to add a metric to HBase with full primary key and
* source computed.
*
- * @param time
- * @param metric
- * @param source
- * @param value
- * @param output
+ * @param time is timestamp in epoch
+ * @param metric is metric name
+ * @param source is data source name
+ * @param value is metric value in bytes
+ * @param output is an array list of Put operations
*/
public void addRecord(long time, String metric, String source, byte[] value,
ArrayList<Put> output) {
@@ -86,10 +86,8 @@ public abstract class AbstractProcessor {
* assumes "time" and "source" have been defined and will construct primaryKey
* only, without recompute time and source md5.
*
- * @param time
- * @param primaryKey
- * @param value
- * @param output
+ * @param metric is metric name
+ * @param value is metric value in bytes
*/
public void addRecord(String metric, byte[] value) {
String primaryKey = new StringBuilder(primaryKeyHelper).append(".")
@@ -105,10 +103,10 @@ public abstract class AbstractProcessor {
/**
* Process a chunk to store in HBase.
*
- * @param chunk
- * @param output
- * @param reporter
- * @throws Throwable
+ * @param chunk is a Chukwa chunk
+ * @param output is an array of Put operations
+ * @param reporter is a reporter to track progress
+ * @throws Throwable if there is problem parsing data
*/
public void process(Chunk chunk, ArrayList<Put> output, Reporter reporter)
throws Throwable {
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/extraction/hbase/ChukwaMetricsProcessor.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/extraction/hbase/ChukwaMetricsProcessor.java b/src/main/java/org/apache/hadoop/chukwa/extraction/hbase/ChukwaMetricsProcessor.java
index 156d9d5..3c134ea 100644
--- a/src/main/java/org/apache/hadoop/chukwa/extraction/hbase/ChukwaMetricsProcessor.java
+++ b/src/main/java/org/apache/hadoop/chukwa/extraction/hbase/ChukwaMetricsProcessor.java
@@ -36,10 +36,10 @@ public class ChukwaMetricsProcessor extends HadoopMetricsProcessor {
/**
* Process cluster name and store in HBase.
*
- * @param chunk
- * @param output
- * @param reporter
- * @throws Throwable
+ * @param chunk is a Chukwa data chunk
+ * @param output is a list of Put operations
+ * @param reporter is progress reporter
+ * @throws Throwable if unable to send data
*/
@Override
public void process(Chunk chunk, ArrayList<Put> output, Reporter reporter)
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/hicc/rest/ChartController.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/hicc/rest/ChartController.java b/src/main/java/org/apache/hadoop/chukwa/hicc/rest/ChartController.java
index 41ef551..614a161 100644
--- a/src/main/java/org/apache/hadoop/chukwa/hicc/rest/ChartController.java
+++ b/src/main/java/org/apache/hadoop/chukwa/hicc/rest/ChartController.java
@@ -60,7 +60,7 @@ public class ChartController {
* Render chart using flot.js
*
* @param id Reference ID of Chart stored in HBase chukwa_meta table.
- * @return html chart widget
+ * @return chart widget
*/
@GET
@Path("draw/{id}")
@@ -88,6 +88,8 @@ public class ChartController {
/**
* Describe chart meta data
+ * @param id Chart ID
+ * @return chart meta data
*/
@GET
@Path("describe/{id}")
@@ -102,8 +104,8 @@ public class ChartController {
/**
* Create a new chart meta data
*
- * @param chart
- * @return
+ * @param buffer holds incoming JSON of Chart object
+ * @return Web response code
*/
@POST
@Path("save")
@@ -121,8 +123,9 @@ public class ChartController {
/**
* Save chart meta data
*
- * @param chart
- * @return
+ * @param id is unique identifier of Chart object
+ * @param buffer holds incoming JSON of Chart object
+ * @return Web response code
*/
@PUT
@Path("save/{id}")
@@ -137,6 +140,8 @@ public class ChartController {
/**
* Preview a chart
+ * @param buffer holds incoming JSON of Chart object
+ * @return segment of chart HTML output
*/
@PUT
@Path("preview")
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/hicc/rest/CirclesController.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/hicc/rest/CirclesController.java b/src/main/java/org/apache/hadoop/chukwa/hicc/rest/CirclesController.java
index 5127b1c..e7dd2a4 100644
--- a/src/main/java/org/apache/hadoop/chukwa/hicc/rest/CirclesController.java
+++ b/src/main/java/org/apache/hadoop/chukwa/hicc/rest/CirclesController.java
@@ -59,9 +59,7 @@ public class CirclesController {
/**
* Render circle using jquery circliful.js
*
- * @param title Title of the tile.
- * @param metric Metric name to lookup in hbase.
- * @param source Metric source.
+ * @param id Title of the tile.
* @param invert Toggle to display warning, error color by upper bound or lower bound.
* @return html circle widget.
*/
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/hicc/rest/SessionController.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/hicc/rest/SessionController.java b/src/main/java/org/apache/hadoop/chukwa/hicc/rest/SessionController.java
index 1441253..be4afb5 100644
--- a/src/main/java/org/apache/hadoop/chukwa/hicc/rest/SessionController.java
+++ b/src/main/java/org/apache/hadoop/chukwa/hicc/rest/SessionController.java
@@ -44,7 +44,8 @@ public class SessionController {
/**
* Utility to get session attributes
- * @param id
+ * @param request is HTTP request object
+ * @param id is session key
* @return session attribute
*/
@GET
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/inputtools/log4j/ChukwaDailyRollingFileAppender.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/inputtools/log4j/ChukwaDailyRollingFileAppender.java b/src/main/java/org/apache/hadoop/chukwa/inputtools/log4j/ChukwaDailyRollingFileAppender.java
index 72b6dfd..fdc49db 100644
--- a/src/main/java/org/apache/hadoop/chukwa/inputtools/log4j/ChukwaDailyRollingFileAppender.java
+++ b/src/main/java/org/apache/hadoop/chukwa/inputtools/log4j/ChukwaDailyRollingFileAppender.java
@@ -64,7 +64,7 @@ import org.apache.log4j.spi.LoggingEvent;
option. This pattern should follow the {@link SimpleDateFormat}
conventions. In particular, you <em>must</em> escape literal text
within a pair of single quotes. A formatted version of the date
- pattern is used as the suffix for the rolled file name.
+ pattern is used as the suffix for the rolled file name.</p>
<p>For example, if the <b>File</b> option is set to
<code>/foo/bar.log</code> and the <b>DatePattern</b> set to
@@ -72,16 +72,16 @@ import org.apache.log4j.spi.LoggingEvent;
file <code>/foo/bar.log</code> will be copied to
<code>/foo/bar.log.2001-02-16</code> and logging for 2001-02-17
will continue in <code>/foo/bar.log</code> until it rolls over
- the next day.
+ the next day.</p>
<p>Is is possible to specify monthly, weekly, half-daily, daily,
- hourly, or minutely rollover schedules.
+ hourly, or minutely rollover schedules.</p>
- <p><table border="1" cellpadding="2">
+ <table border="1" cellpadding="2" summary="">
<tr>
<th>DatePattern</th>
<th>Rollover schedule</th>
- <th>Example</th>
+ <th>Example</th></tr>
<tr>
<td><code>'.'yyyy-MM</code>
@@ -90,7 +90,7 @@ import org.apache.log4j.spi.LoggingEvent;
<td>At midnight of May 31st, 2002 <code>/foo/bar.log</code> will be
copied to <code>/foo/bar.log.2002-05</code>. Logging for the month
of June will be output to <code>/foo/bar.log</code> until it is
- also rolled over the next month.
+ also rolled over the next month.</td></tr>
<tr>
<td><code>'.'yyyy-ww</code>
@@ -102,7 +102,7 @@ import org.apache.log4j.spi.LoggingEvent;
midnight, June 9th 2002, the file <i>/foo/bar.log</i> will be
copied to <i>/foo/bar.log.2002-23</i>. Logging for the 24th week
of 2002 will be output to <code>/foo/bar.log</code> until it is
- rolled over the next week.
+ rolled over the next week.</td></tr>
<tr>
<td><code>'.'yyyy-MM-dd</code>
@@ -112,7 +112,7 @@ import org.apache.log4j.spi.LoggingEvent;
<td>At midnight, on March 8th, 2002, <code>/foo/bar.log</code> will
be copied to <code>/foo/bar.log.2002-03-08</code>. Logging for the
9th day of March will be output to <code>/foo/bar.log</code> until
- it is rolled over the next day.
+ it is rolled over the next day.</td></tr>
<tr>
<td><code>'.'yyyy-MM-dd-a</code>
@@ -122,7 +122,7 @@ import org.apache.log4j.spi.LoggingEvent;
<td>At noon, on March 9th, 2002, <code>/foo/bar.log</code> will be
copied to <code>/foo/bar.log.2002-03-09-AM</code>. Logging for the
afternoon of the 9th will be output to <code>/foo/bar.log</code>
- until it is rolled over at midnight.
+ until it is rolled over at midnight.</td></tr>
<tr>
<td><code>'.'yyyy-MM-dd-HH</code>
@@ -133,11 +133,11 @@ import org.apache.log4j.spi.LoggingEvent;
<code>/foo/bar.log</code> will be copied to
<code>/foo/bar.log.2002-03-09-10</code>. Logging for the 11th hour
of the 9th of March will be output to <code>/foo/bar.log</code>
- until it is rolled over at the beginning of the next hour.
+ until it is rolled over at the beginning of the next hour.</td></tr>
<tr>
- <td><code>'.'yyyy-MM-dd-HH-mm</code>
+ <td><code>'.'yyyy-MM-dd-HH-mm</code></td>
<td>Rollover at the beginning of every minute.</td>
@@ -145,14 +145,13 @@ import org.apache.log4j.spi.LoggingEvent;
<code>/foo/bar.log</code> will be copied to
<code>/foo/bar.log.2001-03-09-10-22</code>. Logging for the minute
of 11:23 (9th of March) will be output to
- <code>/foo/bar.log</code> until it is rolled over the next minute.
-
+ <code>/foo/bar.log</code> until it is rolled over the next minute.</td></tr>
</table>
<p>Do not use the colon ":" character in anywhere in the
<b>DatePattern</b> option. The text before the colon is interpeted
as the protocol specificaion of a URL which is probably not what
- you want. */
+ you want.</p> */
public class ChukwaDailyRollingFileAppender extends FileAppender {
@@ -230,6 +229,7 @@ public class ChukwaDailyRollingFileAppender extends FileAppender {
/**
* The default constructor does nothing.
+ * @throws IOException if constructor initialization error
*/
public ChukwaDailyRollingFileAppender() throws IOException {
super();
@@ -239,6 +239,10 @@ public class ChukwaDailyRollingFileAppender extends FileAppender {
Instantiate a <code>DailyRollingFileAppender</code> and open the
file designated by <code>filename</code>. The opened filename will
become the output destination for this appender.
+ * @param layout is logging layout
+ * @param filename is the filename to write logs
+ * @param datePattern is the date pattern of log suffix
+ * @throws IOException if constructor initialization error
*/
public ChukwaDailyRollingFileAppender(Layout layout, String filename,
@@ -253,12 +257,15 @@ public class ChukwaDailyRollingFileAppender extends FileAppender {
/**
* The <b>DatePattern</b> takes a string in the same format as expected by
* {@link SimpleDateFormat}. This options determines the rollover schedule.
+ * @param pattern is date formatting pattern
*/
public void setDatePattern(String pattern) {
datePattern = pattern;
}
- /** Returns the value of the <b>DatePattern</b> option. */
+ /** Returns the value of the <b>DatePattern</b> option.
+ * @return date pattern
+ */
public String getDatePattern() {
return datePattern;
}
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/rest/resource/ClientTrace.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/rest/resource/ClientTrace.java b/src/main/java/org/apache/hadoop/chukwa/rest/resource/ClientTrace.java
index ca97be1..42fa9e2 100644
--- a/src/main/java/org/apache/hadoop/chukwa/rest/resource/ClientTrace.java
+++ b/src/main/java/org/apache/hadoop/chukwa/rest/resource/ClientTrace.java
@@ -50,11 +50,7 @@ public class ClientTrace {
* Get a list of the most recent client trace activities.
* The extracted elements are:
*
- * date - Timestamp of the activity happened.
- * action - Operation type: HDFS_READ, HDFS_WRITE, or MAPRED_SHUFFLE.
- * src - Source IP address
- * dest - Destination IP address
- * size - Size of the data payload.
+ * @return list of client trace objects
*
*/
@GET
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/tools/backfilling/BackfillingLoader.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/tools/backfilling/BackfillingLoader.java b/src/main/java/org/apache/hadoop/chukwa/tools/backfilling/BackfillingLoader.java
index b325948..5ae4897 100644
--- a/src/main/java/org/apache/hadoop/chukwa/tools/backfilling/BackfillingLoader.java
+++ b/src/main/java/org/apache/hadoop/chukwa/tools/backfilling/BackfillingLoader.java
@@ -85,8 +85,8 @@ public class BackfillingLoader {
}
/**
- * @param args
- * @throws Exception
+ * @param args is command line parameters
+ * @throws Exception if problem loading data to HDFS
*/
public static void main(String[] args) throws Exception {
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/util/DumpArchive.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/util/DumpArchive.java b/src/main/java/org/apache/hadoop/chukwa/util/DumpArchive.java
index 743a31c..13f8bfe 100644
--- a/src/main/java/org/apache/hadoop/chukwa/util/DumpArchive.java
+++ b/src/main/java/org/apache/hadoop/chukwa/util/DumpArchive.java
@@ -48,9 +48,9 @@ public class DumpArchive {
static HashMap<String, Integer> counts = new LinkedHashMap<String, Integer>();
/**
- * @param args
- * @throws URISyntaxException
- * @throws IOException
+ * @param args is command line parameters
+ * @throws URISyntaxException if problem parsing HDFS URL
+ * @throws IOException if problem access HDFS
*/
public static void main(String[] args) throws IOException, URISyntaxException {
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/util/DumpChunks.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/util/DumpChunks.java b/src/main/java/org/apache/hadoop/chukwa/util/DumpChunks.java
index 11d1d1a..f620074 100644
--- a/src/main/java/org/apache/hadoop/chukwa/util/DumpChunks.java
+++ b/src/main/java/org/apache/hadoop/chukwa/util/DumpChunks.java
@@ -37,10 +37,13 @@ public class DumpChunks {
/**
* Tries to find chunks matching a given pattern.
- * Takes as input a set of &-delimited patterns, followed
+ * Takes as input a set of &-delimited patterns, followed
* by a list of file names.
*
- * E.g: Dump datatype=Iostat&source=/my/log/.* *.done
+ * E.g: Dump datatype=Iostat&source=/my/log/.* *.done
+ * @param args is command line parameters
+ * @throws IOException if problem access HDFS
+ * @throws URISyntaxException if error parsing HDFS URL
*/
public static void main(String[] args) throws IOException, URISyntaxException {
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/util/DumpRecord.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/util/DumpRecord.java b/src/main/java/org/apache/hadoop/chukwa/util/DumpRecord.java
index 66cde34..fa76d05 100644
--- a/src/main/java/org/apache/hadoop/chukwa/util/DumpRecord.java
+++ b/src/main/java/org/apache/hadoop/chukwa/util/DumpRecord.java
@@ -31,9 +31,9 @@ import org.apache.hadoop.io.SequenceFile;
public class DumpRecord {
/**
- * @param args
- * @throws URISyntaxException
- * @throws IOException
+ * @param args is command line parameters
+ * @throws URISyntaxException if problem parsing URL
+ * @throws IOException if problem reading files on HDFS
*/
public static void main(String[] args) throws IOException, URISyntaxException {
System.out.println("Input file:" + args[0]);
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/util/HierarchyDataType.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/util/HierarchyDataType.java b/src/main/java/org/apache/hadoop/chukwa/util/HierarchyDataType.java
index 5a6a68b..0bfdfe6 100644
--- a/src/main/java/org/apache/hadoop/chukwa/util/HierarchyDataType.java
+++ b/src/main/java/org/apache/hadoop/chukwa/util/HierarchyDataType.java
@@ -50,7 +50,8 @@ public class HierarchyDataType {
* @param fs The file system
* @param path The parent folder
* @param filter The pattern matcher to filter the required files
- * @return
+ * @param recursive is a flag to search recursively
+ * @return list of FileStatus
*/
public static List<FileStatus> globStatus(FileSystem fs, Path path,
PathFilter filter, boolean recursive) {
@@ -87,7 +88,7 @@ public class HierarchyDataType {
* List all files under certain path and its sub-directories
* @param fs The file system
* @param path The parent folder
- * @param recursive
+ * @param recursive is flag to search recursive
* @return The list of all sub-dirs
*/
public static List<FileStatus> globStatus(FileSystem fs, Path path,
@@ -136,8 +137,8 @@ public class HierarchyDataType {
/**
* Get the directory without first and last slash mark.
*
- * @param datasource
- * @return
+ * @param datasource is a string
+ * @return same string with ending slash trimmed
*/
public static String trimSlash(String datasource) {
String results = datasource;
@@ -154,8 +155,8 @@ public class HierarchyDataType {
* Transform the hierarchyDatatType directory into its filename (without any
* slash mark)
*
- * @param datasource
- * @return
+ * @param datasource is a string
+ * @return path to data source
*/
public static String getHierarchyDataTypeFileName(String datasource){
return datasource.replace("/", CHUKWA_CONSTANT.HIERARCHY_CONNECTOR);
@@ -165,8 +166,8 @@ public class HierarchyDataType {
* Transform the hierarchyDataType filename into its directory name (with
* slash mark)
*
- * @param datasource
- * @return
+ * @param datasource is a string
+ * @return path to data source
*/
public static String getHierarchyDataTypeDirectory(String datasource) {
return datasource.replace(CHUKWA_CONSTANT.HIERARCHY_CONNECTOR, "/");
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/util/RegexUtil.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/util/RegexUtil.java b/src/main/java/org/apache/hadoop/chukwa/util/RegexUtil.java
index b20d7f6..2126103 100644
--- a/src/main/java/org/apache/hadoop/chukwa/util/RegexUtil.java
+++ b/src/main/java/org/apache/hadoop/chukwa/util/RegexUtil.java
@@ -75,6 +75,7 @@ public class RegexUtil {
* <p>
* Consider calling this constructor with the result of
* {@link RegexUtil#regexError}.
+ * @param pse is PatternSyntaxException object
*/
public CheckedPatternSyntaxException(PatternSyntaxException pse) {
this.pse = pse;
@@ -139,6 +140,8 @@ public class RegexUtil {
/**
* Returns true if the argument is a syntactically valid regular
* expression.
+ * @param s is regular expression
+ * @return true if there is a match
*/
public static boolean isRegex(String s) {
return isRegex(s, 0);
@@ -147,6 +150,9 @@ public class RegexUtil {
/**
* Returns true if the argument is a syntactically valid regular
* expression with at least the given number of groups.
+ * @param s is regular expression
+ * @param groups is number of groups to match
+ * @return true if there is a match
*/
/*>>>
@SuppressWarnings("regex") // RegexUtil
@@ -165,11 +171,9 @@ public class RegexUtil {
/**
* Returns true if the argument is a syntactically valid regular
* expression.
+ * @param c is a character
+ * @return true if there is a match
*/
- /*>>>
- @SuppressWarnings("regex") // RegexUtil
- */
- /*@Pure*/
public static boolean isRegex(char c) {
return isRegex(Character.toString(c));
}
@@ -178,12 +182,10 @@ public class RegexUtil {
* Returns null if the argument is a syntactically valid regular
* expression. Otherwise returns a string describing why the argument is
* not a regex.
+ * @param s is regular expression
+ * @return null if s is a regular expression
*/
- /*>>>
- @SuppressWarnings("regex") // RegexUtil
- */
- /*@Pure*/
- public static /*@Nullable*/ String regexError(String s) {
+ public static String regexError(String s) {
return regexError(s, 0);
}
@@ -191,12 +193,11 @@ public class RegexUtil {
* Returns null if the argument is a syntactically valid regular
* expression with at least the given number of groups. Otherwise returns
* a string describing why the argument is not a regex.
+ * @param s is regular expression
+ * @param groups is number of groups to match
+ * @return null if s is a regular expression
*/
- /*>>>
- @SuppressWarnings("regex") // RegexUtil
- */
- /*@Pure*/
- public static /*@Nullable*/ String regexError(String s, int groups) {
+ public static String regexError(String s, int groups) {
try {
Pattern p = Pattern.compile(s);
int actualGroups = getGroupCount(p);
@@ -213,12 +214,10 @@ public class RegexUtil {
* Returns null if the argument is a syntactically valid regular
* expression. Otherwise returns a PatternSyntaxException describing
* why the argument is not a regex.
+ * @param s is regular expression
+ * @return null if s is a regular expression
*/
- /*>>>
- @SuppressWarnings("regex") // RegexUtil
- */
- /*@Pure*/
- public static /*@Nullable*/ PatternSyntaxException regexException(String s) {
+ public static PatternSyntaxException regexException(String s) {
return regexException(s, 0);
}
@@ -226,12 +225,11 @@ public class RegexUtil {
* Returns null if the argument is a syntactically valid regular
* expression with at least the given number of groups. Otherwise returns a
* PatternSyntaxException describing why the argument is not a regex.
+ * @param s is regular expression
+ * @param groups is number of groups to match
+ * @return null if s is a regular expression
*/
- /*>>>
- @SuppressWarnings("regex") // RegexUtil
- */
- /*@Pure*/
- public static /*@Nullable*/ PatternSyntaxException regexException(String s, int groups) {
+ public static PatternSyntaxException regexException(String s, int groups) {
try {
Pattern p = Pattern.compile(s);
int actualGroups = getGroupCount(p);
@@ -249,8 +247,10 @@ public class RegexUtil {
* otherwise throws an error. The purpose of this method is to suppress Regex
* Checker warnings. Once the the Regex Checker supports flow-sensitivity, it
* should be very rarely needed.
+ * @param s is a regular expression
+ * @return null if s is a regular expression
*/
- public static /*@Regex*/ String asRegex(String s) {
+ public static String asRegex(String s) {
return asRegex(s, 0);
}
@@ -259,12 +259,11 @@ public class RegexUtil {
* with at least the given number of groups, otherwise throws an error. The
* purpose of this method is to suppress Regex Checker warnings. Once the the
* Regex Checker supports flow-sensitivity, it should be very rarely needed.
+ * @param s is a regular expression
+ * @param groups is number of group to match
+ * @return null if s is a regular expression
*/
- /*>>>
- @SuppressWarnings("regex") // RegexUtil
- */
- /*@Pure*/
- public static /*@Regex*/ String asRegex(String s, int groups) {
+ public static String asRegex(String s, int groups) {
try {
Pattern p = Pattern.compile(s);
int actualGroups = getGroupCount(p);
[3/3] chukwa git commit: CHUKWA-802. Updated Javadoc for Java 8
support. (Eric Yang)
Posted by ey...@apache.org.
CHUKWA-802. Updated Javadoc for Java 8 support. (Eric Yang)
Project: http://git-wip-us.apache.org/repos/asf/chukwa/repo
Commit: http://git-wip-us.apache.org/repos/asf/chukwa/commit/8011ff1f
Tree: http://git-wip-us.apache.org/repos/asf/chukwa/tree/8011ff1f
Diff: http://git-wip-us.apache.org/repos/asf/chukwa/diff/8011ff1f
Branch: refs/heads/master
Commit: 8011ff1f59b4702d1987281fc90b2ca60f2e3a9b
Parents: 8329221
Author: Eric Yang <ey...@apache.org>
Authored: Sat Apr 2 16:14:21 2016 -0700
Committer: Eric Yang <ey...@apache.org>
Committed: Sat Apr 2 16:14:21 2016 -0700
----------------------------------------------------------------------
CHANGES.txt | 2 +
pom.xml | 46 +-
.../java/org/apache/hadoop/chukwa/Chunk.java | 2 +
.../org/apache/hadoop/chukwa/ChunkBuilder.java | 2 +-
.../analysis/salsa/visualization/Heatmap.java | 11 +-
.../analysis/salsa/visualization/Swimlanes.java | 10 +-
.../chukwa/database/MetricsAggregation.java | 4 +-
.../chukwa/datacollection/ChunkQueue.java | 6 +-
.../chukwa/datacollection/ChunkReceiver.java | 2 +-
.../chukwa/datacollection/DataFactory.java | 2 +
.../datacollection/OffsetStatsManager.java | 8 +-
.../chukwa/datacollection/adaptor/Adaptor.java | 47 +-
.../datacollection/adaptor/SyslogAdaptor.java | 8 +-
.../adaptor/filetailer/FileTailingAdaptor.java | 2 -
.../datacollection/adaptor/jms/JMSAdaptor.java | 22 +-
.../jms/JMSMessagePropertyTransformer.java | 8 +-
.../adaptor/jms/JMSMessageTransformer.java | 4 +-
.../agent/AdaptorResetThread.java | 2 +-
.../agent/AgentControlSocketListener.java | 3 +-
.../datacollection/agent/ChukwaAgent.java | 11 +-
.../agent/metrics/AgentMetrics.java | 5 +-
.../agent/metrics/ChunkQueueMetrics.java | 5 +-
.../agent/rest/AdaptorController.java | 5 +
.../controller/ChukwaAgentController.java | 27 +-
.../datacollection/sender/ChukwaHttpSender.java | 12 +-
.../datacollection/sender/ChukwaSender.java | 1 +
.../sender/RetryListOfCollectors.java | 4 +-
.../sender/metrics/HttpSenderMetrics.java | 5 +-
.../test/FileTailerStressTest.java | 2 +-
.../datacollection/writer/ChukwaWriter.java | 16 +-
.../datacollection/writer/InMemoryWriter.java | 2 +-
.../datacollection/writer/SocketTeeWriter.java | 8 +-
.../datacollection/writer/gora/ChukwaChunk.java | 865 ++++++++++++-------
.../datacollection/writer/gora/GoraWriter.java | 4 +-
.../chukwa/dataloader/DataLoaderFactory.java | 6 +-
.../chukwa/dataloader/MetricDataLoader.java | 5 +-
.../chukwa/datastore/ChukwaHBaseStore.java | 110 +--
.../chukwa/datatrigger/HttpTriggerAction.java | 10 +-
.../chukwa/extraction/archive/SinkArchiver.java | 2 +-
.../demux/DailyChukwaRecordRolling.java | 4 +-
.../chukwa/extraction/demux/DemuxManager.java | 2 +-
.../demux/HourlyChukwaRecordRolling.java | 4 +-
.../extraction/demux/MoveOrMergeRecordFile.java | 4 +-
.../extraction/demux/MoveToRepository.java | 4 +-
.../processor/mapper/ProcessorFactory.java | 2 +
.../reducer/ReduceProcessorFactory.java | 2 +
.../chukwa/extraction/engine/RecordUtil.java | 4 +-
.../extraction/hbase/AbstractProcessor.java | 24 +-
.../hbase/ChukwaMetricsProcessor.java | 8 +-
.../chukwa/hicc/rest/ChartController.java | 15 +-
.../chukwa/hicc/rest/CirclesController.java | 4 +-
.../chukwa/hicc/rest/SessionController.java | 3 +-
.../log4j/ChukwaDailyRollingFileAppender.java | 37 +-
.../chukwa/rest/resource/ClientTrace.java | 6 +-
.../tools/backfilling/BackfillingLoader.java | 4 +-
.../apache/hadoop/chukwa/util/DumpArchive.java | 6 +-
.../apache/hadoop/chukwa/util/DumpChunks.java | 7 +-
.../apache/hadoop/chukwa/util/DumpRecord.java | 6 +-
.../hadoop/chukwa/util/HierarchyDataType.java | 17 +-
.../apache/hadoop/chukwa/util/RegexUtil.java | 59 +-
.../apache/hadoop/chukwa/util/XssFilter.java | 4 +-
.../metrics/spi/AbstractMetricsContext.java | 7 +-
src/main/web/hicc/home/css/jquery.gridster.css | 9 +
src/site/apt/user.apt | 325 -------
.../chukwa/extraction/archive/TestArchive.java | 1 +
65 files changed, 947 insertions(+), 917 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 203e95c..e44c58d 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -6,6 +6,8 @@ Trunk (unreleased changes)
IMPROVEMENTS
+ CHUKWA-802. Updated Javadoc for Java 8 support. (Eric Yang)
+
BUGS
CHUKWA-801. Increase measurement timeout for TestFailTailer. (Eric Yang)
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 7b16469..029a3d3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -514,9 +514,9 @@
<goals>
<goal>testCompile</goal>
</goals>
- <compilerVersion>1.6</compilerVersion>
- <source>1.6</source>
- <target>1.6</target>
+ <compilerVersion>1.8</compilerVersion>
+ <source>1.8</source>
+ <target>1.8</target>
<testExcludes>
<exclude>**/ChukwaJobTrackerInstrumentation.java</exclude>
<exclude>**/TestDemuxManager.java</exclude>
@@ -1498,7 +1498,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
- <version>2.4</version>
+ <version>2.9</version>
<configuration>
<dependencyLocationsEnabled>false</dependencyLocationsEnabled>
</configuration>
@@ -1520,6 +1520,44 @@
<configuration>
<aggregate>true</aggregate>
<doctitle>${project.name} API ${project.version}</doctitle>
+ <show>public</show>
+ <tags>
+ <tag>
+ <name>response.representation.200.doc</name>
+ <placement>a</placement>
+ <head>response.representation.200.doc</head>
+ </tag>
+ <tag>
+ <name>response.representation.200.mediaType</name>
+ <placement>a</placement>
+ <head>response.representation.200.mediaType</head>
+ </tag>
+ <tag>
+ <name>response.representation.200.example</name>
+ <placement>a</placement>
+ <head>response.representation.200.example</head>
+ </tag>
+ <tag>
+ <name>response.representation.400.doc</name>
+ <placement>a</placement>
+ <head>response.representation.400.doc</head>
+ </tag>
+ <tag>
+ <name>response.representation.400.mediaType</name>
+ <placement>a</placement>
+ <head>response.representation.400.mediaType</head>
+ </tag>
+ <tag>
+ <name>response.representation.400.example</name>
+ <placement>a</placement>
+ <head>response.representation.400.example</head>
+ </tag>
+ <tag>
+ <name>request.representation.example</name>
+ <placement>a</placement>
+ <head>request.representation.example</head>
+ </tag>
+ </tags>
</configuration>
<reports>
<report>javadoc</report>
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/Chunk.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/Chunk.java b/src/main/java/org/apache/hadoop/chukwa/Chunk.java
index f1a208e..298aaed 100644
--- a/src/main/java/org/apache/hadoop/chukwa/Chunk.java
+++ b/src/main/java/org/apache/hadoop/chukwa/Chunk.java
@@ -91,6 +91,7 @@ public interface Chunk {
/**
* Retrieve a reference to the adaptor that sent this event. Used by
* LocalAgent and Connectors to deliver acks to the appropriate place.
+ * @return Adaptor
*/
public Adaptor getInitiator();
@@ -110,6 +111,7 @@ public interface Chunk {
/**
* Add tag.
+ * @param tag is a comma separated list
*
*/
public void addTag(String tag);
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/ChunkBuilder.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/ChunkBuilder.java b/src/main/java/org/apache/hadoop/chukwa/ChunkBuilder.java
index ccf2de6..f7de5b4 100644
--- a/src/main/java/org/apache/hadoop/chukwa/ChunkBuilder.java
+++ b/src/main/java/org/apache/hadoop/chukwa/ChunkBuilder.java
@@ -36,7 +36,7 @@ public class ChunkBuilder {
/**
* Adds the data in rec to an internal buffer; rec can be reused immediately.
*
- * @param rec
+ * @param rec is byte array of data
*/
public void addRecord(byte[] rec) {
lastRecOffset = lastRecOffset + rec.length;
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/analysis/salsa/visualization/Heatmap.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/analysis/salsa/visualization/Heatmap.java b/src/main/java/org/apache/hadoop/chukwa/analysis/salsa/visualization/Heatmap.java
index 37f341c..9cbe319 100644
--- a/src/main/java/org/apache/hadoop/chukwa/analysis/salsa/visualization/Heatmap.java
+++ b/src/main/java/org/apache/hadoop/chukwa/analysis/salsa/visualization/Heatmap.java
@@ -130,10 +130,11 @@ public class Heatmap {
}
/**
- * @brief Constructor for Swimlanes visualization object
+ * Constructor for Swimlanes visualization object
* @param timezone Timezone string from environment
* @param cluster Cluster name from environment
* @param event_type Whether to display shuffles or not
+ * @param query_stat_type Query state type
* @param valmap HashMap of key/value pairs simulating parameters from a HttpRequest
*/
public Heatmap
@@ -227,6 +228,8 @@ public class Heatmap {
/**
* Set dimensions of image to be generated
* Call before calling @see #run
+ * @param width Image width in pixels
+ * @param height Image height in pixels
*/
public void setDimensions(int width, int height) {
this.SIZE_X=width;
@@ -236,6 +239,7 @@ public class Heatmap {
/**
* Specify whether to print labels of hosts along axes
* Call before calling @see #run
+ * @param legendopt Flag to control plot legends
*/
public void setLegend(boolean legendopt) {
if (legendopt) {
@@ -249,6 +253,10 @@ public class Heatmap {
/**
* Generates image in specified format, and writes image as binary
* output to supplied output stream
+ * @param output Image output stream
+ * @param img_fmt Image format
+ * @param scale Image scale
+ * @return true if image is saved
*/
public boolean getImage(java.io.OutputStream output, String img_fmt, double scale) {
dis = new Display(this.viz);
@@ -526,6 +534,7 @@ public class Heatmap {
/**
* Interfaces with database to get data and
* populate data structures for rendering
+ * @return heat map data JSON
*/
@edu.umd.cs.findbugs.annotations.SuppressWarnings(value =
"SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE",
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/analysis/salsa/visualization/Swimlanes.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/analysis/salsa/visualization/Swimlanes.java b/src/main/java/org/apache/hadoop/chukwa/analysis/salsa/visualization/Swimlanes.java
index 07d9576..c2e0e32 100644
--- a/src/main/java/org/apache/hadoop/chukwa/analysis/salsa/visualization/Swimlanes.java
+++ b/src/main/java/org/apache/hadoop/chukwa/analysis/salsa/visualization/Swimlanes.java
@@ -443,7 +443,7 @@ public class Swimlanes {
}
/**
- * @brief Constructor for Swimlanes visualization object
+ * Constructor for Swimlanes visualization object
* @param timezone Timezone string from environment
* @param cluster Cluster name from environment
* @param event_type Whether to display shuffles or not
@@ -533,6 +533,7 @@ public class Swimlanes {
/**
* Set job ID to filter results on
* Call before calling @see #run
+ * @param s job name
*/
public void setJobName(String s) {
this.jobname = s;
@@ -541,6 +542,8 @@ public class Swimlanes {
/**
* Set dimensions of image to be generated
* Call before calling @see #run
+ * @param width image width in pixels
+ * @param height image height in pixels
*/
public void setDimensions(int width, int height) {
this.SIZE_X=width;
@@ -552,6 +555,7 @@ public class Swimlanes {
* Advisable to not print legend for excessively small images since
* legend has fixed point size
* Call before calling @see #run
+ * @param legendopt parameter to turn on legends
*/
public void setLegend(boolean legendopt) {
if (legendopt) {
@@ -564,6 +568,10 @@ public class Swimlanes {
/**
* Generates image in specified format, and writes image as binary
* output to supplied output stream
+ * @param output output stream of image
+ * @param img_fmt image format
+ * @param scale image scaling factor
+ * @return true if image is saved
*/
public boolean getImage(java.io.OutputStream output, String img_fmt, double scale) {
dis = new Display(this.viz);
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/database/MetricsAggregation.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/database/MetricsAggregation.java b/src/main/java/org/apache/hadoop/chukwa/database/MetricsAggregation.java
index 9d8e8ba..bf39757 100644
--- a/src/main/java/org/apache/hadoop/chukwa/database/MetricsAggregation.java
+++ b/src/main/java/org/apache/hadoop/chukwa/database/MetricsAggregation.java
@@ -38,8 +38,8 @@ public class MetricsAggregation {
private static DatabaseConfig mdlConfig;
/**
- * @param args
- * @throws SQLException
+ * @param args is list of command line parameters
+ * @throws SQLException if SQL query fails
*/
@edu.umd.cs.findbugs.annotations.SuppressWarnings(value =
"SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE",
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/datacollection/ChunkQueue.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/datacollection/ChunkQueue.java b/src/main/java/org/apache/hadoop/chukwa/datacollection/ChunkQueue.java
index 5ed8e4a..677e18a 100644
--- a/src/main/java/org/apache/hadoop/chukwa/datacollection/ChunkQueue.java
+++ b/src/main/java/org/apache/hadoop/chukwa/datacollection/ChunkQueue.java
@@ -31,7 +31,7 @@ public interface ChunkQueue extends ChunkReceiver {
/**
* Add a chunk to the queue, blocking if queue is full.
*
- * @param chunk
+ * @param chunk A binary blob
* @throws InterruptedException if thread is interrupted while blocking
*/
public void add(Chunk chunk) throws InterruptedException;
@@ -39,6 +39,9 @@ public interface ChunkQueue extends ChunkReceiver {
/**
* Return at least one, and no more than count, Chunks into chunks. Blocks if
* queue is empty.
+ * @param chunks List of binary blobs
+ * @param count maximum number of chunk to return
+ * @throws InterruptedException if thread is interrupted while collecting
*/
public void collect(List<Chunk> chunks, int count)
throws InterruptedException;
@@ -46,6 +49,7 @@ public interface ChunkQueue extends ChunkReceiver {
/**
* Return an approximation of the number of chunks in the queue currently. No
* guarantees are made about the accuracy of this number.
+ * @return number of chunks in the queue currently
*/
public int size();
}
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/datacollection/ChunkReceiver.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/datacollection/ChunkReceiver.java b/src/main/java/org/apache/hadoop/chukwa/datacollection/ChunkReceiver.java
index ba71387..d105298 100644
--- a/src/main/java/org/apache/hadoop/chukwa/datacollection/ChunkReceiver.java
+++ b/src/main/java/org/apache/hadoop/chukwa/datacollection/ChunkReceiver.java
@@ -25,7 +25,7 @@ public interface ChunkReceiver {
/**
* Add a chunk to the queue, potentially blocking.
*
- * @param event
+ * @param event is a Chukwa Chunk
* @throws InterruptedException if thread is interrupted while blocking
*/
public void add(Chunk event) throws java.lang.InterruptedException;
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/datacollection/DataFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/datacollection/DataFactory.java b/src/main/java/org/apache/hadoop/chukwa/datacollection/DataFactory.java
index f27b806..405f030 100644
--- a/src/main/java/org/apache/hadoop/chukwa/datacollection/DataFactory.java
+++ b/src/main/java/org/apache/hadoop/chukwa/datacollection/DataFactory.java
@@ -107,6 +107,8 @@ public class DataFactory {
}
/**
+ * @param conf is Chukwa configuration
+ * @param filename is collector list
* @return empty list if file does not exist
* @throws IOException on other error
*/
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/datacollection/OffsetStatsManager.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/datacollection/OffsetStatsManager.java b/src/main/java/org/apache/hadoop/chukwa/datacollection/OffsetStatsManager.java
index 497f738..725b9b9 100644
--- a/src/main/java/org/apache/hadoop/chukwa/datacollection/OffsetStatsManager.java
+++ b/src/main/java/org/apache/hadoop/chukwa/datacollection/OffsetStatsManager.java
@@ -23,20 +23,20 @@ import java.util.Map;
import java.util.LinkedList;
import java.util.Date;
import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.TimeUnit;
/**
* Manages stats for multiple objects of type T. T can be any class that is used
* as a key for offset statistics (i.e. Agent, Collector, etc.). A client would
- * create an instance of this class and call <code>addOffsetDataPoint<code>
+ * create an instance of this class and call <code>addOffsetDataPoint</code>
* repeatedly over time. Then <code>calcAverageRate</code> can be called to
* retrieve the average offset-unit per second over a given time interval.
* <P>
* For a given object T that is actively adding data points, stats are kept for
- * up to 20 minutes.
+ * up to 20 minutes.</p>
* <P>
* Care should be taken to always call <code>remove()</code> when old T objects
- * should no longer be tracked.
+ * should no longer be tracked.</p>
+ * @param <T> is object type
*/
public class OffsetStatsManager<T> {
protected Logger log = Logger.getLogger(getClass());
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/datacollection/adaptor/Adaptor.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/datacollection/adaptor/Adaptor.java b/src/main/java/org/apache/hadoop/chukwa/datacollection/adaptor/Adaptor.java
index 2d92960..f224368 100644
--- a/src/main/java/org/apache/hadoop/chukwa/datacollection/adaptor/Adaptor.java
+++ b/src/main/java/org/apache/hadoop/chukwa/datacollection/adaptor/Adaptor.java
@@ -34,7 +34,7 @@ import org.apache.hadoop.chukwa.datacollection.agent.AdaptorManager;
* offset in the stream.
*
* If an adaptor crashes at byte offset n, and is restarted at byte offset k,
- * with k < n, it is allowed to send different values for bytes k through n the
+ * with k < n, it is allowed to send different values for bytes k through n the
* second time around. However, the stream must still be parseable, assuming
* that bytes 0-k come from the first run,and bytes k - n come from the second.
*
@@ -48,11 +48,12 @@ import org.apache.hadoop.chukwa.datacollection.agent.AdaptorManager;
public interface Adaptor {
/**
* Start this adaptor
+ * @param adaptorID Adaptor ID
*
* @param type the application type, who is starting this adaptor
- * @param status the status string to use for configuration.
* @param offset the stream offset of the first byte sent by this adaptor
- * @throws AdaptorException
+ * @param dest Chunk receiving destination
+ * @throws AdaptorException if adaptor can not be started
*/
public void start(String adaptorID, String type, long offset,
ChunkReceiver dest) throws AdaptorException;
@@ -74,50 +75,22 @@ public interface Adaptor {
* Return the stream name, given params.
* The stream name is the part of the Adaptor status that's used to
* determine uniqueness.
+ * @param datatype Data type
+ * @param params Adaptor parameters
+ * @param c Adaptor Manager
*
* @return Stream name as a string, null if params are malformed
*/
public String parseArgs(String datatype, String params, AdaptorManager c);
-
-
/**
* Signals this adaptor to come to an orderly stop. The adaptor ought to push
* out all the data it can before exiting depending of the shutdown policy
+ * @param shutdownPolicy is defined as forcefully or gracefully
*
* @return the logical offset at which the adaptor was when the method return
- * @throws AdaptorException
+ * @throws AdaptorException Exception on shutdown
*/
public long shutdown(AdaptorShutdownPolicy shutdownPolicy) throws AdaptorException;
-
- /**
- * Signals this adaptor to come to an orderly stop. The adaptor ought to push
- * out all the data it can before exiting.
- *
- * This method is synchronous up to 60 seconds
- *
- * @return the logical offset at which the adaptor stops
- * @throws AdaptorException
- */
-// @Deprecated
-// public long shutdown() throws AdaptorException;
-
-
- /**
- * Signals this adaptor to come to an abrupt stop, as quickly as it can. The
- * use case here is "Whups, I didn't mean to start that adaptor tailing a
- * gigabyte file, stop it now".
- *
- * Adaptors might need to do something nontrivial here, e.g., in the case in
- * which they have registered periodic timer interrupts, or use a shared
- * worker thread from which they need to disengage.
- *
- * This method is synchronous: In other words, after shutdown() returns, no
- * new data should be written.
- *
- * @throws AdaptorException
- */
-// @Deprecated
-// public void hardStop() throws AdaptorException;
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/datacollection/adaptor/SyslogAdaptor.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/datacollection/adaptor/SyslogAdaptor.java b/src/main/java/org/apache/hadoop/chukwa/datacollection/adaptor/SyslogAdaptor.java
index 50dec64..6ca4d14 100644
--- a/src/main/java/org/apache/hadoop/chukwa/datacollection/adaptor/SyslogAdaptor.java
+++ b/src/main/java/org/apache/hadoop/chukwa/datacollection/adaptor/SyslogAdaptor.java
@@ -38,10 +38,10 @@ import org.apache.log4j.Logger;
*
* Data Type mapping can be overwritten in Chukwa Agent Configuration file, i.e.:
*
- * <property>
- * <name>syslog.adaptor.port.9095.facility.LOCAL1</name>
- * <value>HADOOP</value>
- * </property>
+ * <property>
+ * <name>syslog.adaptor.port.9095.facility.LOCAL1</name>
+ * <value>HADOOP</value>
+ * </property>
*
* When demux takes place, data received on port 9095 with facility name LOCAL0 will
* be processed by demux parser for data type "HADOOP".
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/FileTailingAdaptor.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/FileTailingAdaptor.java b/src/main/java/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/FileTailingAdaptor.java
index 9fc25b9..ff1e60b 100644
--- a/src/main/java/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/FileTailingAdaptor.java
+++ b/src/main/java/org/apache/hadoop/chukwa/datacollection/adaptor/filetailer/FileTailingAdaptor.java
@@ -113,8 +113,6 @@ public class FileTailingAdaptor extends LWFTAdaptor {
* Looks at the tail of the associated file, adds some of it to event queue
* This method is not thread safe. Returns true if there's more data in the
* file
- *
- * @param eq the queue to write Chunks into
*/
@Override
public boolean tailFile()
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/datacollection/adaptor/jms/JMSAdaptor.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/datacollection/adaptor/jms/JMSAdaptor.java b/src/main/java/org/apache/hadoop/chukwa/datacollection/adaptor/jms/JMSAdaptor.java
index 79f8db6..ff07917 100644
--- a/src/main/java/org/apache/hadoop/chukwa/datacollection/adaptor/jms/JMSAdaptor.java
+++ b/src/main/java/org/apache/hadoop/chukwa/datacollection/adaptor/jms/JMSAdaptor.java
@@ -49,8 +49,8 @@ import javax.jms.MessageConsumer;
* <P>
* This adaptor is added to an Agent like so:
* <code>
- * add JMSAdaptor <dataType> <brokerURL> <-t <topicName>|-q <queueName>> [-s <JMSSelector>]
- * [-x <transformerName>] [-p <transformerConfigs>] <offset>
+ * add JMSAdaptor <dataType> <brokerURL> <-t <topicName> |-q <queueName> [-s <JMSSelector>]
+ * [-x <transformerName>] [-p <transformerConfigs>] <offset>
* </code>
* <ul>
* <li><code>dataType</code> - The chukwa data type.</li>
@@ -119,11 +119,11 @@ public class JMSAdaptor extends AbstractAdaptor {
/**
* This adaptor received configuration like this:
- * <brokerURL> <-t <topicName>|-q <queueName>> [-s <JMSSelector>] [-x <transformerName>]
- * [-p <transformerProperties>]
+ * <brokerURL> <-t <topicName>|-q <queueName>> [-s <JMSSelector>] [-x <transformerName>]
+ * [-p <transformerProperties>]
*
- * @param s
- * @return
+ * @param s is a list of parameters
+ * @return Adaptor ID
*/
@Override
public String parseArgs(String s) {
@@ -273,17 +273,17 @@ public class JMSAdaptor extends AbstractAdaptor {
/**
* Status is used to write checkpoints. Checkpoints are written as:
- * ADD <adaptorKey> = <adaptorClass> <currentStatus> <offset>
+ * ADD <adaptorKey> = <adaptorClass> <currentStatus> <offset>
*
* Once they're reloaded, adaptors are re-initialized with
- * <adaptorClass> <currentStatus> <offset>
+ * <adaptorClass> <currentStatus> <offset>
*
* While doing so, this gets passed by to the parseArgs method:
- * <currentStatus>
+ * <currentStatus>
*
- * Without the first token in <currentStatus>, which is expected to be <dataType>.
+ * Without the first token in <currentStatus>, which is expected to be <dataType>.
*
- * @return
+ * @return Adaptor status
*/
@Override
public String getCurrentStatus() {
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/datacollection/adaptor/jms/JMSMessagePropertyTransformer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/datacollection/adaptor/jms/JMSMessagePropertyTransformer.java b/src/main/java/org/apache/hadoop/chukwa/datacollection/adaptor/jms/JMSMessagePropertyTransformer.java
index facff2d..b8689bb 100644
--- a/src/main/java/org/apache/hadoop/chukwa/datacollection/adaptor/jms/JMSMessagePropertyTransformer.java
+++ b/src/main/java/org/apache/hadoop/chukwa/datacollection/adaptor/jms/JMSMessagePropertyTransformer.java
@@ -35,7 +35,7 @@ import java.util.ArrayList;
* To configure this transformer, set the -p field of the adaptor to the
* following (surrounded with double quotes):
* <code>
- * <propertyNames> [-d <delimiter>] [-r <requiredPropertyNames>]
+ * <propertyNames> [-d <delimiter>] [-r <requiredPropertyNames>]
* </code>
* <ul>
* <li><code>propertyNames</code> - Comma-separated list of JMS properties.</li>
@@ -107,9 +107,9 @@ public class JMSMessagePropertyTransformer implements JMSMessageTransformer {
* all of the configured message properties are not found, returns null.
* <P>
* The could be enhanced to support the concept of optional/required properties.
- * @param message
- * @return
- * @throws JMSException
+ * @param message is data to be transported
+ * @return byte array
+ * @throws JMSException if problem transforming data
*/
public byte[] transform(Message message) throws JMSException {
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/datacollection/adaptor/jms/JMSMessageTransformer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/datacollection/adaptor/jms/JMSMessageTransformer.java b/src/main/java/org/apache/hadoop/chukwa/datacollection/adaptor/jms/JMSMessageTransformer.java
index de2328f..bf9056c 100644
--- a/src/main/java/org/apache/hadoop/chukwa/datacollection/adaptor/jms/JMSMessageTransformer.java
+++ b/src/main/java/org/apache/hadoop/chukwa/datacollection/adaptor/jms/JMSMessageTransformer.java
@@ -33,7 +33,7 @@ public interface JMSMessageTransformer {
* passed. If they weren't, this method will never be called.
*
* @param args Arguments needed to configur the transformer.
- * @return
+ * @return adaptor id
*/
public String parseArgs(String args);
@@ -43,7 +43,7 @@ public interface JMSMessageTransformer {
*
* @param message JMS message received by a JMS Adaptor.
* @return the bytes that should be bound to the Chukwa chunk.
- * @throws JMSException
+ * @throws JMSException if there is problem process message
*/
public byte[] transform(Message message) throws JMSException;
}
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/datacollection/agent/AdaptorResetThread.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/datacollection/agent/AdaptorResetThread.java b/src/main/java/org/apache/hadoop/chukwa/datacollection/agent/AdaptorResetThread.java
index 88ba9bc..85526f8 100644
--- a/src/main/java/org/apache/hadoop/chukwa/datacollection/agent/AdaptorResetThread.java
+++ b/src/main/java/org/apache/hadoop/chukwa/datacollection/agent/AdaptorResetThread.java
@@ -63,7 +63,7 @@ public class AdaptorResetThread extends Thread {
/**
* Resets all adaptors with outstanding data more than timeSinceLastCommit old.
- * @param timeSinceLastCommit
+ * @param timeSinceLastCommit is millisecond since last check point
* @return the number of reset adaptors
*/
public int resetTimedOutAdaptors(int timeSinceLastCommit) {
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/datacollection/agent/AgentControlSocketListener.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/datacollection/agent/AgentControlSocketListener.java b/src/main/java/org/apache/hadoop/chukwa/datacollection/agent/AgentControlSocketListener.java
index d024180..faf39f9 100644
--- a/src/main/java/org/apache/hadoop/chukwa/datacollection/agent/AgentControlSocketListener.java
+++ b/src/main/java/org/apache/hadoop/chukwa/datacollection/agent/AgentControlSocketListener.java
@@ -205,8 +205,7 @@ public class AgentControlSocketListener extends Thread {
/**
* Initializes listener, but does not bind to socket.
- *
- * @param a the agent to control
+ * @param agent the agent to control
*/
public AgentControlSocketListener(ChukwaAgent agent) {
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/datacollection/agent/ChukwaAgent.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/datacollection/agent/ChukwaAgent.java b/src/main/java/org/apache/hadoop/chukwa/datacollection/agent/ChukwaAgent.java
index 0d201e7..be619f3 100644
--- a/src/main/java/org/apache/hadoop/chukwa/datacollection/agent/ChukwaAgent.java
+++ b/src/main/java/org/apache/hadoop/chukwa/datacollection/agent/ChukwaAgent.java
@@ -256,8 +256,8 @@ public class ChukwaAgent implements AdaptorManager {
}
/**
- * @param args
- * @throws AdaptorException
+ * @param args is command line arguements
+ * @throws AdaptorException if error registering adaptors
*/
public static void main(String[] args) throws AdaptorException {
@@ -604,7 +604,7 @@ public class ChukwaAgent implements AdaptorManager {
/**
* Expose the adaptor list. Keys are adaptor ID numbers, values are the
* adaptor status strings.
- * @return
+ * @return adaptor list
*/
public Map<String, String> getAdaptorList() {
Map<String, String> adaptors = new HashMap<String, String>(adaptorsByName.size());
@@ -700,8 +700,9 @@ public class ChukwaAgent implements AdaptorManager {
/**
* Triggers agent shutdown. For now, this method doesn't shut down adaptors
* explicitly. It probably should.
+ * @param force sets flag to exit forcefully
*/
- public void shutdown(boolean exit) {
+ public void shutdown(boolean force) {
controlSock.shutdown(); // make sure we don't get new requests
if (statsCollector != null) {
@@ -739,7 +740,7 @@ public class ChukwaAgent implements AdaptorManager {
adaptorPositions.clear();
adaptorStatsManager.clear();
agent.stop();
- if (exit)
+ if (force)
return;
}
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/datacollection/agent/metrics/AgentMetrics.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/datacollection/agent/metrics/AgentMetrics.java b/src/main/java/org/apache/hadoop/chukwa/datacollection/agent/metrics/AgentMetrics.java
index 34bd2ed..a161bc7 100644
--- a/src/main/java/org/apache/hadoop/chukwa/datacollection/agent/metrics/AgentMetrics.java
+++ b/src/main/java/org/apache/hadoop/chukwa/datacollection/agent/metrics/AgentMetrics.java
@@ -42,7 +42,10 @@ public class AgentMetrics implements Updater {
public MetricsTimeVaryingInt removedAdaptor =
new MetricsTimeVaryingInt("removedAdaptor", registry,"number of removed adaptor");
- /** Creates a new instance of AgentMetrics */
+ /** Creates a new instance of AgentMetrics
+ * @param processName is jvm name of agent process
+ * @param recordName is mbean record name
+ **/
public AgentMetrics(String processName, String recordName) {
MetricsContext context = MetricsUtil.getContext(processName);
metricsRecord = MetricsUtil.createRecord(context, recordName);
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/datacollection/agent/metrics/ChunkQueueMetrics.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/datacollection/agent/metrics/ChunkQueueMetrics.java b/src/main/java/org/apache/hadoop/chukwa/datacollection/agent/metrics/ChunkQueueMetrics.java
index 930358f..813ffe7 100644
--- a/src/main/java/org/apache/hadoop/chukwa/datacollection/agent/metrics/ChunkQueueMetrics.java
+++ b/src/main/java/org/apache/hadoop/chukwa/datacollection/agent/metrics/ChunkQueueMetrics.java
@@ -50,7 +50,10 @@ public class ChunkQueueMetrics implements Updater {
new MetricsIntValue("fullQueue", registry,"Queue is full");
- /** Creates a new instance of QueueMetrics */
+ /** Creates a new instance of QueueMetrics
+ * @param processName is jvm process of Agent process
+ * @param recordName is mbean record name
+ * */
public ChunkQueueMetrics(String processName, String recordName) {
MetricsContext context = MetricsUtil.getContext(processName);
metricsRecord = MetricsUtil.createRecord(context, recordName);
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/datacollection/agent/rest/AdaptorController.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/datacollection/agent/rest/AdaptorController.java b/src/main/java/org/apache/hadoop/chukwa/datacollection/agent/rest/AdaptorController.java
index dc44975..7e4a696 100644
--- a/src/main/java/org/apache/hadoop/chukwa/datacollection/agent/rest/AdaptorController.java
+++ b/src/main/java/org/apache/hadoop/chukwa/datacollection/agent/rest/AdaptorController.java
@@ -57,6 +57,8 @@ public class AdaptorController {
/**
* Adds an adaptor to the agent and returns the adaptor info
+ * @param ac is adaptor configuration
+ * @return web status
*
* @request.representation.example {@link Examples#CREATE_ADAPTOR_SAMPLE}
* @response.representation.200.doc Adaptor has been registered
@@ -99,6 +101,7 @@ public class AdaptorController {
* Remove an adaptor from the agent
*
* @param adaptorId id of adaptor to remove.
+ * @return web status
* @response.representation.200.doc Delete adaptor by id
* @response.representation.200.mediaType text/plain
*/
@@ -125,6 +128,7 @@ public class AdaptorController {
/**
* Get all adaptors
+ * @return web status
*
* @response.representation.200.doc List all configured adaptors
* @response.representation.200.mediaType application/json
@@ -140,6 +144,7 @@ public class AdaptorController {
* Get a single adaptor
*
* @param adaptorId id of the adaptor to return
+ * @return web status
* @response.representation.200.doc Adaptor status and data transfer rate in 1, 5, 10 minutes averages
* @response.representation.200.mediaType application/json
* @response.representation.200.example {@link Examples#ADAPTOR_STATUS_SAMPLE}
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/datacollection/controller/ChukwaAgentController.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/datacollection/controller/ChukwaAgentController.java b/src/main/java/org/apache/hadoop/chukwa/datacollection/controller/ChukwaAgentController.java
index 69e3566..7ab915f 100644
--- a/src/main/java/org/apache/hadoop/chukwa/datacollection/controller/ChukwaAgentController.java
+++ b/src/main/java/org/apache/hadoop/chukwa/datacollection/controller/ChukwaAgentController.java
@@ -119,7 +119,7 @@ public class ChukwaAgentController {
*
* @return The id of the this {@link Adaptor}, assigned by the agent
* upon successful registration
- * @throws IOException
+ * @throws IOException if problem bind to agent controller port
*/
String register() throws IOException {
Socket s = new Socket(hostname, portno);
@@ -230,6 +230,10 @@ public class ChukwaAgentController {
* doesn't crash if it's attempt to register an adaptor fails. This call does
* not retry a conection. for that use the overloaded version of this which
* accepts a time interval and number of retries
+ * @param adaptorName is adaptor class name
+ * @param type is data type
+ * @param params is adaptor specific parameters
+ * @param offset is starting sequence id
*
* @return the id number of the adaptor, generated by the agent
*/
@@ -246,6 +250,13 @@ public class ChukwaAgentController {
* Registers a new adaptor. Makes no guarantee about success. On failure, to
* connect to server, will retry <code>numRetries</code> times, every
* <code>retryInterval</code> milliseconds.
+ * @param adaptorID is unique adaptor identifier
+ * @param adaptorName is adaptor class name
+ * @param type is user defined data type name
+ * @param params is adaptor specific configuration
+ * @param offset is starting sequence id
+ * @param numRetries is number of retries
+ * @param retryInterval is time between retries
*
* @return the id number of the adaptor, generated by the agent
*/
@@ -399,9 +410,11 @@ public class ChukwaAgentController {
* {@link ChukwaAgentController#pauseFile(String, String)} and
* {@link ChukwaAgentController#resumeFile(String, String)} which will store
* the adaptors metadata and re-use them to pick up where it left off.
+ * @param appType is user defined name for the data stream
*
- * @param type the datatype associated with the file to pass through
* @param filename of the file for the tail adaptor to start monitoring
+ * @param numRetries is number of retries
+ * @param retryInterval is time between retries
* @return the id number of the adaptor, generated by the agent
*/
public String addFile(String appType, String filename, long numRetries,
@@ -441,11 +454,11 @@ public class ChukwaAgentController {
* but we store it state so that we can re-launch a new adaptor with the same
* state later.
*
- * @param appType
- * @param filename
+ * @param appType is application type
+ * @param filename is file name suffix pattern
* @return array of adaptorID numbers which have been created and assigned the
* state of the formerly paused adaptors
- * @throws IOException
+ * @throws IOException if error pausing adaptors
*/
public Collection<String> pauseFile(String appType, String filename)
throws IOException {
@@ -478,12 +491,12 @@ public class ChukwaAgentController {
/**
* Resume all adaptors for this filename that have been paused
*
- * @param appType the appType
+ * @param appType is application type
* @param filename filename by which to lookup adaptors which are paused (and
* tailing this file)
* @return an array of the new adaptor ID numbers which have resumed where the
* old adaptors left off
- * @throws IOException
+ * @throws IOException if unable to resume all adaptors
*/
public Collection<String> resumeFile(String appType, String filename)
throws IOException {
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/datacollection/sender/ChukwaHttpSender.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/datacollection/sender/ChukwaHttpSender.java b/src/main/java/org/apache/hadoop/chukwa/datacollection/sender/ChukwaHttpSender.java
index 76727fe..49b393b 100644
--- a/src/main/java/org/apache/hadoop/chukwa/datacollection/sender/ChukwaHttpSender.java
+++ b/src/main/java/org/apache/hadoop/chukwa/datacollection/sender/ChukwaHttpSender.java
@@ -193,7 +193,7 @@ public class ChukwaHttpSender implements ChukwaSender {
/**
* Set up a list of connectors for this client to send {@link Chunk}s to
*
- * @param collectors
+ * @param collectors is a list of collectors
*/
public void setCollectors(Iterator<String> collectors) {
this.collectors = collectors;
@@ -268,8 +268,8 @@ public class ChukwaHttpSender implements ChukwaSender {
* @param method the data to push
* @param expectedCommitResults the list
* @return the list of committed chunks
- * @throws IOException
- * @throws InterruptedException
+ * @throws IOException if error writing
+ * @throws InterruptedException if shutdown has been initiated
*/
public List<CommitListEntry> postAndParseResponse(PostMethod method,
List<CommitListEntry> expectedCommitResults)
@@ -280,9 +280,9 @@ public class ChukwaHttpSender implements ChukwaSender {
/**
* Responsible for executing the supplied method on at least one collector
- * @param method
- * @return
- * @throws InterruptedException
+ * @param method is HTTP method
+ * @return the list of commited status
+ * @throws InterruptedException if shutdown has been initiated
* @throws IOException if no collector responds with an OK
*/
protected List<String> reliablySend(HttpMethodBase method, String pathSuffix) throws InterruptedException, IOException {
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/datacollection/sender/ChukwaSender.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/datacollection/sender/ChukwaSender.java b/src/main/java/org/apache/hadoop/chukwa/datacollection/sender/ChukwaSender.java
index 0a46ea1..d816aec 100644
--- a/src/main/java/org/apache/hadoop/chukwa/datacollection/sender/ChukwaSender.java
+++ b/src/main/java/org/apache/hadoop/chukwa/datacollection/sender/ChukwaSender.java
@@ -34,6 +34,7 @@ public interface ChukwaSender {
* @param chunksToSend a list of chunks to commit
* @return the list of committed chunks
* @throws InterruptedException if interrupted while trying to send
+ * @throws java.io.IOException when writing fails
*/
public List<CommitListEntry> send(List<Chunk> chunksToSend)
throws InterruptedException, java.io.IOException;
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/datacollection/sender/RetryListOfCollectors.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/datacollection/sender/RetryListOfCollectors.java b/src/main/java/org/apache/hadoop/chukwa/datacollection/sender/RetryListOfCollectors.java
index c636ad2..25386bb 100644
--- a/src/main/java/org/apache/hadoop/chukwa/datacollection/sender/RetryListOfCollectors.java
+++ b/src/main/java/org/apache/hadoop/chukwa/datacollection/sender/RetryListOfCollectors.java
@@ -95,8 +95,8 @@ public class RetryListOfCollectors implements Iterator<String>, Cloneable {
/**
* This is only used for debugging. Possibly it should sanitize urls the same way the other
* constructor does.
- * @param collectors
- * @param maxRetryRateMs
+ * @param collectors is list of collector hostname
+ * @param conf is Chukwa configuration
*/
public RetryListOfCollectors(final List<String> collectors, Configuration conf) {
this(conf);
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/datacollection/sender/metrics/HttpSenderMetrics.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/datacollection/sender/metrics/HttpSenderMetrics.java b/src/main/java/org/apache/hadoop/chukwa/datacollection/sender/metrics/HttpSenderMetrics.java
index e223736..306c0bc 100644
--- a/src/main/java/org/apache/hadoop/chukwa/datacollection/sender/metrics/HttpSenderMetrics.java
+++ b/src/main/java/org/apache/hadoop/chukwa/datacollection/sender/metrics/HttpSenderMetrics.java
@@ -47,7 +47,10 @@ public class HttpSenderMetrics implements Updater {
public MetricsTimeVaryingInt httpTimeOutException =
new MetricsTimeVaryingInt("httpTimeOutException", registry,"number of HTTP TimeOutException");
- /** Creates a new instance of HttpSenderMetrics */
+ /** Creates a new instance of HttpSenderMetrics
+ * @param processName is jvm process name
+ * @param recordName is Hadoop metrics data type
+ * */
public HttpSenderMetrics(String processName, String recordName) {
MetricsContext context = MetricsUtil.getContext(processName);
metricsRecord = MetricsUtil.createRecord(context, recordName);
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/datacollection/test/FileTailerStressTest.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/datacollection/test/FileTailerStressTest.java b/src/main/java/org/apache/hadoop/chukwa/datacollection/test/FileTailerStressTest.java
index e00229a..4523103 100644
--- a/src/main/java/org/apache/hadoop/chukwa/datacollection/test/FileTailerStressTest.java
+++ b/src/main/java/org/apache/hadoop/chukwa/datacollection/test/FileTailerStressTest.java
@@ -73,7 +73,7 @@ public class FileTailerStressTest {
static int FILES_TO_USE = 100;
/**
- * @param args
+ * @param args is command line parameters
*/
public static void main(String[] args) {
try {
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/datacollection/writer/ChukwaWriter.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/datacollection/writer/ChukwaWriter.java b/src/main/java/org/apache/hadoop/chukwa/datacollection/writer/ChukwaWriter.java
index 827c35a..86e040b 100644
--- a/src/main/java/org/apache/hadoop/chukwa/datacollection/writer/ChukwaWriter.java
+++ b/src/main/java/org/apache/hadoop/chukwa/datacollection/writer/ChukwaWriter.java
@@ -35,9 +35,9 @@ public interface ChukwaWriter {
* COMMIT_PENDING should be returned if a writer has written data, but
* this data may ultimately disappear. Contains a list of strings, format
* unspecified, that agents can use to find out, eventually, if their data
- * has committed. String <n> corresponds to the nth chunk passed to add().
+ * has committed. String <n> corresponds to the nth chunk passed to add().
*
- * At present, the format is <sinkfilename> <offset>,
+ * At present, the format is <sinkfilename> <offset>,
* where sinkfilename is the name of a sinkfile, without directory but with
* .done suffix, and offset is the last byte of the associated chunk.
*/
@@ -56,8 +56,8 @@ public interface ChukwaWriter {
/**
* Called once to initialize this writer.
*
- * @param c
- * @throws WriterException
+ * @param c is Chukwa configuration
+ * @throws WriterException if error writing data
*/
public void init(Configuration c) throws WriterException;
@@ -67,16 +67,16 @@ public interface ChukwaWriter {
* Subclasses may assume that init() will be called before any calls to
* add(), and that add() won't be called after close().
*
- * @param chunks
- * @return
- * @throws WriterException
+ * @param chunks is a list of data to send
+ * @return CommitStatus
+ * @throws WriterException if error writing data
*/
public CommitStatus add(List<Chunk> chunks) throws WriterException;
/**
* Called once, indicating that the writer should close files and prepare
* to exit.
- * @throws WriterException
+ * @throws WriterException if error writing data
*/
public void close() throws WriterException;
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/datacollection/writer/InMemoryWriter.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/datacollection/writer/InMemoryWriter.java b/src/main/java/org/apache/hadoop/chukwa/datacollection/writer/InMemoryWriter.java
index 4d9e2a0..c28f7a6 100644
--- a/src/main/java/org/apache/hadoop/chukwa/datacollection/writer/InMemoryWriter.java
+++ b/src/main/java/org/apache/hadoop/chukwa/datacollection/writer/InMemoryWriter.java
@@ -62,7 +62,7 @@ public class InMemoryWriter implements ChukwaWriter {
* @param bytes amount to try to read
* @param ms time to wait
* @return a newly read-in chunk
- * @throws IOException
+ * @throws IOException if error reading data
*/
public Chunk readOutChunk(int bytes, int ms) throws IOException {
http://git-wip-us.apache.org/repos/asf/chukwa/blob/8011ff1f/src/main/java/org/apache/hadoop/chukwa/datacollection/writer/SocketTeeWriter.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/datacollection/writer/SocketTeeWriter.java b/src/main/java/org/apache/hadoop/chukwa/datacollection/writer/SocketTeeWriter.java
index 88ec861..67ee90d 100644
--- a/src/main/java/org/apache/hadoop/chukwa/datacollection/writer/SocketTeeWriter.java
+++ b/src/main/java/org/apache/hadoop/chukwa/datacollection/writer/SocketTeeWriter.java
@@ -40,16 +40,16 @@ import org.apache.hadoop.chukwa.util.ExceptionUtil;
* Defaults to 9094
*
* Protocol is as follows:
- * Client ---> TeeWriter "RAW | WRITABLE <filter>"
+ * Client ---> TeeWriter "RAW | WRITABLE <filter>"
* as per DumpChunks.
*
- * TeeWriter ---> Client "OK\n"
+ * TeeWriter ---> Client "OK\n"
* In RAW mode
- * TeeWriter ---> Client (length(int) byte[length])*
+ * TeeWriter ---> Client (length(int) byte[length])*
* An indefinite sequence of length, followed by byte array.
*
* In Writable mode
- * TeeWriter ---> Client (Chunk serialized as Writable)*
+ * TeeWriter ---> Client (Chunk serialized as Writable)*
* An indefinite sequence of serialized chunks
*
* In English: clients should connect and say either "RAW " or "WRITABLE "