Class SplitParsingException

All Implemented Interfaces:
Serializable

public class SplitParsingException extends DRException
Indicates a parsing error on a data split. The exception always contains:
  • the path of the data source
  • the offset into the data source; this information may be an approximation
It may also contain additional information about the error, such as the index of record and field being parsed.
See Also:
  • Constructor Details

    • SplitParsingException

      public SplitParsingException(DataSplit split, Exception e)
      Report a parse error in the specified split at the given location, possibly approximate. Locations may be approximate when parsing text data.
      Parameters:
      split - the split being parsed
      e - the underlying cause of the error
  • Method Details

    • getMessage

      public String getMessage()
      Overrides:
      getMessage in class Throwable
    • getSource

      public String getSource()
      Gets a string describing the data source of the split. Generally, this is a file path.
      Returns:
      the description of the data source
    • getSplitStart

      public long getSplitStart()
    • getOffsetInSplit

      public long getOffsetInSplit()
      Gets the byte offset into the data source at which the error was found. This may be an approximate offset.
      Returns:
      the error's location in the source
    • setOffsetInSplit

      public void setOffsetInSplit(long offset)
      Sets the index of the record raising the error.
      Parameters:
      record - the record index