You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by Alejandro Fernandez <af...@hortonworks.com> on 2014/11/05 05:30:50 UTC

Review Request 27607: Rolling Upgrade Bootstrap - Create new tables and populate during the installation of a new cluster

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/27607/
-----------------------------------------------------------

Review request for Ambari, Dmitro Lisnichenko, Jonathan Hurley, Nate Cole, Sid Wagle, and Yurii Shylov.


Bugs: AMBARI-8148
    https://issues.apache.org/jira/browse/AMBARI-8148


Repository: ambari


Description
-------

1. Create new tables and populate during the installation of a new cluster.

*clusterversion* table
Column    | Type       | Keys | Example
----------|------------|------|---------------------------------------------
id        |BIGINT      |PK    |1
cluster_id|BIGINT      |FK    |2
stack     |VARCHAR(255)|      |HDP-2.2 
version   |VARCHAR(255)|      |HDP-2-2.0.1-885 
state     |VARCHAR(32) |      |INSTALLED, CURRENT, UPGRADING, UPGRADE_FAILED 
start_time|DATETIME    |      |2014-10-31 14:00:00
end_time  |DATETIME    |      |2014-10-31 15:00:00
user_name |VARCHAR(32) |      |admin

*hostcomponentstate* table
Add column upgrade_state VARCHAR(32) ("NONE" is the default, "UPGRADING", "UPGRADE_FAILED")

*hostversion* table
Column   |Type        |Keys         |Example
---------|------------|-------------|----------------------------------
id       |BIGINT      |PK           |1
host_name|VARCHAR(255)|FK hosts.name|c6401.ambari.apache.org
stack    |VARCHAR(255)|             |HDP-2.2
version  |VARCHAR(255)|             |2.2.0.1-885
state    |VARCHAR(32) |             |INSTALLED, CURRENT, NOT_INSTALLED


Diffs
-----

  ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterEntity.java b030ea1 
  ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterVersionEntity.java PRE-CREATION 
  ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentStateEntity.java 7dce204 
  ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostEntity.java a71fddb 
  ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostVersionEntity.java PRE-CREATION 
  ambari-server/src/main/java/org/apache/ambari/server/state/ClusterVersionState.java PRE-CREATION 
  ambari-server/src/main/java/org/apache/ambari/server/state/HostComponentUpgradeState.java PRE-CREATION 
  ambari-server/src/main/java/org/apache/ambari/server/state/HostVersionState.java PRE-CREATION 
  ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentHost.java 3718556 
  ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java bc97936 
  ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog200.java 14c385d 
  ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql 9054b3f 
  ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql abe8b39 
  ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 0bea067 
  ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql ebc8f5c 
  ambari-server/src/main/resources/META-INF/persistence.xml 2d8fedb 
  ambari-server/src/test/python/TestAmbariServer.py c3651eb 

Diff: https://reviews.apache.org/r/27607/diff/


Testing
-------

Ran unit tests

ambari-server unit tests
----------------------------------------------------------------------
Total run:684
Total errors:0
Total failures:0
OK


Thanks,

Alejandro Fernandez


Re: Review Request 27607: Rolling Upgrade Bootstrap - Create new tables and populate during the installation of a new cluster

Posted by Nate Cole <nc...@hortonworks.com>.

> On Nov. 5, 2014, 4:33 p.m., Alejandro Fernandez wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterVersionEntity.java, lines 127-131
> > <https://reviews.apache.org/r/27607/diff/1/?file=750126#file750126line127>
> >
> >     After reading http://www.developerscrappad.com/228/java/java-ee/ejb3-jpa-dealing-with-date-time-and-timestamp/
> >     and
> >     http://www.objectdb.com/java/jpa/entity/types#Date_and_Time_Temporal_Types_
> >     
> >     I think it's clearer to use the current java.util.Date class with @Temporal TIMESTAMP

The rest of the system (except for Users, not sure what happened there) uses the long timestamp.  Let's keep consistent.


- Nate


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/27607/#review60000
-----------------------------------------------------------


On Nov. 4, 2014, 11:30 p.m., Alejandro Fernandez wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/27607/
> -----------------------------------------------------------
> 
> (Updated Nov. 4, 2014, 11:30 p.m.)
> 
> 
> Review request for Ambari, Dmitro Lisnichenko, Jonathan Hurley, Nate Cole, Sid Wagle, and Yurii Shylov.
> 
> 
> Bugs: AMBARI-8148
>     https://issues.apache.org/jira/browse/AMBARI-8148
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> 1. Create new tables and populate during the installation of a new cluster.
> 
> *clusterversion* table
> Column    | Type       | Keys | Example
> ----------|------------|------|---------------------------------------------
> id        |BIGINT      |PK    |1
> cluster_id|BIGINT      |FK    |2
> stack     |VARCHAR(255)|      |HDP-2.2 
> version   |VARCHAR(255)|      |HDP-2-2.0.1-885 
> state     |VARCHAR(32) |      |INSTALLED, CURRENT, UPGRADING, UPGRADE_FAILED 
> start_time|DATETIME    |      |2014-10-31 14:00:00
> end_time  |DATETIME    |      |2014-10-31 15:00:00
> user_name |VARCHAR(32) |      |admin
> 
> *hostcomponentstate* table
> Add column upgrade_state VARCHAR(32) ("NONE" is the default, "UPGRADING", "UPGRADE_FAILED")
> 
> *hostversion* table
> Column   |Type        |Keys         |Example
> ---------|------------|-------------|----------------------------------
> id       |BIGINT      |PK           |1
> host_name|VARCHAR(255)|FK hosts.name|c6401.ambari.apache.org
> stack    |VARCHAR(255)|             |HDP-2.2
> version  |VARCHAR(255)|             |2.2.0.1-885
> state    |VARCHAR(32) |             |INSTALLED, CURRENT, NOT_INSTALLED
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterEntity.java b030ea1 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterVersionEntity.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentStateEntity.java 7dce204 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostEntity.java a71fddb 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostVersionEntity.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/ClusterVersionState.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/HostComponentUpgradeState.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/HostVersionState.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentHost.java 3718556 
>   ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java bc97936 
>   ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog200.java 14c385d 
>   ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql 9054b3f 
>   ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql abe8b39 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 0bea067 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql ebc8f5c 
>   ambari-server/src/main/resources/META-INF/persistence.xml 2d8fedb 
>   ambari-server/src/test/python/TestAmbariServer.py c3651eb 
> 
> Diff: https://reviews.apache.org/r/27607/diff/
> 
> 
> Testing
> -------
> 
> Ran unit tests
> 
> ambari-server unit tests
> ----------------------------------------------------------------------
> Total run:684
> Total errors:0
> Total failures:0
> OK
> 
> 
> Thanks,
> 
> Alejandro Fernandez
> 
>


Re: Review Request 27607: Rolling Upgrade Bootstrap - Create new tables and populate during the installation of a new cluster

Posted by Alejandro Fernandez <af...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/27607/#review60000
-----------------------------------------------------------



ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterVersionEntity.java
<https://reviews.apache.org/r/27607/#comment101340>

    After reading http://www.developerscrappad.com/228/java/java-ee/ejb3-jpa-dealing-with-date-time-and-timestamp/
    and
    http://www.objectdb.com/java/jpa/entity/types#Date_and_Time_Temporal_Types_
    
    I think it's clearer to use the current java.util.Date class with @Temporal TIMESTAMP


