You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@oozie.apache.org by Han Xiao <yi...@huawei.com> on 2012/04/17 12:39:44 UTC

Review Request: OOZIE-814 Add support of configuring db's schema in JPAService for oozie

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

Review request for oozie.


Summary
-------

Oozie's JPA service doesn't support configure different schemas for oozie's db.
Our company wants to use one db for multi oozie clusters, and then we want each oozie cluster can use different schema of the db. Therefore JPAService in oozie should support to configure the schema of the db, not just the database.
The oozie.db.schema.name is use to configure oozie's db name, however, it is a little confusing for it is not used to configure the actually schema of db.


This addresses bug OOZIE-814.
    https://issues.apache.org/jira/browse/OOZIE-814


Diffs
-----

  http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/conf/oozie-site.xml 1327027 
  http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/service/JPAService.java 1327027 
  http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/resources/oozie-default.xml 1327027 

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


Testing
-------

* Deployed Oozie, added oozie.db.schema.name configs values, succeed to run the examples on Derby and Postgres databases.


Thanks,

Han


Re: Review Request: OOZIE-814 Add support of configuring db's schema in JPAService for oozie

Posted by Han Xiao <yi...@huawei.com>.

> On 2012-04-27 21:55:11, Alejandro Abdelnur wrote:
> > The OozieDBCLI tool may require some changes to ensure the DB is created/upgraded on the right schema.

Yes, i haven't noticed it before and the patch is updated now. To avoid hardcoding, i revised much of the OozieDBCLI using the jpa.


> On 2012-04-27 21:55:11, Alejandro Abdelnur wrote:
> > http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/service/JPAService.java, line 58
> > <https://reviews.apache.org/r/4755/diff/1/?file=102363#file102363line58>
> >
> >     the patch has a few trailing spaces/tabs

fixed it


> On 2012-04-27 21:55:11, Alejandro Abdelnur wrote:
> > http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/service/JPAService.java, line 107
> > <https://reviews.apache.org/r/4755/diff/1/?file=102363#file102363line107>
> >
> >     oozie.db.schema.name renaming to oozie.db.name is missed in the default value.
> >     
> >     Furthermore, there are a few *-site.xml files in oozie test/resources dirs (core & examples) that may be using oozie.db.schema.name.
> >     
> >     To make it easier, why not leave oozie.db.schema.name untouch?

Thanks for your reminding, fixed all of that. Actually, the else revsions only happened to docs.


> On 2012-04-27 21:55:11, Alejandro Abdelnur wrote:
> > http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/service/JPAService.java, line 162
> > <https://reviews.apache.org/r/4755/diff/1/?file=102363#file102363line162>
> >
> >     why not just using 'dbSchema.length() >0' ?

Accept you suggestion. Thanks.


> On 2012-04-27 21:55:11, Alejandro Abdelnur wrote:
> > http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/resources/oozie-default.xml, line 1008
> > <https://reviews.apache.org/r/4755/diff/1/?file=102364#file102364line1008>
> >
> >     why keeping both oozie.db.name and oozie.db.schema.name?

"oozie.db.name" is the database name. 
"oozie.db.schema.name" notes the schema of a database, means that a database may contain more schemas.
database name is part of the jdbc url.
schema is used when access a table in a database, usually like "select * from {schema.name}.{table.name}".
So they can't use one variable to denote.


- Han


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


On 2012-04-17 10:39:44, Han Xiao wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/4755/
> -----------------------------------------------------------
> 
> (Updated 2012-04-17 10:39:44)
> 
> 
> Review request for oozie.
> 
> 
> Summary
> -------
> 
> Oozie's JPA service doesn't support configure different schemas for oozie's db.
> Our company wants to use one db for multi oozie clusters, and then we want each oozie cluster can use different schema of the db. Therefore JPAService in oozie should support to configure the schema of the db, not just the database.
> The oozie.db.schema.name is use to configure oozie's db name, however, it is a little confusing for it is not used to configure the actually schema of db.
> 
> 
> This addresses bug OOZIE-814.
>     https://issues.apache.org/jira/browse/OOZIE-814
> 
> 
> Diffs
> -----
> 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/conf/oozie-site.xml 1327027 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/service/JPAService.java 1327027 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/resources/oozie-default.xml 1327027 
> 
> Diff: https://reviews.apache.org/r/4755/diff
> 
> 
> Testing
> -------
> 
> * Deployed Oozie, added oozie.db.schema.name configs values, succeed to run the examples on Derby and Postgres databases.
> 
> 
> Thanks,
> 
> Han
> 
>


Re: Review Request: OOZIE-814 Add support of configuring db's schema in JPAService for oozie

Posted by Alejandro Abdelnur <tu...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4755/#review7328
-----------------------------------------------------------


The OozieDBCLI tool may require some changes to ensure the DB is created/upgraded on the right schema.


http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/service/JPAService.java
<https://reviews.apache.org/r/4755/#comment16185>

    the patch has a few trailing spaces/tabs



http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/service/JPAService.java
<https://reviews.apache.org/r/4755/#comment16184>

    oozie.db.schema.name renaming to oozie.db.name is missed in the default value.
    
    Furthermore, there are a few *-site.xml files in oozie test/resources dirs (core & examples) that may be using oozie.db.schema.name.
    
    To make it easier, why not leave oozie.db.schema.name untouch?



http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/service/JPAService.java
<https://reviews.apache.org/r/4755/#comment16183>

    why not just using 'dbSchema.length() >0' ?



