THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
No Format |
---|
~/hadoop-common $ cp hadoop-hdfs-project/hadoop-hdfs/src/contrib/bkjournal/target/hadoop-hdfs-bkjournal-0.24.0-SNAPSHOT.jar \
$HADOOP_HDFS_HOME/share/hadoop/hdfs/lib/
|
...
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="configuration.xsl"?> <configuration> <property> <name>fs.default.name</name> <value>hdfs://localhost/</value> </property> <property> <name>dfs.namenode.name.dir</name> <value>file:///tmp/bk-nn-local-snapshot</value> </property> <property> <name>dfs.namenode.edits.dir</name> <value>file:///tmp/bk-nn-local-edits</value> </property> <property> <name>dfs.namenode.shared.edits.dir</name> <value>bookkeeperedits,bookkeeper://localhost:2181/hdfsjournal</value> </property> <property> <name>dfs.namenode.edits.journal-plugin.bookkeeper</name> <value>org.apache.hadoop.contrib.bkjournal.BookKeeperJournalManager</value> </property> </configuration> |
This will configure the namenode with 1 local edits dir and 1 bookkeeper edits dir. The BookKeeperJournalManager connects to localhost:2181 as the ZooKeeper server. Note that this will not start the namenode is high availability mode, but BookKeeperJournalManager can similarly be used as a shared edits dir in HA.
The namenode is now ready to start.
No Format |
---|
~/hadoop-common $ hdfs namenode -format
~/hadoop-common $ hdfs namenode
|
The web interface should now be available at http://localhost:50070/.