Store space data from Orion to Cygnus

I have one doubt about how to store data in an architecture where Cygnus subscribes to Orion Context Broker and then Cygnus has to store data in Cosmos. Do I need to implement a custom WebHDFS client for storage from Cygnus to Cosmos, or can it be saved automatically if we configure Cosmos via the CLI? After reading some documentation, I don't know if this "last step" can be done through configuration using the CLI or if a client interface is needed. When might you not need a custom WebHDFS client?

+3


source to share


1 answer


As said, Cygnus subscribes to Orion to be notified of some desired objects when any of their attributes change.

What's happening? Cygnus uses the WebHDFS REST API to feed data to Cosmos HDFS, typically a file for a notifiable entity. Initially, if the file does not exit, the "create" operation from the REST API is used; if it already exists, the "append" operation is used.

Where are the files above generated? Cygnus HDFS File Path:



/user/<your_cosmos_username>/<notified_fiware_service>/<notified_fiware_servicePath>/<built_destination>/<built_destination>.txt

      

notified_fiware_service

and notified_fiware_servicePath

are the Http headers sent by Orion in the notification; it's about how to organize your data. built_destination

is usually the result of the concatenation of notified entityId

and entityType

.

Finally your_cosmos_username

- your Linux username and HDFS in your FIWARE LAB Cosmos deployment. This can be obtained by logging in with your FIWARE LAB credentials at http://cosmos.lab.fi-ware.org/cosmos-gui/ . You just have to do it in your life; this is, let's say, the provisioning step that creates the Unix username and your HDFS user space.

+1


source







All Articles