-
-
Notifications
You must be signed in to change notification settings - Fork 6
fix: Spark HBase connector on aarch64 #882
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
1b7bc15
fix: Spark HBase connector on aarch64
siegfriedweber 474de5a
fix: Issue number in the changelog
siegfriedweber 90dc340
Use the same Hadoop version as in the HBase image
siegfriedweber f3bb518
Merge branch 'main' into fix/spark-hbase-connector-on-aarch64
siegfriedweber 40c9253
Update spark-k8s/versions.py
siegfriedweber 6b56f85
Update spark-k8s/versions.py
siegfriedweber File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
49 changes: 49 additions & 0 deletions
49
spark-k8s/stackable/hbase-connectors-patches/1.0.1/001-fix-protobuf-on-aarch64.patch
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| diff --git a/pom.xml b/pom.xml | ||
| index e849cd1..f514e14 100644 | ||
| --- a/pom.xml | ||
| +++ b/pom.xml | ||
| @@ -157,7 +157,10 @@ | ||
| <extra.enforcer.version>1.5.1</extra.enforcer.version> | ||
| <restrict-imports.enforcer.version>0.14.0</restrict-imports.enforcer.version> | ||
| <!--Internally we use a different version of protobuf. See hbase-protocol-shaded--> | ||
| - <external.protobuf.version>2.5.0</external.protobuf.version> | ||
| + <!-- com.google repo will be used except on Aarch64 platform. --> | ||
| + <external.protobuf.groupId>com.google.protobuf</external.protobuf.groupId> | ||
| + <external.protobuf.version>2.6.1</external.protobuf.version> | ||
| + <external.protobuf.exe.version>${external.protobuf.version}</external.protobuf.exe.version> | ||
| <protobuf.plugin.version>0.5.0</protobuf.plugin.version> | ||
| <commons-io.version>2.11.0</commons-io.version> | ||
| <avro.version>1.7.7</avro.version> | ||
| @@ -933,5 +936,19 @@ | ||
| </plugins> | ||
| </build> | ||
| </profile> | ||
| + <!-- use com.github.os72 on aarch64 platform --> | ||
| + <profile> | ||
| + <id>aarch64</id> | ||
| + <properties> | ||
| + <external.protobuf.groupId>com.github.os72</external.protobuf.groupId> | ||
| + <external.protobuf.exe.version>2.6.1-build3</external.protobuf.exe.version> | ||
| + </properties> | ||
| + <activation> | ||
| + <os> | ||
| + <family>linux</family> | ||
| + <arch>aarch64</arch> | ||
| + </os> | ||
| + </activation> | ||
| + </profile> | ||
| </profiles> | ||
| </project> | ||
| diff --git a/spark/pom.xml b/spark/pom.xml | ||
| index 3f1eb21..fcdc73e 100644 | ||
| --- a/spark/pom.xml | ||
| +++ b/spark/pom.xml | ||
| @@ -84,7 +84,7 @@ | ||
| <artifactId>protobuf-maven-plugin</artifactId> | ||
| <version>${protobuf.plugin.version}</version> | ||
| <configuration> | ||
| - <protocArtifact>com.google.protobuf:protoc:${external.protobuf.version}:exe:${os.detected.classifier}</protocArtifact> | ||
| + <protocArtifact>${external.protobuf.groupId}:protoc:${external.protobuf.exe.version}:exe:${os.detected.classifier}</protocArtifact> | ||
| <protoSourceRoot>${basedir}/src/main/protobuf/</protoSourceRoot> | ||
| <clearOutputDirectory>false</clearOutputDirectory> | ||
| <checkStaleness>true</checkStaleness> |
44 changes: 44 additions & 0 deletions
44
spark-k8s/stackable/hbase-connectors-patches/apply_patches.sh
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| # Enable error handling and unset variable checking | ||
| set -eu | ||
| set -o pipefail | ||
|
|
||
| # Check if $1 (VERSION) is provided | ||
| if [ -z "${1-}" ]; then | ||
| echo "Please provide a value for VERSION as the first argument." | ||
| exit 1 | ||
| fi | ||
|
|
||
| VERSION="$1" | ||
| PATCH_DIR="patches/$VERSION" | ||
|
|
||
| # Check if version-specific patches directory exists | ||
| if [ ! -d "$PATCH_DIR" ]; then | ||
| echo "Patches directory '$PATCH_DIR' does not exist." | ||
| exit 1 | ||
| fi | ||
|
|
||
| # Create an array to hold the patches in sorted order | ||
| declare -a patch_files=() | ||
|
|
||
| echo "Applying patches from ${PATCH_DIR}" now | ||
|
|
||
| # Read the patch files into the array | ||
| while IFS= read -r -d $'\0' file; do | ||
| patch_files+=("$file") | ||
| done < <(find "$PATCH_DIR" -name "*.patch" -print0 | sort -zV) | ||
|
|
||
| echo "Found ${#patch_files[@]} patches, applying now" | ||
|
|
||
| # Iterate through sorted patch files | ||
| for patch_file in "${patch_files[@]}"; do | ||
| echo "Applying $patch_file" | ||
| # We can not use Git here, as we are not within a Git repo | ||
| patch --directory "." --strip=1 < "$patch_file" || { | ||
| echo "Failed to apply $patch_file" | ||
| exit 1 | ||
| } | ||
| done | ||
|
|
||
| echo "All patches applied successfully." |
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
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.
Uh oh!
There was an error while loading. Please reload this page.