org.apache.hadoop.hdfs.server.datanode
Class UpgradeObjectDatanode

java.lang.Object
  extended by org.apache.hadoop.hdfs.server.common.UpgradeObject
      extended by 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.


Field Summary
 
Fields inherited from class org.apache.hadoop.hdfs.server.common.UpgradeObject
status
 
Constructor Summary
UpgradeObjectDatanode()
           
 
Method Summary
 UpgradeCommand completeUpgrade()
          Complete upgrade and return a status complete command for broadcasting.
abstract  void doUpgrade()
          Specifies how the upgrade is performed.
protected  DataNode getDatanode()
           
 HdfsConstants.NodeType getType()
          Get the type of the software component, which this object is upgrading.
 void run()
           
 
Methods inherited from class org.apache.hadoop.hdfs.server.common.UpgradeObject
compareTo, equals, getDescription, getUpgradeStatus, getUpgradeStatusReport, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.hadoop.hdfs.server.common.Upgradeable
getVersion, startUpgrade
 

Constructor Detail

UpgradeObjectDatanode

public UpgradeObjectDatanode()
Method Detail

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