Class CustomPatternCsvOld.CustomMatcherCsv

java.lang.Object
net.sansa_stack.hadoop.core.pattern.CustomMatcherBase
net.sansa_stack.hadoop.core.pattern.CustomPatternCsvOld.CustomMatcherCsv
All Implemented Interfaces:
MatchResult, CustomMatcher
Enclosing class:
CustomPatternCsvOld

public class CustomPatternCsvOld.CustomMatcherCsv extends CustomMatcherBase
  • Field Details

    • newlineMatchStart

      protected int newlineMatchStart
    • nextQuoteExamined

      protected boolean nextQuoteExamined
    • nextQuoteEnd

      protected int nextQuoteEnd
    • nextQuoteStart

      protected int nextQuoteStart
  • Constructor Details

    • CustomMatcherCsv

      public CustomMatcherCsv(CharSequence charSequence)
  • Method Details

    • find

      public boolean find()
      The find method operates as follows: 1.) set startPos to 0 2.) Find the first character after a newline after startPos - save this position and candidatePos 3.) Verify that the newline is a new row start: Check backwards up to the startPos (not exceeding it) - if there is no start of an escaped field then the newline is a row start and break 4.) Set startPos to candidatePos and got to 2 Notes: - An empty quoted field: Assume the following data: "","",hello "",""$ The issue is that a quoted empty field may look exactly like an escaped double quote.
    • start

      public int start()
    • end

      public int end()
    • group

      public String group()