- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我们在一个具有 5 个节点的集群中使用 OrientDB,其上有 Java API 库。他们都使用版本 2.2.8,我们使用 Tinkerpop Blueprints 版本 2.6.0。我们遇到一个奇怪的问题,数据库运行良好一段时间,然后突然开始遇到以下错误。自从我们从 1.7 升级到 2.2 后,我们才开始遇到这个问题。
我想知道是否有其他人以前遇到过这个问题/错误,或者是否有人对我们可能需要更改哪些内容才能使多节点环境正常工作有任何建议。
com.orientechnologies.orient.server.distributed.ODistributedConfigurationChangedException: Local node 'aNode' is not the master for cluster 'aCluster' (it is 'anotherNode')
DB name="dbName"
DB name="dbName"
at sun.reflect.GeneratedConstructorAccessor61.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient.throwSerializedException(OChannelBinaryAsynchClient.java:428)
at com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient.handleStatus(OChannelBinaryAsynchClient.java:379)
at com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient.beginResponse(OChannelBinaryAsynchClient.java:261)
at com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient.beginResponse(OChannelBinaryAsynchClient.java:153)
at com.orientechnologies.orient.client.remote.OStorageRemote.beginResponse(OStorageRemote.java:2133)
at com.orientechnologies.orient.client.remote.OStorageRemote$28.execute(OStorageRemote.java:1316)
at com.orientechnologies.orient.client.remote.OStorageRemote$28.execute(OStorageRemote.java:1289)
at com.orientechnologies.orient.client.remote.OStorageRemote$2.execute(OStorageRemote.java:198)
at com.orientechnologies.orient.client.remote.OStorageRemote.baseNetworkOperation(OStorageRemote.java:230)
at com.orientechnologies.orient.client.remote.OStorageRemote.networkOperation(OStorageRemote.java:195)
at com.orientechnologies.orient.client.remote.OStorageRemote.commit(OStorageRemote.java:1289)
at com.orientechnologies.orient.core.tx.OTransactionOptimistic.doCommit(OTransactionOptimistic.java:560)
at com.orientechnologies.orient.core.tx.OTransactionOptimistic.commit(OTransactionOptimistic.java:106)
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.commit(ODatabaseDocumentTx.java:2733)
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.commit(ODatabaseDocumentTx.java:2703)
at com.tinkerpop.blueprints.impls.orient.OrientTransactionalGraph.commit(OrientTransactionalGraph.java:175)
最佳答案
我在两个节点的场景中看到了类似的情况。在 node1 上保存文档(Java API)时,出现错误:
com.orientechnologies.orient.server.distributed.ODistributedConfigurationChangedException: Local node 'node1' is not the master for cluster 'event_3' (it is 'node2')
DB name="********"
DB name="********"
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient.throwSerializedException(OChannelBinaryAsynchClient.java:428)
at com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient.handleStatus(OChannelBinaryAsynchClient.java:379)
at com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient.beginResponse(OChannelBinaryAsynchClient.java:261)
at com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient.beginResponse(OChannelBinaryAsynchClient.java:153)
at com.orientechnologies.orient.client.remote.OStorageRemote.beginResponse(OStorageRemote.java:2133)
at com.orientechnologies.orient.client.remote.OStorageRemote$6.execute(OStorageRemote.java:543)
at com.orientechnologies.orient.client.remote.OStorageRemote$6.execute(OStorageRemote.java:537)
at com.orientechnologies.orient.client.remote.OStorageRemote$1.execute(OStorageRemote.java:166)
at com.orientechnologies.orient.client.remote.OStorageRemote.baseNetworkOperation(OStorageRemote.java:230)
at com.orientechnologies.orient.client.remote.OStorageRemote.asyncNetworkOperation(OStorageRemote.java:158)
at com.orientechnologies.orient.client.remote.OStorageRemote.createRecord(OStorageRemote.java:523)
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.executeSaveRecord(ODatabaseDocumentTx.java:2075)
at com.orientechnologies.orient.core.tx.OTransactionNoTx.saveNew(OTransactionNoTx.java:246)
at com.orientechnologies.orient.core.tx.OTransactionNoTx.saveRecord(OTransactionNoTx.java:179)
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.save(ODatabaseDocumentTx.java:2598)
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.save(ODatabaseDocumentTx.java:103)
at com.orientechnologies.orient.core.record.impl.ODocument.save(ODocument.java:1800)
at com.orientechnologies.orient.core.record.impl.ODocument.save(ODocument.java:1791)
(... stack trace truncated here ...)
抛出异常的Java代码:
OPartitionedDatabasePool pool = new OPartitionedDatabasePool(dbUrl, user, password);
...
try (ODatabaseDocumentTx ignored = pool.acquire()) {
ODocument document = new ODocument(className);
document.fromJSON(recordData.encode());
document.field("date", timestamp, OType.DATETIME);
document.save();
}
列出集群显示集群“event_3”确实由node2拥有:
|# |NAME | ID|CLASS |CONFLICT-STRATEGY|COUNT|OWNER_SERVER|OTHER_SERVERS|AUTO_DEPLOY_NEW_NODE|
|14 |event_1 | 18|event | | 1| node1 | [node2] | true |
|15 |event_2 | 19|event | | 1| node1 | [node2] | true |
|16 |event_3 | 20|event | | 0| node2 | [node1] | true |
在其他情况下插入成功,因此看起来只是在某些情况下选择了错误的节点进行插入。
关于java - orientdb本地节点不是master,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39776367/
我对 OrientDB 中的多重继承很好奇...假设我创建了以下顶点类: CREATE CLASS A EXTENDS V CREATE PROPERTY A.label STRING CREATE
generic 类和vertex 或edge 类有什么区别?你为什么要用一个而不是另一个? 最佳答案 OrientDB 是一个多模型数据库。文档中介绍了数据建模: http://orientdb.co
如何在 Orientdb 中使 Edge 独一无二。 我想出的解决方案: 删除边 重新创建 但这并不好。 Edge 没有任何属性。 示例: create edge is_friend from #12
这是我现在使用的查询: INSERT INTO details SET name = "INITIALIZE",actionMap ={"1":12:1,"2":12:2}; 这里 12:1,12:2
考虑我们有 Vertex User 和 Edge FriendsWith。FriendsWith 可以在两个方向上进出(通常是在 2 个用户之间或在 2 个用户之间)。 重复是指从一个用户到另一个用户
是否可以删除 OrientDB 文档中嵌入列表中的一项?我有一个“个人数据”文档,其中包含“查询”列表。例如 { name: "Marco", inquiries: [{date: 2014-11-2
我想查询具有特定属性的文档。 我尝试了以下方法: select * from Foo where not bar is null 但这会返回我的文档,即使它们没有该属性。即使它可以工作,但如果存在以
我的问题是,我如何查询“聊天”表以检索个人资料表中的人员详细信息。 ParticipatinIn edge 从 Person 开始聊天。HasProfile Edge 开始了个人资料。 请帮我解决这个
我想查询具有特定属性的文档。 我尝试了以下方法: select * from Foo where not bar is null 但这会返回我的文档,即使它们没有该属性。即使它可以工作,但如果存在以
是否有可能得到一个例子来在 orientdb 中插入一条边。如果它不存在,有没有办法检查边是否存在,如果存在则只更新边,否则创建新边。我使用的是 Orientdb 2.1.13 版本。谢谢 最佳答案
我试图让 OrientDB Studio 显示一个字符串作为每个节点的标签,就像 Susheel Kumar 的这个截图一样 但是,当我运行 Susheel 的代码(为后代发布在下面)时,节点全部显示
我有一个相当复杂的查询 SELECT FROM ( SELECT EXPAND(INV()) FROM ( SELECT FROM ( SELECT EXPAND(OUTE('
我猜这是一个令人尴尬的初学者问题,无论如何... 在“服务器安全”下的 OrientDB 文档中,我们发现: While OrientDB Server can function as a regul
我有一个 CSV 文件,有 Id1 和 Id2。 Id1 和 Id2 是两个不同类的顶点。我想在 Id1 和 Id2 之间取得优势。这可以通过ETL实现吗? 我们可以在变压器的边缘配置中添加一些东西来
我正在研究 OrientDB 进行学术研究。我们应该关注的一个重要部分是 ACID 范式。 OrienDB 手册说: OrientDB is an ACID compliant DBMS. 它还说:
我正在使用 OrientDB 2.1.9 并创建了名为“TimespentEvents”的 plocal 图数据库。 当尝试在同一台机器上使用 JDBC 驱动程序从 Java 连接 URL 'jdbc
我想在 OrientDB 中使用蓝图和管道。 方法是什么?还有 TinkerPop3 或 TinkerPop2?哪个更适合我的学习体验? 最佳答案 OrientDB 的最新版本在本地实现了 Bluep
我一直在尝试使用 OrientDB 提供的“工作室”将 gremlin 与 OrientDB (V 3.0.30) 一起使用,但每次我尝试运行 gremlin 查询,例如 g.V我收到错误:com.o
昨天我们的 nexus 存储库实例由于磁盘已满事件而横盘整理。释放一些空间并尝试重新启动后,nexus 不再可用。结果,数据库损坏(大概)并且无法连接。当我运行 nexus-orient-consol
我正在使用带有 OrientDb Studio 2.2.8 的车辆历史数据库,并且我想要投影 automobile 类由 起亚。 数据库的架构如下所示: (汽车)--isModel-->(型号)--i
我是一名优秀的程序员,十分优秀!