[
https://issues.apache.org/jira/browse/HTRACE-18?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14247827#comment-14247827
]
Long Zhou commented on HTRACE-18:
---------------------------------
Setup Instructions:
1) build and deploy
$ cd htrace/htrace-flume
$ mvn compile assembly:single
$ cp target/htrace-flume-*-jar-with-dependencies.jar
$HADOOP_HOME/share/hadoop/hdfs/lib/
2) Edit hdfs-site.xml to include the following:
<property>
<name>hadoop.trace.spanreceiver.classes</name>
<value>org.htrace.impl.FlumeSpanReceiver</value>
</property>
<property>
<name>hadoop.htrace.flume.hostname</name>
<value>127.0.0.1</value>
</property>
<property>
<name>hadoop.htrace.flume.port</name>
<value>60000</value>
</property>
3) Setup flume
a) create flume-conf.properties file with following content:
agent.sources = avro-collection-source
agent.channels = memoryChannel
agent.sinks = loggerSink hdfs-sink
# avro source - should match the configurations in hdfs-site.xml
agent.sources.avro-collection-source.type = avro
agent.sources.avro-collection-source.bind = 127.0.0.1
agent.sources.avro-collection-source.port = 60000
agent.sources.avro-collection-source.channels = memoryChannel
# sample hdfs-sink, change to any sink that flume supports
agent.sinks.hdfs-sink.type = hdfs
agent.sinks.hdfs-sink.hdfs.path = hdfs://127.0.0.1:9000/flume
agent.sinks.hdfs-sink.channel = memoryChannel
agent.sinks.hdfs-sink.hdfs.fileType = DataStream
agent.sinks.hdfs-sink.hdfs.writeFormat = Text
agent.sinks.hdfs-sink.hdfs.rollSize = 0
agent.sinks.hdfs-sink.hdfs.rollCount = 10000
agent.sinks.hdfs-sink.hdfs.batchSize = 100
#memory channel
agent.channels.memoryChannel.capacity = 10000
agent.channels.memoryChannel.transactionCapacity = 1000
b) run flume agent using command "flume-ng agent -c ./conf/ -f
./conf/flume-conf.properties -n agent"
> Support flume receiver
> ----------------------
>
> Key: HTRACE-18
> URL: https://issues.apache.org/jira/browse/HTRACE-18
> Project: HTrace
> Issue Type: Improvement
> Reporter: Long Zhou
> Attachments: htrace-flume01.patch, htrace-flume02.patch
>
>
> Hi htrace devs,
> I have been using htrace for a while and find it very useful.
> I needed a way to collect traces from remote servers via flume, so I
> implemented the flume receiver (patch attached). If this code is useful to
> other users, I would like to contribute it to the project.
> Please kindly review the patch, and let me know if anything I should
> fix/improve.
> Thanks,
> Long Zhou
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)