Skip to content

Commit b47b3c9

Browse files
committed
job-manager: add comment describing journal proto
Problem: the journal protocol is undocumented. Add a comment block at the top of journal.c that'll do for now.
1 parent c137be3 commit b47b3c9

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

src/modules/job-manager/journal.c

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,36 @@
88
* SPDX-License-Identifier: LGPL-3.0
99
\************************************************************/
1010

11-
/* journal.c - job event journaling and streaming to listeners
11+
/* journal.c - stream job events
12+
*
13+
* This allows another service to track detailed information about
14+
* all jobs. The journal consumer makes a job-manger.events-journal
15+
* request with optional allow/deny filter and boolean 'full' flag:
16+
* {"full"?b, "allow"?{"name":1, ...}, "deny"?{"name:1, ...}}
17+
*
18+
* If "full" is true, the journal begins with all the inactive jobs.
19+
* If "full" is false, the journal begins with all the active jobs.
20+
* If "full" is unspecified, it is assumed to be false.
21+
* If allow/deny rules are specified, they filter the job events by name.
22+
*
23+
* The journal consumer receives a stream of responses until the job
24+
* manager is unloaded or the request is canceled. Each response consists of
25+
* an object containing a jobid, an array of events, and optional data:
26+
* {"id":I, "events":[], "jobspec"?s, "R"?s}
27+
*
28+
* During processing of the initial backlog, the events array will contain
29+
* all the events posted so far for each job, plus R and jobspec if available.
30+
* The jobs are returned in hash traversal order. Once backlog processing
31+
* is complete, a sentinel response is transmitted with id of FLUX_JOBID_ANY
32+
* and an empty events array:
33+
* {"id":-1, "events":[]}
34+
*
35+
* The sentinel informs the consumer that it is now caught up and that future
36+
* responses will be for events that are are posted in real time.
37+
*
38+
* Additional responses contain at most one event. The redacted jobspec is
39+
* included with the "validate" event. The redacted R object is included
40+
* with the "alloc" event.
1241
*/
1342

1443
#if HAVE_CONFIG_H

0 commit comments

Comments
 (0)