@Override public void run() { cassandraDaemon = new CassandraDaemon(); cassandraDaemon.activate(); }
System.setProperty("cassandra.native.epoll.enabled", "false"); CassandraDaemon cassandraDaemon = new CassandraDaemon(); cassandraDaemon.activate(); cassandraDaemon.deactivate(); throw e;
public void start() throws IOException { cassandraDaemon = new CassandraDaemon(); cassandraDaemon.init(null); cassandraDaemon.start(); } }
public void start() throws IOException { cassandraDaemon = CassandraDaemon.instance; cassandraDaemon.applyConfig(); cassandraDaemon.init(null); cassandraDaemon.start(); } }
applyConfig(); setup(); start(); exitOrFail(3, "Exception encountered during startup", e); exitOrFail(3, "Exception encountered during startup: " + e.getMessage());
public static void stop(String[] args) { instance.deactivate(); }
/** Start an in-memory Cassandra. */ private static void startLocalCassandra(String cassandraYamlPath) throws IOException { System.setProperty("cassandra.config", "file:" + cassandraYamlPath); final CassandraDaemon cassandra = new CassandraDaemon(); cassandra.init(null); Futures.getUnchecked(service.submit(new Callable<Object>(){ @Override public Object call() throws Exception { cassandra.start(); return null; } })); }
WindowsFailedSnapshotTracker.deleteOldSnapshots(); maybeInitJmx(); logSystemInfo(); exitOrFail(e.returnCode, e.getMessage(), e.getCause()); exitOrFail(3, e.getMessage(), e.getCause()); exitOrFail(e.returnCode, e.getMessage(), e.getCause()); loadRowAndKeyCacheAsync().get(); exitOrFail(1, "Fatal configuration error", e); completeSetup();
public static void main(String[] args) { instance.activate(); }
WindowsFailedSnapshotTracker.deleteOldSnapshots(); maybeInitJmx(); logSystemInfo(); exitOrFail(e.returnCode, e.getMessage(), e.getCause()); exitOrFail(3, e.getMessage(), e.getCause()); systemKeyspaceInitialized(); exitOrFail(e.returnCode, e.getMessage(), e.getCause()); userKeyspaceInitialized(); loadRowAndKeyCacheAsync().get(); exitOrFail(1, "Fatal configuration error", e); completeSetup();
/** * hook for JSVC */ @Override public void start() { super.start(); }
maybeInitJmx(); loadRowAndKeyCacheAsync().get(); waitForGossipToSettle(); nativeServer = new org.apache.cassandra.transport.Server(nativeAddr, nativePort); completeSetup();
cassandraDaemon = new CassandraDaemon(); cassandraDaemon.activate(); SparkSession spark = SparkSession .builder().master("local").appName("ASH").getOrCreate();
@PreDestroy public void stop() { cassandra.stop(); }
/** * Initialize the Cassandra Daemon based on the given <a * href="http://commons.apache.org/daemon/jsvc.html">Commons * Daemon</a>-specific arguments. To clarify, this is a hook for JSVC. * * @param arguments * the arguments passed in from JSVC * @throws IOException */ public void init(String[] arguments) throws IOException { setup(); }
cassandra.init(null);
/** * hook for JSVC */ public void destroy() { super.destroy(); if (node != null) { try { node.close(); } catch (IOException e) { throw new RuntimeException(e); } } if (keepAliveLatch != null) keepAliveLatch.countDown(); }
public void completeSetup() { super.completeSetup(); if (this.node != null && this.node.clusterService() != null) this.node.clusterService().publishGossipStates(); }