public class V1JobServlet extends BaseJobServlet
JsonRestServlet.ParameterInfo, JsonRestServlet.ResourceInfo
Modifier and Type | Field and Description |
---|---|
static String |
COORD_ACTIONS_DEFAULT_LENGTH |
AUDIT_ERROR_CODE, AUDIT_ERROR_MESSAGE, AUDIT_HTTP_STATUS_CODE, AUDIT_OPERATION, AUDIT_PARAM, AUTH_TOKEN, INSTRUMENTATION_GROUP, TEXT_UTF8, UNDEF, USER_NAME, XML_UTF8
Modifier | Constructor and Description |
---|---|
|
V1JobServlet() |
protected |
V1JobServlet(String instrumentation_name) |
Modifier and Type | Method and Description |
---|---|
protected void |
changeJob(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
protected method to change a coordinator job
|
protected JsonBean |
getCoordinatorJob(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Get coord job info
|
protected int |
getCoordinatorJobLength(int defaultLen,
int len)
Given the requested length and the default length, determine how many coordinator jobs to return.
|
protected String |
getJMSTopicName(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
abstract method to get JMS topic name for a job
|
protected JsonBean |
getJob(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
abstract method to get a job, either workflow or coordinator, in JsonBean representation
|
protected String |
getJobDefinition(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
abstract method to get definition of a job, either workflow or coordinator
|
protected org.json.simple.JSONObject |
getJobsByParentId(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
abstract method to get workflow job ids from the parent id
i.e.
|
protected String |
getJobStatus(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Abstract method to get status for a job
|
protected JsonBean |
getWorkflowAction(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Get wf action info
|
protected JsonBean |
getWorkflowActionBean(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected JsonBean |
getWorkflowJob(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Get workflow job
|
protected JsonBean |
getWorkflowJobBean(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Get workflow job
|
protected org.json.simple.JSONObject |
ignoreJob(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected org.json.simple.JSONObject |
killJob(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
abstract method to kill a job, either workflow or coordinator
|
protected org.json.simple.JSONObject |
reRunJob(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.apache.hadoop.conf.Configuration conf)
abstract method to re-run a job, either workflow or coordinator
|
protected void |
resumeJob(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
abstract method to resume a job, either workflow or coordinator
|
protected void |
startJob(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
abstract method to start a job, either workflow or coordinator
|
protected void |
streamJobAuditLog(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected void |
streamJobErrorLog(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
abstract method to get and stream error log information of job, either workflow, coordinator or bundle
|
protected void |
streamJobGraph(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
abstract method to create and stream image for runtime DAG -- workflow only
|
protected void |
streamJobLog(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
abstract method to get and stream log information of job, either workflow or coordinator
|
protected void |
suspendJob(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
abstract method to suspend a job, either workflow or coordinator
|
protected org.json.simple.JSONObject |
updateJob(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.apache.hadoop.conf.Configuration conf)
not supported for v1
|
doGet, doPut, getWfActionByJobIdAndName
addCron, getContentType, getProxyUser, getResourceName, getUser, incrCounter, init, sendErrorResponse, sendJsonResponse, sendJsonResponse, service, setAllowSafeModeChanges, setLogInfo, startCron, stopCron, validateContentType, validateRestUrl
doDelete, doHead, doOptions, doPost, doTrace, getLastModified, service
public static final String COORD_ACTIONS_DEFAULT_LENGTH
public V1JobServlet()
protected V1JobServlet(String instrumentation_name)
protected void startJob(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws XServletException, IOException
BaseJobServlet
request
- the requestresponse
- the responseXServletException
- in case of any servlet errorIOException
- in case of any I/O errorprotected void resumeJob(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws XServletException, IOException
BaseJobServlet
request
- the requestresponse
- the responseXServletException
- in case of any servlet errorIOException
- in case of any I/O errorprotected void suspendJob(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws XServletException, IOException
BaseJobServlet
request
- the requestresponse
- the responseXServletException
- in case of any servlet errorIOException
- in case of any I/O errorprotected org.json.simple.JSONObject killJob(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws XServletException, IOException
BaseJobServlet
request
- the requestresponse
- the responseXServletException
- in case of any servlet errorIOException
- in case of any I/O errorprotected void changeJob(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws XServletException, IOException
request
- request objectresponse
- response objectXServletException
IOException
protected org.json.simple.JSONObject ignoreJob(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws XServletException, IOException
XServletException
IOException
protected org.json.simple.JSONObject reRunJob(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.apache.hadoop.conf.Configuration conf) throws XServletException, IOException
BaseJobServlet
request
- the requestresponse
- the responseconf
- the configuration to useXServletException
- in case of any servlet errorIOException
- in case of any I/O errorprotected JsonBean getJob(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws XServletException, IOException, BaseEngineException
BaseJobServlet
request
- the requestresponse
- the responseXServletException
- in case of any servlet errorIOException
- in case of any I/O errorBaseEngineException
- thrown if the job could not be retrievedprotected String getJobDefinition(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws XServletException, IOException
BaseJobServlet
request
- the requestresponse
- the responseXServletException
- in case of any servlet errorIOException
- in case of any I/O errorprotected void streamJobLog(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws XServletException, IOException
BaseJobServlet
request
- the requestresponse
- the responseXServletException
- in case of any servlet errorIOException
- in case of any I/O errorprotected void streamJobGraph(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws XServletException, IOException
BaseJobServlet
request
- the requestresponse
- the responseXServletException
- in case of any servlet errorIOException
- in case of any I/O errorprotected JsonBean getWorkflowJob(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws XServletException
request
- servlet requestresponse
- servlet responseXServletException
protected JsonBean getWorkflowJobBean(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws XServletException
request
- servlet requestresponse
- servlet responseXServletException
protected JsonBean getWorkflowAction(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws XServletException
request
- servlet requestresponse
- servlet responseXServletException
protected JsonBean getWorkflowActionBean(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws XServletException
XServletException
protected JsonBean getCoordinatorJob(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws XServletException, BaseEngineException
request
- servlet requestresponse
- servlet responseXServletException
BaseEngineException
protected int getCoordinatorJobLength(int defaultLen, int len)
getCoordinatorJob(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
defaultLen
- The default lengthlen
- The requested lengthprotected String getJMSTopicName(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws XServletException, IOException
BaseJobServlet
request
- the requestresponse
- the responseXServletException
- in case of any servlet errorIOException
- in case of any I/O errorprotected org.json.simple.JSONObject getJobsByParentId(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws XServletException, IOException
BaseJobServlet
request
- the requestresponse
- the responseXServletException
- in case of any servlet errorIOException
- in case of any I/O errorprotected org.json.simple.JSONObject updateJob(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.apache.hadoop.conf.Configuration conf) throws XServletException, IOException
request
- the requestresponse
- the responseconf
- the ConfigurationXServletException
- the x servlet exceptionIOException
- Signals that an I/O exception has occurred.protected String getJobStatus(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws XServletException, IOException
BaseJobServlet
request
- the requestresponse
- the responseXServletException
- the x servlet exceptionIOException
- Signals that an I/O exception has occurred.protected void streamJobErrorLog(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws XServletException, IOException
BaseJobServlet
request
- the requestresponse
- the responseXServletException
- in case of any servlet errorIOException
- in case of any I/O errorprotected void streamJobAuditLog(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws XServletException, IOException
XServletException
IOException
Copyright © 2018 Apache Software Foundation. All rights reserved.