Skip to content

Directory Tree Definitions

fschopp edited this page May 13, 2011 · 24 revisions

MADlib Source Directory:

madlib/

    doc/                    # documentation tools

    examples/               # sample code for users

    src/                    # source code
        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
            regress/
                linear.cpp
                logistic.cpp
            ...

        ports/
            postgres/
                config/
                    Methods.yml         # (Optional file). Overrides default method 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
                    ...
            greenplum/
                config/
                    Methods.yml         # (Optional file). Override default method list for Greenplum
                CMakeLists.txt      # Build script for Greenplum (uses files form ../postgres)
                ...

    config/                 # configuration files
        Ports.yml               # list of all target ports
        Version.yml             # MADlib version file        
        Methods.yml             # default/full list of MADlib methods

    methods/                # Source code of methods not yet converted to new C++ layer and new directory structure
                            # The contents of this directory will be moved and converted to src/module eventually
        bayes/                  # method directory, follows Method.yml naming
            pg_gp/                  # source port, example: pg_gp, ora, nz
                *.c
                *.cpp
                *.h
                bayes.sql_in            # DB objects creation script, its name follows: <method>.sql
                bayes.py                # Python module for this method, its follows: <method>.sql
                /test                   # test script dir (called by "madpack install-check")    
                    bayes.sql_in            # main test script, its name follows: <method>.sql
                    bayes.x.sql_in          # optional detail test scripts
        k-means/
                ...
        decision-tree/
                ...

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
        Methods.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/
                Methods.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
                ...
        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 -> ...

Clone this wiki locally