Skip to content

Commit

Permalink
Fix batch retention not retained, Immutable structures causing trouble
Browse files Browse the repository at this point in the history
  • Loading branch information
matusfaro committed Jan 2, 2024
1 parent 66efd6c commit ec24b89
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -98,7 +100,7 @@ class Targets {

@NonNull
@Builder.Default
ImmutableSet<Target> targets = ImmutableSet.of();
Set<Target> targets = ImmutableSet.of();

/**
* For a target with no definition, whether to ingest it with default configuration.
Expand Down Expand Up @@ -164,7 +166,7 @@ class Target {
@NonNull
@SerializedName("s")
@Builder.Default
ImmutableList<Stream> streams = ImmutableList.of();
List<Stream> streams = ImmutableList.of();
}

/**
Expand Down Expand Up @@ -212,6 +214,7 @@ public BatchRetention getRetention() {

@Getter
@AllArgsConstructor
@RegisterForReflection
enum BatchRetention {
DAY(1),
WEEK(7),
Expand Down

0 comments on commit ec24b89

Please sign in to comment.