Skip to content

Directory Tree Definitions

Rahul Iyer edited this page Jul 1, 2015 · 25 revisions

MADlib® Source Directory:

madlib/

    doc/                    # documentation tools

    examples/               # sample code for users

    src/                    # source code
        config/                 # configuration files
            Ports.yml               # list of all target ports
            Version.yml             # MADlib version file
            Modules.yml             # default/full list of MADlib modules

        madpack/                # MADPack source files
            madpack.py              # main executable
            configyml.py            # YML config files helper
            plpy.py
            argparse.py

        modules/                # Modules directory
            prob/                   # Probability distributions
                student.sql_in          # Contains only UDFs -> platform independent
                student.cpp             # C++ Code -> platform independent
                test/
                    student.sql_in      # Test script
            regress/
                linear.cpp
                logistic.cpp
                test/
                    linear.sql_in
                    logistic.sql_in
            ...

        ports/
            postgres/
                config/
                    Modules.yml         # (Optional file). Overrides default module list for PostgreSQL
                CMakeLists.txt      # Build script for PostgreSQL
                dbconnector/            # C++ Database Connector files
                madpack/
                    CMakeLists.txt          # Build script for madpack
                    CMakeLists_PyGreSQL.txt # Build script for PyGreSQL (as separate project)
                modules/                # Platform-depedent parts
                    regress/                # User-defined aggregates are currently platform-dependent
                        linear.sql_in
                        test/
                            linear.sql_in
                            logistic.sql_in
                    ...
            greenplum/
                CMakeLists.txt      # Build script for Greenplum (uses files form ../postgres)
                config/
                    Modules.yml         # (Optional file). Override default module list for Greenplum
                ...

MADlib Build/Target Directory:

/usr/local/share/madlib/

    bin/                    # binaries
        madpack -> ../madpack/madpack.py

    examples/               # sample code for users

    doc/                    # documentation (example: local doxygen)

    man/                    # man pages
        man3/
            madpack.1

    lib/
        libmadlib.so        # MADlib core library
        libarmadillo.so     # Umbrella library for LAPACK, BLAS, ATLAS (not installed on Mac)

    config/                 # default/global config files
        Ports.yml
        Version.yml
        Modules.yml

    modules/                # Platform/DBMS independent sources (i.e., standard SQL, generic Python modules)
        prob/
            student.sql_in
            test/
                student.sql_in
        ...

    madpack/
        __init__.py
        madpack.py
        configyml.py
        argparse.py         # argparse

    ports/                  # port dependent code and configuration
        greenplum/
            config/
                Modules.yml
            lib/
                libmad_greenplum.so       # MADlib connector library
            modules/            # Platform-dependent sources ("advanced"-SQL files, preprocessed Python files)
                regress/
                    linear.sql_in
                    logistic.py
                    logistic.sql_in
                    test/
                        linear.sql_in
                        logistic.sql_in
                ...
        postgres/
            config/
            lib/
            madpack/
                pygresql/           # PygreSQL (requires build phase)
                    __init__.py
                    _pg.so
                    pg.py
                    pgdb.py
            modules/
        ...

MADlib links:

/usr/local

    bin/
        madpack -> /usr/local/shared/madlib/bin/madpack

    man/
        man3/
            madpack.1 -> ...