If you are a Java Developer and interested in contributing to Apache Ranger Project ?


Download the Apache Ranger Project  

You should be able to pull the Apache Ranger code into your local machine.

git clone https://gitbox.apache.org/repos/asf/ranger.git

Alternatively, the git repo is automatically mirrored on Github at: https://github.com/apache/ranger

You can fork that repository, commit changes to your fork, and submit Pull requests (PR) through GitHub's pull request mechanisms. Beware that Apache Ranger project uses ReviewsBoard primarily! See p.8 below for more information!

PRs are still useful for contributors because the PRs trigger builds at TravisCI on Linux x86_64 and ARM64 CPU architectures. If the CI build is successful then it is recommended to create a review request at ReviewBoard by using the patch generated by https://github.com/apache/ranger/pull/<PR_NUMBER>.patch (replace <PR_NUMBER> with the number of your Pull Request!)

You can find the ways to build and deploy the code from Quick Start Guide. You can get further information about Apache Ranger from the Project Home Page.

Subscribe to Apache Ranger Development Community

Also, Developer mailing list is a good resource for gaining knowledge about the current features being discussed/designed for the release.

You can subscribe to developer mailing list by sending mail to dev-subscribe@ranger.apache.org 

Are you ready to work on some code ?

If you are new person to Apache, please create a new account from Apache Self-Service Jira Account Creation page.  Once you have a valid Apache JIRA user account, 

  1. Login into JIRA Page for Apache Ranger
     
  2. Review all unassigned JIRA(s)  that are of your interest and pick a JIRA to work on.
     
  3. Send a note to dev community  via dev@ranger.apache.org to have a PMC member assign the JIRA to you.
     
  4. Once the JIRA is assigned to you, you can work on the Apache Ranger source on your local repo - to resolve the JIRA.

  5. Configure your git to use your username and email address. So when the patch is created, it will have your information and the code will have your credit.
     
  6. After the JIRA is resolved, you can commit the changes to your local repo with commit comment with Apache JIRA number as follows: 

    $ git add <modified|add|deleted-files>
    $ git commit -m "RANGER-<JIRANUMBER>: <description of the JIRA fix>"
  7. After you committed your change into your local repo, you should be able to create a patch using the following command: 
    $ git format-patch -n HEAD~

    This command should create a git patch file under the current directory. Attach the patch file to the Apache JIRA and provide your comment about the solution. An Apache Ranger committer should be able to review your patch and provide feedback or commit to Apache Ranger.

    If you have issues applying the patch correctly, please do the following:

    git config diff.noprefix false

    For additional information, please refer to discussions in RANGER-1739



  8. You should upload the patch in https://reviews.apache.org/r/. Steps are:

    1. Create an account in review board

    2. Click on "New Review Request"

    3. Search for "ranger" in the repository at the left

    4. Upload your patch file

    5. Give name and description. Add Apache JIRA # in review request title/name

    6. On the right side, give the JIRA number, select  group "ranger" 
    7. And publish the request.
    8. Attach the patch to Apache JIRA
    9. Provide the link to the review request in Apache JIRA
    10. Mark the fix version appropriately (if you know)
    11. If the patch is accepted, then one of the committers will commit your code.
    12. Update the JIRA with commit link once the patch is reviewed and committed
    13. Mark the review request as closed once the patch is committed
  9. For pulling latest source changes from Apache Ranger, you can execute the following command to get latest code changes from remote Apache repo to your local repo:

    $ git pull
  10. FOR COMMITTERS: Those committing contributed code, please follow the below processafterapproving the code

    #Test whether the patch can be applied without errors
    git apply --check RANGER-xyz.patch
    
    
    #Apply the patch
    git am --signoff RANGER-xyz.patch
    
    
    #Push the changes
    git push

VOTE for an Apache Ranger Release

To VOTE for an Apache Ranger Release,  You should be subscribed to dev mailing list of Apache Ranger. You can subscribe to developer mailing list by sending mail to dev-subscribe@ranger.apache.org 
For previous emails from the DEV mailing list, you can view them from https://lists.apache.org/list?dev@ranger.apache.org