- Alejandro Fernandez


On Nov. 5, 2014, 4:30 a.m., Alejandro Fernandez wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/27607/
> -----------------------------------------------------------
> 
> (Updated Nov. 5, 2014, 4:30 a.m.)
> 
> 
> Review request for Ambari, Dmitro Lisnichenko, Jonathan Hurley, Nate Cole, Sid Wagle, and Yurii Shylov.
> 
> 
> Bugs: AMBARI-8148
>     https://issues.apache.org/jira/browse/AMBARI-8148
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> 1. Create new tables and populate during the installation of a new cluster.
> 
> *clusterversion* table
> Column    | Type       | Keys | Example
> ----------|------------|------|---------------------------------------------
> id        |BIGINT      |PK    |1
> cluster_id|BIGINT      |FK    |2
> stack     |VARCHAR(255)|      |HDP-2.2 
> version   |VARCHAR(255)|      |HDP-2-2.0.1-885 
> state     |VARCHAR(32) |      |INSTALLED, CURRENT, UPGRADING, UPGRADE_FAILED 
> start_time|DATETIME    |      |2014-10-31 14:00:00
> end_time  |DATETIME    |      |2014-10-31 15:00:00
> user_name |VARCHAR(32) |      |admin
> 
> *hostcomponentstate* table
> Add column upgrade_state VARCHAR(32) ("NONE" is the default, "UPGRADING", "UPGRADE_FAILED")
> 
> *hostversion* table
> Column   |Type        |Keys         |Example
> ---------|------------|-------------|----------------------------------
> id       |BIGINT      |PK           |1
> host_name|VARCHAR(255)|FK hosts.name|c6401.ambari.apache.org
> stack    |VARCHAR(255)|             |HDP-2.2
> version  |VARCHAR(255)|             |2.2.0.1-885
> state    |VARCHAR(32) |             |INSTALLED, CURRENT, NOT_INSTALLED
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterEntity.java b030ea1 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterVersionEntity.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentStateEntity.java 7dce204 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostEntity.java a71fddb 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostVersionEntity.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/ClusterVersionState.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/HostComponentUpgradeState.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/HostVersionState.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentHost.java 3718556 
>   ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java bc97936 
>   ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog200.java 14c385d 
>   ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql 9054b3f 
>   ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql abe8b39 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 0bea067 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql ebc8f5c 
>   ambari-server/src/main/resources/META-INF/persistence.xml 2d8fedb 
>   ambari-server/src/test/python/TestAmbariServer.py c3651eb 
> 
> Diff: https://reviews.apache.org/r/27607/diff/
> 
> 
> Testing
> -------
> 
> Ran unit tests
> 
> ambari-server unit tests
> ----------------------------------------------------------------------
> Total run:684
> Total errors:0
> Total failures:0
> OK
> 
> 
> Thanks,
> 
> Alejandro Fernandez
> 
>


Re: Review Request 27607: Rolling Upgrade Bootstrap - Create new tables and populate during the installation of a new cluster

Posted by Nate Cole <nc...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/27607/#review59948
-----------------------------------------------------------



ambari-server/src/main/java/org/apache/ambari/server/state/HostComponentUpgradeState.java
<https://reviews.apache.org/r/27607/#comment101257>

    There should be an UpgradeState enum already.  Just use that.



ambari-server/src/main/java/org/apache/ambari/server/state/HostVersionState.java
<https://reviews.apache.org/r/27607/#comment101258>

    This javadoc is in no-mans land.  It's ok to put this kind of detail with the class doc.



ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentHost.java
<https://reviews.apache.org/r/27607/#comment101259>

    Use UpgradeState


- Nate Cole


On Nov. 4, 2014, 11:30 p.m., Alejandro Fernandez wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/27607/
> -----------------------------------------------------------
> 
> (Updated Nov. 4, 2014, 11:30 p.m.)
> 
> 
> Review request for Ambari, Dmitro Lisnichenko, Jonathan Hurley, Nate Cole, Sid Wagle, and Yurii Shylov.
> 
> 
> Bugs: AMBARI-8148
>     https://issues.apache.org/jira/browse/AMBARI-8148
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> 1. Create new tables and populate during the installation of a new cluster.
> 
> *clusterversion* table
> Column    | Type       | Keys | Example
> ----------|------------|------|---------------------------------------------
> id        |BIGINT      |PK    |1
> cluster_id|BIGINT      |FK    |2
> stack     |VARCHAR(255)|      |HDP-2.2 
> version   |VARCHAR(255)|      |HDP-2-2.0.1-885 
> state     |VARCHAR(32) |      |INSTALLED, CURRENT, UPGRADING, UPGRADE_FAILED 
> start_time|DATETIME    |      |2014-10-31 14:00:00
> end_time  |DATETIME    |      |2014-10-31 15:00:00
> user_name |VARCHAR(32) |      |admin
> 
> *hostcomponentstate* table
> Add column upgrade_state VARCHAR(32) ("NONE" is the default, "UPGRADING", "UPGRADE_FAILED")
> 
> *hostversion* table
> Column   |Type        |Keys         |Example
> ---------|------------|-------------|----------------------------------
> id       |BIGINT      |PK           |1
> host_name|VARCHAR(255)|FK hosts.name|c6401.ambari.apache.org
> stack    |VARCHAR(255)|             |HDP-2.2
> version  |VARCHAR(255)|             |2.2.0.1-885
> state    |VARCHAR(32) |             |INSTALLED, CURRENT, NOT_INSTALLED
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterEntity.java b030ea1 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterVersionEntity.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentStateEntity.java 7dce204 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostEntity.java a71fddb 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostVersionEntity.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/ClusterVersionState.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/HostComponentUpgradeState.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/HostVersionState.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentHost.java 3718556 
>   ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java bc97936 
>   ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog200.java 14c385d 
>   ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql 9054b3f 
>   ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql abe8b39 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 0bea067 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql ebc8f5c 
>   ambari-server/src/main/resources/META-INF/persistence.xml 2d8fedb 
>   ambari-server/src/test/python/TestAmbariServer.py c3651eb 
> 
> Diff: https://reviews.apache.org/r/27607/diff/
> 
> 
> Testing
> -------
> 
> Ran unit tests
> 
> ambari-server unit tests
> ----------------------------------------------------------------------
> Total run:684
> Total errors:0
> Total failures:0
> OK
> 
> 
> Thanks,
> 
> Alejandro Fernandez
> 
>


Re: Review Request 27607: Rolling Upgrade Bootstrap - Create new tables and populate during the installation of a new cluster

Posted by Nate Cole <nc...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/27607/#review59957
-----------------------------------------------------------



ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterVersionEntity.java
<https://reviews.apache.org/r/27607/#comment101263>

    All members should be together at the top.  Not member/getter/setter all together


- Nate Cole


