Search in sources :

Example 41 with SLAEventBean

use of org.apache.oozie.SLAEventBean in project oozie by apache.

the class TestSLAStore method createSLAEvent.

private SLAEventBean createSLAEvent(String slaId) {
    SLAEventBean sla = new SLAEventBean();
    sla.setSlaId(slaId);
    return sla;
}
Also used : SLAEventBean(org.apache.oozie.SLAEventBean)

Example 42 with SLAEventBean

use of org.apache.oozie.SLAEventBean in project oozie by apache.

the class TestSLAStore method _testInsertEvent.

/*    private void _testGetSlaEventSeqNewer(long seqId) {
        store.beginTrx();
        try {
            List<SLAEventBean> slaEvents = store.getSLAEventListNewerSeq(seqId);
            System.out.println("Total # of Records " + slaEvents.size());
            if (slaEvents.size() == 0) {
                fail("Unable to GET Get any record of sequence id greater than ="
                        + seqId);
            }
            store.commitTrx();
        }
        catch (Exception ex) {
            store.rollbackTrx();
            ex.printStackTrace();
            fail("Unable to GET Get record of sequence id greater than ="
                    + seqId);
        }
    }*/
private void _testInsertEvent(String slaId) {
    SLAEventBean sla = createSLAEvent(slaId);
    store.beginTrx();
    try {
        store.insertSLAEvent(sla);
        store.commitTrx();
    } catch (Exception ex) {
        store.rollbackTrx();
        ex.printStackTrace();
        fail("Unable to insert a record into COORD Job ");
    }
}
Also used : SLAEventBean(org.apache.oozie.SLAEventBean)

Aggregations

SLAEventBean (org.apache.oozie.SLAEventBean)42 Date (java.util.Date)15 JPAService (org.apache.oozie.service.JPAService)14 CommandException (org.apache.oozie.command.CommandException)13 List (java.util.List)12 JPAExecutorException (org.apache.oozie.executor.jpa.JPAExecutorException)10 Element (org.jdom.Element)7 XException (org.apache.oozie.XException)6 WorkflowActionQuery (org.apache.oozie.executor.jpa.WorkflowActionQueryExecutor.WorkflowActionQuery)6 ArrayList (java.util.ArrayList)5 UpdateEntry (org.apache.oozie.executor.jpa.BatchQueryExecutor.UpdateEntry)5 WorkflowJobQuery (org.apache.oozie.executor.jpa.WorkflowJobQueryExecutor.WorkflowJobQuery)5 IOException (java.io.IOException)4 Configuration (org.apache.hadoop.conf.Configuration)4 ControlNodeActionExecutor (org.apache.oozie.action.control.ControlNodeActionExecutor)4 Status (org.apache.oozie.client.SLAEvent.Status)4 PreconditionException (org.apache.oozie.command.PreconditionException)4 Query (javax.persistence.Query)3 ActionExecutorException (org.apache.oozie.action.ActionExecutorException)3 CoordActionQuery (org.apache.oozie.executor.jpa.CoordActionQueryExecutor.CoordActionQuery)3