Class OMLayoutVersionManager
java.lang.Object
org.apache.hadoop.ozone.upgrade.AbstractLayoutVersionManager<OMLayoutFeature>
org.apache.hadoop.ozone.om.upgrade.OMLayoutVersionManager
- All Implemented Interfaces:
org.apache.hadoop.ozone.upgrade.LayoutVersionManager,org.apache.hadoop.ozone.upgrade.LayoutVersionManagerMXBean
public final class OMLayoutVersionManager
extends org.apache.hadoop.ozone.upgrade.AbstractLayoutVersionManager<OMLayoutFeature>
Class to manage layout versions and features for Ozone Manager.
-
Field Summary
FieldsFields inherited from class org.apache.hadoop.ozone.upgrade.AbstractLayoutVersionManager
featureMap, features -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidfinalized(OMLayoutFeature layoutFeature) Class<? extends OMClientRequest> getHandler(String type) Given a type and version, get the corresponding request class type.static Set<Class<? extends OMClientRequest>> getRequestClasses(String packageName) static intprotected voidregisterUpgradeActions(String packageName) Scan classpath and register all actions to layout features.Methods inherited from class org.apache.hadoop.ozone.upgrade.AbstractLayoutVersionManager
close, getFeature, getFeature, getMetadataLayoutVersion, getSoftwareLayoutVersion, getUpgradeState, init, isAllowed, isAllowed, needsFinalization, setUpgradeState, unfinalizedFeatures
-
Field Details
-
OM_CLASS_PACKAGE
- See Also:
-
OM_REQUEST_CLASS_PACKAGE
- See Also:
-
OM_UPGRADE_CLASS_PACKAGE
- See Also:
-
-
Constructor Details
-
OMLayoutVersionManager
public OMLayoutVersionManager(int layoutVersion) throws org.apache.hadoop.ozone.om.exceptions.OMException - Throws:
org.apache.hadoop.ozone.om.exceptions.OMException
-
OMLayoutVersionManager
- Throws:
IOException
-
-
Method Details
-
registerUpgradeActions
Scan classpath and register all actions to layout features. -
getRequestClasses
-
getHandler
Given a type and version, get the corresponding request class type.- Parameters:
type- type string- Returns:
- class type.
-
finalized
- Overrides:
finalizedin classorg.apache.hadoop.ozone.upgrade.AbstractLayoutVersionManager<OMLayoutFeature>
-
maxLayoutVersion
public static int maxLayoutVersion()
-