org.apache.hadoop.hdfs.server.namenode
Class UpgradeObjectNamenode
java.lang.Object
org.apache.hadoop.hdfs.server.common.UpgradeObject
org.apache.hadoop.hdfs.server.namenode.UpgradeObjectNamenode
- All Implemented Interfaces:
- Comparable<Upgradeable>, Upgradeable
@InterfaceAudience.Private
public abstract class UpgradeObjectNamenode
- extends UpgradeObject
Base class for name-node upgrade objects.
Data-node upgrades are run in separate threads.
UpgradeObjectNamenode
public UpgradeObjectNamenode()
processUpgradeCommand
public abstract UpgradeCommand processUpgradeCommand(UpgradeCommand command)
throws IOException
- Process an upgrade command.
RPC has only one very generic command for all upgrade related inter
component communications.
The actual command recognition and execution should be handled here.
The reply is sent back also as an UpgradeCommand.
- Parameters:
command
-
- Returns:
- the reply command which is analyzed on the client side.
- Throws:
IOException
getType
public HdfsConstants.NodeType getType()
- Description copied from interface:
Upgradeable
- Get the type of the software component, which this object is upgrading.
- Returns:
- type
startUpgrade
public UpgradeCommand startUpgrade()
throws IOException
- Description copied from interface:
Upgradeable
- Prepare for the upgrade.
E.g. initialize upgrade data structures and set status to 0.
Returns an upgrade command that is used for broadcasting to other cluster
components.
E.g. name-node informs data-nodes that they must perform a distributed upgrade.
- Returns:
- an UpgradeCommand for broadcasting.
- Throws:
IOException
forceProceed
public void forceProceed()
throws IOException
- Throws:
IOException
Copyright © 2009 The Apache Software Foundation