public class HBaseBolt extends AbstractHBaseBolt
Basic bolt for writing to HBase.
Note: Each HBaseBolt defined in a topology is tied to a specific table.
collector, configKey, hBaseClient, mapper, tableName
Constructor and Description |
---|
HBaseBolt(String tableName,
HBaseMapper mapper) |
Modifier and Type | Method and Description |
---|---|
void |
declareOutputFields(OutputFieldsDeclarer outputFieldsDeclarer) |
void |
execute(Tuple tuple) |
Map<String,Object> |
getComponentConfiguration() |
void |
prepare(Map map,
TopologyContext topologyContext,
OutputCollector collector) |
HBaseBolt |
withBatchSize(int batchSize) |
HBaseBolt |
withConfigKey(String configKey) |
HBaseBolt |
withFlushIntervalSecs(int flushIntervalSecs) |
HBaseBolt |
writeToWAL(boolean writeToWAL) |
cleanup
public HBaseBolt(String tableName, HBaseMapper mapper)
public HBaseBolt writeToWAL(boolean writeToWAL)
public HBaseBolt withBatchSize(int batchSize)
public HBaseBolt withFlushIntervalSecs(int flushIntervalSecs)
public Map<String,Object> getComponentConfiguration()
getComponentConfiguration
in interface IComponent
getComponentConfiguration
in class BaseComponent
public void execute(Tuple tuple)
public void prepare(Map map, TopologyContext topologyContext, OutputCollector collector)
prepare
in interface IBolt
prepare
in class AbstractHBaseBolt
public void declareOutputFields(OutputFieldsDeclarer outputFieldsDeclarer)
Copyright © 2016 The Apache Software Foundation. All Rights Reserved.