http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/resources/oozie-default.xml
<https://reviews.apache.org/r/4755/#comment16186>

    why keeping both oozie.db.name and oozie.db.schema.name?


- Alejandro


On 2012-04-17 10:39:44, Han Xiao wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/4755/
> -----------------------------------------------------------
> 
> (Updated 2012-04-17 10:39:44)
> 
> 
> Review request for oozie.
> 
> 
> Summary
> -------
> 
> Oozie's JPA service doesn't support configure different schemas for oozie's db.
> Our company wants to use one db for multi oozie clusters, and then we want each oozie cluster can use different schema of the db. Therefore JPAService in oozie should support to configure the schema of the db, not just the database.
> The oozie.db.schema.name is use to configure oozie's db name, however, it is a little confusing for it is not used to configure the actually schema of db.
> 
> 
> This addresses bug OOZIE-814.
>     https://issues.apache.org/jira/browse/OOZIE-814
> 
> 
> Diffs
> -----
> 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/conf/oozie-site.xml 1327027 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/service/JPAService.java 1327027 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/resources/oozie-default.xml 1327027 
> 
> Diff: https://reviews.apache.org/r/4755/diff
> 
> 
> Testing
> -------
> 
> * Deployed Oozie, added oozie.db.schema.name configs values, succeed to run the examples on Derby and Postgres databases.
> 
> 
> Thanks,
> 
> Han
> 
>


Re: Review Request: OOZIE-814 Add support of configuring db's schema in JPAService for oozie

Posted by Alejandro Abdelnur <tu...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4755/#review8371
-----------------------------------------------------------


Han Xiao,

First of all, apologies for the delay.

I've done an initial testing using derby and the DB create seems OK. The upgrade (from an oozie2) fails with the following error:


Error: DB schema does not exist

--------------------------------------
java.lang.Exception: DB schema does not exist
	at org.apache.oozie.tools.OozieDBCLI.validateDBSchema(OozieDBCLI.java:402)
	at org.apache.oozie.tools.OozieDBCLI.upgradeDBTo32(OozieDBCLI.java:202)
	at org.apache.oozie.tools.OozieDBCLI.upgradeDB(OozieDBCLI.java:197)
	at org.apache.oozie.tools.OozieDBCLI.run(OozieDBCLI.java:124)
	at org.apache.oozie.tools.OozieDBCLI.main(OozieDBCLI.java:72)
--------------------------------------

It seems that the upgrade expect the 'oozie' schema name when there is not schema name. How do you suggest to handle that?

Tomorrow I'll test it with Oracle/MySQL/Postgress.

Also, please upload the patch directly to the JIRA, we are not using reviewboard anymore.

thx

- Alejandro Abdelnur


On May 28, 2012, 7:52 a.m., Han Xiao wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/4755/
> -----------------------------------------------------------
> 
> (Updated May 28, 2012, 7:52 a.m.)
> 
> 
> Review request for oozie.
> 
> 
> Description
> -------
> 
> Oozie's JPA service doesn't support configure different schemas for oozie's db.
> Our company wants to use one db for multi oozie clusters, and then we want each oozie cluster can use different schema of the db. Therefore JPAService in oozie should support to configure the schema of the db, not just the database.
> The oozie.db.schema.name is use to configure oozie's db name, however, it is a little confusing for it is not used to configure the actually schema of db.
> 
> 
> This addresses bug OOZIE-814.
>     https://issues.apache.org/jira/browse/OOZIE-814
> 
> 
> Diffs
> -----
> 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/conf/oozie-site.xml 1339440 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/SystemInfoBean.java PRE-CREATION 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/service/JPAService.java 1339440 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/resources/META-INF/persistence.xml 1339440 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/resources/oozie-default.xml 1339440 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/docs/src/site/twiki/AG_Install.twiki 1339440 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/tools/src/main/java/org/apache/oozie/tools/OozieDBCLI.java 1343152 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/utils/dbutils/updatescripts/readme.txt 1339440 
> 
> Diff: https://reviews.apache.org/r/4755/diff/
> 
> 
> Testing
> -------
> 
> * Deployed Oozie, added oozie.db.schema.name configs values, succeed to run the examples on Derby and Postgres databases.
> 
> 
> Thanks,
> 
> Han Xiao
> 
>


Re: Review Request: OOZIE-814 Add support of configuring db's schema in JPAService for oozie

Posted by Han Xiao <yi...@huawei.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4755/
-----------------------------------------------------------

(Updated 2012-05-28 07:52:09.439722)


Review request for oozie.


Changes
-------

1.fix the problem related to validateConnection
2.add sys table's sql sentence to sql file


Summary
-------

Oozie's JPA service doesn't support configure different schemas for oozie's db.
Our company wants to use one db for multi oozie clusters, and then we want each oozie cluster can use different schema of the db. Therefore JPAService in oozie should support to configure the schema of the db, not just the database.
The oozie.db.schema.name is use to configure oozie's db name, however, it is a little confusing for it is not used to configure the actually schema of db.


This addresses bug OOZIE-814.
    https://issues.apache.org/jira/browse/OOZIE-814


