@InterfaceAudience.Private public class BackupNode extends NameNode
Backup node can play two roles.
HdfsServerConstants.NamenodeRole.CHECKPOINT
node periodically creates checkpoints,
that is downloads image and edits from the active node, merges them, and
uploads the new image back to the active.HdfsServerConstants.NamenodeRole.BACKUP
node keeps its namespace in sync with the
active node, and periodically creates checkpoints by simply saving the
namespace image to local disk(s).NameNode.NameNodeHAContext, NameNode.OperationCategory
ACTIVE_STATE, allowStaleStandbyReads, blockStateChangeLog, conf, DEFAULT_PORT, httpServer, LOG, NAMENODE_SPECIFIC_KEYS, NAMESERVICE_SPECIFIC_KEYS, namesystem, nodeRegistration, role, STANDBY_STATE, stateChangeLog, stopRequested
Modifier and Type | Method and Description |
---|---|
protected NameNode.NameNodeHAContext |
createHAContext() |
protected HAState |
createHAState() |
protected org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer |
createRpcServer(Configuration conf)
Create the RPC server implementation.
|
protected InetSocketAddress |
getHttpServerAddress(Configuration conf) |
protected String |
getNameServiceId(Configuration conf)
Get the name service Id for the node
|
protected InetSocketAddress |
getRpcServerAddress(Configuration conf) |
protected InetSocketAddress |
getServiceRpcServerAddress(Configuration conf)
Given a configuration get the address of the service rpc server
If the service rpc is not configured returns null
|
protected void |
initialize(Configuration conf)
Initialize name-node.
|
protected void |
loadNamesystem(Configuration conf) |
protected void |
setHttpServerAddress(Configuration conf) |
protected void |
setRpcServerAddress(Configuration conf,
InetSocketAddress addr) |
protected void |
setRpcServiceServerAddress(Configuration conf,
InetSocketAddress addr)
Modifies the configuration passed to contain the service rpc address setting
|
boolean |
setSafeMode(HdfsConstants.SafeModeAction action) |
void |
stop()
Stop all NameNode threads and wait for all to finish.
|
checkAllowFormat, createNameNode, doImmediateShutdown, format, getAddress, getAddress, getAddress, getFSImage, getHttpAddress, getHttpAddress, getNameNodeAddress, getNameNodeAddressHostPortString, getNameNodeMetrics, getNamesystem, getProtocolVersion, getRemoteUser, getRole, getRpcServer, getRpcServerBindHost, getServiceAddress, getServiceRpcAddress, getServiceRpcServerBindHost, getStartupProgress, getUri, initializeGenericKeys, initializeSharedEdits, initializeSharedEdits, isInSafeMode, isStandbyState, join, main, setServiceAddress, validateConfigurationSettings
protected InetSocketAddress getRpcServerAddress(Configuration conf)
getRpcServerAddress
in class NameNode
protected InetSocketAddress getServiceRpcServerAddress(Configuration conf)
NameNode
getServiceRpcServerAddress
in class NameNode
protected void setRpcServerAddress(Configuration conf, InetSocketAddress addr)
setRpcServerAddress
in class NameNode
protected void setRpcServiceServerAddress(Configuration conf, InetSocketAddress addr)
NameNode
setRpcServiceServerAddress
in class NameNode
protected InetSocketAddress getHttpServerAddress(Configuration conf)
getHttpServerAddress
in class NameNode
protected void setHttpServerAddress(Configuration conf)
setHttpServerAddress
in class NameNode
protected void loadNamesystem(Configuration conf) throws IOException
loadNamesystem
in class NameNode
IOException
protected void initialize(Configuration conf) throws IOException
NameNode
initialize
in class NameNode
conf
- the configurationIOException
protected org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer createRpcServer(Configuration conf) throws IOException
NameNode
createRpcServer
in class NameNode
IOException
public void stop()
NameNode
public boolean setSafeMode(HdfsConstants.SafeModeAction action) throws IOException
IOException
protected String getNameServiceId(Configuration conf)
NameNode
getNameServiceId
in class NameNode
protected HAState createHAState()
createHAState
in class NameNode
protected NameNode.NameNodeHAContext createHAContext()
createHAContext
in class NameNode
Copyright © 2013 Apache Software Foundation. All rights reserved.