You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have some code where I setup AmazonS3 client using LocalStackContainer:
override val container: LocalStackContainer = new LocalStackContainer(services = List(S3))
implicit var client: AmazonS3 = null
var sparkCsvReader: SparkCsvReader = null
override protected def beforeAll(): Unit = {
container.start()
client = AmazonS3ClientBuilder
.standard()
.withEndpointConfiguration(
new AwsClientBuilder.EndpointConfiguration(
container.container.getEndpointOverride(S3).toString,
container.container.getRegion
)
)
.withCredentials(
new AWSStaticCredentialsProvider(
new BasicAWSCredentials(container.container.getAccessKey, container.container.getSecretKey)
)
)
.build()
ss.sparkContext.hadoopConfiguration.set("fs.s3a.endpoint", container.container.getEndpointOverride(S3).toString)
ss.sparkContext.hadoopConfiguration.set("fs.s3a.access.key", container.container.getAccessKey)
ss.sparkContext.hadoopConfiguration.set("fs.s3a.secret.key", container.container.getSecretKey)
ss.sparkContext.hadoopConfiguration.set("fs.s3a.impl","org.apache.hadoop.fs.s3a.S3AFileSystem")
ss.sparkContext.hadoopConfiguration.set("fs.s3.impl","org.apache.hadoop.fs.s3a.S3AFileSystem")
sparkCsvReader = new SparkCsvReader() // Class I would like to test
}
When I use the client and create a bucket and upload two files everything works fine. But when I try to read them back from the S3 bucket, I keep getting following error:
open `s3a://bucket1/file1.csv': Change reported by S3 during open at position 0. ETag 079a45cc9a4cda24698dddf8f6263cdd was unavailable
The text was updated successfully, but these errors were encountered:
Hi,
I'm currently using following maven dependencies in my project:
I have some code where I setup
AmazonS3
client usingLocalStackContainer
:When I use the
client
and create a bucket and upload two files everything works fine. But when I try to read them back from the S3 bucket, I keep getting following error:The text was updated successfully, but these errors were encountered: