public class Migrator extends Object
Abstract migrator class containing methods and functionality needed by all extending migrator classes.
| Modifier and Type | Field and Description |
|---|---|
static int |
ACTIVE_TASKS |
static int |
BATCH_SIZE |
| Modifier and Type | Method and Description |
|---|---|
void |
load(String template,
java.util.stream.Stream<Map<String,Object>> converter)
Migrate data constrained by this migrator using a loader configured
by the provided parameters.
|
void |
load(String template,
java.util.stream.Stream<Map<String,Object>> converter,
int batchSize,
int numberActiveTasks,
boolean retry)
Migrate data constrained by this migrator using a loader configured
by the provided parameters.
|
void |
print(String template,
java.util.stream.Stream<Map<String,Object>> converter)
Template the data and print to standard out.
|
Migrator |
registerMacro(Macro macro)
Register a macro to use in templating
|
protected java.util.stream.Stream<Query> |
template(String template,
Map<String,Object> data) |
static Migrator |
to(String uri,
String keyspace) |
public static final int BATCH_SIZE
public static final int ACTIVE_TASKS
public void load(String template, java.util.stream.Stream<Map<String,Object>> converter)
template - converter - public void print(String template, java.util.stream.Stream<Map<String,Object>> converter)
template - converter - public void load(String template, java.util.stream.Stream<Map<String,Object>> converter, int batchSize, int numberActiveTasks, boolean retry)
template - converter - batchSize - The number of queries to execute in one transaction. Default is 25.numberActiveTasks - Number of tasks running on the server at any one time. Consider this a safeguard
to bot the system load. Default is 25.retry - If the Loader should continue attempt to send tasks when Engine is not availableCopyright © 2017 Grakn Labs Ltd. All rights reserved.