public class CompletionTimeQueryView extends Object implements AutoCloseable, Serializable
| Constructor and Description |
|---|
CompletionTimeQueryView(HoodieTableMetaClient metaClient)
The constructor.
|
CompletionTimeQueryView(HoodieTableMetaClient metaClient,
String eagerLoadInstant)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
Option<String> |
getCompletionTime(String beginTime)
Queries the instant completion time with given start time.
|
Option<String> |
getCompletionTime(String baseInstant,
String instantTime)
Get completion time with a base instant time as a reference to fix the compatibility.
|
String |
getCursorInstant() |
List<String> |
getStartTimes(HoodieTimeline timeline,
Option<String> rangeStart,
Option<String> rangeEnd,
InstantRange.RangeType rangeType)
Queries the instant start time with given completion time range.
|
List<String> |
getStartTimes(HoodieTimeline timeline,
Option<String> rangeStart,
Option<String> rangeEnd,
InstantRange.RangeType rangeType,
Function<String,String> earliestInstantTimeFunc)
Queries the instant start time with given completion time range.
|
List<String> |
getStartTimes(String rangeStart,
String rangeEnd,
Function<String,String> earliestInstantTimeFunc)
Queries the instant start time with given completion time range.
|
boolean |
isArchived(String instantTime)
Returns whether the instant is archived.
|
boolean |
isCompleted(String beginInstantTime)
Returns whether the instant is completed.
|
boolean |
isCompletedBefore(String baseInstant,
String instantTime)
Returns whether the give instant time
instantTime completed before the base instant baseInstant. |
boolean |
isEmptyTable() |
boolean |
isSlicedAfterOrOn(String baseInstant,
String instantTime)
Returns whether the given instant time
instantTime is sliced after or on the base instant baseInstant. |
public CompletionTimeQueryView(HoodieTableMetaClient metaClient)
metaClient - The table meta client.public CompletionTimeQueryView(HoodieTableMetaClient metaClient, String eagerLoadInstant)
metaClient - The table meta client.eagerLoadInstant - The earliest instant time to eagerly load from, by default load last N days of completed instants.public boolean isCompleted(String beginInstantTime)
public boolean isArchived(String instantTime)
public boolean isCompletedBefore(String baseInstant, String instantTime)
instantTime completed before the base instant baseInstant.public boolean isSlicedAfterOrOn(String baseInstant, String instantTime)
instantTime is sliced after or on the base instant baseInstant.public Option<String> getCompletionTime(String baseInstant, String instantTime)
baseInstant - The base instantinstantTime - The instant time to query the completion time withpublic Option<String> getCompletionTime(String beginTime)
beginTime - The start time.public List<String> getStartTimes(HoodieTimeline timeline, Option<String> rangeStart, Option<String> rangeEnd, InstantRange.RangeType rangeType)
By default, assumes there is at most 1 day time of duration for an instant to accelerate the queries.
timeline - The timeline.rangeStart - The query range start completion time.rangeEnd - The query range end completion time.rangeType - The range type.public List<String> getStartTimes(String rangeStart, String rangeEnd, Function<String,String> earliestInstantTimeFunc)
rangeStart - The query range start completion time.rangeEnd - The query range end completion time.earliestInstantTimeFunc - The function to generate the earliest start time boundary
with the minimum completion time.public List<String> getStartTimes(HoodieTimeline timeline, Option<String> rangeStart, Option<String> rangeEnd, InstantRange.RangeType rangeType, Function<String,String> earliestInstantTimeFunc)
timeline - The timeline.rangeStart - The query range start completion time.rangeEnd - The query range end completion time.rangeType - The range type.earliestInstantTimeFunc - The function to generate the earliest start time boundary
with the minimum completion time.public String getCursorInstant()
public boolean isEmptyTable()
public void close()
close in interface AutoCloseableCopyright © 2024 The Apache Software Foundation. All rights reserved.