Hadoop: Compile and Run URLCat example code

[cloud@hdn01 XuClass]$ javac -classpath ../hadoop-core-1.2.1.jar ./URLCat.java
[cloud@hdn01 XuClass]$ ls

URLCat.class  URLCat.java

[cloud@hdn01 XuClass]$ cd ..
[cloud@hdn01 hadoop-1.2.1]$ bin/hadoop URLCat hdfs://hdn01:9000/user/cloud/in/file1.txt
Warning: $HADOOP_HOME is deprecated.


13/12/09 16:43:52 INFO ipc.Client: Retrying connect to server: hdn01/10.1.1.10:9000. Already tried 0 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1 SECONDS)
13/12/09 16:43:53 INFO ipc.Client: Retrying connect to server: hdn01/10.1.1.10:9000. Already tried 1 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1 SECONDS)
13/12/09 16:43:54 INFO ipc.Client: Retrying connect to server: hdn01/10.1.1.10:9000. Already tried 2 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1 SECONDS)
13/12/09 16:43:55 INFO ipc.Client: Retrying connect to server: hdn01/10.1.1.10:9000. Already tried 3 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1 SECONDS)
^C[cloud@hdn01 hadoop-1.2.1]$ jps
2500 Jps
[cloud@hdn01 hadoop-1.2.1]$ bin/start-all.sh
Warning: $HADOOP_HOME is deprecated.


starting namenode, logging to /opt/hadoop-1.2.1/libexec/../logs/hadoop-cloud-namenode-hdn01.out
hdd01: datanode running as process 52962. Stop it first.
hdd02: datanode running as process 49872. Stop it first.
hdn02: secondarynamenode running as process 41173. Stop it first.
starting jobtracker, logging to /opt/hadoop-1.2.1/libexec/../logs/hadoop-cloud-jobtracker-hdn01.out
hdd01: tasktracker running as process 53066. Stop it first.
hdd02: tasktracker running as process 49976. Stop it first.
[cloud@hdn01 hadoop-1.2.1]$ bin/stop-all.sh
Warning: $HADOOP_HOME is deprecated.


stopping jobtracker
hdd01: stopping tasktracker
hdd02: stopping tasktracker
stopping namenode
hdd02: stopping datanode
hdd01: stopping datanode
hdn02: stopping secondarynamenode
[cloud@hdn01 hadoop-1.2.1]$ bin/start-all.sh
Warning: $HADOOP_HOME is deprecated.


starting namenode, logging to /opt/hadoop-1.2.1/libexec/../logs/hadoop-cloud-namenode-hdn01.out
hdd01: starting datanode, logging to /opt/hadoop-1.2.1/libexec/../logs/hadoop-cloud-datanode-hdd01.out
hdd02: starting datanode, logging to /opt/hadoop-1.2.1/libexec/../logs/hadoop-cloud-datanode-hdd02.out
hdn02: starting secondarynamenode, logging to /opt/hadoop-1.2.1/libexec/../logs/hadoop-cloud-secondarynamenode-hdn02.out
starting jobtracker, logging to /opt/hadoop-1.2.1/libexec/../logs/hadoop-cloud-jobtracker-hdn01.out
hdd01: starting tasktracker, logging to /opt/hadoop-1.2.1/libexec/../logs/hadoop-cloud-tasktracker-hdd01.out
hdd02: starting tasktracker, logging to /opt/hadoop-1.2.1/libexec/../logs/hadoop-cloud-tasktracker-hdd02.out
[cloud@hdn01 hadoop-1.2.1]$ bin/hadoop URLCat hdfs://hdn01:9000/user/cloud/in/file1.txt
Warning: $HADOOP_HOME is deprecated.


Hello, world
[cloud@hdn01 hadoop-1.2.1]$

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值