use of org.wikidata.query.rdf.updater.consumer.options.StreamingUpdateOptions in project wikidata-query-rdf by wikimedia.
the class StreamingUpdate method main.
public static void main(String[] args) {
log.info("Starting StreamingUpdater");
StreamingUpdateOptions options = OptionsUtils.handleOptions(StreamingUpdateOptions.class, args);
MetricRegistry metrics = new MetricRegistry();
JmxReporter reporter = JmxReporter.forRegistry(metrics).inDomain(options.metricDomain()).build();
StreamingUpdaterConsumer updater = build(options, metrics);
Thread streamingUpdaterThread = Thread.currentThread();
streamingUpdaterThread.setUncaughtExceptionHandler((t, e) -> log.error("Uncaught exception in the updater thread: ", e));
addShutdownHook(updater, streamingUpdaterThread, reporter);
reporter.start();
updater.run();
}
Aggregations