public class UpgradeCatalog270 extends AbstractUpgradeCatalog
AbstractUpgradeCatalog.ConfigUpdateType, AbstractUpgradeCatalog.VersionComparator
ALERT_URL_PROPERTY_CONNECTION_TIMEOUT, ambariManagementController, ambariSequencesTable, ambariUpgradeConfigUpdatesFileName, AUTHENTICATED_USER_NAME, configuration, CONFIGURATION_TYPE_RANGER_HBASE_PLUGIN_PROPERTIES, CONFIGURATION_TYPE_RANGER_HIVE_PLUGIN_PROPERTIES, CONFIGURATION_TYPE_RANGER_KNOX_PLUGIN_PROPERTIES, dbAccessor, injector, PROPERTY_RANGER_HBASE_PLUGIN_ENABLED, PROPERTY_RANGER_HIVE_PLUGIN_ENABLED, PROPERTY_RANGER_KNOX_PLUGIN_ENABLED, QUEUES, YARN_SCHEDULER_CAPACITY_ROOT_QUEUE, YARN_SCHEDULER_CAPACITY_ROOT_QUEUES
Constructor and Description |
---|
UpgradeCatalog270(com.google.inject.Injector injector)
Don't forget to register new UpgradeCatalogs in
SchemaUpgradeHelper.UpgradeHelperModule.configure() |
Modifier and Type | Method and Description |
---|---|
protected void |
addAmbariConfigurationTable() |
protected void |
addHostComponentLastStateTable() |
protected void |
addUserAuthenticationSequence() |
protected void |
clearHadoopMetrics2Content() |
protected void |
createRoleAuthorizations() |
protected void |
executeDDLUpdates()
Perform database schema transformation.
|
protected void |
executeDMLUpdates()
Performs normal data upgrade
|
protected void |
executePreDMLUpdates()
Perform data insertion before running normal upgrade of data, requires started persist service
|
protected PrepareKerberosIdentitiesServerAction |
getPrepareIdentityServerAction() |
String |
getSourceVersion()
Return latest source version that can be upgraded from.
|
String |
getTargetVersion()
Return the version that will be upgraded to
|
protected void |
moveAmbariPropertiesToAmbariConfiguration()
Moves SSO and LDAP related properties from ambari.properties to ambari_configuration DB table
|
protected String |
removeAdminHandlers(String content) |
protected void |
renameAmbariInfra() |
protected void |
setStatusOfStagesAndRequests() |
protected void |
showHcatDeletedUserMessage() |
protected void |
updateAmsConfigs() |
protected String |
updateInfraSolrEnv(String content) |
protected void |
updateKerberosConfigurations()
Upgrades kerberos related data.
|
protected void |
updateKerberosDescriptorArtifact(ArtifactDAO artifactDAO,
ArtifactEntity artifactEntity)
Update the specified Kerberos Descriptor artifact to conform to the new structure.
|
protected void |
updateLogSearchConfigs()
Updates Log Search configs.
|
protected String |
updateLuceneMatchVersion(String content,
String newLuceneMatchVersion) |
protected String |
updateMergeFactor(String content,
String variableName) |
protected void |
updateRequestTable() |
protected void |
updateSolrConfigurations() |
protected void |
updateStageTable() |
protected void |
updateStormConfigs()
Removes storm-site configs that were present for ambari needs and
sets the actual property `storm.thrift.transport` to the correct value
|
protected void |
upgradeKerberosTables()
Creates new tables for changed kerberos data.
|
protected void |
upgradeRepoTables() |
protected void |
upgradeUserTables()
Upgrade the users table as well as supporting tables.
|
protected void |
upgradeWidgetTable() |
addAuthorizationToRole, addAuthorizationToRole, addAuthorizationToRole, addConnectionTimeoutParamForWebAndMetricAlerts, addNewConfigurationsFromXml, addRoleAuthorization, addSequence, addSequences, changePostgresSearchPath, convertStringToDocument, executeInTransaction, fetchMaxId, getCapacitySchedulerLeafQueues, getCheckedClusterMap, getEntityManagerProvider, getKerberosDescriptor, getUpgradeCatalog, getUpgradeJsonOutput, isConfigEnabled, isFinal, isNNHAEnabled, isQueueNameValid, onPostUpgrade, preUpgradeData, registerCatalog, removeConfigurationPropertiesFromCluster, setConfigUpdatesFileName, toString, updateConfigurationProperties, updateConfigurationPropertiesForCluster, updateConfigurationPropertiesForCluster, updateConfigurationPropertiesWithValuesFromXml, updateConfigurationPropertiesWithValuesFromXml, updateDatabaseSchemaVersion, updateKerberosDescriptorArtifacts, updateKerberosDescriptorIdentityReferences, updateKerberosDescriptorIdentityReferences, updateMetaInfoVersion, updateQueueName, updateWidgetDefinitionsForService, upgradeData, upgradeSchema
protected static final String STAGE_TABLE
protected static final String STAGE_STATUS_COLUMN
protected static final String STAGE_DISPLAY_STATUS_COLUMN
protected static final String REQUEST_TABLE
protected static final String REQUEST_DISPLAY_STATUS_COLUMN
protected static final String REQUEST_USER_NAME_COLUMN
protected static final String HOST_ROLE_COMMAND_TABLE
protected static final String HRC_OPS_DISPLAY_NAME_COLUMN
protected static final String COMPONENT_DESIRED_STATE_TABLE
protected static final String COMPONENT_STATE_TABLE
protected static final String COMPONENT_LAST_STATE_COLUMN
protected static final String SERVICE_DESIRED_STATE_TABLE
protected static final String SECURITY_STATE_COLUMN
protected static final String AMBARI_SEQUENCES_TABLE
protected static final String AMBARI_SEQUENCES_SEQUENCE_NAME_COLUMN
protected static final String AMBARI_SEQUENCES_SEQUENCE_VALUE_COLUMN
protected static final String AMBARI_CONFIGURATION_TABLE
protected static final String AMBARI_CONFIGURATION_CATEGORY_NAME_COLUMN
protected static final String AMBARI_CONFIGURATION_PROPERTY_NAME_COLUMN
protected static final String AMBARI_CONFIGURATION_PROPERTY_VALUE_COLUMN
protected static final String USER_AUTHENTICATION_TABLE
protected static final String USER_AUTHENTICATION_USER_AUTHENTICATION_ID_COLUMN
protected static final String USER_AUTHENTICATION_USER_ID_COLUMN
protected static final String USER_AUTHENTICATION_AUTHENTICATION_TYPE_COLUMN
protected static final String USER_AUTHENTICATION_AUTHENTICATION_KEY_COLUMN
protected static final String USER_AUTHENTICATION_CREATE_TIME_COLUMN
protected static final String USER_AUTHENTICATION_UPDATE_TIME_COLUMN
protected static final String USER_AUTHENTICATION_PRIMARY_KEY
protected static final String USER_AUTHENTICATION_USER_AUTHENTICATION_USER_ID_INDEX
protected static final String USER_AUTHENTICATION_USER_AUTHENTICATION_USERS_FOREIGN_KEY
protected static final String USERS_TABLE
protected static final String USERS_USER_ID_COLUMN
protected static final String USERS_PRINCIPAL_ID_COLUMN
protected static final String USERS_USER_TYPE_COLUMN
protected static final String USERS_USER_PASSWORD_COLUMN
protected static final String USERS_CREATE_TIME_COLUMN
protected static final String USERS_LDAP_USER_COLUMN
protected static final String USERS_CONSECUTIVE_FAILURES_COLUMN
protected static final String USERS_USER_NAME_COLUMN
protected static final String USERS_DISPLAY_NAME_COLUMN
protected static final String USERS_LOCAL_USERNAME_COLUMN
protected static final String USERS_VERSION_COLUMN
protected static final String UNIQUE_USERS_0_INDEX
protected static final String MEMBERS_TABLE
protected static final String MEMBERS_MEMBER_ID_COLUMN
protected static final String MEMBERS_GROUP_ID_COLUMN
protected static final String MEMBERS_USER_ID_COLUMN
protected static final String ADMINPRIVILEGE_TABLE
protected static final String ADMINPRIVILEGE_PRIVILEGE_ID_COLUMN
protected static final String ADMINPRIVILEGE_PERMISSION_ID_COLUMN
protected static final String ADMINPRIVILEGE_RESOURCE_ID_COLUMN
protected static final String ADMINPRIVILEGE_PRINCIPAL_ID_COLUMN
protected static final String KERBEROS_KEYTAB_TABLE
protected static final String KERBEROS_KEYTAB_PRINCIPAL_TABLE
protected static final String KKP_MAPPING_SERVICE_TABLE
protected static final String KEYTAB_PATH_FIELD
protected static final String OWNER_NAME_FIELD
protected static final String OWNER_ACCESS_FIELD
protected static final String GROUP_NAME_FIELD
protected static final String GROUP_ACCESS_FIELD
protected static final String IS_AMBARI_KEYTAB_FIELD
protected static final String WRITE_AMBARI_JAAS_FIELD
protected static final String PK_KERBEROS_KEYTAB
protected static final String KKP_ID_COLUMN
protected static final String PRINCIPAL_NAME_COLUMN
protected static final String IS_DISTRIBUTED_COLUMN
protected static final String PK_KKP
protected static final String UNI_KKP
protected static final String SERVICE_NAME_COLUMN
protected static final String COMPONENT_NAME_COLUMN
protected static final String PK_KKP_MAPPING_SERVICE
protected static final String FK_KKP_KEYTAB_PATH
protected static final String FK_KKP_HOST_ID
protected static final String FK_KKP_PRINCIPAL_NAME
protected static final String HOSTS_TABLE
protected static final String KERBEROS_PRINCIPAL_TABLE
protected static final String FK_KKP_SERVICE_PRINCIPAL
protected static final String KKP_ID_SEQ_NAME
protected static final String KERBEROS_PRINCIPAL_HOST_TABLE
protected static final String HOST_ID_COLUMN
protected static final String REPO_OS_TABLE
protected static final String REPO_OS_ID_COLUMN
protected static final String REPO_OS_REPO_VERSION_ID_COLUMN
protected static final String REPO_OS_FAMILY_COLUMN
protected static final String REPO_OS_AMBARI_MANAGED_COLUMN
protected static final String REPO_OS_PRIMARY_KEY
protected static final String REPO_OS_FOREIGN_KEY
protected static final String REPO_DEFINITION_TABLE
protected static final String REPO_DEFINITION_ID_COLUMN
protected static final String REPO_DEFINITION_REPO_OS_ID_COLUMN
protected static final String REPO_DEFINITION_REPO_NAME_COLUMN
protected static final String REPO_DEFINITION_REPO_ID_COLUMN
protected static final String REPO_DEFINITION_BASE_URL_COLUMN
protected static final String REPO_DEFINITION_DISTRIBUTION_COLUMN
protected static final String REPO_DEFINITION_COMPONENTS_COLUMN
protected static final String REPO_DEFINITION_UNIQUE_REPO_COLUMN
protected static final String REPO_DEFINITION_MIRRORS_COLUMN
protected static final String REPO_DEFINITION_PRIMARY_KEY
protected static final String REPO_DEFINITION_FOREIGN_KEY
protected static final String REPO_TAGS_TABLE
protected static final String REPO_TAGS_REPO_DEFINITION_ID_COLUMN
protected static final String REPO_TAGS_TAG_COLUMN
protected static final String REPO_TAGS_FOREIGN_KEY
protected static final String REPO_APPLICABLE_SERVICES_TABLE
protected static final String REPO_APPLICABLE_SERVICES_REPO_DEFINITION_ID_COLUMN
protected static final String REPO_APPLICABLE_SERVICES_SERVICE_NAME_COLUMN
protected static final String REPO_APPLICABLE_SERVICES_FOREIGN_KEY
protected static final String REPO_VERSION_TABLE
protected static final String REPO_VERSION_REPO_VERSION_ID_COLUMN
protected static final String REPO_VERSION_REPOSITORIES_COLUMN
protected static final String WIDGET_TABLE
protected static final String WIDGET_TAG_COLUMN
protected static final String SERVICE_COMPONENT_DESIRED_STATE_TABLE
protected static final String HIVE_SERVICE_COMPONENT_WEBHCAT_SERVER
protected static final String CONFIGURATION_CORE_SITE
protected static final String CONFIGURATION_WEBHCAT_SITE
protected static final String PROPERTY_HADOOP_PROXYUSER_HTTP_HOSTS
protected static final String PROPERTY_TEMPLETON_HIVE_PROPERTIES
public static final String AMBARI_INFRA_OLD_NAME
public static final String AMBARI_INFRA_NEW_NAME
public static final String SERVICE_CONFIG_MAPPING_TABLE
public static final String CLUSTER_CONFIG_TABLE
public static final String FK_HOSTCOMPONENTDESIREDSTATE_COMPONENT_NAME
public static final String FK_HOSTCOMPONENTSTATE_COMPONENT_NAME
public static final String FK_SERVICECOMPONENTDESIREDSTATE_SERVICE_NAME
@Inject public UpgradeCatalog270(com.google.inject.Injector injector)
SchemaUpgradeHelper.UpgradeHelperModule.configure()
injector
- Guice injector to track dependencies and uses bindings to inject them.public String getTargetVersion()
public String getSourceVersion()
getSourceVersion
in interface UpgradeCatalog
getSourceVersion
in class AbstractUpgradeCatalog
protected void executeDDLUpdates() throws org.apache.ambari.server.AmbariException, SQLException
executeDDLUpdates
in class AbstractUpgradeCatalog
org.apache.ambari.server.AmbariException
SQLException
protected void upgradeUserTables() throws SQLException
Affected table are
SQLException
- if an error occurs while executing SQL statementscreateUserAuthenticationTable()
,
updateGroupMembershipRecords()
,
updateAdminPrivilegeRecords()
,
updateUsersTable()
protected void upgradeRepoTables() throws SQLException
SQLException
protected void updateStageTable() throws SQLException
SQLException
protected void updateRequestTable() throws SQLException
SQLException
protected void upgradeWidgetTable() throws SQLException
SQLException
protected void addAmbariConfigurationTable() throws SQLException
SQLException
protected void addHostComponentLastStateTable() throws SQLException
SQLException
protected void upgradeKerberosTables() throws SQLException
SQLException
protected void executePreDMLUpdates() throws org.apache.ambari.server.AmbariException, SQLException
executePreDMLUpdates
in class AbstractUpgradeCatalog
org.apache.ambari.server.AmbariException
SQLException
protected void executeDMLUpdates() throws org.apache.ambari.server.AmbariException, SQLException
executeDMLUpdates
in class AbstractUpgradeCatalog
org.apache.ambari.server.AmbariException
SQLException
protected void renameAmbariInfra()
protected void updateKerberosDescriptorArtifact(ArtifactDAO artifactDAO, ArtifactEntity artifactEntity) throws org.apache.ambari.server.AmbariException
AbstractUpgradeCatalog
updateKerberosDescriptorArtifact
in class AbstractUpgradeCatalog
artifactDAO
- the ArtifactDAO to use to store the updated ArtifactEntityartifactEntity
- the ArtifactEntity to updateorg.apache.ambari.server.AmbariException
protected void addUserAuthenticationSequence() throws SQLException
SQLException
protected void createRoleAuthorizations() throws SQLException
SQLException
protected void showHcatDeletedUserMessage()
protected void setStatusOfStagesAndRequests()
protected void updateLogSearchConfigs() throws org.apache.ambari.server.AmbariException, SQLException
org.apache.ambari.server.AmbariException
SQLException
protected PrepareKerberosIdentitiesServerAction getPrepareIdentityServerAction()
protected void updateKerberosConfigurations() throws org.apache.ambari.server.AmbariException
org.apache.ambari.server.AmbariException
protected void moveAmbariPropertiesToAmbariConfiguration() throws org.apache.ambari.server.AmbariException
org.apache.ambari.server.AmbariException
- if there was any issue when clearing ambari.propertiesprotected void updateSolrConfigurations() throws org.apache.ambari.server.AmbariException
org.apache.ambari.server.AmbariException
protected String updateLuceneMatchVersion(String content, String newLuceneMatchVersion)
protected void updateAmsConfigs() throws org.apache.ambari.server.AmbariException
org.apache.ambari.server.AmbariException
protected void updateStormConfigs() throws org.apache.ambari.server.AmbariException
org.apache.ambari.server.AmbariException
protected void clearHadoopMetrics2Content() throws org.apache.ambari.server.AmbariException
org.apache.ambari.server.AmbariException
Copyright © 2022 Apache Software Foundation. All rights reserved.