mirror of https://github.com/apache/druid.git
Merge pull request #1764 from metamx/enableLogging
Enable logging for memcached in factory
This commit is contained in:
commit
a5718ee8b7
|
@ -46,6 +46,7 @@ import net.spy.memcached.MemcachedClient;
|
|||
import net.spy.memcached.MemcachedClientIF;
|
||||
import net.spy.memcached.internal.BulkFuture;
|
||||
import net.spy.memcached.metrics.MetricCollector;
|
||||
import net.spy.memcached.metrics.MetricType;
|
||||
import net.spy.memcached.ops.LinkedOperationQueueFactory;
|
||||
import net.spy.memcached.ops.OperationQueueFactory;
|
||||
import org.apache.commons.codec.digest.DigestUtils;
|
||||
|
@ -133,6 +134,9 @@ public class MemcachedCache implements Cache
|
|||
for (Map.Entry<String, AtomicLong> entry : counters.entrySet()) {
|
||||
builder.put(entry.getKey(), entry.getValue().get());
|
||||
}
|
||||
for (Map.Entry<String, AtomicLong> entry : meters.entrySet()) {
|
||||
builder.put(entry.getKey(), entry.getValue().get());
|
||||
}
|
||||
return builder.build();
|
||||
}
|
||||
};
|
||||
|
@ -344,6 +348,7 @@ public class MemcachedCache implements Cache
|
|||
.setReadBufferSize(config.getReadBufferSize())
|
||||
.setOpQueueFactory(opQueueFactory)
|
||||
.setMetricCollector(metricCollector)
|
||||
.setEnableMetrics(MetricType.DEBUG) // Not as scary as it sounds
|
||||
.build();
|
||||
|
||||
final List<InetSocketAddress> hosts = AddrUtil.getAddresses(config.getHosts());
|
||||
|
|
Loading…
Reference in New Issue