Diffs (updated)
-----

  http://svn.apache.org/repos/asf/incubator/oozie/trunk/utils/dbutils/updatescripts/readme.txt 1339440 
  http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/SystemInfoBean.java PRE-CREATION 
  http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/service/JPAService.java 1339440 
  http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/resources/META-INF/persistence.xml 1339440 
  http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/resources/oozie-default.xml 1339440 
  http://svn.apache.org/repos/asf/incubator/oozie/trunk/docs/src/site/twiki/AG_Install.twiki 1339440 
  http://svn.apache.org/repos/asf/incubator/oozie/trunk/tools/src/main/java/org/apache/oozie/tools/OozieDBCLI.java 1343152 
  http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/conf/oozie-site.xml 1339440 

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


Testing
-------

* Deployed Oozie, added oozie.db.schema.name configs values, succeed to run the examples on Derby and Postgres databases.


Thanks,

Han


Re: Review Request: OOZIE-814 Add support of configuring db's schema in JPAService for oozie

Posted by Han Xiao <yi...@huawei.com>.

> On 2012-05-22 18:23:05, Alejandro Abdelnur wrote:
> > Han Xiao,
> > 
> > I've tried your latests patch on derby, running 'bin/ooziedb.sh create -sqlfile derby.sql' and the following is missing from the generated sql:
> > 
> > 
> > create table OOZIE_SYS (name varchar(100), data varchar(100))
> > insert into OOZIE_SYS (name, data) values ('db.version', '1')
> > insert into OOZIE_SYS (name, data) values ('oozie.version', '3.3.0-SNAPSHOT')
> > 
> > 
> > Also, have you verified that the connection health check set in the JPAService is working on the custom schema.
> > 
> > thx

1.In the new version, these sql are added:
  insert into OOZIE_SYS (name, data) values ('db.version', '1')
  insert into OOZIE_SYS (name, data) values ('oozie.version', '3.3.0-SNAPSHOT')
with "create table OOZIE_SYS (name varchar(100), data varchar(100))" now under "CREATE TABLE COORD_JOBS (id VARCHAR(255)..."

2.Also, have you verified that the connection health check set in the JPAService is working on the custom schema.
  --thanks for your reminder, i've fixed the missing in the new version.


- Han


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


On 2012-05-28 07:52:09, Han Xiao wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/4755/
> -----------------------------------------------------------
> 
> (Updated 2012-05-28 07:52:09)
> 
> 
> Review request for oozie.
> 
> 
> Summary
> -------
> 
> Oozie's JPA service doesn't support configure different schemas for oozie's db.
> Our company wants to use one db for multi oozie clusters, and then we want each oozie cluster can use different schema of the db. Therefore JPAService in oozie should support to configure the schema of the db, not just the database.
> The oozie.db.schema.name is use to configure oozie's db name, however, it is a little confusing for it is not used to configure the actually schema of db.
> 
> 
> This addresses bug OOZIE-814.
>     https://issues.apache.org/jira/browse/OOZIE-814
> 
> 
> Diffs
> -----
> 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/utils/dbutils/updatescripts/readme.txt 1339440 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/SystemInfoBean.java PRE-CREATION 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/service/JPAService.java 1339440 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/resources/META-INF/persistence.xml 1339440 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/resources/oozie-default.xml 1339440 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/docs/src/site/twiki/AG_Install.twiki 1339440 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/tools/src/main/java/org/apache/oozie/tools/OozieDBCLI.java 1343152 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/conf/oozie-site.xml 1339440 
> 
> Diff: https://reviews.apache.org/r/4755/diff
> 
> 
> Testing
> -------
> 
> * Deployed Oozie, added oozie.db.schema.name configs values, succeed to run the examples on Derby and Postgres databases.
> 
> 
> Thanks,
> 
> Han
> 
>


Re: Review Request: OOZIE-814 Add support of configuring db's schema in JPAService for oozie

Posted by Alejandro Abdelnur <tu...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4755/#review8038
-----------------------------------------------------------


Han Xiao,

I've tried your latests patch on derby, running 'bin/ooziedb.sh create -sqlfile derby.sql' and the following is missing from the generated sql:


create table OOZIE_SYS (name varchar(100), data varchar(100))
insert into OOZIE_SYS (name, data) values ('db.version', '1')
insert into OOZIE_SYS (name, data) values ('oozie.version', '3.3.0-SNAPSHOT')


Also, have you verified that the connection health check set in the JPAService is working on the custom schema.

thx

- Alejandro


On 2012-05-17 01:51:23, Han Xiao wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/4755/
> -----------------------------------------------------------
> 
> (Updated 2012-05-17 01:51:23)
> 
> 
> Review request for oozie.
> 
> 
> Summary
> -------
> 
> Oozie's JPA service doesn't support configure different schemas for oozie's db.
> Our company wants to use one db for multi oozie clusters, and then we want each oozie cluster can use different schema of the db. Therefore JPAService in oozie should support to configure the schema of the db, not just the database.
> The oozie.db.schema.name is use to configure oozie's db name, however, it is a little confusing for it is not used to configure the actually schema of db.
> 
> 
> This addresses bug OOZIE-814.
>     https://issues.apache.org/jira/browse/OOZIE-814
> 
> 
> Diffs
> -----
> 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/conf/oozie-site.xml 1335881 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/SystemInfoBean.java PRE-CREATION 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/service/JPAService.java 1335881 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/resources/META-INF/persistence.xml 1335881 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/resources/oozie-default.xml 1335881 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/docs/src/site/twiki/AG_Install.twiki 1335881 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/tools/src/main/java/org/apache/oozie/tools/OozieDBCLI.java 1335881 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/utils/dbutils/updatescripts/readme.txt 1335881 
> 
> Diff: https://reviews.apache.org/r/4755/diff
> 
> 
> Testing
> -------
> 
> * Deployed Oozie, added oozie.db.schema.name configs values, succeed to run the examples on Derby and Postgres databases.
> 
> 
> Thanks,
> 
> Han
> 
>


