Project

General

Profile

1
package eu.dnetlib.msro.workflows.nodes.hadoop;
2

    
3
import eu.dnetlib.msro.workflows.graph.Arc;
4
import eu.dnetlib.msro.workflows.nodes.SimpleJobNode;
5
import eu.dnetlib.msro.workflows.procs.Env;
6
import org.apache.commons.logging.Log;
7
import org.apache.commons.logging.LogFactory;
8

    
9
/**
10
 * The Class SetHdfsFileJobNode.
11
 */
12
public class SetHdfsFileJobNode extends SimpleJobNode {
13

    
14
	/**
15
	 * logger.
16
	 */
17
	private static final Log log = LogFactory.getLog(SetHdfsFileJobNode.class); // NOPMD by marko on 11/24/08 5:02 PM
18

    
19
	/**
20
	 * The input records path.
21
	 */
22
	private String hdfsPath;
23

    
24
	/**
25
	 * The input records path param.
26
	 */
27
	private String hdfsPathParam;
28

    
29
	/**
30
	 * {@inheritDoc}
31
	 *
32
	 * @see com.googlecode.sarasvati.mem.MemNode#execute(com.googlecode.sarasvati.Engine, com.googlecode.sarasvati.NodeToken)
33
	 */
34
	@Override
35
	public String execute(final Env env) {
36

    
37
		log.info("hdfs path: " + getHdfsPath());
38

    
39
		env.setAttribute(getHdfsPathParam(), getHdfsPath());
40

    
41
		return Arc.DEFAULT_ARC;
42
	}
43

    
44
	public String getHdfsPath() {
45
		return this.hdfsPath;
46
	}
47

    
48
	public void setHdfsPath(final String hdfsPath) {
49
		this.hdfsPath = hdfsPath;
50
	}
51

    
52
	public String getHdfsPathParam() {
53
		return this.hdfsPathParam;
54
	}
55

    
56
	public void setHdfsPathParam(final String hdfsPathParam) {
57
		this.hdfsPathParam = hdfsPathParam;
58
	}
59

    
60
}
(19-19/22)