cloud big data developer guide - rackspace.com · 3/13/2013  · among the benefits of cloud big...

29
Preview docs.rackspace.com/api

Upload: others

Post on 02-Aug-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Cloud Big Data Developer Guide - rackspace.com · 3/13/2013  · Among the benefits of Cloud Big Data, it allows you to: • Create or resize Hadoop clusters in minutes and pay only

Previe

w

docs.rackspace.com/api

Page 2: Cloud Big Data Developer Guide - rackspace.com · 3/13/2013  · Among the benefits of Cloud Big Data, it allows you to: • Create or resize Hadoop clusters in minutes and pay only

Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Cloud Big Data Developer Guide Mar 13, 2013 API v1.0 Preview

ii

Cloud Big Data Developer GuideAPI v1.0 Preview (2013-03-13)Copyright © 2012, 2013

This document is intended for software developers interested in developing applications using the Rackspace Cloud Big DataApplication Programming Interface (API). The document is for informational purposes only and is provided “AS IS.”

RACKSPACE MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED, AS TO THE ACCURACY ORCOMPLETENESS OF THE CONTENTS OF THIS DOCUMENT AND RESERVES THE RIGHT TO MAKE CHANGES TO SPECIFICATIONS ANDPRODUCT/SERVICES DESCRIPTION AT ANY TIME WITHOUT NOTICE. RACKSPACE SERVICES OFFERINGS ARE SUBJECT TO CHANGEWITHOUT NOTICE. USERS MUST TAKE FULL RESPONSIBILITY FOR APPLICATION OF ANY SERVICES MENTIONED HEREIN. EXCEPTAS SET FORTH IN RACKSPACE GENERAL TERMS AND CONDITIONS AND/OR CLOUD TERMS OF SERVICE, RACKSPACE ASSUMES NOLIABILITY WHATSOEVER, AND DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY, RELATING TO ITS SERVICES INCLUDING, BUT NOTLIMITED TO, THE IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT.

Except as expressly provided in any written license agreement from Rackspace, the furnishing of this document does not give you anylicense to patents, trademarks, copyrights, or other intellectual property.

Rackspace®, Rackspace logo and Fanatical Support® are registered service marks of Rackspace US, Inc. All other product names andtrademarks used in this document are for identification purposes only and are property of their respective owners.

Page 3: Cloud Big Data Developer Guide - rackspace.com · 3/13/2013  · Among the benefits of Cloud Big Data, it allows you to: • Create or resize Hadoop clusters in minutes and pay only

Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Cloud Big Data Developer Guide Mar 13, 2013 API v1.0 Preview

iii

Table of ContentsOverview ........................................................................................................................ vi

1. Intended Audience ............................................................................................ vii2. Document Change History ................................................................................. vii3. Additional Resources .......................................................................................... vii4. API Contract Changes ........................................................................................ vii5. Concepts ........................................................................................................... viii

5.1. Cluster .................................................................................................... viii5.2. Data Transfer ......................................................................................... viii5.3. SCP Server Proxy .................................................................................... viii5.4. HDFS ...................................................................................................... viii5.5. MapReduce ............................................................................................ viii5.6. Node ...................................................................................................... viii5.7. Service Catalog ....................................................................................... viii5.8. Tenant ID ............................................................................................... viii

1. General API Information ............................................................................................. 11.1. Authentication ................................................................................................. 11.2. Request/Response Types .................................................................................. 21.3. Statuses ............................................................................................................ 3

2. API Operations ............................................................................................................ 42.1. Create New Cluster .......................................................................................... 42.2. List All Clusters ................................................................................................. 52.3. Get Cluster Details ............................................................................................ 62.4. Resize a Cluster ................................................................................................ 72.5. List Cluster Nodes ............................................................................................. 82.6. Get Node Details ............................................................................................ 102.7. Delete Cluster ................................................................................................. 112.8. View Profile Information ................................................................................ 122.9. Update Profile ................................................................................................ 132.10. List Available Flavors ..................................................................................... 142.11. List Flavor Details .......................................................................................... 152.12. List Cluster Types .......................................................................................... 162.13. List Cluster Type Details ................................................................................ 172.14. List Supported Flavors for Type ..................................................................... 182.15. List Supported Cluster Types for a Flavor ....................................................... 192.16. View Resource Limits .................................................................................... 20

Page 4: Cloud Big Data Developer Guide - rackspace.com · 3/13/2013  · Among the benefits of Cloud Big Data, it allows you to: • Create or resize Hadoop clusters in minutes and pay only

Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Cloud Big Data Developer Guide Mar 13, 2013 API v1.0 Preview

iv

List of Tables1.1. Response Formats .................................................................................................... 2

Page 5: Cloud Big Data Developer Guide - rackspace.com · 3/13/2013  · Among the benefits of Cloud Big Data, it allows you to: • Create or resize Hadoop clusters in minutes and pay only

Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Cloud Big Data Developer Guide Mar 13, 2013 API v1.0 Preview

v

List of Examples2.1. Create Cluster Request: JSON ................................................................................... 42.2. Create Cluster Response: JSON ................................................................................. 42.3. List Clusters Request: JSON ....................................................................................... 52.4. List Clusters Response: JSON ..................................................................................... 52.5. Get Cluster Details: JSON .......................................................................................... 62.6. Get Cluster Details: JSON .......................................................................................... 62.7. Perform Action on a Cluster Request: JSON .............................................................. 72.8. Perform Action on a Cluster: JSON ........................................................................... 72.9. List Cluster Nodes Request: JSON .............................................................................. 82.10. List Cluster Nodes Response: JSON .......................................................................... 82.11. Get Node Details Request: JSON ........................................................................... 102.12. Get Node Details Response: JSON ......................................................................... 102.13. Delete Cluster Request: JSON ................................................................................ 112.14. Delete Cluster Response: JSON .............................................................................. 112.15. Get Profile Request: JSON ..................................................................................... 122.16. Get Profile Response: JSON ................................................................................... 122.17. Update Profile Request: JSON ............................................................................... 132.18. Update Profile Response: JSON ............................................................................. 132.19. List Flavors Request: JSON .................................................................................... 142.20. List Flavors Response: JSON .................................................................................. 142.21. List Flavor Details Request: JSON .......................................................................... 162.22. List Flavor Details Response: JSON ........................................................................ 162.23. List Cluster Types Request: JSON ........................................................................... 162.24. List Cluster Types Response: JSON ......................................................................... 172.25. View Cluster Details Request: JSON ....................................................................... 172.26. View Cluster Details Response: JSON ..................................................................... 172.27. List Supported Flavors for Type Request: JSON ...................................................... 182.28. List Supported Flavors for Type Response: JSON .................................................... 182.29. List Supported Cluster Types for a Flavor Request: JSON ........................................ 192.30. List Supported Cluster Types for a Flavor Response: JSON ...................................... 192.31. View Resource Limits Request: JSON ..................................................................... 202.32. View Resource Limits Response: JSON ................................................................... 20

