1
下文提到的是我的水槽的配置文件......在Hadoop版本2.2.0運行水槽1.4用Hadoop 2.2.0和HDFS吸收具有類型的問題
# example.conf: A single-node Flume configuration
# Name the components on this agent
a1.sources = r1
a1.sinks = k1
a1.channels = c1
# reading file using tail command and sending data to channel
a1.sources.r1.type = spooldir
a1.sources.r1.spoolDir = /data/apache-flume-1.4.0-bin/logs
a1.sources.r1.channels = c1
# Use a channel which buffers events in memory
a1.channels.c1.type = memory
a1.channels.c1.capacity = 1000
a1.channels.c1.transactionCapacity = 100
# Bind the source and sink to the channel
a1.sources.r1.channels = c1
a1.sinks.k1.channel = c1
a1.sinks.k1.type = hdfs
a1.sinks.k1.channel = c1
a1.sinks.k1.hdfs.path = hdfs://PPWFMD509:9160/flume-test
a1.sinks.k1.hdfs.filePrefix = events-
a1.sinks.k1.hdfs.round = true
a1.sinks.k1.hdfs.roundValue = 10
a1.sinks.k1.hdfs.roundUnit = minute
(增加了Hadoop的核心1.2.1。 jar文件到flume lib目錄)
關於maven倉庫我無法爲hadoop-core2.2.x文件jar。爲什麼?和什麼id hadoop-core-0.20版本?
運行相同,並把文件時已下文提到的例外
2014-02-26 14:51:30,865 (SinkRunner-PollingRunner-DefaultSinkProcessor) [INFO - org.apache.flume.sink.hdfs.BucketWriter.open(BucketWriter.java:219)] Creating hdfs://PPWFMD509:9160/flume-test/events-.1393406490812.tmp
2014-02-26 14:51:31,079 (SinkRunner-PollingRunner-DefaultSinkProcessor) [WARN - org.apache.flume.sink.hdfs.HDFSEventSink.process(HDFSEventSink.java:418)] HDFS IO error
org.apache.hadoop.ipc.RemoteException: Server IPC version 9 cannot communicate with client version 4
at org.apache.hadoop.ipc.Client.call(Client.java:1113)
at org.apache.hadoop.ipc.RPC$Invoker.invoke(RPC.java:229)