Skip to content

Commit

Permalink
toml file for migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
miiu96 committed Apr 30, 2024
1 parent 6ba76b3 commit d268f80
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 5 deletions.
16 changes: 16 additions & 0 deletions cmd/elasticindexer/config/migrations.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# source cluster can be the same cluster in like the one configurated in prefs.toml
[source-cluster]
url = "localhost:9200"
user = ""
password = ""

[[migrations]]
start = false
name = "split_logs_in_events"
description = """
This migration will split the logs index in a new index events.
This migration will take few days and will increase the size of the Elasticsearch cluster.
DON'T START this migration if the events index already is populated with documents.
"""
source-index = "logs"
destination-index = "events"
1 change: 1 addition & 0 deletions config/migrations.go
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package split
package logstoevents

import (
"bytes"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package split
package logstoevents

import (
"github.com/multiversx/mx-chain-es-indexer-go/migrations/dtos"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package split
package logstoevents

import (
"bytes"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package split
package logstoevents

import "fmt"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package split
package logstoevents

import (
"encoding/json"
Expand Down

0 comments on commit d268f80

Please sign in to comment.