提交 e5892e16 编写于 作者: W Willem Jiang

[ROCKETMQ-9] Clean up the code

上级 d1fa8694
......@@ -484,10 +484,10 @@ public class MappedFileQueue {
try {
return this.mappedFiles.get(index);
} catch (Exception e) {
if (returnFirstOnNotFound)
if (returnFirstOnNotFound) {
return mappedFile;
LOG_ERROR.warn("findMappedFileByOffset failure. {}", UtilAll.currentStackTrace());
}
LOG_ERROR.warn("findMappedFileByOffset failure. ", e);
}
}
} catch (Exception e) {
......
......@@ -279,7 +279,7 @@ public class IndexService {
*
* @return {@link IndexFile} or null on failure.
*/
private IndexFile retryGetAndCreateIndexFile() {
public IndexFile retryGetAndCreateIndexFile() {
IndexFile indexFile = null;
for (int times = 0; null == indexFile && times < MAX_TRY_IDX_CREATE; times++) {
......@@ -288,7 +288,7 @@ public class IndexService {
break;
try {
log.error("Tried to create index file " + times + " times");
log.info("Tried to create index file " + times + " times");
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
......
......@@ -20,6 +20,7 @@
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{5} - %msg%n</pattern>
<charset class="java.nio.charset.Charset">UTF-8</charset>
</encoder>
</appender>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册