Class: Druid::Configuration
- Inherits:
-
Object
- Object
- Druid::Configuration
- Defined in:
- lib/druid/configuration.rb
Constant Summary collapse
- DISCOVERY_PATH =
'/druid/discovery'.freeze
- INDEX_SERVICE =
'druid/overlord'.freeze
- KAFKA_BROKER_PATH =
'/brokers/ids'.freeze
- LOG_LEVEL =
:error
- ROLLUP_GRANULARITY =
:minute
- STRONG_DELETE =
Not recommend to be true for production.
false
- TUNING_GRANULARITY =
:day
- TUNING_WINDOW =
'PT1H'.freeze
- WAIT_TIME =
Seconds
20
- ZOOKEEPER =
'localhost:2181'.freeze
Instance Attribute Summary collapse
-
#discovery_path ⇒ Object
readonly
Returns the value of attribute discovery_path.
-
#index_service ⇒ Object
readonly
Returns the value of attribute index_service.
-
#kafka_broker_path ⇒ Object
readonly
Returns the value of attribute kafka_broker_path.
-
#log_level ⇒ Object
readonly
Returns the value of attribute log_level.
-
#rollup_granularity ⇒ Object
readonly
Returns the value of attribute rollup_granularity.
-
#strong_delete ⇒ Object
readonly
Returns the value of attribute strong_delete.
-
#tuning_granularity ⇒ Object
readonly
Returns the value of attribute tuning_granularity.
-
#tuning_window ⇒ Object
readonly
Returns the value of attribute tuning_window.
-
#wait_time ⇒ Object
readonly
Returns the value of attribute wait_time.
-
#zookeeper ⇒ Object
readonly
Returns the value of attribute zookeeper.
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize(opts = {}) ⇒ Configuration
Returns a new instance of Configuration.
26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/druid/configuration.rb', line 26 def initialize(opts = {}) @discovery_path = opts[:discovery_path] || DISCOVERY_PATH @index_service = opts[:index_service] || INDEX_SERVICE @kafka_broker_path = opts[:kafka_broker_path] || KAFKA_BROKER_PATH @log_level = opts[:log_level] || LOG_LEVEL @rollup_granularity = rollup_granularity_string(opts[:rollup_granularity]) @strong_delete = opts[:strong_delete] || STRONG_DELETE @tuning_granularity = tuning_granularity_string(opts[:tuning_granularity]) @tuning_window = opts[:tuning_window] || TUNING_WINDOW @wait_time = opts[:wait_time] || WAIT_TIME @zookeeper = opts[:zookeeper] || ZOOKEEPER end |
Instance Attribute Details
#discovery_path ⇒ Object (readonly)
Returns the value of attribute discovery_path.
14 15 16 |
# File 'lib/druid/configuration.rb', line 14 def discovery_path @discovery_path end |
#index_service ⇒ Object (readonly)
Returns the value of attribute index_service.
14 15 16 |
# File 'lib/druid/configuration.rb', line 14 def index_service @index_service end |
#kafka_broker_path ⇒ Object (readonly)
Returns the value of attribute kafka_broker_path.
14 15 16 |
# File 'lib/druid/configuration.rb', line 14 def kafka_broker_path @kafka_broker_path end |
#log_level ⇒ Object (readonly)
Returns the value of attribute log_level.
14 15 16 |
# File 'lib/druid/configuration.rb', line 14 def log_level @log_level end |
#rollup_granularity ⇒ Object (readonly)
Returns the value of attribute rollup_granularity.
14 15 16 |
# File 'lib/druid/configuration.rb', line 14 def rollup_granularity @rollup_granularity end |
#strong_delete ⇒ Object (readonly)
Returns the value of attribute strong_delete.
14 15 16 |
# File 'lib/druid/configuration.rb', line 14 def strong_delete @strong_delete end |
#tuning_granularity ⇒ Object (readonly)
Returns the value of attribute tuning_granularity.
14 15 16 |
# File 'lib/druid/configuration.rb', line 14 def tuning_granularity @tuning_granularity end |
#tuning_window ⇒ Object (readonly)
Returns the value of attribute tuning_window.
14 15 16 |
# File 'lib/druid/configuration.rb', line 14 def tuning_window @tuning_window end |
#wait_time ⇒ Object (readonly)
Returns the value of attribute wait_time.
14 15 16 |
# File 'lib/druid/configuration.rb', line 14 def wait_time @wait_time end |
#zookeeper ⇒ Object (readonly)
Returns the value of attribute zookeeper.
14 15 16 |
# File 'lib/druid/configuration.rb', line 14 def zookeeper @zookeeper end |