Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Install prerequisites

    Use https://github.com/apache/impala/blob/master/bin/bootstrap_development.sh to setup your Ubuntu 16.04 or Ubuntu 14.04 machine.
    By default, bootstrap_development.sh clones Impala in $HOME/Impala. To build Impala in a different directory, set IMPALA_HOME when running bootstrap_development.sh. For example IMPALA_HOME=`pwd` ./bootstrap_development.sh

    Info

    If you are running on a platform that is not supported by the above script, you will have to install prerequisites and set up your machine manually. Impala Build Prerequisites has some information that can guide you.


  2. Clone the Impala git repo and change to the new Impala directory.

    Code Block
    languagebash
    themeEmacs
    git clone https://git-wip-usgitbox.apache.org/repos/asf/impala.git Impala
    cd Impala


  3. Set the following environment variables in your `.bashrc` or elsewhere:

    Code Block
    languagebash
    themeEmacs
    export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
    export IMPALA_HOME=<path to Impala>
    export BOOST_LIBRARYDIR=/usr/lib/x86_64-linux-gnu
    export LC_ALL="en_US.UTF-8"


  4. Build Impala.

    Code Block
    languagebash
    themeEmacs
    # Build Impala and prepare the local mini-cluster (the first time only)
    ${IMPALA_HOME}/buildall.sh -noclean -skiptests -format


    Info

    You may hit an error here in bootstrap_toolchain.py if you are building Impala on an operating system for which prebuilt toolchain binaries are not available. In that case you will need to build native-toolchain from scratch then retry this step.


    Info
    titleWant faster builds?

    Doing a full build of Impala can take quite a while! While you wait, check out Tips for Faster Impala Builds.


  5. Start supporting services.

    Code Block
    languagebash
    themeEmacs
    # This script starts or restarts the local services required for the test cluster
    # including HDFS, HBase, Hive and ZooKeeper. If you hit a problem with this script,
    # check the log files in ${IMPALA_HOME}/cluster_logs/ for clues.
    ${IMPALA_HOME}/buildall.sh -noclean -notests -start_minicluster


  6. Start the Impala cluster.

    Code Block
    languagebash
    themeEmacs
    source ${IMPALA_HOME}/bin/impala-config.sh # You must source this in your shell before most of the below commands will work.
    
    # The following command will start an Impala cluster with 3 Impala demons, one 
    # Statestore and one Catalog demon.
    ${IMPALA_HOME}/bin/start-impala-cluster.py


  7. Check that everything works correctly.

    Code Block
    languagebash
    themeEmacs
    source ${IMPALA_HOME}/bin/impala-config.sh # If you didn't already source impala-config.sh in this shell
    
    impala-shell.sh -q "SELECT version()"
    Starting Impala Shell without Kerberos authentication
    Connected to localhost:21000
    Server version: impalad version 2.2.0-INTERNAL DEBUG (build 47c90e004aecb928a37b926080098d30b96b4330)
    Query: select version()
    +---------------------------------------------------------------------------------------+
    | version()                                                                             |
    +---------------------------------------------------------------------------------------+
    | impalad version 2.2.0-INTERNAL DEBUG (build 47c90e004aecb928a37b926080098d30b96b4330) |
    | Built on Sun, Mar 22 15:22:57 PDT 2015                                                |
    +---------------------------------------------------------------------------------------+
    Fetched 1 row(s) in 0.05s


  8. Have fun...
  9. Recompile and restart the Impala cluster for your changes to take effect. See Tips for Faster Impala Builds for tips on how to do incremental builds.

    Code Block
    languagebash
    themeEmacs
    # Rebuild both backend and frontend
    ${IMPALA_HOME}/buildall.sh -skiptests -noclean
    
    source ${IMPALA_HOME}/bin/impala-config.sh # If you didn't already source impala-config.sh in this shell
     # Optional: Rebuild the impala binary only
    make -j$IMPALA_BUILD_THREADS impalad
    # Optional: Build the Java-side frontend only
    make -j$IMPALA_BUILD_THREADS fe
    # Restart the Impala cluster
    ${IMPALA_HOME}/bin/start-impala-cluster.py


...