Project

General

Profile

« Previous | Next » 

Revision 28568

javadoc

View differences:

modules/dnet-hadoop-service-rmi/trunk/src/main/java/eu/dnetlib/data/hadoop/rmi/HadoopBlackboardActions.java
1 1
package eu.dnetlib.data.hadoop.rmi;
2 2

  
3
/**
4
 * Enum of the available HadoopBlackboardActions.
5
 */
3 6
public enum HadoopBlackboardActions {
4
	SUBMIT_MAPREDUCE_JOB, KILL_JOB, SUBMIT_OOZIE_JOB, IMPORT_EPR_HBASE, IMPORT_EPR_HDFS, DELETE_HDFS_PATH
7

  
8
	/** The submit mapreduce job. */
9
	SUBMIT_MAPREDUCE_JOB,
10
	/** The kill job. */
11
	KILL_JOB,
12
	/** The submit oozie job. */
13
	SUBMIT_OOZIE_JOB,
14
	/** The import epr hbase. */
15
	IMPORT_EPR_HBASE,
16
	/** The import epr hdfs. */
17
	IMPORT_EPR_HDFS,
18
	/** The delete hdfs path. */
19
	DELETE_HDFS_PATH
5 20
}
modules/dnet-hadoop-service-rmi/trunk/src/main/java/eu/dnetlib/data/hadoop/rmi/HadoopJobDescriptor.java
15 15
 * </pre>
16 16
 * 
17 17
 * @author claudio
18
 * 
19 18
 */
