Fiware &引用;空";当使用天鹅座将数据从猎户座沉入宇宙时,文件夹和文件都会被命名

Fiware &引用;空";当使用天鹅座将数据从猎户座沉入宇宙时,文件夹和文件都会被命名,fiware,fiware-cygnus,cosmos,fiware-cosmos,Fiware,Fiware Cygnus,Cosmos,Fiware Cosmos,我有一个关于ngsi2cosmos数据流的问题。将Orion中接收到的信息持久化到Cosmos的公共实例中时,一切正常,但目标文件夹和文件名都为“null” 简单测试如下: 我创建了一个全新的NGSIEntity,添加了以下标题:Fiware服务:myservice&Fiware服务路径:/my 我添加了一个以Cygnus作为参考端点的新订阅 我向以前创建的NGSIEntity发送更新 当我在Cosmos中检查我的用户空间时,我检查是否已经创建了以下路由:/user/myuser/myser

我有一个关于ngsi2cosmos数据流的问题。将Orion中接收到的信息持久化到Cosmos的公共实例中时,一切正常,但目标文件夹和文件名都为“null”

简单测试如下:

  • 我创建了一个全新的NGSIEntity,添加了以下标题:Fiware服务:myservice&Fiware服务路径:/my
  • 我添加了一个以Cygnus作为参考端点的新订阅
  • 我向以前创建的NGSIEntity发送更新
当我在Cosmos中检查我的用户空间时,我检查是否已经创建了以下路由:/user/myuser/myservice/null/null.txt

文件内容正常,猎户座中的每一条更新信息都已正确插入其中。问题在于文件夹和文件名。 我不能让它正常工作。它不是应该为文件夹和文件命名获取entityId和entityType吗

组件版本:

  • Orion版本:contextBroker-0.19.0-1.x86_64
  • 天鹅座版本:天鹅座-0.5-91.g3eb100e.x86_64
  • 宇宙:全球实例
天鹅座形态文件:

cygnusagent.sources = http-source
cygnusagent.sinks = hdfs-sink 
cygnusagent.channels = hdfs-channel

#=============================================
# source configuration
# channel name where to write the notification events
cygnusagent.sources.http-source.channels = hdfs-channel
# source class, must not be changed
cygnusagent.sources.http-source.type = org.apache.flume.source.http.HTTPSource
# listening port the Flume source will use for receiving incoming notifications
cygnusagent.sources.http-source.port = 5050
# Flume handler that will parse the notifications, must not be changed
cygnusagent.sources.http-source.handler = es.tid.fiware.fiwareconnectors.cygnus.handlers.OrionRestHandler
# URL target
cygnusagent.sources.http-source.handler.notification_target = /notify
# Default organization (organization semantic depend on the persistence sink)
cygnusagent.sources.http-source.handler.default_organization = org42
# Number of channel re-injection retries before a Flume event is definitely discarded
cygnusagent.sources.http-source.handler.events_ttl = 10
# Management interface port (FIXME: temporal location for this parameter)
cygnusagent.sources.http-source.handler.management_port = 8081
# Source interceptors, do not change
cygnusagent.sources.http-source.interceptors = ts
# Timestamp interceptor, do not change
cygnusagent.sources.http-source.interceptors.ts.type = timestamp
# Destination extractor interceptor, do not change
cygnusagent.sources.http-source.interceptors.de.type = es.tid.fiware.fiwreconnectors.cygnus.interceptors.DestinationExtractor$Builder
# Matching table for the destination extractor interceptor, do not change
cygnusagent.sources.http-source.interceptors.de.matching_table = matching_table.conf

