diff --git a/pom.xml b/pom.xml index e38caeef5e8..387b23bf8e8 100644 --- a/pom.xml +++ b/pom.xml @@ -365,9 +365,9 @@ 1.6.2 - com.google.code.simple-spring-memcached + net.spy spymemcached - 2.8.4 + 2.11.4 org.antlr diff --git a/server/pom.xml b/server/pom.xml index cf1fae66ad1..3e8e57e1f46 100644 --- a/server/pom.xml +++ b/server/pom.xml @@ -127,7 +127,7 @@ antlr4-runtime - com.google.code.simple-spring-memcached + net.spy spymemcached diff --git a/server/src/test/java/io/druid/client/cache/MemcachedCacheTest.java b/server/src/test/java/io/druid/client/cache/MemcachedCacheTest.java index d55127288c3..dc701aec6f4 100644 --- a/server/src/test/java/io/druid/client/cache/MemcachedCacheTest.java +++ b/server/src/test/java/io/druid/client/cache/MemcachedCacheTest.java @@ -22,13 +22,17 @@ package io.druid.client.cache; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.primitives.Ints; +import net.spy.memcached.BroadcastOpFactory; import net.spy.memcached.CASResponse; import net.spy.memcached.CASValue; import net.spy.memcached.CachedData; import net.spy.memcached.ConnectionObserver; import net.spy.memcached.MemcachedClientIF; +import net.spy.memcached.MemcachedNode; import net.spy.memcached.NodeLocator; import net.spy.memcached.internal.BulkFuture; +import net.spy.memcached.internal.BulkGetCompletionListener; +import net.spy.memcached.internal.OperationFuture; import net.spy.memcached.ops.OperationStatus; import net.spy.memcached.transcoders.SerializingTranscoder; import net.spy.memcached.transcoders.Transcoder; @@ -43,6 +47,7 @@ import java.util.Map; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; +import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; @@ -184,24 +189,52 @@ class MockMemcachedClient implements MemcachedClientIF throw new UnsupportedOperationException("not implemented"); } + @Override + public Future append(String s, Object o) + { + return null; + } + @Override public Future append(long cas, String key, T val, Transcoder tc) { throw new UnsupportedOperationException("not implemented"); } + @Override + public Future append( + String s, T t, Transcoder tTranscoder + ) + { + return null; + } + @Override public Future prepend(long cas, String key, Object val) { throw new UnsupportedOperationException("not implemented"); } + @Override + public Future prepend(String s, Object o) + { + return null; + } + @Override public Future prepend(long cas, String key, T val, Transcoder tc) { throw new UnsupportedOperationException("not implemented"); } + @Override + public Future prepend( + String s, T t, Transcoder tTranscoder + ) + { + return null; + } + @Override public Future asyncCAS(String key, long casId, T value, Transcoder tc) { @@ -214,6 +247,22 @@ class MockMemcachedClient implements MemcachedClientIF throw new UnsupportedOperationException("not implemented"); } + @Override + public Future asyncCAS( + String s, long l, int i, Object o + ) + { + return null; + } + + @Override + public OperationFuture asyncCAS( + String s, long l, int i, T t, Transcoder tTranscoder + ) + { + return null; + } + @Override public CASResponse cas(String key, long casId, int exp, T value, Transcoder tc) { @@ -226,6 +275,20 @@ class MockMemcachedClient implements MemcachedClientIF throw new UnsupportedOperationException("not implemented"); } + @Override + public CASResponse cas(String s, long l, int i, Object o) + { + return null; + } + + @Override + public CASResponse cas( + String s, long l, T t, Transcoder tTranscoder + ) + { + return null; + } + @Override public Future add(String key, int exp, T o, Transcoder tc) { @@ -437,6 +500,18 @@ class MockMemcachedClient implements MemcachedClientIF return null; } + @Override + public Future> addListener(BulkGetCompletionListener bulkGetCompletionListener) + { + return null; + } + + @Override + public Future> removeListener(BulkGetCompletionListener bulkGetCompletionListener) + { + return null; + } + @Override public boolean cancel(boolean b) { @@ -622,6 +697,30 @@ class MockMemcachedClient implements MemcachedClientIF throw new UnsupportedOperationException("not implemented"); } + @Override + public Future asyncIncr(String s, long l, long l2, int i) + { + return null; + } + + @Override + public Future asyncIncr(String s, int i, long l, int i2) + { + return null; + } + + @Override + public Future asyncDecr(String s, long l, long l2, int i) + { + return null; + } + + @Override + public Future asyncDecr(String s, int i, long l, int i2) + { + return null; + } + @Override public Future asyncIncr(String key, long by) { @@ -670,12 +769,42 @@ class MockMemcachedClient implements MemcachedClientIF throw new UnsupportedOperationException("not implemented"); } + @Override + public Future asyncIncr(String s, long l, long l2) + { + return null; + } + + @Override + public Future asyncIncr(String s, int i, long l) + { + return null; + } + + @Override + public Future asyncDecr(String s, long l, long l2) + { + return null; + } + + @Override + public Future asyncDecr(String s, int i, long l) + { + return null; + } + @Override public Future delete(String key) { throw new UnsupportedOperationException("not implemented"); } + @Override + public Future delete(String s, long l) + { + return null; + } + @Override public Future flush(int delay) { @@ -718,6 +847,20 @@ class MockMemcachedClient implements MemcachedClientIF throw new UnsupportedOperationException("not implemented"); } + @Override + public CountDownLatch broadcastOp(BroadcastOpFactory broadcastOpFactory) + { + return null; + } + + @Override + public CountDownLatch broadcastOp( + BroadcastOpFactory broadcastOpFactory, Collection memcachedNodes + ) + { + return null; + } + @Override public Set listSaslMechanisms() {