Configured cache is not local, caching will not be enabled error from middle manager

I’ve been getting this caching error lately on my middle manager node. I’m not sure what it meant and how to fix it.

2016-07-05T23:50:08,642 ERROR [task-runner-0-priority-0] io.druid.segment.realtime.plumber.RealtimePlumber - Configured cache is not local, caching will not be enabled

Here’s my property file

druid.cache.type=memcached
druid.cache.expiration=2592000
druid.cache.timeout=500
druid.cache.hosts=<MEMCACHE_ON_AWS>:11211
druid.cache.maxObjectSize=52428800
druid.cache.memcachedPrefix=druid

Node Configs

druid.host=IP_ADDRESS
druid.port=8080
druid.service=druid/middlemanager

Task Logging

druid.indexer.logs.type=file

MiddleManager Service

druid.indexer.runner.allowedPrefixes=[“com.metamx”,“druid”,“io.druid”,“user.timezone”,“file.encoding”]
druid.indexer.runner.compressZnodes=true
druid.indexer.runner.javaCommand=java
druid.indexer.runner.javaOpts=-server -Xmx8G -XX:+UseG1GC -XX:MaxGCPauseMillis=100 -XX:+PrintGCDetails -XX:+PrintGCTimeStamps
druid.indexer.runner.maxZnodeBytes=524288
druid.indexer.runner.startPort=8100
druid.worker.ip=localhost
druid.worker.version=0

Peon Configs

druid.indexer.fork.property.druid.monitoring.monitors=[“com.metamx.metrics.JvmMonitor”]
druid.indexer.fork.property.druid.segmentCache.locations=[{“path”: “/mnt/persistent/zk_druid”, “maxSize”: 0}]
druid.indexer.fork.property.druid.processing.numThreads=2
druid.indexer.fork.property.druid.server.http.numThreads=50
druid.indexer.fork.property.druid.storage.archiveBaseKey=druid-archive
druid.indexer.fork.property.druid.storage.archiveBucket=cn-bucket
druid.indexer.fork.property.druid.storage.baseKey=prod/v1
druid.indexer.fork.property.druid.storage.bucket=cn-bucket
druid.indexer.fork.property.druid.storage.type=s3
druid.peon.mode=remote
druid.indexer.task.baseDir=/tmp
druid.indexer.task.baseTaskDir=/tmp/persistent/tasks
druid.indexer.task.hadoopWorkingPath=/tmp/druid-indexing
druid.indexer.task.defaultRowFlushBoundary=50000
druid.indexer.task.defaultHadoopCoordinates=[“org.apache.hadoop:hadoop-client:2.3.0”]
druid.indexer.task.chathandler.type=announce

Remote Peon Configs

druid.peon.taskActionClient.retry.minWait=PT1M
druid.peon.taskActionClient.retry.maxWait=PT10M
druid.peon.taskActionClient.retry.maxRetryCount=10

``

According to this, https://github.com/metamx/druid/blob/d7eb2f717efb6579499fd2021e4cf0831fcf2784/server/src/main/java/io/druid/segment/realtime/plumber/RealtimePlumber.java#L180 Does it mean that it will only work if memcache is installed locally?

Thanks.

I’m using Druid 0.9.0

Caches for realtime indexers cannot be shared across tasks, because the cache key (segment + persist number) is only unique within a single task. So if you want to use caching on your realtime tasks, you should use a local cache (druid.cache.type=local) rather than memcached.

Just to be clear, from this documentation http://druid.io/docs/latest/configuration/caching.html. I just need to change it to be ‘local’ and that would be in memory instead of installing memcached locally? And I just have to increase the heap size to be the size I want. In this case, it would be the heap size of the middle manager or the peon?

Thanks for the fast reply.

Yep that’s all you have to do. It would use the heap of the peon.