Skip to content

Conversation

@steveloughran
Copy link
Contributor

@steveloughran steveloughran commented Feb 12, 2020

see #1838

Adds a new exception UnknownStoreException to indicate
"there's no store there"

  • raised in verify bucket existence checks
  • and when translating AWS exceptions into IOEs
  • The S3A retry policy fails fast on this
  • And s3GetFileStatus recognises the same failure and raises it

Except when the metastore shortcircuits S3 IO, this means all
operations against a nonexistent store will fail with a unique exception.

ITestS3ABucketExistence is extended to

  • disable metastore (getFileStatus(/) was returning a value)
  • always create new instances
  • invoke all the operations which catch and swallow FNFEs
    (exists, isFile, isDir, delete)

also: disable the probe for landsat-pds so that we get more test coverage of the option.

Testing: S3 ireland w/ DDB, and the probe set to 0 by default, everywhere
(No obvious speedup...)

mukund-thakur and others added 3 commits February 12, 2020 13:26
Adds a new exception UnknownStoreException to indicate
"there's no store there"

* raised in verify bucket existence checks
* and when translating AWS exceptions into IOEs
* The S3A retry policy fails fast on this
* And s3GetFileStatus recognises the same failure and raises it

Except when the metastore shortcircuits S3 IO, this means all
operations against a nonexistent store will fail with a unique exception.

ITestS3ABucketExistence is extended to
* disable metastore (getFileStatus(/) was returning a value)
* always create new instances
* invoke all the operations which catch and swallow FNFEs
  (exists, isFile, isDir, delete)

Change-Id: Ide630ec9738ef971eba603b618bd612456fa064b
remove the @links to protected methods; add @value

Change-Id: I24d6a922cc6d3de48aeb39cd47713430011f41ab
@steveloughran
Copy link
Contributor Author

new exception breaks a few tests

INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.411 s - in org.apache.hadoop.fs.s3a.ITestS3AMetadataPersistenceException
[ERROR] Tests run: 28, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 103.507 s <<< FAILURE! - in org.apache.hadoop.fs.s3a.s3guard.ITestS3GuardToolDynamoDB
[ERROR] testCLIFsckFailInitializeFs(org.apache.hadoop.fs.s3a.s3guard.ITestS3GuardToolDynamoDB)  Time elapsed: 2.006 s  <<< ERROR!
org.apache.hadoop.fs.s3a.UnknownStoreException: s3a://this-bucket-does-not-exist-dbdfaae0-e22c-4b64-a12e-4b1f31da43ba/
	at org.apache.hadoop.fs.s3a.S3AUtils.translateException(S3AUtils.java:255)
	at org.apache.hadoop.fs.s3a.S3AUtils.translateException(S3AUtils.java:167)
	at org.apache.hadoop.fs.s3a.S3AFileSystem.s3GetFileStatus(S3AFileSystem.java:2971)
	at org.apache.hadoop.fs.s3a.S3AFileSystem.innerGetFileStatus(S3AFileSystem.java:2812)
	at org.apache.hadoop.fs.s3a.S3AFileSystem.getFileStatus(S3AFileSystem.java:2696)
	at org.apache.hadoop.fs.s3a.s3guard.S3GuardFsck.compareS3ToMs(S3GuardFsck.java:117)
	at org.apache.hadoop.fs.s3a.s3guard.S3GuardTool$Fsck.run(S3GuardTool.java:1697)
	at org.apache.hadoop.fs.s3a.s3guard.S3GuardTool.run(S3GuardTool.java:480)
	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
	at org.apache.hadoop.fs.s3a.s3guard.S3GuardTool.run(S3GuardTool.java:2002)
	at org.apache.hadoop.fs.s3a.s3guard.AbstractS3GuardToolTestBase.run(AbstractS3GuardToolTestBase.java:154)
	at org.apache.hadoop.fs.s3a.s3guard.ITestS3GuardToolDynamoDB.lambda$testCLIFsckFailInitializeFs$5(ITestS3GuardToolDynamoDB.java:323)
	at org.apache.hadoop.test.LambdaTestUtils.intercept(LambdaTestUtils.java:498)
	at org.apache.hadoop.test.LambdaTestUtils.intercept(LambdaTestUtils.java:384)
	at org.apache.hadoop.test.LambdaTestUtils.intercept(LambdaTestUtils.java:453)
	at org.apache.hadoop.fs.s3a.s3guard.ITestS3GuardToolDynamoDB.testCLIFsckFailInitializeFs(ITestS3GuardToolDynamoDB.java:322)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
	at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298)
	at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.lang.Thread.run(Thread.java:748)
Caused by: com.amazonaws.services.s3.model.AmazonS3Exception: The specified bucket does not exist (Service: Amazon S3; Status Code: 404; Error Code: NoSuchBucket; Request ID: 65AB7E8F8BBDD54C; S3 Extended Request ID: s2eT1WDJIduDI+GtOOaJnBMjQsekFL3UcXvTtMPgrXQQ4qdueS2ApAxa0GBPvkSYo0lUbNGYVT8=), S3 Extended Request ID: s2eT1WDJIduDI+GtOOaJnBMjQsekFL3UcXvTtMPgrXQQ4qdueS2ApAxa0GBPvkSYo0lUbNGYVT8=
	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleErrorResponse(AmazonHttpClient.java:1712)
	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1367)
	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:1113)
	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:770)
	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:744)
	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:726)
	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500(AmazonHttpClient.java:686)
	at com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:668)
	at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:532)
	at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:512)
	at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:4920)
	at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:4866)
	at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:4860)
	at com.amazonaws.services.s3.AmazonS3Client.listObjectsV2(AmazonS3Client.java:923)
	at org.apache.hadoop.fs.s3a.S3AFileSystem.lambda$listObjects$7(S3AFileSystem.java:1821)
	at org.apache.hadoop.fs.s3a.Invoker.retryUntranslated(Invoker.java:407)
	at org.apache.hadoop.fs.s3a.Invoker.retryUntranslated(Invoker.java:370)
	at org.apache.hadoop.fs.s3a.S3AFileSystem.listObjects(S3AFileSystem.java:1814)
	at org.apache.hadoop.fs.s3a.S3AFileSystem.s3GetFileStatus(S3AFileSystem.java:2944)
	... 28 more

[ERROR] testToolsNoBucket(org.apache.hadoop.fs.s3a.s3guard.ITestS3GuardToolDynamoDB)  Time elapsed: 1.833 s  <<< ERROR!
org.apache.hadoop.fs.s3a.UnknownStoreException: this-bucket-does-not-exist-00000000000
	at org.apache.hadoop.fs.s3a.S3AUtils.translateException(S3AUtils.java:255)
	at org.apache.hadoop.fs.s3a.Invoker.once(Invoker.java:112)
	at org.apache.hadoop.fs.s3a.Invoker.lambda$retry$4(Invoker.java:315)
	at org.apache.hadoop.fs.s3a.Invoker.retryUntranslated(Invoker.java:407)
	at org.apache.hadoop.fs.s3a.Invoker.retry(Invoker.java:311)
	at org.apache.hadoop.fs.s3a.Invoker.retry(Invoker.java:286)
	at org.apache.hadoop.fs.s3a.S3AFileSystem.getBucketLocation(S3AFileSystem.java:826)
	at org.apache.hadoop.fs.s3a.S3AFileSystem.getBucketLocation(S3AFileSystem.java:809)
	at org.apache.hadoop.fs.s3a.s3guard.DynamoDBMetadataStore.initialize(DynamoDBMetadataStore.java:408)
	at org.apache.hadoop.fs.s3a.s3guard.S3Guard.getMetadataStore(S3Guard.java:122)
	at org.apache.hadoop.fs.s3a.S3AFileSystem.initialize(S3AFileSystem.java:423)
	at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:3422)
	at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:139)
	at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:3482)
	at org.apache.hadoop.fs.FileSystem$Cache.getUnique(FileSystem.java:3456)
	at org.apache.hadoop.fs.FileSystem.newInstance(FileSystem.java:558)
	at org.apache.hadoop.fs.s3a.s3guard.S3GuardTool.checkIfS3BucketIsGuarded(S3GuardTool.java:286)
	at org.apache.hadoop.fs.s3a.s3guard.S3GuardTool$Destroy.run(S3GuardTool.java:746)
	at org.apache.hadoop.fs.s3a.s3guard.S3GuardTool.run(S3GuardTool.java:480)
	at org.apache.hadoop.fs.s3a.s3guard.AbstractS3GuardToolTestBase.lambda$testToolsNoBucket$5(AbstractS3GuardToolTestBase.java:510)
	at org.apache.hadoop.test.LambdaTestUtils.intercept(LambdaTestUtils.java:498)
	at org.apache.hadoop.test.LambdaTestUtils.intercept(LambdaTestUtils.java:384)
	at org.apache.hadoop.fs.s3a.s3guard.AbstractS3GuardToolTestBase.testToolsNoBucket(AbstractS3GuardToolTestBase.java:509)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
	at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298)
	at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.lang.Thread.run(Thread.java:748)
