Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@steveloughran
Copy link
Contributor

Fixing parameterized ITests in hadoop-aws to work under Junit 5.

This is on top of PR #7785

For code changes:

  • Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')?
  • Object storage: have the integration tests been executed and the endpoint declared according to the connector-specific documentation?
  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
  • If applicable, have you updated the LICENSE, LICENSE-binary, NOTICE-binary files?

@steveloughran
Copy link
Contributor Author

Seems to kick off the tests in parallel. There are three runs, the last with no tests executed. But its elapsed time is exactly those of the other two executions added up (16.38 + 12.42
=28.8)

-------------------------------------------------------
[INFO] Running org.apache.hadoop.fs.s3a.performance.ITestCreateFileCost
[INFO] Running org.apache.hadoop.fs.s3a.performance.ITestCreateFileCost
[INFO] Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 16.38 s -- in org.apache.hadoop.fs.s3a.performance.ITestCreateFileCost
[INFO] Running org.apache.hadoop.fs.s3a.performance.ITestCreateFileCost
[INFO] Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 12.42 s -- in org.apache.hadoop.fs.s3a.performance.ITestCreateFileCost
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 28.89 s -- in org.apache.hadoop.fs.s3a.performance.ITestCreateFileCost
[INFO] 
[INFO

@steveloughran
Copy link
Contributor Author

comparison execution time

[INFO] Running org.apache.hadoop.fs.s3a.performance.ITestCreateFileCost
[INFO] Tests run: 22, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 25.591 s - in org.apache.hadoop.fs.s3a.performance.ITestCreateFileCost

note that both test runs were in a single process, so even if the log showed three test suites running at the same time, only one process is running

37302 surefirebooter-20250717193759647_3.jar -Xmx4096m -Xss2m -XX:+HeapDumpOnOutOfMemoryError -XX:+IgnoreUnrecognizedVMOptions --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.math=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.zip=ALL-UNNAMED --add-opens=java.base/sun.security.util=ALL-UNNAMED --add-opens=java.base/sun.security.x509=ALL-UNNAMED --enable-native-access=ALL-UNNAMED

I don't think that is good, because we do have shared state (filesystem cache etc) which will interfere with each other

@steveloughran steveloughran changed the title S3/hadoop 19610 itests junit5 HADOOP-19610. S3A: ITests to run under JUnit5 Jul 18, 2025
@shameersss1
Copy link
Contributor

@steveloughran Thanks for picking this up. This was blocking dev work on S3A.
I see we have a green run now. There are minor checkstyle issues

@steveloughran steveloughran force-pushed the s3/HADOOP-19610-itests-junit5 branch from b2d347f to 8249bb8 Compare July 22, 2025 16:46
@steveloughran
Copy link
Contributor Author

I'm doing another local run on this with the analytics profile, after which it is ready to merge. That is even though every mini yarn cluster refuses to come up with queue problems.

I'm not convinced that is related as there have been recent changes near the failing yarn code. And we need this in so urgently that reducing the number of tests down to a limited few is still a success

@steveloughran
Copy link
Contributor Author

one failure being fixed elsewhere

[ERROR] org.apache.hadoop.fs.s3a.impl.ITestS3APutIfMatchAndIfNoneMatch.testIfMatchOverwriteWithOutdatedEtag -- Time elapsed: 1.920 s <<< FAILURE!
java.lang.AssertionError: Expected a org.apache.hadoop.fs.s3a.RemoteFileChangedException to be thrown, but got the result: : S3AFileStatus{path=s3a://stevel-london/job-00-fork-0007/test/testIfMatchOverwriteWithOutdatedEtag; isDirectory=false; length=1024; replication=1; blocksize=33554432; modification_time=1753290830000; access_time=0; owner=stevel; group=stevel; permission=rw-rw-rw-; isSymlink=false; hasAcl=false; isEncrypted=true; isErasureCoded=false} isEmptyDirectory=FALSE eTag="4340256b04f80df42c1a89c65a60d35d" versionId=UjTcoUmL_g9dx5oERIjzzUtUg8uBJB3r
        at org.apache.hadoop.test.LambdaTestUtils.intercept(LambdaTestUtils.java:505)
        at org.apache.hadoop.test.LambdaTestUtils.intercept(LambdaTestUtils.java:390)
        at org.apache.hadoop.fs.s3a.impl.ITestS3APutIfMatchAndIfNoneMatch.testIfMatchOverwriteWithOutdatedEtag(ITestS3APutIfMatchAndIfNoneMatch.java:478)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at java.util.ArrayList.forEach(ArrayList.java:1259)
        at java.util.ArrayList.forEach(ArrayList.java:1259)

hadoop-aws tests which need to be parameterized on a class level
are configured to do so through the @ParameterizedClass tag.
Filesystem contract test suites in hadoop-common have
also been parameterized as appropriate.

There are custom JUnit tags declared in org.apache.hadoop.test.tags,
which add tag strings to test suites/cases declaring them.
They can be used on the command line and in IDEs to control
which tests are/are not executed.

@FlakyTest "flaky"
@loadtest "load"
@RootFilesystemTest "rootfilesystem"
@scaletest "scale"

For anyone migrating tests to JUnit 5
* Methods which subclass an existing test case MUST declare the @test
  tag again -it is no longer inherited.
* All overridden setup/teardown methods MUST be located and
  @BeforeEach/@AfterEach attribute added respectively
* Subclasses of a parameterized test suite MUST redeclare themselves
  as a @ParameterizedClass, and the binding mechanism again.
* Parameterized test suites SHOULD declare a pattern to generate an
  informative parameter value string for logs, IDEs and stack traces, e.g.
  @ParameterizedClass(name="performance-{0}")
* Test suites SHOULD add a org.apache.hadoop.test.tags tag to
  declare what kind of test it is. These tags are inherited, so it
  may be that only shared superclasses of test suites need to be tagged.
  The abstract filesystem contract tests are NOT declared as integration
  tests -implementations MUST do so if they are integration tests.
Maybe better to actually push this into the implementations?
@apache apache deleted a comment from hadoop-yetus Jul 24, 2025
@apache apache deleted a comment from hadoop-yetus Jul 24, 2025
@apache apache deleted a comment from hadoop-yetus Jul 24, 2025
@apache apache deleted a comment from hadoop-yetus Jul 24, 2025
@apache apache deleted a comment from hadoop-yetus Jul 24, 2025
@apache apache deleted a comment from hadoop-yetus Jul 24, 2025
@steveloughran steveloughran force-pushed the s3/HADOOP-19610-itests-junit5 branch from 99198ef to 9baa3dd Compare July 24, 2025 13:23
@apache apache deleted a comment from hadoop-yetus Jul 24, 2025
@steveloughran
Copy link
Contributor Author

rebased and with core tests working, just some minor failures. Also new tag @IntegrationTest to declare that a suite is an integration test, adds test runner tag "integration".

Failures now yarn minicluster and multipart.

[ERROR] Errors: 
[ERROR]   ITestS3AContractMultipartUploader.testConcurrentUploads » AWSStatus500 Completing multipart upload on job-00-fork-0007/test/testConcurrentUploads: software.amazon.awssdk.services.s3.model.S3Exception: We encountered an internal error. Please try again. (Service: S3, Status Code: 500, Request ID: A4Z5WRV9V3W74C5V, Extended Request ID: 6m/CFanxXEWMLy8l+qBBQr+OMt6g9goM86k0WiHL66DRBZ0SkMhoaamAtR9tX+UVE8fyD2ddpCk=):InternalError: We encountered an internal error. Please try again. (Service: S3, Status Code: 500, Request ID: A4Z5WRV9V3W74C5V, Extended Request ID: 6m/CFanxXEWMLy8l+qBBQr+OMt6g9goM86k0WiHL66DRBZ0SkMhoaamAtR9tX+UVE8fyD2ddpCk=)                                                                                                                                 
[ERROR]   ITestS3AContractMultipartUploader.testMultipartUploadReverseOrderNonContiguousPartNumbers » AWSStatus500 Completing multipart upload on job-00-fork-0007/test/testMultipartUploadReverseOrderNonContiguousPartNumbers: software.amazon.awssdk.services.s3.model.S3Exception: We encountered an internal error. Please try again. (Service: S3, Status Code: 500, Request ID: DA6VS34DM5F80MBW, Extended Request ID: ovgd95kBya/OUd3NRGcN81Ls/GCUQW5D3uQ+hNz1DcKiKpIBZHWshGyeaXWv3awM4FJcSs4+5fQ=):InternalError: We encountered an internal error. Please try again. (Service: S3, Status Code: 500, Request ID: DA6VS34DM5F80MBW, Extended Request ID: ovgd95kBya/OUd3NRGcN81Ls/GCUQW5D3uQ+hNz1DcKiKpIBZHWshGyeaXWv3awM4FJcSs4+5fQ=)                                                             
[ERROR] org.apache.hadoop.fs.s3a.commit.integration.ITestS3ACommitterMRJob.test_200_execute(Path)
[ERROR]   Run 1: ITestS3ACommitterMRJob.test_200_execute:280 » NullPointer Cannot read the array length because "blkLocations" is null
[ERROR]   Run 2: ITestS3ACommitterMRJob.test_200_execute:280 » NullPointer Cannot read the array length because "blkLocations" is null
[ERROR]   Run 3: ITestS3ACommitterMRJob.test_200_execute:280 » NullPointer Cannot read the array length because "blkLocations" is null
[INFO] 

I do suspect the multipart is related but I don't want it to hold up this (critical) patch.

ITestS3ACommitterMRJob may be a test setup again as it is a sequence of tests.

[INFO] Running org.apache.hadoop.fs.s3a.commit.integration.ITestS3ACommitterMRJob
[ERROR] Tests run: 4, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.756 s <<< FAILURE! -- in org.apache.hadoop.fs.s3a.commit.integration.ITestS3ACommitterMRJob
[ERROR] org.apache.hadoop.fs.s3a.commit.integration.ITestS3ACommitterMRJob.test_200_execute(Path) -- Time elapsed: 0.856 s <<< ERROR!
java.lang.NullPointerException: Cannot read the array length because "blkLocations" is null
        at org.apache.hadoop.mapreduce.lib.input.FileInputFormat.getBlockIndex(FileInputFormat.java:515)
        at org.apache.hadoop.mapreduce.lib.input.FileInputFormat.getSplits(FileInputFormat.java:477)
        at org.apache.hadoop.mapreduce.JobSubmitter.writeNewSplits(JobSubmitter.java:311)
        at org.apache.hadoop.mapreduce.JobSubmitter.writeSplits(JobSubmitter.java:328)
        at org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:201)
        at org.apache.hadoop.mapreduce.Job$11.run(Job.java:1677)
        at org.apache.hadoop.mapreduce.Job$11.run(Job.java:1674)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:712)
        at java.base/javax.security.auth.Subject.doAs(Subject.java:439)
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1959)
        at org.apache.hadoop.mapreduce.Job.submit(Job.java:1674)
        at org.apache.hadoop.fs.s3a.commit.integration.ITestS3ACommitterMRJob.test_200_execute(ITestS3ACommitterMRJob.java:280)

