Removed hashmap, map reduce to find external id.