error='cannot allocate memory'(errno=12)

o7jaxewo  于 2021-07-15  发布在  Hadoop
关注(0)|答案(0)|浏览(653)

hdfs命令在脚本中运行 checkForFormat.sh :

/hadoop-bin/hdfs --config /mydir/search-cluster/y3/conf/hadoop namenode -format

此命令出现错误:

Fail: Execution of '/tmp/checkForFormat.sh /hadoop-bin hdfs /mydir/search-cluster/y3/conf/hadoop /mydir/search-cluster/y3/var/pid/hdfs/namenode/formatted/ /mydir/search-cluster/y3/volume/hdfs/namenode' returned 1. NameNode Dirname = /mydir/search-cluster/y3/volume/hdfs/namenode

Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x0000000460000000, 15032385536, 0) failed; error='Cannot allocate memory' (errno=12)

# 

# There is insufficient memory for the Java Runtime Environment to continue.

# Native memory allocation (malloc) failed to allocate 15032385536 bytes for committing reserved memory.

# An error report file with more information is saved as:

# /mydir/search-cluster/y3/var/logs/hdfs/namenode_err_pid12038.log

我发现其中一个解决方案是增加一个交换分区。但我有4gb的交换分区,这还不够吗?

USER@AMBARI:/tmp:> free -h
              total        used        free      shared  buff/cache   available
Mem:           7.6G        2.3G        239M        860K        5.1G        5.3G
Swap:          4.0G          0B        4.0G

或者有其他方法来解决这个问题?

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题