diff --git a/.github/actions/scenarios/backend/memory/action.yml b/.github/actions/scenarios/backend/memory/action.yml
index 8575f4bf62..5e83f867bd 100644
--- a/.github/actions/scenarios/backend/memory/action.yml
+++ b/.github/actions/scenarios/backend/memory/action.yml
@@ -65,7 +65,7 @@ runs:
- name: start test
shell: bash
run: |
- python -m unittest ./sermant-integration-tests/scripts/testBackend.py
+ python -m unittest ./sermant-integration-tests/scripts/test_backend.py
- name: stop backend
shell: bash
run: |
diff --git a/.github/actions/scenarios/backend/redis/action.yml b/.github/actions/scenarios/backend/redis/action.yml
index 053b521b4d..42ed2f3026 100644
--- a/.github/actions/scenarios/backend/redis/action.yml
+++ b/.github/actions/scenarios/backend/redis/action.yml
@@ -44,7 +44,7 @@ runs:
- name: start test
shell: bash
run: |
- python -m unittest ./sermant-integration-tests/scripts/testBackend.py
+ python -m unittest ./sermant-integration-tests/scripts/test_backend.py
- name: if failure then upload error log
uses: actions/upload-artifact@v3
if: ${{ failure() || cancelled() }}
diff --git a/sermant-backend/src/main/java/com/huaweicloud/sermant/backend/webhook/feishu/FeiShuHookConfig.java b/sermant-backend/src/main/java/com/huaweicloud/sermant/backend/webhook/feishu/FeiShuHookConfig.java
index ec75fa78e7..abe90eda8d 100644
--- a/sermant-backend/src/main/java/com/huaweicloud/sermant/backend/webhook/feishu/FeiShuHookConfig.java
+++ b/sermant-backend/src/main/java/com/huaweicloud/sermant/backend/webhook/feishu/FeiShuHookConfig.java
@@ -32,6 +32,11 @@ public class FeiShuHookConfig extends WebhookConfigImpl {
private FeiShuHookConfig() {
}
+ /**
+ * 获取飞书的webhook配置
+ *
+ * @return 飞书的webhook配置
+ */
public static WebHookConfig getInstance() {
return CONFIG;
}
diff --git a/sermant-backend/src/main/java/com/huaweicloud/sermant/backend/webhook/welink/WelinkHookClient.java b/sermant-backend/src/main/java/com/huaweicloud/sermant/backend/webhook/welink/WelinkHookClient.java
index 17ca33c983..b2b522f422 100644
--- a/sermant-backend/src/main/java/com/huaweicloud/sermant/backend/webhook/welink/WelinkHookClient.java
+++ b/sermant-backend/src/main/java/com/huaweicloud/sermant/backend/webhook/welink/WelinkHookClient.java
@@ -45,7 +45,7 @@ public WelinkHookClient() {
* webhook 事件推送
*
* @param events 事件信息
- * @return
+ * @return 推送是否成功
*/
@Override
public boolean doNotify(List events) {
diff --git a/sermant-backend/src/main/java/com/huaweicloud/sermant/backend/webhook/welink/WelinkHookConfig.java b/sermant-backend/src/main/java/com/huaweicloud/sermant/backend/webhook/welink/WelinkHookConfig.java
index d56c63849c..15e852d42e 100644
--- a/sermant-backend/src/main/java/com/huaweicloud/sermant/backend/webhook/welink/WelinkHookConfig.java
+++ b/sermant-backend/src/main/java/com/huaweicloud/sermant/backend/webhook/welink/WelinkHookConfig.java
@@ -32,6 +32,11 @@ public class WelinkHookConfig extends WebhookConfigImpl {
private WelinkHookConfig() {
}
+ /**
+ * 获取Welink的webhook配置
+ *
+ * @return Welink的webhook配置
+ */
public static WebHookConfig getInstance() {
return CONFIG;
}
diff --git a/sermant-injector/src/main/java/com/huaweicloud/sermant/injection/controller/SermantInjectorController.java b/sermant-injector/src/main/java/com/huaweicloud/sermant/injection/controller/SermantInjectorController.java
index 75242ac32f..444625d395 100644
--- a/sermant-injector/src/main/java/com/huaweicloud/sermant/injection/controller/SermantInjectorController.java
+++ b/sermant-injector/src/main/java/com/huaweicloud/sermant/injection/controller/SermantInjectorController.java
@@ -295,7 +295,10 @@ private Optional inject(ObjectNode body) {
* env.sermant.io/[key2]:[value2]
* 则在环境变量map中添加 key1:value1 和 key2:value2,共两个环境变量
* 本函数本真不强制是否使用labels还是annotations,只需要srcMap代表label/annotations下的map即可。
- */
+ *
+ * @param srcMap 源环境变量kv
+ * @param tgtEnv 处理后的环境变量kv
+ */
private void setEnvByMap(JsonNode srcMap, Map tgtEnv) {
Iterator labelIter = srcMap.fieldNames();
int prefixLength = SERMANT_ENV_PREFIX.length();
@@ -363,7 +366,7 @@ private void injectVolumes(ArrayNode arrayNode, JsonNode specPath) {
}
private void injectLifecycle(ArrayNode arrayNode, Map env, JsonNode containerNode,
- String containerPath) {
+ String containerPath) {
boolean enableSpring = getNotEmptyValue(env, ENABLE_SPRING_KEY, true, Boolean::parseBoolean);
boolean enableGraceShutDown = getNotEmptyValue(env, ENABLE_GRACE_SHUTDOWN_KEY, true,
Boolean::parseBoolean);
@@ -401,7 +404,7 @@ private void injectLifecycle(ArrayNode arrayNode, Map env, JsonN
}
private void injectReadinessProbe(ArrayNode arrayNode, Map env, JsonNode containerNode,
- String containerPath) {
+ String containerPath) {
int periodSeconds = getNotEmptyValue(env, K8S_READINESS_WAIT_TIME_KEY, 1, Integer::parseInt);
boolean enableSpring = getNotEmptyValue(env, ENABLE_SPRING_KEY, true, Boolean::parseBoolean);
boolean enableHealthCheck = getNotEmptyValue(env, ENABLE_HEALTH_CHECK_KEY, false, Boolean::parseBoolean);
@@ -428,7 +431,7 @@ private void injectReadinessProbe(ArrayNode arrayNode, Map env,
}
private void injectEnvFrom(ArrayNode arrayNode, Map env, JsonNode containerNode,
- String containerPath) {
+ String containerPath) {
String configMap = getNotEmptyValue(env, ENV_CONFIG_MAP_REF_KEY, envFrom, value -> value);
if (!StringUtils.hasText(configMap)) {
return;
@@ -444,7 +447,7 @@ private void injectEnvFrom(ArrayNode arrayNode, Map env, JsonNod
}
private void injectEnv(ArrayNode arrayNode, Map env, JsonNode containerNode, String containerPath,
- Map annotationEnv) {
+ Map annotationEnv) {
// 覆盖容器的env节点
ObjectNode envNode = arrayNode.addObject();
envNode.put(JSON_OPERATION_KEY, JSON_OPERATION_ADD);
@@ -508,7 +511,7 @@ private String getJavaToolOptions(String injectOptions, String originOptions) {
}
private void injectVolumeMounts(ArrayNode arrayNode, Map env, JsonNode containerNode,
- String containerPath) {
+ String containerPath) {
// 向容器新增volumeMounts节点
ObjectNode containerVolumeNode = putOrAddObject(arrayNode, containerNode, VOLUME_MOUNTS_PATH,
containerPath + VOLUME_MOUNTS_PATH);
diff --git a/sermant-integration-tests/scripts/AgentLoader.java b/sermant-integration-tests/scripts/AgentLoader.java
index 033fe39ecd..217c86f268 100644
--- a/sermant-integration-tests/scripts/AgentLoader.java
+++ b/sermant-integration-tests/scripts/AgentLoader.java
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+package com.huaweicloud.sermant.script;
+
import com.sun.tools.attach.AgentInitializationException;
import com.sun.tools.attach.AgentLoadException;
import com.sun.tools.attach.AttachNotSupportedException;
@@ -22,6 +24,8 @@
import java.io.IOException;
import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.Logger;
/**
* AgentLoader mainClass
@@ -30,6 +34,8 @@
* @since 2023-09-26
*/
public class AgentLoader {
+ private static Logger logger = Logger.getLogger("com.huaweicloud.sermant.script.AgentLoader");
+
private AgentLoader() {
}
@@ -58,8 +64,8 @@ public static void main(String[] args) {
virtualMachine.detach();
}
}
- } catch (AgentInitializationException | IOException | AgentLoadException | AttachNotSupportedException ignore) {
- // ignore
+ } catch (AgentInitializationException | IOException | AgentLoadException | AttachNotSupportedException e) {
+ logger.log(Level.WARNING, "Load sermant agent fail, exception", e);
}
}
}
diff --git a/sermant-integration-tests/scripts/testBackend.py b/sermant-integration-tests/scripts/test_backend.py
similarity index 100%
rename from sermant-integration-tests/scripts/testBackend.py
rename to sermant-integration-tests/scripts/test_backend.py
diff --git a/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/DefaultDynamicConfigSource.java b/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/DefaultDynamicConfigSource.java
index 94a99238e2..f1fc1ff0b4 100644
--- a/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/DefaultDynamicConfigSource.java
+++ b/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/DefaultDynamicConfigSource.java
@@ -97,7 +97,7 @@ private void updateConfigSources() {
private void updateAllConfigSources(Map changeConfigs, String eventKey) {
final Map configMap = allConfigSources
- .getOrDefault(eventKey, new HashMap<>(changeConfigs.size()));
+ .getOrDefault(eventKey, new HashMap<>(changeConfigs.size()));
configMap.putAll(changeConfigs);
allConfigSources.put(eventKey, configMap);
sortedKeys.removeIf(timestampKey -> timestampKey.key.equals(eventKey));
@@ -126,6 +126,16 @@ public int compareTo(TimestampKey target) {
}
return Long.compare(this.timestamp, target.timestamp);
}
+
+ @Override
+ public boolean equals(Object obj) {
+ return super.equals(obj);
+ }
+
+ @Override
+ public int hashCode() {
+ return super.hashCode();
+ }
}
@Override
diff --git a/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/closer/NacosConfigCenterCloser.java b/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/closer/NacosConfigCenterCloser.java
index d206a114de..608dace5b1 100644
--- a/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/closer/NacosConfigCenterCloser.java
+++ b/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/closer/NacosConfigCenterCloser.java
@@ -83,6 +83,6 @@ private void shutdownConfigService() {
return;
}
final Optional
+ *
+ * @param context 执行上下文
+ * @return 执行上下文
+ * @throws Exception 执行异常
*/
@Override
public ExecuteContext before(ExecuteContext context) throws Exception {
@@ -43,26 +47,26 @@ public ExecuteContext before(ExecuteContext context) throws Exception {
return context;
}
FlowControlServiceMeta.getInstance().setVersion(com.alibaba.dubbo.common.utils.ConfigUtils.getProperty(
- CseConstants.KEY_DUBBO_VERSION,
- CseConstants.DEFAULT_DUBBO_VERSION));
+ CseConstants.KEY_DUBBO_VERSION,
+ CseConstants.DEFAULT_DUBBO_VERSION));
FlowControlServiceMeta.getInstance().setProject(com.alibaba.dubbo.common.utils.ConfigUtils.getProperty(
- CseConstants.KEY_DUBBO_KIE_PROJECT,
- CseConstants.DEFAULT_PROJECT));
+ CseConstants.KEY_DUBBO_KIE_PROJECT,
+ CseConstants.DEFAULT_PROJECT));
FlowControlServiceMeta.getInstance().setServiceName(com.alibaba.dubbo.common.utils.ConfigUtils.getProperty(
- CseConstants.KEY_DUBBO_SERVICE_NAME,
- CseConstants.DEFAULT_DUBBO_SERVICE_NAME));
+ CseConstants.KEY_DUBBO_SERVICE_NAME,
+ CseConstants.DEFAULT_DUBBO_SERVICE_NAME));
FlowControlServiceMeta.getInstance().setEnvironment(com.alibaba.dubbo.common.utils.ConfigUtils.getProperty(
- CseConstants.KEY_DUBBO_ENVIRONMENT,
- CseConstants.DEFAULT_DUBBO_ENVIRONMENT));
+ CseConstants.KEY_DUBBO_ENVIRONMENT,
+ CseConstants.DEFAULT_DUBBO_ENVIRONMENT));
FlowControlServiceMeta.getInstance().setApp(com.alibaba.dubbo.common.utils.ConfigUtils.getProperty(
- CseConstants.KEY_DUBBO_APP_NAME,
- CseConstants.DEFAULT_DUBBO_APP_NAME));
+ CseConstants.KEY_DUBBO_APP_NAME,
+ CseConstants.DEFAULT_DUBBO_APP_NAME));
FlowControlServiceMeta.getInstance().setCustomLabel(com.alibaba.dubbo.common.utils.ConfigUtils.getProperty(
- CseConstants.KEY_DUBBO_CUSTOM_LABEL,
- CseConstants.DEFAULT_CUSTOM_LABEL));
+ CseConstants.KEY_DUBBO_CUSTOM_LABEL,
+ CseConstants.DEFAULT_CUSTOM_LABEL));
FlowControlServiceMeta.getInstance().setCustomLabelValue(com.alibaba.dubbo.common.utils.ConfigUtils.getProperty(
- CseConstants.KEY_DUBBO_CUSTOM_LABEL_VALUE,
- CseConstants.DEFAULT_CUSTOM_LABEL_VALUE));
+ CseConstants.KEY_DUBBO_CUSTOM_LABEL_VALUE,
+ CseConstants.DEFAULT_CUSTOM_LABEL_VALUE));
return context;
}
diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/inject/DefaultClientHttpResponse.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/inject/DefaultClientHttpResponse.java
index e5bb190aed..c0f920a68d 100644
--- a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/inject/DefaultClientHttpResponse.java
+++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/inject/DefaultClientHttpResponse.java
@@ -20,6 +20,8 @@
import com.huawei.flowcontrol.common.entity.FlowControlResponse;
import com.huawei.flowcontrol.common.entity.FlowControlResult;
+import com.huaweicloud.sermant.core.common.LoggerFactory;
+
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.client.ClientHttpResponse;
@@ -28,6 +30,8 @@
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
+import java.util.logging.Level;
+import java.util.logging.Logger;
/**
* 默认响应, 在接管RestTemplate请求,触发治理策略后的默认响应
@@ -36,6 +40,8 @@
* @since 2022-07-21
*/
public class DefaultClientHttpResponse implements ClientHttpResponse {
+ private static final Logger LOGGER = LoggerFactory.getLogger();
+
private final FlowControlResult flowControlResult;
private final String contentType;
@@ -80,8 +86,8 @@ public void close() {
if (responseStream != null) {
try {
responseStream.close();
- } catch (IOException ignored) {
- // ignored
+ } catch (IOException e) {
+ LOGGER.log(Level.WARNING, "Close exception: ", e.getMessage());
}
}
}
diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/retry/ApacheDubboInvokerInterceptor.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/retry/ApacheDubboInvokerInterceptor.java
index e7c28f4572..a8bbeabb4c 100644
--- a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/retry/ApacheDubboInvokerInterceptor.java
+++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/retry/ApacheDubboInvokerInterceptor.java
@@ -65,7 +65,7 @@ public class ApacheDubboInvokerInterceptor extends InterceptorSupporter {
* 黑名单,该名单内的类不拦截
*/
private final List backList = Collections
- .singletonList("org.apache.dubbo.rpc.cluster.support.registry.ZoneAwareClusterInvoker");
+ .singletonList("org.apache.dubbo.rpc.cluster.support.registry.ZoneAwareClusterInvoker");
/**
* 转换apache dubbo 注意,该方法不可抽出,由于宿主依赖仅可由该拦截器加载,因此抽出会导致找不到类
@@ -100,14 +100,15 @@ private DubboRequestEntity convertToApacheDubboEntity(Invocation invocation) {
* 不可抽出
* 由于两个框架类权限定名不同, 且仅当当前的拦截器才可加载宿主类
*
- * @param obj 增强对象
+ * @param obj 增强对象
* @param allArguments 方法参数
- * @param ret 响应结果
- * @param isNeedThrow 是否需抛出异常
+ * @param ret 响应结果
+ * @param isNeedThrow 是否需抛出异常
+ * @param isRetry 是否需要重试
* @return 方法调用器
*/
private Object invokeRetryMethod(Object obj, Object[] allArguments, Object ret, boolean isNeedThrow,
- boolean isRetry) {
+ boolean isRetry) {
try {
if (obj instanceof AbstractClusterInvoker) {
final Invocation invocation = (Invocation) allArguments[0];
@@ -116,7 +117,7 @@ private Object invokeRetryMethod(Object obj, Object[] allArguments, Object ret,
final Optional selectOption = getMethodSelect();
if (!checkInvokersOption.isPresent() || !selectOption.isPresent()) {
LOGGER.warning(String.format(Locale.ENGLISH, "It does not support retry for class %s",
- obj.getClass().getCanonicalName()));
+ obj.getClass().getCanonicalName()));
return ret;
}
if (isRetry) {
@@ -129,7 +130,7 @@ private Object invokeRetryMethod(Object obj, Object[] allArguments, Object ret,
// 选择invoker
final Invoker> invoke = (Invoker>) selectOption.get()
- .invoke(obj, loadBalance, invocation, invokers, null);
+ .invoke(obj, loadBalance, invocation, invokers, null);
// 执行调用
final Result result = invoke.invoke(invocation);
@@ -157,7 +158,7 @@ private Optional getMethodSelect() {
return getInvokerMethod("select", func -> {
try {
final Method method = AbstractClusterInvoker.class
- .getDeclaredMethod("select", LoadBalance.class, Invocation.class, List.class, List.class);
+ .getDeclaredMethod("select", LoadBalance.class, Invocation.class, List.class, List.class);
method.setAccessible(true);
return method;
} catch (NoSuchMethodException ex) {
@@ -171,7 +172,7 @@ private Optional getMethodCheckInvokers() {
return getInvokerMethod("checkInvokers", func -> {
try {
final Method method = AbstractClusterInvoker.class
- .getDeclaredMethod("checkInvokers", List.class, Invocation.class);
+ .getDeclaredMethod("checkInvokers", List.class, Invocation.class);
method.setAccessible(true);
return method;
} catch (NoSuchMethodException ex) {
@@ -202,12 +203,12 @@ protected final ExecuteContext doAfter(ExecuteContext context) {
RetryContext.INSTANCE.markRetry(retry);
result = invokeRetryMethod(context.getObject(), allArguments, result, false, false);
final List handlers = getRetryHandler()
- .getHandlers(convertToApacheDubboEntity(invocation));
+ .getHandlers(convertToApacheDubboEntity(invocation));
if (!handlers.isEmpty() && needRetry(handlers.get(0), result, ((AsyncRpcResult) result).getException())) {
RetryContext.INSTANCE.markRetry(retry);
result = handlers.get(0)
- .executeCheckedSupplier(() -> invokeRetryMethod(context.getObject(), allArguments,
- context.getResult(), true, true));
+ .executeCheckedSupplier(() -> invokeRetryMethod(context.getObject(), allArguments,
+ context.getResult(), true, true));
invocation.getAttachments().remove(RETRY_KEY);
}
} catch (Throwable throwable) {
@@ -228,7 +229,7 @@ private Object buildErrorResponse(Throwable throwable, Invocation invocation) {
}
result = AsyncRpcResult.newDefaultAsyncResult(realException, invocation);
LOGGER.warning(String.format(Locale.ENGLISH, "Invoking method [%s] failed, reason : %s",
- invocation.getMethodName(), realException.getMessage()));
+ invocation.getMethodName(), realException.getMessage()));
return result;
}
diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/retry/FeignRequestInterceptor.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/retry/FeignRequestInterceptor.java
index 5ed607980c..eb50cbaaea 100644
--- a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/retry/FeignRequestInterceptor.java
+++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/retry/FeignRequestInterceptor.java
@@ -47,6 +47,7 @@
import java.util.Locale;
import java.util.Optional;
import java.util.function.Supplier;
+import java.util.logging.Level;
import java.util.logging.Logger;
/**
@@ -85,8 +86,8 @@ private Optional convertToHttpEntity(Request request) {
.setMethod(request.method())
.setServiceName(url.getHost())
.build());
- } catch (MalformedURLException ignored) {
- // ignored
+ } catch (MalformedURLException e) {
+ LOGGER.log(Level.WARNING, "Fail to convert Request to HttpRequestEntity, exception", e);
}
return Optional.of(new HttpRequestEntity());
}
diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/retry/cluster/AlibabaDubboClusterInvoker.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/retry/cluster/AlibabaDubboClusterInvoker.java
index c279772767..6a53ca9e44 100644
--- a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/retry/cluster/AlibabaDubboClusterInvoker.java
+++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/retry/cluster/AlibabaDubboClusterInvoker.java
@@ -164,6 +164,7 @@ private void checkThrowEx(Result result) throws Throwable {
* 转换apache dubbo 注意,该方法不可抽出,由于宿主依赖仅可由该拦截器加载,因此抽出会导致找不到类
*
* @param invocation 调用信息
+ * @param invoker 调用者
* @return DubboRequestEntity
*/
private DubboRequestEntity convertToAlibabaDubboEntity(Invocation invocation, Invoker invoker) {
diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/retry/cluster/ApacheDubboClusterInvoker.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/retry/cluster/ApacheDubboClusterInvoker.java
index f704b83358..63cf3ace48 100644
--- a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/retry/cluster/ApacheDubboClusterInvoker.java
+++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/retry/cluster/ApacheDubboClusterInvoker.java
@@ -174,6 +174,7 @@ private void checkThrowEx(Result result) throws Throwable {
* 转换apache dubbo 注意,该方法不可抽出,由于宿主依赖仅可由该拦截器加载,因此抽出会导致找不到类
*
* @param invocation 调用信息
+ * @param invoker 调用者
* @return DubboRequestEntity
*/
private DubboRequestEntity convertToApacheDubboEntity(Invocation invocation, Invoker invoker) {
diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/service/InterceptorSupporter.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/service/InterceptorSupporter.java
index 23cb2cb86e..d477bec8a5 100644
--- a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/service/InterceptorSupporter.java
+++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/service/InterceptorSupporter.java
@@ -56,16 +56,28 @@ public abstract class InterceptorSupporter extends ReflectMethodCacheSupport imp
*/
protected static final String RETRY_KEY = "$$$$RETRY$$$";
+ /**
+ * 标记当前请求重试中
+ */
protected static final String RETRY_VALUE = "$$$$RETRY_VALUE$$$";
+ /**
+ * Apache Dubbo的Cluster类名
+ */
protected static final String APACHE_DUBBO_CLUSTER_CLASS_NAME = "org.apache.dubbo.rpc.cluster.Cluster";
+ /**
+ * Alibaba Dubbo的Cluster类名
+ */
protected static final String ALIBABA_DUBBO_CLUSTER_CLASS_NAME = "com.alibaba.dubbo.rpc.cluster.Cluster";
private static final String REFUSE_REPLACE_INVOKER = "close";
private static final Logger LOGGER = LoggerFactory.getLogger();
+ /**
+ * 流控配置
+ */
protected final FlowControlConfig flowControlConfig;
private final ReentrantLock lock = new ReentrantLock();
@@ -150,6 +162,7 @@ protected final HttpService chooseHttpService() {
* @param allArguments 方法参数
* @param result 默认结果
* @return 方法
+ * @throws InvokerWrapperException 调用包装异常
*/
protected final Supplier