You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by "Navina Ramesh (JIRA)" <ji...@apache.org> on 2015/11/17 23:28:11 UTC

[jira] [Updated] (SAMZA-542) CheckpointTool NPE's when a partition is empty

     [ https://issues.apache.org/jira/browse/SAMZA-542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Navina Ramesh updated SAMZA-542:
--------------------------------
    Fix Version/s:     (was: 0.10.0)

> CheckpointTool NPE's when a partition is empty
> ----------------------------------------------
>
>                 Key: SAMZA-542
>                 URL: https://issues.apache.org/jira/browse/SAMZA-542
>             Project: Samza
>          Issue Type: Bug
>          Components: kafka
>    Affects Versions: 0.7.0, 0.8.0
>            Reporter: Chris Riccomini
>
> In the old-style 0.7.0 checkpoint topics, if there is an empty checkpoint partition, the checkpoint tool will NPE with:
> {noformat}
> Exception in thread "main" java.lang.NullPointerException
> 	at org.apache.samza.checkpoint.CheckpointTool$$anonfun$readLastCheckpoint$1.apply(CheckpointTool.scala:138)
> 	at org.apache.samza.checkpoint.CheckpointTool$$anonfun$readLastCheckpoint$1.apply(CheckpointTool.scala:136)
> 	at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:251)
> 	at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:251)
> 	at scala.collection.immutable.HashSet$HashSet1.foreach(HashSet.scala:153)
> 	at scala.collection.immutable.HashSet$HashTrieSet.foreach(HashSet.scala:306)
> 	at scala.collection.immutable.HashSet$HashTrieSet.foreach(HashSet.scala:306)
> 	at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:251)
> 	at scala.collection.AbstractTraversable.flatMap(Traversable.scala:105)
> 	at org.apache.samza.checkpoint.CheckpointTool.readLastCheckpoint(CheckpointTool.scala:136)
> 	at org.apache.samza.checkpoint.CheckpointTool.run(CheckpointTool.scala:122)
> 	at org.apache.samza.checkpoint.CheckpointTool$.main(CheckpointTool.scala:102)
> 	at org.apache.samza.checkpoint.CheckpointTool.main(CheckpointTool.scala)
> {noformat}
> We should verify that this doesn't happen in 0.9.0.
> The correct behavior when a checkpoint topic has an empty partition is a little undefined. If the empty partition is expected, this should be ignored. If it's not expected, then an exception should be thrown, or an error printed, or something.
> I don't think it's worth back-porting patches for this, but it does warrant a tracker ticket, and verification that it doesn't happen on {{master}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)