cascading.tap.hadoop
Class ZipSplit
java.lang.Object
org.apache.hadoop.mapreduce.InputSplit
org.apache.hadoop.mapred.FileSplit
cascading.tap.hadoop.ZipSplit
- All Implemented Interfaces:
- Writable, InputSplit
public class ZipSplit
- extends FileSplit
A section of an input file in zip format. Returned by
ZipInputFormat.getSplits(JobConf , int)
and passed to
ZipInputFormat.getRecordReader(InputSplit , JobConf , Reporter)
.
Constructor Summary |
ZipSplit(Path file,
long length)
Constructor ZipSplit creates a new ZipSplit instance. |
ZipSplit(Path file,
String entryPath,
long length)
Constructs a split from zip archive. |
ZipSplit
public ZipSplit(Path file,
String entryPath,
long length)
- Constructs a split from zip archive.
- Parameters:
file
- the zip archive nameentryPath
- the path of the file to be read within the zip archive.length
- the uncompressed size of the file within the zip archive.
ZipSplit
public ZipSplit(Path file,
long length)
- Constructor ZipSplit creates a new ZipSplit instance.
- Parameters:
file
- of type Pathlength
- of type long
getEntryPath
public String getEntryPath()
- The path of the file within the zip archive.
- Returns:
- returns the path for this entry
write
public void write(DataOutput out)
throws IOException
- Specified by:
write
in interface Writable
- Overrides:
write
in class FileSplit
- Throws:
IOException
readFields
public void readFields(DataInput in)
throws IOException
- Specified by:
readFields
in interface Writable
- Overrides:
readFields
in class FileSplit
- Throws:
IOException
Copyright © 2007-2010 Concurrent, Inc. All Rights Reserved.