@Test public void testExpandBufferError() throws IOException { measurement = new MockMeasurement(149, 100); Field field = new ValueField(measurement, fieldId, 121213, new HashMap<>()); try { for (double i = 100; i > 0; i--) { long v = Double.doubleToLongBits(3.1417 * i % 7); field.addDataPoint(measurement, v); } } catch (Exception e) { e.printStackTrace(); fail("No exception must be thrown"); } }
public void addDataPoint(Measurement measurement, long value) throws IOException { ValueWriter timeseriesBucket = getOrCreateValueWriter(measurement); try { timeseriesBucket.add(value); } catch (RollOverException e) { addDataPoint(measurement, value); } catch (NullPointerException e) { logger.log(Level.SEVERE, "\n\nNPE occurred for add datapoint operation\n\n", e); } }
ValueField implements Field { public void addDataPoint(Measurement measurement, long value) throws IOException { ValueWriter timeseriesBucket = getOrCreateValueWriter(measurement); try { timeseriesBucket.add(value); } catch (RollOverException e) { addDataPoint(measurement, value); } catch (NullPointerException e) { logger.log(Level.SEVERE, "\n\nNPE occurred for add datapoint operation\n\n", e); } } }
ValueField implements Field { public void addDataPoint(Measurement measurement, long value) throws IOException { ValueWriter timeseriesBucket = getOrCreateValueWriter(measurement); try { timeseriesBucket.add(value); } catch (RollOverException e) { addDataPoint(measurement, value); } catch (NullPointerException e) { logger.log(Level.SEVERE, "\n\nNPE occurred for add datapoint operation\n\n", e); } } ValueField(Measurement measurement, LinkedByteString fieldId, int tsBucket, Map<String, String> conf); }
ValueField implements Field { public void addDataPoint(Measurement measurement, long value) throws IOException { ValueWriter timeseriesBucket = getOrCreateValueWriter(measurement); try { timeseriesBucket.add(value); } catch (RollOverException e) { addDataPoint(measurement, value); } catch (NullPointerException e) { logger.log(Level.SEVERE, "\n\nNPE occurred for add datapoint operation\n\n", e); } } ValueField(Measurement measurement, LinkedByteString fieldId, int tsBucket, Map<String, String> conf); void loadBucketMap(Measurement measurement, List<BufferObject> bufferEntries); FieldReaderIterator queryReader(Predicate predicate, Lock readLock); void addDataPoint(Measurement measurement, long value); List<ValueWriter> getRawWriterList(); LinkedByteString getFieldId(); void setFieldId(LinkedByteString fieldId); @Override String toString(); void close(); @SafeVarargs final List<Writer> compact(Measurement measurement, Lock writeLock,
			Consumer<List<? extends Writer>>... functions); void replaceFirstBuckets(Measurement measurement, List<byte[]> bufList); @Override int getWriterCount(); @Override List<? extends Writer> getWriters(); }
ValueField implements Field { public void addDataPoint(Measurement measurement, long value) throws IOException { ValueWriter timeseriesBucket = getOrCreateValueWriter(measurement); try { timeseriesBucket.add(value); } catch (RollOverException e) { addDataPoint(measurement, value); } catch (NullPointerException e) { logger.log(Level.SEVERE, "\n\nNPE occurred for add datapoint operation\n\n", e); } } ValueField(Measurement measurement, LinkedByteString fieldId, int tsBucket, Map<String, String> conf); void loadBucketMap(Measurement measurement, List<BufferObject> bufferEntries); FieldReaderIterator queryReader(Predicate predicate, Lock readLock); void addDataPoint(Measurement measurement, long value); List<ValueWriter> getRawWriterList(); LinkedByteString getFieldId(); void setFieldId(LinkedByteString fieldId); @Override String toString(); void close(); @SafeVarargs final List<Writer> compact(Measurement measurement, Lock writeLock,
			Consumer<List<? extends Writer>>... functions); void replaceFirstBuckets(Measurement measurement, List<byte[]> bufList); @Override int getWriterCount(); @Override List<? extends Writer> getWriters(); static double compactionRatio; static Class<ValueWriter> compressionClass; static Class<ValueWriter> compactionClass; }