Search in sources :

Example 1 with GetRDDOfElementsHandler

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

the class SparkOperationDeclarationsTest method shouldContainAllSparkOperationsAndHandlers.

@Test
public void shouldContainAllSparkOperationsAndHandlers() throws SerialisationException {
    // Given
    final JSONSerialiser jsonSerialiser = new JSONSerialiser();
    // When
    final OperationDeclarations deserialised = jsonSerialiser.deserialise(StreamUtil.openStream(getClass(), ACCUMULO_OP_DECLARATIONS_JSON_PATH), OperationDeclarations.class);
    // Then
    assertEquals(9, deserialised.getOperations().size());
    final OperationDeclaration od0 = deserialised.getOperations().get(0);
    assertEquals(GetJavaRDDOfElements.class, od0.getOperation());
    assertTrue(od0.getHandler() instanceof GetJavaRDDOfElementsHandler);
    final OperationDeclaration od1 = deserialised.getOperations().get(1);
    assertEquals(GetRDDOfElements.class, od1.getOperation());
    assertTrue(od1.getHandler() instanceof GetRDDOfElementsHandler);
    final OperationDeclaration od2 = deserialised.getOperations().get(2);
    assertEquals(GetRDDOfAllElements.class, od2.getOperation());
    assertTrue(od2.getHandler() instanceof GetRDDOfAllElementsHandler);
    final OperationDeclaration od3 = deserialised.getOperations().get(3);
    assertEquals(GetJavaRDDOfAllElements.class, od3.getOperation());
    assertTrue(od3.getHandler() instanceof GetJavaRDDOfAllElementsHandler);
    final OperationDeclaration od4 = deserialised.getOperations().get(4);
    assertEquals(GetDataFrameOfElements.class, od4.getOperation());
    assertTrue(od4.getHandler() instanceof GetDataFrameOfElementsHandler);
    final OperationDeclaration od5 = deserialised.getOperations().get(5);
    assertEquals(ImportKeyValueJavaPairRDDToAccumulo.class, od5.getOperation());
    assertTrue(od5.getHandler() instanceof ImportKeyValueJavaPairRDDToAccumuloHandler);
    final OperationDeclaration od6 = deserialised.getOperations().get(6);
    assertEquals(ImportJavaRDDOfElements.class, od6.getOperation());
    assertTrue(od6.getHandler() instanceof ImportJavaRDDOfElementsHandler);
    final OperationDeclaration od7 = deserialised.getOperations().get(7);
    assertEquals(ImportKeyValuePairRDDToAccumulo.class, od7.getOperation());
    assertTrue(od7.getHandler() instanceof ImportKeyValuePairRDDToAccumuloHandler);
    final OperationDeclaration od8 = deserialised.getOperations().get(8);
    assertEquals(ImportRDDOfElements.class, od8.getOperation());
    assertTrue(od8.getHandler() instanceof ImportRDDOfElementsHandler);
}
Also used : GetRDDOfAllElementsHandler(uk.gov.gchq.gaffer.sparkaccumulo.operation.handler.scalardd.GetRDDOfAllElementsHandler) GetJavaRDDOfElementsHandler(uk.gov.gchq.gaffer.sparkaccumulo.operation.handler.javardd.GetJavaRDDOfElementsHandler) JSONSerialiser(uk.gov.gchq.gaffer.jsonserialisation.JSONSerialiser) GetRDDOfElementsHandler(uk.gov.gchq.gaffer.sparkaccumulo.operation.handler.scalardd.GetRDDOfElementsHandler) ImportRDDOfElementsHandler(uk.gov.gchq.gaffer.sparkaccumulo.operation.handler.scalardd.ImportRDDOfElementsHandler) GetDataFrameOfElementsHandler(uk.gov.gchq.gaffer.sparkaccumulo.operation.handler.dataframe.GetDataFrameOfElementsHandler) ImportKeyValueJavaPairRDDToAccumuloHandler(uk.gov.gchq.gaffer.sparkaccumulo.operation.handler.javardd.ImportKeyValueJavaPairRDDToAccumuloHandler) ImportKeyValuePairRDDToAccumuloHandler(uk.gov.gchq.gaffer.sparkaccumulo.operation.handler.scalardd.ImportKeyValuePairRDDToAccumuloHandler) OperationDeclarations(uk.gov.gchq.gaffer.store.operationdeclaration.OperationDeclarations) OperationDeclaration(uk.gov.gchq.gaffer.store.operationdeclaration.OperationDeclaration) GetJavaRDDOfAllElementsHandler(uk.gov.gchq.gaffer.sparkaccumulo.operation.handler.javardd.GetJavaRDDOfAllElementsHandler) ImportJavaRDDOfElementsHandler(uk.gov.gchq.gaffer.sparkaccumulo.operation.handler.javardd.ImportJavaRDDOfElementsHandler) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 JSONSerialiser (uk.gov.gchq.gaffer.jsonserialisation.JSONSerialiser)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 ImportJavaRDDOfElementsHandler (uk.gov.gchq.gaffer.sparkaccumulo.operation.handler.javardd.ImportJavaRDDOfElementsHandler)1 ImportKeyValueJavaPairRDDToAccumuloHandler (uk.gov.gchq.gaffer.sparkaccumulo.operation.handler.javardd.ImportKeyValueJavaPairRDDToAccumuloHandler)1 GetRDDOfAllElementsHandler (uk.gov.gchq.gaffer.sparkaccumulo.operation.handler.scalardd.GetRDDOfAllElementsHandler)1 GetRDDOfElementsHandler (uk.gov.gchq.gaffer.sparkaccumulo.operation.handler.scalardd.GetRDDOfElementsHandler)1 ImportKeyValuePairRDDToAccumuloHandler (uk.gov.gchq.gaffer.sparkaccumulo.operation.handler.scalardd.ImportKeyValuePairRDDToAccumuloHandler)1 ImportRDDOfElementsHandler (uk.gov.gchq.gaffer.sparkaccumulo.operation.handler.scalardd.ImportRDDOfElementsHandler)1 OperationDeclaration (uk.gov.gchq.gaffer.store.operationdeclaration.OperationDeclaration)1 OperationDeclarations (uk.gov.gchq.gaffer.store.operationdeclaration.OperationDeclarations)1