I am porting our triple store (Parliament) from Joseki to Fuseki, and I have a
question. How do I shut Fuseki down gracefully? On *nix systems, of course,
the JVM responds to the TERM signal, and so this works:
kill `ps -ef | grep 'java.*fuseki' | grep -v grep | awk '{ print $2 }'`
However, there are two problems with this. First, it doesn’t work on Windows,
where the only similar actions are decidedly ungraceful. This is a big
problem, because Windows is important to our customers.
Second, even on *nix systems this doesn’t result in a graceful shutdown,
because the close method on my DataSet is never called. I realize that this is
less of a problem for TDB datasets (because of transactions) and no problem for
in-memory DataSets, but some stores (like ours) need this hook to ensure that
pending file writes are flushed to disk. And even for a transactional store
like TDB, it seems to me that you would want to avoid unnecessary file
recoveries.
I did try enabling the management server and issuing this command:
http://localhost:58080/mgt?cmd=shutdown
This resulted in the following response, but no shutdown happened:
Software:
Fuseki 1.0.1
TDB 1.0.1
ARQ 2.11.1
Apache Jena - Core 2.11.1
Name = data
Query :: /data/query
Update :: /data/update
Upload :: /data/upload
Graphs(Read) :: /data/get
Graphs(RW) :: /data/data
So, how should I gracefully shut down Fuseki, and is there a way to ensure that
my DataSet is closed?
Thanks,
Ian