Class: Druid::Configuration

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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_pathObject (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_serviceObject (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_pathObject (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_levelObject (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_granularityObject (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_deleteObject (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_granularityObject (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_windowObject (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_timeObject (readonly)

Returns the value of attribute wait_time.



14
15
16
# File 'lib/druid/configuration.rb', line 14

def wait_time
  @wait_time
end

#zookeeperObject (readonly)

Returns the value of attribute zookeeper.



14
15
16
# File 'lib/druid/configuration.rb', line 14

def zookeeper
  @zookeeper
end