Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: twitter/finagle
...
head fork: twitter/finagle
Checking mergeability… Don't worry, you can still create the pull request.
  • 12 commits
  • 40 files changed
  • 0 commit comments
  • 9 contributors
Commits on Apr 04, 2012
mmcbride [split] first stab at dependency management 6cd422d
Marcel Molina [split] Provided a mechanism to enable a mode for the KetamaDistribut…
…or where it preserves a floating point truncation behavior that exists in the version of libmemcached that the monorail uses for its clients so that JVM memcached clients always hash keys to the same host as the monorail clients.
af26670
Commits on Apr 06, 2012
@jjmmcc jjmmcc [split] finagle-memcached: mavenize tests a40f5ea
Commits on Apr 09, 2012
jsirois [split] Fix finagle-serversets self inclusion - problem still remains…
… for any other user of serversets ort any other science thrift in birdcage ...

RB_ID=59763
d417bf7
@9len 9len [split] fix some scala doc annotations s/@returns/@return/
 should fix some compile warnings
4f021e6
Commits on Apr 10, 2012
@jjmmcc jjmmcc [split] finagle-memcached: more efficient implementation of GetResult…
….merged "merged" was implemented as reduceLeft { _ ++ _ }, which is reasonable, but produces a ton of intermediate objects if merging many GetResults together. I've changed the implementation to accumulate results into mutable Maps and Sets, which produces far less garbage and does far less work.

I also added a GetResultSpec to test ++ and merged.
a126107
Commits on Apr 11, 2012
mmcbride [split] updating gen-maven command, regenning poms baddce6
@kmonkeyjam kmonkeyjam [split] finagle-b3 requires test for the mock test stuff f42178b
mmcbride [split] handli direct ivyXML dep in gen-maven b3bbe47
Krishna Gade [split] Add retries on timeout exceptions to RetryingFilter 710d0e5
Commits on Apr 12, 2012
Anirudh Srinivas [split] finagle-redis: return pairs for hgetall, zrangebyscores, zrev…
…rangebyscores cmds

Change hGetAll, zRangeByScoresWithScores, and zRevRangeByScoresWithScores interfaces to return a map of the result pairs, as opposed to a sequence. This better reflects what the commands actually return, and the consumer doesn't have to extract the pairs on their end.
65e282b
@mariusae mariusae [split] Merge commit 'f3cf83124ca76b36635da08533a29fb1ccdb2715'
Conflicts:
	finagle/finagle-b3/pom.xml
	finagle/finagle-commons-stats/pom.xml
	finagle/finagle-core/pom.xml
	finagle/finagle-core/src/main/scala/com/twitter/finagle/builder/ServerBuilder.scala
	finagle/finagle-core/src/main/scala/com/twitter/finagle/ssl/JSSE.scala
	finagle/finagle-example/pom.xml
	finagle/finagle-exception/pom.xml
	finagle/finagle-http/pom.xml
	finagle/finagle-kestrel/pom.xml
	finagle/finagle-memcached-hadoop/pom.xml
	finagle/finagle-memcached/pom.xml
	finagle/finagle-memcached/src/test/scala/com/twitter/finagle/memcached/integration/ClientSpec.scala
	finagle/finagle-memcached/src/test/scala/com/twitter/finagle/memcached/integration/InterpreterServiceSpec.scala
	finagle/finagle-memcached/src/test/scala/com/twitter/finagle/memcached/stress/InterpreterServiceSpec.scala
	finagle/finagle-memcached/src/test/scala/com/twitter/finagle/memcached/unit/PoolingReadRepairClientSpec.scala
	finagle/finagle-memcached/src/test/scala/com/twitter/finagle/memcached/unit/protocol/text/EncoderSpec.scala
	finagle/finagle-native/pom.xml
	finagle/finagle-ostrich4/pom.xml
	finagle/finagle-redis/pom.xml
	finagle/finagle-redis/src/main/scala/com/twitter/finagle/redis/Client.scala
	finagle/finagle-redis/src/test/scala/com/twitter/finagle/redis/integration/ClientSpec.scala
	finagle/finagle-serversets/pom.xml
	finagle/finagle-stream/pom.xml
	finagle/finagle-stress/pom.xml
	finagle/finagle-test/pom.xml
	finagle/finagle-thrift/pom.xml
	finagle/project/build/Project.scala
