Skip to content

Commit e1b4511

Browse files
authored
Merge pull request #369 from rpmoore/max_upload_fix
Modifying when the maxUploadSize property is set on the bulk put job
2 parents 4a48b91 + 889a659 commit e1b4511

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

ds3-sdk/src/main/java/com/spectralogic/ds3client/helpers/Ds3ClientHelpersImpl.java

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,19 @@ private Ds3ClientHelpers.Job innerStartWriteJob(final String bucket,
108108
final Iterable<Ds3Object> objectsToWrite,
109109
final WriteJobOptions options)
110110
throws IOException {
111-
final PutBulkJobSpectraS3Response prime = this.client.putBulkJobSpectraS3(
112-
new PutBulkJobSpectraS3Request(bucket, Lists.newArrayList(objectsToWrite))
111+
final PutBulkJobSpectraS3Request request = new PutBulkJobSpectraS3Request(bucket, Lists.newArrayList(objectsToWrite))
113112
.withPriority(options.getPriority())
114-
.withMaxUploadSize(options.getMaxUploadSize())
115113
.withAggregating(options.isAggregating())
116-
.withIgnoreNamingConflicts(options.doIgnoreNamingConflicts()));
114+
.withIgnoreNamingConflicts(options.doIgnoreNamingConflicts());
115+
116+
if (options.getMaxUploadSize() > 0) {
117+
request.withMaxUploadSize(options.getMaxUploadSize());
118+
}
119+
120+
final PutBulkJobSpectraS3Response prime = this.client.putBulkJobSpectraS3(
121+
request);
122+
123+
117124
return new WriteJobImpl(
118125
this.client,
119126
prime.getResult(),

0 commit comments

Comments
 (0)