Re: Review Request: OOZIE-814 Add support of configuring db's schema in JPAService for oozie

Posted by Han Xiao <yi...@huawei.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4755/
-----------------------------------------------------------

(Updated 2012-05-17 01:51:23.314673)


Review request for oozie.


Changes
-------

a subtle change


Summary
-------

Oozie's JPA service doesn't support configure different schemas for oozie's db.
Our company wants to use one db for multi oozie clusters, and then we want each oozie cluster can use different schema of the db. Therefore JPAService in oozie should support to configure the schema of the db, not just the database.
The oozie.db.schema.name is use to configure oozie's db name, however, it is a little confusing for it is not used to configure the actually schema of db.


This addresses bug OOZIE-814.
    https://issues.apache.org/jira/browse/OOZIE-814


Diffs (updated)
-----

  http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/conf/oozie-site.xml 1335881 
  http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/SystemInfoBean.java PRE-CREATION 
  http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/service/JPAService.java 1335881 
  http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/resources/META-INF/persistence.xml 1335881 
  http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/resources/oozie-default.xml 1335881 
  http://svn.apache.org/repos/asf/incubator/oozie/trunk/docs/src/site/twiki/AG_Install.twiki 1335881 
  http://svn.apache.org/repos/asf/incubator/oozie/trunk/tools/src/main/java/org/apache/oozie/tools/OozieDBCLI.java 1335881 
  http://svn.apache.org/repos/asf/incubator/oozie/trunk/utils/dbutils/updatescripts/readme.txt 1335881 

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


Testing
-------

* Deployed Oozie, added oozie.db.schema.name configs values, succeed to run the examples on Derby and Postgres databases.


Thanks,

Han


Re: Review Request: OOZIE-814 Add support of configuring db's schema in JPAService for oozie

Posted by Alejandro Abdelnur <tu...@cloudera.com>.

> On 2012-05-11 17:50:16, Alejandro Abdelnur wrote:
> > I've run 'ooziedb.sh create -sqlfile x.sql' with the patch and i've noticed that the table indexes are not being created anymore and  that the OOZIE_SYS table is not seeded with data:
> > 
> > 
> > create table OOZIE_SYS (name varchar(100), data varchar(100))
> > insert into OOZIE_SYS (name, data) values ('db.version', '1')
> > insert into OOZIE_SYS (name, data) values ('oozie.version', '3.2.0-SNAPSHOT')
> >
> 
> Han Xiao wrote:
>     The index is no need, the 'name' filed is assigned as primary key, so database will create index for it when create the OOZIE_SYS table;
>     You can see wf_actions in which id is the priamry key and there is no index for it also.
>     The data is insert in the createOozieSysTable() method. I use jpa to insert the data, so there is no explict sql for it. 
>     I find no way to get the sql directly from jpa's persist() method, which jpa uses it to insert a row of data.
>     
>     Thank you.

Han Xiao, I've meant the indexes of ALL tables created by Oozie are missing.

Please try the following using an Oozie build from a fresh checkout and then applying your patch and you'll see the difference:

$ bin/ooziedb.sh create -sqlfile oozie.sql

compare the oozie.sql obtain in both runs.

thx


- Alejandro


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


On 2012-05-11 03:55:07, Han Xiao wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/4755/
> -----------------------------------------------------------
> 
> (Updated 2012-05-11 03:55:07)
> 
> 
> Review request for oozie.
> 
> 
> Summary
> -------
> 
> Oozie's JPA service doesn't support configure different schemas for oozie's db.
> Our company wants to use one db for multi oozie clusters, and then we want each oozie cluster can use different schema of the db. Therefore JPAService in oozie should support to configure the schema of the db, not just the database.
> The oozie.db.schema.name is use to configure oozie's db name, however, it is a little confusing for it is not used to configure the actually schema of db.
> 
> 
> This addresses bug OOZIE-814.
>     https://issues.apache.org/jira/browse/OOZIE-814
> 
> 
> Diffs
> -----
> 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/conf/oozie-site.xml 1335881 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/SystemInfoBean.java PRE-CREATION 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/service/JPAService.java 1335881 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/resources/META-INF/persistence.xml 1335881 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/resources/oozie-default.xml 1335881 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/docs/src/site/twiki/AG_Install.twiki 1335881 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/tools/src/main/java/org/apache/oozie/tools/OozieDBCLI.java 1335881 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/utils/dbutils/updatescripts/readme.txt 1335881 
> 
> Diff: https://reviews.apache.org/r/4755/diff
> 
> 
> Testing
> -------
> 
> * Deployed Oozie, added oozie.db.schema.name configs values, succeed to run the examples on Derby and Postgres databases.
> 
> 
> Thanks,
> 
> Han
> 
>


Re: Review Request: OOZIE-814 Add support of configuring db's schema in JPAService for oozie

Posted by Han Xiao <yi...@huawei.com>.

> On 2012-05-11 17:50:16, Alejandro Abdelnur wrote:
> > I've run 'ooziedb.sh create -sqlfile x.sql' with the patch and i've noticed that the table indexes are not being created anymore and  that the OOZIE_SYS table is not seeded with data:
> > 
> > 
> > create table OOZIE_SYS (name varchar(100), data varchar(100))
> > insert into OOZIE_SYS (name, data) values ('db.version', '1')
> > insert into OOZIE_SYS (name, data) values ('oozie.version', '3.2.0-SNAPSHOT')
> >