ae5b65b
Showing with 235 additions and 157 deletions.
  1. +5 −3 finagle-b3/pom.xml
  2. +0 −1  finagle-commons-stats/pom.xml
  3. +1 −4 finagle-core/pom.xml
  4. +8 −5 finagle-core/src/main/scala/com/twitter/finagle/service/RetryingFilter.scala
  5. +1 −1  finagle-core/src/main/scala/com/twitter/finagle/ssl/JSSE.scala
  6. +1 −1  finagle-core/src/main/scala/com/twitter/finagle/ssl/PEMEncodedKeyManager.scala
  7. +1 −1  finagle-core/src/test/java/com/twitter/finagle/service/JavaRetryingFilter.java
  8. +0 −9 finagle-example/pom.xml
  9. +0 −3  finagle-exception/pom.xml
  10. +0 −2  finagle-http/pom.xml
  11. +0 −2  finagle-kestrel/pom.xml
  12. +0 −3  finagle-memcached-hadoop/pom.xml
  13. +1 −3 finagle-memcached/pom.xml
  14. +41 −11 finagle-memcached/src/main/scala/com/twitter/finagle/memcached/Client.scala
  15. +2 −2 finagle-memcached/src/test/scala/com/twitter/finagle/memcached/integration/ClientSpec.scala
  16. +5 −6 finagle-memcached/src/test/scala/com/twitter/finagle/memcached/integration/InterpreterServiceSpec.scala
  17. +5 −8 finagle-memcached/src/test/scala/com/twitter/finagle/memcached/integration/ProxySpec.scala
  18. +4 −4 finagle-memcached/src/test/scala/com/twitter/finagle/memcached/stress/InterpreterServiceSpec.scala
  19. +2 −2 finagle-memcached/src/test/scala/com/twitter/finagle/memcached/unit/ClientSpec.scala
  20. +70 −0 finagle-memcached/src/test/scala/com/twitter/finagle/memcached/unit/GetResultSpec.scala
  21. +5 −5 finagle-memcached/src/test/scala/com/twitter/finagle/memcached/unit/InterpreterSpec.scala
  22. +2 −2 finagle-memcached/src/test/scala/com/twitter/finagle/memcached/unit/MockClientSpec.scala
  23. +2 −4 finagle-memcached/src/test/scala/com/twitter/finagle/memcached/unit/PoolingReadRepairClientSpec.scala
  24. +2 −2 finagle-memcached/src/test/scala/com/twitter/finagle/memcached/unit/protocol/text/EncoderSpec.scala
  25. +2 −5 finagle-memcached/src/test/scala/com/twitter/finagle/memcached/unit/protocol/text/ShowSpec.scala
  26. +3 −3 finagle-memcached/src/test/scala/com/twitter/finagle/memcached/unit/protocol/text/client/DecoderSpec.scala
  27. +5 −5 ...mcached/src/test/scala/com/twitter/finagle/memcached/unit/protocol/text/client/DecodingToResponseSpec.scala
  28. +8 −8 ...emcached/src/test/scala/com/twitter/finagle/memcached/unit/protocol/text/server/DecodingToCommandSpec.scala
  29. +0 −2  finagle-native/pom.xml
  30. +0 −2  finagle-ostrich4/pom.xml
  31. +0 −2  finagle-redis/pom.xml
  32. +30 −18 finagle-redis/src/main/scala/com/twitter/finagle/redis/Client.scala
  33. +4 −0 finagle-redis/src/main/scala/com/twitter/finagle/redis/util/Conversions.scala
  34. +9 −9 finagle-redis/src/test/scala/com/twitter/finagle/redis/integration/ClientSpec.scala
  35. +5 −6 finagle-serversets/pom.xml
  36. +0 −2  finagle-stream/pom.xml
  37. +0 −6 finagle-stress/pom.xml
  38. +0 −1  finagle-test/pom.xml
  39. +1 −2  finagle-thrift/pom.xml
  40. +10 −2 project/build/Project.scala
