Bladeren bron

AMBARI-8741. Create assembly module to place ambari metrics rpms into single output dir. (mpapirkovskyy via swagle)

Siddharth Wagle 10 jaren geleden
bovenliggende
commit
40aa66f548
22 gewijzigde bestanden met toevoegingen van 840 en 600 verwijderingen
  1. 507 0
      ambari-metrics/ambari-metrics-assembly/pom.xml
  2. 75 0
      ambari-metrics/ambari-metrics-assembly/src/main/assembly/collector.xml
  3. 38 20
      ambari-metrics/ambari-metrics-assembly/src/main/assembly/monitor.xml
  4. 61 0
      ambari-metrics/ambari-metrics-assembly/src/main/assembly/sink.xml
  5. 10 43
      ambari-metrics/ambari-metrics-flume-sink/pom.xml
  6. 12 12
      ambari-metrics/ambari-metrics-flume-sink/src/main/assemblies/jar-with-common.xml
  7. 39 52
      ambari-metrics/ambari-metrics-hadoop-sink/pom.xml
  8. 1 1
      ambari-metrics/ambari-metrics-hadoop-sink/src/main/assemblies/jar-with-common.xml
  9. 0 34
      ambari-metrics/ambari-metrics-hadoop-sink/src/main/assemblies/sink.xml
  10. 37 0
      ambari-metrics/ambari-metrics-host-monitoring/conf/unix/metric_groups.conf
  11. 30 0
      ambari-metrics/ambari-metrics-host-monitoring/conf/unix/metric_monitor.ini
  12. 0 111
      ambari-metrics/ambari-metrics-host-monitoring/pom.xml
  13. 10 43
      ambari-metrics/ambari-metrics-storm-sink/pom.xml
  14. 12 12
      ambari-metrics/ambari-metrics-storm-sink/src/main/assemblies/jar-with-common.xml
  15. 0 34
      ambari-metrics/ambari-metrics-storm-sink/src/main/assemblies/sink.xml
  16. 2 20
      ambari-metrics/ambari-metrics-timelineservice/pom.xml
  17. 0 62
      ambari-metrics/ambari-metrics-timelineservice/src/main/assemblies/phoenix-client.xml
  18. 0 53
      ambari-metrics/ambari-metrics-timelineservice/src/main/assemblies/phoenix-components-major-client.xml
  19. 0 71
      ambari-metrics/ambari-metrics-timelineservice/src/main/assemblies/phoenix-components-minimal.xml
  20. 4 27
      ambari-metrics/pom.xml
  21. 1 5
      ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/templates/hadoop-metrics2-hbase.properties-GANGLIA-MASTER.j2
  22. 1 0
      ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/templates/hadoop-metrics2-hbase.properties-GANGLIA-RS.j2

+ 507 - 0
ambari-metrics/ambari-metrics-assembly/pom.xml

