Fwd: Getting "ClassCastException: FlumeEvent cannot be cast to ..." when using File Channel

2017-08-24 Thread Muhammad Yaseen
Hello, I have implemented a custom HTTPSource handler, and am not using the default { "headers": { } , "body": "text" } format. Hence, I am also not using the default JSONEvent class and have defined my own class (which also implements Event interface). class ServerEvent implements Event. It ha

Re: Getting "ClassCastException: FlumeEvent cannot be cast to ..." when using File Channel

2017-08-24 Thread Denes Arvay
Hi Muhammad, File channel converts the events to its internal FlumeEvent class ( https://github.com/apache/flume/blob/trunk/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/FlumeEvent.java) during the put operation: https://github.com/apache/flume/blob/trunk/flume-n

Re: Getting "ClassCastException: FlumeEvent cannot be cast to ..." when using File Channel

2017-08-24 Thread Muhammad Yaseen
Hi Denes, Many thanks for you suggestion. This is the solution I was considering, but was hoping there is a cleaner way of achieving the goal and not having to pass the information around in body. I feel that this should have been mentioned in Flume docs in File Channel section. I'll go with you