Database Reference
In-Depth Information
*/
public Object getMemcachedValue(String key) {
if (null != client) {
try {
returnclient.get(key);
} catch (OperationTimeoutException e) {
logger.error(
"Error while fetching value from memcache server
for key " + key, e);
return null;
}
} else
return null;
}
}
Once you encode the preceding snippet, you will have built the mechanism to create the
cache client, load data into the cache, and retrieve values from it. So any Storm bolt that
needs access to the cache can use the common layer created by memcache through inter-
actions with the client.
Search WWH ::




Custom Search