public abstract class AbstractStatusUpdaterBolt
extends org.apache.storm.topology.base.BaseRichBolt
Modifier and Type | Field and Description |
---|---|
protected org.apache.storm.task.OutputCollector |
_collector |
static String |
cacheConfigParamName
Parameter name to configure the cache @see
http://docs.guava-libraries.googlecode
.com/git/javadoc/com/google/common/cache/CacheBuilderSpec.html Default
value is "maximumSize=10000,expireAfterAccess=1h"
|
static String |
maxFetchErrorsParamName
Number of successive FETCH_ERROR before status changes to ERROR
|
static String |
roundDateParamName
Used for rounding nextFetchDates.
|
static String |
useCacheParamName
Parameter name to indicate whether the internal cache should be used for
discovered URLs.
|
Constructor and Description |
---|
AbstractStatusUpdaterBolt() |
Modifier and Type | Method and Description |
---|---|
protected void |
ack(org.apache.storm.tuple.Tuple t,
String url)
Must be overridden for implementations where the actual writing can be
delayed e.g.
|
void |
declareOutputFields(org.apache.storm.topology.OutputFieldsDeclarer declarer) |
void |
execute(org.apache.storm.tuple.Tuple tuple) |
void |
prepare(Map stormConf,
org.apache.storm.task.TopologyContext context,
org.apache.storm.task.OutputCollector collector) |
protected abstract void |
store(String url,
Status status,
Metadata metadata,
Date nextFetch) |
public static String useCacheParamName
public static String maxFetchErrorsParamName
public static String cacheConfigParamName
public static String roundDateParamName
protected org.apache.storm.task.OutputCollector _collector
public void prepare(Map stormConf, org.apache.storm.task.TopologyContext context, org.apache.storm.task.OutputCollector collector)
public void execute(org.apache.storm.tuple.Tuple tuple)
protected void ack(org.apache.storm.tuple.Tuple t, String url)
protected abstract void store(String url, Status status, Metadata metadata, Date nextFetch) throws Exception
Exception
public void declareOutputFields(org.apache.storm.topology.OutputFieldsDeclarer declarer)
Copyright © 2019 DigitalPebble Ltd. All rights reserved.