|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.crunch.io.impl.FileSourceImpl<T>
public class FileSourceImpl<T>
Field Summary | |
---|---|
protected FormatBundle<? extends org.apache.hadoop.mapreduce.InputFormat> |
inputBundle
|
protected org.apache.hadoop.fs.Path |
path
Deprecated. |
protected List<org.apache.hadoop.fs.Path> |
paths
|
protected PType<T> |
ptype
|
Constructor Summary | |
---|---|
FileSourceImpl(List<org.apache.hadoop.fs.Path> paths,
PType<T> ptype,
Class<? extends org.apache.hadoop.mapreduce.InputFormat> inputFormatClass)
|
|
FileSourceImpl(List<org.apache.hadoop.fs.Path> paths,
PType<T> ptype,
FormatBundle<? extends org.apache.hadoop.mapreduce.InputFormat> inputBundle)
|
|
FileSourceImpl(org.apache.hadoop.fs.Path path,
PType<T> ptype,
Class<? extends org.apache.hadoop.mapreduce.InputFormat> inputFormatClass)
|
|
FileSourceImpl(org.apache.hadoop.fs.Path path,
PType<T> ptype,
FormatBundle<? extends org.apache.hadoop.mapreduce.InputFormat> inputBundle)
|
Method Summary | |
---|---|
void |
configureSource(org.apache.hadoop.mapreduce.Job job,
int inputId)
Configure the given job to use this source as an input. |
boolean |
equals(Object other)
|
FormatBundle<? extends org.apache.hadoop.mapreduce.InputFormat> |
getBundle()
|
Converter<?,?,?,?> |
getConverter()
Returns the Converter used for mapping the inputs from this instance
into PCollection or PTable values. |
long |
getLastModifiedAt(org.apache.hadoop.conf.Configuration conf)
Returns the time (in milliseconds) that this Source was most recently
modified (e.g., because an input file was edited or new files were added to
a directory.) |
org.apache.hadoop.fs.Path |
getPath()
Deprecated. |
List<org.apache.hadoop.fs.Path> |
getPaths()
|
long |
getSize(org.apache.hadoop.conf.Configuration configuration)
Returns the number of bytes in this Source . |
PType<T> |
getType()
Returns the PType for this source. |
int |
hashCode()
|
Source<T> |
inputConf(String key,
String value)
Adds the given key-value pair to the Configuration instance that is used to read
this Source<T></T> . |
protected String |
pathsAsString()
|
protected Iterable<T> |
read(org.apache.hadoop.conf.Configuration conf,
FileReaderFactory<T> readerFactory)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
@Deprecated protected final org.apache.hadoop.fs.Path path
protected final List<org.apache.hadoop.fs.Path> paths
protected final PType<T> ptype
protected final FormatBundle<? extends org.apache.hadoop.mapreduce.InputFormat> inputBundle
Constructor Detail |
---|
public FileSourceImpl(org.apache.hadoop.fs.Path path, PType<T> ptype, Class<? extends org.apache.hadoop.mapreduce.InputFormat> inputFormatClass)
public FileSourceImpl(org.apache.hadoop.fs.Path path, PType<T> ptype, FormatBundle<? extends org.apache.hadoop.mapreduce.InputFormat> inputBundle)
public FileSourceImpl(List<org.apache.hadoop.fs.Path> paths, PType<T> ptype, Class<? extends org.apache.hadoop.mapreduce.InputFormat> inputFormatClass)
public FileSourceImpl(List<org.apache.hadoop.fs.Path> paths, PType<T> ptype, FormatBundle<? extends org.apache.hadoop.mapreduce.InputFormat> inputBundle)
Method Detail |
---|
@Deprecated public org.apache.hadoop.fs.Path getPath()
public List<org.apache.hadoop.fs.Path> getPaths()
public Source<T> inputConf(String key, String value)
Source
Configuration
instance that is used to read
this Source<T></T>
. Allows for multiple inputs to re-use the same config keys with
different values when necessary.
inputConf
in interface Source<T>
public Converter<?,?,?,?> getConverter()
Source
Converter
used for mapping the inputs from this instance
into PCollection
or PTable
values.
getConverter
in interface Source<T>
public void configureSource(org.apache.hadoop.mapreduce.Job job, int inputId) throws IOException
Source
configureSource
in interface Source<T>
job
- The job to configureinputId
- For a multi-input job, an identifier for this input to the job
IOException
public FormatBundle<? extends org.apache.hadoop.mapreduce.InputFormat> getBundle()
public PType<T> getType()
Source
PType
for this source.
getType
in interface Source<T>
public long getSize(org.apache.hadoop.conf.Configuration configuration)
Source
Source
.
getSize
in interface Source<T>
protected Iterable<T> read(org.apache.hadoop.conf.Configuration conf, FileReaderFactory<T> readerFactory) throws IOException
IOException
protected String pathsAsString()
public long getLastModifiedAt(org.apache.hadoop.conf.Configuration conf)
Source
Source
was most recently
modified (e.g., because an input file was edited or new files were added to
a directory.)
getLastModifiedAt
in interface Source<T>
public boolean equals(Object other)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |