Java Code Examples for storm.trident.tuple.TridentTuple#getStringByField()

The following examples show how to use storm.trident.tuple.TridentTuple#getStringByField() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Filter.java    From storm-example with Apache License 2.0 5 votes vote down vote up
@Override
public boolean isKeep(TridentTuple tuple) {
    String tupleValue = tuple.getStringByField(fieldName);
    if (tupleValue.equals(this.value)) {
        return true;
    }
    return false;
}
 
Example 2
Source File: ESIndexUpdaterTest.java    From storm-trident-elasticsearch with Apache License 2.0 4 votes vote down vote up
@Override
public Document<Tweet> map(TridentTuple input) {
    String sentence = input.getStringByField("sentence");
    return new Document<>("my_index", "my_type", new Tweet(sentence, 0), String.valueOf(sentence.hashCode()), null);
}