Search in sources :

Example 11 with PeriodicQueryResultStorage

use of org.apache.rya.indexing.pcj.storage.PeriodicQueryResultStorage in project incubator-rya by apache.

the class AccumuloDeletePeriodicPCJ method stopUpdatingPCJ.

private void stopUpdatingPCJ(final String ryaInstance, final String fluoAppName, final String pcjId, final String topic, final String brokers) throws UnsupportedQueryException, MalformedQueryException, QueryDeletionException {
    requireNonNull(fluoAppName);
    requireNonNull(pcjId);
    // Connect to the Fluo application that is updating this instance's PCJs.
    final AccumuloConnectionDetails cd = super.getAccumuloConnectionDetails();
    try (final FluoClient fluoClient = new FluoClientFactory().connect(cd.getUsername(), new String(cd.getUserPass()), cd.getInstanceName(), cd.getZookeepers(), fluoAppName)) {
        // Delete the PCJ from the Fluo App.
        PeriodicQueryResultStorage periodic = new AccumuloPeriodicQueryResultStorage(getConnector(), ryaInstance);
        DeletePeriodicQuery deletePeriodic = new DeletePeriodicQuery(fluoClient, periodic);
        deletePeriodic.deletePeriodicQuery(pcjId, getPeriodicNotificationClient(topic, brokers));
    }
}
Also used : FluoClient(org.apache.fluo.api.client.FluoClient) AccumuloPeriodicQueryResultStorage(org.apache.rya.indexing.pcj.storage.accumulo.AccumuloPeriodicQueryResultStorage) DeletePeriodicQuery(org.apache.rya.indexing.pcj.fluo.api.DeletePeriodicQuery) AccumuloPeriodicQueryResultStorage(org.apache.rya.indexing.pcj.storage.accumulo.AccumuloPeriodicQueryResultStorage) PeriodicQueryResultStorage(org.apache.rya.indexing.pcj.storage.PeriodicQueryResultStorage)

Aggregations

PeriodicQueryResultStorage (org.apache.rya.indexing.pcj.storage.PeriodicQueryResultStorage)11 AccumuloPeriodicQueryResultStorage (org.apache.rya.indexing.pcj.storage.accumulo.AccumuloPeriodicQueryResultStorage)11 FluoClient (org.apache.fluo.api.client.FluoClient)9 CreatePeriodicQuery (org.apache.rya.indexing.pcj.fluo.api.CreatePeriodicQuery)6 BindingSet (org.openrdf.query.BindingSet)6 HashSet (java.util.HashSet)5 Connector (org.apache.accumulo.core.client.Connector)5 Test (org.junit.Test)5 QueryBindingSet (org.openrdf.query.algebra.evaluation.QueryBindingSet)5 ZonedDateTime (java.time.ZonedDateTime)4 DatatypeFactory (javax.xml.datatype.DatatypeFactory)4 Statement (org.openrdf.model.Statement)4 ValueFactory (org.openrdf.model.ValueFactory)4 ValueFactoryImpl (org.openrdf.model.impl.ValueFactoryImpl)4 ArrayList (java.util.ArrayList)3 LinkedBlockingQueue (java.util.concurrent.LinkedBlockingQueue)3 KafkaConsumer (org.apache.kafka.clients.consumer.KafkaConsumer)3 StringDeserializer (org.apache.kafka.common.serialization.StringDeserializer)3 NodeBin (org.apache.rya.periodic.notification.api.NodeBin)3 BindingSetSerDe (org.apache.rya.periodic.notification.serialization.BindingSetSerDe)3