Class RegexParser
java.lang.Object
org.apache.druid.java.util.common.parsers.RegexParser
-
Constructor Summary
ConstructorsConstructorDescriptionRegexParser(String pattern, com.google.common.base.Optional<String> listDelimiter) RegexParser(String pattern, com.google.common.base.Optional<String> listDelimiter, Iterable<String> fieldNames) -
Method Summary
Modifier and TypeMethodDescriptionReturns the fieldNames that we expect to see in parsed Maps, if known, or null otherwise.parseToMap(String input) Parse a String into a Map.voidsetFieldNames(Iterable<String> fieldNames) Set the fieldNames that you expect to see in parsed Maps.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.druid.java.util.common.parsers.Parser
startFileFromBeginning
-
Constructor Details
-
RegexParser
-
RegexParser
-
-
Method Details
-
parseToMap
Description copied from interface:ParserParse a String into a Map. The result can be null which means the given input string will be ignored.- Specified by:
parseToMapin interfaceParser<String,Object>
-
setFieldNames
Description copied from interface:ParserSet the fieldNames that you expect to see in parsed Maps. Deprecated; Parsers should not, in general, be expected to know what fields they will return. Some individual types of parsers do need to know (like a TSV parser) and those parsers have their own way of setting field names.- Specified by:
setFieldNamesin interfaceParser<String,Object>
-
getFieldNames
Description copied from interface:ParserReturns the fieldNames that we expect to see in parsed Maps, if known, or null otherwise. Deprecated; Parsers should not, in general, be expected to know what fields they will return.- Specified by:
getFieldNamesin interfaceParser<String,Object>
-