public class PostProcessor extends Object
Class responsible for post processing concepts which may be broken.
Contains the logic which is needed for post processing Concepts for the moment this
includes:
- Merging duplicate Attributes
- Counting new Things which have been created under Types
| Modifier and Type | Method and Description |
|---|---|
static PostProcessor |
create(GraknConfig engineConfig,
redis.clients.util.Pool<redis.clients.jedis.Jedis> jedisPool,
EngineGraknTxFactory factory,
LockProvider lockProvider,
com.codahale.metrics.MetricRegistry metricRegistry) |
void |
mergeDuplicateConcepts(ai.grakn.GraknTx tx,
String conceptIndex,
Set<ai.grakn.concept.ConceptId> conceptIds)
Merges duplicate
Concepts based on the unique index provided plus the ConceptIds
of the suspected duplicates |
void |
updateCounts(ai.grakn.Keyspace keyspace,
ai.grakn.kb.log.CommitLog commitLog)
Updates the counts of
Types based on the commit logs received. |
public static PostProcessor create(GraknConfig engineConfig, redis.clients.util.Pool<redis.clients.jedis.Jedis> jedisPool, EngineGraknTxFactory factory, LockProvider lockProvider, com.codahale.metrics.MetricRegistry metricRegistry)
public void updateCounts(ai.grakn.Keyspace keyspace,
ai.grakn.kb.log.CommitLog commitLog)
Types based on the commit logs received.keyspace - The Keyspace which contains Types with new instances.commitLog - The commit log containing the details of the jobpublic void mergeDuplicateConcepts(ai.grakn.GraknTx tx,
String conceptIndex,
Set<ai.grakn.concept.ConceptId> conceptIds)
Concepts based on the unique index provided plus the ConceptIds
of the suspected duplicatestx - The GraknTx responsible for performing the mergeconceptIndex - The unique Concept index which is supposed to exist only once
across the entire DB.conceptIds - The ConceptIds of the suspected duplicatesCopyright © 2017 Grakn Labs Ltd. All rights reserved.