Skip to content

Use Accumulo in Docker for unit tests#5598

Merged
kokosing merged 1 commit intotrinodb:masterfrom
adamjshook:accumulo-docker
Nov 5, 2020
Merged

Use Accumulo in Docker for unit tests#5598
kokosing merged 1 commit intotrinodb:masterfrom
adamjshook:accumulo-docker

Conversation

@adamjshook
Copy link
Member

This commit removes MiniAccumuloCluster in favor of a Docker container for Accumulo.

Depends on trinodb/docker-images#74 -- CI will fail until this is merged/released

@cla-bot cla-bot bot added the cla-signed label Oct 19, 2020
@adamjshook adamjshook requested a review from electrum October 19, 2020 13:52
Copy link
Member

Choose a reason for hiding this comment

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

Do we still need a singleton? It would be nice to have it as regular closeable resource instead.

Copy link
Member Author

Choose a reason for hiding this comment

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

No, not needed. I can create a TestingAccumuloServer and refactor the tests to use it to be more similar to how the other connectors work.

Copy link
Member Author

Choose a reason for hiding this comment

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

Turns out it is needed after all due to the fixed ports, multiple containers try to spawn at the same time and it fails. If I try a lock approach so only one container runs at a time, one of the test framework classes (distributed/integration smoke test) inexplicable fail because they are unable to connect to Accumulo once a new container is spawned.

I suggest with stick with the Singleton -- I'll still refactor into a TestingAccumuloServer for cleanliness.

Copy link
Member

@electrum electrum left a comment

Choose a reason for hiding this comment

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

Nice work!

Copy link
Member

Choose a reason for hiding this comment

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

Using a singleton for now is fine as a transition from the old way, but we should move to a model where the Accumulo cluster is managed by AccumuloQueryRunner, the same way we do for other testing services. Shutting down resources immediately is useful since the CI machines can be resource constrained, and using a non-singleton allows things like testing multiple versions, testing with different config, etc.

Add a TODO here to make this not a singleton.

Copy link
Member

Choose a reason for hiding this comment

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

but we should move to a model where the Accumulo cluster is managed by AccumuloQueryRunner,

Let's create a github issue for this and add TODO comment (with link to the issue to the code).

@adamjshook
Copy link
Member Author

@electrum Is this good to merge?

Copy link
Member

Choose a reason for hiding this comment

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

we still need to close https://github.com/prestosql/docker-images/pull/74

Copy link
Member

Choose a reason for hiding this comment

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

It is released, pleased update to prestodev/accumulo:35

Copy link
Member

Choose a reason for hiding this comment

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

Please remove the comment

Copy link
Member Author

Choose a reason for hiding this comment

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

🤦‍♂️

Copy link
Member

Choose a reason for hiding this comment

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

but we should move to a model where the Accumulo cluster is managed by AccumuloQueryRunner,

Let's create a github issue for this and add TODO comment (with link to the issue to the code).

@kokosing kokosing merged commit addd623 into trinodb:master Nov 5, 2020
@kokosing
Copy link
Member

kokosing commented Nov 5, 2020

Merged, thanks.

@adamjshook adamjshook deleted the accumulo-docker branch November 5, 2020 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

4 participants