Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Copyright 2014 Telefónica Investigación y Desarrollo, S.A.U
- #
- # This file is part of fiware-cygnus (FI-WARE project).
- #
- # fiware-cygnus is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General
- # Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any
- # later version.
- # fiware-cygnus is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
- # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
- # details.
- #
- # You should have received a copy of the GNU Affero General Public License along with fiware-cygnus. If not, see
- # http://www.gnu.org/licenses/.
- #
- # For those usages not covered by the GNU Affero General Public License please contact with iot_support at tid dot es
- #=============================================
- # To be put in APACHE_FLUME_HOME/conf/agent.conf
- #
- # General configuration template explaining how to setup a sink of each of the available types (HDFS, CKAN, MySQL).
- #=============================================
- # The next tree fields set the sources, sinks and channels used by Cygnus. You could use different names than the
- # ones suggested below, but in that case make sure you keep coherence in properties names along the configuration file.
- # Regarding sinks, you can use multiple types at the same time; the only requirement is to provide a channel for each
- # one of them (this example shows how to configure 3 sink types at the same time). Even, you can define more than one
- # sink of the same type and sharing the channel in order to improve the performance (this is like having
- # multi-threading).
- cygnus-ngsi.sources = http-source
- cygnus-ngsi.sinks = mysql-sink
- cygnus-ngsi.channels = mysql-channel
- #=============================================
- # source configuration
- # channel name where to write the notification events
- cygnus-ngsi.sources.http-source.channels = mysql-channel
- # source class, must not be changed
- cygnus-ngsi.sources.http-source.type = org.apache.flume.source.http.HTTPSource
- # listening port the Flume source will use for receiving incoming notifications
- cygnus-ngsi.sources.http-source.port = 5050
- # Flume handler that will parse the notifications, must not be changed
- cygnus-ngsi.sources.http-source.handler = com.telefonica.iot.cygnus.handlers.NGSIRestHandler
- # URL target
- cygnus-ngsi.sources.http-source.handler.notification_target = /notify
- # default service (service semantic depends on the persistence sink)
- cygnus-ngsi.sources.http-source.handler.default_service = default
- # default service path (service path semantic depends on the persistence sink)
- cygnus-ngsi.sources.http-source.handler.default_service_path = /
- # source interceptors, do not change
- cygnus-ngsi.sources.http-source.interceptors = ts gi
- # TimestampInterceptor, do not change
- cygnus-ngsi.sources.http-source.interceptors.ts.type = timestamp
- # GroupingInterceptor, do not change
- cygnus-ngsi.sources.http-source.interceptors.gi.type = com.telefonica.iot.cygnus.interceptors.NGSIGroupingInterceptor$Builder
- # Grouping rules for the GroupingIntercetor, put the right absolute path to the file if necessary
- # see the doc/design/interceptors document for more details
- cygnus-ngsi.sources.http-source.interceptors.gi.grouping_rules_conf_file = /usr/cygnus/conf/grouping_rules.conf
- # ============================================
- # NGSIMySQLSink configuration
- # channel name from where to read notification events
- cygnus-ngsi.sinks.mysql-sink.channel = mysql-channel
- # sink class, must not be changed
- cygnus-ngsi.sinks.mysql-sink.type = com.telefonica.iot.cygnus.sinks.NGSIMySQLSink
- # true applies the new encoding, false applies the old encoding
- cygnus-ngsi.sinks.mysql-sink.enable_encoding = false
- # true if the grouping feature is enabled for this sink, false otherwise
- cygnus-ngsi.sinks.mysql-sink.enable_grouping = false
- # true if name mappings are enabled for this sink, false otherwise
- cygnus-ngsi.sinks.mysql-sink.enable_name_mappings = false
- # true if lower case is wanted to forced in all the element names, false otherwise
- cygnus-ngsi.sinks.mysql-sink.enable_lowercase = false
- # the FQDN/IP address where the MySQL server runs
- cygnus-ngsi.sinks.mysql-sink.mysql_host = 127.0.0.1
- # the port where the MySQL server listens for incomming connections
- cygnus-ngsi.sinks.mysql-sink.mysql_port = 3306
- # a valid user in the MySQL server
- cygnus-ngsi.sinks.mysql-sink.mysql_username = root
- # password for the user above
- cygnus-ngsi.sinks.mysql-sink.mysql_password = Cartesia2470
- # how the attributes are stored, either per row either per column (row, column)
- cygnus-ngsi.sinks.mysql-sink.attr_persistence = row
- # select the data_model: dm-by-service-path or dm-by-entity
- cygnus-ngsi.sinks.mysql-sink.data_model = dm-by-entity
- # number of notifications to be included within a processing batch
- cygnus-ngsi.sinks.mysql-sink.batch_size = 100
- # timeout for batch accumulation
- cygnus-ngsi.sinks.mysql-sink.batch_timeout = 30
- # number of retries upon persistence error
- cygnus-ngsi.sinks.mysql-sink.batch_ttl = 10
- # =============================================
- # mysql-channel configuration
- # channel type (must not be changed)
- cygnus-ngsi.channels.mysql-channel.type = memory
- # capacity of the channel
- cygnus-ngsi.channels.mysql-channel.capacity = 10000
- # amount of bytes that can be sent per transaction
- cygnus-ngsi.channels.mysql-channel.transactionCapacity = 1000
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement