Skip to content

Commit 2b36757

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 efdffbf commit 2b36757

File tree

2 files changed

+608
-1
lines changed

2 files changed

+608
-1
lines changed

src/modules/Makefile.am

Lines changed: 11 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
@@ -302,3 +303,12 @@ if HAVE_LIBSYSTEMD
302303
sdbus_la_LIBADD += $(LIBSYSTEMD_LIBS)
303304
endif
304305
sdbus_la_LDFLAGS = $(fluxmod_ldflags) -module
306+
307+
job_sql_la_SOURCES = \
308+
job-sql/job-sql.c
309+
job_sql_la_LIBADD = \
310+
$(top_builddir)/src/common/libflux-internal.la \
311+
$(top_builddir)/src/common/libflux-core.la \
312+
$(top_builddir)/src/common/libsqlite3/libsqlite3.la \
313+
$(JANSSON_LIBS)
314+
job_sql_la_LDFLAGS = $(fluxmod_ldflags) -module

0 commit comments

Comments
 (0)