public class SamplePruner extends Transform
| Modifier and Type | Class and Description |
|---|---|
static class |
SamplePruner.AddPathReturnStatus
Class used for return value of addPath()
|
static class |
SamplePruner.DefaultPPR
DefaultPPR default processor which does nothing.
|
static class |
SamplePruner.FilterPPR
FilterPPR filter processor.
|
static class |
SamplePruner.LimitPruneRetStatus |
static class |
SamplePruner.SamplePrunerCtx
SamplePrunerCtx.
|
| Constructor and Description |
|---|
SamplePruner() |
| Modifier and Type | Method and Description |
|---|---|
static SamplePruner.AddPathReturnStatus |
addPath(org.apache.hadoop.fs.FileSystem fs,
String pathPattern,
long sizeLeft,
int fileLimit,
Collection<org.apache.hadoop.fs.Path> retPathList)
Try to recursively add files in sub-directories into retPathList until
reaching the sizeLeft.
|
static NodeProcessor |
getDefaultProc() |
static NodeProcessor |
getFilterProc() |
static SamplePruner.LimitPruneRetStatus |
limitPrune(Partition part,
long sizeLimit,
int fileLimit,
Collection<org.apache.hadoop.fs.Path> retPathList)
Try to generate a list of subset of files in the partition to reach a size
limit with number of files less than fileLimit
|
static org.apache.hadoop.fs.Path[] |
prune(Partition part,
FilterDesc.SampleDesc sampleDescr)
Prunes to get all the files in the partition that satisfy the TABLESAMPLE
clause.
|
ParseContext |
transform(ParseContext pctx)
All transformation steps implement this interface.
|
beginPerfLogging, endPerfLogging, endPerfLoggingpublic ParseContext transform(ParseContext pctx) throws SemanticException
Transformtransform in class Transformpctx - input parse contextSemanticExceptionpublic static NodeProcessor getFilterProc()
public static NodeProcessor getDefaultProc()
public static org.apache.hadoop.fs.Path[] prune(Partition part, FilterDesc.SampleDesc sampleDescr) throws SemanticException
part - The partition to pruneSemanticExceptionpublic static SamplePruner.AddPathReturnStatus addPath(org.apache.hadoop.fs.FileSystem fs, String pathPattern, long sizeLeft, int fileLimit, Collection<org.apache.hadoop.fs.Path> retPathList) throws IOException
fs - pathPattern - sizeLeft - fileLimit - retPathList - IOExceptionpublic static SamplePruner.LimitPruneRetStatus limitPrune(Partition part, long sizeLimit, int fileLimit, Collection<org.apache.hadoop.fs.Path> retPathList) throws SemanticException
part - sizeLimit - fileLimit - retPathList - list of Paths returnedSemanticExceptionCopyright © 2019 The Apache Software Foundation. All Rights Reserved.