Search in sources :

Example 1 with GetRDDOfElementsInRangesHandler

use of uk.gov.gchq.gaffer.sparkaccumulo.operation.handler.scalardd.GetRDDOfElementsInRangesHandler in project Gaffer by gchq.

the class SparkOperationDeclarationsTest method shouldContainAllSparkOperationsAndHandlers.

@Test
public void shouldContainAllSparkOperationsAndHandlers() throws SerialisationException {
    // When
    final OperationDeclarations deserialised = JSONSerialiser.deserialise(StreamUtil.openStream(getClass(), ACCUMULO_OP_DECLARATIONS_JSON_PATH), OperationDeclarations.class);
    // Then
    final List<OperationDeclaration> deserialisedOps = deserialised.getOperations();
    final List<OperationDeclaration> expectedOps = Arrays.asList(new Builder().operation(GetJavaRDDOfElements.class).handler(new GetJavaRDDOfElementsHandler()).build(), new Builder().operation(GetRDDOfElements.class).handler(new GetRDDOfElementsHandler()).build(), new Builder().operation(GetRDDOfAllElements.class).handler(new GetRDDOfAllElementsHandler()).build(), new Builder().operation(GetJavaRDDOfAllElements.class).handler(new GetJavaRDDOfAllElementsHandler()).build(), new Builder().operation(GetDataFrameOfElements.class).handler(new GetDataFrameOfElementsHandler()).build(), new Builder().operation(ImportKeyValueJavaPairRDDToAccumulo.class).handler(new ImportKeyValueJavaPairRDDToAccumuloHandler()).build(), new Builder().operation(ImportJavaRDDOfElements.class).handler(new ImportJavaRDDOfElementsHandler()).build(), new Builder().operation(ImportKeyValuePairRDDToAccumulo.class).handler(new ImportKeyValuePairRDDToAccumuloHandler()).build(), new Builder().operation(ImportRDDOfElements.class).handler(new ImportRDDOfElementsHandler()).build(), new Builder().operation(GetGraphFrameOfElements.class).handler(new GetGraphFrameOfElementsHandler()).build(), new Builder().operation(GetJavaRDDOfElementsInRanges.class).handler(new GetJavaRDDOfElementsInRangesHandler()).build(), new Builder().operation(GetRDDOfElementsInRanges.class).handler(new GetRDDOfElementsInRangesHandler()).build(), new Builder().operation(SplitStoreFromJavaRDDOfElements.class).handler(new SplitStoreFromJavaRDDOfElementsHandler()).build(), new Builder().operation(SplitStoreFromRDDOfElements.class).handler(new SplitStoreFromRDDOfElementsHandler()).build());
    assertEquals(expectedOps.size(), deserialisedOps.size());
    for (int i = 0; i < expectedOps.size(); i++) {
        assertEquals(expectedOps.get(i).getOperation(), deserialisedOps.get(i).getOperation());
        assertEquals(expectedOps.get(i).getHandler().getClass(), deserialisedOps.get(i).getHandler().getClass());
    }
}
Also used : GetRDDOfAllElementsHandler(uk.gov.gchq.gaffer.sparkaccumulo.operation.handler.scalardd.GetRDDOfAllElementsHandler) SplitStoreFromJavaRDDOfElements(uk.gov.gchq.gaffer.spark.operation.javardd.SplitStoreFromJavaRDDOfElements) GetDataFrameOfElements(uk.gov.gchq.gaffer.spark.operation.dataframe.GetDataFrameOfElements) SplitStoreFromRDDOfElementsHandler(uk.gov.gchq.gaffer.sparkaccumulo.operation.handler.scalardd.SplitStoreFromRDDOfElementsHandler) SplitStoreFromJavaRDDOfElementsHandler(uk.gov.gchq.gaffer.sparkaccumulo.operation.handler.javardd.SplitStoreFromJavaRDDOfElementsHandler) Builder(uk.gov.gchq.gaffer.store.operation.declaration.OperationDeclaration.Builder) GetJavaRDDOfAllElements(uk.gov.gchq.gaffer.spark.operation.javardd.GetJavaRDDOfAllElements) ImportKeyValueJavaPairRDDToAccumuloHandler(uk.gov.gchq.gaffer.sparkaccumulo.operation.handler.javardd.ImportKeyValueJavaPairRDDToAccumuloHandler) OperationDeclaration(uk.gov.gchq.gaffer.store.operation.declaration.OperationDeclaration) GetGraphFrameOfElementsHandler(uk.gov.gchq.gaffer.spark.operation.handler.graphframe.GetGraphFrameOfElementsHandler) ImportRDDOfElements(uk.gov.gchq.gaffer.spark.operation.scalardd.ImportRDDOfElements) GetJavaRDDOfElementsHandler(uk.gov.gchq.gaffer.sparkaccumulo.operation.handler.javardd.GetJavaRDDOfElementsHandler) GetRDDOfAllElements(uk.gov.gchq.gaffer.spark.operation.scalardd.GetRDDOfAllElements) GetRDDOfElementsInRanges(uk.gov.gchq.gaffer.sparkaccumulo.operation.scalardd.GetRDDOfElementsInRanges) GetRDDOfElementsInRangesHandler(uk.gov.gchq.gaffer.sparkaccumulo.operation.handler.scalardd.GetRDDOfElementsInRangesHandler) ImportKeyValuePairRDDToAccumulo(uk.gov.gchq.gaffer.sparkaccumulo.operation.scalardd.ImportKeyValuePairRDDToAccumulo) GetJavaRDDOfElements(uk.gov.gchq.gaffer.spark.operation.javardd.GetJavaRDDOfElements) ImportJavaRDDOfElements(uk.gov.gchq.gaffer.spark.operation.javardd.ImportJavaRDDOfElements) GetGraphFrameOfElements(uk.gov.gchq.gaffer.spark.operation.graphframe.GetGraphFrameOfElements) GetJavaRDDOfElementsInRangesHandler(uk.gov.gchq.gaffer.sparkaccumulo.operation.handler.javardd.GetJavaRDDOfElementsInRangesHandler) OperationDeclarations(uk.gov.gchq.gaffer.store.operation.declaration.OperationDeclarations) GetRDDOfElements(uk.gov.gchq.gaffer.spark.operation.scalardd.GetRDDOfElements) SplitStoreFromRDDOfElements(uk.gov.gchq.gaffer.spark.operation.scalardd.SplitStoreFromRDDOfElements) GetDataFrameOfElementsHandler(uk.gov.gchq.gaffer.sparkaccumulo.operation.handler.dataframe.GetDataFrameOfElementsHandler) ImportKeyValuePairRDDToAccumuloHandler(uk.gov.gchq.gaffer.sparkaccumulo.operation.handler.scalardd.ImportKeyValuePairRDDToAccumuloHandler) ImportJavaRDDOfElementsHandler(uk.gov.gchq.gaffer.sparkaccumulo.operation.handler.javardd.ImportJavaRDDOfElementsHandler) ImportKeyValueJavaPairRDDToAccumulo(uk.gov.gchq.gaffer.sparkaccumulo.operation.javardd.ImportKeyValueJavaPairRDDToAccumulo) GetRDDOfElementsHandler(uk.gov.gchq.gaffer.sparkaccumulo.operation.handler.scalardd.GetRDDOfElementsHandler) ImportRDDOfElementsHandler(uk.gov.gchq.gaffer.sparkaccumulo.operation.handler.scalardd.ImportRDDOfElementsHandler) GetJavaRDDOfAllElementsHandler(uk.gov.gchq.gaffer.sparkaccumulo.operation.handler.javardd.GetJavaRDDOfAllElementsHandler) GetJavaRDDOfElementsInRanges(uk.gov.gchq.gaffer.sparkaccumulo.operation.javardd.GetJavaRDDOfElementsInRanges) Test(org.junit.jupiter.api.Test)

