mirror of
https://github.com/floci-io/floci.git
synced 2026-11-23 14:10:49 -05:00
In the docker runner mode a Hive step failed without running ("hive-script
and pig-script are not in the image steps run in"). On a cluster whose
Applications name Hive, a command-runner.jar step running hive-script, as
the AWS CLI writes a Type=Hive step ("hive-script --run-hive-script
--args" and the step's Args), or hive itself, now runs: the image's
hive-script runs hive with the arguments after --args, with Tez in local
mode, on the cluster's storage and Floci's S3.
- An EMR cluster's nodes hold every application it installs, so a
cluster with Hive bootstraps and runs every step in one image: the
release's EMR Serverless image with the Hive, Tez, HDFS, MapReduce and
YARN of its EMR Serverless Hive image (or the new hive-image-template).
EmrReleaseImages makes it the first time a release's cluster needs it:
a container of the EMR Serverless image, created and never started,
gets the Hive image's folders streamed in from a container of that
image, and is committed, as a bootstrap's container is, with no image
builder involved. The two images ship different builds of
emr-serverless-goodies-common under one name, so Tez keeps the Hive
image's in a folder of its own, its links rewritten to lead there, and
the Hive image's Hadoop configuration, which puts Tez on the class
path, goes to /etc/hadoop/conf.hive, which Hive runs with.
- The image is named after the release, the ids of the two images as a
container would run them (an image-registry-base included) and what
is copied, so a newer pull of either makes another; it is kept for the
release's next cluster, and made once at a time. The bootstrap and the
steps get its id, as they get a bootstrap image's, from their own
thread, which makes it first, unless the cluster has ended by then; a
failure to make it fails the step, or ends a bootstrapping cluster with
INTERNAL_ERROR.
- hive gets Floci's settings, then the cluster's core-site, tez-site and
hive-site properties as --hiveconf settings, then the step's own
arguments, so a step's --hiveconf wins as it does over hive-site.xml;
the cluster's hive-env exports are its environment.
- Its metastore is the cluster's own, as "Hive records metastore
information in a MySQL database on the primary node's file system": an
embedded Derby database in the cluster's /mnt, so a table one Hive step
makes is there for the next until the cluster ends. A hive-site naming
the Glue Data Catalog's client factory uses Floci's Glue instead.
- Hive reaches the cluster's HDFS through the same view of /mnt/hdfs
under the viewfs scheme: Hive looks up the HDFS encryption zone of any
hdfs:// path, which only an HDFS NameNode answers. A table without a
LOCATION is in /user/hive/warehouse there, which other steps read as
hdfs://.
- On a cluster without Hive, hive-script runs in the release's image, as
EMR's does without Hive ("Hive isn't installed."); NOT_RUN is
pig-script's alone.
The Docker-gated EmrHiveStepsDockerIntegrationTest runs the AWS CLI's
Hive steps on a cluster's metastore and HDFS, a hive-site for the Glue
Data Catalog, a cluster without Hive, and a bootstrapped cluster whose
installs a Hive step and a later step both find, in the emr-7.5.0
images, which the CI prefetch pulls for its shard.
EmrServerlessSparkRunner's hiveSettings now builds both services'
--hiveconf settings.