[
https://issues.apache.org/jira/browse/AMBARI-15058?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15163665#comment-15163665
]
Hudson commented on AMBARI-15058:
---------------------------------
ABORTED: Integrated in Ambari-trunk-Commit #4382 (See
[https://builds.apache.org/job/Ambari-trunk-Commit/4382/])
AMBARI-15058 - Schema changes for component history (jonathanhurley) (jhurley:
[http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=e4d1475eab7be09baeed6624447b122f2bf7853c])
*
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ServiceComponentDesiredStateDAO.java
* ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql
* ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql
* ambari-server/src/main/resources/META-INF/persistence.xml
* ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql
*
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceComponentDesiredStateEntity.java
* ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql
* ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql
*
ambari-server/src/test/java/org/apache/ambari/server/state/ServiceComponentTest.java
* ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql
*
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceComponentHistoryEntity.java
* ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql
> Schema changes for component history
> ------------------------------------
>
> Key: AMBARI-15058
> URL: https://issues.apache.org/jira/browse/AMBARI-15058
> Project: Ambari
> Issue Type: Task
> Components: ambari-server
> Affects Versions: 2.4.0
> Reporter: Jonathan Hurley
> Assignee: Jonathan Hurley
> Priority: Critical
> Fix For: 2.4.0
>
>
> Create schema and entities to manage upgrade and downgrade history for
> components. Since we are pairing the upgrade/downgrade request with a
> component (and not a service) the associated table needs to be a 1:1 mapping
> with cluster component. Currently, the only table tracking this is the
> {{servicecomponentdesiredstate}}:
> {code}
> CREATE TABLE servicecomponent_history(
> id BIGINT NOT NULL,
> component_id BIGINT NOT NULL,
> upgrade_id BIGINT NOT NULL,
> from_stack_id BIGINT NOT NULL,
> to_stack_id BIGINT NOT NULL,
> CONSTRAINT PK_sc_history PRIMARY KEY (id),
> CONSTRAINT FK_sc_history_component_id FOREIGN KEY (component_id) REFERENCES
> servicecomponentdesiredstate (id),
> CONSTRAINT FK_sc_history_upgrade_id FOREIGN KEY (upgrade_id) REFERENCES
> upgrade (upgrade_id),
> CONSTRAINT FK_sc_history_from_stack_id FOREIGN KEY (from_stack_id)
> REFERENCES stack (stack_id),
> CONSTRAINT FK_sc_history_to_stack_id FOREIGN KEY (to_stack_id) REFERENCES
> stack (stack_id)
> );
> {code}
> The new {{servicecomponent_history}} will contain mostly FK's to other tables
> since the {{servicecomponentdesiredstate}} and the {{upgrade}} table contain
> all of the information needed. There's no need to data duplication.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)