pom.xml 22 KB

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