From: František Dvořák Date: Thu, 5 Mar 2015 11:46:47 +0000 (+0100) Subject: Fetch details, of not found in the database. X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=9d3c179da3d5c4f585ee0d74d9235597b1472a05;p=hadoop-jobstat.git Fetch details, of not found in the database. --- diff --git a/jobs.py b/jobs.py index c77a3f7..b49549d 100755 --- a/jobs.py +++ b/jobs.py @@ -344,6 +344,12 @@ for id, job in jobs.iteritems(): if debug >= 2: print '[db] job %s yarn updated' % id changed = 1 + # check for details in DB + st.execute('SELECT * FROM jobnodes WHERE jobid=%s', id) + data = st.fetchone() + if not data: + changed = 1 + # get details (intensive!), if new job or any other difference jobnodes = dict() if job.mapred and (not db or changed):