Skip to content

DO NOT MERGE: test CI for aerospike_bigtable_bigration_tools#7

Closed
prawilny wants to merge 57 commits into
mainfrom
ac/aerospike_bigtable_migration_tools/1
Closed

DO NOT MERGE: test CI for aerospike_bigtable_bigration_tools#7
prawilny wants to merge 57 commits into
mainfrom
ac/aerospike_bigtable_migration_tools/1

Conversation

@prawilny

@prawilny prawilny commented Apr 17, 2026

Copy link
Copy Markdown
Collaborator

This change is Reviewable

The project consists of the following Maven submodules:

### Adapter
Defines a transformation of Aerospike entities as Bigtable entities and provides utilities for doing the conversion.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Defines the transformation of Aerospike entities into Bigtable entities and provides utilities for performing it.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done (s/bigtable/cloud bigtable/)


The important classes are:
- [`RowBuilder`](adapter/src/main/java/com/google/cloud/aerospike/RowBuilder.java): The definition of the transformation of Aerospike entities into Bigtable ones.
- [`BigtableMutationBuilder`](adapter/src/main/java/com/google/cloud/aerospike/BigtableMutationBuilder.java): A builder allowing the user to create Bigtable mutations transforming input Aerospike records as Bigtable rows,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

into Bigtable rows

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Come to think of it, the whole sentence needs a rewrite:
A builder for creating Bigtable mutations from Aerospike records.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I did it slightly differently, but close enough, I hope

### Backup Loader
Implements [`BackupReader`](backup-loader/src/main/java/com/google/cloud/aerospike/BackupReader.java), a reader of Aerospike backups.

Note that it is implemented by interfacing with the official [`aerospike-tools-backup`](https://github.com/aerospike/aerospike-tools-backup) library using Java Native Interface.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Note that it is implemented by using the official aerospike-tools-backup library via Java Native Interface.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done.

#### Dependencies
The Java `BackupReader` class requires a compiled native shared library to be present on the host (see [Dockerfile](Dockerfile)'s `dataflow-worker` target for an example how to satisfy this requirement).

The build process of that library is quite involved (see [Dockerfile](Dockerfile) and [backup-loader's pom.xml](backup-loader/pom.xml) for details) and the compilation of `backup-loader` will fail if the requirements are not met.

@jakubUrbanowicz jakubUrbanowicz Apr 17, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

First part is not needed. Let's do:
For the details of the build process see...

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Again, come to think of it:
'backup-loader' should be built in the Docker container of the project, for details see...

So let's get rid of the next sentence as well

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done.

The build process of that library is quite involved (see [Dockerfile](Dockerfile) and [backup-loader's pom.xml](backup-loader/pom.xml) for details) and the compilation of `backup-loader` will fail if the requirements are not met.
In practice, `backup-loader` can only be built in the Docker container of the project.

All the other modules are pure Java and easy to build in any environment with supported Java and Maven versions.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

'and easy to build' -> 'and can be built'

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done.

All the other modules are pure Java and easy to build in any environment with supported Java and Maven versions.

### Backup Loader Examples
Contains runnable snippets exemplifying use of `BackupReader` and some scripts and config files useful for generating the backups needed for testing.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Contains runnable examples of BackupReader usage, along with scripts and config files for generating test backups.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done.

It also documents how to build both the project and the dependencies.

## Workflow
[Justfile](./Justfile) is an index of interesting commands and shortcuts to running them.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

shortcuts for running

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done.


#### Build and stage the template
In this step we build and publish (into buckets and registries configured by the arguments):
- Fat jar of the Dataflow template

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Uber-jar

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done

```bash
mvn clean package -pl adapter,replicator -DskipUnitTests
```
Copy the fat .jar from `replicator/target`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

remove 'fat'

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done


Also mind the `--dns` flag described in [Authentication](#authentication) section.

Clone the `DataflowTemplates` repo somewhere and start the container with:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

remove 'somewhere'

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done

@prawilny prawilny closed this Apr 20, 2026
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