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

Cu 86bz3yh3v linker cluster mode #268

Merged
merged 8 commits into from
Jul 8, 2024

Conversation

martino-jembi
Copy link
Contributor

@martino-jembi martino-jembi commented Jul 8, 2024

Summary by CodeRabbit

  • New Features

    • Implemented partition key generation using Soundex for Kafka topics.
    • Added a structured configuration format for data linkage operations.
  • Improvements

    • Modified Kafka Bootstrap configuration to increase partition count from 1 to 30.
    • Updated Docker stack and environment configurations to use a scalable SCALE_LINKER variable.
  • Bug Fixes

    • Improved logging and error handling in interaction stream management.
    • Corrected partition assignment logic in topic configuration scripts.

@rcrichton
Copy link
Member

Task linked: CU-86bz3yh3v Linker Cluster Mode

Copy link
Contributor

coderabbitai bot commented Jul 8, 2024

Warning

Review failed

The pull request is closed.

Walkthrough

This update mainly focuses on enhancing configuration flexibility and logging across various components of the JeMPI applications. Key improvements include utilizing Soundex for Kafka partition keys, adding environment variables for scaling, modifying the number of Kafka partitions, updating Docker stack configurations, and enhancing logging for better traceability.

Changes

File(s) Change Summary
Main.java Introduced Soundex for Kafka partition key generation. Added related import statement.
kafkaBootStrapConfig.json Updated partition value for "JeMPI-interaction-linker" topic to 30.
SPInteractions.java Added a debug log statement in the open method; commented out closeInteractionStream() call.
SPMU.java Added UUID for APPLICATION_ID_CONFIG; updated installMU with error handling and debug messages.
Various scripts (Linux, WSL) Added SCALE_LINKER environment variable set to 1.
docker-stack-*.yml Updated replicas value to use ${SCALE_LINKER} variable instead of hardcoded 1.
config-reference-link-dp-minimal.json New configuration file defining fields for interactions, golden records, nodes, demographics, and rules.
config.json Renamed to config-reference-link-dp-minimal.json.
topics-config.sh Modified PARTITIONS array to use ${SCALE_LINKER:-1}.
Various files in conf-env-*.template Added export of SCALE_LINKER environment variable.
create-env-linux-*.sh Added declaration of SCALE_LINKER with value 1.

Poem

In code we trust, we scale with might,
Variables set to guide our flight.
Kafka partitions now much more,
Logs will tell, what’s at the core.
With Soundex keys we now align,
Data flows will be just fine.
From Docker stacks to scripts we tweak,
Simpler, clearer, changes speak.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 82a7950 and 0c1ec74.

Files selected for processing (20)
  • JeMPI_Apps/JeMPI_AsyncReceiver/src/main/java/org/jembi/jempi/async_receiver/Main.java (3 hunks)
  • JeMPI_Apps/JeMPI_Bootstrapper/src/main/resources/data/kafka/kafkaBootStrapConfig.json (1 hunks)
  • JeMPI_Apps/JeMPI_Linker/src/main/java/org/jembi/jempi/linker/SPInteractions.java (1 hunks)
  • JeMPI_Apps/JeMPI_Linker/src/main/java/org/jembi/jempi/linker/SPMU.java (3 hunks)
  • devops/linux/docker/conf/env/create-env-linux-high-1.sh (1 hunks)
  • devops/linux/docker/conf/env/create-env-linux-low-1.sh (1 hunks)
  • devops/linux/docker/conf/env/create-env-wsl-low-1.sh (1 hunks)
  • devops/linux/docker/conf/stack/docker-stack-high-1.yml (1 hunks)
  • devops/linux/docker/conf/stack/docker-stack-low-1.yml (1 hunks)
  • devops/linux/docker/data-config/config-reference-link-dp-minimal.json (1 hunks)
  • devops/linux/docker/data-config/config.json (1 hunks)
  • devops/linux/docker/helper/topics/topics-config.sh (1 hunks)
  • devops/windows/base-docker-linux/conf/env/conf-env-high-1-pc.template (1 hunks)
  • devops/windows/base-docker-linux/conf/env/conf-env-low-1-pc.template (1 hunks)
  • devops/windows/base-docker-linux/conf/env/create-env-linux-high-1.sh (1 hunks)
  • devops/windows/base-docker-linux/conf/env/create-env-linux-low-1.sh (1 hunks)
  • devops/windows/base-docker-wsl/conf/env/conf-env-high-1-pc.template (1 hunks)
  • devops/windows/base-docker-wsl/conf/env/conf-env-low-1-pc.template (1 hunks)
  • devops/windows/base-docker-wsl/conf/env/create-env-linux-high-1.sh (1 hunks)
  • devops/windows/base-docker-wsl/conf/env/create-env-linux-low-1.sh (1 hunks)
