Advertisement
Guest User

Untitled

a guest
Nov 9th, 2016
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.47 KB | None | 0 0
  1. # Copyright 2014 Telefónica Investigación y Desarrollo, S.A.U
  2. #
  3. # This file is part of fiware-cygnus (FI-WARE project).
  4. #
  5. # fiware-cygnus is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General
  6. # Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any
  7. # later version.
  8. # fiware-cygnus is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
  9. # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
  10. # details.
  11. #
  12. # You should have received a copy of the GNU Affero General Public License along with fiware-cygnus. If not, see
  13. # http://www.gnu.org/licenses/.
  14. #
  15. # For those usages not covered by the GNU Affero General Public License please contact with iot_support at tid dot es
  16.  
  17. #=============================================
  18. # To be put in APACHE_FLUME_HOME/conf/agent.conf
  19. #
  20. # General configuration template explaining how to setup a sink of each of the available types (HDFS, CKAN, MySQL).
  21.  
  22. #=============================================
  23. # The next tree fields set the sources, sinks and channels used by Cygnus. You could use different names than the
  24. # ones suggested below, but in that case make sure you keep coherence in properties names along the configuration file.
  25. # Regarding sinks, you can use multiple types at the same time; the only requirement is to provide a channel for each
  26. # one of them (this example shows how to configure 3 sink types at the same time). Even, you can define more than one
  27. # sink of the same type and sharing the channel in order to improve the performance (this is like having
  28. # multi-threading).
  29. cygnus-ngsi.sources = http-source
  30. cygnus-ngsi.sinks = mysql-sink
  31. cygnus-ngsi.channels = mysql-channel
  32. #=============================================
  33. # source configuration
  34. # channel name where to write the notification events
  35. cygnus-ngsi.sources.http-source.channels = mysql-channel
  36. # source class, must not be changed
  37. cygnus-ngsi.sources.http-source.type = org.apache.flume.source.http.HTTPSource
  38. # listening port the Flume source will use for receiving incoming notifications
  39. cygnus-ngsi.sources.http-source.port = 5050
  40. # Flume handler that will parse the notifications, must not be changed
  41. cygnus-ngsi.sources.http-source.handler = com.telefonica.iot.cygnus.handlers.NGSIRestHandler
  42. # URL target
  43. cygnus-ngsi.sources.http-source.handler.notification_target = /notify
  44. # default service (service semantic depends on the persistence sink)
  45. cygnus-ngsi.sources.http-source.handler.default_service = default
  46. # default service path (service path semantic depends on the persistence sink)
  47. cygnus-ngsi.sources.http-source.handler.default_service_path = /
  48. # source interceptors, do not change
  49. cygnus-ngsi.sources.http-source.interceptors = ts gi
  50. # TimestampInterceptor, do not change
  51. cygnus-ngsi.sources.http-source.interceptors.ts.type = timestamp
  52. # GroupingInterceptor, do not change
  53. cygnus-ngsi.sources.http-source.interceptors.gi.type = com.telefonica.iot.cygnus.interceptors.NGSIGroupingInterceptor$Builder
  54. # Grouping rules for the GroupingIntercetor, put the right absolute path to the file if necessary
  55. # see the doc/design/interceptors document for more details
  56. cygnus-ngsi.sources.http-source.interceptors.gi.grouping_rules_conf_file = /usr/cygnus/conf/grouping_rules.conf
  57.  
  58. # ============================================
  59. # NGSIMySQLSink configuration
  60. # channel name from where to read notification events
  61. cygnus-ngsi.sinks.mysql-sink.channel = mysql-channel
  62. # sink class, must not be changed
  63. cygnus-ngsi.sinks.mysql-sink.type = com.telefonica.iot.cygnus.sinks.NGSIMySQLSink
  64. # true applies the new encoding, false applies the old encoding
  65. cygnus-ngsi.sinks.mysql-sink.enable_encoding = false
  66. # true if the grouping feature is enabled for this sink, false otherwise
  67. cygnus-ngsi.sinks.mysql-sink.enable_grouping = false
  68. # true if name mappings are enabled for this sink, false otherwise
  69. cygnus-ngsi.sinks.mysql-sink.enable_name_mappings = false
  70. # true if lower case is wanted to forced in all the element names, false otherwise
  71. cygnus-ngsi.sinks.mysql-sink.enable_lowercase = false
  72. # the FQDN/IP address where the MySQL server runs
  73. cygnus-ngsi.sinks.mysql-sink.mysql_host = 127.0.0.1
  74. # the port where the MySQL server listens for incomming connections
  75. cygnus-ngsi.sinks.mysql-sink.mysql_port = 3306
  76. # a valid user in the MySQL server
  77. cygnus-ngsi.sinks.mysql-sink.mysql_username = root
  78. # password for the user above
  79. cygnus-ngsi.sinks.mysql-sink.mysql_password = Cartesia2470
  80. # how the attributes are stored, either per row either per column (row, column)
  81. cygnus-ngsi.sinks.mysql-sink.attr_persistence = row
  82. # select the data_model: dm-by-service-path or dm-by-entity
  83. cygnus-ngsi.sinks.mysql-sink.data_model = dm-by-entity
  84. # number of notifications to be included within a processing batch
  85. cygnus-ngsi.sinks.mysql-sink.batch_size = 100
  86. # timeout for batch accumulation
  87. cygnus-ngsi.sinks.mysql-sink.batch_timeout = 30
  88. # number of retries upon persistence error
  89. cygnus-ngsi.sinks.mysql-sink.batch_ttl = 10
  90.  
  91. # =============================================
  92. # mysql-channel configuration
  93. # channel type (must not be changed)
  94. cygnus-ngsi.channels.mysql-channel.type = memory
  95. # capacity of the channel
  96. cygnus-ngsi.channels.mysql-channel.capacity = 10000
  97. # amount of bytes that can be sent per transaction
  98. cygnus-ngsi.channels.mysql-channel.transactionCapacity = 1000
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement