java.lang.Object
org.apache.arrow.vector.ipc.JsonFileWriter
- All Implemented Interfaces:
AutoCloseable
A writer that converts binary Vectors into an internal, unstable JSON format suitable
for integration testing.
This writer does NOT implement a JSON dataset format like JSONL.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Configuration POJO for writing JSON files. -
Constructor Summary
ConstructorDescriptionJsonFileWriter
(File outputFile) Constructs a new writer that will output tooutputFile
.JsonFileWriter
(File outputFile, JsonFileWriter.JSONWriteConfig config) Constructs a new writer that will output tooutputFile
with the given options. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
config()
void
start
(Schema schema, DictionaryProvider provider) Writes out the "header" of the file including the schema and any dictionaries required.void
write
(VectorSchemaRoot recordBatch) Writes the record batch to the JSON file.
-
Constructor Details
-
JsonFileWriter
Constructs a new writer that will output tooutputFile
.- Throws:
IOException
-
JsonFileWriter
Constructs a new writer that will output tooutputFile
with the given options.- Throws:
IOException
-
-
Method Details
-
config
-
start
Writes out the "header" of the file including the schema and any dictionaries required.- Throws:
IOException
-
write
Writes the record batch to the JSON file.- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Throws:
IOException
-