Skip to content

feat: Aerospike backup reader and Aerospike-to-Bigtable adapter#185

Closed
prawilny wants to merge 7 commits into
GoogleCloudPlatform:mainfrom
Unoperate:aerospike_bigtable_migration_tools
Closed

feat: Aerospike backup reader and Aerospike-to-Bigtable adapter#185
prawilny wants to merge 7 commits into
GoogleCloudPlatform:mainfrom
Unoperate:aerospike_bigtable_migration_tools

Conversation

@prawilny
Copy link
Copy Markdown
Contributor

This PR adds tooling for Aerospike to Cloud Bigtable migration.

Co-authored-by: Kajetan Boroszko <kajetan@unoperate.com>
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a suite of tools for migrating data from Aerospike to Cloud Bigtable, including a data mapping adapter, a JNI-based backup loader, and a Kafka Connect Single Message Transformation for streaming replication. The review feedback identifies several areas for improvement: removing disruptive System.exit() calls from library components, addressing unsafe pointer usage and misleading error messages in the JNI layer, and correcting inaccurate Javadoc in value wrapper classes. Additionally, suggestions were provided to modernize the Dockerfile by replacing deprecated apt-key usage and to refine exception handling and string encoding for better performance and API consistency.

Comment on lines +57 to +63
try {
LOG.info("LOADING backupreader LIBRARY FROM {}...", System.mapLibraryName("backupreader"));
System.loadLibrary("backupreader");
} catch (Exception e) {
LOG.error("Error while loading the backupreader library", e);
System.exit(123);
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

Calling System.exit() in a library component is generally discouraged as it terminates the entire JVM, which can be disruptive in shared environments or managed platforms like Dataflow. It is better to let the error propagate naturally (e.g., as an UnsatisfiedLinkError).

    LOG.info("LOADING backupreader LIBRARY FROM {}...", System.mapLibraryName("backupreader"));
    System.loadLibrary("backupreader");

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done.

Comment on lines +124 to +125
RUN curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | \
apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

apt-key is deprecated. It is recommended to use gpg --dearmor and store the key in /usr/share/keyrings/.

RUN curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg

@brandtnewton
Copy link
Copy Markdown
Collaborator

Closing because #189 was merged in which is based off of this PR

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.

2 participants