public class HadoopDefaultJobInfo extends Object implements HadoopJobInfo, Externalizable
Constructor and Description |
---|
HadoopDefaultJobInfo()
Default constructor required by
Externalizable . |
HadoopDefaultJobInfo(String jobName,
String user,
boolean hasCombiner,
int numReduces,
Map<String,String> props)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
HadoopJobEx |
createJob(Class<? extends HadoopJobEx> jobCls,
HadoopJobId jobId,
IgniteLogger log,
String[] libNames,
HadoopHelper helper)
Creates new job instance for the given ID.
|
boolean |
hasCombiner()
Checks whether job has combiner.
|
boolean |
hasReducer()
Checks whether job has reducer.
|
String |
jobName()
Gets job name.
|
Map<String,String> |
properties() |
String |
property(String name)
Gets optional configuration property for the job.
|
void |
readExternal(ObjectInput in) |
int |
reducers() |
String |
user()
Gets user name.
|
void |
writeExternal(ObjectOutput out) |
public HadoopDefaultJobInfo()
Externalizable
.public HadoopDefaultJobInfo(String jobName, String user, boolean hasCombiner, int numReduces, Map<String,String> props)
jobName
- Job name.user
- User name.hasCombiner
- true
If job has combiner.numReduces
- Number of reducers configured for job.props
- All other properties of the job.@Nullable public String property(String name)
property
in interface HadoopJobInfo
name
- Property name.null
if none.public HadoopJobEx createJob(Class<? extends HadoopJobEx> jobCls, HadoopJobId jobId, IgniteLogger log, @Nullable String[] libNames, HadoopHelper helper) throws IgniteCheckedException
HadoopJobInfo
is reusable for multiple jobs while HadoopJobEx
is for one job execution.
This method will be called once for the same ID on one node, though it can be called on the same host
multiple times from different processes (in case of multiple nodes on the same host or external execution).createJob
in interface HadoopJobInfo
jobCls
- The job class.jobId
- Job ID.log
- Logger.libNames
- Optional additional native library names.helper
- HadoopHelper.IgniteCheckedException
- If failed.public boolean hasCombiner()
hasCombiner
in interface HadoopJobInfo
true
If job has combiner.public boolean hasReducer()
HadoopMapReducePlan.reducers()
.hasReducer
in interface HadoopJobInfo
public int reducers()
reducers
in interface HadoopJobInfo
public String jobName()
jobName
in interface HadoopJobInfo
public String user()
user
in interface HadoopJobInfo
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
Follow @ApacheIgnite
Ignite Fabric : ver. 2.0.0 Release Date : April 30 2017