This class provides helper methods for creating common Elastic MapReduce step
types. To use StepFactory, you should construct it with the appropriate bucket
for your region. The official bucket format is "<region>.elasticmapreduce", so
us-east-1 would use the bucket "us-east-1.elasticmapreduce".
Namespace: Amazon.ElasticMapReduce.ModelAssembly: AWSSDK (in AWSSDK.dll) Version: 1.4.10.0 (1.4.10.0)
Syntax
| C# | Visual Basic | Visual C++ |
public class StepFactory
Public Class StepFactory
public ref class StepFactory
Members
| All Members | Constructors | Methods |
| Member | Description | |
|---|---|---|
| StepFactory()()()() | Initializes a new instance of the StepFactory class | |
| StepFactory(String) | Initializes a new instance of the StepFactory class | |
| Equals(Object) | (Inherited from Object.) | |
| GetHashCode()()()() |
Serves as a hash function for a particular type.
(Inherited from Object.) | |
| GetType()()()() |
Gets the Type of the current instance.
(Inherited from Object.) | |
| NewEnableDebuggingStep()()()() |
When run as the first step in your job flow, enables the Hadoop debugging UI
in the AWS Management Console.
| |
| NewInstallHiveStep()()()() |
Step that installs Hive on your job flow.
| |
| NewInstallHiveStep(array<StepFactory..::..HiveVersion>[]()[][]) |
Step that installs Hive on your job flow.
| |
| NewInstallPigStep()()()() |
Step that installs Pig on your job flow.
| |
| NewRunHiveScriptStep(String, array<String>[]()[][]) |
Step that runs a Hive script on your job flow.
| |
| NewRunPigScriptStep(String, array<String>[]()[][]) |
Step that runs a Pig script on your job flow.
| |
| NewScriptRunnerStep(String, array<String>[]()[][]) |
Runs a specified script on the master node of your cluster.
| |
| ToString()()()() | (Inherited from Object.) |
Examples
Create an interactive Hive job flow with debugging enabled:
CopyC#
AmazonElasticMapReduce emr = AWSClientFactory.CreateAmazonElasticMapReduceClient(accessKey, secretKey); StepFactory stepFactory = new StepFactory(); StepConfig enableDebugging = new StepConfig() .WithName("Enable Debugging") .WithActionOnFailure("TERMINATE_JOB_FLOW") .WithHadoopJarStep(stepFactory.NewEnableDebuggingStep()); StepConfig installHive = new StepConfig() .WithName("Install Hive") .WithActionOnFailure("TERMINATE_JOB_FLOW") .WithHadoopJarStep(stepFactory.NewInstallHiveStep()); RunJobFlowRequest request = new RunJobFlowRequest() .WithName("Hive Interactive") .WithSteps(enableDebugging, installHive) .WithLogUri("s3://log-bucket/") .WithInstances(new JobFlowInstancesConfig() .WithEc2KeyName("keypair") .WithHadoopVersion("0.20") .WithInstanceCount(5) .WithKeepJobFlowAliveWhenNoSteps(true) .WithMasterInstanceType("m1.small") .WithSlaveInstanceType("m1.small")); RunJobFlowResponse response = emr.RunJobFlow(request);