17
17
package org .apache .rocketmq .store .config ;
18
18
19
19
import java .io .File ;
20
+
20
21
import org .apache .rocketmq .common .annotation .ImportantField ;
21
22
import org .apache .rocketmq .store .ConsumeQueue ;
22
23
import org .apache .rocketmq .store .queue .BatchConsumeQueue ;
@@ -38,8 +39,7 @@ public class MessageStoreConfig {
38
39
39
40
//The directory in which the epochFile is kept
40
41
@ ImportantField
41
- private String storePathEpochFile = System .getProperty ("user.home" ) + File .separator + "store"
42
- + File .separator + "epochFileCheckpoint" ;
42
+ private String storePathEpochFile = null ;
43
43
44
44
private String readOnlyCommitLogStorePaths = null ;
45
45
@@ -81,8 +81,8 @@ public class MessageStoreConfig {
81
81
/**
82
82
* 1. Register to broker after (startTime + disappearTimeAfterStart)
83
83
* 2. Internal msg exchange will start after (startTime + disappearTimeAfterStart)
84
- * A. PopReviveService
85
- * B. TimerDequeueGetService
84
+ * A. PopReviveService
85
+ * B. TimerDequeueGetService
86
86
*/
87
87
@ ImportantField
88
88
private int disappearTimeAfterStart = -1 ;
@@ -627,6 +627,9 @@ public void setStorePathDLedgerCommitLog(String storePathDLedgerCommitLog) {
627
627
}
628
628
629
629
public String getStorePathEpochFile () {
630
+ if (storePathEpochFile == null ) {
631
+ return storePathRootDir + File .separator + "epochFileCheckpoint" ;
632
+ }
630
633
return storePathEpochFile ;
631
634
}
632
635
@@ -1067,6 +1070,7 @@ public String getReadOnlyCommitLogStorePaths() {
1067
1070
public void setReadOnlyCommitLogStorePaths (String readOnlyCommitLogStorePaths ) {
1068
1071
this .readOnlyCommitLogStorePaths = readOnlyCommitLogStorePaths ;
1069
1072
}
1073
+
1070
1074
public String getdLegerGroup () {
1071
1075
return dLegerGroup ;
1072
1076
}
@@ -1470,13 +1474,15 @@ public void setAsyncLearner(boolean asyncLearner) {
1470
1474
public int getMappedFileSizeTimerLog () {
1471
1475
return mappedFileSizeTimerLog ;
1472
1476
}
1477
+
1473
1478
public void setMappedFileSizeTimerLog (final int mappedFileSizeTimerLog ) {
1474
1479
this .mappedFileSizeTimerLog = mappedFileSizeTimerLog ;
1475
1480
}
1476
1481
1477
1482
public int getTimerPrecisionMs () {
1478
1483
return timerPrecisionMs ;
1479
1484
}
1485
+
1480
1486
public void setTimerPrecisionMs (int timerPrecisionMs ) {
1481
1487
int [] candidates = {100 , 200 , 500 , 1000 };
1482
1488
for (int i = 1 ; i < candidates .length ; i ++) {
@@ -1487,9 +1493,11 @@ public void setTimerPrecisionMs(int timerPrecisionMs) {
1487
1493
}
1488
1494
this .timerPrecisionMs = candidates [candidates .length - 1 ];
1489
1495
}
1496
+
1490
1497
public int getTimerRollWindowSlot () {
1491
1498
return timerRollWindowSlot ;
1492
1499
}
1500
+
1493
1501
public int getTimerGetMessageThreadNum () {
1494
1502
return timerGetMessageThreadNum ;
1495
1503
}
@@ -1501,9 +1509,11 @@ public void setTimerGetMessageThreadNum(int timerGetMessageThreadNum) {
1501
1509
public int getTimerPutMessageThreadNum () {
1502
1510
return timerPutMessageThreadNum ;
1503
1511
}
1512
+
1504
1513
public void setTimerPutMessageThreadNum (int timerPutMessageThreadNum ) {
1505
1514
this .timerPutMessageThreadNum = timerPutMessageThreadNum ;
1506
1515
}
1516
+
1507
1517
public boolean isTimerEnableDisruptor () {
1508
1518
return timerEnableDisruptor ;
1509
1519
}
@@ -1515,12 +1525,15 @@ public boolean isTimerEnableCheckMetrics() {
1515
1525
public void setTimerEnableCheckMetrics (boolean timerEnableCheckMetrics ) {
1516
1526
this .timerEnableCheckMetrics = timerEnableCheckMetrics ;
1517
1527
}
1528
+
1518
1529
public boolean isTimerStopEnqueue () {
1519
1530
return timerStopEnqueue ;
1520
1531
}
1532
+
1521
1533
public void setTimerStopEnqueue (boolean timerStopEnqueue ) {
1522
1534
this .timerStopEnqueue = timerStopEnqueue ;
1523
1535
}
1536
+
1524
1537
public String getTimerCheckMetricsWhen () {
1525
1538
return timerCheckMetricsWhen ;
1526
1539
}
@@ -1533,9 +1546,10 @@ public boolean isTimerWarmEnable() {
1533
1546
return timerWarmEnable ;
1534
1547
}
1535
1548
1536
- public boolean isTimerWheelEnable () {
1549
+ public boolean isTimerWheelEnable () {
1537
1550
return timerWheelEnable ;
1538
1551
}
1552
+
1539
1553
public void setTimerWheelEnable (boolean timerWheelEnable ) {
1540
1554
this .timerWheelEnable = timerWheelEnable ;
1541
1555
}
@@ -1555,20 +1569,24 @@ public void setTimerMetricSmallThreshold(int timerMetricSmallThreshold) {
1555
1569
public int getTimerCongestNumEachSlot () {
1556
1570
return timerCongestNumEachSlot ;
1557
1571
}
1572
+
1558
1573
public void setTimerCongestNumEachSlot (int timerCongestNumEachSlot ) {
1559
1574
// In order to get this value from messageStoreConfig properties file created before v4.4.1.
1560
1575
this .timerCongestNumEachSlot = timerCongestNumEachSlot ;
1561
1576
}
1577
+
1562
1578
public int getTimerFlushIntervalMs () {
1563
1579
return timerFlushIntervalMs ;
1564
1580
}
1565
1581
1566
1582
public void setTimerFlushIntervalMs (final int timerFlushIntervalMs ) {
1567
1583
this .timerFlushIntervalMs = timerFlushIntervalMs ;
1568
1584
}
1585
+
1569
1586
public void setTimerRollWindowSlot (final int timerRollWindowSlot ) {
1570
1587
this .timerRollWindowSlot = timerRollWindowSlot ;
1571
1588
}
1589
+
1572
1590
public int getTimerProgressLogIntervalMs () {
1573
1591
return timerProgressLogIntervalMs ;
1574
1592
}
@@ -1588,6 +1606,7 @@ public void setTimerInterceptDelayLevel(boolean timerInterceptDelayLevel) {
1588
1606
public int getTimerMaxDelaySec () {
1589
1607
return timerMaxDelaySec ;
1590
1608
}
1609
+
1591
1610
public void setTimerMaxDelaySec (final int timerMaxDelaySec ) {
1592
1611
this .timerMaxDelaySec = timerMaxDelaySec ;
1593
1612
}
0 commit comments