Repository: incubator-rocketmq Updated Branches: refs/heads/develop ffad6566b -> 97aa813eb
http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/7f96008c/store/src/main/java/org/apache/rocketmq/store/ha/HAService.java ---------------------------------------------------------------------- diff --git a/store/src/main/java/org/apache/rocketmq/store/ha/HAService.java b/store/src/main/java/org/apache/rocketmq/store/ha/HAService.java index f507b36..6fc7335 100644 --- a/store/src/main/java/org/apache/rocketmq/store/ha/HAService.java +++ b/store/src/main/java/org/apache/rocketmq/store/ha/HAService.java @@ -85,9 +85,7 @@ public class HAService { return result; } - /** - */ public void notifyTransferSome(final long offset) { for (long value = this.push2SlaveMaxOffset.get(); offset > value; ) { boolean ok = this.push2SlaveMaxOffset.compareAndSet(value, offset); @@ -374,17 +372,6 @@ public class HAService { return !this.reportOffset.hasRemaining(); } - // private void reallocateByteBuffer() { - // ByteBuffer bb = ByteBuffer.allocate(READ_MAX_BUFFER_SIZE); - // int remain = this.byteBufferRead.limit() - this.dispatchPostion; - // bb.put(this.byteBufferRead.array(), this.dispatchPostion, remain); - // this.dispatchPostion = 0; - // this.byteBufferRead = bb; - // } - - /** - - */ private void reallocateByteBuffer() { int remain = READ_MAX_BUFFER_SIZE - this.dispatchPostion; if (remain > 0) { @@ -426,7 +413,6 @@ public class HAService { break; } } else { - // TODO ERROR log.info("HAClient, processReadEvent read socket < 0"); return false; } @@ -598,8 +584,6 @@ public class HAService { log.info(this.getServiceName() + " service end"); } - - // // private void disableWriteFlag() { // if (this.socketChannel != null) { // SelectionKey sk = this.socketChannel.keyFor(this.selector); @@ -610,8 +594,6 @@ public class HAService { // } // } // } - // - // // private void enableWriteFlag() { // if (this.socketChannel != null) { // SelectionKey sk = this.socketChannel.keyFor(this.selector); http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/7f96008c/store/src/main/java/org/apache/rocketmq/store/index/IndexFile.java ---------------------------------------------------------------------- diff --git a/store/src/main/java/org/apache/rocketmq/store/index/IndexFile.java b/store/src/main/java/org/apache/rocketmq/store/index/IndexFile.java index 54f5732..862e620 100644 --- a/store/src/main/java/org/apache/rocketmq/store/index/IndexFile.java +++ b/store/src/main/java/org/apache/rocketmq/store/index/IndexFile.java @@ -208,7 +208,6 @@ public class IndexFile { if (slotValue <= invalidIndex || slotValue > this.indexHeader.getIndexCount() || this.indexHeader.getIndexCount() <= 1) { - // TODO NOTFOUND } else { for (int nextIndexToRead = slotValue;;) { if (phyOffsets.size() >= maxNum) { http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/7f96008c/store/src/main/java/org/apache/rocketmq/store/index/IndexHeader.java ---------------------------------------------------------------------- diff --git a/store/src/main/java/org/apache/rocketmq/store/index/IndexHeader.java b/store/src/main/java/org/apache/rocketmq/store/index/IndexHeader.java index 5102a21..3195448 100644 --- a/store/src/main/java/org/apache/rocketmq/store/index/IndexHeader.java +++ b/store/src/main/java/org/apache/rocketmq/store/index/IndexHeader.java @@ -20,11 +20,7 @@ import java.nio.ByteBuffer; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; -/** - * - * - */ public class IndexHeader { public static final int INDEX_HEADER_SIZE = 40; private static int beginTimestampIndex = 0; http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/7f96008c/store/src/main/java/org/apache/rocketmq/store/schedule/ScheduleMessageService.java ---------------------------------------------------------------------- diff --git a/store/src/main/java/org/apache/rocketmq/store/schedule/ScheduleMessageService.java b/store/src/main/java/org/apache/rocketmq/store/schedule/ScheduleMessageService.java index 25640a4..35b8e85 100644 --- a/store/src/main/java/org/apache/rocketmq/store/schedule/ScheduleMessageService.java +++ b/store/src/main/java/org/apache/rocketmq/store/schedule/ScheduleMessageService.java @@ -336,10 +336,7 @@ public class ScheduleMessageService extends ConfigManager { } } // end of if (bufferCQ != null) else { - /* - - */ long cqMinOffset = cq.getMinOffsetInQueue(); if (offset < cqMinOffset) { failScheduleOffset = cqMinOffset; http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/7f96008c/store/src/main/java/org/apache/rocketmq/store/stats/BrokerStats.java ---------------------------------------------------------------------- diff --git a/store/src/main/java/org/apache/rocketmq/store/stats/BrokerStats.java b/store/src/main/java/org/apache/rocketmq/store/stats/BrokerStats.java index 5555b8b..64b4097 100644 --- a/store/src/main/java/org/apache/rocketmq/store/stats/BrokerStats.java +++ b/store/src/main/java/org/apache/rocketmq/store/stats/BrokerStats.java @@ -38,9 +38,7 @@ public class BrokerStats { this.defaultMessageStore = defaultMessageStore; } - /** - */ public void record() { this.msgPutTotalYesterdayMorning = this.msgPutTotalTodayMorning; this.msgGetTotalYesterdayMorning = this.msgGetTotalTodayMorning; http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/7f96008c/tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java ---------------------------------------------------------------------- diff --git a/tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java b/tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java index 157ae21..12aea8a 100644 --- a/tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java +++ b/tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java @@ -119,7 +119,7 @@ public class DefaultMQAdminExtImpl implements MQAdminExt, MQAdminExtInner { if (!registerOK) { this.serviceState = ServiceState.CREATE_JUST; throw new MQClientException("The adminExt group[" + this.defaultMQAdminExt.getAdminExtGroup() - + "] has created already, specifed another name please."// + + "] has created already, specifed another name please." + FAQUrl.suggestTodo(FAQUrl.GROUP_NAME_DUPLICATE_URL), null); } @@ -132,8 +132,8 @@ public class DefaultMQAdminExtImpl implements MQAdminExt, MQAdminExtInner { case RUNNING: case START_FAILED: case SHUTDOWN_ALREADY: - throw new MQClientException("The AdminExt service state not OK, maybe started once, "// - + this.serviceState// + throw new MQClientException("The AdminExt service state not OK, maybe started once, " + + this.serviceState + FAQUrl.suggestTodo(FAQUrl.CLIENT_SERVICE_NOT_OK), null); default: break; @@ -185,13 +185,11 @@ public class DefaultMQAdminExtImpl implements MQAdminExt, MQAdminExtInner { @Override public SubscriptionGroupConfig examineSubscriptionGroupConfig(String addr, String group) { - // TODO Auto-generated method stub return null; } @Override public TopicConfig examineTopicConfig(String addr, String topic) { - // TODO Auto-generated method stub return null; } @@ -344,8 +342,6 @@ public class DefaultMQAdminExtImpl implements MQAdminExt, MQAdminExtInner { @Override public void putKVConfig(String namespace, String key, String value) { - // TODO Auto-generated method stub - } @Override http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/7f96008c/tools/src/main/java/org/apache/rocketmq/tools/command/message/PrintMessageSubCommand.java ---------------------------------------------------------------------- diff --git a/tools/src/main/java/org/apache/rocketmq/tools/command/message/PrintMessageSubCommand.java b/tools/src/main/java/org/apache/rocketmq/tools/command/message/PrintMessageSubCommand.java index ac48519..d46d6fb 100644 --- a/tools/src/main/java/org/apache/rocketmq/tools/command/message/PrintMessageSubCommand.java +++ b/tools/src/main/java/org/apache/rocketmq/tools/command/message/PrintMessageSubCommand.java @@ -51,7 +51,6 @@ public class PrintMessageSubCommand implements SubCommand { System.out.printf("MSGID: %s %s BODY: %s%n", msg.getMsgId(), msg.toString(), printBody ? new String(msg.getBody(), charsetName) : "NOT PRINT BODY"); } catch (UnsupportedEncodingException e) { - // } } } @@ -108,10 +107,10 @@ public class PrintMessageSubCommand implements SubCommand { try { String topic = commandLine.getOptionValue('t').trim(); - String charsetName = // + String charsetName = !commandLine.hasOption('c') ? "UTF-8" : commandLine.getOptionValue('c').trim(); - String subExpression = // + String subExpression = !commandLine.hasOption('s') ? "*" : commandLine.getOptionValue('s').trim(); boolean printBody = !commandLine.hasOption('d') || Boolean.parseBoolean(commandLine.getOptionValue('d').trim());