Package org.pentaho.di.www
Class ExecuteJobServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- org.pentaho.di.www.BaseHttpServlet
-
- org.pentaho.di.www.ExecuteJobServlet
-
- All Implemented Interfaces:
Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
,CartePluginInterface
,CarteServletInterface
public class ExecuteJobServlet extends BaseHttpServlet implements CartePluginInterface
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
CONTEXT_PATH
-
Fields inherited from class org.pentaho.di.www.BaseHttpServlet
detections, jobMap, log, socketRepository, transformationMap
-
-
Constructor Summary
Constructors Constructor Description ExecuteJobServlet()
ExecuteJobServlet(JobMap jobMap)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
String
getContextPath()
String
getService()
protected void
runJob(Job job)
String
toString()
-
Methods inherited from class org.pentaho.di.www.BaseHttpServlet
convertContextPath, doDelete, doPost, doPut, getDetections, getJobMap, getSocketRepository, getTransformationMap, isJettyMode, logBasic, logBasic, logDebug, logDetailed, logDetailed, logError, logError, logError, logMinimal, logRowlevel, setJettyMode, setup
-
Methods inherited from class javax.servlet.http.HttpServlet
doHead, doOptions, doTrace, getLastModified, service, service
-
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.pentaho.di.www.CartePluginInterface
isJettyMode, setJettyMode, setup
-
-
-
-
Field Detail
-
CONTEXT_PATH
public static final String CONTEXT_PATH
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ExecuteJobServlet
public ExecuteJobServlet()
-
ExecuteJobServlet
public ExecuteJobServlet(JobMap jobMap)
-
-
Method Detail
-
doGet
public void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
/kettle/executeJob
GET
Executes job from the specified repository. Connects to the repository provided as a parameter, loads the job from it and executes it. Empty response is returned or response contains output of an error happened during the job execution. Response contains
ERROR
result if error happened during job execution.Example Request:
GET /kettle/executeJob/?rep=my_repository&user=my_user&pass=my_password&job=my_job&level=INFO
Parameters
name description type rep Repository id to connect to. query user User name to be used to connect to repository. query pass User password to be used to connect to repository. query job Job name to be loaded and executed. query level Logging level to be used for job execution (i.e. Debug). query *any name* All the other parameters will be sent to the job for using as variables. When necessary you can add custom parameters to the request. They will be used to set the job variables values. query Response Body
element: (custom) media types: application/xml Response contains error output of the job executed or Carte object Id if the execution was successful.
Example Error Response:
OK Job started 74d96aa6-f29a-4bac-a26a-06a8c8f107e5 Status Codes
code description 200 Request was processed. 500 Internal server error occurs during request processing. - Specified by:
doGet
in interfaceCartePluginInterface
- Overrides:
doGet
in classjavax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
IOException
-
getService
public String getService()
- Specified by:
getService
in interfaceCarteServletInterface
-
runJob
protected void runJob(Job job)
-
getContextPath
public String getContextPath()
- Specified by:
getContextPath
in interfaceCartePluginInterface
-
-