没有枚举常量com.telefonica.iot.cygnus.sinks.OrionSink.DataModel.BYSERVICEPATH

时间:2016-02-09 16:51:12

标签: postgresql fiware-cygnus

我创建了agent_01.conf以使用postgresql接收器,下面你可以找到配置。但我收到以下错误

16/02/09 16:39:27 ERROR node.AbstractConfigurationProvider: Sink postgresql-sink has been removed due to an error during configuration
cygnus_1 | java.lang.IllegalArgumentException: No enum constant com.telefonica.iot.cygnus.sinks.OrionSink.DataModel.BYSERVICEPATH
cygnus_1 |  at java.lang.Enum.valueOf(Enum.java:236)
cygnus_1 |  at com.telefonica.iot.cygnus.sinks.OrionSink$DataModel.valueOf(OrionSink.java:77)

配置文件如下

cygnusagent.sources = http-source
cygnusagent.sinks = postgresql-sink
cygnusagent.channels = postgresql-channel
cygnusagent.sources.http-source.channels = postgresql-channel
cygnusagent.sinks.postgresql-sink.channel = postgresql-channel
# sink class, must not be changed
cygnusagent.sinks.postgresql-sink.type = com.telefonica.iot.cygnus.sinks.OrionPostgreSQLSink
# true if the grouping feature is enabled for this sink, false otherwise
cygnusagent.sinks.postgresql-sink.enable_grouping = false
# the FQDN/IP address where the PostgreSQL server runs
cygnusagent.sinks.postgresql-sink.postgresql_host = myIPaddress
# the port where the PostgreSQL server listens for incomming connections
cygnusagent.sinks.postgresql-sink.postgresql_port = 5432
# the name of the postgresql database
cygnusagent.sinks.postgresql-sink.postgresql_database = database
# a valid user in the PostgreSQL server
cygnusagent.sinks.postgresql-sink.postgresql_username = username
# password for the user above
cygnusagent.sinks.postgresql-sink.postgresql_password = password
# how the attributes are stored, either per row either per column (row, column)
cygnusagent.sinks.postgresql-sink.attr_persistence = row
# select the table type
#cygnusagent.sinks.postgresql-sink.data_model = by-service-path
cygnusagent.sinks.postgresql-sink.data_model = by-service-path
# number of notifications to be included within a processing batch
cygnusagent.sinks.postgresql-sink.batch_size = 100
# timeout for batch accumulation
cygnusagent.sinks.postgresql-sink.batch_timeout = 30

我也尝试使用by-destination和使用列,但没有成功。配置有什么问题吗?

1 个答案:

答案 0 :(得分:0)

根据Fiware团队的说法, data_model可以采用以下值:

dm-by-service
dm-by-service-path
dm-by-entity
dm-by-attribute

在OrionPostgreSQLSink的特定情况下,有效子集为dm-by-service-pathdm-by-entity