Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
67 lines (54 sloc) 2.94 KB
# Copyright 2008 The Apache Software Foundation Licensed under the
# Apache License, Version 2.0 (the "License"); you may not use this
# file except in compliance with the License. You may obtain a copy
# of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless
# required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied. See the License for the specific language governing
# permissions and limitations under the License.
/**
* The AvatarNode is your answer for High Availability of the
* NameNode. The AvatarNode has two avatars.. the Standby avatar
* and the Active avatar.
*
* In the Standby avatar, the AvatarNode is consuming transaction logs
* generated by the primary (via a transaction log stored in a shared device).
* Typically, the primary Namenode is writing transactions to a NFS filesystem
* and the Standby is reading the log from the same NFS filesystem. The
* Standby is also making periodic checkpoints to the primary namenode.
*
* A manual command can switch the AvatarNode from the Standby avatar
* to the Active avatar. In the Active avatar, the AvatarNode performs precisely
* the same functionality as a real usual Namenode. The switching from
* Standby avatar to the Active avatar is fast and can typically occur
* within seconds.
*
* Typically, an adminstrator will run require two shared mount points for
* transaction logs. It has to be set in fs.name.dir.shared0 and
* fs.name.dir.shared1 (similarly for edits). Then the adminstrator starts
* the AvatarNode on two different machines as follows:
*
* bin/hadoop org.apache.hadoop.hdfs.server.namenode.AvatarNode -zero -active
* bin/hadoop org.apache.hadoop.hdfs.server.namenode.AvatarNode -one -standby
* The first AvatarNode uses fs.name.dir.shared0 while the second
* AvatarNode uses fs.name.dir.shared1 to write its transaction logs.
* Also, at startup, the first instance is the primary Namenode and the
* second instance is the Standby
*
* After a while, the adminstrator decides to change the avatar of the
* second instance to Active. In this case, he/she has to first ensure that the
* first instance is really really dead. This code does not handle the
* split-brain scenario where there are two active namenodes in one cluster.
*
--------------------------------------------------------------------------------
BUILDING:
In HADOOP_HOME, run ant package to build Hadoop and its contrib packages.
--------------------------------------------------------------------------------
INSTALLING and CONFIGURING:
--------------------------------------------------------------------------------
OPTIONAL CONFIGIURATION:
--------------------------------------------------------------------------------
ADMINISTRATION:
--------------------------------------------------------------------------------
IMPLEMENTATION: