private void initializeKeyspace()

in service/src/main/java/org/apache/fineract/cn/provisioner/internal/service/TenantService.java [88:107]


  private void initializeKeyspace(final @Nonnull Tenant tenant) {
    final DataStoreOption dataStoreOption = provisionerProperties.getDataStoreOption();
    if (dataStoreOption.isEnabled(DataStoreOption.CASSANDRA)) {
      final CassandraConnectionInfo cassandraConnectionInfo = tenant.getCassandraConnectionInfo();

      final TenantEntity tenantEntity = new TenantEntity();
      tenantEntity.setIdentifier(tenant.getIdentifier());
      tenantEntity.setClusterName(cassandraConnectionInfo.getClusterName());
      tenantEntity.setContactPoints(cassandraConnectionInfo.getContactPoints());
      tenantEntity.setKeyspaceName(cassandraConnectionInfo.getKeyspace());
      tenantEntity.setReplicationType(cassandraConnectionInfo.getReplicationType());
      tenantEntity.setReplicas(cassandraConnectionInfo.getReplicas());
      tenantEntity.setName(tenant.getName());
      tenantEntity.setDescription(tenant.getDescription());
      tenantEntity.setIdentityManagerApplicationName(null); //Identity manager can't be spun up till the org.apache.fineract.cn.provisioner.tenant is provisioned.
      tenantEntity.setIdentityManagerApplicationUri(null); //Identity manager can't be spun up till the org.apache.fineract.cn.provisioner.tenant is provisioned.

      tenantCassandraRepository.create(tenantEntity);
    }
  }