On Nov. 4, 2014, 11:30 p.m., Alejandro Fernandez wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/27607/
> -----------------------------------------------------------
> 
> (Updated Nov. 4, 2014, 11:30 p.m.)
> 
> 
> Review request for Ambari, Dmitro Lisnichenko, Jonathan Hurley, Nate Cole, Sid Wagle, and Yurii Shylov.
> 
> 
> Bugs: AMBARI-8148
>     https://issues.apache.org/jira/browse/AMBARI-8148
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> 1. Create new tables and populate during the installation of a new cluster.
> 
> *clusterversion* table
> Column    | Type       | Keys | Example
> ----------|------------|------|---------------------------------------------
> id        |BIGINT      |PK    |1
> cluster_id|BIGINT      |FK    |2
> stack     |VARCHAR(255)|      |HDP-2.2 
> version   |VARCHAR(255)|      |HDP-2-2.0.1-885 
> state     |VARCHAR(32) |      |INSTALLED, CURRENT, UPGRADING, UPGRADE_FAILED 
> start_time|DATETIME    |      |2014-10-31 14:00:00
> end_time  |DATETIME    |      |2014-10-31 15:00:00
> user_name |VARCHAR(32) |      |admin
> 
> *hostcomponentstate* table
> Add column upgrade_state VARCHAR(32) ("NONE" is the default, "UPGRADING", "UPGRADE_FAILED")
> 
> *hostversion* table
> Column   |Type        |Keys         |Example
> ---------|------------|-------------|----------------------------------
> id       |BIGINT      |PK           |1
> host_name|VARCHAR(255)|FK hosts.name|c6401.ambari.apache.org
> stack    |VARCHAR(255)|             |HDP-2.2
> version  |VARCHAR(255)|             |2.2.0.1-885
> state    |VARCHAR(32) |             |INSTALLED, CURRENT, NOT_INSTALLED
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterEntity.java b030ea1 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterVersionEntity.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentStateEntity.java 7dce204 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostEntity.java a71fddb 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostVersionEntity.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/ClusterVersionState.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/HostComponentUpgradeState.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/HostVersionState.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentHost.java 3718556 
>   ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java bc97936 
>   ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog200.java 14c385d 
>   ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql 9054b3f 
>   ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql abe8b39 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 0bea067 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql ebc8f5c 
>   ambari-server/src/main/resources/META-INF/persistence.xml 2d8fedb 
>   ambari-server/src/test/python/TestAmbariServer.py c3651eb 
> 
> Diff: https://reviews.apache.org/r/27607/diff/
> 
> 
> Testing
> -------
> 
> Ran unit tests
> 
> ambari-server unit tests
> ----------------------------------------------------------------------
> Total run:684
> Total errors:0
> Total failures:0
> OK
> 
> 
> Thanks,
> 
> Alejandro Fernandez
> 
>


Re: Review Request 27607: Rolling Upgrade Bootstrap - Create new tables and populate during the installation of a new cluster

Posted by Jonathan Hurley <jh...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/27607/#review60180
-----------------------------------------------------------



ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentStateEntity.java
<https://reviews.apache.org/r/27607/#comment101518>

    SQL says this is NOT NULL



ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostVersionEntity.java
<https://reviews.apache.org/r/27607/#comment101515>

    SQL says this is NOT NULL



ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostVersionEntity.java
<https://reviews.apache.org/r/27607/#comment101516>

    SQL says this is NOT NULL



ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostVersionEntity.java
<https://reviews.apache.org/r/27607/#comment101517>

    SQL says this is NOT NULL


- Jonathan Hurley


On Nov. 5, 2014, 5:02 p.m., Alejandro Fernandez wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/27607/
> -----------------------------------------------------------
> 
> (Updated Nov. 5, 2014, 5:02 p.m.)
> 
> 
> Review request for Ambari, Dmitro Lisnichenko, Jonathan Hurley, Nate Cole, Sid Wagle, and Yurii Shylov.
> 
> 
> Bugs: AMBARI-8148
>     https://issues.apache.org/jira/browse/AMBARI-8148
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> 1. Create new tables and populate during the installation of a new cluster.
> 
> *clusterversion* table
> Column    | Type       | Keys | Example
> ----------|------------|------|---------------------------------------------
> id        |BIGINT      |PK    |1
> cluster_id|BIGINT      |FK    |2
> stack     |VARCHAR(255)|      |HDP-2.2 
> version   |VARCHAR(255)|      |HDP-2-2.0.1-885 
> state     |VARCHAR(32) |      |INSTALLED, CURRENT, UPGRADING, UPGRADE_FAILED 
> start_time|DATETIME    |      |2014-10-31 14:00:00
> end_time  |DATETIME    |      |2014-10-31 15:00:00
> user_name |VARCHAR(32) |      |admin
> 
> *hostcomponentstate* table
> Add column upgrade_state VARCHAR(32) ("NONE" is the default, "UPGRADING", "UPGRADE_FAILED")
> 
> *hostversion* table
> Column   |Type        |Keys         |Example
> ---------|------------|-------------|----------------------------------
> id       |BIGINT      |PK           |1
> host_name|VARCHAR(255)|FK hosts.name|c6401.ambari.apache.org
> stack    |VARCHAR(255)|             |HDP-2.2
> version  |VARCHAR(255)|             |2.2.0.1-885
> state    |VARCHAR(32) |             |INSTALLED, CURRENT, NOT_INSTALLED
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterEntity.java b030ea1 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterVersionEntity.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentStateEntity.java 7dce204 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostEntity.java a71fddb 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostVersionEntity.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/ClusterVersionState.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/HostVersionState.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentHost.java 3718556 
>   ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java bc97936 
>   ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog200.java 14c385d 
>   ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql 9054b3f 
>   ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql abe8b39 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 0bea067 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql ebc8f5c 
>   ambari-server/src/main/resources/META-INF/persistence.xml 2d8fedb 
>   ambari-server/src/test/python/TestAmbariServer.py c3651eb 
> 
> Diff: https://reviews.apache.org/r/27607/diff/
> 
> 
> Testing
> -------
> 
> Ran unit tests
> 
> ambari-server unit tests
> ----------------------------------------------------------------------
> Total run:684
> Total errors:0
> Total failures:0
> OK
> 
> 
> Thanks,
> 
> Alejandro Fernandez
> 
>


Re: Review Request 27607: Rolling Upgrade Bootstrap - Create new tables and populate during the installation of a new cluster

Posted by Nate Cole <nc...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/27607/#review60156
-----------------------------------------------------------


Any tests available?


ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterEntity.java
<https://reviews.apache.org/r/27607/#comment101500>

    Some strange formatting here



ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterVersionEntity.java
<https://reviews.apache.org/r/27607/#comment101501>

    Jonathan indicated an _ should be used for readability



ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentStateEntity.java
<https://reviews.apache.org/r/27607/#comment101502>

    DDL says "not null"



ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentStateEntity.java
<https://reviews.apache.org/r/27607/#comment101503>

    formatting


- Nate Cole


