提交 c5d9fcb5 编写于 作者: S shtykh_roman

Corrected spellings.

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