Class EsTestUtil
java.lang.Object
org.apache.storm.elasticsearch.common.EsTestUtil
ElasticSearch example utilities.
-
Method Summary
Modifier and TypeMethodDescriptionstatic EsTupleMapperGenerates a new tuple mapper.static TuplegenerateTestTuple(String source, String index, String type, String id) Generates a test tuple.static org.elasticsearch.node.NodeStarts an ElasticSearch node.static voidwaitForSeconds(int seconds) Waits for specified seconds and ignoresInterruptedException.
-
Method Details
-
generateTestTuple
Generates a test tuple.- Parameters:
source- the source of the tupleindex- the index of the tupletype- the type of the tupleid- the id of the tuple- Returns:
- the generated tuple
-
generateDefaultTupleMapper
Generates a new tuple mapper.- Returns:
- the generated mapper
-
startEsNode
public static org.elasticsearch.node.Node startEsNode()Starts an ElasticSearch node.- Returns:
- the started node.
-
waitForSeconds
public static void waitForSeconds(int seconds) Waits for specified seconds and ignoresInterruptedException.- Parameters:
seconds- the seconds to wait
-