Search in sources :

Example 1 with SchemaRegistryStaticConfig

use of com.linkedin.databus2.schemas.SchemaRegistryStaticConfig in project databus by linkedin.

the class SchemaRegistryConfigBuilder method build.

@Override
public SchemaRegistryStaticConfig build() throws InvalidConfigException {
    RegistryType registryType = null;
    try {
        registryType = RegistryType.valueOf(_type);
    } catch (Exception e) {
        throw new InvalidConfigException("invalid schema registry type: " + _type);
    }
    _fileSystem.setEnabled(SchemaRegistryStaticConfig.RegistryType.FILE_SYSTEM == registryType);
    // TODO Add config verification
    return new SchemaRegistryStaticConfig(registryType, getFileSystem().build(), getExistingService());
}
Also used : RegistryType(com.linkedin.databus2.schemas.SchemaRegistryStaticConfig.RegistryType) InvalidConfigException(com.linkedin.databus.core.util.InvalidConfigException) InvalidConfigException(com.linkedin.databus.core.util.InvalidConfigException)

Aggregations

InvalidConfigException (com.linkedin.databus.core.util.InvalidConfigException)1 RegistryType (com.linkedin.databus2.schemas.SchemaRegistryStaticConfig.RegistryType)1