-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.ini
168 lines (135 loc) · 5.11 KB
/
config.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
[DEFAULT]
# Address of the RabbitMQ host (for all except client)
RabbitHost = rabbitmq
# DEBUG, INFO, WARNING, ERROR, CRITICAL
LogLevel = INFO
# Number of messages to prefetch from RabbitMQ
# (for all except input and client)
PrefetchCount = 2
# System name (must be the same as in compose.yaml)
SystemName = distribuidos-tp2
# For parsers, joiners & aggregators
FiltersExchangeBase = filters
FiltersQueueBase = filters_{host_id}
FiltersRoutingKeysFormat = ["check_processed_response.{host_id}", "check_processed", "remove_check.{host_id}"]
# Heartbeat settings
HeartbeatExchange =
HeartbeatRoutingKey = heartbeat
HeartbeatFrequency = 3
# -------------------- CLIENT --------------------
[client]
BatchSize = 10000
# Address of the input host
InputAddress = tcp://input:5555
# Address of the output host
OutputAddress = tcp://output:5555
# Path to the data directory
DataPath = /tmp/data/medium
# Path to the results directory
ResultsPath = /tmp/results
# -------------------- INPUT --------------------
[input]
# Address to bind to
Address = tcp://*:5555
MaxJobs = 2
# -------------------- PARSERS --------------------
[parsers]
# Middleware settings
InExchange = raw_records
FiltersExchange = parser_${DEFAULT:FiltersExchangeBase}
FiltersQueueFormat = parser_${DEFAULT:FiltersQueueBase}
InTripLinesQueueFormat = raw_trip_lines_{job_id}
InTripLinesRoutingKeysFormat = ["{job_id}.trip"]
InWeatherStationLinesQueueFormat = raw_weather_station_lines_{job_id}
InWeatherStationLinesRoutingKeysFormat = ["{job_id}.weather", "{job_id}.station"]
InOthersQueueFormat = parser_others_{host_id}
InOthersQueueRoutingKeys = ["*.start", "*.end", "*.trips_start"]
# -------------------- JOINERS --------------------
[joiners]
# Middleware settings
InExchange = basic_records
FiltersExchangeFormat = {name}_joiner_${DEFAULT:FiltersExchangeBase}
FiltersQueueFormat = {name}_joiner_${DEFAULT:FiltersQueueBase}
InTripsQueueFormat = {name}_basic_trips_{job_id}
InOthersQueueFormat = {name}_joiner_others_{host_id}
InOthersQueueRoutingKeysBase = "*.trips_start", "*.end"
[joiners.rain]
# Drop trips on days with less than this mm of rain
PrecipitationThreshold = 30
# Middleware settings
InOthersQueueRoutingKeys = [${joiners:InOthersQueueRoutingKeysBase}, "*.weather.#"]
InTripsQueueRoutingKeysFormat = ["{job_id}.trip.#"]
[joiners.year]
# Base year for comparison
YearBase = 2016
# Year to compare to the base year
YearCompared = 2017
# Middleware settings
InOthersQueueRoutingKeys = [${joiners:InOthersQueueRoutingKeysBase}, "*.station.*.${YearBase}", "*.station.*.${YearCompared}"]
InTripsQueueRoutingKeysFormat = ["{job_id}.trip.*.${YearBase}", "{job_id}.trip.*.${YearCompared}"]
[joiners.city]
# City to filter on
City = montreal
# Middleware settings
InOthersQueueRoutingKeys = [${joiners:InOthersQueueRoutingKeysBase}, "*.station.${City}.*"]
InTripsQueueRoutingKeysFormat = ["{job_id}.trip.${City}.*"]
# -------------------- AGGREGATORS --------------------
[aggregators]
# Interval at which to send the aggregated data
SendIntervalSeconds = 10
# Middleware settings
InExchangeFormat = {name}_joined_records
FiltersExchangeFormat = {name}_aggregator_${DEFAULT:FiltersExchangeBase}
FiltersQueueFormat = {name}_aggregator_${DEFAULT:FiltersQueueBase}
InTripsQueueFormat = {name}_joined_trips_{job_id}
InTripsQueueRoutingKeysFormat = ["{job_id}.trip"]
InOthersQueueFormat = {name}_aggregator_others_{host_id}
InOthersQueueRoutingKeys = ["*.start", "*.end"]
[aggregators.rain]
[aggregators.year]
YearBase = ${joiners.year:YearBase}
YearCompared = ${joiners.year:YearCompared}
[aggregators.city]
# -------------------- REDUCERS --------------------
[reducers]
# Middleware settings
# No exchange for reducers, just the default nameless one
InExchange =
InQueueFormat = {name}_aggregated
[reducers.rain]
[reducers.year]
# Factor to filter with. Keeps stations if (Trips in compared year) > Factor * (Trips in base year)
Factor = 2
[reducers.city]
# Minimum distance between stations in km to filter on
MinDistanceKm = 6
# -------------------- OUTPUT --------------------
[output]
# Address to bind to
Address = tcp://*:5555
# Middleware settings
InExchange =
InQueue = stats
# -------------------- MEDIC --------------------
[medic]
# (Bully) How much to wait for an answer to an election message
AnswerTimeout = 10
# (Bully) How much to wait for a coordinator message after getting
# a response in an election
CoordinatorTimeout = 20
# How often medics send a heartbeat
HeartbeatInterval = ${DEFAULT:HeartbeatFrequency}
# How much time to wait for a heartbeat
HeartbeatTimeout = 15
# How much time to wait for the first heartbeat after startup
FirstHeartbeatTimeout = 15
# How much time to wait for the next heartbeat after restarting a node
RestartTimeout = 20
# How often the leader sends a heartbeat
LeaderHeartbeatInterval = 1
# How much time to wait for the leader to send a heartbeat
LeaderHeartbeatTimeout = 5
# Middleware settings
MedicExchange = medics
MedicQueueFormat = medic_{host_id}
MedicQueueRoutingKeysFormat = [ "#.{host_id}.#" ]