Switch from mapred to simple querying to fetch keys
[ci skip]