Reputation: 31
Windows 10:
java -version
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)
>hdfs namenode -format
Error: Could not find or load main class Abdul
Environment variable :
HADOOP_HOME
C:\hadoop-2.8.0\bin
JAVA_HOME
C:\Java\jdk1.8.0_181
path
C:\hadoop-2.8.0\bin
C:\Java\jdk1.8.0_181\bin
C:\hadoop-2.8.0\sbin
hadoop-env.cmd
set JAVA_HOME=C:\Java\jdk1.8.0_181
Upvotes: 1
Views: 1864
Reputation: 23
I got the same issue as i configure the JAVA_HOME & HADOOP_HOME in my system variable path. Basically problem is hadoop-env file where it pick your username as Admin configure your system your name with space which cause issue . For me it work when i have change in hadoop-env.cmd file .
You will find hadoop-env.cmd inside cd %HADOOP_HOME%/etc/hadoop/ edit this file at the end of the file you will get HADOOP_IDENT_STRING=%USERNAME% . Just change as per below instead of myuser you write your name without space( ) and save it and start new cmd.
@rem set HADOOP_IDENT_STRING=%USERNAME%
set HADOOP_IDENT_STRING=myuser
Upvotes: 2
Reputation: 46
According to Apache Hadoop documentation in section 'Choose target OS version', Windows 10 is not yer suppoted:
The Hadoop developers have used Windows Server 2008 and Windows Server 2008 R2 during development and testing. Windows Vista and Windows 7 are also likely to work because of the Win32 API similarities with the respective server SKUs. We have not tested on Windows XP or any earlier versions of Windows and these are not likely to work.
It is recommended that you use a Windows supported version.
Upvotes: 0
Reputation: 31
Abdul is windows user name.
I posted the message again
C:\Users\Md. Abdul Latif>hdfs namenode -format Error: Could not find or load main class Abdul
Upvotes: 0