Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
touzizhuo03
Dubbo
提交
8cc0695d
D
Dubbo
项目概览
touzizhuo03
/
Dubbo
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Dubbo
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
8cc0695d
编写于
12月 27, 2017
作者:
K
ken.lj
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
I18N effort, translate the missing content
上级
b04e83e2
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
25 addition
and
23 deletion
+25
-23
dubbo-rpc/dubbo-rpc-api/src/main/java/com/alibaba/dubbo/rpc/RpcContext.java
...c-api/src/main/java/com/alibaba/dubbo/rpc/RpcContext.java
+1
-1
dubbo-rpc/dubbo-rpc-api/src/main/java/com/alibaba/dubbo/rpc/RpcStatus.java
...pc-api/src/main/java/com/alibaba/dubbo/rpc/RpcStatus.java
+1
-2
dubbo-rpc/dubbo-rpc-api/src/main/java/com/alibaba/dubbo/rpc/filter/ContextFilter.java
...main/java/com/alibaba/dubbo/rpc/filter/ContextFilter.java
+1
-1
dubbo-rpc/dubbo-rpc-api/src/main/java/com/alibaba/dubbo/rpc/support/ProtocolUtils.java
...ain/java/com/alibaba/dubbo/rpc/support/ProtocolUtils.java
+2
-2
dubbo-rpc/dubbo-rpc-api/src/test/java/com/alibaba/dubbo/rpc/filter/AccessLogFilterTest.java
...ava/com/alibaba/dubbo/rpc/filter/AccessLogFilterTest.java
+1
-1
dubbo-rpc/dubbo-rpc-default/src/test/java/com/alibaba/dubbo/rpc/protocol/dubbo/ExplicitCallbackTest.java
...libaba/dubbo/rpc/protocol/dubbo/ExplicitCallbackTest.java
+1
-1
dubbo-rpc/dubbo-rpc-injvm/src/main/java/com/alibaba/dubbo/rpc/protocol/injvm/InjvmProtocol.java
...a/com/alibaba/dubbo/rpc/protocol/injvm/InjvmProtocol.java
+1
-1
dubbo-rpc/dubbo-rpc-thrift/src/test/java/com/alibaba/dubbo/rpc/protocol/thrift/ServerExceptionTest.java
...libaba/dubbo/rpc/protocol/thrift/ServerExceptionTest.java
+16
-13
dubbo-test/dubbo-test-benchmark/src/main/java/com/alibaba/dubbo/rpc/benchmark/AbstractBenchmarkServer.java
.../alibaba/dubbo/rpc/benchmark/AbstractBenchmarkServer.java
+1
-1
未找到文件。
dubbo-rpc/dubbo-rpc-api/src/main/java/com/alibaba/dubbo/rpc/RpcContext.java
浏览文件 @
8cc0695d
...
@@ -561,7 +561,7 @@ public class RpcContext {
...
@@ -561,7 +561,7 @@ public class RpcContext {
try
{
try
{
setAttachment
(
Constants
.
ASYNC_KEY
,
Boolean
.
TRUE
.
toString
());
setAttachment
(
Constants
.
ASYNC_KEY
,
Boolean
.
TRUE
.
toString
());
final
T
o
=
callable
.
call
();
final
T
o
=
callable
.
call
();
//local
调用会直接返回结果.
//local
invoke will return directly
if
(
o
!=
null
)
{
if
(
o
!=
null
)
{
FutureTask
<
T
>
f
=
new
FutureTask
<
T
>(
new
Callable
<
T
>()
{
FutureTask
<
T
>
f
=
new
FutureTask
<
T
>(
new
Callable
<
T
>()
{
public
T
call
()
throws
Exception
{
public
T
call
()
throws
Exception
{
...
...
dubbo-rpc/dubbo-rpc-api/src/main/java/com/alibaba/dubbo/rpc/RpcStatus.java
浏览文件 @
8cc0695d
...
@@ -48,8 +48,7 @@ public class RpcStatus {
...
@@ -48,8 +48,7 @@ public class RpcStatus {
private
final
AtomicLong
succeededMaxElapsed
=
new
AtomicLong
();
private
final
AtomicLong
succeededMaxElapsed
=
new
AtomicLong
();
/**
/**
* 用来实现executes属性的并发限制(即控制能使用的线程数)
* Semaphore used to control concurrency limit set by `executes`
* 2017-08-21 yizhenqiang
*/
*/
private
volatile
Semaphore
executesLimit
;
private
volatile
Semaphore
executesLimit
;
private
volatile
int
executesPermits
;
private
volatile
int
executesPermits
;
...
...
dubbo-rpc/dubbo-rpc-api/src/main/java/com/alibaba/dubbo/rpc/filter/ContextFilter.java
浏览文件 @
8cc0695d
...
@@ -45,7 +45,7 @@ public class ContextFilter implements Filter {
...
@@ -45,7 +45,7 @@ public class ContextFilter implements Filter {
attachments
.
remove
(
Constants
.
DUBBO_VERSION_KEY
);
attachments
.
remove
(
Constants
.
DUBBO_VERSION_KEY
);
attachments
.
remove
(
Constants
.
TOKEN_KEY
);
attachments
.
remove
(
Constants
.
TOKEN_KEY
);
attachments
.
remove
(
Constants
.
TIMEOUT_KEY
);
attachments
.
remove
(
Constants
.
TIMEOUT_KEY
);
attachments
.
remove
(
Constants
.
ASYNC_KEY
);
//
清空消费端的异步参数
attachments
.
remove
(
Constants
.
ASYNC_KEY
);
//
Remove async property to avoid being passed to the following invoke chain.
}
}
RpcContext
.
getContext
()
RpcContext
.
getContext
()
.
setInvoker
(
invoker
)
.
setInvoker
(
invoker
)
...
...
dubbo-rpc/dubbo-rpc-api/src/main/java/com/alibaba/dubbo/rpc/support/ProtocolUtils.java
浏览文件 @
8cc0695d
...
@@ -48,8 +48,8 @@ public class ProtocolUtils {
...
@@ -48,8 +48,8 @@ public class ProtocolUtils {
public
static
boolean
isGeneric
(
String
generic
)
{
public
static
boolean
isGeneric
(
String
generic
)
{
return
generic
!=
null
return
generic
!=
null
&&
!
""
.
equals
(
generic
)
&&
!
""
.
equals
(
generic
)
&&
(
Constants
.
GENERIC_SERIALIZATION_DEFAULT
.
equalsIgnoreCase
(
generic
)
/*
正常的泛化调用
*/
&&
(
Constants
.
GENERIC_SERIALIZATION_DEFAULT
.
equalsIgnoreCase
(
generic
)
/*
Normal generalization cal
*/
||
Constants
.
GENERIC_SERIALIZATION_NATIVE_JAVA
.
equalsIgnoreCase
(
generic
)
/*
支持java序列化的流式泛化调用
*/
||
Constants
.
GENERIC_SERIALIZATION_NATIVE_JAVA
.
equalsIgnoreCase
(
generic
)
/*
Streaming generalization call supporting jdk serialization
*/
||
Constants
.
GENERIC_SERIALIZATION_BEAN
.
equalsIgnoreCase
(
generic
));
||
Constants
.
GENERIC_SERIALIZATION_BEAN
.
equalsIgnoreCase
(
generic
));
}
}
...
...
dubbo-rpc/dubbo-rpc-api/src/test/java/com/alibaba/dubbo/rpc/filter/AccessLogFilterTest.java
浏览文件 @
8cc0695d
...
@@ -35,7 +35,7 @@ public class AccessLogFilterTest {
...
@@ -35,7 +35,7 @@ public class AccessLogFilterTest {
Filter
accessLogFilter
=
new
AccessLogFilter
();
Filter
accessLogFilter
=
new
AccessLogFilter
();
//
测试filter不会抛出异常
//
Test filter won't throw an exception
@Test
@Test
public
void
testInvokeException
()
{
public
void
testInvokeException
()
{
Invoker
<
AccessLogFilterTest
>
invoker
=
new
MyInvoker
<
AccessLogFilterTest
>(
null
);
Invoker
<
AccessLogFilterTest
>
invoker
=
new
MyInvoker
<
AccessLogFilterTest
>(
null
);
...
...
dubbo-rpc/dubbo-rpc-default/src/test/java/com/alibaba/dubbo/rpc/protocol/dubbo/ExplicitCallbackTest.java
浏览文件 @
8cc0695d
...
@@ -43,7 +43,7 @@ public class ExplicitCallbackTest {
...
@@ -43,7 +43,7 @@ public class ExplicitCallbackTest {
protected
Invoker
<
IDemoService
>
reference
=
null
;
protected
Invoker
<
IDemoService
>
reference
=
null
;
protected
URL
serviceURL
=
null
;
protected
URL
serviceURL
=
null
;
protected
URL
consumerUrl
=
null
;
protected
URL
consumerUrl
=
null
;
// ============================
华丽的分割线
================================================
// ============================
A gorgeous line of segmentation
================================================
IDemoService
demoProxy
=
null
;
IDemoService
demoProxy
=
null
;
@After
@After
...
...
dubbo-rpc/dubbo-rpc-injvm/src/main/java/com/alibaba/dubbo/rpc/protocol/injvm/InjvmProtocol.java
浏览文件 @
8cc0695d
...
@@ -91,7 +91,7 @@ public class InjvmProtocol extends AbstractProtocol implements Protocol {
...
@@ -91,7 +91,7 @@ public class InjvmProtocol extends AbstractProtocol implements Protocol {
public
boolean
isInjvmRefer
(
URL
url
)
{
public
boolean
isInjvmRefer
(
URL
url
)
{
final
boolean
isJvmRefer
;
final
boolean
isJvmRefer
;
String
scope
=
url
.
getParameter
(
Constants
.
SCOPE_KEY
);
String
scope
=
url
.
getParameter
(
Constants
.
SCOPE_KEY
);
//
本身已经是jvm协议了,走正常流程就是了
.
//
Since injvm protocol is configured explicitly, we don't need to set any extra flag, use normal refer process
.
if
(
Constants
.
LOCAL_PROTOCOL
.
toString
().
equals
(
url
.
getProtocol
()))
{
if
(
Constants
.
LOCAL_PROTOCOL
.
toString
().
equals
(
url
.
getProtocol
()))
{
isJvmRefer
=
false
;
isJvmRefer
=
false
;
}
else
if
(
Constants
.
SCOPE_LOCAL
.
equals
(
scope
)
||
(
url
.
getParameter
(
"injvm"
,
false
)))
{
}
else
if
(
Constants
.
SCOPE_LOCAL
.
equals
(
scope
)
||
(
url
.
getParameter
(
"injvm"
,
false
)))
{
...
...
dubbo-rpc/dubbo-rpc-thrift/src/test/java/com/alibaba/dubbo/rpc/protocol/thrift/ServerExceptionTest.java
浏览文件 @
8cc0695d
/**
/*
* File Created at 2011-12-09
* Licensed to the Apache Software Foundation (ASF) under one or more
* $Id$
* contributor license agreements. See the NOTICE file distributed with
* <p>
* this work for additional information regarding copyright ownership.
* Copyright 2008 Alibaba.com Croporation Limited.
* The ASF licenses this file to You under the Apache License, Version 2.0
* All rights reserved.
* (the "License"); you may not use this file except in compliance with
* <p>
* the License. You may obtain a copy of the License at
* This software is the confidential and proprietary information of
*
* Alibaba Company. ("Confidential Information"). You shall not
* http://www.apache.org/licenses/LICENSE-2.0
* disclose such Confidential Information and shall use it only in
*
* accordance with the terms of the license agreement you entered into
* Unless required by applicable law or agreed to in writing, software
* with Alibaba.com.
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
*/
package
com.alibaba.dubbo.rpc.protocol.thrift
;
package
com.alibaba.dubbo.rpc.protocol.thrift
;
...
@@ -23,7 +26,6 @@ import org.junit.Assert;
...
@@ -23,7 +26,6 @@ import org.junit.Assert;
import
org.junit.Test
;
import
org.junit.Test
;
/**
/**
* @author <a href="mailto:gang.lvg@alibaba-inc.com">kimi</a>
*/
*/
public
class
ServerExceptionTest
extends
AbstractTest
{
public
class
ServerExceptionTest
extends
AbstractTest
{
...
@@ -63,6 +65,7 @@ public class ServerExceptionTest extends AbstractTest {
...
@@ -63,6 +65,7 @@ public class ServerExceptionTest extends AbstractTest {
public
String
echoString
(
String
arg
)
{
public
String
echoString
(
String
arg
)
{
// 在 server 端,thrift 无法处理 idl 中没有声明的异常
// 在 server 端,thrift 无法处理 idl 中没有声明的异常
// On server side, thrift can not handle exceptions not declared in idl
throw
new
RuntimeException
(
"just for test"
);
throw
new
RuntimeException
(
"just for test"
);
}
}
};
};
...
...
dubbo-test/dubbo-test-benchmark/src/main/java/com/alibaba/dubbo/rpc/benchmark/AbstractBenchmarkServer.java
浏览文件 @
8cc0695d
...
@@ -56,7 +56,7 @@ public abstract class AbstractBenchmarkServer {
...
@@ -56,7 +56,7 @@ public abstract class AbstractBenchmarkServer {
Exchangers
.
bind
(
url
.
toString
(),
new
ExchangeHandlerAdapter
()
{
Exchangers
.
bind
(
url
.
toString
(),
new
ExchangeHandlerAdapter
()
{
public
Object
reply
(
ExchangeChannel
channel
,
Object
message
)
throws
RemotingException
{
public
Object
reply
(
ExchangeChannel
channel
,
Object
message
)
throws
RemotingException
{
return
new
ResponseObject
(
responseSize
);
//
发送响应
return
new
ResponseObject
(
responseSize
);
//
send response
}
}
});
});
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录