public class DefaultApplicationManager extends Object implements ApplicationManager
ApplicationManager.| Constructor and Description |
|---|
DefaultApplicationManager(org.apache.twill.filesystem.LocationFactory locationFactory,
co.cask.cdap.data2.dataset2.DatasetFramework datasetFramework,
co.cask.tephra.TransactionSystemClient txSystemClient,
StreamWriterFactory streamWriterFactory,
ProcedureClientFactory procedureClientFactory,
co.cask.cdap.common.conf.CConfiguration configuration,
org.apache.twill.discovery.DiscoveryServiceClient discoveryServiceClient,
AppFabricHttpHandler httpHandler,
ServiceHttpHandler serviceHttpHandler,
org.junit.rules.TemporaryFolder tempFolder,
String accountId,
String applicationId,
org.apache.twill.filesystem.Location deployedJar) |
| Modifier and Type | Method and Description |
|---|---|
<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)
Starts a procedure.
|
ProcedureManager |
startProcedure(String procedureName,
Map<String,String> arguments)
Starts a procedure.
|
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.
|
@Inject
public DefaultApplicationManager(org.apache.twill.filesystem.LocationFactory locationFactory,
co.cask.cdap.data2.dataset2.DatasetFramework datasetFramework,
co.cask.tephra.TransactionSystemClient txSystemClient,
StreamWriterFactory streamWriterFactory,
ProcedureClientFactory procedureClientFactory,
co.cask.cdap.common.conf.CConfiguration configuration,
org.apache.twill.discovery.DiscoveryServiceClient discoveryServiceClient,
AppFabricHttpHandler httpHandler,
ServiceHttpHandler serviceHttpHandler,
org.junit.rules.TemporaryFolder tempFolder,
String accountId,
String applicationId,
org.apache.twill.filesystem.Location deployedJar)
public FlowManager startFlow(String flowName)
ApplicationManagerstartFlow in interface ApplicationManagerflowName - Name of the flow to start.FlowManager for controlling the started flow.public FlowManager startFlow(String flowName, Map<String,String> arguments)
ApplicationManagerstartFlow in interface ApplicationManagerflowName - Name of the flow to start.arguments - Arguments to be passed while starting a flow.FlowManager for controlling the started flow.public MapReduceManager startMapReduce(String jobName)
ApplicationManagerstartMapReduce in interface ApplicationManagerjobName - Name of the mapreduce job to start.MapReduceManager for controlling the started mapreduce job.public MapReduceManager startMapReduce(String jobName, Map<String,String> arguments)
ApplicationManagerstartMapReduce in interface ApplicationManagerjobName - Name of the mapreduce job to start.arguments - Arguments to be passed while starting a mapreduce.MapReduceManager for controlling the started mapreduce job.public SparkManager startSpark(String jobName)
ApplicationManagerstartSpark in interface ApplicationManagerjobName - Name of the spark job to start.SparkManager for controlling the started spark job.public SparkManager startSpark(String jobName, Map<String,String> arguments)
ApplicationManagerstartSpark in interface ApplicationManagerjobName - Name of the spark job to start.arguments - Arguments to be passed while starting a spark.SparkManager for controlling the started spark job.public ProcedureManager startProcedure(String procedureName)
ApplicationManagerstartProcedure in interface ApplicationManagerprocedureName - Name of the procedure to start.ProcedureManager for controlling the started procedure.public ProcedureManager startProcedure(String procedureName, Map<String,String> arguments)
ApplicationManagerstartProcedure in interface ApplicationManagerprocedureName - Name of the procedure to start.arguments - Arguments to be passed while starting a procedure.ProcedureManager for controlling the started procedure.public WorkflowManager startWorkflow(String workflowName, Map<String,String> arguments)
ApplicationManagerstartWorkflow in interface ApplicationManagerWorkflowManager for controlling the started workflow.public ServiceManager startService(String serviceName)
ApplicationManagerstartService in interface ApplicationManagerserviceName - Name of the service to be started.ServiceManager to control the running service.public ServiceManager startService(String serviceName, Map<String,String> arguments)
ApplicationManagerstartService in interface ApplicationManagerserviceName - Name of the service to be started.arguments - Arguments to be passed for the service.ServiceManager to control the running service.public StreamWriter getStreamWriter(String streamName)
ApplicationManagerStreamWriter for writing data to the given stream.getStreamWriter in interface ApplicationManagerstreamName - Name of the stream to write to.StreamWriter.public <T> DataSetManager<T> getDataSet(String dataSetName)
ApplicationManagerDataSet of the given dataset name.
Operations on the returned DataSet always performed synchronously,
i.e. no support for multi-operations transaction.getDataSet in interface ApplicationManagerT - Type of the dataset.dataSetName - Name of the dataset to retrieve.DataSetManager instance.public void stopAll()
ApplicationManagerstopAll in interface ApplicationManagerCopyright © 2015 Cask Data, Inc. Licensed under the Apache License, Version 2.0.