Class EsTestUtil

java.lang.Object
org.apache.storm.elasticsearch.common.EsTestUtil

public final class EsTestUtil extends Object
ElasticSearch example utilities.
  • Method Details

    • generateTestTuple

      public static Tuple generateTestTuple(String source, String index, String type, String id)
      Generates a test tuple.
      Parameters:
      source - the source of the tuple
      index - the index of the tuple
      type - the type of the tuple
      id - the id of the tuple
      Returns:
      the generated tuple
    • generateDefaultTupleMapper

      public static EsTupleMapper 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 ignores InterruptedException.
      Parameters:
      seconds - the seconds to wait