@@ -0,0 +1,507 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <parent>
+    <artifactId>ambari-metrics</artifactId>
+    <groupId>org.apache.ambari</groupId>
+    <version>0.1.0-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+
+  <artifactId>ambari-metrics-assembly</artifactId>
+  <packaging>pom</packaging>
+
+  <properties>
+    <collector.dir>${project.basedir}/../ambari-metrics-timelineservice</collector.dir>
+    <monitor.dir>${project.basedir}/../ambari-metrics-host-monitoring</monitor.dir>
+    <hadoop-sink.dir>${project.basedir}/../ambari-metrics-hadoop-sink</hadoop-sink.dir>
+    <storm-sink.dir>${project.basedir}/../ambari-metrics-storm-sink</storm-sink.dir>
+    <flume-sink.dir>${project.basedir}/../ambari-metrics-flume-sink</flume-sink.dir>
+  </properties>
+
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-assembly-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>collector</id>
+            <phase>package</phase>
+            <goals>
+              <goal>single</goal>
+            </goals>
+            <configuration>
+              <attach>false</attach>
+              <finalName>ambari-metrics-collector-${project.version}</finalName>
+              <appendAssemblyId>false</appendAssemblyId>
+              <descriptors>
+                <descriptor>src/main/assembly/collector.xml</descriptor>
+              </descriptors>
+              <tarLongFileMode>gnu</tarLongFileMode>
+            </configuration>
+          </execution>
+          <execution>
+            <id>monitor</id>
+            <phase>package</phase>
+            <goals>
+              <goal>single</goal>
+            </goals>
+            <configuration>
+              <attach>false</attach>
+              <finalName>ambari-metrics-monitor-${project.version}</finalName>
+              <appendAssemblyId>false</appendAssemblyId>
+              <descriptors>
+                <descriptor>src/main/assembly/monitor.xml</descriptor>
+              </descriptors>
+              <tarLongFileMode>gnu</tarLongFileMode>
+            </configuration>
+          </execution>
+          <execution>
+            <id>hadoop-sink</id>
+            <phase>package</phase>
+            <goals>
+              <goal>single</goal>
+            </goals>
+            <configuration>
+              <attach>false</attach>
+              <finalName>ambari-metrics-hadoop-sink-${project.version}</finalName>
+              <appendAssemblyId>false</appendAssemblyId>
+              <descriptors>
+                <descriptor>src/main/assembly/sink.xml</descriptor>
+              </descriptors>
+              <tarLongFileMode>gnu</tarLongFileMode>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
+
+  <profiles>
+    <profile>
+      <id>rpm</id>
+
+      <activation>
+        <property>
+          <name>build-rpm</name>
+        </property>
+      </activation>
+
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>rpm-maven-plugin</artifactId>
+            <version>2.0.1</version>
+            <configuration>
+              <group>Development</group>
+              <needarch>x86_64</needarch>
+              <copyright>2012, Apache Software Foundation</copyright>
+              <version>${package-version}</version>
+              <release>${package-release}</release>
+
+              <defaultFilemode>644</defaultFilemode>
+              <defaultDirmode>755</defaultDirmode>
+              <defaultUsername>root</defaultUsername>
+              <defaultGroupname>root</defaultGroupname>
+            </configuration>
+            <executions>
+              <!--ambari-metrics-monitor-->
+              <execution>
+                <id>ambari-metrics-monitor</id>
+                <!-- unbinds rpm creation from maven lifecycle -->
+                <phase>package</phase>
+                <goals>
+                  <goal>rpm</goal>
+                </goals>
+                <configuration>
+                  <name>ambari-metrics-monitor</name>
+                  <group>Development</group>
+                  <needarch>x86_64</needarch>
+                  <autoRequires>false</autoRequires>
+                  <requires>
+                    <require>ambari-metrics-hadoop-sink</require>
+                    <require>ambari-metrics-flume-sink</require>
+                    <require>ambari-metrics-storm-sink</require>
+                    <require>${python.ver}</require>
+                    <require>gcc</require>
+                    <require>python-devel</require>
+                  </requires>
+                  <preremoveScriptlet>
+                    <scriptFile>src/main/package/rpm/preremove.sh</scriptFile>
+                    <fileEncoding>utf-8</fileEncoding>
+                  </preremoveScriptlet>
+                  <mappings>
+                    <mapping>
+                      <directory>${resmonitor.install.dir}</directory>
+                      <username>root</username>
+                      <groupname>root</groupname>
+                      <sources>
+                        <source>
+                          <location>
+                            ${monitor.dir}/src/main/python/__init__.py
+                          </location>
+                        </source>
+                        <source>
+                          <location>
+                            ${monitor.dir}/src/main/python/main.py
+                          </location>
+                        </source>
+                      </sources>
+                    </mapping>
+                    <mapping>
+                      <directory>${resmonitor.install.dir}/core</directory>
+                      <sources>
+                        <source>
+                          <location>
+                            ${monitor.dir}/src/main/python/core
+                          </location>
+                        </source>
+                      </sources>
+                    </mapping>
+                    <mapping>
+                      <directory>${resmonitor.install.dir}/psutil</directory>
+                      <sources>
+                        <source>
+                          <location>
+                            ${monitor.dir}/src/main/python/psutil
+                          </location>
+                          <excludes>
+                            <exclude>build/**</exclude>
+                            <exclude>build/*</exclude>
+                          </excludes>
+                        </source>
+                      </sources>
+                    </mapping>
+                    <mapping>
+                      <directory>/etc/ambari-metrics-monitor/conf</directory>
+                      <configuration>true</configuration>
+                    </mapping>
+                    <mapping>
+                      <directory>/var/run/ambari-metrics-monitor</directory>
+                    </mapping>
+                    <mapping>
+                      <directory>/var/log/ambari-metrics-monitor</directory>
+                    </mapping>
+                    <mapping>
+                      <directory>/usr/sbin</directory>
+                      <filemode>755</filemode>
+                      <username>root</username>
+                      <groupname>root</groupname>
+                      <directoryIncluded>false</directoryIncluded>
+                      <sources>
+                        <source>
+                          <location>
+                            ${monitor.dir}/conf/unix/ambari-metrics-monitor
+                          </location>
+                          <filter>true</filter>
+                        </source>
+                      </sources>
+                    </mapping>
+                  </mappings>
+                </configuration>
+              </execution>
+
+              <!--ambari-metrics-collector-->
+              <execution>
+                <id>ambari-metrics-collector</id>
+                <phase>package</phase>
+                <goals>
+                  <goal>rpm</goal>
+                </goals>
+                <configuration>
+                  <name>ambari-metrics-collector</name>
+                  <copyright>2012, Apache Software Foundation</copyright>
+                  <group>Development</group>
+                  <description>Maven Recipe: RPM Package.</description>
+                  <autoRequires>false</autoRequires>
+                  <requires>
+                    <require>${python.ver}</require>
+                  </requires>
+
+                  <defaultFilemode>644</defaultFilemode>
+                  <defaultDirmode>755</defaultDirmode>
+                  <defaultUsername>root</defaultUsername>
+                  <defaultGroupname>root</defaultGroupname>
+
+                  <mappings>
+                    <mapping>
+                      <!--jars-->
+                      <directory>/usr/lib/ambari-metrics-collector/</directory>
+                      <sources>
+                        <source>
+                          <location>${collector.dir}/target/lib</location>
+                        </source>
+                        <source>
+                          <location>
+                            ${collector.dir}/target/ambari-metrics-timelineservice-${project.version}.jar
+                          </location>
+                        </source>
+                      </sources>
+                    </mapping>
+                    <mapping>
+                      <!--embedded applications-->
+                      <directory>/usr/lib/ams-hbase/</directory>
+                      <sources>
+                        <source>
+                          <location>${collector.dir}/target/embedded/${hbase.folder}</location>
+                          <excludes>
+                            <exclude>bin/**</exclude>
+                            <exclude>bin/*</exclude>
+                          </excludes>
+                        </source>
+                      </sources>
+                    </mapping>
+                    <mapping>
+                      <directory>/usr/lib/ams-hbase/bin</directory>
+                      <filemode>755</filemode>
+                      <sources>
+                        <source>
+                          <location>${collector.dir}/target/embedded/${hbase.folder}/bin</location>
+                        </source>
+                      </sources>
+                    </mapping>
+                    <mapping>
+                      <directory>/usr/lib/ams-hbase/lib/</directory>
+                      <sources>
+                        <source>
+                          <location>${collector.dir}/target/lib</location>
+                          <includes>
+                            <include>phoenix*.jar</include>
+                            <include>antlr*.jar</include>
+                          </includes>
+                        </source>
+                      </sources>
+                    </mapping>
+                    <mapping>
+                      <directory>/usr/sbin</directory>
+                      <filemode>755</filemode>
+                      <username>root</username>
+                      <groupname>root</groupname>
+                      <directoryIncluded>false</directoryIncluded>
+                      <sources>
+                        <source>
+                          <location>${collector.dir}/conf/unix/ambari-metrics-collector</location>
+                          <filter>false</filter>
+                        </source>
+                      </sources>
+                    </mapping>
+                    <mapping>
+                      <directory>/etc/ambari-metrics-collector/conf</directory>
+                      <configuration>true</configuration>
+                      <sources>
+                        <source>
+                          <location>${collector.dir}/conf/unix/ams-env.sh</location>
+                        </source>
+                        <source>
+                          <location>${collector.dir}/conf/unix/ams-site.xml</location>
+                        </source>
+                        <source>
+                          <location>${collector.dir}/conf/unix/log4j.properties</location>
+                        </source>
+                        <source>
+                          <location>${collector.dir}/target/embedded/${hbase.folder}/conf/hbase-site.xml</location>
+                        </source>
+                      </sources>
+                    </mapping>
+                    <mapping>
+                      <directory>/etc/ams-hbase/conf</directory>
+                      <configuration>true</configuration>
+                      <sources>
+                        <source>
+                          <location>${collector.dir}/target/embedded/${hbase.folder}/conf</location>
+                          <includes>
+                            <include>*.*</include>
+                          </includes>
+                        </source>
+                      </sources>
+                    </mapping>
+                    <mapping>
+                      <directory>/var/run/ams-hbase</directory>
+                    </mapping>
+                    <mapping>
+                      <directory>/var/run/ambari-metrics-collector</directory>
+                    </mapping>
+                    <mapping>
+                      <directory>/var/log/ambari-metrics-collector</directory>
+                    </mapping>
+                    <mapping>
+                      <directory>/var/lib/ambari-metrics-collector</directory>
+                    </mapping>
+                  </mappings>
+                </configuration>
+              </execution>
+
+              <!--hadoop-sink-->
+              <execution>
+                <id>ambari-metrics-hadoop-sink</id>
+                <phase>package</phase>
+                <goals>
+                  <goal>rpm</goal>
+                </goals>
+
+                <configuration>
+                  <name>ambari-metrics-hadoop-sink</name>
+                  <copyright>2012, Apache Software Foundation</copyright>
+                  <group>Development</group>
+                  <description>Maven Recipe: RPM Package.</description>
+
+                  <defaultDirmode>755</defaultDirmode>
+                  <defaultFilemode>644</defaultFilemode>
+                  <defaultUsername>root</defaultUsername>
+                  <defaultGroupname>root</defaultGroupname>
+
+                  <postinstallScriptlet>
+                    <scriptFile>${hadoop-sink.dir}/target/rpm/postinstall.sh</scriptFile>
+                    <fileEncoding>utf-8</fileEncoding>
+                  </postinstallScriptlet>
+
+                  <mappings>
+                    <mapping>
+                      <directory>/usr/lib/ambari-metrics-hadoop-sink</directory>
+                      <sources>
+                        <source>
+                          <location>${hadoop-sink.dir}/target/ambari-metrics-hadoop-sink-with-common-${project.version}.jar</location>
+                        </source>
+                      </sources>
+
+                    </mapping>
+
+                  </mappings>
+                </configuration>
+
+              </execution>
+
+              <!-- flume-sink -->
+              <execution>
+                <id>ambari-metrics-flume-sink</id>
+                <phase>package</phase>
+                <goals>
+                  <goal>rpm</goal>
+                </goals>
+                <configuration>
+                  <name>ambari-metrics-flume-sink</name>
+                  <copyright>2012, Apache Software Foundation</copyright>
+                  <group>Development</group>
+                  <description>Maven Recipe: RPM Package.</description>
+                  <mappings>
+                    <mapping>
+                      <directory>/usr/lib/flume/lib</directory>
+                      <filemode>644</filemode>
+                      <username>root</username>
+                      <groupname>root</groupname>
+                      <sources>
+                        <source>
+                          <location>${flume-sink.dir}/target/ambari-metrics-flume-sink-${project.version}.jar</location>
+                        </source>
+                        <source>
+                          <location>${flume-sink.dir}/target/lib</location>
+                        </source>
+                      </sources>
+                    </mapping>
+                  </mappings>
+                </configuration>
+              </execution>
+
+              <!-- storm-sink -->
+              <execution>
+                <id>ambari-metrics-storm-sink</id>
+                <phase>package</phase>
+                <goals>
+                  <goal>rpm</goal>
+                </goals>
+
+                <configuration>
+                  <name>ambari-metrics-storm-sink</name>
+                  <copyright>2012, Apache Software Foundation</copyright>
+                  <group>Development</group>
+                  <description>Maven Recipe: RPM Package.</description>
+                  <defaultDirmode>755</defaultDirmode>
+                  <defaultFilemode>644</defaultFilemode>
+                  <defaultUsername>root</defaultUsername>
+                  <defaultGroupname>root</defaultGroupname>
+                  <mappings>
+                    <mapping>
+                      <directory>/usr/lib/storm/lib</directory>
+                      <sources>
+                        <source>
+                          <location>${storm-sink.dir}/target/ambari-metrics-storm-sink-${project.version}.jar</location>
+                        </source>
+                        <source>
+                          <location>${storm-sink.dir}/target/lib</location>
+                        </source>
+                      </sources>
+                    </mapping>
+                  </mappings>
+                </configuration>
+              </execution>
+
+
+
+            </executions>
+
+
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
+
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.ambari</groupId>
+      <artifactId>ambari-metrics-timelineservice</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.ambari</groupId>
+      <artifactId>ambari-metrics-common</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.ambari</groupId>
+      <artifactId>ambari-metrics-hadoop-sink</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.ambari</groupId>
+      <artifactId>ambari-metrics-flume-sink</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.ambari</groupId>
+      <artifactId>ambari-metrics-storm-sink</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.ambari</groupId>
+      <artifactId>ambari-metrics-host-monitoring</artifactId>
+      <version>${project.version}</version>
+      <type>pom</type>
+      <optional>true</optional>
+    </dependency>
+  </dependencies>
+
+
+</project>

+ 75 - 0
ambari-metrics/ambari-metrics-assembly/src/main/assembly/collector.xml

@@ -0,0 +1,75 @@
+<?xml version="1.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.
+  -->
+
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1 http://maven.apache.org/xsd/assembly-1.1.1.xsd">
+  <id>collector</id>
+  <formats>
+    <format>dir</format>
+    <format>tar.gz</format>
+  </formats>
+
+  <fileSets>
+    <fileSet>
+      <directory>${collector.dir}/target/embedded/${hbase.folder}</directory>
+      <outputDirectory>hbase</outputDirectory>
+    </fileSet>
+    <fileSet>
+      <directory>${collector.dir}/conf/unix</directory>
+      <outputDirectory>bin</outputDirectory>
+      <includes>
+        <include>ambari-metrics-collector</include>
+      </includes>
+    </fileSet>
+    <fileSet>
+      <directory>${collector.dir}/conf/unix</directory>
+      <outputDirectory>conf</outputDirectory>
+      <includes>
+        <include>ams-env.sh</include>
+        <include>ams-site.xml</include>
+        <include>log4j.properties</include>
+      </includes>
+    </fileSet>
+    <fileSet>
+      <directory>${collector.dir}/target/lib</directory>
+      <outputDirectory>lib</outputDirectory>
+    </fileSet>
+  </fileSets>
+
+  <dependencySets>
+    <dependencySet>
+      <unpack>false</unpack>
+      <outputDirectory>hbase/lib</outputDirectory>
+      <useProjectArtifact>false</useProjectArtifact>
+      <includes>
+        <include>org.antlr:antlr*</include>
+        <include>org.apache.phoenix:phoenix-core</include>
+      </includes>
+    </dependencySet>
+    <dependencySet>
+      <unpack>false</unpack>
+      <outputDirectory>lib</outputDirectory>
+      <useProjectArtifact>false</useProjectArtifact>
+      <includes>
+        <include>org.apache.ambari:ambari-metrics-timelineservice</include>
+      </includes>
+    </dependencySet>
+  </dependencySets>
+
+</assembly>

+ 38 - 20
ambari-metrics/ambari-metrics-timelineservice/src/main/assemblies/phoenix-server.xml → ambari-metrics/ambari-metrics-assembly/src/main/assembly/monitor.xml

@@ -1,4 +1,5 @@
-<?xml version='1.0'?>
+<?xml version="1.0"?>
+
 <!--
   ~ Licensed to the Apache Software Foundation (ASF) under one
   ~ or more contributor license agreements.  See the NOTICE file
@@ -17,30 +18,47 @@
   ~ limitations under the License.
   -->
 
-<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
-          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-          xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
-  <!-- build the phoenix server side jar, that includes phoenix-hadoopX-compat, phoenix-hadoop-compat and antlr -->
-  <id>server</id>
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1 http://maven.apache.org/xsd/assembly-1.1.1.xsd">
+  <id>monitor</id>
   <formats>
-    <format>jar</format>
+    <format>dir</format>
+    <format>tar.gz</format>
   </formats>
-  <includeBaseDirectory>false</includeBaseDirectory>
-  <dependencySets>
-    <dependencySet>
-      <outputDirectory>/</outputDirectory>
-      <unpack>true</unpack>
+
+  <fileSets>
+    <fileSet>
+      <directory>${monitor.dir}/src/main/python</directory>
+      <outputDirectory>site-packages/resource_monitoring</outputDirectory>
+    </fileSet>
+    <fileSet>
+      <outputDirectory>conf</outputDirectory>
+      <directory>${monitor.dir}/conf/unix</directory>
       <includes>
-        <include>org.apache.phoenix:phoenix-core</include>
-        <include>org.apache.phoenix:phoenix-hadoop*</include>
+        <include>metric_groups.conf</include>
+        <include>metric_monitor.ini</include>
       </includes>
-    </dependencySet>
-    <dependencySet>
-      <unpack>true</unpack>
-      <outputDirectory>/</outputDirectory>
+    </fileSet>
+    <fileSet>
+      <directory>${monitor.dir}/conf/unix</directory>
+      <outputDirectory>bin</outputDirectory>
       <includes>
-        <include>org.antlr:antlr*</include>
+        <include>ambari-metrics-monitor</include>
       </includes>
+    </fileSet>
+  </fileSets>
+
+
+
+  <dependencySets>
+    <dependencySet>
+      <useProjectArtifact>false</useProjectArtifact>
+      <excludes>
+        <exclude>*</exclude>
+      </excludes>
     </dependencySet>
   </dependencySets>
-</assembly>
+
+
+
+
+</assembly>

+ 61 - 0
ambari-metrics/ambari-metrics-assembly/src/main/assembly/sink.xml

@@ -0,0 +1,61 @@
+<?xml version="1.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.
+  -->
+
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1 http://maven.apache.org/xsd/assembly-1.1.1.xsd">
+  <id>hadoop-sink</id>
+  <formats>
+    <format>dir</format>
+    <format>tar.gz</format>
+  </formats>
+
+  <fileSets>
+    <fileSet>
+      <directory>${hadoop-sink.dir}/src/main/conf</directory>
+      <outputDirectory>hadoop-sink/conf</outputDirectory>
+    </fileSet>
+    <fileSet>
+      <directory>${flume-sink.dir}/src/main/conf</directory>
+      <outputDirectory>hadoop-sink/conf</outputDirectory>
+    </fileSet>
+    <fileSet>
+      <directory>${storm-sink.dir}/src/main/conf</directory>
+      <outputDirectory>hadoop-sink/conf</outputDirectory>
+    </fileSet>
+  </fileSets>
+
+  <files>
+    <file>
+      <source>${hadoop-sink.dir}/target/ambari-metrics-hadoop-sink-with-common-${project.version}.jar</source>
+      <outputDirectory>hadoop-sink</outputDirectory>
+    </file>
+    <file>
+      <source>${flume-sink.dir}/target/ambari-metrics-flume-sink-with-common-${project.version}.jar</source>
+      <outputDirectory>hadoop-sink</outputDirectory>
+    </file>
+    <file>
+      <source>${storm-sink.dir}/target/ambari-metrics-storm-sink-with-common-${project.version}.jar</source>
+      <outputDirectory>hadoop-sink</outputDirectory>
+    </file>
+  </files>
+
+
+
+
+</assembly>

+ 10 - 43
ambari-metrics/ambari-metrics-flume-sink/pom.xml

@@ -46,15 +46,18 @@ limitations under the License.
       </plugin>
       <plugin>
         <artifactId>maven-assembly-plugin</artifactId>
-        <configuration>
-          <descriptors>
-            <descriptor>src/main/assemblies/sink.xml</descriptor>
-          </descriptors>
-          <tarLongFileMode>gnu</tarLongFileMode>
-        </configuration>
         <executions>
           <execution>
-            <id>build-tarball</id>
+            <configuration>
+              <descriptors>
+                <descriptor>src/main/assemblies/jar-with-common.xml</descriptor>
+              </descriptors>
+              <attach>false</attach>
+              <tarLongFileMode>gnu</tarLongFileMode>
+              <appendAssemblyId>false</appendAssemblyId>
+              <finalName>${project.artifactId}-with-common-${project.version}</finalName>
+            </configuration>
+            <id>build-jar</id>
             <phase>package</phase>
             <goals>
               <goal>single</goal>
@@ -104,42 +107,6 @@ limitations under the License.
           </execution>
         </executions>
       </plugin>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>rpm-maven-plugin</artifactId>
-        <version>2.0.1</version>
-        <executions>
-          <execution>
-            <phase>none</phase>
-            <goals>
-              <goal>rpm</goal>
-            </goals>
-          </execution>
-        </executions>
-        <configuration>
-          <name>ambari-metrics-flume-sink</name>
-          <copyright>2012, Apache Software Foundation</copyright>
-          <group>Development</group>
-          <description>Maven Recipe: RPM Package.</description>
-          <defaultDirmode>755</defaultDirmode>
-          <defaultFilemode>644</defaultFilemode>
-          <defaultUsername>root</defaultUsername>
-          <defaultGroupname>root</defaultGroupname>
-          <mappings>
-            <mapping>
-              <directory>/usr/lib/flume/lib</directory>
-              <sources>
-                <source>
-                  <location>target/${project.artifactId}-${project.version}.jar</location>
-                </source>
-                <source>
-                  <location>target/lib</location>
-                </source>
-              </sources>
-            </mapping>
-          </mappings>
-        </configuration>
-      </plugin>
     </plugins>
   </build>
   <dependencies>

+ 12 - 12
ambari-metrics/ambari-metrics-flume-sink/src/main/assemblies/sink.xml → ambari-metrics/ambari-metrics-flume-sink/src/main/assemblies/jar-with-common.xml

@@ -16,19 +16,19 @@
    limitations under the License.
 -->
 <assembly>
-  <!--This 'all' id is not appended to the produced bundle because we do this:
-    http://maven.apache.org/plugins/maven-assembly-plugin/faq.html#required-classifiers
-  -->
-  <id>dist</id>
+  <id>jar-with-common</id>
   <formats>
-    <format>dir</format>
-    <format>tar.gz</format>
+    <format>jar</format>
   </formats>
   <includeBaseDirectory>false</includeBaseDirectory>
-  <files>
-    <file>
-      <source>${project.build.directory}/${artifact.artifactId}-${artifact.version}.jar</source>
-      <outputDirectory>ambari-metrics-${project.version}/lib/ambari-metrics</outputDirectory>
-    </file>
-  </files>
+  <dependencySets>
+    <dependencySet>
+      <outputDirectory>/</outputDirectory>
+      <unpack>true</unpack>
+      <includes>
+        <include>org.apache.ambari:ambari-metrics-common</include>
+        <include>org.apache.ambari:ambari-metrics-flume-sink</include>
+      </includes>
+    </dependencySet>
+  </dependencySets>
 </assembly>

+ 39 - 52
ambari-metrics/ambari-metrics-hadoop-sink/pom.xml

@@ -42,22 +42,9 @@ limitations under the License.
           <execution>
             <configuration>
               <descriptors>
-                <descriptor>src/main/assemblies/sink.xml</descriptor>
-              </descriptors>
-              <tarLongFileMode>gnu</tarLongFileMode>
-            </configuration>
-            <id>build-tarball</id>
-            <phase>package</phase>
-            <goals>
-              <goal>single</goal>
-            </goals>
-          </execution>
-
-          <execution>
-            <configuration>
-              <descriptors>
-                <descriptor>src/main/assemblies/sink-jar.xml</descriptor>
+                <descriptor>src/main/assemblies/jar-with-common.xml</descriptor>
               </descriptors>
+              <attach>false</attach>
               <tarLongFileMode>gnu</tarLongFileMode>
               <appendAssemblyId>false</appendAssemblyId>
               <finalName>${project.artifactId}-with-common-${project.version}</finalName>
@@ -112,48 +99,48 @@ limitations under the License.
           </execution>
         </executions>
       </plugin>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>rpm-maven-plugin</artifactId>
-        <version>2.0.1</version>
-        <executions>
-          <execution>
-            <phase>none</phase>
-            <goals>
-              <goal>rpm</goal>
-            </goals>
-          </execution>
-        </executions>
-        <configuration>
-          <name>ambari-metrics-hadoop-sink</name>
-          <copyright>2012, Apache Software Foundation</copyright>
-          <group>Development</group>
-          <description>Maven Recipe: RPM Package.</description>
+      <!--<plugin>-->
+        <!--<groupId>org.codehaus.mojo</groupId>-->
+        <!--<artifactId>rpm-maven-plugin</artifactId>-->
+        <!--<version>2.0.1</version>-->
+        <!--<executions>-->
+          <!--<execution>-->
+            <!--<phase>none</phase>-->
+            <!--<goals>-->
+              <!--<goal>rpm</goal>-->
+            <!--</goals>-->
+          <!--</execution>-->
+        <!--</executions>-->
+        <!--<configuration>-->
+          <!--<name>ambari-metrics-hadoop-sink</name>-->
+          <!--<copyright>2012, Apache Software Foundation</copyright>-->
+          <!--<group>Development</group>-->
+          <!--<description>Maven Recipe: RPM Package.</description>-->
 
-          <defaultDirmode>755</defaultDirmode>
-          <defaultFilemode>644</defaultFilemode>
-          <defaultUsername>root</defaultUsername>
-          <defaultGroupname>root</defaultGroupname>
+          <!--<defaultDirmode>755</defaultDirmode>-->
+          <!--<defaultFilemode>644</defaultFilemode>-->
+          <!--<defaultUsername>root</defaultUsername>-->
+          <!--<defaultGroupname>root</defaultGroupname>-->
 
-          <postinstallScriptlet>
-            <scriptFile>${project.build.outputDirectory}/rpm/postinstall.sh</scriptFile>
-            <fileEncoding>utf-8</fileEncoding>
-          </postinstallScriptlet>
+          <!--<postinstallScriptlet>-->
+            <!--<scriptFile>${project.build.outputDirectory}/rpm/postinstall.sh</scriptFile>-->
+            <!--<fileEncoding>utf-8</fileEncoding>-->
+          <!--</postinstallScriptlet>-->
 
-          <mappings>
-            <mapping>
-              <directory>/usr/lib/ambari-metrics-hadoop-sink</directory>
-              <sources>
-                <source>
-                  <location>target/${project.artifactId}-with-common-${project.version}.jar</location>
-                </source>
-              </sources>
+          <!--<mappings>-->
+            <!--<mapping>-->
+              <!--<directory>/usr/lib/ambari-metrics-hadoop-sink</directory>-->
+              <!--<sources>-->
+                <!--<source>-->
+                  <!--<location>target/${project.artifactId}-with-common-${project.version}.jar</location>-->
+                <!--</source>-->
+              <!--</sources>-->
 
-            </mapping>
+            <!--</mapping>-->
 
-          </mappings>
-        </configuration>
-      </plugin>
+          <!--</mappings>-->
+        <!--</configuration>-->
+      <!--</plugin>-->
     </plugins>
 
     <resources>

+ 1 - 1
ambari-metrics/ambari-metrics-hadoop-sink/src/main/assemblies/sink-jar.xml → ambari-metrics/ambari-metrics-hadoop-sink/src/main/assemblies/jar-with-common.xml

@@ -19,7 +19,7 @@
   -->
 
 <assembly>
-  <id>hadoop-sink-jar</id>
+  <id>jar-with-common</id>
   <formats>
     <format>jar</format>
   </formats>

+ 0 - 34
ambari-metrics/ambari-metrics-hadoop-sink/src/main/assemblies/sink.xml

@@ -1,34 +0,0 @@
-<?xml version="1.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.
--->
-<assembly>
-  <!--This 'all' id is not appended to the produced bundle because we do this:
-    http://maven.apache.org/plugins/maven-assembly-plugin/faq.html#required-classifiers
-  -->
-  <id>dist</id>
-  <formats>
-    <format>dir</format>
-    <format>tar.gz</format>
-  </formats>
-  <includeBaseDirectory>false</includeBaseDirectory>
-  <files>
-    <file>
-      <source>${project.build.directory}/${artifact.artifactId}-${artifact.version}.jar</source>
-      <outputDirectory>ambari-metrics-${project.version}/lib/ambari-metrics</outputDirectory>
-    </file>
-  </files>
-</assembly>

+ 37 - 0
ambari-metrics/ambari-metrics-host-monitoring/conf/unix/metric_groups.conf

@@ -0,0 +1,37 @@
+{#
+# 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.
+#}
+
+{
+   "host_metric_groups": {
+      "all": {
+         "collect_every": "10",
+         "metrics": [
+            {
+               "name": "bytes_out",
+               "value_threshold": "128"
+            }
+         ]
+      }
+   },
+   "process_metric_groups": {
+      "": {
+         "collect_every": "15",
+         "metrics": []
+      }
+   }
+}

+ 30 - 0
ambari-metrics/ambari-metrics-host-monitoring/conf/unix/metric_monitor.ini

@@ -0,0 +1,30 @@
+{#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#}
+
+[default]
+debug_level = INFO
+metrics_server = {{ams_collector_host_single}}:{{ams_collector_port}}
+enable_time_threshold = false
+enable_value_threshold = false
+
+[emitter]
+send_interval = 60
+
+[collector]
+collector_sleep_interval = 5
+max_queue_size = 5000

+ 0 - 111
ambari-metrics/ambari-metrics-host-monitoring/pom.xml

@@ -99,117 +99,6 @@
           </execution>
         </executions>
       </plugin>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>rpm-maven-plugin</artifactId>
-        <version>2.0.1</version>
-        <executions>
-          <execution>
-            <!-- unbinds rpm creation from maven lifecycle -->
-            <phase>none</phase>
-            <goals>
-              <goal>rpm</goal>
-            </goals>
-          </execution>
-        </executions>
-
-        <configuration>
-          <name>ambari-metrics-monitor</name>
-          <group>Development</group>
-          <needarch>x86_64</needarch>
-          <autoRequires>false</autoRequires>
-          <requires>
-            <require>ambari-metrics-hadoop-sink</require>
-            <require>ambari-metrics-flume-sink</require>
-            <require>${python.ver}</require>
-            <require>gcc</require>
-            <require>python-devel</require>
-          </requires>
-          <preremoveScriptlet>
-            <scriptFile>src/main/package/rpm/preremove.sh</scriptFile>
-            <fileEncoding>utf-8</fileEncoding>
-          </preremoveScriptlet>
-          <defaultDirmode>755</defaultDirmode>
-          <defaultFilemode>644</defaultFilemode>
-          <defaultUsername>root</defaultUsername>
-          <defaultGroupname>root</defaultGroupname>
-          <mappings>
-            <mapping>
-              <directory>${resmonitor.install.dir}</directory>
-              <username>root</username>
-              <groupname>root</groupname>
-              <sources>
-                <source>
-                  <!--<location>-->
-                  <!--${project.build.directory}/${project.artifactId}-${project.version}/resource_monitoring/external/build/*-->
-                  <!--</location>-->
-                  <!--<location>-->
-                  <!--${project.build.directory}/${project.artifactId}-${project.version}/resource_monitoring/core-->
-                  <!--</location>-->
-                  <!--<location>-->
-                  <!--${project.build.directory}/${project.artifactId}-${project.version}/resource_monitoring/__init__.py-->
-                  <!--</location>-->
-                  <location>
-                    ${project.basedir}/src/main/python/__init__.py
-                  </location>
-                </source>
-                <source>
-                  <location>
-                    ${project.basedir}/src/main/python/main.py
-                  </location>
-                </source>
-              </sources>
-            </mapping>
-            <mapping>
-              <directory>${resmonitor.install.dir}/core</directory>
-              <sources>
-                <source>
-                  <location>
-                    ${project.basedir}/src/main/python/core
-                  </location>
-                </source>
-              </sources>
-            </mapping>
-            <mapping>
-              <directory>${resmonitor.install.dir}/psutil</directory>
-              <sources>
-                <source>
-                  <location>
-                    ${project.basedir}/src/main/python/psutil
-                  </location>
-                  <excludes>
-                    <exclude>build/**</exclude>
-                    <exclude>build/*</exclude>
-                  </excludes>
-                </source>
-              </sources>
-            </mapping>
-            <mapping>
-              <directory>/etc/ambari-metrics-monitor/conf</directory>
-              <configuration>true</configuration>
-            </mapping>
-            <mapping>
-              <directory>/var/run/ambari-metrics-monitor</directory>
-            </mapping>
-            <mapping>
-              <directory>/var/log/ambari-metrics-monitor</directory>
-            </mapping>
-            <mapping>
-              <directory>/usr/sbin</directory>
-              <filemode>755</filemode>
-              <username>root</username>
-              <groupname>root</groupname>
-              <directoryIncluded>false</directoryIncluded>
-              <sources>
-                <source>
-                  <location>conf/unix/ambari-metrics-monitor</location>
-                  <filter>true</filter>
-                </source>
-              </sources>
-            </mapping>
-          </mappings>
-        </configuration>
-      </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-antrun-plugin</artifactId>

+ 10 - 43
ambari-metrics/ambari-metrics-storm-sink/pom.xml

@@ -46,15 +46,18 @@ limitations under the License.
       </plugin>
       <plugin>
         <artifactId>maven-assembly-plugin</artifactId>
-        <configuration>
-          <descriptors>
-            <descriptor>src/main/assemblies/sink.xml</descriptor>
-          </descriptors>
-          <tarLongFileMode>gnu</tarLongFileMode>
-        </configuration>
         <executions>
           <execution>
-            <id>build-tarball</id>
+            <configuration>
+              <descriptors>
+                <descriptor>src/main/assemblies/jar-with-common.xml</descriptor>
+              </descriptors>
+              <attach>false</attach>
+              <tarLongFileMode>gnu</tarLongFileMode>
+              <appendAssemblyId>false</appendAssemblyId>
+              <finalName>${project.artifactId}-with-common-${project.version}</finalName>
+            </configuration>
+            <id>build-jar</id>
             <phase>package</phase>
             <goals>
               <goal>single</goal>
@@ -104,42 +107,6 @@ limitations under the License.
           </execution>
         </executions>
       </plugin>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>rpm-maven-plugin</artifactId>
-        <version>2.0.1</version>
-        <executions>
-          <execution>
-            <phase>none</phase>
-            <goals>
-              <goal>rpm</goal>
-            </goals>
-          </execution>
-        </executions>
-        <configuration>
-          <name>ambari-metrics-storm-sink</name>
-          <copyright>2012, Apache Software Foundation</copyright>
-          <group>Development</group>
-          <description>Maven Recipe: RPM Package.</description>
-          <defaultDirmode>755</defaultDirmode>
-          <defaultFilemode>644</defaultFilemode>
-          <defaultUsername>root</defaultUsername>
-          <defaultGroupname>root</defaultGroupname>
-          <mappings>
-            <mapping>
-              <directory>/usr/lib/storm/lib</directory>
-              <sources>
-                <source>
-                  <location>target/${project.artifactId}-${project.version}.jar</location>
-                </source>
-                <source>
-                  <location>target/lib</location>
-                </source>
-              </sources>
-            </mapping>
-          </mappings>
-        </configuration>
-      </plugin>
     </plugins>
   </build>
   <dependencies>

+ 12 - 12
ambari-metrics/ambari-metrics-timelineservice/src/main/assemblies/ats.xml → ambari-metrics/ambari-metrics-storm-sink/src/main/assemblies/jar-with-common.xml

@@ -16,19 +16,19 @@
    limitations under the License.
 -->
 <assembly>
-  <!--This 'all' id is not appended to the produced bundle because we do this:
-    http://maven.apache.org/plugins/maven-assembly-plugin/faq.html#required-classifiers
-  -->
-  <id>dist</id>
+  <id>jar-with-common</id>
   <formats>
-    <format>dir</format>
-    <format>tar.gz</format>
+    <format>jar</format>
   </formats>
   <includeBaseDirectory>false</includeBaseDirectory>
-  <files>
-    <file>
-      <source>${project.build.directory}/${artifact.artifactId}-${artifact.version}.jar</source>
-      <outputDirectory>ambari-metrics-${project.version}/lib/ambari-metrics</outputDirectory>
-    </file>
-  </files>
+  <dependencySets>
+    <dependencySet>
+      <outputDirectory>/</outputDirectory>
+      <unpack>true</unpack>
+      <includes>
+        <include>org.apache.ambari:ambari-metrics-common</include>
+        <include>org.apache.ambari:ambari-metrics-storm-sink</include>
+      </includes>
+    </dependencySet>
+  </dependencySets>
 </assembly>

+ 0 - 34
ambari-metrics/ambari-metrics-storm-sink/src/main/assemblies/sink.xml

@@ -1,34 +0,0 @@
-<?xml version="1.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.
--->
-<assembly>
-  <!--This 'all' id is not appended to the produced bundle because we do this:
-    http://maven.apache.org/plugins/maven-assembly-plugin/faq.html#required-classifiers
-  -->
-  <id>dist</id>
-  <formats>
-    <format>dir</format>
-    <format>tar.gz</format>
-  </formats>
-  <includeBaseDirectory>false</includeBaseDirectory>
-  <files>
-    <file>
-      <source>${project.build.directory}/${artifact.artifactId}-${artifact.version}.jar</source>
-      <outputDirectory>ambari-metrics-${project.version}/lib/ambari-metrics</outputDirectory>
-    </file>
-  </files>
-</assembly>

+ 2 - 20
ambari-metrics/ambari-metrics-timelineservice/pom.xml

@@ -35,7 +35,7 @@
     <!--<yarn.basedir>${project.parent.parent.basedir}</yarn.basedir>-->
     <protobuf.version>2.5.0</protobuf.version>
     <hadoop.version>2.4.0</hadoop.version>
-    <phoenix.version>4.2.0.2.2.0.0-2041</phoenix.version>
+    <phoenix.version>4.2.0.2.2.1.0-2114</phoenix.version>
   </properties>
 
   <build>
@@ -56,25 +56,6 @@
           </execution>
         </executions>
       </plugin>
-      <plugin>
-        <artifactId>maven-assembly-plugin</artifactId>
-        <executions>
-          <execution>
-            <configuration>
-              <descriptors>
-                <descriptor>src/main/assemblies/ats.xml</descriptor>
-              </descriptors>
-              <tarLongFileMode>gnu</tarLongFileMode>
-            </configuration>
-            <id>build-tarball</id>
-            <phase>none</phase>
-            <goals>
-              <goal>single</goal>
-            </goals>
-          </execution>
-
-        </executions>
-      </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-antrun-plugin</artifactId>
@@ -91,6 +72,7 @@
                 <get
                   src="${hbase.tar}"
                   dest="${project.build.directory}/embedded/hbase.tar.gz"
+                  usetimestamp="true"
                   />
                 <untar
                   src="${project.build.directory}/embedded/hbase.tar.gz"

+ 0 - 62
ambari-metrics/ambari-metrics-timelineservice/src/main/assemblies/phoenix-client.xml

@@ -1,62 +0,0 @@
-<?xml version='1.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.
-  -->
-
-<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
-  <id>client</id>
-  <!-- All the dependencies (unpacked) necessary to run phoenix from a single, stand-alone jar -->
-  <formats>
-    <format>jar</format>
-  </formats>
-  <includeBaseDirectory>false</includeBaseDirectory>
-
-  <componentDescriptors>
-    <componentDescriptor>src/main/assemblies/phoenix-components-minimal.xml</componentDescriptor>
-    <componentDescriptor>src/main/assemblies/phoenix-components-major-client.xml</componentDescriptor>
-  </componentDescriptors>
-
-  <dependencySets>
-    <dependencySet>
-      <!-- Unpack all the dependencies to class files, since java doesn't support
-        jar of jars for running -->
-      <unpack>true</unpack>
-      <!-- save these dependencies to the top-level -->
-      <outputDirectory>/</outputDirectory>
-      <includes>
-        <include>jline:jline</include>
-        <include>sqlline:sqlline</include>
-        <include>org.apache.hbase:hbase*</include>
-        <include>org.cloudera.htrace:htrace-core</include>
-        <include>io.netty:netty</include>
-        <include>commons-codec:commons-codec</include>
-      </includes>
-    </dependencySet>
-
-    <!-- Make sure we get all the components, not just the minimal client ones (e.g.
-      phoenix-flume, phoenix-pig, etc) -->
-    <dependencySet>
-      <outputDirectory>/</outputDirectory>
-      <unpack>true</unpack>
-      <includes>
-        <include>org.apache.phoenix:phoenix-*</include>
-      </includes>
-    </dependencySet>
-  </dependencySets>
-</assembly>

+ 0 - 53
ambari-metrics/ambari-metrics-timelineservice/src/main/assemblies/phoenix-components-major-client.xml

@@ -1,53 +0,0 @@
-<?xml version='1.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.
-  -->
-
-<component>
-  <!-- Components that the client needs (except for HBase) -->
-  <dependencySets>
-    <dependencySet>
-      <!-- Unpack all the dependencies to class files, since java doesn't support
-        jar of jars for running -->
-      <unpack>true</unpack>
-      <!-- save these dependencies to the top-level -->
-      <outputDirectory>/</outputDirectory>
-      <!-- Maybe a blacklist is easier? -->
-      <includes>
-        <!-- We use a newer version of guava than HBase - this might be an issue? -->
-        <include>com.google.guava:guava</include>
-        <!-- HBase also pulls in these dependencies on its own, should we include-them? -->
-        <include>com.google.protobuf:protobuf-java</include>
-        <include>org.slf4j:slf4j-api</include>
-        <include>org.slf4j:slf4j-log4j12</include>
-        <include>org.apache.zookeeper:zookeeper</include>
-        <include>log4j:log4j</include>
-        <include>org.apache.hadoop:hadoop*</include>
-        <include>commons-configuration:commons-configuration</include>
-        <include>commons-io:commons-io</include>
-        <include>commons-logging:commons-logging</include>
-        <include>commons-lang:commons-lang</include>
-        <include>commons-cli:commons-cli</include>
-        <include>org.apache.commons:commons-csv</include>
-        <include>org.codehaus.jackson:jackson-mapper-asl</include>
-        <include>org.codehaus.jackson:jackson-core-asl</include>
-        <include>org.xerial.snappy:snappy-java</include>
-        <include>commons-collections:commons-collections</include>
-      </includes>
-    </dependencySet>
-  </dependencySets>
-</component>

+ 0 - 71
ambari-metrics/ambari-metrics-timelineservice/src/main/assemblies/phoenix-components-minimal.xml

@@ -1,71 +0,0 @@
-<?xml version='1.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.
-  -->
-
-<component>
-  <!-- Just the basic components that Phoenix pulls in, that is not a transitive dependency from Hadoop/HBase/Pig -->
-  <dependencySets>
-    <dependencySet>
-      <!-- Unpack all the dependencies to class files, since java doesn't support
-        jar of jars for running -->
-      <unpack>true</unpack>
-      <!-- save these dependencies to the top-level -->
-      <outputDirectory>/</outputDirectory>
-      <!-- Just include the extra things that phoenix needs -->
-      <includes>
-        <include>org.antlr:antlr*</include>
-      </includes>
-    </dependencySet>
-
-    <dependencySet>
-      <outputDirectory>/</outputDirectory>
-      <unpack>true</unpack>
-      <includes>
-        <include>org.apache.phoenix:phoenix-*</include>
-      </includes>
-      <excludes>
-        <exclude>org.apache.phoenix:phoenix-flume</exclude>
-        <exclude>org.apache.phoenix:phoenix-pig</exclude>
-      </excludes>
-    </dependencySet>
-  </dependencySets>
-
-  <fileSets>
-    <fileSet>
-      <!--Get misc project files -->
-      <directory>${project.basedir}/..</directory>
-      <outputDirectory>/</outputDirectory>
-      <includes>
-        <include>*.txt*</include>
-        <include>*.md</include>
-        <include>NOTICE*</include>
-      </includes>
-      <excludes>
-        <exclude>build.txt</exclude>
-      </excludes>
-    </fileSet>
-    <fileSet>
-      <!--Get map-red-config properties files -->
-      <directory>${project.basedir}/../config</directory>
-      <outputDirectory>/</outputDirectory>
-      <includes>
-        <include>csv-bulk-load-config.properties</include>
-      </includes>
-    </fileSet>
-  </fileSets>
-</component>

+ 4 - 27
ambari-metrics/pom.xml

@@ -32,6 +32,7 @@
     <module>ambari-metrics-storm-sink</module>
     <module>ambari-metrics-timelineservice</module>
     <module>ambari-metrics-host-monitoring</module>
+    <module>ambari-metrics-assembly</module>
   </modules>
   <properties>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -40,6 +41,9 @@
     <!--TODO change to HDP URL-->
     <hbase.tar>http://public-repo-1.hortonworks.com/HDP/centos6/2.x/GA/2.2.0.0/tars/hbase-0.98.4.2.2.0.0-2041-hadoop2.tar.gz</hbase.tar>
     <hbase.folder>hbase-0.98.4.2.2.0.0-2041-hadoop2</hbase.folder>
+    <resmonitor.install.dir>
+      /usr/lib/python2.6/site-packages/resource_monitoring
+    </resmonitor.install.dir>
   </properties>
   <repositories>
     <repository>
@@ -119,38 +123,11 @@
           </execution>
         </executions>
       </plugin>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>rpm-maven-plugin</artifactId>
-        <version>2.0.1</version>
-        <executions>
-          <execution>
-            <!-- unbinds rpm creation from maven lifecycle -->
-            <phase>none</phase>
-            <goals>
-              <goal>attached-rpm</goal>
-            </goals>
-          </execution>
-        </executions>
-        <configuration>
-          <copyright>2012, Apache Software Foundation</copyright>
-          <group>Development</group>
-          <description>Maven Recipe: RPM Package.</description>
-          <version>${package-version}</version>
-          <release>${package-release}</release>
-          <mappings/>
-        </configuration>
-      </plugin>
     </plugins>
   </build>
 
   <dependencies>
   </dependencies>
-  <profiles>
-    <profile>
-      <id>metrics2-standalone</id>
-    </profile>
-  </profiles>
 
 
 </project>

+ 1 - 5
ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/templates/hadoop-metrics2-hbase.properties-GANGLIA-MASTER.j2

@@ -49,11 +49,7 @@ hbase.extendedperiod = 3600
 
 {% if has_metric_collector %}
 
-# HBase-specific configuration to reset long-running stats (e.g. compactions)
-# If this variable is left out, then the default is no expiration.
-hbase.extendedperiod = 3600
-
-*.sink.timline*.plugin.urls=file:///usr/lib/ambari-metrics-hadoop-sink/ambari-metrics-hadoop-sink.jar
+*.timline.plugin.urls=file:///usr/lib/ambari-metrics-hadoop-sink/ambari-metrics-hadoop-sink.jar
 hbase.class=org.apache.hadoop.metrics2.sink.timeline.HadoopTimelineMetricsSink
 hbase.period=10
 hbase.collector={{metric_collector_host}}:8188

+ 1 - 0
ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/templates/hadoop-metrics2-hbase.properties-GANGLIA-RS.j2

@@ -48,6 +48,7 @@ hbase.extendedperiod = 3600
 
 {% if has_metric_collector %}
 
+*.timline.plugin.urls=file:///usr/lib/ambari-metrics-hadoop-sink/ambari-metrics-hadoop-sink.jar
 hbase.class=org.apache.hadoop.metrics2.sink.timeline.HadoopTimelineMetricsSink
 hbase.period=10
 hbase.collector={{metric_collector_host}}:8188