0
我正嘗試使用Java API在本地計算機中填充單節點Titan-HBase。 當試圖在土衛六建邊參數與HBase的後端,使用下面的代碼,嘗試使用Java API填充Titan-HBase組合時出現異常
public static final String ELABEL_RESOURCE_HAS_XDOC = "_EResourceHasXDoc";
public static final String IDX_EDGE_BY_CID_XID = "IdxEdgeByCidXid";
public static final String PROP_COLLECTION_ID = "_PCollectionID";
public static final String PROP_XDOC_ID = "_PXDocID";
m.buildEdgeIndex(m.getEdgeLabel(ELABEL_RESOURCE_HAS_XDOC), IDX_EDGE_BY_CID_XID, Direction.OUT, m.getPropertyKey(PROP_COLLECTION_ID), m.getPropertyKey(PROP_XDOC_ID));
我得到以下異常:
Exception in thread "main"
java.lang.ExceptionInInitializerError
at test.com.infa.prototype.titan.hbase.LoadIntoHBase.main(LoadIntoHBase.java:24)
Caused by: java.lang.IllegalArgumentException: Key must have an order-preserving data type to be used as sort key: _PCollectionID
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:88)
at com.thinkaurelius.titan.graphdb.types.StandardRelationTypeMaker.checkSortKey(StandardRelationTypeMaker.java:90)
at com.thinkaurelius.titan.graphdb.types.StandardRelationTypeMaker.checkGeneralArguments(StandardRelationTypeMaker.java:80)
at com.thinkaurelius.titan.graphdb.types.StandardRelationTypeMaker.makeDefinition(StandardRelationTypeMaker.java:113)
at com.thinkaurelius.titan.graphdb.types.StandardEdgeLabelMaker.make(StandardEdgeLabelMaker.java:78)
at com.thinkaurelius.titan.graphdb.types.StandardEdgeLabelMaker.make(StandardEdgeLabelMaker.java:19)
at com.thinkaurelius.titan.graphdb.database.management.ManagementSystem.buildRelationTypeIndex(ManagementSystem.java:327)
at com.thinkaurelius.titan.graphdb.database.management.ManagementSystem.buildEdgeIndex(ManagementSystem.java:275)
at com.thinkaurelius.titan.graphdb.database.management.ManagementSystem.buildEdgeIndex(ManagementSystem.java:270)
at com.infa.prototype.titan.utils.TitanConstants.createSchema(TitanConstants.java:87)
at test.com.infa.prototype.titan.hbase.TitanConnection.<init>(TitanConnection.java:38)
at test.com.infa.prototype.titan.hbase.TitanConnection.<clinit>(TitanConnection.java:13)
... 1 more
我使用泰坦0.5.0M1與HBase的0.94。 23。
結果爲JPS返回: 14951 LoadIntoHBase 14674 Elasticsearch 14379個HMASTER 17987個JPS
我非常新與HBase的泰坦,這將是巨大的,如果有人能在正確的方向指向我關於這個錯誤。使用代碼提供填充Titan-HBase設置示例代碼的指針也是非常有用的。