Details
-
Type:
Monitor
-
Status: Answered
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: FIWARE-TECH-HELP
-
Labels:
-
HD-Enabler:Orion
Description
Created question in FIWARE Q/A platform on 24-09-2019 at 13:09
Please, ANSWER this question AT https://stackoverflow.com/questions/58079389/enable-mongodb-sharding-for-fiware-orion-contextbroker
Question:
Enable MongoDB sharding for FIWARE Orion ContextBroker
Description:
I am trying to setup MongoDB sharding for the Orion ContextBroker, and IotAgent-Json, I am able to distribute the device provisioning and service data in MongoDb between shards, but whenever i sends the actual device data it gives following error:
I am using following command to shard the collection:
sh.shardCollection("orion.entities",
)
Intercept of ContextBroker log:
time=Tuesday 24 Sep 11:19:22 2019.846Z | lvl=ERROR | corr=28ee81ee-debd-11e9-84cc-3464a92017cd | trans=1569323345-406-00000000008 | from=127.0.0.1 | srv=fiwareiot | subsrv=/raw | comp=Orion | op=AlarmManager.cpp[211]:dbError | msg=Raising alarm DatabaseError: collection: orion.entities - update(): <{ _id.id: "DeviceEntity1", _id.type: "DeviceEntity", _id.servicePath:
What MongoDB shard key strategy should i follow, for following composite document id,
there may be multiple document for _id.id and _id.servicePath.
I want to distribute data with "_id.id": "DeviceEntity1" and "_id.id": "DeviceEntity2"in two MongoDB shards.
"_id" :
{ "id" : "DeviceEntity1", "type" : "DeviceEntity", "servicePath" : "/raw" },...
Thank You.
Activity
Field | Original Value | New Value |
---|---|---|
Component/s | FIWARE-TECH-HELP [ 10278 ] |
Assignee | Fermín Galán [ fermin ] |
HD-Enabler | Orion [ 10875 ] | |
Description |
Created question in FIWARE Q/A platform on 24-09-2019 at 13:09 {color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/58079389/enable-mongodb-sharding-for-fiware-orion-contextbroker +Question:+ Enable MongoDB sharding for FIWARE Orion ContextBroker +Description:+ I am trying to setup MongoDB sharding for the Orion ContextBroker, and IotAgent-Json, I am able to distribute the device provisioning and service data in MongoDb between shards, but whenever i sends the actual device data it gives following error: { "name": "ENTITY_GENERIC_ERROR", "message": "Error accesing entity data for device: DeviceEntity1 of type: DeviceEntity1"} I am using following command to shard the collection: sh.shardCollection("orion.entities",{"_id.servicePath": 1, "_id.id": 1, "_id.type": 1}) Intercept of ContextBroker log: time=Tuesday 24 Sep 11:19:22 2019.846Z | lvl=ERROR | corr=28ee81ee-debd-11e9-84cc-3464a92017cd | trans=1569323345-406-00000000008 | from=127.0.0.1 | srv=fiwareiot | subsrv=/raw | comp=Orion | op=AlarmManager.cpp[211]:dbError | msg=Raising alarm DatabaseError: collection: orion.entities - update(): <{ _id.id: "DeviceEntity1", _id.type: "DeviceEntity", _id.servicePath: What MongoDB shard key strategy should i follow, for following composite document id, there may be multiple document for _id.id and _id.servicePath. I want to distribute data with "_id.id": "DeviceEntity1" and "_id.id": "DeviceEntity2"in two MongoDB shards. "_id" : { "id" : "DeviceEntity1", "type" : "DeviceEntity", "servicePath" : "/raw" },... Thank You. |
Created question in FIWARE Q/A platform on 24-09-2019 at 13:09
{color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/58079389/enable-mongodb-sharding-for-fiware-orion-contextbroker +Question:+ Enable MongoDB sharding for FIWARE Orion ContextBroker +Description:+ I am trying to setup MongoDB sharding for the Orion ContextBroker, and IotAgent-Json, I am able to distribute the device provisioning and service data in MongoDb between shards, but whenever i sends the actual device data it gives following error: { "name": "ENTITY_GENERIC_ERROR", "message": "Error accesing entity data for device: DeviceEntity1 of type: DeviceEntity1"} I am using following command to shard the collection: sh.shardCollection("orion.entities",{"_id.servicePath": 1, "_id.id": 1, "_id.type": 1}) Intercept of ContextBroker log: time=Tuesday 24 Sep 11:19:22 2019.846Z | lvl=ERROR | corr=28ee81ee-debd-11e9-84cc-3464a92017cd | trans=1569323345-406-00000000008 | from=127.0.0.1 | srv=fiwareiot | subsrv=/raw | comp=Orion | op=AlarmManager.cpp[211]:dbError | msg=Raising alarm DatabaseError: collection: orion.entities - update(): <{ _id.id: "DeviceEntity1", _id.type: "DeviceEntity", _id.servicePath: What MongoDB shard key strategy should i follow, for following composite document id, there may be multiple document for _id.id and _id.servicePath. I want to distribute data with "_id.id": "DeviceEntity1" and "_id.id": "DeviceEntity2"in two MongoDB shards. "_id" : { "id" : "DeviceEntity1", "type" : "DeviceEntity", "servicePath" : "/raw" },... Thank You. |
Status | Open [ 1 ] | In Progress [ 3 ] |
Status | In Progress [ 3 ] | Answered [ 10104 ] |