Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
pentaLiker
DolphinScheduler
提交
50dbe7d0
DolphinScheduler
项目概览
pentaLiker
/
DolphinScheduler
与 Fork 源项目一致
Fork自
apache / DolphinScheduler
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
DolphinScheduler
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
50dbe7d0
编写于
2月 02, 2021
作者:
C
CalvinKirs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
async not needed callback
上级
c9daf6a4
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
7 addition
and
9 deletion
+7
-9
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/rpc/codec/NettyEncoder.java
...a/org/apache/dolphinscheduler/rpc/codec/NettyEncoder.java
+0
-5
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/rpc/protocol/RpcProtocolConstants.java
...e/dolphinscheduler/rpc/protocol/RpcProtocolConstants.java
+4
-0
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/rpc/remote/NettyClient.java
...a/org/apache/dolphinscheduler/rpc/remote/NettyClient.java
+2
-2
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/rpc/remote/NettyServer.java
...a/org/apache/dolphinscheduler/rpc/remote/NettyServer.java
+1
-2
未找到文件。
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/rpc/codec/NettyEncoder.java
浏览文件 @
50dbe7d0
...
...
@@ -30,11 +30,6 @@ import io.netty.handler.codec.MessageToByteEncoder;
* NettyEncoder
*/
public
class
NettyEncoder
extends
MessageToByteEncoder
<
RpcProtocol
<
Object
>>
{
private
Class
<?>
genericClass
;
public
NettyEncoder
(
Class
<?>
genericClass
)
{
this
.
genericClass
=
genericClass
;
}
@Override
protected
void
encode
(
ChannelHandlerContext
channelHandlerContext
,
RpcProtocol
<
Object
>
msg
,
ByteBuf
byteBuf
)
throws
Exception
{
...
...
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/rpc/protocol/RpcProtocolConstants.java
浏览文件 @
50dbe7d0
...
...
@@ -19,6 +19,10 @@ package org.apache.dolphinscheduler.rpc.protocol;
public
class
RpcProtocolConstants
{
public
RpcProtocolConstants
()
{
throw
new
IllegalStateException
(
"Utility class"
);
}
public
static
final
int
HEADER_LENGTH
=
17
;
public
static
final
short
MAGIC
=
(
short
)
0xbabe
;
...
...
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/rpc/remote/NettyClient.java
浏览文件 @
50dbe7d0
...
...
@@ -181,7 +181,7 @@ public class NettyClient {
@Override
public
void
initChannel
(
SocketChannel
ch
)
{
ch
.
pipeline
()
.
addLast
(
new
NettyEncoder
(
RpcRequest
.
class
))
.
addLast
(
new
NettyEncoder
())
.
addLast
(
new
NettyDecoder
(
RpcResponse
.
class
))
.
addLast
(
"client-idle-handler"
,
new
IdleStateHandler
(
Constants
.
NETTY_CLIENT_HEART_BEAT_TIME
,
0
,
0
,
TimeUnit
.
MILLISECONDS
))
.
addLast
(
new
NettyClientHandler
());
...
...
@@ -191,7 +191,7 @@ public class NettyClient {
isStarted
.
compareAndSet
(
false
,
true
);
}
public
RpcResponse
sendMsg
(
Host
host
,
RpcProtocol
<
RpcRequest
>
protocol
,
Boolean
async
)
throws
InterruptedException
{
public
RpcResponse
sendMsg
(
Host
host
,
RpcProtocol
<
RpcRequest
>
protocol
,
Boolean
async
)
{
Channel
channel
=
getChannel
(
host
);
assert
channel
!=
null
;
...
...
dolphinscheduler-remote/src/main/java/org/apache/dolphinscheduler/rpc/remote/NettyServer.java
浏览文件 @
50dbe7d0
...
...
@@ -23,7 +23,6 @@ import org.apache.dolphinscheduler.remote.utils.NettyUtils;
import
org.apache.dolphinscheduler.rpc.codec.NettyDecoder
;
import
org.apache.dolphinscheduler.rpc.codec.NettyEncoder
;
import
org.apache.dolphinscheduler.rpc.common.RpcRequest
;
import
org.apache.dolphinscheduler.rpc.common.RpcResponse
;
import
java.util.concurrent.ThreadFactory
;
import
java.util.concurrent.TimeUnit
;
...
...
@@ -172,7 +171,7 @@ public class NettyServer {
private
void
initNettyChannel
(
SocketChannel
ch
)
{
ch
.
pipeline
()
.
addLast
(
new
NettyDecoder
(
RpcRequest
.
class
))
.
addLast
(
new
NettyEncoder
(
RpcResponse
.
class
))
.
addLast
(
new
NettyEncoder
())
.
addLast
(
"server-idle-handle"
,
new
IdleStateHandler
(
0
,
0
,
Constants
.
NETTY_SERVER_HEART_BEAT_TIME
,
TimeUnit
.
MILLISECONDS
))
.
addLast
(
"handler"
,
new
NettyServerHandler
());
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录