Build from source

    Prerequisites

    Installing Java and Maven
    • JDK 8, 8u92+ or JDK 11. See our for information about obtaining a JDK.
    • Maven version 3.x
    Other dependencies
    • Distribution builds require Python 3.x and the pyyaml module
    Downloading the source

    Building from source

    The basic command to build Druid from source is:

    1. mvn clean install

    This will run static analysis, unit tests, compile classes, and package the projects into JARs. It will not generate the source or binary distribution tarball.

    • -Pdist - Distribution profile: Generates the binary distribution tarball by pulling in core extensions and dependencies and packaging the files as
    • -Prat - Apache Rat profile: Runs the Apache Rat license audit tool
    • -DskipTests - Skips unit tests (which reduces build time)
    • -Ddruid.console.skip=true - Skip front end project

    Putting these together, if you wish to build the source and binary distributions with signatures and checksums, audit licenses, and skip the unit tests, you would run:

    By default, druid ships hadoop 2.x.x jars along with the distribution. Exact version can be found in the main . To build druid with hadoop 3.x.x jars, hadoop3 profile needs to be activated.

    1. mvn clean install -Phadoop3

    To generate distribution with hadoop3 dependencies, run :

    Potential issues

    Missing pyyaml

    You are building Druid from source following the instructions on this page but you get

    On some systems, ensure you use the Python 3.x version of pip:

    1. pip3 install pyyaml