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

gh-209: Replace MockAccumuloStore usages in docs with MapStore #237

Merged
merged 5 commits into from
Nov 18, 2021

Conversation

t92549
Copy link
Contributor

@t92549 t92549 commented Sep 27, 2021

null

Related Issue

@t92549 t92549 marked this pull request as draft September 27, 2021 17:26
@t92549
Copy link
Contributor Author

t92549 commented Oct 1, 2021

Blocked until gchq/Gaffer#2520 is merged and pulled into gaffer-docs

@t92549 t92549 marked this pull request as ready for review October 22, 2021 15:35
@t92549 t92549 marked this pull request as draft October 22, 2021 17:25
@t92549 t92549 marked this pull request as ready for review November 3, 2021 16:21
@t92549
Copy link
Contributor Author

t92549 commented Nov 3, 2021

It is worth noting that as this replaces the MockAccumuloStore with the MapStore, a few features that were documented are not supported by the MapStore and therefore, the code was not run but just printed into the docs. These examples are all under the accumulo and spark operation examples, e.g.:

public void getElementsWithinSetOfVertices1And2And4() {
// ---------------------------------------------------------
final GetElementsBetweenSets operation = new GetElementsBetweenSets.Builder()
.input(new EntitySeed(1))
.inputB(new EntitySeed(2), new EntitySeed(4))
.build();
// ---------------------------------------------------------
showExample(operation, null);
print("The results are:\n");
print("```");
print("Entity[vertex=1,group=entity,properties=Properties[count=<java.lang.Integer>3]]\n" +
"Edge[source=1,destination=2,directed=true,matchedVertex=SOURCE,group=edge,properties=Properties[count=<java.lang.Integer>3]]\n" +
"Edge[source=1,destination=4,directed=true,matchedVertex=SOURCE,group=edge,properties=Properties[count=<java.lang.Integer>1]]");
print("```");
}

Here, the code is not run but the results that were generated are just printed. This is okay as the docs are soon to be all replaced with text anyway.

@t92549
Copy link
Contributor Author

t92549 commented Nov 3, 2021

The MapStore was chosen as the replacement instead of MiniAccumuloStores for a few reasons.
Firstly, MapStores are more lightweight to start up and the standard store for testing.
Secondly, the MiniAccumuloStore right now is a test dependency within Gaffer and it is awkward to directly import it and setup a MiniAccumuloCluster during the building of the docs, like how it works when the Gaffer tests run.

To accommodate these changes, a few parts of the docs had to be "faked" where the operations do not exist within the MapStore (see above #237 (comment)).
As well as this, it was discovered that a few parts of the MapStore had bugs in or did not behave the same as AccumuloStore, so these were fixed and released first: gchq/Gaffer#2421 and gchq/Gaffer#2519

@p3430233 p3430233 merged commit e038257 into master Nov 18, 2021
@t92549 t92549 deleted the gh-209-replace-mockaccumulo branch November 18, 2021 10:46
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.

Replace MockAccumuloStore usage
2 participants