Page 6: Cloud Big Data Developer Guide - rackspace.com · 3/13/2013  · Among the benefits of Cloud Big Data, it allows you to: • Create or resize Hadoop clusters in minutes and pay only

Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Cloud Big Data Developer Guide Mar 13, 2013 API v1.0 Preview

vi

OverviewRackspace Cloud Big Data (CBD) is an on-demand Hadoop service on the Rackspace opencloud. It alleviates the pain associated with deploying, managing, and scaling Hadoopclusters, allowing you to focus on your core business.

There are two primary use cases for Cloud Big Data: (1) To create on-demand infrastructurefor applications in production where physical servers would be too costly and time-consuming to configure and maintain and (2) To develop, test, and pilot data analysisapplications.

Among the benefits of Cloud Big Data, it allows you to:

• Create or resize Hadoop clusters in minutes and pay only for what you use.

• Access Hortonworks Data Platform (HDP), an enterprise-ready distribution that is 100%Apache open source.

• Provision and manage Hadoop using an easy-to-use Control Panel and a RESTful API.

• Seamlessly access data in Cloud Files containers.

• Gain interoperability with any third party software tool that supports HDP.

• Fanatical Support® on a 24x7x365 basis via chat, phone or ticket.

Interactions with CBD occur programmatically via the API, as described in this developerguide.

The Preview program enables customers and Rackers by invitation to test an earlyversion of the product and provide feedback of the product and capabilities. The CBDPreview Program is a pre-production service offering covered by the Beta Services terms (rackspace.com/information/legal/testterms/) in our Rackspace Cloud Terms of Service.

Preview users must meet the following criteria:

• A Rackspace Cloud account.• Prior knowledge of Hadoop or a 3rd party tool that works with Hadoop.• Ability to work with the Hortonworks Data Platform.• Basic familiarity with Cloud and RESTful APIs.• A willingness to provide feedback to Rackspace’s Product and Product Marketing

functions.

The following is supported during the Preview Program:

• Operating System – CentOS 6.3.• Hadoop Distribution – Hortonworks Data Platform (HDP) version 1.1.

The Preview Program has some limitations. By using the Cloud Big Data API, you agree andunderstand that:

• CBD includes a Swift integration feature wherein Hadoop, MapReduce, or Pig jobscan directly reference Cloud Files containers. Currently, it is only possible to referencecontainers in DFW.

Page 7: Cloud Big Data Developer Guide - rackspace.com · 3/13/2013  · Among the benefits of Cloud Big Data, it allows you to: • Create or resize Hadoop clusters in minutes and pay only

Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Cloud Big Data Developer Guide Mar 13, 2013 API v1.0 Preview

vii

• There is no charge for this service during the Preview period.• We will charge for Cloud Big Data when this service becomes generally available.• If you participate in this Preview Program, you will receive a notification prior to general

availability.• There is no Service Level Agreement.• Support is available from 8 AM – 5 PM (Central Time) Monday–Friday.

There are some resource limits during the Preview Program:

• Up to 5 data nodes• Up to 5 virtual CPUs• Up to 25 GBs of RAM• Up to 2 Terabytes of disk space

1. Intended AudienceThis Guide is intended to assist software developers who want to develop applicationsusing the Cloud Big Data API. It assumes the reader has a general understanding of BigData concepts and is familiar with:

• Hadoop, HDFS, and MapReduce• ReSTful web services• HTTP/1.1 conventions• JSON serialization formats

2. Document Change HistoryThis version of the Developer Guide replaces and obsoletes all previous versions. The mostrecent changes are described in the table below:

Revision Date Summary of Changes

Feb 7, 2013 • Initial Preview release.

3. Additional ResourcesFor information about Rackspace Cloud products, refer to www.rackspace.com/cloud.This site also offers links to Rackspace's official support channels, including knowledge basearticles, forums, phone, chat, and email.

Email all support questions to: <[email protected]>.

You can follow Rackspace updates and announcements via twitter at: www.twitter.com/rackspace.

This API uses standard HTTP 1.1 response codes as documented at: www.w3.org/Protocols/rfc2616/rfc2616-sec10.html.

4. API Contract ChangesThe API contract is not locked and may change during the Preview Program.

Page 8: Cloud Big Data Developer Guide - rackspace.com · 3/13/2013  · Among the benefits of Cloud Big Data, it allows you to: • Create or resize Hadoop clusters in minutes and pay only

Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Cloud Big Data Developer Guide Mar 13, 2013 API v1.0 Preview

viii

Rackspace will notify customers in Release Notes when and if the contract does change.

5. ConceptsTo use the Cloud Big Data API effectively, you should understand several key concepts:

5.1. Cluster

A group of servers (nodes). In CBD, the servers are virtual.

5.2. Data Transfer

A method by to move data from a non-Cloud machine by FTP or by SSH from your CloudFiles account.

5.3. SCP Server Proxy

An SCP service that runs on your Hadoop cluster which distributes your files across thecluster.

5.4. HDFS

The Hadoop Distributed Files System. This is the default file system used in Cloud Big Data.

5.5. MapReduce

