fiware-orionfiware-cygnusfiware-cosmos

How to connect Orion with the public cosmos.lab.fi-ware.org instance using Cygnus


I am trying to persist my Orion data into the public cosmos.lab.fi-ware.org instance using Cygnus. Cygnus is up and running and the HDFSSink part of my /usr/cygnus/conf/agent_1.conf looks like this:

# OrionHDFSSink configuration cygnusagent.sinks.hdfs-sink.channel = hdfs-channel cygnusagent.sinks.hdfs-sink.type = com.telefonica.iot.cygnus.sinks.OrionHDFSSink cygnusagent.sinks.hdfs-sink.enable_grouping = false cygnusagent.sinks.hdfs-sink.backend_impl = rest cygnusagent.sinks.hdfs-sink.hdfs_host = cosmos.lab.fi-ware.org cygnusagent.sinks.hdfs-sink.hdfs_port = 14000 cygnusagent.sinks.hdfs-sink.hdfs_username = myUsernameInCosmosLabInstance cygnusagent.sinks.hdfs-sink.hdfs_password = myPasswordInCosmosLabInstance cygnusagent.sinks.hdfs-sink.oauth2_token = myTokenForCosmosLabInstance cygnusagent.sinks.hdfs-sink.hive = true cygnusagent.sinks.hdfs-sink.hive.server_version = 2 cygnusagent.sinks.hdfs-sink.hive.host = cosmos.lablfi-ware.org cygnusagent.sinks.hdfs-sink.hive.port = 10000 cygnusagent.sinks.hdfs-sink.hive.db_type = default-db

I add a new subscription with Cygnus as the reference endpoint and I send an update to previously created NGSIEntity, but nothing appears in my cosmos.lab.fi-ware.org instance. When looking at /var/log/cygnus/cygnus.log I cant find nothing useful, and I find some Java errors.

I am using Orion v. 0.28 and Cygnus v. 0.13.


Solution

  • As the log is saying:

    Could not open connection to jdbc:hive2://cosmos.lablfi-ware.org:10000/default: java.net.UnknownHostException: cosmos.lablfi-ware.org
    

    You must configure the right Hive endpoint:

    cygnusagent.sinks.hdfs-sink.hive.host = cosmos.lab.fiware.org
    

    Instead of:

    cygnusagent.sinks.hdfs-sink.hive.host = cosmos.lablfi-ware.org
    

    NOTE: Youy may have noticed I've used cosmos.lab.fiware.org. Both cosmos.lab.fiware.org and cosmos.lab.fi-ware.org are valid, bit the first one is preferred.