private void ensureCapacity ( final byte [ ] next_qualifier , final byte [ ] next_value ) { if ( qualifier_index + next_qualifier . length >= batched_qualifier . length ) { batched_qualifier = Arrays . copyOf ( batched_qualifier , batched_qualifier . length * 2 ) ; } if ( value_index + next_value . length >= batched_value . length ) { batched_value = Arrays . copyOf ( batched_value , batched_value . length * 2 ) ; } }
Checks the size of the qualifier and value arrays to make sure we have space . If not then we double the size of the arrays . This way a row allocates space for a full hour of second data but if the user requires millisecond storage with more than 3600 points it will expand .