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:
9fc4bb3
)
Write also number of jobs processed.
author
František Dvořák
<valtri@civ.zcu.cz>
Thu, 5 Mar 2015 16:47:58 +0000
(17:47 +0100)
committer
František Dvořák
<valtri@civ.zcu.cz>
Thu, 5 Mar 2015 16:47:58 +0000
(17:47 +0100)
stat2pbs.py
patch
|
blob
|
blame
|
history
diff --git
a/stat2pbs.py
b/stat2pbs.py
index
70b994c
..
2aa202a
100755
(executable)
--- a/
stat2pbs.py
+++ b/
stat2pbs.py
@@
-149,15
+149,18
@@
if ts:
st.execute('SELECT * FROM jobs WHERE changed > %s AND TIMESTAMPDIFF(SECOND,changed,NOW()) > 5 ORDER BY CHANGED', ts)
else:
st.execute('SELECT * FROM jobs WHERE TIMESTAMPDIFF(SECOND,changed,NOW()) > 5 ORDER BY changed')
+counter=0
while 1:
job = st.fetchone()
if not job:
break
+ counter += 1
ts = job['changed']
print gen_string(job)
db.close()
+print 'Processed: %d jobs' % counter
if ts:
f = open(statfile, 'w')
f.write(str(ts) + '\n')