Skip to content

Latest commit

 

History

History
75 lines (52 loc) · 2.21 KB

README.md

File metadata and controls

75 lines (52 loc) · 2.21 KB

Hercules Stream Sink

Stream Sink is used for create, delete and increase partitions in Apache Kafka topics.

Settings

Application is configured through properties file.

Main Application settings

application.host - server host, default value: 0.0.0.0

application.port - server port, default value: 8080

Apache Kafka settings

kafka.bootstrap.servers

Apache Curator settings

See Apache Curator Config from Apache Curator documentation. Main settings are presented below.

curator.connectString - default value: localhost:2181

curator.connectionTimeout - default value: 10000

curator.sessionTimeout - default value: 30000

curator.retryPolicy.baseSleepTime - default value: 1000

curator.retryPolicy.maxRetries - default value: 5

curator.retryPolicy.maxSleepTime - default value: 8000

Application context settings

context.instance.id - id of instance

context.environment - id of environment

context.zone - id of zone

Http Server settings

http.server.ioThreads - the number of IO threads. Default value: 1.

http.server.workerThreads - the number of worker threads. Default value: 1.

Command line

java $JAVA_OPTS -jar hercules-stream-manager.jar application.properties=file://path/to/file/application.properties

Also, ZooKeeper can be used as source of application.properties file:

zk://zk_host_1:port[,zk_host_2:port,...]/path/to/znode/application.properties

Quick start

Initialization

Stream Manager uses Stream's metadata from ZooKeeper. Thus, ZK should be configured by Hercules Init. See Hercules Init for details.

application.properties sample:

kafka.bootstrap.servers=localhost:9092,localhost:9093,localhost:9094
curator.connectString=localhost:2181,localhost:2182,localhost:2183
curator.connectionTimeout=10000
curator.sessionTimeout=30000
curator.retryPolicy.baseSleepTime=1000
curator.retryPolicy.maxRetries=3
curator.retryPolicy.maxSleepTime=3000

metrics.graphite.server.addr=graphite.ru
metrics.graphite.server.port=2003
metrics.graphite.prefix=hercules
metrics.period=60

context.instance.id=1
context.environment=dev
context.zone=default

http.server.ioThreads=1
http.server.workerThreads=1