|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.pig.backend.hadoop.executionengine.util.MapRedUtil
public class MapRedUtil
A class of utility static methods to be used in the hadoop map reduce backend
| Field Summary | |
|---|---|
static String |
FILE_SYSTEM_NAME
|
| Constructor Summary | |
|---|---|
MapRedUtil()
|
|
| Method Summary | ||
|---|---|---|
static FileSpec |
checkLeafIsStore(PhysicalPlan plan,
PigContext pigContext)
|
|
static void |
copyTmpFileConfigurationValues(org.apache.hadoop.conf.Configuration fromConf,
org.apache.hadoop.conf.Configuration toConf)
|
|
static List<org.apache.hadoop.fs.FileStatus> |
getAllFileRecursively(List<org.apache.hadoop.fs.FileStatus> files,
org.apache.hadoop.conf.Configuration conf)
Get all files recursively from the given list of files |
|
static List<List<org.apache.hadoop.mapreduce.InputSplit>> |
getCombinePigSplits(List<org.apache.hadoop.mapreduce.InputSplit> oneInputSplits,
long maxCombinedSplitSize,
org.apache.hadoop.conf.Configuration conf)
|
|
static long |
getPathLength(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.FileStatus status)
Returns the total number of bytes for this file, or if a directory all files in the directory. |
|
String |
inputSplitToString(org.apache.hadoop.mapreduce.InputSplit[] splits)
|
|
static
|
loadPartitionFileFromLocalCache(String keyDistFile,
Integer[] totalReducers,
byte keyType,
org.apache.hadoop.conf.Configuration mapConf)
Loads the key distribution sampler file |
|
static void |
setupStreamingDirsConfMulti(PigContext pigContext,
org.apache.hadoop.conf.Configuration conf)
Sets up output and log dir paths for a multi-store streaming job |
|
static void |
setupStreamingDirsConfSingle(POStore st,
PigContext pigContext,
org.apache.hadoop.conf.Configuration conf)
Sets up output and log dir paths for a single-store streaming job |
|
static void |
setupUDFContext(org.apache.hadoop.conf.Configuration job)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String FILE_SYSTEM_NAME
| Constructor Detail |
|---|
public MapRedUtil()
| Method Detail |
|---|
public static <E> Map<E,Pair<Integer,Integer>> loadPartitionFileFromLocalCache(String keyDistFile,
Integer[] totalReducers,
byte keyType,
org.apache.hadoop.conf.Configuration mapConf)
throws IOException
keyDistFile - the name for the distribution filetotalReducers - gets set to the total number of reducers as found in the dist filekeyType - Type of the key to be stored in the return map. It currently treats Tuple as a special case.
IOException
public static void copyTmpFileConfigurationValues(org.apache.hadoop.conf.Configuration fromConf,
org.apache.hadoop.conf.Configuration toConf)
public static void setupUDFContext(org.apache.hadoop.conf.Configuration job)
throws IOException
IOException
public static void setupStreamingDirsConfSingle(POStore st,
PigContext pigContext,
org.apache.hadoop.conf.Configuration conf)
throws IOException
st - - POStore of the current jobpigContext - conf -
IOException
public static void setupStreamingDirsConfMulti(PigContext pigContext,
org.apache.hadoop.conf.Configuration conf)
throws IOException
pigContext - conf -
IOException
public static FileSpec checkLeafIsStore(PhysicalPlan plan,
PigContext pigContext)
throws ExecException
ExecException
public static List<org.apache.hadoop.fs.FileStatus> getAllFileRecursively(List<org.apache.hadoop.fs.FileStatus> files,
org.apache.hadoop.conf.Configuration conf)
throws IOException
files - a list of FileStatusconf - the configuration object
IOException
public static long getPathLength(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.FileStatus status)
throws IOException
IOException
public static List<List<org.apache.hadoop.mapreduce.InputSplit>> getCombinePigSplits(List<org.apache.hadoop.mapreduce.InputSplit> oneInputSplits,
long maxCombinedSplitSize,
org.apache.hadoop.conf.Configuration conf)
throws IOException,
InterruptedException
IOException
InterruptedException
public String inputSplitToString(org.apache.hadoop.mapreduce.InputSplit[] splits)
throws IOException,
InterruptedException
IOException
InterruptedException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||