@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 54s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 2s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 92 new or modified test files.
_ trunk Compile Tests _
+0 🆗 mvndep 8m 20s Maven dependency ordering for branch
+1 💚 mvninstall 35m 7s trunk passed
+1 💚 compile 16m 25s trunk passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 compile 13m 41s trunk passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 checkstyle 4m 23s trunk passed
+1 💚 mvnsite 4m 42s trunk passed
+1 💚 javadoc 4m 7s trunk passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 javadoc 4m 45s trunk passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 spotbugs 8m 44s trunk passed
+1 💚 shadedclient 39m 22s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 31s Maven dependency ordering for patch
+1 💚 mvninstall 2m 55s the patch passed
+1 💚 compile 14m 56s the patch passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 javac 14m 56s the patch passed
+1 💚 compile 15m 30s the patch passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 javac 15m 30s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
-0 ⚠️ checkstyle 4m 55s /results-checkstyle-root.txt root: The patch generated 14 new + 76 unchanged - 19 fixed = 90 total (was 95)
+1 💚 mvnsite 5m 17s the patch passed
+1 💚 javadoc 4m 13s the patch passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 javadoc 4m 34s the patch passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 spotbugs 9m 18s the patch passed
+1 💚 shadedclient 36m 20s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 22m 44s hadoop-common in the patch passed.
+1 💚 unit 139m 36s hadoop-hdfs in the patch passed.
+1 💚 unit 3m 43s hadoop-aws in the patch passed.
+1 💚 unit 3m 13s hadoop-azure in the patch passed.
+1 💚 asflicense 1m 12s The patch does not generate ASF License warnings.
414m 42s
Subsystem Report/Notes
Docker ClientAPI=1.51 ServerAPI=1.51 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7814/8/artifact/out/Dockerfile
GITHUB PR #7814
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname Linux 02a710867175 5.15.0-143-generic #153-Ubuntu SMP Fri Jun 13 19:10:45 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 99198ef
Default Java Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7814/8/testReport/
Max. process+thread count 3152 (vs. ulimit of 5500)
modules C: hadoop-common-project/hadoop-common hadoop-hdfs-project/hadoop-hdfs hadoop-tools/hadoop-aws hadoop-tools/hadoop-azure U: .
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7814/8/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@steveloughran
Copy link
Contributor Author

