YahooArchive / oozie

Oozie - workflow engine for Hadoop
http://yahoo.github.com/oozie/
Apache License 2.0
373 stars 160 forks source link

oozie 3.0.2 not creating mysql tables in db #833

Open jabirahmed opened 12 years ago

jabirahmed commented 12 years ago

i have installed mysql connector and built the new war

jabira@oozie2001:~$ jar -tvf oozie-3.0.2/oozie-server/webapps/oozie.war |grep mysq 789885 Wed Feb 08 12:04:48 UTC 2012 WEB-INF/lib/mysql-connector-java-5.1.18-bin.jar

also set the correct parameters in the oozie-site.xml

<property>
  <name>oozie.service.StoreService.jdbc.url</name>
  <description>
        JDBC URL.
    </description>
  <value>jdbc:mysql:localhost:3306/ooziedb;create=true</value>
</property>
<property>
  <name>oozie.service.StoreService.jdbc.username</name>
  <description>
        DB user name.
    </description>
  <value>oozieuser</value>
</property>
<property>
  <name>oozie.service.StoreService.jdbc.password</name>
  <description>
        DB user password.

        IMPORTANT: if password is emtpy leave a 1 space string, the service trims the value,
                   if empty Configuration assumes it is NULL.

        IMPORTANT: if the StoreServicePasswordService is active, it will reset this value with the value given in
                   the console.
    </description>
  <value>pass</value>
</property>
<property>
  <name>oozie.service.StoreService.pool.max.active.conn</name>
  <description>
         Max number of connections.
    </description>
  <value>10</value>
</property>

<property>
  <name>oozie.service.StoreService.jdbc.driver</name>
  <description>
        JDBC driver class.
    </description>
  <value>com.mysql.jdbc.Driver</value>
</property>

Oozie starts up fine too and i dont see any exceptions in logs other than

but when i check mysql i dont see any tables being created in the db

jabira@oozie2001:~$ mysql -uoozieuser --ppass ooziedb

mysql> mysql> show tables; Empty set (0.00 sec)

Not sure whats going wrong here

jabirahmed commented 12 years ago

http://mail-archives.apache.org/mod_mbox/incubator-oozie-users/201111.mbox/%3CCAKFPOX9UfXABzehYpW4-vCuoNm7g+TUapfSMkp1vY1JZMCUOHg@mail.gmail.com%3E

This is the same issue I see in 3.0.2

Its using derby and not mysql

oozie.log:2012-02-09 00:37:40,867 INFO JPAService:536 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[-] ACTION[-] JPA configuration: DriverClassName=org.apache.derby.jdbc.EmbeddedDriver,Url=jdbc:derby:/home/jabira/setups/oozie-3.0.2/data/oozie-db;create=true,Username=sa,Password=,MaxActive=10

The issue was actually because of poor infact very poor documentation

The solutions was DB configuration properties (StoreService) was for 2.x and , we should use Oozie 3.x ones (JPAService). Valid in 3.x

oozie.service.JPAService.create.db.schema
    <name>oozie.service.JPAService.jdbc.driver</name>
    <name>oozie.service.JPAService.jdbc.url</name>
    <name>oozie.service.JPAService.jdbc.username</name>
    <name>oozie.service.JPAService.jdbc.password</name>
    <name>oozie.service.JPAService.pool.max.active.conn</name>

Invalid in 3.x

jabira@jabir-vm:~/setups/oozie-3.0.2$ cat conf/oozie-site.xml |grep StoreService

oozie.service.StoreService.create.db.schema
    <name>oozie.service.StoreService.jdbc.driver</name>
    <name>oozie.service.StoreService.jdbc.url</name>
    <name>oozie.service.StoreService.jdbc.username</name>
    <name>oozie.service.StoreService.jdbc.password</name>
        IMPORTANT: if the StoreServicePasswordService is active, it will reset this value with the value given in
    <name>oozie.service.StoreService.pool.max.active.conn</name>

jabira@jabir-vm:~/setups/oozie-3.0.2$

NEEDS TO BE DOCUMENTED