A framework for performing calculations on the data in the distributed file system. Maptasks run in parallel with each other; Reduce tasks also run in parallel with each other.

5.6. Node

A single computer in a cluster.

5.7. Service Catalog

Your service catalog is the list of services available to you, as returned along with yourauthentication token and an expiration date for that token. All the services in your servicecatalog should recognize your token as valid until it expires.

The catalog listing for each service provides at least one endpoint URL for that service.Other information, such as regions and versions and tenants, is provided if it's relevant toyour access to this service.

5.8. Tenant ID

A tenant is a container used to group or isolate resources and/or identity objects.Depending on the service operator, a tenant may map to a customer, account,organization, or project.

Page 9: Cloud Big Data Developer Guide - rackspace.com · 3/13/2013  · Among the benefits of Cloud Big Data, it allows you to: • Create or resize Hadoop clusters in minutes and pay only

Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Cloud Big Data Developer Guide Mar 13, 2013 API v1.0 Preview

1

1. General API InformationThe Cloud Big Data API is implemented using a ReSTful web service interface. Like otherproducts in the Rackspace Cloud suite, Cloud Big Data shares a common token-basedauthentication system that allows seamless access between products and services.

Note

All requests to authenticate against and operate the service are performedusing SSL over HTTP (HTTPS) on TCP port 443.

1.1. AuthenticationEvery ReST request against the Cloud Big Data Service requires the inclusion of a specificauthorization token, supplied by the X-Auth-Token HTTP header. Customers obtainthis token by first using the Rackspace Cloud Authentication Service and supplying a validusername and API access key.

To authenticate, submit a POST/v2.0/tokens request, presenting valid Rackspacecustomer credentials in the message body to a Rackspace authentication endpoint.

GET YOUR CREDENTIALS

You can use either of two sets of credentials:

• your username and password

• your username and API key

Your username and password are the ones you use to login to the Rackspace controlpanel. Once you are logged in, you can use the Rackspace control panel to obtain your APIkey.

Use the control panel for the region in which your account is based:

• US-based accounts use the control panel at https://manage.rackspacecloud.com/.• UK-based accounts use the control panel at https://lon.manage.rackspacecloud.com/.

CHOOSE YOUR AUTHENTICATION

Use the authentication endpoint for the region in which your account is based:

• All accounts authenticate through identity.api.rackspacecloud.com/v2.0/tokens.

SEND YOUR CREDENTIALS TO YOUR AUTHENTICATION ENDPOINT

If you know your credentials and your authentication endpoint, and you can issue aPOST /v2.0/tokens request in an API call, you have all the basic information you needto use the Rackspace Cloud Identity Service.

You can use cURL to try the authentication process in two steps: get a token; send thetoken to a service.

1. Get an authentication token by providing your username and either your API key or yourpassword. Here are examples of both approaches:

Page 10: Cloud Big Data Developer Guide - rackspace.com · 3/13/2013  · Among the benefits of Cloud Big Data, it allows you to: • Create or resize Hadoop clusters in minutes and pay only

Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Cloud Big Data Developer Guide Mar 13, 2013 API v1.0 Preview

2

You can request a token by providing your username and your API key.

curl -X POST https://auth.api.rackspacecloud.com/v2.0/tokens -d '{ "auth":{ "RAX-KSKEY:apiKeyCredentials":{ "username":"theUserName", "apiKey":"00a00000a000a0000000a000a00aaa0a" } } }' -H "Content-type: application/json"

You can request a token by providing your username and your password.

curl -X POST https://auth.api.rackspacecloud.com/v2.0/tokens -d'{"auth":{"passwordCredentials":{"username":"theUserName","password":"thePassword"}}}' -H "Content-type: application/json"

Successful authentication returns a token which you can use as evidence that youridentity has already been authenticated. To use the token, pass it to other services as anX-Auth-Token header.

Authentication also returns a service catalog, listing the endpoints you can use for Cloudservices.

2. Use the authentication token to send a GET to a service you would like to use. Here is anexample of passing an authentication token to the Cloud Files service, using the CloudFiles service catalog endpoint that was returned along with the token.

You can use a token and a service endpoint to tell a service that your credentials are valid.

Authentication tokens are typically valid for 24 hours. Applications should be designed tore-authenticate after receiving a 401 (Unauthorized) response from a service endpoint.

Important

If you are programmatically parsing an authentication response, please beaware that service names are stable for the life of the particular service andcan be used as keys. You should also be aware that a user's service catalog caninclude multiple uniquely-named services which perform similar functions. InAuth 2.0, the service type attribute can be used as a key by which to recognizesimilar services; see the tip below.

1.2. Request/Response TypesThe Cloud Big Data API supports JSON data serialization formats. The request format isspecified using the Content-Type header and is required for calls that have a requestbody. The response format can be specified in requests either by using the Accept headeror by adding .json extension to the request URI. Note that JSON is the default format fordata serialization.

Table 1.1. Response Formats

Format Accept Header Query Extension Default

JSON application/json .json Yes

XML application/xml .xml No

Page 11: Cloud Big Data Developer Guide - rackspace.com · 3/13/2013  · Among the benefits of Cloud Big Data, it allows you to: • Create or resize Hadoop clusters in minutes and pay only

Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Cloud Big Data Developer Guide Mar 13, 2013 API v1.0 Preview

3

1.3. Statuses

Page 12: Cloud Big Data Developer Guide - rackspace.com · 3/13/2013  · Among the benefits of Cloud Big Data, it allows you to: • Create or resize Hadoop clusters in minutes and pay only

Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Cloud Big Data Developer Guide Mar 13, 2013 API v1.0 Preview

4

2. API OperationsThe CBD API allows you to manage Hadoop clusters.

2.1. Create New ClusterVerb URI Description

POST /clusters Create a new cluster.

Normal Response Code(s): 200 (OK)

Error Response Code(s): 400 (Invalid Response Body), 400 (User profile needs to becreated), 400 (Invalid Node Count), 400 (Not Valid flavor), 400 (Malformed Data), 413(Quota Exceeded)

This call creates a new cluster.

