@RestController
@RequestMapping(value="/rest",
produces={"application/xml","application/json"})
public class EmrRestController
extends HerdBaseController
| Constructor and Description |
|---|
EmrRestController() |
| Modifier and Type | Method and Description |
|---|---|
EmrMasterSecurityGroup |
addGroupsToEmrClusterMaster(EmrMasterSecurityGroupAddRequest request)
Adds security groups to the master node of an existing cluster
|
EmrHadoopJarStep |
addHadoopJarStepToEmrCluster(EmrHadoopJarStepAddRequest request)
Adds a Hadoop Jar step to the existing cluster
|
EmrHiveStep |
addHiveStepToEmrCluster(EmrHiveStepAddRequest request)
Adds a hive step to the existing cluster
|
EmrOozieStep |
addOozieStepToEmrCluster(EmrOozieStepAddRequest request)
Adds a oozie step to the existing cluster
|
EmrPigStep |
addPigStepToEmrCluster(EmrPigStepAddRequest request)
Adds a Pig step to the existing cluster
|
EmrShellStep |
addShellStepToEmrCluster(EmrShellStepAddRequest request)
Adds a shell step to the existing cluster
|
EmrCluster |
createEmrCluster(EmrClusterCreateRequest request)
Creates a new EMR cluster.
|
EmrCluster |
getEmrCluster(String namespace,
String emrClusterDefinitionName,
String emrClusterName,
String emrClusterId,
String emrStepId,
Boolean verbose,
Boolean retrieveOozieJobs,
String accountId)
Gets an existing EMR cluster details.
|
OozieWorkflowJob |
getEmrOozieWorkflow(String namespace,
String emrClusterDefinitionName,
String emrClusterName,
String oozieWorkflowJobId,
Boolean verbose,
String emrClusterId,
String accountId)
Retrieves an existing Oozie workflow job for the specified EMR cluster and workflow job ID.
|
OozieWorkflowJob |
runOozieJobToEmrCluster(RunOozieWorkflowRequest request)
Submits an oozie workflow to the existing cluster.
|
EmrCluster |
terminateEmrCluster(String namespace,
String emrClusterDefinitionName,
String emrClusterName,
Boolean overrideTerminationProtection,
String emrClusterId,
String accountId)
Terminates an existing EMR cluster.
|
getList, validateNoDuplicateQueryStringParams@RequestMapping(value="/emrClusters/namespaces/{namespace}/emrClusterDefinitionNames/{emrClusterDefinitionName}/emrClusterNames/{emrClusterName}",
method=GET)
@Secured(value="FN_EMR_CLUSTERS_GET")
public EmrCluster getEmrCluster(@PathVariable(value="namespace")
String namespace,
@PathVariable(value="emrClusterDefinitionName")
String emrClusterDefinitionName,
@PathVariable(value="emrClusterName")
String emrClusterName,
@RequestParam(value="emrClusterId",required=false)
String emrClusterId,
@RequestParam(value="emrStepId",required=false)
String emrStepId,
@RequestParam(value="verbose",required=false,defaultValue="false")
Boolean verbose,
@RequestParam(value="retrieveOozieJobs",required=false,defaultValue="false")
Boolean retrieveOozieJobs,
@RequestParam(value="accountId",required=false)
String accountId)
throws Exception
Requires READ permission on namespace
namespace - the namespaceemrClusterDefinitionName - the EMR cluster definition nameemrClusterName - the EMR cluster nameemrClusterId - the cluster id of the cluster to get detailsemrStepId - the step id of the step to get detailsverbose - parameter for whether to return detailed informationretrieveOozieJobs - parameter for whether to retrieve oozie job informationaccountId - the account IdException - if there was an error getting the EMR cluster.@RequestMapping(value="/emrClusters",
method=POST,
consumes={"application/xml","application/json"})
@Secured(value="FN_EMR_CLUSTERS_POST")
public EmrCluster createEmrCluster(@RequestBody
EmrClusterCreateRequest request)
throws Exception
Requires EXECUTE permission on namespace
request - the information needed to create the EMR cluster.Exception@RequestMapping(value="/emrClusters/namespaces/{namespace}/emrClusterDefinitionNames/{emrClusterDefinitionName}/emrClusterNames/{emrClusterName}",
method=DELETE)
@Secured(value="FN_EMR_CLUSTERS_DELETE")
public EmrCluster terminateEmrCluster(@PathVariable(value="namespace")
String namespace,
@PathVariable(value="emrClusterDefinitionName")
String emrClusterDefinitionName,
@PathVariable(value="emrClusterName")
String emrClusterName,
@RequestParam(value="overrideTerminationProtection",required=false,defaultValue="false")
Boolean overrideTerminationProtection,
@RequestParam(value="emrClusterId",required=false)
String emrClusterId,
@RequestParam(value="accountId",required=false)
String accountId)
throws Exception
Requires EXECUTE permission on namespace
namespace - the namespaceemrClusterDefinitionName - the EMR cluster definition nameemrClusterName - the EMR cluster nameoverrideTerminationProtection - parameter for whether to override termination protectionemrClusterId - EMR cluster IDaccountId - account IdException - if there was an error terminating the EMR cluster.@RequestMapping(value="/emrShellSteps",
method=POST,
consumes={"application/xml","application/json"})
@Secured(value="FN_EMR_SHELL_STEPS_POST")
public EmrShellStep addShellStepToEmrCluster(@RequestBody
EmrShellStepAddRequest request)
throws Exception
Requires EXECUTE permission on namespace
request - the information needed to add shell step to the EMR cluster.Exception - if a shell step couldn't be added to the EMR cluster.@RequestMapping(value="/emrHiveSteps",
method=POST,
consumes={"application/xml","application/json"})
@Secured(value="FN_EMR_HIVE_STEPS_POST")
public EmrHiveStep addHiveStepToEmrCluster(@RequestBody
EmrHiveStepAddRequest request)
throws Exception
Requires EXECUTE permission on namespace
request - the information needed to add hive step to the EMR cluster.Exception@RequestMapping(value="/emrPigSteps",
method=POST,
consumes={"application/xml","application/json"})
@Secured(value="FN_EMR_PIG_STEPS_POST")
public EmrPigStep addPigStepToEmrCluster(@RequestBody
EmrPigStepAddRequest request)
throws Exception
Requires EXECUTE permission on namespace
request - the information needed to add Pig step to the EMR cluster.Exception@RequestMapping(value="/emrOozieSteps",
method=POST,
consumes={"application/xml","application/json"})
@Secured(value="FN_EMR_OOZIE_STEPS_POST")
public EmrOozieStep addOozieStepToEmrCluster(@RequestBody
EmrOozieStepAddRequest request)
throws Exception
Requires EXECUTE permission on namespace
request - the information needed to add oozie step to the EMR cluster.Exception - if an Oozie step couldn't be added to an EMR cluster.@RequestMapping(value="/emrHadoopJarSteps",
method=POST,
consumes={"application/xml","application/json"})
@Secured(value="FN_EMR_HADOOP_JAR_STEPS_POST")
public EmrHadoopJarStep addHadoopJarStepToEmrCluster(@RequestBody
EmrHadoopJarStepAddRequest request)
throws Exception
Requires EXECUTE permission on namespace
request - the information needed to add Hadoop Jar step to the EMR cluster.Exception@RequestMapping(value="/emrMasterSecurityGroups",
method=POST,
consumes={"application/xml","application/json"})
@Secured(value="FN_EMR_MASTER_SECURITY_GROUPS_POST")
public EmrMasterSecurityGroup addGroupsToEmrClusterMaster(@RequestBody
EmrMasterSecurityGroupAddRequest request)
throws Exception
Requires WRITE permission on namespace
request - the information needed to add security groups to master node of the EMR cluster.Exception@RequestMapping(value="/emrOozieWorkflows",
method=POST,
consumes={"application/xml","application/json"})
@Secured(value="FN_EMR_OOZIE_STEPS_POST")
public OozieWorkflowJob runOozieJobToEmrCluster(@RequestBody
RunOozieWorkflowRequest request)
throws Exception
Requires EXECUTE permission on namespace
request - the information needed to run oozie workflow to the EMR cluster.Exception - if an Oozie step couldn't be added to an EMR cluster.@RequestMapping(value="/emrOozieWorkflows/namespaces/{namespace}/emrClusterDefinitionNames/{emrClusterDefinitionName}/emrClusterNames/{emrClusterName}/oozieWorkflowJobIds/{oozieWorkflowJobId}",
method=GET)
@ResponseBody
@Secured(value="FN_EMR_OOZIE_WORKFLOW_GET")
public OozieWorkflowJob getEmrOozieWorkflow(@PathVariable(value="namespace")
String namespace,
@PathVariable(value="emrClusterDefinitionName")
String emrClusterDefinitionName,
@PathVariable(value="emrClusterName")
String emrClusterName,
@PathVariable(value="oozieWorkflowJobId")
String oozieWorkflowJobId,
@RequestParam(value="verbose",required=false,defaultValue="false")
Boolean verbose,
@RequestParam(value="emrClusterId",required=false)
String emrClusterId,
@RequestParam(value="accountId",required=false)
String accountId)
throws Exception
Requires READ permission on namespace
namespace - Namespace of the EMR clusteremrClusterDefinitionName - EMR cluster definition nameemrClusterName - EMR cluster nameoozieWorkflowJobId - Oozie workflow job IDverbose - true to return more detailed information, false or null otherwiseemrClusterId - The EMR cluster IDaccountId - the account IdException - when errors occur, whether user or systemCopyright © 2017. All rights reserved.