mirror of
https://github.com/floci-io/floci.git
synced 2026-11-23 14:10:49 -05:00
In the docker runner mode a custom JAR step whose main class starts a MapReduce job, such as the Management Guide's wordcount of Hadoop's examples JAR, never ended: its spark-submit read the image's mapred-site.xml, which names YARN, and the job kept retrying a ResourceManager at 0.0.0.0:8032. A Jar of /usr/lib/hadoop-mapreduce/hadoop-streaming.jar, where EMR has it, named a file the image lacks. And a cluster's mapred-site, hadoop-log4j and hadoop-env classifications reached none of its steps. Now, on a cluster: - a custom JAR or Spark step's spark-submit runs after the Hadoop setup a command gets, so its HADOOP_CONF_DIR is the copy with Floci's S3, the cluster's HDFS and MapReduce in local mode, which spark-submit puts on its class path; a MapReduce job its main class starts runs in the driver's JVM. - a Jar of /usr/lib/hadoop-mapreduce/hadoop-streaming.jar runs the image's /usr/lib/hadoop/hadoop-streaming.jar. - mapred-site, which will "Change values in the MapReduce application's mapred-site.xml file", goes in the copied mapred-site.xml ahead of Floci's local mode and staging folder, which win. - hadoop-log4j, which will "Change values in Hadoop's log4j.properties file", follows the copied log4j.properties, a later key winning. - hadoop-env's export classification starts the copied hadoop-env.sh, which the hadoop command reads, each value as given, single-quoted, as spark-env's exports are set without shell expansion; a name a shell cannot export is left out. The image's own lines come after and add to HADOOP_CLASSPATH rather than set it, so the Release Guide's HADOOP_CLASSPATH of /path/to/my.jar keeps the LZO codec the image's core-site.xml names, without which every job fails. - a jar the MapReduce home links that the image lacks is named on the step's standard error, as a job that needs it fails later, on its class path, and emr.md says which releases this has run on (emr-7.5.0 and emr-7.10.0). An EMR Serverless run still starts spark-submit as it is. A custom JAR step's spark-submit reads neither hadoop-env.sh nor Hadoop's log4j.properties, so those two do not reach it.