20 19
@XmlRootElement
21 20
public class HadoopJobDescriptor {
22 21

  
22
	/** The id. */
23 23
	private String id;
24 24

  
25
	/** The job name. */
25 26
	private String jobName;
26 27

  
28
	/** The job description. */
27 29
	private String jobDescription;
28 30

  
31
	/** The status. */
29 32
	private String status;
30 33

  
34
	/** The start time. */
31 35
	private String startTime;
32 36

  
37
	/** The last activity. */
33 38
	private String lastActivity;
34 39

  
40
	/** The hadoop id. */
35 41
	private String hadoopId;
36 42

  
43
	/** The tracking url. */
37 44
	private String trackingUrl;
38 45

  
46
	/**
47
	 * Instantiates a new hadoop job descriptor.
48
	 */
39 49
	public HadoopJobDescriptor() {}
40 50

  
41
	public HadoopJobDescriptor(String jobName, String jobDescription, String id, String status, String startTime, String lastActivity, String hadoopId,
42
			String trackingUrl) {
51
	/**
52
	 * Instantiates a new hadoop job descriptor.
53
	 * 
54
	 * @param jobName
55
	 *            the job name
56
	 * @param jobDescription
57
	 *            the job description
58
	 * @param id
59
	 *            the id
60
	 * @param status
61
	 *            the status
62
	 * @param startTime
63
	 *            the start time
64
	 * @param lastActivity
65
	 *            the last activity
66
	 * @param hadoopId
67
	 *            the hadoop id
68
	 * @param trackingUrl
69
	 *            the tracking url
70
	 */
71
	public HadoopJobDescriptor(final String jobName, final String jobDescription, final String id, final String status, final String startTime,
72
			final String lastActivity, final String hadoopId, final String trackingUrl) {
43 73
		super();
44 74
		this.id = id;
45 75
		this.jobName = jobName;
......
51 81
		this.trackingUrl = trackingUrl;
52 82
	}
53 83

  
84
	/**
85
	 * Gets the job name.
86
	 * 
87
	 * @return the job name
88
	 */
54 89
	public String getJobName() {
55 90
		return jobName;
56 91
	}
57 92

  
58
	public void setJobName(String jobName) {
93
	/**
94
	 * Sets the job name.
95
	 * 
96
	 * @param jobName
97
	 *            the new job name
98
	 */
99
	public void setJobName(final String jobName) {
59 100
		this.jobName = jobName;
60 101
	}
61 102

  
103
	/**
104
	 * Gets the id.
105
	 * 
106
	 * @return the id
107
	 */
62 108
	public String getId() {
63 109
		return id;
64 110
	}
65 111

  
66
	public void setId(String id) {
112
	/**
113
	 * Sets the id.
114
	 * 
115
	 * @param id
116
	 *            the new id
117
	 */
118
	public void setId(final String id) {
67 119
		this.id = id;
68 120
	}
69 121

  
122
	/**
123
	 * Gets the job description.
124
	 * 
125
	 * @return the job description
126
	 */
70 127
	public String getJobDescription() {
71 128
		return jobDescription;
72 129
	}
73 130

  
74
	public void setJobDescription(String jobDescription) {
131
	/**
132
	 * Sets the job description.
133
	 * 
134
	 * @param jobDescription
135
	 *            the new job description
136
	 */
137
	public void setJobDescription(final String jobDescription) {
75 138
		this.jobDescription = jobDescription;
76 139
	}
77 140

  
141
	/**
142
	 * Gets the status.
143
	 * 
144
	 * @return the status
145
	 */
78 146
	public String getStatus() {
79 147
		return status;
80 148
	}
81 149

  
82
	public void setStatus(String status) {
150
	/**
151
	 * Sets the status.
152
	 * 
153
	 * @param status
154
	 *            the new status
155
	 */
156
	public void setStatus(final String status) {
83 157
		this.status = status;
84 158
	}
85 159

  
160
	/**
161
	 * Gets the start time.
162
	 * 
163
	 * @return the start time
164
	 */
86 165
	public String getStartTime() {
87 166
		return startTime;
88 167
	}
89 168

  
90
	public void setStartTime(String startTime) {
169
	/**
170
	 * Sets the start time.
171
	 * 
172
	 * @param startTime
173
	 *            the new start time
174
	 */
175
	public void setStartTime(final String startTime) {
91 176
		this.startTime = startTime;
92 177
	}
93 178

  
179
	/**
180
	 * Gets the last activity.
181
	 * 
182
	 * @return the last activity
183
	 */
94 184
	public String getLastActivity() {
95 185
		return lastActivity;
96 186
	}
97 187

  
98
	public void setLastActivity(String lastActivity) {
188
	/**
189
	 * Sets the last activity.
190
	 * 
191
	 * @param lastActivity
192
	 *            the new last activity
193
	 */
194
	public void setLastActivity(final String lastActivity) {
99 195
		this.lastActivity = lastActivity;
100 196
	}
101 197

  
198
	/**
199
	 * Gets the hadoop id.
200
	 * 
201
	 * @return the hadoop id
202
	 */
102 203
	public String getHadoopId() {
103 204
		return hadoopId;
104 205
	}
105 206

  
106
	public void setHadoopId(String hadoopId) {
207
	/**
208
	 * Sets the hadoop id.
209
	 * 
210
	 * @param hadoopId
211
	 *            the new hadoop id
212
	 */
213
	public void setHadoopId(final String hadoopId) {
107 214
		this.hadoopId = hadoopId;
108 215
	}
109 216

  
217
	/**
218
	 * Gets the tracking url.
219
	 * 
220
	 * @return the tracking url
221
	 */
110 222
	public String getTrackingUrl() {
111 223
		return trackingUrl;
112 224
	}
113 225

  
114
	public void setTrackingUrl(String trackingUrl) {
226
	/**
227
	 * Sets the tracking url.
228
	 * 
229
	 * @param trackingUrl
230
	 *            the new tracking url
231
	 */
232
	public void setTrackingUrl(final String trackingUrl) {
115 233
		this.trackingUrl = trackingUrl;
116 234
	}
117 235
}
modules/dnet-hadoop-service-rmi/trunk/src/main/java/eu/dnetlib/data/hadoop/rmi/HadoopJobType.java
1 1
package eu.dnetlib.data.hadoop.rmi;
2 2

  
3 3
/**
4
 * Enum of supported hadoop job types
4
 * Enum of supported hadoop job types.
5 5
 * 
6 6
 * @author claudio
7
 * 
8 7
 */
9 8
public enum HadoopJobType {
10
	mapreduce, oozie
9

  
10
	/** The mapreduce. */
11
	mapreduce,
12
	/** The oozie. */
13
	oozie
11 14
}
modules/dnet-hadoop-service-rmi/trunk/src/main/java/eu/dnetlib/data/hadoop/rmi/HadoopServiceException.java
2 2

  
3 3
import eu.dnetlib.common.rmi.RMIException;
4 4

  
5
/**
6
 * The Class HadoopServiceException.
7
 */
5 8
public class HadoopServiceException extends RMIException {
6 9

  
10
	/** The Constant serialVersionUID. */
11
	private static final long serialVersionUID = 7523999812098059764L;
12

  
7 13
	/**
14
	 * Instantiates a new hadoop service exception.
8 15
	 * 
16
	 * @param string
17
	 *            the string
9 18
	 */
10
	private static final long serialVersionUID = 7523999812098059764L;
11

  
12
	public HadoopServiceException(String string) {
19
	public HadoopServiceException(final String string) {
13 20
		super(string);
14 21
	}
15
	
16
	
17
	public HadoopServiceException(String string, Throwable exception) {
22

  
23
	/**
24
	 * Instantiates a new hadoop service exception.
25
	 * 
26
	 * @param string
27
	 *            the string
28
	 * @param exception
29
	 *            the exception
30
	 */
31
	public HadoopServiceException(final String string, final Throwable exception) {
18 32
		super(string, exception);
19 33
	}
20 34

  
21
	public HadoopServiceException(Throwable exception) {
35
	/**
36
	 * Instantiates a new hadoop service exception.
37
	 * 
38
	 * @param exception
39
	 *            the exception
40
	 */
41
	public HadoopServiceException(final Throwable exception) {
22 42
		super(exception);
23 43
	}
24 44

  
modules/dnet-hadoop-service-rmi/trunk/src/main/java/eu/dnetlib/data/hadoop/rmi/HadoopService.java
8 8

  
9 9
import eu.dnetlib.common.rmi.BaseService;
10 10

  
11
/**
12
 * The Interface HadoopService.
13
 */
11 14
@WebService(targetNamespace = "http://services.dnetlib.eu/")
12 15
public interface HadoopService extends BaseService {
13 16

  
17
	/**
18
	 * List available jobs.
19
	 * 
20
	 * @return the list
21
	 * @throws HadoopServiceException
22
	 *             the hadoop service exception
23
	 */
14 24
	List<String> listAvailableJobs() throws HadoopServiceException;
15 25

  
26
	/**
27
	 * List jobs.
28
	 * 
29
	 * @param clusterName
30
	 *            the cluster name
31
	 * @return the list
32
	 * @throws HadoopServiceException
33
	 *             the hadoop service exception
34
	 */
16 35
	List<HadoopJobDescriptor> listJobs(@WebParam(name = "clusterName") String clusterName) throws HadoopServiceException;
17 36

  
37
	/**
38
	 * Kill job.
39
	 * 
40
	 * @param jobId
41
	 *            the job id
42
	 * @return true, if successful
43
	 * @throws HadoopServiceException
44
	 *             the hadoop service exception
45
	 */
18 46
	boolean killJob(@WebParam(name = "id") String jobId) throws HadoopServiceException;
19 47

  
48
	/**
49
	 * List hbase tables.
50
	 * 
51
	 * @param clusterName
52
	 *            the cluster name
53
	 * @return the list
54
	 * @throws HadoopServiceException
55
	 *             the hadoop service exception
56
	 */
20 57
	List<String> listHbaseTables(@WebParam(name = "clusterName") String clusterName) throws HadoopServiceException;
21 58

  
59
	/**
60
	 * Ensure hbase table.
61
	 * 
62
	 * @param clusterName
63
	 *            the cluster name
64
	 * @param tableName
65
	 *            the table name
66
	 * @param columns
67
	 *            the columns
68
	 * @return true, if successful
69
	 * @throws HadoopServiceException
70
	 *             the hadoop service exception
71
	 */
22 72
	boolean ensureHbaseTable(@WebParam(name = "clusterName") String clusterName,
23 73
			@WebParam(name = "tableName") String tableName,
24 74
			@WebParam(name = "columns") Set<String> columns) throws HadoopServiceException;
25 75

  
76
	/**
77
	 * Creates the hbase table.
78
	 * 
79
	 * @param clusterName
80
	 *            the cluster name
81
	 * @param tableName
82
	 *            the table name
83
	 * @param columns
84
	 *            the columns
85
	 * @return true, if successful
86
	 * @throws HadoopServiceException
87
	 *             the hadoop service exception
88
	 */
26 89
	boolean createHbaseTable(@WebParam(name = "clusterName") String clusterName,
27 90
			@WebParam(name = "tableName") String tableName,
28 91
			@WebParam(name = "columns") Set<String> columns) throws HadoopServiceException;
29 92

  
93
	/**
94
	 * Truncate hbase table.
95
	 * 
96
	 * @param clusterName
97
	 *            the cluster name
98
	 * @param tableName
99
	 *            the table name
100
	 * @return true, if successful
101
	 * @throws HadoopServiceException
102
	 *             the hadoop service exception
103
	 */
30 104
	boolean truncateHbaseTable(@WebParam(name = "clusterName") String clusterName, @WebParam(name = "tableName") String tableName)
31 105
			throws HadoopServiceException;
32 106

  
107
	/**
108
	 * Drop hbase table.
109
	 * 
110
	 * @param clusterName
111
	 *            the cluster name
112
	 * @param tableName
113
	 *            the table name
114
	 * @return true, if successful
115
	 * @throws HadoopServiceException
116
	 *             the hadoop service exception
117
	 */
33 118
	boolean dropHbaseTable(@WebParam(name = "clusterName") String clusterName, @WebParam(name = "tableName") String tableName) throws HadoopServiceException;
34 119

  
120
	/**
121
	 * Exist hbase table.
122
	 * 
123
	 * @param clusterName
124
	 *            the cluster name
125
	 * @param tableName
126
	 *            the table name
127
	 * @return true, if successful
128
	 * @throws HadoopServiceException
129
	 *             the hadoop service exception
130
	 */
35 131
	boolean existHbaseTable(@WebParam(name = "clusterName") String clusterName, @WebParam(name = "tableName") String tableName) throws HadoopServiceException;
36 132

  
37 133
}

Also available in: Unified diff