Project

General

Profile

« Previous | Next » 

Revision 60353

catch output params from the different oozie workflow actions

View differences:

modules/dnet-hadoop-service/trunk/src/main/java/eu/dnetlib/data/hadoop/oozie/OozieJobMonitor.java
78 78
					final Map<String, String> map = Maps.newHashMap();
79 79
					report.forEach((k, v) -> map.put(k.toString(), v.toString()));
80 80
					log.info("found oozie job report, size: " + map.size());
81
					map.entrySet().forEach(e -> log.info(e.getKey() + " - " + e.getValue()));
82

  
81 83
					getCallback().done(map);
82 84
				} else {
83 85
					log.warn("cannot find oozie job report!");
......
98 100
	 */
99 101
	private static Properties getReport(final OozieClient oozieClient, final String oozieJobId, final Set<String> workflowActions) throws OozieClientException, IOException {
100 102
		WorkflowJob oozieJob = oozieClient.getJobInfo(oozieJobId);
103
		Properties properties = new Properties();
101 104
		for (WorkflowAction currentAction : oozieJob.getActions()) {
102 105
			log.info(String.format("looking for workflow actions to report, current: '%s'", currentAction.getName()));
103 106
			if (workflowActions.contains(currentAction.getName())) {
......
109 112
						return subworkflowProperties;
110 113
					}
111 114
				} else if (StringUtils.isNotBlank(currentAction.getData())) {
112
					Properties properties = new Properties();
113 115
					properties.load(IOUtils.toInputStream(currentAction.getData()));
114 116
					log.info(String.format("found workflow action(%s) properties size %s", currentAction.getName(), properties.values().size()));
115 117
					return properties;
......
118 120
				log.info(String.format("cannot find workflow action(%s) properties", currentAction.getName()));
119 121
			}
120 122
		}
121
		return null;
123
		log.info(String.format("found workflow (%s) properties size %s", oozieJob.getAppName(), properties.values().size()));
124
		return properties;
122 125
	}
123 126

  
124 127
	@Override

Also available in: Unified diff