Class ElasticSearchMigration

java.lang.Object
org.jobrunr.storage.nosql.elasticsearch.migrations.ElasticSearchMigration
Direct Known Subclasses:
M001_CreateJobsIndex, M002_CreateRecurringJobsIndex, M003_CreateBackgroundJobServersIndex, M004_CreateJobStatsIndex, M005_CreateMetadataIndexAndDropJobStatsIndex, M006_UpdateRecurringJobsIndex

public abstract class ElasticSearchMigration extends Object
  • Constructor Details

    • ElasticSearchMigration

      public ElasticSearchMigration()
  • Method Details

    • runMigration

      public abstract void runMigration(org.elasticsearch.client.RestHighLevelClient restHighLevelClients, String indexPrefix) throws IOException
      Throws:
      IOException
    • waitForHealthyCluster

      public static void waitForHealthyCluster(org.elasticsearch.client.RestHighLevelClient restHighLevelClient)
    • indexExists

      public static boolean indexExists(org.elasticsearch.client.RestHighLevelClient client, String name)
    • createIndex

      public static void createIndex(org.elasticsearch.client.RestHighLevelClient client, String name)
    • createIndex

      public static void createIndex(org.elasticsearch.client.RestHighLevelClient client, org.elasticsearch.client.indices.CreateIndexRequest createIndexRequest)
    • updateIndex

      public static void updateIndex(org.elasticsearch.client.RestHighLevelClient client, org.elasticsearch.client.indices.PutMappingRequest putMappingRequest)
    • mapping

      protected static Map<String,Object> mapping(BiConsumer<StringBuilder,Map<String,Object>>... consumers)