co.cask.cdap.test
Interface ApplicationManager

All Known Implementing Classes:
DefaultApplicationManager

public interface ApplicationManager

Instance of this class is for managing deployed application.


Method Summary
<T> DataSetManager<T>
getDataSet(String dataSetName)
          Gets an instance of DataSet of the given dataset name.
 StreamWriter getStreamWriter(String streamName)
          Gets a StreamWriter for writing data to the given stream.
 FlowManager startFlow(String flowName)
          Starts a flow.
 FlowManager startFlow(String flowName, Map<String,String> arguments)
          Starts a flow.
 MapReduceManager startMapReduce(String jobName)
          Starts a mapreduce job.
 MapReduceManager startMapReduce(String jobName, Map<String,String> arguments)
          Starts a mapreduce job.
 ProcedureManager startProcedure(String procedureName)
          Deprecated. As of version 2.6.0, replaced by Service
 ProcedureManager startProcedure(String procedureName, Map<String,String> arguments)
          Deprecated. As of version 2.6.0, replaced by Service
 ServiceManager startService(String serviceName)
          Starts a service.
 ServiceManager startService(String serviceName, Map<String,String> arguments)
          Starts a service.
 SparkManager startSpark(String jobName)
          Starts a Spark job.
 SparkManager startSpark(String jobName, Map<String,String> arguments)
          Starts a Spark job.
 WorkflowManager startWorkflow(String workflowName, Map<String,String> arguments)
          Starts a workflow.
 void stopAll()
          Stops all processors managed by this manager and clear all associated runtime metrics.
 

Method Detail

startFlow

FlowManager startFlow(String flowName)
Starts a flow.

Parameters:
flowName - Name of the flow to start.
Returns:
A FlowManager for controlling the started flow.

startFlow

FlowManager startFlow(String flowName,
                      Map<String,String> arguments)
Starts a flow.

Parameters:
flowName - Name of the flow to start.
arguments - Arguments to be passed while starting a flow.
Returns:
A FlowManager for controlling the started flow.

startMapReduce

MapReduceManager startMapReduce(String jobName)
Starts a mapreduce job.

Parameters:
jobName - Name of the mapreduce job to start.
Returns:
A MapReduceManager for controlling the started mapreduce job.

startMapReduce

MapReduceManager startMapReduce(String jobName,
                                Map<String,String> arguments)
Starts a mapreduce job.

Parameters:
jobName - Name of the mapreduce job to start.
arguments - Arguments to be passed while starting a mapreduce.
Returns:
A MapReduceManager for controlling the started mapreduce job.

startSpark

SparkManager startSpark(String jobName)
Starts a Spark job.

Parameters:
jobName - Name of the spark job to start.
Returns:
A SparkManager for controlling the started spark job.

startSpark

SparkManager startSpark(String jobName,
                        Map<String,String> arguments)
Starts a Spark job.

Parameters:
jobName - Name of the spark job to start.
arguments - Arguments to be passed while starting a spark.
Returns:
A SparkManager for controlling the started spark job.

startProcedure

@Deprecated
ProcedureManager startProcedure(String procedureName)
Deprecated. As of version 2.6.0, replaced by Service

Starts a procedure.

Parameters:
procedureName - Name of the procedure to start.
Returns:
A ProcedureManager for controlling the started procedure.

startProcedure

@Deprecated
ProcedureManager startProcedure(String procedureName,
                                           Map<String,String> arguments)
Deprecated. As of version 2.6.0, replaced by Service

Starts a procedure.

Parameters:
procedureName - Name of the procedure to start.
arguments - Arguments to be passed while starting a procedure.
Returns:
A ProcedureManager for controlling the started procedure.

getStreamWriter

StreamWriter getStreamWriter(String streamName)
Gets a StreamWriter for writing data to the given stream.

Parameters:
streamName - Name of the stream to write to.
Returns:
A StreamWriter.

getDataSet

<T> DataSetManager<T> getDataSet(String dataSetName)
Gets an instance of DataSet of the given dataset name. Operations on the returned DataSet always performed synchronously, i.e. no support for multi-operations transaction.

Type Parameters:
T - Type of the dataset.
Parameters:
dataSetName - Name of the dataset to retrieve.
Returns:
A DataSetManager instance.

stopAll

void stopAll()
Stops all processors managed by this manager and clear all associated runtime metrics.


startWorkflow

WorkflowManager startWorkflow(String workflowName,
                              Map<String,String> arguments)
Starts a workflow.

Parameters:
workflowName -
arguments -
Returns:
WorkflowManager for controlling the started workflow.

startService

ServiceManager startService(String serviceName)
Starts a service.

Parameters:
serviceName - Name of the service to be started.
Returns:
ServiceManager to control the running service.

startService

ServiceManager startService(String serviceName,
                            Map<String,String> arguments)
Starts a service.

Parameters:
serviceName - Name of the service to be started.
arguments - Arguments to be passed for the service.
Returns:
ServiceManager to control the running service.


Copyright © 2015 Cask Data, Inc. Licensed under the Apache License, Version 2.0.