@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.OperationCategoryACTIVE_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, validateConfigurationSettingsprotected InetSocketAddress getRpcServerAddress(Configuration conf)
getRpcServerAddress in class NameNodeprotected InetSocketAddress getServiceRpcServerAddress(Configuration conf)
NameNodegetServiceRpcServerAddress in class NameNodeprotected void setRpcServerAddress(Configuration conf, InetSocketAddress addr)
setRpcServerAddress in class NameNodeprotected void setRpcServiceServerAddress(Configuration conf, InetSocketAddress addr)
NameNodesetRpcServiceServerAddress in class NameNodeprotected InetSocketAddress getHttpServerAddress(Configuration conf)
getHttpServerAddress in class NameNodeprotected void setHttpServerAddress(Configuration conf)
setHttpServerAddress in class NameNodeprotected void loadNamesystem(Configuration conf) throws IOException
loadNamesystem in class NameNodeIOExceptionprotected void initialize(Configuration conf) throws IOException
NameNodeinitialize in class NameNodeconf - the configurationIOExceptionprotected org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer createRpcServer(Configuration conf) throws IOException
NameNodecreateRpcServer in class NameNodeIOExceptionpublic void stop()
NameNodepublic boolean setSafeMode(HdfsConstants.SafeModeAction action) throws IOException
IOExceptionprotected String getNameServiceId(Configuration conf)
NameNodegetNameServiceId in class NameNodeprotected HAState createHAState()
createHAState in class NameNodeprotected NameNode.NameNodeHAContext createHAContext()
createHAContext in class NameNodeCopyright © 2013 Apache Software Foundation. All rights reserved.