-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42159/
-----------------------------------------------------------
Review request for Ambari, Jonathan Hurley, Mahadev Konar, Sumit Mohanty, 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