org.apache.hadoop.hdfs.server.datanode
Class UpgradeObjectDatanode
java.lang.Object
org.apache.hadoop.hdfs.server.common.UpgradeObject
org.apache.hadoop.hdfs.server.datanode.UpgradeObjectDatanode
- All Implemented Interfaces:
- Comparable<Upgradeable>, Runnable, Upgradeable
@InterfaceAudience.Private
public abstract class UpgradeObjectDatanode
- extends UpgradeObject
- implements Runnable
Base class for data-node upgrade objects.
Data-node upgrades are run in separate threads.
UpgradeObjectDatanode
public UpgradeObjectDatanode()
getType
public HdfsConstants.NodeType getType()
- Description copied from interface:
Upgradeable
- Get the type of the software component, which this object is upgrading.
- Specified by:
getType
in interface Upgradeable
- Returns:
- type
getDatanode
protected DataNode getDatanode()
doUpgrade
public abstract void doUpgrade()
throws IOException
- Specifies how the upgrade is performed.
- Throws:
IOException
run
public void run()
- Specified by:
run
in interface Runnable
completeUpgrade
public UpgradeCommand completeUpgrade()
throws IOException
- Complete upgrade and return a status complete command for broadcasting.
Data-nodes finish upgrade at different times.
The data-node needs to re-confirm with the name-node that the upgrade
is complete while other nodes are still upgrading.
- Specified by:
completeUpgrade
in interface Upgradeable
- Throws:
IOException
Copyright © 2009 The Apache Software Foundation