Please use the following document to collaborate: https://docs.google.com/a/hortonworks.com/document/d/1RcAth8M1oEDOjIZ0qMaCAtatCyz6qdLWuEcZLC4Ejbs/edit?disco=AAAAAq7NM04&usp=comment_email_document
Thank you. On Thu, Apr 21, 2016 at 7:41 PM -0700, "Ajit Kumar" <ajit.ku...@hortonworks.com<mailto:ajit.ku...@hortonworks.com>> wrote: This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/46545/ On April 22nd, 2016, 12:01 a.m. UTC, Ajit Kumar wrote: Can you explain what from_version and to_version represent here? On April 22nd, 2016, 12:45 a.m. UTC, Nahappan Somasundaram wrote: from_version is the current version; to_version is the version ambari is moving to. In case of a clean install, from_version is 0.0.0.0 Lets discuss about DB modeling over skype or in person. There are different approaches like having two columns from_version_id and current_version instead of from_version and to_version. - Ajit On April 21st, 2016, 11:15 p.m. UTC, Nahappan Somasundaram wrote: Review request for Ambari, Alejandro Fernandez, Ajit Kumar, Jonathan Hurley, Jayush Luniya, and Sumit Mohanty. By Nahappan Somasundaram. Updated April 21, 2016, 11:15 p.m. Bugs: AMBARI-16029<https://issues.apache.org/jira/browse/AMBARI-16029> Repository: ambari Description AMBARI-16029: Ambari version history - Create DB table, constraints and sequence id. Issue In order to support tracking of ambari version, a DB table is required. Fix Create ambari_version_history table to store from version, to version, install type, start and stop timestamps. Testing 1. mvn clean install [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] Ambari Main ....................................... SUCCESS [5.113s] [INFO] Apache Ambari Project POM ......................... SUCCESS [0.038s] [INFO] Ambari Web ........................................ SUCCESS [26.897s] [INFO] Ambari Views ...................................... SUCCESS [1.400s] [INFO] Ambari Admin View ................................. SUCCESS [9.242s] [INFO] ambari-metrics .................................... SUCCESS [0.346s] [INFO] Ambari Metrics Common ............................. SUCCESS [0.528s] [INFO] Ambari Metrics Hadoop Sink ........................ SUCCESS [1.237s] [INFO] Ambari Metrics Flume Sink ......................... SUCCESS [0.566s] [INFO] Ambari Metrics Kafka Sink ......................... SUCCESS [0.600s] [INFO] Ambari Metrics Storm Sink ......................... SUCCESS [1.531s] [INFO] Ambari Metrics Collector .......................... SUCCESS [7.183s] [INFO] Ambari Metrics Monitor ............................ SUCCESS [1.853s] [INFO] Ambari Metrics Grafana ............................ SUCCESS [1.031s] [INFO] Ambari Metrics Assembly ........................... SUCCESS [1:18.252s] [INFO] Ambari Server ..................................... SUCCESS [2:58.522s] [INFO] Ambari Functional Tests ........................... SUCCESS [2.194s] [INFO] Ambari Agent ...................................... SUCCESS [25.339s] [INFO] Ambari Client ..................................... SUCCESS [0.047s] [INFO] Ambari Python Client .............................. SUCCESS [0.947s] [INFO] Ambari Groovy Client .............................. SUCCESS [2.196s] [INFO] Ambari Shell ...................................... SUCCESS [0.038s] [INFO] Ambari Python Shell ............................... SUCCESS [0.693s] [INFO] Ambari Groovy Shell ............................... SUCCESS [0.907s] [INFO] ambari-logsearch .................................. SUCCESS [0.253s] [INFO] Ambari Logsearch Portal ........................... SUCCESS [7.069s] [INFO] Ambari Logsearch Log Feeder ....................... SUCCESS [1.570s] [INFO] Ambari Logsearch Appender ......................... SUCCESS [0.190s] [INFO] Ambari Logsearch Assembly ......................... SUCCESS [0.079s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 5:56.545s [INFO] Finished at: Thu Apr 21 16:14:34 PDT 2016 [INFO] Final Memory: 274M/1094M [INFO] ------------------------------------------------------------------------ 2. Manual testing Tested with Ambari-DDL-Postgres-EMBEDDED-CREATE.sql. Copied the SQL script to a VM and ran ambari-server reset. Verified the schema: ambari=> \d+ ambari_version_history Table "ambari.ambari_version_history" Column | Type | Modifiers | Storage | Description -----------------+------------------------+-----------+----------+------------- id | bigint | not null | plain | from_version | character varying(255) | not null | extended | to_version | character varying(255) | not null | extended | start_timestamp | bigint | not null | plain | stop_timestamp | bigint | | plain | install_type | character varying(255) | not null | extended | Indexes: "pk_ambari_version_history" PRIMARY KEY, btree (id) Has OIDs: no Diffs * ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql (93576f7498179df1e0b83e65dcd3a1580ce5ba3c) * ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql (b0264f2db234d7a69b8089bc3aac321c8d0ce989) * ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql (56a661675b7cb15763bfce5d043b0eba868d9521) * ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql (f18cdec49f6bfe300eaec31af3ff33142c8c4012) * ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql (4584d5e03c0d3979005ad1474f77f5d58d2519f7) * ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql (d2737d787babff36c52b375884f295cc886002a4) * ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql (c85ae46ca221985b0a258c225634af5ace10d880) View Diff<https://reviews.apache.org/r/46545/diff/>