@Test public void writeIncorrectTSRecords() throws IOException, WriteProcessException { for(int i = 2; i < 3; i++) { TSRecord record = new TSRecord(10000 + i, "d"+i); record.addTuple(new IntDataPoint("s1", 5)); try { writer.write(record); } catch (TsFileEncodingException e) { } } closeFile(); readNothing(); }
public boolean write(TSRecord record) throws IOException, WriteProcessException { checkIsTimeSeriesExist(record); groupWriters.get(record.deviceId).write(record.time, record.dataPointList); ++recordCount; return checkMemorySizeAndMayFlushChunks(); }
TsFileWriter implements AutoCloseable { public boolean write(TSRecord record) throws IOException, WriteProcessException { checkIsTimeSeriesExist(record); groupWriters.get(record.deviceId).write(record.time, record.dataPointList); ++recordCount; return checkMemorySizeAndMayFlushChunks(); } }
TsFileWriter implements AutoCloseable { public boolean write(TSRecord record) throws IOException, WriteProcessException { checkIsTimeSeriesExist(record); groupWriters.get(record.deviceId).write(record.time, record.dataPointList); ++recordCount; return checkMemorySizeAndMayFlushChunks(); } TsFileWriter(File file);  TsFileWriter(TsFileIOWriter fileWriter);  TsFileWriter(File file, Schema schema);  TsFileWriter(TsFileOutput output, Schema schema);  TsFileWriter(File file, Schema schema, TSFileConfig conf); protected  TsFileWriter(TsFileIOWriter fileWriter, Schema schema, TSFileConfig conf); }
TsFileWriter implements AutoCloseable { public boolean write(TSRecord record) throws IOException, WriteProcessException { checkIsTimeSeriesExist(record); groupWriters.get(record.deviceId).write(record.time, record.dataPointList); ++recordCount; return checkMemorySizeAndMayFlushChunks(); } TsFileWriter(File file);  TsFileWriter(TsFileIOWriter fileWriter);  TsFileWriter(File file, Schema schema);  TsFileWriter(TsFileOutput output, Schema schema);  TsFileWriter(File file, Schema schema, TSFileConfig conf); protected  TsFileWriter(TsFileIOWriter fileWriter, Schema schema, TSFileConfig conf); void registerDeviceTemplate(String templateName, Map<String, MeasurementSchema> template); void registerDevice(String deviceId, String templateName); void registerTimeseries(Path path, MeasurementSchema measurementSchema); boolean write(TSRecord record); boolean write(Tablet tablet); boolean flushAllChunkGroups(); @Override void close(); TsFileIOWriter getIOWriter(); void writeVersion(long versionPair); }
TsFileWriter implements AutoCloseable { public boolean write(TSRecord record) throws IOException, WriteProcessException { checkIsTimeSeriesExist(record); groupWriters.get(record.deviceId).write(record.time, record.dataPointList); ++recordCount; return checkMemorySizeAndMayFlushChunks(); } TsFileWriter(File file);  TsFileWriter(TsFileIOWriter fileWriter);  TsFileWriter(File file, Schema schema);  TsFileWriter(TsFileOutput output, Schema schema);  TsFileWriter(File file, Schema schema, TSFileConfig conf); protected  TsFileWriter(TsFileIOWriter fileWriter, Schema schema, TSFileConfig conf); void registerDeviceTemplate(String templateName, Map<String, MeasurementSchema> template); void registerDevice(String deviceId, String templateName); void registerTimeseries(Path path, MeasurementSchema measurementSchema); boolean write(TSRecord record); boolean write(Tablet tablet); boolean flushAllChunkGroups(); @Override void close(); TsFileIOWriter getIOWriter(); void writeVersion(long versionPair);  }