Aggregations

Test (org.junit.jupiter.api.Test)1 GetDataFrameOfElements (uk.gov.gchq.gaffer.spark.operation.dataframe.GetDataFrameOfElements)1 GetGraphFrameOfElements (uk.gov.gchq.gaffer.spark.operation.graphframe.GetGraphFrameOfElements)1 GetGraphFrameOfElementsHandler (uk.gov.gchq.gaffer.spark.operation.handler.graphframe.GetGraphFrameOfElementsHandler)1 GetJavaRDDOfAllElements (uk.gov.gchq.gaffer.spark.operation.javardd.GetJavaRDDOfAllElements)1 GetJavaRDDOfElements (uk.gov.gchq.gaffer.spark.operation.javardd.GetJavaRDDOfElements)1 ImportJavaRDDOfElements (uk.gov.gchq.gaffer.spark.operation.javardd.ImportJavaRDDOfElements)1 SplitStoreFromJavaRDDOfElements (uk.gov.gchq.gaffer.spark.operation.javardd.SplitStoreFromJavaRDDOfElements)1 GetRDDOfAllElements (uk.gov.gchq.gaffer.spark.operation.scalardd.GetRDDOfAllElements)1 GetRDDOfElements (uk.gov.gchq.gaffer.spark.operation.scalardd.GetRDDOfElements)1 ImportRDDOfElements (uk.gov.gchq.gaffer.spark.operation.scalardd.ImportRDDOfElements)1 SplitStoreFromRDDOfElements (uk.gov.gchq.gaffer.spark.operation.scalardd.SplitStoreFromRDDOfElements)1 GetDataFrameOfElementsHandler (uk.gov.gchq.gaffer.sparkaccumulo.operation.handler.dataframe.GetDataFrameOfElementsHandler)1 GetJavaRDDOfAllElementsHandler (uk.gov.gchq.gaffer.sparkaccumulo.operation.handler.javardd.GetJavaRDDOfAllElementsHandler)1 GetJavaRDDOfElementsHandler (uk.gov.gchq.gaffer.sparkaccumulo.operation.handler.javardd.GetJavaRDDOfElementsHandler)1 GetJavaRDDOfElementsInRangesHandler (uk.gov.gchq.gaffer.sparkaccumulo.operation.handler.javardd.GetJavaRDDOfElementsInRangesHandler)1 ImportJavaRDDOfElementsHandler (uk.gov.gchq.gaffer.sparkaccumulo.operation.handler.javardd.ImportJavaRDDOfElementsHandler)1 ImportKeyValueJavaPairRDDToAccumuloHandler (uk.gov.gchq.gaffer.sparkaccumulo.operation.handler.javardd.ImportKeyValueJavaPairRDDToAccumuloHandler)1 SplitStoreFromJavaRDDOfElementsHandler (uk.gov.gchq.gaffer.sparkaccumulo.operation.handler.javardd.SplitStoreFromJavaRDDOfElementsHandler)1 GetRDDOfAllElementsHandler (uk.gov.gchq.gaffer.sparkaccumulo.operation.handler.scalardd.GetRDDOfAllElementsHandler)1