org.apache.oozie.servlet
Class V1JobServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.apache.oozie.servlet.JsonRestServlet
              extended by org.apache.oozie.servlet.BaseJobServlet
                  extended by org.apache.oozie.servlet.V1JobServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
Direct Known Subclasses:
V2JobServlet

public class V1JobServlet
extends BaseJobServlet

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.oozie.servlet.JsonRestServlet
JsonRestServlet.ParameterInfo, JsonRestServlet.ResourceInfo
 
Field Summary
static String COORD_ACTIONS_DEFAULT_LENGTH
           
 
Fields inherited from class org.apache.oozie.servlet.JsonRestServlet
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
 
Constructor Summary
  V1JobServlet()
           
protected V1JobServlet(String instrumentation_name)
           
 
Method Summary
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  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  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  void 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 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
 
Methods inherited from class org.apache.oozie.servlet.BaseJobServlet
doGet, doPut
 
Methods inherited from class org.apache.oozie.servlet.JsonRestServlet
getContentType, getResourceName, getUser, init, sendErrorResponse, sendJsonResponse, sendJsonResponse, service, setAllowSafeModeChanges, setLogInfo, startCron, stopCron, validateContentType, validateRestUrl
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPost, doTrace, getLastModified, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COORD_ACTIONS_DEFAULT_LENGTH

public static final String COORD_ACTIONS_DEFAULT_LENGTH
See Also:
Constant Field Values
Constructor Detail

V1JobServlet

public V1JobServlet()

V1JobServlet

protected V1JobServlet(String instrumentation_name)
Method Detail

startJob

protected void startJob(javax.servlet.http.HttpServletRequest request,
                        javax.servlet.http.HttpServletResponse response)
                 throws XServletException,
                        IOException
Description copied from class: BaseJobServlet
abstract method to start a job, either workflow or coordinator

Throws:
XServletException
IOException - TODO

resumeJob

protected void resumeJob(javax.servlet.http.HttpServletRequest request,
                         javax.servlet.http.HttpServletResponse response)
                  throws XServletException,
                         IOException
Description copied from class: BaseJobServlet
abstract method to resume a job, either workflow or coordinator

Throws:
XServletException
IOException - TODO

suspendJob

protected void suspendJob(javax.servlet.http.HttpServletRequest request,
                          javax.servlet.http.HttpServletResponse response)
                   throws XServletException,
                          IOException
Description copied from class: BaseJobServlet
abstract method to suspend a job, either workflow or coordinator

Throws:
XServletException
IOException - TODO

killJob

protected void killJob(javax.servlet.http.HttpServletRequest request,
                       javax.servlet.http.HttpServletResponse response)
                throws XServletException,
                       IOException
Description copied from class: BaseJobServlet
abstract method to kill a job, either workflow or coordinator

Throws:
XServletException
IOException - TODO

changeJob

protected void changeJob(javax.servlet.http.HttpServletRequest request,
                         javax.servlet.http.HttpServletResponse response)
                  throws XServletException,
                         IOException
protected method to change a coordinator job

Parameters:
request - request object
response - response object
Throws:
XServletException
IOException

reRunJob

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
Description copied from class: BaseJobServlet
abstract method to re-run a job, either workflow or coordinator

Throws:
XServletException
IOException - TODO

getJob

protected JsonBean getJob(javax.servlet.http.HttpServletRequest request,
                          javax.servlet.http.HttpServletResponse response)
                   throws XServletException,
                          IOException,
                          BaseEngineException
Description copied from class: BaseJobServlet
abstract method to get a job, either workflow or coordinator, in JsonBean representation

Returns:
JsonBean representation of a job, either workflow or coordinator
Throws:
XServletException
IOException - TODO
BaseEngineException

getJobDefinition

protected String getJobDefinition(javax.servlet.http.HttpServletRequest request,
                                  javax.servlet.http.HttpServletResponse response)
                           throws XServletException,
                                  IOException
Description copied from class: BaseJobServlet
abstract method to get definition of a job, either workflow or coordinator

Returns:
job, either workflow or coordinator, definition in string format
Throws:
XServletException
IOException - TODO

streamJobLog

protected void streamJobLog(javax.servlet.http.HttpServletRequest request,
                            javax.servlet.http.HttpServletResponse response)
                     throws XServletException,
                            IOException
Description copied from class: BaseJobServlet
abstract method to get and stream log information of job, either workflow or coordinator

Throws:
XServletException
IOException

streamJobGraph

protected void streamJobGraph(javax.servlet.http.HttpServletRequest request,
                              javax.servlet.http.HttpServletResponse response)
                       throws XServletException,
                              IOException
Description copied from class: BaseJobServlet
abstract method to create and stream image for runtime DAG -- workflow only

Throws:
XServletException
IOException

getWorkflowJob

protected JsonBean getWorkflowJob(javax.servlet.http.HttpServletRequest request,
                                  javax.servlet.http.HttpServletResponse response)
                           throws XServletException
Get workflow job

Parameters:
request - servlet request
response - servlet response
Returns:
JsonBean WorkflowJobBean
Throws:
XServletException

getWorkflowJobBean

protected JsonBean getWorkflowJobBean(javax.servlet.http.HttpServletRequest request,
                                      javax.servlet.http.HttpServletResponse response)
                               throws XServletException
Get workflow job

Parameters:
request - servlet request
response - servlet response
Returns:
JsonBean WorkflowJobBean
Throws:
XServletException

getWorkflowAction

protected JsonBean getWorkflowAction(javax.servlet.http.HttpServletRequest request,
                                     javax.servlet.http.HttpServletResponse response)
                              throws XServletException
Get wf action info

Parameters:
request - servlet request
response - servlet response
Returns:
JsonBean WorkflowActionBean
Throws:
XServletException

getWorkflowActionBean

protected JsonBean getWorkflowActionBean(javax.servlet.http.HttpServletRequest request,
                                         javax.servlet.http.HttpServletResponse response)
                                  throws XServletException
Throws:
XServletException

getCoordinatorJob

protected JsonBean getCoordinatorJob(javax.servlet.http.HttpServletRequest request,
                                     javax.servlet.http.HttpServletResponse response)
                              throws XServletException,
                                     BaseEngineException
Get coord job info

Parameters:
request - servlet request
response - servlet response
Returns:
JsonBean CoordinatorJobBean
Throws:
XServletException
BaseEngineException

getJMSTopicName

protected String getJMSTopicName(javax.servlet.http.HttpServletRequest request,
                                 javax.servlet.http.HttpServletResponse response)
                          throws XServletException,
                                 IOException
Description copied from class: BaseJobServlet
abstract method to get JMS topic name for a job

Throws:
XServletException
IOException


Copyright © 2013 Apache Software Foundation. All Rights Reserved.