Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Apache RocketMQ
Rocketmq
提交
361eb8d2
R
Rocketmq
项目概览
Apache RocketMQ
/
Rocketmq
上一次同步 大约 3 年
通知
267
Star
16139
Fork
68
代码
文件
提交
分支
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看板
提交
361eb8d2
编写于
6月 22, 2021
作者:
M
messense
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Upgrade netty-all dependency version to 4.1.65.Final
上级
df1d93fc
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
128 addition
and
1 deletion
+128
-1
broker/src/main/java/org/apache/rocketmq/broker/pagecache/ManyMessageTransfer.java
...apache/rocketmq/broker/pagecache/ManyMessageTransfer.java
+27
-0
broker/src/main/java/org/apache/rocketmq/broker/pagecache/OneMessageTransfer.java
.../apache/rocketmq/broker/pagecache/OneMessageTransfer.java
+27
-0
broker/src/main/java/org/apache/rocketmq/broker/pagecache/QueryMessageTransfer.java
...pache/rocketmq/broker/pagecache/QueryMessageTransfer.java
+27
-0
pom.xml
pom.xml
+1
-1
remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyLogger.java
.../java/org/apache/rocketmq/remoting/netty/NettyLogger.java
+46
-0
未找到文件。
broker/src/main/java/org/apache/rocketmq/broker/pagecache/ManyMessageTransfer.java
浏览文件 @
361eb8d2
...
...
@@ -53,6 +53,11 @@ public class ManyMessageTransfer extends AbstractReferenceCounted implements Fil
return
transferred
;
}
@Override
public
long
transferred
()
{
return
transferred
;
}
@Override
public
long
count
()
{
return
byteBufferHeader
.
limit
()
+
this
.
getMessageResult
.
getBufferTotalSize
();
...
...
@@ -76,6 +81,28 @@ public class ManyMessageTransfer extends AbstractReferenceCounted implements Fil
return
0
;
}
@Override
public
FileRegion
retain
()
{
super
.
retain
();
return
this
;
}
@Override
public
FileRegion
retain
(
int
increment
)
{
super
.
retain
(
increment
);
return
this
;
}
@Override
public
FileRegion
touch
()
{
return
this
;
}
@Override
public
FileRegion
touch
(
Object
hint
)
{
return
this
;
}
public
void
close
()
{
this
.
deallocate
();
}
...
...
broker/src/main/java/org/apache/rocketmq/broker/pagecache/OneMessageTransfer.java
浏览文件 @
361eb8d2
...
...
@@ -47,6 +47,11 @@ public class OneMessageTransfer extends AbstractReferenceCounted implements File
return
transferred
;
}
@Override
public
long
transferred
()
{
return
transferred
;
}
@Override
public
long
count
()
{
return
this
.
byteBufferHeader
.
limit
()
+
this
.
selectMappedBufferResult
.
getSize
();
...
...
@@ -65,6 +70,28 @@ public class OneMessageTransfer extends AbstractReferenceCounted implements File
return
0
;
}
@Override
public
FileRegion
retain
()
{
super
.
retain
();
return
this
;
}
@Override
public
FileRegion
retain
(
int
increment
)
{
super
.
retain
(
increment
);
return
this
;
}
@Override
public
FileRegion
touch
()
{
return
this
;
}
@Override
public
FileRegion
touch
(
Object
hint
)
{
return
this
;
}
public
void
close
()
{
this
.
deallocate
();
}
...
...
broker/src/main/java/org/apache/rocketmq/broker/pagecache/QueryMessageTransfer.java
浏览文件 @
361eb8d2
...
...
@@ -53,6 +53,11 @@ public class QueryMessageTransfer extends AbstractReferenceCounted implements Fi
return
transferred
;
}
@Override
public
long
transferred
()
{
return
transferred
;
}
@Override
public
long
count
()
{
return
byteBufferHeader
.
limit
()
+
this
.
queryMessageResult
.
getBufferTotalSize
();
...
...
@@ -76,6 +81,28 @@ public class QueryMessageTransfer extends AbstractReferenceCounted implements Fi
return
0
;
}
@Override
public
FileRegion
retain
()
{
super
.
retain
();
return
this
;
}
@Override
public
FileRegion
retain
(
int
increment
)
{
super
.
retain
(
increment
);
return
this
;
}
@Override
public
FileRegion
touch
()
{
return
this
;
}
@Override
public
FileRegion
touch
(
Object
hint
)
{
return
this
;
}
public
void
close
()
{
this
.
deallocate
();
}
...
...
pom.xml
浏览文件 @
361eb8d2
...
...
@@ -537,7 +537,7 @@
<dependency>
<groupId>
io.netty
</groupId>
<artifactId>
netty-all
</artifactId>
<version>
4.
0.42
.Final
</version>
<version>
4.
1.65
.Final
</version>
</dependency>
<dependency>
<groupId>
com.alibaba
</groupId>
...
...
remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyLogger.java
浏览文件 @
361eb8d2
...
...
@@ -52,6 +52,8 @@ public class NettyLogger {
private
InternalLogger
logger
=
null
;
private
static
final
String
EXCEPTION_MESSAGE
=
"Unexpected exception:"
;
public
NettyBridgeLogger
(
String
name
)
{
logger
=
InternalLoggerFactory
.
getLogger
(
name
);
}
...
...
@@ -161,6 +163,25 @@ public class NettyLogger {
}
}
@Override
public
void
log
(
InternalLogLevel
internalLogLevel
,
Throwable
throwable
)
{
if
(
internalLogLevel
.
equals
(
InternalLogLevel
.
DEBUG
))
{
logger
.
debug
(
EXCEPTION_MESSAGE
,
throwable
);
}
if
(
internalLogLevel
.
equals
(
InternalLogLevel
.
TRACE
))
{
logger
.
info
(
EXCEPTION_MESSAGE
,
throwable
);
}
if
(
internalLogLevel
.
equals
(
InternalLogLevel
.
INFO
))
{
logger
.
info
(
EXCEPTION_MESSAGE
,
throwable
);
}
if
(
internalLogLevel
.
equals
(
InternalLogLevel
.
WARN
))
{
logger
.
warn
(
EXCEPTION_MESSAGE
,
throwable
);
}
if
(
internalLogLevel
.
equals
(
InternalLogLevel
.
ERROR
))
{
logger
.
error
(
EXCEPTION_MESSAGE
,
throwable
);
}
}
@Override
public
boolean
isTraceEnabled
()
{
return
isEnabled
(
InternalLogLevel
.
TRACE
);
...
...
@@ -191,6 +212,11 @@ public class NettyLogger {
logger
.
info
(
var1
,
var2
);
}
@Override
public
void
trace
(
Throwable
var1
)
{
logger
.
info
(
EXCEPTION_MESSAGE
,
var1
);
}
@Override
public
boolean
isDebugEnabled
()
{
return
isEnabled
(
InternalLogLevel
.
DEBUG
);
...
...
@@ -221,6 +247,11 @@ public class NettyLogger {
logger
.
debug
(
var1
,
var2
);
}
@Override
public
void
debug
(
Throwable
var1
)
{
logger
.
debug
(
EXCEPTION_MESSAGE
,
var1
);
}
@Override
public
boolean
isInfoEnabled
()
{
return
isEnabled
(
InternalLogLevel
.
INFO
);
...
...
@@ -251,6 +282,11 @@ public class NettyLogger {
logger
.
info
(
var1
,
var2
);
}
@Override
public
void
info
(
Throwable
var1
)
{
logger
.
info
(
EXCEPTION_MESSAGE
,
var1
);
}
@Override
public
boolean
isWarnEnabled
()
{
return
isEnabled
(
InternalLogLevel
.
WARN
);
...
...
@@ -281,6 +317,11 @@ public class NettyLogger {
logger
.
warn
(
var1
,
var2
);
}
@Override
public
void
warn
(
Throwable
var1
)
{
logger
.
warn
(
EXCEPTION_MESSAGE
,
var1
);
}
@Override
public
boolean
isErrorEnabled
()
{
return
isEnabled
(
InternalLogLevel
.
ERROR
);
...
...
@@ -310,6 +351,11 @@ public class NettyLogger {
public
void
error
(
String
var1
,
Throwable
var2
)
{
logger
.
error
(
var1
,
var2
);
}
@Override
public
void
error
(
Throwable
var1
)
{
logger
.
error
(
EXCEPTION_MESSAGE
,
var1
);
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录