Search in sources :

Example 1 with ConfigModels

use of io.strimzi.kafka.config.model.ConfigModels in project strimzi by strimzi.

the class KafkaConfigModelGenerator method main.

public static void main(String[] args) throws Exception {
    String version = kafkaVersion();
    Map<String, ConfigModel> configs = configs();
    ObjectMapper mapper = new ObjectMapper().enable(SerializationFeature.INDENT_OUTPUT).enable(MapperFeature.SORT_PROPERTIES_ALPHABETICALLY);
    ConfigModels root = new ConfigModels();
    root.setVersion(version);
    root.setConfigs(configs);
    mapper.writeValue(new File(args[0]), root);
}
Also used : ConfigModel(io.strimzi.kafka.config.model.ConfigModel) ConfigModels(io.strimzi.kafka.config.model.ConfigModels) File(java.io.File) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper)

Example 2 with ConfigModels

use of io.strimzi.kafka.config.model.ConfigModels in project strimzi-kafka-operator by strimzi.

the class KafkaConfigModelGenerator method main.

public static void main(String[] args) throws Exception {
    String version = kafkaVersion();
    Map<String, ConfigModel> configs = configs();
    ObjectMapper mapper = new ObjectMapper().enable(SerializationFeature.INDENT_OUTPUT).enable(MapperFeature.SORT_PROPERTIES_ALPHABETICALLY);
    ConfigModels root = new ConfigModels();
    root.setVersion(version);
    root.setConfigs(configs);
    mapper.writeValue(new File(args[0]), root);
}
Also used : ConfigModel(io.strimzi.kafka.config.model.ConfigModel) ConfigModels(io.strimzi.kafka.config.model.ConfigModels) File(java.io.File) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper)

Aggregations

ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)2 ConfigModel (io.strimzi.kafka.config.model.ConfigModel)2 ConfigModels (io.strimzi.kafka.config.model.ConfigModels)2 File (java.io.File)2