java - Mongodb cursor.hasNext() hangs? -
java - Mongodb cursor.hasNext() hangs? -
using mongodb 2.6. java, i'm going through list of keys , generating bunch of statistics each key, involving queries mongo (on remote server). generate each key's statistics, write file, i'm not running out of memory locally. @ point in run (it changes each time), code hangs on appears exclusively innocuous - check curs.hasnext() in next code. query little slow, seems run fine until variable point, when no longer does.
basicdbobject idmatch = new basicdbobject(constants.user_id_str, userid); // earliest tweet dbcursor curs = this.tweetscollection.find(idmatch).sort(new basicdbobject(constants.tweeted_at_str, constants.ascending_sort_flag)).limit(1); date thedate = null; if (curs.hasnext()){ dbobject obj = curs.next(); thedate = (date) obj.get(constants.tweeted_at_str); } homecoming thedate;
java mongodb
Comments
Post a Comment