Class CassandraStorage.Builder
- java.lang.Object
- 
- zipkin2.storage.StorageComponent.Builder
- 
- zipkin2.storage.cassandra.v1.CassandraStorage.Builder
 
 
- 
- Enclosing class:
- CassandraStorage
 
 public static final class CassandraStorage.Builder extends StorageComponent.Builder 
- 
- 
Method SummaryAll Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description CassandraStorage.BuilderautocompleteCardinality(int autocompleteCardinality)CassandraStorage.BuilderautocompleteKeys(List<String> keys)CassandraStorage.BuilderautocompleteTtl(int autocompleteTtl)CassandraStoragebuild()CassandraStorage.BuildercontactPoints(String contactPoints)Comma separated list of host addresses part of Cassandra cluster.CassandraStorage.BuilderensureSchema(boolean ensureSchema)Ensures that schema exists, if enabled tries to execute script io.zipkin:zipkin-cassandra-core/cassandra-schema.cql.CassandraStorage.BuilderindexCacheMax(int indexCacheMax)Indicates the maximum trace index metadata entries to cache.CassandraStorage.BuilderindexCacheTtl(int indexCacheTtl)Indicates how long in seconds to cache trace index metadata.CassandraStorage.BuilderindexFetchMultiplier(int indexFetchMultiplier)How many more index rows to fetch than the user-supplied query limit.CassandraStorage.BuilderindexTtl(int indexTtl)Deprecated.current schema uses default ttls.CassandraStorage.Builderkeyspace(String keyspace)Keyspace to store span and index data.CassandraStorage.BuilderlocalDc(String localDc)Name of the datacenter that will be considered "local" for latency load balancing.CassandraStorage.BuildermaxConnections(int maxConnections)Max pooled connections per datacenter-local host.CassandraStorage.BuildermaxTraceCols(int maxTraceCols)Spans have multiple values for the same id.CassandraStorage.Builderpassword(String password)Will throw an exception on startup if authentication fails.CassandraStorage.BuildersearchEnabled(boolean searchEnabled)CassandraStorage.BuildersessionFactory(SessionFactory sessionFactory)Override to control how sessions are created.CassandraStorage.BuilderspanTtl(int spanTtl)Deprecated.current schema uses default ttls.CassandraStorage.BuilderstrictTraceId(boolean strictTraceId)CassandraStorage.Builderusername(String username)Will throw an exception on startup if authentication fails.CassandraStorage.BuilderuseSsl(boolean useSsl)Use ssl for connection.
 
- 
- 
- 
Method Detail- 
strictTraceIdpublic CassandraStorage.Builder strictTraceId(boolean strictTraceId) - Specified by:
- strictTraceIdin class- StorageComponent.Builder
 
 - 
searchEnabledpublic CassandraStorage.Builder searchEnabled(boolean searchEnabled) - Specified by:
- searchEnabledin class- StorageComponent.Builder
 
 - 
autocompleteKeyspublic CassandraStorage.Builder autocompleteKeys(List<String> keys) - Overrides:
- autocompleteKeysin class- StorageComponent.Builder
 
 - 
autocompleteTtlpublic CassandraStorage.Builder autocompleteTtl(int autocompleteTtl) - Overrides:
- autocompleteTtlin class- StorageComponent.Builder
 
 - 
autocompleteCardinalitypublic CassandraStorage.Builder autocompleteCardinality(int autocompleteCardinality) - Overrides:
- autocompleteCardinalityin class- StorageComponent.Builder
 
 - 
sessionFactorypublic CassandraStorage.Builder sessionFactory(SessionFactory sessionFactory) Override to control how sessions are created.
 - 
keyspacepublic CassandraStorage.Builder keyspace(String keyspace) Keyspace to store span and index data. Defaults to "zipkin"
 - 
contactPointspublic CassandraStorage.Builder contactPoints(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 *
 - 
localDcpublic CassandraStorage.Builder localDc(@Nullable String localDc) Name of the datacenter that will be considered "local" for latency load balancing. When unset, load-balancing is round-robin.
 - 
maxConnectionspublic CassandraStorage.Builder maxConnections(int maxConnections) Max pooled connections per datacenter-local host. Defaults to 8
 - 
ensureSchemapublic CassandraStorage.Builder ensureSchema(boolean ensureSchema) Ensures that schema exists, if enabled tries to execute script io.zipkin:zipkin-cassandra-core/cassandra-schema.cql. Defaults to true.
 - 
useSslpublic CassandraStorage.Builder useSsl(boolean useSsl) Use ssl for connection. Defaults to false.
 - 
usernamepublic CassandraStorage.Builder username(@Nullable String username) Will throw an exception on startup if authentication fails. No default.
 - 
passwordpublic CassandraStorage.Builder password(@Nullable String password) Will throw an exception on startup if authentication fails. No default.
 - 
maxTraceColspublic 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.
 - 
spanTtl@Deprecated public CassandraStorage.Builder spanTtl(int spanTtl) Deprecated.current schema uses default ttls. This parameter will be removed in Zipkin 2Time-to-live in seconds for span data. Defaults to 604800 (7 days)
 - 
indexTtl@Deprecated public CassandraStorage.Builder indexTtl(int indexTtl) Deprecated.current schema uses default ttls. This parameter will be removed in Zipkin 2Time-to-live in seconds for index data. Defaults to 259200 (3 days)
 - 
indexCacheMaxpublic CassandraStorage.Builder indexCacheMax(int indexCacheMax) Indicates the maximum trace index metadata entries to cache. Zero disables the feature. Defaults to 100000.This is used to obviate redundant inserts into Tables.SERVICE_NAME_INDEX,Tables.SERVICE_REMOTE_SERVICE_NAME_INDEX,Tables.SERVICE_SPAN_NAME_INDEXandTables.ANNOTATIONS_INDEX.Corresponds to the count of rows inserted into between indexCacheTtland now. This is bounded so that collectors that get large trace volume don't run out of memory beforeindexCacheTtlpasses.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. 
 - 
indexCacheTtlpublic CassandraStorage.Builder indexCacheTtl(int indexCacheTtl) Indicates how long in seconds to cache trace index metadata. Defaults to 1 minute. This is only read whenindexCacheMaxis 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. 
 - 
indexFetchMultiplierpublic 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.
 - 
buildpublic CassandraStorage build() - Specified by:
- buildin class- StorageComponent.Builder
 
 
- 
 
-