首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Hadoop -伪分布式操作

Hadoop -伪分布式操作
EN

Stack Overflow用户
提问于 2013-11-28 09:19:57
回答 6查看 8.5K关注 0票数 1

我正在尝试使用以下命令将文件quangle.txt从我的本地系统复制到Hadoop:

代码语言:javascript
复制
testuser@ubuntu:~/Downloads/hadoop/bin$ ./hadoop fs -copyFromLocal Desktop/quangle.txt hdfs://localhost/testuser/quangle.txt

13/11/28 06:35:50 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:8020. Already tried 0 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1 SECONDS)
13/11/28 06:35:51 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:8020. Already tried 1 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1 SECONDS)
13/11/28 06:35:52 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:8020. Already tried 2 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1 SECONDS)
13/11/28 06:35:53 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:8020. Already tried 3 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1 SECONDS)
13/11/28 06:35:54 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:8020. Already tried 4 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1 SECONDS)
13/11/28 06:35:55 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:8020. Already tried 5 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1 SECONDS)
13/11/28 06:35:56 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:8020. Already tried 6 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1 SECONDS)
13/11/28 06:35:57 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:8020. Already tried 7 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1 SECONDS)
13/11/28 06:35:58 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:8020. Already tried 8 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1 SECONDS)
13/11/28 06:35:59 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:8020. Already tried 9 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1 SECONDS)
copyFromLocal: Call to localhost/127.0.0.1:8020 failed on connection exception: java.net.ConnectException: Connection refused

我尝试ping 127.0.0.1,得到了响应。敬请指教

EN

回答 6

Stack Overflow用户

发布于 2014-07-09 07:11:31

只需将正确的端口添加到文件路径中的localhost之后:

代码语言:javascript
复制
hdfs://localhost:9000/testuser/quangle.txt
票数 3
EN

Stack Overflow用户

发布于 2013-11-28 09:30:29

看起来您的名称节点没有运行-尝试运行jps命令,并查看正在运行的服务中是否列出了NameNode (或者,如果NameNode是由不同的用户启动的,则您可能必须运行ps axww | grep NameNode )

sudo netstat -atnp | grep 8020会产生什么结果吗?

如果名称Node拒绝启动,则将您的名称复制到Node登录到您的原始问题中(或发布一个新问题-首先搜索错误,看看是否其他人也有此问题)

票数 2
EN

Stack Overflow用户

发布于 2013-11-28 09:32:10

尝试运行jps来查看当前正在运行的Java进程。

是否所有Hadoop进程都在运行,尤其是Namemode?

如果是,您应该会得到以下输出(具有不同的进程ids):

代码语言:javascript
复制
10015 JobTracker
9670 TaskTracker
9485 DataNode
10380 Jps
9574 SecondaryNameNode
9843 NameNode
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/20256124

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档