Search in sources :

Example 16 with StateFactory

use of org.apache.storm.trident.state.StateFactory in project storm by apache.

the class MapStateTest method opaqueStateTest.

@Test
public void opaqueStateTest() throws Exception {
    Map<String, Object> config = new HashMap();
    StateFactory factory = MapStateFactoryBuilder.opaque(getCassandraConfig()).withTable("words_ks", "words_table").withKeys("word").withJSONBinaryState("state").build();
    wordsTest(factory);
}
Also used : StateFactory(org.apache.storm.trident.state.StateFactory) HashMap(java.util.HashMap) Test(org.junit.Test)

Aggregations

StateFactory (org.apache.storm.trident.state.StateFactory)16 Fields (org.apache.storm.tuple.Fields)13 Stream (org.apache.storm.trident.Stream)12 TridentTopology (org.apache.storm.trident.TridentTopology)12 TridentState (org.apache.storm.trident.TridentState)9 Values (org.apache.storm.tuple.Values)8 FixedBatchSpout (org.apache.storm.trident.testing.FixedBatchSpout)6 MapGet (org.apache.storm.trident.operation.builtin.MapGet)3 Sum (org.apache.storm.trident.operation.builtin.Sum)3 Test (org.junit.Test)3 FileInputStream (java.io.FileInputStream)2 InputStream (java.io.InputStream)2 HashMap (java.util.HashMap)2 DefaultFileNameFormat (org.apache.storm.hdfs.trident.format.DefaultFileNameFormat)2 FileNameFormat (org.apache.storm.hdfs.trident.format.FileNameFormat)2 FileRotationPolicy (org.apache.storm.hdfs.trident.rotation.FileRotationPolicy)2 FileSizeRotationPolicy (org.apache.storm.hdfs.trident.rotation.FileSizeRotationPolicy)2 MongoMapper (org.apache.storm.mongodb.common.mapper.MongoMapper)2 SimpleMongoMapper (org.apache.storm.mongodb.common.mapper.SimpleMongoMapper)2 RedisDataTypeDescription (org.apache.storm.redis.common.mapper.RedisDataTypeDescription)2