OOZIE-2662 DB migration fails if database is too big (andras.piros via gezapeti)
Project: http://git-wip-us.apache.org/repos/asf/oozie/repo Commit: http://git-wip-us.apache.org/repos/asf/oozie/commit/ba5c3c90 Tree: http://git-wip-us.apache.org/repos/asf/oozie/tree/ba5c3c90 Diff: http://git-wip-us.apache.org/repos/asf/oozie/diff/ba5c3c90 Branch: refs/heads/master Commit: ba5c3c90945363317e16368b045db7fe8e38761c Parents: 1ae6890 Author: Gezapeti Cseh <[email protected]> Authored: Mon Jul 31 10:41:22 2017 +0200 Committer: Gezapeti Cseh <[email protected]> Committed: Mon Jul 31 10:41:22 2017 +0200 ---------------------------------------------------------------------- core/src/main/resources/oozie-default.xml | 10 + release-log.txt | 1 + .../apache/oozie/tools/OozieDBImportCLI.java | 540 ++++++++++++++++--- .../org/apache/oozie/tools/TestDBLoadDump.java | 286 ++++++++-- .../resources/dumpData/invalid/ooziedb_ac.json | 3 + .../resources/dumpData/invalid/ooziedb_bna.json | 0 .../resources/dumpData/invalid/ooziedb_bnj.json | 0 .../resources/dumpData/invalid/ooziedb_ca.json | 3 + .../resources/dumpData/invalid/ooziedb_cj.json | 3 + .../dumpData/invalid/ooziedb_sysinfo.json | 1 + .../resources/dumpData/invalid/ooziedb_wf.json | 1 + .../src/test/resources/dumpData/ooziedb_ac.json | 3 - .../test/resources/dumpData/ooziedb_bna.json | 0 .../test/resources/dumpData/ooziedb_bnj.json | 0 .../src/test/resources/dumpData/ooziedb_ca.json | 3 - .../src/test/resources/dumpData/ooziedb_cj.json | 3 - .../test/resources/dumpData/ooziedb_slareg.json | 0 .../test/resources/dumpData/ooziedb_slasum.json | 0 .../resources/dumpData/ooziedb_sysinfo.json | 1 - .../src/test/resources/dumpData/ooziedb_wf.json | 1 - .../resources/dumpData/valid/ooziedb_ac.json | 3 + .../resources/dumpData/valid/ooziedb_bna.json | 0 .../resources/dumpData/valid/ooziedb_bnj.json | 0 .../resources/dumpData/valid/ooziedb_ca.json | 3 + .../resources/dumpData/valid/ooziedb_cj.json | 3 + .../dumpData/valid/ooziedb_slareg.json | 0 .../dumpData/valid/ooziedb_slasum.json | 0 .../dumpData/valid/ooziedb_sysinfo.json | 1 + .../resources/dumpData/valid/ooziedb_wf.json | 1 + 29 files changed, 729 insertions(+), 141 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/oozie/blob/ba5c3c90/core/src/main/resources/oozie-default.xml ---------------------------------------------------------------------- diff --git a/core/src/main/resources/oozie-default.xml b/core/src/main/resources/oozie-default.xml index b59a2e6..0d174b5 100644 --- a/core/src/main/resources/oozie-default.xml +++ b/core/src/main/resources/oozie-default.xml @@ -1445,6 +1445,16 @@ will be the requeue interval for the actions which are waiting for a long time w </description> </property> + <!-- Database import CLI: batch size --> + + <property> + <name>oozie.db.import.batch.size</name> + <value>1000</value> + <description> + How many entities are imported in a single transaction by the Oozie DB import CLI tool to avoid OutOfMemoryErrors. + </description> + </property> + <!-- StoreService --> <property> http://git-wip-us.apache.org/repos/asf/oozie/blob/ba5c3c90/release-log.txt ---------------------------------------------------------------------- diff --git a/release-log.txt b/release-log.txt index c5438ce..64b9b1e 100644 --- a/release-log.txt +++ b/release-log.txt @@ -1,5 +1,6 @@ -- Oozie 5.0.0 release (trunk - unreleased) +OOZIE-2662 DB migration fails if database is too big (andras.piros via gezapeti) OOZIE-2984 Parse spark-defaults.conf values with spaces without needing the quotes (andras.piros via gezapeti) OOZIE-2910 Re-add testChildKill and adapt it to OYA (pbacsko and gezapeti) OOZIE-2995 In preparation for Java 8, remove MaxPermSize=512m (Artem Ervits via asasvari) http://git-wip-us.apache.org/repos/asf/oozie/blob/ba5c3c90/tools/src/main/java/org/apache/oozie/tools/OozieDBImportCLI.java ---------------------------------------------------------------------- diff --git a/tools/src/main/java/org/apache/oozie/tools/OozieDBImportCLI.java b/tools/src/main/java/org/apache/oozie/tools/OozieDBImportCLI.java index 0e14a30..8529409 100644 --- a/tools/src/main/java/org/apache/oozie/tools/OozieDBImportCLI.java +++ b/tools/src/main/java/org/apache/oozie/tools/OozieDBImportCLI.java @@ -18,10 +18,15 @@ package org.apache.oozie.tools; +import com.google.common.base.Charsets; +import com.google.common.collect.Lists; +import com.google.common.collect.Sets; import com.google.gson.Gson; -import org.apache.commons.cli.Options; +import com.google.gson.JsonSyntaxException; +import org.apache.commons.cli.Options; import org.apache.commons.cli.ParseException; +import org.apache.directory.api.util.Strings; import org.apache.oozie.BundleActionBean; import org.apache.oozie.BundleJobBean; import org.apache.oozie.CoordinatorActionBean; @@ -30,37 +35,58 @@ import org.apache.oozie.WorkflowActionBean; import org.apache.oozie.WorkflowJobBean; import org.apache.oozie.cli.CLIParser; import org.apache.oozie.executor.jpa.JPAExecutorException; +import org.apache.oozie.service.ConfigurationService; import org.apache.oozie.service.JPAService; import org.apache.oozie.service.Services; import org.apache.oozie.sla.SLARegistrationBean; import org.apache.oozie.sla.SLASummaryBean; import org.apache.oozie.store.StoreException; +import org.apache.openjpa.persistence.OpenJPAEntityManagerSPI; +import org.apache.openjpa.persistence.RollbackException; import javax.persistence.EntityManager; import javax.persistence.EntityTransaction; import javax.persistence.FlushModeType; +import javax.persistence.Table; +import javax.persistence.metamodel.EntityType; +import javax.persistence.metamodel.Metamodel; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; +import java.sql.Connection; +import java.sql.DatabaseMetaData; +import java.sql.ResultSet; +import java.sql.SQLException; import java.util.Arrays; import java.util.List; +import java.util.ListIterator; +import java.util.Set; import java.util.zip.ZipEntry; import java.util.zip.ZipFile; -import static org.apache.oozie.tools.OozieDBExportCLI.*; +import static com.google.common.base.Preconditions.checkNotNull; +import static com.google.common.base.Preconditions.checkState; +import static org.apache.oozie.tools.OozieDBExportCLI.OOZIEDB_AC_JSON; +import static org.apache.oozie.tools.OozieDBExportCLI.OOZIEDB_BNA_JSON; +import static org.apache.oozie.tools.OozieDBExportCLI.OOZIEDB_BNJ_JSON; +import static org.apache.oozie.tools.OozieDBExportCLI.OOZIEDB_CA_JSON; +import static org.apache.oozie.tools.OozieDBExportCLI.OOZIEDB_CJ_JSON; +import static org.apache.oozie.tools.OozieDBExportCLI.OOZIEDB_SLAREG_JSON; +import static org.apache.oozie.tools.OozieDBExportCLI.OOZIEDB_SLASUM_JSON; +import static org.apache.oozie.tools.OozieDBExportCLI.OOZIEDB_SYS_INFO_JSON; +import static org.apache.oozie.tools.OozieDBExportCLI.OOZIEDB_WF_JSON; /** * This class provides the following functionality: * <p/> - * <ul> - * <li>Imports the data from json files created by {@link OozieDBExportCLI} the specified target zip file</li> - * <li>This class uses the current oozie configuration in oozie-site.xml</li> - * </ul> + * <ul> + * <li>imports the data from json files created by {@link OozieDBExportCLI} the specified target zip file</li> + * <li>this class uses the current Oozie configuration in {oozie-site.xml}</li> + * <li></li> + * </ul> * <p/> */ - - public class OozieDBImportCLI { private static final String[] HELP_INFO = { "", @@ -68,43 +94,69 @@ public class OozieDBImportCLI { }; private static final String IMPORT_CMD = "import"; private static final String HELP_CMD = "help"; + public static final String OOZIE_DB_IMPORT_BATCH_SIZE_KEY = "oozie.db.import.batch.size"; + static final int DEFAULT_BATCH_SIZE = 1000; + private static int IMPORT_BATCH_SIZE; + private static final String OPTION_VERBOSE_SHORT = "v"; + private static final String OPTION_VERBOSE_LONG = "verbose"; - public static void main(String[] args) throws ParseException { + private final EntityManager entityManager; + private final ZipFile mainZipFile; + private final boolean verbose; + private boolean cleanupNecessary = false; + private final Set<Class<?>> entityClasses = Sets.newLinkedHashSet(); + private OozieDBImportCLI(final EntityManager entityManager, final ZipFile mainZipFile, final boolean verbose) { + this.entityManager = entityManager; + this.mainZipFile = mainZipFile; + this.verbose = verbose; + } - CLIParser parser = new CLIParser("oozie-setup.sh", HELP_INFO); + public static void main(final String[] args) throws ParseException { + final CLIParser parser = new CLIParser("oozie-setup.sh", HELP_INFO); parser.addCommand(HELP_CMD, "", "display usage for all commands or specified command", new Options(), false); parser.addCommand(IMPORT_CMD, "", "imports the contents of the Oozie database from the specified file", - new Options(), true); + new Options().addOption(OPTION_VERBOSE_SHORT, OPTION_VERBOSE_LONG, false, "Enables verbose logging."), true); + boolean verbose = false; try { - CLIParser.Command command = parser.parse(args); + final CLIParser.Command command = parser.parse(args); if (command.getName().equals(IMPORT_CMD)) { - Services services = new Services(); + final Services services = new Services(); services.getConf().set(Services.CONF_SERVICE_CLASSES, JPAService.class.getName()); services.getConf().set(Services.CONF_SERVICE_EXT_CLASSES, ""); services.init(); + setImportBatchSize(); System.out.println("=========================================================="); System.out.println(Arrays.toString(command.getCommandLine().getArgs())); - importAllDBTables(command.getCommandLine().getArgs()[0]); + System.out.println(String.format("Import batch length is %d", IMPORT_BATCH_SIZE)); + + verbose = command.getCommandLine().hasOption(OPTION_VERBOSE_SHORT) + || command.getCommandLine().hasOption(OPTION_VERBOSE_LONG); + + importAllDBTables(command.getCommandLine().getArgs()[0], verbose); } else if (command.getName().equals(HELP_CMD)) { parser.showHelp(command.getCommandLine()); } - } catch (ParseException pex) { + } catch (final ParseException pex) { System.err.println("Invalid sub-command: " + pex.getMessage()); System.err.println(); System.err.println(parser.shortHelp()); System.exit(1); - } catch (Throwable e) { + } catch (final Throwable e) { System.err.println(); System.err.println("Error: " + e.getMessage()); System.err.println(); - System.err.println("Stack trace for the error was (for debug purposes):"); - System.err.println("--------------------------------------"); - e.printStackTrace(System.err); - System.err.println("--------------------------------------"); - System.err.println(); + + if (verbose) { + System.err.println("Stack trace for the error was (for debug purposes):"); + System.err.println("--------------------------------------"); + e.printStackTrace(System.err); + System.err.println("--------------------------------------"); + System.err.println(); + } + System.exit(1); } finally { if (Services.get() != null) { @@ -113,102 +165,424 @@ public class OozieDBImportCLI { } } - private static void importAllDBTables(String zipFileName) throws StoreException, IOException, JPAExecutorException { + private static void setImportBatchSize() { + if (Strings.isNotEmpty(System.getProperty(OOZIE_DB_IMPORT_BATCH_SIZE_KEY))) { + try { + IMPORT_BATCH_SIZE = Integer.parseInt(System.getProperty(OOZIE_DB_IMPORT_BATCH_SIZE_KEY)); + } + catch (final NumberFormatException e) { + IMPORT_BATCH_SIZE = ConfigurationService.getInt(OOZIE_DB_IMPORT_BATCH_SIZE_KEY, DEFAULT_BATCH_SIZE); + } + } + else { + IMPORT_BATCH_SIZE = ConfigurationService.getInt(OOZIE_DB_IMPORT_BATCH_SIZE_KEY, DEFAULT_BATCH_SIZE); + } + } + + private static void importAllDBTables(final String zipFileName, final boolean verbose) throws StoreException, IOException, + JPAExecutorException, SQLException { EntityManager entityManager = null; - ZipFile zipFile = null; - try { + try (ZipFile mainZipFile = new ZipFile(zipFileName)) { entityManager = Services.get().get(JPAService.class).getEntityManager(); entityManager.setFlushMode(FlushModeType.COMMIT); - zipFile = new ZipFile(zipFileName); - checkDBVersion(entityManager, zipFile); - importFrom(entityManager, zipFile, "WF_JOBS", WorkflowJobBean.class, OOZIEDB_WF_JSON); - importFrom(entityManager, zipFile, "WF_ACTIONS", WorkflowActionBean.class, OOZIEDB_AC_JSON); - importFrom(entityManager, zipFile, "COORD_JOBS", CoordinatorJobBean.class, OOZIEDB_CJ_JSON); - importFrom(entityManager, zipFile, "COORD_ACTIONS", CoordinatorActionBean.class, OOZIEDB_CA_JSON); - importFrom(entityManager, zipFile, "BUNDLE_JOBS", BundleJobBean.class, OOZIEDB_BNJ_JSON); - importFrom(entityManager, zipFile, "BUNDLE_ACTIONS", BundleActionBean.class, OOZIEDB_BNA_JSON); - importFrom(entityManager, zipFile, "SLA_REGISTRATION", SLARegistrationBean.class, OOZIEDB_SLAREG_JSON); - importFrom(entityManager, zipFile, "SLA_SUMMARY", SLASummaryBean.class, OOZIEDB_SLASUM_JSON); + final OozieDBImportCLI importer = new OozieDBImportCLI(entityManager, mainZipFile, verbose); + + importer.checkDBVersion(); + + importer.checkTablesArePresentAndEmpty(); + + importer.importOneInputFileToOneEntityTable(WorkflowJobBean.class, OOZIEDB_WF_JSON); + importer.importOneInputFileToOneEntityTable(WorkflowActionBean.class, OOZIEDB_AC_JSON); + importer.importOneInputFileToOneEntityTable(CoordinatorJobBean.class, OOZIEDB_CJ_JSON); + importer.importOneInputFileToOneEntityTable(CoordinatorActionBean.class, OOZIEDB_CA_JSON); + importer.importOneInputFileToOneEntityTable(BundleJobBean.class, OOZIEDB_BNJ_JSON); + importer.importOneInputFileToOneEntityTable(BundleActionBean.class, OOZIEDB_BNA_JSON); + importer.importOneInputFileToOneEntityTable(SLARegistrationBean.class, OOZIEDB_SLAREG_JSON); + importer.importOneInputFileToOneEntityTable(SLASummaryBean.class, OOZIEDB_SLASUM_JSON); + + final boolean cleanupPerformed = importer.cleanupIfNecessary(); + + checkState(!cleanupPerformed, "DB cleanup happened due to skipped rows. " + + "See previous log entries about what rows were skipped and why."); } finally { if (entityManager != null) { entityManager.close(); } - if(zipFile != null){ - zipFile.close(); - } } } - private static void checkDBVersion(EntityManager entityManager, ZipFile zipFile) throws IOException { + private void checkDBVersion() throws IOException { try { - String currentDBVersion = (String) entityManager.createNativeQuery("select data from OOZIE_SYS where name='db.version'").getSingleResult(); + final String currentDBVersion = (String) entityManager + .createNativeQuery("select data from OOZIE_SYS where name='db.version'") + .getSingleResult(); String dumpDBVersion = null; - ZipEntry entry = zipFile.getEntry(OOZIEDB_SYS_INFO_JSON); - BufferedReader reader = new BufferedReader(new InputStreamReader(zipFile.getInputStream(entry), "UTF-8")); - String line; - Gson gson = new Gson(); - while ((line = reader.readLine()) != null) { - List<String> info = gson.fromJson(line, List.class); - if (info.size() > 1 && "db.version".equals(info.get(0))) { - dumpDBVersion = info.get(1); + final ZipEntry sysInfoEntry = mainZipFile.getEntry(OOZIEDB_SYS_INFO_JSON); + + try (BufferedReader reader = new BufferedReader( + new InputStreamReader(mainZipFile.getInputStream(sysInfoEntry), Charsets.UTF_8))) { + String line; + final Gson gson = new Gson(); + while ((line = reader.readLine()) != null) { + final List<String> info = gson.fromJson(line, List.class); + if (info.size() > 1 && "db.version".equals(info.get(0))) { + dumpDBVersion = info.get(1); + } } } - reader.close(); + if (currentDBVersion.equals(dumpDBVersion)) { System.out.println("Loading to Oozie database version " + currentDBVersion); - } else { + } + else { System.err.println("ERROR Oozie database version mismatch."); System.err.println("Oozie DB version:\t" + currentDBVersion); System.err.println("Dump DB version:\t" + dumpDBVersion); System.exit(1); } - }catch (Exception e){ + } catch (final Exception e) { System.err.println(); System.err.println("Error during DB version check: " + e.getMessage()); System.err.println(); - System.err.println("Stack trace for the error was (for debug purposes):"); - System.err.println("--------------------------------------"); - e.printStackTrace(System.err); - System.err.println("--------------------------------------"); - System.err.println(); + + if (verbose) { + System.err.println("Stack trace for the error was (for debug purposes):"); + System.err.println("--------------------------------------"); + e.printStackTrace(System.err); + System.err.println("--------------------------------------"); + System.err.println(); + } } } - private static void importFrom(EntityManager entityManager, ZipFile zipFile, String table, - Class<?> clazz, String fileName) throws JPAExecutorException, IOException { - EntityTransaction transaction = entityManager.getTransaction(); - transaction.begin(); - try { - int size = importFromJSONtoDB(entityManager, zipFile, fileName, clazz); - transaction.commit(); - System.out.println(size + " rows imported to " + table); - } catch (Exception e) { - if (transaction.isActive()) { - transaction.rollback(); + private void checkTablesArePresentAndEmpty() throws SQLException { + checkTableIsPresentAndEmpty(WorkflowJobBean.class); + checkTableIsPresentAndEmpty(WorkflowActionBean.class); + checkTableIsPresentAndEmpty(CoordinatorJobBean.class); + checkTableIsPresentAndEmpty(CoordinatorActionBean.class); + checkTableIsPresentAndEmpty(BundleJobBean.class); + checkTableIsPresentAndEmpty(BundleActionBean.class); + checkTableIsPresentAndEmpty(SLARegistrationBean.class); + checkTableIsPresentAndEmpty(SLASummaryBean.class); + } + + private <E> void checkTableIsPresentAndEmpty(final Class<E> entityClass) throws SQLException { + final OpenJPAEntityManagerSPI entityManagerDelegate = (OpenJPAEntityManagerSPI) entityManager.getDelegate(); + final Connection connection = (Connection) entityManagerDelegate.getConnection(); + final DatabaseMetaData metaData = connection.getMetaData(); + final String tableName = findTableName(entityManager, entityClass); + + try (final ResultSet rs = metaData.getTables(null, null, tableName, null)) { + checkState(rs.next(), + String.format("Table [%s] does not exist for class [%s].", tableName, entityClass.getSimpleName())); + } + + final long entityCount = getEntityCount(entityClass); + + checkState(entityCount == 0, + String.format("There are already [%d] entries in table [%s] for class [%s], should be empty.", + entityCount, + tableName, + entityClass.getSimpleName())); + } + + private <E> long getEntityCount(final Class<E> entityClass) { + return entityManager.createQuery( + String.format("SELECT COUNT(e) FROM %s e", entityClass.getSimpleName()), Long.class) + .getSingleResult(); + } + + /** + * Import all the contents of the input JSON file to one database table where the {@link javax.persistence.Entity} instances are + * stored. This call hides batch {@link EntityTransaction} handling details, as well as trying to commit pending entities + * one-by-one, if needed. + * @param entityClass the class to persist + * @param importFileName the JSON file name + * @param <E> {@link javax.persistence.Entity} type + * @throws JPAExecutorException + */ + private <E> void importOneInputFileToOneEntityTable(final Class<E> entityClass, final String importFileName) { + final BatchTransactionHandler<E> batchTransactionHandler = new BatchTransactionHandler<>(); + final BatchEntityPersister<E> batchEntityPersister = new BatchEntityPersister<>(entityClass, + importFileName, batchTransactionHandler); + + final List<E> batch = Lists.newArrayList(); + final Gson gson = new Gson(); + final ZipEntry importEntry = mainZipFile.getEntry(importFileName); + + if (importEntry != null) { + long lineIndex = 1L; + try (BufferedReader reader = new BufferedReader( + new InputStreamReader(mainZipFile.getInputStream(importEntry), Charsets.UTF_8))) { + String line; + while ((line = reader.readLine()) != null) { + final E newEntity = gson.fromJson(line, entityClass); + batch.add(newEntity); + + if (lineIndex % IMPORT_BATCH_SIZE == 0) { + System.out.println(String.format("Batch is full, persisting. [lineIndex=%s;batch.size=%s]", + lineIndex, batch.size())); + batchEntityPersister.persist(batch); + } + + lineIndex++; + } + } catch (final IOException e) { + rollbackAndThrow(importFileName, batchTransactionHandler, e); + } catch (final JsonSyntaxException e) { + if (verbose) { + System.err.println(String.format("JSON error. [lineIndex=%s;e.message=%s]", lineIndex, e.getMessage())); + } + rollbackAndThrow(importFileName, batchTransactionHandler, e); } - throw new RuntimeException("Import failed to table " + table + ".", e); + } + + if (!batch.isEmpty()) { + System.out.println(String.format("Persisting last batch. [batch.size=%s]", batch.size())); + batchEntityPersister.persist(batch); + } + + final String tableName = findTableName(entityManager, entityClass); + System.out.println(String.format("%s row(s) imported to table %s.", + batchTransactionHandler.getTotalPersistedCount(), + tableName)); + + if (batchTransactionHandler.getTotalSkippedCount() > 0) { + System.err.println( + String.format("[%s] row(s) skipped while importing to table [%s]. " + + "Will remove all the rows of all the tables to get clean data.", + batchTransactionHandler.getTotalSkippedCount(), + tableName)); + + cleanupNecessary = true; } } - private static <E> int importFromJSONtoDB(EntityManager entityManager, ZipFile zipFile, String filename, Class<E> clazz) - throws JPAExecutorException, IOException { - int wfjSize = 0; - Gson gson = new Gson(); - ZipEntry entry = zipFile.getEntry(filename); - if (entry != null) { - BufferedReader reader = new BufferedReader(new InputStreamReader(zipFile.getInputStream(entry), "UTF-8")); - String line; - while ((line = reader.readLine()) != null) { - E workflow = gson.fromJson(line, clazz); - entityManager.persist(workflow); - wfjSize++; - } - reader.close(); - } - return wfjSize; + private boolean cleanupIfNecessary() { + if (!cleanupNecessary) { + System.out.println("Cleanup not necessary, no entities skipped."); + + return false; + } + + System.out.println(String.format("Performing cleanup of [%d] tables due to skipped entities.", entityClasses.size())); + + for (final Class<?> entityClass : entityClasses) { + final String tableName = findTableName(entityManager, entityClass); + System.out.println(String.format("Cleaning up table [%s].", tableName)); + + final BatchTransactionHandler<?> batchTransactionHandler = new BatchTransactionHandler<>(); + + batchTransactionHandler.begin(); + + entityManager.createQuery(String.format("DELETE FROM %s e", entityClass.getSimpleName())).executeUpdate(); + + batchTransactionHandler.commit(); + + System.out.println(String.format("Table [%s] cleaned up.", tableName)); + } + + System.out.println(String.format("Cleanup of [%d] tables due to skipped entities performed.", entityClasses.size())); + + return true; + } + + private <E> void rollbackAndThrow(final String importFileName, + final BatchTransactionHandler<E> batchTransactionHandler, + final Exception cause) { + batchTransactionHandler.rollbackIfActive(); + + throw new RuntimeException(String.format("Import failed from json [zippedFileName=%s;e.message=%s].", importFileName, + cause.getMessage()), cause); + } + + static <E> String findTableName(final EntityManager entityManager, final Class<E> entityClass) { + final Metamodel meta = entityManager.getMetamodel(); + final EntityType<E> entityType = meta.entity(entityClass); + + final Table t = entityClass.getAnnotation(Table.class); + + final String tableName = (t == null) + ? entityType.getName().toUpperCase() + : t.name(); + + return tableName; + } + + /** + * Handles batch transactions, that is, the actual commit will be done when the number of persistable entities reach the batch + * limit. This was needed because importing everything in a huge {@link EntityTransaction} (and holding in + * {@link EntityManager} heap) has resulted in {@link OutOfMemoryError} for large input JSON files. + * <p/> + * When there is some problem while persisting one of them, usually it's an issue that + * gets revealed when we're about to call {@link EntityTransaction#commit()}. If this call fails, the caller can get all the + * pending {@link javax.persistence.Entity} instances that have not been persisted successfully, and make some kind of retry + * using a new {@link BatchTransactionHandler} instance. + * + * @param <E> the {@link javax.persistence.Entity} class + */ + private class BatchTransactionHandler<E> { + + private EntityTransaction currentTransaction; + private int totalPersistedCount = 0; + private int totalSkippedCount = 0; + private List<E> pendingEntities = Lists.newArrayList(); + + /** + * Begin recording the {@link EntityTransaction} + */ + void begin() { + currentTransaction = entityManager.getTransaction(); + currentTransaction.begin(); + + pendingEntities.clear(); + } + + /** + * Commit the {@link EntityTransaction} + */ + void commit() { + checkNotNull(currentTransaction, "TX should be open."); + + currentTransaction.commit(); + + totalPersistedCount += pendingEntities.size(); + pendingEntities.clear(); + } + + /** + * Rollback if {@link EntityTransaction} is active + */ + void rollbackIfActive() { + if (currentTransaction == null) { + return; + } + + if (currentTransaction.isActive()) { + currentTransaction.rollback(); + } + + pendingEntities.clear(); + } + + /** + * Persist a new {@link javax.persistence.Entity} instance + * @param newEntity the new {@link javax.persistence.Entity} instance + */ + void persist(final E newEntity) { + checkNotNull(currentTransaction, "TX should be open."); + + entityManager.persist(newEntity); + pendingEntities.add(newEntity); + + if (pendingEntities.size() == IMPORT_BATCH_SIZE) { + commit(); + begin(); + } + } + + /** + * Persist and try to commit a pending {@link javax.persistence.Entity} instance, that is, one that was part of a failing + * {@link EntityTransaction#commit()} call + * @param pendingEntity the pending {@link javax.persistence.Entity} instance + */ + void persistAndTryCommit(final E pendingEntity) { + try { + currentTransaction.begin(); + entityManager.persist(pendingEntity); + currentTransaction.commit(); + + totalPersistedCount++; + } catch (final RollbackException re) { + if (verbose) { + System.err.println(String.format("Cannot persist entity, skipping. [re.failedObject=%s]", + re.getFailedObject())); + } + + totalSkippedCount++; + } + } + + /** + * Number of persisted {@link javax.persistence.Entity} instances + * @return how many {@link javax.persistence.Entity}es have already been persisted by this {@link BatchTransactionHandler} + */ + int getTotalPersistedCount() { + return totalPersistedCount; + } + + /** + * Number of skipped {@link javax.persistence.Entity} instances + * @return how many {@link javax.persistence.Entity}es have already been skipped by this {@link BatchTransactionHandler} + */ + int getTotalSkippedCount() { + return totalSkippedCount; + } + + /** + * All the pending {@link javax.persistence.Entity} instance that have been tried to {@link EntityManager#persist(Object)} + * but have not yet been {@link EntityTransaction#commit()}ed. + * @return how many {@link javax.persistence.Entity}es have not been committed by this {@link BatchTransactionHandler} + */ + List<E> getPendingEntities() { + return pendingEntities; + } + } + + /** + * Persists entities in batches. Delegates to {@link BatchTransactionHandler} methods. + * <p/> + * As entities are being persisted, the backing {@code List} is also being emptied. This is to relieve GC cycles when batch + * size is such that entities fitting into one batch would cause {@link OutOfMemoryError}. + * @param <E> + */ + private class BatchEntityPersister<E> { + + private final Class<E> entityClass; + private final String importFileName; + private final BatchTransactionHandler<E> batchTransactionHandler; + + private BatchEntityPersister(final Class<E> entityClass, + final String importFileName, + final BatchTransactionHandler<E> batchTransactionHandler) { + this.entityClass = entityClass; + this.importFileName = importFileName; + this.batchTransactionHandler = batchTransactionHandler; + } + + void persist(final List<E> batch) { + if (batch.isEmpty()) { + System.out.println("No entities to import."); + return; + } + + while (!batch.isEmpty()) { + try { + entityClasses.add(entityClass); + + batchTransactionHandler.begin(); + + final ListIterator<E> iterator = batch.listIterator(); + + while (iterator.hasNext()) { + final E entityToPersist = iterator.next(); + iterator.remove(); + batchTransactionHandler.persist(entityToPersist); + } + + batchTransactionHandler.commit(); + } catch (final RollbackException re) { + for (final E pendingEntity : batchTransactionHandler.getPendingEntities()) { + batchTransactionHandler.persistAndTryCommit(pendingEntity); + } + } catch (final Exception e) { + rollbackAndThrow(importFileName, batchTransactionHandler, e); + } + } + } } } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/oozie/blob/ba5c3c90/tools/src/test/java/org/apache/oozie/tools/TestDBLoadDump.java ---------------------------------------------------------------------- diff --git a/tools/src/test/java/org/apache/oozie/tools/TestDBLoadDump.java b/tools/src/test/java/org/apache/oozie/tools/TestDBLoadDump.java index c43223e..7777d08 100644 --- a/tools/src/test/java/org/apache/oozie/tools/TestDBLoadDump.java +++ b/tools/src/test/java/org/apache/oozie/tools/TestDBLoadDump.java @@ -17,99 +17,291 @@ */ package org.apache.oozie.tools; -import org.apache.oozie.WorkflowJobBean; +import org.apache.commons.cli.ParseException; +import org.apache.oozie.*; +import org.apache.oozie.service.ConfigurationService; import org.apache.oozie.service.JPAService; import org.apache.oozie.service.ServiceException; import org.apache.oozie.service.Services; +import org.apache.oozie.sla.SLARegistrationBean; +import org.apache.oozie.sla.SLASummaryBean; import org.apache.oozie.test.XTestCase; import org.apache.oozie.util.IOUtils; -import org.junit.AfterClass; -import org.junit.BeforeClass; +import org.junit.After; +import org.junit.Before; import org.junit.Test; import javax.persistence.EntityManager; import javax.persistence.EntityTransaction; import javax.persistence.Query; +import javax.persistence.TypedQuery; import java.io.BufferedReader; import java.io.File; import java.io.FileOutputStream; +import java.io.IOException; import java.io.InputStreamReader; +import java.security.Permission; import java.util.List; import java.util.zip.ZipFile; import java.util.zip.ZipOutputStream; +import static org.apache.oozie.tools.OozieDBImportCLI.DEFAULT_BATCH_SIZE; +import static org.apache.oozie.tools.OozieDBImportCLI.OOZIE_DB_IMPORT_BATCH_SIZE_KEY; + /** * Test Dump and dump reading mechanism */ public class TestDBLoadDump extends XTestCase { - File zipDump; + private File validZipDump; + private File invalidZipDump; - private EntityManager getEntityManager() throws ServiceException { - Services services = Services.get(); - if(services == null){ - Services s = new Services(); - s.init(); - services = Services.get(); - } - return services.get(JPAService.class).getEntityManager(); - } - @BeforeClass + @Before protected void setUp() throws Exception { System.getProperties().remove("oozie.test.config.file"); + super.setUp(); - zipDump = new File(getTestCaseDir() + System.getProperty("file.separator") + "dumpTest.zip"); - ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(zipDump)); - zos.setLevel(1); - File dumpFolder = new File(getClass().getResource("/dumpData").getPath()); - IOUtils.zipDir(dumpFolder, "", zos); + validZipDump = zipDump("/dumpData/valid", "validZipDumpTest.zip"); + invalidZipDump = zipDump("/dumpData/invalid", "invalidZipDumpTest.zip"); + + setSqlStrictEnforce(getEntityManager()); createOozieSysTable(getEntityManager()); + + System.setSecurityManager(new NoExitSecurityManager()); } - @AfterClass + @After protected void tearDown() throws Exception { - dropOozieSysTable(getEntityManager()); + System.setSecurityManager(null); + + dropTable(getEntityManager(), "OOZIE_SYS"); + super.tearDown(); } @Test - public void testLoadDump() throws Exception { - OozieDBImportCLI.main(new String[]{"import", zipDump.getAbsolutePath()}); - EntityManager entityManager = getEntityManager(); - Query q = entityManager.createNamedQuery("GET_WORKFLOWS"); - List<WorkflowJobBean> wfjBeans = q.getResultList(); - int wfjSize = wfjBeans.size(); + public void testImportedDBIsExportedCorrectly() throws Exception { + importValidDataToDB(); + + final EntityManager entityManager = getEntityManager(); + final TypedQuery<WorkflowJobBean> q = entityManager.createNamedQuery("GET_WORKFLOWS", WorkflowJobBean.class); + final List<WorkflowJobBean> wfjBeans = q.getResultList(); + final int wfjSize = wfjBeans.size(); assertEquals(1, wfjSize); assertEquals("0000003-160720041037822-oozie-oozi-W", wfjBeans.get(0).getId()); assertEquals("aggregator-wf", wfjBeans.get(0).getAppName()); - File newZipDump = new File(getTestCaseDir() + System.getProperty("file.separator") + "newDumpTest.zip"); - //export the contents of the database - OozieDBExportCLI.main(new String[]{"export", newZipDump.getAbsolutePath()}); - assertEquals(zipDump.length(), newZipDump.length()); - ZipFile zip = new ZipFile(newZipDump); - // check that dump is identical with the original input - BufferedReader reader = new BufferedReader(new InputStreamReader( + final File newZipDump = new File(getTestCaseDir() + System.getProperty("file.separator") + "newDumpTest.zip"); + + exportFromDB(newZipDump); + + assertEquals(validZipDump.length(), newZipDump.length()); + final ZipFile zip = new ZipFile(newZipDump); + final BufferedReader reader = new BufferedReader(new InputStreamReader( zip.getInputStream(zip.getEntry("ooziedb_wf.json")))); assertTrue(reader.readLine().contains("0000003-160720041037822-oozie-oozi-W")); + } + + @Test + public void testImportToNonEmptyTablesCausesPrematureExit() throws Exception { + importValidDataToDB(); + + assertEquals("One WorkflowJobBean should be inserted.", 1L, getCount(WorkflowJobBean.class)); + assertEquals("Three WorkflowActionBeans should be inserted.", 3L, getCount(WorkflowActionBean.class)); + assertEquals("Three CoordinatorActionBeans should be inserted.", 3L, getCount(CoordinatorActionBean.class)); + assertEquals("Three CoordinatorJobBeans should be inserted.", 3L, getCount(CoordinatorJobBean.class)); + + assertEquals("The only WorkflowActionBean should have the right appPath.", + getFieldValue("executionPath", "0000003-160720041037822-oozie-oozi-W@aggregator").toString(), "/"); + + tryImportAndCheckPrematureExit(true); + } + + @Test + public void testImportToNonExistingTablesSucceedsOnHsqldb() throws Exception { + dropTable(getEntityManager(), OozieDBImportCLI.findTableName(getEntityManager(), WorkflowJobBean.class)); + dropTable(getEntityManager(), OozieDBImportCLI.findTableName(getEntityManager(), WorkflowActionBean.class)); + dropTable(getEntityManager(), OozieDBImportCLI.findTableName(getEntityManager(), CoordinatorJobBean.class)); + dropTable(getEntityManager(), OozieDBImportCLI.findTableName(getEntityManager(), CoordinatorActionBean.class)); + dropTable(getEntityManager(), OozieDBImportCLI.findTableName(getEntityManager(), BundleJobBean.class)); + dropTable(getEntityManager(), OozieDBImportCLI.findTableName(getEntityManager(), BundleActionBean.class)); + dropTable(getEntityManager(), OozieDBImportCLI.findTableName(getEntityManager(), SLARegistrationBean.class)); + dropTable(getEntityManager(), OozieDBImportCLI.findTableName(getEntityManager(), SLASummaryBean.class)); + + importValidDataToDB(); + } + + @Test + public void testImportInvalidDataLeavesTablesEmpty() throws Exception { + tryImportAndCheckPrematureExit(false); + + assertTableEmpty(WorkflowJobBean.class); + assertTableEmpty(WorkflowActionBean.class); + assertTableEmpty(CoordinatorJobBean.class); + assertTableEmpty(CoordinatorActionBean.class); + assertTableEmpty(BundleJobBean.class); + assertTableEmpty(BundleActionBean.class); + assertTableEmpty(SLARegistrationBean.class); + assertTableEmpty(SLASummaryBean.class); + } + + @Test + public void testImportTablesOverflowBatchSize() throws Exception { + System.setProperty(OOZIE_DB_IMPORT_BATCH_SIZE_KEY, "2"); + + testImportedDBIsExportedCorrectly(); + + System.setProperty(OOZIE_DB_IMPORT_BATCH_SIZE_KEY, Integer.toString(DEFAULT_BATCH_SIZE)); + } + + private EntityManager getEntityManager() throws ServiceException { + Services services = Services.get(); + + if (services == null){ + final Services s = new Services(); + s.init(); + services = Services.get(); + } + + return services.get(JPAService.class).getEntityManager(); + } + + /** + * To enforce length checks for {@link String} fields while trying to perform to persist invalid {@link WorkflowActionBean} + * instances as part of {@link #testImportInvalidDataLeavesTablesEmpty()}, we have to issue an SQL command to HSQLDB like this: + * <tt>SET PROPERTY "sql.enforce_strict_size" TRUE;</tt> + * as part of the current {@link EntityTransaction}. Please see the + * {@linkplain http://hsqldb.org/doc/guide/ch04.html HSQLDB docs} for details. + * + * @param entityManager + */ + private void setSqlStrictEnforce(final EntityManager entityManager) { + final String sqlStrictEnforce = "SET PROPERTY \"sql.enforce_strict_size\" TRUE"; + + final EntityTransaction tx = entityManager.getTransaction(); + tx.begin(); + + entityManager.createNativeQuery(sqlStrictEnforce).executeUpdate(); + tx.commit(); } - private void createOozieSysTable(EntityManager entityManager) throws Exception { - String createDB = "create table OOZIE_SYS (name varchar(100), data varchar(100))"; - String insertDbVerion = "insert into OOZIE_SYS (name, data) values ('db.version', '3')"; - EntityTransaction t = entityManager.getTransaction(); - t.begin(); + private File zipDump(final String dumpFolderPath, final String zipDumpFileName) throws IOException { + final File zipDump = new File(getTestCaseDir() + File.separator + zipDumpFileName); + + try (ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(zipDump))) { + zos.setLevel(1); + final File dumpFolder = new File(getClass().getResource(dumpFolderPath).getPath()); + + IOUtils.zipDir(dumpFolder, "", zos); + } + + return zipDump; + } + + private void createOozieSysTable(final EntityManager entityManager) throws Exception { + final String createDB = "create table OOZIE_SYS (name varchar(100), data varchar(100))"; + final String insertDBVersion = "insert into OOZIE_SYS (name, data) values ('db.version', '3')"; + + final EntityTransaction tx = entityManager.getTransaction(); + tx.begin(); + entityManager.createNativeQuery(createDB).executeUpdate(); - entityManager.createNativeQuery(insertDbVerion).executeUpdate(); - t.commit(); + + entityManager.createNativeQuery(insertDBVersion).executeUpdate(); + + tx.commit(); + } + + private void dropTable(final EntityManager entityManager, final String tableName) throws ServiceException { + final String dropTableStmt = String.format("DROP TABLE %s CASCADE", tableName); + + final EntityTransaction tx = entityManager.getTransaction(); + + tx.begin(); + + entityManager.createNativeQuery(dropTableStmt).executeUpdate(); + + tx.commit(); + } + + private void importValidDataToDB() throws ParseException { + importToDB(validZipDump); + } + + private void importInvalidDataToDB() throws ParseException { + importToDB(invalidZipDump); + } + + private void importToDB(final File zipDump) throws ParseException { + OozieDBImportCLI.main(new String[]{"import", "--verbose", zipDump.getAbsolutePath()}); + } + + private void exportFromDB(final File zipDump) { + OozieDBExportCLI.main(new String[]{"export", zipDump.getAbsolutePath()}); } - private void dropOozieSysTable(EntityManager entityManager) { - String dropDB = "drop table OOZIE_SYS"; - EntityTransaction t = entityManager.getTransaction(); - t.begin(); - entityManager.createNativeQuery(dropDB).executeUpdate(); - t.commit(); + private long getCount(final Class<?> entityClass) throws ServiceException { + return Long.valueOf(getEntityManager() + .createQuery(String.format("SELECT COUNT(e) FROM %s e", entityClass.getSimpleName())) + .getSingleResult() + .toString()); } + + private Object getFieldValue(final String fieldName, final String id) + throws ServiceException { + final Query fieldValueQuery = getEntityManager().createQuery( + String.format("SELECT e.%s FROM %s e WHERE e.id = '%s'", fieldName, WorkflowActionBean.class.getSimpleName(), id)); + return fieldValueQuery.getSingleResult(); + } + + private void tryImportAndCheckPrematureExit(final boolean validData) throws ParseException { + boolean prematureExit = false; + + try { + if (validData) { + importValidDataToDB(); + } else { + importInvalidDataToDB(); + } + } catch (final ExitException e) { + prematureExit = (e.status == 1); + } + + assertTrue("import should have been ended prematurely", prematureExit); + } + + private void assertTableEmpty(final Class<?> entityClass) throws ServiceException { + assertEquals(String.format("[%s] table is empty", OozieDBImportCLI.findTableName(getEntityManager(), entityClass)), + 0, + getCount(entityClass)); + } + + private static class ExitException extends SecurityException { + private final int status; + + ExitException(final int status) { + this.status = status; + } + } + + private static class NoExitSecurityManager extends SecurityManager { + + @Override + public void checkPermission(final Permission perm) { + + } + + @Override + public void checkPermission(final Permission perm, final Object context) { + + } + + @Override + public void checkExit(final int status) { + super.checkExit(status); + throw new ExitException(status); + } + } + } http://git-wip-us.apache.org/repos/asf/oozie/blob/ba5c3c90/tools/src/test/resources/dumpData/invalid/ooziedb_ac.json ---------------------------------------------------------------------- diff --git a/tools/src/test/resources/dumpData/invalid/ooziedb_ac.json b/tools/src/test/resources/dumpData/invalid/ooziedb_ac.json new file mode 100644 index 0000000..ffc35a9 --- /dev/null +++ b/tools/src/test/resources/dumpData/invalid/ooziedb_ac.json @@ -0,0 +1,3 @@ +{"id":"0000003-160720041037822-oozie-oozi-W@:start:","wfId":"0000003-160720041037822-oozie-oozi-W","createdTimeTS":"Jul 20, 2016 4:35:55 AM","statusStr":"OK","lastCheckTimestamp":"Jul 20, 2016 4:35:55 AM","endTimestamp":"Jul 20, 2016 4:35:55 AM","startTimestamp":"Jul 20, 2016 4:35:55 AM","executionPath":"/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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,"userRetryCount":0,"userRetryMax":0,"userRetryInterval":10,"transition":"aggregator","externalId":"-","externalStatus":"OK","trackerUri":"-","consoleUrl":"-"} +{"id":"0000003-160720041037822-oozie-oozi-W@aggregator","wfId":"0000003-160720041037822-oozie-oozi-W","createdTimeTS":"Jul 20, 2016 4:35:55 AM","statusStr":"OK","lastCheckTimestamp":"Jul 20, 2016 4:36:59 AM","endTimestamp":"Jul 20, 2016 4:36:59 AM","startTimestamp":"Jul 20, 2016 4:35:55 AM","executionPath":"/","pending":0,"signalValue":"OK","logToken":"","name":"aggregator","cred":"null","type":"map-reduce","conf":{"rawBlob":[79,66,74,0,0,0,1,0,0,0,1,0,5,99,111,100,101,99,0,2,103,122,31,-117,8,0,0,0,0,0,0,0,-19,86,-37,-114,-101,48,16,125,-81,-44,127,64,60,23,27,72,-38,110,17,-53,23,-76,47,-19,23,-52,-102,-127,-80,1,-20,-114,-19,100,-45,-81,-81,-63,36,-39,110,55,-22,-46,77,-77,-86,90,9,-55,55,-104,57,103,-50,65,-29,-68,3,21,17,-106,86,96,112,-41,-75,-67,-66,14,45,53,-103,-108,-33,26,-52,-74,-110,-42,85,43,-73,89,-52,-46,-80,120,-3,42,8,-14,91,121,19,25,2,-79,70,42,64,-125,-34,0,53,-111,-24,-94,-124,109,-108,96,-94,-107,-74,68,2,38,100,-105,93,-59,-117,52,-25,-9,63,24,35,-12,-48,97,-4 4,-53,18,-117,85,89,-23,-116,-13,95,-122,73,-29,-100,31,-65,26,-125,40,66,5,-28,23,110,89,98,-117,6,3,5,102,117,29,62,61,44,-73,26,-119,-21,-99,54,-88,13,31,57,-77,100,-7,-18,67,-100,44,-46,-9,-55,114,-15,-106,-29,29,116,-86,69,-51,-91,53,-54,-102,-88,4,3,28,-22,-102,-80,6,35,-23,48,-59,-14,-93,-84,53,79,-29,36,-26,113,-30,-97,48,-32,30,44,-65,-113,54,23,-78,-81,-102,-38,18,-104,70,-10,123,2,-118,-92,66,50,-69,-67,6,-31,116,48,-43,-85,112,42,57,-111,88,-45,59,16,-84,108,-56,23,-28,-8,-46,6,90,59,-89,-96,51,-104,-113,57,61,113,-126,-19,-49,52,-7,50,126,-13,50,-119,-45,-105,74,28,59,67,-6,-118,31,4,-48,-46,-110,-64,-62,-23,88,19,116,78,91,1,109,-69,-53,-7,-76,63,-55,-52,-9,58,-49,-45,-35,-3,-100,-109,-12,85,-45,-30,56,-85,36,-71,44,126,-9,-65,31,-2,49,63,48,55,-72,-41,28,41,-48,-6,113,-23,37,-43,12,20,-120,21,50,-49,109,98,-61,-66,-116,-61,-89,49,-64,-123,81,123,39,63,7,-10,103,31,-31,-14,127,-97,-21,98,-20,-85,69,-117,-61,-2,-29,-48,75,-84,-64,-74,-26,20,-74,27,20,-32,44,23,76,-75,56 ,4,100,67,-84,-96,-47,65,-119,-18,64,12,-83,-28,92,-11,-2,49,-57,12,-44,-49,-15,37,51,-96,-41,39,-44,77,-50,-108,-58,55,-29,11,-9,-63,-33,-72,1,-100,-121,-18,-34,127,110,-11,-76,-70,-98,52,-35,65,-98,63,-30,-73,1,-25,-92,-52,-48,-90,-4,116,-22,83,126,-15,-105,9,118,-78,-114,71,-1,-51,41,100,-50,31,94,-3,114,126,-68,125,23,-33,1,-57,-83,3,74,-118,11,0,0]},"retries":0,"userRetryCount":0,"userRetryMax":0,"userRetryInterval":10,"transition":"end","externalChildIDs":{"rawBlob":[79,66,74,0,0,0,1,0,0,0,1,0,5,99,111,100,101,99,0,2,103,122,31,-117,8,0,0,0,0,0,0,0,-53,-54,79,-118,55,52,49,-77,52,48,48,-78,52,50,48,-78,48,-113,55,0,50,1,16,-57,-3,29,22,0,0,0]},"externalId":"job_1469002920287_0001","externalStatus":"SUCCEEDED","trackerUri":"asasvari-cm-1.vpc.cloudera.com:8032","consoleUrl":"http://asasvari-cm-1.vpc.cloudera.com:8088/proxy/application_1469002920287_0001/"} +{"id":"0000003-160720041037822-oozie-oozi-W@end","wfId":"0000003-160720041037822-oozie-oozi-W","createdTimeTS":"Jul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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","pending":0,"signalValue":"OK","logToken":"","name":"end","cred":"null","type":":END:","conf":{"rawBlob":[79,66,74,0,0,0,1,0,0,0,1,0,5,99,111,100,101,99,0,2,103,122,31,-117,8,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0]},"retries":0,"userRetryCount":0,"userRetryMax":0,"userRetryInterval":10,"externalId":"-","externalStatus":"OK","trackerUri":"-","consoleUrl":"-"} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/oozie/blob/ba5c3c90/tools/src/test/resources/dumpData/invalid/ooziedb_bna.json ---------------------------------------------------------------------- diff --git a/tools/src/test/resources/dumpData/invalid/ooziedb_bna.json b/tools/src/test/resources/dumpData/invalid/ooziedb_bna.json new file mode 100644 index 0000000..e69de29 http://git-wip-us.apache.org/repos/asf/oozie/blob/ba5c3c90/tools/src/test/resources/dumpData/invalid/ooziedb_bnj.json ---------------------------------------------------------------------- diff --git a/tools/src/test/resources/dumpData/invalid/ooziedb_bnj.json b/tools/src/test/resources/dumpData/invalid/ooziedb_bnj.json new file mode 100644 index 0000000..e69de29 http://git-wip-us.apache.org/repos/asf/oozie/blob/ba5c3c90/tools/src/test/resources/dumpData/invalid/ooziedb_ca.json ---------------------------------------------------------------------- diff --git a/tools/src/test/resources/dumpData/invalid/ooziedb_ca.json b/tools/src/test/resources/dumpData/invalid/ooziedb_ca.json new file mode 100644 index 0000000..f465b73 --- /dev/null +++ b/tools/src/test/resources/dumpData/invalid/ooziedb_ca.json @@ -0,0 +1,3 @@ +{"id":"0000000-160720041037822-oozie-oozi-C@1","jobId":"0000000-160720041037822-oozie-oozi-C","statusStr":"WAITING", "nominalTimestamp":"Nov 4, 12012 7:00:00 PM","lastModifiedTimestamp":"Jul 20, 2016 4:38:04 AM","createdTimestamp":"Jul 20, 2016 4:15:02 AM","pending":0,"actionNumber":1,"createdConf":{"rawBlob":[79,66,74,0,0,0,1,0,0,0,1,0,5,99,111,100,101,99,0,2,103,122,31,-117,8,0,0,0,0,0,0,0,-75,-108,-55,110,-125,48,16,-122,-17,-107,-6,14,121,1,-68,0,-23,18,-95,60,66,14,85,78,-67,77,-19,-127,-72,5,-58,-11,66,-109,62,125,-127,-92,-121,72,52,41,-121,92,70,-29,-19,-5,-1,-15,88,46,20,-75,-91,-87,-94,-125,96,-88,93,-33,-33,45,22,-123,117,100,-47,-123,-61,56,-22,-57,45,52,-72,-58,61,52,-74,70,-1,66,20,10,62,78,-99,-106,59,-88,35,-82,-119,-66,13,50,-103,63,60,11,-103,-91,-113,50,-49,-106,-4,-9,76,-63,-113,123,70,58,63,-61,79,-117,29,97,-118,-56,105,6,-42,-42,70,-115,-10,-104,-123,-80,-101,18,-33,-23,-46,-81,56,7,15,-66,3,103,18,-43,36,-110,117,86,49,85,83,-44,-24,-96,103,53,-85,39,-111,10, 30,61,58,-18,15,62,-96,15,-4,-110,105,-34,11,-9,-95,-86,28,86,16,-56,-15,-47,-114,105,-121,60,-7,50,97,-105,80,89,122,12,108,-33,-44,-77,11,28,92,-80,33,-101,-86,-26,-28,110,54,-44,7,112,-109,-67,73,-123,76,19,41,19,-79,-36,-118,108,37,-60,-21,108,116,3,-42,-95,-114,10,-39,59,-67,-79,-101,-72,-1,-116,24,113,-13,7,84,99,9,-79,-98,15,29,-62,-122,-12,36,-13,-1,-113,102,-74,108,127,73,91,7,-22,3,-35,-108,-16,85,-59,44,-99,-83,-120,-83,-66,-42,-7,-4,98,-25,11,126,-2,19,-4,0,-24,79,-11,-124,25,4,0,0]},"timeOut":120,"runConf":{"rawBlob":[79,66,74,0,0,0,1,0,0,0,1,0,5,99,111,100,101,99,0,2,103,122,31,-117,8,0,0,0,0,0,0,0,-75,-108,-55,110,-125,48,16,-122,-17,-107,-6,14,121,1,-68,0,-23,18,-95,60,66,14,85,78,-67,77,-19,-127,-72,5,-58,-11,66,-109,62,125,-127,-92,-121,72,52,41,-121,92,70,-29,-19,-5,-1,-15,88,46,20,-75,-91,-87,-94,-125,96,-88,93,-33,-33,45,22,-123,117,100,-47,-123,-61,56,-22,-57,45,52,-72,-58,61,52,-74,70,-1,66,20,10,62,78,-99,-106,59,-88,35,-82,-119,-66,13,50,-103,63,60,11,-103,- 91,-113,50,-49,-106,-4,-9,76,-63,-113,123,70,58,63,-61,79,-117,29,97,-118,-56,105,6,-42,-42,70,-115,-10,-104,-123,-80,-101,18,-33,-23,-46,-81,56,7,15,-66,3,103,18,-43,36,-110,117,86,49,85,83,-44,-24,-96,103,53,-85,39,-111,10,30,61,58,-18,15,62,-96,15,-4,-110,105,-34,11,-9,-95,-86,28,86,16,-56,-15,-47,-114,105,-121,60,-7,50,97,-105,80,89,122,12,108,-33,-44,-77,11,28,92,-80,33,-101,-86,-26,-28,110,54,-44,7,112,-109,-67,73,-123,76,19,41,19,-79,-36,-118,108,37,-60,-21,108,116,3,-42,-95,-114,10,-39,59,-67,-79,-101,-72,-1,-116,24,113,-13,7,84,99,9,-79,-98,15,29,-62,-122,-12,36,-13,-1,-113,102,-74,108,127,73,91,7,-22,3,-35,-108,-16,85,-59,44,-99,-83,-120,-83,-66,-42,-7,-4,98,-25,11,126,-2,19,-4,0,-24,79,-11,-124,25,4,0,0]},"actionXml":{"rawBlob":[79,66,74,0,0,0,1,0,0,0,1,0,5,99,111,100,101,99,0,2,103,122,31,-117,8,0,0,0,0,0,0,0,-59,90,93,79,-37,48,20,125,-97,-76,-1,80,101,72,-80,7,-41,-41,105,-53,71,-107,86,-86,4,18,-109,-96,72,83,121,-128,23,100,82,-73,100,36,118,-26,56,124,-118,-1,62,-57 ,73,-45,-16,-43,-63,-60,-72,47,77,-29,94,-33,-29,115,125,93,29,-27,36,8,-107,-46,-45,72,114,-93,52,-31,105,-38,-70,73,98,-103,13,-68,92,71,125,-91,-18,34,-47,111,4,-12,-95,-19,123,45,-55,19,49,-16,-8,124,-82,-59,-36,77,115,17,-28,58,50,23,68,-51,102,-103,48,54,104,-90,-59,-17,92,-56,-16,118,-32,49,-81,101,-94,68,-36,41,105,-89,-115,18,-95,-93,-112,-45,3,-107,-99,-115,-28,92,-60,34,43,-125,-49,-118,-104,92,70,102,-32,-19,-114,78,-68,-106,-112,-45,51,53,59,-101,-26,-102,-101,72,-55,-127,55,62,26,-17,121,-83,72,102,-122,-53,80,16,-103,39,-25,66,-69,-20,60,44,34,-120,84,-119,93,102,76,-118,68,3,-49,7,-26,19,-58,8,-12,38,-48,-23,3,-100,-42,113,-10,-110,55,-61,54,9,108,17,31,38,-116,-11,89,-17,-44,27,126,-3,-46,106,5,-95,-110,70,-85,56,115,119,-27,125,-104,107,93,48,26,-78,-128,54,111,93,60,125,52,33,-120,100,-102,27,34,-82,-124,52,117,-118,41,55,-100,68,-78,-86,-97,-117,-16,90,-59,-96,-83,-40,-64,-45,-4,-102,-60,106,-98,121,85,-72,-99,96,-9,32,27,94,76,103,89,-97,82,-98,-15,-20,-118,-21, -120,-124,9,97,-19,-85,52,108,-121,-79,-54,-89,66,-13,118,-88,-110,-2,54,-8,64,-13,76,104,-102,-35,102,70,100,-122,-70,-51,107,-77,-18,-26,14,-80,-114,-65,-59,-70,-99,30,21,55,60,73,109,-59,105,-71,-68,2,-101,90,-36,3,11,-21,-45,-94,96,-108,49,10,61,10,29,10,-16,13,5,-39,-89,29,52,100,44,-50,12,-115,51,67,-29,12,104,-100,1,-121,115,-105,-6,29,28,-50,14,25,-117,51,-46,121,118,-56,88,-100,-111,-50,-77,67,-58,-30,-116,116,-98,29,50,18,103,-74,-125,-59,-39,34,99,113,-34,70,-29,-68,-115,-58,121,11,-115,-13,22,26,-25,77,52,-50,-101,104,-100,123,104,-100,123,104,-100,-69,104,-100,-69,104,-100,-47,116,24,67,-45,97,12,77,-121,49,52,29,-58,-48,116,24,67,-45,97,12,77,-121,49,52,29,6,104,58,12,-48,116,24,-96,-23,48,64,-45,97,-128,-90,-61,0,77,-121,1,-102,14,3,52,29,6,104,58,12,-48,116,24,-96,-23,48,64,-45,97,-128,-90,-61,-80,-98,111,119,-47,-98,111,119,-53,-25,-37,1,117,-98,66,-19,48,84,-18,67,101,73,-44,22,68,-45,-67,-23,64,97,-70,68,38,-30,49,89,-104,47,-107,-69,2,29,2,108,2,80,-70,43,-17,-13 ,120,14,127,-116,-113,39,123,-81,-39,60,-11,10,75,23,-124,24,97,57,114,35,62,-49,13,89,-69,63,-39,27,-3,124,-80,-41,-61,-93,-15,100,-65,-8,-78,59,58,41,46,-5,71,-57,-27,-72,99,-16,-32,74,-70,92,96,93,90,90,-43,118,-31,-2,-48,-54,-2,-87,-20,-94,103,6,81,-96,114,-13,-118,103,100,127,-87,118,-88,-116,105,-72,70,11,23,78,76,63,-49,60,-86,22,-22,-22,-75,116,1,-23,114,41,47,-8,12,-85,27,-17,41,-117,39,-18,-31,-118,-10,-13,39,-64,-2,-91,-3,86,88,-116,-97,-37,123,111,44,-26,95,-38,-15,125,77,104,49,-85,46,124,-34,115,65,105,-110,46,38,92,43,125,57,-117,-43,-11,50,37,79,83,-110,114,115,-15,127,-54,97,-77,103,-115,58,4,-76,-122,-85,23,16,42,57,-117,-26,-43,-98,53,55,43,-43,42,21,-38,-36,54,-58,-20,104,-47,97,-61,95,-22,124,-94,121,120,41,108,70,55,-16,40,-28,-118,-57,-71,24,-82,-35,47,-93,108,65,-53,-63,70,122,-6,66,-2,85,-104,-59,-57,88,77,-59,42,-60,69,-52,71,-32,-39,3,-109,-117,-79,-3,-74,10,-80,14,-6,8,68,-9,31,-74,107,59,106,21,-94,123,57,-96,95,-12,-35,15,-71,-79,-18,-90,-84,127,-1,8,-1 2,-78,119,-33,14,127,-108,-101,-115,-11,114,-46,91,23,-32,92,-3,103,-51,22,-48,71,-89,-62,-10,-24,-30,-56,20,-15,-113,-34,-90,24,-2,1,76,-34,-48,-87,95,33,0,0]},"missingDependencies":{"rawBlob":[79,66,74,0,0,0,1,0,0,0,1,0,5,99,111,100,101,99,0,2,103,122,31,-117,8,0,0,0,0,0,0,0,-59,-39,-69,110,-125,64,16,70,-31,-121,73,13,51,-77,44,23,-69,-75,-46,-91,67,-87,-93,21,108,98,36,-29,69,44,56,-105,-89,79,68,-103,23,56,111,-16,-21,43,70,71,-102,-21,-8,-98,-49,34,33,-121,-4,8,-21,84,12,115,97,-27,99,25,-54,-31,-106,-10,49,-82,-95,28,-46,124,-18,-44,-87,-20,57,-82,-110,-65,-13,22,-13,38,41,-3,76,-79,52,-33,-100,-44,42,-41,-102,-81,106,-119,95,97,94,110,49,-53,116,95,-10,-83,24,-61,22,100,13,-97,47,-23,35,59,113,106,78,-52,68,107,-47,74,84,-27,-83,127,-67,92,-98,-5,-2,-23,74,76,112,82,-15,19,112,5,-29,21,-116,87,80,94,65,97,5,47,-82,-126,21,-114,9,-72,2,125,23,-114,9,-72,2,125,23,-114,9,-72,2,125,23,-114,9,-76,-126,-99,112,-123,-65,9,-72,66,-57,43,116,-68,66,-53,43,-76,-68,66,-61,43,52,-68,66, -51,43,-44,-68,-126,-25,21,60,-81,-64,-73,-93,-15,-19,104,124,59,26,-33,-114,-58,-73,-93,-15,-19,104,124,59,26,-33,-114,-54,-73,-93,-14,-19,-88,124,59,42,-33,-114,-54,-73,-93,-14,-19,-88,124,59,42,-33,-114,-54,-73,-93,-14,-19,-88,124,59,42,-33,-114,-54,-73,35,-2,-113,-16,-4,63,-62,-1,-5,71,-4,2,17,-34,9,76,24,26,0,0]}} +{"id":"0000001-160720041037822-oozie-oozi-C@1","jobId":"0000001-160720041037822-oozie-oozi-C","statusStr":"WAITING", "nominalTimestamp":"Nov 1, 12012 8:00:00 PM","lastModifiedTimestamp":"Jul 20, 2016 4:37:30 AM","createdTimestamp":"Jul 20, 2016 4:25:30 AM","pending":0,"actionNumber":1,"createdConf":{"rawBlob":[79,66,74,0,0,0,1,0,0,0,1,0,5,99,111,100,101,99,0,2,103,122,31,-117,8,0,0,0,0,0,0,0,-75,-108,-55,110,-125,48,16,-122,-17,-107,-6,14,121,1,-68,0,-35,16,-54,35,-28,80,-27,-44,-37,-44,30,-64,45,48,-82,-105,52,-23,-45,23,72,122,-120,68,-109,114,-24,101,52,-34,-66,-1,31,-113,-27,82,81,95,-103,58,58,8,-122,-6,-11,-19,-51,106,85,90,71,22,93,56,76,-93,97,-36,67,-121,107,-36,67,103,91,-12,-49,68,-95,-28,-45,-44,105,121,7,109,-60,53,-47,-105,65,38,-13,-5,39,33,-77,-12,65,-26,-39,29,-1,57,83,-14,-29,-98,-119,-50,-49,-16,-13,98,71,-104,34,114,-102,-127,-75,-83,81,-109,61,102,33,52,115,-30,-115,-82,124,-63,57,120,-16,59,112,38,81,93,34,-39,-50,42,-90,90,-118,26,29,12,-84,-82,120,20,-87,-32, -47,-93,-29,-2,-32,3,-6,-64,47,-103,-26,-125,-16,16,-22,-38,97,13,-127,28,-97,-20,-104,126,-52,-109,79,19,-102,-124,-86,-54,99,96,-5,-82,93,92,-32,-24,-126,-115,-39,92,53,39,119,-117,-95,62,-128,-101,-19,77,42,100,-102,72,-103,-120,116,43,-78,66,-120,-105,-59,-24,14,-84,67,29,21,-78,55,122,101,-1,-30,-2,35,98,-60,-51,47,80,-115,21,-60,118,57,116,12,27,-46,-77,-52,-65,63,-102,-59,-78,-61,37,109,29,-88,119,116,115,-62,87,21,-77,116,-79,34,-10,-6,90,-25,-13,-117,-99,47,-7,-7,79,-16,13,-15,114,59,-120,25,4,0,0]},"timeOut":120,"runConf":{"rawBlob":[79,66,74,0,0,0,1,0,0,0,1,0,5,99,111,100,101,99,0,2,103,122,31,-117,8,0,0,0,0,0,0,0,-75,-108,-55,110,-125,48,16,-122,-17,-107,-6,14,121,1,-68,0,-35,16,-54,35,-28,80,-27,-44,-37,-44,30,-64,45,48,-82,-105,52,-23,-45,23,72,122,-120,68,-109,114,-24,101,52,-34,-66,-1,31,-113,-27,82,81,95,-103,58,58,8,-122,-6,-11,-19,-51,106,85,90,71,22,93,56,76,-93,97,-36,67,-121,107,-36,67,103,91,-12,-49,68,-95,-28,-45,-44,105,121,7,109,-60,53,-47,-105,65,38,-13,-5 ,39,33,-77,-12,65,-26,-39,29,-1,57,83,-14,-29,-98,-119,-50,-49,-16,-13,98,71,-104,34,114,-102,-127,-75,-83,81,-109,61,102,33,52,115,-30,-115,-82,124,-63,57,120,-16,59,112,38,81,93,34,-39,-50,42,-90,90,-118,26,29,12,-84,-82,120,20,-87,-32,-47,-93,-29,-2,-32,3,-6,-64,47,-103,-26,-125,-16,16,-22,-38,97,13,-127,28,-97,-20,-104,126,-52,-109,79,19,-102,-124,-86,-54,99,96,-5,-82,93,92,-32,-24,-126,-115,-39,92,53,39,119,-117,-95,62,-128,-101,-19,77,42,100,-102,72,-103,-120,116,43,-78,66,-120,-105,-59,-24,14,-84,67,29,21,-78,55,122,101,-1,-30,-2,35,98,-60,-51,47,80,-115,21,-60,118,57,116,12,27,-46,-77,-52,-65,63,-102,-59,-78,-61,37,109,29,-88,119,116,115,-62,87,21,-77,116,-79,34,-10,-6,90,-25,-13,-117,-99,47,-7,-7,79,-16,13,-15,114,59,-120,25,4,0,0]},"actionXml":{"rawBlob":[79,66,74,0,0,0,1,0,0,0,1,0,5,99,111,100,101,99,0,2,103,122,31,-117,8,0,0,0,0,0,0,0,-59,90,93,79,-37,48,20,125,-97,-76,-1,80,101,72,-80,7,-41,-41,105,-7,-86,-46,74,-107,64,98,18,-76,-46,84,30,-32,5,-103,-44,45,25,-119,-99, 57,14,-97,-30,-65,-49,113,-46,52,124,117,48,49,-18,75,-45,-72,-41,62,-9,92,95,-93,35,31,-126,80,41,61,-115,36,55,74,19,-98,-90,-83,-101,36,-106,89,-33,-53,117,-44,83,-22,46,18,-67,70,64,15,-38,-66,-41,-110,60,17,125,-113,-49,-25,90,-52,-35,52,23,65,-82,35,115,65,-44,108,-106,9,99,-125,102,90,-4,-50,-123,12,111,-5,30,-13,90,38,74,-60,-99,-110,118,-38,48,17,58,10,57,61,84,-39,-39,80,-50,69,44,-78,50,-8,-84,-120,-55,101,100,-6,-34,-34,-16,-60,107,9,57,61,83,-77,-77,105,-82,-71,-119,-108,-20,123,-93,-15,104,-33,107,69,50,51,92,-122,-126,-56,60,57,23,-38,-83,-50,-61,34,-126,72,-107,-40,52,99,82,44,-44,-9,124,96,62,97,-116,-128,63,-127,78,15,-32,-76,-114,-77,-113,-68,25,-74,69,96,-101,-8,48,97,-84,-25,111,-98,122,-125,-81,95,90,-83,32,84,-46,104,21,103,-18,-83,124,15,115,-83,11,70,3,22,-48,-26,-85,-117,-89,-113,38,4,-111,76,115,67,-60,-107,-112,-90,94,98,-54,13,39,-111,-84,-22,-25,34,-68,86,49,104,43,-42,-9,52,-65,38,-79,-102,103,94,21,110,39,-40,61,-56,6,23,-45,89,-42,-93,-108,103,60,-69 ,-30,58,34,97,66,88,-5,42,13,-37,97,-84,-14,-87,-48,-68,29,-86,-92,-73,3,62,-48,60,19,-102,102,-73,-103,17,-103,-95,110,-13,-38,-84,-69,-75,11,-84,-29,111,-77,110,103,-109,-118,27,-98,-92,-74,-30,-76,76,-81,-64,-90,22,-9,-48,-62,-6,-76,40,24,101,-116,-126,79,-95,67,1,-66,-95,32,-5,-76,-125,-122,-116,-59,-103,-95,113,102,104,-100,1,-115,51,-32,112,102,-44,-17,-32,112,118,-56,88,-100,-111,-50,-77,67,-58,-30,-116,116,-98,29,50,22,103,-92,-13,-20,-112,-111,56,-77,93,44,-50,22,25,-117,-13,14,26,-25,29,52,-50,-37,104,-100,-73,-47,56,111,-95,113,-34,66,-29,-68,-119,-58,121,19,-115,115,23,-115,115,23,-115,51,-102,14,99,104,58,-116,-95,-23,48,-122,-90,-61,24,-102,14,99,104,58,-116,-95,-23,48,-122,-90,-61,0,77,-121,1,-102,14,3,52,29,6,104,58,12,-48,116,24,-96,-23,48,64,-45,97,-128,-90,-61,0,77,-121,1,-102,14,3,52,29,6,104,58,12,-48,116,-104,-69,-33,14,-88,-69,95,-81,111,-37,-85,-101,-8,-22,122,-66,-66,-114,111,58,25,29,40,12,-120,-56,68,60,38,11,35,-94,114,26,-96,67,-128,77,0,74,-89,-31,125,1 26,-57,-47,-113,-47,-15,100,-1,53,-53,-93,-50,-80,116,4,-120,17,-106,35,55,-30,-13,-100,-127,-75,-5,-109,-3,-31,-49,7,-5,60,26,-113,38,7,-59,-105,-67,-31,73,-15,56,24,31,-105,-29,-114,-63,-125,43,-23,50,-63,-70,-76,-76,-86,-19,-62,9,-95,-107,21,82,89,39,-49,-52,-110,64,-27,-26,21,-1,-60,-2,82,-19,80,25,-45,112,80,22,-114,-108,-104,126,-98,-111,82,37,-22,-22,-75,116,-60,-24,50,-107,23,-18,-97,87,55,-34,83,22,79,-100,-76,21,-19,-25,79,-128,-3,75,-5,-83,-80,-37,62,-73,-9,-34,88,-52,-65,-76,-29,-5,-102,-48,98,86,93,-8,-68,-25,-126,-46,48,92,76,-72,86,-6,114,22,-85,-21,-27,-110,60,77,73,-54,-51,-59,-1,41,-121,93,61,107,-44,33,-96,53,92,-99,64,-88,-28,44,-102,87,123,-42,-36,-84,84,-85,84,104,115,-37,24,-77,-93,69,-121,13,126,-87,-13,-119,-26,-31,-91,-80,43,-70,-127,71,33,87,60,-50,-59,96,-19,126,25,101,11,90,14,54,-106,-89,47,-84,-65,10,-77,-8,24,-87,-87,88,-123,-72,-120,-7,8,60,123,96,114,49,-78,-33,86,1,-42,65,31,-127,-24,-2,-122,-19,-39,-114,90,-123,-24,-116,-14,94,-47,119,63,-28,-58,- 70,-101,-78,-2,-3,35,-48,-53,-34,125,59,-4,56,55,27,-21,-27,-92,-73,38,-32,28,-18,103,-51,22,-48,71,-89,-62,-10,-24,-30,-56,20,-15,-113,-2,-77,96,-16,7,105,-19,91,33,107,32,0,0]},"missingDependencies":{"rawBlob":[79,66,74,0,0,0,1,0,0,0,1,0,5,99,111,100,101,99,0,2,103,122,31,-117,8,0,0,0,0,0,0,0,-59,-39,57,110,-124,80,16,69,-47,-59,56,-122,122,-11,25,122,72,91,-50,-100,33,-57,-42,23,96,55,82,-45,32,62,-76,-121,-43,-37,34,-13,10,-18,14,-98,78,80,-70,82,93,-69,-9,116,54,-117,41,-90,71,92,-122,-84,29,51,-49,31,115,-101,-73,-73,105,-21,-6,37,-26,-19,52,-98,-113,10,-78,45,-11,-117,-91,-17,-76,-10,105,-75,105,-6,25,-6,-36,-53,-6,36,47,-62,-63,-53,-94,-78,-2,43,-114,-13,-83,79,54,-36,-25,109,-51,-70,-72,70,91,-30,-25,-53,-12,-111,-126,5,121,48,119,83,48,21,38,-39,91,-13,122,-71,60,55,-51,-45,-107,-104,16,-84,-32,39,-32,10,-50,43,56,-81,32,94,65,-80,-126,91,40,96,-123,125,2,-82,64,-33,-123,125,2,-82,64,-33,-123,125,2,-82,64,-33,-123,125,2,-83,-32,39,92,-31,111,2,-82,112,-28,21,-114,-68,-62,- 127,87,56,-16,10,53,-81,80,-13,10,21,-81,80,-15,10,37,-81,80,-14,10,124,59,58,-33,-114,-50,-73,-93,-13,-19,-24,124,59,58,-33,-114,-50,-73,-93,-13,-19,40,-66,29,-59,-73,-93,-8,118,20,-33,-114,-30,-37,81,124,59,-118,111,71,-15,-19,40,-66,29,-59,-73,-93,-8,118,20,-33,-114,-30,-37,-15,-1,63,-30,23,-31,-92,18,-113,18,25,0,0]}} +{"id":"0000002-160720041037822-oozie-oozi-C@1","jobId":"0000002-160720041037822-oozie-oozi-C","statusStr":"SUCCEEDED", "nominalTimestamp":"Dec 31, 12009 5:40:00 PM","lastModifiedTimestamp":"Jul 20, 2016 4:36:59 AM","createdTimestamp":"Jul 20, 2016 4:35:55 AM","externalId":"0000003-160720041037822-oozie-oozi-W","pending":0,"actionNumber":1,"createdConf":{"rawBlob":[79,66,74,0,0,0,1,0,0,0,1,0,5,99,111,100,101,99,0,2,103,122,31,-117,8,0,0,0,0,0,0,0,-75,-108,-55,110,-125,48,16,-122,-17,-107,-6,14,121,1,-68,64,-70,33,-60,35,-28,80,-27,-44,-37,-44,30,-120,91,96,92,47,52,-23,-45,23,72,122,-120,68,-109,114,-88,100,-115,-68,126,-1,63,30,-53,-123,-94,-82,50,117,116,16,12,117,-27,-19,-51,106,85,88,71,22,93,56,76,-93,97,-36,65,-117,37,-18,-95,-75,13,-6,103,-94,80,-16,105,-22,-76,-36,67,19,-79,36,-6,50,-56,-28,-6,-2,73,-56,44,125,-112,-21,-20,-114,-1,-100,41,-8,113,-49,68,-25,103,-8,121,-79,35,76,17,57,-51,-64,-38,-58,-88,-55,30,-77,16,118,115,-30,59,93,-7,-100,115,-16,-32,123,112,38,81,109,34,8 9,111,21,83,13,69,-115,14,6,86,-101,63,-118,84,-16,-24,-47,113,127,-16,1,125,-32,-105,76,-13,65,120,8,117,-19,-80,-122,64,-114,79,118,76,55,-10,-109,79,19,118,9,85,-107,-57,-64,-10,109,-77,56,-63,-47,5,27,123,115,-39,-100,-36,45,-122,-6,0,110,-74,54,-87,-112,34,17,114,104,91,33,-13,-75,120,89,-116,110,-63,58,-44,81,33,123,-93,87,-10,47,-18,63,34,70,-36,-4,2,-43,88,65,108,-106,67,-57,-80,33,61,-53,-4,-5,-93,89,44,59,92,-46,-42,-127,122,71,55,39,124,85,49,75,23,43,98,-89,-81,85,62,-51,-59,-123,-54,23,-4,-4,39,-8,6,121,-109,-102,-104,25,4,0,0]},"timeOut":120,"runConf":{"rawBlob":[79,66,74,0,0,0,1,0,0,0,1,0,5,99,111,100,101,99,0,2,103,122,31,-117,8,0,0,0,0,0,0,0,-51,85,-55,78,-61,48,16,-67,35,-15,15,124,0,-79,-99,-76,108,81,-44,19,71,-44,3,-22,-119,-37,96,79,82,67,18,27,47,93,-8,122,-78,-76,18,21,41,-59,72,-76,72,-106,53,19,59,111,-55,56,-29,-116,-85,58,-105,-123,55,-32,-92,-86,39,-25,103,23,23,-103,54,74,-93,113,-21,46,107,-14,26,42,-100,-32,10,42,93,-94,125,84,-54,101,-76,123,-76,89,9 4,64,-23,113,-94,-44,-69,68,18,-113,-81,-17,88,60,74,110,-30,-15,-24,-118,110,-33,-55,104,-65,-89,67,-89,59,-16,-61,100,61,24,87,-54,8,2,90,-105,-110,119,-14,-120,6,55,31,34,-97,-117,-36,-90,-108,-126,5,-69,0,35,35,94,69,49,89,104,78,120,-87,-68,64,3,13,86,-107,-34,-78,-124,81,111,-47,80,-69,-74,14,-83,-93,-33,-119,-90,13,113,51,21,-123,-63,2,-100,50,-76,-109,35,-21,54,-114,-106,-46,-51,35,-107,-25,22,29,89,85,101,-80,-63,86,5,105,-93,33,55,27,117,-63,-96,-42,-127,25,-84,77,-62,98,22,-79,-72,25,51,22,-89,99,-10,20,12,93,-127,54,40,60,71,-14,-94,-98,-55,-97,-88,127,-13,-24,113,-70,7,84,96,14,-66,12,7,109,-89,-87,18,-125,-104,63,63,52,-63,-76,-78,-42,-34,-35,-125,-125,-93,29,-42,-114,49,18,13,37,53,-80,124,80,-123,-91,109,-43,41,-117,55,99,-52,46,79,67,-100,-100,-118,-104,-123,-41,77,121,119,-20,-62,-11,-108,-67,-113,79,-51,102,27,-94,-8,-22,44,-40,86,-13,-49,-50,12,-16,87,52,67,-74,14,-6,25,37,-63,-116,88,-117,67,-115,40,73,-39,47,26,81,-1,45,-105,-7,-65,-71,22,-10,58,-56,-24,-18,-43 ,-6,1,126,61,-97,-46,106,7,0,0]},"actionXml":{"rawBlob":[79,66,74,0,0,0,1,0,0,0,1,0,5,99,111,100,101,99,0,2,103,122,31,-117,8,0,0,0,0,0,0,0,-43,87,109,79,-37,48,16,-2,62,105,-1,33,-14,-10,113,-82,-99,-76,-64,22,37,-107,-48,64,98,-46,40,-46,84,62,-64,23,100,18,-89,120,36,118,-26,-105,-106,-126,-8,-17,-77,-109,52,77,-23,120,-39,-42,81,77,-118,-102,-8,114,-10,-35,61,-9,-36,93,26,37,66,-56,-108,113,-94,-123,-124,-92,44,-67,-101,34,-25,42,6,70,-78,80,-120,91,70,-61,-114,66,-120,123,1,-16,56,41,104,12,-56,100,34,-23,-92,-38,86,105,-64,25,-45,87,80,100,-103,-94,26,120,-103,-92,63,12,-27,-55,60,6,-69,24,120,-102,21,-12,86,112,-69,-19,116,-4,-71,126,123,-31,100,-122,51,29,-125,-29,47,-93,-45,-15,33,-16,40,79,47,68,118,-111,26,73,52,19,60,6,-93,-109,-111,21,51,-82,52,-31,9,-123,-36,20,-105,84,-58,-64,7,30,73,-100,6,-28,-94,-80,-98,-27,-48,-99,21,-125,0,-5,24,98,-33,94,99,-20,-121,3,124,-34,-22,-39,-101,-23,-86,-19,66,-68,7,3,60,-10,-3,-80,-65,115,14,-122,111,-33,120,94,-108,8,-82,-91,-56,85,- 75,-86,-41,-119,-111,-46,69,49,-12,35,-44,93,86,-6,104,101,67,-60,120,105,52,-92,83,-54,117,123,68,74,52,-127,-116,55,-112,85,26,-64,115,66,11,82,12,36,-103,-63,92,76,20,104,-44,-19,6,11,-69,26,94,-91,-103,10,17,34,-118,-88,41,-111,12,38,5,-12,123,-45,50,-23,37,-71,48,41,-107,-92,-105,-120,34,-4,-120,3,-116,-116,-94,18,-87,-71,-46,84,105,84,-27,-85,-25,15,118,63,97,-65,31,-20,-7,-125,-2,14,-94,55,-92,40,115,-86,80,-19,-98,-77,-115,-84,-35,-81,-42,44,114,120,33,-20,55,-41,0,-65,-37,-114,-31,96,91,-122,49,-114,80,5,120,11,127,-109,-102,38,95,109,126,-70,116,14,-80,99,36,-45,-52,-14,105,-63,-52,85,-22,-31,16,59,-22,-3,13,-25,91,-113,106,74,64,77,109,72,68,-45,87,-93,-58,-5,-69,-77,-61,-3,111,-9,-10,126,124,50,26,31,-71,-121,-125,-3,51,119,59,58,57,-83,-27,85,0,-9,21,-126,75,-1,90,36,81,3,-27,-94,18,80,83,10,77,-23,-84,21,75,36,-116,126,-92,126,-20,-101,38,33,-75,78,-89,-126,22,77,-120,-90,-81,87,72,-115,-93,21,92,-53,38,-120,-106,-82,-84,51,-19,105,-102,61,12,-30,97,-13,124,-102,109,-2 ,-1,-58,-74,-105,-31,-9,12,1,127,-113,118,-42,100,-61,-69,117,-106,69,-11,-120,88,108,-104,9,121,-99,-27,98,-74,60,-46,14,69,88,18,125,-11,111,-48,-80,-89,-85,14,12,17,106,-51,-75,14,-40,49,-109,-79,73,-109,-78,110,-82,74,41,74,42,-11,-68,35,-77,82,71,-86,-31,119,113,57,-106,36,-71,-90,-10,-60,74,-80,-94,50,37,-71,-95,-61,103,3,-23,7,17,-86,85,59,70,-47,47,-84,62,-27,-119,-5,25,-119,-108,62,-18,-57,-53,113,-35,-128,59,-74,-80,12,29,-39,-89,-57,-3,73,105,70,76,-82,55,96,-84,-22,114,7,-106,-127,-101,8,126,-77,-77,-2,-61,-74,102,-3,-106,12,-29,77,-112,-89,-18,30,91,72,-24,31,-51,-100,23,-124,91,125,-61,-82,53,-105,8,-83,116,65,-37,-109,22,45,-46,-23,-81,-4,93,24,-2,4,-23,-126,-4,63,64,12,0,0]},"missingDependencies":{"rawBlob":[79,66,74,0,0,0,1,0,0,0,1,0,5,99,111,100,101,99,0,2,103,122,31,-117,8,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0]}} \ No newline at end of file
