ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sumit Mohanty" <smoha...@hortonworks.com>
Subject Re: Review Request 42159: Remove provision_action column from primary key definition for Blueprints hostgroup_component table
Date Mon, 11 Jan 2016 21:37:20 GMT

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

Ship it!


Ship It!

- Sumit Mohanty


On Jan. 11, 2016, 8:20 p.m., Robert Nettleton wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42159/
> -----------------------------------------------------------
> 
> (Updated Jan. 11, 2016, 8:20 p.m.)
> 
> 
> Review request for Ambari, Jonathan Hurley, Mahadev Konar, Sumit Mohanty, Sebastian Toader,
and Sid Wagle.
> 
> 
> Bugs: AMBARI-14615
>     https://issues.apache.org/jira/browse/AMBARI-14615
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> This patch addresses AMBARI-14615. 
> 
> A previous patch introduced a new DB column for Blueprints.  This column, due to some
errors in the JPA annotations chosen for the column, was accidentally included as part of
the entity's primary key.  Since this column is a null-able value, this can cause JPA exceptions
during Blueprint operations, particularly after a reboot of ambari-server.
> 
> This patch implements the following:
> 
> 1. Removes the "@Id" annotation from the provisionAction field in the HostGroupComponentEntity,
since this field is not intended to be part of the entity's primary key.
> 2. Removes the provisionAction field from the HostGroupComponentEntityPK class.  The
original intention was not to include this field in the PK, but this change originally appeared
necessary to get the ambari-server unit tests to pass.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostGroupComponentEntity.java
046bbd8 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostGroupComponentEntityPK.java
0e97346 
> 
> Diff: https://reviews.apache.org/r/42159/diff/
> 
> 
> Testing
> -------
> 
> 1. Tested against a 3-node HDFS HA Blueprint deployment, using the new "provision_action"
syntax, rebooted ambari-server, and verified that the "blueprints" REST resource is returned
properly during a GET request, without any JPA exceptions in the log. 
> 2. Tested a 3-node HDFS HA Blueprint deployment, using the normal syntax for Blueprints,
without the component-level install customization.  
> 3. Ran the ambari-server unit test suite with this change applied to trunk, which passed
completely.
> 
> 
> Thanks,
> 
> Robert Nettleton
> 
>


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