File¶
The file
sink writes streamed data items to files within a specified directory.
Each worker will write data to a different file with a unique random name.
As a result it supports parallelism higher than 1
.
All strings are printed using UTF-8
. The file is not f-synced
.
FileSink<String> sink = new FileSink<>("/path/to/output/directory");
sink:
file:
dirPath: "/path/to/output/directory"
Properties¶
dirPath
¶
Path to the output directory. Required.
Type: string
delimiter
¶
Event delimiter that will be appended to the file between writing consecutive events.
Type: string
encoder
¶
Code that converts incoming elements to bytes for writing into the file.
Type: object
Java dependency management¶
Add this declaration to your dependency management system to access the configuration DSL for this plugin in Java.
<dependency>
<groupId>org.voltdb</groupId>
<artifactId>volt-stream-connectors-api</artifactId>
<version>1.4.0</version>
</dependency>
implementation group: 'org.voltdb', name: 'volt-stream-connectors-api', version: '1.4.0'