16
16
*/
17
17
package org .apache .rocketmq .store ;
18
18
19
- import java .nio .ByteBuffer ;
20
- import java .util .ArrayList ;
21
- import java .util .HashMap ;
22
- import java .util .List ;
23
- import java .util .Map ;
24
- import java .util .concurrent .CountDownLatch ;
25
- import java .util .concurrent .TimeUnit ;
26
19
import org .apache .rocketmq .common .ServiceThread ;
27
20
import org .apache .rocketmq .common .UtilAll ;
28
21
import org .apache .rocketmq .common .constant .LoggerName ;
39
32
import org .slf4j .Logger ;
40
33
import org .slf4j .LoggerFactory ;
41
34
35
+ import java .nio .ByteBuffer ;
36
+ import java .util .ArrayList ;
37
+ import java .util .HashMap ;
38
+ import java .util .List ;
39
+ import java .util .Map ;
40
+ import java .util .concurrent .CountDownLatch ;
41
+ import java .util .concurrent .TimeUnit ;
42
+
42
43
/**
43
44
* Store all metadata downtime for recovery, data protection reliability
44
45
*/
@@ -183,7 +184,7 @@ else if (dispatchRequest.isSuccess() && size == 0) {
183
184
index ++;
184
185
if (index >= mappedFiles .size ()) {
185
186
// Current branch can not happen
186
- log .info ("recover last 3 physics file over, last maped file " + mappedFile .getFileName ());
187
+ log .info ("recover last 3 physics file over, last mapped file " + mappedFile .getFileName ());
187
188
break ;
188
189
} else {
189
190
mappedFile = mappedFiles .get (index );
@@ -417,7 +418,7 @@ public void recoverAbnormally() {
417
418
for (; index >= 0 ; index --) {
418
419
mappedFile = mappedFiles .get (index );
419
420
if (this .isMappedFileMatchedRecover (mappedFile )) {
420
- log .info ("recover from this maped file " + mappedFile .getFileName ());
421
+ log .info ("recover from this mapped file " + mappedFile .getFileName ());
421
422
break ;
422
423
}
423
424
}
@@ -459,7 +460,7 @@ else if (size == 0) {
459
460
if (index >= mappedFiles .size ()) {
460
461
// The current branch under normal circumstances should
461
462
// not happen
462
- log .info ("recover physics file over, last maped file " + mappedFile .getFileName ());
463
+ log .info ("recover physics file over, last mapped file " + mappedFile .getFileName ());
463
464
break ;
464
465
} else {
465
466
mappedFile = mappedFiles .get (index );
@@ -585,7 +586,7 @@ public PutMessageResult putMessage(final MessageExtBrokerInner msg) {
585
586
mappedFile = this .mappedFileQueue .getLastMappedFile (0 ); // Mark: NewFile may be cause noise
586
587
}
587
588
if (null == mappedFile ) {
588
- log .error ("create maped file1 error, topic: " + msg .getTopic () + " clientAddr: " + msg .getBornHostString ());
589
+ log .error ("create mapped file1 error, topic: " + msg .getTopic () + " clientAddr: " + msg .getBornHostString ());
589
590
beginTimeInLock = 0 ;
590
591
return new PutMessageResult (PutMessageStatus .CREATE_MAPEDFILE_FAILED , null );
591
592
}
@@ -600,7 +601,7 @@ public PutMessageResult putMessage(final MessageExtBrokerInner msg) {
600
601
mappedFile = this .mappedFileQueue .getLastMappedFile (0 );
601
602
if (null == mappedFile ) {
602
603
// XXX: warn and notify me
603
- log .error ("create maped file2 error, topic: " + msg .getTopic () + " clientAddr: " + msg .getBornHostString ());
604
+ log .error ("create mapped file2 error, topic: " + msg .getTopic () + " clientAddr: " + msg .getBornHostString ());
604
605
beginTimeInLock = 0 ;
605
606
return new PutMessageResult (PutMessageStatus .CREATE_MAPEDFILE_FAILED , result );
606
607
}
@@ -735,7 +736,7 @@ public PutMessageResult putMessages(final MessageExtBatch messageExtBatch) {
735
736
mappedFile = this .mappedFileQueue .getLastMappedFile (0 ); // Mark: NewFile may be cause noise
736
737
}
737
738
if (null == mappedFile ) {
738
- log .error ("Create maped file1 error, topic: {} clientAddr: {}" , messageExtBatch .getTopic (), messageExtBatch .getBornHostString ());
739
+ log .error ("Create mapped file1 error, topic: {} clientAddr: {}" , messageExtBatch .getTopic (), messageExtBatch .getBornHostString ());
739
740
beginTimeInLock = 0 ;
740
741
return new PutMessageResult (PutMessageStatus .CREATE_MAPEDFILE_FAILED , null );
741
742
}
@@ -750,7 +751,7 @@ public PutMessageResult putMessages(final MessageExtBatch messageExtBatch) {
750
751
mappedFile = this .mappedFileQueue .getLastMappedFile (0 );
751
752
if (null == mappedFile ) {
752
753
// XXX: warn and notify me
753
- log .error ("Create maped file2 error, topic: {} clientAddr: {}" , messageExtBatch .getTopic (), messageExtBatch .getBornHostString ());
754
+ log .error ("Create mapped file2 error, topic: {} clientAddr: {}" , messageExtBatch .getTopic (), messageExtBatch .getBornHostString ());
754
755
beginTimeInLock = 0 ;
755
756
return new PutMessageResult (PutMessageStatus .CREATE_MAPEDFILE_FAILED , result );
756
757
}
0 commit comments