Storing results in a DB
Paul Tagliamonte
paultag at debian.org
Fri Feb 15 03:00:43 UTC 2013
Hello, Firehosen,
So, forewarning: This is all very very hackey and gross.
I wrote a small native-object converter[1], which uses __slots__ to
populate a dict of dicts (it looses a bit of data, but is otherwise
rad), in order to store the entire Firehose report in a MongoDB
document datastore.
I've only loaded Debian's Chromium build-logs, but I plan on doing a
full run this weekend, if all goes well.
> db.results.find().count()
211
> db.results.find({"results.location.file.givenpath":
"third_party/libphonenumber/src/phonenumbers/utf/unicodetext.cc"}).count()
51
> db.results.find({"metadata.sut.buildarch": "armhf"}).count()
22
Two things:
1) This is gross. I don't like how I'm converting to Pythonic objects.
Who's +1 / -1 on adding this as a top-level method like to_xml &
from_xml ?
2) I like Mongo, a lot. Would anyone mind if I supported it more? I can
work with PostgreSQL or another relational DB, but I've grown to
love MongoDB the more I use it :)
Cheers,
Paul
[1]: https://github.com/paultag/storz/blob/master/storz/decompress.py
https://github.com/paultag/storz/blob/master/storz/store.py
--
.''`. Paul Tagliamonte <paultag at debian.org>
: :' : Proud Debian Developer
`. `'` 4096R / 8F04 9AD8 2C92 066C 7352 D28A 7B58 5B30 807C 2A87
`- http://people.debian.org/~paultag
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.fedoraproject.org/pipermail/firehose-devel/attachments/20130214/a602d16a/attachment-0001.sig>
More information about the firehose-devel
mailing list