Próbuję zainstalować konfigurację z jednym węzłem, udało mi się do pewnego stopnia, jak pobieranie i rozpakowywanie tar i edytowanie wszystkich plików konfiguracyjnych, ale napotkałem problemy podczas formatowania nazwy.
Błędy to:
14/07/14 02:56:40 WARN fs.FileUtil: Failed to delete file or dir [/home/renu123/yarn/yarn_data/hdfs/namenode/current/seen_txid]: it still exists.
14/07/14 02:56:40 WARN fs.FileUtil: Failed to delete file or dir [/home/renu123/yarn/yarn_data/hdfs/namenode/current/VERSION]: it still exists.
14/07/14 02:56:40 WARN fs.FileUtil: Failed to delete file or dir [/home/renu123/yarn/yarn_data/hdfs/namenode/current/fsimage_0000000000000000000]: it still exists.
14/07/14 02:56:40 WARN fs.FileUtil: Failed to delete file or dir [/home/renu123/yarn/yarn_data/hdfs/namenode/current/fsimage_0000000000000000000.md5]: it still exists.
14/07/14 02:56:40 FATAL namenode.NameNode: Exception in namenode join
java.io.IOException: Cannot remove current directory: /home/renu123/yarn/yarn_data/hdfs/namenode/current
at org.apache.hadoop.hdfs.server.common.Storage$StorageDirectory.clearDirectory(Storage.java:299)
at org.apache.hadoop.hdfs.server.namenode.NNStorage.format(NNStorage.java:523)
at org.apache.hadoop.hdfs.server.namenode.NNStorage.format(NNStorage.java:544)
at org.apache.hadoop.hdfs.server.namenode.FSImage.format(FSImage.java:147)
at org.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:837)
at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1213)
at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1320)
14/07/14 02:56:40 INFO util.ExitUtil: Exiting with status 1
14/07/14 02:56:40 INFO namenode.NameNode: SHUTDOWN_MSG:
/************************************************************
SHUTDOWN_MSG: Shutting down NameNode at ubuntu/127.0.1.1
************************************************************/
Po wyszukaniu w google sformatowałem namenode, przełączając się na konto root jak poniżej:
root@ubuntu:~/yarn/yarn_data/hdfs/namenode# hdfs namenode -format
Re-format filesystem in Storage Directory /home/renu123/yarn/yarn_data/hdfs/namenode ? (Y or N) Y
14/07/14 02:59:30 INFO common.Storage: Storage directory /home/renu123/yarn/yarn_data/hdfs/namenode has been successfully formatted.
14/07/14 02:59:30 INFO namenode.FSImage: Saving image file /home/renu123/yarn/yarn_data/hdfs/namenode/current/fsimage.ckpt_0000000000000000000 using no compression
14/07/14 02:59:30 INFO namenode.FSImage: Image file /home/renu123/yarn/yarn_data/hdfs/namenode/current/fsimage.ckpt_0000000000000000000 of size 196 bytes saved in 0 seconds.
14/07/14 02:59:30 INFO namenode.NNStorageRetentionManager: Going to retain 1 images with txid >= 0
14/07/14 02:59:30 INFO util.ExitUtil: Exiting with status 0
14/07/14 02:59:30 INFO namenode.NameNode: SHUTDOWN_MSG:
/************************************************************
SHUTDOWN_MSG: Shutting down NameNode at ubuntu/127.0.1.1
************************************************************/
Nawet po sformatowaniu nadal widzę katalogi w hdfs/namenode
folderze, tj. Bieżące
Zakładając, że nazwa jest sformatowana, poszedłem dalej i próbowałem uruchomić nazwę przy użyciu polecenia start-dfs.sh
, ale nie byłem w stanie.
To jest dziennik wyjęty z usr/local/hadoop/logs
:
2014-07-14 02:49:10,478 WARN org.apache.hadoop.hdfs.server.common.Storage: Cannot access storage directory /home/renu123/yarn/yarn_data/hdfs/namenode
2014-07-14 02:49:10,484 INFO org.mortbay.log: Stopped SelectChannelConnector@0.0.0.0:50070
2014-07-14 02:49:10,585 INFO org.apache.hadoop.metrics2.impl.MetricsSystemImpl: Stopping NameNode metrics system...
2014-07-14 02:49:10,585 INFO org.apache.hadoop.metrics2.impl.MetricsSystemImpl: NameNode metrics system stopped.
2014-07-14 02:49:10,586 INFO org.apache.hadoop.metrics2.impl.MetricsSystemImpl: NameNode metrics system shutdown complete.
2014-07-14 02:49:10,587 FATAL org.apache.hadoop.hdfs.server.namenode.NameNode: Exception in namenode join
org.apache.hadoop.hdfs.server.common.InconsistentFSStateException: Directory /home/renu123/yarn/yarn_data/hdfs/namenode is in an inconsistent state: storage directory does not exist or is not accessible.
at org.apache.hadoop.hdfs.server.namenode.FSImage.recoverStorageDirs(FSImage.java:292)
at org.apache.hadoop.hdfs.server.namenode.FSImage.recoverTransitionRead(FSImage.java:200)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.loadFSImage(FSNamesystem.java:787)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.loadFromDisk(FSNamesystem.java:568)
at org.apache.hadoop.hdfs.server.namenode.NameNode.loadNamesystem(NameNode.java:443)
at org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:491)
at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:684)
at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:669)
at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1254)
at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1320)
2014-07-14 02:49:10,590 INFO org.apache.hadoop.util.ExitUtil: Exiting with status 1
2014-07-14 02:49:10,602 INFO org.apache.hadoop.hdfs.server.namenode.NameNode: SHUTDOWN_MSG:
Pomóż mi znaleźć rozwiązanie tego problemu.
Moje pliki konfiguracyjne to
core-site.xml
<configuration>
<property>
<name>fs.default.name</name>
<value>hdfs://localhost:9000</value>
</property>
</configuration>
yarn-ste.xml
<configuration>
<!-- Site specific YARN configuration properties -->
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
<property>
<name>yarn.nodemanager.aux-services.mapreduce.shuffle.class</name>
<value>org.apache.hadoop.mapred.ShuffleHandler</value>
</property>
</configuration>
mapred-site.xml
<configuration>
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
</configuration>
hdfs-site.xml
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.namenode.name.dir</name>
<value>file:/home/renu123/yarn/yarn_data/hdfs/namenode</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>file:/home/renu123/yarn/yarn_data/hdfs/datanode</value>
</property>
</configuration>