use of com.tinkerpop.blueprints.impls.orient.OrientGraphNoTx in project orientdb by orientechnologies.
the class SuperNodeInsertSpeedTest method deinit.
@Override
public void deinit() {
final OrientGraphNoTx graph = factory.getNoTx();
try {
final long total = graph.countVertices("Client");
System.out.println("\nTotal objects in Client cluster after the test: " + total);
System.out.println("Created " + (total));
Assert.assertEquals(total, threadCycles);
// final long indexedItems = graph.getRawGraph().getMetadata().getIndexManager().getIndex("Client.uid").getSize();
// System.out.println("\nTotal indexed objects after the test: " + indexedItems);
} finally {
graph.shutdown();
}
}
use of com.tinkerpop.blueprints.impls.orient.OrientGraphNoTx in project orientdb by orientechnologies.
the class SuperNodeInsertSpeedTest method init.
@Override
public void init() {
if (factory.exists())
factory.drop();
final OrientGraphNoTx graph = factory.getNoTx();
try {
if (graph.getVertexType("Client") == null) {
final OrientVertexType clientType = graph.createVertexType("Client");
final OrientVertexType.OrientVertexProperty property = clientType.createProperty("uid", OType.STRING);
// CREATE ONE CLUSTER PER THREAD
for (int i = 0; i < getThreads(); ++i) {
System.out.println("Creating cluster: client_" + i + "...");
clientType.addCluster("client_" + i);
}
}
OrientVertex superNode = graph.addVertex("class:Client", "name", "superNode");
final OrientVertex v = graph.addVertex("class:Client", "uid", counter.getAndIncrement());
superNode.addEdge("test", v);
superNodeRID = superNode.getIdentity();
} finally {
graph.shutdown();
}
}
Aggregations