ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sid Wagle" <swa...@hortonworks.com>
Subject Re: Review Request 22771: Change restart_required from BOOLEAN to SMALLINT
Date Thu, 19 Jun 2014 20:07:21 GMT

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

Ship it!


Ship It!

- Sid Wagle


On June 19, 2014, 3:47 a.m., Jonathan Hurley wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/22771/
> -----------------------------------------------------------
> 
> (Updated June 19, 2014, 3:47 a.m.)
> 
> 
> Review request for Ambari, Nate Cole and Sid Wagle.
> 
> 
> Bugs: AMBARI-6202
>     https://issues.apache.org/jira/browse/AMBARI-6202
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> We avoid the use of the "boolean" data type in our databases since many vendors do not
support it and sometimes the behavior can be unpredictable in JPA.
> We should aim to be consistent in our approach to databases, and that means that we should
continue to treat 0/1 fields like restart_required as a SMALLINT in Postgres, even though
newer version of that database do support BOOLEAN fields.
> 
> It's possible that a 1.6.0 upgrade might have already altered restart_required to a BOOLEAN,
thus we need to also check the column type first.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java 080753e 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java b39008e

>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentDesiredStateEntity.java
6fb5021 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java
7e3ac08 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/helpers/dbms/DbmsHelper.java
8b56fbe 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/helpers/dbms/DerbyHelper.java
00d4b86 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/helpers/dbms/GenericDbmsHelper.java
a5d76ed 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/helpers/dbms/MySqlHelper.java
efed292 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/helpers/dbms/OracleHelper.java
aebfb62 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/helpers/dbms/PostgresHelper.java
38e837e 
>   ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog160.java
c3f083a 
>   ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog161.java
a038194 
>   ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql de7c3a6 
>   ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql 870d066 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 0b8f686 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql 84215e3 
>   ambari-server/src/test/java/org/apache/ambari/server/orm/DBAccessorImplTest.java 6f0cd91

>   ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog160Test.java
f597986 
>   ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog161Test.java
284fd99 
> 
> Diff: https://reviews.apache.org/r/22771/diff/
> 
> 
> Testing
> -------
> 
> Verified the upgrade on a 1.4.4 to 1.6.1 schema upgrade where the 1.6.0 schema had both
a SMALLINT and a BOOLEAN for restart_required.
> 
> [INFO] Reactor Summary:
> [INFO]
> [INFO] Ambari Main ....................................... SUCCESS [2.192s]
> [INFO] Apache Ambari Project POM ......................... SUCCESS [0.229s]
> [INFO] Ambari Web ........................................ SUCCESS [9.672s]
> [INFO] Ambari Views ...................................... SUCCESS [1.251s]
> [INFO] Ambari Server ..................................... SUCCESS [13:07.837s]
> [INFO] Ambari Agent ...................................... SUCCESS [6.573s]
> [INFO] Ambari Client ..................................... SUCCESS [0.026s]
> [INFO] Ambari Python Client .............................. SUCCESS [0.270s]
> [INFO] Ambari Groovy Client .............................. SUCCESS [7.573s]
> [INFO] Ambari Shell ...................................... SUCCESS [11.939s]
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> 
> 
> Thanks,
> 
> Jonathan Hurley
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message