summaryrefslogtreecommitdiff
path: root/hadoop-tools/hadoop-azure/pom.xml
blob: 1728b601c46c8ac4b535442db36a45876f2722a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License. See accompanying LICENSE file.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.apache.hadoop</groupId>
    <artifactId>hadoop-project</artifactId>
    <version>3.1.0-SNAPSHOT</version>
    <relativePath>../../hadoop-project</relativePath>
  </parent>
  <artifactId>hadoop-azure</artifactId>
  <name>Apache Hadoop Azure support</name>
  <description>
    This module contains code to support integration with Azure.
    Currently this consists of a filesystem client to read data from
    and write data to Azure Storage.
  </description>
  <packaging>jar</packaging>

  <properties>
    <file.encoding>UTF-8</file.encoding>
    <downloadSources>true</downloadSources>
    <hadoop.tmp.dir>${project.build.directory}/test</hadoop.tmp.dir>
    <!-- are scale tests enabled ? -->
    <fs.azure.scale.test.enabled>unset</fs.azure.scale.test.enabled>
    <!-- Size in MB of huge files. -->
    <fs.azure.scale.test.huge.filesize>unset</fs.azure.scale.test.huge.filesize>
    <!-- Size in MB of the partion size in huge file uploads. -->
    <fs.azure.scale.test.huge.partitionsize>unset</fs.azure.scale.test.huge.partitionsize>
    <!-- Timeout in seconds for scale tests.-->
    <fs.azure.scale.test.timeout>7200</fs.azure.scale.test.timeout>
  </properties>

  <build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
        <configuration>
          <findbugsXmlOutput>true</findbugsXmlOutput>
          <xmlOutput>true</xmlOutput>
          <excludeFilterFile>${basedir}/dev-support/findbugs-exclude.xml
          </excludeFilterFile>
          <effort>Max</effort>
        </configuration>
      </plugin>
      <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-checkstyle-plugin</artifactId>
          <configuration>
            <!-- To run with the default Sun ruleset, 
                 comment out the configLocation line -->
            <configLocation>src/config/checkstyle.xml</configLocation>
          </configuration>
          
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

       <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>deplist</id>
            <phase>compile</phase>
            <goals>
              <goal>list</goal>
            </goals>
            <configuration>
              <!-- build a shellprofile -->
              <outputFile>${project.basedir}/target/hadoop-tools-deps/${project.artifactId}.tools-optional.txt</outputFile>
            </configuration>
          </execution>
        </executions>
      </plugin>

    </plugins>

    
    <!--
       The following is to suppress a m2e warning in eclipse
       (m2e doesn't know how to handle maven-enforcer:enforce, so we have to tell m2e to ignore it)
       see: http://stackoverflow.com/questions/13040788/how-to-elimate-the-maven-enforcer-plugin-goal-enforce-is-ignored-by-m2e-wa
    -->
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <versionRange>[1.0.0,)</versionRange>
                    <goals>
                      <goal>enforce</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>

  </build>

  <!-- see hadoop-project/pom.xml for version number declarations -->
  <dependencies>
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-common</artifactId>
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-core</artifactId>
      <scope>compile</scope>
    </dependency>
    
    <dependency>
      <groupId>org.apache.httpcomponents</groupId>
      <artifactId>httpclient</artifactId>
      <scope>compile</scope>
    </dependency>
    
    <dependency>
      <groupId>com.microsoft.azure</groupId>
      <artifactId>azure-storage</artifactId>
      <scope>compile</scope>
      <exclusions>
        <exclusion>
          <groupId>org.apache.commons</groupId>
          <artifactId>commons-lang3</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-util-ajax</artifactId>
      <scope>compile</scope>
    </dependency>
    
    
    <!-- dependencies use for test only -->
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-common</artifactId>
      <scope>test</scope>
      <type>test-jar</type>
    </dependency>
    
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-mapreduce-client-jobclient</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-distcp</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-distcp</artifactId>
      <scope>test</scope>
      <type>test-jar</type>
    </dependency>

    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-all</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
    </dependency>

  </dependencies>

  <profiles>
    <profile>
      <id>parallel-tests</id>
      <activation>
        <property>
          <name>parallel-tests</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-antrun-plugin</artifactId>
            <executions>
              <execution>
                <id>create-parallel-tests-dirs</id>
                <phase>test-compile</phase>
                <configuration>
                  <target>
                    <script language="javascript"><![CDATA[
                      var baseDirs = [
                        project.getProperty("test.build.data"),
                        project.getProperty("test.build.dir"),
                        project.getProperty("hadoop.tmp.dir")
                      ];
                      for (var i in baseDirs) {
                        for (var j = 1; j <= ${testsThreadCount}; ++j) {
                          var mkdir = project.createTask("mkdir");
                          mkdir.setDir(new java.io.File(baseDirs[i], j));
                          mkdir.perform();
                        }
                      }
                    ]]></script>
                  </target>
                </configuration>
                <goals>
                  <goal>run</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <executions>
              <execution>
                <id>default-test</id>
                <goals>
                  <goal>test</goal>
                </goals>
                <configuration>
                  <forkCount>1</forkCount>
                  <forkCount>${testsThreadCount}</forkCount>
                  <reuseForks>false</reuseForks>
                  <argLine>${maven-surefire-plugin.argLine} -DminiClusterDedicatedDirs=true</argLine>
                  <forkedProcessTimeoutInSeconds>${fs.azure.scale.test.timeout}</forkedProcessTimeoutInSeconds>
                  <systemPropertyVariables>
                    <test.build.data>${test.build.data}/${surefire.forkNumber}</test.build.data>
                    <test.build.dir>${test.build.dir}/${surefire.forkNumber}</test.build.dir>
                    <hadoop.tmp.dir>${hadoop.tmp.dir}/${surefire.forkNumber}</hadoop.tmp.dir>
                    <test.unique.fork.id>fork-${surefire.forkNumber}</test.unique.fork.id>
                    <fs.azure.scale.test.enabled>${fs.azure.scale.test.enabled}</fs.azure.scale.test.enabled>
                    <fs.azure.scale.test.huge.filesize>${fs.azure.scale.test.huge.filesize}</fs.azure.scale.test.huge.filesize>
                    <fs.azure.scale.test.huge.huge.partitionsize>${fs.azure.scale.test.huge.partitionsize}</fs.azure.scale.test.huge.huge.partitionsize>
                    <fs.azure.scale.test.timeout>${fs.azure.scale.test.timeout}</fs.azure.scale.test.timeout>
                  </systemPropertyVariables>
                  <includes>
                    <include>**/Test*.java</include>
                  </includes>
                  <excludes>
                    <exclude>**/TestRollingWindowAverage*.java</exclude>
                  </excludes>
                </configuration>
              </execution>
              <execution>
                <id>serialized-test</id>
                <goals>
                  <goal>test</goal>
                </goals>
                <configuration>
                  <forkCount>1</forkCount>
                  <reuseForks>false</reuseForks>
                  <argLine>${maven-surefire-plugin.argLine} -DminiClusterDedicatedDirs=true</argLine>
                  <forkedProcessTimeoutInSeconds>${fs.azure.scale.test.timeout}</forkedProcessTimeoutInSeconds>
                  <systemPropertyVariables>
                    <test.build.data>${test.build.data}/${surefire.forkNumber}</test.build.data>
                    <test.build.dir>${test.build.dir}/${surefire.forkNumber}</test.build.dir>
                    <hadoop.tmp.dir>${hadoop.tmp.dir}/${surefire.forkNumber}</hadoop.tmp.dir>
                    <test.unique.fork.id>fork-${surefire.forkNumber}</test.unique.fork.id>
                    <fs.azure.scale.test.enabled>${fs.azure.scale.test.enabled}</fs.azure.scale.test.enabled>
                    <fs.azure.scale.test.huge.filesize>${fs.azure.scale.test.huge.filesize}</fs.azure.scale.test.huge.filesize>
                    <fs.azure.scale.test.huge.huge.partitionsize>${fs.azure.scale.test.huge.partitionsize}</fs.azure.scale.test.huge.huge.partitionsize>
                    <fs.azure.scale.test.timeout>${fs.azure.scale.test.timeout}</fs.azure.scale.test.timeout>
                  </systemPropertyVariables>
                  <includes>
                    <include>**/TestRollingWindowAverage*.java</include>
                  </includes>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <executions>
              <execution>
                <id>default-integration-test</id>
                <goals>
                  <goal>integration-test</goal>
                  <goal>verify</goal>
                </goals>
                <configuration>
                  <forkCount>${testsThreadCount}</forkCount>
                  <reuseForks>false</reuseForks>
                  <argLine>${maven-surefire-plugin.argLine} -DminiClusterDedicatedDirs=true</argLine>
                  <forkedProcessTimeoutInSeconds>${fs.azure.scale.test.timeout}</forkedProcessTimeoutInSeconds>
                  <trimStackTrace>false</trimStackTrace>
                  <systemPropertyVariables>
                    <!-- Tell tests that they are being executed in parallel -->
                    <test.parallel.execution>true</test.parallel.execution>
                    <test.build.data>${test.build.data}/${surefire.forkNumber}</test.build.data>
                    <test.build.dir>${test.build.dir}/${surefire.forkNumber}</test.build.dir>
                    <hadoop.tmp.dir>${hadoop.tmp.dir}/${surefire.forkNumber}</hadoop.tmp.dir>

                    <!-- Due to a Maven quirk, setting this to just -->
                    <!-- surefire.forkNumber won't do the parameter -->
                    <!-- substitution.  Putting a prefix in front of it like -->
                    <!-- "fork-" makes it work. -->
                    <test.unique.fork.id>fork-${surefire.forkNumber}</test.unique.fork.id>
                    <!-- Propagate scale parameters -->
                    <fs.azure.scale.test.enabled>${fs.azure.scale.test.enabled}</fs.azure.scale.test.enabled>
                    <fs.azure.scale.test.huge.filesize>${fs.azure.scale.test.huge.filesize}</fs.azure.scale.test.huge.filesize>
                    <fs.azure.scale.test.huge.huge.partitionsize>${fs.azure.scale.test.huge.partitionsize}</fs.azure.scale.test.huge.huge.partitionsize>
                    <fs.azure.scale.test.timeout>${fs.azure.scale.test.timeout}</fs.azure.scale.test.timeout>
                  </systemPropertyVariables>
                  <!-- Some tests cannot run in parallel.  Tests that cover -->
                  <!-- access to the root directory must run in isolation -->
                  <!-- from anything else that could modify the bucket. -->
                  <!-- azure tests that cover multi-part upload must run in -->
                  <!-- isolation, because the file system is configured to -->
                  <!-- purge existing multi-part upload data on -->
                  <!-- initialization.  MiniYARNCluster has not yet been -->
                  <!-- changed to handle parallel test execution gracefully. -->
                  <!-- Exclude all of these tests from parallel execution, -->
                  <!-- and instead run them sequentially in a separate -->
                  <!-- Surefire execution step later. -->
                  <includes>
                    <include>**/ITest*.java</include>
                  </includes>
                  <excludes>
                    <exclude>**/ITestFileSystemOperationsExceptionHandlingMultiThreaded.java</exclude>
                    <exclude>**/ITestFileSystemOperationsWithThreads.java</exclude>
                    <exclude>**/ITestOutOfBandAzureBlobOperationsLive.java</exclude>
                    <exclude>**/ITestNativeAzureFileSystemAuthorizationWithOwner.java</exclude>
                    <exclude>**/ITestNativeAzureFileSystemConcurrencyLive.java</exclude>
                    <exclude>**/ITestNativeAzureFileSystemLive.java</exclude>
                    <exclude>**/ITestNativeAzureFSPageBlobLive.java</exclude>
                    <exclude>**/ITestWasbRemoteCallHelper.java</exclude>
                    <exclude>**/ITestBlockBlobInputStream.java</exclude>
                  </excludes>
                </configuration>
              </execution>
              <!-- Do a sequential run for tests that cannot handle -->
              <!-- parallel execution. -->
              <execution>
                <id>sequential-integration-tests</id>
                <goals>
                  <goal>integration-test</goal>
                  <goal>verify</goal>
                </goals>
                <configuration>
                  <forkedProcessTimeoutInSeconds>${fs.azure.scale.test.timeout}</forkedProcessTimeoutInSeconds>
                  <trimStackTrace>false</trimStackTrace>
                  <systemPropertyVariables>
                    <test.parallel.execution>false</test.parallel.execution>
                    <fs.azure.scale.test.enabled>${fs.azure.scale.test.enabled}</fs.azure.scale.test.enabled>
                    <fs.azure.scale.test.huge.filesize>${fs.azure.scale.test.huge.filesize}</fs.azure.scale.test.huge.filesize>
                    <fs.azure.scale.test.huge.huge.partitionsize>${fs.azure.scale.test.huge.partitionsize}</fs.azure.scale.test.huge.huge.partitionsize>
                    <fs.azure.scale.test.timeout>${fs.azure.scale.test.timeout}</fs.azure.scale.test.timeout>
                  </systemPropertyVariables>
                  <includes>
                    <include>**/ITestFileSystemOperationsExceptionHandlingMultiThreaded.java</include>
                    <include>**/ITestFileSystemOperationsWithThreads.java</include>
                    <include>**/ITestOutOfBandAzureBlobOperationsLive.java</include>
                    <include>**/ITestNativeAzureFileSystemAuthorizationWithOwner.java</include>
                    <include>**/ITestNativeAzureFileSystemConcurrencyLive.java</include>
                    <include>**/ITestNativeAzureFileSystemLive.java</include>
                    <include>**/ITestWasbRemoteCallHelper.java</include>
                    <include>**/ITestBlockBlobInputStream.java</include>
                  </includes>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>sequential-tests</id>
      <activation>
        <property>
          <name>!parallel-tests</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <goal>integration-test</goal>
                  <goal>verify</goal>
                </goals>
                <configuration>
                  <systemPropertyVariables>
                    <!-- Propagate scale parameters -->
                    <fs.azure.scale.test.enabled>${fs.azure.scale.test.enabled}</fs.azure.scale.test.enabled>
                    <fs.azure.scale.test.huge.filesize>${fs.azure.scale.test.huge.filesize}</fs.azure.scale.test.huge.filesize>
                    <fs.azure.scale.test.timeout>${fs.azure.scale.test.timeout}</fs.azure.scale.test.timeout>
                  </systemPropertyVariables>
                  <forkedProcessTimeoutInSeconds>${fs.azure.scale.test.timeout}</forkedProcessTimeoutInSeconds>
                  <trimStackTrace>false</trimStackTrace>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <!-- Turn on scale tests-->
    <profile>
      <id>scale</id>
      <activation>
        <property>
          <name>scale</name>
        </property>
      </activation>
      <properties>
        <fs.azure.scale.test.enabled>true</fs.azure.scale.test.enabled>
      </properties>
    </profile>
  </profiles>
</project>