ood-emr-adapter

command module
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 2, 2026 License: MIT Imports: 3 Imported by: 0

README

ood-emr-adapter

CI Go Report Card codecov Go Reference

OOD compute adapter for Amazon EMR Serverless. Translates Open OnDemand job lifecycle calls (submit / status / delete / info) to the EMR Serverless API.

Commands

Command Description
submit Read a JSON job spec from stdin and submit it as an EMR Serverless job run. Prints <application-id>/<job-run-id> on success.
status <id> Return OOD-normalised job status as JSON (queued, running, completed, failed, cancelled, undetermined).
delete <id> Cancel a running EMR Serverless job run.
info <id> Print the full GetJobRun API response as JSON.

<id> must be in the form <application-id>/<job-run-id>, or just <job-run-id> when --application-id is set.

Global flags

Flag Default Description
--region us-east-1 AWS region
--application-id (empty) EMR Serverless application ID (can also be set per-job in the spec)

Job spec (stdin for submit)

{
  "application_id": "00abc123def456gh",
  "execution_role_arn": "arn:aws:iam::123456789012:role/EMRServerlessRole",
  "entry_point": "s3://my-bucket/scripts/wordcount.py",
  "entry_point_args": ["s3://my-bucket/input/", "s3://my-bucket/output/"],
  "spark_submit_parameters": "--conf spark.executor.cores=4 --conf spark.executor.memory=8g",
  "job_name": "wordcount-run-42",
  "env": {
    "MY_ENV_VAR": "value"
  }
}

Open OnDemand cluster YAML example

# config/clusters.d/emr-serverless.yml
v2:
  metadata:
    title: "Amazon EMR Serverless"
  login:
    host: "emr-serverless.internal"
  job:
    adapter: "script"
    submit: "/usr/local/bin/ood-emr-adapter submit --region us-east-1 --application-id 00abc123def456gh"
    status: "/usr/local/bin/ood-emr-adapter status --region us-east-1"
    delete: "/usr/local/bin/ood-emr-adapter delete --region us-east-1"
    info:   "/usr/local/bin/ood-emr-adapter info   --region us-east-1"

Prerequisites

  • Go 1.26+
  • AWS credentials configured (environment variables, ~/.aws/credentials, or IAM role)
  • An existing EMR Serverless application

Build

go build -o ood-emr-adapter .

License

MIT — see LICENSE.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
awscfg
Package awscfg builds the AWS config option set shared by the adapter commands.
Package awscfg builds the AWS config option set shared by the adapter commands.
emr
Package emr wraps the Amazon EMR Serverless API for the OOD adapter.
Package emr wraps the Amazon EMR Serverless API for the OOD adapter.
ood
Package ood defines the OOD job spec types shared across adapters.
Package ood defines the OOD job spec types shared across adapters.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL