@Test void testGetSchemaRegistryInstanceCount() { assertEquals(1, getSchemaRegistryInstanceCount(getTemplatePreparationObject(1))); assertEquals(2, getSchemaRegistryInstanceCount(getTemplatePreparationObject(1, 1))); assertEquals(5, getSchemaRegistryInstanceCount(getTemplatePreparationObject(2, 2, 1))); }
@VisibleForTesting static int getSchemaRegistryInstanceCount(TemplatePreparationObject source) { return source.getHostGroupsWithComponent(SchemaRegistryRoles.SCHEMA_REGISTRY_SERVER). collect(Collectors.summingInt(HostgroupView::getNodeCount)); }
SchemaRegistryJarStorageConfigProvider implements CmHostGroupRoleConfigProvider { @VisibleForTesting static int getSchemaRegistryInstanceCount(TemplatePreparationObject source) { return source.getHostGroupsWithComponent(SchemaRegistryRoles.SCHEMA_REGISTRY_SERVER). collect(Collectors.summingInt(HostgroupView::getNodeCount)); } }
SchemaRegistryJarStorageConfigProvider implements CmHostGroupRoleConfigProvider { @VisibleForTesting static int getSchemaRegistryInstanceCount(TemplatePreparationObject source) { return source.getHostGroupsWithComponent(SchemaRegistryRoles.SCHEMA_REGISTRY_SERVER). collect(Collectors.summingInt(HostgroupView::getNodeCount)); }  }
SchemaRegistryJarStorageConfigProvider implements CmHostGroupRoleConfigProvider { @VisibleForTesting static int getSchemaRegistryInstanceCount(TemplatePreparationObject source) { return source.getHostGroupsWithComponent(SchemaRegistryRoles.SCHEMA_REGISTRY_SERVER). collect(Collectors.summingInt(HostgroupView::getNodeCount)); }  @Override List<ApiClusterTemplateConfig> getRoleConfigs(String roleType, HostgroupView hostGroupView, TemplatePreparationObject source); @Override String getServiceType(); @Override Set<String> getRoleTypes(); @Override boolean sharedRoleType(String roleType); }
SchemaRegistryJarStorageConfigProvider implements CmHostGroupRoleConfigProvider { @VisibleForTesting static int getSchemaRegistryInstanceCount(TemplatePreparationObject source) { return source.getHostGroupsWithComponent(SchemaRegistryRoles.SCHEMA_REGISTRY_SERVER). collect(Collectors.summingInt(HostgroupView::getNodeCount)); }  @Override List<ApiClusterTemplateConfig> getRoleConfigs(String roleType, HostgroupView hostGroupView, TemplatePreparationObject source); @Override String getServiceType(); @Override Set<String> getRoleTypes(); @Override boolean sharedRoleType(String roleType); static final String CONFIG_JAR_STORAGE_DIRECTORY_PATH; static final String CONFIG_JAR_STORAGE_TYPE; }