Shakeera Khadari
Shakeera Khadari

Reputation: 27

Defining dataset with initial instance and the coordinator initial instance is set as current time in oozie

I defined the coordinator as followed:

<coordinator-app name="CoordApp-DataExporter"
    frequency="${coord:minutes(10)}"
    start="${startTime}"
    end="${endTime}"
    timezone="${timeZoneDef}"
    xmlns="uri:oozie:coordinator:0.2">
    <controls>
        <timeout>20</timeout>
        <concurrency>6</concurrency>
        <execution>FIFO</execution>
    </controls>
    <datasets>
        <dataset name="inputDS" frequency="${coord:minutes(10)}" initial-instance="${startTime}" timezone="${timeZoneDef}">
           <uri-template>${triggerDatasetDir}</uri-template>
        </dataset>
    </datasets>
    <input-events>
        <data-in name="CoordAppTrigDepInput" dataset="inputDS">
           <instance>${startTime}</instance>
        </data-in>
    </input-events>
    <action>
        <workflow>
          <app-path>${workflowAppDataExporterPath}</app-path>
        </workflow>
    </action>
</coordinator-app>

I set the start time as current time, when am trying to this job it is always in waiting state.

Can you please define the solution as well as the utilization of datasets nodes in cordinator.xml file of ooxie?

Upvotes: 0

Views: 1057

Answers (1)

Oleksii
Oleksii

Reputation: 1111

Try to change it to the following:

<coordinator-app name="CoordApp-DataExporter"
    frequency="${coord:minutes(10)}"
    start="${startTime}"
    end="${endTime}"
    timezone="${timeZoneDef}"
    xmlns="uri:oozie:coordinator:0.2">
    <controls>
        <timeout>20</timeout>
        <concurrency>6</concurrency>
        <execution>FIFO</execution>
    </controls>
    <datasets>
        <dataset name="inputDS" frequency="${coord:minutes(10)}" initial-instance="${startTime}" timezone="${timeZoneDef}">
           <uri-template>${triggerDatasetDir}/${YEAR}/${MONTH}/${DAY}/${HOUR}_${MINUTE}</uri-template>
        </dataset>
    </datasets>
    <input-events>
        <data-in name="CoordAppTrigDepInput" dataset="inputDS">
           <instance>${coord:current(0)}</instance>
        </data-in>
    </input-events>
    <action>
        <workflow>
          <app-path>${workflowAppDataExporterPath}</app-path>

          <configuration>
            <property>
                <name>property1</name>
                <value>${coord:dataIn('CoordAppTrigDepInput')}</value>
            </property>
        </workflow>
    </action>
</coordinator-app>

To test coordinators you may try -dryrun feature of oozie command line - http://oozie.apache.org/docs/3.3.2/DG_CommandLineTool.html#Dryrun_of_Coordinator_Job

Upvotes: 1

Related Questions