The following example show the request and corresponding response to List all Clusters forthe specified account:

Example 2.1. Create Cluster Request: JSON

{"cluster": { "name": "slice", "clusterType": "HADOOP_HDP1_1", "flavorId": "4fba3bca-7c76-11e2-b737-beeffa00040e", "nodeCount": 5 } }

Example 2.2. Create Cluster Response: JSON

{"cluster": { "id": "db478fc1-2d86-4597-8010-cbe787bbbc41", "created": "2012-12-27T10:10:10Z", "updated": "", "name": "slice", "clusterType": "HADOOP_HDP1_1", "flavorId": "4fba3bca-7c76-11e2-b737-beeffa00040e", "nodeCount": 5, "status": "BUILD", "links": [ { "rel": "self", "href": "https://dfw.bigdata.api.rackspacecloud.com/v1.0/1234/clusters/db478fc1-2d86-4597-8010-cbe787bbbc41" }, { "rel": "bookmark", "href": "https://dfw.bigdata.api.rackspacecloud.com/1234/clusters/db478fc1-2d86-4597-8010-cbe787bbbc41" } ], } }

Page 13: Cloud Big Data Developer Guide - rackspace.com · 3/13/2013  · Among the benefits of Cloud Big Data, it allows you to: • Create or resize Hadoop clusters in minutes and pay only

Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Cloud Big Data Developer Guide Mar 13, 2013 API v1.0 Preview

5

2.2. List All ClustersVerb URI Description

GET /clusters List all clusters for account.

Normal Response Code(s): 200 (OK)

Error Response Code(s):

This call lists all clusters for the specified account.

The following example show the request and corresponding response to List all Clusters forthe specified account:

Example 2.3. List Clusters Request: JSON

N/A

Example 2.4. List Clusters Response: JSON

{"clusters": [ { "id": "db478fc1-2d86-4597-8010-cbe787bbbc41", "name": "slice", "created": "2012-12-27T10:10:10Z", "updated": "2012-12-27T10:15:10Z", "clusterType": "HADOOP_HDP1_1", "flavorId": "4fba3bca-7c76-11e2-b737-beeffa00040e", "nodeCount": 5, "status": "ACTIVE", "links": [ { "rel": "self", "href": "https://dfw.bigdata.api.rackspacecloud.com/v1.0/1234/clusters/db478fc1-2d86-4597-8010-cbe787bbbc41" }, { "rel": "bookmark", "href": "https://dfw.bigdata.api.rackspacecloud.com/1234/clusters/db478fc1-2d86-4597-8010-cbe787bbbc41" } ], }, { "id": "ac111111-2d86-4597-8010-cbe787bbbc41", "name": "real", "created": "2012-12-27T10:10:10Z", "updated": "2012-12-27T10:15:10Z", "clusterType": "HBASE_HDP1_1", "flavorId": "518400b2-7c76-11e2-b737-beeffa00040e", "nodeCount": 20, "status": "ACTIVE", "links": [ { "rel": "self", "href": "https://dfw.bigdata.api.rackspacecloud.com/v1.0/1234/clusters/ac111111-2d86-4597-8010-cbe787bbbc41"

Page 14: Cloud Big Data Developer Guide - rackspace.com · 3/13/2013  · Among the benefits of Cloud Big Data, it allows you to: • Create or resize Hadoop clusters in minutes and pay only

Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Cloud Big Data Developer Guide Mar 13, 2013 API v1.0 Preview

6

}, { "rel": "bookmark", "href": "https://dfw.bigdata.api.rackspacecloud.com/1234/clusters/ac111111-2d86-4597-8010-cbe787bbbc41" } ], }, ] }

2.3. Get Cluster DetailsVerb URI Description

GET /clusters/{id} Gets details for a cluster.

Normal Response Code(s): 200 (OK)

Error Response Code(s): 404 (Not Found)

This call gets details for the specified cluster.

The following example show the request and corresponding response to Get Details for aCluster:

Example 2.5. Get Cluster Details: JSON

GET https://dfw.bigdata.api.rackspacecloud.com/v1.0/7654321/clusters/ac111111-2d86-4597-8010-cbe787bbbc41 Accept: application/json X-Auth-Token:ea85e6ac-baff-4a6c-bf43-848020ea3812 Content-Type: application/json

Example 2.6. Get Cluster Details: JSON

Status: 200 OK Date: Mon, 06 Aug 2012 21:54:21 GMT Content-Type: application/json Content-Length: 110 {"cluster": { "id": "db478fc1-2d86-4597-8010-cbe787bbbc41", "created": "2012-12-27T10:10:10Z", "updated": "2012-12-27T10:20:10Z", "name": "slice", "clusterType": "HADOOP_HDP1_1", "flavorId": "4fba3bca-7c76-11e2-b737-beeffa00040e", "nodeCount": 5, "status": "ACTIVE", "links": [ { "rel": "self", "href": "https://dfw.bigdata.api.rackspacecloud.com/v1.0/1234/clusters/db478fc1-2d86-4597-8010-cbe787bbbc41" }, { "rel": "bookmark",

Page 15: Cloud Big Data Developer Guide - rackspace.com · 3/13/2013  · Among the benefits of Cloud Big Data, it allows you to: • Create or resize Hadoop clusters in minutes and pay only

Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Cloud Big Data Developer Guide Mar 13, 2013 API v1.0 Preview

7

"href": "https://dfw.bigdata.api.rackspacecloud.com/1234/clusters/db478fc1-2d86-4597-8010-cbe787bbbc41" } ], } }

2.4. Resize a ClusterVerb URI Description

POST /clusters/{clusterId}/action Resizes a cluster.

Normal Response Code(s): 200 (OK)

Error Response Code(s): 400 (Unacceptable parameters), 400 (Malformed data), 404 (NotFound), 409 (Invalid State)

The following example show the request and corresponding response to Performing anAction on a cluster:

Example 2.7. Perform Action on a Cluster Request: JSON

{"resize": { "nodeCount": 10 } }

Example 2.8. Perform Action on a Cluster: JSON

