Skip to content

Directory Tree Definitions

agorajek edited this page May 5, 2011 · 25 revisions

MADlib Source Directory:

madlib/

    doc/                    # documentation tools

    examples/               # sample code for users

    python/                 # python code
        ext/                    # 3rd party modules
            pygresql.py
            sqlparse
            plpy.py
            ...
        madpack/                # madpack modules
            madpack             # main executable
            build.py            # DistUtils build helper
            configyml.py        # YML config files helper
            
    config/                 # configuration files
        Ports.yml               # list of all target ports
        Version.yml             # MADlib version file        
        Methods.yml             # default/full list of MADlib methods
        ports/                  # port dependent method lists
            postgres/
                Methods.yml     # method list for pg90 (PostgreSQL 9.0)
            greenplum/
                Methods.yml     # method list for gp40 (Greenplum 4.0)
            ...

    methods/                # methods' source code
        bayes/                  # method directory, follows Method.yml naming
            pg_gp/                  # source port, example: pg_gp, ora, nz
                Install.yml             # config file (dependency info) 
                *.c
                *.cpp
                *.h
                bayes.sql               # DB objects creation script, its name follows: <method>.sql
                bayes.py                # Python module for this method, its follows: <method>.sql
                /tests                  # test script dir (called by "madpack install-check")    
                    bayes.sql               # main test script, its name follows: <method>.sql
                    bayes.1.sql             # optional detail test scripts
                    bayes.X.sql               
        k-means/
                ...
        decision-tree/
                ...

MADlib Build/Target Directory:

/usr/local/share/madlib/

    bin/                    # binaries
        madpack        

    examples/               # sample code for users

    doc/                    # documentation (example: local doxygen)

    man/                    # man pages
        man3/
            madpack.1

    lib/
        libmad.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
        
    python/                 # default Python code (non-port dependent)
        madpack/                # madpack python modules
            configyml.py
        ext/                # 3rd party modules
            pygresql.py
            sqlparse
            plpy.py
            ...
        methods/            # default methods' modules
            bayes.py
            kmeans.py
            regress.py
            ...

    sql/                    # default SQL code (non-port dependent)
        byes.sql
        kmeans.sql
        svm.sql
        regress.sql
        ...
        tests/
            bayes.sql
            ...
    ports/                  # port dependent code and configuration
        greenplum/
            lib/
                libmad_greenplum.so       # MADlib connector library
            python/
                kmeans.py
                ...
            sql/
                svm.sql
                ...
            config/
                Methods.yml
        postgres/
        ...

MADlib links:

/usr/local

    bin/
        madpack -> /usr/local/shared/bin/madpack   
        
    man/
        man3/
            madpack.1 -> ...