hadoop+flume+hdfs io错误+connectexception

6ojccjat  于 2021-06-02  发布在  Hadoop
关注(0)|答案(0)|浏览(196)

我正在使用cloudera manager cdh5.4.2,还安装了flume,我无法保存从twitter获得的信息
当我运行flume代理时,它启动正常,但在尝试将新事件数据写入hdfs时会出错。我得到以下错误:

INFO org.apache.flume.sink.hdfs.BucketWriter: Creating hdfs://192.168.109.6:8020/user/flume/tweets/2015/06/03/06//FlumeData.1433311217583.tmp

WARN org.apache.flume.sink.hdfs.HDFSEventSink: HDFS IO error
java.net.ConnectException: Call From cluster-05.xxxx.com/192.168.109.6 to cluster-05.xxxx.com:8020 failed on connection exception: java.net.ConnectException: Connection refused; For more details see: http://wiki.apache.org/hadoop/ConnectionRefused

我所做的配置是:
Flume配置属性:

TwitterAgent.sinks.HDFS.channel = MemChannel
TwitterAgent.sinks.HDFS.type = hdfs
TwitterAgent.sinks.HDFS.hdfs.path = hdfs://192.168.109.6:8020/user/flume/tweets/%Y/%m/%d/%H/
TwitterAgent.sinks.HDFS.hdfs.fileType = DataStream
TwitterAgent.sinks.HDFS.hdfs.writeFormat = Text
TwitterAgent.sinks.HDFS.hdfs.batchSize = 1000
TwitterAgent.sinks.HDFS.hdfs.rollSize = 0
TwitterAgent.sinks.HDFS.hdfs.rollCount = 10000

我使用以下插件:

flume-sources-1.0-SNAPSHOT.jar
twitter4j-core-2.2.6.jar
twitter4j-media-support-2.2.6.jar
twitter4j-stream-2.2.6.jar

(我将twitter4j--3.0.3.jar的版本替换为twitter4j--2.2.6.jar)
也使用hdfs用户的目录

hadoop fs -ls /user/flume : 
drwxrwxrwx - flume flume  /user/flume/tweets

core-site.xml(位于/hadoop/conf)我补充道:

<property>
<name>fs.default.name</name>
<value>hdfs://localhost:8020</value>
</property>

我还在主机上运行hadoop dfsadmin-safemode leave,我将flume代理保留为hdfs用户
我真的很感谢你在这个问题上的帮助。

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题