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(FileSystem fs,
java.lang.String pathPattern,
long sizeLeft,
int fileLimit,
java.util.Collection<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,
java.util.Collection<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 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.
|
public ParseContext transform(ParseContext pctx) throws SemanticException
Transform
transform
in interface Transform
pctx
- input parse contextSemanticException
public static NodeProcessor getFilterProc()
public static NodeProcessor getDefaultProc()
public static Path[] prune(Partition part, FilterDesc.sampleDesc sampleDescr) throws SemanticException
part
- The partition to pruneSemanticException
public static SamplePruner.AddPathReturnStatus addPath(FileSystem fs, java.lang.String pathPattern, long sizeLeft, int fileLimit, java.util.Collection<Path> retPathList) throws java.io.IOException
fs
- pathPattern
- sizeLeft
- fileLimit
- retPathList
- java.io.IOException
public static SamplePruner.LimitPruneRetStatus limitPrune(Partition part, long sizeLimit, int fileLimit, java.util.Collection<Path> retPathList) throws SemanticException
part
- sizeLimit
- fileLimit
- retPathList
- list of Paths returnedSemanticException
Copyright © 2012 The Apache Software Foundation