-
Type:
Bug
-
Status: Done
-
Priority:
Major
-
Resolution: Complete
-
Affects Version/s: 1.0 GA
-
Component/s: Runtime
-
Labels:
-
Story Points:5
-
Rank (Obsolete):46039
Exception in a tap will stop the tapped stream from sinking data.
Background
Running xd-singlenode.
We experienced this when streaming data from a rabbit queue to hdfs. The stream was tapped and we had a groovy processor on the tap stream. Any exceptions in the processor stopped the main stream from writing data to the hdfs sink.
Steps to reproduce.
1: Create a groovy script that throws an exception in modules/processor/scripts/exceptionthrower.groovy. Code below
/** * Custom processor to be wired into a tap to throw an exception. */ throw new RuntimeException("Error from processor")
2: Create a sample main stream
xd:>stream create --name ticktock --definition "time | log" --deploy
3: Tail the log to confirm the data is going to the sink. We see 'sink.ticktock' appearing in the log as expected.
4: Add a tap to the stream that will throw an exception.
xd:>stream create --name exTap --definition "tap:stream:ticktock > script --location=exceptionthrower.groovy | log" --deploy
5: Tail the log and we see that there are no more 'sink.ticktock' strings being logged. Looks like the main stream is no longer sending messages to the sink.