Caused by: com.amazonaws.services.s3.model.AmazonS3Exception: The specified bucket does not exist (Service: Amazon S3; Status Code: 404; Error Code: NoSuchBucket; Request ID: A3B2969597009F49; S3 Extended Request ID: /YsiAe3Xpr1CvooBUOmp7dVkRvoZhuyZvTCWWajZdIh8qvQHP2hQJVKgnznjrhftXcKqzicoC9A=), S3 Extended Request ID: /YsiAe3Xpr1CvooBUOmp7dVkRvoZhuyZvTCWWajZdIh8qvQHP2hQJVKgnznjrhftXcKqzicoC9A=
	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleErrorResponse(AmazonHttpClient.java:1712)
	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1367)
	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:1113)
	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:770)
	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:744)
	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:726)
	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500(AmazonHttpClient.java:686)
	at com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:668)
	at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:532)
	at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:512)
	at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:4920)
	at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:4866)
	at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:4860)
	at com.amazonaws.services.s3.AmazonS3Client.getBucketLocation(AmazonS3Client.java:999)
	at com.amazonaws.services.s3.AmazonS3Client.getBucketLocation(AmazonS3Client.java:1005)
	at org.apache.hadoop.fs.s3a.S3AFileSystem.lambda$getBucketLocation$4(S3AFileSystem.java:827)
	at org.apache.hadoop.fs.s3a.Invoker.once(Invoker.java:110)
	... 36 more
INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.411 s - in org.apache.hadoop.fs.s3a.ITestS3AMetadataPersistenceException
[ERROR] Tests run: 28, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 103.507 s <<< FAILURE! - in org.apache.hadoop.fs.s3a.s3guard.ITestS3GuardToolDynamoDB
[ERROR] testCLIFsckFailInitializeFs(org.apache.hadoop.fs.s3a.s3guard.ITestS3GuardToolDynamoDB)  Time elapsed: 2.006 s  <<< ERROR!
org.apache.hadoop.fs.s3a.UnknownStoreException: s3a://this-bucket-does-not-exist-dbdfaae0-e22c-4b64-a12e-4b1f31da43ba/
	at org.apache.hadoop.fs.s3a.S3AUtils.translateException(S3AUtils.java:255)
	at org.apache.hadoop.fs.s3a.S3AUtils.translateException(S3AUtils.java:167)
	at org.apache.hadoop.fs.s3a.S3AFileSystem.s3GetFileStatus(S3AFileSystem.java:2971)
	at org.apache.hadoop.fs.s3a.S3AFileSystem.innerGetFileStatus(S3AFileSystem.java:2812)
	at org.apache.hadoop.fs.s3a.S3AFileSystem.getFileStatus(S3AFileSystem.java:2696)
	at org.apache.hadoop.fs.s3a.s3guard.S3GuardFsck.compareS3ToMs(S3GuardFsck.java:117)
	at org.apache.hadoop.fs.s3a.s3guard.S3GuardTool$Fsck.run(S3GuardTool.java:1697)
	at org.apache.hadoop.fs.s3a.s3guard.S3GuardTool.run(S3GuardTool.java:480)
	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
	at org.apache.hadoop.fs.s3a.s3guard.S3GuardTool.run(S3GuardTool.java:2002)
	at org.apache.hadoop.fs.s3a.s3guard.AbstractS3GuardToolTestBase.run(AbstractS3GuardToolTestBase.java:154)
	at org.apache.hadoop.fs.s3a.s3guard.ITestS3GuardToolDynamoDB.lambda$testCLIFsckFailInitializeFs$5(ITestS3GuardToolDynamoDB.java:323)
	at org.apache.hadoop.test.LambdaTestUtils.intercept(LambdaTestUtils.java:498)
	at org.apache.hadoop.test.LambdaTestUtils.intercept(LambdaTestUtils.java:384)
	at org.apache.hadoop.test.LambdaTestUtils.intercept(LambdaTestUtils.java:453)
	at org.apache.hadoop.fs.s3a.s3guard.ITestS3GuardToolDynamoDB.testCLIFsckFailInitializeFs(ITestS3GuardToolDynamoDB.java:322)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
	at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298)
	at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.lang.Thread.run(Thread.java:748)
Caused by: com.amazonaws.services.s3.model.AmazonS3Exception: The specified bucket does not exist (Service: Amazon S3; Status Code: 404; Error Code: NoSuchBucket; Request ID: 65AB7E8F8BBDD54C; S3 Extended Request ID: s2eT1WDJIduDI+GtOOaJnBMjQsekFL3UcXvTtMPgrXQQ4qdueS2ApAxa0GBPvkSYo0lUbNGYVT8=), S3 Extended Request ID: s2eT1WDJIduDI+GtOOaJnBMjQsekFL3UcXvTtMPgrXQQ4qdueS2ApAxa0GBPvkSYo0lUbNGYVT8=
	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleErrorResponse(AmazonHttpClient.java:1712)
	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1367)
	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:1113)
	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:770)
	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:744)
	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:726)
	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500(AmazonHttpClient.java:686)
	at com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:668)
	at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:532)
	at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:512)
	at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:4920)
	at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:4866)
	at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:4860)
	at com.amazonaws.services.s3.AmazonS3Client.listObjectsV2(AmazonS3Client.java:923)
	at org.apache.hadoop.fs.s3a.S3AFileSystem.lambda$listObjects$7(S3AFileSystem.java:1821)
	at org.apache.hadoop.fs.s3a.Invoker.retryUntranslated(Invoker.java:407)
	at org.apache.hadoop.fs.s3a.Invoker.retryUntranslated(Invoker.java:370)
	at org.apache.hadoop.fs.s3a.S3AFileSystem.listObjects(S3AFileSystem.java:1814)
	at org.apache.hadoop.fs.s3a.S3AFileSystem.s3GetFileStatus(S3AFileSystem.java:2944)
	... 28 more

