This repository has been archived by the owner on Dec 14, 2019. It is now read-only.
forked from enableiot/iotanalytics-gearpump-rule-engine
-
Notifications
You must be signed in to change notification settings - Fork 3
/
gear.conf
550 lines (461 loc) · 19.1 KB
/
gear.conf
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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
#########################################
### This is the default configuration for gearpump
### To use the application, you at least need to change gearpump.cluster to point to right master
#########################################
### Configurations that are shared by all services and all user applications...
gearpump {
##############################
### Required to change!!
### You need to set the master cluster address here
###
###
### For example, you may start three master
### on node1: bin/master -ip node1 -port 3000
### on node2: bin/master -ip node2 -port 3000
### on node3: bin/master -ip node3 -port 3000
###
### Then you need to set the cluster.masters = ["node1:3000","node2:3000","node3:3000"]
cluster {
masters = ["127.0.0.1:3000"]
}
##############################
### Required to change!!
### You need to set the actual host name here
###
hostname = "127.0.0.1"
## How many slots each worker contains
worker.slots = 1000
## The class responsable for launching the executor process.
## User can switch to "io.gearpump.cluster.worker.CGroupProcessLauncher" to enable CGroup support.
worker.executor-process-launcher = "io.gearpump.cluster.worker.DefaultExecutorProcessLauncher"
## To enable worker use cgroup to make resource isolation,
## set gearpump.worker.executor-process-launcher = "io.gearpump.cluster.worker.CGroupProcessLauncher"
##
## Before enable it, you should also make sure:
## 1. Linux version (>= 2.6.18)
## 2. Have installed cgroup (check the file's existence:/proc/cgroups)
## You can get more information from http://gearpump.io
##
## For cgroup root, it represents the root node in CGroup's hierarchythe.
## It's full path in local file system is "${cpu_mount_point} + root".
## The cpu_mount_point is the cpu subsystem's mount poing in CGroup.
## The root dir should be consistent with the part configured in /etc/cgconfig.conf
cgroup {
root = "gearpump"
## This config only works when cgroup is enabled.
## The value means the number of CPU cores per executor can use, -1 means no limitation.
cpu-core-limit-per-executor = 1
}
## Whether to enable remote-debug mode.
## In remote debug mode, every executor process will bind to a free port, and
## listen for remote jvm debug.
remote-debug-executor-jvm = false
### When the resource cannot be allocated in the timeout, then
### the appmaster will shutdown itself.
resource-allocation-timeout-seconds = 120
##
## Executor share same process of worker
worker.executor-share-same-jvm-as-worker = false
## Number of executors to launch when starting an application
application.executor-num = 1
###########################
### Change the dispather for tasks
### If you don't know what this is about, don't change it
###########################
task-dispatcher = "gearpump.shared-thread-pool-dispatcher"
### verbose gc
### turn on JVM verbose GC
### We will use -verbose:gc -Xloggc: -XX:+PrintGCDetails
### -XX:+PrintGCDateStamps -XX:+PrintTenuringDistribution
### -XX:+PrintGCApplicationConcurrentTime
### -XX:+PrintGCApplicationStoppedTime
verbose-gc = false
###########################
### Metrics setting,
### If you want to use metrics, please change
###########################
### Flag to enable metrics
metrics {
enabled = true
### We will take one metric out of ${sample.rate}
### This config will slightly impact the application's performance, larger rate often brings higher throughput.
sample-rate = 1
report-interval-ms = 3000
# reporter = "logfile"
# reporter = "graphite"
reporter = "akka"
graphite {
## Graphite host settings
host = "127.0.0.1"
port = 2003
}
logfile {
}
## Coarse-grain history metrics, which have a larger timespan but sparse data points
retainHistoryData {
# max hours of history data to retain
# Note: due to implementation limitation(we store all history in memory),
# please don't set this to too big which may exhaust memory.
hours = 72
# time interval between two data points for history data (unit: ms)
# Usually this value is set to a big value so that we only store
# coarse-grain data
intervalMs = 3600000
}
## fine-grain recent metrics which just happened, which have a smaller timespan but dense data points
retainRecentData {
# max seconds of recent data to retain,
# THis is for the fine-grain data
seconds = 300
# time interval between two data points for recent data (unit: ms)
intervalMs = 15000
}
akka {
### For this reporter, at most we will return max-limit-on-query metric item.
max-limit-on-query = 1000
### Whitelist for Metrics Aggregator class.
### See class [[MetricsAggregator]] for more information.
metrics-aggregator-class {
## Format io.gearpump.KeyFullClassName = ""
}
}
}
#######################################
### Logging settings
#######################################
# The log dir for daemon processes
log.daemon.dir = "logs"
# The log dir for applications
log.application.dir = "logs"
serializers {
## Follow this format when adding new serializer for new message types
# "yourpackage.YourClass" = "yourpackage.YourSerializerForThisClass"
## If you intend to use default serializer for this class, then you can write this
# "yourpackage.YourClass" = ""
}
### client's timeout (in second) to connect to master and wait for the response
masterclient.timeout = 90
### Gearpump has built-in serialization framework using Kryo.
### User are allowed to use a different serialization framework, like Protobuf
### See [io.gearpump.serializer.FastKryoSerializationFramework] to find how
### a custom serialization framework can be defined.
serialization-framework = "io.gearpump.serializer.FastKryoSerializationFramework"
### Define where the submitted jar file will be stored at
### This path follows the hadoop path schema
### For HDFS, use hdfs://host:port/path/
### For shared NFS folder, use file:///your_nfs_mapping_directory
### jarstore.rootpath = "jarstore/" will points to relative directory where master is started.
### jarstore.rootpath = "/jarstore/" will points to absolute directory on master server
jarstore.rootpath = "jarstore/"
#########################
### Scheduller for master, it will use this scheduler to schedule resource for
### different applications.
### If you don't know what is this about, don't change it
#########################
scheduling {
scheduler-class = "io.gearpump.cluster.scheduler.PriorityScheduler"
}
#############################################
# Default Configuration for REST, WebSocket, Http services
#############################################
#########################
### services can be started by a command line tool bin/services
### If you don't know what is this about, don't change it
#########################
services {
host = "0.0.0.0"
http = 8090
supervisor-actor-path = ""
## To get a detail config string with origin and comments, change this to false.
config-render-option-concise = true
}
## Time out setting to start a new executor system
## It takes a bit longer time than expected as a new JVM is created
start-executor-system-timeout-ms = 120000
#############################################
## Default Configuration for Gearpump Netty transport layer
## If you don't know what is this about, don't change it
#############################################
netty {
buffer-size = 5242880
max-retries = 30
base-sleep-ms = 100
max-sleep-ms = 1000
message-batch-size = 262144
flush-check-interval = 5
dispatcher = "gearpump.shared-thread-pool-dispatcher"
}
###################
### Appmaster JVM argument configuration
###################
appmaster {
vmargs = "-server -Xms512M -Xmx1024M -Xss1M -XX:+HeapDumpOnOutOfMemoryError -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=80 -XX:+UseParNewGC -XX:NewRatio=3 -Djava.rmi.server.hostname=localhost"
extraClasspath = ""
}
###################
### Executor argument configuration
### Executor JVM can contains multiple tasks
###################
executor {
vmargs = "-server -Xms512M -Xmx1024M -Xss1M -XX:+HeapDumpOnOutOfMemoryError -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=80 -XX:+UseParNewGC -XX:NewRatio=3 -Djava.rmi.server.hostname=localhost"
extraClasspath = ""
}
### Streaming related configuration
streaming {
## We will timeout the task if it cannot register itself to AppMaster in time.
register-task-timeout-ms = 120000
## ack once after sending ack-once-every-message-count messages.
ack-once-every-message-count = 100
## max pending message per task to task connection. If pending message size is
## over this, then the flow control will not allow further sending.
## This value should be bigger than ack-once-every-message-count
max-pending-message-count-per-connection = 1000
}
##################################
### Akka Dispatcher configurations
### If you don't know what is this about, don't change it
##################################
shared-thread-pool-dispatcher {
mailbox-type = "akka.dispatch.SingleConsumerOnlyUnboundedMailbox"
throughput = 100
fork-join-executor {
parallelism-factor = 2
parallelism-max = 8
parallelism-min = 2
}
}
single-thread-dispatcher {
type = PinnedDispatcher
}
###########################
### Configuration for yarn module
###########################
yarn {
client {
package-path = "/usr/lib/gearpump/gearpump.zip"
}
applicationmaster {
## Memory of YarnAppMaster
command = "$JAVA_HOME/bin/java -Xmx512m"
memory = "512"
vcores = "1"
queue = "default"
}
master {
## Memory of master daemon
command = "$JAVA_HOME/bin/java -Xmx512m"
memory = "512"
vcores = "1"
}
worker {
## memory of worker daemon
command = "$JAVA_HOME/bin/java -Xmx512m"
containers = "1"
## This also contains all memory for child executors.
memory = "4096"
vcores = "1"
}
services {
enabled = true
}
}
}
### Configuration only visible to master nodes..
gearpump-master {
extensions = [
"akka.cluster.ddata.DistributedData$"
]
akka {
#########################################
### For log level of Master, you need to change both log4j.properties and this entry
#########################################
loglevel = "INFO"
log-dead-letters = off
log-dead-letters-during-shutdown = off
actor {
## Master forms a akka cluster
provider = "akka.cluster.ClusterActorRefProvider"
}
cluster {
roles = ["master"]
## TODO: in integration test, 15s may be too small
## auto-down-unreachable-after = 90s
## The value of this setting will impact master HA recovery time
auto-down-unreachable-after = 15s
}
remote {
log-remote-lifecycle-events = off
}
}
}
### Configuration only visible to worker nodes...
gearpump-worker {
## Add worker overrided config
akka {
#########################################
### For log level of Worker, you need to change both log4j.properties and this entry
#########################################
loglevel = "INFO"
log-dead-letters = off
log-dead-letters-during-shutdown = off
actor {
provider = "akka.remote.RemoteActorRefProvider"
}
cluster {
roles = ["worker"]
}
remote {
log-remote-lifecycle-events = off
}
}
}
#########################################
### For log level of Akka class, you need to change both log4j.properties and this entry
#########################################
#akka.loglevel = "INFO"
### configurations only visible to UI server.
gearpump-ui {
## Security related settings
gearpump.ui-security {
## Whether enable authentication for UI Server
authentication-enabled = true
## User-Password based authenticator
##
## User-Password based authenticator is always enabled when
## gearpump.ui-security.authentication-enabled = true
##
## With User-Password based authenticator inplace, user can still enable auxiliary
## authentication channel like OAuth2.
##
## User can replace this with a custom User-Password based authenticator,
## which implements interface io.gearpump.security.Authenticator
##
authenticator = "io.gearpump.security.ConfigFileBasedAuthenticator"
## Configuration options for authenticator io.gearpump.security.ConfigFileBasedAuthenticator
config-file-based-authenticator = {
## Format: username = "password_hash_value"
## password_hash_value can be generated by running shell tool:
## bin/gear io.gearpump.security.PasswordUtil -password <your raw password>
## Admin users have super permission to do everything
admins = {
## Default Admin. Username: admin, password: admin
## !!! Please replace this builtin account for production cluster for security reason. !!!
"admin" = "AeGxGOxlU8QENdOXejCeLxy+isrCv0TrS37HwA=="
}
## normal user have special permission for certain operations.
users = {
## "user" = "AeGxGOxlU8QENdOXejCeLxy+isrCv0TrS37HwA=="
}
## Guest user can only view the UI with minimum permission. With no permission to submit/change/kill
## a running application.
guests = {
## Default guest. Username: guest, Password: guest
## !!! Please replace this builtin account for production cluster for security reason. !!!
"guest" = "ws+2Dy/FHX4cBb3uKGTR64kZWlWbC91XZRRoew=="
}
}
## Whether to enable auxiliary OAuth2 Authentication channel.
##
## NOTE: This requires config {{{gearpump.ui-security.authentication-enabled = true}}}
##
## NOTE: User-Password based authenticator will also be enabled.
##
## NOTE: OAuth2 authentication requires that the Gearpump server can directly access the OAuth2 server.
## Please make sure you have configured web proxy properly if applies.
## To configure http proxy on Windows:
## {{{
## > set JAVA_OPTS=-Dhttp.proxyHost=xx.com -Dhttp.proxyPort=8088 -Dhttps.proxyHost=xx.com -Dhttps.proxyPort=8088
## > bin\services
## }}}
##
## To configure http proxy on Linux:
## {{{
## $ export JAVA_OPTS="-Dhttp.proxyHost=xx.com -Dhttp.proxyPort=8088 -Dhttps.proxyHost=xx.com -Dhttps.proxyPort=8088"
## $ bin/services
## }}}
oauth2-authenticator-enabled = true
oauth2-authenticators {
## Please modify the list if you have customized OAuth2 provider, like Facebook, Twitter...
## OAuth2 Authenticator with Google Plus+
##
## For steps to enable OAuth2 Authentication on Google, please view docs/deployment-ui-authentication.md
##
"google" {
"class" = "io.gearpump.services.security.oauth2.impl.GoogleOAuth2Authenticator"
## Please replace "127.0.0.1:8090" with your address of UI service.
"callback" = "http://127.0.0.1:8090/login/oauth2/google/callback"
## Client Id and client secret you applied on Google.
##
## !!NOTE!! Replace clientID and clientSecret with your own application to avoid
## potential privacy leakage, the values set here represents as a test application.
"clientid" = "170234147043-a1tag68jtq6ab4bi11jvsj7vbaqcmhkt.apps.googleusercontent.com"
"clientsecret" = "ioeWLLDipz2S7aTDXym2-obe"
## The default role we assign to user when user get authenticated by Google.
##
## TODO: should allow some user group have a different role, like admin.
##
## Available values: guest, user, admin, with:
## 1. guest can only view the application status,
## 2. user can submit and modify application.
## 3. admin can manage the cluster resource, like adding or removing machines.
"default-userrole" = "guest"
## Login icon disiplayed on UI server frontend
icon = "/icons/google.png"
}
## OAuth2 Authenticator for CloudFoundry UAA server (https://github.com/cloudfoundry/uaa/).
##
## For steps to enable OAuth2 Authentication for UAA, please view docs/deployment-ui-authentication.md
##
"cloudfoundryuaa" {
"class" = "io.gearpump.services.security.oauth2.impl.CloudFoundryUAAOAuth2Authenticator"
## Please replace "127.0.0.1:8090" with your address of UI service.
"callback" = "http://127.0.0.1:8090/login/oauth2/cloudfoundryuaa/callback"
## Client Id and client secret you applied on UAA.
##
## !!NOTE!! Replace clientID and clientSecret with your own application to avoid
## potential privacy leakage, the values set here serves as a test application.
"clientid" = "<your client id registered on UAA>"
"clientsecret" = "<your client secret registered on UAA>"
## The default role we assign to user when user get authenticated by UAA.
##
## TODO: should allow some user group have a different role, like admin.
##
## Available values: guest, user, admin, with:
## 1. guest can only view the application status,
## 2. user can submit and modify application.
## 3. admin can manage the cluster resource, like adding or removing machines.
"default-userrole" = "guest"
## Login icon disiplayed on UI server frontend
icon = "/icons/uaa.png"
## Cloud Foundry UAA Login Endpoint. Prefixed by "http://" or "https://"
##
## !!NOTE!! Please relace uaahost with your actual Cloudfounudry UAA login endpoint, the
## value set here serves as an example.
uaahost = "http://<cloud foundry login endpoint>"
## Whether to enable additional authorization check.
## If the user fails the check, then Gearpump would log user out.
additional-authenticator-enabled = true
## Define how to do additional authorization check. The class should implement
## interface CloudFoundryUAAOAuth2Authenticator.AdditionalAuthenticator
additional-authenticator = {
"class" = "io.gearpump.services.security.oauth2.impl.CloudFoundryUAAOAuth2Authenticator$OrganizationAccessChecker"
## Please fill the Cloud Foundry API endpoint and organization GUID
"organization-url" = "http://<cloud foundry api endpoint>/v2/organizations/<organization-guid>"
}
}
}
}
## Akka http dispatcher settings.
akka.stream.materializer.dispatcher = "gearpump.ui-default-dispatcher"
## Timeout settings for akka-http
akka.http.server.idle-timeout = 300 s
## When uploading a large job jar, it takes a long time to launch the job jar in cluster
## before we respond to client.
akka.http.server.request-timeout = 600 s
}
## Configurations only visible on Linux or Mac.
gearpump-linux {
### On windows, the value must be larger than 10ms, check
### https://github.com/akka/akka/blob/master/akka-actor/src/main/scala/akka/actor/Scheduler.scala#L204
akka.scheduler.tick-duration = 1
}