Generator configuration
maxBytes
Commentary
added in 0.8.9
local configuration
The maximum number of bytes this generator will write to its connection. Bytes are measured in serialized form, just before each event is sent over the network.
Note this configuration is only available for Kafka, S3, Google Cloud Storage, Azure Blob Storage, file system, and webhook connection types. It is currently a no-op on all other connections.
Examples
Local configuration
Use localConfigs
to set maxBytes
for the generator. This generator will stop after writing 1 gigabyte of data to the target directory.
{
"generators": [
{
"fileName": "foo",
"fileConfigs": {
"format": "json"
},
"data": {
"x": {
"_gen": "oneOf",
"choices": [
1,
2,
3
]
}
},
"localConfigs": {
"maxBytes": 1073741824
}
}
],
"connections": {
"fs": {
"kind": "fileSystem",
"path": "/path/to/dir"
}
}
}
Specification
JSON schema
{
"type": "integer",
"minimum": 1
}