org.apache.crunch.io
Interface ReadableSource<T>
- All Superinterfaces:
- Source<T>
- All Known Subinterfaces:
- ReadableSourceTarget<T>
- All Known Implementing Classes:
- AvroFileSource, AvroFileSourceTarget, AvroParquetFileSource, AvroParquetFileSourceTarget, HBaseSourceTarget, HFileSource, NLineFileSource, ReadableSourcePathTargetImpl, ReadableSourceTargetImpl, SeqFileSource, SeqFileSourceTarget, SeqFileTableSource, SeqFileTableSourceTarget, TextFileSource, TextFileSourceTarget, TextFileTableSource, TextFileTableSourceTarget, TrevniKeySource, TrevniKeySourceTarget
public interface ReadableSource<T>
- extends Source<T>
An extension of the Source
interface that indicates that a
Source
instance may be read as a series of records by the client
code. This is used to determine whether a PCollection
instance can be
materialized.
read
Iterable<T> read(org.apache.hadoop.conf.Configuration conf)
throws IOException
- Returns an
Iterable
that contains the contents of this source.
- Parameters:
conf
- The current Configuration
instance
- Returns:
- the contents of this
Source
as an Iterable
instance
- Throws:
IOException
asReadable
ReadableData<T> asReadable()
- Returns:
- a
ReadableData
instance containing the data referenced by this
ReadableSource
.
Copyright © 2014 The Apache Software Foundation. All Rights Reserved.