Re: Converting text to avro in Flume

2013-10-07 Thread Deepak Subhramanian
Hi Hari, Finally I got it working.I am not sure what was missing in my earlier configuration. My configuration might not have used by the instance agent because of the way CDH uses inheritances on agent configuration. Thanks for all your help. tier1.sinks.sink1.type = hdfs tier1.sinks.sink1.hdf

Re: Converting text to avro in Flume

2013-10-06 Thread Hari Shreedharan
The Avro Sink is used for comunication between Flume agents. To directly insert into HDFS you simply use an Avro Serializer with the HDFS sink. Thanks, Hari On Sunday, October 6, 2013 at 3:38 PM, Deepak Subhramanian wrote: > Hi Hari , > I tried using an avro sink after HTTPSource and then an

Re: Converting text to avro in Flume

2013-10-06 Thread Deepak Subhramanian
Hi Hari , I tried using an avro sink after HTTPSource and then an avro source and hdfs sink and it seems to be working. Do we have to use an avro sink first or can we directly convert to avro using HDFS sink ? Thanks, Deepak On Sun, Oct 6, 2013 at 11:27 PM, Deepak Subhramanian < deepak.subhraman

Re: Converting text to avro in Flume

2013-10-06 Thread Deepak Subhramanian
There was a mistake in my configuration. I had hdfs infront of serializer. Changed tier1.sinks.sink1.hdfs.serializer = avro_event to tier1.sinks.sink1.serializer = avro_event But it is still generating a sequence file. This is what I get. SEQ!org.apache.hadoop.io.LongWritableorg.apache.had

Re: Converting text to avro in Flume

2013-10-04 Thread Deepak Subhramanian
Thanks Hari. I speficied the fileType. This is what I have. I will try again and let you know. tier1.sources = httpsrc1 tier1.channels = c1 tier1.sinks= sink1 tier1.sources.httpsrc1.bind = 127.0.0.1 tier1.sources.httpsrc1.type = http tier1.sources.httpsrc1.port = tier1.sources.htt

Re: Converting text to avro in Flume

2013-10-04 Thread Hari Shreedharan
The default data type for HDFS Sink is Sequence file. Set the hdfs.fileType to DataStream. See details here: http://flume.apache.org/FlumeUserGuide.html#hdfs-sink Thanks, Hari On Friday, October 4, 2013 at 6:52 AM, Deepak Subhramanian wrote: > I tried using the HDFS Sink to generate the avr

Re: Converting text to avro in Flume

2013-10-04 Thread Deepak Subhramanian
I tried using the HDFS Sink to generate the avro file by using the serializer as avro_event. But it is not generating avro file. But a sequence file. Is it not suppose to generate a avro file with default schema ? Or do I have to generate the avro data from text in my HTTPHandler source ? "{ \"t

Converting text to avro in Flume

2013-10-03 Thread Deepak Subhramanian
Hi , I want to convert xml files in text to an avro file and store it in hdfs . I get the xml files as a post request. I extended the HTTPHandler to process the XML post request. Do I have to convert the data in text to avro in HTTPHandler or does the Avro Sink or HDFSSink convert it directly to