Class CompositeImportState
java.lang.Object
com.illumon.iris.db.tables.dataimport.importstate.CompositeImportState
- All Implemented Interfaces:
ImportState,Externalizable,Serializable
ImportState class that allows a single table partition to produce multiple ImportStates
simultaneously.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPublic no-arg constructor forExternalizablesupport.CompositeImportState(ImportState... importStates) Construct a new composite of the supplied states. -
Method Summary
Modifier and TypeMethodDescription<IMPORT_STATE_TYPE extends ImportState>
IMPORT_STATE_TYPEat(int index) Get the import state at the supplied index.final voidensureInitialized(FullTableLocationKey locationKey) Called when non-import code needs to ensure that an ImportState's internals have been initialized because of their side effects.By default, gets the import details for the member import states in order and accumulates them into a newPropertiesinstance.final voidonClose()Called when the data ingestion process for the location observed by this ImportState is finished, temporarily or permanently, in a consistent state.final 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).final voidCall when the data ingestion process for the location observed by this ImportState is finished, temporarily or permanently, in an inconsistent state.final voidonResume(FullTableLocationKey locationKey) Called when data ingestion is resumed for the location observed by this ImportState.final voidonTruncate(FullTableLocationKey locationKey) Called when the underlying table location has been truncated.final voidfinal void
-
Constructor Details
-
CompositeImportState
public CompositeImportState()Public no-arg constructor forExternalizablesupport. Do not use this in application code! -
CompositeImportState
Construct a new composite of the supplied states.- Parameters:
importStates- The states to composite
-
-
Method Details
-
at
Get the import state at the supplied index.- Type Parameters:
IMPORT_STATE_TYPE- The type of the import state to return- Parameters:
index- An index into the import states array for this composite import state- Returns:
- The import state at index
-
getImportDetails
By default, gets the import details for the member import states in order and accumulates them into a newPropertiesinstance.- Specified by:
getImportDetailsin interfaceImportState- Returns:
- The accumulated import details
-
ensureInitialized
Description copied from interface:ImportStateCalled 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.- Specified by:
ensureInitializedin interfaceImportState- Parameters:
locationKey- The full table location key of the location whose ImportState is being initialized
-
onResume
Description copied from interface:ImportStateCalled when data ingestion is resumed for the location observed by this ImportState.- Specified by:
onResumein interfaceImportState- Parameters:
locationKey- The full table location key of the location that has been resumed
-
onTruncate
Description copied from interface:ImportStateCalled when the underlying table location has been truncated. Useful for resetting any in-memory state that may otherwise linger inappropriately.- Specified by:
onTruncatein interfaceImportState- Parameters:
locationKey- The full table location key of the location that has been truncated
-
onFlush
public final void onFlush()Description copied from interface:ImportStateCalled 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).- Specified by:
onFlushin interfaceImportState
-
onRelease
public final void onRelease()Description copied from interface:ImportStateCall when the data ingestion process for the location observed by this ImportState is finished, temporarily or permanently, in an inconsistent state.- Specified by:
onReleasein interfaceImportState
-
onClose
public final void onClose()Description copied from interface:ImportStateCalled when the data ingestion process for the location observed by this ImportState is finished, temporarily or permanently, in a consistent state.- Specified by:
onClosein interfaceImportState
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-