public abstract class AbstractUpgradeCatalog extends Object implements UpgradeCatalog
Modifier and Type | Class and Description |
---|---|
protected static class |
AbstractUpgradeCatalog.VersionComparator |
Modifier and Type | Field and Description |
---|---|
protected Configuration |
configuration |
protected DBAccessor |
dbAccessor |
protected StackUpgradeUtil |
stackUpgradeUtil |
Constructor and Description |
---|
AbstractUpgradeCatalog(com.google.inject.Injector injector) |
Modifier and Type | Method and Description |
---|---|
protected void |
changePostgresSearchPath() |
protected abstract void |
executeDDLUpdates() |
protected abstract void |
executeDMLUpdates() |
protected void |
executeInTransaction(Runnable func) |
protected String |
getDbType() |
protected com.google.inject.Provider<javax.persistence.EntityManager> |
getEntityManagerProvider() |
String |
getSourceVersion()
Return latest source version that can be upgraded from.
|
protected static UpgradeCatalog |
getUpgradeCatalog(String version) |
protected void |
registerCatalog(UpgradeCatalog upgradeCatalog)
Every subclass needs to register itself
|
String |
toString() |
int |
updateMetaInfoVersion(String version)
Update metainfo to new version.
|
void |
upgradeData()
perform data updates as necessary, requires started persist service
|
void |
upgradeSchema()
Run the upgrade scripts for upgrading ambari server from current version
to the new version.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getTargetVersion
@Inject protected DBAccessor dbAccessor
@Inject protected Configuration configuration
@Inject protected StackUpgradeUtil stackUpgradeUtil
@Inject public AbstractUpgradeCatalog(com.google.inject.Injector injector)
protected void registerCatalog(UpgradeCatalog upgradeCatalog)
public String getSourceVersion()
UpgradeCatalog
getSourceVersion
in interface UpgradeCatalog
protected static UpgradeCatalog getUpgradeCatalog(String version)
public int updateMetaInfoVersion(String version)
protected String getDbType()
protected com.google.inject.Provider<javax.persistence.EntityManager> getEntityManagerProvider()
protected void executeInTransaction(Runnable func)
protected void changePostgresSearchPath() throws SQLException
SQLException
public void upgradeSchema() throws AmbariException, SQLException
UpgradeCatalog
upgradeSchema
in interface UpgradeCatalog
AmbariException
SQLException
public void upgradeData() throws AmbariException, SQLException
UpgradeCatalog
upgradeData
in interface UpgradeCatalog
AmbariException
SQLException
protected abstract void executeDDLUpdates() throws AmbariException, SQLException
AmbariException
SQLException
protected abstract void executeDMLUpdates() throws AmbariException, SQLException
AmbariException
SQLException
Copyright © 2016. All rights reserved.