Files skipped from review due to trivial changes (13)
  • JeMPI_Apps/JeMPI_Bootstrapper/src/main/resources/data/kafka/kafkaBootStrapConfig.json
  • devops/linux/docker/conf/env/create-env-linux-high-1.sh
  • devops/linux/docker/conf/env/create-env-linux-low-1.sh
  • devops/linux/docker/conf/env/create-env-wsl-low-1.sh
  • devops/linux/docker/data-config/config.json
  • devops/windows/base-docker-linux/conf/env/conf-env-high-1-pc.template
  • devops/windows/base-docker-linux/conf/env/conf-env-low-1-pc.template
  • devops/windows/base-docker-linux/conf/env/create-env-linux-high-1.sh
  • devops/windows/base-docker-linux/conf/env/create-env-linux-low-1.sh
  • devops/windows/base-docker-wsl/conf/env/conf-env-high-1-pc.template
  • devops/windows/base-docker-wsl/conf/env/conf-env-low-1-pc.template
  • devops/windows/base-docker-wsl/conf/env/create-env-linux-high-1.sh
  • devops/windows/base-docker-wsl/conf/env/create-env-linux-low-1.sh
Additional comments not posted (13)
devops/linux/docker/helper/topics/topics-config.sh (1)

31-31: LGTM!

The dynamic assignment of partitions using the SCALE_LINKER environment variable is a good practice for configurability.

JeMPI_Apps/JeMPI_Linker/src/main/java/org/jembi/jempi/linker/SPMU.java (3)

61-64: LGTM!

The added debug messages and error handling improve the maintainability and robustness of the function.


68-68: LGTM!

The added error handling ensures that the function gracefully handles exceptions.


98-98: LGTM!

Appending a UUID to the APPLICATION_ID_CONFIG ensures that each instance of the application has a unique ID, which is important for distributed systems.

JeMPI_Apps/JeMPI_Linker/src/main/java/org/jembi/jempi/linker/SPInteractions.java (1)

81-82: Verify the necessity of commenting out this.closeInteractionStream();.

Commenting out this.closeInteractionStream(); might cause resource leaks. Ensure that it's necessary to keep it commented out.

devops/linux/docker/data-config/config-reference-link-dp-minimal.json (4)

2-29: LGTM!

The auxiliary interaction fields are well-defined with their respective types and sources.


31-56: LGTM!

The auxiliary golden record fields are well-defined with their respective types and sources.


58-76: LGTM!

The additional nodes are well-defined with their respective fields and sources.


79-222: LGTM!

The demographic fields and linking rules are well-defined with their respective types, sources, and metadata.

JeMPI_Apps/JeMPI_AsyncReceiver/src/main/java/org/jembi/jempi/async_receiver/Main.java (2)

17-17: Import statement is correct.

The Soundex import from org.apache.commons.codec.language is correctly added to support the new functionality.


Line range hint 158-192: Usage of Soundex for partition keys is appropriate.

The Soundex class is used correctly to generate partition keys based on given and family names. The logic and logging statements are sound.

devops/linux/docker/conf/stack/docker-stack-low-1.yml (1)

415-415: Enhanced configurability for linker replicas.

The change to use ${SCALE_LINKER} for the replicas value of the linker service enhances configurability.

devops/linux/docker/conf/stack/docker-stack-high-1.yml (1)

607-607: Enhanced configurability for linker replicas.

The change to use ${SCALE_LINKER} for the replicas value of the linker service enhances configurability.

@MatthewErispe MatthewErispe merged commit f4021dc into dev Jul 8, 2024
1 check passed
@MatthewErispe MatthewErispe deleted the CU-86bz3yh3v_Linker-Cluster-Mode branch July 8, 2024 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants