Commit bd7b2070 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

rlib2: Exclude oplog/opresult from bulk job list



These fields can get rather large. Excluding them from the big bulk list
reduces the amount of data. They are still available via per-job
requests.
Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent f4e86448
......@@ -81,12 +81,17 @@ G_FIELDS = [
"node_list",
] + _COMMON_FIELDS
J_FIELDS = [
J_FIELDS_BULK = [
"id", "ops", "status", "summary",
"opstatus", "opresult", "oplog",
"opstatus",
"received_ts", "start_ts", "end_ts",
]
J_FIELDS = J_FIELDS_BULK + [
"oplog",
"opresult",
]
_NR_DRAINED = "drained"
_NR_MASTER_CANDIATE = "master-candidate"
_NR_MASTER = "master"
......@@ -240,8 +245,8 @@ class R_2_jobs(baserlib.R_Generic):
client = baserlib.GetClient()
if self.useBulk():
bulkdata = client.QueryJobs(None, J_FIELDS)
return baserlib.MapBulkFields(bulkdata, J_FIELDS)
bulkdata = client.QueryJobs(None, J_FIELDS_BULK)
return baserlib.MapBulkFields(bulkdata, J_FIELDS_BULK)
else:
jobdata = map(compat.fst, client.QueryJobs(None, ["id"]))
return baserlib.BuildUriList(jobdata, "/2/jobs/%s",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment