[chore](thirdparty) keep hadoop_hdfs as a symlink to hadoop_hdfs_3_4 - #66935
Open
morningman wants to merge 1 commit into
Open
[chore](thirdparty) keep hadoop_hdfs as a symlink to hadoop_hdfs_3_4#66935morningman wants to merge 1 commit into
morningman wants to merge 1 commit into
Conversation
apache#66842 stopped building hadoop-libs 3.3.6.6 and removed the `installed/{include,lib}/hadoop_hdfs/` prefix it produced, so only `hadoop_hdfs_3_4/` is left. Everything that still reads the old prefix fails against a third-party archive built from it: `cloud/src/recycler/hdfs_accessor.{h,cpp}` and `cloud/CMakeLists.txt`, `be/src/io/hdfs_builder.cpp`, `build.sh`'s `LAST_THIRDPARTY_LIB` sentinel, branch-3.0, branch-3.1, and anything outside this repository. Point the old name at 3.4.2.4 with a relative symlink rather than ship a second 182MB copy per platform. The install prefix is already built this way (`lib -> lib64`), so the link survives the tar the prebuilt archive is shipped as and stays valid wherever it is unpacked. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What problem does this PR solve?
Issue Number: close #xxx
Related PR: #66842, #66908
Problem Summary:
#66842 stopped building hadoop-libs 3.3.6.6 and removed the
installed/{include,lib}/hadoop_hdfs/prefix it produced. Only 3.4.2.4 underhadoop_hdfs_3_4/is built now, so everything still reading the old prefix failsagainst a third-party archive built from it:
cloud/src/recycler/hdfs_accessor.{h,cpp}<hadoop_hdfs/hdfs.h>cloud/CMakeLists.txtlib/hadoop_hdfs/native/libhdfs.abe/src/io/hdfs_builder.cpphadoop_hdfs/hdfs.hbuild.shLAST_THIRDPARTY_LIB='hadoop_hdfs/native/libhdfs.a'run-be-ut.sh,run-cloud-ut.shinstalled/lib/hadoop_hdfs/#66908 moves this repository's consumers onto
hadoop_hdfs_3_4/, and that stays theright fix for master. It does nothing for the release branches or for anyone outside
this repository, and it cannot land until the prebuilt archives have been rebuilt.
So
build_hadoop_libs_3_4leaves the old prefix behind as a symlink to the one buildthat remains.
Why a symlink rather than a second copy
lib/hadoop_hdfs_3_4/is 182MB per platform, and the two prefixes have always hadidentical layouts - the removed
build_hadoop_libs()andbuild_hadoop_libs_3_4()are the same
cpsequence with a different version number, so the old name fits thenew tree exactly.
The install prefix is already built this way:
build-thirdparty.shcreatesinstalled/lib -> lib64as a relative directory symlink before any package runs, andevery prebuilt archive carries it. That is what shows the packaging and distribution
path preserves symlinks - a prebuilt from #66842 unpacks with 55 of them.
Two details that are load-bearing
hadoop_hdfs_3_4, not${TP_INSTALL_DIR}/...), so thelink resolves wherever the archive is unpacked rather than pointing back at the
machine that built it.
rm -rfruns without a trailing slash, and beforeln -s.rm -rf link/deletes what the link points at on BSD rm and does nothing on GNU rm, while
rm -rf linkremoves just the link on both. And without removing first,ln -sagainst a leftover real
hadoop_hdfs/directory - an older prebuilt, or a build-envimage predating its removal - creates
hadoop_hdfs/hadoop_hdfs_3_4inside it andleaves the stale 3.3.6.6 archive in place.
Effect on the merge order of #66842 / #66908
#66842 noted a window between itself and #66908: a Linux tree picking up a freshly
built archive would not find
installed/lib/hadoop_hdfs/native/libhdfs.a, which isstill what
build.sh'sLAST_THIRDPARTY_LIBlooks for, and would start a full ~3hthird-party rebuild. Once the archives are rebuilt from this PR, the sentinel resolves
through the link and that window closes without waiting for #66908.
#66908 should still land, sentinel move included - pointing at the real directory
rather than at the shim keeps it working when the shim is eventually dropped. One line
in its release note no longer holds: anything outside this repository reading the
hadoop_hdfs/prefix keeps working.Release note
None
Check List (For Author)
Test
Manual test (add detailed scripts or steps below)
build_hadoop_libs_3_4was driven end to end against a fixture install prefixreproducing
lib -> lib64, on macOS (BSDrm/ln) and on ubuntu-22.04 (GNUcoreutils 8.32), checking that:
libone lands inlib64/wherelibpoints;build.sh'shadoop_hdfs/native/libhdfs.asentinel and<hadoop_hdfs/hdfs.h>resolve through them;hadoop_hdfs/directory is taken over,with the old prefix resolving to the 3.4.2.4 archive afterwards;
tar -czf/tar -xzfinto a different path, which is howthe prebuilt archive is shipped.
This PR touches
thirdparty/**, so its ownBuild Third Party Librariesrunbuilds the whole tree on ubuntu-22.04, macos-15 and macos-14, which is where the
change actually executes.
Behavior changed:
installed/{include,lib}/hadoop_hdfsresolves to hadoop-libs 3.4.2.4, notthe 3.3.6.6 it named before [chore](thirdparty) build only hadoop 3.4.2.4, build azure everywhere and slim it down, and add ccache #66842. A tree built against a new archive through
the old prefix gets 3.4.2.4. That is the intended outcome - BE already linked
the 3.4.2.4 archive while
hdfs_builder.cppincluded the 3.3.6.6 header, and[chore](build) move hadoop_hdfs consumers onto 3.4.2.4 and link azure on aarch64/macOS #66908 moves
cloud/to 3.4.2.4 as well - but it is a version change, not arestoration. Release branches keep using the archives and build-env images
matching their own third-party tree, so their CI is unaffected.
nothing reads the old prefix; the CHANGELOG entry says so.
Does this need documentation?
🤖 Generated with Claude Code