{"cluster": { "id": "db478fc1-2d86-4597-8010-cbe787bbbc41", "created": "2012-12-27T10:10:10Z", "updated": "2012-12-27T16:20:10Z", "name": "slice", "clusterType": "HADOOP_HDP1_1", "flavorId": "4fba3bca-7c76-11e2-b737-beeffa00040e", "nodeCount": 10, "status": "RESIZING", "links": [ { "rel": "self", "href": "https://dfw.bigdata.api.rackspacecloud.com/v1.0/1234/clusters/db478fc1-2d86-4597-8010-cbe787bbbc41" }, { "rel": "bookmark", "href": "https://dfw.bigdata.api.rackspacecloud.com/1234/clusters/db478fc1-2d86-4597-8010-cbe787bbbc41" } ], } }

Page 16: Cloud Big Data Developer Guide - rackspace.com · 3/13/2013  · Among the benefits of Cloud Big Data, it allows you to: • Create or resize Hadoop clusters in minutes and pay only

Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Cloud Big Data Developer Guide Mar 13, 2013 API v1.0 Preview

8

2.5. List Cluster NodesVerb URI Description

GET /clusters/{id}/nodes List all nodes for a cluster.

Normal Response Code(s): 200 (OK)

Error Response Code(s): 404 (Not Found)

This call lists all server nodes for the specified cluster.

The following example show the request and corresponding response to List all Nodes for aCluster:

Example 2.9. List Cluster Nodes Request: JSON

GET https://dfw.bigdata.api.rackspacecloud.com/v1.0/7654321/clusters/ac111111-2d86-4597-8010-cbe787bbbc41/nodes Accept: application/json X-Auth-Token:ea85e6ac-baff-4a6c-bf43-848020ea3812 Content-Type: application/json

Example 2.10. List Cluster Nodes Response: JSON

{"nodes": [ { "id": "000", "created": "2012-12-27T10:10:10Z", "role": "NAMENODE", "name": "NAMENODE-1", "status": "ACTIVE", "addresses": { "public": [{ "addr": "168.x.x.3", "version": 4 }], "private": [{ "addr": "10.x.x.3", "version": 4}] }, "services": [ { "name": "namenode" }, { "name": "jobtracker" }, { "name": "ssh", "uri": "ssh://[email protected]" } ], "links": [ { "rel": "self", "href": "https://dfw.bigdata.api.rackspacecloud.com/v1.0/1234/clusters/db478fc1-2d86-4597-8010-cbe787bbbc41/nodes/000" }, { "rel": "bookmark", "href": "https://dfw.bigdata.api.rackspacecloud.com/1234/clusters/db478fc1-2d86-4597-8010-cbe787bbbc41/nodes/000" } ], }, { "id": "aaa", "role": "GATEWAY", "name": "GATEWAY-1",

Page 17: Cloud Big Data Developer Guide - rackspace.com · 3/13/2013  · Among the benefits of Cloud Big Data, it allows you to: • Create or resize Hadoop clusters in minutes and pay only

Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Cloud Big Data Developer Guide Mar 13, 2013 API v1.0 Preview

9

"status": "ACTIVE", "addresses": { "public": [{ "addr": "168.x.x.4", "version": 4 }], "private": [{ "addr": "10.x.x.4", "version": 4}] }, "services": [ { "name": "pig" }, { "name": "hive" }, { "name": "ssh", "uri": "ssh://[email protected]" }, { "name": "status", "uri": "http://10.x.x.4" }, { "name": "hdfs-scp", "uri": "scp://[email protected]:9022" } ], "links": [ { "rel": "self", "href": "https://dfw.bigdata.api.rackspacecloud.com/v1.0/1234/clusters/db478fc1-2d86-4597-8010-cbe787bbbc41/nodes/aaa" }, { "rel": "bookmark", "href": "https://dfw.bigdata.api.rackspacecloud.com/1234/clusters/db478fc1-2d86-4597-8010-cbe787bbbc41/nodes/aaa" } ], }, { "id": "bbb", "role": "DATANODE", "name": "DATANODE-1", "status": "ACTIVE", "addresses": { "public": [{ "addr": "168.x.x.5", "version": 4 }], "private": [{ "addr": "10.x.x.5", "version": 4}] }, "services": [ { "name": "datanode" }, { "name": "tasktracker" }, { "name": "ssh", "uri": "ssh://[email protected]" } ], "links": [ { "rel": "self", "href": "https://dfw.bigdata.api.rackspacecloud.com/v1.0/1234/clusters/db478fc1-2d86-4597-8010-cbe787bbbc41/nodes/bbb" }, { "rel": "bookmark", "href": "https://dfw.bigdata.api.rackspacecloud.com/1234/clusters/db478fc1-2d86-4597-8010-cbe787bbbc41/nodes/bbb" } ], }, { "id": "ccc", "role": "DATANODE", "name": "DATANODE-2", "status": "ACTIVE", "addresses": {

Page 18: Cloud Big Data Developer Guide - rackspace.com · 3/13/2013  · Among the benefits of Cloud Big Data, it allows you to: • Create or resize Hadoop clusters in minutes and pay only

Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Cloud Big Data Developer Guide Mar 13, 2013 API v1.0 Preview

10

"public": [{ "addr": "168.x.x.6", "version": 4 }], "private": [{ "addr": "10.x.x.6", "version": 4}] }, "services": [ { "name": "datanode" }, { "name": "tasktracker" }, { "name": "ssh", "uri": "ssh://[email protected]" } ], "links": [ { "rel": "self", "href": "https://dfw.bigdata.api.rackspacecloud.com/v1.0/1234/clusters/db478fc1-2d86-4597-8010-cbe787bbbc41/nodes/ccc" }, { "rel": "bookmark", "href": "https://dfw.bigdata.api.rackspacecloud.com/1234/clusters/db478fc1-2d86-4597-8010-cbe787bbbc41/nodes/ccc" } ], } ] }

2.6. Get Node DetailsVerb URI Description

GET /clusters/{id}/nodes/{id} Get details for node in a cluster.