On Nov. 5, 2014, 5:02 p.m., Alejandro Fernandez wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/27607/
> -----------------------------------------------------------
> 
> (Updated Nov. 5, 2014, 5:02 p.m.)
> 
> 
> Review request for Ambari, Dmitro Lisnichenko, Jonathan Hurley, Nate Cole, Sid Wagle, and Yurii Shylov.
> 
> 
> Bugs: AMBARI-8148
>     https://issues.apache.org/jira/browse/AMBARI-8148
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> 1. Create new tables and populate during the installation of a new cluster.
> 
> *clusterversion* table
> Column    | Type       | Keys | Example
> ----------|------------|------|---------------------------------------------
> id        |BIGINT      |PK    |1
> cluster_id|BIGINT      |FK    |2
> stack     |VARCHAR(255)|      |HDP-2.2 
> version   |VARCHAR(255)|      |HDP-2-2.0.1-885 
> state     |VARCHAR(32) |      |INSTALLED, CURRENT, UPGRADING, UPGRADE_FAILED 
> start_time|DATETIME    |      |2014-10-31 14:00:00
> end_time  |DATETIME    |      |2014-10-31 15:00:00
> user_name |VARCHAR(32) |      |admin
> 
> *hostcomponentstate* table
> Add column upgrade_state VARCHAR(32) ("NONE" is the default, "UPGRADING", "UPGRADE_FAILED")
> 
> *hostversion* table
> Column   |Type        |Keys         |Example
> ---------|------------|-------------|----------------------------------
> id       |BIGINT      |PK           |1
> host_name|VARCHAR(255)|FK hosts.name|c6401.ambari.apache.org
> stack    |VARCHAR(255)|             |HDP-2.2
> version  |VARCHAR(255)|             |2.2.0.1-885
> state    |VARCHAR(32) |             |INSTALLED, CURRENT, NOT_INSTALLED
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterEntity.java b030ea1 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterVersionEntity.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentStateEntity.java 7dce204 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostEntity.java a71fddb 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostVersionEntity.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/ClusterVersionState.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/HostVersionState.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentHost.java 3718556 
>   ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java bc97936 
>   ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog200.java 14c385d 
>   ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql 9054b3f 
>   ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql abe8b39 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 0bea067 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql ebc8f5c 
>   ambari-server/src/main/resources/META-INF/persistence.xml 2d8fedb 
>   ambari-server/src/test/python/TestAmbariServer.py c3651eb 
> 
> Diff: https://reviews.apache.org/r/27607/diff/
> 
> 
> Testing
> -------
> 
> Ran unit tests
> 
> ambari-server unit tests
> ----------------------------------------------------------------------
> Total run:684
> Total errors:0
> Total failures:0
> OK
> 
> 
> Thanks,
> 
> Alejandro Fernandez
> 
>


Re: Review Request 27607: Rolling Upgrade Bootstrap - Create new tables and populate during the installation of a new cluster

Posted by Alejandro Fernandez <af...@hortonworks.com>.

> On Nov. 7, 2014, 12:07 a.m., Jonathan Hurley wrote:
> > Any chance you feel like changing all of the SQL files to be readable for all of the other tables? :)

I'll do this in my next patch :-)


- Alejandro


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/27607/#review60277
-----------------------------------------------------------


On Nov. 6, 2014, 10:03 p.m., Alejandro Fernandez wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/27607/
> -----------------------------------------------------------
> 
> (Updated Nov. 6, 2014, 10:03 p.m.)
> 
> 
> Review request for Ambari, Dmitro Lisnichenko, Jonathan Hurley, Nate Cole, Sid Wagle, and Yurii Shylov.
> 
> 
> Bugs: AMBARI-8148
>     https://issues.apache.org/jira/browse/AMBARI-8148
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> 1. Create new tables and populate during the installation of a new cluster.
> 
> *cluster_version* table
> Column    | Type       | Keys | Example
> ----------|------------|------|---------------------------------------------
> id        |BIGINT      |PK    |1
> cluster_id|BIGINT      |FK    |2
> stack     |VARCHAR(255)|      |HDP-2.2 
> version   |VARCHAR(255)|      |HDP-2-2.0.1-885 
> state     |VARCHAR(32) |      |INSTALLED, CURRENT, UPGRADING, UPGRADE_FAILED 
> start_time|DATETIME    |      |2014-10-31 14:00:00
> end_time  |DATETIME    |      |2014-10-31 15:00:00
> user_name |VARCHAR(32) |      |admin
> 
> *hostcomponentstate* table
> Add column upgrade_state VARCHAR(32) ("NONE" is the default, "UPGRADING", "UPGRADE_FAILED")
> 
> *host_version* table
> Column   |Type        |Keys         |Example
> ---------|------------|-------------|----------------------------------
> id       |BIGINT      |PK           |1
> host_name|VARCHAR(255)|FK hosts.name|c6401.ambari.apache.org
> stack    |VARCHAR(255)|             |HDP-2.2
> version  |VARCHAR(255)|             |2.2.0.1-885
> state    |VARCHAR(32) |             |INSTALLED, CURRENT, NOT_INSTALLED
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterEntity.java b030ea1 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterVersionEntity.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentStateEntity.java 7dce204 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostEntity.java a71fddb 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostVersionEntity.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/ClusterVersionState.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/HostVersionState.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentHost.java 3718556 
>   ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java bc97936 
>   ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog200.java 14c385d 
>   ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql 9054b3f 
>   ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql abe8b39 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 0bea067 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql ebc8f5c 
>   ambari-server/src/main/resources/META-INF/persistence.xml 2d8fedb 
>   ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog200Test.java 16b4d44 
>   ambari-server/src/test/python/TestAmbariServer.py c3651eb 
> 
> Diff: https://reviews.apache.org/r/27607/diff/
> 
> 
> Testing
> -------
> 
> Ran unit tests
> 
> ambari-server unit tests
> ----------------------------------------------------------------------
> Total run:684
> Total errors:0
> Total failures:0
> OK
> 
> 
> Thanks,
> 
> Alejandro Fernandez
> 
>


Re: Review Request 27607: Rolling Upgrade Bootstrap - Create new tables and populate during the installation of a new cluster

Posted by Jonathan Hurley <jh...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/27607/#review60277
-----------------------------------------------------------

Ship it!


Any chance you feel like changing all of the SQL files to be readable for all of the other tables? :)


ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterEntity.java
<https://reviews.apache.org/r/27607/#comment101644>

    Formatting is off here.


- Jonathan Hurley


