Class BaseJsonProcessor
java.lang.Object
org.apache.drill.exec.store.easy.json.reader.BaseJsonProcessor
- All Implemented Interfaces:
JsonProcessor
- Direct Known Subclasses:
BaseJsonReader
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.apache.drill.exec.store.easy.json.JsonProcessor
JsonProcessor.ReadState -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBaseJsonProcessor(DrillBuf workBuf, boolean enableNanInf, boolean enableEscapeAnyChar) -
Method Summary
Modifier and TypeMethodDescriptionprotected Stringstatic com.fasterxml.jackson.databind.ObjectMappergetExceptionWithContext(Throwable e, String message) getExceptionWithContext(UserException.Builder builder, String message) booleanvoidsetIgnoreJSONParseErrors(boolean ignoreJSONParseErrors) voidsetSource(com.fasterxml.jackson.databind.JsonNode node) voidsetSource(InputStream is) toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.drill.exec.store.easy.json.JsonProcessor
ensureAtLeastOneField, write
-
Field Details
-
parser
protected com.fasterxml.jackson.core.JsonParser parser -
workBuf
-
lastSeenJsonToken
protected com.fasterxml.jackson.core.JsonToken lastSeenJsonToken -
currentFieldName
The name of the current field being parsed. For Error messages.
-
-
Constructor Details
-
BaseJsonProcessor
-
-
Method Details
-
getDefaultMapper
public static com.fasterxml.jackson.databind.ObjectMapper getDefaultMapper()- Returns:
- Default json mapper
-
ignoreJSONParseError
public boolean ignoreJSONParseError()- Specified by:
ignoreJSONParseErrorin interfaceJsonProcessor
-
setIgnoreJSONParseErrors
public void setIgnoreJSONParseErrors(boolean ignoreJSONParseErrors) - Specified by:
setIgnoreJSONParseErrorsin interfaceJsonProcessor
-
setSource
- Specified by:
setSourcein interfaceJsonProcessor- Throws:
IOException
-
setSource
public void setSource(com.fasterxml.jackson.databind.JsonNode node) - Specified by:
setSourcein interfaceJsonProcessor
-
toString
-
getExceptionWithContext
- Specified by:
getExceptionWithContextin interfaceJsonProcessor
-
getExceptionWithContext
- Specified by:
getExceptionWithContextin interfaceJsonProcessor
-
processJSONException
- Throws:
IOException
-
getCurrentField
-