# ============================================
# OrionHDFSSink configuration
# channel name from where to read notification events
cygnusagent.sinks.hdfs-sink.channel = hdfs-channel
# sink class, must not be changed
cygnusagent.sinks.hdfs-sink.type = es.tid.fiware.fiwareconnectors.cygnus.sinks.OrionHDFSSink
# Comma-separated list of FQDN/IP address regarding the Cosmos Namenode endpoints
cygnusagent.sinks.hdfs-sink.cosmos_host = 130.206.80.46
# port of the Cosmos service listening for persistence operations; 14000 for httpfs, 50070 for webhdfs and free choice for inifinty
cygnusagent.sinks.hdfs-sink.cosmos_port = 14000
# default username allowed to write in HDFS
cygnusagent.sinks.hdfs-sink.cosmos_default_username = myuser
# default password for the default username
cygnusagent.sinks.hdfs-sink.cosmos_default_password = mypassword
# HDFS backend type (webhdfs, httpfs or infinity)
cygnusagent.sinks.hdfs-sink.hdfs_api = httpfs
# how the attributes are stored, either per row either per column (row, column)
cygnusagent.sinks.hdfs-sink.attr_persistence = column
# prefix for the database and table names, empty if no prefix is desired
cygnusagent.sinks.hdfs-sink.naming_prefix =
# Hive FQDN/IP address of the Hive server
cygnusagent.sinks.hdfs-sink.hive_host = 130.206.80.46
# Hive port for Hive external table provisioning
cygnusagent.sinks.hdfs-sink.hive_port = 10000

#=============================================
# hdfs-channel configuration
# channel type (must not be changed)
cygnusagent.channels.hdfs-channel.type = memory
# capacity of the channel
cygnusagent.channels.hdfs-channel.capacity = 1000
# amount of bytes that can be sent per transaction
cygnusagent.channels.hdfs-channel.transactionCapacity = 100

我认为您应该配置cygnus的匹配_表来定义路径和文件名

该文件与Cygnus agent conf文件的路径相同

您可以遵循下一个示例:

# integer id|comma-separated fields|regex to be applied to the fields concatenation|destination|dataset
#
# The available "dictionary" of fields is:
#  - entitydId
#  - entityType
#  - servicePath

1|entityId,entityType|Room\.(\d*)Room|numeric_rooms|rooms

我认为您应该配置cygnus的匹配_表来定义路径和文件名

该文件与Cygnus agent conf文件的路径相同

您可以遵循下一个示例:

# integer id|comma-separated fields|regex to be applied to the fields concatenation|destination|dataset
#
# The available "dictionary" of fields is:
#  - entitydId
#  - entityType
#  - servicePath

1|entityId,entityType|Room\.(\d*)Room|numeric_rooms|rooms

你能用一些相关的日志编辑你的问题吗?(如果它们很大,请尝试使用Github gist)。我需要他们了解发生了什么。请你用一些相关日志编辑你的问题好吗?(如果它们很大,请尝试使用Github gist)。我需要他们了解正在发生的事情。事实上,这可能是原因之一。我建议检查是否存在
/usr/cygnus/conf/matching_table.conf
(不是模板,而是它的一个实例),并尝试删除/注释可能存在的任何示例规则。感谢您的回答。该文件丢失,必须手动创建,但无法正常工作(我在发布此问题之前就这样做了)。我尝试过更新cygnus,但由于/usr/cygnus目录在更新过程中被删除(幸运的是我先做了备份),因此更新过程也不能正常工作。我将尝试一个全新的实例并手动安装orion和cygnus,因为我检查了orion和cygnus的orion-psb-image-R4.2版本是否都已过时,这也可能是错误的原因。是的,在cygnus 0.6.0之前,RPM上有一个错误,只需执行
yum instal cygnus
即可避免升级。我建议您阅读以下问题:。在这里,您将了解如何升级到Cygnus 0.8.2,以及如何通过OAuth2执行身份验证/授权。事实上,这可能是原因之一。我建议检查是否存在
/usr/cygnus/conf/matching_table.conf
(不是模板,而是它的一个实例),并尝试删除/注释可能存在的任何示例规则。感谢您的回答。该文件丢失,必须手动创建,但无法正常工作(我在发布此问题之前就这样做了)。我尝试过更新cygnus,但由于/usr/cygnus目录在更新过程中被删除(幸运的是我先做了备份),因此更新过程也不能正常工作。我将尝试一个全新的实例并手动安装orion和cygnus,因为我检查了orion和cygnus的orion-psb-image-R4.2版本是否都已过时,这也可能是错误的原因。是的,在cygnus 0.6.0之前,RPM上有一个错误,只需执行
yum instal cygnus
即可避免升级。我建议您阅读以下问题:。在这里,您将了解如何升级到Cygnus 0.8.2,以及如何通过OAuth2执行身份验证/授权。