Class BaseJsonReader
java.lang.Object
org.apache.drill.exec.store.easy.json.reader.BaseJsonProcessor
org.apache.drill.exec.store.easy.json.reader.BaseJsonReader
- All Implemented Interfaces:
JsonProcessor
- Direct Known Subclasses:
CountingJsonReader
,JsonReader
Basic reader implementation for json documents.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.drill.exec.store.easy.json.reader.BaseJsonProcessor
BaseJsonProcessor.JsonExceptionProcessingState
Nested classes/interfaces inherited from interface org.apache.drill.exec.store.easy.json.JsonProcessor
JsonProcessor.ReadState
-
Field Summary
Fields inherited from class org.apache.drill.exec.store.easy.json.reader.BaseJsonProcessor
currentFieldName, lastSeenJsonToken, parser, workBuf
-
Constructor Summary
ConstructorDescriptionBaseJsonReader
(DrillBuf workBuf, boolean enableNanInf, boolean enableEscapeAnyChar, boolean skipOuterList) -
Method Summary
Modifier and TypeMethodDescriptionprotected UserException
write
(BaseWriter.ComplexWriter writer) protected abstract void
writeDocument
(BaseWriter.ComplexWriter writer, com.fasterxml.jackson.core.JsonToken t) Writes the contents of the json node starting with the specified token into a complex vector.Methods inherited from class org.apache.drill.exec.store.easy.json.reader.BaseJsonProcessor
getCurrentField, getDefaultMapper, getExceptionWithContext, getExceptionWithContext, ignoreJSONParseError, processJSONException, setIgnoreJSONParseErrors, setSource, setSource, 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
-
Constructor Details
-
BaseJsonReader
public BaseJsonReader(DrillBuf workBuf, boolean enableNanInf, boolean enableEscapeAnyChar, boolean skipOuterList)
-
-
Method Details
-
write
- Throws:
IOException
-
writeDocument
protected abstract void writeDocument(BaseWriter.ComplexWriter writer, com.fasterxml.jackson.core.JsonToken t) throws IOException Writes the contents of the json node starting with the specified token into a complex vector. Token can take the following values: - START_ARRAY - the top level of json document is an array and skipping of the outer list is disabled - START_OBJECT - the top level of json document is a set of white space delimited maps or skipping of the outer list is enabled- Throws:
IOException
-
createDocumentTopLevelException
-