Class: DruidDB::Configuration
- Inherits:
-
Object
- Object
- DruidDB::Configuration
- Defined in:
- lib/druiddb/configuration.rb
Constant Summary collapse
- CLIENT_ID =
'druiddb-ruby'.freeze
- DISCOVERY_PATH =
'/druid/discovery'.freeze
- INDEX_SERVICE =
'druid/overlord'.freeze
- KAFKA_BROKER_PATH =
'/brokers/ids'.freeze
- KAFKA_OVERFLOW_WAIT =
0.05
- LOG_LEVEL =
:error
- ROLLUP_GRANULARITY =
:minute
- STRONG_DELETE =
false
- TUNING_GRANULARITY =
:day
- TUNING_WINDOW =
'PT1H'.freeze
- WAIT_TIME =
20
- ZOOKEEPER =
'localhost:2181'.freeze
Instance Attribute Summary collapse
-
#client_id ⇒ Object
readonly
Returns the value of attribute client_id.
-
#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.
-
#kafka_overflow_wait ⇒ Object
readonly
Returns the value of attribute kafka_overflow_wait.
-
#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.
29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/druiddb/configuration.rb', line 29 def initialize(opts = {}) @client_id = opts[:client_id] || CLIENT_ID @discovery_path = opts[:discovery_path] || DISCOVERY_PATH @index_service = opts[:index_service] || INDEX_SERVICE @kafka_broker_path = opts[:kafka_broker_path] || KAFKA_BROKER_PATH @kafka_overflow_wait = opts[:kafka_overflow_wait] || KAFKA_OVERFLOW_WAIT @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
#client_id ⇒ Object (readonly)
Returns the value of attribute client_id.
16 17 18 |
# File 'lib/druiddb/configuration.rb', line 16 def client_id @client_id end |
#discovery_path ⇒ Object (readonly)
Returns the value of attribute discovery_path.
16 17 18 |
# File 'lib/druiddb/configuration.rb', line 16 def discovery_path @discovery_path end |
#index_service ⇒ Object (readonly)
Returns the value of attribute index_service.
16 17 18 |
# File 'lib/druiddb/configuration.rb', line 16 def index_service @index_service end |
#kafka_broker_path ⇒ Object (readonly)
Returns the value of attribute kafka_broker_path.
16 17 18 |
# File 'lib/druiddb/configuration.rb', line 16 def kafka_broker_path @kafka_broker_path end |
#kafka_overflow_wait ⇒ Object (readonly)
Returns the value of attribute kafka_overflow_wait.
16 17 18 |
# File 'lib/druiddb/configuration.rb', line 16 def kafka_overflow_wait @kafka_overflow_wait end |
#log_level ⇒ Object (readonly)
Returns the value of attribute log_level.
16 17 18 |
# File 'lib/druiddb/configuration.rb', line 16 def log_level @log_level end |
#rollup_granularity ⇒ Object (readonly)
Returns the value of attribute rollup_granularity.
16 17 18 |
# File 'lib/druiddb/configuration.rb', line 16 def rollup_granularity @rollup_granularity end |
#strong_delete ⇒ Object (readonly)
Returns the value of attribute strong_delete.
16 17 18 |
# File 'lib/druiddb/configuration.rb', line 16 def strong_delete @strong_delete end |
#tuning_granularity ⇒ Object (readonly)
Returns the value of attribute tuning_granularity.
16 17 18 |
# File 'lib/druiddb/configuration.rb', line 16 def tuning_granularity @tuning_granularity end |
#tuning_window ⇒ Object (readonly)
Returns the value of attribute tuning_window.
16 17 18 |
# File 'lib/druiddb/configuration.rb', line 16 def tuning_window @tuning_window end |
#wait_time ⇒ Object (readonly)
Returns the value of attribute wait_time.
16 17 18 |
# File 'lib/druiddb/configuration.rb', line 16 def wait_time @wait_time end |
#zookeeper ⇒ Object (readonly)
Returns the value of attribute zookeeper.
16 17 18 |
# File 'lib/druiddb/configuration.rb', line 16 def zookeeper @zookeeper end |