Open alexgb1 opened 2 years ago
How are you transferring the object from S3 to BP? Are you downloading the object from S3 locally and then sending it to BP? Or are you piping the stream directly from the S3 download into the BP’s put call?
The error Cannot retry request with a non-repeatable request entity
suggests that some network interruption happened and the data had to be re-sent. The re-sending of the data failed because we could not seek back to the beginning of the input stream.
In your code snippet for your implementation of the buildChannel
call, what is inputStream
? Is it seekable?
Also, setting maxUploadSize
does affect the blob size assuming that blobbing is enabled.
How are you transferring the object from S3 to BP? Are you downloading the object from S3 locally and then sending it to BP? Or are you piping the stream directly from the S3 download into the BP’s put call?
The stream of bytes comes directly from S3.
In your code snippet for your implementation of the buildChannel call, what is inputStream? Is it seekable?
The inputStream
is not seekable. It's a pull-based stream written into an OutputStream piped to an InputStream.
Also, setting maxUploadSize does affect the blob size assuming that blobbing is enabled.
Regarding the max upload size, is setting the maxUploadSize
through com.spectralogic.ds3client.helpers.Ds3ClientHelpers
(as in the example above) different than setting it through the com.spectralogic.ds3client.Ds3Client
e.g.
ds3Client.putBulkJobSpectraS3(
new PutBulkJobSpectraS3Request(
"bucket",
List(new Ds3Object(ds3Object.key, ds3Object.size))
).withMaxUploadSize(ds3Object.size)
)
I'm asking because the behaviour is different than expected. The maxUploadSize
on the Ds3Client
works as expected and the one on the Ds3ClientHelpers
it doesn't.
We managed to PUT objects bigger than 64 GB, using the putBulkJobSpectraS3
method on the Ds3Client
by setting the max upload size in the PutBulkJobSpectraS3Request
.
Streaming Strategy
Since you have non-seekable input streams, you need to run the job with StreamingTransferBehavior
as opposed to the default RandomAccessTransferBehavior
. You can do this by starting the job with Job.startWriteJobUsingStreamedBehavior
instead of Job.startWriteJob()
. You can see the javadoc here.
Max Upload Size
Setting the MAX_UPLOAD_SIZE
on the helpers just adds that value to the PutBulkJobSpectraS3Request, which you can see here. Note that if the value cannot exceed 1 TB, and 1 TB will be used if a larger value is specified.
We set the max upload size in the options, along with other properties:
val options = WriteJobOptions
.create()
.withChecksumType(ChecksumType.Type.MD5)
.withWriteOptimization(WriteOptimization.PERFORMANCE)
.withMaxUploadSize(dpaConfig.maxUploadSize)
and then used the startWriteJobUsingStreamedBehavior
val job = helpers.startWriteJobUsingStreamedBehavior(ds3Object.location.bucket, List(content).asJava, options)
We did everything as in the javadoc and then the write would fail at the default of 64GB.
We are not using the helper currently and it works as expected.
Is there any test for this scenario using the helper class?
Hello,
We've been having some issues transfering an object from S3 to Blackpearl using this library, version 5.4.0
We are transfering using the following
ObjectChannelBuilder
It usually happens when we are transfering files bigger than 64 GB.
I configured the max upload size
but didn't change the behaviour. (I assume this might not affect the blob size)
Please see stack trace below, any feedback is welcome.