/
VoldemortConfig.java
1127 lines (897 loc) · 39 KB
/
VoldemortConfig.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
990
991
992
993
994
995
996
997
998
999
1000
/*
* Copyright 2008-2010 LinkedIn, Inc
*
* Licensed 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 voldemort.server;
import java.io.File;
import java.io.IOException;
import java.io.Serializable;
import java.util.List;
import java.util.Properties;
import voldemort.client.protocol.RequestFormatType;
import voldemort.cluster.failuredetector.FailureDetectorConfig;
import voldemort.store.bdb.BdbStorageConfiguration;
import voldemort.store.memory.CacheStorageConfiguration;
import voldemort.store.memory.InMemoryStorageConfiguration;
import voldemort.store.mysql.MysqlStorageConfiguration;
import voldemort.store.readonly.BinarySearchStrategy;
import voldemort.store.readonly.ReadOnlyStorageConfiguration;
import voldemort.utils.ConfigurationException;
import voldemort.utils.Props;
import voldemort.utils.Time;
import voldemort.utils.UndefinedPropertyException;
import voldemort.utils.Utils;
import com.google.common.collect.ImmutableList;
/**
* Configuration parameters for the voldemort server.
*
*
*/
public class VoldemortConfig implements Serializable {
private static final long serialVersionUID = 1;
public static final String VOLDEMORT_HOME_VAR_NAME = "VOLDEMORT_HOME";
private static final String VOLDEMORT_NODE_ID_VAR_NAME = "VOLDEMORT_NODE_ID";
public static int VOLDEMORT_DEFAULT_ADMIN_PORT = 6660;
private int nodeId;
private String voldemortHome;
private String dataDirectory;
private String metadataDirectory;
private String slopStoreType;
private long bdbCacheSize;
private boolean bdbWriteTransactions;
private boolean bdbFlushTransactions;
private boolean bdbSortedDuplicates;
private String bdbDataDirectory;
private long bdbMaxLogFileSize;
private int bdbBtreeFanout;
private long bdbCheckpointBytes;
private long bdbCheckpointMs;
private boolean bdbOneEnvPerStore;
private int bdbCleanerMinFileUtilization;
private int bdbCleanerMinUtilization;
private boolean bdbCursorPreload;
private String mysqlUsername;
private String mysqlPassword;
private String mysqlDatabaseName;
private String mysqlHost;
private int mysqlPort;
private int readOnlyBackups;
private String readOnlyStorageDir;
private String readOnlySearchStrategy;
private int coreThreads;
private int maxThreads;
private int socketTimeoutMs;
private int socketBufferSize;
private boolean socketKeepAlive;
private boolean useNioConnector;
private int nioConnectorSelectors;
private int nioAdminConnectorSelectors;
private int clientRoutingTimeoutMs;
private int clientMaxConnectionsPerNode;
private int clientConnectionTimeoutMs;
private int clientMaxThreads;
private int clientThreadIdleMs;
private int clientMaxQueuedRequests;
private int schedulerThreads;
private int numCleanupPermits;
private RequestFormatType requestFormatType;
private boolean enableSlop;
private boolean enableGui;
private boolean enableHttpServer;
private boolean enableSocketServer;
private boolean enableAdminServer;
private boolean enableJmx;
private boolean enableVerboseLogging;
private boolean enableStatTracking;
private boolean enableServerRouting;
private boolean enableMetadataChecking;
private boolean enableRedirectRouting;
private boolean enableNetworkClassLoader;
private boolean enableGossip;
private boolean enableRebalanceService;
private List<String> storageConfigurations;
private Props allProps;
private final long pusherPollMs;
private int adminCoreThreads;
private int adminMaxThreads;
private int adminStreamBufferSize;
private int adminSocketTimeout;
private int adminConnectionTimeout;
private long streamMaxReadBytesPerSec;
private long streamMaxWriteBytesPerSec;
public int getGossipInterval() {
return gossipInterval;
}
public void setGossipInterval(int gossipInterval) {
this.gossipInterval = gossipInterval;
}
private int gossipInterval;
private String failureDetectorImplementation;
private long failureDetectorBannagePeriod;
private int failureDetectorThreshold;
private int failureDetectorThresholdCountMinimum;
private long failureDetectorThresholdInterval;
private long failureDetectorAsyncRecoveryInterval;
private volatile List<String> failureDetectorCatastrophicErrorTypes;
private long failureDetectorRequestLengthThreshold;
private int retentionCleanupFirstStartTimeInHour;
private int retentionCleanupScheduledPeriodInHour;
private int maxRebalancingAttempt;
private int rebalancingTimeoutInSeconds;
private int rebalancingServicePeriod;
private int maxParallelStoresRebalancing;
public VoldemortConfig(Properties props) {
this(new Props(props));
}
public VoldemortConfig(Props props) {
try {
this.nodeId = props.getInt("node.id");
} catch(UndefinedPropertyException e) {
this.nodeId = getIntEnvVariable(VOLDEMORT_NODE_ID_VAR_NAME);
}
this.voldemortHome = props.getString("voldemort.home");
this.dataDirectory = props.getString("data.directory", this.voldemortHome + File.separator
+ "data");
this.metadataDirectory = props.getString("metadata.directory", voldemortHome
+ File.separator + "config");
this.bdbCacheSize = props.getBytes("bdb.cache.size", 200 * 1024 * 1024);
this.bdbWriteTransactions = props.getBoolean("bdb.write.transactions", false);
this.bdbFlushTransactions = props.getBoolean("bdb.flush.transactions", false);
this.bdbDataDirectory = props.getString("bdb.data.directory", this.dataDirectory
+ File.separator + "bdb");
this.bdbMaxLogFileSize = props.getBytes("bdb.max.logfile.size", 60 * 1024 * 1024);
this.bdbBtreeFanout = props.getInt("bdb.btree.fanout", 512);
this.bdbCheckpointBytes = props.getLong("bdb.checkpoint.interval.bytes", 20 * 1024 * 1024);
this.bdbCheckpointMs = props.getLong("bdb.checkpoint.interval.ms", 30 * Time.MS_PER_SECOND);
this.bdbSortedDuplicates = props.getBoolean("bdb.enable.sorted.duplicates", true);
this.bdbOneEnvPerStore = props.getBoolean("bdb.one.env.per.store", false);
this.bdbCleanerMinFileUtilization = props.getInt("bdb.cleaner.min.file.utilization", 5);
this.bdbCleanerMinUtilization = props.getInt("bdb.cleaner.minUtilization", 50);
// enabling preload make cursor slow for insufficient bdb cache size.
this.bdbCursorPreload = props.getBoolean("bdb.cursor.preload", false);
this.readOnlyBackups = props.getInt("readonly.backups", 1);
this.readOnlySearchStrategy = props.getString("readonly.search.strategy",
BinarySearchStrategy.class.getName());
this.readOnlyStorageDir = props.getString("readonly.data.directory", this.dataDirectory
+ File.separator
+ "read-only");
this.slopStoreType = props.getString("slop.store.engine", BdbStorageConfiguration.TYPE_NAME);
this.mysqlUsername = props.getString("mysql.user", "root");
this.mysqlPassword = props.getString("mysql.password", "");
this.mysqlHost = props.getString("mysql.host", "localhost");
this.mysqlPort = props.getInt("mysql.port", 3306);
this.mysqlDatabaseName = props.getString("mysql.database", "voldemort");
this.maxThreads = props.getInt("max.threads", 100);
this.coreThreads = props.getInt("core.threads", Math.max(1, maxThreads / 2));
// Admin client should have less threads but very high buffer size.
this.adminMaxThreads = props.getInt("admin.max.threads", 20);
this.adminCoreThreads = props.getInt("admin.core.threads", Math.max(1, adminMaxThreads / 2));
this.adminStreamBufferSize = (int) props.getBytes("admin.streams.buffer.size",
10 * 1000 * 1000);
this.adminConnectionTimeout = props.getInt("admin.client.connection.timeout.sec", 60);
this.adminSocketTimeout = props.getInt("admin.client.socket.timeout.sec", 24 * 60 * 60);
this.streamMaxReadBytesPerSec = props.getBytes("stream.read.byte.per.sec", 10 * 1000 * 1000);
this.streamMaxWriteBytesPerSec = props.getBytes("stream.write.byte.per.sec",
10 * 1000 * 1000);
this.socketTimeoutMs = props.getInt("socket.timeout.ms", 4000);
this.socketBufferSize = (int) props.getBytes("socket.buffer.size", 32 * 1024);
this.socketKeepAlive = props.getBoolean("socket.keepalive", false);
this.useNioConnector = props.getBoolean("enable.nio.connector", false);
this.nioConnectorSelectors = props.getInt("nio.connector.selectors",
Math.max(8, Runtime.getRuntime()
.availableProcessors()));
this.nioAdminConnectorSelectors = props.getInt("nio.admin.connector.selectors",
Math.max(8, Runtime.getRuntime()
.availableProcessors()));
this.clientMaxConnectionsPerNode = props.getInt("client.max.connections.per.node", 5);
this.clientConnectionTimeoutMs = props.getInt("client.connection.timeout.ms", 400);
this.clientRoutingTimeoutMs = props.getInt("client.routing.timeout.ms", 5000);
this.clientMaxThreads = props.getInt("client.max.threads", 100);
this.clientThreadIdleMs = props.getInt("client.thread.idle.ms", 5000);
this.clientMaxQueuedRequests = props.getInt("client.max.queued.requests", 1000);
this.enableHttpServer = props.getBoolean("http.enable", true);
this.enableSocketServer = props.getBoolean("socket.enable", true);
this.enableAdminServer = props.getBoolean("admin.enable", true);
this.enableJmx = props.getBoolean("jmx.enable", true);
this.enableSlop = props.getBoolean("slop.enable", true);
this.enableVerboseLogging = props.getBoolean("enable.verbose.logging", true);
this.enableStatTracking = props.getBoolean("enable.stat.tracking", true);
this.enableServerRouting = props.getBoolean("enable.server.routing", true);
this.enableMetadataChecking = props.getBoolean("enable.metadata.checking", true);
this.enableRedirectRouting = props.getBoolean("enable.redirect.routing", true);
this.enableGossip = props.getBoolean("enable.gossip", false);
this.enableRebalanceService = props.getBoolean("enable.rebalancing", true);
this.gossipInterval = props.getInt("gossip.interval.ms", 30 * 1000);
this.pusherPollMs = props.getInt("pusher.poll.ms", 2 * 60 * 1000);
this.schedulerThreads = props.getInt("scheduler.threads", 6);
this.numCleanupPermits = props.getInt("num.cleanup.permits", 1);
this.storageConfigurations = props.getList("storage.configs",
ImmutableList.of(BdbStorageConfiguration.class.getName(),
MysqlStorageConfiguration.class.getName(),
InMemoryStorageConfiguration.class.getName(),
CacheStorageConfiguration.class.getName(),
ReadOnlyStorageConfiguration.class.getName()));
// start at midnight (0-23)
this.retentionCleanupFirstStartTimeInHour = props.getInt("retention.cleanup.first.start.hour",
0);
// repeat every 24 hours
this.retentionCleanupScheduledPeriodInHour = props.getInt("retention.cleanup.period.hours",
24);
// save props for access from plugins
this.allProps = props;
String requestFormatName = props.getString("request.format",
RequestFormatType.VOLDEMORT_V1.getCode());
this.requestFormatType = RequestFormatType.fromCode(requestFormatName);
// rebalancing parameters
this.maxRebalancingAttempt = props.getInt("max.rebalancing.attempts", 3);
this.rebalancingTimeoutInSeconds = props.getInt("rebalancing.timeout.seconds", 60 * 60);
this.rebalancingServicePeriod = props.getInt("rebalancing.service.period.ms", 1000);
this.maxParallelStoresRebalancing = props.getInt("max.parallel.stores.rebalancing", 3);
this.failureDetectorImplementation = props.getString("failuredetector.implementation",
FailureDetectorConfig.DEFAULT_IMPLEMENTATION_CLASS_NAME);
// We're changing the property from "client.node.bannage.ms" to
// "failuredetector.bannage.period" so if we have the old one, migrate
// it over.
if(props.containsKey("client.node.bannage.ms")
&& !props.containsKey("failuredetector.bannage.period")) {
props.put("failuredetector.bannage.period", props.get("client.node.bannage.ms"));
}
this.failureDetectorBannagePeriod = props.getLong("failuredetector.bannage.period",
FailureDetectorConfig.DEFAULT_BANNAGE_PERIOD);
this.failureDetectorThreshold = props.getInt("failuredetector.threshold",
FailureDetectorConfig.DEFAULT_THRESHOLD);
this.failureDetectorThresholdCountMinimum = props.getInt("failuredetector.threshold.countminimum",
FailureDetectorConfig.DEFAULT_THRESHOLD_COUNT_MINIMUM);
this.failureDetectorThresholdInterval = props.getLong("failuredetector.threshold.interval",
FailureDetectorConfig.DEFAULT_THRESHOLD_INTERVAL);
this.failureDetectorAsyncRecoveryInterval = props.getLong("failuredetector.asyncrecovery.interval",
FailureDetectorConfig.DEFAULT_ASYNC_RECOVERY_INTERVAL);
this.failureDetectorCatastrophicErrorTypes = props.getList("failuredetector.catastrophic.error.types",
FailureDetectorConfig.DEFAULT_CATASTROPHIC_ERROR_TYPES);
this.failureDetectorRequestLengthThreshold = props.getLong("failuredetector.request.length.threshold",
getSocketTimeoutMs());
// network class loader disable by default.
this.enableNetworkClassLoader = props.getBoolean("enable.network.classloader", false);
validateParams();
}
private void validateParams() {
if(coreThreads < 0)
throw new IllegalArgumentException("core.threads cannot be less than 1");
else if(coreThreads > maxThreads)
throw new IllegalArgumentException("core.threads cannot be greater than max.threads.");
if(maxThreads < 1)
throw new ConfigurationException("max.threads cannot be less than 1.");
if(pusherPollMs < 1)
throw new ConfigurationException("pusher.poll.ms cannot be less than 1.");
if(socketTimeoutMs < 0)
throw new ConfigurationException("socket.timeout.ms must be 0 or more ms.");
if(clientRoutingTimeoutMs < 0)
throw new ConfigurationException("routing.timeout.ms must be 0 or more ms.");
if(schedulerThreads < 1)
throw new ConfigurationException("Must have at least 1 scheduler thread, "
+ this.schedulerThreads + " set.");
if(enableServerRouting && !enableSocketServer)
throw new ConfigurationException("Server-side routing is enabled, this requires the socket server to also be enabled.");
}
private int getIntEnvVariable(String name) {
String var = System.getenv(name);
if(var == null)
throw new ConfigurationException("The environment variable " + name
+ " is not defined.");
try {
return Integer.parseInt(var);
} catch(NumberFormatException e) {
throw new ConfigurationException("Invalid format for environment variable " + name
+ ", expecting an integer.", e);
}
}
public static VoldemortConfig loadFromEnvironmentVariable() {
String voldemortHome = System.getenv(VoldemortConfig.VOLDEMORT_HOME_VAR_NAME);
if(voldemortHome == null)
throw new ConfigurationException("No environment variable "
+ VoldemortConfig.VOLDEMORT_HOME_VAR_NAME
+ " has been defined, set it!");
return loadFromVoldemortHome(voldemortHome);
}
public static VoldemortConfig loadFromVoldemortHome(String voldemortHome) {
if(!Utils.isReadableDir(voldemortHome))
throw new ConfigurationException("Attempt to load configuration from VOLDEMORT_HOME, "
+ voldemortHome
+ " failed. That is not a readable directory.");
String propertiesFile = voldemortHome + File.separator + "config" + File.separator
+ "server.properties";
if(!Utils.isReadableFile(propertiesFile))
throw new ConfigurationException(propertiesFile
+ " is not a readable configuration file.");
Props properties = null;
try {
properties = new Props(new File(propertiesFile));
properties.put("voldemort.home", voldemortHome);
} catch(IOException e) {
throw new ConfigurationException(e);
}
return new VoldemortConfig(properties);
}
/**
* The node id given by "node.id" property default: VOLDEMORT_NODE_ID
* environment variable
*/
public int getNodeId() {
return nodeId;
}
public void setNodeId(int nodeId) {
this.nodeId = nodeId;
}
/**
* The node id given by "voldemort.home" default: VOLDEMORT_HOME environment
* variable
*/
public String getVoldemortHome() {
return voldemortHome;
}
public void setVoldemortHome(String voldemortHome) {
this.voldemortHome = voldemortHome;
}
/**
* The directory name given by "data.directory" default: voldemort.home/data
*/
public String getDataDirectory() {
return dataDirectory;
}
public void setDataDirectory(String dataDirectory) {
this.dataDirectory = dataDirectory;
}
/**
* The directory name given by "metadata.directory" default:
* voldemort.home/config
*/
public String getMetadataDirectory() {
return metadataDirectory;
}
public void setMetadataDirectory(String metadataDirectory) {
this.metadataDirectory = metadataDirectory;
}
/**
* The cache size given by "bdb.cache.size" in bytes default: 200MB
*/
public long getBdbCacheSize() {
return bdbCacheSize;
}
public void setBdbCacheSize(int bdbCacheSize) {
this.bdbCacheSize = bdbCacheSize;
}
/**
* Given by "bdb.flush.transactions". If true then sync transactions to disk
* immediately. default: false
*/
public boolean isBdbFlushTransactionsEnabled() {
return bdbFlushTransactions;
}
public void setBdbFlushTransactions(boolean bdbSyncTransactions) {
this.bdbFlushTransactions = bdbSyncTransactions;
}
/**
* The directory in which bdb data is stored. Given by "bdb.data.directory"
* default: data.directory/bdb
*/
public String getBdbDataDirectory() {
return bdbDataDirectory;
}
public void setBdbDataDirectory(String bdbDataDirectory) {
this.bdbDataDirectory = bdbDataDirectory;
}
/**
* The maximum size of a single .jdb log file in bytes. Given by
* "bdb.max.logfile.size" default: 60MB
*/
public long getBdbMaxLogFileSize() {
return this.bdbMaxLogFileSize;
}
public void setBdbMaxLogFileSize(long bdbMaxLogFileSize) {
this.bdbMaxLogFileSize = bdbMaxLogFileSize;
}
/**
* A log file will be cleaned if its utilization percentage is below this
* value, irrespective of total utilization.
*
* <ul>
* <li>property: "bdb.cleaner.minFileUtilization"</li>
* <li>default: 5</li>
* <li>minimum: 0</li>
* <li>maximum: 50</li>
* </ul>
*/
public int getBdbCleanerMinFileUtilization() {
return bdbCleanerMinFileUtilization;
}
public final void setBdbCleanerMinFileUtilization(int minFileUtilization) {
if(minFileUtilization < 0 || minFileUtilization > 50)
throw new IllegalArgumentException("minFileUtilization should be between 0 and 50 (both inclusive)");
this.bdbCleanerMinFileUtilization = minFileUtilization;
}
/**
*
* The cleaner will keep the total disk space utilization percentage above
* this value.
*
* <ul>
* <li>property: "bdb.cleaner.minUtilization"</li>
* <li>default: 50</li>
* <li>minimum: 0</li>
* <li>maximum: 90</li>
* </ul>
*/
public int getBdbCleanerMinUtilization() {
return bdbCleanerMinUtilization;
}
public final void setBdbCleanerMinUtilization(int minUtilization) {
if(minUtilization < 0 || minUtilization > 90)
throw new IllegalArgumentException("minUtilization should be between 0 and 90 (both inclusive)");
this.bdbCleanerMinUtilization = minUtilization;
}
/**
*
* The btree node fanout. Given by "bdb.btree.fanout". default: 512
*/
public int getBdbBtreeFanout() {
return this.bdbBtreeFanout;
}
public void setBdbBtreeFanout(int bdbBtreeFanout) {
this.bdbBtreeFanout = bdbBtreeFanout;
}
/**
* Do we preload the cursor or not? The advantage of preloading for cursor
* is faster streaming performance, as entries are fetched in disk order.
* Incidentally, pre-loading is only a side-effect of what we're really
* trying to do: fetch in disk (as opposed to key) order, but there doesn't
* seem to be an easy/intuitive way to do for BDB JE.
*/
public boolean getBdbCursorPreload() {
return this.bdbCursorPreload;
}
public void setBdbCursorPreload(boolean bdbCursorPreload) {
this.bdbCursorPreload = bdbCursorPreload;
}
/**
* The comfortable number of threads the threadpool will attempt to
* maintain. Specified by "core.threads" default: max(1, floor(0.5 *
* max.threads))
*/
public int getCoreThreads() {
return coreThreads;
}
public void setCoreThreads(int coreThreads) {
this.coreThreads = coreThreads;
}
/**
* The maximum number of threadpool threads set by "max.threads" default:
* 100
*/
public int getMaxThreads() {
return maxThreads;
}
public void setMaxThreads(int maxThreads) {
this.maxThreads = maxThreads;
}
public int getAdminCoreThreads() {
return adminCoreThreads;
}
public void setAdminCoreThreads(int coreThreads) {
this.adminCoreThreads = coreThreads;
}
public int getAdminMaxThreads() {
return adminMaxThreads;
}
public void setAdminMaxThreads(int maxThreads) {
this.adminMaxThreads = maxThreads;
}
public boolean isHttpServerEnabled() {
return enableHttpServer;
}
public void setEnableHttpServer(boolean enableHttpServer) {
this.enableHttpServer = enableHttpServer;
}
public boolean isSocketServerEnabled() {
return enableSocketServer;
}
public void setAdminServerEnabled(boolean enableSocketServer) {
this.enableSocketServer = enableSocketServer;
}
public boolean isAdminServerEnabled() {
return enableAdminServer;
}
public long getStreamMaxReadBytesPerSec() {
return streamMaxReadBytesPerSec;
}
public void setStreamMaxReadBytesPerSec(long streamMaxReadBytesPerSec) {
this.streamMaxReadBytesPerSec = streamMaxReadBytesPerSec;
}
public long getStreamMaxWriteBytesPerSec() {
return streamMaxWriteBytesPerSec;
}
public void setStreamMaxWriteBytesPerSec(long streamMaxWriteBytesPerSec) {
this.streamMaxWriteBytesPerSec = streamMaxWriteBytesPerSec;
}
public void setEnableAdminServer(boolean enableAdminServer) {
this.enableAdminServer = enableAdminServer;
}
public boolean isJmxEnabled() {
return enableJmx;
}
public void setEnableJmx(boolean enableJmx) {
this.enableJmx = enableJmx;
}
public long getPusherPollMs() {
return pusherPollMs;
}
public boolean isGuiEnabled() {
return enableGui;
}
public void setEnableGui(boolean enableGui) {
this.enableGui = enableGui;
}
public String getMysqlUsername() {
return mysqlUsername;
}
public void setMysqlUsername(String mysqlUsername) {
this.mysqlUsername = mysqlUsername;
}
public String getMysqlPassword() {
return mysqlPassword;
}
public void setMysqlPassword(String mysqlPassword) {
this.mysqlPassword = mysqlPassword;
}
public String getMysqlDatabaseName() {
return mysqlDatabaseName;
}
public void setMysqlDatabaseName(String mysqlDatabaseName) {
this.mysqlDatabaseName = mysqlDatabaseName;
}
public String getMysqlHost() {
return mysqlHost;
}
public void setMysqlHost(String mysqlHost) {
this.mysqlHost = mysqlHost;
}
public int getMysqlPort() {
return mysqlPort;
}
public void setMysqlPort(int mysqlPort) {
this.mysqlPort = mysqlPort;
}
public String getSlopStoreType() {
return slopStoreType;
}
public void setSlopStoreType(String slopStoreType) {
this.slopStoreType = slopStoreType;
}
public int getSocketTimeoutMs() {
return this.socketTimeoutMs;
}
public void setSocketTimeoutMs(int socketTimeoutMs) {
this.socketTimeoutMs = socketTimeoutMs;
}
public int getRoutingTimeoutMs() {
return this.clientRoutingTimeoutMs;
}
public void setClientRoutingTimeoutMs(int routingTimeoutMs) {
this.clientRoutingTimeoutMs = routingTimeoutMs;
}
public int getClientMaxConnectionsPerNode() {
return clientMaxConnectionsPerNode;
}
public void setClientMaxConnectionsPerNode(int maxConnectionsPerNode) {
this.clientMaxConnectionsPerNode = maxConnectionsPerNode;
}
public int getClientConnectionTimeoutMs() {
return clientConnectionTimeoutMs;
}
public void setClientConnectionTimeoutMs(int connectionTimeoutMs) {
this.clientConnectionTimeoutMs = connectionTimeoutMs;
}
/**
* @deprecated Use {@link #getFailureDetectorBannagePeriod()} instead
*/
@Deprecated
public int getClientNodeBannageMs() {
return (int) failureDetectorBannagePeriod;
}
/**
* @deprecated Use {@link #setFailureDetectorBannagePeriod(long)} instead
*/
@Deprecated
public void setClientNodeBannageMs(int nodeBannageMs) {
this.failureDetectorBannagePeriod = nodeBannageMs;
}
public int getClientMaxThreads() {
return clientMaxThreads;
}
public void setClientMaxThreads(int clientMaxThreads) {
this.clientMaxThreads = clientMaxThreads;
}
public int getClientThreadIdleMs() {
return clientThreadIdleMs;
}
public void setClientThreadIdleMs(int clientThreadIdleMs) {
this.clientThreadIdleMs = clientThreadIdleMs;
}
public int getClientMaxQueuedRequests() {
return clientMaxQueuedRequests;
}
public void setClientMaxQueuedRequests(int clientMaxQueuedRequests) {
this.clientMaxQueuedRequests = clientMaxQueuedRequests;
}
public boolean isSlopEnabled() {
return this.enableSlop;
}
public void setEnableSlop(boolean enableSlop) {
this.enableSlop = enableSlop;
}
public boolean isVerboseLoggingEnabled() {
return this.enableVerboseLogging;
}
public void setEnableVerboseLogging(boolean enableVerboseLogging) {
this.enableVerboseLogging = enableVerboseLogging;
}
public boolean isStatTrackingEnabled() {
return this.enableStatTracking;
}
public void setEnableStatTracking(boolean enableStatTracking) {
this.enableStatTracking = enableStatTracking;
}
public boolean isMetadataCheckingEnabled() {
return enableMetadataChecking;
}
public void setEnableMetadataChecking(boolean enableMetadataChecking) {
this.enableMetadataChecking = enableMetadataChecking;
}
public boolean isRedirectRoutingEnabled() {
return enableRedirectRouting;
}
public void setEnableRedirectRouting(boolean enableRedirectRouting) {
this.enableRedirectRouting = enableRedirectRouting;
}
public long getBdbCheckpointBytes() {
return this.bdbCheckpointBytes;
}
public void setBdbCheckpointBytes(long bdbCheckpointBytes) {
this.bdbCheckpointBytes = bdbCheckpointBytes;
}
public long getBdbCheckpointMs() {
return this.bdbCheckpointMs;
}
public void setBdbCheckpointMs(long bdbCheckpointMs) {
this.bdbCheckpointMs = bdbCheckpointMs;
}
public int getSchedulerThreads() {
return schedulerThreads;
}
public void setSchedulerThreads(int schedulerThreads) {
this.schedulerThreads = schedulerThreads;
}
public String getReadOnlyDataStorageDirectory() {
return this.readOnlyStorageDir;
}
public void setReadOnlyDataStorageDirectory(String readOnlyStorageDir) {
this.readOnlyStorageDir = readOnlyStorageDir;
}
public int getReadOnlyBackups() {
return readOnlyBackups;
}
public void setReadOnlyBackups(int readOnlyBackups) {
this.readOnlyBackups = readOnlyBackups;
}
public boolean isBdbWriteTransactionsEnabled() {
return bdbWriteTransactions;
}
public void setBdbWriteTransactions(boolean bdbWriteTransactions) {
this.bdbWriteTransactions = bdbWriteTransactions;
}
public boolean isBdbSortedDuplicatesEnabled() {
return this.bdbSortedDuplicates;
}
public void setBdbSortedDuplicates(boolean enable) {
this.bdbSortedDuplicates = enable;
}
public void setBdbOneEnvPerStore(boolean bdbOneEnvPerStore) {
this.bdbOneEnvPerStore = bdbOneEnvPerStore;
}
public boolean isBdbOneEnvPerStore() {
return bdbOneEnvPerStore;
}
public int getSocketBufferSize() {
return socketBufferSize;
}
public void setSocketBufferSize(int socketBufferSize) {
this.socketBufferSize = socketBufferSize;
}
public boolean getSocketKeepAlive() {
return this.socketKeepAlive;
}
public void setSocketKeepAlive(boolean on) {
this.socketKeepAlive = on;
}
public boolean getUseNioConnector() {
return this.useNioConnector;
}
public void setUseNioConnector(boolean useNio) {
this.useNioConnector = useNio;
}
public int getNioConnectorSelectors() {
return nioConnectorSelectors;
}
public void setNioConnectorSelectors(int nioConnectorSelectors) {
this.nioConnectorSelectors = nioConnectorSelectors;
}
public int getNioAdminConnectorSelectors() {
return nioAdminConnectorSelectors;
}
public void setNioAdminConnectorSelectors(int nioAdminConnectorSelectors) {
this.nioAdminConnectorSelectors = nioAdminConnectorSelectors;
}
public int getAdminSocketBufferSize() {
return adminStreamBufferSize;
}
public void setAdminSocketBufferSize(int socketBufferSize) {
this.adminStreamBufferSize = socketBufferSize;
}
public List<String> getStorageConfigurations() {
return storageConfigurations;
}
public void setStorageConfigurations(List<String> storageConfigurations) {
this.storageConfigurations = storageConfigurations;
}
public Props getAllProps() {
return this.allProps;
}
public void setRequestFormatType(RequestFormatType type) {
this.requestFormatType = type;
}
public RequestFormatType getRequestFormatType() {
return this.requestFormatType;
}
public boolean isServerRoutingEnabled() {
return this.enableServerRouting;
}
public void setEnableServerRouting(boolean enableServerRouting) {
this.enableServerRouting = enableServerRouting;
}
public int getNumCleanupPermits() {
return numCleanupPermits;
}
public void setNumCleanupPermits(int numCleanupPermits) {
this.numCleanupPermits = numCleanupPermits;
}
public String getFailureDetectorImplementation() {
return failureDetectorImplementation;
}
public void setFailureDetectorImplementation(String failureDetectorImplementation) {
this.failureDetectorImplementation = failureDetectorImplementation;
}
public long getFailureDetectorBannagePeriod() {
return failureDetectorBannagePeriod;
}
public void setFailureDetectorBannagePeriod(long failureDetectorBannagePeriod) {
this.failureDetectorBannagePeriod = failureDetectorBannagePeriod;
}
public int getFailureDetectorThreshold() {
return failureDetectorThreshold;
}
public void setFailureDetectorThreshold(int failureDetectorThreshold) {
this.failureDetectorThreshold = failureDetectorThreshold;
}
public int getFailureDetectorThresholdCountMinimum() {
return failureDetectorThresholdCountMinimum;
}
public void setFailureDetectorThresholdCountMinimum(int failureDetectorThresholdCountMinimum) {
this.failureDetectorThresholdCountMinimum = failureDetectorThresholdCountMinimum;
}
public long getFailureDetectorThresholdInterval() {
return failureDetectorThresholdInterval;