pan3793 opened a new pull request, #7924:
URL: https://github.com/apache/hadoop/pull/7924

   <!--
     Thanks for sending a pull request!
       1. If this is your first time, please read our contributor guidelines: 
https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute
       2. Make sure your PR title starts with JIRA issue id, e.g., 
'HADOOP-17799. Your PR title ...'.
   -->
   
   ### Description of PR
   
   I saw that some contributors have started adding riscv64 support. Currently, 
Hadoop neither has riscv64 CI nor a dev container, the reviewers are not easy 
to verify the patch on x86_64 or aarch64 platforms.
   
   This PR proposes to leverage Docker's cross-platform capability to allow 
running standard dev containers on x86_64 or aarch64 platforms.
   
   Note: this requires upgrading protobuf to 3.25.5 first, see HADOOP-19605.
   
   ### How was this patch tested?
   
   I'm using a MacBook Pro with an M1 Max chip.
   
   ```
   $ uname -a
   Darwin H27212-MAC-01.local 24.6.0 Darwin Kernel Version 24.6.0: Mon Jul 14 
11:30:29 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6000 arm64
   $ docker --version
   Docker version 28.3.3, build 980b856
   ```
   
   Launch Hadoop dev container
   ```
   $ docker run --rm --privileged tonistiigi/binfmt --install riscv64
   $ CPU_ARCH=riscv64 ./start-build-env.sh ubuntu_24
   ...
    => => naming to docker.io/library/hadoop-build_ubuntu_24-501                
                                                                                
                                                    0.0s
   
    _   _           _                    ______
   | | | |         | |                   |  _  \
   | |_| | __ _  __| | ___   ___  _ __   | | | |_____   __
   |  _  |/ _` |/ _` |/ _ \ / _ \| '_ \  | | | / _ \ \ / /
   | | | | (_| | (_| | (_) | (_) | |_) | | |/ /  __/\ V /
   \_| |_/\__,_|\__,_|\___/ \___/| .__/  |___/ \___| \_(_)
                                 | |
                                 |_|
   
   This is the standard Hadoop Developer build environment.
   This has all the right tools installed required to build
   Hadoop from source.
   
   
   You must install 'com.google.protobuf:protoc:exe:linux-riscv64:3.25.5'
   into maven local repository (~/.m2) manually in riscv64 platform.
   
     mvn install:install-file \
       -DgroupId=com.google.protobuf \
       -DartifactId=protoc \
       -Dversion=3.25.5 \
       -Dclassifier=linux-riscv64 \
       -Dpackaging=exe \
       -Dfile=/opt/protobuf/bin/protoc
   
   chengpan@65fadd843df5:~/hadoop$
   ```
   
   Successfully building hadoop common modules, there are some issues that need 
to be fixed independently
   ```
   $ mvn clean install -DskipTests -Pnative -pl :hadoop-common -am
   ```
   ### For code changes:
   
   - [x] Does the title or this PR starts with the corresponding JIRA issue id 
(e.g. 'HADOOP-17799. Your PR title ...')?
   - [ ] Object storage: have the integration tests been executed and the 
endpoint declared according to the connector-specific documentation?
   - [ ] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)?
   - [ ] If applicable, have you updated the `LICENSE`, `LICENSE-binary`, 
`NOTICE-binary` files?
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to