{"action":"opened","issue":{"url":"https://api.github.com/repos/potatolondon/djangae/issues/789","repository_url":"https://api.github.com/repos/potatolondon/djangae","labels_url":"https://api.github.com/repos/potatolondon/djangae/issues/789/labels{/name}","comments_url":"https://api.github.com/repos/potatolondon/djangae/issues/789/comments","events_url":"https://api.github.com/repos/potatolondon/djangae/issues/789/events","html_url":"https://github.com/potatolondon/djangae/issues/789","id":192899222,"number":789,"title":"MapReduce tasks map through all namespaces when using the default DB","user":{"login":"nealedj","id":356075,"avatar_url":"https://avatars.githubusercontent.com/u/356075?v=3","gravatar_id":"","url":"https://api.github.com/users/nealedj","html_url":"https://github.com/nealedj","followers_url":"https://api.github.com/users/nealedj/followers","following_url":"https://api.github.com/users/nealedj/following{/other_user}","gists_url":"https://api.github.com/users/nealedj/gists{/gist_id}","starred_url":"https://api.github.com/users/nealedj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nealedj/subscriptions","organizations_url":"https://api.github.com/users/nealedj/orgs","repos_url":"https://api.github.com/users/nealedj/repos","events_url":"https://api.github.com/users/nealedj/events{/privacy}","received_events_url":"https://api.github.com/users/nealedj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-01T16:43:21Z","updated_at":"2016-12-01T16:43:21Z","closed_at":null,"body":"See https://github.com/GoogleCloudPlatform/appengine-mapreduce/blob/master/python/src/mapreduce/input_readers.py#L340\r\n\r\nIf the `NAMESPACE` passed in the mapper spec is `None` then the input reader will map over entities in all namespaces. When djangae sets up an MR pipeline it [takes the namespace](https://github.com/potatolondon/djangae/blob/master/djangae/contrib/mappers/pipes.py#L143) from the DB settings of the specified database. The initial [database settings](https://github.com/potatolondon/djangae/blob/master/djangae/settings_base.py#L8) in settings_base don't set the `NAMESPACE` and therefore we always pass `None` through to the pipeline and map over all entities.\r\n\r\nIf this is an issue I guess we could fix this in a couple of ways:\r\n\r\n- Add `NAMESPACE: ''` to settings_base\r\n- Change fetches of `NAMESPACE` to default to empty string. This would need doing in `MapReduceTask` and `RawMapperMixin` in the uniquetool (possibly elsewhere too...?)"}}
{"actor":{"display_login":"nealedj"}}