Author: eallen
Date: 2010-08-05 17:19:10 -0400 (Thu, 05 Aug 2010)
New Revision: 4187
Modified:
mgmt/newdata/cumin/python/cumin/grid/job.py
Log:
Fix BZ 621678. The response from GetJobSummaries from mrg27 doesn't contain a
ClusterId. Use the GlobalJobId to parse out a ClusterId.
Modified: mgmt/newdata/cumin/python/cumin/grid/job.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/grid/job.py 2010-08-04 15:20:33 UTC (rev 4186)
+++ mgmt/newdata/cumin/python/cumin/grid/job.py 2010-08-05 21:19:10 UTC (rev 4187)
@@ -113,6 +113,16 @@
val = record[column.name]
except KeyError:
if column.name == "JobId":
+ if not "ClusterId" in record:
+ try:
+ gjid = record["GlobalJobId"]
+ # mrg.lab.bos#cluster.prod#number
+ parts = gjid.split("#")
+ record["ClusterId"] =
int(parts[1].split(".")[0])
+ except:
+ record["ClusterId"] = 0
+ if not "ProcId" in record:
+ record['ProcId'] = 0
val = "%d.%d" % (record['ClusterId'],
record['ProcId'])
else:
val = 0
Show replies by date