Skip to content

Conversation

@LeilaMoussa
Copy link
Contributor

Description

[Describe what this change achieves]
Change S3EventBridgeNotification.Detail.Object.size data type from int to long to allow files larger than 2GB (int max).

Issues Resolved

Resolves #5276

Check List

  • New functionality includes testing.
  • New functionality has a documentation issue. Please link to it in this PR.
    • New functionality has javadoc added
  • Commits are signed with a real name per the DCO

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: LeilaMoussa <leila.farah.moussa@gmail.com>
@dlvenable
Copy link
Member

@LeilaMoussa , Thank you for this fix! Yes, this looks like the way to solve it.

The build is throwing this error.

ParsedMessageTest.java:35: error: method nextLong in class Random cannot be applied to given types;

        testSize = RANDOM.nextLong(1_000_000_000) + 1;

I believe that Java's random does not provide a bounds. You can use org.apache.commons.lang3.RandomUtils

RandomUtils.insecure().randomLong(1_000_000L, 1_000_000_000_000L);

@LeilaMoussa
Copy link
Contributor Author

@dlvenable Indeed, nextLong does not accept bounds. (Java classpath was not properly configured on my IDE, so I did not catch that.) Will fix.

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.

[BUG] Error Processing Files Larger Than 2GB Due to Integer Overflow in Data Prepper

2 participants