 |
About this Library
- Based on the 2009-03-31 API version.
What's New?
Prerequisites
Reference Documentation
Package Content
| Path |
Overview |
|
lib
|
Binary distribution of library
|
|
src
|
Source distribution of library.
|
|
third-party
|
Binary distribution of library dependencies.
|
|
build.xml
|
Ant build file to build the library
|
Quick Start
Library comes with code samples for each available service API.
To get started with the library, follow these steps:
- Extract the amazon-elasticmapreduce-2009-03-31-java-library.zip file into a working directory.
- Add all sources under "src" directory to your compilation path.
- Add all jars files under "third-party/*" directory to your classpath. NOTE: if you are using JDK 1.6, do not add jaxb jars
- Edit desired sample. For example: DescribeJobFlowsSample.java
- Set AWS Access Key ID and AWS Secret Access Key
String accessKeyId = "Your Access Key ID";
String secretAccessKey = "Your Secret Access Key";
- Set request parameters. For example, find following pre-generated snippet:
DescribeJobFlowsRequest request = new DescribeJobFlowsRequest();
// @TODO: set request parameters here
// invokeDescribeJobFlows(service, request);
- And uncomment third line:
DescribeJobFlowsRequest request = new DescribeJobFlowsRequest();
invokeDescribeJobFlows(service, request);
- Compile and run DescribeJobFlows. You should see the output
similar to the following:
DescribeJobFlowsResponse
ResponseMetadata
RequestId
95cdcb68-f46c-400b-8265-8c2de2a5c475
Note, you may also see additional debugging output. To adjust level of debugging, modify log4j.properties available in the root of the source tree.
- Experiment with samples. When ready, add library binary distribution to your application classpath, and use it.
Making Requests to a Different Region
To make the service call to a different region, instantiate the client with the configuration object, and pass the region-specific endpoint. For example:
AmazonElasticMapReduce service = new AmazonElasticMapReduceClient
(accessKeyId, secretAccessKey,
new AmazonElasticMapReduceConfig()
.withServiceURL("https://eu-west-1.elasticmapreduce.amazonaws.com"));
See the Amazon Elastic MapReduce Developer Guide for a complete list of region endpoints.
Comments, Questions or Feedback
If you have any comments, questions or feedback on the library, please post it here.
|