Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
CHUKWA-674. Integrated Chukwa collector feature to Chukwa Agent. (Eri…
…c Yang)

git-svn-id: https://svn.apache.org/repos/asf/chukwa/trunk@1606617 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
macroadster committed Jun 30, 2014
1 parent 313cca1 commit 2f74fbbfc995f0382d2d300dfa452174cc0e575f
Show file tree
Hide file tree
Showing 31 changed files with 482 additions and 287 deletions.
@@ -12,6 +12,8 @@ Release 0.6 - Unreleased

NEW FEATURES

CHUKWA-674. Integrated Chukwa collector feature to Chukwa Agent. (Eric Yang)

CHUKWA-705. Updated Chukwa to support JDK7 and updated to Hadoop 1.2.1 and HBase 0.96.1.1. (Eric Yang)

CHUKWA-699. Updated timeline widget stylesheet. (Eric Yang)
@@ -161,6 +161,11 @@ elif [ "$COMMAND" = "tail" ]; then
fi

pid="${CHUKWA_PID_DIR}/$PID.pid"

if [ "$1" = "start" ]; then
shift
fi

if [ "$1" = "stop" ]; then
if [ -e $pid ]; then
TARGET_PID=`cat $pid`
@@ -169,23 +174,29 @@ if [ "$1" = "stop" ]; then
sleep $CHUKWA_STOP_TIMEOUT
if kill -0 $TARGET_PID > /dev/null 2>&1; then
kill -9 $TARGET_PID
exit 1
fi
fi
else
echo "Cannot find PID file - $PID.pid; NO $PID to stop";
fi
exit 0
elif [ -f $pid ]; then
if kill -0 `cat $pid` > /dev/null 2>&1; then
echo $command running as process `cat $pid`. Stop it first.
exit 1
else
# pid file exists, but process is dead.
echo $command is not runnning, but pid file existed.
rm -f $pid
fi
else
# run command
if [ "$BACKGROUND" = "false" ]; then
${JAVA_HOME}/bin/java ${JAVA_OPT} -Djava.library.path=${JAVA_LIBRARY_PATH} -DCHUKWA_HOME=${CHUKWA_HOME} -DCHUKWA_CONF_DIR=${CHUKWA_CONF_DIR} -DCHUKWA_LOG_DIR=${CHUKWA_LOG_DIR} -DCHUKWA_DATA_DIR=${CHUKWA_DATA_DIR} -DAPP=${APP} -Dlog4j.configuration=chukwa-log4j.properties -classpath ${CHUKWA_CONF_DIR}:${CLASSPATH}:${CHUKWA_CLASSPATH}:${tools} ${CLASS} $OPTS $@
else
exec ${JAVA_HOME}/bin/java ${JAVA_OPT} -Djava.library.path=${JAVA_LIBRARY_PATH} -DCHUKWA_HOME=${CHUKWA_HOME} -DCHUKWA_CONF_DIR=${CHUKWA_CONF_DIR} -DCHUKWA_LOG_DIR=${CHUKWA_LOG_DIR} -DCHUKWA_DATA_DIR=${CHUKWA_DATA_DIR} -DAPP=${APP} -Dlog4j.configuration=chukwa-log4j.properties -classpath ${CHUKWA_CONF_DIR}:${CLASSPATH}:${CHUKWA_CLASSPATH}:${tools} ${CLASS} $OPTS $@ &
sleep 1
fi
fi

