From b618f792f6a78785c7bc83a3b9af0e8e945f9512 Mon Sep 17 00:00:00 2001 From: GCHQDeveloper314 <94527357+GCHQDeveloper314@users.noreply.github.com> Date: Mon, 7 Feb 2022 14:08:48 +0000 Subject: [PATCH 1/3] Replace use of SplitStore (which has been removed) with SplitStoreFromFile --- .../performancetesting/ingest/AccumuloElementIngestTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/performance-testing/performance-testing-accumulo-store/src/main/java/uk/gov/gchq/gaffer/accumulostore/performancetesting/ingest/AccumuloElementIngestTest.java b/performance-testing/performance-testing-accumulo-store/src/main/java/uk/gov/gchq/gaffer/accumulostore/performancetesting/ingest/AccumuloElementIngestTest.java index 2ce466e77..b5ae466c8 100644 --- a/performance-testing/performance-testing-accumulo-store/src/main/java/uk/gov/gchq/gaffer/accumulostore/performancetesting/ingest/AccumuloElementIngestTest.java +++ b/performance-testing/performance-testing-accumulo-store/src/main/java/uk/gov/gchq/gaffer/accumulostore/performancetesting/ingest/AccumuloElementIngestTest.java @@ -30,7 +30,7 @@ import uk.gov.gchq.gaffer.graph.Graph; import uk.gov.gchq.gaffer.hdfs.operation.SampleDataForSplitPoints; import uk.gov.gchq.gaffer.operation.OperationException; -import uk.gov.gchq.gaffer.operation.impl.SplitStore; +import uk.gov.gchq.gaffer.operation.impl.SplitStoreFromFile; import uk.gov.gchq.gaffer.performancetesting.ingest.ElementIngestTest; import uk.gov.gchq.gaffer.randomelementgeneration.generator.ElementGeneratorFromSupplier; import uk.gov.gchq.gaffer.serialisation.ToBytesSerialiser; @@ -139,7 +139,7 @@ protected void run() throws OperationException { } else { // Add the splits point to the table LOGGER.info("Adding split points to table"); - final SplitStore splitTable = new SplitStore.Builder() + final SplitStoreFromFile splitTable = new SplitStoreFromFile.Builder() .inputPath(splitsFile) .build(); accumuloStore.execute(splitTable, new Context()); From 412904fc4b831dae8d44efc4b29ae7e9170a2a59 Mon Sep 17 00:00:00 2001 From: GCHQDeveloper314 <94527357+GCHQDeveloper314@users.noreply.github.com> Date: Mon, 7 Feb 2022 14:42:04 +0000 Subject: [PATCH 2/3] Replace use of getTable and graphId (both have been removed) with equivalents --- .../performancetesting/ingest/AccumuloElementIngestTest.java | 5 +++-- .../gaffer/performancetesting/ingest/ElementIngestTest.java | 3 ++- .../gov/gchq/gaffer/performancetesting/query/QueryTest.java | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/performance-testing/performance-testing-accumulo-store/src/main/java/uk/gov/gchq/gaffer/accumulostore/performancetesting/ingest/AccumuloElementIngestTest.java b/performance-testing/performance-testing-accumulo-store/src/main/java/uk/gov/gchq/gaffer/accumulostore/performancetesting/ingest/AccumuloElementIngestTest.java index b5ae466c8..821d86f9e 100644 --- a/performance-testing/performance-testing-accumulo-store/src/main/java/uk/gov/gchq/gaffer/accumulostore/performancetesting/ingest/AccumuloElementIngestTest.java +++ b/performance-testing/performance-testing-accumulo-store/src/main/java/uk/gov/gchq/gaffer/accumulostore/performancetesting/ingest/AccumuloElementIngestTest.java @@ -28,6 +28,7 @@ import uk.gov.gchq.gaffer.accumulostore.AccumuloStore; import uk.gov.gchq.gaffer.data.element.Element; import uk.gov.gchq.gaffer.graph.Graph; +import uk.gov.gchq.gaffer.graph.GraphConfig; import uk.gov.gchq.gaffer.hdfs.operation.SampleDataForSplitPoints; import uk.gov.gchq.gaffer.operation.OperationException; import uk.gov.gchq.gaffer.operation.impl.SplitStoreFromFile; @@ -164,10 +165,10 @@ public static void main(final String[] args) throws StoreException, IOException accumuloStore.initialise(testProperties.getGraphId(), schema, storeProperties); LOGGER.info("Initialised Accumulo store (instance name is {}, graph id is {})", accumuloStore.getProperties().getInstance(), - accumuloStore.getProperties().getTable()); + accumuloStore.getTableName()); LOGGER.info("Using test properties of {}", testProperties); final Graph graph = new Graph.Builder() - .graphId(testProperties.getGraphId()) + .config(new GraphConfig(testProperties.getGraphId())) .store(accumuloStore) .addSchema(schema) .build(); diff --git a/performance-testing/performance-testing-core/src/main/java/uk/gov/gchq/gaffer/performancetesting/ingest/ElementIngestTest.java b/performance-testing/performance-testing-core/src/main/java/uk/gov/gchq/gaffer/performancetesting/ingest/ElementIngestTest.java index 49cfbbdab..13c0cf695 100644 --- a/performance-testing/performance-testing-core/src/main/java/uk/gov/gchq/gaffer/performancetesting/ingest/ElementIngestTest.java +++ b/performance-testing/performance-testing-core/src/main/java/uk/gov/gchq/gaffer/performancetesting/ingest/ElementIngestTest.java @@ -20,6 +20,7 @@ import uk.gov.gchq.gaffer.data.element.Element; import uk.gov.gchq.gaffer.graph.Graph; +import uk.gov.gchq.gaffer.graph.GraphConfig; import uk.gov.gchq.gaffer.operation.OperationException; import uk.gov.gchq.gaffer.operation.impl.add.AddElements; import uk.gov.gchq.gaffer.performancetesting.MetricsListener; @@ -155,7 +156,7 @@ public static void main(final String[] args) { final ElementIngestTestProperties testProperties = new ElementIngestTestProperties(); testProperties.loadTestProperties(args[2]); final Graph graph = new Graph.Builder() - .graphId(testProperties.getGraphId()) + .config(new GraphConfig(testProperties.getGraphId())) .storeProperties(storeProperties) .addSchema(schema) .build(); diff --git a/performance-testing/performance-testing-core/src/main/java/uk/gov/gchq/gaffer/performancetesting/query/QueryTest.java b/performance-testing/performance-testing-core/src/main/java/uk/gov/gchq/gaffer/performancetesting/query/QueryTest.java index d5f7820aa..6afeb2737 100644 --- a/performance-testing/performance-testing-core/src/main/java/uk/gov/gchq/gaffer/performancetesting/query/QueryTest.java +++ b/performance-testing/performance-testing-core/src/main/java/uk/gov/gchq/gaffer/performancetesting/query/QueryTest.java @@ -21,6 +21,7 @@ import uk.gov.gchq.gaffer.commonutil.iterable.CloseableIterable; import uk.gov.gchq.gaffer.data.element.Element; import uk.gov.gchq.gaffer.graph.Graph; +import uk.gov.gchq.gaffer.graph.GraphConfig; import uk.gov.gchq.gaffer.operation.OperationException; import uk.gov.gchq.gaffer.operation.data.ElementSeed; import uk.gov.gchq.gaffer.operation.impl.get.GetElements; @@ -167,7 +168,7 @@ public static void main(final String[] args) { final QueryTestProperties testProperties = new QueryTestProperties(); testProperties.loadTestProperties(args[2]); final Graph graph = new Graph.Builder() - .graphId(testProperties.getGraphId()) + .config(new GraphConfig(testProperties.getGraphId())) .storeProperties(storeProperties) .addSchema(schema) .build(); From a29cd4a260a6bea53cfb8365c73b14f1d089d53b Mon Sep 17 00:00:00 2001 From: t92549 <80890692+t92549@users.noreply.github.com> Date: Thu, 24 Feb 2022 16:02:20 +0000 Subject: [PATCH 3/3] gh-969: Change to GraphConfig Builders --- .../performancetesting/ingest/AccumuloElementIngestTest.java | 4 +++- .../gaffer/performancetesting/ingest/ElementIngestTest.java | 4 +++- .../gov/gchq/gaffer/performancetesting/query/QueryTest.java | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/performance-testing/performance-testing-accumulo-store/src/main/java/uk/gov/gchq/gaffer/accumulostore/performancetesting/ingest/AccumuloElementIngestTest.java b/performance-testing/performance-testing-accumulo-store/src/main/java/uk/gov/gchq/gaffer/accumulostore/performancetesting/ingest/AccumuloElementIngestTest.java index 821d86f9e..afbff143d 100644 --- a/performance-testing/performance-testing-accumulo-store/src/main/java/uk/gov/gchq/gaffer/accumulostore/performancetesting/ingest/AccumuloElementIngestTest.java +++ b/performance-testing/performance-testing-accumulo-store/src/main/java/uk/gov/gchq/gaffer/accumulostore/performancetesting/ingest/AccumuloElementIngestTest.java @@ -168,7 +168,9 @@ public static void main(final String[] args) throws StoreException, IOException accumuloStore.getTableName()); LOGGER.info("Using test properties of {}", testProperties); final Graph graph = new Graph.Builder() - .config(new GraphConfig(testProperties.getGraphId())) + .config(new GraphConfig.Builder() + .graphId(testProperties.getGraphId()) + .build()) .store(accumuloStore) .addSchema(schema) .build(); diff --git a/performance-testing/performance-testing-core/src/main/java/uk/gov/gchq/gaffer/performancetesting/ingest/ElementIngestTest.java b/performance-testing/performance-testing-core/src/main/java/uk/gov/gchq/gaffer/performancetesting/ingest/ElementIngestTest.java index 13c0cf695..e570234b1 100644 --- a/performance-testing/performance-testing-core/src/main/java/uk/gov/gchq/gaffer/performancetesting/ingest/ElementIngestTest.java +++ b/performance-testing/performance-testing-core/src/main/java/uk/gov/gchq/gaffer/performancetesting/ingest/ElementIngestTest.java @@ -156,7 +156,9 @@ public static void main(final String[] args) { final ElementIngestTestProperties testProperties = new ElementIngestTestProperties(); testProperties.loadTestProperties(args[2]); final Graph graph = new Graph.Builder() - .config(new GraphConfig(testProperties.getGraphId())) + .config(new GraphConfig.Builder() + .graphId(testProperties.getGraphId()) + .build()) .storeProperties(storeProperties) .addSchema(schema) .build(); diff --git a/performance-testing/performance-testing-core/src/main/java/uk/gov/gchq/gaffer/performancetesting/query/QueryTest.java b/performance-testing/performance-testing-core/src/main/java/uk/gov/gchq/gaffer/performancetesting/query/QueryTest.java index 6afeb2737..1c6cf4ebb 100644 --- a/performance-testing/performance-testing-core/src/main/java/uk/gov/gchq/gaffer/performancetesting/query/QueryTest.java +++ b/performance-testing/performance-testing-core/src/main/java/uk/gov/gchq/gaffer/performancetesting/query/QueryTest.java @@ -168,7 +168,9 @@ public static void main(final String[] args) { final QueryTestProperties testProperties = new QueryTestProperties(); testProperties.loadTestProperties(args[2]); final Graph graph = new Graph.Builder() - .config(new GraphConfig(testProperties.getGraphId())) + .config(new GraphConfig.Builder() + .graphId(testProperties.getGraphId()) + .build()) .storeProperties(storeProperties) .addSchema(schema) .build();