You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flume.apache.org by "Dave Lund (JIRA)" <ji...@apache.org> on 2014/11/05 13:39:33 UTC

[jira] [Created] (FLUME-2537) SpillableMemoryChannel throws NPE when sink throws exception

Dave Lund created FLUME-2537:
--------------------------------

             Summary: SpillableMemoryChannel throws NPE when sink throws exception
                 Key: FLUME-2537
                 URL: https://issues.apache.org/jira/browse/FLUME-2537
             Project: Flume
          Issue Type: Bug
          Components: Channel
    Affects Versions: v1.5.0.1
         Environment: 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
            Reporter: Dave Lund
            Priority: Minor


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)



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