public int lengthFor(JavaDataModel model) {
    int length = model.object();
    length += model.primitive1() * 2;       // two int
    int numBins = getNumBins();
    if (numBins > 0) {
      length += model.arrayList();   // List<Coord>
      // Coord holds two doubles
      length += numBins * (model.object() + model.primitive2() * 2);
    }
    length += model.lengthForRandom();      // Random
    return length;
  }
In preparation for a Hive merge() call, serializes the current histogram object into an
ArrayList of DoubleWritable objects. This list is deserialized and merged by the
merge method.

@return An ArrayList of Hadoop DoubleWritable objects that represents the current
histogram.
@see #merge
ql/src/java/org/apache/hadoop/hive/ql/udf/generic/NumericHistogram.java