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.@NotNull IWritableLocalTableLocationGet the table location for the stream.@NotNull StringGet the prefix to append to log lines.@NotNull ObjectGet the object to use for synchronization during processing.Get theDataImportProfilerfor the stream.@NotNull SchemaServiceGet the schema service.@NotNull FullTableLocationKeyGet theFullTableLocationKeyfor the stream.@NotNull TableDefinitionGet the Table definition to use for the stream.@NotNull LocalTableWriterGet theLocalTableWriterfor the stream using the defaultTableDefinition(equivalent to the one provided bygetTableDefinition()).@NotNull LocalTableWritergetTableWriter(boolean forceRowSupport, @NotNull TableDefinition expectedOutputDefinition) Get theLocalTableWriterfor the stream using the providedTableDefinition.@NotNull LocalTableWritergetTableWriter(@NotNull 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
@NotNull @NotNull LocalTableWriter getTableWriter(@NotNull @NotNull TableDefinition expectedOutputDefinition) 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 @NotNull LocalTableWriter getTableWriter(boolean forceRowSupport, @NotNull @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
-