Project

General

Profile

Actions

MAUSDocumentCacheConfiguration » History » Revision 1

Revision 1/15 | Next »
Jackson, Mike, 01 December 2011 15:03


Document Cache Configuration

MAUS can use a database to cache JSON documents until they are ready for processing. An example of this is caching the outputs from transforms (maps) until ready for merging (reduce). Two databases are currently supported - CouchDB and MongoDB.

CouchDB

CouchDB web site - http://couchdb.apache.org/

CouchDB can be installed using yum as follows.

  • Log in as root
  • Run
    $ yum install couchdb
     ...
     couchdb          i386          1.0.1-2.el5.rf          rpmforge          749 k
     ...
    
  • Start the server
    $ service couchdb start
    Starting database server couchdb
    $ service couchdb status
    Apache CouchDB is running as process 6723, time to relax.
    

    (as an alternative to service couchdb you can use /etc/init.d/couchdb)

By default CouchDB is available on http://localhost:5984/.

CouchDB and Python

MAUS uses couchdb-python - http://code.google.com/p/couchdb-python/. This is installed when you build MAUS.

CouchDB and MAUS

e src/common_py/ConfigurationDefaults.py
mongodb_host = "localhost" # Default MongoDB host name. Only needed if using Mon
goDBDocumentStore.
mongodb_port = 27017 # Default MongoDB port. Only needed if using MongoDBDocumen
tStore.
mongodb_database_name = "mausdb" # Default MongoDB database name. Only needed if
using MongoDBDocumentStore.
mongodb_collection_name = "spills" # Default MongoDB collection name. Only neede
d if using MongoDBDocumentStore.

MongoDB

MongoDB web site - http://www.mongodb.org/

MongoDB can be installed using yum as follows.

  • Log in as root
  • Edit /etc/yum.repos.d/10gen.repo and add the lines
    [10gen]
    name=10gen Repository
    baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/i686
    gpgcheck=0
    
  • Run
    $ yum install mongo-10gen
     ...
     mongo-10gen         i686         2.0.1-mongodb_1           10gen          28 M
     ...
    $ yum install mongo-10gen-server
     ...
     mongo-10gen-server       i686       2.0.1-mongodb_1          10gen       5.4 M
    ...
    
  • Start the server
    $ service mongod start
    Starting mongod: forked process: 4357
                                                               [  OK  ]
    all output going to: /var/log/mongo/mongod.log
    $ service mongod status
    mongod (pid 4357) is running...
    

    (as an alternative to service mongod you can use /etc/init.d/mongod)

By default MongoDB is available on http://localhost:27017/.

MongoDB and Python

MAUS uses pymongo - http://api.mongodb.org/python/current/. This is installed when you build MAUS.

Updated by Jackson, Mike over 12 years ago · 1 revisions