public class UpgradePack extends Object
Modifier and Type | Class and Description |
---|---|
static class |
UpgradePack.IntermediateStack
An intermediate stack definition in
upgrade/upgrade-path/intermediate-stack path
|
static class |
UpgradePack.OrderService
A service definition that holds a list of components in the 'order' element.
|
static class |
UpgradePack.PrerequisiteCheckConfig
Prerequisite checks configuration
|
static class |
UpgradePack.PrerequisiteCheckProperties
Config properties for a specific prerequisite check.
|
static class |
UpgradePack.PrerequisiteChecks
Container class to specify list of additional prerequisite checks to run in addition to the
required prerequisite checks and configuration properties for all prerequisite checks
|
static class |
UpgradePack.PrerequisiteProperty
Prerequisite check config property
|
static class |
UpgradePack.ProcessingComponent
A component definition in the 'processing/service' path.
|
static class |
UpgradePack.ProcessingService
A service definition in the 'processing' element.
|
Constructor and Description |
---|
UpgradePack() |
Modifier and Type | Method and Description |
---|---|
boolean |
anyGroupTaskMatch(Predicate<Task> taskPredicate) |
boolean |
canBeApplied(String targetVersion) |
boolean |
equals(Object object) |
Map<String,AddComponentTask> |
getAddComponentTasks()
Gets a mapping of SERVICE/COMPONENT to
AddComponentTask for this
upgrade pack. |
List<Grouping> |
getAllGroups() |
List<Grouping> |
getGroups(Direction direction)
Gets the groups defined for the upgrade pack.
|
List<UpgradePack.IntermediateStack> |
getIntermediateStacks()
Gets a list of stacks which are between the current stack version and the
target stack version inclusive.
|
String |
getName() |
String |
getOrchestrationOptions() |
StackId |
getOwnerStackId() |
UpgradePack.PrerequisiteCheckConfig |
getPrerequisiteCheckConfig() |
List<String> |
getPrerequisiteChecks() |
String |
getSource() |
String |
getSourceStack() |
String |
getTarget() |
String |
getTargetStack() |
Map<String,Map<String,UpgradePack.ProcessingComponent>> |
getTasks()
Gets the tasks by which services and components should be upgraded.
|
org.apache.ambari.spi.upgrade.UpgradeType |
getType() |
int |
hashCode() |
boolean |
isAllTarget() |
boolean |
isComponentFailureAutoSkipped()
Gets whether skippable components that failed are automatically skipped.
|
boolean |
isDowngradeAllowed() |
boolean |
isServiceCheckFailureAutoSkipped()
Gets whether skippable service checks that failed are automatically
skipped.
|
void |
mergePrerequisiteChecks(UpgradePack pack)
Merges the prerequisite checks section of the upgrade xml with
the prerequisite checks from a service's upgrade xml.
|
void |
mergeProcessing(UpgradePack pack)
Merges the processing section of the upgrade xml with
the processing section from a service's upgrade xml.
|
void |
setName(String name) |
void |
setOwnerStackId(StackId stackId)
Sets the stack id that owns this upgrade pack.
|
public String getName()
public void setName(String name)
public String getSource()
public String getSourceStack()
public String getTarget()
public String getTargetStack()
public org.apache.ambari.spi.upgrade.UpgradeType getType()
public List<String> getPrerequisiteChecks()
public UpgradePack.PrerequisiteCheckConfig getPrerequisiteCheckConfig()
public void mergePrerequisiteChecks(UpgradePack pack)
pack
- the service's upgrade packpublic void mergeProcessing(UpgradePack pack)
pack
- the service's upgrade packpublic List<UpgradePack.IntermediateStack> getIntermediateStacks()
AmbariMetaInfo.getConfigUpgradePack(String, String)
.null
if none.public boolean isComponentFailureAutoSkipped()
public boolean isServiceCheckFailureAutoSkipped()
public List<Grouping> getGroups(Direction direction)
direction
- the direction to return the ordered groupspublic boolean isDowngradeAllowed()
true
if upgrade pack supports downgrade or false
if not.public boolean canBeApplied(String targetVersion)
public Map<String,Map<String,UpgradePack.ProcessingComponent>> getTasks()
public Map<String,AddComponentTask> getAddComponentTasks()
AddComponentTask
for this
upgrade pack.public boolean isAllTarget()
true
if the upgrade targets any version or stack. Both
target
and targetStack
must equal "*"public boolean anyGroupTaskMatch(Predicate<Task> taskPredicate)
public void setOwnerStackId(StackId stackId)
stackId
- the owner stack idpublic StackId getOwnerStackId()
public String getOrchestrationOptions()
Copyright © 2022 Apache Software Foundation. All rights reserved.