Interface ImportState
- All Known Implementing Classes:
CompositeImportState
,ImportStateRowAndSymCounter
,ImportStateRowAndUeCounter
,ImportStateRowCounter
,ImportStateRowSymAndUSymCounter
,LastByTableImportState
,SimpleImportState
public interface ImportState
Interface for tracking user-specified import state.
Note that all implementations must be
Serializable
or Externalizable
, but the exact
mechanism is left up to the implementor (and hence off the interface).-
Field Summary
Fields Modifier and Type Field Description static long
serialVersionUID
-
Method Summary
Modifier and Type Method Description default void
ensureInitialized(FullTableLocationKey locationKey)
Called when non-import code needs to ensure that an ImportState's internals have been initialized because of their side effects.Properties
getImportDetails()
default void
onClose()
Called when the data ingestion process for the location observed by this ImportState is finished, temporarily or permanently, in a consistent state.default void
onFlush()
Called when the data ingestion process for the location observed by this ImportState is flushed (properly, after it has been flushed and when the resulting size has been made visible if applicable).default void
onRelease()
Call when the data ingestion process for the location observed by this ImportState is finished, temporarily or permanently, in an inconsistent state.default void
onResume(FullTableLocationKey locationKey)
Called when data ingestion is resumed for the location observed by this ImportState.default void
onTruncate(FullTableLocationKey locationKey)
Called when the underlying table location has been truncated.
-
Field Details
-
serialVersionUID
static final long serialVersionUID- See Also:
- Constant Field Values
-
-
Method Details
-
getImportDetails
-
ensureInitialized
Called when non-import code needs to ensure that an ImportState's internals have been initialized because of their side effects. Must not interfere with concurrent data ingestion in the same process. Generally should be treated as a query operation, and the caller should hold theLiveTableMonitor
lock.- Parameters:
locationKey
- The full table location key of the location whose ImportState is being initialized
-
onResume
Called when data ingestion is resumed for the location observed by this ImportState.- Parameters:
locationKey
- The full table location key of the location that has been resumed
-
onTruncate
Called when the underlying table location has been truncated. Useful for resetting any in-memory state that may otherwise linger inappropriately.- Parameters:
locationKey
- The full table location key of the location that has been truncated
-
onFlush
default void onFlush()Called when the data ingestion process for the location observed by this ImportState is flushed (properly, after it has been flushed and when the resulting size has been made visible if applicable). -
onRelease
default void onRelease()Call when the data ingestion process for the location observed by this ImportState is finished, temporarily or permanently, in an inconsistent state. -
onClose
default void onClose()Called when the data ingestion process for the location observed by this ImportState is finished, temporarily or permanently, in a consistent state.
-