All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.hmsonline.storm.elasticsearch.mapper.TridentElasticSearchMapper Maven / Gradle / Ivy

The newest version!
/**
 * 
 */
package com.hmsonline.storm.elasticsearch.mapper;

import java.io.Serializable;
import java.util.Map;

import org.elasticsearch.common.settings.Settings;

import storm.trident.tuple.TridentTuple;

/**
 * @author irieksts
 * 
 */
public interface TridentElasticSearchMapper extends Serializable {
    /**
     * Given a backtype.storm.tuple.Tuple object, map to the index
     * name.
     * 
     * @param tuple
     * @return
     */
    public String mapToIndex(TridentTuple tuple);

    /**
     * Given a backtype.storm.tuple.Tuple object, map to the index
     * type.
     * 
     * @param tuple
     * @return
     */
    public String mapToType(TridentTuple tuple);

    /**
     * Given a backtype.storm.tuple.Tuple object, map to the index
     * key.
     * 
     * @param tuple
     * @return
     */
    public String mapToKey(TridentTuple tuple);

    /**
     * Given a backtype.storm.tuple.Tuple object, map to the parent
     * ID. If null or blank will ignore.
     * 
     * @param tuple
     * @return
     */
    public String mapToParentId(TridentTuple tuple);

    /**
     * Given a backtype.storm.tuple.Tuple object, map to the index
     * data.
     * 
     * @param tuple
     * @return
     */
    public Map mapToData(TridentTuple tuple);

    public Settings mapToIndexSettings(TridentTuple tuple);

    @SuppressWarnings("rawtypes")
    public Map mapToMappingSettings(TridentTuple tuple);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy