mesos-http-adapter

Mesos HTTP API Adapter

License

License

GroupId

GroupId

com.mesosphere
ArtifactId

ArtifactId

mesos-http-adapter
Last Version

Last Version

0.4.1
Release Date

Release Date

Type

Type

zip
Description

Description

mesos-http-adapter
Mesos HTTP API Adapter
Project URL

Project URL

https://github.com/mesosphere/mesos-http-adapter
Source Code Management

Source Code Management

https://github.com/mesosphere/mesos-http-adapter

Download mesos-http-adapter

Dependencies

compile (8)

Group / Artifact Type Version
com.fasterxml.jackson.datatype : jackson-datatype-guava jar 2.6.3
com.kenai.nbpwr : edu-umd-cs-findbugs-annotations jar 1.3.2-201002241900
org.apache.mesos : mesos jar 1.1.0
org.slf4j : log4j-over-slf4j jar 1.7.10
org.slf4j : jcl-over-slf4j jar 1.7.10
com.google.protobuf : protobuf-java jar 2.6.1
com.googlecode.protobuf-java-format : protobuf-java-format jar 1.4
com.google.http-client : google-http-client jar 1.20.0

test (9)

Group / Artifact Type Version
junit : junit jar 4.11
org.mockito : mockito-all jar 1.9.5
org.codehaus.groovy : groovy-all jar 2.4.1
org.spockframework : spock-core jar 1.0-groovy-2.4
cglib : cglib-nodep jar 2.2.2
org.powermock : powermock-module-junit4 jar 1.6.1
org.powermock : powermock-module-junit4-rule jar 1.6.1
org.powermock : powermock-classloading-xstream jar 1.6.1
org.powermock : powermock-api-mockito jar 1.6.1

Project Modules

There are no modules declared in this project.

Mesos HTTP API Adapter

Goal

The goal of this project is to enable existing Mesos frameworks to try out the Mesos V1 HTTP API using the existing SchedulerDriver interface.

Intent

This project's intent is to help migrate existing Mesos frameworks to the HTTP API, and not become the de-facto way of using HTTP API.

Usage

Maven

To add mesos-http-adapter as a dependency on your project add following to your pom.xml:

<dependency>
  <groupId>com.mesosphere</groupId>
  <artifactId>mesos-http-adapter</artifactId>
  <version>0.4.0</version>
</dependency>

Gradle

To add mesos-http-adapter as a dependency on your project add following to your build.gradle:

compile "com.mesosphere:mesos-http-adaptor:0.4.0"

Source code

Using MesosToSchedulerDriverAdapter is really simple, as it's a drop-in replacement of MesosSchedulerDriver. In your framework code, you need to just update the code which instantiates MesosSchedulerDriver. For ex:

Before:

MesosSchedulerDriver driver = new MesosSchedulerDriver(scheduler, frameworkInfo, masterUrl);

After:

MesosSchedulerDriver driver = new MesosToSchedulerDriverAdapter(scheduler, frameworkInfo, masterUrl);

If you are using Credential, then also it's as simple as:

Before:

MesosSchedulerDriver driver = new MesosSchedulerDriver(scheduler, frameworkInfo, masterUrl, credential);

After:

MesosSchedulerDriver driver = new MesosToSchedulerDriverAdapter(scheduler, frameworkInfo, masterUrl, credential);

Switching between V0 and V1 API

By default, MesosToSchedulerDriverAdapter uses V0 version of API (non-HTTP).

To use V1 version of API, you just need to start your framework with MESOS_API_VERSION environment variable set to V1. For ex:

export MESOS_API_VERSION=V1

If for some reason you ever want to go back to V0 version while already running framework with version V1 of API, you just need to restart your framework with either MESOS_API_VERSION environment variable set to V0 OR by unsetting MESOS_API_VERSION (which automatically default to V0). For ex:

export MESOS_API_VERSION=V0

OR

unset MESOS_API_VERSION
com.mesosphere

D2iQ

Building the Datacenter Operating System - DCOS

Versions

Version
0.4.1
0.4.0
0.3.0
0.2.0
0.1.0