public class LanceFileWriter extends Object implements AutoCloseable
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the LanceFileWriter
|
static LanceFileWriter |
open(String path,
org.apache.arrow.memory.BufferAllocator allocator,
org.apache.arrow.vector.dictionary.DictionaryProvider dictionaryProvider)
Open a LanceFileWriter to write to a given file URI
|
static LanceFileWriter |
open(String path,
org.apache.arrow.memory.BufferAllocator allocator,
org.apache.arrow.vector.dictionary.DictionaryProvider dictionaryProvider,
Map<String,String> storageOptions)
Open a LanceFileWriter to write to a given file URI
|
void |
write(org.apache.arrow.vector.VectorSchemaRoot batch)
Write a batch of data
|
public static LanceFileWriter open(String path, org.apache.arrow.memory.BufferAllocator allocator, org.apache.arrow.vector.dictionary.DictionaryProvider dictionaryProvider) throws IOException
path - the URI of the file to write toallocator - the BufferAllocator to use for the writerdictionaryProvider - the DictionaryProvider to use for the writerIOExceptionpublic static LanceFileWriter open(String path, org.apache.arrow.memory.BufferAllocator allocator, org.apache.arrow.vector.dictionary.DictionaryProvider dictionaryProvider, Map<String,String> storageOptions) throws IOException
path - the URI of the file to write toallocator - the BufferAllocator to use for the writerdictionaryProvider - the DictionaryProvider to use for the writerstorageOptions - additional storage options for the writerIOExceptionpublic void write(org.apache.arrow.vector.VectorSchemaRoot batch)
throws IOException
batch - the batch of data to writeIOException - if the batch cannot be writtenpublic void close()
throws Exception
This method must be called to release resources when the writer is no longer needed.
This method will also flush all remaining data and write the footer to the file.
close in interface AutoCloseableException - if the writer cannot be closedCopyright © 2025. All rights reserved.