EMR
datus emr operates existing Amazon EMR (on EC2) clusters through boto3.
Cluster provisioning/termination is out of scope (use IaC/ops). Global usage:
datus emr [--profile <env>] <group> <subcommand> [args...]
Add -o json for full output. steps add submits billed work.
Clusters
datus emr clusters list [--state WAITING --state RUNNING] [--limit N]
datus emr clusters describe <cluster-id>
datus emr clusters instances <cluster-id>
Steps
datus emr steps list <cluster-id> [--state RUNNING] [--limit N]
datus emr steps describe <cluster-id> <step-id>
datus emr steps add [<cluster-id>] --name NAME \
(--command 'spark-submit s3://b/job.py' | --jar s3://b/app.jar [--arg A --arg B] [--main-class C]) \
[--action-on-failure CONTINUE|CANCEL_AND_WAIT|TERMINATE_CLUSTER] [--wait]
datus emr steps cancel <cluster-id> <step-id>
datus emr steps logs <cluster-id> <step-id> [--stderr]
<cluster-id>foradddefaults to the profile'scluster_id.--commandruns viacommand-runner.jar(args are shell-split);--jarruns a custom JAR with--argvalues.add --waitpolls until the step is terminal: exit 0 onCOMPLETED, 1 otherwise.logsreadss3://<log_uri>/<cluster-id>/steps/<step-id>/stdout.gz(orstderr.gzwith--stderr); requireslog_uriin the profile.
Exit codes
0 success · 1 runtime/API error (also: failed step under --wait) · 2
usage (also: no cluster id / no log_uri) · 3 config error.