Project

General

Profile

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

    
3
import org.apache.commons.logging.Log;
4
import org.apache.commons.logging.LogFactory;
5

    
6
import com.googlecode.sarasvati.Arc;
7
import com.googlecode.sarasvati.NodeToken;
8

    
9
import eu.dnetlib.msro.workflows.nodes.SimpleJobNode;
10

    
11
/**
12
 * The Class SetHdfsFileJobNode.
13
 */
14
public class SetHdfsFileJobNode extends SimpleJobNode {
15

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

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

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

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

    
35
		log.info("hdfs path: " + getHdfsPath());
36

    
37
		token.getEnv().setAttribute(getHdfsPathParam(), getHdfsPath());
38

    
39
		return Arc.DEFAULT_ARC;
40
	}
41

    
42
	public String getHdfsPath() {
43
		return hdfsPath;
44
	}
45

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

    
50
	public String getHdfsPathParam() {
51
		return hdfsPathParam;
52
	}
53

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

    
58
}
(19-19/21)