Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
s920243400
Rocketmq
提交
eaba61ff
R
Rocketmq
项目概览
s920243400
/
Rocketmq
与 Fork 源项目一致
Fork自
Apache RocketMQ / Rocketmq
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
Rocketmq
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
eaba61ff
编写于
3月 09, 2017
作者:
S
shtykh_roman
提交者:
dongeforever
6月 06, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Corrected spellings.
上级
e9a0d62d
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
34 addition
and
26 deletion
+34
-26
broker/src/main/java/org/apache/rocketmq/broker/BrokerStartup.java
...c/main/java/org/apache/rocketmq/broker/BrokerStartup.java
+6
-4
broker/src/main/java/org/apache/rocketmq/broker/pagecache/ManyMessageTransfer.java
...apache/rocketmq/broker/pagecache/ManyMessageTransfer.java
+8
-6
broker/src/main/java/org/apache/rocketmq/broker/pagecache/OneMessageTransfer.java
.../apache/rocketmq/broker/pagecache/OneMessageTransfer.java
+8
-6
broker/src/main/java/org/apache/rocketmq/broker/pagecache/QueryMessageTransfer.java
...pache/rocketmq/broker/pagecache/QueryMessageTransfer.java
+8
-6
broker/src/main/java/org/apache/rocketmq/broker/processor/AbstractSendMessageProcessor.java
...cketmq/broker/processor/AbstractSendMessageProcessor.java
+1
-1
broker/src/main/java/org/apache/rocketmq/broker/processor/EndTransactionProcessor.java
...he/rocketmq/broker/processor/EndTransactionProcessor.java
+1
-1
broker/src/main/java/org/apache/rocketmq/broker/processor/PullMessageProcessor.java
...pache/rocketmq/broker/processor/PullMessageProcessor.java
+1
-1
broker/src/main/java/org/apache/rocketmq/broker/transaction/jdbc/JDBCTransactionStore.java
...ocketmq/broker/transaction/jdbc/JDBCTransactionStore.java
+1
-1
未找到文件。
broker/src/main/java/org/apache/rocketmq/broker/BrokerStartup.java
浏览文件 @
eaba61ff
...
...
@@ -125,7 +125,7 @@ public class BrokerStartup {
properties
=
new
Properties
();
properties
.
load
(
in
);
p
arsePropertie
2SystemEnv
(
properties
);
p
roperties
2SystemEnv
(
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
begin
e
Time
=
System
.
currentTimeMillis
();
long
beginTime
=
System
.
currentTimeMillis
();
controller
.
shutdown
();
long
consumingTimeTotal
=
System
.
currentTimeMillis
()
-
begin
e
Time
;
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
p
arsePropertie
2SystemEnv
(
Properties
properties
)
{
private
static
void
p
roperties
2SystemEnv
(
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
);
...
...
broker/src/main/java/org/apache/rocketmq/broker/pagecache/ManyMessageTransfer.java
浏览文件 @
eaba61ff
...
...
@@ -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
transfer
r
ed
;
}
@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
;
transfer
r
ed
+=
target
.
write
(
this
.
byteBufferHeader
);
return
transfer
r
ed
;
}
else
{
List
<
ByteBuffer
>
messageBufferList
=
this
.
getMessageResult
.
getMessageBufferList
();
for
(
ByteBuffer
bb
:
messageBufferList
)
{
if
(
bb
.
hasRemaining
())
{
transfered
+=
target
.
write
(
bb
);
return
transfered
;
transfer
r
ed
+=
target
.
write
(
bb
);
return
transfer
r
ed
;
}
}
}
...
...
broker/src/main/java/org/apache/rocketmq/broker/pagecache/OneMessageTransfer.java
浏览文件 @
eaba61ff
...
...
@@ -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
transfer
r
ed
;
}
@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
;
transfer
r
ed
+=
target
.
write
(
this
.
byteBufferHeader
);
return
transfer
r
ed
;
}
else
if
(
this
.
selectMappedBufferResult
.
getByteBuffer
().
hasRemaining
())
{
transfered
+=
target
.
write
(
this
.
selectMappedBufferResult
.
getByteBuffer
());
return
transfered
;
transfer
r
ed
+=
target
.
write
(
this
.
selectMappedBufferResult
.
getByteBuffer
());
return
transfer
r
ed
;
}
return
0
;
...
...
broker/src/main/java/org/apache/rocketmq/broker/pagecache/QueryMessageTransfer.java
浏览文件 @
eaba61ff
...
...
@@ -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
transfer
r
ed
;
}
@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
;
transfer
r
ed
+=
target
.
write
(
this
.
byteBufferHeader
);
return
transfer
r
ed
;
}
else
{
List
<
ByteBuffer
>
messageBufferList
=
this
.
queryMessageResult
.
getMessageBufferList
();
for
(
ByteBuffer
bb
:
messageBufferList
)
{
if
(
bb
.
hasRemaining
())
{
transfered
+=
target
.
write
(
bb
);
return
transfered
;
transfer
r
ed
+=
target
.
write
(
bb
);
return
transfer
r
ed
;
}
}
}
...
...
broker/src/main/java/org/apache/rocketmq/broker/processor/AbstractSendMessageProcessor.java
浏览文件 @
eaba61ff
...
...
@@ -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 ill
a
gal, %s Producer: %s"
,
String
errorInfo
=
String
.
format
(
"request queueId[%d] is ill
e
gal, %s Producer: %s"
,
queueIdInt
,
topicConfig
.
toString
(),
RemotingHelper
.
parseChannelRemoteAddr
(
ctx
.
channel
()));
...
...
broker/src/main/java/org/apache/rocketmq/broker/processor/EndTransactionProcessor.java
浏览文件 @
eaba61ff
...
...
@@ -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 map
p
ed file failed."
);
break
;
case
MESSAGE_ILLEGAL:
case
PROPERTIES_SIZE_EXCEEDED:
...
...
broker/src/main/java/org/apache/rocketmq/broker/processor/PullMessageProcessor.java
浏览文件 @
eaba61ff
...
...
@@ -133,7 +133,7 @@ public class PullMessageProcessor implements NettyRequestProcessor {
}
if
(
requestHeader
.
getQueueId
()
<
0
||
requestHeader
.
getQueueId
()
>=
topicConfig
.
getReadQueueNums
())
{
String
errorInfo
=
String
.
format
(
"queueId[%d] is ill
a
gal, topic:[%s] topicConfig.readQueueNums:[%d] consumer:[%s]"
,
String
errorInfo
=
String
.
format
(
"queueId[%d] is ill
e
gal, topic:[%s] topicConfig.readQueueNums:[%d] consumer:[%s]"
,
requestHeader
.
getQueueId
(),
requestHeader
.
getTopic
(),
topicConfig
.
getReadQueueNums
(),
channel
.
remoteAddress
());
LOG
.
warn
(
errorInfo
);
response
.
setCode
(
ResponseCode
.
SYSTEM_ERROR
);
...
...
broker/src/main/java/org/apache/rocketmq/broker/transaction/jdbc/JDBCTransactionStore.java
浏览文件 @
eaba61ff
...
...
@@ -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 Ex
c
eption"
,
e
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录