提交 c5d9fcb5 编写于 作者: S shtykh_roman

Corrected spellings.

上级 e3f4251c
...@@ -125,7 +125,7 @@ public class BrokerStartup { ...@@ -125,7 +125,7 @@ public class BrokerStartup {
properties = new Properties(); properties = new Properties();
properties.load(in); properties.load(in);
parsePropertie2SystemEnv(properties); properties2SystemEnv(properties);
MixAll.properties2Object(properties, brokerConfig); MixAll.properties2Object(properties, brokerConfig);
MixAll.properties2Object(properties, nettyServerConfig); MixAll.properties2Object(properties, nettyServerConfig);
MixAll.properties2Object(properties, nettyClientConfig); MixAll.properties2Object(properties, nettyClientConfig);
...@@ -212,9 +212,9 @@ public class BrokerStartup { ...@@ -212,9 +212,9 @@ public class BrokerStartup {
log.info("Shutdown hook was invoked, {}", this.shutdownTimes.incrementAndGet()); log.info("Shutdown hook was invoked, {}", this.shutdownTimes.incrementAndGet());
if (!this.hasShutdown) { if (!this.hasShutdown) {
this.hasShutdown = true; this.hasShutdown = true;
long begineTime = System.currentTimeMillis(); long beginTime = System.currentTimeMillis();
controller.shutdown(); controller.shutdown();
long consumingTimeTotal = System.currentTimeMillis() - begineTime; long consumingTimeTotal = System.currentTimeMillis() - beginTime;
log.info("Shutdown hook over, consuming total time(ms): {}", consumingTimeTotal); log.info("Shutdown hook over, consuming total time(ms): {}", consumingTimeTotal);
} }
} }
...@@ -230,10 +230,12 @@ public class BrokerStartup { ...@@ -230,10 +230,12 @@ public class BrokerStartup {
return null; return null;
} }
private static void parsePropertie2SystemEnv(Properties properties) { private static void properties2SystemEnv(Properties properties) {
if (properties == null) { if (properties == null) {
log.info("No properties to set system environment");
return; return;
} }
String rmqAddressServerDomain = properties.getProperty("rmqAddressServerDomain", MixAll.DEFAULT_NAMESRV_ADDR_LOOKUP); String rmqAddressServerDomain = properties.getProperty("rmqAddressServerDomain", MixAll.DEFAULT_NAMESRV_ADDR_LOOKUP);
String rmqAddressServerSubGroup = properties.getProperty("rmqAddressServerSubGroup", "nsaddr"); String rmqAddressServerSubGroup = properties.getProperty("rmqAddressServerSubGroup", "nsaddr");
System.setProperty("rocketmq.namesrv.domain", rmqAddressServerDomain); System.setProperty("rocketmq.namesrv.domain", rmqAddressServerDomain);
......
...@@ -27,7 +27,9 @@ import org.apache.rocketmq.store.GetMessageResult; ...@@ -27,7 +27,9 @@ import org.apache.rocketmq.store.GetMessageResult;
public class ManyMessageTransfer extends AbstractReferenceCounted implements FileRegion { public class ManyMessageTransfer extends AbstractReferenceCounted implements FileRegion {
private final ByteBuffer byteBufferHeader; private final ByteBuffer byteBufferHeader;
private final GetMessageResult getMessageResult; private final GetMessageResult getMessageResult;
private long transfered; // the bytes which was transfered already
/** Bytes which were transferred already. */
private long transferred;
public ManyMessageTransfer(ByteBuffer byteBufferHeader, GetMessageResult getMessageResult) { public ManyMessageTransfer(ByteBuffer byteBufferHeader, GetMessageResult getMessageResult) {
this.byteBufferHeader = byteBufferHeader; this.byteBufferHeader = byteBufferHeader;
...@@ -46,7 +48,7 @@ public class ManyMessageTransfer extends AbstractReferenceCounted implements Fil ...@@ -46,7 +48,7 @@ public class ManyMessageTransfer extends AbstractReferenceCounted implements Fil
@Override @Override
public long transfered() { public long transfered() {
return transfered; return transferred;
} }
@Override @Override
...@@ -57,14 +59,14 @@ public class ManyMessageTransfer extends AbstractReferenceCounted implements Fil ...@@ -57,14 +59,14 @@ public class ManyMessageTransfer extends AbstractReferenceCounted implements Fil
@Override @Override
public long transferTo(WritableByteChannel target, long position) throws IOException { public long transferTo(WritableByteChannel target, long position) throws IOException {
if (this.byteBufferHeader.hasRemaining()) { if (this.byteBufferHeader.hasRemaining()) {
transfered += target.write(this.byteBufferHeader); transferred += target.write(this.byteBufferHeader);
return transfered; return transferred;
} else { } else {
List<ByteBuffer> messageBufferList = this.getMessageResult.getMessageBufferList(); List<ByteBuffer> messageBufferList = this.getMessageResult.getMessageBufferList();
for (ByteBuffer bb : messageBufferList) { for (ByteBuffer bb : messageBufferList) {
if (bb.hasRemaining()) { if (bb.hasRemaining()) {
transfered += target.write(bb); transferred += target.write(bb);
return transfered; return transferred;
} }
} }
} }
......
...@@ -26,7 +26,9 @@ import org.apache.rocketmq.store.SelectMappedBufferResult; ...@@ -26,7 +26,9 @@ import org.apache.rocketmq.store.SelectMappedBufferResult;
public class OneMessageTransfer extends AbstractReferenceCounted implements FileRegion { public class OneMessageTransfer extends AbstractReferenceCounted implements FileRegion {
private final ByteBuffer byteBufferHeader; private final ByteBuffer byteBufferHeader;
private final SelectMappedBufferResult selectMappedBufferResult; private final SelectMappedBufferResult selectMappedBufferResult;
private long transfered; // the bytes which was transfered already
/** Bytes which were transferred already. */
private long transferred;
public OneMessageTransfer(ByteBuffer byteBufferHeader, SelectMappedBufferResult selectMappedBufferResult) { public OneMessageTransfer(ByteBuffer byteBufferHeader, SelectMappedBufferResult selectMappedBufferResult) {
this.byteBufferHeader = byteBufferHeader; this.byteBufferHeader = byteBufferHeader;
...@@ -40,7 +42,7 @@ public class OneMessageTransfer extends AbstractReferenceCounted implements File ...@@ -40,7 +42,7 @@ public class OneMessageTransfer extends AbstractReferenceCounted implements File
@Override @Override
public long transfered() { public long transfered() {
return transfered; return transferred;
} }
@Override @Override
...@@ -51,11 +53,11 @@ public class OneMessageTransfer extends AbstractReferenceCounted implements File ...@@ -51,11 +53,11 @@ public class OneMessageTransfer extends AbstractReferenceCounted implements File
@Override @Override
public long transferTo(WritableByteChannel target, long position) throws IOException { public long transferTo(WritableByteChannel target, long position) throws IOException {
if (this.byteBufferHeader.hasRemaining()) { if (this.byteBufferHeader.hasRemaining()) {
transfered += target.write(this.byteBufferHeader); transferred += target.write(this.byteBufferHeader);
return transfered; return transferred;
} else if (this.selectMappedBufferResult.getByteBuffer().hasRemaining()) { } else if (this.selectMappedBufferResult.getByteBuffer().hasRemaining()) {
transfered += target.write(this.selectMappedBufferResult.getByteBuffer()); transferred += target.write(this.selectMappedBufferResult.getByteBuffer());
return transfered; return transferred;
} }
return 0; return 0;
......
...@@ -27,7 +27,9 @@ import org.apache.rocketmq.store.QueryMessageResult; ...@@ -27,7 +27,9 @@ import org.apache.rocketmq.store.QueryMessageResult;
public class QueryMessageTransfer extends AbstractReferenceCounted implements FileRegion { public class QueryMessageTransfer extends AbstractReferenceCounted implements FileRegion {
private final ByteBuffer byteBufferHeader; private final ByteBuffer byteBufferHeader;
private final QueryMessageResult queryMessageResult; private final QueryMessageResult queryMessageResult;
private long transfered; // the bytes which was transfered already
/** Bytes which were transferred already. */
private long transferred;
public QueryMessageTransfer(ByteBuffer byteBufferHeader, QueryMessageResult queryMessageResult) { public QueryMessageTransfer(ByteBuffer byteBufferHeader, QueryMessageResult queryMessageResult) {
this.byteBufferHeader = byteBufferHeader; this.byteBufferHeader = byteBufferHeader;
...@@ -46,7 +48,7 @@ public class QueryMessageTransfer extends AbstractReferenceCounted implements Fi ...@@ -46,7 +48,7 @@ public class QueryMessageTransfer extends AbstractReferenceCounted implements Fi
@Override @Override
public long transfered() { public long transfered() {
return transfered; return transferred;
} }
@Override @Override
...@@ -57,14 +59,14 @@ public class QueryMessageTransfer extends AbstractReferenceCounted implements Fi ...@@ -57,14 +59,14 @@ public class QueryMessageTransfer extends AbstractReferenceCounted implements Fi
@Override @Override
public long transferTo(WritableByteChannel target, long position) throws IOException { public long transferTo(WritableByteChannel target, long position) throws IOException {
if (this.byteBufferHeader.hasRemaining()) { if (this.byteBufferHeader.hasRemaining()) {
transfered += target.write(this.byteBufferHeader); transferred += target.write(this.byteBufferHeader);
return transfered; return transferred;
} else { } else {
List<ByteBuffer> messageBufferList = this.queryMessageResult.getMessageBufferList(); List<ByteBuffer> messageBufferList = this.queryMessageResult.getMessageBufferList();
for (ByteBuffer bb : messageBufferList) { for (ByteBuffer bb : messageBufferList) {
if (bb.hasRemaining()) { if (bb.hasRemaining()) {
transfered += target.write(bb); transferred += target.write(bb);
return transfered; return transferred;
} }
} }
} }
......
...@@ -214,7 +214,7 @@ public abstract class AbstractSendMessageProcessor implements NettyRequestProces ...@@ -214,7 +214,7 @@ public abstract class AbstractSendMessageProcessor implements NettyRequestProces
int queueIdInt = requestHeader.getQueueId(); int queueIdInt = requestHeader.getQueueId();
int idValid = Math.max(topicConfig.getWriteQueueNums(), topicConfig.getReadQueueNums()); int idValid = Math.max(topicConfig.getWriteQueueNums(), topicConfig.getReadQueueNums());
if (queueIdInt >= idValid) { if (queueIdInt >= idValid) {
String errorInfo = String.format("request queueId[%d] is illagal, %s Producer: %s", String errorInfo = String.format("request queueId[%d] is illegal, %s Producer: %s",
queueIdInt, queueIdInt,
topicConfig.toString(), topicConfig.toString(),
RemotingHelper.parseChannelRemoteAddr(ctx.channel())); RemotingHelper.parseChannelRemoteAddr(ctx.channel()));
......
...@@ -157,7 +157,7 @@ public class EndTransactionProcessor implements NettyRequestProcessor { ...@@ -157,7 +157,7 @@ public class EndTransactionProcessor implements NettyRequestProcessor {
// Failed // Failed
case CREATE_MAPEDFILE_FAILED: case CREATE_MAPEDFILE_FAILED:
response.setCode(ResponseCode.SYSTEM_ERROR); response.setCode(ResponseCode.SYSTEM_ERROR);
response.setRemark("create maped file failed."); response.setRemark("create mapped file failed.");
break; break;
case MESSAGE_ILLEGAL: case MESSAGE_ILLEGAL:
case PROPERTIES_SIZE_EXCEEDED: case PROPERTIES_SIZE_EXCEEDED:
......
...@@ -133,7 +133,7 @@ public class PullMessageProcessor implements NettyRequestProcessor { ...@@ -133,7 +133,7 @@ public class PullMessageProcessor implements NettyRequestProcessor {
} }
if (requestHeader.getQueueId() < 0 || requestHeader.getQueueId() >= topicConfig.getReadQueueNums()) { if (requestHeader.getQueueId() < 0 || requestHeader.getQueueId() >= topicConfig.getReadQueueNums()) {
String errorInfo = String.format("queueId[%d] is illagal, topic:[%s] topicConfig.readQueueNums:[%d] consumer:[%s]", String errorInfo = String.format("queueId[%d] is illegal, topic:[%s] topicConfig.readQueueNums:[%d] consumer:[%s]",
requestHeader.getQueueId(), requestHeader.getTopic(), topicConfig.getReadQueueNums(), channel.remoteAddress()); requestHeader.getQueueId(), requestHeader.getTopic(), topicConfig.getReadQueueNums(), channel.remoteAddress());
LOG.warn(errorInfo); LOG.warn(errorInfo);
response.setCode(ResponseCode.SYSTEM_ERROR); response.setCode(ResponseCode.SYSTEM_ERROR);
......
...@@ -63,7 +63,7 @@ public class JDBCTransactionStore implements TransactionStore { ...@@ -63,7 +63,7 @@ public class JDBCTransactionStore implements TransactionStore {
return true; return true;
} catch (SQLException e) { } catch (SQLException e) {
log.info("Create JDBC Connection Exeption", e); log.info("Create JDBC Connection Exception", e);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册