org.apache.hadoop.conf.Configurable, org.apache.hadoop.conf.Reconfigurable, TokenVerifier<org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenIdentifier>, NameNodeStatusMXBean@Private @Metrics(context="dfs") 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, DEFAULT_PORT, httpServer, LOG, METRICS_LOG_NAME, NAMENODE_SPECIFIC_KEYS, NAMESERVICE_SPECIFIC_KEYS, namesystem, nodeRegistration, OBSERVER_STATE, role, STANDBY_STATE, stateChangeLog, stopRequested, tracer| Modifier and Type | Method | Description |
|---|---|---|
protected NameNode.NameNodeHAContext |
createHAContext() |
|
protected HAState |
createHAState(org.apache.hadoop.conf.Configuration conf) |
|
protected NameNodeRpcServer |
createRpcServer(org.apache.hadoop.conf.Configuration conf) |
Create the RPC server implementation.
|
protected java.net.InetSocketAddress |
getHttpServerAddress(org.apache.hadoop.conf.Configuration conf) |
|
protected java.lang.String |
getNameServiceId(org.apache.hadoop.conf.Configuration conf) |
Get the name service Id for the node
|
protected java.net.InetSocketAddress |
getRpcServerAddress(org.apache.hadoop.conf.Configuration conf) |
|
protected java.net.InetSocketAddress |
getServiceRpcServerAddress(org.apache.hadoop.conf.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(org.apache.hadoop.conf.Configuration conf) |
Initialize name-node.
|
protected void |
loadNamesystem(org.apache.hadoop.conf.Configuration conf) |
|
protected void |
setRpcServerAddress(org.apache.hadoop.conf.Configuration conf,
java.net.InetSocketAddress addr) |
|
protected void |
setRpcServiceServerAddress(org.apache.hadoop.conf.Configuration conf,
java.net.InetSocketAddress addr) |
Modifies the configuration passed to contain the service rpc address setting
|
boolean |
setSafeMode(org.apache.hadoop.hdfs.protocol.HdfsConstants.SafeModeAction action) |
|
void |
stop() |
Stop all NameNode threads and wait for all to finish.
|
checkAllowFormat, composeNotStartedMessage, createNameNode, doImmediateShutdown, doRollback, format, getAliasMapServer, getAuxiliaryNameNodeAddresses, getBytesWithFutureGenerationStamps, getClientIdAndCallId, getClientMachine, getClientNamenodeAddress, getFSImage, getHostAndPort, getHttpAddress, getHttpAddress, getHttpsAddress, getHttpServer, getHttpServerBindAddress, getLastHATransitionTime, getNameNodeAddress, getNameNodeAddressHostPortString, getNameNodeMetrics, getNameNodeState, getNamesystem, getNewConf, getNNAuxiliaryRpcAddress, getNNRole, getProtocolVersion, getReconfigurableProperties, getRemoteUser, getRole, getRpcServer, getRpcServerBindHost, getServiceAddress, getServiceRpcAddress, getServiceRpcServerBindHost, getSlowDisksReport, getSlowPeersReport, getStartupOption, getStartupProgress, getState, getTokenServiceName, initializeGenericKeys, initializeSharedEdits, initializeSharedEdits, initMetrics, isActiveState, isInSafeMode, isObserverState, isSecurityEnabled, isStandbyState, join, joinHttpServer, main, parseSpecialValue, queueExternalCall, reconfigurePropertyImpl, setServiceAddress, startMetricsLogger, stopMetricsLogger, verifyTokengetChangedProperties, getReconfigurationTaskStatus, isPropertyReconfigurable, reconfigureProperty, setReconfigurationUtil, shutdownReconfigurationTask, startReconfigurationTaskprotected java.net.InetSocketAddress getRpcServerAddress(org.apache.hadoop.conf.Configuration conf)
getRpcServerAddress in class NameNodeprotected java.net.InetSocketAddress getServiceRpcServerAddress(org.apache.hadoop.conf.Configuration conf)
NameNodegetServiceRpcServerAddress in class NameNodeprotected void setRpcServerAddress(org.apache.hadoop.conf.Configuration conf,
java.net.InetSocketAddress addr)
setRpcServerAddress in class NameNodeprotected void setRpcServiceServerAddress(org.apache.hadoop.conf.Configuration conf,
java.net.InetSocketAddress addr)
NameNodesetRpcServiceServerAddress in class NameNodeprotected java.net.InetSocketAddress getHttpServerAddress(org.apache.hadoop.conf.Configuration conf)
getHttpServerAddress in class NameNodeprotected void loadNamesystem(org.apache.hadoop.conf.Configuration conf)
throws java.io.IOException
loadNamesystem in class NameNodejava.io.IOExceptionprotected void initialize(org.apache.hadoop.conf.Configuration conf)
throws java.io.IOException
NameNodeinitialize in class NameNodeconf - the configurationjava.io.IOExceptionprotected NameNodeRpcServer createRpcServer(org.apache.hadoop.conf.Configuration conf) throws java.io.IOException
NameNodecreateRpcServer in class NameNodejava.io.IOExceptionpublic void stop()
NameNodepublic boolean setSafeMode(org.apache.hadoop.hdfs.protocol.HdfsConstants.SafeModeAction action)
throws java.io.IOException
java.io.IOExceptionprotected java.lang.String getNameServiceId(org.apache.hadoop.conf.Configuration conf)
NameNodegetNameServiceId in class NameNodeprotected HAState createHAState(org.apache.hadoop.conf.Configuration conf)
createHAState in class NameNodeprotected NameNode.NameNodeHAContext createHAContext()
createHAContext in class NameNodeCopyright © 2008–2025 Apache Software Foundation. All rights reserved.