Erro ao formatar o Hadoop JAVA_HOME não está definido

1

Eu recebo a seguinte msj quando tento formatar meu cluster

Re-format filesystem in /app/hadoop/tmp/dfs/name ? (Y or N) Y
14/04/28 10:20:16 INFO util.GSet: VM type       = 64-bit
14/04/28 10:20:16 INFO util.GSet: 2% max memory = 19.33375 MB
14/04/28 10:20:16 INFO util.GSet: capacity      = 2^21 = 2097152 entries
14/04/28 10:20:16 INFO util.GSet: recommended=2097152, actual=2097152
14/04/28 10:20:17 INFO namenode.FSNamesystem: fsOwner=ricardo
14/04/28 10:20:17 INFO namenode.FSNamesystem: supergroup=supergroup
14/04/28 10:20:17 INFO namenode.FSNamesystem: isPermissionEnabled=true
14/04/28 10:20:17 INFO namenode.FSNamesystem: dfs.block.invalidate.limit=100
14/04/28 10:20:17 INFO namenode.FSNamesystem: isAccessTokenEnabled=false     accessKeyUpdateInterval=0 min(s), accessTokenLifetime=0 min(s)
14/04/28 10:20:17 INFO namenode.NameNode: Caching file names occuring more than 10 times 
14/04/28 10:20:17 ERROR namenode.NameNode: java.io.IOException: Cannot remove current directory: /app/hadoop/tmp/dfs/name/current
at org.apache.hadoop.hdfs.server.common.Storage$StorageDirectory.clearDirectory(Storage.java:292)
at org.apache.hadoop.hdfs.server.namenode.FSImage.format(FSImage.java:1326)
at org.apache.hadoop.hdfs.server.namenode.FSImage.format(FSImage.java:1345)
at org.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:1207)
at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1398)
at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1419)

14/04/28 10:20:17 INFO namenode.NameNode: SHUTDOWN_MSG: 
/************************************************************
SHUTDOWN_MSG: Shutting down NameNode at ricardo-VirtualBox/127.0.1.1
************************************************************/

Alguém pode ajudar com essas mensagens de erro

ERROR namenode.NameNode: java.io.IOException: Cannot remove current directory: /app/hadoop/tmp/dfs/name/current

Eu tento executar isso:

sudo su 

e

bin/hadoop namenode -format

E eu entendo isso:

Error: JAVA_HOME is not set.
    
por user3524632 28.04.2014 / 17:33

1 resposta

0

Para definir Java_Home

1) cd / usr / lib / jvm
2) ls -l
verifique qual java
3) java-6-openjdk-amd64 (ou)   java-7-openjdk-amd64

4) vi / etc / environment
cole se java-6-openjdk-amd64

JAVA_HOME="/ usr / lib / jvm / java-6-openjdk-amd64"

cole se java-7-openjdk-amd6

JAVA_HOME="/ usr / lib / jvm / java-7-openjdk-amd64" salve

    
por mahantesh kumbar 30.04.2014 / 13:06