这是使用大数据的东西,比如Apache火花和Hadoop我们的第一个步骤。阿帕奇星火错误:无法连接到akka.tcp:// @ sparkMaster
我们安装了Cloudera CDH 5.3。我们选择从cloudera管理器安装spark。 Spark在集群中的一个节点上运行良好。
从我的机器我做了一个连接到读取存储在Hadoop的HDFS一个文本文件中的小应用程序。
我试图从Eclipse运行应用程序并显示这些消息
15/02/11 14:44:01 INFO client.AppClient$ClientActor: Connecting to master spark://10.62.82.21:7077... 15/02/11 14:44:02 WARN client.AppClient$ClientActor: Could not connect to akka.tcp://[email protected]:7077: akka.remote.InvalidAssociation: Invalid address: akka.tcp://[email protected]:7077 15/02/11 14:44:02 WARN Remoting: Tried to associate with unreachable remote address [akka.tcp://[email protected]:7077]. Address is now gated for 5000 ms, all messages to this address will be delivered to dead letters. Reason: Connection refused: no further information: /10.62.82.21:7077
的应用是有一个类使用以下行
JavaSparkContext sc = new JavaSparkContext(new SparkConf().setAppName("Spark Count").setMaster("spark://10.62.82.21:7077"));
的创建上下文这个IP是机器火花工作的IP地址。
然后我尝试使用以下行来读取HDFS文件
sc.textFile("hdfs://10.62.82.21/tmp/words.txt")
当我跑我得到了应用程序的
您是否为同一台计算机配置了多个IP? – Harman 2015-02-11 13:16:13
实际上,我不知道,但如果我使用域名而不是IP,则会引发相同的异常。 – Fanooos 2015-02-11 13:18:44
当你启动ifconfig时,你会看到什么 – Harman 2015-02-12 06:02:27