我可以成功登录并连接tinkerpop服务器,但是执行gremlin时,会出现一个奇怪的异常:org.apache.tinkerpop.gremlin.groovy.plugin.RemoteException:找不到ID为137481的类型,我使用gV(137481),也会引发异常,但是当我执行gV(137481).valueMap(true)时,它返回一个节点,这是gremlin 执行结果:
set.seed(2018)
Plt_Input <- data.frame(replicate(2,sample(0:100,10,rep=TRUE)))
names(Plt_Input) <- c("y","x")
fit <- lm(formula = y ~ x, data = Plt_Input)
R2 <- paste ("R2 =", round(summary(fit)$r.squared,2))
Formula <- paste('y =', round(coef(fit)[[1]],1), ' + (', round(fit$coefficients[[2]],2),'*x )' )
Plt_Input %>%
plot_ly(x = ~x, showlegend = FALSE) %>%
add_markers(y = ~y, opacity = 0.7, color = 'rgb(0, 150, 100)') %>%
add_lines(x = ~x, y = fitted(fit))%>%
layout(title="a",
annotations = list(x = 60, y = 42, showarrow = TRUE, arrowhead = 2,arrowsize = 0.5,ax = 90, ay = -60,
text = paste (Formula, R2, sep='\n'),
font = list(family = "Cambria, monospace", fontface = "bold", color = "black", size = 14)))
我确定'uri'='/ 0/85'的顶点已经存在!
[root@docker9 janusgraph-0.2.0-hadoop2]# bin/gremlin.sh
\,,,/
(o o)
-----oOOo-(3)-oOOo-----
plugin activated: janusgraph.imports
plugin activated: tinkerpop.server
plugin activated: tinkerpop.utilities
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/local/janusgraph-0.2.0-hadoop2/lib/slf4j-log4j12-1.7.12.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/janusgraph-0.2.0-hadoop2/lib/logback-classic-1.1.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
09:51:06 WARN org.apache.hadoop.util.NativeCodeLoader - Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
plugin activated: tinkerpop.hadoop
plugin activated: tinkerpop.spark
plugin activated: tinkerpop.tinkergraph
gremlin> :remote connect tinkerpop.server conf/remote.yaml session
==>Configured cdh-slave1/192.168.66.149:8182-[f699751a-c046-472f-8d84-a22a7897b241]
gremlin> :remote console
==>All scripts will now be sent to Gremlin Server - [cdh-slave1/192.168.66.149:8182]-[f699751a-c046-472f-8d84-a22a7897b241] - type ':remote console' to return to local mode
gremlin> g
==>graphtraversalsource[standardjanusgraph[cassandrathrift:[192.168.66.149]], standard]
gremlin> g.V(137481).valueMap()
==>{}
gremlin> g.V(137481)
Server could not serialize the result requested. Server error - Error during serialization: Could not find type for id: 137481. Note that the class must be serializable by the client and server for proper operation.
Type ':help' or ':h' for help.
Display stack trace? [yN]
gremlin>
gremlin> g.V(137481).valueMap(true)
==>{id=137481, label=vertex}