Project

General

Profile

MAUSDocumentCacheConfiguration » History » Version 1

Jackson, Mike, 01 December 2011 15:03

1 1 Jackson, Mike
h1. Document Cache Configuration
2
3
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.
4
5
h2. CouchDB
6
7
CouchDB web site - http://couchdb.apache.org/
8
9
CouchDB can be installed using @yum@ as follows.
10
11
 * Log in as root
12
 * Run 
13
<pre>
14
$ yum install couchdb
15
 ...
16
 couchdb          i386          1.0.1-2.el5.rf          rpmforge          749 k
17
 ...
18
</pre>
19
 * Start the server
20
<pre>
21
$ service couchdb start
22
Starting database server couchdb
23
$ service couchdb status
24
Apache CouchDB is running as process 6723, time to relax.
25
</pre>
26
(as an alternative to @service couchdb@ you can use @/etc/init.d/couchdb@)
27
28
By default CouchDB is available on http://localhost:5984/.
29
30
h3. CouchDB and Python
31
32
MAUS uses couchdb-python - http://code.google.com/p/couchdb-python/. This is installed when you build MAUS.
33
34
h3. CouchDB and MAUS
35
36
e src/common_py/ConfigurationDefaults.py
37
mongodb_host = "localhost" # Default MongoDB host name. Only needed if using Mon
38
goDBDocumentStore.
39
mongodb_port = 27017 # Default MongoDB port. Only needed if using MongoDBDocumen
40
tStore.
41
mongodb_database_name = "mausdb" # Default MongoDB database name. Only needed if
42
 using MongoDBDocumentStore.
43
mongodb_collection_name = "spills" # Default MongoDB collection name. Only neede
44
d if using MongoDBDocumentStore.
45
46
47
h2. MongoDB
48
49
MongoDB web site - http://www.mongodb.org/
50
51
MongoDB can be installed using @yum@ as follows.
52
53
 * Log in as root
54
 * Edit @/etc/yum.repos.d/10gen.repo@ and add the lines
55
<pre>
56
[10gen]
57
name=10gen Repository
58
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/i686
59
gpgcheck=0
60
</pre>
61
 * Run 
62
<pre>
63
$ yum install mongo-10gen
64
 ...
65
 mongo-10gen         i686         2.0.1-mongodb_1           10gen          28 M
66
 ...
67
$ yum install mongo-10gen-server
68
 ...
69
 mongo-10gen-server       i686       2.0.1-mongodb_1          10gen       5.4 M
70
...
71
</pre>
72
 * Start the server
73
<pre>
74
$ service mongod start
75
Starting mongod: forked process: 4357
76
                                                           [  OK  ]
77
all output going to: /var/log/mongo/mongod.log
78
$ service mongod status
79
mongod (pid 4357) is running...
80
</pre>
81
(as an alternative to @service mongod@ you can use @/etc/init.d/mongod@)
82
83
By default MongoDB is available on http://localhost:27017/.
84
85
h3. MongoDB and Python
86
87
MAUS uses pymongo - http://api.mongodb.org/python/current/. This is installed when you build MAUS.