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.
|
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 org.apache.hadoop.fs.Path[] prune(Partition part, FilterDesc.SampleDesc sampleDescr) throws SemanticException
part
- The partition to pruneSemanticException
public 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
- IOException
public 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 returnedSemanticException
Copyright © 2017 The Apache Software Foundation. All rights reserved.