Skip to content

Conversation

@shanthoosh
Copy link
Contributor

Symptom: Launching a stateful samza job with high RocksDB TTL(around 28 days) results in the following exception:

Exception in thread "main" org.apache.samza.SamzaException: Failed to run application
        at org.apache.samza.runtime.RemoteApplicationRunner.run(RemoteApplicationRunner.java:79)
        at org.apache.samza.runtime.ApplicationRunnerUtil.invoke(ApplicationRunnerUtil.java:54)
        at org.apache.samza.runtime.ApplicationRunnerMain.main(ApplicationRunnerMain.java:53)
Caused by: java.lang.NumberFormatException: For input string: "2419200000"
        at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
        at java.lang.Integer.parseInt(Integer.java:583)
        at java.lang.Integer.parseInt(Integer.java:615)
        at scala.collection.immutable.StringLike$class.toInt(StringLike.scala:272)
        at scala.collection.immutable.StringOps.toInt(StringOps.scala:29)
        at org.apache.samza.config.KafkaConfig.getChangelogKafkaProperties(KafkaConfig.scala:331)
        at org.apache.samza.system.kafka.KafkaSystemAdmin.<init>(KafkaSystemAdmin.java:159)
        at com.linkedin.samza.system.kafka.SamzaLiKafkaSystemAdmin.<init>(SamzaLiKafkaSystemAdmin.java:40)
        at com.linkedin.samza.system.kafka.SamzaLiKafkaSystemFactory.getAdmin(SamzaLiKafkaSystemFactory.java:141)
        at org.apache.samza.config.SystemConfig.lambda$getSystemAdmins$0(SystemConfig.java:97)
        at java.util.stream.Collectors.lambda$toMap$58(Collectors.java:1321)
        at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
        at java.util.HashMap$EntrySpliterator.forEachRemaining(HashMap.java:1696)
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)

Cause: RocksDB TTL can be set to very high value, but the validation-checks in changelog topic config generation was casting the RocksDB TTL value to int type.

Tests: Added unit tests to validate that change-log topic configuration gets correctly generated for stores with high TTL(> INT_MAX)

API Changes: None

Upgrade Instructions: None

Usage Instructions: None

@shanthoosh shanthoosh changed the title Fix the RocksDB TTL type conversion in change log properties generation. Fix the change log topic properties generation. Jan 17, 2020
@shanthoosh shanthoosh requested a review from prateekm January 17, 2020 03:26
@shanthoosh
Copy link
Contributor Author

@prateekm Can you please take a look when you get a chance.

@shanthoosh shanthoosh changed the title Fix the change log topic properties generation. SAMZA-2438: Fix the change log topic properties generation. Jan 17, 2020
Copy link
Contributor

@prateekm prateekm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks.

@shanthoosh shanthoosh merged commit 8a45efe into apache:master Jan 17, 2020
rmatharu-zz pushed a commit to rmatharu-zz/samza that referenced this pull request Jan 21, 2020
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.

2 participants