|
@@ -198,6 +198,16 @@ public class SchemaUpgradeHelper {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public void resetUIState() throws AmbariException {
|
|
|
|
+ LOG.info("Resetting UI state.");
|
|
|
|
+ try {
|
|
|
|
+ dbAccessor.updateTable("key_value_store", "\"value\"", "{\"clusterState\":\"CLUSTER_STARTED_5\"}",
|
|
|
|
+ "where \"key\"='CLUSTER_CURRENT_STATUS'");
|
|
|
|
+ } catch (SQLException e) {
|
|
|
|
+ throw new AmbariException("Unable to reset UI state", e);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* Upgrade Ambari DB schema to the target version passed in as the only
|
|
* Upgrade Ambari DB schema to the target version passed in as the only
|
|
* argument.
|
|
* argument.
|
|
@@ -229,6 +239,8 @@ public class SchemaUpgradeHelper {
|
|
|
|
|
|
schemaUpgradeHelper.executeDMLUpdates(upgradeCatalogs);
|
|
schemaUpgradeHelper.executeDMLUpdates(upgradeCatalogs);
|
|
|
|
|
|
|
|
+ schemaUpgradeHelper.resetUIState();
|
|
|
|
+
|
|
LOG.info("Upgrade successful.");
|
|
LOG.info("Upgrade successful.");
|
|
|
|
|
|
schemaUpgradeHelper.stopPersistenceService();
|
|
schemaUpgradeHelper.stopPersistenceService();
|