The index is no need, the 'name' filed is assigned as primary key, so database will create index for it when create the OOZIE_SYS table;
You can see wf_actions in which id is the priamry key and there is no index for it also.
The data is insert in the createOozieSysTable() method. I use jpa to insert the data, so there is no explict sql for it. 
I find no way to get the sql directly from jpa's persist() method, which jpa uses it to insert a row of data.

Thank you. 


- Han


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


On 2012-05-11 03:55:07, Han Xiao wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/4755/
> -----------------------------------------------------------
> 
> (Updated 2012-05-11 03:55:07)
> 
> 
> Review request for oozie.
> 
> 
> Summary
> -------
> 
> Oozie's JPA service doesn't support configure different schemas for oozie's db.
> Our company wants to use one db for multi oozie clusters, and then we want each oozie cluster can use different schema of the db. Therefore JPAService in oozie should support to configure the schema of the db, not just the database.
> The oozie.db.schema.name is use to configure oozie's db name, however, it is a little confusing for it is not used to configure the actually schema of db.
> 
> 
> This addresses bug OOZIE-814.
>     https://issues.apache.org/jira/browse/OOZIE-814
> 
> 
> Diffs
> -----
> 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/conf/oozie-site.xml 1335881 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/SystemInfoBean.java PRE-CREATION 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/service/JPAService.java 1335881 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/resources/META-INF/persistence.xml 1335881 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/resources/oozie-default.xml 1335881 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/docs/src/site/twiki/AG_Install.twiki 1335881 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/tools/src/main/java/org/apache/oozie/tools/OozieDBCLI.java 1335881 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/utils/dbutils/updatescripts/readme.txt 1335881 
> 
> Diff: https://reviews.apache.org/r/4755/diff
> 
> 
> Testing
> -------
> 
> * Deployed Oozie, added oozie.db.schema.name configs values, succeed to run the examples on Derby and Postgres databases.
> 
> 
> Thanks,
> 
> Han
> 
>


Re: Review Request: OOZIE-814 Add support of configuring db's schema in JPAService for oozie

Posted by Han Xiao <yi...@huawei.com>.

> On 2012-05-11 17:50:16, Alejandro Abdelnur wrote:
> > I've run 'ooziedb.sh create -sqlfile x.sql' with the patch and i've noticed that the table indexes are not being created anymore and  that the OOZIE_SYS table is not seeded with data:
> > 
> > 
> > create table OOZIE_SYS (name varchar(100), data varchar(100))
> > insert into OOZIE_SYS (name, data) values ('db.version', '1')
> > insert into OOZIE_SYS (name, data) values ('oozie.version', '3.2.0-SNAPSHOT')
> >
> 
> Han Xiao wrote:
>     The index is no need, the 'name' filed is assigned as primary key, so database will create index for it when create the OOZIE_SYS table;
>     You can see wf_actions in which id is the priamry key and there is no index for it also.
>     The data is insert in the createOozieSysTable() method. I use jpa to insert the data, so there is no explict sql for it. 
>     I find no way to get the sql directly from jpa's persist() method, which jpa uses it to insert a row of data.
>     
>     Thank you.
> 
> Alejandro Abdelnur wrote:
>     Han Xiao, I've meant the indexes of ALL tables created by Oozie are missing.
>     
>     Please try the following using an Oozie build from a fresh checkout and then applying your patch and you'll see the difference:
>     
>     $ bin/ooziedb.sh create -sqlfile oozie.sql
>     
>     compare the oozie.sql obtain in both runs.
>     
>     thx

yes, you are right. the patch uploaded has missed a part for trim(), as you mentioned before:
---------------------------------
we should trim the value obtained from the conf.get() here

    Han Xiao 5 days, 22 hours ago (May 11th, 2012, 3:42 a.m.)

        ok
---------------------------------
sorry for this happened.


- Han


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


On 2012-05-17 01:51:23, Han Xiao wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/4755/
> -----------------------------------------------------------
> 
> (Updated 2012-05-17 01:51:23)
> 
> 
> Review request for oozie.
> 
> 
> Summary
> -------
> 
> Oozie's JPA service doesn't support configure different schemas for oozie's db.
> Our company wants to use one db for multi oozie clusters, and then we want each oozie cluster can use different schema of the db. Therefore JPAService in oozie should support to configure the schema of the db, not just the database.
> The oozie.db.schema.name is use to configure oozie's db name, however, it is a little confusing for it is not used to configure the actually schema of db.
> 
> 
> This addresses bug OOZIE-814.
>     https://issues.apache.org/jira/browse/OOZIE-814
> 
> 
> Diffs
> -----
> 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/conf/oozie-site.xml 1335881 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/SystemInfoBean.java PRE-CREATION 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/service/JPAService.java 1335881 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/resources/META-INF/persistence.xml 1335881 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/resources/oozie-default.xml 1335881 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/docs/src/site/twiki/AG_Install.twiki 1335881 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/tools/src/main/java/org/apache/oozie/tools/OozieDBCLI.java 1335881 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/utils/dbutils/updatescripts/readme.txt 1335881 
> 
> Diff: https://reviews.apache.org/r/4755/diff
> 
> 
> Testing
> -------
> 
> * Deployed Oozie, added oozie.db.schema.name configs values, succeed to run the examples on Derby and Postgres databases.
> 
> 
> Thanks,
> 
> Han
> 
>


Re: Review Request: OOZIE-814 Add support of configuring db's schema in JPAService for oozie

Posted by Alejandro Abdelnur <tu...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4755/#review7807
-----------------------------------------------------------


I've run 'ooziedb.sh create -sqlfile x.sql' with the patch and i've noticed that the table indexes are not being created anymore and  that the OOZIE_SYS table is not seeded with data:


create table OOZIE_SYS (name varchar(100), data varchar(100))
insert into OOZIE_SYS (name, data) values ('db.version', '1')
insert into OOZIE_SYS (name, data) values ('oozie.version', '3.2.0-SNAPSHOT')


- Alejandro


On 2012-05-11 03:55:07, Han Xiao wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/4755/
> -----------------------------------------------------------
> 
> (Updated 2012-05-11 03:55:07)
> 
> 
> Review request for oozie.
> 
> 
> Summary
> -------
> 
> Oozie's JPA service doesn't support configure different schemas for oozie's db.
> Our company wants to use one db for multi oozie clusters, and then we want each oozie cluster can use different schema of the db. Therefore JPAService in oozie should support to configure the schema of the db, not just the database.
> The oozie.db.schema.name is use to configure oozie's db name, however, it is a little confusing for it is not used to configure the actually schema of db.
> 
> 
> This addresses bug OOZIE-814.
>     https://issues.apache.org/jira/browse/OOZIE-814
> 
> 
> Diffs
> -----
> 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/conf/oozie-site.xml 1335881 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/SystemInfoBean.java PRE-CREATION 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/service/JPAService.java 1335881 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/resources/META-INF/persistence.xml 1335881 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/resources/oozie-default.xml 1335881 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/docs/src/site/twiki/AG_Install.twiki 1335881 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/tools/src/main/java/org/apache/oozie/tools/OozieDBCLI.java 1335881 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/utils/dbutils/updatescripts/readme.txt 1335881 
> 
> Diff: https://reviews.apache.org/r/4755/diff
> 
> 
> Testing
> -------
> 
> * Deployed Oozie, added oozie.db.schema.name configs values, succeed to run the examples on Derby and Postgres databases.
> 
> 
> Thanks,
> 
> Han
> 
>


Re: Review Request: OOZIE-814 Add support of configuring db's schema in JPAService for oozie

Posted by Han Xiao <yi...@huawei.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4755/
-----------------------------------------------------------

(Updated 2012-05-11 03:55:07.787793)


Review request for oozie.


Changes
-------

Thanks for Alejandro's kind work.


Summary
-------

Oozie's JPA service doesn't support configure different schemas for oozie's db.
Our company wants to use one db for multi oozie clusters, and then we want each oozie cluster can use different schema of the db. Therefore JPAService in oozie should support to configure the schema of the db, not just the database.
The oozie.db.schema.name is use to configure oozie's db name, however, it is a little confusing for it is not used to configure the actually schema of db.


This addresses bug OOZIE-814.
    https://issues.apache.org/jira/browse/OOZIE-814


Diffs (updated)
-----

  http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/conf/oozie-site.xml 1335881 
  http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/SystemInfoBean.java PRE-CREATION 
  http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/service/JPAService.java 1335881 
  http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/resources/META-INF/persistence.xml 1335881 
  http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/resources/oozie-default.xml 1335881 
  http://svn.apache.org/repos/asf/incubator/oozie/trunk/docs/src/site/twiki/AG_Install.twiki 1335881 
  http://svn.apache.org/repos/asf/incubator/oozie/trunk/tools/src/main/java/org/apache/oozie/tools/OozieDBCLI.java 1335881 
  http://svn.apache.org/repos/asf/incubator/oozie/trunk/utils/dbutils/updatescripts/readme.txt 1335881 

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


Testing
-------

* Deployed Oozie, added oozie.db.schema.name configs values, succeed to run the examples on Derby and Postgres databases.


Thanks,

Han


Re: Review Request: OOZIE-814 Add support of configuring db's schema in JPAService for oozie

Posted by Han Xiao <yi...@huawei.com>.

> On 2012-05-10 17:21:37, Alejandro Abdelnur wrote:
> > Looks good, I've made some comments inline.
> > 
> > In addition:
> > 
> > * I don't see the different oozie-site.xml for testing for different DBs being updated, is it not required?
> > 
> > After your feedback I'll take the patch for a spin doing upgrades and creation tests. BTW, have you done that?
> > 
> > Thanks, nice work.
> >

I don't see the different oozie-site.xml for testing for different DBs being updated, is it not required?
-- You mean why there is not a "oozie.db.schema.name" property in oozie-site.xml? It is not requried, and if any wants to specify the schema, he must configure it. if not, the database will choose the default schema itself.

After your feedback I'll take the patch for a spin doing upgrades and creation tests. BTW, have you done that?
-- Yes, i am sure you would not feel bothering when you test with this patch.
 


> On 2012-05-10 17:21:37, Alejandro Abdelnur wrote:
> > http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/resources/META-INF/persistence.xml, line 34
> > <https://reviews.apache.org/r/4755/diff/2/?file=107962#file107962line34>
> >
> >     please fix the indentation of these 3 classes

ok


> On 2012-05-10 17:21:37, Alejandro Abdelnur wrote:
> > http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/resources/META-INF/persistence.xml, line 91
> > <https://reviews.apache.org/r/4755/diff/2/?file=107962#file107962line91>
> >
> >     indentation fix

ok


> On 2012-05-10 17:21:37, Alejandro Abdelnur wrote:
> > http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/resources/META-INF/persistence.xml, line 148
> > <https://reviews.apache.org/r/4755/diff/2/?file=107962#file107962line148>
> >
> >     indentation fix

ok


> On 2012-05-10 17:21:37, Alejandro Abdelnur wrote:
> > http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/resources/META-INF/persistence.xml, line 205
> > <https://reviews.apache.org/r/4755/diff/2/?file=107962#file107962line205>
> >
> >     indentation fix

ok


> On 2012-05-10 17:21:37, Alejandro Abdelnur wrote:
> > http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/resources/oozie-default.xml, line 1002
> > <https://reviews.apache.org/r/4755/diff/2/?file=107963#file107963line1002>
> >
> >     you need to leave a space as value, else the value will be  NULL. Looking at the code it really does not matter. So, this is just a minor NIT

take it, :D


> On 2012-05-10 17:21:37, Alejandro Abdelnur wrote:
> > http://svn.apache.org/repos/asf/incubator/oozie/trunk/docs/src/site/twiki/AG_Install.twiki, line 119
> > <https://reviews.apache.org/r/4755/diff/2/?file=107964#file107964line119>
> >
> >     we should add here the oozie.db.schema.name property with the default value, right?

There is no need. Databases differ in their default shema, that of postgres is public and of derby is APP.
Database will choose the default schema itselt, if it is not specified.


> On 2012-05-10 17:21:37, Alejandro Abdelnur wrote:
> > http://svn.apache.org/repos/asf/incubator/oozie/trunk/tools/src/main/java/org/apache/oozie/tools/OozieDBCLI.java, line 169
> > <https://reviews.apache.org/r/4755/diff/2/?file=107965#file107965line169>
> >
> >     we should trim the value obtained from the conf.get() here

ok


> On 2012-05-10 17:21:37, Alejandro Abdelnur wrote:
> > http://svn.apache.org/repos/asf/incubator/oozie/trunk/tools/src/main/java/org/apache/oozie/tools/OozieDBCLI.java, line 236
> > <https://reviews.apache.org/r/4755/diff/2/?file=107965#file107965line236>
> >
> >     can we please leave the names of table and columns with the case defined in the bean as they where before? else we could run  into issues when a DB is case sensitive for table/column names.

i don't want to add the schema to each sql, that's why i take the jpa. And also for this reason, we should use the JPA Query so that jpa will add the schema auto in each query.
i not sure i have understood you question, i wish the reply is that you wonder.


> On 2012-05-10 17:21:37, Alejandro Abdelnur wrote:
> > http://svn.apache.org/repos/asf/incubator/oozie/trunk/tools/src/main/java/org/apache/oozie/tools/OozieDBCLI.java, line 320
> > <https://reviews.apache.org/r/4755/diff/2/?file=107965#file107965line320>
> >
> >     why is this being remove? OpenJPA doe not do this as part of an upgrade, that is why this is here

I'm sorry, i made a serious mistake here. This part is recovered with little change in the new patch.


> On 2012-05-10 17:21:37, Alejandro Abdelnur wrote:
> > http://svn.apache.org/repos/asf/incubator/oozie/trunk/tools/src/main/java/org/apache/oozie/tools/OozieDBCLI.java, line 645
> > <https://reviews.apache.org/r/4755/diff/2/?file=107965#file107965line645>
> >
> >     trim value of conf.get()

ok


- Han


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


On 2012-05-09 02:36:58, Han Xiao wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/4755/
> -----------------------------------------------------------
> 
> (Updated 2012-05-09 02:36:58)
> 
> 
> Review request for oozie.
> 
> 
> Summary
> -------
> 
> Oozie's JPA service doesn't support configure different schemas for oozie's db.
> Our company wants to use one db for multi oozie clusters, and then we want each oozie cluster can use different schema of the db. Therefore JPAService in oozie should support to configure the schema of the db, not just the database.
> The oozie.db.schema.name is use to configure oozie's db name, however, it is a little confusing for it is not used to configure the actually schema of db.
> 
> 
> This addresses bug OOZIE-814.
>     https://issues.apache.org/jira/browse/OOZIE-814
> 
> 
> Diffs
> -----
> 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/tools/src/main/java/org/apache/oozie/tools/OozieDBCLI.java 1335881 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/conf/oozie-site.xml 1335881 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/SystemInfoBean.java PRE-CREATION 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/service/JPAService.java 1335881 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/resources/META-INF/persistence.xml 1335881 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/resources/oozie-default.xml 1335881 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/docs/src/site/twiki/AG_Install.twiki 1335881 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/utils/dbutils/updatescripts/readme.txt 1335881 
> 
> Diff: https://reviews.apache.org/r/4755/diff
> 
> 
> Testing
> -------
> 
> * Deployed Oozie, added oozie.db.schema.name configs values, succeed to run the examples on Derby and Postgres databases.
> 
> 
> Thanks,
> 
> Han
> 
>


Re: Review Request: OOZIE-814 Add support of configuring db's schema in JPAService for oozie

Posted by Alejandro Abdelnur <tu...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4755/#review7779
-----------------------------------------------------------


Looks good, I've made some comments inline.

In addition:

* I don't see the different oozie-site.xml for testing for different DBs being updated, is it not required?

After your feedback I'll take the patch for a spin doing upgrades and creation tests. BTW, have you done that?

