pom.xml 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License. See accompanying LICENSE file.
  12. -->
  13. <project xmlns="http://maven.apache.org/POM/4.0.0"
  14. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  15. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  16. <modelVersion>4.0.0</modelVersion>
  17. <parent>
  18. <groupId>org.apache.hadoop</groupId>
  19. <artifactId>hadoop-project</artifactId>
  20. <version>3.1.5-SNAPSHOT</version>
  21. <relativePath>../../hadoop-project</relativePath>
  22. </parent>
  23. <artifactId>hadoop-azure</artifactId>
  24. <name>Apache Hadoop Azure support</name>
  25. <description>
  26. This module contains code to support integration with Azure.
  27. Currently this consists of a filesystem client to read data from
  28. and write data to Azure Storage.
  29. </description>
  30. <packaging>jar</packaging>
  31. <properties>
  32. <file.encoding>UTF-8</file.encoding>
  33. <downloadSources>true</downloadSources>
  34. <hadoop.tmp.dir>${project.build.directory}/test</hadoop.tmp.dir>
  35. <!-- are scale tests enabled ? -->
  36. <fs.azure.scale.test.enabled>unset</fs.azure.scale.test.enabled>
  37. <!-- Size in MB of huge files. -->
  38. <fs.azure.scale.test.huge.filesize>unset</fs.azure.scale.test.huge.filesize>
  39. <!-- Size in MB of the partion size in huge file uploads. -->
  40. <fs.azure.scale.test.huge.partitionsize>unset</fs.azure.scale.test.huge.partitionsize>
  41. <!-- Timeout in seconds for scale tests.-->
  42. <fs.azure.scale.test.timeout>7200</fs.azure.scale.test.timeout>
  43. <fs.azure.scale.test.list.performance.threads>10</fs.azure.scale.test.list.performance.threads>
  44. <fs.azure.scale.test.list.performance.files>1000</fs.azure.scale.test.list.performance.files>
  45. </properties>
  46. <build>
  47. <plugins>
  48. <plugin>
  49. <groupId>org.codehaus.mojo</groupId>
  50. <artifactId>findbugs-maven-plugin</artifactId>
  51. <configuration>
  52. <findbugsXmlOutput>true</findbugsXmlOutput>
  53. <xmlOutput>true</xmlOutput>
  54. <excludeFilterFile>${basedir}/dev-support/findbugs-exclude.xml
  55. </excludeFilterFile>
  56. <effort>Max</effort>
  57. </configuration>
  58. </plugin>
  59. <plugin>
  60. <groupId>org.apache.maven.plugins</groupId>
  61. <artifactId>maven-checkstyle-plugin</artifactId>
  62. <configuration>
  63. <!-- To run with the default Sun ruleset,
  64. comment out the configLocation line -->
  65. <configLocation>src/config/checkstyle.xml</configLocation>
  66. </configuration>
  67. </plugin>
  68. <plugin>
  69. <groupId>org.apache.maven.plugins</groupId>
  70. <artifactId>maven-jar-plugin</artifactId>
  71. <executions>
  72. <execution>
  73. <goals>
  74. <goal>test-jar</goal>
  75. </goals>
  76. </execution>
  77. </executions>
  78. </plugin>
  79. <plugin>
  80. <groupId>org.apache.maven.plugins</groupId>
  81. <artifactId>maven-dependency-plugin</artifactId>
  82. <executions>
  83. <execution>
  84. <id>deplist</id>
  85. <phase>compile</phase>
  86. <goals>
  87. <goal>list</goal>
  88. </goals>
  89. <configuration>
  90. <!-- build a shellprofile -->
  91. <outputFile>${project.basedir}/target/hadoop-tools-deps/${project.artifactId}.tools-optional.txt</outputFile>
  92. </configuration>
  93. </execution>
  94. </executions>
  95. </plugin>
  96. </plugins>
  97. <!--
  98. The following is to suppress a m2e warning in eclipse
  99. (m2e doesn't know how to handle maven-enforcer:enforce, so we have to tell m2e to ignore it)
  100. see: https://stackoverflow.com/questions/13040788/how-to-elimate-the-maven-enforcer-plugin-goal-enforce-is-ignored-by-m2e-wa
  101. -->
  102. <pluginManagement>
  103. <plugins>
  104. <plugin>
  105. <groupId>org.eclipse.m2e</groupId>
  106. <artifactId>lifecycle-mapping</artifactId>
  107. <version>1.0.0</version>
  108. <configuration>
  109. <lifecycleMappingMetadata>
  110. <pluginExecutions>
  111. <pluginExecution>
  112. <pluginExecutionFilter>
  113. <groupId>org.apache.maven.plugins</groupId>
  114. <artifactId>maven-enforcer-plugin</artifactId>
  115. <versionRange>[1.0.0,)</versionRange>
  116. <goals>
  117. <goal>enforce</goal>
  118. </goals>
  119. </pluginExecutionFilter>
  120. <action>
  121. <ignore />
  122. </action>
  123. </pluginExecution>
  124. </pluginExecutions>
  125. </lifecycleMappingMetadata>
  126. </configuration>
  127. </plugin>
  128. </plugins>
  129. </pluginManagement>
  130. </build>
  131. <!-- see hadoop-project/pom.xml for version number declarations -->
  132. <dependencies>
  133. <dependency>
  134. <groupId>org.apache.hadoop</groupId>
  135. <artifactId>hadoop-common</artifactId>
  136. <scope>compile</scope>
  137. </dependency>
  138. <dependency>
  139. <groupId>com.fasterxml.jackson.core</groupId>
  140. <artifactId>jackson-core</artifactId>
  141. <scope>compile</scope>
  142. </dependency>
  143. <dependency>
  144. <groupId>org.apache.httpcomponents</groupId>
  145. <artifactId>httpclient</artifactId>
  146. <scope>compile</scope>
  147. </dependency>
  148. <dependency>
  149. <groupId>com.microsoft.azure</groupId>
  150. <artifactId>azure-storage</artifactId>
  151. <scope>compile</scope>
  152. <exclusions>
  153. <exclusion>
  154. <groupId>org.apache.commons</groupId>
  155. <artifactId>commons-lang3</artifactId>
  156. </exclusion>
  157. </exclusions>
  158. </dependency>
  159. <dependency>
  160. <groupId>com.google.guava</groupId>
  161. <artifactId>guava</artifactId>
  162. <scope>compile</scope>
  163. </dependency>
  164. <dependency>
  165. <groupId>org.eclipse.jetty</groupId>
  166. <artifactId>jetty-util-ajax</artifactId>
  167. <scope>compile</scope>
  168. </dependency>
  169. <!-- dependencies use for test only -->
  170. <dependency>
  171. <groupId>commons-io</groupId>
  172. <artifactId>commons-io</artifactId>
  173. <scope>test</scope>
  174. </dependency>
  175. <dependency>
  176. <groupId>junit</groupId>
  177. <artifactId>junit</artifactId>
  178. <scope>test</scope>
  179. </dependency>
  180. <dependency>
  181. <groupId>org.apache.hadoop</groupId>
  182. <artifactId>hadoop-common</artifactId>
  183. <scope>test</scope>
  184. <type>test-jar</type>
  185. </dependency>
  186. <dependency>
  187. <groupId>org.apache.hadoop</groupId>
  188. <artifactId>hadoop-mapreduce-client-jobclient</artifactId>
  189. <scope>test</scope>
  190. </dependency>
  191. <dependency>
  192. <groupId>org.apache.hadoop</groupId>
  193. <artifactId>hadoop-distcp</artifactId>
  194. <scope>test</scope>
  195. </dependency>
  196. <dependency>
  197. <groupId>org.apache.hadoop</groupId>
  198. <artifactId>hadoop-distcp</artifactId>
  199. <scope>test</scope>
  200. <type>test-jar</type>
  201. </dependency>
  202. <dependency>
  203. <groupId>org.mockito</groupId>
  204. <artifactId>mockito-all</artifactId>
  205. <scope>test</scope>
  206. </dependency>
  207. <dependency>
  208. <groupId>com.fasterxml.jackson.core</groupId>
  209. <artifactId>jackson-databind</artifactId>
  210. </dependency>
  211. </dependencies>
  212. <profiles>
  213. <profile>
  214. <id>parallel-tests</id>
  215. <activation>
  216. <property>
  217. <name>parallel-tests</name>
  218. </property>
  219. </activation>
  220. <build>
  221. <plugins>
  222. <plugin>
  223. <artifactId>maven-antrun-plugin</artifactId>
  224. <executions>
  225. <execution>
  226. <id>create-parallel-tests-dirs</id>
  227. <phase>test-compile</phase>
  228. <configuration>
  229. <target>
  230. <script language="javascript"><![CDATA[
  231. var baseDirs = [
  232. project.getProperty("test.build.data"),
  233. project.getProperty("test.build.dir"),
  234. project.getProperty("hadoop.tmp.dir")
  235. ];
  236. for (var i in baseDirs) {
  237. for (var j = 1; j <= ${testsThreadCount}; ++j) {
  238. var mkdir = project.createTask("mkdir");
  239. mkdir.setDir(new java.io.File(baseDirs[i], j));
  240. mkdir.perform();
  241. }
  242. }
  243. ]]></script>
  244. </target>
  245. </configuration>
  246. <goals>
  247. <goal>run</goal>
  248. </goals>
  249. </execution>
  250. </executions>
  251. </plugin>
  252. <plugin>
  253. <groupId>org.apache.maven.plugins</groupId>
  254. <artifactId>maven-surefire-plugin</artifactId>
  255. <executions>
  256. <execution>
  257. <id>default-test</id>
  258. <goals>
  259. <goal>test</goal>
  260. </goals>
  261. <configuration>
  262. <forkCount>1</forkCount>
  263. <forkCount>${testsThreadCount}</forkCount>
  264. <reuseForks>false</reuseForks>
  265. <argLine>${maven-surefire-plugin.argLine} -DminiClusterDedicatedDirs=true</argLine>
  266. <forkedProcessTimeoutInSeconds>${fs.azure.scale.test.timeout}</forkedProcessTimeoutInSeconds>
  267. <systemPropertyVariables>
  268. <test.build.data>${test.build.data}/${surefire.forkNumber}</test.build.data>
  269. <test.build.dir>${test.build.dir}/${surefire.forkNumber}</test.build.dir>
  270. <hadoop.tmp.dir>${hadoop.tmp.dir}/${surefire.forkNumber}</hadoop.tmp.dir>
  271. <test.unique.fork.id>fork-${surefire.forkNumber}</test.unique.fork.id>
  272. <fs.azure.scale.test.enabled>${fs.azure.scale.test.enabled}</fs.azure.scale.test.enabled>
  273. <fs.azure.scale.test.huge.filesize>${fs.azure.scale.test.huge.filesize}</fs.azure.scale.test.huge.filesize>
  274. <fs.azure.scale.test.huge.huge.partitionsize>${fs.azure.scale.test.huge.partitionsize}</fs.azure.scale.test.huge.huge.partitionsize>
  275. <fs.azure.scale.test.timeout>${fs.azure.scale.test.timeout}</fs.azure.scale.test.timeout>
  276. <fs.azure.scale.test.list.performance.threads>${fs.azure.scale.test.list.performance.threads}</fs.azure.scale.test.list.performance.threads>
  277. <fs.azure.scale.test.list.performance.files>${fs.azure.scale.test.list.performance.files}</fs.azure.scale.test.list.performance.files>
  278. </systemPropertyVariables>
  279. <includes>
  280. <include>**/Test*.java</include>
  281. </includes>
  282. <excludes>
  283. <exclude>**/TestRollingWindowAverage*.java</exclude>
  284. </excludes>
  285. </configuration>
  286. </execution>
  287. <execution>
  288. <id>serialized-test</id>
  289. <goals>
  290. <goal>test</goal>
  291. </goals>
  292. <configuration>
  293. <forkCount>1</forkCount>
  294. <reuseForks>false</reuseForks>
  295. <argLine>${maven-surefire-plugin.argLine} -DminiClusterDedicatedDirs=true</argLine>
  296. <forkedProcessTimeoutInSeconds>${fs.azure.scale.test.timeout}</forkedProcessTimeoutInSeconds>
  297. <systemPropertyVariables>
  298. <test.build.data>${test.build.data}/${surefire.forkNumber}</test.build.data>
  299. <test.build.dir>${test.build.dir}/${surefire.forkNumber}</test.build.dir>
  300. <hadoop.tmp.dir>${hadoop.tmp.dir}/${surefire.forkNumber}</hadoop.tmp.dir>
  301. <test.unique.fork.id>fork-${surefire.forkNumber}</test.unique.fork.id>
  302. <fs.azure.scale.test.enabled>${fs.azure.scale.test.enabled}</fs.azure.scale.test.enabled>
  303. <fs.azure.scale.test.huge.filesize>${fs.azure.scale.test.huge.filesize}</fs.azure.scale.test.huge.filesize>
  304. <fs.azure.scale.test.huge.huge.partitionsize>${fs.azure.scale.test.huge.partitionsize}</fs.azure.scale.test.huge.huge.partitionsize>
  305. <fs.azure.scale.test.timeout>${fs.azure.scale.test.timeout}</fs.azure.scale.test.timeout>
  306. <fs.azure.scale.test.list.performance.threads>${fs.azure.scale.test.list.performance.threads}</fs.azure.scale.test.list.performance.threads>
  307. <fs.azure.scale.test.list.performance.files>${fs.azure.scale.test.list.performance.files}</fs.azure.scale.test.list.performance.files>
  308. </systemPropertyVariables>
  309. <includes>
  310. <include>**/TestRollingWindowAverage*.java</include>
  311. </includes>
  312. </configuration>
  313. </execution>
  314. </executions>
  315. </plugin>
  316. <plugin>
  317. <groupId>org.apache.maven.plugins</groupId>
  318. <artifactId>maven-failsafe-plugin</artifactId>
  319. <executions>
  320. <execution>
  321. <id>default-integration-test</id>
  322. <goals>
  323. <goal>integration-test</goal>
  324. <goal>verify</goal>
  325. </goals>
  326. <configuration>
  327. <forkCount>${testsThreadCount}</forkCount>
  328. <reuseForks>false</reuseForks>
  329. <argLine>${maven-surefire-plugin.argLine} -DminiClusterDedicatedDirs=true</argLine>
  330. <forkedProcessTimeoutInSeconds>${fs.azure.scale.test.timeout}</forkedProcessTimeoutInSeconds>
  331. <trimStackTrace>false</trimStackTrace>
  332. <systemPropertyVariables>
  333. <!-- Tell tests that they are being executed in parallel -->
  334. <test.parallel.execution>true</test.parallel.execution>
  335. <test.build.data>${test.build.data}/${surefire.forkNumber}</test.build.data>
  336. <test.build.dir>${test.build.dir}/${surefire.forkNumber}</test.build.dir>
  337. <hadoop.tmp.dir>${hadoop.tmp.dir}/${surefire.forkNumber}</hadoop.tmp.dir>
  338. <!-- Due to a Maven quirk, setting this to just -->
  339. <!-- surefire.forkNumber won't do the parameter -->
  340. <!-- substitution. Putting a prefix in front of it like -->
  341. <!-- "fork-" makes it work. -->
  342. <test.unique.fork.id>fork-${surefire.forkNumber}</test.unique.fork.id>
  343. <!-- Propagate scale parameters -->
  344. <fs.azure.scale.test.enabled>${fs.azure.scale.test.enabled}</fs.azure.scale.test.enabled>
  345. <fs.azure.scale.test.huge.filesize>${fs.azure.scale.test.huge.filesize}</fs.azure.scale.test.huge.filesize>
  346. <fs.azure.scale.test.huge.huge.partitionsize>${fs.azure.scale.test.huge.partitionsize}</fs.azure.scale.test.huge.huge.partitionsize>
  347. <fs.azure.scale.test.timeout>${fs.azure.scale.test.timeout}</fs.azure.scale.test.timeout>
  348. <fs.azure.scale.test.list.performance.threads>${fs.azure.scale.test.list.performance.threads}</fs.azure.scale.test.list.performance.threads>
  349. <fs.azure.scale.test.list.performance.files>${fs.azure.scale.test.list.performance.files}</fs.azure.scale.test.list.performance.files>
  350. </systemPropertyVariables>
  351. <!-- Some tests cannot run in parallel. Tests that cover -->
  352. <!-- access to the root directory must run in isolation -->
  353. <!-- from anything else that could modify the bucket. -->
  354. <!-- azure tests that cover multi-part upload must run in -->
  355. <!-- isolation, because the file system is configured to -->
  356. <!-- purge existing multi-part upload data on -->
  357. <!-- initialization. MiniYARNCluster has not yet been -->
  358. <!-- changed to handle parallel test execution gracefully. -->
  359. <!-- Exclude all of these tests from parallel execution, -->
  360. <!-- and instead run them sequentially in a separate -->
  361. <!-- Surefire execution step later. -->
  362. <includes>
  363. <include>**/ITest*.java</include>
  364. </includes>
  365. <excludes>
  366. <exclude>**/ITestFileSystemOperationsExceptionHandlingMultiThreaded.java</exclude>
  367. <exclude>**/ITestFileSystemOperationsWithThreads.java</exclude>
  368. <exclude>**/ITestOutOfBandAzureBlobOperationsLive.java</exclude>
  369. <exclude>**/ITestNativeAzureFileSystemAuthorizationWithOwner.java</exclude>
  370. <exclude>**/ITestNativeAzureFileSystemConcurrencyLive.java</exclude>
  371. <exclude>**/ITestNativeAzureFileSystemLive.java</exclude>
  372. <exclude>**/ITestNativeAzureFSPageBlobLive.java</exclude>
  373. <exclude>**/ITestWasbRemoteCallHelper.java</exclude>
  374. <exclude>**/ITestBlockBlobInputStream.java</exclude>
  375. </excludes>
  376. </configuration>
  377. </execution>
  378. <!-- Do a sequential run for tests that cannot handle -->
  379. <!-- parallel execution. -->
  380. <execution>
  381. <id>sequential-integration-tests</id>
  382. <goals>
  383. <goal>integration-test</goal>
  384. <goal>verify</goal>
  385. </goals>
  386. <configuration>
  387. <forkedProcessTimeoutInSeconds>${fs.azure.scale.test.timeout}</forkedProcessTimeoutInSeconds>
  388. <trimStackTrace>false</trimStackTrace>
  389. <systemPropertyVariables>
  390. <test.parallel.execution>false</test.parallel.execution>
  391. <fs.azure.scale.test.enabled>${fs.azure.scale.test.enabled}</fs.azure.scale.test.enabled>
  392. <fs.azure.scale.test.huge.filesize>${fs.azure.scale.test.huge.filesize}</fs.azure.scale.test.huge.filesize>
  393. <fs.azure.scale.test.huge.huge.partitionsize>${fs.azure.scale.test.huge.partitionsize}</fs.azure.scale.test.huge.huge.partitionsize>
  394. <fs.azure.scale.test.timeout>${fs.azure.scale.test.timeout}</fs.azure.scale.test.timeout>
  395. <fs.azure.scale.test.list.performance.threads>${fs.azure.scale.test.list.performance.threads}</fs.azure.scale.test.list.performance.threads>
  396. <fs.azure.scale.test.list.performance.files>${fs.azure.scale.test.list.performance.files}</fs.azure.scale.test.list.performance.files>
  397. </systemPropertyVariables>
  398. <includes>
  399. <include>**/ITestFileSystemOperationsExceptionHandlingMultiThreaded.java</include>
  400. <include>**/ITestFileSystemOperationsWithThreads.java</include>
  401. <include>**/ITestOutOfBandAzureBlobOperationsLive.java</include>
  402. <include>**/ITestNativeAzureFileSystemAuthorizationWithOwner.java</include>
  403. <include>**/ITestNativeAzureFileSystemConcurrencyLive.java</include>
  404. <include>**/ITestNativeAzureFileSystemLive.java</include>
  405. <include>**/ITestWasbRemoteCallHelper.java</include>
  406. <include>**/ITestBlockBlobInputStream.java</include>
  407. </includes>
  408. </configuration>
  409. </execution>
  410. </executions>
  411. </plugin>
  412. </plugins>
  413. </build>
  414. </profile>
  415. <profile>
  416. <id>sequential-tests</id>
  417. <activation>
  418. <property>
  419. <name>!parallel-tests</name>
  420. </property>
  421. </activation>
  422. <build>
  423. <plugins>
  424. <plugin>
  425. <groupId>org.apache.maven.plugins</groupId>
  426. <artifactId>maven-failsafe-plugin</artifactId>
  427. <executions>
  428. <execution>
  429. <goals>
  430. <goal>integration-test</goal>
  431. <goal>verify</goal>
  432. </goals>
  433. <configuration>
  434. <systemPropertyVariables>
  435. <!-- Propagate scale parameters -->
  436. <fs.azure.scale.test.enabled>${fs.azure.scale.test.enabled}</fs.azure.scale.test.enabled>
  437. <fs.azure.scale.test.huge.filesize>${fs.azure.scale.test.huge.filesize}</fs.azure.scale.test.huge.filesize>
  438. <fs.azure.scale.test.timeout>${fs.azure.scale.test.timeout}</fs.azure.scale.test.timeout>
  439. <fs.azure.scale.test.list.performance.threads>${fs.azure.scale.test.list.performance.threads}</fs.azure.scale.test.list.performance.threads>
  440. <fs.azure.scale.test.list.performance.files>${fs.azure.scale.test.list.performance.files}</fs.azure.scale.test.list.performance.files>
  441. </systemPropertyVariables>
  442. <forkedProcessTimeoutInSeconds>${fs.azure.scale.test.timeout}</forkedProcessTimeoutInSeconds>
  443. <trimStackTrace>false</trimStackTrace>
  444. </configuration>
  445. </execution>
  446. </executions>
  447. </plugin>
  448. </plugins>
  449. </build>
  450. </profile>
  451. <!-- Turn on scale tests-->
  452. <profile>
  453. <id>scale</id>
  454. <activation>
  455. <property>
  456. <name>scale</name>
  457. </property>
  458. </activation>
  459. <properties>
  460. <fs.azure.scale.test.enabled>true</fs.azure.scale.test.enabled>
  461. </properties>
  462. </profile>
  463. </profiles>
  464. </project>