public class MongoInsertBolt extends AbstractMongoBolt
Basic bolt for writing to MongoDB.
Note: Each MongoInsertBolt defined in a topology is tied to a specific collection.
collector, mongoClient| Constructor and Description |
|---|
MongoInsertBolt(String url,
String collectionName,
MongoMapper mapper) |
| Modifier and Type | Method and Description |
|---|---|
void |
declareOutputFields(OutputFieldsDeclarer declarer) |
void |
execute(Tuple tuple) |
Map<String,Object> |
getComponentConfiguration() |
void |
prepare(Map stormConf,
TopologyContext context,
OutputCollector collector) |
MongoInsertBolt |
withBatchSize(int batchSize) |
MongoInsertBolt |
withFlushIntervalSecs(int flushIntervalSecs) |
MongoInsertBolt |
withOrdered(boolean ordered) |
cleanuppublic MongoInsertBolt(String url, String collectionName, MongoMapper mapper)
public void execute(Tuple tuple)
public MongoInsertBolt withBatchSize(int batchSize)
public MongoInsertBolt withOrdered(boolean ordered)
public MongoInsertBolt withFlushIntervalSecs(int flushIntervalSecs)
public Map<String,Object> getComponentConfiguration()
getComponentConfiguration in interface IComponentgetComponentConfiguration in class BaseComponentpublic void prepare(Map stormConf, TopologyContext context, OutputCollector collector)
prepare in interface IBoltprepare in class AbstractMongoBoltpublic void declareOutputFields(OutputFieldsDeclarer declarer)
Copyright © 2018 The Apache Software Foundation. All Rights Reserved.