Class FixedIntervalOrderPolicy
java.lang.Object
org.apache.druid.server.compaction.FixedIntervalOrderPolicy
- All Implemented Interfaces:
CompactionCandidateSearchPolicy
Implementation of
CompactionCandidateSearchPolicy that specifies the
datasources and intervals eligible for compaction and their order.
This policy is primarily used for integration tests.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classSpecifies a datasource-interval eligible for compaction. -
Constructor Summary
ConstructorsConstructorDescriptionFixedIntervalOrderPolicy(List<FixedIntervalOrderPolicy.Candidate> eligibleCandidates) -
Method Summary
Modifier and TypeMethodDescriptioncheckEligibilityForCompaction(CompactionCandidate candidate, CompactionTaskStatus latestTaskStatus) Checks if the givenCompactionCandidateis eligible for compaction in the current iteration.intcompareCandidates(CompactionCandidate candidateA, CompactionCandidate candidateB) Compares between two compaction candidates.
-
Constructor Details
-
FixedIntervalOrderPolicy
-
-
Method Details
-
getEligibleCandidates
-
compareCandidates
Description copied from interface:CompactionCandidateSearchPolicyCompares between two compaction candidates. Used to determine the order in which segments and intervals should be picked for compaction.- Specified by:
compareCandidatesin interfaceCompactionCandidateSearchPolicy- Returns:
- A negative value if
candidateAshould be picked first, a positive value ifcandidateBshould be picked first or zero if the order does not matter.
-
checkEligibilityForCompaction
public Eligibility checkEligibilityForCompaction(CompactionCandidate candidate, CompactionTaskStatus latestTaskStatus) Description copied from interface:CompactionCandidateSearchPolicyChecks if the givenCompactionCandidateis eligible for compaction in the current iteration. A policy may implement this method to skip compacting intervals or segments that do not fulfil some required criteria.- Specified by:
checkEligibilityForCompactionin interfaceCompactionCandidateSearchPolicy- Returns:
Eligibility.FULLonly if eligible.
-