com.cloudera.crunch.io.impl
Class SourceTargetImpl<T>
java.lang.Object
com.cloudera.crunch.io.impl.SourceTargetImpl<T>
- All Implemented Interfaces:
- Source<T>, SourceTarget<T>, Target
- Direct Known Subclasses:
- ReadableSourceTargetImpl, SourcePathTargetImpl, TableSourceTargetImpl
public class SourceTargetImpl<T>
- extends Object
- implements SourceTarget<T>
source
protected final Source<T> source
target
protected final Target target
SourceTargetImpl
public SourceTargetImpl(Source<T> source,
Target target)
getType
public PType<T> getType()
- Description copied from interface:
Source
- Returns the
PType
for this source.
- Specified by:
getType
in interface Source<T>
configureSource
public void configureSource(org.apache.hadoop.mapreduce.Job job,
int inputId)
throws IOException
- Description copied from interface:
Source
- Configure the given job to use this source as an input.
- Specified by:
configureSource
in interface Source<T>
- Parameters:
job
- The job to configureinputId
- For a multi-input job, an identifier for this input to the job
- Throws:
IOException
getSize
public long getSize(org.apache.hadoop.conf.Configuration configuration)
- Description copied from interface:
Source
- Returns the number of bytes in this
Source
.
- Specified by:
getSize
in interface Source<T>
accept
public boolean accept(OutputHandler handler,
PType<?> ptype)
- Specified by:
accept
in interface Target
asSourceTarget
public <S> SourceTarget<S> asSourceTarget(PType<S> ptype)
- Specified by:
asSourceTarget
in interface Target
equals
public boolean equals(Object other)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2012. All Rights Reserved.