public class ResourceDeduplicationTask extends Object implements BackgroundTask
This is a task meant to be run periodically to eliminate resource duplication. The task performs a map-reduce job using
the GraknComputer where each resource index key, i.e. the resource value+type combination, is mapped
to all its corresponding resource instances. The reduction steps, delete superfluous duplicates and forces instances
referring to them to point to the unique remaining resource instance for that key.
| Modifier and Type | Class and Description |
|---|---|
static class |
ResourceDeduplicationTask.Job
The map-reduce job submitted to the GraknGraphComputer that scan the whole set of resources in the graph and
reduces by eliminating duplicates.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
DELETE_UNATTACHED_CONFIG |
static boolean |
DELETE_UNATTACHED_DEFAULT |
static String |
KEYSPACE_CONFIG |
static String |
KEYSPACE_DEFAULT |
| Constructor and Description |
|---|
ResourceDeduplicationTask() |
| Modifier and Type | Method and Description |
|---|---|
void |
pause()
Called to suspend the execution of a currently running task.
|
boolean |
resume(java.util.function.Consumer<TaskCheckpoint> saveCheckpoint,
TaskCheckpoint lastCheckpoint)
This method may be called when resuming from a paused state or recovering from a crash or failure of any kind.
|
boolean |
start(java.util.function.Consumer<TaskCheckpoint> saveCheckpoin,
mjson.Json configuration)
Called to start execution of the task, may be called on a newly scheduled or previously stopped task.
|
boolean |
stop()
Called to stop execution of the task, may be called on a running or paused task.
|
Long |
totalElimintated() |
public static final String KEYSPACE_CONFIG
public static final String KEYSPACE_DEFAULT
public static final String DELETE_UNATTACHED_CONFIG
public static final boolean DELETE_UNATTACHED_DEFAULT
public boolean start(java.util.function.Consumer<TaskCheckpoint> saveCheckpoin, mjson.Json configuration)
BackgroundTaskstart in interface BackgroundTasksaveCheckpoin - Consumerpublic boolean resume(java.util.function.Consumer<TaskCheckpoint> saveCheckpoint, TaskCheckpoint lastCheckpoint)
BackgroundTaskresume in interface BackgroundTasksaveCheckpoint - ConsumerlastCheckpoint - The last checkpoint as sent to saveCheckpoint.public boolean stop()
BackgroundTaskstop in interface BackgroundTaskpublic void pause()
BackgroundTaskpause in interface BackgroundTaskpublic Long totalElimintated()
Copyright © 2017 Grakn Labs Ltd. All rights reserved.