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 Details

    • getLocation

      @NotNull IWritableLocalTableLocation getLocation()
      Get the table location for the stream.
      Returns:
      The table location for the stream
    • getTableWriter

      @NotNull LocalTableWriter getTableWriter()
      Get the LocalTableWriter for the stream using the default TableDefinition (equivalent to the one provided by getTableDefinition()).

      Callers must hold the processing lock (see getProcessingLock()).

      Returns:
      The LocalTableWriter for the stream
    • getTableWriter

      @NotNull LocalTableWriter getTableWriter(@NotNull TableDefinition expectedOutputDefinition)
      Get the LocalTableWriter for the stream using the provided TableDefinition.

      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 the LocalTableWriter for the stream using the provided TableDefinition. Allows ability to force row support.

      Callers must hold the processing lock (see getProcessingLock()).

      Parameters:
      expectedOutputDefinition - A definition specifying the columns to be written
      forceRowSupport - Should be true for binary format V1 loggers to force single row support in returned LocalTableWriter
      Returns:
      The LocalTableWriter for the stream
    • getStreamKey

      @NotNull FullTableLocationKey getStreamKey()
      Get the FullTableLocationKey for the stream.
      Returns:
      The table location key for the stream
    • getProfiler

      DataImportProfiler getProfiler()
      Get the DataImportProfiler for the stream.
      Returns:
      The data import profiler for the stream
    • getProcessingLock

      @NotNull Object getProcessingLock()
      Get the object to use for synchronization during processing.
      Returns:
      The object to synchronize during data processing
    • getLogPrefix

      @NotNull String getLogPrefix()
      Get the prefix to append to log lines.
      Returns:
      The prefix to prepend to log lines
    • getTableDefinition

      @NotNull TableDefinition getTableDefinition()
      Get the Table definition to use for the stream.
      Returns:
      The table definition for the stream
    • getImportMetadata

      @NotNull Map<String,String> getImportMetadata()
      Get the metadata for the stream.
      Returns:
      The map of metadata for processor use
    • getSchemaService

      @NotNull SchemaService getSchemaService()
      Get the schema service.
      Returns:
      the schema service