[ERROR] testToolsNoBucket(org.apache.hadoop.fs.s3a.s3guard.ITestS3GuardToolDynamoDB)  Time elapsed: 1.833 s  <<< ERROR!
org.apache.hadoop.fs.s3a.UnknownStoreException: this-bucket-does-not-exist-00000000000
	at org.apache.hadoop.fs.s3a.S3AUtils.translateException(S3AUtils.java:255)
	at org.apache.hadoop.fs.s3a.Invoker.once(Invoker.java:112)
	at org.apache.hadoop.fs.s3a.Invoker.lambda$retry$4(Invoker.java:315)
	at org.apache.hadoop.fs.s3a.Invoker.retryUntranslated(Invoker.java:407)
	at org.apache.hadoop.fs.s3a.Invoker.retry(Invoker.java:311)
	at org.apache.hadoop.fs.s3a.Invoker.retry(Invoker.java:286)
	at org.apache.hadoop.fs.s3a.S3AFileSystem.getBucketLocation(S3AFileSystem.java:826)
	at org.apache.hadoop.fs.s3a.S3AFileSystem.getBucketLocation(S3AFileSystem.java:809)
	at org.apache.hadoop.fs.s3a.s3guard.DynamoDBMetadataStore.initialize(DynamoDBMetadataStore.java:408)
	at org.apache.hadoop.fs.s3a.s3guard.S3Guard.getMetadataStore(S3Guard.java:122)
	at org.apache.hadoop.fs.s3a.S3AFileSystem.initialize(S3AFileSystem.java:423)
	at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:3422)
	at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:139)
	at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:3482)
	at org.apache.hadoop.fs.FileSystem$Cache.getUnique(FileSystem.java:3456)
	at org.apache.hadoop.fs.FileSystem.newInstance(FileSystem.java:558)
	at org.apache.hadoop.fs.s3a.s3guard.S3GuardTool.checkIfS3BucketIsGuarded(S3GuardTool.java:286)
	at org.apache.hadoop.fs.s3a.s3guard.S3GuardTool$Destroy.run(S3GuardTool.java:746)
	at org.apache.hadoop.fs.s3a.s3guard.S3GuardTool.run(S3GuardTool.java:480)
	at org.apache.hadoop.fs.s3a.s3guard.AbstractS3GuardToolTestBase.lambda$testToolsNoBucket$5(AbstractS3GuardToolTestBase.java:510)
	at org.apache.hadoop.test.LambdaTestUtils.intercept(LambdaTestUtils.java:498)
	at org.apache.hadoop.test.LambdaTestUtils.intercept(LambdaTestUtils.java:384)
	at org.apache.hadoop.fs.s3a.s3guard.AbstractS3GuardToolTestBase.testToolsNoBucket(AbstractS3GuardToolTestBase.java:509)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
	at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298)
	at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.lang.Thread.run(Thread.java:748)
Caused by: com.amazonaws.services.s3.model.AmazonS3Exception: The specified bucket does not exist (Service: Amazon S3; Status Code: 404; Error Code: NoSuchBucket; Request ID: A3B2969597009F49; S3 Extended Request ID: /YsiAe3Xpr1CvooBUOmp7dVkRvoZhuyZvTCWWajZdIh8qvQHP2hQJVKgnznjrhftXcKqzicoC9A=), S3 Extended Request ID: /YsiAe3Xpr1CvooBUOmp7dVkRvoZhuyZvTCWWajZdIh8qvQHP2hQJVKgnznjrhftXcKqzicoC9A=
	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleErrorResponse(AmazonHttpClient.java:1712)
	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1367)
	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:1113)
	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:770)
	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:744)
	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:726)
	at com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500(AmazonHttpClient.java:686)
	at com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:668)
	at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:532)
	at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:512)
	at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:4920)
	at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:4866)
	at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:4860)
	at com.amazonaws.services.s3.AmazonS3Client.getBucketLocation(AmazonS3Client.java:999)
	at com.amazonaws.services.s3.AmazonS3Client.getBucketLocation(AmazonS3Client.java:1005)
	at org.apache.hadoop.fs.s3a.S3AFileSystem.lambda$getBucketLocation$4(S3AFileSystem.java:827)
	at org.apache.hadoop.fs.s3a.Invoker.once(Invoker.java:110)
	... 36 more

@apache apache deleted a comment from hadoop-yetus Feb 13, 2020
Created a new class org.apache.hadoop.fs.s3a.impl.ErrorTranslation;
future work related to mapping from AWS exceptions to IOEs&C can
go in there rather than S3AUtils.

