我已经创建了我的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我也尝试过通过目的地和使用列,但没有成功.配置有什么问题吗?
发布于 2016-02-11 08:47:11
根据Fiware团队的说法,data_model可以采用以下值:
dm-by-service
dm-by-service-path
dm-by-entity
dm-by-attribute在OrionPostgreSQLSink的特殊情况下,有效子集是dm-by-service-path和dm-by-entity。
https://stackoverflow.com/questions/35297620
复制相似问题