-
Notifications
You must be signed in to change notification settings - Fork 62
Cassandra Sink: Failed to commit transaction when the channel is full #152
Comments
Hi @thun8392, |
Hi @aaitor, 2016-01-07 11:14:34 ERROR SpoolDirectorySource:256 - FATAL: Spool Directory source srcdir: { spoolDir: /var/log/postal/source/ }: Uncaught exception in SpoolDirectorySource thread. Restart or reconfigure Flume to continue processing. Because source log file has non UTF-8 characters that it is solved with 'postal.sources.srcdir.inputCharset = ISO8859-1') Then with the values to 1000 and 100, it does not appear the 'CassandraSink - Failed to commit transaction' error again. Flume-ng logs (truncated in the line 9656 because it has more than 100000 lines): Is it normal the warning line "WARN CassandraTable:74 - Event [Event headers = {}, body.length = 83 ] could not be mapped. Suggestion: Cassandra is case sensitive, so maybe you can check field names" for every log line that it does not match with the interceptor regular expression? Regards. |
Hi @thun8392, another recommendation in order to find any Cassandra sink configuration issue is to add a test logger sink: When you run your Ingestion agent, if you can see in log files the trace with the data the problem can be in Cassandra sink configuration file. I would take a look at your /opt/sds/ingestion/conf/init_cassandra.cql . The transformed data should have the same structure in your cql and headers in order to map properly the data with cassandra table. If you can't see the data using the logger sink, the problem can be in the interceptor. Maybe the interceptor is not applying the data transformation properly. Hope it helps |
Hi @aaitor, About channel transactionCapacity and capacity, why does it not work with 100 and 40 ? |
Hi @thun8392 , |
If the memory or file channel are full, cassandra sink fails when it tries to commit transaction. Error logs:
2015-12-28 11:06:59 DEBUG CassandraSink:181 - Executing CassandraSink.process()...
2015-12-28 11:06:59 ERROR CassandraSink:231 - Failed to commit transaction. Transaction rolled back.
org.apache.flume.ChannelException: Take list for MemoryTransaction, capacity 40 full, consider committing more frequently, increasing capacity, or increasing thread count
at org.apache.flume.channel.MemoryChannel$MemoryTransaction.doTake(MemoryChannel.java:96)
at org.apache.flume.channel.BasicTransactionSemantics.take(BasicTransactionSemantics.java:113)
at org.apache.flume.channel.BasicChannelSemantics.take(BasicChannelSemantics.java:95)
at com.stratio.ingestion.sink.cassandra.CassandraSink.process(CassandraSink.java:190)
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)
2015-12-28 11:06:59 ERROR SinkRunner:160 - Unable to deliver event. Exception follows.
org.apache.flume.ChannelException: Take list for MemoryTransaction, capacity 40 full, consider committing more frequently, increasing capacity, or increasing thread count
at org.apache.flume.channel.MemoryChannel$MemoryTransaction.doTake(MemoryChannel.java:96)
at org.apache.flume.channel.BasicTransactionSemantics.take(BasicTransactionSemantics.java:113)
at org.apache.flume.channel.BasicChannelSemantics.take(BasicChannelSemantics.java:95)
at com.stratio.ingestion.sink.cassandra.CassandraSink.process(CassandraSink.java:190)
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)
Flume configuration:
flume-conf.properties.txt
Complete flume-ng logs:
flume-ng-logs.txt
The text was updated successfully, but these errors were encountered: