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
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected intprotected booleanprotected intFields inherited from class net.sansa_stack.hadoop.core.pattern.CustomMatcherBase
charSequence, pos, regionEnd, regionStart -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintend()booleanfind()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.group()intstart()Methods inherited from class net.sansa_stack.hadoop.core.pattern.CustomMatcherBase
end, end, group, groupCount, region, start, start
-
Field Details
-
newlineMatchStart
protected int newlineMatchStart -
nextQuoteExamined
protected boolean nextQuoteExamined -
nextQuoteEnd
protected int nextQuoteEnd -
nextQuoteStart
protected int nextQuoteStart
-
-
Constructor Details
-
CustomMatcherCsv
-
-
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
-