On Nov. 6, 2014, 5:03 p.m., Alejandro Fernandez wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/27607/
> -----------------------------------------------------------
> 
> (Updated Nov. 6, 2014, 5:03 p.m.)
> 
> 
> Review request for Ambari, Dmitro Lisnichenko, Jonathan Hurley, Nate Cole, Sid Wagle, and Yurii Shylov.
> 
> 
> Bugs: AMBARI-8148
>     https://issues.apache.org/jira/browse/AMBARI-8148
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> 1. Create new tables and populate during the installation of a new cluster.
> 
> *cluster_version* table
> Column    | Type       | Keys | Example
> ----------|------------|------|---------------------------------------------
> id        |BIGINT      |PK    |1
> cluster_id|BIGINT      |FK    |2
> stack     |VARCHAR(255)|      |HDP-2.2 
> version   |VARCHAR(255)|      |HDP-2-2.0.1-885 
> state     |VARCHAR(32) |      |INSTALLED, CURRENT, UPGRADING, UPGRADE_FAILED 
> start_time|DATETIME    |      |2014-10-31 14:00:00
> end_time  |DATETIME    |      |2014-10-31 15:00:00
> user_name |VARCHAR(32) |      |admin
> 
> *hostcomponentstate* table
> Add column upgrade_state VARCHAR(32) ("NONE" is the default, "UPGRADING", "UPGRADE_FAILED")
> 
> *host_version* table
> Column   |Type        |Keys         |Example
> ---------|------------|-------------|----------------------------------
> id       |BIGINT      |PK           |1
> host_name|VARCHAR(255)|FK hosts.name|c6401.ambari.apache.org
> stack    |VARCHAR(255)|             |HDP-2.2
> version  |VARCHAR(255)|             |2.2.0.1-885
> state    |VARCHAR(32) |             |INSTALLED, CURRENT, NOT_INSTALLED
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterEntity.java b030ea1 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterVersionEntity.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentStateEntity.java 7dce204 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostEntity.java a71fddb 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostVersionEntity.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/ClusterVersionState.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/HostVersionState.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentHost.java 3718556 
>   ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java bc97936 
>   ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog200.java 14c385d 
>   ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql 9054b3f 
>   ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql abe8b39 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 0bea067 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql ebc8f5c 
>   ambari-server/src/main/resources/META-INF/persistence.xml 2d8fedb 
>   ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog200Test.java 16b4d44 
>   ambari-server/src/test/python/TestAmbariServer.py c3651eb 
> 
> Diff: https://reviews.apache.org/r/27607/diff/
> 
> 
> Testing
> -------
> 
> Ran unit tests
> 
> ambari-server unit tests
> ----------------------------------------------------------------------
> Total run:684
> Total errors:0
> Total failures:0
> OK
> 
> 
> Thanks,
> 
> Alejandro Fernandez
> 
>


Re: Review Request 27607: Rolling Upgrade Bootstrap - Create new tables and populate during the installation of a new cluster

Posted by Nate Cole <nc...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/27607/#review60262
-----------------------------------------------------------

Ship it!


Ship It!

- Nate Cole


On Nov. 6, 2014, 5:03 p.m., Alejandro Fernandez wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/27607/
> -----------------------------------------------------------
> 
> (Updated Nov. 6, 2014, 5:03 p.m.)
> 
> 
> Review request for Ambari, Dmitro Lisnichenko, Jonathan Hurley, Nate Cole, Sid Wagle, and Yurii Shylov.
> 
> 
> Bugs: AMBARI-8148
>     https://issues.apache.org/jira/browse/AMBARI-8148
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> 1. Create new tables and populate during the installation of a new cluster.
> 
> *cluster_version* table
> Column    | Type       | Keys | Example
> ----------|------------|------|---------------------------------------------
> id        |BIGINT      |PK    |1
> cluster_id|BIGINT      |FK    |2
> stack     |VARCHAR(255)|      |HDP-2.2 
> version   |VARCHAR(255)|      |HDP-2-2.0.1-885 
> state     |VARCHAR(32) |      |INSTALLED, CURRENT, UPGRADING, UPGRADE_FAILED 
> start_time|DATETIME    |      |2014-10-31 14:00:00
> end_time  |DATETIME    |      |2014-10-31 15:00:00
> user_name |VARCHAR(32) |      |admin
> 
> *hostcomponentstate* table
> Add column upgrade_state VARCHAR(32) ("NONE" is the default, "UPGRADING", "UPGRADE_FAILED")
> 
> *host_version* table
> Column   |Type        |Keys         |Example
> ---------|------------|-------------|----------------------------------
> id       |BIGINT      |PK           |1
> host_name|VARCHAR(255)|FK hosts.name|c6401.ambari.apache.org
> stack    |VARCHAR(255)|             |HDP-2.2
> version  |VARCHAR(255)|             |2.2.0.1-885
> state    |VARCHAR(32) |             |INSTALLED, CURRENT, NOT_INSTALLED
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterEntity.java b030ea1 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterVersionEntity.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentStateEntity.java 7dce204 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostEntity.java a71fddb 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostVersionEntity.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/ClusterVersionState.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/HostVersionState.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentHost.java 3718556 
>   ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java bc97936 
>   ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog200.java 14c385d 
>   ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql 9054b3f 
>   ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql abe8b39 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 0bea067 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql ebc8f5c 
>   ambari-server/src/main/resources/META-INF/persistence.xml 2d8fedb 
>   ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog200Test.java 16b4d44 
>   ambari-server/src/test/python/TestAmbariServer.py c3651eb 
> 
> Diff: https://reviews.apache.org/r/27607/diff/
> 
> 
> Testing
> -------
> 
> Ran unit tests
> 
> ambari-server unit tests
> ----------------------------------------------------------------------
> Total run:684
> Total errors:0
> Total failures:0
> OK
> 
> 
> Thanks,
> 
> Alejandro Fernandez
> 
>


Re: Review Request 27607: Rolling Upgrade Bootstrap - Create new tables and populate during the installation of a new cluster

Posted by Alejandro Fernandez <af...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/27607/
-----------------------------------------------------------

(Updated Nov. 6, 2014, 10:03 p.m.)


Review request for Ambari, Dmitro Lisnichenko, Jonathan Hurley, Nate Cole, Sid Wagle, and Yurii Shylov.


Bugs: AMBARI-8148
    https://issues.apache.org/jira/browse/AMBARI-8148


Repository: ambari


Description (updated)
-------

1. Create new tables and populate during the installation of a new cluster.

*cluster_version* table
Column    | Type       | Keys | Example
----------|------------|------|---------------------------------------------
id        |BIGINT      |PK    |1
cluster_id|BIGINT      |FK    |2
stack     |VARCHAR(255)|      |HDP-2.2 
version   |VARCHAR(255)|      |HDP-2-2.0.1-885 
state     |VARCHAR(32) |      |INSTALLED, CURRENT, UPGRADING, UPGRADE_FAILED 
start_time|DATETIME    |      |2014-10-31 14:00:00
end_time  |DATETIME    |      |2014-10-31 15:00:00
user_name |VARCHAR(32) |      |admin

*hostcomponentstate* table
Add column upgrade_state VARCHAR(32) ("NONE" is the default, "UPGRADING", "UPGRADE_FAILED")

*host_version* table
Column   |Type        |Keys         |Example
---------|------------|-------------|----------------------------------
id       |BIGINT      |PK           |1
host_name|VARCHAR(255)|FK hosts.name|c6401.ambari.apache.org
stack    |VARCHAR(255)|             |HDP-2.2
version  |VARCHAR(255)|             |2.2.0.1-885
state    |VARCHAR(32) |             |INSTALLED, CURRENT, NOT_INSTALLED


Diffs
-----

  ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterEntity.java b030ea1 
  ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterVersionEntity.java PRE-CREATION 
  ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentStateEntity.java 7dce204 
  ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostEntity.java a71fddb 
  ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostVersionEntity.java PRE-CREATION 
  ambari-server/src/main/java/org/apache/ambari/server/state/ClusterVersionState.java PRE-CREATION 
  ambari-server/src/main/java/org/apache/ambari/server/state/HostVersionState.java PRE-CREATION 
  ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentHost.java 3718556 
  ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java bc97936 
  ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog200.java 14c385d 
  ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql 9054b3f 
  ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql abe8b39 
  ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 0bea067 
  ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql ebc8f5c 
  ambari-server/src/main/resources/META-INF/persistence.xml 2d8fedb 
  ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog200Test.java 16b4d44 
  ambari-server/src/test/python/TestAmbariServer.py c3651eb 

Diff: https://reviews.apache.org/r/27607/diff/


