Click or drag to resize

MultiInputRecordReader<T> Class

Base class for record readers that combine multiple inputs.
Inheritance Hierarchy
System.Object
  Ookii.Jumbo.IO.RecordReader<T>
    Ookii.Jumbo.IO.MultiInputRecordReader<T>
      Ookii.Jumbo.IO.InnerJoinRecordReader<TOuter, TInner, TResult>
      Ookii.Jumbo.IO.MultiRecordReader<T>
      Ookii.Jumbo.IO.RoundRobinMultiInputRecordReader<T>
      Ookii.Jumbo.Jet.MergeRecordReader<T>

Namespace:  Ookii.Jumbo.IO
Assembly:  Ookii.Jumbo (in Ookii.Jumbo.dll) Version: 2.0.0
Syntax
public abstract class MultiInputRecordReader<T> : RecordReader<T>, 
	IMultiInputRecordReader, IRecordReader, IDisposable

Type Parameters

T
The type of the records.

The MultiInputRecordReader<T> type exposes the following members.

Constructors
  NameDescription
Protected methodMultiInputRecordReader<T>
Initializes a new instance of the MultiInputRecordReader<T> class.
Top
Properties
  NameDescription
Public propertyAllowRecordReuse
Gets a value that indicates that this record reader is allowed to reuse record instances.
Public propertyBufferSize
Gets the buffer size to use to read input files.
Public propertyBytesRead
Gets the actual number of bytes read from the input.
(Overrides RecordReader<T>.BytesRead.)
Public propertyCompressionType
Gets the type of compression to use to read input files.
Public propertyCurrentInputCount
Gets the current number of inputs that have been added to the MultiInputRecordReader<T> for the currently active set of partitions.
Public propertyCurrentPartition
Gets or sets the partition that calls to ReadRecord() should return records for.
Public propertyCurrentRecord
Gets the current record.
(Inherited from RecordReader<T>.)
Public propertyHasFinished
Gets a value indicating whether this instance has read all records.
(Inherited from RecordReader<T>.)
Public propertyHasRecords
Gets a value that indicates whether there are records available on the data source that this reader is reading from.
(Inherited from RecordReader<T>.)
Public propertyInputBytes
Gets the size of the records before deserialization of all record readers.
(Overrides RecordReader<T>.InputBytes.)
Protected propertyIsDisposed
Gets a value that indicates whether the object has been disposed.
Public propertyPartitionCount
Gets the number of partitions assigned to this reader.
Public propertyPartitionNumbers
Gets the partition numbers assigned to this reader.
Public propertyProgress
Gets the combined progress of the record readers.
(Overrides RecordReader<T>.Progress.)
Public propertyReadTime
Gets the time spent reading.
(Inherited from RecordReader<T>.)
Public propertyRecordsRead
Gets the number of records that has been read by this record reader.
(Inherited from RecordReader<T>.)
Public propertySourceName
Gets or sets the an informational string indicating the source of the records.
(Inherited from RecordReader<T>.)
Public propertyTotalInputCount
Gets the total number of inputs readers that this record reader will have.
Top
Methods
  NameDescription
Public methodAddInput
Adds the specified input to be read by this record reader.
Public methodAssignAdditionalPartitions
Assigns additional partitions to this record reader.
Protected methodCheckDisposed
Throws a ObjectDisposedException if the object has been disposed.
Public methodDispose()
Cleans up all resources held by this StreamRecordReader{T}.
(Inherited from RecordReader<T>.)
Protected methodDispose(Boolean)
Cleans up all resources associated with this MultiInputRecordReader<T>.
(Overrides RecordReader<T>.Dispose(Boolean).)
Public methodEnumerateRecords
Enumerates over all the records.
(Inherited from RecordReader<T>.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Protected methodGetInput
Returns the specified input.
Protected methodGetInputReader(Int32)
Gets the record reader for the specified input of the current partition.
Protected methodGetInputReader(Int32, Int32)
Returns the record reader for the specified partition and input.
Protected methodGetInputReader(Int32, Int32, Boolean)
Returns the record reader for the specified partition and input.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodNextPartition
Moves the current partition to the next partition.
Protected methodOnCurrentPartitionChanged
Raises the CurrentPartitionChanged event.
Protected methodOnCurrentPartitionChanging
Raises the CurrentPartitionChanging event.
Protected methodOnHasRecordsChanged
Raises the HasRecordsChanged event.
(Inherited from RecordReader<T>.)
Public methodReadRecord
Reads a record.
(Inherited from RecordReader<T>.)
Protected methodReadRecordInternal
Reads a record.
(Inherited from RecordReader<T>.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Protected methodWaitForInputs
Waits until the specified number of inputs becomes available for all currently active partitions.
Top
Events
  NameDescription
Public eventCurrentPartitionChanged
Event raised when the value of the CurrentPartition property changes.
Public eventCurrentPartitionChanging
Event raised when the value of the CurrentPartition property is about to change.
Public eventHasRecordsChanged
Occurs when the value of the HasRecords property changes.
(Inherited from RecordReader<T>.)
Top
Remarks

Depending on the type of record reader, the records of the input record readers might not need to read records of type T.

If you accept inputs of types other than T, you must specify that using the InputTypeAttribute.

The initial value of HasRecords will be false. It is up to the deriving class to set it to true when appropriate.

Note Note
While the AddInput(IList<RecordInput>), WaitForInputs(Int32, Int32) and GetInputReader(Int32) methods are thread safe, no other methods of this class are guaranteed to be thread safe, and derived classes are not required to make ReadRecordInternal() thread safe. Essentially, you may have only one thread reading from the MultiInputRecordReader<T>, while one or more other threads add inputs to it.
See Also