Once you have the VOTE email from a Release Manager, you can do the following to validate the Apache RANGER release:

  1. Locate an empty directory to download the artifacts and build (e.g: ${RANGER_RELEASE_DIR})
  2. Download all artifacts specified in the release email (e.g:  apache-ranger-${RANGER_RELEASE}.tar.gz )
  3. Download the PGP Signature file associated with the release artifact (eg: apache-ranger-${RANGER_RELEASE}.tar.gz.asc)
  4. Download the SHA256 Signature file associated with the release artifact (eg: apache-ranger-${RANGER_RELEASE}.tar.gz.sha256)
  5. Download the SHA512 Signature file associated with the release artifact (eg: apache-ranger-${RANGER_RELEASE}.tar.gz.asc.sha51)
  6. VALIDATION # 1 : Build the ranger binaries using the source downloaded
  7. VALIDATION # 2 : Ensure that the signature associated with the downloaded source is matching with the downloaded signature file(s).
  8. Run the following commands to validate #1 and #2:

    Define Environment Variables
    RANGER_RELEASE_DIR="${HOME}/ranger-validation" # PLEASE define this variable depending on your needs
    RANGER_RELEASE="2.4.0"                         # PLEASE define your RELEASE number such as 2.2.0 ....
    RANGER_RC="rc2"                                # PLEASE define your Release Candidate Prefix
    Download Artifacts
    RANGER_DOWNLOAD_URL_PREFIX="https://dist.apache.org/repos/dist/dev/ranger/${RANGER_RELEASE}-${RANGER_RC}"
    RANGER_KEYS_URL="https://dist.apache.org/repos/dist/release/ranger/KEYS"
    RANGER_RELEASE_SOURCE="apache-ranger-${RANGER_RELEASE}.tar.gz"
    #
    mkdir -p ${RANGER_RELEASE_DIR}
    cd ${RANGER_RELEASE_DIR}
    # Download all artifacts into this directory
    rm -f ${RANGER_RELEASE_SOURCE} 
    rm -f ${RANGER_RELEASE_SOURCE}.asc ${RANGER_RELEASE_SOURCE}.sha256 ${RANGER_RELEASE_SOURCE}.sha512 
    curl -o ${RANGER_RELEASE_SOURCE}        "${RANGER_DOWNLOAD_URL_PREFIX}/${RANGER_RELEASE_SOURCE}"
    curl -o ${RANGER_RELEASE_SOURCE}.asc    "${RANGER_DOWNLOAD_URL_PREFIX}/${RANGER_RELEASE_SOURCE}.asc"
    curl -o ${RANGER_RELEASE_SOURCE}.sha256 "${RANGER_DOWNLOAD_URL_PREFIX}/${RANGER_RELEASE_SOURCE}.sha256"
    curl -o ${RANGER_RELEASE_SOURCE}.sha512 "${RANGER_DOWNLOAD_URL_PREFIX}/${RANGER_RELEASE_SOURCE}.sha512"
    curl -o KEYS "${RANGER_KEYS_URL}"
    Apache build
    cd ${RANGER_RELEASE_DIR}
    rm -rf  apache-ranger-${RANGER_RELEASE}
    tar xf  ${RANGER_RELEASE_SOURCE}
    cd apache-ranger-${RANGER_RELEASE}
    # The following build command should successfully complete without any errors 
    mvn -Pall -DskipTests=false clean compile package install
  9. Run the following commands to validate the ranger release artifacts:

    Validate Release Artifacts
    # Go to the directory where the artifact is downloaded
    cd ${RANGER_RELEASE_DIR}
    [ -f KEYS ] && gpg --import KEYS > /dev/null 2>&1
    #
    # VALIDATE: GPG signatures
    #
    gpg --verify ${RANGER_RELEASE_SOURCE}.asc ${RANGER_RELEASE_SOURCE}
    if [ $? -ne 0 ]
    then
    	echo "***** ERROR *****: Unable to validate GPG signature for ${RANGER_RELEASE_SOURCE}"
    else
    	echo "+OK: validated GPG signature for ${RANGER_RELEASE_SOURCE}"
    fi
    #
    # VALIDATE: the SHA256 and SHA512 Signatures with the content of file below ...
    # 
    for SIG_ALGO in sha256 sha512
    do
    	GEN_SIG="`gpg --print-md SHA256 ${RANGER_RELEASE_SOURCE}`"
    	FILE_SIG="`cat ${RANGER_RELEASE_SOURCE}.sha256`"
    	if [ "${GEN_SIG}x" != "${FILE_SIG}x" ]
    	then
    		echo "**** ERROR *****: Unable to validate ${SIG_ALGO} signature for ${RANGER_RELEASE_SOURCE}"
    	else
    		echo "+OK: validated ${SIG_ALGO} signature for ${RANGER_RELEASE_SOURCE}"
    	fi
    	unset GEN_SIG
    	unset FILE_SIG
    done
  10. Once the validations are complete, please VOTE via email - replying to the original VOTE request using the process described in Apache VOTING Process.
     

Getting JetBrain's IntelliJ Idea (IDE) License - For committers and PMC members ONLY!

According to the agreement between JetBrains and the Apache Software Foundation, all Apache committers should apply for the OSS development licenses individually via this form.
Please use your @apache.org e-mail address to get a free license assigned to you automatically.


If you have any questions related to Apache Ranger development questions, please feel free to contact dev group via email - dev@ranger.apache.org .

  • No labels