Testing
-------

Ran unit tests

ambari-server unit tests
----------------------------------------------------------------------
Total run:684
Total errors:0
Total failures:0
OK


Thanks,

Alejandro Fernandez


Re: Review Request 27607: Rolling Upgrade Bootstrap - Create new tables and populate during the installation of a new cluster

Posted by Alejandro Fernandez <af...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/27607/
-----------------------------------------------------------

(Updated Nov. 6, 2014, 9:41 p.m.)


Review request for Ambari, Dmitro Lisnichenko, Jonathan Hurley, Nate Cole, Sid Wagle, and Yurii Shylov.


Changes
-------

Finalized all changes.


Bugs: AMBARI-8148
    https://issues.apache.org/jira/browse/AMBARI-8148


Repository: ambari


Description
-------

1. Create new tables and populate during the installation of a new cluster.

*clusterversion* table
Column    | Type       | Keys | Example
----------|------------|------|---------------------------------------------
id        |BIGINT      |PK    |1
cluster_id|BIGINT      |FK    |2
stack     |VARCHAR(255)|      |HDP-2.2 
version   |VARCHAR(255)|      |HDP-2-2.0.1-885 
state     |VARCHAR(32) |      |INSTALLED, CURRENT, UPGRADING, UPGRADE_FAILED 
start_time|DATETIME    |      |2014-10-31 14:00:00
end_time  |DATETIME    |      |2014-10-31 15:00:00
user_name |VARCHAR(32) |      |admin

*hostcomponentstate* table
Add column upgrade_state VARCHAR(32) ("NONE" is the default, "UPGRADING", "UPGRADE_FAILED")

*hostversion* table
Column   |Type        |Keys         |Example
---------|------------|-------------|----------------------------------
id       |BIGINT      |PK           |1
host_name|VARCHAR(255)|FK hosts.name|c6401.ambari.apache.org
stack    |VARCHAR(255)|             |HDP-2.2
version  |VARCHAR(255)|             |2.2.0.1-885
state    |VARCHAR(32) |             |INSTALLED, CURRENT, NOT_INSTALLED


Diffs (updated)
-----

  ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterEntity.java b030ea1 
  ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterVersionEntity.java PRE-CREATION 
  ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentStateEntity.java 7dce204 
  ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostEntity.java a71fddb 
  ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostVersionEntity.java PRE-CREATION 
  ambari-server/src/main/java/org/apache/ambari/server/state/ClusterVersionState.java PRE-CREATION 
  ambari-server/src/main/java/org/apache/ambari/server/state/HostVersionState.java PRE-CREATION 
  ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentHost.java 3718556 
  ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java bc97936 
  ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog200.java 14c385d 
  ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql 9054b3f 
  ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql abe8b39 
  ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 0bea067 
  ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql ebc8f5c 
  ambari-server/src/main/resources/META-INF/persistence.xml 2d8fedb 
  ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog200Test.java 16b4d44 
  ambari-server/src/test/python/TestAmbariServer.py c3651eb 

Diff: https://reviews.apache.org/r/27607/diff/


Testing
-------

Ran unit tests

ambari-server unit tests
----------------------------------------------------------------------
Total run:684
Total errors:0
Total failures:0
OK


Thanks,

Alejandro Fernandez


Re: Review Request 27607: Rolling Upgrade Bootstrap - Create new tables and populate during the installation of a new cluster

Posted by Alejandro Fernandez <af...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/27607/
-----------------------------------------------------------

(Updated Nov. 5, 2014, 10:02 p.m.)


Review request for Ambari, Dmitro Lisnichenko, Jonathan Hurley, Nate Cole, Sid Wagle, and Yurii Shylov.


Bugs: AMBARI-8148
    https://issues.apache.org/jira/browse/AMBARI-8148


Repository: ambari


Description
-------

1. Create new tables and populate during the installation of a new cluster.

*clusterversion* table
Column    | Type       | Keys | Example
----------|------------|------|---------------------------------------------
id        |BIGINT      |PK    |1
cluster_id|BIGINT      |FK    |2
stack     |VARCHAR(255)|      |HDP-2.2 
version   |VARCHAR(255)|      |HDP-2-2.0.1-885 
state     |VARCHAR(32) |      |INSTALLED, CURRENT, UPGRADING, UPGRADE_FAILED 
start_time|DATETIME    |      |2014-10-31 14:00:00
end_time  |DATETIME    |      |2014-10-31 15:00:00
user_name |VARCHAR(32) |      |admin

*hostcomponentstate* table
Add column upgrade_state VARCHAR(32) ("NONE" is the default, "UPGRADING", "UPGRADE_FAILED")

*hostversion* table
Column   |Type        |Keys         |Example
---------|------------|-------------|----------------------------------
id       |BIGINT      |PK           |1
host_name|VARCHAR(255)|FK hosts.name|c6401.ambari.apache.org
stack    |VARCHAR(255)|             |HDP-2.2
version  |VARCHAR(255)|             |2.2.0.1-885
state    |VARCHAR(32) |             |INSTALLED, CURRENT, NOT_INSTALLED


Diffs (updated)
-----

  ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterEntity.java b030ea1 
  ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterVersionEntity.java PRE-CREATION 
  ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentStateEntity.java 7dce204 
  ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostEntity.java a71fddb 
  ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostVersionEntity.java PRE-CREATION 
  ambari-server/src/main/java/org/apache/ambari/server/state/ClusterVersionState.java PRE-CREATION 
  ambari-server/src/main/java/org/apache/ambari/server/state/HostVersionState.java PRE-CREATION 
  ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentHost.java 3718556 
  ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java bc97936 
  ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog200.java 14c385d 
  ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql 9054b3f 
  ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql abe8b39 
  ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 0bea067 
  ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql ebc8f5c 
  ambari-server/src/main/resources/META-INF/persistence.xml 2d8fedb 
  ambari-server/src/test/python/TestAmbariServer.py c3651eb 

Diff: https://reviews.apache.org/r/27607/diff/


Testing
-------

Ran unit tests

ambari-server unit tests
----------------------------------------------------------------------
Total run:684
Total errors:0
Total failures:0
OK


Thanks,

Alejandro Fernandez


Re: Review Request 27607: Rolling Upgrade Bootstrap - Create new tables and populate during the installation of a new cluster

Posted by Alejandro Fernandez <af...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/27607/
-----------------------------------------------------------

(Updated Nov. 5, 2014, 9:58 p.m.)


Review request for Ambari, Dmitro Lisnichenko, Jonathan Hurley, Nate Cole, Sid Wagle, and Yurii Shylov.


Changes
-------

Fixed all issues.


Bugs: AMBARI-8148
    https://issues.apache.org/jira/browse/AMBARI-8148


Repository: ambari


Description
-------

1. Create new tables and populate during the installation of a new cluster.

*clusterversion* table
Column    | Type       | Keys | Example
----------|------------|------|---------------------------------------------
id        |BIGINT      |PK    |1
cluster_id|BIGINT      |FK    |2
stack     |VARCHAR(255)|      |HDP-2.2 
version   |VARCHAR(255)|      |HDP-2-2.0.1-885 
state     |VARCHAR(32) |      |INSTALLED, CURRENT, UPGRADING, UPGRADE_FAILED 
start_time|DATETIME    |      |2014-10-31 14:00:00
end_time  |DATETIME    |      |2014-10-31 15:00:00
user_name |VARCHAR(32) |      |admin

