Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OrionCKANSink] Within a dataset/package, only one resource is added, the second one always fails #280

Closed
iariasleon opened this issue Dec 23, 2014 · 4 comments
Assignees
Labels
Milestone

Comments

@iariasleon
Copy link
Contributor

The priority is minor because ckan row mode is not used actually.


time=2014-12-23T16:05:28.289IST | lvl=INFO | trans=1419342998-494-0000000009 | function=getEvents | comp=Cygnus | msg=es.tid.fiware.fiwareconnectors.cygnus.handlers.OrionRestHandler[153] : Starting transaction (1419342998-494-0000000009)
time=2014-12-23T16:05:28.289IST | lvl=INFO | trans=1419342998-494-0000000009 | function=getEvents | comp=Cygnus | msg=es.tid.fiware.fiwareconnectors.cygnus.handlers.OrionRestHandler[239] : Received data ({"originator": "localhost", "subscriptionId": "51c0ac9ed714fb3b37d7d5a8", "contextResponses": [{"contextElement": {"attributes": [{"type": "celcius", "name": "name_BIF2_0", "value": "RCwC", "metadatas": [{"type": "type_QF8e", "name": "name_vENV", "value": "8nkk"}]}, {"type": "celcius", "name": "name_BIF2_1", "value": "RCwC", "metadatas": [{"type": "type_QF8e", "name": "name_vENV", "value": "8nkk"}]}], "type": "room", "id": "room2", "isPattern": "false"}, "statusCode": {"code": "200", "reasonPhrase": "OK"}}]})
time=2014-12-23T16:05:28.290IST | lvl=INFO | trans=1419342998-494-0000000009 | function=getEvents | comp=Cygnus | msg=es.tid.fiware.fiwareconnectors.cygnus.handlers.OrionRestHandler[261] : Event put in the channel (id=1586086166, ttl=10)
time=2014-12-23T16:05:28.293IST | lvl=INFO | trans=1419342998-494-0000000009 | function=process | comp=Cygnus | msg=es.tid.fiware.fiwareconnectors.cygnus.sinks.OrionSink[126] : Event got from the channel (id=1586086166, headers={timestamp=1419343528290, content-type=application/json, transactionId=1419342998-494-0000000009, fiware-service=tenant_24, fiware-servicepath=servicepath, ttl=10, destination=room2_room}, bodyLength=513)
time=2014-12-23T16:05:28.296IST | lvl=INFO | trans=1419342998-494-0000000009 | function=persist | comp=Cygnus | msg=es.tid.fiware.fiwareconnectors.cygnus.sinks.OrionCKANSink[199] : [ckan-sink] Persisting data at OrionCKANSink (orgName=tenant_24, pkgName=tenant_24_servicepath, resName=room2_room, data=1419343528290, 2014-12-23T16:05:28.29, name_BIF2_0, celcius, "RCwC", [{"name":"name_vENV","type":"type_QF8e","value":"8nkk"}])
time=2014-12-23T16:05:28.465IST | lvl=ERROR | trans=1419342998-494-0000000009 | function=process | comp=Cygnus | msg=es.tid.fiware.fiwareconnectors.cygnus.sinks.OrionSink[159] : Runtime error (Cannot persist the data (orgName=tenant_24, pkgName=tenant_24_servicepath, resName=room2_room))
time=2014-12-23T16:05:28.465IST | lvl=INFO | trans=1419342998-494-0000000009 | function=process | comp=Cygnus | msg=es.tid.fiware.fiwareconnectors.cygnus.sinks.OrionSink[174] : Finishing transaction (1419342998-494-0000000009)

captura

http:// filab_ckan_host /dataset/tenant_24_servicepath/resource/8e03ea73-d0c9-43d7-b589-ff8e415a5636

You can see the reverse case in:

captura

http:// filab_ckan_host /dataset/tenant_23_servicepath/resource/3fa528b1-b224-4175-954a-063aad7c7bf2

@frbattid
Copy link
Member

Another FIWARE user has repported this same issue. Assignning it to 0.9.0 milestone.

@frbattid frbattid added this to the release/0.9.0 milestone Sep 21, 2015
@frbattid frbattid self-assigned this Sep 21, 2015
@frbattid frbattid changed the title [CKAN-ROW] not stored in a second resource in the same dataset Within a dataset/package, only one resource is added, the second one always fails Sep 21, 2015
@frbattid frbattid changed the title Within a dataset/package, only one resource is added, the second one always fails [OrionCKANSink] Within a dataset/package, only one resource is added, the second one always fails Sep 21, 2015
@artiamob
Copy link

The problem is loated at the end of the 'resourceLookupOrCreate' method of the 'CKANBackendImpl' class where 'cache.getResId(resName)' returns 'null' even when the preceding code has confirmed that the resource should be cahed.

@frbattid
Copy link
Member

Yes, you can see the proposed fix at 3b563b2

It is under revision and final merge into develop before releasing.

@frbattid
Copy link
Member

Fixed in PR #533

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants