-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/51137/
-----------------------------------------------------------
Review request for oozie.
Bugs: OOZIE-2632
https://issues.apache.org/jira/browse/OOZIE-2632
Repository: oozie-git
Description
-------
When there is a need to change the database under Oozie one has to submit all
the workflows again or migrate the data manually which is not easy because of
the binary blobs stored in the DB.
oozie-setup.sh could have a db export/import command that would save the
contents of the Db to a file and read it back from it. Functionality added with
some tests. The database is dumped using GSON to json files and zipped to a
single file to use less disk space.
Diffs
-----
distro/src/main/bin/oozie-setup.ps1 ca89b88
distro/src/main/bin/oozie-setup.sh 3b6a643
pom.xml 9e06e89
tools/pom.xml 114ba8e
tools/src/main/java/org/apache/oozie/tools/OozieDBCLI.java 8b3e939
tools/src/main/java/org/apache/oozie/tools/OozieDBExportCLI.java PRE-CREATION
tools/src/main/java/org/apache/oozie/tools/OozieDBImportCLI.java PRE-CREATION
tools/src/test/java/org/apache/oozie/tools/TestDBLoadDump.java PRE-CREATION
tools/src/test/resources/dumpData/ooziedb_ac.json PRE-CREATION
tools/src/test/resources/dumpData/ooziedb_bna.json PRE-CREATION
tools/src/test/resources/dumpData/ooziedb_bnj.json PRE-CREATION
tools/src/test/resources/dumpData/ooziedb_ca.json PRE-CREATION
tools/src/test/resources/dumpData/ooziedb_cj.json PRE-CREATION
tools/src/test/resources/dumpData/ooziedb_slareg.json PRE-CREATION
tools/src/test/resources/dumpData/ooziedb_slasum.json PRE-CREATION
tools/src/test/resources/dumpData/ooziedb_wf.json PRE-CREATION
Diff: https://reviews.apache.org/r/51137/diff/
Testing
-------
I've tested it with a sightly bigger database on MySQL. It contained 11880 rows
in WF_JOBS, 76092 rows in WF_ACTIONS, 214 rows in COORD_JOBS and 9078 rows in
COORD_ACTIONS. The performance was:
||Dump type|| File Size ||Dump creation time|| Dump load time||
|Mysql dump| 400 Mb| 0.1 min| 1 min|
|Oozie dump (level 1 compression)| 500 Mb| 3.5 min| 2.5 min|
|Oozie dump (no compression)| 1450 Mb| 2.5 min| 2.5 min|
Also, I've tested migrating between MySQL, Derby and Oracle. After restarting
Oozie, the workflows/coordinators kept running and their status was updated
properly.
Thanks,
Peter Cseh