Skip to content

Instantly share code, notes, and snippets.

@terriyu
Created August 25, 2013 04:39
Show Gist options
  • Save terriyu/6332038 to your computer and use it in GitHub Desktop.
Save terriyu/6332038 to your computer and use it in GitHub Desktop.

23 Aug 2013

Bug I reported a while back

I reported a bug a while ago about "GnomeKeyring errors when installing devstack":

https://bugs.launchpad.net/devstack/+bug/1193164

Some Tempest and Keystone developers made some comments about how to address this issue long-term in bug fixes.

Code review

Reviewed litong01's patch "install manual last few sections format needs to be fixed"

https://review.openstack.org/#/c/43499/

and made a comment about documentation

Building Ceilometer documentation

To review litong01's patch, I tried to build the Ceilometer documentation by going to the doc directory and running the Makefile:

$ cd /opt/stack/ceilometer/doc
$ make html

But this failed because I didn't have all the dependencies installed.

To install the dependencies, I did

$ sudo pip install sphinxcontrib-httpdomain
$ sudo pip install sphinxcontrib-pecanwsme
$ sudo pip install oslo.sphinx

Group by blueprint

MongoDB group by Patch Set 5 code review

Patch Set 5 link: https://review.openstack.org/#/c/43043/5/

jd gave me a +2 review, but also had a suggestion on my code, in particular the code block:

PARAMS_MAP_STATS_GROUPBY = {'key_val': 'groupby_key',
                            'groupby_val': 'new Object(groupby)',
                            'period_start_val': 'this.timestamp',
                            'period_end_val': 'this.timestamp'}

in class Connection of ceilometer/storage/impl_mongodb.py

Isn't groupby sufficient? It seems to me that new Object(groupby) == groupby

jd is right; I don't need to create a new object because I only use the variable groupby once. So I replaced new Object(groupby) with simply groupby.

I also made the same replacement in the map function PARAMS_MAP_STATS_PERIOD_GROUPBY.

MongoDB group by Patch Set 6 submitted

After addressing jd's code review on Patch Set 5, I uploaded these changes as Patch Set 6:

https://review.openstack.org/#/c/43043/6/

Blueprint/wiki documentation

I updated the blueprint and wiki to include a section on "MongoDB driver group by implementation". The section includes an explanation of why I chose to stick with the mapReduce() method out of the three MongoDB API aggregation methods (aggregate, mapReduce, group) and some comments about how I designed the map functions.

Map reduce MongoDB references

MongoDB manual

Pymongo documentation

Other references

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment