public interface Migrator extends AutoCloseable
The base Migrator interface
Provides common methods for migrating data from source into insert queries.
| Modifier and Type | Method and Description |
|---|---|
void |
load(String uri,
String keyspace)
Load using the default batch size
|
void |
load(String uri,
String keyspace,
int batchSize,
int numberActiveTasks)
Migrate data constrained by this migrator using a loader configured
by the provided parameters.
|
java.util.stream.Stream<InsertQuery> |
migrate()
Migrate all the data in the given file based on the given template.
|
closejava.util.stream.Stream<InsertQuery> migrate()
void load(String uri, String keyspace)
uri - Uri where one instance of Grakn Engine is runningkeyspace - The name of the keyspace where the data should be persistedvoid load(String uri, String keyspace, int batchSize, int numberActiveTasks)
uri - Uri where one instance of Grakn Engine is runningkeyspace - The name of the keyspace where the data should be persistedbatchSize - The number of queries to execute in one transactionnumberActiveTasks - Number of tasks running on the server at any one time. Consider this a safeguard
to bot the system load. Default is 25.Copyright © 2017 Grakn Labs Ltd. All rights reserved.