All Implemented Interfaces:
LogicalOperator, RecordSourceOperator, SourceOperator<RecordPort>

public class ReadORC extends AbstractReader
  • Constructor Details

    • ReadORC

      public ReadORC()
      Reads an empty source with default settings. The source must be set before execution or an error will be raised.
      See Also:
    • ReadORC

      public ReadORC(String pattern)
      Reads all paths matching the specified pattern using default options. Any matching path which is a directory is replaced with all files in the directory; this expansion is not recursive.
      Parameters:
      pattern - a path-matching pattern
      See Also:
    • ReadORC

      public ReadORC(Path path)
      Reads the file specified by the path. If the path refers to a a directory, all files in the directory are read; this read is not recursive into sub-directories.
      Parameters:
      path - the path to read
    • ReadORC

      public ReadORC(ByteSource source)
      Reads the specified data source using default options.
      Parameters:
      source - the data source to read
  • Method Details

    • computeFormat

      protected DataFormat computeFormat(CompositionContext ctx)
      Description copied from class: AbstractReader
      Determines the data format for the source. The returned format is used during composition to construct a ReadSource operator. If an implementation supports schema discovery, it must be performed in this method.
      Specified by:
      computeFormat in class AbstractReader
      Parameters:
      ctx - the composition context for the current invocation of AbstractReader.compose(CompositionContext)
      Returns:
      the source format to use
    • discoverMetadata

      public ORCMetadata discoverMetadata(FileClient client)
      Gets the metadata for the currently configured data source.
      Parameters:
      client - the file client
      Returns:
      the metadata of the source