Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create DatacenterAwareConfig to add Hosts in CQL Session Through ecc.yml #671

Closed
3 tasks done
VictorCavichioli opened this issue Jun 17, 2024 · 1 comment
Closed
3 tasks done
Assignees
Labels
enhancement New feature or request PoC/Agent Tasks related to new generation of ecchronos as an agent

Comments

@VictorCavichioli
Copy link
Contributor

VictorCavichioli commented Jun 17, 2024

Story Description:
Create new object in package com.ericsson.bss.cassandra.ecchronos.application.config.connection called DatacenterAwareConfig, it must represent the below configuration in ecc.yml:

connection:
  cql:
    datacenterAware:
      enabled: false
      datacenters:
      - name: datacenter1
        hosts:
        - host: 127.0.0.1
          port: 9042
        - host: 127.0.0.2
          port: 9042
        - host: 127.0.0.3
          port: 9042
        - host: 127.0.0.4
          port: 9042

connection.cql.datacenterAware.enabled must be false by default to avoid breaking the sidecar functionality; these described hosts will be added in the CQLSession on the application startup; in the a future task we'll create a new NativeConnectionProvider specific for the agent, which will be activated by the connection.cql.datacenterAware.enabled=true and connection.cql.provider=DatacenterNativeConnectionProvider.java, so to avoid future problems, expose the DatacenterAwareConfig in the NativeConnection.java class.

Acceptance Criteria:

  • DatacenterAwareConfig Designed as Described;
  • New TestConfig class created to specific Agent tests, also is proposed to change the old name of TestConfig to TestDefaultConfig or TestSidecarConfig;
  • Architecture documentation updated with new topics.

Definition of Done:

Code tested and approved by maintainers.

Notes:

Related to #652

@VictorCavichioli
Copy link
Contributor Author

VictorCavichioli commented Jun 20, 2024

After some discussions, we decided to change the configuration shape for the new below

agent:
      enabled: false
      type: datacenterAware
      contactPoints:
      - host: 127.0.0.1
        port: 9042
      - host: 127.0.0.2
        port: 9042
      datacenterAware:
        datacenters:
        - name: datacenter1
      rackAware:
        racks:
        - datacenterName: datacenter1
          rackName: rack1
      hostAware:
        hosts:
          - host: 127.0.0.1
            port: 9042
          - host: 127.0.0.2
            port: 9042
          - host: 127.0.0.3
            port: 9042
          - host: 127.0.0.4
            port: 9042

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request PoC/Agent Tasks related to new generation of ecchronos as an agent
Projects
None yet
Development

No branches or pull requests

1 participant