org.apache.hadoop.hdfs.server.common
Class UpgradeObject
java.lang.Object
org.apache.hadoop.hdfs.server.common.UpgradeObject
- All Implemented Interfaces:
- Comparable<Upgradeable>, Upgradeable
- Direct Known Subclasses:
- UpgradeObjectDatanode, UpgradeObjectNamenode
@InterfaceAudience.Private
public abstract class UpgradeObject
- extends Object
- implements Upgradeable
Abstract upgrade object.
Contains default implementation of common methods of Upgradeable
interface.
Field Summary |
protected short |
status
|
status
protected short status
UpgradeObject
public UpgradeObject()
getUpgradeStatus
public short getUpgradeStatus()
- Description copied from interface:
Upgradeable
- Upgrade status determines a percentage of the work done out of the total
amount required by the upgrade.
100% means that the upgrade is completed.
Any value < 100 means it is not complete.
The return value should provide at least 2 values, e.g. 0 and 100.
- Specified by:
getUpgradeStatus
in interface Upgradeable
- Returns:
- integer value in the range [0, 100].
getDescription
public String getDescription()
- Description copied from interface:
Upgradeable
- Description of the upgrade object for displaying.
- Specified by:
getDescription
in interface Upgradeable
- Returns:
- description
getUpgradeStatusReport
public UpgradeStatusReport getUpgradeStatusReport(boolean details)
throws IOException
- Description copied from interface:
Upgradeable
- Get status report for the upgrade.
- Specified by:
getUpgradeStatusReport
in interface Upgradeable
- Parameters:
details
- true if upgradeStatus details need to be included,
false otherwise
- Returns:
UpgradeStatusReport
- Throws:
IOException
compareTo
public int compareTo(Upgradeable o)
- Specified by:
compareTo
in interface Comparable<Upgradeable>
equals
public boolean equals(Object o)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
Copyright © 2009 The Apache Software Foundation