Skip to content

Commit

Permalink
Update hazelcast configuration - INT-1102 (#48)
Browse files Browse the repository at this point in the history
* Update the hazelcast configuration.
  • Loading branch information
bigspotteddog authored Nov 2, 2018
1 parent 54dea50 commit 63871ce
Show file tree
Hide file tree
Showing 2 changed files with 96 additions and 19 deletions.
4 changes: 2 additions & 2 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
default['java']['oracle']['accept_oracle_download_terms'] = true

# nexus configuration
default['nexus_repository_manager']['version'] = '3.13.0-01'
default['nexus_repository_manager']['version'] = '3.14.0-04'
default['nexus_repository_manager']['nexus_download_url'] = "https://download.sonatype.com/nexus/3/nexus-#{node['nexus_repository_manager']['version']}-unix.tar.gz"
default['nexus_repository_manager']['nexus_download_sha256'] = '5d1890f45e95e2ca74e62247be6b439482d2fe4562a7ec8ae905c4bdba6954ce'
default['nexus_repository_manager']['nexus_download_sha256'] = 'ae8cc7891942d71cf12c11e1a98d70c1310e788ab44aa95c5d1e7671cc0187e2'
default['nexus_repository_manager']['sonatype']['path'] = '/opt/sonatype'
default['nexus_repository_manager']['nexus_data']['path'] = '/nexus-data'
default['nexus_repository_manager']['license_s3_bucket'] = nil
Expand Down
111 changes: 94 additions & 17 deletions templates/ha/hazelcast.xml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
-->
<hazelcast xmlns="http://www.hazelcast.com/schema/config"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.hazelcast.com/schema/config hazelcast-config-3.6.xsd">
xsi:schemaLocation="http://www.hazelcast.com/schema/config hazelcast-config-3.10.xsd">
<group>
<name><%= node['nexus_repository_manager']['hazelcast']['group']['name'] %></name>
<password><%= node['nexus_repository_manager']['hazelcast']['group']['password'] %></password>
Expand All @@ -19,28 +19,27 @@
<property name="hazelcast.shutdownhook.enabled">false</property>
<property name="hazelcast.logging.type">slf4j</property>
<property name="hazelcast.jmx">true</property>
<!--<property name="hazelcast.jmx.detailed">false</property>-->
<property name="hazelcast.phone.home.enabled">false</property>
<property name="hazelcast.prefer.ipv4.stack">true</property>
<property name="hazelcast.health.monitoring.level">SILENT</property>

<!-- Enable protection against known vulnerable classes -->
<property name="hazelcast.serialization.filter.enabled">true</property>

<!-- OrientDB: use low number of threads -->
<property name="hazelcast.operation.thread.count">1</property>
<property name="hazelcast.operation.generic.thread.count">1</property>
<property name="hazelcast.client.event.thread.count">1</property>
<property name="hazelcast.event.thread.count">1</property>
<property name="hazelcast.io.thread.count">1</property>

<!-- OrientDB: reduce split-brain check interval -->
<property name="hazelcast.max.no.heartbeat.seconds">30</property>
<property name="hazelcast.heartbeat.interval.seconds">5</property>

<!-- OrientDB: reduce split-brain merge interval -->
<property name="hazelcast.merge.next.run.delay.seconds">15</property>

<!-- OrientDB: use ICMP to detect crashed nodes -->
<property name="hazelcast.icmp.enabled">true</property>
<property name="hazelcast.icmp.timeout">5000</property>
<property name="hazelcast.icmp.ttl">3</property>
<property name="hazelcast.wait.seconds.before.join">5</property>

<property name="hazelcast.discovery.enabled"><%= node['nexus_repository_manager']['hazelcast']['discovery']['enabled'] %></property>
</properties>
Expand Down Expand Up @@ -131,10 +130,14 @@

<executor-service name="default">
<pool-size>16</pool-size>
<!-- Queue capacity. 0 means Integer.MAX_VALUE -->
<!--Queue capacity. 0 means Integer.MAX_VALUE.-->
<queue-capacity>0</queue-capacity>
</executor-service>

<security>
<client-block-unmapped-actions>true</client-block-unmapped-actions>
</security>

<queue name="default">
<!--
Maximum size of the queue. When a JVM's local queue size reaches the maximum,
Expand All @@ -155,6 +158,7 @@
-->
<async-backup-count>0</async-backup-count>
<empty-queue-ttl>-1</empty-queue-ttl>
<merge-policy batch-size="100">com.hazelcast.spi.merge.PutIfAbsentMergePolicy</merge-policy>
</queue>

<map name="default">
Expand Down Expand Up @@ -206,16 +210,17 @@
-->
<max-size policy="PER_NODE">0</max-size>
<!--
When max. size is reached, specified percentage of
the map will be evicted. Any integer between 0 and 100.
If 25 is set for example, 25% of the entries will
get evicted.
`eviction-percentage` property is deprecated and will be ignored when it is set.
As of version 3.7, eviction mechanism changed.
It uses a probabilistic algorithm based on sampling. Please see documentation for further details
-->
<eviction-percentage>25</eviction-percentage>
<!--
Minimum time in milliseconds which should pass before checking
if a partition of this map is evictable or not.
Default value is 100 millis.
`min-eviction-check-millis` property is deprecated and will be ignored when it is set.
As of version 3.7, eviction mechanism changed.
It uses a probabilistic algorithm based on sampling. Please see documentation for further details
-->
<min-eviction-check-millis>100</min-eviction-check-millis>
<!--
Expand All @@ -233,7 +238,7 @@
com.hazelcast.map.merge.HigherHitsMapMergePolicy ; entry with the higher hits wins.
com.hazelcast.map.merge.LatestUpdateMapMergePolicy ; entry with the latest update wins.
-->
<merge-policy>com.hazelcast.map.merge.PutIfAbsentMapMergePolicy</merge-policy>
<merge-policy batch-size="100">com.hazelcast.spi.merge.PutIfAbsentMergePolicy</merge-policy>
<!--
Control caching of de-serialized values. Caching makes query evaluation faster, but it cost memory.
Possible Values:
Expand All @@ -244,17 +249,44 @@
<cache-deserialized-values>INDEX-ONLY</cache-deserialized-values>
</map>

<!--
Configuration for an event journal. The event journal keeps events related
to a specific partition and data structure. For instance, it could keep
map add, update, remove, merge events along with the key, old value, new value and so on.
-->
<event-journal enabled="false">
<mapName>mapName</mapName>
<capacity>10000</capacity>
<time-to-live-seconds>0</time-to-live-seconds>
</event-journal>

<event-journal enabled="false">
<cacheName>cacheName</cacheName>
<capacity>10000</capacity>
<time-to-live-seconds>0</time-to-live-seconds>
</event-journal>

<multimap name="default">
<backup-count>1</backup-count>
<value-collection-type>SET</value-collection-type>
<merge-policy batch-size="100">com.hazelcast.spi.merge.PutIfAbsentMergePolicy</merge-policy>
</multimap>

<replicatedmap name="default">
<in-memory-format>OBJECT</in-memory-format>
<async-fillup>true</async-fillup>
<statistics-enabled>true</statistics-enabled>
<merge-policy batch-size="100">com.hazelcast.spi.merge.PutIfAbsentMergePolicy</merge-policy>
</replicatedmap>

<list name="default">
<backup-count>1</backup-count>
<merge-policy batch-size="100">com.hazelcast.spi.merge.PutIfAbsentMergePolicy</merge-policy>
</list>

<set name="default">
<backup-count>1</backup-count>
<merge-policy batch-size="100">com.hazelcast.spi.merge.PutIfAbsentMergePolicy</merge-policy>
</set>

<jobtracker name="default">
Expand Down Expand Up @@ -283,13 +315,58 @@
<capacity>10000</capacity>
<backup-count>1</backup-count>
<async-backup-count>0</async-backup-count>
<time-to-live-seconds>30</time-to-live-seconds>
<time-to-live-seconds>0</time-to-live-seconds>
<in-memory-format>BINARY</in-memory-format>
<merge-policy batch-size="100">com.hazelcast.spi.merge.PutIfAbsentMergePolicy</merge-policy>
</ringbuffer>

<flake-id-generator name="default">
<prefetch-count>100</prefetch-count>
<prefetch-validity-millis>600000</prefetch-validity-millis>
<id-offset>0</id-offset>
<node-id-offset>0</node-id-offset>
<statistics-enabled>true</statistics-enabled>
</flake-id-generator>

<atomic-long name="default">
<merge-policy batch-size="100">com.hazelcast.spi.merge.PutIfAbsentMergePolicy</merge-policy>
</atomic-long>

<atomic-reference name="default">
<merge-policy batch-size="100">com.hazelcast.spi.merge.PutIfAbsentMergePolicy</merge-policy>
</atomic-reference>

<count-down-latch name="default"/>

<serialization>
<portable-version>0</portable-version>
</serialization>

<services enable-defaults="true"/>

<lite-member enabled="false"/>

<cardinality-estimator name="default">
<backup-count>1</backup-count>
<async-backup-count>0</async-backup-count>
<merge-policy batch-size="100">HyperLogLogMergePolicy</merge-policy>
</cardinality-estimator>

<scheduled-executor-service name="default">
<capacity>100</capacity>
<durability>1</durability>
<pool-size>16</pool-size>
<merge-policy batch-size="100">com.hazelcast.spi.merge.PutIfAbsentMergePolicy</merge-policy>
</scheduled-executor-service>

<crdt-replication>
<replication-period-millis>1000</replication-period-millis>
<max-concurrent-replication-targets>1</max-concurrent-replication-targets>
</crdt-replication>

<pn-counter name="default">
<replica-count>2147483647</replica-count>
<statistics-enabled>true</statistics-enabled>
</pn-counter>

</hazelcast>

0 comments on commit 63871ce

Please sign in to comment.