当我使用地理定位属性时,如何从JSON文件导入titan ??
我正在与土卫六DB TP3 -版本3.0.1-孵化
gremlin> Gremlin.version()
==>3.0.1-incubating
gremlin>并使用GeoShape索引属性(地理定位),试图导出和导入新的DB。
我的步骤如下:
//export :
tg = TitanFactory.open(‘../conf/titan-db.properties’)
tg.io(IoCore.graphson()).writeGraph('/var/backups/PRODUCTION_DATA_27_10_16.json');
//import to new DB:
tg.io(IoCore.graphson()).readGraph('/var/backups/PRODUCTION_DATA_27_10_16.json'); 但不幸的是有例外:
gremlin> tg.io(IoCore.graphson()).readGraph('/var/backups/PRODUCTION_DATA_27_10_16.json');
Property value [{type=Point, coordinates=[33.0, 32.0]}] is of type class java.util.LinkedHashMap is not supported
Display stack trace? [yN] y
java.lang.IllegalArgumentException: Property value [{type=Point, coordinates=[33.0, 32.0]}] is of type class java.util.LinkedHashMap is not supported
at org.apache.tinkerpop.gremlin.structure.Property$Exceptions.dataTypeOfPropertyValueNotSupported(Property.java:159)
at com.thinkaurelius.titan.graphdb.transaction.StandardTitanTx.verifyAttribute(StandardTitanTx.java:564)
at com.thinkaurelius.titan.graphdb.transaction.StandardTitanTx.addProperty(StandardTitanTx.java:716)
at com.thinkaurelius.titan.graphdb.vertices.AbstractVertex.property(AbstractVertex.java:142)
at com.thinkaurelius.titan.graphdb.vertices.AbstractVertex.property(AbstractVertex.java:23)
at org.apache.tinkerpop.gremlin.structure.util.Attachable$Method.lambda$createVertex$26(Attachable.java:296)请有任何解决办法..。。?
发布于 2016-10-31 17:58:29
看起来您正在运行这个第1183期:Titan1.0.0 GraphSONWriter.writeGraph JsonMappingException,它已经修复了。尝试从源代码构建titan11分支。如果您需要构建它的指导,请查看这个土卫六邮寄名单邮寄中的步骤。
如果您想用序列化修复修补土卫六1.0.0构建,而不升级到titan11,请尝试如下(在此讨论):
git clone https://github.com/thinkaurelius/titan.git
cd titan
git checkout 1.0.0
git cherry-pick 6dfc816d821a7739398e5cebc1e999d75c866c19
mvn clean install -DskipTests=true -Dgpg.skip=true -Paurelius-release
unzip titan-dist/titan-dist-hadoop-1/target/titan-1.0.0-hadoop1.ziphttps://stackoverflow.com/questions/40332627
复制相似问题