Myriad REST API

Securing the Myriad REST API

To secure the Myriad REST API, set the isSecure property to true in the myriad-config-default.yml file. In this case, Myriad uses the same security type as the value of the hadoop.http.authentication.type parameter in the core-site.xml file

NOTE On a secure cluster, the default value of this property is org.apache.hadoop.security.authentication.server.MultiMechsAuthenticationHandler. Authentication, such as Kerberos or plain (using PAM), is determined automatically.

Scaling the Cluster

To scale a cluster up or down, use the Cluster API. The Cluster API provide flexup and flex down capability the changes the size of one or more instances in a cluster. The instance size is a profile parameter that is a predefined value of zero, small, medium, and large. These predefined values are specified in the Myriad configuration file (myriad-config-default.yml).

Specify Service Instances

To specify the number of instances for a service, use the Service API. Services are configured in the Myriad configuration file (myriad-config-default.yml).

Retrieving Configuration and State

To retrieve the Myriad configuration and the Myriad Scheduler state, use the Configuration API and State API. See Myriad open source REST API for more information.

The Myriad REST API provides the following functionality:

Table 1. Myriad REST API
API HTTP Method URI Description
Cluster PUT /api/cluster/flexup Expands the cluster size.

Parameters: profile, instances, constraints

Cluster PUT /api/cluster/flexdown Shrinks the cluster size.

Parameters: profile, instances, constraints

Service PUT /api/cluster/flexupservice Increases the number of instances for a service.

Parameters: instances, serviceName

Service PUT /api/cluster/flexdownservice Shrinks the number of instances for a service.

Parameters: instances, serviceName

Configuration GET /api/config Retrieves the Myriad configuration.
State GET api/state Retrieves a snapshot of the Myriad Scheduler state.
Framework GET /api/framework/shutdown/frameworkd Destroys the Myriad framework.
NOTE With this release, GET is the method used to destroy the Myriad framework.