code: static Cluster buildCluster(CassandraStorage cassandra) {
      Cluster.Builder builder = Cluster.builder().withoutJMXReporting();
      List<InetSocketAddress> contactPoints = parseContactPoints(cassandra);
      int defaultPort = findConnectPort(contactPoints);
      builder.addContactPointsWithPorts(contactPoints);
      builder.withPort(defaultPort); // This ends up protocolOptions.port
      if (cassandra.username() != null && cassandra.password() != null) {
        builder.withCredentials(cassandra.username(), cassandra.password());
      }
      builder.withRetryPolicy(ZipkinRetryPolicy.INSTANCE);
      builder.withLoadBalancingPolicy(
          new TokenAwarePolicy(
              new LatencyAwarePolicy.Builder(
                      cassandra.localDc() != null
                          ? DCAwareRoundRobinPolicy.builder().withLocalDc(cassandra.localDc()).build()
                          : new RoundRobinPolicy()
                      // This can select remote, but LatencyAwarePolicy will prefer local
                      )
                  .build()));
      builder.withPoolingOptions(cassandra.poolingOptions());
  
      builder.withQueryOptions(
          new QueryOptions()
              // if local_dc isn't defined LOCAL_ONE incorrectly sticks to first seed host that
              // connects
              .setConsistencyLevel(
                  null != cassandra.localDc() ? ConsistencyLevel.LOCAL_ONE : ConsistencyLevel.ONE)
              // all zipkin cql writes are idempotent
              .setDefaultIdempotence(true));
  
      if (cassandra.useSsl()) {
        builder = builder.withSSL();
      }
  
      return builder.build();
    }
docs: Visible for testing