com.hmsonline.storm.cassandra.bolt.mapper.TupleMapper Maven / Gradle / Ivy
package com.hmsonline.storm.cassandra.bolt.mapper;
import java.io.Serializable;
import java.util.Map;
import backtype.storm.tuple.Tuple;
public interface TupleMapper extends Serializable {
/**
* Given a backtype.storm.tuple.Tuple
object, map the column
* family to write to.
*
* @param tuple
* @return
*/
String mapToColumnFamily(Tuple tuple);
/**
* Given a backtype.storm.tuple.Tuple
object, map the keyspace to write to.
*
* @param tuple
* @return
*/
String mapToKeyspace(Tuple tuple);
/**
* Given a backtype.storm.tuple.Tuple
generate a Cassandra row
* key.
*
* @param tuple
* @return
*/
K mapToRowKey(Tuple tuple);
/**
* Given a backtype.storm.tuple.Tuple
object, map the columns
* of data to write.
*
* @param tuple
* @return
*/
Map mapToColumns(Tuple tuple);
/**
* Returns the row key class
*
* @return
*/
Class getKeyClass();
/**
* Returns the column name class
*
* @return
*/
Class getColumnNameClass();
/**
* Returns the column value class
*
* @return
*/
Class getColumnValueClass();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy