hadoop fs -copyFromLocal报错
大家好,我是新手我用hadoop fs系列命令时,只有hadoop fs -mkdir能成功运行,而且运行时也会报错:
hadoop-01:~# hadoop fs -copyFromLocal test/b1.img hdfs://hadoop-01:8020/user/root/test
10/10/27 20:21:30 INFO security.Groups: Group mapping impl=org.apache.hadoop.security.ShellBasedUnixGroupsMapping; cacheTimeout=300000
10/10/27 20:21:30 WARN conf.Configuration: mapred.task.id is deprecated. Instead, use mapreduce.task.attempt.id
copyFromLocal: java.lang.NullPointerException
其余,ls也算可以运行,但是-copyFromLocal或get就没法运行
hadoop-01:~# hadoop fs -copyFromLocal test/b1.img hdfs://hadoop-01:8020/user/root/test
10/10/27 20:26:27 INFO security.Groups: Group mapping impl=org.apache.hadoop.security.ShellBasedUnixGroupsMapping; cacheTimeout=300000
10/10/27 20:26:27 WARN conf.Configuration: mapred.task.id is deprecated. Instead, use mapreduce.task.attempt.id
copyFromLocal: java.lang.NullPointerException
hadoop-01:~# hadoop fs -lsr
10/10/27 20:27:06 INFO security.Groups: Group mapping impl=org.apache.hadoop.security.ShellBasedUnixGroupsMapping; cacheTimeout=300000
10/10/27 20:27:06 WARN conf.Configuration: mapred.task.id is deprecated. Instead, use mapreduce.task.attempt.id
drwxr-xr-x - root supergroup 0 2010-10-27 20:01 /user/root/input
drwxr-xr-x - root supergroup 0 2010-10-27 20:01 /user/root/input/input
drwxr-xr-x - root supergroup 0 2010-10-27 19:59 /user/root/input1
drwxr-xr-x - root supergroup 0 2010-10-27 17:31 /user/root/test
请问我的在哪呢吗?
其他节点上是能够看到新创建的目录这些的,只是文件没法往里面写
查了好多资料都没解决。
谢谢先 请问我的命令用法有错么吗? 刚才试了先创建个文件夹,再往里面拷,成功
hadoop-01:~# hadoop fs -copyFromLocal test.txt hdfs://hadoop-01:8020/user/root/test/
10/10/27 21:05:18 INFO security.Groups: Group mapping impl=org.apache.hadoop.security.ShellBasedUnixGroupsMapping; cacheTimeout=300000
10/10/27 21:05:18 WARN conf.Configuration: mapred.task.id is deprecated. Instead, use mapreduce.task.attempt.id
copyFromLocal: Target hdfs://hadoop-01:8020/user/root/test/test.txt is a directory
hadoop-01:~# hadoop fs -lsr
10/10/27 21:05:22 INFO security.Groups: Group mapping impl=org.apache.hadoop.security.ShellBasedUnixGroupsMapping; cacheTimeout=300000
10/10/27 21:05:22 WARN conf.Configuration: mapred.task.id is deprecated. Instead, use mapreduce.task.attempt.id
drwxr-xr-x - root supergroup 0 2010-10-27 20:01 /user/root/input
drwxr-xr-x - root supergroup 0 2010-10-27 20:01 /user/root/input/input
drwxr-xr-x - root supergroup 0 2010-10-27 19:59 /user/root/input1
drwxr-xr-x - root supergroup 0 2010-10-27 20:41 /user/root/test
drwxr-xr-x - root supergroup 0 2010-10-27 20:41 /user/root/test/test.txt
但创建一个文件,在拷贝,不成功:
hadoop-01:~# rmtest.txt
hadoop-01:~# vim imsimplefile.txt
hadoop-01:~# hadoop fs -copyFromLocal imsimplefile.txt hdfs://hadoop-01:8020/user/root/
10/10/27 22:55:41 INFO security.Groups: Group mapping impl=org.apache.hadoop.security.ShellBasedUnixGroupsMapping; cacheTimeout=300000
10/10/27 22:55:42 WARN conf.Configuration: mapred.task.id is deprecated. Instead, use mapreduce.task.attempt.id
copyFromLocal: java.lang.NullPointerException
hadoop-01:~# hadoop fs -lsr
10/10/27 22:55:51 INFO security.Groups: Group mapping impl=org.apache.hadoop.security.ShellBasedUnixGroupsMapping; cacheTimeout=300000
10/10/27 22:55:51 WARN conf.Configuration: mapred.task.id is deprecated. Instead, use mapreduce.task.attempt.id
drwxr-xr-x - root supergroup 0 2010-10-27 20:01 /user/root/input
drwxr-xr-x - root supergroup 0 2010-10-27 20:01 /user/root/input/input
drwxr-xr-x - root supergroup 0 2010-10-27 19:59 /user/root/input1
drwxr-xr-x - root supergroup 0 2010-10-27 20:41 /user/root/test
drwxr-xr-x - root supergroup 0 2010-10-27 20:41 /user/root/test/test.txt
drwxr-xr-x - root supergroup 0 2010-10-27 21:43 /user/root/test.txt
lsr并未显示任何与imsimplefile.txt相关的文件。
通过hadoop dfsadmin -report查看,发现DFS剩余空间为0,不知是不是空间不足吗?我该怎么调整吗?
hadoop-01:~# hadoop dfsadmin -report
DEPRECATED: Use of this script to execute hdfs command is deprecated.
Instead use the hdfs command for it.
10/10/27 22:58:25 INFO security.Groups: Group mapping impl=org.apache.hadoop.security.ShellBasedUnixGroupsMapping; cacheTimeout=300000
10/10/27 22:58:25 WARN conf.Configuration: mapred.task.id is deprecated. Instead, use mapreduce.task.attempt.id
Configured Capacity: 0 (0 KB)
Present Capacity: 40960 (40 KB)
DFS Remaining: 0 (0 KB)
DFS Used: 40960 (40 KB)
DFS Used%: 100%
Under replicated blocks: 1
Blocks with corrupt replicas: 0
Missing blocks: 0
-------------------------------------------------
Datanodes available: 1 (1 total, 0 dead)
Live datanodes:
Name: 172.16.3.42:50010 (hadoop-01)
Decommission Status : Normal
Configured Capacity: 0 (0 KB)
DFS Used: 40960 (40 KB)
Non DFS Used: 0 (0 KB)
DFS Remaining: 0 (0 KB)
DFS Used%: 100%
DFS Remaining%: 0%
Last contact: Wed Oct 27 22:58:24 CST 2010
页:
[1]