Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
1.5.0.1
-
None
-
None
-
JAVA:
java version "1.8.0_20-ea"
Java(TM) SE Runtime Environment (build 1.8.0_20-ea-b23)
Java HotSpot(TM) 64-Bit Server VM (build 25.20-b22, mixed mode)Config:
a1.sources = r1
a1.channels = c1
a1.sinks = k1a1.sources.r1.type = ...
- Describe the sink
a1.sinks.k1.type = avro
a1.sinks.k1.hostname = flume-test
a1.sinks.k1.port=8080
- Use a channel which buffers events in memory
a1.channels.c1.type = SPILLABLEMEMORY
a1.channels.c1.memoryCapacity = 10
a1.channels.c1.byteCapacity=655270
a1.channels.c1.overflowCapacity = 1000000
a1.channels.c1.transactionCapacity = 5
- Bind the source and sink to the channel
a1.sources.r1.channels = c1
a1.sinks.k1.channel = c1
JAVA: java version "1.8.0_20-ea" Java(TM) SE Runtime Environment (build 1.8.0_20-ea-b23) Java HotSpot(TM) 64-Bit Server VM (build 25.20-b22, mixed mode) Config: a1.sources = r1 a1.channels = c1 a1.sinks = k1 a1.sources.r1.type = ... Describe the sink a1.sinks.k1.type = avro a1.sinks.k1.hostname = flume-test a1.sinks.k1.port=8080 Use a channel which buffers events in memory a1.channels.c1.type = SPILLABLEMEMORY a1.channels.c1.memoryCapacity = 10 a1.channels.c1.byteCapacity=655270 a1.channels.c1.overflowCapacity = 1000000 a1.channels.c1.transactionCapacity = 5 Bind the source and sink to the channel a1.sources.r1.channels = c1 a1.sinks.k1.channel = c1 - Describe the sink
Description
I'm aware that the spillablememory channel is an ongoing effort and not production ready but thought I'd submit this to help improve it.
I've created a rather simple test case where I use a spillablememory channel connecting to an avro sink (this sink is pointing to another flume agent as a next hop). When I shutdown the flume in the next hop, which causes the avro client to get a ConnectionRefused exception, the SpillableMemoryChannel attempts to rollback the transaction, but gets the following NPE:
java.lang.NullPointerException
at org.apache.flume.channel.SpillableMemoryChannel$SpillableMemoryTransaction.doRollback(SpillableMemoryChannel.java:574)
at org.apache.flume.channel.BasicTransactionSemantics.rollback(BasicTransactionSemantics.java:168)
at org.apache.flume.sink.AbstractRpcSink.process(AbstractRpcSink.java:383)
at org.apache.flume.sink.DefaultSinkProcessor.process(DefaultSinkProcessor.java:68)
at org.apache.flume.SinkRunner$PollingRunner.run(SinkRunner.java:147)
at java.lang.Thread.run(Thread.java:745)