Support Questions
Find answers, ask questions, and share your expertise
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

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


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

New Contributor

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/ (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/ 


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

# 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)


Don't have an account?
Coming from Hortonworks? Activate your account here