복붙노트

[HADOOP] HDFS namenood 형식 오류 "주 클래스를 찾을 수 없습니다 : namenood"코드 첨부

HADOOP

HDFS namenood 형식 오류 "주 클래스를 찾을 수 없습니다 : namenood"코드 첨부

아래 그림과 같이 네임 노드를 포맷하는 동안 오류가 발생합니다.

[hadoop@localhost ~]$ /home/hadoop/project/hadoop-1.0.4/bin/hadoop namenood -format
Exception in thread "main" java.lang.NoClassDefFoundError: namenood
Caused by: java.lang.ClassNotFoundException: namenood
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: namenood.  Program will exit.
[hadoop@localhost ~]$ 

EDIT:

[hadoop@localhost ~]$ /home/hadoop/project/hadoop-1.0.4/bin/hadoop namenode -format
13/02/13 11:23:47 INFO namenode.NameNode: STARTUP_MSG: 
/************************************************************
STARTUP_MSG: Starting NameNode
STARTUP_MSG:   host = localhost.localdomain/127.0.0.1
STARTUP_MSG:   args = [-format]
STARTUP_MSG:   version = 1.0.4
STARTUP_MSG:   build = https://svn.apache.org/repos/asf/hadoop/common/branches/branch-1.0 -r 1393290; compiled by 'hortonfo' on Wed Oct  3 05:13:58 UTC 2012
************************************************************/
13/02/13 11:23:47 INFO util.GSet: VM type       = 32-bit
13/02/13 11:23:47 INFO util.GSet: 2% max memory = 19.33375 MB
13/02/13 11:23:47 INFO util.GSet: capacity      = 2^22 = 4194304 entries
13/02/13 11:23:47 INFO util.GSet: recommended=4194304, actual=4194304
13/02/13 11:23:48 INFO namenode.FSNamesystem: fsOwner=hadoop
13/02/13 11:23:48 INFO namenode.FSNamesystem: supergroup=supergroup
13/02/13 11:23:48 INFO namenode.FSNamesystem: isPermissionEnabled=true
13/02/13 11:23:48 INFO namenode.FSNamesystem: dfs.block.invalidate.limit=100
13/02/13 11:23:48 INFO namenode.FSNamesystem: isAccessTokenEnabled=false accessKeyUpdateInterval=0 min(s), accessTokenLifetime=0 min(s)
13/02/13 11:23:48 INFO namenode.NameNode: Caching file names occuring more than 10 times 
13/02/13 11:23:49 ERROR namenode.NameNode: java.io.IOException: Cannot create directory /app/hadoop/tmp/dfs/name/current
        at org.apache.hadoop.hdfs.server.common.Storage$StorageDirectory.clearDirectory(Storage.java:297)
        at org.apache.hadoop.hdfs.server.namenode.FSImage.format(FSImage.java:1320)
        at org.apache.hadoop.hdfs.server.namenode.FSImage.format(FSImage.java:1339)
        at org.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:1164)
        at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1271)
        at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1288)

13/02/13 11:23:49 INFO namenode.NameNode: SHUTDOWN_MSG: 
/************************************************************
SHUTDOWN_MSG: Shutting down NameNode at localhost.localdomain/127.0.0.1
************************************************************/

당신의 제안을 희망합니다.

해결법

  1. ==============================

    1.내가 회상 한대로

    내가 회상 한대로

    /home/hadoop/project/hadoop-1.0.4/bin/hadoop namenode -format
    
  2. from https://stackoverflow.com/questions/14852199/hdfs-namenood-formatting-error-could-not-find-the-main-class-namenood-code-a by cc-by-sa and MIT license