From ec24b8946620fa4b443774135feb24525562c4f6 Mon Sep 17 00:00:00 2001 From: Matus Faro Date: Tue, 2 Jan 2024 15:44:27 -0500 Subject: [PATCH] Fix batch retention not retained, Immutable structures causing trouble --- .../src/main/java/io/dataspray/store/TargetStore.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/dataspray-store/src/main/java/io/dataspray/store/TargetStore.java b/dataspray-store/src/main/java/io/dataspray/store/TargetStore.java index 9fd7cc5a..4a0bc494 100644 --- a/dataspray-store/src/main/java/io/dataspray/store/TargetStore.java +++ b/dataspray-store/src/main/java/io/dataspray/store/TargetStore.java @@ -1,5 +1,5 @@ /* - * Copyright 2023 Matus Faro + * Copyright 2024 Matus Faro * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -35,7 +35,9 @@ import lombok.NonNull; import lombok.Value; +import java.util.List; import java.util.Optional; +import java.util.Set; import static io.dataspray.singletable.TableType.Primary; import static io.dataspray.store.TargetStore.BatchRetention.THREE_MONTHS; @@ -98,7 +100,7 @@ class Targets { @NonNull @Builder.Default - ImmutableSet targets = ImmutableSet.of(); + Set targets = ImmutableSet.of(); /** * For a target with no definition, whether to ingest it with default configuration. @@ -164,7 +166,7 @@ class Target { @NonNull @SerializedName("s") @Builder.Default - ImmutableList streams = ImmutableList.of(); + List streams = ImmutableList.of(); } /** @@ -212,6 +214,7 @@ public BatchRetention getRetention() { @Getter @AllArgsConstructor + @RegisterForReflection enum BatchRetention { DAY(1), WEEK(7),