You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by "Chris Riccomini (JIRA)" <ji...@apache.org> on 2015/01/29 20:14:36 UTC
[jira] [Created] (SAMZA-542) CheckpointTool NPE's when a partition
is empty
Chris Riccomini created SAMZA-542:
-------------------------------------
Summary: 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
Fix For: 0.9.0
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)