# run command
if [ "$BACKGROUND" = "false" ]; then
${JAVA_HOME}/bin/java ${JAVA_OPT} -Djava.library.path=${JAVA_LIBRARY_PATH} -DCHUKWA_HOME=${CHUKWA_HOME} -DCHUKWA_CONF_DIR=${CHUKWA_CONF_DIR} -DCHUKWA_LOG_DIR=${CHUKWA_LOG_DIR} -DCHUKWA_DATA_DIR=${CHUKWA_DATA_DIR} -DAPP=${APP} -Dlog4j.configuration=chukwa-log4j.properties -classpath ${CHUKWA_CONF_DIR}:${CLASSPATH}:${CHUKWA_CLASSPATH}:${tools} ${CLASS} $OPTS $@
else
exec ${JAVA_HOME}/bin/java ${JAVA_OPT} -Djava.library.path=${JAVA_LIBRARY_PATH} -DCHUKWA_HOME=${CHUKWA_HOME} -DCHUKWA_CONF_DIR=${CHUKWA_CONF_DIR} -DCHUKWA_LOG_DIR=${CHUKWA_LOG_DIR} -DCHUKWA_DATA_DIR=${CHUKWA_DATA_DIR} -DAPP=${APP} -Dlog4j.configuration=chukwa-log4j.properties -classpath ${CHUKWA_CONF_DIR}:${CLASSPATH}:${CHUKWA_CLASSPATH}:${tools} ${CLASS} $OPTS $@ &
sleep 1
fi

@@ -72,12 +72,18 @@

<property>
<name>chukwaAgent.collector.retryInterval</name>
<value>20000</value>
<value>500</value>
<description>the number of milliseconds to wait between searches for a collector</description>
</property>

<property>
<name>chukwa.pipeline</name>
<value>org.apache.hadoop.chukwa.datacollection.writer.hbase.HBaseWriter</value>
</property>

<property>
<name>syslog.adaptor.port.9095.facility.LOCAL1</name>
<value>HADOOP</value>
</property>

