public class CsvPartitioner extends java.lang.Object implements Partitioner
| Modifier and Type | Field and Description |
|---|---|
(package private) java.lang.String |
fileExtension |
(package private) java.util.List<java.lang.String> |
outputFiles |
| Constructor and Description |
|---|
CsvPartitioner() |
| Modifier and Type | Method and Description |
|---|---|
private java.io.BufferedWriter |
createWriter(java.io.File inputFile,
java.lang.String tmpDir,
int part)
Creates a buffered writer to be used in copying the contents for a specific partition of the input file
|
java.lang.String[] |
split(java.lang.String filePath,
java.lang.String tmpDir,
int numParts)
Splits an input file into a specified number of partitions.
|
java.lang.String[] |
split(java.lang.String filePath,
java.lang.String tmpDir,
int numParts,
java.lang.String encoding)
Splits an input shapefile into a specified number of partitions.
|
java.lang.String fileExtension
java.util.List<java.lang.String> outputFiles
public java.lang.String[] split(java.lang.String filePath,
java.lang.String tmpDir,
int numParts)
throws java.io.IOException
split in interface PartitionerfilePath - Path to the input filetmpDir - Folder to hold the output partitions (i.e., files with the same extension)numParts - Number of partitions to be createdjava.io.IOExceptionprivate java.io.BufferedWriter createWriter(java.io.File inputFile,
java.lang.String tmpDir,
int part)
inputFile - The file containing all the input datatmpDir - Folder to hold the output file partitions (with the same extension)part - Serial number of this partitionpublic java.lang.String[] split(java.lang.String filePath,
java.lang.String tmpDir,
int numParts,
java.lang.String encoding)
throws java.io.IOException
Partitionersplit in interface PartitionerfilePath - Path to the input shapefiletmpDir - Folder to hold the output partitions (i.e., files with the same extension)numParts - Number of partitions to be createdjava.io.IOException