org.apache.accumulo.core.file
public class FileUtil extends Object
Modifier and Type | Class and Description |
---|---|
static class |
FileUtil.FileInfo |
Constructor and Description |
---|
FileUtil() |
Modifier and Type | Method and Description |
---|---|
static double |
estimatePercentageLTE(org.apache.hadoop.fs.FileSystem fs,
AccumuloConfiguration acuconf,
org.apache.hadoop.io.Text prevEndRow,
org.apache.hadoop.io.Text endRow,
Collection<String> mapFiles,
org.apache.hadoop.io.Text splitRow) |
static Map<KeyExtent,Long> |
estimateSizes(AccumuloConfiguration acuConf,
org.apache.hadoop.fs.Path mapFile,
long fileSize,
List<KeyExtent> extents,
org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs) |
static org.apache.hadoop.io.WritableComparable<Key> |
findLastKey(org.apache.hadoop.fs.FileSystem fs,
AccumuloConfiguration acuConf,
Collection<String> mapFiles) |
static SortedMap<Double,Key> |
findMidPoint(org.apache.hadoop.fs.FileSystem fs,
AccumuloConfiguration acuConf,
org.apache.hadoop.io.Text prevEndRow,
org.apache.hadoop.io.Text endRow,
Collection<String> mapFiles,
double minSplit) |
static SortedMap<Double,Key> |
findMidPoint(org.apache.hadoop.fs.FileSystem fs,
AccumuloConfiguration acuConf,
org.apache.hadoop.io.Text prevEndRow,
org.apache.hadoop.io.Text endRow,
Collection<String> mapFiles,
double minSplit,
boolean useIndex) |
static org.apache.hadoop.fs.FileSystem |
getFileSystem(org.apache.hadoop.conf.Configuration conf,
AccumuloConfiguration acuconf) |
static Collection<String> |
reduceFiles(AccumuloConfiguration acuConf,
org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.io.Text prevEndRow,
org.apache.hadoop.io.Text endRow,
Collection<String> mapFiles,
int maxFiles,
String tmpDir,
int pass) |
static Map<String,FileUtil.FileInfo> |
tryToGetFirstAndLastRows(org.apache.hadoop.fs.FileSystem fs,
AccumuloConfiguration acuConf,
Set<String> mapfiles) |
public static Collection<String> reduceFiles(AccumuloConfiguration acuConf, org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.io.Text prevEndRow, org.apache.hadoop.io.Text endRow, Collection<String> mapFiles, int maxFiles, String tmpDir, int pass) throws IOException
IOException
public static SortedMap<Double,Key> findMidPoint(org.apache.hadoop.fs.FileSystem fs, AccumuloConfiguration acuConf, org.apache.hadoop.io.Text prevEndRow, org.apache.hadoop.io.Text endRow, Collection<String> mapFiles, double minSplit) throws IOException
IOException
public static double estimatePercentageLTE(org.apache.hadoop.fs.FileSystem fs, AccumuloConfiguration acuconf, org.apache.hadoop.io.Text prevEndRow, org.apache.hadoop.io.Text endRow, Collection<String> mapFiles, org.apache.hadoop.io.Text splitRow) throws IOException
IOException
public static SortedMap<Double,Key> findMidPoint(org.apache.hadoop.fs.FileSystem fs, AccumuloConfiguration acuConf, org.apache.hadoop.io.Text prevEndRow, org.apache.hadoop.io.Text endRow, Collection<String> mapFiles, double minSplit, boolean useIndex) throws IOException
mapFiles
- - list MapFiles to find the mid point key
ISSUES : This method used the index files to find the mid point. If the map files have different index intervals this method will not return an
accurate mid point. Also, it would be tricky to use this method in conjunction with an in memory map because the indexing interval is unknown.IOException
public static Map<String,FileUtil.FileInfo> tryToGetFirstAndLastRows(org.apache.hadoop.fs.FileSystem fs, AccumuloConfiguration acuConf, Set<String> mapfiles)
public static org.apache.hadoop.io.WritableComparable<Key> findLastKey(org.apache.hadoop.fs.FileSystem fs, AccumuloConfiguration acuConf, Collection<String> mapFiles) throws IOException
IOException
public static Map<KeyExtent,Long> estimateSizes(AccumuloConfiguration acuConf, org.apache.hadoop.fs.Path mapFile, long fileSize, List<KeyExtent> extents, org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs) throws IOException
IOException
public static org.apache.hadoop.fs.FileSystem getFileSystem(org.apache.hadoop.conf.Configuration conf, AccumuloConfiguration acuconf) throws IOException
IOException
Copyright © 2014 Apache Accumulo Project. All Rights Reserved.