2017-01-24 44 views
0

我想建立一個簡單的Oozie協調器,無限期地每天中午運行。這是設置它的正確方法嗎?如何每天同時安排Oozie協調員?

<coordinator-app name="${jobName}" frequency="${coord:days(1)}" start="2000-01-01T12:00Z" end="3000-01-01T12:00Z" timezone="UTC" xmlns="uri:oozie:coordinator:0.2"> 
    <controls> 
     <timeout>-1</timeout> 
     <concurrency>1</concurrency> 
     <execution>LAST_ONLY</execution> 
    </controls> 

    <action> 
     <workflow> 
      <app-path>${myAppPath}</app-path> 
     </workflow> 
    </action> 
</coordinator-app> 

感謝, 阿爾瓦羅

+0

我看不錯。你可以幹運行它。 – YoungHobbit

回答

0

您可以按以下方式寫協調員的xml:

<coordinator-app name="${jobName}" frequency="${coord:days(1)}" start="2000-01-01T12:00Z" end="3000-01-01T12:00Z" timezone="UTC" xmlns="uri:oozie:coordinator:0.2"> 
<controls> 
    <timeout>-1</timeout> 
    <concurrency>30</concurrency> 
    <execution>FIFO</execution> 
</controls> 
<datasets> 
    <dataset name="myData" frequency="${coord:days(1)}" initial-instance="2000-01-01T12:00Z" timezone="UTC"> 
     <uri-template>/time-independent/path/that/may/or/maynot/be/there</uri-template> 
    </dataset> 
</datasets> 
<input-events> 
    <data-in name="myInput" dataset="myData"> 
     <instance>2000-01-01T12:00Z</instance> 
    </data-in> 
</input-events> 
<action> 
    <workflow> 
     <app-path>${myAppPath}</app-path> 
     <configuration> 
      <property> 
       <name>myInput</name> 
       <value>${coord:dataIn('myInput')}</value> 
      </property> 
     </configuration> 
    </workflow> 
</action> 

+0

我認爲這是我的另一個問題的答案。我想出了答案,謝謝。 –

相關問題