checkstyles are all about test numbering _100() etc, so invalid

./hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/commit/integration/ITestS3ACommitterMRJob.java:201:  public void test_000() throws Throwable {:15: Name 'test_000' must match pattern '^[a-z][a-zA-Z0-9]*$'. [MethodName]
./hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/commit/integration/ITestS3ACommitterMRJob.java:206:  public void test_100() throws Throwable {:15: Name 'test_100' must match pattern '^[a-z][a-zA-Z0-9]*$'. [MethodName]
./hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/commit/integration/ITestS3ACommitterMRJob.java:211:  public void test_200_execute(:15: Name 'test_200_execute' must match pattern '^[a-z][a-zA-Z0-9]*$'. [MethodName]
./hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/commit/integration/ITestS3ACommitterMRJob.java:361:  public void test_500() throws Throwable {:15: Name 'test_500' must match pattern '^[a-z][a-zA-Z0-9]*$'. [MethodName]
./hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/commit/terasort/ITestTerasortOnS3A.java:270:  public void test_100_terasort_setup() throws Throwable {:15: Name 'test_100_terasort_setup' must match pattern '^[a-z][a-zA-Z0-9]*$'. [MethodName]
./hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/commit/terasort/ITestTerasortOnS3A.java:279:  public void test_110_teragen() throws Throwable {:15: Name 'test_110_teragen' must match pattern '^[a-z][a-zA-Z0-9]*$'. [MethodName]
./hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/commit/terasort/ITestTerasortOnS3A.java:295:  public void test_120_terasort() throws Throwable {:15: Name 'test_120_terasort' must match pattern '^[a-z][a-zA-Z0-9]*$'. [MethodName]
./hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/commit/terasort/ITestTerasortOnS3A.java:312:  public void test_130_teravalidate() throws Throwable {:15: Name 'test_130_teravalidate' must match pattern '^[a-z][a-zA-Z0-9]*$'. [MethodName]
./hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/commit/terasort/ITestTerasortOnS3A.java:332:  public void test_140_teracomplete() throws Throwable {:15: Name 'test_140_teracomplete' must match pattern '^[a-z][a-zA-Z0-9]*$'. [MethodName]
./hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/commit/terasort/ITestTerasortOnS3A.java:368:  public void test_150_teracleanup() throws Throwable {:15: Name 'test_150_teracleanup' must match pattern '^[a-z][a-zA-Z0-9]*$'. [MethodName]
./hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/commit/terasort/ITestTerasortOnS3A.java:373:  public void test_200_directory_deletion() throws Throwable {:15: Name 'test_200_directory_deletion' must match pattern '^[a-z][a-zA-Z0-9]*$'. [MethodName]
./hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/scale/ILoadTestS3ABulkDeleteThrottling.java:190:  public void test_010_Reset() throws Throwable {:15: Name 'test_010_Reset' must match pattern '^[a-z][a-zA-Z0-9]*$'. [MethodName]
./hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/scale/ILoadTestS3ABulkDeleteThrottling.java:195:  public void test_020_DeleteThrottling() throws Throwable {:15: Name 'test_020_DeleteThrottling' must match pattern '^[a-z][a-zA-Z0-9]*$'. [MethodName]
./hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/scale/ILoadTestS3ABulkDeleteThrottling.java:208:  public void test_030_Sleep() throws Throwable {:15: Name 'test_030_Sleep' must match pattern '^[a-z][a-zA-Z0-9]*$'. [MethodName]

@steveloughran
Copy link
Contributor Author

I need this in ASAP as there's no way to validate any other PR: failures of their tests are meaningless.

@slfan1989 @ahmarsuhail @mukund-thakur can I get an upvote on this?

It isn't perfect, but it's test ony code and we can tune later

@slfan1989
Copy link
Contributor

I need this in ASAP as there's no way to validate any other PR: failures of their tests are meaningless.

@slfan1989 @ahmarsuhail @mukund-thakur can I get an upvote on this?

It isn't perfect, but it's test ony code and we can tune later

@steveloughran Thanks for your contribution! I believe this PR is good enough, and we can go ahead and merge it.

@steveloughran steveloughran merged commit 3d905f9 into apache:trunk Jul 28, 2025
1 of 2 checks passed
@steveloughran
Copy link
Contributor Author

FYI, outstanding failures.

  • multiparts may be parameterization again, though s3 isn't being helpful
  • ITestS3APutIfMatchAndIfNoneMatch known
  • MR stuff: yarn minicluster failure. Needs fixing, but not sure it's related to junit5
[ERROR] Failures: 
[ERROR]   ITestS3APutIfMatchAndIfNoneMatch.testIfMatchOverwriteWithOutdatedEtag:478 Expected a org.apache.hadoop.fs.s3a.RemoteFileChangedException to be thrown, but got the result: : S3AFileStatus{path=s3a://stevel-london/job-00-fork-0005/test/testIfMatchOverwriteWithOutdatedEtag; isDirectory=false; length=1024; replication=1; blocksize=33554432; modification_time=1753293814000; access_time=0; owner=stevel; group=stevel; permission=rw-rw-rw-; isSymlink=false; hasAcl=false; isEncrypted=true; isErasureCoded=false} isEmptyDirectory=FALSE eTag="4340256b04f80df42c1a89c65a60d35d" versionId=LHzL24avWKO0NNOzGMc8O9fsRzmxollO                                                                                                                                                             
[ERROR] Errors: 
[ERROR]   ITestS3AContractMultipartUploader.testConcurrentUploads » AWSStatus500 Completing multipart upload on job-00-fork-0005/test/testConcurrentUploads: software.amazon.awssdk.services.s3.model.S3Exception: We encountered an internal error. Please try again. (Service: S3, Status Code: 500, Request ID: 50AFRGSS8QZC2QDX, Extended Request ID: XIg6zvO2fPb/WLdIrmATQN6/MawhpdSCmYTJ1C+FSb+4HIdosT/FTVcROikLN5WdKmUklJ9XPIK7ZWVpw+RlrsoUZ3NDkJUz):InternalError: We encountered an internal error. Please try again. (Service: S3, Status Code: 500, Request ID: 50AFRGSS8QZC2QDX, Extended Request ID: XIg6zvO2fPb/WLdIrmATQN6/MawhpdSCmYTJ1C+FSb+4HIdosT/FTVcROikLN5WdKmUklJ9XPIK7ZWVpw+RlrsoUZ3NDkJUz)                                                                                         
[ERROR]   ITestS3AContractMultipartUploader.testMultipartUploadReverseOrderNonContiguousPartNumbers » AWSStatus500 Completing multipart upload on job-00-fork-0005/test/testMultipartUploadReverseOrderNonContiguousPartNumbers: software.amazon.awssdk.services.s3.model.S3Exception: We encountered an internal error. Please try again. (Service: S3, Status Code: 500, Request ID: Q2V03E5APH6XGAV0, Extended Request ID: lDU/3cdSBAfiU9MIR4BCY+jx4sQCfrRk06Rc4Lw9nfqyDQlEwP1iekUSkkfOUGc2Rvln6b7DzrM=):InternalError: We encountered an internal error. Please try again. (Service: S3, Status Code: 500, Request ID: Q2V03E5APH6XGAV0, Extended Request ID: lDU/3cdSBAfiU9MIR4BCY+jx4sQCfrRk06Rc4Lw9nfqyDQlEwP1iekUSkkfOUGc2Rvln6b7DzrM=)                                                             
[ERROR] org.apache.hadoop.fs.s3a.commit.integration.ITestS3ACommitterMRJob.test_200_execute(Path)
[ERROR]   Run 1: ITestS3ACommitterMRJob.test_200_execute:280 » NullPointer
[ERROR]   Run 2: ITestS3ACommitterMRJob.test_200_execute:280 » NullPointer
[ERROR]   Run 3: ITestS3ACommitterMRJob.test_200_execute:280 » NullPointer
[INFO] 
org.apache.hadoop.service.ServiceStateException: org.apache.hadoop.yarn.exceptions.YarnException: Failed to initialize queues

	at org.apache.hadoop.service.ServiceStateException.convert(ServiceStateException.java:105)
	at org.apache.hadoop.service.AbstractService.init(AbstractService.java:174)
	at org.apache.hadoop.service.CompositeService.serviceInit(CompositeService.java:110)
	at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager$RMActiveServices.serviceInit(ResourceManager.java:996)
	at org.apache.hadoop.service.AbstractService.init(AbstractService.java:165)
	at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager.createAndInitActiveServices(ResourceManager.java:1511)
	at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager.serviceInit(ResourceManager.java:351)
	at org.apache.hadoop.service.AbstractService.init(AbstractService.java:165)
	at org.apache.hadoop.yarn.server.MiniYARNCluster.initResourceManager(MiniYARNCluster.java:375)
	at org.apache.hadoop.yarn.server.MiniYARNCluster.access$200(MiniYARNCluster.java:129)
	at org.apache.hadoop.yarn.server.MiniYARNCluster$ResourceManagerWrapper.serviceInit(MiniYARNCluster.java:510)
	at org.apache.hadoop.service.AbstractService.init(AbstractService.java:165)
	at org.apache.hadoop.service.CompositeService.serviceInit(CompositeService.java:110)
	at org.apache.hadoop.yarn.server.MiniYARNCluster.serviceInit(MiniYARNCluster.java:343)
	at org.apache.hadoop.service.AbstractService.init(AbstractService.java:165)
	at org.apache.hadoop.fs.s3a.yarn.ITestS3AMiniYarnCluster.setup(ITestS3AMiniYarnCluster.java:86)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at java.util.ArrayList.forEach(ArrayList.java:1259)
	at java.util.ArrayList.forEach(ArrayList.java:1259)
Caused by: org.apache.hadoop.yarn.exceptions.YarnException: Failed to initialize queues
	at org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityScheduler.initializeQueues(CapacityScheduler.java:815)
	at org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityScheduler.initScheduler(CapacityScheduler.java:320)
	at org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityScheduler.serviceInit(CapacityScheduler.java:414)
	at org.apache.hadoop.service.AbstractService.init(AbstractService.java:165)
	... 17 more
Caused by: java.lang.IllegalStateException: Queue configuration missing child queue names for root
	at org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacitySchedulerQueueManager.validateParent(CapacitySchedulerQueueManager.java:741)
	at org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacitySchedulerQueueManager.parseQueue(CapacitySchedulerQueueManager.java:255)
	at org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacitySchedulerQueueManager.initializeQueues(CapacitySchedulerQueueManager.java:177)
	at org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityScheduler.initializeQueues(CapacityScheduler.java:806)
	... 20 more

@slfan1989
Copy link
Contributor

@steveloughran I'll follow up on the Yarn MiniCluster issue, but it might be later today. I've dealt with a similar issue before, so it might be helpful. The main cause is that during parallel testing, different unit tests are accessing the same configuration file, as some of the configurations are stored in directories like /tmp/yarn/jenkins.

@steveloughran
Copy link
Contributor Author

ahh, I see. I think temp dirs are set per process and a base test jobID.

@steveloughran
Copy link
Contributor Author

just discovered (Iceberg code) that assertj may limit stack traces, so you need to set Assertions.setMaxStackTraceElementsDisplayed(Integer.MAX_VALUE) before test runs. We could add that in AbstractHadoopTestSuite. It's a static value so only needs to be set once

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants