简体   繁体   中英

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

I have created my agent_01.conf to use postgresql sink, below you can find the configuration. But I'm getting the following error

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)

The configuration file is the following

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

I have also tried with by-destination and using column, but without success. Is there anything wrong with the configuration?

According to Fiware team, data_model can take the following values:

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

In the particular case of OrionPostgreSQLSink, the valid subset is dm-by-service-path and dm-by-entity

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM