pom.xml 47 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. ~ Licensed to the Apache Software Foundation (ASF) under one
  4. ~ or more contributor license agreements. See the NOTICE file
  5. ~ distributed with this work for additional information
  6. ~ regarding copyright ownership. The ASF licenses this file
  7. ~ to you under the Apache License, Version 2.0 (the
  8. ~ "License"); you may not use this file except in compliance
  9. ~ with the License. You may obtain a copy of the License at
  10. ~
  11. ~ http://www.apache.org/licenses/LICENSE-2.0
  12. ~
  13. ~ Unless required by applicable law or agreed to in writing, software
  14. ~ distributed under the License is distributed on an "AS IS" BASIS,
  15. ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16. ~ See the License for the specific language governing permissions and
  17. ~ limitations under the License.
  18. -->
  19. <project xmlns="http://maven.apache.org/POM/4.0.0"
  20. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  21. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  22. <parent>
  23. <artifactId>ambari-metrics</artifactId>
  24. <groupId>org.apache.ambari</groupId>
  25. <version>2.0.0-SNAPSHOT</version>
  26. </parent>
  27. <modelVersion>4.0.0</modelVersion>
  28. <artifactId>ambari-metrics-assembly</artifactId>
  29. <name>Ambari Metrics Assembly</name>
  30. <packaging>pom</packaging>
  31. <version>2.0.0-SNAPSHOT</version>
  32. <description>Ambari Metrics</description>
  33. <properties>
  34. <collector.dir>${project.basedir}/../ambari-metrics-timelineservice</collector.dir>
  35. <monitor.dir>${project.basedir}/../ambari-metrics-host-monitoring</monitor.dir>
  36. <hadoop-sink.dir>${project.basedir}/../ambari-metrics-hadoop-sink</hadoop-sink.dir>
  37. <storm-sink.dir>${project.basedir}/../ambari-metrics-storm-sink</storm-sink.dir>
  38. <flume-sink.dir>${project.basedir}/../ambari-metrics-flume-sink</flume-sink.dir>
  39. <kafka-sink.dir>${project.basedir}/../ambari-metrics-kafka-sink</kafka-sink.dir>
  40. <python.ver>python &gt;= 2.6</python.ver>
  41. <python.devel>python-devel</python.devel>
  42. <deb.publisher>Apache</deb.publisher>
  43. <deb.section>universe/admin</deb.section>
  44. <deb.architecture>i386 amd64</deb.architecture>
  45. <deb.priority>extra</deb.priority>
  46. <deb.python.ver>python (&gt;= 2.6)</deb.python.ver>
  47. <deb.architecture>amd64</deb.architecture>
  48. <deb.dependency.list>${deb.python.ver},python-dev,gcc</deb.dependency.list>
  49. <hadoop.sink.jar>ambari-metrics-hadoop-sink-with-common-${project.version}.jar</hadoop.sink.jar>
  50. <storm.sink.jar>ambari-metrics-storm-sink-with-common-${project.version}.jar</storm.sink.jar>
  51. <flume.sink.jar>ambari-metrics-flume-sink-with-common-${project.version}.jar</flume.sink.jar>
  52. <kafka.sink.jar>ambari-metrics-kafka-sink-with-common-${project.version}.jar</kafka.sink.jar>
  53. </properties>
  54. <build>
  55. <plugins>
  56. <plugin>
  57. <groupId>org.codehaus.mojo</groupId>
  58. <artifactId>build-helper-maven-plugin</artifactId>
  59. <version>1.8</version>
  60. <executions>
  61. <execution>
  62. <id>parse-version</id>
  63. <phase>validate</phase>
  64. <goals>
  65. <goal>parse-version</goal>
  66. </goals>
  67. </execution>
  68. <execution>
  69. <id>regex-property</id>
  70. <goals>
  71. <goal>regex-property</goal>
  72. </goals>
  73. <configuration>
  74. <name>ambariVersion</name>
  75. <value>${project.version}</value>
  76. <regex>^([0-9]+)\.([0-9]+)\.([0-9]+)(\.|-).*</regex>
  77. <replacement>$1.$2.$3</replacement>
  78. <failIfNoMatch>false</failIfNoMatch>
  79. </configuration>
  80. </execution>
  81. </executions>
  82. </plugin>
  83. <plugin>
  84. <artifactId>maven-assembly-plugin</artifactId>
  85. <executions>
  86. <execution>
  87. <id>collector</id>
  88. <phase>package</phase>
  89. <goals>
  90. <goal>single</goal>
  91. </goals>
  92. <configuration>
  93. <attach>false</attach>
  94. <finalName>ambari-metrics-collector-${project.version}</finalName>
  95. <appendAssemblyId>false</appendAssemblyId>
  96. <descriptors>
  97. <descriptor>${assemblydescriptor.collector}</descriptor>
  98. </descriptors>
  99. <tarLongFileMode>gnu</tarLongFileMode>
  100. </configuration>
  101. </execution>
  102. <execution>
  103. <id>monitor</id>
  104. <phase>package</phase>
  105. <goals>
  106. <goal>single</goal>
  107. </goals>
  108. <configuration>
  109. <attach>false</attach>
  110. <finalName>ambari-metrics-monitor-${project.version}</finalName>
  111. <appendAssemblyId>false</appendAssemblyId>
  112. <descriptors>
  113. <descriptor>${assemblydescriptor.monitor}</descriptor>
  114. </descriptors>
  115. <tarLongFileMode>gnu</tarLongFileMode>
  116. </configuration>
  117. </execution>
  118. <execution>
  119. <id>hadoop-sink</id>
  120. <phase>package</phase>
  121. <goals>
  122. <goal>single</goal>
  123. </goals>
  124. <configuration>
  125. <attach>false</attach>
  126. <finalName>ambari-metrics-hadoop-sink-${project.version}</finalName>
  127. <appendAssemblyId>false</appendAssemblyId>
  128. <descriptors>
  129. <descriptor>${assemblydescriptor.sink}</descriptor>
  130. </descriptors>
  131. <tarLongFileMode>gnu</tarLongFileMode>
  132. </configuration>
  133. </execution>
  134. </executions>
  135. </plugin>
  136. <plugin>
  137. <groupId>org.apache.maven.plugins</groupId>
  138. <artifactId>maven-antrun-plugin</artifactId>
  139. <version>1.7</version>
  140. <executions>
  141. <execution>
  142. <id>download-hadoop</id>
  143. <phase>generate-resources</phase>
  144. <goals>
  145. <goal>run</goal>
  146. </goals>
  147. <configuration>
  148. <target name="Downloading Hadoop">
  149. <mkdir dir="${project.build.directory}/embedded" />
  150. <get
  151. src="${hadoop.tar}"
  152. dest="${project.build.directory}/embedded/hadoop.tar.gz"
  153. usetimestamp="true"
  154. />
  155. <untar
  156. src="${project.build.directory}/embedded/hadoop.tar.gz"
  157. dest="${project.build.directory}/embedded"
  158. compression="gzip"
  159. />
  160. <!-- Resolving symlinks-->
  161. <move todir="${project.build.directory}/embedded/${hadoop.folder}/lib/native/">
  162. <fileset dir="${project.build.directory}/embedded/${hadoop.folder}/lib/native/"/>
  163. <mapper type="regexp" from="libsnappy.so.1.1.*" to="libsnappy.so.1"/>
  164. </move>
  165. <move
  166. file="${project.build.directory}/embedded/${hadoop.folder}/lib/native/libhdfs.so.0.0.0"
  167. tofile="${project.build.directory}/embedded/${hadoop.folder}/lib/native/libhdfs.so"
  168. />
  169. <move
  170. file="${project.build.directory}/embedded/${hadoop.folder}/lib/native/libhadoop.so.1.0.0"
  171. tofile="${project.build.directory}/embedded/${hadoop.folder}/lib/native/libhadoop.so"
  172. />
  173. <delete file="${project.build.directory}/embedded/${hadoop.folder}/lib/native/libsnappy.so"/>
  174. </target>
  175. </configuration>
  176. </execution>
  177. </executions>
  178. </plugin>
  179. </plugins>
  180. </build>
  181. <profiles>
  182. <profile>
  183. <id>rpm</id>
  184. <activation>
  185. <property>
  186. <name>build-rpm</name>
  187. </property>
  188. </activation>
  189. <build>
  190. <plugins>
  191. <plugin>
  192. <artifactId>maven-resources-plugin</artifactId>
  193. <version>2.7</version>
  194. <executions>
  195. <execution>
  196. <id>copy-resources</id>
  197. <phase>prepare-package</phase>
  198. <goals>
  199. <goal>copy-resources</goal>
  200. </goals>
  201. <configuration>
  202. <outputDirectory>${project.build.directory}/resources/rpm</outputDirectory>
  203. <resources>
  204. <resource>
  205. <directory>${project.basedir}/src/main/package/rpm</directory>
  206. <filtering>true</filtering>
  207. </resource>
  208. </resources>
  209. </configuration>
  210. </execution>
  211. </executions>
  212. </plugin>
  213. <plugin>
  214. <groupId>org.codehaus.mojo</groupId>
  215. <artifactId>rpm-maven-plugin</artifactId>
  216. <version>2.0.1</version>
  217. <configuration>
  218. <group>Development</group>
  219. <needarch>x86_64</needarch>
  220. <copyright>2012, Apache Software Foundation</copyright>
  221. <version>${package-version}</version>
  222. <release>${package-release}</release>
  223. <defaultFilemode>644</defaultFilemode>
  224. <defaultDirmode>755</defaultDirmode>
  225. <defaultUsername>root</defaultUsername>
  226. <defaultGroupname>root</defaultGroupname>
  227. </configuration>
  228. <executions>
  229. <!--ambari-metrics-monitor-->
  230. <execution>
  231. <id>ambari-metrics-monitor</id>
  232. <!-- unbinds rpm creation from maven lifecycle -->
  233. <phase>package</phase>
  234. <goals>
  235. <goal>rpm</goal>
  236. </goals>
  237. <configuration>
  238. <name>ambari-metrics-monitor</name>
  239. <group>Development</group>
  240. <needarch>x86_64</needarch>
  241. <autoRequires>false</autoRequires>
  242. <requires>
  243. <require>${python.ver}</require>
  244. <require>gcc</require>
  245. <require>${python.devel}</require>
  246. </requires>
  247. <preremoveScriptlet>
  248. <scriptFile>src/main/package/rpm/preremove.sh</scriptFile>
  249. <fileEncoding>utf-8</fileEncoding>
  250. </preremoveScriptlet>
  251. <mappings>
  252. <mapping>
  253. <directory>${resmonitor.install.dir}</directory>
  254. <username>root</username>
  255. <groupname>root</groupname>
  256. <sources>
  257. <source>
  258. <location>
  259. ${monitor.dir}/src/main/python/__init__.py
  260. </location>
  261. </source>
  262. <source>
  263. <location>
  264. ${monitor.dir}/src/main/python/main.py
  265. </location>
  266. </source>
  267. </sources>
  268. </mapping>
  269. <mapping>
  270. <directory>${resmonitor.install.dir}/core</directory>
  271. <sources>
  272. <source>
  273. <location>
  274. ${monitor.dir}/src/main/python/core
  275. </location>
  276. </source>
  277. </sources>
  278. </mapping>
  279. <mapping>
  280. <directory>${resmonitor.install.dir}/psutil</directory>
  281. <sources>
  282. <source>
  283. <location>
  284. ${monitor.dir}/src/main/python/psutil
  285. </location>
  286. <excludes>
  287. <exclude>build/**</exclude>
  288. <exclude>build/*</exclude>
  289. </excludes>
  290. </source>
  291. </sources>
  292. </mapping>
  293. <mapping>
  294. <directory>${resmonitor.install.dir}/ambari_commons</directory>
  295. <sources>
  296. <source>
  297. <location>
  298. ${project.basedir}/../../ambari-common/src/main/python/ambari_commons
  299. </location>
  300. </source>
  301. </sources>
  302. </mapping>
  303. <mapping>
  304. <directory>/etc/ambari-metrics-monitor/conf</directory>
  305. <configuration>true</configuration>
  306. </mapping>
  307. <mapping>
  308. <directory>/usr/sbin</directory>
  309. <filemode>755</filemode>
  310. <username>root</username>
  311. <groupname>root</groupname>
  312. <directoryIncluded>false</directoryIncluded>
  313. <sources>
  314. <source>
  315. <location>
  316. ${monitor.dir}/conf/unix/ambari-metrics-monitor
  317. </location>
  318. <filter>true</filter>
  319. </source>
  320. </sources>
  321. </mapping>
  322. </mappings>
  323. </configuration>
  324. </execution>
  325. <!--ambari-metrics-collector-->
  326. <execution>
  327. <id>ambari-metrics-collector</id>
  328. <phase>package</phase>
  329. <goals>
  330. <goal>rpm</goal>
  331. </goals>
  332. <configuration>
  333. <name>ambari-metrics-collector</name>
  334. <copyright>2012, Apache Software Foundation</copyright>
  335. <group>Development</group>
  336. <description>Maven Recipe: RPM Package.</description>
  337. <autoRequires>false</autoRequires>
  338. <requires>
  339. <require>${python.ver}</require>
  340. </requires>
  341. <defaultFilemode>644</defaultFilemode>
  342. <defaultDirmode>755</defaultDirmode>
  343. <defaultUsername>root</defaultUsername>
  344. <defaultGroupname>root</defaultGroupname>
  345. <mappings>
  346. <mapping>
  347. <!--jars-->
  348. <directory>/usr/lib/ambari-metrics-collector/</directory>
  349. <sources>
  350. <source>
  351. <location>${collector.dir}/target/lib</location>
  352. </source>
  353. <source>
  354. <location>
  355. ${collector.dir}/target/ambari-metrics-timelineservice-${project.version}.jar
  356. </location>
  357. </source>
  358. </sources>
  359. </mapping>
  360. <mapping>
  361. <!--embedded applications-->
  362. <directory>/usr/lib/ams-hbase/</directory>
  363. <sources>
  364. <source>
  365. <location>${collector.dir}/target/embedded/${hbase.folder}</location>
  366. <excludes>
  367. <exclude>bin/**</exclude>
  368. <exclude>bin/*</exclude>
  369. </excludes>
  370. </source>
  371. </sources>
  372. </mapping>
  373. <mapping>
  374. <directory>/usr/lib/ams-hbase/bin</directory>
  375. <filemode>755</filemode>
  376. <sources>
  377. <source>
  378. <location>${collector.dir}/target/embedded/${hbase.folder}/bin</location>
  379. </source>
  380. </sources>
  381. </mapping>
  382. <mapping>
  383. <directory>/usr/lib/ams-hbase/lib/</directory>
  384. <sources>
  385. <source>
  386. <location>${collector.dir}/target/lib</location>
  387. <includes>
  388. <include>phoenix*.jar</include>
  389. <include>antlr*.jar</include>
  390. </includes>
  391. </source>
  392. </sources>
  393. </mapping>
  394. <mapping>
  395. <directory>/usr/lib/ams-hbase/lib/hadoop-native/</directory>
  396. <sources>
  397. <source>
  398. <location>${project.build.directory}/ambari-metrics-collector-${project.version}/ambari-metrics-collector-${project.version}/hbase/lib/hadoop-native</location>
  399. </source>
  400. </sources>
  401. </mapping>
  402. <mapping>
  403. <directory>/usr/sbin</directory>
  404. <filemode>755</filemode>
  405. <username>root</username>
  406. <groupname>root</groupname>
  407. <directoryIncluded>false</directoryIncluded>
  408. <sources>
  409. <source>
  410. <location>${collector.dir}/conf/unix/ambari-metrics-collector</location>
  411. <filter>false</filter>
  412. </source>
  413. </sources>
  414. </mapping>
  415. <mapping>
  416. <directory>/etc/ambari-metrics-collector/conf</directory>
  417. <configuration>true</configuration>
  418. <sources>
  419. <source>
  420. <location>${collector.dir}/conf/unix/ams-env.sh</location>
  421. </source>
  422. <source>
  423. <location>${collector.dir}/conf/unix/ams-site.xml</location>
  424. </source>
  425. <source>
  426. <location>${collector.dir}/conf/unix/log4j.properties</location>
  427. </source>
  428. <source>
  429. <location>${collector.dir}/target/embedded/${hbase.folder}/conf/hbase-site.xml</location>
  430. </source>
  431. </sources>
  432. </mapping>
  433. <mapping>
  434. <directory>/etc/ams-hbase/conf</directory>
  435. <configuration>true</configuration>
  436. <sources>
  437. <source>
  438. <location>${collector.dir}/target/embedded/${hbase.folder}/conf</location>
  439. <includes>
  440. <include>*.*</include>
  441. </includes>
  442. </source>
  443. </sources>
  444. </mapping>
  445. <mapping>
  446. <directory>/var/run/ams-hbase</directory>
  447. </mapping>
  448. <mapping>
  449. <directory>/var/lib/ambari-metrics-collector</directory>
  450. </mapping>
  451. </mappings>
  452. </configuration>
  453. </execution>
  454. <!--hadoop-sink-->
  455. <execution>
  456. <id>ambari-metrics-hadoop-sink</id>
  457. <phase>package</phase>
  458. <goals>
  459. <goal>rpm</goal>
  460. </goals>
  461. <configuration>
  462. <name>ambari-metrics-hadoop-sink</name>
  463. <copyright>2012, Apache Software Foundation</copyright>
  464. <group>Development</group>
  465. <description>Maven Recipe: RPM Package.</description>
  466. <defaultDirmode>755</defaultDirmode>
  467. <defaultFilemode>644</defaultFilemode>
  468. <defaultUsername>root</defaultUsername>
  469. <defaultGroupname>root</defaultGroupname>
  470. <postinstallScriptlet>
  471. <scriptFile>${project.build.directory}/resources/rpm/sink/postinstall.sh</scriptFile>
  472. <fileEncoding>utf-8</fileEncoding>
  473. </postinstallScriptlet>
  474. <mappings>
  475. <mapping>
  476. <directory>/usr/lib/ambari-metrics-hadoop-sink</directory>
  477. <sources>
  478. <source>
  479. <location>${hadoop-sink.dir}/target/ambari-metrics-hadoop-sink-with-common-${project.version}.jar</location>
  480. </source>
  481. </sources>
  482. </mapping>
  483. <mapping>
  484. <directory>/usr/lib/flume/lib</directory>
  485. <sources>
  486. <source>
  487. <location>${flume-sink.dir}/target/ambari-metrics-flume-sink-with-common-${project.version}.jar</location>
  488. </source>
  489. </sources>
  490. </mapping>
  491. <mapping>
  492. <directory>/usr/lib/storm/lib</directory>
  493. <sources>
  494. <source>
  495. <location>${storm-sink.dir}/target/ambari-metrics-storm-sink-with-common-${project.version}.jar</location>
  496. </source>
  497. </sources>
  498. </mapping>
  499. <mapping>
  500. <directory>/usr/lib/ambari-metrics-kafka-sink</directory>
  501. <sources>
  502. <source>
  503. <location>${kafka-sink.dir}/target/${kafka.sink.jar}</location>
  504. </source>
  505. </sources>
  506. </mapping>
  507. <mapping>
  508. <directory>/usr/lib/ambari-metrics-kafka-sink/lib</directory>
  509. <sources>
  510. <source>
  511. <location>${kafka-sink.dir}/target/lib</location>
  512. </source>
  513. </sources>
  514. </mapping>
  515. </mappings>
  516. </configuration>
  517. </execution>
  518. </executions>
  519. </plugin>
  520. </plugins>
  521. </build>
  522. </profile>
  523. <profile>
  524. <id>deb</id>
  525. <activation>
  526. <property>
  527. <name>build-deb</name>
  528. </property>
  529. </activation>
  530. <build>
  531. <plugins>
  532. <plugin>
  533. <artifactId>maven-resources-plugin</artifactId>
  534. <version>2.7</version>
  535. <executions>
  536. <execution>
  537. <id>copy-resources</id>
  538. <phase>prepare-package</phase>
  539. <goals>
  540. <goal>copy-resources</goal>
  541. </goals>
  542. <configuration>
  543. <outputDirectory>${project.build.directory}/resources/deb/control</outputDirectory>
  544. <resources>
  545. <resource>
  546. <directory>${project.basedir}/src/main/package/deb/control</directory>
  547. <excludes>
  548. <exclude>postinst</exclude>
  549. </excludes>
  550. <filtering>false</filtering>
  551. </resource>
  552. <resource>
  553. <directory>${project.basedir}/src/main/package/deb/control</directory>
  554. <includes>
  555. <include>postinst</include>
  556. </includes>
  557. <filtering>true</filtering>
  558. </resource>
  559. </resources>
  560. </configuration>
  561. </execution>
  562. </executions>
  563. </plugin>
  564. <plugin>
  565. <artifactId>jdeb</artifactId>
  566. <groupId>org.vafer</groupId>
  567. <version>1.0.1</version>
  568. <executions>
  569. <execution>
  570. <phase>package</phase>
  571. <goals>
  572. <goal>jdeb</goal>
  573. </goals>
  574. </execution>
  575. </executions>
  576. <configuration>
  577. <controlDir>${project.build.directory}/resources/deb/control</controlDir>
  578. <deb>${basedir}/target/${artifactId}_${package-version}-${package-release}.deb</deb>
  579. <dataSet>
  580. <data>
  581. <type>file</type>
  582. <src>${monitor.dir}/src/main/python/__init__.py</src>
  583. <mapper>
  584. <type>perm</type>
  585. <prefix>${resmonitor.install.dir}</prefix>
  586. <!-- TODO: Figure out if file perms should be set -->
  587. <!--user>root</user>
  588. <group>root</group-->
  589. <filemode>755</filemode>
  590. </mapper>
  591. </data>
  592. <data>
  593. <type>file</type>
  594. <src>${monitor.dir}/src/main/python/main.py</src>
  595. <mapper>
  596. <type>perm</type>
  597. <prefix>${resmonitor.install.dir}</prefix>
  598. <filemode>755</filemode>
  599. </mapper>
  600. </data>
  601. <data>
  602. <type>directory</type>
  603. <src>${monitor.dir}/src/main/python/core</src>
  604. <mapper>
  605. <type>perm</type>
  606. <prefix>${resmonitor.install.dir}/core</prefix>
  607. </mapper>
  608. </data>
  609. <data>
  610. <type>directory</type>
  611. <src>${monitor.dir}/src/main/python/psutil</src>
  612. <excludes>build/**</excludes>
  613. <mapper>
  614. <type>perm</type>
  615. <prefix>${resmonitor.install.dir}/psutil</prefix>
  616. </mapper>
  617. </data>
  618. <data>
  619. <type>directory</type>
  620. <src>${project.basedir}/../../ambari-common/src/main/python/ambari_commons</src>
  621. <mapper>
  622. <type>perm</type>
  623. <prefix>${resmonitor.install.dir}/ambari_commons</prefix>
  624. </mapper>
  625. </data>
  626. <data>
  627. <type>template</type>
  628. <paths>
  629. <path>/etc/ambari-metrics-monitor/conf</path>
  630. <path>/usr/lib/ambari-metrics-collector</path>
  631. <path>/etc/ambari-metrics-collector/conf</path>
  632. <path>/etc/ams-hbase/conf</path>
  633. <path>/var/run/ams-hbase</path>
  634. <path>/var/lib/ambari-metrics-collector</path>
  635. <path>/usr/lib/ambari-metrics-hadoop-sink</path>
  636. <path>/usr/lib/ambari-metrics-kafka-sink</path>
  637. <path>/usr/lib/ambari-metrics-kafka-sink/lib</path>
  638. <path>/usr/lib/flume/lib</path>
  639. <path>/usr/lib/storm/lib</path>
  640. </paths>
  641. </data>
  642. <data>
  643. <src>${monitor.dir}/conf/unix/metric_groups.conf</src>
  644. <type>file</type>
  645. <mapper>
  646. <type>perm</type>
  647. <prefix>/etc/ambari-metrics-monitor/conf</prefix>
  648. <filemode>644</filemode>
  649. </mapper>
  650. </data>
  651. <data>
  652. <src>${monitor.dir}/conf/unix/metric_monitor.ini</src>
  653. <type>file</type>
  654. <mapper>
  655. <type>perm</type>
  656. <prefix>/etc/ambari-metrics-monitor/conf</prefix>
  657. <filemode>644</filemode>
  658. </mapper>
  659. </data>
  660. <data>
  661. <src>${monitor.dir}/conf/unix/ambari-metrics-monitor</src>
  662. <type>file</type>
  663. <mapper>
  664. <type>perm</type>
  665. <prefix>/usr/sbin</prefix>
  666. <filemode>755</filemode>
  667. </mapper>
  668. </data>
  669. <!-- Metric collector -->
  670. <data>
  671. <src>${collector.dir}/target/ambari-metrics-timelineservice-${project.version}.jar</src>
  672. <type>file</type>
  673. <mapper>
  674. <type>perm</type>
  675. <dirmode>644</dirmode>
  676. <prefix>/usr/lib/ambari-metrics-collector</prefix>
  677. </mapper>
  678. </data>
  679. <data>
  680. <src>${collector.dir}/target/lib</src>
  681. <type>directory</type>
  682. <mapper>
  683. <type>perm</type>
  684. <filemode>644</filemode>
  685. <prefix>/usr/lib/ambari-metrics-collector</prefix>
  686. </mapper>
  687. </data>
  688. <data>
  689. <src>${collector.dir}/target/embedded/${hbase.folder}</src>
  690. <type>directory</type>
  691. <excludes>bin/**,bin/*</excludes>
  692. <mapper>
  693. <type>perm</type>
  694. <prefix>/usr/lib/ams-hbase</prefix>
  695. <filemode>644</filemode>
  696. </mapper>
  697. </data>
  698. <data>
  699. <src>${collector.dir}/target/embedded/${hbase.folder}/bin</src>
  700. <type>directory</type>
  701. <mapper>
  702. <type>perm</type>
  703. <filemode>755</filemode>
  704. <prefix>/usr/lib/ams-hbase/bin</prefix>
  705. </mapper>
  706. </data>
  707. <data>
  708. <src>${project.build.directory}/ambari-metrics-collector-${project.version}/ambari-metrics-collector-${project.version}/hbase/lib/hadoop-native</src>
  709. <type>directory</type>
  710. <mapper>
  711. <type>perm</type>
  712. <filemode>755</filemode>
  713. <prefix>/usr/lib/ams-hbase/lib/hadoop-native</prefix>
  714. </mapper>
  715. </data>
  716. <data>
  717. <src>${collector.dir}/target/lib</src>
  718. <type>directory</type>
  719. <includes>phoenix*.jar,antlr*.jar</includes>
  720. <mapper>
  721. <type>perm</type>
  722. <filemode>644</filemode>
  723. <prefix>/usr/lib/ams-hbase/lib</prefix>
  724. </mapper>
  725. </data>
  726. <data>
  727. <src>${collector.dir}/conf/unix/ambari-metrics-collector</src>
  728. <type>file</type>
  729. <mapper>
  730. <type>perm</type>
  731. <filemode>755</filemode>
  732. <prefix>/usr/sbin</prefix>
  733. </mapper>
  734. </data>
  735. <data>
  736. <src>${collector.dir}/conf/unix/ams-env.sh</src>
  737. <type>file</type>
  738. <mapper>
  739. <type>perm</type>
  740. <filemode>755</filemode>
  741. <prefix>/etc/ambari-metrics-collector/conf</prefix>
  742. </mapper>
  743. </data>
  744. <data>
  745. <src>${collector.dir}/conf/unix/ams-site.xml</src>
  746. <type>file</type>
  747. <mapper>
  748. <type>perm</type>
  749. <filemode>644</filemode>
  750. <prefix>/etc/ambari-metrics-collector/conf</prefix>
  751. </mapper>
  752. </data>
  753. <data>
  754. <src>${collector.dir}/conf/unix/log4j.properties</src>
  755. <type>file</type>
  756. <mapper>
  757. <type>perm</type>
  758. <filemode>644</filemode>
  759. <prefix>/etc/ambari-metrics-collector/conf</prefix>
  760. </mapper>
  761. </data>
  762. <data>
  763. <src>${collector.dir}/target/embedded/${hbase.folder}/conf/hbase-site.xml</src>
  764. <type>file</type>
  765. <mapper>
  766. <type>perm</type>
  767. <filemode>644</filemode>
  768. <prefix>/etc/ambari-metrics-collector/conf</prefix>
  769. </mapper>
  770. </data>
  771. <data>
  772. <type>directory</type>
  773. <src>${collector.dir}/target/embedded/${hbase.folder}/conf</src>
  774. <mapper>
  775. <type>perm</type>
  776. <dirmode>755</dirmode>
  777. <filemode>644</filemode>
  778. <prefix>/etc/ams-hbase/conf</prefix>
  779. </mapper>
  780. </data>
  781. <!-- hadoop sink -->
  782. <data>
  783. <src>${hadoop-sink.dir}/target/ambari-metrics-hadoop-sink-with-common-${project.version}.jar</src>
  784. <type>file</type>
  785. <mapper>
  786. <type>perm</type>
  787. <filemode>644</filemode>
  788. <dirmode>755</dirmode>
  789. <prefix>/usr/lib/ambari-metrics-hadoop-sink</prefix>
  790. </mapper>
  791. </data>
  792. <!-- flume sink -->
  793. <data>
  794. <src>${flume-sink.dir}/target/${flume.sink.jar}</src>
  795. <type>file</type>
  796. <mapper>
  797. <type>perm</type>
  798. <filemode>644</filemode>
  799. <dirmode>755</dirmode>
  800. <prefix>/usr/lib/flume/lib</prefix>
  801. </mapper>
  802. </data>
  803. <!-- storm sink -->
  804. <data>
  805. <src>${storm-sink.dir}/target/${storm.sink.jar}</src>
  806. <type>file</type>
  807. <mapper>
  808. <type>perm</type>
  809. <filemode>644</filemode>
  810. <dirmode>755</dirmode>
  811. <prefix>/usr/lib/storm/lib</prefix>
  812. </mapper>
  813. </data>
  814. <!-- kafka sink -->
  815. <data>
  816. <src>${kafka-sink.dir}/target/${kafka.sink.jar}</src>
  817. <type>file</type>
  818. <mapper>
  819. <type>perm</type>
  820. <filemode>644</filemode>
  821. <dirmode>755</dirmode>
  822. <prefix>/usr/lib/ambari-metrics-kafka-sink</prefix>
  823. </mapper>
  824. </data>
  825. <data>
  826. <src>${kafka-sink.dir}/target/lib</src>
  827. <type>directory</type>
  828. <mapper>
  829. <type>perm</type>
  830. <filemode>644</filemode>
  831. <dirmode>755</dirmode>
  832. <prefix>/usr/lib/ambari-metrics-kafka-sink/lib</prefix>
  833. </mapper>
  834. </data>
  835. </dataSet>
  836. </configuration>
  837. </plugin>
  838. </plugins>
  839. </build>
  840. </profile>
  841. <profile>
  842. <id>windows</id>
  843. <activation>
  844. <os>
  845. <family>win</family>
  846. </os>
  847. </activation>
  848. <properties>
  849. <envClassifier>win</envClassifier>
  850. <dirsep>\</dirsep>
  851. <pathsep>;</pathsep>
  852. <executable.python>python</executable.python>
  853. <executable.shell>cmd</executable.shell>
  854. <fileextension.shell>cmd</fileextension.shell>
  855. <fileextension.dot.shell-default>.cmd</fileextension.dot.shell-default>
  856. <assemblydescriptor.collector>src/main/assembly/collector-windows.xml</assemblydescriptor.collector>
  857. <assemblydescriptor.monitor>src/main/assembly/monitor-windows.xml</assemblydescriptor.monitor>
  858. <assemblydescriptor.sink>src/main/assembly/sink-windows.xml</assemblydescriptor.sink>
  859. <packagingFormat>jar</packagingFormat>
  860. <python.build.version>2.7</python.build.version>
  861. </properties>
  862. </profile>
  863. <profile>
  864. <id>linux</id>
  865. <activation>
  866. <os>
  867. <family>unix</family>
  868. </os>
  869. </activation>
  870. <properties>
  871. <envClassifier>linux</envClassifier>
  872. <dirsep>/</dirsep>
  873. <pathsep>:</pathsep>
  874. <executable.python>${project.basedir}/../ambari-common/src/main/unix/ambari-python-wrap</executable.python>
  875. <executable.shell>sh</executable.shell>
  876. <fileextension.shell>sh</fileextension.shell>
  877. <fileextension.dot.shell-default></fileextension.dot.shell-default>
  878. <assemblydescriptor.collector>src/main/assembly/collector.xml</assemblydescriptor.collector>
  879. <assemblydescriptor.monitor>src/main/assembly/monitor.xml</assemblydescriptor.monitor>
  880. <assemblydescriptor.sink>src/main/assembly/sink.xml</assemblydescriptor.sink>
  881. <packagingFormat>jar</packagingFormat>
  882. </properties>
  883. </profile>
  884. <profile>
  885. <id>msi</id>
  886. <activation>
  887. <os>
  888. <family>Windows</family>
  889. </os>
  890. </activation>
  891. <build>
  892. <plugins>
  893. <!-- msi creation -->
  894. <plugin>
  895. <groupId>org.codehaus.mojo</groupId>
  896. <artifactId>exec-maven-plugin</artifactId>
  897. <version>1.2</version>
  898. <executions>
  899. <execution>
  900. <id>run-heat-collector</id>
  901. <phase>package</phase>
  902. <goals>
  903. <goal>exec</goal>
  904. </goals>
  905. <configuration>
  906. <executable>heat.exe</executable>
  907. <arguments>
  908. <argument>dir</argument>
  909. <argument>"."</argument>
  910. <argument>-dr</argument>
  911. <argument>"COLLECTOR_INSTALL_DIRECTORY"</argument>
  912. <argument>-platform</argument>
  913. <argument>Win64</argument>
  914. <argument>-cg</argument>
  915. <argument>"AmbariMetricsCollectorGroup"</argument>
  916. <argument>-gg</argument>
  917. <argument>-ke</argument>
  918. <argument>-srd</argument>
  919. <argument>-o</argument>
  920. <argument>".\..\collector-files.wxs"</argument>
  921. </arguments>
  922. <workingDirectory>${basedir}/target/ambari-metrics-collector-${project.version}</workingDirectory>
  923. </configuration>
  924. </execution>
  925. <execution>
  926. <id>run-candle-collector</id>
  927. <phase>package</phase>
  928. <goals>
  929. <goal>exec</goal>
  930. </goals>
  931. <configuration>
  932. <executable>candle.exe</executable>
  933. <arguments>
  934. <argument>-arch</argument>
  935. <argument>x64</argument>
  936. <argument>collector.wxs</argument>
  937. <argument>collector-files.wxs</argument>
  938. </arguments>
  939. <workingDirectory>${basedir}/target</workingDirectory>
  940. </configuration>
  941. </execution>
  942. <execution>
  943. <id>run-light-collector</id>
  944. <phase>package</phase>
  945. <goals>
  946. <goal>exec</goal>
  947. </goals>
  948. <configuration>
  949. <executable>light.exe</executable>
  950. <arguments>
  951. <argument>-ext</argument>
  952. <argument>WixUIExtension</argument>
  953. <argument>-b</argument>
  954. <argument>${basedir}/target/ambari-metrics-collector-${project.version}</argument>
  955. <argument>-o</argument>
  956. <argument>ambari-metrics-collector-${project.version}.msi</argument>
  957. <argument>collector.wixobj</argument>
  958. <argument>collector-files.wixobj</argument>
  959. </arguments>
  960. <workingDirectory>${basedir}/target</workingDirectory>
  961. </configuration>
  962. </execution>
  963. <execution>
  964. <id>run-heat-monitor</id>
  965. <phase>package</phase>
  966. <goals>
  967. <goal>exec</goal>
  968. </goals>
  969. <configuration>
  970. <executable>heat.exe</executable>
  971. <arguments>
  972. <argument>dir</argument>
  973. <argument>"."</argument>
  974. <argument>-dr</argument>
  975. <argument>"MONITOR_INSTALL_DIRECTORY"</argument>
  976. <argument>-platform</argument>
  977. <argument>Win64</argument>
  978. <argument>-cg</argument>
  979. <argument>"AmbariMetricsMonitorGroup"</argument>
  980. <argument>-gg</argument>
  981. <argument>-ke</argument>
  982. <argument>-srd</argument>
  983. <argument>-o</argument>
  984. <argument>".\..\monitor-files.wxs"</argument>
  985. </arguments>
  986. <workingDirectory>${basedir}/target/ambari-metrics-monitor-${project.version}</workingDirectory>
  987. </configuration>
  988. </execution>
  989. <execution>
  990. <id>run-candle-monitor</id>
  991. <phase>package</phase>
  992. <goals>
  993. <goal>exec</goal>
  994. </goals>
  995. <configuration>
  996. <executable>candle.exe</executable>
  997. <arguments>
  998. <argument>-arch</argument>
  999. <argument>x64</argument>
  1000. <argument>monitor.wxs</argument>
  1001. <argument>monitor-files.wxs</argument>
  1002. </arguments>
  1003. <workingDirectory>${basedir}/target</workingDirectory>
  1004. </configuration>
  1005. </execution>
  1006. <execution>
  1007. <id>run-light-monitor</id>
  1008. <phase>package</phase>
  1009. <goals>
  1010. <goal>exec</goal>
  1011. </goals>
  1012. <configuration>
  1013. <executable>light.exe</executable>
  1014. <arguments>
  1015. <argument>-ext</argument>
  1016. <argument>WixUIExtension</argument>
  1017. <argument>-b</argument>
  1018. <argument>${basedir}/target/ambari-metrics-monitor-${project.version}</argument>
  1019. <argument>-o</argument>
  1020. <argument>ambari-metrics-monitor-${project.version}.msi</argument>
  1021. <argument>monitor.wixobj</argument>
  1022. <argument>monitor-files.wixobj</argument>
  1023. </arguments>
  1024. <workingDirectory>${basedir}/target</workingDirectory>
  1025. </configuration>
  1026. </execution>
  1027. <execution>
  1028. <id>run-heat-sink</id>
  1029. <phase>package</phase>
  1030. <goals>
  1031. <goal>exec</goal>
  1032. </goals>
  1033. <configuration>
  1034. <executable>heat.exe</executable>
  1035. <arguments>
  1036. <argument>dir</argument>
  1037. <argument>"."</argument>
  1038. <argument>-dr</argument>
  1039. <argument>"SINK_INSTALL_DIRECTORY"</argument>
  1040. <argument>-platform</argument>
  1041. <argument>Win64</argument>
  1042. <argument>-cg</argument>
  1043. <argument>"AmbariMetricsSinkGroup"</argument>
  1044. <argument>-gg</argument>
  1045. <argument>-ke</argument>
  1046. <argument>-srd</argument>
  1047. <argument>-o</argument>
  1048. <argument>".\..\sink-files.wxs"</argument>
  1049. </arguments>
  1050. <workingDirectory>${basedir}/target/ambari-metrics-hadoop-sink-${project.version}</workingDirectory>
  1051. </configuration>
  1052. </execution>
  1053. <execution>
  1054. <id>run-candle-sink</id>
  1055. <phase>package</phase>
  1056. <goals>
  1057. <goal>exec</goal>
  1058. </goals>
  1059. <configuration>
  1060. <executable>candle.exe</executable>
  1061. <arguments>
  1062. <argument>-arch</argument>
  1063. <argument>x64</argument>
  1064. <argument>sink.wxs</argument>
  1065. <argument>sink-files.wxs</argument>
  1066. </arguments>
  1067. <workingDirectory>${basedir}/target</workingDirectory>
  1068. </configuration>
  1069. </execution>
  1070. <execution>
  1071. <id>run-light-sink</id>
  1072. <phase>package</phase>
  1073. <goals>
  1074. <goal>exec</goal>
  1075. </goals>
  1076. <configuration>
  1077. <executable>light.exe</executable>
  1078. <arguments>
  1079. <argument>-ext</argument>
  1080. <argument>WixUIExtension</argument>
  1081. <argument>-b</argument>
  1082. <argument>${basedir}/target/ambari-metrics-hadoop-sink-${project.version}</argument>
  1083. <argument>-o</argument>
  1084. <argument>ambari-metrics-hadoop-sink-${project.version}.msi</argument>
  1085. <argument>sink.wixobj</argument>
  1086. <argument>sink-files.wixobj</argument>
  1087. </arguments>
  1088. <workingDirectory>${basedir}/target</workingDirectory>
  1089. </configuration>
  1090. </execution>
  1091. </executions>
  1092. </plugin>
  1093. </plugins>
  1094. </build>
  1095. </profile>
  1096. </profiles>
  1097. <dependencies>
  1098. <dependency>
  1099. <groupId>org.apache.ambari</groupId>
  1100. <artifactId>ambari-metrics-timelineservice</artifactId>
  1101. <version>${project.version}</version>
  1102. </dependency>
  1103. <dependency>
  1104. <groupId>org.apache.ambari</groupId>
  1105. <artifactId>ambari-metrics-common</artifactId>
  1106. <version>${project.version}</version>
  1107. </dependency>
  1108. <dependency>
  1109. <groupId>org.apache.ambari</groupId>
  1110. <artifactId>ambari-metrics-hadoop-sink</artifactId>
  1111. <version>${project.version}</version>
  1112. </dependency>
  1113. <dependency>
  1114. <groupId>org.apache.ambari</groupId>
  1115. <artifactId>ambari-metrics-flume-sink</artifactId>
  1116. <version>${project.version}</version>
  1117. </dependency>
  1118. <dependency>
  1119. <groupId>org.apache.ambari</groupId>
  1120. <artifactId>ambari-metrics-storm-sink</artifactId>
  1121. <version>${project.version}</version>
  1122. </dependency>
  1123. <dependency>
  1124. <groupId>org.apache.ambari</groupId>
  1125. <artifactId>ambari-metrics-kafka-sink</artifactId>
  1126. <version>${project.version}</version>
  1127. </dependency>
  1128. <dependency>
  1129. <groupId>org.apache.ambari</groupId>
  1130. <artifactId>ambari-metrics-host-monitoring</artifactId>
  1131. <version>${project.version}</version>
  1132. <type>pom</type>
  1133. <optional>true</optional>
  1134. </dependency>
  1135. </dependencies>
  1136. </project>