Moved the checks for an AmazonServiceException being caused by
a missing bucket to there; this cleans up uses of the probe.

Add a unit test for the recognition/translation.

Change-Id: If81573b0c379def4bae715e4395f3ac19857c08e
@apache apache deleted a comment from hadoop-yetus Feb 13, 2020
@steveloughran
Copy link
Contributor Author

Created a new class org.apache.hadoop.fs.s3a.impl.ErrorTranslation;
future work related to mapping from AWS exceptions to IOEs&C can
go in there rather than S3AUtils.

Moved the checks for an AmazonServiceException being caused by
a missing bucket to there; this cleans up uses of the probe.

Add a unit test for the recognition/translation.

test run: all good except for an intermittent problem I've been seeing with the terasorts where the YARN resource localizer is failing as there's a mismatch between file timestamps...people shouldn't be using S3A as the yarn FS,

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 32s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 markdownlint 0m 0s markdownlint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 7 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 19m 10s trunk passed
+1 💚 compile 0m 36s trunk passed
+1 💚 checkstyle 0m 27s trunk passed
+1 💚 mvnsite 0m 40s trunk passed
+1 💚 shadedclient 15m 10s branch has no errors when building and testing our client artifacts.
+1 💚 javadoc 0m 29s trunk passed
+0 🆗 spotbugs 0m 59s Used deprecated FindBugs config; considering switching to SpotBugs.
+1 💚 findbugs 0m 58s trunk passed
_ Patch Compile Tests _
+1 💚 mvninstall 0m 33s the patch passed
+1 💚 compile 0m 28s the patch passed
-1 ❌ javac 0m 28s hadoop-tools_hadoop-aws generated 3 new + 15 unchanged - 0 fixed = 18 total (was 15)
-0 ⚠️ checkstyle 0m 20s hadoop-tools/hadoop-aws: The patch generated 1 new + 31 unchanged - 0 fixed = 32 total (was 31)
+1 💚 mvnsite 0m 31s the patch passed
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 xml 0m 1s The patch has no ill-formed XML file.
+1 💚 shadedclient 13m 42s patch has no errors when building and testing our client artifacts.
+1 💚 javadoc 0m 25s the patch passed
+1 💚 findbugs 1m 1s the patch passed
_ Other Tests _
+1 💚 unit 1m 25s hadoop-aws in the patch passed.
+1 💚 asflicense 0m 33s The patch does not generate ASF License warnings.
58m 29s
Subsystem Report/Notes
Docker Client=19.03.6 Server=19.03.6 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-1845/3/artifact/out/Dockerfile
GITHUB PR #1845
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle markdownlint xml
uname Linux 98ae0aeb87ad 4.15.0-60-generic #67-Ubuntu SMP Thu Aug 22 16:55:30 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / a98352c
Default Java 1.8.0_242
javac https://builds.apache.org/job/hadoop-multibranch/job/PR-1845/3/artifact/out/diff-compile-javac-hadoop-tools_hadoop-aws.txt
checkstyle https://builds.apache.org/job/hadoop-multibranch/job/PR-1845/3/artifact/out/diff-checkstyle-hadoop-tools_hadoop-aws.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-1845/3/testReport/
Max. process+thread count 412 (vs. ulimit of 5500)
modules C: hadoop-tools/hadoop-aws U: hadoop-tools/hadoop-aws
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-1845/3/console
versions git=2.7.4 maven=3.3.9 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@steveloughran
Copy link
Contributor Author

thought: we should make the s3guard tools not dump the whole stack on the failure here, so either

  • have a handler in main
  • implement ExitCode and return the exit code (44, obviously).

Change-Id: I379afa2a10dc7691abb2bd09014fd52a73e3f7f6
@steveloughran steveloughran deleted the s3/HADOOP-16711-verify-bucket-exists branch October 15, 2021 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants