提交 05f3f7d4 编写于 作者: N nishantmonu51

review comments - remove instance of check

上级 af470223
......@@ -39,6 +39,8 @@ public interface Cache
public CacheStats getStats();
public boolean isLocal();
public class NamedKey
{
final public String namespace;
......
......@@ -149,4 +149,8 @@ public class MapCache implements Cache
retVal.rewind();
return retVal;
}
public boolean isLocal() {
return true;
}
}
......@@ -278,4 +278,8 @@ public class MemcachedCache implements Cache
// hash keys to keep things under 250 characters for memcached
return memcachedPrefix + ":" + DigestUtils.sha1Hex(key.namespace) + ":" + DigestUtils.sha1Hex(key.key);
}
public boolean isLocal() {
return false;
}
}
......@@ -96,16 +96,18 @@ public class CachePopulatingQueryRunnerTest
return super.toYielder(
initValue,
accumulator
); //To change body of overridden methods use File | Settings | File Templates.
);
}
};
Cache cache = EasyMock.createMock(Cache.class);
// cache populater ignores populating for local cache, so a dummy cache
EasyMock.expect(cache.isLocal()).andReturn(false);
CachePopulatingQueryRunner runner = new CachePopulatingQueryRunner(
"segment",
new SegmentDescriptor(new Interval("2011/2012"), "version", 0),
new DefaultObjectMapper(),
// cache populater ignores populating for local cache, so a dummy cache
EasyMock.createMock(Cache.class),
cache,
new TopNQueryQueryToolChest(new TopNQueryConfig()),
new QueryRunner()
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册