@Test public void testGetSchemaRegistryRoleConfigs720() { String inputJson = loadBlueprint("7.2.0"); CmTemplateProcessor cmTemplateProcessor = new CmTemplateProcessor(inputJson); TemplatePreparationObject preparationObject = getTemplatePreparationObject(cmTemplateProcessor); List<ApiClusterTemplateConfig> roleConfigs = underTest.getRoleConfigs(SchemaRegistryRoles.SCHEMA_REGISTRY_SERVER, preparationObject); assertThat(roleConfigs).hasSameElementsAs(List.of( config(RANGER_PLUGIN_SR_SERVICE_NAME, GENERATED_RANGER_SERVICE_NAME))); }
@Override protected List<ApiClusterTemplateConfig> getRoleConfigs(String roleType, TemplatePreparationObject source) { String cdhVersion = source.getBlueprintView().getProcessor().getStackVersion() == null ? "" : source.getBlueprintView().getProcessor().getStackVersion(); if (isVersionNewerOrEqualThanLimited(cdhVersion, CLOUDERAMANAGER_VERSION_7_2_0)) { return List.of(config(RANGER_PLUGIN_SR_SERVICE_NAME, GENERATED_RANGER_SERVICE_NAME)); } else { RdsView schemaRegistryRdsView = getRdsView(source); return List.of( config("schema.registry.storage.connector.connectURI", schemaRegistryRdsView.getConnectionURL()), config("schema.registry.storage.connector.user", schemaRegistryRdsView.getConnectionUserName()), config("schema.registry.storage.connector.password", schemaRegistryRdsView.getConnectionPassword()) ); } }
SchemaRegistryServiceConfigProvider extends AbstractRdsRoleConfigProvider { @Override protected List<ApiClusterTemplateConfig> getRoleConfigs(String roleType, TemplatePreparationObject source) { String cdhVersion = source.getBlueprintView().getProcessor().getStackVersion() == null ? "" : source.getBlueprintView().getProcessor().getStackVersion(); if (isVersionNewerOrEqualThanLimited(cdhVersion, CLOUDERAMANAGER_VERSION_7_2_0)) { return List.of(config(RANGER_PLUGIN_SR_SERVICE_NAME, GENERATED_RANGER_SERVICE_NAME)); } else { RdsView schemaRegistryRdsView = getRdsView(source); return List.of( config("schema.registry.storage.connector.connectURI", schemaRegistryRdsView.getConnectionURL()), config("schema.registry.storage.connector.user", schemaRegistryRdsView.getConnectionUserName()), config("schema.registry.storage.connector.password", schemaRegistryRdsView.getConnectionPassword()) ); } } }
SchemaRegistryServiceConfigProvider extends AbstractRdsRoleConfigProvider { @Override protected List<ApiClusterTemplateConfig> getRoleConfigs(String roleType, TemplatePreparationObject source) { String cdhVersion = source.getBlueprintView().getProcessor().getStackVersion() == null ? "" : source.getBlueprintView().getProcessor().getStackVersion(); if (isVersionNewerOrEqualThanLimited(cdhVersion, CLOUDERAMANAGER_VERSION_7_2_0)) { return List.of(config(RANGER_PLUGIN_SR_SERVICE_NAME, GENERATED_RANGER_SERVICE_NAME)); } else { RdsView schemaRegistryRdsView = getRdsView(source); return List.of( config("schema.registry.storage.connector.connectURI", schemaRegistryRdsView.getConnectionURL()), config("schema.registry.storage.connector.user", schemaRegistryRdsView.getConnectionUserName()), config("schema.registry.storage.connector.password", schemaRegistryRdsView.getConnectionPassword()) ); } }  }
SchemaRegistryServiceConfigProvider extends AbstractRdsRoleConfigProvider { @Override protected List<ApiClusterTemplateConfig> getRoleConfigs(String roleType, TemplatePreparationObject source) { String cdhVersion = source.getBlueprintView().getProcessor().getStackVersion() == null ? "" : source.getBlueprintView().getProcessor().getStackVersion(); if (isVersionNewerOrEqualThanLimited(cdhVersion, CLOUDERAMANAGER_VERSION_7_2_0)) { return List.of(config(RANGER_PLUGIN_SR_SERVICE_NAME, GENERATED_RANGER_SERVICE_NAME)); } else { RdsView schemaRegistryRdsView = getRdsView(source); return List.of( config("schema.registry.storage.connector.connectURI", schemaRegistryRdsView.getConnectionURL()), config("schema.registry.storage.connector.user", schemaRegistryRdsView.getConnectionUserName()), config("schema.registry.storage.connector.password", schemaRegistryRdsView.getConnectionPassword()) ); } }  @Override List<ApiClusterTemplateConfig> getServiceConfigs(CmTemplateProcessor templateProcessor, TemplatePreparationObject source); @Override String getServiceType(); @Override List<String> getRoleTypes(); }
SchemaRegistryServiceConfigProvider extends AbstractRdsRoleConfigProvider { @Override protected List<ApiClusterTemplateConfig> getRoleConfigs(String roleType, TemplatePreparationObject source) { String cdhVersion = source.getBlueprintView().getProcessor().getStackVersion() == null ? "" : source.getBlueprintView().getProcessor().getStackVersion(); if (isVersionNewerOrEqualThanLimited(cdhVersion, CLOUDERAMANAGER_VERSION_7_2_0)) { return List.of(config(RANGER_PLUGIN_SR_SERVICE_NAME, GENERATED_RANGER_SERVICE_NAME)); } else { RdsView schemaRegistryRdsView = getRdsView(source); return List.of( config("schema.registry.storage.connector.connectURI", schemaRegistryRdsView.getConnectionURL()), config("schema.registry.storage.connector.user", schemaRegistryRdsView.getConnectionUserName()), config("schema.registry.storage.connector.password", schemaRegistryRdsView.getConnectionPassword()) ); } }  @Override List<ApiClusterTemplateConfig> getServiceConfigs(CmTemplateProcessor templateProcessor, TemplatePreparationObject source); @Override String getServiceType(); @Override List<String> getRoleTypes();  }