org.apache.accumulo.core.file
Class FileUtil

java.lang.Object
  extended by org.apache.accumulo.core.file.FileUtil

public class FileUtil
extends Object


Nested Class Summary
static class FileUtil.FileInfo
           
 
Constructor Summary
FileUtil()
           
 
Method Summary
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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileUtil

public FileUtil()
Method Detail

reduceFiles

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
Throws:
IOException

findMidPoint

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
Throws:
IOException

estimatePercentageLTE

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
Throws:
IOException

findMidPoint

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
Parameters:
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.
Throws:
IOException

tryToGetFirstAndLastRows

public static Map<String,FileUtil.FileInfo> tryToGetFirstAndLastRows(org.apache.hadoop.fs.FileSystem fs,
                                                                     AccumuloConfiguration acuConf,
                                                                     Set<String> mapfiles)

findLastKey

public static org.apache.hadoop.io.WritableComparable<Key> findLastKey(org.apache.hadoop.fs.FileSystem fs,
                                                                       AccumuloConfiguration acuConf,
                                                                       Collection<String> mapFiles)
                                                                throws IOException
Throws:
IOException

estimateSizes

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
Throws:
IOException

getFileSystem

public static org.apache.hadoop.fs.FileSystem getFileSystem(org.apache.hadoop.conf.Configuration conf,
                                                            AccumuloConfiguration acuconf)
                                                     throws IOException
Throws:
IOException


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.