g.V().has("weight1", gte(0L)).order().by("weight1", Order.decr).limit(100)
--
You received this message because you are subscribed to the Google Groups "Aurelius" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aureliusgraph...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/aureliusgraphs/3fe325b2-503b-49d4-b5f0-873b31976f20%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loaded 10000 entities, loading next 10000
Received batch from neo4j
10:02:42,553 INFO IndexRepairJob:101 - Found index byWeight1Mixed
10:02:42,566 INFO IndexRepairJob:101 - Found index byWeight1Mixed
10:02:42,703 INFO ManagementSystem:994 - Index update job successful for [byWeight1Mixed]
-----------------------
vp[weight1->2777]
runtime: 1209
Loaded 20000 entities, loading next 10000
Received batch from neo4j
10:02:44,733 INFO IndexRepairJob:101 - Found index byWeight1Mixed
10:02:44,738 INFO IndexRepairJob:101 - Found index byWeight1Mixed
10:02:44,873 INFO ManagementSystem:994 - Index update job successful for [byWeight1Mixed]
----------------------- Test 1
vp[weight1->2777]
runtime: 1156
Loaded 30000 entities, loading next 10000
Received batch from neo4j
10:02:46,761 INFO IndexRepairJob:101 - Found index byWeight1Mixed
10:02:46,765 INFO IndexRepairJob:101 - Found index byWeight1Mixed
10:02:46,903 INFO ManagementSystem:994 - Index update job successful for [byWeight1Mixed]
-----------------------
vp[weight1->2777]
runtime: 1696
Loaded 40000 entities, loading next 10000
Received batch from neo4j
10:02:49,351 INFO IndexRepairJob:101 - Found index byWeight1Mixed
10:02:49,355 INFO IndexRepairJob:101 - Found index byWeight1Mixed
10:02:49,494 INFO ManagementSystem:994 - Index update job successful for [byWeight1Mixed]
-----------------------
vp[weight1->2841]
runtime: 2149
Loaded 50000 entities, loading next 10000
Received batch from neo4j
10:02:52,315 INFO IndexRepairJob:101 - Found index byWeight1Mixed
10:02:52,318 INFO IndexRepairJob:101 - Found index byWeight1Mixed
10:02:52,461 INFO ManagementSystem:994 - Index update job successful for [byWeight1Mixed]
-----------------------
vp[weight1->2848]
runtime: 2634
Loaded 60000 entities, loading next 10000
Received batch from neo4j
10:02:55,920 INFO IndexRepairJob:101 - Found index byWeight1Mixed
10:02:55,923 INFO IndexRepairJob:101 - Found index byWeight1Mixed
10:02:56,059 INFO ManagementSystem:994 - Index update job successful for [byWeight1Mixed]
-----------------------
vp[weight1->2848]
runtime: 3180
Loaded 70000 entities, loading next 10000
Received batch from neo4j
10:03:00,211 INFO IndexRepairJob:101 - Found index byWeight1Mixed
10:03:00,214 INFO IndexRepairJob:101 - Found index byWeight1Mixed
10:03:00,356 INFO ManagementSystem:994 - Index update job successful for [byWeight1Mixed]
To view this discussion on the web visit https://groups.google.com/d/msgid/aureliusgraphs/daaa9d0c-f0f2-4a31-8712-779412b53084%40googlegroups.com.
----------------------- Test 1
1454936730176
runtime: 260 ms
----------------------- Test 2
1454936740145
runtime: 61 ms
----------------------- Test 3
1454936743278
runtime: 41 ms
----------------------- Test 4
1454936746264
runtime: 40 ms
----------------------- Test 5
1454936748794
runtime: 40 ms
Now I know that I should stop looking at the configuration and I will investigate further what goes wrong with the data. Thank you for your aid and have a nice day!
Kind Regards,
Brecht
--
You received this message because you are subscribed to a topic in the Google Groups "Aurelius" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/aureliusgraphs/JFNthKyiBRM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to aureliusgraph...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/aureliusgraphs/e7fee3a7-04a3-4cb1-8ad7-0b26cee26c3a%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/aureliusgraphs/CAJ81B5wnEJ7bsPRmFQkE0tfaB1RE_Q%3DjYAOMDcdeGqzp8%3DEh8A%40mail.gmail.com.
import com.thinkaurelius.titan.core.Cardinality;
import com.thinkaurelius.titan.core.PropertyKey;
import com.thinkaurelius.titan.core.TitanFactory;
import com.thinkaurelius.titan.core.TitanGraph;
import com.thinkaurelius.titan.core.schema.TitanManagement;
import org.apache.tinkerpop.gremlin.process.traversal.Order;
import org.apache.tinkerpop.gremlin.process.traversal.P;
import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.apache.tinkerpop.gremlin.util.TimeUtil;
import java.util.function.Supplier;
/**
*
*/
public class Driver16
{
public static void main(String args[])
{
Driver16 me = new Driver16();
String propsFile = args[0];
me.doWork(propsFile);
}
private void doWork(String propsFile)
{
TitanGraph graph = null;
try
{
graph = openGraph(propsFile);
createSchema(graph);
for (int i = 0;i<101;i++)
{
writeData(graph);
readData(graph, i);
}
}
catch (Exception e)
{
e.printStackTrace();
}
finally
{
if (graph != null)
graph.close();
}
}
private TitanGraph openGraph(String propsFile)
{
TitanGraph graph = TitanFactory.open(propsFile);
return graph;
}
private void createSchema(TitanGraph graph)
{
TitanManagement mgmt = graph.openManagement();
PropertyKey weight1 = mgmt.makePropertyKey("weight1").dataType(Long.class).cardinality(Cardinality.SINGLE).make();
mgmt.buildIndex("byWeight1MixedIdx", Vertex.class).addKey(weight1).buildMixedIndex("search");
mgmt.commit();
}
private void writeData(TitanGraph graph)
{
// Add 10000 vertices at a time
for (int i = 1; i <= 10000; i++)
{
// graph.addVertex("weight1", (Long)(System.currentTimeMillis() / i));
graph.addVertex("weight1", (Long)(new Long(200)));
}
graph.tx().commit();
}
private void readData(TitanGraph graph, int currentCount)
{
try
{
GraphTraversalSource g = graph.traversal();
System.out.println("== ${(" + currentCount + ")*10000} Vertices ==");
// respect ES indexing latency
Thread.sleep(2000);
final Supplier<Traversal<?, ?>> traversal = () ->
g.V().has("weight1", P.gte(0L)).order().by("weight1", Order.decr).limit(1).values("weight1");
System.out.println(TimeUtil.clockWithResult(() -> traversal.get().toList()).toString());
System.out.println("");
}
catch (Exception e)
{
e.printStackTrace();
}
}
}
To view this discussion on the web visit https://groups.google.com/d/msgid/aureliusgraphs/96155d45-b635-4b76-b8c9-2d5ed057dde8%40googlegroups.com.
1) How to check Titan DB is writing to the Elastic search
2) What needs to be done so that the graph is injected by the java code and then can be queried using the tinkerpop console