Permalink
Browse files

use new configgy, make test jars not link into dist jar

  • Loading branch information...
1 parent e030e6f commit 1911917ae51d86bac203ce7aba6d455b2e698ffa Ed Ceaser committed Aug 20, 2010
View
@@ -50,6 +50,8 @@ log {
console = false
filename = "flock.log"
roll = "never"
+ throttle_period_msec = 60000
+ throttle_rate = 10
truncate_stack_traces = 100
w3c {
@@ -84,11 +86,6 @@ log {
}
}
-throttled_log {
- period_msec = 60000
- rate = 10
-}
-
gizzard_services {
name = "edges"
min_threads = 5
@@ -194,4 +191,4 @@ edges {
}
max_memory_size = 36000000
}
-}
+}
View
@@ -49,6 +49,8 @@ log {
filename = "/var/log/flock/production.log"
level = "info"
roll = "hourly"
+ throttle_period_msec = 60000
+ throttle_rate = 10
truncate_stack_traces = 100
w3c {
@@ -77,11 +79,6 @@ log {
}
}
-throttled_log {
- period_msec = 60000
- rate = 10
-}
-
gizzard_services {
name = "edges"
min_threads = 200
View
@@ -48,11 +48,8 @@ errors {
log {
level = "fatal"
console = true
-}
-
-throttled_log {
- period_msec = 60000
- rate = 10
+ throttle_period_msec = 60000
+ throttle_rate = 10
}
gizzard_services {
@@ -158,4 +155,4 @@ edges {
}
max_memory_size = 36000000
}
-}
+}
View
@@ -3,6 +3,6 @@
project.organization=com.twitter
project.name=flockdb
sbt.version=0.7.3
-project.version=1.3.5.internal
+project.version=1.3.5
build.scala.versions=2.7.7
project.initialize=false
@@ -3,26 +3,27 @@ import Process._
import com.twitter.sbt.{SubversionRepository, StandardProject}
-class FlockDBProject(info: ProjectInfo) extends StandardProject(info) with SubversionRepository {
- val asm = "asm" % "asm" % "1.5.3"
- val cglib = "cglib" % "cglib" % "2.1_3"
- val configgy = "net.lag" % "configgy" % "1.5.2"
+class FlockDBProject(info: ProjectInfo) extends StandardProject(info) {
+ val configgy = "net.lag" % "configgy" % "1.6.0"
val dbcp = "commons-dbcp" % "commons-dbcp" % "1.2.2"
- val gizzard = "com.twitter" % "gizzard" % "1.3.5.internal"
- val hamcrest = "org.hamcrest" % "hamcrest-all" % "1.1"
- val jmock = "org.jmock" % "jmock" % "2.4.0"
+ val gizzard = "com.twitter" % "gizzard" % "1.3.8"
val kestrel = "net.lag" % "kestrel" % "1.2"
val mysqljdbc = "mysql" % "mysql-connector-java" % "5.1.6"
- val objenesis = "org.objenesis" % "objenesis" % "1.1"
val ostrich = "com.twitter" % "ostrich" % "1.2.1"
val pool = "commons-pool" % "commons-pool" % "1.3"
val querulous = "com.twitter" % "querulous" % "1.1.11"
val results = "com.twitter" % "results" % "1.0"
val slf4j = "org.slf4j" % "slf4j-jdk14" % "1.5.2"
val slf4jApi = "org.slf4j" % "slf4j-api" % "1.5.2"
val smile = "net.lag" % "smile" % "0.8.11"
- val specs = "org.scala-tools.testing" % "specs" % "1.6.2.1"
val thrift = "thrift" % "libthrift" % "0.2.0"
val xrayspecs = "com.twitter" % "xrayspecs" % "1.0.7"
val log4j = "log4j" % "log4j" % "1.2.12"
+
+ val asm = "asm" % "asm" % "1.5.3" % "test"
+ val cglib = "cglib" % "cglib" % "2.1_3" % "test"
+ val hamcrest = "org.hamcrest" % "hamcrest-all" % "1.1" % "test"
+ val jmock = "org.jmock" % "jmock" % "2.4.0" % "test"
+ val objenesis = "org.objenesis" % "objenesis" % "1.1" % "test"
+ val specs = "org.scala-tools.testing" % "specs" % "1.6.2.1" % "test"
}
@@ -42,7 +42,7 @@ import com.twitter.flockdb.conversions.SelectOperation._
import com.twitter.xrayspecs.{Duration, Time}
import com.twitter.xrayspecs.TimeConversions._
import net.lag.configgy.{Config, ConfigMap}
-import net.lag.logging.{Logger, ThrottledLogger}
+import net.lag.logging.Logger
import queries._
import jobs.multi.{RemoveAll, Archive, Unarchive}
import jobs.single.{Add, Remove}
@@ -63,10 +63,9 @@ object FlockDB {
val dbQueryEvaluatorFactory = QueryEvaluatorFactory.fromConfig(config.configMap("db"), Some(stats))
val materializingQueryEvaluatorFactory = QueryEvaluatorFactory.fromConfig(config.configMap("materializing_db"), Some(stats))
- val log = new ThrottledLogger[String](Logger(), config("throttled_log.period_msec").toInt, config("throttled_log.rate").toInt)
val replicationFuture = new Future("ReplicationFuture", config.configMap("edges.replication.future"))
val shardRepository = new nameserver.BasicShardRepository[shards.Shard](
- new shards.ReadWriteShardAdapter(_), log, replicationFuture)
+ new shards.ReadWriteShardAdapter(_), replicationFuture)
shardRepository += ("com.twitter.flockdb.SqlShard" -> new shards.SqlShardFactory(dbQueryEvaluatorFactory, materializingQueryEvaluatorFactory, config))
// for backward compat:
shardRepository.setupPackage("com.twitter.service.flock.edges")
@@ -75,7 +74,7 @@ object FlockDB {
shardRepository += ("com.twitter.service.flock.edges.BlackHoleShard" -> new shards.BlackHoleShardFactory)
val nameServer = nameserver.NameServer(config.configMap("edges.nameservers"), Some(stats),
- shardRepository, log, replicationFuture)
+ shardRepository, replicationFuture)
val polymorphicJobParser = new PolymorphicJobParser
val jobParser = new LoggingJobParser(Stats, w3c, new JobWithTasksParser(polymorphicJobParser))
@@ -63,7 +63,7 @@ class ReadWriteShardAdapter(shard: shards.ReadWriteShard[Shard])
val lockServer = children.first.asInstanceOf[Shard]
val rest = children.drop(1).asInstanceOf[Seq[Shard]]
lockServer.withLock(sourceId) { (lock, metadata) =>
- f(new ReadWriteShardAdapter(new shards.ReplicatingShard(shardInfo, weight, List(lock) ++ rest, replicatingShard.loadBalancer, replicatingShard.log, replicatingShard.future)), metadata)
+ f(new ReadWriteShardAdapter(new shards.ReplicatingShard(shardInfo, weight, List(lock) ++ rest, replicatingShard.loadBalancer, replicatingShard.future)), metadata)
}
} else {
shard.writeOperation(_.withLock(sourceId)(f))

0 comments on commit 1911917

Please sign in to comment.