Revision 47221
Added by Claudio Atzori almost 7 years ago
SubmitHadoopJobNode.java | ||
---|---|---|
4 | 4 |
|
5 | 5 |
import javax.annotation.Resource; |
6 | 6 |
|
7 |
import org.apache.commons.lang.StringUtils; |
|
7 | 8 |
import org.apache.commons.logging.Log; |
8 | 9 |
import org.apache.commons.logging.LogFactory; |
9 | 10 |
|
... | ... | |
26 | 27 |
*/ |
27 | 28 |
private static final Log log = LogFactory.getLog(SubmitHadoopJobNode.class); |
28 | 29 |
|
30 |
public static final String OOZIE_REPORT_ACTIONS = "oozie.report.actions.csv"; |
|
31 |
|
|
29 | 32 |
@Resource |
30 | 33 |
private UniqueServiceLocator serviceLocator; |
31 | 34 |
|
... | ... | |
35 | 38 |
|
36 | 39 |
private boolean simulation = false; |
37 | 40 |
|
41 |
private String oozieReportActionsCsv; |
|
42 |
|
|
38 | 43 |
@Override |
39 | 44 |
protected String obtainServiceId(final NodeToken token) { |
40 | 45 |
return getServiceLocator().getServiceId(HadoopService.class); |
... | ... | |
51 | 56 |
job.getParameters().put("cluster", cluster(token)); |
52 | 57 |
job.getParameters().put("simulation", String.valueOf(isSimulation())); |
53 | 58 |
|
59 |
if (StringUtils.isNotBlank(getOozieReportActionsCsv())) { |
|
60 |
job.getParameters().put(OOZIE_REPORT_ACTIONS, getOozieReportActionsCsv()); |
|
61 |
} |
|
62 |
|
|
54 | 63 |
job.getParameters().putAll(parseJsonParameters(token)); |
55 | 64 |
} |
56 | 65 |
|
... | ... | |
114 | 123 |
public void setSimulation(final boolean simulation) { |
115 | 124 |
this.simulation = simulation; |
116 | 125 |
} |
126 |
|
|
127 |
public String getOozieReportActionsCsv() { |
|
128 |
return oozieReportActionsCsv; |
|
129 |
} |
|
130 |
|
|
131 |
public void setOozieReportActionsCsv(final String oozieReportActionsCsv) { |
|
132 |
this.oozieReportActionsCsv = oozieReportActionsCsv; |
|
133 |
} |
|
117 | 134 |
} |
Also available in: Unified diff
added param declaring the oozie job action names to be reported back to the workflow logger