*hostcomponentstate* table
Add column upgrade_state VARCHAR(32) ("NONE" is the default, "UPGRADING", "UPGRADE_FAILED")

*hostversion* table
Column   |Type        |Keys         |Example
---------|------------|-------------|----------------------------------
id       |BIGINT      |PK           |1
host_name|VARCHAR(255)|FK hosts.name|c6401.ambari.apache.org
stack    |VARCHAR(255)|             |HDP-2.2
version  |VARCHAR(255)|             |2.2.0.1-885
state    |VARCHAR(32) |             |INSTALLED, CURRENT, NOT_INSTALLED


Diffs (updated)
-----

  ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterEntity.java b030ea1 
  ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterVersionEntity.java PRE-CREATION 
  ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentStateEntity.java 7dce204 
  ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostEntity.java a71fddb 
  ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostVersionEntity.java PRE-CREATION 
  ambari-server/src/main/java/org/apache/ambari/server/state/ClusterVersionState.java PRE-CREATION 
  ambari-server/src/main/java/org/apache/ambari/server/state/HostVersionState.java PRE-CREATION 
  ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentHost.java 3718556 
  ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java bc97936 
  ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog200.java 14c385d 
  ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql 9054b3f 
  ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql abe8b39 
  ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 0bea067 
  ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql ebc8f5c 
  ambari-server/src/main/resources/META-INF/persistence.xml 2d8fedb 
  ambari-server/src/test/python/TestAmbariServer.py c3651eb 

Diff: https://reviews.apache.org/r/27607/diff/


Testing
-------

Ran unit tests

ambari-server unit tests
----------------------------------------------------------------------
Total run:684
Total errors:0
Total failures:0
OK


Thanks,

Alejandro Fernandez


Re: Review Request 27607: Rolling Upgrade Bootstrap - Create new tables and populate during the installation of a new cluster

Posted by Nate Cole <nc...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/27607/#review59959
-----------------------------------------------------------



ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterVersionEntity.java
<https://reviews.apache.org/r/27607/#comment101268>

    This can be an import.



ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterVersionEntity.java
<https://reviews.apache.org/r/27607/#comment101269>

    Should not be updatable



ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterVersionEntity.java
<https://reviews.apache.org/r/27607/#comment101271>

    Use longs for timestamps instead of Date



ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql
<https://reviews.apache.org/r/27607/#comment101266>

    We don't use actual timestamp fields, just longs



ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql
<https://reviews.apache.org/r/27607/#comment101267>

    No timestamp fields


- Nate Cole


On Nov. 4, 2014, 11:30 p.m., Alejandro Fernandez wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/27607/
> -----------------------------------------------------------
> 
> (Updated Nov. 4, 2014, 11:30 p.m.)
> 
> 
> Review request for Ambari, Dmitro Lisnichenko, Jonathan Hurley, Nate Cole, Sid Wagle, and Yurii Shylov.
> 
> 
> Bugs: AMBARI-8148
>     https://issues.apache.org/jira/browse/AMBARI-8148
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> 1. Create new tables and populate during the installation of a new cluster.
> 
> *clusterversion* table
> Column    | Type       | Keys | Example
> ----------|------------|------|---------------------------------------------
> id        |BIGINT      |PK    |1
> cluster_id|BIGINT      |FK    |2
> stack     |VARCHAR(255)|      |HDP-2.2 
> version   |VARCHAR(255)|      |HDP-2-2.0.1-885 
> state     |VARCHAR(32) |      |INSTALLED, CURRENT, UPGRADING, UPGRADE_FAILED 
> start_time|DATETIME    |      |2014-10-31 14:00:00
> end_time  |DATETIME    |      |2014-10-31 15:00:00
> user_name |VARCHAR(32) |      |admin
> 
> *hostcomponentstate* table
> Add column upgrade_state VARCHAR(32) ("NONE" is the default, "UPGRADING", "UPGRADE_FAILED")
> 
> *hostversion* table
> Column   |Type        |Keys         |Example
> ---------|------------|-------------|----------------------------------
> id       |BIGINT      |PK           |1
> host_name|VARCHAR(255)|FK hosts.name|c6401.ambari.apache.org
> stack    |VARCHAR(255)|             |HDP-2.2
> version  |VARCHAR(255)|             |2.2.0.1-885
> state    |VARCHAR(32) |             |INSTALLED, CURRENT, NOT_INSTALLED
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterEntity.java b030ea1 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterVersionEntity.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentStateEntity.java 7dce204 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostEntity.java a71fddb 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostVersionEntity.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/ClusterVersionState.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/HostComponentUpgradeState.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/HostVersionState.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentHost.java 3718556 
>   ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java bc97936 
>   ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog200.java 14c385d 
>   ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql 9054b3f 
>   ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql abe8b39 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 0bea067 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql ebc8f5c 
>   ambari-server/src/main/resources/META-INF/persistence.xml 2d8fedb 
>   ambari-server/src/test/python/TestAmbariServer.py c3651eb 
> 
> Diff: https://reviews.apache.org/r/27607/diff/
> 
> 
> Testing
> -------
> 
> Ran unit tests
> 
> ambari-server unit tests
> ----------------------------------------------------------------------
> Total run:684
> Total errors:0
> Total failures:0
> OK
> 
> 
> Thanks,
> 
> Alejandro Fernandez
> 
>


Re: Review Request 27607: Rolling Upgrade Bootstrap - Create new tables and populate during the installation of a new cluster

Posted by Alejandro Fernandez <af...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/27607/#review59994
-----------------------------------------------------------



ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterVersionEntity.java
<https://reviews.apache.org/r/27607/#comment101316>

    Totally right, will fix this in the next patch.



ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterVersionEntity.java
<https://reviews.apache.org/r/27607/#comment101317>

    Ok, I'll remove it.



ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterVersionEntity.java
<https://reviews.apache.org/r/27607/#comment101318>

    Will do, thanks.



ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostVersionEntity.java
<https://reviews.apache.org/r/27607/#comment101319>

    I'll remove that annotation in the next patch.



ambari-server/src/main/java/org/apache/ambari/server/state/ClusterVersionState.java
<https://reviews.apache.org/r/27607/#comment101320>

    Thanks for the tip; I'll improve this java doc and move it to the top.



ambari-server/src/main/java/org/apache/ambari/server/state/HostComponentUpgradeState.java
<https://reviews.apache.org/r/27607/#comment101321>

    Will do.



ambari-server/src/main/java/org/apache/ambari/server/state/HostVersionState.java
<https://reviews.apache.org/r/27607/#comment101322>

    I'll move this to the top with the rest of the java doc and add <pre> tags.



ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentHost.java
<https://reviews.apache.org/r/27607/#comment101325>

    Will do.



ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog200.java
<https://reviews.apache.org/r/27607/#comment101326>

    Will do, I'll add a method just for Rolling Upgrades.



ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql
<https://reviews.apache.org/r/27607/#comment101329>

    I'm following the existing convention, but I can certainly change the new tables to use "_" and break up the CREATE TABLE statement into multiple lines.



ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql
<https://reviews.apache.org/r/27607/#comment101330>

    Thanks, I'll change it to 0.



ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql
<https://reviews.apache.org/r/27607/#comment101331>

    Will change it to long.


