apache avro可以写入网络吗?

时间:2013-12-04 04:00:50

标签: flume avro

我正在尝试将大量日志写入hdfs。为此,我使用水槽与hdfs作为接收器和avro作为源。我需要做的是使用avro通过网络序列化我的日志到我的水槽。水槽的来源配置为:

a1.sources = r1
a1.channels = c1
a1.sources.r1.type = avro
a1.sources.r1.channels = c1
a1.sources.r1.bind = 0.0.0.0
a1.sources.r1.port = 4141

编辑:固定代码块

1 个答案:

答案 0 :(得分:0)

使用Flume' RpcClient

RpcClient client = RpcClientFactory.getDefaultInstance(host, 4141);
client.append(EventBuilder.withBody(message));
client.close();
相关问题