@Override
  public void flush() throws StreamingIOFailure {
    try {
      if (LOG.isDebugEnabled()) {
        logStats("Stats before flush:");
      }
      for (Map.Entry<String, List<RecordUpdater>> entry : updaters.entrySet()) {
        if (LOG.isDebugEnabled()) {
          LOG.debug("Flushing record updater for partitions: {}", entry.getKey());
        }
        for (RecordUpdater updater : entry.getValue()) {
          if (updater != null) {
            updater.flush();
          }
        }
      }
      ingestSizeBytes = 0;
      if (LOG.isDebugEnabled()) {
        logStats("Stats after flush:");
      }
    } catch (IOException e) {
      throw new StreamingIOFailure("Unable to flush recordUpdater", e);
    }
  }
Encode a record as an Object that Hive can read with the ObjectInspector associated with the
serde returned by {@link #createSerde}.  This is public so that test frameworks can use it.

@param record record to be deserialized
@return deserialized record as an Object
@throws SerializationError - any error during serialization or deserialization of record
streaming/src/java/org/apache/hive/streaming/AbstractRecordWriter.java