You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@samza.apache.org by Xinyu Liu <xi...@gmail.com> on 2016/07/29 00:12:16 UTC
Review Request 50588: SAMZA-982: Add null check for offset update in
OffsetManager
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/50588/
-----------------------------------------------------------
Review request for samza.
Repository: samza
Description
-------
During the process of making offsetManager thread-safe, I changed the impl of lastProcessedOffsets to use ConcurrentHashMap. However, I didn't realize offset can be null so it will trigger null pointer exception when ConcurrentHashMap.put(key, null). The fix will add the null check so null offset will be still supported such as in our hello-samza example.
Diffs
-----
samza-core/src/main/scala/org/apache/samza/checkpoint/OffsetManager.scala 7245902c69c751a4e8853745de46adf5553d45f5
samza-core/src/test/scala/org/apache/samza/checkpoint/TestOffsetManager.scala 75ba8af7cdda6b297abaa3dbb99c98b406e31f88
Diff: https://reviews.apache.org/r/50588/diff/
Testing
-------
tested by unit tests and verifed also in hello-samza jobs.
Thanks,
Xinyu Liu