diff options
author | Siddharth Wagle <swagle@hortonworks.com> | 2014-12-17 18:29:50 -0800 |
---|---|---|
committer | Siddharth Wagle <swagle@hortonworks.com> | 2014-12-17 18:29:50 -0800 |
commit | 40aa66f548c5387ed08f867ca84bdb477c90b9ad (patch) | |
tree | f67793462694d2987dc9f871a52c9a2bac344d70 | |
parent | 4d4fc0cbb5929655080ba79604244a7a0eba862c (diff) |
AMBARI-8741. Create assembly module to place ambari metrics rpms into single output dir. (mpapirkovskyy via swagle)
22 files changed, 840 insertions, 600 deletions
diff --git a/ambari-metrics/ambari-metrics-assembly/pom.xml b/ambari-metrics/ambari-metrics-assembly/pom.xml new file mode 100644 index 0000000000..79d5ebab2f --- /dev/null +++ b/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> diff --git a/ambari-metrics/ambari-metrics-assembly/src/main/assembly/collector.xml b/ambari-metrics/ambari-metrics-assembly/src/main/assembly/collector.xml new file mode 100644 index 0000000000..21c8e470fc --- /dev/null +++ b/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>
\ No newline at end of file diff --git a/ambari-metrics/ambari-metrics-timelineservice/src/main/assemblies/phoenix-server.xml b/ambari-metrics/ambari-metrics-assembly/src/main/assembly/monitor.xml index be8a516879..3513972d3b 100644 --- a/ambari-metrics/ambari-metrics-timelineservice/src/main/assemblies/phoenix-server.xml +++ b/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>
\ No newline at end of file diff --git a/ambari-metrics/ambari-metrics-assembly/src/main/assembly/sink.xml b/ambari-metrics/ambari-metrics-assembly/src/main/assembly/sink.xml new file mode 100644 index 0000000000..2426904d31 --- /dev/null +++ b/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>
\ No newline at end of file diff --git a/ambari-metrics/ambari-metrics-flume-sink/pom.xml b/ambari-metrics/ambari-metrics-flume-sink/pom.xml index 1eca23ebeb..22e14c9f09 100644 --- a/ambari-metrics/ambari-metrics-flume-sink/pom.xml +++ b/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> diff --git a/ambari-metrics/ambari-metrics-flume-sink/src/main/assemblies/sink.xml b/ambari-metrics/ambari-metrics-flume-sink/src/main/assemblies/jar-with-common.xml index 21a6b3640e..b2351e0069 100644 --- a/ambari-metrics/ambari-metrics-flume-sink/src/main/assemblies/sink.xml +++ b/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> diff --git a/ambari-metrics/ambari-metrics-hadoop-sink/pom.xml b/ambari-metrics/ambari-metrics-hadoop-sink/pom.xml index 56ea2e4f3e..43523b4618 100644 --- a/ambari-metrics/ambari-metrics-hadoop-sink/pom.xml +++ b/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> diff --git a/ambari-metrics/ambari-metrics-hadoop-sink/src/main/assemblies/sink-jar.xml b/ambari-metrics/ambari-metrics-hadoop-sink/src/main/assemblies/jar-with-common.xml index 83c3099202..5cee0c9cea 100644 --- a/ambari-metrics/ambari-metrics-hadoop-sink/src/main/assemblies/sink-jar.xml +++ b/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> diff --git a/ambari-metrics/ambari-metrics-hadoop-sink/src/main/assemblies/sink.xml b/ambari-metrics/ambari-metrics-hadoop-sink/src/main/assemblies/sink.xml deleted file mode 100644 index 21a6b3640e..0000000000 --- a/ambari-metrics/ambari-metrics-hadoop-sink/src/main/assemblies/sink.xml +++ /dev/null @@ -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> diff --git a/ambari-metrics/ambari-metrics-host-monitoring/conf/unix/metric_groups.conf b/ambari-metrics/ambari-metrics-host-monitoring/conf/unix/metric_groups.conf new file mode 100644 index 0000000000..aa03d195c6 --- /dev/null +++ b/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": [] + } + } +} diff --git a/ambari-metrics/ambari-metrics-host-monitoring/conf/unix/metric_monitor.ini b/ambari-metrics/ambari-metrics-host-monitoring/conf/unix/metric_monitor.ini new file mode 100644 index 0000000000..5e672fc04d --- /dev/null +++ b/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 diff --git a/ambari-metrics/ambari-metrics-host-monitoring/pom.xml b/ambari-metrics/ambari-metrics-host-monitoring/pom.xml index 206f225268..6080c8d16f 100644 --- a/ambari-metrics/ambari-metrics-host-monitoring/pom.xml +++ b/ambari-metrics/ambari-metrics-host-monitoring/pom.xml @@ -100,117 +100,6 @@ </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> <version>1.7</version> diff --git a/ambari-metrics/ambari-metrics-storm-sink/pom.xml b/ambari-metrics/ambari-metrics-storm-sink/pom.xml index d9d1051737..ea8f0f1834 100644 --- a/ambari-metrics/ambari-metrics-storm-sink/pom.xml +++ b/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> diff --git a/ambari-metrics/ambari-metrics-timelineservice/src/main/assemblies/ats.xml b/ambari-metrics/ambari-metrics-storm-sink/src/main/assemblies/jar-with-common.xml index 21a6b3640e..c369d49648 100644 --- a/ambari-metrics/ambari-metrics-timelineservice/src/main/assemblies/ats.xml +++ b/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> diff --git a/ambari-metrics/ambari-metrics-storm-sink/src/main/assemblies/sink.xml b/ambari-metrics/ambari-metrics-storm-sink/src/main/assemblies/sink.xml deleted file mode 100644 index 21a6b3640e..0000000000 --- a/ambari-metrics/ambari-metrics-storm-sink/src/main/assemblies/sink.xml +++ /dev/null @@ -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> diff --git a/ambari-metrics/ambari-metrics-timelineservice/pom.xml b/ambari-metrics/ambari-metrics-timelineservice/pom.xml index 01f26fa905..5141359428 100644 --- a/ambari-metrics/ambari-metrics-timelineservice/pom.xml +++ b/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> @@ -57,25 +57,6 @@ </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> <version>1.7</version> @@ -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" diff --git a/ambari-metrics/ambari-metrics-timelineservice/src/main/assemblies/phoenix-client.xml b/ambari-metrics/ambari-metrics-timelineservice/src/main/assemblies/phoenix-client.xml deleted file mode 100644 index beca5bd743..0000000000 --- a/ambari-metrics/ambari-metrics-timelineservice/src/main/assemblies/phoenix-client.xml +++ /dev/null @@ -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> diff --git a/ambari-metrics/ambari-metrics-timelineservice/src/main/assemblies/phoenix-components-major-client.xml b/ambari-metrics/ambari-metrics-timelineservice/src/main/assemblies/phoenix-components-major-client.xml deleted file mode 100644 index 13692fe1af..0000000000 --- a/ambari-metrics/ambari-metrics-timelineservice/src/main/assemblies/phoenix-components-major-client.xml +++ /dev/null @@ -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> diff --git a/ambari-metrics/ambari-metrics-timelineservice/src/main/assemblies/phoenix-components-minimal.xml b/ambari-metrics/ambari-metrics-timelineservice/src/main/assemblies/phoenix-components-minimal.xml deleted file mode 100644 index bf7de85875..0000000000 --- a/ambari-metrics/ambari-metrics-timelineservice/src/main/assemblies/phoenix-components-minimal.xml +++ /dev/null @@ -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> diff --git a/ambari-metrics/pom.xml b/ambari-metrics/pom.xml index cdd2c622f2..dde339a444 100644 --- a/ambari-metrics/pom.xml +++ b/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> diff --git a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/templates/hadoop-metrics2-hbase.properties-GANGLIA-MASTER.j2 b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/templates/hadoop-metrics2-hbase.properties-GANGLIA-MASTER.j2 index b07378b16d..bd13f0cc09 100644 --- a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/templates/hadoop-metrics2-hbase.properties-GANGLIA-MASTER.j2 +++ b/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 diff --git a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/templates/hadoop-metrics2-hbase.properties-GANGLIA-RS.j2 b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/templates/hadoop-metrics2-hbase.properties-GANGLIA-RS.j2 index d13540fe5c..84fc7c9ce3 100644 --- a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/templates/hadoop-metrics2-hbase.properties-GANGLIA-RS.j2 +++ b/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 |