Interface DataImportStreamContext
- All Known Implementing Classes:
DataImportStreamProcessor.Context
public interface DataImportStreamContext
Interface for providing context information to a
DataImportProcessor for a single stream of data
from a tailer.-
Method Summary
Modifier and TypeMethodDescriptionGet the metadata for the stream.Get the table location for the stream.Get the prefix to append to log lines.Get the object to use for synchronization during processing.Get theDataImportProfilerfor the stream.Get the schema service.Get theFullTableLocationKeyfor the stream.Get the Table definition to use for the stream.Get theLocalTableWriterfor the stream using the defaultTableDefinition(equivalent to the one provided bygetTableDefinition()).getTableWriter(boolean forceRowSupport, TableDefinition expectedOutputDefinition) Get theLocalTableWriterfor the stream using the providedTableDefinition.getTableWriter(TableDefinition expectedOutputDefinition) Get theLocalTableWriterfor the stream using the providedTableDefinition.
-
Method Details
-
getLocation
Get the table location for the stream.- Returns:
- The table location for the stream
-
getTableWriter
Get theLocalTableWriterfor the stream using the defaultTableDefinition(equivalent to the one provided bygetTableDefinition()).Callers must hold the processing lock (see
getProcessingLock()).- Returns:
- The
LocalTableWriterfor the stream
-
getTableWriter
Get theLocalTableWriterfor the stream using the providedTableDefinition.Callers must hold the processing lock (see
getProcessingLock()).- Parameters:
expectedOutputDefinition- A definition specifying the columns to be written- Returns:
- The
LocalTableWriterfor the stream
-
getTableWriter
@NotNull LocalTableWriter getTableWriter(boolean forceRowSupport, @NotNull TableDefinition expectedOutputDefinition) Get theLocalTableWriterfor the stream using the providedTableDefinition. Allows ability to force row support.Callers must hold the processing lock (see
getProcessingLock()).- Parameters:
expectedOutputDefinition- A definition specifying the columns to be writtenforceRowSupport- Should be true for binary format V1 loggers to force single row support in returned LocalTableWriter- Returns:
- The
LocalTableWriterfor the stream
-
getStreamKey
Get theFullTableLocationKeyfor the stream.- Returns:
- The table location key for the stream
-
getProfiler
DataImportProfiler getProfiler()Get theDataImportProfilerfor the stream.- Returns:
- The data import profiler for the stream
-
getProcessingLock
Get the object to use for synchronization during processing.- Returns:
- The object to synchronize during data processing
-
getLogPrefix
Get the prefix to append to log lines.- Returns:
- The prefix to prepend to log lines
-
getTableDefinition
Get the Table definition to use for the stream.- Returns:
- The table definition for the stream
-
getImportMetadata
Get the metadata for the stream.- Returns:
- The map of metadata for processor use
-
getSchemaService
Get the schema service.- Returns:
- the schema service
-