Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#12081: "Add deleteFileThreshold parameter to SizeBasedDataRewriter, update logic, and include tests" #12133

Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,19 @@ public abstract class SizeBasedDataRewriter extends SizeBasedFileRewriter<FileSc
public static final String DELETE_FILE_THRESHOLD = "delete-file-threshold";

public static final int DELETE_FILE_THRESHOLD_DEFAULT = Integer.MAX_VALUE;
private static final double DELETE_RATIO_THRESHOLD = 0.3;
private final double deleteRatioThreshold;

private int deleteFileThreshold;

protected SizeBasedDataRewriter(Table table) {
protected SizeBasedDataRewriter(Table table, double deleteRatioThreshold) {
jangalasriramd7 marked this conversation as resolved.
Show resolved Hide resolved
super(table);
this.deleteRatioThreshold = deleteRatioThreshold;
this.deleteFileThreshold = DELETE_FILE_THRESHOLD_DEFAULT;
}

// Default constructor
public SizeBasedDataRewriter(Table table) {
jangalasriramd7 marked this conversation as resolved.
Show resolved Hide resolved
this(table, 0.3); // Providing default deleteRatioThreshold
jangalasriramd7 marked this conversation as resolved.
Show resolved Hide resolved
}

@Override
Expand Down