use of com.questdb.net.ha.model.JournalServerState in project questdb by bluestreak01.
the class JournalDeltaConsumer method createPartitions.
private void createPartitions(JournalServerState metadata) throws JournalException {
int pc = journal.nonLagPartitionCount() - 1;
for (int i = 0, k = metadata.getNonLagPartitionCount(); i < k; i++) {
JournalServerState.PartitionMetadata partitionMetadata = metadata.getMeta(i);
if (partitionMetadata.getPartitionIndex() > pc) {
Interval interval = new Interval(partitionMetadata.getIntervalEnd(), partitionMetadata.getIntervalStart());
journal.createPartition(interval, partitionMetadata.getPartitionIndex());
}
}
}
Aggregations