我正在尝试写大量的日志到hdfs。为此,我使用Flume与hdfs作为Flume和avro作为源。我需要做的是通过网络使用avro将日志序列化到flume中。Flume的来源配置为:
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
编辑:固定代码块
tf7tbtn21#
使用flume的rpcclient:
RpcClient client = RpcClientFactory.getDefaultInstance(host, 4141); client.append(EventBuilder.withBody(message)); client.close();
1条答案
按热度按时间tf7tbtn21#
使用flume的rpcclient: