Package tutorial.storm.trident.operations

Source Code of tutorial.storm.trident.operations.OnlyUrls

package tutorial.storm.trident.operations;

import storm.trident.operation.BaseFilter;
import storm.trident.tuple.TridentTuple;
import tutorial.storm.trident.testutil.Content;


/**
* @author Enno Shioji (enno.shioji@peerindex.com)
*/
public class OnlyUrls extends BaseFilter {

    @Override
    public boolean isKeep(TridentTuple tuple) {
        Content content = (Content) tuple.getValueByField("content");
        return "url".equals(content.getContentType());
    }
}
TOP

Related Classes of tutorial.storm.trident.operations.OnlyUrls

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.