public void ensureValPreallocated(int length) {
    if ((sharedBufferOffset + length) > sharedBuffer.length) {
      // sets currentValue and currentOffset
      allocateBuffer(length);
    } else {
      currentValue = sharedBuffer;
      currentOffset = sharedBufferOffset;
    }
  }
Ensures that we have space allocated for the next value, which has size
length bytes.

Updates currentValue and currentOffset for this value.

Always use before getValPreallocatedBytes, getValPreallocatedStart.
setValPreallocated must be called to actually reserve the bytes.
storage-api/src/java/org/apache/hadoop/hive/ql/exec/vector/BytesColumnVector.java