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 classes/interfaces inherited from interface org.apache.drill.exec.store.easy.json.JsonProcessor
JsonProcessor.ReadState
-
Field Summary
-
Constructor Summary
ConstructorDescriptionBaseJsonProcessor
(DrillBuf workBuf, boolean enableNanInf, boolean enableEscapeAnyChar) -
Method Summary
Modifier and TypeMethodDescriptionprotected String
static com.fasterxml.jackson.databind.ObjectMapper
getExceptionWithContext
(Throwable e, String message) getExceptionWithContext
(UserException.Builder builder, String message) boolean
void
setIgnoreJSONParseErrors
(boolean ignoreJSONParseErrors) void
setSource
(com.fasterxml.jackson.databind.JsonNode node) void
setSource
(InputStream is) toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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:
ignoreJSONParseError
in interfaceJsonProcessor
-
setIgnoreJSONParseErrors
public void setIgnoreJSONParseErrors(boolean ignoreJSONParseErrors) - Specified by:
setIgnoreJSONParseErrors
in interfaceJsonProcessor
-
setSource
- Specified by:
setSource
in interfaceJsonProcessor
- Throws:
IOException
-
setSource
public void setSource(com.fasterxml.jackson.databind.JsonNode node) - Specified by:
setSource
in interfaceJsonProcessor
-
toString
-
getExceptionWithContext
- Specified by:
getExceptionWithContext
in interfaceJsonProcessor
-
getExceptionWithContext
- Specified by:
getExceptionWithContext
in interfaceJsonProcessor
-
processJSONException
- Throws:
IOException
-
getCurrentField
-