- Alejandro Fernandez


On Nov. 5, 2014, 4:30 a.m., Alejandro Fernandez wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/27607/
> -----------------------------------------------------------
> 
> (Updated Nov. 5, 2014, 4:30 a.m.)
> 
> 
> Review request for Ambari, Dmitro Lisnichenko, Jonathan Hurley, Nate Cole, Sid Wagle, and Yurii Shylov.
> 
> 
> Bugs: AMBARI-8148
>     https://issues.apache.org/jira/browse/AMBARI-8148
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> 1. Create new tables and populate during the installation of a new cluster.
> 
> *clusterversion* table
> Column    | Type       | Keys | Example
> ----------|------------|------|---------------------------------------------
> id        |BIGINT      |PK    |1
> cluster_id|BIGINT      |FK    |2
> stack     |VARCHAR(255)|      |HDP-2.2 
> version   |VARCHAR(255)|      |HDP-2-2.0.1-885 
> state     |VARCHAR(32) |      |INSTALLED, CURRENT, UPGRADING, UPGRADE_FAILED 
> start_time|DATETIME    |      |2014-10-31 14:00:00
> end_time  |DATETIME    |      |2014-10-31 15:00:00
> user_name |VARCHAR(32) |      |admin
> 
> *hostcomponentstate* table
> Add column upgrade_state VARCHAR(32) ("NONE" is the default, "UPGRADING", "UPGRADE_FAILED")
> 
> *hostversion* table
> Column   |Type        |Keys         |Example
> ---------|------------|-------------|----------------------------------
> id       |BIGINT      |PK           |1
> host_name|VARCHAR(255)|FK hosts.name|c6401.ambari.apache.org
> stack    |VARCHAR(255)|             |HDP-2.2
> version  |VARCHAR(255)|             |2.2.0.1-885
> state    |VARCHAR(32) |             |INSTALLED, CURRENT, NOT_INSTALLED
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterEntity.java b030ea1 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterVersionEntity.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentStateEntity.java 7dce204 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostEntity.java a71fddb 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostVersionEntity.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/ClusterVersionState.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/HostComponentUpgradeState.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/HostVersionState.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentHost.java 3718556 
>   ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java bc97936 
>   ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog200.java 14c385d 
>   ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql 9054b3f 
>   ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql abe8b39 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 0bea067 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql ebc8f5c 
>   ambari-server/src/main/resources/META-INF/persistence.xml 2d8fedb 
>   ambari-server/src/test/python/TestAmbariServer.py c3651eb 
> 
> Diff: https://reviews.apache.org/r/27607/diff/
> 
> 
> Testing
> -------
> 
> Ran unit tests
> 
> ambari-server unit tests
> ----------------------------------------------------------------------
> Total run:684
> Total errors:0
> Total failures:0
> OK
> 
> 
> Thanks,
> 
> Alejandro Fernandez
> 
>


Re: Review Request 27607: Rolling Upgrade Bootstrap - Create new tables and populate during the installation of a new cluster

Posted by Jonathan Hurley <jh...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/27607/#review59958
-----------------------------------------------------------



ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterVersionEntity.java
<https://reviews.apache.org/r/27607/#comment101265>

    I don't think that ID columns should be updatable.



ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterVersionEntity.java
<https://reviews.apache.org/r/27607/#comment101272>

    I don't think it's necessary to put a length constraint on ID fields, but if you did want to (for databases like Oracle) then 19 is what is used.



ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostVersionEntity.java
<https://reviews.apache.org/r/27607/#comment101273>

    Updateable ID?



ambari-server/src/main/java/org/apache/ambari/server/state/ClusterVersionState.java
<https://reviews.apache.org/r/27607/#comment101274>

    For formatted documentation, if you use <pre> tags along with <br/> or <p/> (or any other HTML) it will retain formatting correctly when viewing in javadoc viewers.



ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog200.java
<https://reviews.apache.org/r/27607/#comment101275>

    When adding a ton of new tables, maybe we should put them into a single method to keep executeDDLUpdates readable.



ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql
<https://reviews.apache.org/r/27607/#comment101264>

    I think that we should stop in-lining table definitions; they are very hard to read. Also, the table names should be separated by _ for improved readability, such as cluster_version



ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql
<https://reviews.apache.org/r/27607/#comment101270>

    When starting the sequence at 1, the initial value for cluster_version and host_version will be 2. I always disliked that.


- Jonathan Hurley


On Nov. 4, 2014, 11:30 p.m., Alejandro Fernandez wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/27607/
> -----------------------------------------------------------
> 
> (Updated Nov. 4, 2014, 11:30 p.m.)
> 
> 
> Review request for Ambari, Dmitro Lisnichenko, Jonathan Hurley, Nate Cole, Sid Wagle, and Yurii Shylov.
> 
> 
> Bugs: AMBARI-8148
>     https://issues.apache.org/jira/browse/AMBARI-8148
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> 1. Create new tables and populate during the installation of a new cluster.
> 
> *clusterversion* table
> Column    | Type       | Keys | Example
> ----------|------------|------|---------------------------------------------
> id        |BIGINT      |PK    |1
> cluster_id|BIGINT      |FK    |2
> stack     |VARCHAR(255)|      |HDP-2.2 
> version   |VARCHAR(255)|      |HDP-2-2.0.1-885 
> state     |VARCHAR(32) |      |INSTALLED, CURRENT, UPGRADING, UPGRADE_FAILED 
> start_time|DATETIME    |      |2014-10-31 14:00:00
> end_time  |DATETIME    |      |2014-10-31 15:00:00
> user_name |VARCHAR(32) |      |admin
> 
> *hostcomponentstate* table
> Add column upgrade_state VARCHAR(32) ("NONE" is the default, "UPGRADING", "UPGRADE_FAILED")
> 
> *hostversion* table
> Column   |Type        |Keys         |Example
> ---------|------------|-------------|----------------------------------
> id       |BIGINT      |PK           |1
> host_name|VARCHAR(255)|FK hosts.name|c6401.ambari.apache.org
> stack    |VARCHAR(255)|             |HDP-2.2
> version  |VARCHAR(255)|             |2.2.0.1-885
> state    |VARCHAR(32) |             |INSTALLED, CURRENT, NOT_INSTALLED
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterEntity.java b030ea1 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterVersionEntity.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentStateEntity.java 7dce204 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostEntity.java a71fddb 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostVersionEntity.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/ClusterVersionState.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/HostComponentUpgradeState.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/HostVersionState.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentHost.java 3718556 
>   ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java bc97936 
>   ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog200.java 14c385d 
>   ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql 9054b3f 
>   ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql abe8b39 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 0bea067 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql ebc8f5c 
>   ambari-server/src/main/resources/META-INF/persistence.xml 2d8fedb 
>   ambari-server/src/test/python/TestAmbariServer.py c3651eb 
> 
> Diff: https://reviews.apache.org/r/27607/diff/
> 
> 
> Testing
> -------
> 
> Ran unit tests
> 
> ambari-server unit tests
> ----------------------------------------------------------------------
> Total run:684
> Total errors:0
> Total failures:0
> OK
> 
> 
> Thanks,
> 
> Alejandro Fernandez
> 
>