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

No enum constant com.telefonica.iot.cygnus.sinks.OrionSink.DataModel.BYSERVICEPATH

我已经创建了我的 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

我也试过按目的地和使用列,但没有成功。配置有问题吗?

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

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

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