Skip to content
This repository has been archived by the owner on Mar 27, 2021. It is now read-only.

Commit

Permalink
include mapping for metadata index interval (#743)
Browse files Browse the repository at this point in the history
* include mapping for metadata index interval

* formatting
  • Loading branch information
adsail authored Jan 14, 2021
1 parent 1b45699 commit e18fc9f
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,14 @@

public class ElasticsearchMetadataProfile extends HeroicProfileBase {
private static final Splitter splitter = Splitter.on(',').trimResults();

@Override
public HeroicConfig.Builder build(final ExtraParameters params) {
final RotatingIndexMapping.Builder index = RotatingIndexMapping.builder();

params.get("pattern").map(index::pattern);
params.get("pattern")
.map(index::pattern);
params.getDuration("interval")
.map(index::interval);

final ConnectionModule.Builder connection = ConnectionModule.builder().index(index.build());

Expand Down Expand Up @@ -81,6 +83,9 @@ public String description() {
public List<ParameterSpecification> options() {
// @formatter:off
return ImmutableList.of(
parameter("interval",
"Rotating index interval duration (examples: 7d, 24h)",
"<Duration>"),
parameter("pattern", "Index pattern to use (example: heroic-%s)",
"<pattern>"),
parameter("clusterName", "Cluster name to connect to", "<string>"),
Expand Down

0 comments on commit e18fc9f

Please sign in to comment.