Class EsTestUtil
java.lang.Object
org.apache.storm.elasticsearch.common.EsTestUtil
ElasticSearch example utilities.
-
Method Summary
Modifier and TypeMethodDescriptionstatic EsTupleMapper
Generates a new tuple mapper.static Tuple
generateTestTuple
(String source, String index, String type, String id) Generates a test tuple.static org.elasticsearch.node.Node
Starts an ElasticSearch node.static void
waitForSeconds
(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
-