为什么一个空的 JanusGraph 不能
read messages for timestamp
?janusGraphManagement.getOrCreatePropertyKey()
指的是什么消息?[WARN] [o.j.d.l.k.KCVSLog.pool-5-thread-1] :: Could not read messages for timestamp [2023-05-17T12:50:45.282434100Z] (this read will be retried)
java.lang.IllegalArgumentException: Timestamp overflow detected: 2023-05-17T12:50:45.282434100Z
logger.info("g.V().count().next():\t" + g.V().count().next());
PropertyKey propertyKey = janusGraphManagement.getOrCreatePropertyKey("_id");
docker run --name jg-cassandra -d -e CASSANDRA_START_RPC=true -p 9160:9160 -p 9042:9042 -p 7199:7199 -p 7001:7001 -p 7000:7000 cassandra:3.11
[WARN] [o.j.d.l.k.KCVSLog.pool-5-thread-1] :: Could not read messages for timestamp [2023-05-17T12:50:45.282434100Z] (this read will be retried)
java.lang.IllegalArgumentException: Timestamp overflow detected: 2023-05-17T12:50:45.282434100Z
g.V()
现在问题永久存在g.V()
执行g.V.drop().iterate()
getOrCreatePropertyKey()
发生时的顺序更改为g.V()
发生时getOrCreatePropertyKey()
被调用getOrCreatePropertyKey()
并离开g.V().count().next()
g.V().count().next()
并离开getOrCreatePropertyKey()
getOrCreatePropertyKey()
和 g.V()
back-inset(TIMESTAMP_PROVIDER.toStringWithoutRoot(), "NANO")
2023-05-17 07:50:43,822 [INFO] [c.d.o.d.i.c.ContactPoints.main] :: Contact point localhost:29042 resolves to multiple addresses, will use them all ([localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1])
2023-05-17 07:50:43,930 [INFO] [c.d.o.d.i.c.DefaultMavenCoordinates.main] :: DataStax Java driver for Apache Cassandra(R) (com.datastax.oss:java-driver-core) version 4.15.0
2023-05-17 07:50:44,444 [INFO] [c.d.o.d.i.c.t.Clock.JanusGraph Session-admin-0] :: Using native clock for microsecond precision
2023-05-17 07:50:44,725 [WARN] [c.d.o.d.i.c.l.h.OptionalLocalDcHelper.JanusGraph Session-admin-0] :: [JanusGraph Session|default] You specified datacenter1 as the local DC, but some contact points are from a different DC: Node(endPoint=localhost/[0:0:0:0:0:0:0:1]:29042, hostId=null, hashCode=5aad4393)=null; please provide the correct local DC, or check your contact points
2023-05-17 07:50:44,987 [INFO] [o.j.g.i.UniqueInstanceIdRetriever.main] :: Generated unique-instance-id=c0a8564916248-rmt-lap-win201
2023-05-17 07:50:45,011 [INFO] [c.d.o.d.i.c.ContactPoints.main] :: Contact point localhost:29042 resolves to multiple addresses, will use them all ([localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1])
2023-05-17 07:50:45,045 [INFO] [c.d.o.d.i.c.t.Clock.JanusGraph Session-admin-0] :: Using native clock for microsecond precision
2023-05-17 07:50:45,086 [WARN] [c.d.o.d.i.c.l.h.OptionalLocalDcHelper.JanusGraph Session-admin-0] :: [JanusGraph Session|default] You specified datacenter1 as the local DC, but some contact points are from a different DC: Node(endPoint=localhost/[0:0:0:0:0:0:0:1]:29042, hostId=null, hashCode=83832b8)=null; please provide the correct local DC, or check your contact points
2023-05-17 07:50:45,112 [INFO] [o.j.d.c.ExecutorServiceBuilder.main] :: Initiated fixed thread pool of size 40
2023-05-17 07:50:45,254 [INFO] [o.j.g.d.StandardJanusGraph.main] :: Gremlin script evaluation is disabled
2023-05-17 07:50:45,282 [INFO] [o.j.d.l.k.KCVSLog.main] :: Loaded unidentified ReadMarker start time 2023-05-17T12:50:45.282434100Z into org.janusgraph.diskstorage.log.kcvs.KCVSLog$MessagePuller@48b4a043
2023-05-17 07:50:45,346 [WARN] [o.j.g.t.StandardJanusGraphTx.main] :: Query requires iterating over all vertices [[]]. For better performance, use indexes
2023-05-17 07:50:45,359 [INFO] [Main.main] :: g.V().count().next(): 0
2023-05-17 07:50:45,393 [WARN] [o.j.d.l.k.KCVSLog.pool-5-thread-1] :: Could not read messages for timestamp [2023-05-17T12:50:45.282434100Z] (this read will be retried)
java.lang.IllegalArgumentException: Timestamp overflow detected: 2023-05-17T12:50:45.282434100Z
at org.janusgraph.diskstorage.log.kcvs.KCVSLog.getTimeSlice(KCVSLog.java:393) ~[janusgraph-core-1.0.0-20230504-014643.988c094.jar:?]
at org.janusgraph.diskstorage.log.kcvs.KCVSLog.access$1500(KCVSLog.java:115) ~[janusgraph-core-1.0.0-20230504-014643.988c094.jar:?]
at org.janusgraph.diskstorage.log.kcvs.KCVSLog$MessagePuller.run(KCVSLog.java:743) [janusgraph-core-1.0.0-20230504-014643.988c094.jar:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) [?:?]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
at java.lang.Thread.run(Thread.java:833) [?:?]
Process finished with exit code 0
public class Test {
private static final Logger logger = LogManager.getLogger(Main.class);
public static void main(String[] args) throws InterruptedException, ExecutionException {
JanusGraph janusGraph = JanusGraphFactory.build()
.set("storage.backend", "cql")
.set("storage.hostname", "localhost:29042")
// .set(TIMESTAMP_PROVIDER.toStringWithoutRoot(), "NANO")
.open();
JanusGraphManagement janusGraphManagement = janusGraph.openManagement();
GraphTraversalSource g = janusGraph.traversal();
logger.info("g.V().count().next():\t" + g.V().count().next());
// g.V().limit(10000).drop().iterate();
PropertyKey propertyKey = janusGraphManagement.getOrCreatePropertyKey("_id");
// GraphTraversalSource g = janusGraph.traversal();
// logger.info("g.V().count().next():\t" + g.V().count().next());
janusGraph.close();
}