|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.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)
SourceConfiguration 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()
SourceConverter 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
IOExceptionpublic FormatBundle<? extends org.apache.hadoop.mapreduce.InputFormat> getBundle()
public PType<T> getType()
SourcePType for this source.
getType in interface Source<T>public long getSize(org.apache.hadoop.conf.Configuration configuration)
SourceSource.
getSize in interface Source<T>
protected Iterable<T> read(org.apache.hadoop.conf.Configuration conf,
FileReaderFactory<T> readerFactory)
throws IOException
IOExceptionprotected String pathsAsString()
public long getLastModifiedAt(org.apache.hadoop.conf.Configuration conf)
SourceSource 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 Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||