springxd不在hdfs上写来自twitter的流

busg9geu  于 2021-05-30  发布在  Hadoop
关注(0)|答案(2)|浏览(301)

我正在写最后一篇论文,我对spring xd有一个问题:
我从xd shell运行:
stream create--name cyrustweets--definition“twitterstream--track='mileycyrus,mileycyrus'| log”--部署
而且很有效。我的xd singlenode显示tweets。
但是当我试着在hdfs上写的时候:
stream create--name cyrustweets--definition“twitterstream--track='mileycyrus,mileycyrus'| hdfs”--部署
xd singlenode显示下一个:
08:28:05763 1.0.3.release warn twittersource-1-1 twitter.twitterstreamchanneladapter-读取流时发生异常。org.springframework.messaging.messagehandlingexception:无法将消息负载写入hdfs。
有什么帮助吗?我遵循了以下教程:http://hortonworks.com/hadoop-tutorial/using-spring-xd-to-stream-tweets-to-hadoop-for-sentiment-analysis/
非常感谢

2j4z5cfb

2j4z5cfb1#

原因:java.net.connectexception:conexión rehusada公司
这意味着hdfs端口和/或主机名不正确( Connection Refused 用英语)。
如果您使用的是较新版本的springxd,hadoop连接属性将在中配置 servers.yml ,具有以下默认值:


# Hadoop properties

  hadoop:
    fsUri: hdfs://localhost:8020
    resourceManagerHost: localhost
    resourceManagerPort: 8032
jv2fixgn

jv2fixgn2#

此错误来自源端。twitterapi对流媒体时间有一些限制,通常由您的ip地址决定。你不可能在30分钟内复制100MB的tweets。根据我的经验,你必须在一个星期的时间内,每天蒸汽他们得到重要的日志文件。

相关问题