Enabling Hive on Cygnus

2019-07-26 02:45发布

问题:

So far, my Orion subscriptions are appropriately creating hfds files on Cosmos instance. However, since (my project's requirements) I will be dealing with Wirecloud, to do so, seems that a good approach is to perform Hive queries to retrieve historical data.

Thus, How can I settle my Cygnus config files to automatically create tables and populate Hive?

Will using below configuration be enough?:

# Hive enabling
cygnusagent.sinks.hdfs-sink.hive = true
# Hive server version, 1 or 2 (ignored if hive is false)
cygnusagent.sinks.hdfs-sink.hive.server_version = 2
# Hive FQDN/IP address of the Hive server (ignored if hive is false)
cygnusagent.sinks.hdfs-sink.hive.host = x.y.z.w
# Hive port for Hive external table provisioning (ignored if hive is false)
cygnusagent.sinks.hdfs-sink.hive.port = 10000

Is this documentation up to date (i.e., http://fiware-cygnus.readthedocs.io/en/1.2.0/cygnus-ngsi/installation_and_administration_guide/ngsi_agent_conf/)?

回答1:

I'm only missing:

cygnusagent.sinks.hdfs-sink.hive.db_type = default-db | namespace-db

The above command will allow you switching form the default Hive database, or a private database of your own.

Additionally, if using FIWARE Lab global instance of Cosmos, the hdfs_password must be equals to your OAuth2 token.