Normal Response Code(s): 200 (OK)

Error Response Code(s): 404 (Not Found)

This call gets details for a node as specified by the cluster id and node id.

The following example show the request and corresponding response to Get Details for aNode within a Cluster:

Example 2.11. Get Node Details Request: JSON

GET https://dfw.bigdata.api.rackspacecloud.com/v1.0/7654321/clusters/ac111111-2d86-4597-8010-cbe787bbbc41/nodes/000 Accept: application/json X-Auth-Token:ea85e6ac-baff-4a6c-bf43-848020ea3812 Content-Type: application/json

Example 2.12. Get Node Details Response: JSON

{"node": { "id": "000", "created": "2012-12-27T10:10:10Z", "role": "NAMENODE",

Page 19: Cloud Big Data Developer Guide - rackspace.com · 3/13/2013  · Among the benefits of Cloud Big Data, it allows you to: • Create or resize Hadoop clusters in minutes and pay only

Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Cloud Big Data Developer Guide Mar 13, 2013 API v1.0 Preview

11

"name": "NAMENODE-1", "status": "ACTIVE", "addresses": { "public": [{ "addr": "168.x.x.3", "version": 4 }], "private": [{ "addr": "10.x.x.3", "version": 4}] }, "services": [ { "name": "datanode" }, { "name": "tasktracker" }, { "name": "ssh", "uri": "ssh://[email protected]" } ], "links": [ { "rel": "self", "href": "https://dfw.bigdata.api.rackspacecloud.com/v1.0/1234/clusters/db478fc1-2d86-4597-8010-cbe787bbbc41/nodes/000" }, { "rel": "bookmark", "href": "https://dfw.bigdata.api.rackspacecloud.com/1234/clusters/db478fc1-2d86-4597-8010-cbe787bbbc41/nodes/000" } ], } }

2.7. Delete ClusterVerb URI Description

DELETE /clusters/{id} Deletes a cluster.

Normal Response Code(s): 204

Error Response Code(s): 400 (missingOrInvalidParams), 404 (Resource Not Found), 409(Invalid State)

This call deletes a cluster.

The following examples show the requests and corresponding responses to delete a cluster:

Example 2.13. Delete Cluster Request: JSON

DELETE https://dfw.bigdata.api.rackspacecloud.com/v1.0/7654321/clusters/db478fc1-2d86-4597-8010-cbe787bbbc41 Accept: application/json X-Auth-Token:ea85e6ac-baff-4a6c-bf43-848020ea3812 Content-Type: application/json

Example 2.14. Delete Cluster Response: JSON

Status: 202 Accepted Date: Mon, 06 Aug 2012 21:54:21 GMT

Page 20: Cloud Big Data Developer Guide - rackspace.com · 3/13/2013  · Among the benefits of Cloud Big Data, it allows you to: • Create or resize Hadoop clusters in minutes and pay only

Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Cloud Big Data Developer Guide Mar 13, 2013 API v1.0 Preview

12

Content-Type: application/json {"cluster": { "id": "db478fc1-2d86-4597-8010-cbe787bbbc41", "created": "2012-12-27T10:10:10Z", "updated": "2012-12-27T20:14:10Z", "name": "slice", "clusterType": "HADOOP_HDP1_1", "flavorId": "4fba3bca-7c76-11e2-b737-beeffa00040e", "nodeCount": 5, "status": "DELETING", "links": [ { "rel": "self", "href": "https://dfw.bigdata.api.rackspacecloud.com/v1.0/1234/clusters/db478fc1-2d86-4597-8010-cbe787bbbc41" }, { "rel": "bookmark", "href": "https://dfw.bigdata.api.rackspacecloud.com/1234/clusters/db478fc1-2d86-4597-8010-cbe787bbbc41" } ] } }

2.8. View Profile InformationVerb URI Description

GET /profile Returns detailed information for the current user profile.

Normal Response Code(s): 200 (OK)

Error Response Code(s): N/A

The following example shows the request and corresponding response to viewing profileinformation:

Example 2.15. Get Profile Request: JSON

N/A

Example 2.16. Get Profile Response: JSON

{"profile": { "username": "john.doe", "user_id" : "12346", "tenant_id" : "123456", "sshkeys": [{"name": "t@test"}], "cloudCredentials": {}, "links": [ { "rel": "self", "href": "https://dfw.bigdata.api.rackspacecloud.com/v1.0/123456/profile"

Page 21: Cloud Big Data Developer Guide - rackspace.com · 3/13/2013  · Among the benefits of Cloud Big Data, it allows you to: • Create or resize Hadoop clusters in minutes and pay only

Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Cloud Big Data Developer Guide Mar 13, 2013 API v1.0 Preview

13

}, { "rel": "bookmark", "href": "https://dfw.bigdata.api.rackspacecloud.com/123456/profile" } ], } }

2.9. Update ProfileVerb URI Description

POST /profile Updates the information on an existing profile.

Normal Response Code(s): 200 (OK)

Error Response Code(s): 400 (Malformed Data), 400 (Unacceptable parameters)

This call allows you to update the information for an existing profile.

The following example shows the request and corresponding response to updating aprofile:

Example 2.17. Update Profile Request: JSON