View
8 finagle-b3/pom.xml
@@ -31,17 +31,19 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs
<dependency>
<groupId>com.twitter</groupId>
<artifactId>finagle-core</artifactId>
- <version>3.0.1-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>com.twitter</groupId>
+ <artifactId>finagle-test</artifactId>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>com.twitter</groupId>
<artifactId>finagle-thrift</artifactId>
- <version>3.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.twitter</groupId>
<artifactId>util-codec</artifactId>
- <version>3.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
View
1  finagle-commons-stats/pom.xml
@@ -25,7 +25,6 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs
<dependency>
<groupId>com.twitter</groupId>
<artifactId>finagle-core</artifactId>
- <version>3.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
View
5 finagle-core/pom.xml
@@ -25,22 +25,19 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs
<dependency>
<groupId>com.twitter</groupId>
<artifactId>finagle-test</artifactId>
- <version>3.0.1-SNAPSHOT</version>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>com.twitter</groupId>
<artifactId>util-collection</artifactId>
- <version>3.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.twitter</groupId>
<artifactId>util-core</artifactId>
- <version>3.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.twitter</groupId>
<artifactId>util-hashing</artifactId>
- <version>3.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
View
13 finagle-core/src/main/scala/com/twitter/finagle/service/RetryingFilter.scala
@@ -4,7 +4,7 @@ import java.{util => ju}
import java.util.{concurrent => juc}
import scala.collection.JavaConversions._
import com.twitter.conversions.time._
-import com.twitter.finagle.{RetryFailureException, SimpleFilter, Service, WriteException}
+import com.twitter.finagle.{RetryFailureException, SimpleFilter, Service, WriteException, TimeoutException}
import com.twitter.finagle.stats.{StatsReceiver, NullStatsReceiver}
import com.twitter.util._
import com.twitter.finagle.tracing.Trace
@@ -16,6 +16,11 @@ object RetryPolicy {
case Throw(_: WriteException) => true
}
+ val TimeoutAndWriteExceptionsOnly: PartialFunction[Try[Nothing], Boolean] = {
+ case Throw(_: TimeoutException) => true
+ case Throw(_: WriteException) => true
+ }
+
def tries(numTries: Int) = {
backoff[Try[Nothing]](Backoff.const(0.second) take (numTries - 1))(WriteExceptionsOnly)
}
@@ -26,10 +31,8 @@ object RetryPolicy {
def backoffJava[A](
backoffs: juc.Callable[ju.Iterator[Duration]],
shouldRetry: PartialFunction[A, Boolean]
- ): RetryPolicy[Try[Nothing]] = {
- backoff[Try[Nothing]](backoffs.call().toStream) {
- case Throw(_: WriteException) => true
- }
+ ): RetryPolicy[A] = {
+ backoff[A](backoffs.call().toStream)(shouldRetry)
}
def backoff[A](
View
2  finagle-core/src/main/scala/com/twitter/finagle/ssl/JSSE.scala
@@ -75,7 +75,7 @@ object JSSE {
}
/**
- * @returns a trust manager chain that does not validate certificates
+ * @return a trust manager chain that does not validate certificates
*/
private[this] def trustAllCertificates(): Array[TrustManager] =
Array(new IgnorantTrustManager)
View
2  finagle-core/src/main/scala/com/twitter/finagle/ssl/PEMEncodedKeyManager.scala
@@ -15,7 +15,7 @@ import com.twitter.io.{Files, TempDirectory, StreamIO}
*
* @param certificatePath the path to the PEM-encoded certificate
* @param keyPath the path to the PEM-encoded private key
- * @returns Array[KeyManager]
+ * @return Array[KeyManager]
*/
object PEMEncodedKeyManager {
class ExternalExecutableFailed(message: String) extends Exception(message)
View
2  finagle-core/src/test/java/com/twitter/finagle/service/JavaRetryingFilter.java
@@ -11,6 +11,6 @@
static {
RetryPolicy$.MODULE$.backoffJava(
Backoff.toJava(Backoff.constant(Duration.fromTimeUnit(0, TimeUnit.SECONDS))),
- RetryPolicy$.MODULE$.WriteExceptionsOnly());
+ RetryPolicy$.MODULE$.TimeoutAndWriteExceptionsOnly());
};
}
View
9 finagle-example/pom.xml
@@ -74,47 +74,38 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs
<dependency>
<groupId>com.twitter</groupId>
<artifactId>finagle-core</artifactId>
- <version>3.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.twitter</groupId>
<artifactId>finagle-http</artifactId>
- <version>3.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.twitter</groupId>
<artifactId>finagle-kestrel</artifactId>
- <version>3.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.twitter</groupId>
<artifactId>finagle-memcached</artifactId>
- <version>3.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.twitter</groupId>
<artifactId>finagle-ostrich4</artifactId>
- <version>3.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.twitter</groupId>
<artifactId>finagle-redis</artifactId>
- <version>3.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.twitter</groupId>
<artifactId>finagle-stream</artifactId>
- <version>3.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.twitter</groupId>
<artifactId>finagle-thrift</artifactId>
- <version>3.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.twitter</groupId>
<artifactId>util-codec</artifactId>
- <version>3.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
View
3  finagle-exception/pom.xml
@@ -58,17 +58,14 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs
<dependency>
<groupId>com.twitter</groupId>
<artifactId>finagle-core</artifactId>
- <version>3.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.twitter</groupId>
<artifactId>finagle-thrift</artifactId>
- <version>3.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.twitter</groupId>
<artifactId>util-codec</artifactId>
- <version>3.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
View
2  finagle-http/pom.xml
@@ -30,12 +30,10 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs
<dependency>
<groupId>com.twitter</groupId>
<artifactId>util-codec</artifactId>
- <version>3.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.twitter</groupId>
<artifactId>util-logging</artifactId>
- <version>3.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
View
2  finagle-kestrel/pom.xml
@@ -20,12 +20,10 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs
<dependency>
<groupId>com.twitter</groupId>
<artifactId>finagle-core</artifactId>
- <version>3.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.twitter</groupId>
<artifactId>finagle-memcached</artifactId>
- <version>3.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
View
3  finagle-memcached-hadoop/pom.xml
@@ -41,17 +41,14 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs
<dependency>
<groupId>com.twitter</groupId>
<artifactId>finagle-core</artifactId>
- <version>3.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.twitter</groupId>
<artifactId>finagle-memcached</artifactId>
- <version>3.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.twitter</groupId>
<artifactId>util-eval</artifactId>
- <version>3.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
View
4 finagle-memcached/pom.xml
@@ -20,12 +20,10 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs
<dependency>
<groupId>com.twitter</groupId>
<artifactId>finagle-core</artifactId>
- <version>3.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.twitter</groupId>
<artifactId>util-hashing</artifactId>
- <version>3.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
@@ -35,7 +33,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
- <exclude>**/*</exclude>
+ <exclude>**/TestClient.class</exclude>
</excludes>
</configuration>
</plugin>
View
52 finagle-memcached/src/main/scala/com/twitter/finagle/memcached/Client.scala
@@ -1,7 +1,7 @@
package com.twitter.finagle.memcached
import scala.collection.JavaConversions._
-import scala.collection.immutable
+import scala.collection.{immutable, mutable}
import _root_.java.net.InetSocketAddress
import _root_.java.util.{Map => JMap}
@@ -67,15 +67,32 @@ case class GetsResult(getResult: GetResult) {
}
object GetResult {
+ /**
+ * Equivalaent to results.reduceLeft { _ ++ _ }, but written to be more efficient.
+ */
private[memcached] def merged(results: Seq[GetResult]): GetResult = {
- results.foldLeft(GetResult()) { _ ++ _ }
+ results match {
+ case Nil => GetResult()
+ case Seq(single) => single
+ case Seq(a, b) => a ++ b
+ case _ =>
+ val hits = new mutable.HashMap[String, Value]
+ val misses = new mutable.HashSet[String]
+ val failures = new mutable.HashMap[String, Throwable]
+
+ for (result <- results) {
+ hits ++= result.hits
+ misses ++= result.misses
+ failures ++= result.failures
+ }
+
+ GetResult(hits.toMap, misses.toSet, failures.toMap)
+ }
}
- private[memcached] def merged(results: Seq[GetsResult]) = {
+ private[memcached] def merged(results: Seq[GetsResult]): GetsResult = {
val unwrapped = results map { _.getResult }
- GetsResult(
- unwrapped.foldLeft(GetResult()) { _ ++ _ }
- )
+ GetsResult(merged(unwrapped))
}
}
@@ -538,7 +555,8 @@ class KetamaClient private[memcached](
health: Offer[NodeHealth],
keyHasher: KeyHasher,
numReps: Int,
- statsReceiver: StatsReceiver = NullStatsReceiver
+ statsReceiver: StatsReceiver = NullStatsReceiver,
+ oldLibMemcachedVersionComplianceMode: Boolean = false
) extends PartitionedClient {
require(!services.isEmpty, "At least one service must be provided")
@@ -558,7 +576,7 @@ class KetamaClient private[memcached](
private[this] val revivalCount = statsReceiver.counter("revivals")
private[this] def buildDistributor(nodes: Seq[KetamaNode[Client]]) =
- new KetamaDistributor(nodes, numReps)
+ new KetamaDistributor(nodes, numReps, oldLibMemcachedVersionComplianceMode)
health foreach {
case NodeMarkedDead(key) =>
@@ -607,8 +625,9 @@ case class KetamaClientBuilder(
_hashName: Option[String],
_clientBuilder: Option[ClientBuilder[_, _, _, _, ClientConfig.Yes]],
_numFailures: Int = 5,
- _markDeadFor: Duration = 30.seconds
- ) {
+ _markDeadFor: Duration = 30.seconds,
+ oldLibMemcachedVersionComplianceMode: Boolean = false
+) {
def nodes(nodes: Seq[(String, Int, Int)]): KetamaClientBuilder =
copy(_nodes = nodes)
@@ -625,6 +644,9 @@ case class KetamaClientBuilder(
def failureAccrualParams(numFailures: Int, markDeadFor: Duration): KetamaClientBuilder =
copy(_numFailures = numFailures, _markDeadFor = markDeadFor)
+ def enableOldLibMemcachedVersionComplianceMode(): KetamaClientBuilder =
+ copy(oldLibMemcachedVersionComplianceMode = true)
+
def build(): Client = {
val builder =
@@ -649,7 +671,15 @@ case class KetamaClientBuilder(
val keyHasher = KeyHasher.byName(_hashName.getOrElse("ketama"))
val allHealth = Offer.choose(healths: _*)
val statsReceiver = builder.statsReceiver.scope("memcached_client")
- new KetamaClient(clients, allHealth, keyHasher, KetamaClient.NumReps, statsReceiver)
+
+ new KetamaClient(
+ clients,
+ allHealth,
+ keyHasher,
+ KetamaClient.NumReps,
+ statsReceiver,
+ oldLibMemcachedVersionComplianceMode
+ )
}
private[this] def failureAccrualWrapper(key: KetamaClientKey) = {
View
4 finagle-memcached/src/test/scala/com/twitter/finagle/memcached/integration/ClientSpec.scala
@@ -8,9 +8,9 @@ import com.twitter.finagle.memcached.{Server, Client, KetamaClientBuilder}
import com.twitter.finagle.tracing.ConsoleTracer
import java.net.{InetSocketAddress, SocketAddress}
import org.jboss.netty.util.CharsetUtil
-import org.specs.Specification
+import org.specs.SpecificationWithJUnit
-object ClientSpec extends Specification {
+class ClientSpec extends SpecificationWithJUnit {
"ConnectedClient" should {
/**
* Note: This integration test requires a real Memcached server to run.
View
11 finagle-memcached/src/test/scala/com/twitter/finagle/memcached/integration/InterpreterServiceSpec.scala
@@ -1,17 +1,17 @@
package com.twitter.finagle.memcached.integration
-import com.twitter.finagle.Service
import com.twitter.finagle.builder.ClientBuilder
-import com.twitter.finagle.memcached.Server
import com.twitter.finagle.memcached.protocol._
import com.twitter.finagle.memcached.protocol.text.Memcached
+import com.twitter.finagle.memcached.Server
import com.twitter.finagle.memcached.util.ChannelBufferUtils._
-import com.twitter.util.TimeConversions._
+import com.twitter.finagle.Service
import com.twitter.util.Time
+import com.twitter.util.TimeConversions._
import java.net.InetSocketAddress
-import org.specs.Specification
+import org.specs.SpecificationWithJUnit
-object InterpreterServiceSpec extends Specification {
+class InterpreterServiceSpec extends SpecificationWithJUnit {
"InterpreterService" should {
var server: Server = null
var client: Service[Command, Response] = null
@@ -47,6 +47,5 @@ object InterpreterServiceSpec extends Specification {
val result = client(Quit())
result() mustEqual NoOp()
}
-
}
}
View
13 finagle-memcached/src/test/scala/com/twitter/finagle/memcached/integration/ProxySpec.scala
@@ -1,22 +1,19 @@
package com.twitter.finagle.memcached.integration
-import org.specs.Specification
-
-import org.jboss.netty.buffer.ChannelBuffers
-import org.jboss.netty.util.CharsetUtil
-
import com.twitter.conversions.time._
+import com.twitter.finagle.builder.{ClientBuilder, Server, ServerBuilder}
import com.twitter.finagle.memcached.Client
import com.twitter.finagle.memcached.protocol.text.Memcached
import com.twitter.finagle.memcached.protocol.{Command, Response}
import com.twitter.finagle.Service
import com.twitter.finagle.ServiceClosedException
-import com.twitter.finagle.builder.{ClientBuilder, Server, ServerBuilder}
import com.twitter.util.RandomSocket
-
import java.net.{InetSocketAddress, Socket}
+import org.jboss.netty.buffer.ChannelBuffers
+import org.jboss.netty.util.CharsetUtil
+import org.specs.SpecificationWithJUnit
-object ProxySpec extends Specification {
+class ProxySpec extends SpecificationWithJUnit {
type MemcacheService = Service[Command, Response]
View
8 finagle-memcached/src/test/scala/com/twitter/finagle/memcached/stress/InterpreterServiceSpec.scala
@@ -1,16 +1,16 @@
package com.twitter.finagle.memcached.stress
-import org.specs.Specification
-import com.twitter.finagle.memcached.Server
import com.twitter.finagle.builder.ClientBuilder
import com.twitter.finagle.memcached.protocol._
import com.twitter.finagle.memcached.protocol.text.Memcached
-import com.twitter.finagle.Service
+import com.twitter.finagle.memcached.Server
import com.twitter.finagle.memcached.util.ChannelBufferUtils._
+import com.twitter.finagle.Service
import com.twitter.util.Time
import java.net.InetSocketAddress
+import org.specs.SpecificationWithJUnit
-object InterpreterServiceSpec extends Specification {
+class InterpreterServiceSpec extends SpecificationWithJUnit {
"InterpreterService" should {
var server: Server = null
var client: Service[Command, Response] = null
View
4 finagle-memcached/src/test/scala/com/twitter/finagle/memcached/unit/ClientSpec.scala
@@ -8,11 +8,11 @@ import com.twitter.concurrent.Broker
import com.twitter.util.Future
import org.jboss.netty.buffer.ChannelBuffers
import org.specs.mock.Mockito
-import org.specs.Specification
+import org.specs.SpecificationWithJUnit
import scala.collection.mutable
import _root_.java.io.{BufferedReader, InputStreamReader}
-object ClientSpec extends Specification with Mockito {
+class ClientSpec extends SpecificationWithJUnit with Mockito {
"KetamaClient" should {
// Test from Smile's KetamaNodeLocatorSpec.scala
View
70 finagle-memcached/src/test/scala/com/twitter/finagle/memcached/unit/GetResultSpec.scala
@@ -0,0 +1,70 @@
+package com.twitter.finagle.memcached.unit
+
+import com.twitter.finagle.memcached._
+import com.twitter.finagle.memcached.protocol.Value
+import org.specs.mock.Mockito
+import org.specs.SpecificationWithJUnit
+import scala.collection.immutable
+
+class GetResultSpec extends SpecificationWithJUnit with Mockito {
+
+ "GetResult" should {
+ "add together hits/misses/failures with ++" in {
+ val value1 = mock[Value]
+ val value2 = mock[Value]
+ val ex1 = mock[Exception]
+ val ex2 = mock[Exception]
+ val left = GetResult(
+ hits = Map("h1" -> value1),
+ misses = immutable.Set("m1"),
+ failures = Map("f1" -> ex1))
+ val right = GetResult(
+ hits = Map("h2" -> value2),
+ misses = immutable.Set("m2"),
+ failures = Map("f2" -> ex2))
+ val empty = GetResult()
+
+ "both empty" in {
+ empty ++ empty mustEqual empty
+ }
+
+ "non-empty left, empty right" in {
+ left ++ empty mustEqual left
+ }
+
+ "empty left, non-empty right" in {
+ empty ++ right mustEqual right
+ }
+
+ "non-empty left, non-empty right" in {
+ left ++ right mustEqual GetResult(
+ hits = Map("h1" -> value1, "h2" -> value2),
+ misses = immutable.Set("m1", "m2"),
+ failures = Map("f1" -> ex1, "f2" -> ex2)
+ )
+ }
+ }
+ }
+
+ "object GetResult" should {
+ "merged of empty seq produces empty GetResult" in {
+ GetResult.merged(Seq[GetResult]()) mustEqual GetResult()
+ }
+
+ "merged of single item produces that item" in {
+ val getResult = GetResult()
+ GetResult.merged(Seq(getResult)) mustBe getResult
+ }
+
+ "merge is the same as ++" in {
+ val subResults = (1 to 10) map { i =>
+ GetResult(
+ hits = Map("h" + i -> mock[Value]),
+ misses = immutable.Set("m" + i),
+ failures = Map("f" + i -> mock[Exception]))
+ }
+
+ GetResult.merged(subResults) mustEqual (subResults.reduceLeft { _ ++ _ })
+ }
+ }
+}
View
10 finagle-memcached/src/test/scala/com/twitter/finagle/memcached/unit/InterpreterSpec.scala
@@ -1,15 +1,15 @@
package com.twitter.finagle.memcached.unit
-import org.specs.Specification
import com.twitter.finagle.memcached.Interpreter
-import org.jboss.netty.buffer.ChannelBuffer
import com.twitter.finagle.memcached.protocol._
-import scala.collection.mutable
-import com.twitter.finagle.memcached.util.ChannelBufferUtils._
import com.twitter.finagle.memcached.util.AtomicMap
+import com.twitter.finagle.memcached.util.ChannelBufferUtils._
import com.twitter.util.Time
+import org.jboss.netty.buffer.ChannelBuffer
+import org.specs.SpecificationWithJUnit
+import scala.collection.mutable
-class InterpreterSpec extends Specification {
+class InterpreterSpec extends SpecificationWithJUnit {
"Interpreter" should {
val map = mutable.Map[ChannelBuffer, ChannelBuffer]()
val interpreter = new Interpreter(new AtomicMap(Seq(map)))
View
4 finagle-memcached/src/test/scala/com/twitter/finagle/memcached/unit/MockClientSpec.scala
@@ -1,10 +1,10 @@
package com.twitter.finagle.memcached.unit
import com.twitter.finagle.memcached.MockClient
-import org.specs.Specification
+import org.specs.SpecificationWithJUnit
import scala.collection.mutable
-object MockClientSpec extends Specification {
+class MockClientSpec extends SpecificationWithJUnit {
"MockClient" should {
"get" in {
val memcache = new MockClient(Map("key" -> "value")).withStrings
View
6 finagle-memcached/src/test/scala/com/twitter/finagle/memcached/unit/PoolingReadRepairClientSpec.scala
@@ -8,11 +8,11 @@ import com.twitter.concurrent.Broker
import com.twitter.util.Future
import org.jboss.netty.buffer.ChannelBuffers
import org.specs.mock.Mockito
-import org.specs.Specification
+import org.specs.SpecificationWithJUnit
import scala.collection.mutable
import _root_.java.io.{BufferedReader, InputStreamReader}
-object PoolingReadRepairClientSpec extends Specification with Mockito {
+class PoolingReadRepairClientSpec extends SpecificationWithJUnit with Mockito {
var full: MockClient = null
var partial: MockClient = null
var pooled: Client = null
@@ -25,7 +25,6 @@ object PoolingReadRepairClientSpec extends Specification with Mockito {
}
reset()
-
"PoolingReadRepairClient" should {
"return the correct value" in {
pooled.withStrings.get("key")() must beSome("value")
@@ -37,5 +36,4 @@ object PoolingReadRepairClientSpec extends Specification with Mockito {
partial.map.size mustEqual 2
}
}
-
}
View
4 finagle-memcached/src/test/scala/com/twitter/finagle/memcached/unit/protocol/text/EncoderSpec.scala
@@ -7,10 +7,10 @@ import com.twitter.finagle.memcached.util.ChannelBufferUtils.{
import com.twitter.util.Time
import org.jboss.netty.buffer.{ChannelBuffers, ChannelBuffer}
import org.jboss.netty.channel.{ChannelHandlerContext, Channel}
-import org.specs.Specification
import org.specs.mock.Mockito
+import org.specs.SpecificationWithJUnit
-class EncoderSpec extends Specification with Mockito {
+class EncoderSpec extends SpecificationWithJUnit with Mockito {
"Encoder" should {
val channel = smartMock[Channel]
val context = smartMock[ChannelHandlerContext]
View
7 finagle-memcached/src/test/scala/com/twitter/finagle/memcached/unit/protocol/text/ShowSpec.scala
@@ -6,11 +6,10 @@ import com.twitter.finagle.memcached.protocol.{
NonexistentCommand,
ServerError
}
-import org.specs.Specification
import org.jboss.netty.util.CharsetUtil
+import org.specs.SpecificationWithJUnit
-class ShowSpec extends Specification {
-
+class ShowSpec extends SpecificationWithJUnit {
"ResponseToEncoding" should {
val responseToEncoding = new ResponseToEncoding
@@ -40,7 +39,5 @@ class ShowSpec extends Specification {
tokens.tokens.head.toString(CharsetUtil.UTF_8) mustEqual "SERVER_ERROR"
}
}
-
}
-
}
View
6 finagle-memcached/src/test/scala/com/twitter/finagle/memcached/unit/protocol/text/client/DecoderSpec.scala
@@ -1,12 +1,12 @@
package com.twitter.finagle.memcached.unit.protocol.text.client
-import org.specs.Specification
import com.twitter.finagle.memcached.protocol.text.client.Decoder
-import com.twitter.finagle.memcached.util.ChannelBufferUtils._
import com.twitter.finagle.memcached.protocol.text.{TokensWithData, ValueLines, Tokens, StatLines}
+import com.twitter.finagle.memcached.util.ChannelBufferUtils._
import org.specs.mock.Mockito
+import org.specs.SpecificationWithJUnit
-object DecoderSpec extends Specification with Mockito {
+class DecoderSpec extends SpecificationWithJUnit with Mockito {
"Decoder" should {
val decoder = new Decoder
decoder.start()
View
10 ...ched/src/test/scala/com/twitter/finagle/memcached/unit/protocol/text/client/DecodingToResponseSpec.scala
@@ -1,15 +1,15 @@
package com.twitter.finagle.memcached.unit.protocol.text.client
-import org.specs.Specification
+import com.twitter.finagle.memcached.protocol
import com.twitter.finagle.memcached.protocol.text.client.DecodingToResponse
+import com.twitter.finagle.memcached.protocol.text.{Tokens, StatLines}
+import com.twitter.finagle.memcached.protocol.{ClientError, Info => MCInfo, InfoLines, Stored, NonexistentCommand, NotFound, Exists, Value}
import com.twitter.finagle.memcached.util.ChannelBufferUtils._
import org.jboss.netty.buffer.ChannelBuffer
import org.jboss.netty.util.CharsetUtil.UTF_8
-import com.twitter.finagle.memcached.protocol.text.{Tokens, StatLines}
-import com.twitter.finagle.memcached.protocol
-import com.twitter.finagle.memcached.protocol.{ClientError, Info => MCInfo, InfoLines, Stored, NonexistentCommand, NotFound, Exists, Value}
+import org.specs.SpecificationWithJUnit
-object DecodingToResponseSpec extends Specification {
+class DecodingToResponseSpec extends SpecificationWithJUnit {
"DecodingToResponse" should {
val decodingToResponse = new DecodingToResponse
View
16 ...ached/src/test/scala/com/twitter/finagle/memcached/unit/protocol/text/server/DecodingToCommandSpec.scala
@@ -1,18 +1,18 @@
package com.twitter.finagle.memcached.unit.protocol.text.server
-import org.specs.Specification
-import org.specs.util.DataTables
-import org.jboss.netty.buffer.ChannelBuffer
-import org.jboss.netty.buffer.ChannelBuffers.copiedBuffer
-import org.jboss.netty.util.CharsetUtil
import com.twitter.conversions.time._
-import com.twitter.finagle.memcached.util.ChannelBufferUtils._
-import com.twitter.finagle.memcached.protocol.text.{Tokens, TokensWithData}
import com.twitter.finagle.memcached.protocol.text.server.DecodingToCommand
+import com.twitter.finagle.memcached.protocol.text.{Tokens, TokensWithData}
import com.twitter.finagle.memcached.protocol.{Set, Stats}
+import com.twitter.finagle.memcached.util.ChannelBufferUtils._
import com.twitter.util.{Duration, Time}
+import org.jboss.netty.buffer.ChannelBuffer
+import org.jboss.netty.buffer.ChannelBuffers.copiedBuffer
+import org.jboss.netty.util.CharsetUtil
+import org.specs.SpecificationWithJUnit
+import org.specs.util.DataTables
-object DecodingToCommandSpec extends Specification with DataTables {
+class DecodingToCommandSpec extends SpecificationWithJUnit with DataTables {
"DecodingToCommand" should {
val decodingToCommand = new DecodingToCommand
View
2  finagle-native/pom.xml
@@ -20,12 +20,10 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs
<dependency>
<groupId>com.twitter</groupId>
<artifactId>finagle-core</artifactId>
- <version>3.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.twitter</groupId>
<artifactId>finagle-http</artifactId>
- <version>3.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
View
2  finagle-ostrich4/pom.xml
@@ -20,12 +20,10 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs
<dependency>
<groupId>com.twitter</groupId>
<artifactId>finagle-core</artifactId>
- <version>3.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.twitter</groupId>
<artifactId>ostrich</artifactId>
- <version>6.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
View
2  finagle-redis/pom.xml
@@ -68,12 +68,10 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs
<dependency>
<groupId>com.twitter</groupId>
<artifactId>finagle-core</artifactId>
- <version>3.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.twitter</groupId>
<artifactId>util-logging</artifactId>
- <version>3.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
View
48 finagle-redis/src/main/scala/com/twitter/finagle/redis/Client.scala
@@ -161,12 +161,12 @@ class Client(service: Service[Command, Reply]) {
/**
* Gets all field value pairs for given hash
* @param hash key
- * @return List of field value pairs
+ * @return Map of field/value pairs
*/
- def hGetAll(key: Array[Byte]): Future[Seq[Array[Byte]]] =
+ def hGetAll(key: Array[Byte]): Future[Map[Array[Byte], Array[Byte]]] =
doRequest(HGetAll(key)) {
- case MBulkReply(messages) => Future.value(messages)
- case EmptyMBulkReply() => Future.value(Seq())
+ case MBulkReply(messages) => returnPairs(messages)
+ case EmptyMBulkReply() => Future.value(Map())
}
/**
@@ -205,7 +205,7 @@ class Client(service: Service[Command, Reply]) {
/**
* Gets score of member in sorted set
* @param key, member
- * @returns Score of member as a byte array
+ * @return Score of member as a byte array
*/
def zScore(key: Array[Byte], member: Array[Byte]): Future[Option[Array[Byte]]] =
doRequest(ZScore(key, member)) {
@@ -227,11 +227,11 @@ class Client(service: Service[Command, Reply]) {
* Gets member, score pairs from sorted set between min and max
* Results are limited by offset and count
* @param key, min, max, offset, count
- * @return Member, score pairs that match constraints
+ * @return Map of member/score pairs
*/
def zRangeByScoreWithScores(
key: Array[Byte], min: Double, max: Double, offset: Int, count: Int
- ): Future[Seq[Array[Byte]]] =
+ ): Future[Map[Array[Byte], Array[Byte]]] =
doRequest(
ZRangeByScore(
BytesToString(key),
@@ -241,8 +241,8 @@ class Client(service: Service[Command, Reply]) {
Some(Limit(offset, count))
)
) {
- case MBulkReply(messages) => Future.value(messages)
- case EmptyMBulkReply() => Future.value(Seq())
+ case MBulkReply(messages) => returnPairs(messages)
+ case EmptyMBulkReply() => Future.value(Map())
}
/**
@@ -257,10 +257,10 @@ class Client(service: Service[Command, Reply]) {
}
/**
- * Removes specified member(s) from sorted set at key
- * @params key, member(s)
- * @return Number of members removed from sorted set
- */
+ * Removes specified member(s) from sorted set at key
+ * @params key, member(s)
+ * @return Number of members removed from sorted set
+ */
def zRem(key: Array[Byte], members: Seq[Array[Byte]]): Future[Int] =
doRequest(ZRem(key, members)) {
case IntegerReply(n) => Future.value(n)
@@ -283,11 +283,11 @@ class Client(service: Service[Command, Reply]) {
* Elements are ordered from highest to lowest score
* Results are limited by offset and count
* @param key, max, min, offset, count
- * @return List of element in specified score range
+ * @return Map of element/score pairs in specified score range
*/
def zRevRangeByScoreWithScores(
key: Array[Byte], max: Double, min: Double, offset: Int, count: Int
- ): Future[Seq[Array[Byte]]] =
+ ): Future[Map[Array[Byte], Array[Byte]]] =
doRequest(
ZRevRangeByScore(
BytesToString(key),
@@ -297,8 +297,8 @@ class Client(service: Service[Command, Reply]) {
Some(Limit(offset, count))
)
) {
- case MBulkReply(messages) => Future.value(messages)
- case EmptyMBulkReply() => Future.value(Seq())
+ case MBulkReply(messages) => returnPairs(messages)
+ case EmptyMBulkReply() => Future.value(Map())
}
/**
@@ -315,4 +315,16 @@ class Client(service: Service[Command, Reply]) {
case _ => Future.exception(new IllegalStateException)
})
-}
+ /**
+ * Helper function to convert a Redis multi-bulk reply into a map of pairs
+ */
+ private def returnPairs(messages: List[Array[Byte]]) = {
+ assert(messages.length % 2 == 0, "Odd number of items in response")
+ Future.value({
+ messages.grouped(2).toList flatMap {
+ case List(a, b) => Some(a, b)
+ } toMap
+ })
+ }
+
+}
View
4 finagle-redis/src/main/scala/com/twitter/finagle/redis/util/Conversions.scala
@@ -25,6 +25,10 @@ object BytesToString {
def fromList(args: List[Array[Byte]], charset: String = "UTF-8") = args.map { arg =>
BytesToString(arg, charset)
}
+ def fromMap(args: Map[Array[Byte], Array[Byte]], charset: String = "UTF-8") =
+ args.toSeq map { arg =>
+ (BytesToString(arg._1, charset), BytesToString(arg._2, charset))
+ }
}
object StringToBytes {
def apply(arg: String, charset: String = "UTF-8") = arg.getBytes(charset)
View
18 finagle-redis/src/test/scala/com/twitter/finagle/redis/integration/ClientSpec.scala
@@ -115,8 +115,8 @@ object ClientSpec extends Specification {
"get multiple values at once" in {
client.hSet(foo, bar, baz)()
client.hSet(foo, boo, moo)()
- BytesToString.fromList(
- client.hGetAll(foo)().toList) mustEqual Seq("bar", "baz", "boo", "moo")
+ BytesToString.fromMap(
+ client.hGetAll(foo)()) mustEqual Seq(("bar" -> "baz"), ("boo", "moo"))
}
}
@@ -141,9 +141,9 @@ object ClientSpec extends Specification {
"get the zRangeByScore" in {
client.zAdd(foo, 10, bar)() mustEqual 1
client.zAdd(foo, 20, baz)() mustEqual 1
- BytesToString.fromList(
- client.zRangeByScoreWithScores(foo, 0, 30, 0, 5)().toList) mustEqual Seq("bar", "10",
- "baz", "20")
+ BytesToString.fromMap(
+ client.zRangeByScoreWithScores(foo, 0, 30, 0, 5)()) mustEqual Seq(("bar", "10"),
+ ("baz", "20"))
}
"get cardinality and remove members" in {
@@ -163,10 +163,10 @@ object ClientSpec extends Specification {
"get zRevRangeByScoreWithScores" in {
client.zAdd(foo, 10, bar)() mustEqual 1
client.zAdd(foo, 20, baz)() mustEqual 1
- BytesToString.fromList(
- client.zRevRangeByScoreWithScores(foo, 0, 10, 0, 1)().toList) mustEqual Seq("bar", "10")
- BytesToString.fromList(
- client.zRevRangeByScoreWithScores(foo, 0, 0, 0, 1)().toList) mustEqual Seq()
+ BytesToString.fromMap(
+ client.zRevRangeByScoreWithScores(foo, 0, 10, 0, 1)()) mustEqual Seq(("bar", "10"))
+ BytesToString.fromMap(
+ client.zRevRangeByScoreWithScores(foo, 0, 0, 0, 1)()) mustEqual Seq()
}
}
View
11 finagle-serversets/pom.xml
@@ -113,6 +113,11 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs
</exclusions>
</dependency>
<dependency>
+ <groupId>commons-codec</groupId>
+ <artifactId>commons-codec</artifactId>
+ <version>1.5</version>
+ </dependency>
+ <dependency>
<groupId>com.twitter.common.zookeeper</groupId>
<artifactId>server-set</artifactId>
<version>0.0.5</version>
@@ -160,16 +165,10 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs
</exclusion>
</exclusions>
</dependency>
- <dependency>
- <groupId>commons-codec</groupId>
- <artifactId>commons-codec</artifactId>
- <version>1.5</version>
- </dependency>
<!-- project dependencies -->
<dependency>
<groupId>com.twitter</groupId>
<artifactId>finagle-core</artifactId>
- <version>3.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
View
2  finagle-stream/pom.xml
@@ -20,12 +20,10 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs
<dependency>
<groupId>com.twitter</groupId>
<artifactId>finagle-core</artifactId>
- <version>3.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.twitter</groupId>
<artifactId>finagle-kestrel</artifactId>
- <version>3.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
View
6 finagle-stress/pom.xml
@@ -31,32 +31,26 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs
<dependency>
<groupId>com.twitter</groupId>
<artifactId>finagle-core</artifactId>
- <version>3.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.twitter</groupId>
<artifactId>finagle-http</artifactId>
- <version>3.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.twitter</groupId>
<artifactId>finagle-ostrich4</artifactId>
- <version>3.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.twitter</groupId>
<artifactId>finagle-thrift</artifactId>
- <version>3.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.twitter</groupId>
<artifactId>ostrich</artifactId>
- <version>6.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.twitter</groupId>
<artifactId>util-logging</artifactId>
- <version>3.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
View
1  finagle-test/pom.xml
@@ -25,7 +25,6 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs
<dependency>
<groupId>com.twitter</groupId>
<artifactId>util-core</artifactId>
- <version>3.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
View
3  finagle-thrift/pom.xml
@@ -36,12 +36,11 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs
<dependency>
<groupId>com.twitter</groupId>
<artifactId>finagle-core</artifactId>
- <version>3.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.twitter</groupId>
<artifactId>finagle-test</artifactId>
- <version>3.0.1-SNAPSHOT</version>
+ <scope>test</scope>
</dependency>
</dependencies>
<build>
View
12 project/build/Project.scala
@@ -160,7 +160,7 @@ class Project(info: ProjectInfo) extends StandardParentProject(info)
*/
val b3Project = project(
"finagle-b3", "finagle-b3",
- new B3Project(_), coreProject, thriftProject)
+ new B3Project(_), coreProject, thriftProject, finagleTestProject)
/**
* finagle-commons-stats contains bindings for using finagle in java projects
@@ -304,7 +304,15 @@ class Project(info: ProjectInfo) extends StandardParentProject(info)
val commonsCodec = "commons-codec" % "commons-codec" % "1.5"
val commonClient = "com.twitter.common.zookeeper" % "client" % "0.0.6"
val commonGroup = "com.twitter.common.zookeeper" % "group" % "0.0.5"
- val commonServerSet = "com.twitter.common.zookeeper" % "server-set" % "0.0.5"
+
+ override def ivyXML =
+ <dependencies>
+ <dependency org="com.twitter.common.zookeeper" name="server-set" rev="0.0.5">
+ <exclude module="com.twitter" name="finagle-core"/>
+ <exclude module="com.twitter" name="finagle-thrift"/>
+ <exclude module="com.twitter" name="util-core"/>
+ </dependency>
+ </dependencies>
}
class ExampleProject(info: ProjectInfo) extends StandardProject(info)

No commit comments for this range

Something went wrong with that request. Please try again.