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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
createIndex
(org.elasticsearch.client.RestHighLevelClient client, String name) static void
createIndex
(org.elasticsearch.client.RestHighLevelClient client, org.elasticsearch.client.indices.CreateIndexRequest createIndexRequest) static boolean
indexExists
(org.elasticsearch.client.RestHighLevelClient client, String name) mapping
(BiConsumer<StringBuilder, Map<String, Object>>... consumers) abstract void
runMigration
(org.elasticsearch.client.RestHighLevelClient restHighLevelClients, String indexPrefix) static void
updateIndex
(org.elasticsearch.client.RestHighLevelClient client, org.elasticsearch.client.indices.PutMappingRequest putMappingRequest) static void
waitForHealthyCluster
(org.elasticsearch.client.RestHighLevelClient restHighLevelClient)
-
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
-
createIndex
-
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)
-