Package zipkin2.storage.cassandra
Class CassandraStorage.Builder
- java.lang.Object
-
- zipkin2.storage.StorageComponent.Builder
-
- zipkin2.storage.cassandra.CassandraStorage.Builder
-
- Enclosing class:
- CassandraStorage
public abstract static class CassandraStorage.Builder extends StorageComponent.Builder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract CassandraStorage.Builder
autocompleteCardinality(int autocompleteCardinality)
abstract CassandraStorage.Builder
autocompleteKeys(java.util.List<java.lang.String> autocompleteKeys)
abstract CassandraStorage.Builder
autocompleteTtl(int autocompleteTtl)
abstract CassandraStorage
build()
abstract CassandraStorage.Builder
contactPoints(java.lang.String contactPoints)
Comma separated list of host addresses part of Cassandra cluster.abstract CassandraStorage.Builder
ensureSchema(boolean ensureSchema)
Ensures that schema exists, if enabled tries to execute script io.zipkin:zipkin-cassandra-core/cassandra-schema-cql3.txt.abstract CassandraStorage.Builder
indexFetchMultiplier(int indexFetchMultiplier)
How many more index rows to fetch than the user-supplied query limit.abstract CassandraStorage.Builder
keyspace(java.lang.String keyspace)
Keyspace to store span and index data.abstract CassandraStorage.Builder
localDc(java.lang.String localDc)
Name of the datacenter that will be considered "local" for latency load balancing.CassandraStorage.Builder
maxConnections(int maxConnections)
Max pooled connections per datacenter-local host.abstract CassandraStorage.Builder
maxTraceCols(int maxTraceCols)
Spans have multiple values for the same id.abstract CassandraStorage.Builder
password(java.lang.String password)
Will throw an exception on startup if authentication fails.abstract CassandraStorage.Builder
searchEnabled(boolean searchEnabled)
abstract CassandraStorage.Builder
sessionFactory(CassandraStorage.SessionFactory sessionFactory)
Override to control how sessions are created.abstract CassandraStorage.Builder
strictTraceId(boolean strictTraceId)
abstract CassandraStorage.Builder
username(java.lang.String username)
Will throw an exception on startup if authentication fails.abstract CassandraStorage.Builder
useSsl(boolean useSsl)
Use ssl for driver Defaults to false.
-
-
-
Method Detail
-
strictTraceId
public abstract CassandraStorage.Builder strictTraceId(boolean strictTraceId)
- Specified by:
strictTraceId
in classStorageComponent.Builder
-
searchEnabled
public abstract CassandraStorage.Builder searchEnabled(boolean searchEnabled)
- Specified by:
searchEnabled
in classStorageComponent.Builder
-
autocompleteKeys
public abstract CassandraStorage.Builder autocompleteKeys(java.util.List<java.lang.String> autocompleteKeys)
- Overrides:
autocompleteKeys
in classStorageComponent.Builder
-
autocompleteTtl
public abstract CassandraStorage.Builder autocompleteTtl(int autocompleteTtl)
- Overrides:
autocompleteTtl
in classStorageComponent.Builder
-
autocompleteCardinality
public abstract CassandraStorage.Builder autocompleteCardinality(int autocompleteCardinality)
- Overrides:
autocompleteCardinality
in classStorageComponent.Builder
-
sessionFactory
public abstract CassandraStorage.Builder sessionFactory(CassandraStorage.SessionFactory sessionFactory)
Override to control how sessions are created.
-
keyspace
public abstract CassandraStorage.Builder keyspace(java.lang.String keyspace)
Keyspace to store span and index data. Defaults to "zipkin3"
-
contactPoints
public abstract CassandraStorage.Builder contactPoints(java.lang.String contactPoints)
Comma separated list of host addresses part of Cassandra cluster. You can also specify a custom port with 'host:port'. Defaults to localhost on port 9042 *
-
localDc
public abstract CassandraStorage.Builder localDc(@Nullable java.lang.String localDc)
Name of the datacenter that will be considered "local" for latency load balancing. When unset, load-balancing is round-robin.
-
maxConnections
public final CassandraStorage.Builder maxConnections(int maxConnections)
Max pooled connections per datacenter-local host. Defaults to 8
-
ensureSchema
public abstract CassandraStorage.Builder ensureSchema(boolean ensureSchema)
Ensures that schema exists, if enabled tries to execute script io.zipkin:zipkin-cassandra-core/cassandra-schema-cql3.txt. Defaults to true.
-
useSsl
public abstract CassandraStorage.Builder useSsl(boolean useSsl)
Use ssl for driver Defaults to false.
-
username
public abstract CassandraStorage.Builder username(@Nullable java.lang.String username)
Will throw an exception on startup if authentication fails. No default.
-
password
public abstract CassandraStorage.Builder password(@Nullable java.lang.String password)
Will throw an exception on startup if authentication fails. No default.
-
maxTraceCols
public abstract CassandraStorage.Builder maxTraceCols(int maxTraceCols)
Spans have multiple values for the same id. For example, a client and server contribute to the same span id. When searching for spans by id, the amount of results may be larger than the ids. This defines a threshold which accommodates this situation, without looking for an unbounded number of results.
-
indexFetchMultiplier
public abstract CassandraStorage.Builder indexFetchMultiplier(int indexFetchMultiplier)
How many more index rows to fetch than the user-supplied query limit. Defaults to 3.Backend requests will request
QueryRequest.limit()
times this factor rows from Cassandra indexes in attempts to returnQueryRequest.limit()
traces.Indexing in cassandra will usually have more rows than trace identifiers due to factors including table design and collection implementation. As there's no way to DISTINCT out duplicates server-side, this over-fetches client-side when
indexFetchMultiplier
> 1.
-
build
public abstract CassandraStorage build()
- Specified by:
build
in classStorageComponent.Builder
-
-