Search in sources :

Example 11 with Querier

use of com.yahoo.bullet.querying.Querier in project bullet-storm by yahoo.

the class FilterBolt method onQuery.

private void onQuery(Tuple tuple) {
    String id = tuple.getString(TopologyConstants.ID_POSITION);
    String query = tuple.getString(TopologyConstants.QUERY_POSITION);
    try {
        Querier querier = createQuerier(Querier.Mode.PARTITION, id, query, config);
        if (!querier.initialize().isPresent()) {
            setupQuery(id, query, null, querier);
            return;
        }
    } catch (RuntimeException ignored) {
    }
    // No need to handle any errors in the Filter Bolt.
    log.error("Failed to initialize query for request {} with query {}", id, query);
}
Also used : Querier(com.yahoo.bullet.querying.Querier)

Aggregations

Querier (com.yahoo.bullet.querying.Querier)11 Metadata (com.yahoo.bullet.pubsub.Metadata)3 CustomCollector (com.yahoo.bullet.storm.testing.CustomCollector)3 TupleUtils.makeIDTuple (com.yahoo.bullet.storm.testing.TupleUtils.makeIDTuple)3 Tuple (org.apache.storm.tuple.Tuple)3 Test (org.testng.annotations.Test)3 RateLimitError (com.yahoo.bullet.querying.RateLimitError)1 List (java.util.List)1