public static final class CassandraStorage.Builder extends Object implements StorageComponent.Builder
| Modifier and Type | Method and Description |
|---|---|
CassandraStorage |
build() |
CassandraStorage.Builder |
contactPoints(String contactPoints)
Comma separated list of host addresses part of Cassandra cluster.
|
CassandraStorage.Builder |
ensureSchema(boolean ensureSchema)
Ensures that schema exists, if enabled tries to execute script io.zipkin:zipkin-cassandra-core/cassandra-schema-cql3.txt.
|
CassandraStorage.Builder |
indexCacheMax(int indexCacheMax)
Indicates the maximum trace index metadata entries to cache.
|
CassandraStorage.Builder |
indexCacheTtl(int indexCacheTtl)
Indicates how long in seconds to cache trace index metadata.
|
CassandraStorage.Builder |
indexFetchMultiplier(int indexFetchMultiplier)
How many more index rows to fetch than the user-supplied query limit.
|
CassandraStorage.Builder |
indexTtl(int indexTtl)
Deprecated.
current schema uses default ttls. This parameter will be removed in Zipkin 2
|
CassandraStorage.Builder |
keyspace(String keyspace)
Keyspace to store span and index data.
|
CassandraStorage.Builder |
localDc(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.
|
CassandraStorage.Builder |
maxTraceCols(int maxTraceCols)
Spans have multiple values for the same id.
|
CassandraStorage.Builder |
password(String password)
Will throw an exception on startup if authentication fails.
|
CassandraStorage.Builder |
sessionFactory(SessionFactory sessionFactory)
Override to control how sessions are created.
|
CassandraStorage.Builder |
spanTtl(int spanTtl)
Deprecated.
current schema uses default ttls. This parameter will be removed in Zipkin 2
|
CassandraStorage.Builder |
strictTraceId(boolean strictTraceId) |
CassandraStorage.Builder |
username(String username)
Will throw an exception on startup if authentication fails.
|
CassandraStorage.Builder |
useSsl(boolean useSsl)
Use ssl for connection.
|
public CassandraStorage.Builder strictTraceId(boolean strictTraceId)
strictTraceId in interface StorageComponent.Builderpublic CassandraStorage.Builder sessionFactory(SessionFactory sessionFactory)
public CassandraStorage.Builder keyspace(String keyspace)
public CassandraStorage.Builder contactPoints(String contactPoints)
public CassandraStorage.Builder localDc(@Nullable String localDc)
public CassandraStorage.Builder maxConnections(int maxConnections)
public CassandraStorage.Builder ensureSchema(boolean ensureSchema)
public CassandraStorage.Builder useSsl(boolean useSsl)
public CassandraStorage.Builder username(@Nullable String username)
public CassandraStorage.Builder password(@Nullable String password)
public CassandraStorage.Builder maxTraceCols(int maxTraceCols)
@Deprecated public CassandraStorage.Builder spanTtl(int spanTtl)
@Deprecated public CassandraStorage.Builder indexTtl(int indexTtl)
public CassandraStorage.Builder indexCacheMax(int indexCacheMax)
This is used to obviate redundant inserts into Tables.SERVICE_NAME_INDEX, Tables.SERVICE_SPAN_NAME_INDEX and Tables.ANNOTATIONS_INDEX.
Corresponds to the count of rows inserted into between indexCacheTtl and now.
This is bounded so that collectors that get large trace volume don't run out of memory before
indexCacheTtl passes.
Note: It is hard to estimate precisely how many is the right number, particularly as binary annotation values are included in partition keys (meaning each cache entry can vary in size considerably). A good guess might be 5 x spans per indexCacheTtl, memory permitting.
public CassandraStorage.Builder indexCacheTtl(int indexCacheTtl)
indexCacheMax is greater than zero.
You should pick a value that is longer than the gap between the root span's timestamp and its latest descendant span's timestamp. More simply, if 95% of your trace durations are under 1 minute, use 1 minute.
public CassandraStorage.Builder indexFetchMultiplier(int indexFetchMultiplier)
Backend requests will request QueryRequest.limit times this factor rows from
Cassandra indexes in attempts to return QueryRequest.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.
public CassandraStorage build()
build in interface StorageComponent.BuilderCopyright © 2015–2017 OpenZipkin. All rights reserved.