Skip to content

Commit

Permalink
Merge pull request #48 from redBorder/development
Browse files Browse the repository at this point in the history
Release 1.7.2
  • Loading branch information
pperezredborder authored Nov 12, 2024
2 parents 7915585 + 8e0e7db commit 687f827
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
cookbook-druid CHANGELOG
===============

## 1.7.2

- Rafael Gomez
- [a3f5f2e] Changing variable type to int
- [cd46979] Using maxsize variable from hd_services

## 1.7.1

- Miguel Negrón
Expand Down
2 changes: 1 addition & 1 deletion resources/metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
maintainer_email 'git@redborder.com'
license 'AGPL-3.0'
description 'Installs/Configures druid'
version '1.7.1'
version '1.7.2'
10 changes: 2 additions & 8 deletions resources/providers/historical.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,11 @@
processing_threads = new_resource.processing_threads
groupby_max_intermediate_rows = new_resource.groupby_max_intermediate_rows
groupby_max_results = new_resource.groupby_max_results
disk_size_kb = new_resource.disk_size_kb
tier_memory_mode = new_resource.tier_memory_mode
cpu_num = new_resource.cpu_num
memory_kb = new_resource.memory_kb
rmi_address = new_resource.rmi_address
rmi_port = new_resource.rmi_port
maxsize = new_resource.maxsize

directory config_dir do
owner 'root'
Expand Down Expand Up @@ -54,11 +53,6 @@
processing_threads = cpu_num > 1 ? cpu_num - 1 : 1 if processing_threads.nil?
heap_historical_memory_kb, processing_memory_buffer_b = compute_memory(memory_kb, processing_threads)
offheap_historical_memory_kb = (processing_memory_buffer_b * (processing_threads + 1) / 1024).to_i
free_memory_kb = heap_historical_memory_kb - offheap_historical_memory_kb - (1024 * 1024) # This is the overheap.
segments_memory_b = (free_memory_kb > 0 ? free_memory_kb : 0).to_i * 1024

max_size_b = 0
max_size_b = tier_memory_mode ? segments_memory_b : (disk_size_kb * 1024)

Chef::Log.info(
"\nHistorical Memory:
Expand All @@ -81,7 +75,7 @@
variables(name: name, cdomain: cdomain, port: port,
processing_threads: processing_threads, processing_memory_buffer_b: processing_memory_buffer_b,
groupby_max_intermediate_rows: groupby_max_intermediate_rows, groupby_max_results: groupby_max_results,
max_size_b: max_size_b, segment_cache_dir: segment_cache_dir)
maxsize: maxsize, segment_cache_dir: segment_cache_dir)
notifies :restart, 'service[druid-historical]', :delayed
end

Expand Down
3 changes: 1 addition & 2 deletions resources/resources/historical.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@
attribute :processing_threads, kind_of: Integer
attribute :groupby_max_intermediate_rows, kind_of: Integer, default: 50000
attribute :groupby_max_results, kind_of: Integer, default: 500000
attribute :tier_memory_mode, kind_of: [TrueClass, FalseClass], default: false
attribute :cpu_num, kind_of: Integer, default: 4
attribute :memory_kb, kind_of: Integer, default: 8388608
attribute :disk_size_kb, kind_of: Integer, default: 10485760
attribute :rmi_address, kind_of: String, default: '127.0.0.1'
attribute :rmi_port, kind_of: String, default: '9091'
attribute :ipaddress, kind_of: String, default: '127.0.0.1'
attribute :maxsize, kind_of: Integer, default: 10737418240
4 changes: 2 additions & 2 deletions resources/templates/default/historical.properties.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ druid.server.tier=_default_tier
<% end %>


druid.server.maxSize=<%= @max_size_b %>
druid.segmentCache.locations=[{"path": "<%= @segment_cache_dir %>", "maxSize": <%= @max_size_b %>}]
druid.server.maxSize=<%= @maxsize %>
druid.segmentCache.locations=[{"path": "<%= @segment_cache_dir %>", "maxSize": <%= @maxsize %>}]

druid.historical.cache.useCache=true
druid.historical.cache.populateCache=true
Expand Down

0 comments on commit 687f827

Please sign in to comment.