Thanks, nice work.



http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/resources/META-INF/persistence.xml
<https://reviews.apache.org/r/4755/#comment17087>

    please fix the indentation of these 3 classes



http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/resources/META-INF/persistence.xml
<https://reviews.apache.org/r/4755/#comment17088>

    indentation fix



http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/resources/META-INF/persistence.xml
<https://reviews.apache.org/r/4755/#comment17089>

    indentation fix



http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/resources/META-INF/persistence.xml
<https://reviews.apache.org/r/4755/#comment17090>

    indentation fix



http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/resources/oozie-default.xml
<https://reviews.apache.org/r/4755/#comment17086>

    you need to leave a space as value, else the value will be  NULL. Looking at the code it really does not matter. So, this is just a minor NIT



http://svn.apache.org/repos/asf/incubator/oozie/trunk/docs/src/site/twiki/AG_Install.twiki
<https://reviews.apache.org/r/4755/#comment17091>

    we should add here the oozie.db.schema.name property with the default value, right?



http://svn.apache.org/repos/asf/incubator/oozie/trunk/tools/src/main/java/org/apache/oozie/tools/OozieDBCLI.java
<https://reviews.apache.org/r/4755/#comment17093>

    we should trim the value obtained from the conf.get() here



http://svn.apache.org/repos/asf/incubator/oozie/trunk/tools/src/main/java/org/apache/oozie/tools/OozieDBCLI.java
<https://reviews.apache.org/r/4755/#comment17096>

    can we please leave the names of table and columns with the case defined in the bean as they where before? else we could run  into issues when a DB is case sensitive for table/column names.



http://svn.apache.org/repos/asf/incubator/oozie/trunk/tools/src/main/java/org/apache/oozie/tools/OozieDBCLI.java
<https://reviews.apache.org/r/4755/#comment17097>

    why is this being remove? OpenJPA doe not do this as part of an upgrade, that is why this is here



http://svn.apache.org/repos/asf/incubator/oozie/trunk/tools/src/main/java/org/apache/oozie/tools/OozieDBCLI.java
<https://reviews.apache.org/r/4755/#comment17098>

    trim value of conf.get()


- Alejandro


On 2012-05-09 02:36:58, Han Xiao wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/4755/
> -----------------------------------------------------------
> 
> (Updated 2012-05-09 02:36:58)
> 
> 
> Review request for oozie.
> 
> 
> Summary
> -------
> 
> Oozie's JPA service doesn't support configure different schemas for oozie's db.
> Our company wants to use one db for multi oozie clusters, and then we want each oozie cluster can use different schema of the db. Therefore JPAService in oozie should support to configure the schema of the db, not just the database.
> The oozie.db.schema.name is use to configure oozie's db name, however, it is a little confusing for it is not used to configure the actually schema of db.
> 
> 
> This addresses bug OOZIE-814.
>     https://issues.apache.org/jira/browse/OOZIE-814
> 
> 
> Diffs
> -----
> 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/tools/src/main/java/org/apache/oozie/tools/OozieDBCLI.java 1335881 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/conf/oozie-site.xml 1335881 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/SystemInfoBean.java PRE-CREATION 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/service/JPAService.java 1335881 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/resources/META-INF/persistence.xml 1335881 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/resources/oozie-default.xml 1335881 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/docs/src/site/twiki/AG_Install.twiki 1335881 
>   http://svn.apache.org/repos/asf/incubator/oozie/trunk/utils/dbutils/updatescripts/readme.txt 1335881 
> 
> Diff: https://reviews.apache.org/r/4755/diff
> 
> 
> Testing
> -------
> 
> * Deployed Oozie, added oozie.db.schema.name configs values, succeed to run the examples on Derby and Postgres databases.
> 
> 
> Thanks,
> 
> Han
> 
>


Re: Review Request: OOZIE-814 Add support of configuring db's schema in JPAService for oozie

Posted by Han Xiao <yi...@huawei.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4755/
-----------------------------------------------------------

(Updated 2012-05-09 02:36:58.283587)


Review request for oozie.


Changes
-------

Improve the related docs, thanks for Alejandro.


Summary
-------

Oozie's JPA service doesn't support configure different schemas for oozie's db.
Our company wants to use one db for multi oozie clusters, and then we want each oozie cluster can use different schema of the db. Therefore JPAService in oozie should support to configure the schema of the db, not just the database.
The oozie.db.schema.name is use to configure oozie's db name, however, it is a little confusing for it is not used to configure the actually schema of db.


This addresses bug OOZIE-814.
    https://issues.apache.org/jira/browse/OOZIE-814


Diffs (updated)
-----

  http://svn.apache.org/repos/asf/incubator/oozie/trunk/tools/src/main/java/org/apache/oozie/tools/OozieDBCLI.java 1335881 
  http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/conf/oozie-site.xml 1335881 
  http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/SystemInfoBean.java PRE-CREATION 
  http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/service/JPAService.java 1335881 
  http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/resources/META-INF/persistence.xml 1335881 
  http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/resources/oozie-default.xml 1335881 
  http://svn.apache.org/repos/asf/incubator/oozie/trunk/docs/src/site/twiki/AG_Install.twiki 1335881 
  http://svn.apache.org/repos/asf/incubator/oozie/trunk/utils/dbutils/updatescripts/readme.txt 1335881 

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


Testing
-------

* Deployed Oozie, added oozie.db.schema.name configs values, succeed to run the examples on Derby and Postgres databases.


Thanks,

Han