Configuration
With Kattlo you are able to use human readable notation to declare resources migrations and rules.
Table of contents
Initialization
To initialize new Kattlo project you just run the following command:
kattlo init --directory='/path/to/initialize'
Use the --bootstrap-servers
to generate the Kattlo config with right Kafka addresses:
kattlo --bootstrap-servers='my-kafka-b1:9092,my-kafka-b2:9092' \
init --directory='/path/to/initialize'
If you suppress the
--directory
option, the current folder will be initialized.
Available Notations for Human Readable
- name regex pattern
- time: transformed to millis
seconds
orsecond
minutes
orminute
hours
orhour
days
orday
- size: transformed to bytes
KiB
MiB
GiB
- math: transformed to floating point number between
0
and1
%
For bytes Kattlo uses the quibibyte notation
Examples:
1day
will be transformed in86400000
milliseconds2seconds
in2000
milliseconds1hour
in3600000
milliseconds1KiB
in1024
bytes50%
in0.5
--config-file
Relative or absolute path to Kattlo’s configuration file.
In the .kattlo.yaml
configuration file you may define the following properties or use the init command to generate it.
Example of .kattlo.yaml
rules:
topic:
namePattern: 'your pattern'
# more rules constraints...
--kafka-config-file
Relative or absolute path to Apache Kafka® configuration file used by Kattlo to perform Admin, Producer and Consumer operations.
Created by init command too
You may put the properties described at official documentation.
Example of kafka.properties
:
bootstrap.servers=localhost:19092,localhost:29092
client.id=kattlo-cli