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 longserialVersionUID -
Method Summary
Modifier and Type Method Description default voidensureInitialized(FullTableLocationKey locationKey)Called when non-import code needs to ensure that an ImportState's internals have been initialized because of their side effects.PropertiesgetImportDetails()default voidonClose()Called when the data ingestion process for the location observed by this ImportState is finished, temporarily or permanently, in a consistent state.default voidonFlush()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 voidonRelease()Call when the data ingestion process for the location observed by this ImportState is finished, temporarily or permanently, in an inconsistent state.default voidonResume(FullTableLocationKey locationKey)Called when data ingestion is resumed for the location observed by this ImportState.default voidonTruncate(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 theLiveTableMonitorlock.- 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.
-