Reply
Highlighted
New Contributor
Posts: 1
Registered: ‎08-15-2018

Setting HADOOP_NAMENODE_OPTS in non-CM managed Hadoop cluster (cdh5.7.1)

[ Edited ]

I want to use OPTS variables to set heap for Namenode in non-CM managed cdh5.7.1 cluster. I can currently only set them if I modify HADOOP_HEAP in /etc/hadoop/conf/hadoop-env.sh (which is a global var and I would like to avoid using it)

 

Here is what I had set to start with in /etc/hadoop/conf/hadoop-env.sh: 

export HADOOP_HEAPSIZE=1024
export HADOOP_NAMENODE_OPTS="$HADOOP_NAMENODE_OPTS=-Xmx2048"

However, HADOOP_NAMENODE_OPTS doesn't seem to get recognized:

# service hadoop-hdfs-namenode start
starting namenode, logging to /var/log/hadoop-hdfs/hadoop-hdfs-namenode.out
Error: Could not find or load main class =-Xmx2048=-Xmx2048=-Xmx2048
Failed to start Hadoop namenode. Return value: 1 [FAILED]

Java version is compatible, according to https://www.cloudera.com/documentation/enterprise/release-notes/topics/rn_consolidated_pcm.html#conc...:

# java -version
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

 

Announcements