use of com.tinkerpop.blueprints.impls.orient.OrientVertexType 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