@License(url="https://www.apache.org/licenses/LICENSE-2.0")
@Command(name="Stargate")
@Parser(defaultParsersFirst=false,
optionParsers=Starter.NodeToolOptionParser.class)
public class Starter
extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Starter.NodeToolOptionParser<T> |
static interface |
Starter.Order |
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
bindToListenAddressOnly |
protected static String |
CACHE_DIRECTORY |
protected String |
clusterName |
protected int |
cqlPort |
protected String |
dc |
protected boolean |
developerMode |
protected boolean |
disableBundlesWatch |
protected boolean |
disableDynamicSnitch |
protected boolean |
disableMBeanRegistration |
protected boolean |
dse |
protected boolean |
emulateDbaasDefaults |
protected boolean |
enableAuth |
protected com.github.rvesse.airline.HelpOption<Starter> |
help |
protected String |
hostId |
protected String |
internalProxyDnsName |
protected static String |
JAR_DIRECTORY |
protected int |
jmxPort |
protected String |
listenHostStr |
protected boolean |
nodetool |
protected String |
proxyDnsName |
protected int |
proxyPort |
protected String |
rack |
protected List<String> |
seedList |
protected Integer |
seedPort |
protected boolean |
simpleSnitch |
static String |
STARTED_MESSAGE |
protected List<String> |
toolArgs |
protected boolean |
useProxyProtocol |
protected String |
version |
| Constructor and Description |
|---|
Starter() |
Starter(String clusterName,
String version,
String listenHostStr,
String seedHost,
Integer seedPort,
String dc,
String rack,
boolean dse,
boolean isSimpleSnitch,
int cqlPort,
int jmxPort) |
| Modifier and Type | Method and Description |
|---|---|
protected static void |
cli(String[] args,
Class<? extends Starter> starterClass) |
protected Map<String,String> |
felixConfig() |
Optional<Object> |
getService(String className) |
static void |
main(String[] args) |
protected List<File> |
pickBundles(File[] files) |
protected static void |
printHelp(com.github.rvesse.airline.SingleCommand c)
Prints help with options in the order specified in
Starter.Order |
protected void |
setStargateProperties() |
void |
start() |
void |
stop() |
Starter |
withAuthEnabled(boolean enabled) |
public static final String STARTED_MESSAGE
protected static final String JAR_DIRECTORY
protected static final String CACHE_DIRECTORY
@Inject protected com.github.rvesse.airline.HelpOption<Starter> help
@Option(name="--cluster-name",
title="cluster_name",
arity=1,
description="Name of backend cluster (required unless --nodetool is specified)")
protected String clusterName
@Option(name="--cluster-seed",
title="seed_address",
description="Seed node address")
protected List<String> seedList
@Option(name="--cluster-version",
title="version",
description="The major version number of the backend cluster (example: 3.11 or 4.0)")
protected String version
@Option(name="--listen",
title="listen_ip",
arity=1,
description="address stargate services should listen on (default: 127.0.0.1)")
protected String listenHostStr
@Option(name="--seed-port",
title="port",
arity=1,
description="Port that seed nodes are listening on (default: 7000)")
protected Integer seedPort
@Option(title="datacenter_name",
name="--dc",
arity=1,
description="Datacenter name of this node (matching backend)")
protected String dc
@Option(title="rack_name",
name="--rack",
arity=1,
description="Rack name of this node (matching backend)")
protected String rack
@Option(name="--simple-snitch",
description="Set if backend uses the simple snitch")
protected boolean simpleSnitch
@Option(name="--dse",
description="Set if backend is DSE, otherwise Cassandra")
protected boolean dse
@Option(name="--cql-port",
title="port",
description="CQL Service port (default: 9042)")
protected int cqlPort
@Option(name="--enable-auth",
description="Set to enable PasswordAuthenticator")
protected boolean enableAuth
@Option(name="--use-proxy-protocol",
description="Use proxy protocol to determine the public address and port of CQL requests")
protected boolean useProxyProtocol
@Option(name="--proxy-dns-name",
description="Used with the proxy protocol flag to populate `system.peers` with a proxy\'s public IP addresses (i.e. A records)")
protected String proxyDnsName
@Option(name="--internal-proxy-dns-name",
description="Used with the proxy protocol flag to populate `system.peers` with a proxy\'s private IP addresses (i.e. A records), if the client connected through a private address. If not specified, it defaults to the value of `--proxy-dns-name` prefixed with \"internal-\"")
protected String internalProxyDnsName
@Option(name="--proxy-port",
description="Used with the proxy protocol flag to specify the proxy\'s listening port for the CQL protocol")
protected int proxyPort
@Option(name="--emulate-dbaas-defaults",
description="Updated defaults reflect those of DataStax Astra at the time of the currently used DSE release")
protected boolean emulateDbaasDefaults
@Option(name="--developer-mode",
description="Defines whether the stargate node should also behave as a regular node, joining the ring with tokens assigned in order to facilitate getting started quickly and not requiring additional nodes or existing cluster")
protected boolean developerMode
@Option(name="--bind-to-listen-address",
description="When set, it binds web services to listen address only")
protected boolean bindToListenAddressOnly
@Option(name="--jmx-port",
description="The port on which JMX should start")
protected int jmxPort
@Option(name="--disable-dynamic-snitch",
description="Whether the dynamic snitch should wrap the actual snitch.")
protected boolean disableDynamicSnitch
@Option(name="--disable-mbean-registration",
description="Whether the mbean registration should be disabled")
protected boolean disableMBeanRegistration
@Option(name="--disable-bundles-watch",
description="Whether watching the bundle directory for new jars to load should be disabled")
protected boolean disableBundlesWatch
@Option(name="--host-id",
description="The host ID to use for this node. Must be a valid UUID.")
protected String hostId
@Option(name="--nodetool",
description="Run nodetool with all of the following arguments and exit")
protected boolean nodetool
protected void setStargateProperties()
public Starter withAuthEnabled(boolean enabled)
public void start()
throws org.osgi.framework.BundleException
org.osgi.framework.BundleExceptionpublic void stop()
throws InterruptedException,
org.osgi.framework.BundleException
InterruptedExceptionorg.osgi.framework.BundleExceptionpublic Optional<Object> getService(String className) throws org.osgi.framework.InvalidSyntaxException
org.osgi.framework.InvalidSyntaxExceptionprotected static void printHelp(com.github.rvesse.airline.SingleCommand c)
Starter.Orderpublic static void main(String[] args)
Copyright © 2022. All rights reserved.