{ "profile": { "username": "john.doe", "password": "j0Hnd03", "sshkeys": [ { "name": "t@test", "publicKey": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCtUFnkFrqDDCgEqW1akQkpMOX Owwvg73PLn5Z5QgvxjvJhRCg9ZTR/OWXpWcYqFVNagH4Zs8NOb9921TyQ+ydMnatOM haxMh1ZwTgaUcvndOF8fY+kcERiw1l0iT95w42F8IdUH42Z+8KihZM8gVsbMS6qYTi OM29WHX7y37wuJIzqf3N2TiVXrqfjwugvY/bZ+47EUn78uk6aPZYJGXdDgaFqnIXUV N+hRFYXgKnU0Ui0aQkuYwnAW8KmanLoNU2xodrb6/XqWnSAAmwl7aoGKFunQsT6xDW yQk+ncUHUcdofDUqgd3lXmHGrTmQW97vqexDEnhsJ+AwbLGD5dukr t@test" } ], "cloudCredentials": { "username": "jdoe", "apikey": "df23gkh34h52gkdgfakgf" } }

Example 2.18. Update Profile Response: JSON

{"profile": { "username": "john.doe",

Page 22: Cloud Big Data Developer Guide - rackspace.com · 3/13/2013  · Among the benefits of Cloud Big Data, it allows you to: • Create or resize Hadoop clusters in minutes and pay only

Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Cloud Big Data Developer Guide Mar 13, 2013 API v1.0 Preview

14

"user_id" : "12346", "tenant_id" : "123456", "sshkeys": [{"name": "t@test", "publicKey" : "ssh-rsa ....."}], "cloudCredentials": {"username": "jdoe"}, "links": [ { "rel": "self", "href": "https://dfw.bigdata.api.rackspacecloud.com/v1.0/123456/profile" }, { "rel": "bookmark", "href": "https://dfw.bigdata.api.rackspacecloud.com/123456/profile" } ], } }

2.10. List Available FlavorsVerb URI Description

GET /flavors List all available flavors.

Normal Response Code(s): 200 (OK)

Error Response Code(s): N/A

This call lists all available flavors, including the drive size and amount of RAM.

The following example shows the request and corresponding response to listing the flavors:

Example 2.19. List Flavors Request: JSON

N/A

Example 2.20. List Flavors Response: JSON

{ "flavors": [ { "disk": 256, "id": "4fba3bca-7c76-11e2-b737-beeffa00040e", "links": [ { "href": "http://dfw.bigdata.api.rackspacecloud.com/v1.0/1234/flavors/4fba3bca-7c76-11e2-b737-beeffa00040e", "rel": "self" }, { "href": "http://dfw.bigdata.api.rackspacecloud.com/1234/flavors/4fba3bca-7c76-11e2-b737-beeffa00040e", "rel": "bookmark" } ], "name": "Tiny Hadoop Instance", "ram": 5120, "vcpus": 1 },

Page 23: Cloud Big Data Developer Guide - rackspace.com · 3/13/2013  · Among the benefits of Cloud Big Data, it allows you to: • Create or resize Hadoop clusters in minutes and pay only

Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Cloud Big Data Developer Guide Mar 13, 2013 API v1.0 Preview

15

{ "disk": 512, "id": "518400b2-7c76-11e2-b737-beeffa00040e", "links": [ { "href": "http://dfw.bigdata.api.rackspacecloud.com/v1.0/1234/flavors/518400b2-7c76-11e2-b737-beeffa00040e", "rel": "self" }, { "href": "http://dfw.bigdata.api.rackspacecloud.com/1234/flavors/518400b2-7c76-11e2-b737-beeffa00040e", "rel": "bookmark" } ], "name": "Small Hadoop Instance", "ram": 8192, "vcpus": 2 }, { "disk": 1024, "id": "5413894c-7c76-11e2-b737-beeffa00040e", "links": [ { "href": "http://dfw.bigdata.api.rackspacecloud.com/v1.0/1234/flavors/5413894c-7c76-11e2-b737-beeffa00040e", "rel": "self" }, { "href": "http://dfw.bigdata.api.rackspacecloud.com/1234/flavors/5413894c-7c76-11e2-b737-beeffa00040e", "rel": "bookmark" } ], "name": "Medium Hadoop Instance", "ram": 15360, "vcpus": 4 }, { "disk": 2000, "id": "559dd2b8-7c76-11e2-b737-beeffa00040e", "links": [ { "href": "http://dfw.bigdata.api.rackspacecloud.com/v1.0/1234/flavors/559dd2b8-7c76-11e2-b737-beeffa00040e", "rel": "self" }, { "href": "http://dfw.bigdata.api.rackspacecloud.com/1234/flavors/559dd2b8-7c76-11e2-b737-beeffa00040e", "rel": "bookmark" } ], "name": "Large Hadoop Instance", "ram": 27648, "vcpus": 8 } ] }

2.11. List Flavor DetailsVerb URI Description

GET /flavors/{flavorId} Lists the details for a specified flavor.

Page 24: Cloud Big Data Developer Guide - rackspace.com · 3/13/2013  · Among the benefits of Cloud Big Data, it allows you to: • Create or resize Hadoop clusters in minutes and pay only

Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Cloud Big Data Developer Guide Mar 13, 2013 API v1.0 Preview

16

Normal Response Code(s): 200 (OK)

Error Response Code(s): 404 (Resource Not Found)

This call lists the details for a specified flavor.

The following example shows the request and corresponding response to List FlavorDetails:

Example 2.21. List Flavor Details Request: JSON

N/A

Example 2.22. List Flavor Details Response: JSON

{ "flavor": { "disk": 256, "id": "4fba3bca-7c76-11e2-b737-beeffa00040e", "links": [ { "href": "http://dfw.bigdata.api.rackspacecloud.com/v1.0/1234/flavors/4fba3bca-7c76-11e2-b737-beeffa00040e", "rel": "self" }, { "href": "http://dfw.bigdata.api.rackspacecloud.com/1234/flavors/4fba3bca-7c76-11e2-b737-beeffa00040e", "rel": "bookmark" } ], "name": "Tiny Hadoop Instance", "ram": 5120, "vcpus": 1 } }

2.12. List Cluster TypesVerb URI Description

GET /types Lists the cluster types.

Normal Response Code(s): 200 (OK)

Error Response Code(s): N/A

The following example shows the request and corresponding response to List Cluster Types:

Example 2.23. List Cluster Types Request: JSON

N/A

Page 25: Cloud Big Data Developer Guide - rackspace.com · 3/13/2013  · Among the benefits of Cloud Big Data, it allows you to: • Create or resize Hadoop clusters in minutes and pay only

Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Cloud Big Data Developer Guide Mar 13, 2013 API v1.0 Preview

17

Example 2.24. List Cluster Types Response: JSON

{ "types": [ { "id": "HADOOP_HDP1_1", "links": [ { "href": "http://dfw.bigdata.api.rackspacecloud.com/v1.0/1234/types/HADOOP_HDP1_1", "rel": "self" }, { "href": "http://dfw.bigdata.api.rackspacecloud.com/1234/types/HADOOP_HDP1_1", "rel": "bookmark" } ], "name": "Hadoop (HDP 1.1)" } ] }

2.13. List Cluster Type DetailsVerb URI Description

GET /types/{typeId} Shows the details for a given cluster type.

Normal Response Code(s): 200 (OK)

Error Response Code(s): 404 (Resource Not Found)

This call displays the detailed information for a specified cluster.

The following example shows the request and corresponding response to view clusterdetails:

Example 2.25. View Cluster Details Request: JSON

N/A

Example 2.26. View Cluster Details Response: JSON

{ "type": { "id": "HADOOP_HDP1_1", "links": [ { "href": "http://dfw.bigdata.api.rackspacecloud.com/v1.0/1234/types/HADOOP_HDP1_1", "rel": "self" },

Page 26: Cloud Big Data Developer Guide - rackspace.com · 3/13/2013  · Among the benefits of Cloud Big Data, it allows you to: • Create or resize Hadoop clusters in minutes and pay only

Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Cloud Big Data Developer Guide Mar 13, 2013 API v1.0 Preview

18

{ "href": "http://dfw.bigdata.api.rackspacecloud.com/1234/types/HADOOP_HDP1_1", "rel": "bookmark" } ], "name": "Hadoop (HDP 1.1)", "services": [] } }

2.14. List Supported Flavors for TypeVerb URI Description

GET /types/{typeId}/flavors Lists the supported flavors for a specified cluster type.

Normal Response Code(s): 200 (OK)

Error Response Code(s): 404 (Resource Not Found)

This call lists all the flavors that a specified cluster type supports.

The following example shows the request and corresponding response to list supportedflavors:

Example 2.27. List Supported Flavors for Type Request: JSON

N/A

Example 2.28. List Supported Flavors for Type Response: JSON

{ "flavors": [ { "disk": 1024, "id": "5413894c-7c76-11e2-b737-beeffa00040e", "links": [ { "href": "http://dfw.bigdata.api.rackspacecloud.com/v1.0/1234/flavors/5413894c-7c76-11e2-b737-beeffa00040e", "rel": "self" }, { "href": "http://dfw.bigdata.api.rackspacecloud.com/1234/flavors/5413894c-7c76-11e2-b737-beeffa00040e", "rel": "bookmark" } ], "name": "Medium Hadoop Instance", "ram": 15360, "vcpus": 4 }, { "disk": 2000, "id": "559dd2b8-7c76-11e2-b737-beeffa00040e", "links": [

Page 27: Cloud Big Data Developer Guide - rackspace.com · 3/13/2013  · Among the benefits of Cloud Big Data, it allows you to: • Create or resize Hadoop clusters in minutes and pay only

Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Cloud Big Data Developer Guide Mar 13, 2013 API v1.0 Preview

19

{ "href": "http://dfw.bigdata.api.rackspacecloud.com/v1.0/1234/flavors/559dd2b8-7c76-11e2-b737-beeffa00040e", "rel": "self" }, { "href": "http://dfw.bigdata.api.rackspacecloud.com/1234/flavors/559dd2b8-7c76-11e2-b737-beeffa00040e", "rel": "bookmark" } ], "name": "Large Hadoop Instance", "ram": 27648, "vcpus": 8 } ] }

2.15. List Supported Cluster Types for a FlavorVerb URI Description

GET /flavors/{flavorId}/types Lists supported cluster types for a specified flavor.

Normal Response Code(s): 200 (OK)

Error Response Code(s): 404 (Resource Not Found)

This call displays all the supported cluster types for a specified flavor.

The following example shows the request and corresponding response to List SupportedCluster Types for a Flavor:

Example 2.29. List Supported Cluster Types for a Flavor Request: JSON

N/A

Example 2.30. List Supported Cluster Types for a Flavor Response: JSON

{ "types": [ { "id": "HADOOP_HDP1_1", "links": [ { "href": "http://dfw.bigdata.api.rackspacecloud.com/v1.0/1234/types/HADOOP_HDP1_1", "rel": "self" }, { "href": "http://dfw.bigdata.api.rackspacecloud.com/1234/types/HADOOP_HDP1_1", "rel": "bookmark" } ], "name": "Hadoop (HDP 1.1)" } ]

Page 28: Cloud Big Data Developer Guide - rackspace.com · 3/13/2013  · Among the benefits of Cloud Big Data, it allows you to: • Create or resize Hadoop clusters in minutes and pay only

Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Cloud Big Data Developer Guide Mar 13, 2013 API v1.0 Preview

20

}

2.16. View Resource LimitsVerb URI Description

GET /limits Displays the resource limits for the user.

Normal Response Code(s): 200 (OK)

Error Response Code(s): N/A

This call displays the resource limits such as remaining node count, available RAM, andremaining disk space, for the user.

The following example shows the request and corresponding response to View ResourceLimits:

Example 2.31. View Resource Limits Request: JSON

N/A

Example 2.32. View Resource Limits Response: JSON

{ "limits": { "absolute": { "disk": { "limit": 2000, "remaining": 2000 }, "nodeCount": { "limit": 5, "remaining": 5 }, "ram": { "limit": 25600, "remaining": 25600 }, "vcpus": { "limit": 5, "remaining": 5 } }, "links": [ { "href": "http://dfw.bigdata.api.rackspacecloud.com/v1.0/1234/limits", "rel": "self" }, { "href": "http://dfw.bigdata.api.rackspacecloud.com/1234/limits", "rel": "bookmark" } ]

Page 29: Cloud Big Data Developer Guide - rackspace.com · 3/13/2013  · Among the benefits of Cloud Big Data, it allows you to: • Create or resize Hadoop clusters in minutes and pay only

Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Pre

vie

w -

 Cloud Big Data Developer Guide Mar 13, 2013 API v1.0 Preview

21

} }