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 Type Method Description Map<String,String>
getImportMetadata()
Get the metadata for the stream.IWritableLocalTableLocation
getLocation()
Get the table location for the stream.String
getLogPrefix()
Get the prefix to append to log lines.Object
getProcessingLock()
Get the object to use for synchronization during processing.DataImportProfiler
getProfiler()
Get theDataImportProfiler
for the stream.SchemaService
getSchemaService()
Get the schema service.FullTableLocationKey
getStreamKey()
Get theFullTableLocationKey
for the stream.TableDefinition
getTableDefinition()
Get the Table definition to use for the stream.LocalTableWriter
getTableWriter()
Get theLocalTableWriter
for the stream using the defaultTableDefinition
(equivalent to the one provided bygetTableDefinition()
).LocalTableWriter
getTableWriter(boolean forceRowSupport, TableDefinition expectedOutputDefinition)
Get theLocalTableWriter
for the stream using the providedTableDefinition
.LocalTableWriter
getTableWriter(TableDefinition expectedOutputDefinition)
Get theLocalTableWriter
for the stream using the providedTableDefinition
.
-
Method Details
-
getLocation
Get the table location for the stream.- Returns:
- The table location for the stream
-
getTableWriter
Get theLocalTableWriter
for the stream using the defaultTableDefinition
(equivalent to the one provided bygetTableDefinition()
).Callers must hold the processing lock (see
getProcessingLock()
).- Returns:
- The
LocalTableWriter
for the stream
-
getTableWriter
Get theLocalTableWriter
for 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
LocalTableWriter
for the stream
-
getTableWriter
@NotNull LocalTableWriter getTableWriter(boolean forceRowSupport, @NotNull TableDefinition expectedOutputDefinition)Get theLocalTableWriter
for 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
LocalTableWriter
for the stream
-
getStreamKey
Get theFullTableLocationKey
for the stream.- Returns:
- The table location key for the stream
-
getProfiler
DataImportProfiler getProfiler()Get theDataImportProfiler
for 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
-