我已经在docker中部署了hadoop,docker在AWSEC2 UbuntuAMI示例上运行。
当我试图在hdfs中创建一个目录时,它会说cannotcreatedirectory。名称节点处于安全模式
以下是hdfs-site.xml中的属性
name: dfs.replication
value: 1
name: dfs.namenode.name.dir
value: /usr/local/hadoop/data
当我检查hdfs报告时,它给出了以下输出。
bash-4.1# hdfs dfsadmin -report
19/01/05 12:34:20 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Safe mode is ON
Configured Capacity: 0 (0 B)
Present Capacity: 335872 (328 KB)
DFS Remaining: 0 (0 B)
DFS Used: 335872 (328 KB)
DFS Used%: 100.00%
Under replicated blocks: 0
Blocks with corrupt replicas: 0
Missing blocks: 0
Missing blocks (with replication factor 1): 0
下面是关于namenode的一些细节。
bash-4.1# hdfs dfs -df
19/01/05 12:37:20 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Filesystem Size Used Available Use%
hdfs://0cd4da30c603:9000 0 335872 0 Infinity%
如果我设置为离开安全模式,几秒钟之内它就会回到安全模式。
bash-4.1# hdfs dfsadmin -safemode leave
19/01/05 12:42:26 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Safe mode is OFF
bash-4.1# hdfs dfsadmin -safemode get
19/01/05 12:42:36 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Safe mode is ON
下面是我的文件系统信息
bash-4.1# df -h
Filesystem Size Used Avail Use% Mounted on
overlay 25G 6.2G 19G 26% /
tmpfs 64M 0 64M 0% /dev
tmpfs 492M 0 492M 0% /sys/fs/cgroup
/dev/xvda1 25G 6.2G 19G 26% /data/lab
/dev/xvda1 25G 6.2G 19G 26% /etc/resolv.conf
/dev/xvda1 25G 6.2G 19G 26% /etc/hostname
/dev/xvda1 25G 6.2G 19G 26% /etc/hosts
shm 64M 0 64M 0% /dev/shm
tmpfs 492M 0 492M 0% /proc/acpi
tmpfs 64M 0 64M 0% /proc/kcore
tmpfs 64M 0 64M 0% /proc/keys
tmpfs 64M 0 64M 0% /proc/timer_list
tmpfs 64M 0 64M 0% /proc/sched_debug
tmpfs 492M 0 492M 0% /proc/scsi
tmpfs 492M 0 492M 0% /sys/firmware
我期望的是在hdfs中创建一个目录来执行mapreduce操作
暂无答案!
目前还没有任何答案,快来回答吧!