@Test public void testInsert() { support.clear(); assertEquals(true, support.isEmptyOfMemTable()); OverflowTestUtils.produceInsertData(support); assertEquals(false, support.isEmptyOfMemTable()); int num = 1; for (TimeValuePair pair : support .queryOverflowInsertInMemory(deviceId1, measurementId1, dataType1) .getSortedTimeValuePairList()) { assertEquals(num, pair.getTimestamp()); assertEquals(num, pair.getValue().getInt()); num++; } num = 1; for (TimeValuePair pair : support .queryOverflowInsertInMemory(deviceId2, measurementId2, dataType2) .getSortedTimeValuePairList()) { assertEquals(num, pair.getTimestamp()); if (num == 2) { assertEquals(10.5, pair.getValue().getFloat(), error); } else { assertEquals(5.5, pair.getValue().getFloat(), error); } num++; } }
public void insert(TSRecord tsRecord) { for (DataPoint dataPoint : tsRecord.dataPointList) { memTable.write(tsRecord.deviceId, dataPoint.getMeasurementId(), dataPoint.getType(), tsRecord.time, dataPoint.getValue().toString()); } }
OverflowSupport { public void insert(TSRecord tsRecord) { for (DataPoint dataPoint : tsRecord.dataPointList) { memTable.write(tsRecord.deviceId, dataPoint.getMeasurementId(), dataPoint.getType(), tsRecord.time, dataPoint.getValue().toString()); } } }
OverflowSupport { public void insert(TSRecord tsRecord) { for (DataPoint dataPoint : tsRecord.dataPointList) { memTable.write(tsRecord.deviceId, dataPoint.getMeasurementId(), dataPoint.getType(), tsRecord.time, dataPoint.getValue().toString()); } } OverflowSupport(); }
OverflowSupport { public void insert(TSRecord tsRecord) { for (DataPoint dataPoint : tsRecord.dataPointList) { memTable.write(tsRecord.deviceId, dataPoint.getMeasurementId(), dataPoint.getType(), tsRecord.time, dataPoint.getValue().toString()); } } OverflowSupport(); void insert(TSRecord tsRecord); @Deprecated void update(String deviceId, String measurementId, long startTime, long endTime,
      TSDataType dataType,
      byte[] value); @Deprecated void delete(String deviceId, String measurementId, long timestamp, TSDataType dataType); TimeValuePairSorter queryOverflowInsertInMemory(String deviceId, String measurementId,
      TSDataType dataType); BatchData queryOverflowUpdateInMemory(String deviceId, String measurementId,
      TSDataType dataType,
      BatchData data); boolean isEmptyOfOverflowSeriesMap(); Map<String, Map<String, OverflowSeriesImpl>> getOverflowSeriesMap(); boolean isEmptyOfMemTable(); IMemTable getMemTabale(); long getSize(); void clear(); }
OverflowSupport { public void insert(TSRecord tsRecord) { for (DataPoint dataPoint : tsRecord.dataPointList) { memTable.write(tsRecord.deviceId, dataPoint.getMeasurementId(), dataPoint.getType(), tsRecord.time, dataPoint.getValue().toString()); } } OverflowSupport(); void insert(TSRecord tsRecord); @Deprecated void update(String deviceId, String measurementId, long startTime, long endTime,
      TSDataType dataType,
      byte[] value); @Deprecated void delete(String deviceId, String measurementId, long timestamp, TSDataType dataType); TimeValuePairSorter queryOverflowInsertInMemory(String deviceId, String measurementId,
      TSDataType dataType); BatchData queryOverflowUpdateInMemory(String deviceId, String measurementId,
      TSDataType dataType,
      BatchData data); boolean isEmptyOfOverflowSeriesMap(); Map<String, Map<String, OverflowSeriesImpl>> getOverflowSeriesMap(); boolean isEmptyOfMemTable(); IMemTable getMemTabale(); long getSize(); void clear();  }