JobMetadata.Id jobId;
DendriteGraph srcGraph;
@BeforeClass
public static void setUpClass() throws IOException {
Configuration config = new BaseConfiguration();
final Path esDir = Files.createTempDirectory("temp");
// Register a runtime hook to delete the directory. We need to do this because the ES threads don't shut down
// immediately after we close our titan connection.
Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() {
@Override
public void run() {
try {
FileUtils.deleteDirectory(esDir.toFile());
} catch (IOException e) {
e.printStackTrace();
}
}
}));
UUID clusterName = UUID.randomUUID();
config.setProperty("metagraph.system.name-prefix", "dendrite-test-");
config.setProperty("metagraph.system.storage.backend", "inmemory");
config.setProperty("metagraph.system.storage.index.backend", "elasticsearch");
config.setProperty("metagraph.system.storage.index.directory", esDir.toString());
config.setProperty("metagraph.system.storage.index.client-only", "false");
config.setProperty("metagraph.system.storage.index.local-mode", "false");
config.setProperty("metagraph.system.storage.index.cluster-name", clusterName.toString());
config.setProperty("metagraph.template.name-prefix", "dendrite-test-");
config.setProperty("metagraph.template.storage.backend", "inmemory");
config.setProperty("metagraph.template.storage.index.backend", "elasticsearch");
config.setProperty("metagraph.template.storage.index.hostname", "localhost:9300");
config.setProperty("metagraph.template.storage.index.client-only", "true");
config.setProperty("metagraph.template.storage.index.local-mode", "false");
config.setProperty("metagraph.template.storage.index.sniff", "true");
config.setProperty("metagraph.template.storage.index.cluster-name", clusterName.toString());
metaGraph = new MetaGraph(config);
}