ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Hurley <jhur...@hortonworks.com>
Subject Re: Review Request 43727: Patch Upgrade UpgradeCatalog Changes
Date Fri, 19 Feb 2016 16:09:51 GMT


> On Feb. 19, 2016, 9 a.m., Nate Cole wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java, lines
1035-1037
> > <https://reviews.apache.org/r/43727/diff/3/?file=1255012#file1255012line1035>
> >
> >     Probably just my non-knowledge of oracle (and I know you didn't even touch this
part) but does that table store constraints in upper even though our dumb script's constraint
names are mixed?  I guess it must be working or someone would have complained.

Yes, all data in `all_constraints` is upper case. I could make this "safer" I guess by doing:
`SELECT constraint_name FROM all_constraints WHERE UPPER(table_name) = UPPER('%s') AND constraint_type
= 'P'`


- Jonathan


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


On Feb. 19, 2016, 8:18 a.m., Jonathan Hurley wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43727/
> -----------------------------------------------------------
> 
> (Updated Feb. 19, 2016, 8:18 a.m.)
> 
> 
> Review request for Ambari, Dmitro Lisnichenko and Nate Cole.
> 
> 
> Bugs: AMBARI-15094
>     https://issues.apache.org/jira/browse/AMBARI-15094
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> This JIRA will be used to keep track of the changes required for the UpgradeCatalog that
will be used for PU.
> 
> +Changed tables+
> {{repo_version}}
> * Add {{type}} column, default 'STANDARD'
> * Add {{version_url}} varchar(1024)
> * Add {{version_xml}} mediumtext/text
> * Add {{version_xsd}} varchar(512)
> * Add {{parent_id}} bigint, nullable
> 
> {{servicecomponentdesiredstate}}
> * Add PK {{id}} column
> * Remove existing PK, create {{UNIQUE}} constraint out of same columns
> * Create {{INDEX}} on old PK columns
> 
> {{hostcomponentdesiredstate}}
> * Reorder {{hstcmpnntdesiredstatecmpnntnme}} {{FOREIGN KEY}}
> ** {{(component_name, service_name, cluster_id)}}
> 
> {{hostcomponentstate}}
> * Reorder {{hstcomponentstatecomponentname}} {{FOREIGN KEY}}
> ** {{(component_name, service_name, cluster_id)}}
> 
> {{servicecomponent_history}}
> * Creation of new table
> * Addition of new sequence to track PK ID
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java 49f108b 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java abd05bc

>   ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java
d97962f 
>   ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql 8c626f5 
> 
> Diff: https://reviews.apache.org/r/43727/diff/
> 
> 
> Testing
> -------
> 
> Upgraded a trunk database to a branch-dev-patch-upgrade database on MySQL and Postgres.
> 
> Tests run: 3845, Failures: 0, Errors: 0, Skipped: 34
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 29:59 min
> [INFO] Finished at: 2016-02-18T21:18:13-05:00
> [INFO] Final Memory: 52M/878M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Jonathan Hurley
> 
>


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