Skip to content

Commit 215a025

Browse files
committed
job-sql: add job query service with SQL capability
Problem: Flux doesn't have a raw SQL interface to job data that can utilize the sqlite JSON1 extensions. Add a service that consumes the job manager journal and populates an in-memory sqlite database with all jobs (active and inactive jobs). The schema simply stores the jobid, eventlog, jobspec, and R. The last three are kept in JSON format so sqlite JSON1 extensions can be used to construct queries. https://www.sqlite.org/json1.html
1 parent ed07466 commit 215a025

File tree

2 files changed

+612
-1
lines changed

2 files changed

+612
-1
lines changed

src/modules/Makefile.am

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ fluxmod_LTLIBRARIES = \
4545
resource.la \
4646
sched-simple.la \
4747
sdexec.la \
48-
sdbus.la
48+
sdbus.la \
49+
job-sql.la
4950

5051
if ENABLE_CONTENT_S3
5152
fluxmod_LTLIBRARIES += content-s3.la
@@ -304,3 +305,14 @@ if HAVE_LIBSYSTEMD
304305
sdbus_la_LIBADD += $(LIBSYSTEMD_LIBS)
305306
endif
306307
sdbus_la_LDFLAGS = $(fluxmod_ldflags) -module
308+
309+
job_sql_la_SOURCES = \
310+
job-sql/job-sql.c
311+
job_sql_la_CPPFLAGS = \
312+
$(AM_CPPFLAGS) \
313+
$(SQLITE_CFLAGS)
314+
job_sql_la_LIBADD = \
315+
$(top_builddir)/src/common/libflux-internal.la \
316+
$(top_builddir)/src/common/libflux-core.la \
317+
$(SQLITE_LIBS)
318+
job_sql_la_LDFLAGS = $(fluxmod_ldflags) -module

0 commit comments

Comments
 (0)