Class TabletMergeabilityInfo
java.lang.Object
org.apache.accumulo.core.client.admin.TabletMergeabilityInfo
- Since:
- 4.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionTabletMergeabilityInfo(TabletMergeability tabletMergeability, Optional<Duration> insertionTime, Supplier<Duration> currentTime) -
Method Summary
Modifier and TypeMethodDescriptionbooleangetDelay()Returns an Optional duration of the configuredTabletMergeabilitydelay which is one of: empty (never) 0 (now) positive delayIf the TabletMergeability is configured with a delay this returns an estimate of the elapsed time since the delay was initially set.If the TabletMergeability is configured with a delay this returns an estimate of the remaining time since the delay was initially set.inthashCode()booleanCheck if this tablet is eligible to be automatically merged.
-
Constructor Details
-
TabletMergeabilityInfo
public TabletMergeabilityInfo(TabletMergeability tabletMergeability, Optional<Duration> insertionTime, Supplier<Duration> currentTime)
-
-
Method Details
-
getTabletMergeability
- Returns:
- the TabletMergeability
-
getElapsed
If the TabletMergeability is configured with a delay this returns an estimate of the elapsed time since the delay was initially set. Returns optional.empty() if the tablet was configured with a TabletMergeability of never. -
getRemaining
If the TabletMergeability is configured with a delay this returns an estimate of the remaining time since the delay was initially set. Returns optional.empty() if the tablet was configured with a TabletMergeability of never. -
getDelay
Returns an Optional duration of the configuredTabletMergeabilitydelay which is one of:- empty (never)
- 0 (now)
- positive delay
- Returns:
- the configured mergeability delay or empty if mergeability is NEVER
-
isMergeable
public boolean isMergeable()Check if this tablet is eligible to be automatically merged.
If TabletMergeability is set to "always", this will return true.
If TabletMergeability is set to "never", this will return false.
If TabletMergeability is configured with a delay, this will check if enough time has elapsed and return true if it has.- Returns:
- true if the tablet is eligible for automatic merging, else false
-
equals
-
hashCode
public int hashCode()
-