pom.xml 43 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906
  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.4.0-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. <suppressionsLocation>src/config/checkstyle-suppressions.xml</suppressionsLocation>
  67. </configuration>
  68. </plugin>
  69. <plugin>
  70. <groupId>org.apache.maven.plugins</groupId>
  71. <artifactId>maven-jar-plugin</artifactId>
  72. <executions>
  73. <execution>
  74. <goals>
  75. <goal>test-jar</goal>
  76. </goals>
  77. </execution>
  78. </executions>
  79. </plugin>
  80. <plugin>
  81. <groupId>org.apache.maven.plugins</groupId>
  82. <artifactId>maven-dependency-plugin</artifactId>
  83. <executions>
  84. <execution>
  85. <id>deplist</id>
  86. <phase>compile</phase>
  87. <goals>
  88. <goal>list</goal>
  89. </goals>
  90. <configuration>
  91. <!-- build a shellprofile -->
  92. <outputFile>${project.basedir}/target/hadoop-tools-deps/${project.artifactId}.tools-optional.txt</outputFile>
  93. </configuration>
  94. </execution>
  95. </executions>
  96. </plugin>
  97. </plugins>
  98. <!--
  99. The following is to suppress a m2e warning in eclipse
  100. (m2e doesn't know how to handle maven-enforcer:enforce, so we have to tell m2e to ignore it)
  101. see: https://stackoverflow.com/questions/13040788/how-to-elimate-the-maven-enforcer-plugin-goal-enforce-is-ignored-by-m2e-wa
  102. -->
  103. <pluginManagement>
  104. <plugins>
  105. <plugin>
  106. <groupId>org.eclipse.m2e</groupId>
  107. <artifactId>lifecycle-mapping</artifactId>
  108. <version>1.0.0</version>
  109. <configuration>
  110. <lifecycleMappingMetadata>
  111. <pluginExecutions>
  112. <pluginExecution>
  113. <pluginExecutionFilter>
  114. <groupId>org.apache.maven.plugins</groupId>
  115. <artifactId>maven-enforcer-plugin</artifactId>
  116. <versionRange>[1.0.0,)</versionRange>
  117. <goals>
  118. <goal>enforce</goal>
  119. </goals>
  120. </pluginExecutionFilter>
  121. <action>
  122. <ignore />
  123. </action>
  124. </pluginExecution>
  125. </pluginExecutions>
  126. </lifecycleMappingMetadata>
  127. </configuration>
  128. </plugin>
  129. </plugins>
  130. </pluginManagement>
  131. </build>
  132. <!-- see hadoop-project/pom.xml for version number declarations -->
  133. <dependencies>
  134. <dependency>
  135. <groupId>org.apache.hadoop</groupId>
  136. <artifactId>hadoop-common</artifactId>
  137. <scope>provided</scope>
  138. </dependency>
  139. <dependency>
  140. <groupId>org.apache.httpcomponents</groupId>
  141. <artifactId>httpclient</artifactId>
  142. <scope>compile</scope>
  143. </dependency>
  144. <dependency>
  145. <groupId>com.microsoft.azure</groupId>
  146. <artifactId>azure-storage</artifactId>
  147. <scope>compile</scope>
  148. <exclusions>
  149. <exclusion>
  150. <groupId>org.apache.commons</groupId>
  151. <artifactId>commons-lang3</artifactId>
  152. </exclusion>
  153. </exclusions>
  154. </dependency>
  155. <dependency>
  156. <groupId>com.google.guava</groupId>
  157. <artifactId>guava</artifactId>
  158. </dependency>
  159. <dependency>
  160. <groupId>org.eclipse.jetty</groupId>
  161. <artifactId>jetty-util-ajax</artifactId>
  162. <scope>compile</scope>
  163. </dependency>
  164. <dependency>
  165. <groupId>org.codehaus.jackson</groupId>
  166. <artifactId>jackson-mapper-asl</artifactId>
  167. <scope>compile</scope>
  168. </dependency>
  169. <dependency>
  170. <groupId>org.codehaus.jackson</groupId>
  171. <artifactId>jackson-core-asl</artifactId>
  172. <scope>compile</scope>
  173. </dependency>
  174. <dependency>
  175. <groupId>org.wildfly.openssl</groupId>
  176. <artifactId>wildfly-openssl</artifactId>
  177. <scope>compile</scope>
  178. </dependency>
  179. <!--com.fasterxml.jackson is used by WASB, not ABFS-->
  180. <!--transitive dependency from Azure SDK-->
  181. <dependency>
  182. <groupId>com.fasterxml.jackson.core</groupId>
  183. <artifactId>jackson-core</artifactId>
  184. <scope>provided</scope>
  185. </dependency>
  186. <!--transitive dependency from hadoop-common-->
  187. <dependency>
  188. <groupId>com.fasterxml.jackson.core</groupId>
  189. <artifactId>jackson-databind</artifactId>
  190. <scope>provided</scope>
  191. </dependency>
  192. <!-- dependencies use for test only -->
  193. <dependency>
  194. <groupId>junit</groupId>
  195. <artifactId>junit</artifactId>
  196. <scope>test</scope>
  197. </dependency>
  198. <dependency>
  199. <groupId>org.apache.hadoop</groupId>
  200. <artifactId>hadoop-common</artifactId>
  201. <scope>test</scope>
  202. <type>test-jar</type>
  203. </dependency>
  204. <dependency>
  205. <groupId>org.apache.hadoop</groupId>
  206. <artifactId>hadoop-mapreduce-client-jobclient</artifactId>
  207. <scope>test</scope>
  208. </dependency>
  209. <dependency>
  210. <groupId>org.apache.hadoop</groupId>
  211. <artifactId>hadoop-distcp</artifactId>
  212. <scope>test</scope>
  213. </dependency>
  214. <dependency>
  215. <groupId>org.apache.hadoop</groupId>
  216. <artifactId>hadoop-distcp</artifactId>
  217. <scope>test</scope>
  218. <type>test-jar</type>
  219. </dependency>
  220. <dependency>
  221. <groupId>log4j</groupId>
  222. <artifactId>log4j</artifactId>
  223. <scope>test</scope>
  224. </dependency>
  225. <dependency>
  226. <groupId>javax.ws.rs</groupId>
  227. <artifactId>jsr311-api</artifactId>
  228. <scope>test</scope>
  229. </dependency>
  230. <dependency>
  231. <groupId>org.mockito</groupId>
  232. <artifactId>mockito-core</artifactId>
  233. <scope>test</scope>
  234. </dependency>
  235. <dependency>
  236. <groupId>org.apache.hadoop</groupId>
  237. <artifactId>hadoop-minikdc</artifactId>
  238. <scope>test</scope>
  239. </dependency>
  240. <!-- Used to create SSL certs for a secure Keystore -->
  241. <dependency>
  242. <groupId>org.bouncycastle</groupId>
  243. <artifactId>bcprov-jdk15on</artifactId>
  244. <scope>test</scope>
  245. </dependency>
  246. <dependency>
  247. <groupId>org.bouncycastle</groupId>
  248. <artifactId>bcpkix-jdk15on</artifactId>
  249. <scope>test</scope>
  250. </dependency>
  251. <dependency>
  252. <groupId>org.assertj</groupId>
  253. <artifactId>assertj-core</artifactId>
  254. <scope>test</scope>
  255. </dependency>
  256. <dependency>
  257. <groupId>org.hamcrest</groupId>
  258. <artifactId>hamcrest-library</artifactId>
  259. <scope>test</scope>
  260. </dependency>
  261. </dependencies>
  262. <profiles>
  263. <profile>
  264. <id>parallel-tests-wasb</id>
  265. <activation>
  266. <property>
  267. <name>parallel-tests</name>
  268. <value>wasb</value>
  269. </property>
  270. </activation>
  271. <build>
  272. <plugins>
  273. <plugin>
  274. <artifactId>maven-antrun-plugin</artifactId>
  275. <executions>
  276. <execution>
  277. <id>create-parallel-tests-dirs</id>
  278. <phase>test-compile</phase>
  279. <configuration>
  280. <target>
  281. <script language="javascript"><![CDATA[
  282. var baseDirs = [
  283. project.getProperty("test.build.data"),
  284. project.getProperty("test.build.dir"),
  285. project.getProperty("hadoop.tmp.dir")
  286. ];
  287. for (var i in baseDirs) {
  288. for (var j = 1; j <= ${testsThreadCount}; ++j) {
  289. var mkdir = project.createTask("mkdir");
  290. mkdir.setDir(new java.io.File(baseDirs[i], j));
  291. mkdir.perform();
  292. }
  293. }
  294. ]]></script>
  295. </target>
  296. </configuration>
  297. <goals>
  298. <goal>run</goal>
  299. </goals>
  300. </execution>
  301. </executions>
  302. </plugin>
  303. <plugin>
  304. <groupId>org.apache.maven.plugins</groupId>
  305. <artifactId>maven-surefire-plugin</artifactId>
  306. <executions>
  307. <execution>
  308. <id>default-test</id>
  309. <goals>
  310. <goal>test</goal>
  311. </goals>
  312. <configuration>
  313. <forkCount>1</forkCount>
  314. <forkCount>${testsThreadCount}</forkCount>
  315. <reuseForks>false</reuseForks>
  316. <argLine>${maven-surefire-plugin.argLine} -DminiClusterDedicatedDirs=true</argLine>
  317. <forkedProcessTimeoutInSeconds>${fs.azure.scale.test.timeout}</forkedProcessTimeoutInSeconds>
  318. <systemPropertyVariables>
  319. <test.build.data>${test.build.data}/${surefire.forkNumber}</test.build.data>
  320. <test.build.dir>${test.build.dir}/${surefire.forkNumber}</test.build.dir>
  321. <hadoop.tmp.dir>${hadoop.tmp.dir}/${surefire.forkNumber}</hadoop.tmp.dir>
  322. <test.unique.fork.id>fork-${surefire.forkNumber}</test.unique.fork.id>
  323. <fs.azure.scale.test.enabled>${fs.azure.scale.test.enabled}</fs.azure.scale.test.enabled>
  324. <fs.azure.scale.test.huge.filesize>${fs.azure.scale.test.huge.filesize}</fs.azure.scale.test.huge.filesize>
  325. <fs.azure.scale.test.huge.huge.partitionsize>${fs.azure.scale.test.huge.partitionsize}</fs.azure.scale.test.huge.huge.partitionsize>
  326. <fs.azure.scale.test.timeout>${fs.azure.scale.test.timeout}</fs.azure.scale.test.timeout>
  327. <fs.azure.scale.test.list.performance.threads>${fs.azure.scale.test.list.performance.threads}</fs.azure.scale.test.list.performance.threads>
  328. <fs.azure.scale.test.list.performance.files>${fs.azure.scale.test.list.performance.files}</fs.azure.scale.test.list.performance.files>
  329. </systemPropertyVariables>
  330. <includes>
  331. <include>**/azure/Test*.java</include>
  332. <include>**/azure/**/Test*.java</include>
  333. </includes>
  334. <excludes>
  335. <exclude>**/azure/**/TestRollingWindowAverage*.java</exclude>
  336. </excludes>
  337. </configuration>
  338. </execution>
  339. <execution>
  340. <id>serialized-test-wasb</id>
  341. <goals>
  342. <goal>test</goal>
  343. </goals>
  344. <configuration>
  345. <forkCount>1</forkCount>
  346. <reuseForks>false</reuseForks>
  347. <argLine>${maven-surefire-plugin.argLine} -DminiClusterDedicatedDirs=true</argLine>
  348. <forkedProcessTimeoutInSeconds>${fs.azure.scale.test.timeout}</forkedProcessTimeoutInSeconds>
  349. <systemPropertyVariables>
  350. <test.build.data>${test.build.data}/${surefire.forkNumber}</test.build.data>
  351. <test.build.dir>${test.build.dir}/${surefire.forkNumber}</test.build.dir>
  352. <hadoop.tmp.dir>${hadoop.tmp.dir}/${surefire.forkNumber}</hadoop.tmp.dir>
  353. <test.unique.fork.id>fork-${surefire.forkNumber}</test.unique.fork.id>
  354. <fs.azure.scale.test.enabled>${fs.azure.scale.test.enabled}</fs.azure.scale.test.enabled>
  355. <fs.azure.scale.test.huge.filesize>${fs.azure.scale.test.huge.filesize}</fs.azure.scale.test.huge.filesize>
  356. <fs.azure.scale.test.huge.huge.partitionsize>${fs.azure.scale.test.huge.partitionsize}</fs.azure.scale.test.huge.huge.partitionsize>
  357. <fs.azure.scale.test.timeout>${fs.azure.scale.test.timeout}</fs.azure.scale.test.timeout>
  358. <fs.azure.scale.test.list.performance.threads>${fs.azure.scale.test.list.performance.threads}</fs.azure.scale.test.list.performance.threads>
  359. <fs.azure.scale.test.list.performance.files>${fs.azure.scale.test.list.performance.files}</fs.azure.scale.test.list.performance.files>
  360. </systemPropertyVariables>
  361. <includes>
  362. <include>**/azure/**/TestRollingWindowAverage*.java</include>
  363. </includes>
  364. </configuration>
  365. </execution>
  366. </executions>
  367. </plugin>
  368. <plugin>
  369. <groupId>org.apache.maven.plugins</groupId>
  370. <artifactId>maven-failsafe-plugin</artifactId>
  371. <executions>
  372. <execution>
  373. <id>default-integration-test-wasb</id>
  374. <goals>
  375. <goal>integration-test</goal>
  376. <goal>verify</goal>
  377. </goals>
  378. <configuration>
  379. <forkCount>1</forkCount>
  380. <forkCount>${testsThreadCount}</forkCount>
  381. <reuseForks>false</reuseForks>
  382. <argLine>${maven-surefire-plugin.argLine} -DminiClusterDedicatedDirs=true</argLine>
  383. <forkedProcessTimeoutInSeconds>${fs.azure.scale.test.timeout}</forkedProcessTimeoutInSeconds>
  384. <trimStackTrace>false</trimStackTrace>
  385. <systemPropertyVariables>
  386. <!-- Tell tests that they are being executed in parallel -->
  387. <test.parallel.execution>true</test.parallel.execution>
  388. <test.build.data>${test.build.data}/${surefire.forkNumber}</test.build.data>
  389. <test.build.dir>${test.build.dir}/${surefire.forkNumber}</test.build.dir>
  390. <hadoop.tmp.dir>${hadoop.tmp.dir}/${surefire.forkNumber}</hadoop.tmp.dir>
  391. <!-- Due to a Maven quirk, setting this to just -->
  392. <!-- surefire.forkNumber won't do the parameter -->
  393. <!-- substitution. Putting a prefix in front of it like -->
  394. <!-- "fork-" makes it work. -->
  395. <test.unique.fork.id>fork-${surefire.forkNumber}</test.unique.fork.id>
  396. <!-- Propagate scale parameters -->
  397. <fs.azure.scale.test.enabled>${fs.azure.scale.test.enabled}</fs.azure.scale.test.enabled>
  398. <fs.azure.scale.test.huge.filesize>${fs.azure.scale.test.huge.filesize}</fs.azure.scale.test.huge.filesize>
  399. <fs.azure.scale.test.huge.huge.partitionsize>${fs.azure.scale.test.huge.partitionsize}</fs.azure.scale.test.huge.huge.partitionsize>
  400. <fs.azure.scale.test.timeout>${fs.azure.scale.test.timeout}</fs.azure.scale.test.timeout>
  401. <fs.azure.scale.test.list.performance.threads>${fs.azure.scale.test.list.performance.threads}</fs.azure.scale.test.list.performance.threads>
  402. <fs.azure.scale.test.list.performance.files>${fs.azure.scale.test.list.performance.files}</fs.azure.scale.test.list.performance.files>
  403. </systemPropertyVariables>
  404. <!-- Some tests cannot run in parallel-->
  405. <includes>
  406. <include>**/azure/ITest*.java</include>
  407. <include>**/azure/**/ITest*.java</include>
  408. </includes>
  409. <excludes>
  410. <exclude>**/azure/ITestNativeFileSystemStatistics.java</exclude>
  411. </excludes>
  412. </configuration>
  413. </execution>
  414. <!-- Do a sequential run for tests that cannot handle -->
  415. <!-- parallel execution. -->
  416. <execution>
  417. <id>sequential-integration-tests-wasb</id>
  418. <goals>
  419. <goal>integration-test</goal>
  420. <goal>verify</goal>
  421. </goals>
  422. <configuration>
  423. <forkedProcessTimeoutInSeconds>${fs.azure.scale.test.timeout}</forkedProcessTimeoutInSeconds>
  424. <trimStackTrace>false</trimStackTrace>
  425. <systemPropertyVariables>
  426. <test.parallel.execution>false</test.parallel.execution>
  427. <fs.azure.scale.test.enabled>${fs.azure.scale.test.enabled}</fs.azure.scale.test.enabled>
  428. <fs.azure.scale.test.huge.filesize>${fs.azure.scale.test.huge.filesize}</fs.azure.scale.test.huge.filesize>
  429. <fs.azure.scale.test.huge.huge.partitionsize>${fs.azure.scale.test.huge.partitionsize}</fs.azure.scale.test.huge.huge.partitionsize>
  430. <fs.azure.scale.test.timeout>${fs.azure.scale.test.timeout}</fs.azure.scale.test.timeout>
  431. <fs.azure.scale.test.list.performance.threads>${fs.azure.scale.test.list.performance.threads}</fs.azure.scale.test.list.performance.threads>
  432. <fs.azure.scale.test.list.performance.files>${fs.azure.scale.test.list.performance.files}</fs.azure.scale.test.list.performance.files>
  433. </systemPropertyVariables>
  434. <includes>
  435. <include>**/azure/ITestNativeFileSystemStatistics.java</include>
  436. </includes>
  437. </configuration>
  438. </execution>
  439. </executions>
  440. </plugin>
  441. </plugins>
  442. </build>
  443. </profile>
  444. <profile>
  445. <id>parallel-tests-abfs</id>
  446. <activation>
  447. <property>
  448. <name>parallel-tests</name>
  449. <value>abfs</value>
  450. </property>
  451. </activation>
  452. <build>
  453. <plugins>
  454. <plugin>
  455. <artifactId>maven-antrun-plugin</artifactId>
  456. <executions>
  457. <execution>
  458. <id>create-parallel-tests-dirs</id>
  459. <phase>test-compile</phase>
  460. <configuration>
  461. <target>
  462. <script language="javascript"><![CDATA[
  463. var baseDirs = [
  464. project.getProperty("test.build.data"),
  465. project.getProperty("test.build.dir"),
  466. project.getProperty("hadoop.tmp.dir")
  467. ];
  468. for (var i in baseDirs) {
  469. for (var j = 1; j <= ${testsThreadCount}; ++j) {
  470. var mkdir = project.createTask("mkdir");
  471. mkdir.setDir(new java.io.File(baseDirs[i], j));
  472. mkdir.perform();
  473. }
  474. }
  475. ]]></script>
  476. </target>
  477. </configuration>
  478. <goals>
  479. <goal>run</goal>
  480. </goals>
  481. </execution>
  482. </executions>
  483. </plugin>
  484. <plugin>
  485. <groupId>org.apache.maven.plugins</groupId>
  486. <artifactId>maven-surefire-plugin</artifactId>
  487. <executions>
  488. <execution>
  489. <id>default-test</id>
  490. <goals>
  491. <goal>test</goal>
  492. </goals>
  493. <configuration>
  494. <forkCount>${testsThreadCount}</forkCount>
  495. <reuseForks>false</reuseForks>
  496. <argLine>${maven-surefire-plugin.argLine} -DminiClusterDedicatedDirs=true</argLine>
  497. <forkedProcessTimeoutInSeconds>${fs.azure.scale.test.timeout}</forkedProcessTimeoutInSeconds>
  498. <systemPropertyVariables>
  499. <test.build.data>${test.build.data}/${surefire.forkNumber}</test.build.data>
  500. <test.build.dir>${test.build.dir}/${surefire.forkNumber}</test.build.dir>
  501. <hadoop.tmp.dir>${hadoop.tmp.dir}/${surefire.forkNumber}</hadoop.tmp.dir>
  502. <test.unique.fork.id>fork-${surefire.forkNumber}</test.unique.fork.id>
  503. <fs.azure.scale.test.enabled>${fs.azure.scale.test.enabled}</fs.azure.scale.test.enabled>
  504. <fs.azure.scale.test.huge.filesize>${fs.azure.scale.test.huge.filesize}</fs.azure.scale.test.huge.filesize>
  505. <fs.azure.scale.test.huge.huge.partitionsize>${fs.azure.scale.test.huge.partitionsize}</fs.azure.scale.test.huge.huge.partitionsize>
  506. <fs.azure.scale.test.timeout>${fs.azure.scale.test.timeout}</fs.azure.scale.test.timeout>
  507. <fs.azure.scale.test.list.performance.threads>${fs.azure.scale.test.list.performance.threads}</fs.azure.scale.test.list.performance.threads>
  508. <fs.azure.scale.test.list.performance.files>${fs.azure.scale.test.list.performance.files}</fs.azure.scale.test.list.performance.files>
  509. </systemPropertyVariables>
  510. <includes>
  511. <include>**/azurebfs/Test*.java</include>
  512. <include>**/azurebfs/**/Test*.java</include>
  513. </includes>
  514. </configuration>
  515. </execution>
  516. </executions>
  517. </plugin>
  518. <plugin>
  519. <groupId>org.apache.maven.plugins</groupId>
  520. <artifactId>maven-failsafe-plugin</artifactId>
  521. <executions>
  522. <execution>
  523. <id>integration-test-abfs-parallel-classesAndMethods</id>
  524. <goals>
  525. <goal>integration-test</goal>
  526. <goal>verify</goal>
  527. </goals>
  528. <configuration>
  529. <forkCount>${testsThreadCount}</forkCount>
  530. <reuseForks>true</reuseForks>
  531. <parallel>both</parallel>
  532. <threadCount>${testsThreadCount}</threadCount>
  533. <argLine>${maven-surefire-plugin.argLine} -DminiClusterDedicatedDirs=true</argLine>
  534. <forkedProcessTimeoutInSeconds>${fs.azure.scale.test.timeout}</forkedProcessTimeoutInSeconds>
  535. <trimStackTrace>false</trimStackTrace>
  536. <systemPropertyVariables>
  537. <!-- Tell tests that they are being executed in parallel -->
  538. <test.parallel.execution>true</test.parallel.execution>
  539. <test.build.data>${test.build.data}/${surefire.forkNumber}</test.build.data>
  540. <test.build.dir>${test.build.dir}/${surefire.forkNumber}</test.build.dir>
  541. <hadoop.tmp.dir>${hadoop.tmp.dir}/${surefire.forkNumber}</hadoop.tmp.dir>
  542. <!-- Due to a Maven quirk, setting this to just -->
  543. <!-- surefire.forkNumber won't do the parameter -->
  544. <!-- substitution. Putting a prefix in front of it like -->
  545. <!-- "fork-" makes it work. -->
  546. <test.unique.fork.id>fork-${surefire.forkNumber}</test.unique.fork.id>
  547. <!-- Propagate scale parameters -->
  548. <fs.azure.scale.test.enabled>${fs.azure.scale.test.enabled}</fs.azure.scale.test.enabled>
  549. <fs.azure.scale.test.timeout>${fs.azure.scale.test.timeout}</fs.azure.scale.test.timeout>
  550. </systemPropertyVariables>
  551. <includes>
  552. <include>**/azurebfs/ITest*.java</include>
  553. <include>**/azurebfs/**/ITest*.java</include>
  554. </includes>
  555. <excludes>
  556. <exclude>**/azurebfs/contract/ITest*.java</exclude>
  557. <exclude>**/azurebfs/ITestAzureBlobFileSystemE2EScale.java</exclude>
  558. <exclude>**/azurebfs/ITestAbfsReadWriteAndSeek.java</exclude>
  559. <exclude>**/azurebfs/ITestAzureBlobFileSystemListStatus.java</exclude>
  560. <exclude>**/azurebfs/extensions/ITestAbfsDelegationTokens.java</exclude>
  561. </excludes>
  562. </configuration>
  563. </execution>
  564. <execution>
  565. <id>integration-test-abfs-parallel-classes</id>
  566. <goals>
  567. <goal>integration-test</goal>
  568. <goal>verify</goal>
  569. </goals>
  570. <configuration>
  571. <forkCount>${testsThreadCount}</forkCount>
  572. <reuseForks>false</reuseForks>
  573. <!--NOTICE: hadoop contract tests methods can not be ran in parallel-->
  574. <argLine>${maven-surefire-plugin.argLine} -DminiClusterDedicatedDirs=true</argLine>
  575. <forkedProcessTimeoutInSeconds>${fs.azure.scale.test.timeout}</forkedProcessTimeoutInSeconds>
  576. <trimStackTrace>false</trimStackTrace>
  577. <systemPropertyVariables>
  578. <!-- Tell tests that they are being executed in parallel -->
  579. <test.parallel.execution>true</test.parallel.execution>
  580. <test.build.data>${test.build.data}/${surefire.forkNumber}</test.build.data>
  581. <test.build.dir>${test.build.dir}/${surefire.forkNumber}</test.build.dir>
  582. <hadoop.tmp.dir>${hadoop.tmp.dir}/${surefire.forkNumber}</hadoop.tmp.dir>
  583. <!-- Due to a Maven quirk, setting this to just -->
  584. <!-- surefire.forkNumber won't do the parameter -->
  585. <!-- substitution. Putting a prefix in front of it like -->
  586. <!-- "fork-" makes it work. -->
  587. <test.unique.fork.id>fork-${surefire.forkNumber}</test.unique.fork.id>
  588. <!-- Propagate scale parameters -->
  589. <fs.azure.scale.test.enabled>${fs.azure.scale.test.enabled}</fs.azure.scale.test.enabled>
  590. <fs.azure.scale.test.timeout>${fs.azure.scale.test.timeout}</fs.azure.scale.test.timeout>
  591. </systemPropertyVariables>
  592. <includes>
  593. <include>**/azurebfs/contract/ITest*.java</include>
  594. <include>**/azurebfs/ITestAzureBlobFileSystemE2EScale.java</include>
  595. <include>**/azurebfs/ITestAbfsReadWriteAndSeek.java</include>
  596. <include>**/azurebfs/ITestAzureBlobFileSystemListStatus.java</include>
  597. <include>**/azurebfs/extensions/ITestAbfsDelegationTokens.java</include>
  598. </includes>
  599. </configuration>
  600. </execution>
  601. </executions>
  602. </plugin>
  603. </plugins>
  604. </build>
  605. </profile>
  606. <profile>
  607. <id>parallel-tests</id>
  608. <activation>
  609. <property>
  610. <name>parallel-tests</name>
  611. <value>both</value>
  612. </property>
  613. </activation>
  614. <build>
  615. <plugins>
  616. <plugin>
  617. <artifactId>maven-antrun-plugin</artifactId>
  618. <executions>
  619. <execution>
  620. <id>create-parallel-tests-dirs</id>
  621. <phase>test-compile</phase>
  622. <configuration>
  623. <target>
  624. <script language="javascript"><![CDATA[
  625. var baseDirs = [
  626. project.getProperty("test.build.data"),
  627. project.getProperty("test.build.dir"),
  628. project.getProperty("hadoop.tmp.dir")
  629. ];
  630. for (var i in baseDirs) {
  631. for (var j = 1; j <= ${testsThreadCount}; ++j) {
  632. var mkdir = project.createTask("mkdir");
  633. mkdir.setDir(new java.io.File(baseDirs[i], j));
  634. mkdir.perform();
  635. }
  636. }
  637. ]]></script>
  638. </target>
  639. </configuration>
  640. <goals>
  641. <goal>run</goal>
  642. </goals>
  643. </execution>
  644. </executions>
  645. </plugin>
  646. <plugin>
  647. <groupId>org.apache.maven.plugins</groupId>
  648. <artifactId>maven-surefire-plugin</artifactId>
  649. <executions>
  650. <execution>
  651. <id>default-test</id>
  652. <goals>
  653. <goal>test</goal>
  654. </goals>
  655. <configuration>
  656. <forkCount>1</forkCount>
  657. <forkCount>${testsThreadCount}</forkCount>
  658. <reuseForks>false</reuseForks>
  659. <argLine>${maven-surefire-plugin.argLine} -DminiClusterDedicatedDirs=true</argLine>
  660. <forkedProcessTimeoutInSeconds>${fs.azure.scale.test.timeout}</forkedProcessTimeoutInSeconds>
  661. <systemPropertyVariables>
  662. <test.build.data>${test.build.data}/${surefire.forkNumber}</test.build.data>
  663. <test.build.dir>${test.build.dir}/${surefire.forkNumber}</test.build.dir>
  664. <hadoop.tmp.dir>${hadoop.tmp.dir}/${surefire.forkNumber}</hadoop.tmp.dir>
  665. <test.unique.fork.id>fork-${surefire.forkNumber}</test.unique.fork.id>
  666. <fs.azure.scale.test.enabled>${fs.azure.scale.test.enabled}</fs.azure.scale.test.enabled>
  667. <fs.azure.scale.test.huge.filesize>${fs.azure.scale.test.huge.filesize}</fs.azure.scale.test.huge.filesize>
  668. <fs.azure.scale.test.huge.huge.partitionsize>${fs.azure.scale.test.huge.partitionsize}</fs.azure.scale.test.huge.huge.partitionsize>
  669. <fs.azure.scale.test.timeout>${fs.azure.scale.test.timeout}</fs.azure.scale.test.timeout>
  670. <fs.azure.scale.test.list.performance.threads>${fs.azure.scale.test.list.performance.threads}</fs.azure.scale.test.list.performance.threads>
  671. <fs.azure.scale.test.list.performance.files>${fs.azure.scale.test.list.performance.files}</fs.azure.scale.test.list.performance.files>
  672. </systemPropertyVariables>
  673. <includes>
  674. <include>**/Test*.java</include>
  675. </includes>
  676. <excludes>
  677. <exclude>**/TestRollingWindowAverage*.java</exclude>
  678. </excludes>
  679. </configuration>
  680. </execution>
  681. <execution>
  682. <id>serialized-test</id>
  683. <goals>
  684. <goal>test</goal>
  685. </goals>
  686. <configuration>
  687. <forkCount>1</forkCount>
  688. <reuseForks>false</reuseForks>
  689. <argLine>${maven-surefire-plugin.argLine} -DminiClusterDedicatedDirs=true</argLine>
  690. <forkedProcessTimeoutInSeconds>${fs.azure.scale.test.timeout}</forkedProcessTimeoutInSeconds>
  691. <systemPropertyVariables>
  692. <test.build.data>${test.build.data}/${surefire.forkNumber}</test.build.data>
  693. <test.build.dir>${test.build.dir}/${surefire.forkNumber}</test.build.dir>
  694. <hadoop.tmp.dir>${hadoop.tmp.dir}/${surefire.forkNumber}</hadoop.tmp.dir>
  695. <test.unique.fork.id>fork-${surefire.forkNumber}</test.unique.fork.id>
  696. <fs.azure.scale.test.enabled>${fs.azure.scale.test.enabled}</fs.azure.scale.test.enabled>
  697. <fs.azure.scale.test.huge.filesize>${fs.azure.scale.test.huge.filesize}</fs.azure.scale.test.huge.filesize>
  698. <fs.azure.scale.test.huge.huge.partitionsize>${fs.azure.scale.test.huge.partitionsize}</fs.azure.scale.test.huge.huge.partitionsize>
  699. <fs.azure.scale.test.timeout>${fs.azure.scale.test.timeout}</fs.azure.scale.test.timeout>
  700. <fs.azure.scale.test.list.performance.threads>${fs.azure.scale.test.list.performance.threads}</fs.azure.scale.test.list.performance.threads>
  701. <fs.azure.scale.test.list.performance.files>${fs.azure.scale.test.list.performance.files}</fs.azure.scale.test.list.performance.files>
  702. </systemPropertyVariables>
  703. <includes>
  704. <include>**/TestRollingWindowAverage*.java</include>
  705. </includes>
  706. </configuration>
  707. </execution>
  708. </executions>
  709. </plugin>
  710. <plugin>
  711. <groupId>org.apache.maven.plugins</groupId>
  712. <artifactId>maven-failsafe-plugin</artifactId>
  713. <executions>
  714. <execution>
  715. <id>default-integration-test</id>
  716. <goals>
  717. <goal>integration-test</goal>
  718. <goal>verify</goal>
  719. </goals>
  720. <configuration>
  721. <forkCount>${testsThreadCount}</forkCount>
  722. <reuseForks>false</reuseForks>
  723. <argLine>${maven-surefire-plugin.argLine} -DminiClusterDedicatedDirs=true</argLine>
  724. <forkedProcessTimeoutInSeconds>${fs.azure.scale.test.timeout}</forkedProcessTimeoutInSeconds>
  725. <trimStackTrace>false</trimStackTrace>
  726. <systemPropertyVariables>
  727. <!-- Tell tests that they are being executed in parallel -->
  728. <test.parallel.execution>true</test.parallel.execution>
  729. <test.build.data>${test.build.data}/${surefire.forkNumber}</test.build.data>
  730. <test.build.dir>${test.build.dir}/${surefire.forkNumber}</test.build.dir>
  731. <hadoop.tmp.dir>${hadoop.tmp.dir}/${surefire.forkNumber}</hadoop.tmp.dir>
  732. <!-- Due to a Maven quirk, setting this to just -->
  733. <!-- surefire.forkNumber won't do the parameter -->
  734. <!-- substitution. Putting a prefix in front of it like -->
  735. <!-- "fork-" makes it work. -->
  736. <test.unique.fork.id>fork-${surefire.forkNumber}</test.unique.fork.id>
  737. <!-- Propagate scale parameters -->
  738. <fs.azure.scale.test.enabled>${fs.azure.scale.test.enabled}</fs.azure.scale.test.enabled>
  739. <fs.azure.scale.test.huge.filesize>${fs.azure.scale.test.huge.filesize}</fs.azure.scale.test.huge.filesize>
  740. <fs.azure.scale.test.huge.huge.partitionsize>${fs.azure.scale.test.huge.partitionsize}</fs.azure.scale.test.huge.huge.partitionsize>
  741. <fs.azure.scale.test.timeout>${fs.azure.scale.test.timeout}</fs.azure.scale.test.timeout>
  742. <fs.azure.scale.test.list.performance.threads>${fs.azure.scale.test.list.performance.threads}</fs.azure.scale.test.list.performance.threads>
  743. <fs.azure.scale.test.list.performance.files>${fs.azure.scale.test.list.performance.files}</fs.azure.scale.test.list.performance.files>
  744. </systemPropertyVariables>
  745. <!-- Some tests cannot run in parallel. Tests that cover -->
  746. <!-- access to the root directory must run in isolation -->
  747. <!-- from anything else that could modify the bucket. -->
  748. <!-- azure tests that cover multi-part upload must run in -->
  749. <!-- isolation, because the file system is configured to -->
  750. <!-- purge existing multi-part upload data on -->
  751. <!-- initialization. MiniYARNCluster has not yet been -->
  752. <!-- changed to handle parallel test execution gracefully. -->
  753. <!-- Exclude all of these tests from parallel execution, -->
  754. <!-- and instead run them sequentially in a separate -->
  755. <!-- Surefire execution step later. -->
  756. <includes>
  757. <include>**/ITest*.java</include>
  758. </includes>
  759. <excludes>
  760. <exclude>**/ITestFileSystemOperationsExceptionHandlingMultiThreaded.java</exclude>
  761. <exclude>**/ITestFileSystemOperationsWithThreads.java</exclude>
  762. <exclude>**/ITestOutOfBandAzureBlobOperationsLive.java</exclude>
  763. <exclude>**/ITestNativeAzureFileSystemAuthorizationWithOwner.java</exclude>
  764. <exclude>**/ITestNativeAzureFileSystemConcurrencyLive.java</exclude>
  765. <exclude>**/ITestNativeAzureFileSystemLive.java</exclude>
  766. <exclude>**/ITestNativeAzureFSPageBlobLive.java</exclude>
  767. <exclude>**/ITestAzureBlobFileSystemRandomRead.java</exclude>
  768. <exclude>**/ITestWasbRemoteCallHelper.java</exclude>
  769. <exclude>**/ITestBlockBlobInputStream.java</exclude>
  770. <exclude>**/ITestWasbAbfsCompatibility.java</exclude>
  771. <exclude>**/ITestNativeFileSystemStatistics.java</exclude>
  772. </excludes>
  773. </configuration>
  774. </execution>
  775. <!-- Do a sequential run for tests that cannot handle -->
  776. <!-- parallel execution. -->
  777. <execution>
  778. <id>sequential-integration-tests</id>
  779. <goals>
  780. <goal>integration-test</goal>
  781. <goal>verify</goal>
  782. </goals>
  783. <configuration>
  784. <forkedProcessTimeoutInSeconds>${fs.azure.scale.test.timeout}</forkedProcessTimeoutInSeconds>
  785. <trimStackTrace>false</trimStackTrace>
  786. <systemPropertyVariables>
  787. <test.parallel.execution>false</test.parallel.execution>
  788. <fs.azure.scale.test.enabled>${fs.azure.scale.test.enabled}</fs.azure.scale.test.enabled>
  789. <fs.azure.scale.test.huge.filesize>${fs.azure.scale.test.huge.filesize}</fs.azure.scale.test.huge.filesize>
  790. <fs.azure.scale.test.huge.huge.partitionsize>${fs.azure.scale.test.huge.partitionsize}</fs.azure.scale.test.huge.huge.partitionsize>
  791. <fs.azure.scale.test.timeout>${fs.azure.scale.test.timeout}</fs.azure.scale.test.timeout>
  792. <fs.azure.scale.test.list.performance.threads>${fs.azure.scale.test.list.performance.threads}</fs.azure.scale.test.list.performance.threads>
  793. <fs.azure.scale.test.list.performance.files>${fs.azure.scale.test.list.performance.files}</fs.azure.scale.test.list.performance.files>
  794. </systemPropertyVariables>
  795. <includes>
  796. <include>**/ITestWasbAbfsCompatibility.java</include>
  797. <include>**/ITestFileSystemOperationsExceptionHandlingMultiThreaded.java</include>
  798. <include>**/ITestFileSystemOperationsWithThreads.java</include>
  799. <include>**/ITestOutOfBandAzureBlobOperationsLive.java</include>
  800. <include>**/ITestNativeAzureFileSystemAuthorizationWithOwner.java</include>
  801. <include>**/ITestNativeAzureFileSystemConcurrencyLive.java</include>
  802. <include>**/ITestNativeAzureFileSystemLive.java</include>
  803. <include>**/ITestNativeAzureFSPageBlobLive.java</include>
  804. <include>**/ITestAzureBlobFileSystemRandomRead.java</include>
  805. <include>**/ITestWasbRemoteCallHelper.java</include>
  806. <include>**/ITestBlockBlobInputStream.java</include>
  807. <include>**/ITestNativeFileSystemStatistics.java</include>
  808. </includes>
  809. </configuration>
  810. </execution>
  811. </executions>
  812. </plugin>
  813. </plugins>
  814. </build>
  815. </profile>
  816. <profile>
  817. <id>sequential-tests</id>
  818. <activation>
  819. <property>
  820. <name>!parallel-tests</name>
  821. </property>
  822. </activation>
  823. <build>
  824. <plugins>
  825. <plugin>
  826. <groupId>org.apache.maven.plugins</groupId>
  827. <artifactId>maven-failsafe-plugin</artifactId>
  828. <executions>
  829. <execution>
  830. <goals>
  831. <goal>integration-test</goal>
  832. <goal>verify</goal>
  833. </goals>
  834. <configuration>
  835. <systemPropertyVariables>
  836. <!-- Propagate scale parameters -->
  837. <fs.azure.scale.test.enabled>${fs.azure.scale.test.enabled}</fs.azure.scale.test.enabled>
  838. <fs.azure.scale.test.huge.filesize>${fs.azure.scale.test.huge.filesize}</fs.azure.scale.test.huge.filesize>
  839. <fs.azure.scale.test.timeout>${fs.azure.scale.test.timeout}</fs.azure.scale.test.timeout>
  840. <fs.azure.scale.test.list.performance.threads>${fs.azure.scale.test.list.performance.threads}</fs.azure.scale.test.list.performance.threads>
  841. <fs.azure.scale.test.list.performance.files>${fs.azure.scale.test.list.performance.files}</fs.azure.scale.test.list.performance.files>
  842. </systemPropertyVariables>
  843. <forkedProcessTimeoutInSeconds>${fs.azure.scale.test.timeout}</forkedProcessTimeoutInSeconds>
  844. <trimStackTrace>false</trimStackTrace>
  845. </configuration>
  846. </execution>
  847. </executions>
  848. </plugin>
  849. </plugins>
  850. </build>
  851. </profile>
  852. <!-- Turn on scale tests-->
  853. <profile>
  854. <id>scale</id>
  855. <activation>
  856. <property>
  857. <name>scale</name>
  858. </property>
  859. </activation>
  860. <properties>
  861. <fs.azure.scale.test.enabled>true</fs.azure.scale.test.enabled>
  862. </properties>
  863. </profile>
  864. </profiles>
  865. </project>