Interface CloseableIteratorWithMetadata<T>

  • All Superinterfaces:
    AutoCloseable, Closeable, CloseableIterator<T>, Iterator<T>

    public interface CloseableIteratorWithMetadata<T>
    extends CloseableIterator<T>
    Like CloseableIterator, but has a currentMetadata() method, which returns "metadata", which is effectively a Map about the source of last value returned by next() The returned metadata is read-only and cannot be modified. This metadata can be used as additional information to pin-point the root cause of a parse exception. So it can include information that helps with such exercise. For example, for a TextReader that information can be the line number. Only per row context needs to be passed here so for kafka it could be an offset. The source information is already available via IntermediateRowParsingReader.source() method and needn't be included