Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -632,49 +632,6 @@ public void testWriteAndRestoreMetadata()
// we need to close the tsfile writer first and then reopen it.
}

@Test
public void testMultiFlush()
throws IOException, WriteProcessException, MetadataException, ExecutionException {
processor =
new TsFileProcessor(
storageGroup,
SystemFileFactory.INSTANCE.getFile(filePath),
sgInfo,
this::closeTsFileProcessor,
(tsFileProcessor, updateMap, systemFlushTime) -> {},
true);

TsFileProcessorInfo tsFileProcessorInfo = new TsFileProcessorInfo(sgInfo);
processor.setTsFileProcessorInfo(tsFileProcessorInfo);
this.sgInfo.initTsFileProcessorInfo(processor);
SystemInfo.getInstance().reportStorageGroupStatus(sgInfo, processor);
List<TsFileResource> tsfileResourcesForQuery = new ArrayList<>();
MeasurementPath fullPath =
new MeasurementPath(
deviceId,
measurementId,
new MeasurementSchema(
measurementId, dataType, encoding, CompressionType.UNCOMPRESSED, props));
processor.query(Collections.singletonList(fullPath), context, tsfileResourcesForQuery, null);
assertTrue(tsfileResourcesForQuery.isEmpty());

for (int flushId = 0; flushId < 10; flushId++) {
for (int i = 1; i <= 10; i++) {
TSRecord record = new TSRecord(i, deviceId);
record.addTuple(DataPoint.getDataPoint(dataType, measurementId, String.valueOf(i)));
processor.insert(buildInsertRowNodeByTSRecord(record), new long[4]);
}
processor.asyncFlush();
}
processor.syncFlush();

tsfileResourcesForQuery.clear();
processor.query(Collections.singletonList(fullPath), context, tsfileResourcesForQuery, null);
assertFalse(tsfileResourcesForQuery.isEmpty());
assertTrue(tsfileResourcesForQuery.get(0).getReadOnlyMemChunk(fullPath).isEmpty());
processor.syncClose();
}

@Test
public void alignedTvListRamCostTest()
throws MetadataException, WriteProcessException, IOException {
Expand Down
Loading