Revision 6425
Added by rnahf about 13 years ago
test/edu/ucsb/nceas/metacat/dataone/hazelcast.test.properties.xml | ||
---|---|---|
1 |
<hazelcast> |
|
2 |
... |
|
3 |
<map name="hzObjectPath"> |
|
4 |
... |
|
5 |
<map-store enabled="true"> |
|
6 |
<!-- |
|
7 |
Name of the class implementing MapLoader and/or MapStore. |
|
8 |
The class should implement at least of these interfaces and |
|
9 |
contain no-argument constructor. Note that the inner classes are not supported. |
|
10 |
--> |
|
11 |
<class-name>edu.ucsb.nceas.metacat.dataone.hazelcast.ObjectPathMap</class-name> |
|
12 |
<!-- |
|
13 |
Number of seconds to delay to call the MapStore.store(key, value). |
|
14 |
If the value is zero then it is write-through so MapStore.store(key, value) |
|
15 |
will be called as soon as the entry is updated. |
|
16 |
Otherwise it is write-behind so updates will be stored after write-delay-seconds |
|
17 |
value by calling Hazelcast.storeAll(map). Default value is 0. |
|
18 |
--> |
|
19 |
<write-delay-seconds>0</write-delay-seconds> |
|
20 |
</map-store> |
|
21 |
</map> |
|
22 |
</hazelcast> |
|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<hazelcast xsi:schemaLocation="http://www.hazelcast.com/schema/config hazelcast-basic.xsd" |
|
3 |
xmlns="http://www.hazelcast.com/schema/config" |
|
4 |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> |
|
5 |
<group> |
|
6 |
<name>dev</name> |
|
7 |
<password>dev-pass</password> |
|
8 |
</group> |
|
9 |
<network> |
|
10 |
<port auto-increment="true">5701</port> |
|
11 |
<join> |
|
12 |
<multicast enabled="true"> |
|
13 |
<multicast-group>224.2.2.3</multicast-group> |
|
14 |
<multicast-port>54327</multicast-port> |
|
15 |
</multicast> |
|
16 |
<tcp-ip enabled="false"> |
|
17 |
<interface>127.0.0.1</interface> |
|
18 |
</tcp-ip> |
|
19 |
</join> |
|
20 |
<interfaces enabled="false"> |
|
21 |
<interface>10.10.1.*</interface> |
|
22 |
</interfaces> |
|
23 |
<symmetric-encryption enabled="false"> |
|
24 |
<!-- |
|
25 |
encryption algorithm such as |
|
26 |
DES/ECB/PKCS5Padding, |
|
27 |
PBEWithMD5AndDES, |
|
28 |
AES/CBC/PKCS5Padding, |
|
29 |
Blowfish, |
|
30 |
DESede |
|
31 |
--> |
|
32 |
<algorithm>PBEWithMD5AndDES</algorithm> |
|
33 |
<!-- salt value to use when generating the secret key --> |
|
34 |
<salt>thesalt</salt> |
|
35 |
<!-- pass phrase to use when generating the secret key --> |
|
36 |
<password>thepass</password> |
|
37 |
<!-- iteration count to use when generating the secret key --> |
|
38 |
<iteration-count>19</iteration-count> |
|
39 |
</symmetric-encryption> |
|
40 |
<asymmetric-encryption enabled="false"> |
|
41 |
<!-- encryption algorithm --> |
|
42 |
<algorithm>RSA/NONE/PKCS1PADDING</algorithm> |
|
43 |
<!-- private key password --> |
|
44 |
<keyPassword>thekeypass</keyPassword> |
|
45 |
<!-- private key alias --> |
|
46 |
<keyAlias>local</keyAlias> |
|
47 |
<!-- key store type --> |
|
48 |
<storeType>JKS</storeType> |
|
49 |
<!-- key store password --> |
|
50 |
<storePassword>thestorepass</storePassword> |
|
51 |
<!-- path to the key store --> |
|
52 |
<storePath>keystore</storePath> |
|
53 |
</asymmetric-encryption> |
|
54 |
</network> |
|
55 |
<executor-service> |
|
56 |
<core-pool-size>16</core-pool-size> |
|
57 |
<max-pool-size>64</max-pool-size> |
|
58 |
<keep-alive-seconds>60</keep-alive-seconds> |
|
59 |
</executor-service> |
|
60 |
<queue name="default"> |
|
61 |
|
|
62 |
<!-- |
|
63 |
Maximum size of the queue. When a JVM's local queue size reaches the maximum, |
|
64 |
all put/offer operations will get blocked until the queue size |
|
65 |
of the JVM goes down below the maximum. |
|
66 |
Any integer between 0 and Integer.MAX_VALUE. 0 means |
|
67 |
Integer.MAX_VALUE. Default is 0. |
|
68 |
--> |
|
69 |
<max-size-per-jvm>0</max-size-per-jvm> |
|
70 |
|
|
71 |
<!-- |
|
72 |
Name of the map configuration that will be used for the backing distributed |
|
73 |
map for this queue. |
|
74 |
--> |
|
75 |
<backing-map-ref>default</backing-map-ref> |
|
76 |
|
|
77 |
</queue> |
|
78 |
<map name="default"> |
|
79 |
<!-- |
|
80 |
Number of backups. If 1 is set as the backup-count for example, |
|
81 |
then all entries of the map will be copied to another JVM for |
|
82 |
fail-safety. Valid numbers are 0 (no backup), 1, 2, 3. |
|
83 |
--> |
|
84 |
<backup-count>1</backup-count> |
|
85 |
<!-- |
|
86 |
Valid values are: |
|
87 |
NONE (no eviction), |
|
88 |
LRU (Least Recently Used), |
|
89 |
LFU (Least Frequently Used). |
|
90 |
NONE is the default. |
|
91 |
--> |
|
92 |
<eviction-policy>NONE</eviction-policy> |
|
93 |
<!-- |
|
94 |
Maximum size of the map. When max size is reached, |
|
95 |
map is evicted based on the policy defined. |
|
96 |
Any integer between 0 and Integer.MAX_VALUE. 0 means |
|
97 |
Integer.MAX_VALUE. Default is 0. |
|
98 |
--> |
|
99 |
<max-size policy="cluster_wide_map_size">0</max-size> |
|
100 |
<!-- |
|
101 |
When max. size is reached, specified percentage of |
|
102 |
the map will be evicted. Any integer between 0 and 100. |
|
103 |
If 25 is set for example, 25% of the entries will |
|
104 |
get evicted. |
|
105 |
--> |
|
106 |
<eviction-percentage>25</eviction-percentage> |
|
107 |
|
|
108 |
<!-- |
|
109 |
While recovering from split-brain (network partitioning), |
|
110 |
map entries in the small cluster will merge into the bigger cluster |
|
111 |
based on the policy set here. When an entry merge into the |
|
112 |
cluster, there might an existing entry with the same key already. |
|
113 |
Values of these entries might be different for that same key. |
|
114 |
Which value should be set for the key? Conflict is resolved by |
|
115 |
the policy set here. Default policy is hz.ADD_NEW_ENTRY |
|
116 |
|
|
117 |
There are built-in merge policies such as |
|
118 |
hz.NO_MERGE ; no entry will merge. |
|
119 |
hz.ADD_NEW_ENTRY ; entry will be added if the merging entry's key |
|
120 |
doesn't exist in the cluster. |
|
121 |
hz.HIGHER_HITS ; entry with the higher hits wins. |
|
122 |
hz.LATEST_UPDATE ; entry with the latest update wins. |
|
123 |
--> |
|
124 |
<merge-policy>hz.ADD_NEW_ENTRY</merge-policy> |
|
125 |
</map> |
|
126 |
<map name="hzObjectPath"> |
|
127 |
... |
|
128 |
<map-store enabled="true"> |
|
129 |
<!-- |
|
130 |
Name of the class implementing MapLoader and/or MapStore. |
|
131 |
The class should implement at least of these interfaces and |
|
132 |
contain no-argument constructor. Note that the inner classes are not supported. |
|
133 |
--> |
|
134 |
<class-name>edu.ucsb.nceas.metacat.dataone.hazelcast.ObjectPathMap</class-name> |
|
135 |
<!-- |
|
136 |
Number of seconds to delay to call the MapStore.store(key, value). |
|
137 |
If the value is zero then it is write-through so MapStore.store(key, value) |
|
138 |
will be called as soon as the entry is updated. |
|
139 |
Otherwise it is write-behind so updates will be stored after write-delay-seconds |
|
140 |
value by calling Hazelcast.storeAll(map). Default value is 0. |
|
141 |
--> |
|
142 |
<write-delay-seconds>0</write-delay-seconds> |
|
143 |
</map-store> |
|
144 |
</map> |
|
145 |
<!-- Add your own map merge policy implementations here: |
|
146 |
<merge-policies> |
|
147 |
<map-merge-policy name="MY_MERGE_POLICY"> |
|
148 |
<class-name>com.acme.MyOwnMergePolicy</class-name> |
|
149 |
</map-merge-policy> |
|
150 |
</merge-policies> |
|
151 |
--> |
|
152 |
|
|
153 |
</hazelcast> |
Also available in: Unified diff
copied default hazelcast configuration from the jar into hazelcast.test.properties.xml, to get instances to talk to each other.