feat: separate Dockerfile for Hadoop #1186
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Follow up for #1173
This PR looks like a lot but it really just does one thing:
We had a single Dockerfile for Hadoop. This PR separates the build from Hadoop itself from the image build (which also includes things like hdfs-utils). We do the same thing for HBase already, were we have one Dockerfile for the image and another one just to build the HBase JARs.
For Hadoop, this has two advantages:
/stackable/patched-libs
, which contains the Hadoop libraries other products use as dependencies. These are not required in the HDFS image though. But because other projects depend onhadoop
and need toCOPY
these libraries form the image in order to use them as dependencies, they had to be part of the HDFS image. Now products can just depend onhadoop/hadoop
instead, so just on the Java build itself.In the future we could even think about not copying everything from
hadoop/hadoop
intohadoop
, but just the components required to run HDFS.I tested building Hadoop 3.3.6 and 3.4.1, as well as Spark 3.5.6, Hive 4.0.0 and Druid 33.0.0. I also ran the smoke tests for the built images. Everything succeeded.
Definition of Done Checklist
Note
Not all of these items are applicable to all PRs, the author should update this template to only leave the boxes in that are relevant.
Please make sure all these things are done and tick the boxes
TIP: Running integration tests with a new product image
The image can be built and uploaded to the kind cluster with the following commands:
See the output of
bake
to retrieve the image tag for<image-tagged-with-the-major-version>
.