@Entity public class UpgradeEntity extends Object
Constructor and Description |
---|
UpgradeEntity() |
Modifier and Type | Method and Description |
---|---|
void |
addHistory(UpgradeHistoryEntity historicalEntry)
Adds a historical entry for a service component in this upgrade.
|
boolean |
equals(Object o) |
Long |
getClusterId() |
Direction |
getDirection() |
List<UpgradeHistoryEntity> |
getHistory()
Gets the history of this component's upgrades and downgrades.
|
Long |
getId() |
org.apache.ambari.spi.RepositoryType |
getOrchestration() |
RepositoryVersionEntity |
getRepositoryVersion()
Upgrades will always have a single version being upgraded to and downgrades
will have a single version being downgraded from.
|
Long |
getRequestId() |
List<UpgradeGroupEntity> |
getUpgradeGroups() |
String |
getUpgradePackage() |
StackId |
getUpgradePackStackId() |
org.apache.ambari.spi.upgrade.UpgradeType |
getUpgradeType() |
int |
hashCode() |
boolean |
isComponentFailureAutoSkipped()
Gets whether skippable components that failed are automatically skipped.
|
Boolean |
isDowngradeAllowed() |
Boolean |
isRevertAllowed()
Gets whether this upgrade supports being reverted.
|
boolean |
isServiceCheckFailureAutoSkipped()
Gets whether skippable service checks that failed are automatically
skipped.
|
boolean |
isSuspended()
Gets whether the upgrade is suspended.
|
void |
removeHistories(Collection<UpgradeHistoryEntity> upgradeHistoryEntity)
Removes historical entries for a service component in this upgrade.
|
void |
setAutoSkipComponentFailures(boolean autoSkipComponentFailures)
Sets whether skippable components that failed are automatically skipped.
|
void |
setAutoSkipServiceCheckFailures(boolean autoSkipServiceCheckFailures)
Sets whether skippable service checks that failed are automatically
skipped.
|
void |
setClusterId(Long id) |
void |
setDirection(Direction direction) |
void |
setDowngradeAllowed(boolean canDowngrade) |
void |
setId(Long id) |
void |
setOrchestration(org.apache.ambari.spi.RepositoryType type)
Sets the orchestration for the upgrade.
|
void |
setRepositoryVersion(RepositoryVersionEntity repositoryVersion)
Sets the repository version for this upgrade.
|
void |
setRequestEntity(RequestEntity requestEntity) |
void |
setRevertAllowed(boolean revertable)
Sets whether this upgrade supports being reverted.
|
void |
setSuspended(boolean suspended)
Sets whether the upgrade is suspended.
|
void |
setUpgradeGroups(List<UpgradeGroupEntity> items) |
void |
setUpgradePackage(String upgradePackage) |
void |
setUpgradePackStackId(StackId stackId) |
void |
setUpgradeType(org.apache.ambari.spi.upgrade.UpgradeType upgradeType) |
public Long getId()
public void setId(Long id)
id
- the idpublic Long getClusterId()
public void setClusterId(Long id)
id
- the cluster idpublic List<UpgradeGroupEntity> getUpgradeGroups()
public void setUpgradeGroups(List<UpgradeGroupEntity> items)
items
- the upgrade itemspublic Long getRequestId()
public void setRequestEntity(RequestEntity requestEntity)
public Direction getDirection()
public void setDirection(Direction direction)
direction
- the direction of the upgradepublic org.apache.ambari.spi.upgrade.UpgradeType getUpgradeType()
public Boolean isDowngradeAllowed()
public void setDowngradeAllowed(boolean canDowngrade)
canDowngrade
- true
to allow downgrade, false
to disallow downgradepublic Boolean isRevertAllowed()
RepositoryType.MAINT
or RepositoryType.PATCH
and have never
been previously downgraded.true
if this upgrade can potentially be revereted.public void setRevertAllowed(boolean revertable)
RepositoryType.MAINT
or
RepositoryType.PATCH
upgrades can be revereted only if they have
not previously been downgraded.revertable
- true
to mark this as being revertable, false
otherwise.public void setUpgradeType(org.apache.ambari.spi.upgrade.UpgradeType upgradeType)
upgradeType
- the upgrade type to setpublic String getUpgradePackage()
public void setUpgradePackage(String upgradePackage)
upgradePackage
- the upgrade pack to setpublic StackId getUpgradePackStackId()
public void setUpgradePackStackId(StackId stackId)
stackId
- the stack that owns the upgrade packpublic boolean isComponentFailureAutoSkipped()
HostRoleStatus.SKIPPED_FAILED
state.true
if skippable failed components are automatically
skipped when they fail.public void setAutoSkipComponentFailures(boolean autoSkipComponentFailures)
autoSkipComponentFailures
- true
to automatically skip component failures which are
marked as skippable.public boolean isServiceCheckFailureAutoSkipped()
HostRoleStatus.SKIPPED_FAILED
state.true
if service checks are automatically skipped when they
fail.public void setAutoSkipServiceCheckFailures(boolean autoSkipServiceCheckFailures)
autoSkipServiceCheckFailures
- true
to automatically skip service check failures which
are marked as being skippable.public boolean isSuspended()
true
if the upgrade is suspended.public void setSuspended(boolean suspended)
suspended
- true
to mark the upgrade as suspended.public void addHistory(UpgradeHistoryEntity historicalEntry)
historicalEntry
- the entry to add.public List<UpgradeHistoryEntity> getHistory()
null
if none.public RepositoryVersionEntity getRepositoryVersion()
Direction.UPGRADE
, this represents the target
repository. Direction.DOWNGRADE
, this represents the
repository being downgraded from.null
).public void setRepositoryVersion(RepositoryVersionEntity repositoryVersion)
Direction.UPGRADE
, this represents the target
repository. Direction.DOWNGRADE
, this represents the
repository being downgraded from.repositoryVersion
- the repository version being upgraded to or downgraded from (not
null
).public void setOrchestration(org.apache.ambari.spi.RepositoryType type)
type
- the orchestrationpublic org.apache.ambari.spi.RepositoryType getOrchestration()
public void removeHistories(Collection<UpgradeHistoryEntity> upgradeHistoryEntity)
Copyright © 2022 Apache Software Foundation. All rights reserved.