introduce index clustering (part 1)
In order to prevent files from getting too big and make it easier to implement retention policies, we are splitting all files into chunks. Each chunk contains the data for a time interval (1 month per default). This first changeset introduces the ClusteredPersistentMap that implements this for PersistentMap. It is used for a couple (not all) of indices.
This commit is contained in:
@@ -7,7 +7,7 @@ import java.time.format.DateTimeFormatter;
|
||||
import java.util.List;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.lucares.pdb.datastore.DateTimeRange;
|
||||
import org.lucares.pdb.api.DateTimeRange;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
|
||||
|
||||
@@ -24,10 +24,11 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import org.lucares.collections.LongList;
|
||||
import org.lucares.pdb.api.DateTimeRange;
|
||||
import org.lucares.pdb.api.GroupResult;
|
||||
import org.lucares.pdb.api.Query;
|
||||
import org.lucares.pdb.api.Result;
|
||||
import org.lucares.pdb.api.Tags;
|
||||
import org.lucares.pdb.datastore.DateTimeRange;
|
||||
import org.lucares.pdb.plot.api.CustomAggregator;
|
||||
import org.lucares.pdb.plot.api.Limit;
|
||||
import org.lucares.pdb.plot.api.PlotSettings;
|
||||
@@ -83,7 +84,7 @@ public class ScatterPlot {
|
||||
final OffsetDateTime dateFrom = dateRange.getStart();
|
||||
final OffsetDateTime dateTo = dateRange.getEnd();
|
||||
|
||||
final Result result = db.get(query, groupBy);
|
||||
final Result result = db.get(new Query(query, dateRange), groupBy);
|
||||
|
||||
final long start = System.nanoTime();
|
||||
final AtomicInteger idCounter = new AtomicInteger(0);
|
||||
|
||||
Reference in New Issue
Block a user