bin/hadoop namenode -format 시에 자꾸 에러가 발생했다.

원인은 conf/core-site.xml 파일에
아래 내용을 추가하지 않았다.

$ cat conf/hdfs-site.xml
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>

<!-- Put site-specific property overrides in this file. -->

<configuration>
     <property>
         <name>dfs.replication</name>
         <value>1</value>
     </property>
</configuration>



잘 된 모습 확인



$ bin/hadoop namenode -format
11/08/22 18:08:58 INFO namenode.NameNode: STARTUP_MSG:
/************************************************************
STARTUP_MSG: Starting NameNode
STARTUP_MSG:   host = nhn-PC/10.64.49.213
STARTUP_MSG:   args = [-format]
STARTUP_MSG:   version = 0.20.203.0
STARTUP_MSG:   build = http://svn.apache.org/repos/asf/hadoop/common/branches/br
anch-0.20-security-203 -r 1099333; compiled by 'oom' on Wed May  4 07:57:50 PDT
2011
************************************************************/
Re-format filesystem in \tmp\hadoop-nhn\dfs\name ? (Y or N) Y 입력
11/08/22 18:09:00 INFO util.GSet: VM type       = 32-bit
11/08/22 18:09:00 INFO util.GSet: 2% max memory = 19.33375 MB
11/08/22 18:09:00 INFO util.GSet: capacity      = 2^22 = 4194304 entries
11/08/22 18:09:00 INFO util.GSet: recommended=4194304, actual=4194304
11/08/22 18:09:00 INFO namenode.FSNamesystem: fsOwner=nhn
11/08/22 18:09:00 INFO namenode.FSNamesystem: supergroup=supergroup
11/08/22 18:09:00 INFO namenode.FSNamesystem: isPermissionEnabled=true
11/08/22 18:09:00 INFO namenode.FSNamesystem: dfs.block.invalidate.limit=100
11/08/22 18:09:00 INFO namenode.FSNamesystem: isAccessTokenEnabled=false accessK
eyUpdateInterval=0 min(s), accessTokenLifetime=0 min(s)
11/08/22 18:09:00 INFO namenode.NameNode: Caching file names occuring more than
10 times
11/08/22 18:09:00 INFO common.Storage: Image file of size 109 saved in 0 seconds
.
11/08/22 18:09:01 INFO common.Storage: Storage directory \tmp\hadoop-nhn\dfs\nam
e has been successfully formatted.
11/08/22 18:09:01 INFO namenode.NameNode: SHUTDOWN_MSG:
/************************************************************
SHUTDOWN_MSG: Shutting down NameNode at nhn-PC/10.64.49.213
************************************************************/



 

Posted by '김용환'
,