-
Notifications
You must be signed in to change notification settings - Fork 1.9k
/
IgniteSystemProperties.java
989 lines (822 loc) · 40.7 KB
/
IgniteSystemProperties.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ignite;
import java.io.Serializable;
import java.lang.management.RuntimeMXBean;
import java.util.Iterator;
import java.util.Map;
import java.util.Properties;
import javax.net.ssl.HostnameVerifier;
import org.apache.ignite.cluster.ClusterGroup;
import org.apache.ignite.configuration.DataStorageConfiguration;
import org.apache.ignite.internal.marshaller.optimized.OptimizedMarshaller;
import org.apache.ignite.lang.IgnitePredicate;
import org.jetbrains.annotations.Nullable;
/**
* Contains constants for all system properties and environmental variables in Ignite.
* These properties and variables can be used to affect the behavior of Ignite.
*/
public final class IgniteSystemProperties {
/**
* If this system property is present the Ignite will include grid name into verbose log.
*
* @deprecated Use {@link #IGNITE_LOG_INSTANCE_NAME}.
*/
@Deprecated
public static final String IGNITE_LOG_GRID_NAME = "IGNITE_LOG_GRID_NAME";
/**
* If this system property is present the Ignite will include instance name into verbose log.
*/
public static final String IGNITE_LOG_INSTANCE_NAME = "IGNITE_LOG_INSTANCE_NAME";
/**
* This property is used internally to pass an exit code to loader when
* Ignite instance is being restarted.
*/
public static final String IGNITE_RESTART_CODE = "IGNITE_RESTART_CODE";
/**
* Presence of this system property with value {@code true} will make the grid
* node start as a daemon node. Node that this system property will override
* {@link org.apache.ignite.configuration.IgniteConfiguration#isDaemon()} configuration.
*/
public static final String IGNITE_DAEMON = "IGNITE_DAEMON";
/** Defines Ignite installation folder. */
public static final String IGNITE_HOME = "IGNITE_HOME";
/** If this system property is set to {@code false} - no shutdown hook will be set. */
public static final String IGNITE_NO_SHUTDOWN_HOOK = "IGNITE_NO_SHUTDOWN_HOOK";
/**
* Name of the system property to disable requirement for proper node ordering
* by discovery SPI. Use with care, as proper node ordering is required for
* cache consistency. If set to {@code true}, then any discovery SPI can be used
* with distributed cache, otherwise, only discovery SPIs that have annotation
* {@link org.apache.ignite.spi.discovery.DiscoverySpiOrderSupport @GridDiscoverySpiOrderSupport(true)} will
* be allowed.
*/
public static final String IGNITE_NO_DISCO_ORDER = "IGNITE_NO_DISCO_ORDER";
/** Defines reconnect delay in milliseconds for client node that was failed forcible. */
public static final String IGNITE_DISCO_FAILED_CLIENT_RECONNECT_DELAY = "IGNITE_DISCO_FAILED_CLIENT_RECONNECT_DELAY";
/**
* If this system property is set to {@code false} - no checks for new versions will
* be performed by Ignite. By default, Ignite periodically checks for the new
* version and prints out the message into the log if new version of Ignite is
* available for download.
*/
public static final String IGNITE_UPDATE_NOTIFIER = "IGNITE_UPDATE_NOTIFIER";
/**
* This system property defines interval in milliseconds in which Ignite will check
* thread pool state for starvation. Zero value will disable this checker.
*/
public static final String IGNITE_STARVATION_CHECK_INTERVAL = "IGNITE_STARVATION_CHECK_INTERVAL";
/**
* If this system property is present (any value) - no ASCII logo will
* be printed.
*/
public static final String IGNITE_NO_ASCII = "IGNITE_NO_ASCII";
/**
* This property allows to override Jetty host for REST processor.
*/
public static final String IGNITE_JETTY_HOST = "IGNITE_JETTY_HOST";
/**
* This property allows to override Jetty local port for REST processor.
*/
public static final String IGNITE_JETTY_PORT = "IGNITE_JETTY_PORT";
/**
* This property does not allow Ignite to override Jetty log configuration for REST processor.
*/
public static final String IGNITE_JETTY_LOG_NO_OVERRIDE = "IGNITE_JETTY_LOG_NO_OVERRIDE";
/** This property allow rewriting default ({@code 30}) rest session expire time (in seconds). */
public static final String IGNITE_REST_SESSION_TIMEOUT = "IGNITE_REST_SESSION_TIMEOUT";
/**
* This property allows to override maximum count of task results stored on one node
* in REST processor.
*/
public static final String IGNITE_REST_MAX_TASK_RESULTS = "IGNITE_REST_MAX_TASK_RESULTS";
/**
* This property allows to override default behavior that rest processor
* doesn't start on client node. If set {@code true} than rest processor will be started on client node.
*/
public static final String IGNITE_REST_START_ON_CLIENT = "IGNITE_REST_START_ON_CLIENT";
/**
* This property defines the maximum number of attempts to remap near get to the same
* primary node. Remapping may be needed when topology is changed concurrently with
* get operation.
*/
public static final String IGNITE_NEAR_GET_MAX_REMAPS = "IGNITE_NEAR_GET_MAX_REMAPS";
/**
* Set to either {@code true} or {@code false} to enable or disable quiet mode
* of Ignite. In quiet mode, only warning and errors are printed into the log
* additionally to a shortened version of standard output on the start.
* <p>
* Note that if you use <tt>ignite.{sh|bat}</tt> scripts to start Ignite they
* start by default in quiet mode. You can supply <tt>-v</tt> flag to override it.
*/
public static final String IGNITE_QUIET = "IGNITE_QUIET";
/**
* Setting this option to {@code true} will enable troubleshooting logger.
* Troubleshooting logger makes logging more verbose without enabling debug mode
* to provide more detailed logs without performance penalty.
*/
public static final String IGNITE_TROUBLESHOOTING_LOGGER = "IGNITE_TROUBLESHOOTING_LOGGER";
/**
* Setting to {@code true} enables writing sensitive information in {@code toString()} output.
*/
public static final String IGNITE_TO_STRING_INCLUDE_SENSITIVE = "IGNITE_TO_STRING_INCLUDE_SENSITIVE";
/**
* If this property is set to {@code true} (default) and Ignite is launched
* in verbose mode (see {@link #IGNITE_QUIET}) and no console appenders can be found
* in configuration, then default console appender will be added.
* Set this property to {@code false} if no appenders should be added.
*/
public static final String IGNITE_CONSOLE_APPENDER = "IGNITE_CONSOLE_APPENDER";
/** Maximum size for exchange history. Default value is {@code 1000}.*/
public static final String IGNITE_EXCHANGE_HISTORY_SIZE = "IGNITE_EXCHANGE_HISTORY_SIZE";
/** */
public static final String IGNITE_EXCHANGE_MERGE_DELAY = "IGNITE_EXCHANGE_MERGE_DELAY";
/**
* Name of the system property defining name of command line program.
*/
public static final String IGNITE_PROG_NAME = "IGNITE_PROG_NAME";
/**
* Name of the system property defining success file name. This file
* is used with auto-restarting functionality when Ignite is started
* by supplied <tt>ignite.{bat|sh}</tt> scripts.
*/
public static final String IGNITE_SUCCESS_FILE = "IGNITE_SUCCESS_FILE";
/**
* Name of system property to set system-wide local IP address or host. If provided it will
* override all default local bind settings within Ignite or any of its SPIs.
* <p>
* Note that system-wide local bind address can also be set via {@link org.apache.ignite.configuration.IgniteConfiguration#getLocalHost()}
* method. However, system properties have priority over configuration properties specified in
* {@link org.apache.ignite.configuration.IgniteConfiguration}.
*/
public static final String IGNITE_LOCAL_HOST = "IGNITE_LOCAL_HOST";
/**
* System property to override deployment mode configuration parameter.
* Valid values for property are: PRIVATE, ISOLATED, SHARED or CONTINUOUS.
*
* @see org.apache.ignite.configuration.DeploymentMode
* @see org.apache.ignite.configuration.IgniteConfiguration#getDeploymentMode()
*/
public static final String IGNITE_DEP_MODE_OVERRIDE = "IGNITE_DEPLOYMENT_MODE_OVERRIDE";
/**
* Property controlling size of buffer holding completed transaction versions. Such buffer
* is used to detect duplicate transaction and has a default value of {@code 102400}. In
* most cases this value is large enough and does not need to be changed.
*/
public static final String IGNITE_MAX_COMPLETED_TX_COUNT = "IGNITE_MAX_COMPLETED_TX_COUNT";
/**
* Concurrency level for all concurrent hash maps created by Ignite.
*/
public static final String IGNITE_MAP_CONCURRENCY_LEVEL = "IGNITE_MAP_CONCURRENCY_LEVEL";
/**
* Transactions that take more time, than value of this property, will be output to log
* with warning level. {@code 0} (default value) disables warning on slow transactions.
*/
public static final String IGNITE_SLOW_TX_WARN_TIMEOUT = "IGNITE_SLOW_TX_WARN_TIMEOUT";
/**
* Timeout after which all uncompleted transactions originated by left node will be
* salvaged (i.e. invalidated and committed).
*/
public static final String IGNITE_TX_SALVAGE_TIMEOUT = "IGNITE_TX_SALVAGE_TIMEOUT";
/**
* Specifies maximum number of iterations for deadlock detection procedure.
* If value of this property is less then or equal to zero then deadlock detection will be disabled.
*/
public static final String IGNITE_TX_DEADLOCK_DETECTION_MAX_ITERS = "IGNITE_TX_DEADLOCK_DETECTION_MAX_ITERS";
/**
* Specifies timeout for deadlock detection procedure.
*/
public static final String IGNITE_TX_DEADLOCK_DETECTION_TIMEOUT = "IGNITE_TX_DEADLOCK_DETECTION_TIMEOUT";
/**
* System property to override multicast group taken from configuration.
* Used for testing purposes.
*/
public static final String IGNITE_OVERRIDE_MCAST_GRP = "IGNITE_OVERRIDE_MCAST_GRP";
/**
* System property to override default reflection cache size. Default value is {@code 128}.
*/
public static final String IGNITE_REFLECTION_CACHE_SIZE = "IGNITE_REFLECTION_CACHE_SIZE";
/**
* System property to override default job processor maps sizes for finished jobs and
* cancellation requests. Default value is {@code 10240}.
*/
public static final String IGNITE_JOBS_HISTORY_SIZE = "IGNITE_JOBS_HISTORY_SIZE";
/**
* System property to override default job metrics processor property defining
* concurrency level for structure holding job metrics snapshots.
* Default value is {@code 64}.
*/
public static final String IGNITE_JOBS_METRICS_CONCURRENCY_LEVEL = "IGNITE_JOBS_METRICS_CONCURRENCY_LEVEL";
/**
* System property to hold optional configuration URL.
*/
public static final String IGNITE_CONFIG_URL = "IGNITE_CONFIG_URL";
/** System property to hold SSH host for visor-started nodes. */
public static final String IGNITE_SSH_HOST = "IGNITE_SSH_HOST";
/** System property to hold SSH user name for visor-started nodes. */
public static final String IGNITE_SSH_USER_NAME = "IGNITE_SSH_USER_NAME";
/** System property to hold preload resend timeout for evicted partitions. */
public static final String IGNITE_PRELOAD_RESEND_TIMEOUT = "IGNITE_PRELOAD_RESEND_TIMEOUT";
/**
* System property to specify how often in milliseconds marshal buffers
* should be rechecked and potentially trimmed. Default value is {@code 10,000ms}.
*/
public static final String IGNITE_MARSHAL_BUFFERS_RECHECK = "IGNITE_MARSHAL_BUFFERS_RECHECK";
/**
* System property to disable {@link HostnameVerifier} for SSL connections.
* Can be used for development with self-signed certificates. Default value is {@code false}.
*/
public static final String IGNITE_DISABLE_HOSTNAME_VERIFIER = "IGNITE_DISABLE_HOSTNAME_VERIFIER";
/**
* System property to disable buffered communication if node sends less messages count than
* specified by this property. Default value is {@code 512}.
*
* @deprecated Not used anymore.
*/
@Deprecated
public static final String IGNITE_MIN_BUFFERED_COMMUNICATION_MSG_CNT = "IGNITE_MIN_BUFFERED_COMMUNICATION_MSG_CNT";
/**
* Flag that will force Ignite to fill memory block with some recognisable pattern right before
* this memory block is released. This will help to recognize cases when already released memory is accessed.
*/
public static final String IGNITE_OFFHEAP_SAFE_RELEASE = "IGNITE_OFFHEAP_SAFE_RELEASE";
/** Maximum size for atomic cache queue delete history (default is 200 000 entries per partition). */
public static final String IGNITE_ATOMIC_CACHE_DELETE_HISTORY_SIZE = "IGNITE_ATOMIC_CACHE_DELETE_HISTORY_SIZE";
/** Ttl of removed cache entries (ms). */
public static final String IGNITE_CACHE_REMOVED_ENTRIES_TTL = "IGNITE_CACHE_REMOVED_ENTRIES_TTL";
/** Maximum amount of concurrent updates per system thread in atomic caches in case of PRIMARY_SYNC or FULL_ASYNC
* write synchronization mode. If this limit is exceeded then update will be performed with FULL_SYNC
* synchronization mode. If value is {@code 0} then limit is unbounded.
*/
public static final String IGNITE_ATOMIC_CACHE_MAX_CONCURRENT_DHT_UPDATES =
"IGNITE_ATOMIC_CACHE_MAX_CONCURRENT_DHT_UPDATES";
/**
* Comma separated list of addresses in format "10.100.22.100:45000,10.100.22.101:45000".
* Makes sense only for {@link org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder}.
*/
public static final String IGNITE_TCP_DISCOVERY_ADDRESSES = "IGNITE_TCP_DISCOVERY_ADDRESSES";
/**
* Flag indicating whether performance suggestions output on start should be disabled.
*/
public static final String IGNITE_PERFORMANCE_SUGGESTIONS_DISABLED = "IGNITE_PERFORMANCE_SUGGESTIONS_DISABLED";
/**
* Atomic cache deferred update response buffer size.
*/
public static final String IGNITE_ATOMIC_DEFERRED_ACK_BUFFER_SIZE = "IGNITE_ATOMIC_DEFERRED_ACK_BUFFER_SIZE";
/**
* Atomic cache deferred update timeout.
*/
public static final String IGNITE_ATOMIC_DEFERRED_ACK_TIMEOUT = "IGNITE_ATOMIC_DEFERRED_ACK_TIMEOUT";
/**
* Atomic cache deferred update timeout.
*/
public static final String IGNITE_ATOMIC_CACHE_QUEUE_RETRY_TIMEOUT = "IGNITE_ATOMIC_CACHE_QUEUE_RETRY_TIMEOUT";
/**
* One phase commit deferred ack request timeout.
*/
public static final String IGNITE_DEFERRED_ONE_PHASE_COMMIT_ACK_REQUEST_TIMEOUT =
"IGNITE_DEFERRED_ONE_PHASE_COMMIT_ACK_REQUEST_TIMEOUT";
/**
* One phase commit deferred ack request buffer size.
*/
public static final String IGNITE_DEFERRED_ONE_PHASE_COMMIT_ACK_REQUEST_BUFFER_SIZE =
"IGNITE_DEFERRED_ONE_PHASE_COMMIT_ACK_REQUEST_BUFFER_SIZE";
/**
* If this property set then debug console will be opened for H2 indexing SPI.
*/
public static final String IGNITE_H2_DEBUG_CONSOLE = "IGNITE_H2_DEBUG_CONSOLE";
/**
* This property allows to specify user defined port which H2 indexing SPI will use
* to start H2 debug console on. If this property is not set or set to 0, H2 debug
* console will use system-provided dynamic port.
* This property is only relevant when {@link #IGNITE_H2_DEBUG_CONSOLE} property is set.
*/
public static final String IGNITE_H2_DEBUG_CONSOLE_PORT = "IGNITE_H2_DEBUG_CONSOLE_PORT";
/**
* If this property is set to {@code true} then shared memory space native debug will be enabled.
*/
public static final String IGNITE_IPC_SHMEM_SPACE_DEBUG = "IGNITE_IPC_SHMEM_SPACE_DEBUG";
/**
* Property allowing to skip configuration consistency checks.
*/
public static final String IGNITE_SKIP_CONFIGURATION_CONSISTENCY_CHECK =
"IGNITE_SKIP_CONFIGURATION_CONSISTENCY_CHECK";
/**
* Flag indicating whether validation of keys put to cache should be disabled.
*/
public static final String IGNITE_CACHE_KEY_VALIDATION_DISABLED = "IGNITE_CACHE_KEY_VALIDATION_DISABLED";
/**
* Environment variable to override logging directory that has been set in logger configuration.
*/
public static final String IGNITE_LOG_DIR = "IGNITE_LOG_DIR";
/**
* Environment variable to set work directory. The property {@link org.apache.ignite.configuration.IgniteConfiguration#setWorkDirectory} has higher
* priority.
*/
public static final String IGNITE_WORK_DIR = "IGNITE_WORK_DIR";
/**
* If this property is set to {@code true} then Ignite will append
* hash code of {@link Ignite} class as hex string and append
* JVM name returned by {@link RuntimeMXBean#getName()}.
* <p>
* This may be helpful when running Ignite in some application server
* clusters or similar environments to avoid MBean name collisions.
* <p>
* Default is {@code false}.
*/
public static final String IGNITE_MBEAN_APPEND_JVM_ID = "IGNITE_MBEAN_APPEND_JVM_ID";
/**
* If this property is set to {@code true} then Ignite will append
* hash code of class loader to MXBean name.
* <p>
* Default is {@code true}.
*/
public static final String IGNITE_MBEAN_APPEND_CLASS_LOADER_ID = "IGNITE_MBEAN_APPEND_CLASS_LOADER_ID";
/**
* If property is set to {@code true}, then Ignite will disable MBeans registration.
* This may be helpful if MBeans are not allowed e.g. for security reasons.
*
* Default is {@code false}
*/
public static final String IGNITE_MBEANS_DISABLED = "IGNITE_MBEANS_DISABLED";
/**
* Property controlling size of buffer holding last exception. Default value of {@code 1000}.
*/
public static final String IGNITE_EXCEPTION_REGISTRY_MAX_SIZE = "IGNITE_EXCEPTION_REGISTRY_MAX_SIZE";
/**
* Property controlling default behavior of cache client flag.
*/
public static final String IGNITE_CACHE_CLIENT = "IGNITE_CACHE_CLIENT";
/**
* Property controlling whether CacheManager will start grid with isolated IP finder when default URL
* is passed in. This is needed to pass TCK tests which use default URL and assume isolated cache managers
* for different class loaders.
*/
public static final String IGNITE_JCACHE_DEFAULT_ISOLATED = "IGNITE_CACHE_CLIENT";
/**
* Property controlling maximum number of SQL result rows which can be fetched into a merge table.
* If there are less rows than this threshold then multiple passes throw a table will be possible,
* otherwise only one pass (e.g. only result streaming is possible).
*/
public static final String IGNITE_SQL_MERGE_TABLE_MAX_SIZE = "IGNITE_SQL_MERGE_TABLE_MAX_SIZE";
/**
* Property controlling number of SQL result rows that will be fetched into a merge table at once before
* applying binary search for the bounds.
*/
public static final String IGNITE_SQL_MERGE_TABLE_PREFETCH_SIZE = "IGNITE_SQL_MERGE_TABLE_PREFETCH_SIZE";
/** Disable fallback to H2 SQL parser if the internal SQL parser fails to parse the statement. */
public static final String IGNITE_SQL_PARSER_DISABLE_H2_FALLBACK = "IGNITE_SQL_PARSER_DISABLE_H2_FALLBACK";
/** Maximum size for affinity assignment history. */
public static final String IGNITE_AFFINITY_HISTORY_SIZE = "IGNITE_AFFINITY_HISTORY_SIZE";
/** Maximum size for discovery messages history. */
public static final String IGNITE_DISCOVERY_HISTORY_SIZE = "IGNITE_DISCOVERY_HISTORY_SIZE";
/** Maximum number of discovery message history used to support client reconnect. */
public static final String IGNITE_DISCOVERY_CLIENT_RECONNECT_HISTORY_SIZE =
"IGNITE_DISCOVERY_CLIENT_RECONNECT_HISTORY_SIZE";
/** Number of cache operation retries in case of topology exceptions. */
public static final String IGNITE_CACHE_RETRIES_COUNT = "IGNITE_CACHE_RETRIES_COUNT";
/** Number of times pending cache objects will be dumped to the log in case of partition exchange timeout. */
public static final String IGNITE_DUMP_PENDING_OBJECTS_THRESHOLD = "IGNITE_DUMP_PENDING_OBJECTS_THRESHOLD";
/** If this property is set to {@code true} then Ignite will log thread dump in case of partition exchange timeout. */
public static final String IGNITE_THREAD_DUMP_ON_EXCHANGE_TIMEOUT = "IGNITE_THREAD_DUMP_ON_EXCHANGE_TIMEOUT";
/** */
public static final String IGNITE_IO_DUMP_ON_TIMEOUT = "IGNITE_IO_DUMP_ON_TIMEOUT";
/** */
public static final String IGNITE_DIAGNOSTIC_ENABLED = "IGNITE_DIAGNOSTIC_ENABLED";
/** Cache operations that take more time than value of this property will be output to log. Set to {@code 0} to disable. */
public static final String IGNITE_LONG_OPERATIONS_DUMP_TIMEOUT = "IGNITE_LONG_OPERATIONS_DUMP_TIMEOUT";
/** Upper time limit between long running/hanging operations debug dumps. */
public static final String IGNITE_LONG_OPERATIONS_DUMP_TIMEOUT_LIMIT = "IGNITE_LONG_OPERATIONS_DUMP_TIMEOUT_LIMIT";
/** JDBC driver cursor remove delay. */
public static final String IGNITE_JDBC_DRIVER_CURSOR_REMOVE_DELAY = "IGNITE_JDBC_DRIVER_CURSOR_RMV_DELAY";
/** Long-long offheap map load factor. */
public static final String IGNITE_LONG_LONG_HASH_MAP_LOAD_FACTOR = "IGNITE_LONG_LONG_HASH_MAP_LOAD_FACTOR";
/** Maximum number of nested listener calls before listener notification becomes asynchronous. */
public static final String IGNITE_MAX_NESTED_LISTENER_CALLS = "IGNITE_MAX_NESTED_LISTENER_CALLS";
/** Indicating whether local store keeps primary only. Backward compatibility flag. */
public static final String IGNITE_LOCAL_STORE_KEEPS_PRIMARY_ONLY = "IGNITE_LOCAL_STORE_KEEPS_PRIMARY_ONLY";
/**
* Manages {@link OptimizedMarshaller} behavior of {@code serialVersionUID} computation for
* {@link Serializable} classes.
*/
public static final String IGNITE_OPTIMIZED_MARSHALLER_USE_DEFAULT_SUID =
"IGNITE_OPTIMIZED_MARSHALLER_USE_DEFAULT_SUID";
/**
* Manages type of serialization mechanism for {@link String} that is marshalled/unmarshalled by BinaryMarshaller.
* Should be used for cases when a String contains a surrogate symbol without its pair one. This is frequently used
* in algorithms that encrypts data in String format.
*/
public static final String IGNITE_BINARY_MARSHALLER_USE_STRING_SERIALIZATION_VER_2 =
"IGNITE_BINARY_MARSHALLER_USE_STRING_SERIALIZATION_VER_2";
/**
* If set to {@code true}, then default selected keys set is used inside
* {@code GridNioServer} which lead to some extra garbage generation when
* processing selected keys.
* <p>
* Default value is {@code false}. Should be switched to {@code true} if there are
* any problems in communication layer.
*/
public static final String IGNITE_NO_SELECTOR_OPTS = "IGNITE_NO_SELECTOR_OPTS";
/**
* System property to specify period in milliseconds between calls of the SQL statements cache cleanup task.
* <p>
* Cleanup tasks clears cache for terminated threads and for threads which did not perform SQL queries within
* timeout configured via {@link #IGNITE_H2_INDEXING_CACHE_THREAD_USAGE_TIMEOUT} property.
* <p>
* Default value is {@code 10,000ms}.
*/
public static final String IGNITE_H2_INDEXING_CACHE_CLEANUP_PERIOD = "IGNITE_H2_INDEXING_CACHE_CLEANUP_PERIOD";
/**
* System property to specify timeout in milliseconds after which thread's SQL statements cache is cleared by
* cleanup task if the thread does not perform any query.
* <p>
* Default value is {@code 600,000ms}.
*/
public static final String IGNITE_H2_INDEXING_CACHE_THREAD_USAGE_TIMEOUT =
"IGNITE_H2_INDEXING_CACHE_THREAD_USAGE_TIMEOUT";
/**
* Manages backward compatibility of {@link IgniteServices}. All nodes in cluster must have identical value
* of this property.
* <p>
* If property is {@code false} then node is not required to have service implementation class if service is not
* deployed on this node.
* <p>
* If the property is {@code true} then service implementation class is required on node even if service
* is not deployed on this node.
* <p>
* If the property is not set ({@code null}) then Ignite will automatically detect which compatibility mode
* should be used.
*/
public static final String IGNITE_SERVICES_COMPATIBILITY_MODE = "IGNITE_SERVICES_COMPATIBILITY_MODE";
/**
* When set to {@code true} tree-based data structures - {@code TreeMap} and {@code TreeSet} - will not be
* wrapped into special holders introduced to overcome serialization issue caused by missing {@code Comparable}
* interface on {@code BinaryObject}.
* <p>
* @deprecated Should be removed in Apache Ignite 2.0.
*/
@Deprecated
public static final String IGNITE_BINARY_DONT_WRAP_TREE_STRUCTURES = "IGNITE_BINARY_DONT_WRAP_TREE_STRUCTURES";
/**
* When set to {@code true}, for consistent id will calculate by host name, without port, and you can use
* only one node for host in cluster.
*/
public static final String IGNITE_CONSISTENT_ID_BY_HOST_WITHOUT_PORT = "IGNITE_CONSISTENT_ID_BY_HOST_WITHOUT_PORT";
/** */
public static final String IGNITE_IO_BALANCE_PERIOD = "IGNITE_IO_BALANCE_PERIOD";
/**
* When set to {@code true} fields are written by BinaryMarshaller in sorted order. Otherwise
* the natural order is used.
* <p>
* @deprecated Should be removed in Apache Ignite 2.0.
*/
@Deprecated
public static final String IGNITE_BINARY_SORT_OBJECT_FIELDS = "IGNITE_BINARY_SORT_OBJECT_FIELDS";
/**
* Whether Ignite can access unaligned memory addresses.
* <p>
* Defaults to {@code false}, meaning that unaligned access will be performed only on x86 architecture.
*/
public static final String IGNITE_MEMORY_UNALIGNED_ACCESS = "IGNITE_MEMORY_UNALIGNED_ACCESS";
/**
* When unsafe memory copy if performed below this threshold, Ignite will do it on per-byte basis instead of
* calling to Unsafe.copyMemory().
* <p>
* Defaults to 0, meaning that threshold is disabled.
*/
public static final String IGNITE_MEMORY_PER_BYTE_COPY_THRESHOLD = "IGNITE_MEMORY_PER_BYTE_COPY_THRESHOLD";
/**
* When set to {@code true} BinaryObject will be unwrapped before passing to IndexingSpi to preserve
* old behavior query processor with IndexingSpi.
* <p>
* @deprecated Should be removed in Apache Ignite 2.0.
*/
public static final String IGNITE_UNWRAP_BINARY_FOR_INDEXING_SPI = "IGNITE_UNWRAP_BINARY_FOR_INDEXING_SPI";
/**
* System property to specify maximum payload size in bytes for {@code H2TreeIndex}.
* <p>
* Defaults to {@code 0}, meaning that inline index store is disabled.
*/
public static final String IGNITE_MAX_INDEX_PAYLOAD_SIZE = "IGNITE_MAX_INDEX_PAYLOAD_SIZE";
/**
* Time interval for calculating rebalance rate statistics, in milliseconds. Defaults to 60000.
*/
public static final String IGNITE_REBALANCE_STATISTICS_TIME_INTERVAL = "IGNITE_REBALANCE_STATISTICS_TIME_INTERVAL";
/**
* When cache has entries with expired TTL, each user operation will also remove this amount of expired entries.
* Defaults to {@code 5}.
*/
public static final String IGNITE_TTL_EXPIRE_BATCH_SIZE = "IGNITE_TTL_EXPIRE_BATCH_SIZE";
/**
* Indexing discovery history size. Protects from duplicate messages maintaining the list of IDs of recently
* arrived discovery messages.
* <p>
* Defaults to {@code 1000}.
*/
public static final String IGNITE_INDEXING_DISCOVERY_HISTORY_SIZE = "IGNITE_INDEXING_DISCOVERY_HISTORY_SIZE";
/** Cache start size for on-heap maps. Defaults to 4096. */
public static final String IGNITE_CACHE_START_SIZE = "IGNITE_CACHE_START_SIZE";
/** */
public static final String IGNITE_START_CACHES_ON_JOIN = "IGNITE_START_CACHES_ON_JOIN";
/**
* Skip CRC calculation flag.
*/
public static final String IGNITE_PDS_SKIP_CRC = "IGNITE_PDS_SKIP_CRC";
/**
* WAL rebalance threshold.
*/
public static final String IGNITE_PDS_PARTITION_DESTROY_CHECKPOINT_DELAY =
"IGNITE_PDS_PARTITION_DESTROY_CHECKPOINT_DELAY";
/**
* WAL rebalance threshold.
*/
public static final String IGNITE_PDS_WAL_REBALANCE_THRESHOLD = "IGNITE_PDS_WAL_REBALANCE_THRESHOLD";
/** Ignite page memory concurrency level. */
public static final String IGNITE_OFFHEAP_LOCK_CONCURRENCY_LEVEL = "IGNITE_OFFHEAP_LOCK_CONCURRENCY_LEVEL";
/**
* Start Ignite on versions of JRE 7 older than 1.7.0_71. For proper work it may require
* disabling JIT in some places.
*/
public static final String IGNITE_FORCE_START_JAVA7 = "IGNITE_FORCE_START_JAVA7";
/** Returns true for system properties only avoiding sending sensitive information. */
private static final IgnitePredicate<Map.Entry<String, String>> PROPS_FILTER = new IgnitePredicate<Map.Entry<String, String>>() {
@Override public boolean apply(final Map.Entry<String, String> entry) {
final String key = entry.getKey();
return key.startsWith("java.") || key.startsWith("os.") || key.startsWith("user.");
}
};
/**
* When set to {@code true}, Ignite switches to compatibility mode with versions that don't
* support service security permissions. In this case security permissions will be ignored
* (if they set).
* <p>
* Default is {@code false}, which means that service security permissions will be respected.
* </p>
*/
public static final String IGNITE_SECURITY_COMPATIBILITY_MODE = "IGNITE_SECURITY_COMPATIBILITY_MODE";
/**
* Ignite cluster name.
* <p>
* Defaults to utility cache deployment ID..
*/
public static final String IGNITE_CLUSTER_NAME = "IGNITE_CLUSTER_NAME";
/**
* When client cache is started or closed special discovery message is sent to notify cluster (for example this is
* needed for {@link ClusterGroup#forCacheNodes(String)} API. This timeout specifies how long to wait
* after client cache start/close before sending this message. If during this timeout another client
* cache changed, these events are combined into single message.
* <p>
* Default is 10 seconds.
*/
public static final String IGNITE_CLIENT_CACHE_CHANGE_MESSAGE_TIMEOUT =
"IGNITE_CLIENT_CACHE_CHANGE_MESSAGE_TIMEOUT";
/**
* If a partition release future completion time during an exchange exceeds this threshold, the contents of
* the future will be dumped to the log on exchange. Default is {@code 0} (disabled).
*/
public static final String IGNITE_PARTITION_RELEASE_FUTURE_DUMP_THRESHOLD =
"IGNITE_PARTITION_RELEASE_FUTURE_DUMP_THRESHOLD";
/**
* If this property is set, a node will forcible fail a remote node when it fails to establish a communication
* connection.
*/
public static final String IGNITE_ENABLE_FORCIBLE_NODE_KILL = "IGNITE_ENABLE_FORCIBLE_NODE_KILL";
/**
*
*/
public static final String IGNITE_WAL_ARCHIVE_COMPACT_SKIP_DELTA_RECORD = "IGNITE_WAL_ARCHIVE_COMPACT_SKIP_DELTA_RECORD";
/**
* Tasks stealing will be started if tasks queue size per data-streamer thread exceeds this threshold.
* <p>
* Default value is {@code 4}.
*/
public static final String IGNITE_DATA_STREAMING_EXECUTOR_SERVICE_TASKS_STEALING_THRESHOLD =
"IGNITE_DATA_STREAMING_EXECUTOR_SERVICE_TASKS_STEALING_THRESHOLD";
/**
* If this property is set, then Ignite will use Async File IO factory by default.
*/
public static final String IGNITE_USE_ASYNC_FILE_IO_FACTORY = "IGNITE_USE_ASYNC_FILE_IO_FACTORY";
/**
* If the property is set {@link org.apache.ignite.internal.pagemem.wal.record.TxRecord} records
* will be logged to WAL.
*
* Default value is {@code false}.
*/
public static final String IGNITE_WAL_LOG_TX_RECORDS = "IGNITE_WAL_LOG_TX_RECORDS";
/** If this property is set, {@link DataStorageConfiguration#writeThrottlingEnabled} will be overridden to true
* independent of initial value in configuration. */
public static final String IGNITE_OVERRIDE_WRITE_THROTTLING_ENABLED = "IGNITE_OVERRIDE_WRITE_THROTTLING_ENABLED";
/**
* Property for setup WAL serializer version.
*/
public static final String IGNITE_WAL_SERIALIZER_VERSION = "IGNITE_WAL_SERIALIZER_VERSION";
/**
* Property that indicates should be mapped byte buffer used or not.
* Possible values: {@code true} and {@code false}.
*/
public static final String IGNITE_WAL_MMAP = "IGNITE_WAL_MMAP";
/**
* When set to {@code true}, Data store folders are generated only by consistent id, and no consistent ID will be
* set based on existing data store folders. This option also enables compatible folder generation mode as it was
* before 2.3.
*/
public static final String IGNITE_DATA_STORAGE_FOLDER_BY_CONSISTENT_ID = "IGNITE_DATA_STORAGE_FOLDER_BY_CONSISTENT_ID";
/**
* Enforces singleton.
*/
private IgniteSystemProperties() {
// No-op.
}
/**
* Gets either system property or environment variable with given name.
*
* @param name Name of the system property or environment variable.
* @return Value of the system property or environment variable.
* Returns {@code null} if neither can be found for given name.
*/
@Nullable public static String getString(String name) {
assert name != null;
String v = System.getProperty(name);
if (v == null)
v = System.getenv(name);
return v;
}
/**
* Gets either system property or environment variable with given name.
*
* @param name Name of the system property or environment variable.
* @param dflt Default value.
* @return Value of the system property or environment variable.
* Returns {@code null} if neither can be found for given name.
*/
@Nullable public static String getString(String name, String dflt) {
String val = getString(name);
return val == null ? dflt : val;
}
/**
* Gets either system property or environment variable with given name.
* The result is transformed to {@code boolean} using {@code Boolean.valueOf()} method.
*
* @param name Name of the system property or environment variable.
* @return Boolean value of the system property or environment variable.
* Returns {@code False} in case neither system property
* nor environment variable with given name is found.
*/
public static boolean getBoolean(String name) {
return getBoolean(name, false);
}
/**
* Gets either system property or environment variable with given name.
* The result is transformed to {@code boolean} using {@code Boolean.valueOf()} method.
*
* @param name Name of the system property or environment variable.
* @param dflt Default value.
* @return Boolean value of the system property or environment variable.
* Returns default value in case neither system property
* nor environment variable with given name is found.
*/
public static boolean getBoolean(String name, boolean dflt) {
String val = getString(name);
return val == null ? dflt : Boolean.valueOf(val);
}
/**
* Gets either system property or environment variable with given name.
* The result is transformed to {@code int} using {@code Integer.parseInt()} method.
*
* @param name Name of the system property or environment variable.
* @param dflt Default value
* @return Integer value of the system property or environment variable.
* Returns default value in case neither system property
* nor environment variable with given name is found.
*/
public static int getInteger(String name, int dflt) {
String s = getString(name);
if (s == null)
return dflt;
int res;
try {
res = Integer.parseInt(s);
}
catch (NumberFormatException ignore) {
res = dflt;
}
return res;
}
/**
* Gets either system property or environment variable with given name.
* The result is transformed to {@code float} using {@code Float.parseFloat()} method.
*
* @param name Name of the system property or environment variable.
* @param dflt Default value
* @return Float value of the system property or environment variable.
* Returns default value in case neither system property
* nor environment variable with given name is found.
*/
public static float getFloat(String name, float dflt) {
String s = getString(name);
if (s == null)
return dflt;
float res;
try {
res = Float.parseFloat(s);
}
catch (NumberFormatException ignore) {
res = dflt;
}
return res;
}
/**
* Gets either system property or environment variable with given name.
* The result is transformed to {@code long} using {@code Long.parseLong()} method.
*
* @param name Name of the system property or environment variable.
* @param dflt Default value
* @return Integer value of the system property or environment variable.
* Returns default value in case neither system property
* nor environment variable with given name is found.
*/
public static long getLong(String name, long dflt) {
String s = getString(name);
if (s == null)
return dflt;
long res;
try {
res = Long.parseLong(s);
}
catch (NumberFormatException ignore) {
res = dflt;
}
return res;
}
/**
* Gets either system property or environment variable with given name.
* The result is transformed to {@code double} using {@code Double.parseDouble()} method.
*
* @param name Name of the system property or environment variable.
* @param dflt Default value
* @return Integer value of the system property or environment variable.
* Returns default value in case neither system property
* nor environment variable with given name is found.
*/
public static double getDouble(String name, double dflt) {
String s = getString(name);
if (s == null)
return dflt;
double res;
try {
res = Double.parseDouble(s);
}
catch (NumberFormatException ignore) {
res = dflt;
}
return res;
}
/**
* Gets snapshot of system properties.
* Snapshot could be used for thread safe iteration over system properties.
* Non-string properties are removed before return.
*
* @return Snapshot of system properties.
*/
public static Properties snapshot() {
Properties sysProps = (Properties)System.getProperties().clone();
Iterator<Map.Entry<Object, Object>> iter = sysProps.entrySet().iterator();
while (iter.hasNext()) {
Map.Entry entry = iter.next();
if (!(entry.getValue() instanceof String) || !(entry.getKey() instanceof String))
iter.remove();
}
return sysProps;
}
/**
* Does the same as {@link #snapshot()} but filters out
* possible sensitive user data.
*
* @return Snapshot of system properties.
*/
@SuppressWarnings("unchecked")
public static Properties safeSnapshot() {
final Properties props = snapshot();
final Iterator<Map.Entry<Object, Object>> iter = props.entrySet().iterator();
while (iter.hasNext()) {
final Map.Entry entry = iter.next();
if (!PROPS_FILTER.apply(entry))
iter.remove();
}
return props;
}
}