|
@@ -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>
|