use of com.alipay.sofa.jraft.example.rheakv.Node in project sofa-jraft by sofastack.
the class BenchmarkServer method main.
public static void main(final String[] args) {
if (args.length < 3) {
LOG.error("[initialServerList], [configPath] are needed.");
}
final String initialServerList = args[1];
final String configPath = args[2];
final RheaKVStoreOptions opts = Yaml.readConfig(configPath);
opts.setInitialServerList(initialServerList);
final Node node = new Node(opts);
node.start();
//
ConsoleReporter.forRegistry(KVMetrics.metricRegistry()).build().start(30, TimeUnit.SECONDS);
Runtime.getRuntime().addShutdownHook(new Thread(node::stop));
LOG.info("BenchmarkServer start OK, options: {}", opts);
}
Aggregations