public class SimpleMongoLookupMapper extends Object implements MongoLookupMapper
Constructor and Description |
---|
SimpleMongoLookupMapper(String... fields) |
Modifier and Type | Method and Description |
---|---|
void |
declareOutputFields(OutputFieldsDeclarer declarer)
declare what are the fields that this code will output.
|
List<Values> |
toTuple(ITuple input,
org.bson.Document doc)
Converts a Mongo document to a list of storm values that can be emitted.
|
SimpleMongoLookupMapper |
withFields(String... fields) |
public SimpleMongoLookupMapper(String... fields)
public List<Values> toTuple(ITuple input, org.bson.Document doc)
MongoLookupMapper
Converts a Mongo document to a list of storm values that can be emitted. This is done to allow a single storm input tuple and a single Mongo document to result in multiple output values.
toTuple
in interface MongoLookupMapper
input
- the input tuple.doc
- the mongo documentpublic void declareOutputFields(OutputFieldsDeclarer declarer)
MongoLookupMapper
declare what are the fields that this code will output.
declareOutputFields
in interface MongoLookupMapper
declarer
- OutputFieldsDeclarerpublic SimpleMongoLookupMapper withFields(String... fields)
Copyright © 2019 The Apache Software Foundation. All rights reserved.