首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Titan DB 1.0.0 :无法将Json文件导入titan 3.x

Titan DB 1.0.0 :无法将Json文件导入titan 3.x
EN

Stack Overflow用户
提问于 2016-10-30 19:13:45
回答 1查看 364关注 0票数 1

当我使用地理定位属性时,如何从JSON文件导入titan ??

我正在与土卫六DB TP3 -版本3.0.1-孵化

代码语言:javascript
复制
gremlin> Gremlin.version()
==>3.0.1-incubating
gremlin>

并使用GeoShape索引属性(地理定位),试图导出和导入新的DB。

我的步骤如下:

代码语言:javascript
复制
   //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'); 

但不幸的是有例外:

代码语言:javascript
复制
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)

请有任何解决办法..。。?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-10-31 17:58:29

看起来您正在运行这个第1183期:Titan1.0.0 GraphSONWriter.writeGraph JsonMappingException,它已经修复了。尝试从源代码构建titan11分支。如果您需要构建它的指导,请查看这个土卫六邮寄名单邮寄中的步骤。

如果您想用序列化修复修补土卫六1.0.0构建,而不升级到titan11,请尝试如下(在此讨论):

代码语言:javascript
复制
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.zip
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/40332627

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档