Files
floci/docs/services
Priamo Germosen 897667f4e6 feat(emr): run command-runner.jar commands and script-runner.jar scripts (#6747)
In the docker runner mode a step that was not a Spark step failed
without running, so a cluster whose steps copy files with the AWS CLI,
run a shell or Python script, or call script-runner.jar could not run
its steps in Floci. Such steps now run in the same per-step container
of the release's EMR Serverless image, with the same credentials,
endpoint, logs and lifecycle as a Spark step, as the Release Guide's
"Run commands and scripts on an Amazon EMR cluster" describes them:

- command-runner.jar runs its arguments as a command, the first naming
  it, unless that is spark-submit (the Spark step, as before) or a tool
  the image does not have: hive-script, pig-script, hadoop-streaming,
  hadoop-lzo and s3-dist-cp still fail without running.
- script-runner.jar, by name (7.13 on) or by its
  s3://<region>.elasticmapreduce/libs/script-runner/script-runner.jar
  URI, fetches its script from S3 with the image's AWS CLI and the
  step's credentials, then runs it with the step's other arguments. A
  local script named without a path runs from the working directory
  when a file there has that name.

The image runs them as its hadoop user in /home/hadoop, with bash,
Python 3, Java, curl and AWS CLI v2, which reaches Floci through
AWS_ENDPOINT_URL. A spark-submit they start runs in local mode on
Floci's S3 with the cluster's spark-defaults: the image's
spark-defaults.conf names EMR Serverless's resource manager as its
master, which a system property cannot override, so the container
starts through a wrapper that copies the image's Spark configuration,
drops that master, and adds local mode, Floci's settings and the
cluster's spark-defaults, in a SPARK_CONF_DIR of its own, each setting
escaped for the Properties file Spark reads it as. A step's own --conf
still wins. A failed command reads "The step's command exited
with code N.".

SparkJobRunner.Job gets a command, run in place of spark-submit.
2026-10-27 23:41:56 -05:00
..
2026-08-21 00:09:04 -04:00