git://scientific.zcu.cz
/
hadoop-jobstat.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9e8e1c5
)
Set timestamps more precicely on the end of the long transactions.
author
František Dvořák
<valtri@civ.zcu.cz>
Wed, 4 Mar 2015 23:00:29 +0000
(
00:00
+0100)
committer
František Dvořák
<valtri@civ.zcu.cz>
Wed, 4 Mar 2015 23:00:29 +0000
(
00:00
+0100)
jobs.py
patch
|
blob
|
blame
|
history
diff --git
a/jobs.py
b/jobs.py
index
84d6a96
..
725c7ed
100755
(executable)
--- a/
jobs.py
+++ b/
jobs.py
@@
-362,6
+362,8
@@
for id, job in jobs.iteritems():
for nodename, node in nodes.iteritems():
st.execute("INSERT INTO node (jobid, host, elapsed, map, reduce) VALUES (%s, %s, %s, %s, %s)", (id, nodename, node.elapsed, node.map, node.reduce))
if debug >= 2: print '[db] job %s nodes updated' % id
+ # better to update timestamp exlicitly on the end of the transaction
+ st.execute('UPDATE job SET changed=NOW() WHERE id=%s', id);
if db:
db.commit()