Package tutorial.storm.trident.operations

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

package tutorial.storm.trident.operations;

import backtype.storm.tuple.Values;
import storm.trident.operation.BaseFunction;
import storm.trident.operation.TridentCollector;
import storm.trident.tuple.TridentTuple;
import tutorial.storm.trident.testutil.Content;

/**
* @author Davide Palmisano (davide.palmisano@peerindex.com)
*/
public class GetContentName extends BaseFunction {

    @Override
    public void execute(TridentTuple objects, TridentCollector tridentCollector) {
        Content content = (Content) objects.getValueByField("content");
        tridentCollector.emit(new Values(content.getContentName()));
    }
}
TOP

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

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.