</configuration>
@@ -19,25 +19,25 @@ create "Jobs",
{NAME => "summary" }
create "SystemMetrics",
{NAME => "cpu", VERSIONS => 65535},
{NAME => "system", VERSION => 65535},
{NAME => "disk", VERSION => 65535},
{NAME => "memory", VERSION => 65535},
{NAME => "swap", VERSION => 65535},
{NAME => "network", VERSION => 65535},
{NAME => "tags", VERSION => 65535}
{NAME => "system", VERSIONS => 65535},
{NAME => "disk", VERSIONS => 65535},
{NAME => "memory", VERSIONS => 65535},
{NAME => "swap", VERSIONS => 65535},
{NAME => "network", VERSIONS => 65535},
{NAME => "tags", VERSIONS => 65535}
create "ClusterSummary",
{NAME=> "cpu", VERSIONS => 65535},
{NAME => "system", VERSION => 65535},
{NAME => "disk", VERSION => 65535},
{NAME => "memory", VERSION => 65535},
{NAME => "network", VERSION => 65535},
{NAME => "swap", VERSION => 65535},
{NAME => "hdfs", VERSION => 65535},
{NAME => "mapreduce", VERSION => 65535}
{NAME => "system", VERSIONS => 65535},
{NAME => "disk", VERSIONS => 65535},
{NAME => "memory", VERSIONS => 65535},
{NAME => "network", VERSIONS => 65535},
{NAME => "swap", VERSIONS => 65535},
{NAME => "hdfs", VERSIONS => 65535},
{NAME => "mapreduce", VERSIONS => 65535}
create "chukwa",
{NAME=>"chukwaAgent_chunkQueue", VERSIONS => 65535},
{NAME => "chukwaAgent_metrics", VERSION => 65535},
{NAME => "chukwaAgent_httpSender", VERSION => 65535}
{NAME => "chukwaAgent_metrics", VERSIONS => 65535},
{NAME => "chukwaAgent_httpSender", VERSIONS => 65535}
create "HBase",
{NAME => "master", VERSIONS => 65535},
{NAME => "regionserver", VERSIONS => 65535}
99 pom.xml
@@ -28,7 +28,7 @@
<package.pid.dir>/var/run/chukwa</package.pid.dir>
<package.release>1</package.release>
<package.version>0.6.0</package.version>
<final.name>${project.artifactId}-incubating-${package.version}</final.name>
<final.name>${project.artifactId}-${package.version}</final.name>
<test.build.dir>${basedir}/target/test</test.build.dir>
<test.build.data>${test.build.dir}/data</test.build.data>
<test.cache.data>${test.build.dir}/cache</test.cache.data>
@@ -118,11 +118,9 @@
<systemPath>${basedir}/lib/confspellcheck.jar</systemPath>
</dependency>
<dependency>
<groupId>com.mdimension</groupId>
<groupId>com.rubiconproject.oss</groupId>
<artifactId>jchronic</artifactId>
<version>0.2.3</version>
<scope>system</scope>
<systemPath>${basedir}/lib/jchronic-0.2.3.jar</systemPath>
<version>0.2.6</version>
</dependency>
<dependency>
<groupId>org.apache.log4j</groupId>
@@ -132,11 +130,9 @@
<systemPath>${basedir}/lib/NagiosAppender-1.5.0.jar</systemPath>
</dependency>
<dependency>
<groupId>org.hyperic</groupId>
<groupId>org.fusesource</groupId>
<artifactId>sigar</artifactId>
<version>1.6.4</version>
<scope>system</scope>
<systemPath>${basedir}/lib/sigar.jar</systemPath>
</dependency>
<dependency>
<groupId>org.json</groupId>
@@ -271,7 +267,7 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>10.0.1</version>
<version>12.0.1</version>
<exclusions>
<exclusion>
<groupId>com.google.code.findbugs</groupId>
@@ -401,29 +397,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.6</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
<executions>
<execution>
<id>chmod-jmx-file</id>
<phase>process-resources</phase>
<configuration>
<tasks name="setup">
<chmod file="target/conf/jmxremote.password" perm="600" />
<chmod file="target/conf/jmxremote.access" perm="600" />
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
@@ -462,6 +435,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<executions>
<execution>
<id>default-compile</id>
@@ -470,7 +444,9 @@
<goals>
<goal>compile</goal>
</goals>
<compilerVersion>1.7</compilerVersion>
<!--<compilerArgument>-Xlint:unchecked</compilerArgument>
<compilerArgument>-Xlint:deprecation</compilerArgument>-->
<compilerVersion>1.6</compilerVersion>
<source>1.6</source>
<target>1.6</target>
<excludes>
@@ -485,6 +461,8 @@
<goals>
<goal>testCompile</goal>
</goals>
<!--<compilerArgument>-Xlint:unchecked</compilerArgument>
<compilerArgument>-Xlint:deprecation</compilerArgument>-->
<compilerVersion>1.7</compilerVersion>
<source>1.6</source>
<target>1.6</target>
@@ -514,7 +492,7 @@
<artifactId>maven-surefire-plugin</artifactId>
<version>2.10</version>
<configuration>
<skip>true</skip>
<skip>false</skip>
</configuration>
<executions>
<execution>
@@ -524,7 +502,6 @@
<goal>test</goal>
</goals>
<configuration>
<skip>false</skip>
<argLine>-Xmx1024m -Djava.net.preferIPv4Stack=true -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=true -Dcom.sun.management.jmxremote.password.file=${basedir}/target/conf/jmxremote.password -Dcom.sun.management.jmxremote.access.file=${basedir}/target/conf/jmxremote.access -Dcom.sun.management.jmxremote.port=10100</argLine>
<reportsDirectory>${project.build.directory}/test-reports</reportsDirectory>
<forkMode>pertest</forkMode>
@@ -606,6 +583,7 @@
<phase>package</phase>
<warName>hicc</warName>
<warSourceDirectory>src/main/web/hicc</warSourceDirectory>
<webappDirectory>${project.build.directory}/hicc</webappDirectory>
</configuration>
<executions>
<execution>
@@ -645,12 +623,12 @@
<id>setup</id>
<phase>validate</phase>
<configuration>
<tasks name="setup">
<target>
<mkdir dir="${basedir}/target"/>
<echo message="${VERSION}" file="${basedir}/target/VERSION"/>
<mkdir dir="${basedir}/target/clover"/>
<chmod dir="${basedir}/target/clover" perm="a+w" />
</tasks>
</target>
</configuration>
<goals>
<goal>run</goal>
@@ -660,10 +638,10 @@
<id>chmod-jmx-file</id>
<phase>process-resources</phase>
<configuration>
<tasks name="setup">
<target>
<chmod file="target/conf/jmxremote.password" perm="600" />
<chmod file="target/conf/jmxremote.access" perm="600" />
</tasks>
</target>
</configuration>
<goals>
<goal>run</goal>
@@ -673,7 +651,7 @@
<id>test-setup</id>
<phase>generate-test-resources</phase>
<configuration>
<tasks name="test-setup">
<target>
<delete dir="/tmp/chukwa/hicc" />
<mkdir dir="${test.build.dir}/var" />
<mkdir dir="${test.build.dir}/var/log" />
@@ -709,12 +687,11 @@
<expandproperties/>
</filterchain>
</copy>
<copy file="${basedir}/src/test/resources/hbase-site.xml" tofile="${test.build.dir}/classes/hbase-site.xml"></copy>
<copy file="${basedir}/conf/log4j.properties" tofile="${test.build.dir}/conf/log4j.properties"></copy>
<copy file="${basedir}/conf/auth.conf" tofile="${test.build.dir}/conf/auth.conf"></copy>
<chmod file="${test.build.dir}/conf/jmxremote.password" perm="600" />
<chmod file="${test.build.dir}/conf/jmxremote.access" perm="600" />
</tasks>
</target>
</configuration>
<goals>
<goal>run</goal>
@@ -861,7 +838,7 @@
<goal>single</goal>
</goals>
<configuration>
<finalName>chukwa-incubating-src-${VERSION}</finalName>
<finalName>chukwa-src-${VERSION}</finalName>
<tarLongFileMode>gnu</tarLongFileMode>
<descriptors>
<descriptor>src/packages/tarball/src.xml</descriptor>
@@ -884,12 +861,11 @@
<id>hbase-0.96</id>
<activation>
<property>
<name>hbase.profile</name>
<value>0.96</value>
<name>!hbase.profile</name>
</property>
</activation>
<properties>
<hbase.version>0.96.1.1-hadoop1</hbase.version>
<hbase.version>0.96.2-hadoop1</hbase.version>
</properties>
<dependencies>
<dependency>
@@ -982,15 +958,24 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-hadoop-compat</artifactId>
<classifier>tests</classifier>
<version>${hbase.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-hadoop1-compat</artifactId>
<classifier>tests</classifier>
<version>${hbase.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
<profile>
<id>hbase-0.94</id>
<activation>
<property>
<name>!hbase.profile</name>
</property>
</activation>
<properties>
<hbase.version>0.94.9</hbase.version>
</properties>
@@ -1081,21 +1066,10 @@
</profiles>

<repositories>
<repository>
<id>maven2-repository.dev.java.net</id>
<name>Java.net Repository for Maven</name>
<url>http://download.java.net/maven/2/</url>
<layout>default</layout>
</repository>
<repository>
<id>codehaus</id>
<url>http://repository.codehaus.org/</url>
</repository>
<repository>
<id>Sonatype-public</id>
<name>SnakeYAML repository</name>
<url>http://oss.sonatype.org/content/groups/public/</url>
</repository>
<repository>
<id>clojars</id>
<url>http://clojars.org/repo/</url>
@@ -1137,7 +1111,6 @@
<artifactId>findbugs-maven-plugin</artifactId>
<version>2.3.3</version>
<configuration>
<!-- <onlyAnalyze>org.apache.hadoop.chukwa.datacollection.*</onlyAnalyze> -->
<threshold>Normal</threshold>
<effort>Max</effort>
</configuration>

0 comments on commit 2f74fbb

Please sign in to comment.