Skip to content

Commit

Permalink
Bump versions, Cassandra fix
Browse files Browse the repository at this point in the history
* Bump to
  * finagle 5.1.0
  * ostrich 8.1.0
  * util 5.2.0
* Only close a cassie keyspace if it has not already been closed

Author: @franklinhu
Pull Request: #39
URL: #39
  • Loading branch information
Franklin Hu committed Jun 19, 2012
1 parent dc22e0e commit bb3902c
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 13 deletions.
6 changes: 3 additions & 3 deletions project/Project.scala
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ object Zipkin extends Build {
)

val CASSIE_VERSION = "0.22.0"
val FINAGLE_VERSION = "5.0.0"
val OSTRICH_VERSION = "8.0.1"
val UTIL_VERSION = "5.0.3"
val FINAGLE_VERSION = "5.1.0"
val OSTRICH_VERSION = "8.1.0"
val UTIL_VERSION = "5.2.0"

lazy val common =
Project(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ trait CassandraIndexConfig extends IndexConfig {
log.info("Connected to Cassandra")
new CassandraIndex() {
val config = cassandraConfig
val keyspace = _keyspace
keyspace = _keyspace
val serviceSpanNameIndex = _serviceSpanNameIndex
val serviceNameIndex = _serviceNameIndex
val annotationsIndex = _annotationsIndex
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ trait CassandraStorageConfig extends StorageConfig {
new CassandraStorage() {
val cassandraConfig = _storageConfig.cassandraConfig
val storageConfig = _storageConfig
val keyspace = _keyspace
keyspace = _keyspace
val traces = _traces
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ package com.twitter.zipkin.query
* limitations under the License.
*
*/
import adjusters.Adjuster
import com.twitter.logging.Logger
import org.apache.thrift.protocol.TBinaryProtocol
import com.twitter.zipkin.storage.{Index, Storage}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ import com.twitter.logging.Logger
trait Cassandra {
val log = Logger.get

val keyspace: Keyspace
var keyspace: Keyspace = null

def close() {
if (keyspace != null) {
log.info("Closing CassandraStorage connections")
keyspace.close()
keyspace = null
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import com.twitter.zipkin.Constants
trait CassandraIndex extends Index with Cassandra {

val config: CassandraConfig
val keyspace: Keyspace

/* Index `ColumnFamily`s */
val serviceSpanNameIndex : ColumnFamily[String, Long, Long]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ trait CassandraStorage extends Storage with Cassandra {

val storageConfig: CassandraStorageConfig

val keyspace: Keyspace

val traces: ColumnFamily[Long, String, gen.Span]

// storing the span in the traces cf
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ class CassandraIndexSpec extends Specification with JMocker with ClassMocker {

val cs = new CassandraIndex() {
val config = _config
val keyspace = null
val serviceSpanNameIndex = null
val serviceNameIndex = null
val annotationsIndex = _annotationsIndex
Expand Down Expand Up @@ -144,7 +143,6 @@ class CassandraIndexSpec extends Specification with JMocker with ClassMocker {

val cass = new CassandraIndex() {
val config = new CassandraConfig{}
val keyspace = null
val serviceSpanNameIndex = null
val serviceNameIndex = null
val annotationsIndex = null
Expand Down Expand Up @@ -174,7 +172,6 @@ class CassandraIndexSpec extends Specification with JMocker with ClassMocker {

val cass = new CassandraIndex() {
val config = new CassandraConfig{}
val keyspace = null
val serviceSpanNameIndex = null
val serviceNameIndex = null
val annotationsIndex = null
Expand Down

0 comments on commit bb3902c

Please sign in to comment.