/custom/mapreduce/schedulejob/{jobtitle}/{jobdesc}/{communityIds}/{jarURL}/{timeToRun}/{frequencyToRun}/{mapperClass}/{reducerClass}/{combinerClass}/{query}/{inputcollection}/{outputKey}/{outputValue}
Schedules a hadoop map reduce job to be ran in the future. Returns the output collection id in the data field of the response if successfully queued to run.
Authentication
Required, see Auth - Login.
Arguments
jobtitle (required)
A descriptive name of the job being submitted.
jobdesc (required)
A description of what the job being submitted is attempting to do.
communityIds (required)
Community ID, or IDs (comma-separated), that the map reduce job wants to run on. These will be appended to the mongo query.
jarURL (required)
A URL to the location of the jar file to run for the job, this can be in our Shares table or hosted somewhere else on the web.
timeToRun (required)
The time you want a job to be run after in long form. For example if you want it to run immediately when possible you can submit 0. If you want the job to run after January 1, 2015 submit: 1420106400000.
frequencyToRun (required)
How often the job should be ran, either: NONE, DAILY, WEEKLY, MONTHLY. This will cause the job to get resubmitted after running, use NONE if you only want the job to run once.
mapperClass (required)
The java classpath to the jobs mapper, it should be in the form of package.file$class
reducerClass (required)
The java classpath to the jobs reducer, it should be in the form of package.file$class
combinerClass (required)
The java classpath to the jobs combiner, it should be in the form of package.file$class (use the reducer if you have not written a combiner or submit null).
query (required)
The mongo query to use to get the jobs data. {} is a blank query or you can submit null.
inputcollection (required)
The mongo collection you want to use as input. You can submit DOC_METADATA to get the documents table or grab a previous map reduce results table in your communities by submitting its id.
outputKey (required)
The classpath for the map reduce output format key usually org.apache.hadoop.io.Text
outputValue (required)
The classpath for the map reduce output format value usually org.apache.hadoop.io.IntWritable
Example
Example Response
{"response":{"action":"Schedule MapReduce Job","success":true,"message":"Job scheduled successfully, will run on: Wed Dec 31 19:00:00 EST 1969","time":246},"data":"4f2007dd8196fe53a52c25a1"}
Error Response
{"response":{"action":"Schedule MapReduce Job","success":false,"message":"You are not allowed to use the given input collection.","time":142}}