public abstract class SizeBasedDataRewriter extends SizeBasedFileRewriter<FileScanTask,DataFile>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DELETE_FILE_THRESHOLD
The minimum number of deletes that needs to be associated with a data file for it to be
considered for rewriting.
|
static int |
DELETE_FILE_THRESHOLD_DEFAULT |
MAX_FILE_GROUP_SIZE_BYTES, MAX_FILE_GROUP_SIZE_BYTES_DEFAULT, MAX_FILE_SIZE_BYTES, MAX_FILE_SIZE_DEFAULT_RATIO, MIN_FILE_SIZE_BYTES, MIN_FILE_SIZE_DEFAULT_RATIO, MIN_INPUT_FILES, MIN_INPUT_FILES_DEFAULT, REWRITE_ALL, REWRITE_ALL_DEFAULT, TARGET_FILE_SIZE_BYTES
Modifier | Constructor and Description |
---|---|
protected |
SizeBasedDataRewriter(Table table) |
Modifier and Type | Method and Description |
---|---|
protected long |
defaultTargetFileSize() |
protected java.lang.Iterable<java.util.List<FileScanTask>> |
filterFileGroups(java.util.List<java.util.List<FileScanTask>> groups) |
protected java.lang.Iterable<FileScanTask> |
filterFiles(java.lang.Iterable<FileScanTask> tasks) |
void |
init(java.util.Map<java.lang.String,java.lang.String> options)
Initializes this rewriter using provided options.
|
java.util.Set<java.lang.String> |
validOptions()
Returns a set of supported options for this rewriter.
|
enoughContent, enoughInputFiles, inputSize, numOutputFiles, planFileGroups, splitSize, table, tooMuchContent, writeMaxFileSize, wronglySized
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
description, rewrite
public static final java.lang.String DELETE_FILE_THRESHOLD
SizeBasedFileRewriter.MIN_FILE_SIZE_BYTES
and SizeBasedFileRewriter.MAX_FILE_SIZE_BYTES
. If a file group contains a file that satisfies this condition, the file
group will be rewritten regardless of the number of files in the file group determined by
SizeBasedFileRewriter.MIN_INPUT_FILES
.
Defaults to Integer.MAX_VALUE, which means this feature is not enabled by default.
public static final int DELETE_FILE_THRESHOLD_DEFAULT
protected SizeBasedDataRewriter(Table table)
public java.util.Set<java.lang.String> validOptions()
FileRewriter
validOptions
in interface FileRewriter<FileScanTask,DataFile>
validOptions
in class SizeBasedFileRewriter<FileScanTask,DataFile>
public void init(java.util.Map<java.lang.String,java.lang.String> options)
FileRewriter
init
in interface FileRewriter<FileScanTask,DataFile>
init
in class SizeBasedFileRewriter<FileScanTask,DataFile>
options
- options to initialize this rewriterprotected java.lang.Iterable<FileScanTask> filterFiles(java.lang.Iterable<FileScanTask> tasks)
filterFiles
in class SizeBasedFileRewriter<FileScanTask,DataFile>
protected java.lang.Iterable<java.util.List<FileScanTask>> filterFileGroups(java.util.List<java.util.List<FileScanTask>> groups)
filterFileGroups
in class SizeBasedFileRewriter<FileScanTask,DataFile>
protected long defaultTargetFileSize()
defaultTargetFileSize
in class SizeBasedFileRewriter<FileScanTask,DataFile>