From 7582bd393e47180c13cbaa96003531e8247aaf05 Mon Sep 17 00:00:00 2001 From: luanwenfei Date: Sun, 24 Apr 2022 18:28:37 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90fix=E3=80=91=E6=96=B0=E5=A2=9Eagentcor?= =?UTF-8?q?e-core=E5=8F=91=E5=B8=83=E4=B8=AD=E5=BF=83=E4=BB=93=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=EF=BC=8C=E8=A7=A3=E9=99=A4agentcore-core=E5=AF=B9?= =?UTF-8?q?=E7=88=B6pom=E7=9A=84=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/dev-guide/dev_plugin_code.md | 100 +++--- docs/dev-guide/dev_plugin_module.md | 60 ++-- docs/dev-guide/service_dynamicconfig.md | 84 ++--- docs/dev-guide/service_heartbeat.md | 4 +- docs/dev-guide/service_send.md | 2 +- docs/dev-guide/service_template.md | 2 +- docs/user-guide/agentcore.md | 50 +-- pom.xml | 28 +- sermant-agentcore/pom.xml | 29 +- .../sermant-agentcore-core/pom.xml | 301 ++++++++++++------ .../service/tracing/common/SourceInfo.java | 35 -- .../service/tracing/common/SpanEvent.java | 111 ------- .../service/tracing/common/TargetInfo.java | 35 -- .../tracing/common/TracingRequest.java | 75 ----- .../tracing/sender/TracingMessage.java | 37 --- .../tracing/sender/TracingMessageHeader.java | 29 -- .../sermant/core/AgentCoreEntrance.java | 12 +- .../core/agent/common/BeforeResult.java | 2 +- .../agent/definition/EnhanceDefinition.java | 4 +- .../definition/MethodInterceptPoint.java | 2 +- .../interceptor/ConstructorInterceptor.java | 2 +- .../InstanceMethodInterceptor.java | 4 +- .../core/agent/interceptor/Interceptor.java | 2 +- .../interceptor/StaticMethodInterceptor.java | 4 +- .../core/agent/matcher/AnnotationMatcher.java | 4 +- .../core/agent/matcher/ClassMatcher.java | 2 +- .../core/agent/matcher/ClassMatchers.java | 8 +- .../core/agent/matcher/MultiClassMatcher.java | 4 +- .../core/agent/matcher/NameMatcher.java | 2 +- .../core/agent/matcher/NonNameMatcher.java | 13 +- .../core/agent/matcher/PrefixMatcher.java | 4 +- .../core/agent/matcher/SuperTypeMatcher.java | 4 +- .../sermant/core/common/BootArgsIndexer.java | 8 +- .../sermant/core/common/CommonConstant.java | 2 +- .../sermant/core/common/LoggerFactory.java | 2 +- .../sermant/core/config/ConfigManager.java | 12 +- .../core/config/common/BaseConfig.java | 8 +- .../core/config/common/ConfigFieldKey.java | 4 +- .../core/config/common/ConfigTypeKey.java | 4 +- .../config/strategy/LoadConfigStrategy.java | 6 +- .../strategy/LoadPropertiesStrategy.java | 18 +- .../config/strategy/LoadYamlStrategy.java | 14 +- .../core/config/utils/ConfigFieldUtil.java | 4 +- .../core/config/utils/ConfigKeyUtil.java | 6 +- .../core/config/utils/ConfigValueUtil.java | 8 +- .../core/exception/DupConfIndexException.java | 2 +- .../core/exception/DupServiceException.java | 2 +- .../core/exception/SchemaException.java | 2 +- .../sermant/core/plugin/PluginManager.java | 18 +- .../core/plugin/PluginSystemEntrance.java | 14 +- .../core/plugin/adaptor/AdaptorManager.java | 30 +- .../adaptor/collector/AdaptorCollector.java | 4 +- .../collector/AdaptorCollectorManager.java | 8 +- .../adaptor/common/AdaptorConstants.java | 2 +- .../plugin/adaptor/config/AdaptorConfig.java | 6 +- .../plugin/adaptor/config/AdaptorSetting.java | 7 +- .../adaptor/remapper/AdaptorRemapper.java | 4 +- .../adaptor/remapper/AdaptorShader.java | 10 +- .../adaptor/service/AdaptorService.java | 2 +- .../service/AdaptorServiceManager.java | 2 +- .../plugin/agent/BufferedAgentBuilder.java | 14 +- .../core/plugin/agent/ByteEnhanceManager.java | 4 +- .../agent/annotations/BeanPropertyFlag.java | 6 +- .../agent/annotations/BeanPropertyFlags.java | 2 +- .../collector/AbstractPluginCollector.java | 4 +- .../collector/DefaultPluginCollector.java | 6 +- .../collector/DeprecatedPluginCollector.java | 54 ++-- .../agent/collector/PluginCollector.java | 8 +- .../collector/PluginCollectorManager.java | 24 +- .../core/plugin/agent/config/AgentConfig.java | 18 +- .../declarer/AbstractPluginDeclarer.java | 2 +- .../declarer/AbstractPluginDescription.java | 2 +- .../agent/declarer/InterceptDeclarer.java | 12 +- .../plugin/agent/declarer/PluginDeclarer.java | 6 +- .../agent/declarer/PluginDescription.java | 2 +- .../agent/declarer/SuperTypeDeclarer.java | 6 +- .../plugin/agent/entity/ExecuteContext.java | 2 +- .../interceptor/AbstractInterceptor.java | 4 +- .../plugin/agent/interceptor/Interceptor.java | 4 +- .../agent/matcher/ClassFuzzyMatcher.java | 2 +- .../plugin/agent/matcher/ClassMatcher.java | 2 +- .../agent/matcher/ClassTypeMatcher.java | 2 +- .../plugin/agent/matcher/MethodMatcher.java | 2 +- .../core/plugin/agent/matcher/MethodType.java | 2 +- .../agent/template/AdviceConstTemplate.java | 6 +- .../agent/template/AdviceMemberTemplate.java | 6 +- .../agent/template/AdviceStaticTemplate.java | 6 +- .../template/BootstrapConstTemplate.java | 8 +- .../template/BootstrapMemberTemplate.java | 8 +- .../template/BootstrapStaticTemplate.java | 8 +- .../agent/template/CommonBaseAdviser.java | 6 +- .../agent/template/CommonConstAdviser.java | 8 +- .../agent/template/CommonMethodAdviser.java | 8 +- .../plugin/agent/template/ImplDelegator.java | 2 +- .../agent/template/MethodKeyCreator.java | 2 +- .../agent/transformer/AdviceTransformer.java | 16 +- .../transformer/BootstrapTransformer.java | 18 +- .../plugin/classloader/PluginClassLoader.java | 6 +- .../core/plugin/common/PluginConstant.java | 2 +- .../plugin/common/PluginSchemaValidator.java | 6 +- .../core/plugin/config/PluginConfig.java | 4 +- .../plugin/config/PluginConfigManager.java | 4 +- .../core/plugin/config/PluginSetting.java | 2 +- .../core/plugin/config/ServiceMeta.java | 6 +- .../core/plugin/converter/Converter.java | 2 +- .../core/plugin/converter/YamlConverter.java | 4 +- .../core/plugin/service/PluginService.java | 4 +- .../plugin/service/PluginServiceManager.java | 4 +- .../AbstractGroupConfigSubscriber.java | 10 +- .../plugin/subscribe/ConfigSubscriber.java | 2 +- .../subscribe/CseGroupConfigSubscriber.java | 12 +- .../DefaultGroupConfigSubscriber.java | 8 +- .../sermant/core/service/BaseService.java | 6 +- .../sermant/core/service/ServiceManager.java | 6 +- .../BufferedDynamicConfigService.java | 10 +- .../dynamicconfig/DynamicConfigService.java | 22 +- .../dynamicconfig/api/GroupService.java | 9 +- .../dynamicconfig/api/KeyGroupService.java | 4 +- .../service/dynamicconfig/api/KeyService.java | 6 +- .../common/DynamicConfigEvent.java | 2 +- .../common/DynamicConfigEventType.java | 2 +- .../common/DynamicConfigListener.java | 2 +- .../common/DynamicConfigServiceType.java | 2 +- .../dynamicconfig/config/DynamicConfig.java | 10 +- .../kie/KieDynamicConfigService.java | 18 +- .../kie/client/AbstractClient.java | 6 +- .../dynamicconfig/kie/client/Client.java | 2 +- .../kie/client/ClientUrlManager.java | 4 +- .../kie/client/http/DefaultHttpClient.java | 9 +- .../kie/client/http/HttpClient.java | 4 +- .../kie/client/http/HttpResult.java | 2 +- .../kie/client/kie/KieClient.java | 16 +- .../kie/client/kie/KieConfigEntity.java | 2 +- .../kie/client/kie/KieListenerWrapper.java | 18 +- .../kie/client/kie/KieRequest.java | 2 +- .../kie/client/kie/KieResponse.java | 2 +- .../kie/client/kie/KieSubscriber.java | 2 +- .../kie/client/kie/ResultHandler.java | 6 +- .../kie/config/KieDynamicConfig.java | 6 +- .../kie/constants/KieConstants.java | 2 +- .../kie/listener/KvDataHolder.java | 6 +- .../kie/listener/SubscriberManager.java | 30 +- .../kie/selector/SelectStrategy.java | 2 +- .../dynamicconfig/kie/selector/Selector.java | 2 +- .../kie/selector/url/UrlSelector.java | 6 +- .../nop/NopDynamicConfigService.java | 6 +- .../dynamicconfig/utils/LabelGroupUtils.java | 4 +- .../zookeeper/ZooKeeperBufferedClient.java | 6 +- .../ZooKeeperDynamicConfigService.java | 10 +- .../zookeeper/ZooKeeperInitException.java | 2 +- .../heartbeat/HeartbeatServiceImpl.java | 32 +- .../heartbeat/api/ExtInfoProvider.java | 2 +- .../heartbeat/api/HeartbeatService.java | 6 +- .../heartbeat/common/HeartbeatConstant.java | 2 +- .../heartbeat/common/HeartbeatMessage.java | 10 +- .../heartbeat/config/HeartbeatConfig.java | 8 +- .../core/service/send/ClientHandler.java | 6 +- .../core/service/send/ClientManager.java | 2 +- .../core/service/send/NettyClient.java | 8 +- .../core/service/send/NettyClientFactory.java | 6 +- .../core/service/send/NettyGatewayClient.java | 12 +- .../sermant/core/service/send/Sender.java | 4 +- .../core/service/send/api/GatewayClient.java | 4 +- .../core/service/send/common/BaseHandler.java | 4 +- .../core/service/send/common/ThreadPools.java | 2 +- .../service/send/config/BackendConfig.java | 23 +- .../service/tracing/TracingServiceImpl.java | 20 +- .../service/tracing/api/ExtractService.java | 4 +- .../service/tracing/api/InjectService.java | 4 +- .../service/tracing/api/TracingService.java | 10 +- .../service/tracing/common/SourceInfo.java | 55 ++++ .../service/tracing/common/SpanEvent.java | 257 +++++++++++++++ .../tracing/common/SpanEventContext.java | 33 +- .../service/tracing/common/TargetInfo.java | 55 ++++ .../service/tracing/common/TracingHeader.java | 30 +- .../tracing/common/TracingRequest.java | 129 ++++++++ .../tracing/sender/TracingMessage.java | 70 ++++ .../tracing/sender/TracingMessageHeader.java | 45 +++ .../service/tracing/sender/TracingSender.java | 12 +- .../sermant/core/utils/AssertUtils.java | 2 +- .../sermant/core/utils/ClassLoaderUtils.java | 2 +- .../sermant/core/utils/FieldUtils.java | 2 +- .../sermant/core/utils/FileUtils.java | 4 +- .../sermant/core/utils/GzipUtils.java | 6 +- .../sermant/core/utils/JarFileUtils.java | 2 +- .../sermant/core/utils/MapUtils.java | 2 +- .../sermant/core/utils/NetworkUtils.java | 4 +- .../sermant/core/utils/SpiLoadUtils.java | 2 +- .../sermant/core/utils/StringUtils.java | 2 +- .../core/utils/ThreadFactoryUtils.java | 2 +- .../sermant/core/utils/TimeUtils.java | 4 +- .../sermant/core/utils/TracingUtils.java | 17 +- .../sermant/core/utils/UuidUtil.java | 2 +- .../src/main/proto/Message.proto | 2 +- ...awei.sermant.core.config.common.BaseConfig | 7 - ...nt.core.config.strategy.LoadConfigStrategy | 2 - ...ore.plugin.agent.collector.PluginCollector | 3 - ...om.huawei.sermant.core.service.BaseService | 4 - ...loud.sermant.core.config.common.BaseConfig | 7 + ...nt.core.config.strategy.LoadConfigStrategy | 2 + ...ore.plugin.agent.collector.PluginCollector | 3 + ...aweicloud.sermant.core.service.BaseService | 4 + .../core/service/dynamicconfig/BaseTest.java | 20 +- .../KieDynamicConfigServiceTest.java | 14 +- .../ZooKeeperDynamicConfigServiceTest.java | 16 +- .../kie/LabelGroupUtilsTest.java | 4 +- .../dynamicconfig/kie/PublishTest.java | 30 +- .../core/service/send/NettyClientTest.java | 21 +- .../tracing/TracingServiceImplTest.java | 33 +- .../config/all}/config.properties | 0 .../config/all/plugins.yaml | 0 .../config}/config.properties | 0 .../config/example/config.properties | 0 .../config/example/plugins.yaml | 0 .../config/logback.xml | 8 +- .../config/plugins.yaml | 0 .../sermant-agentcore-premain/pom.xml | 60 +++- .../huawei/sermant/premain/AgentPremain.java | 2 +- .../premain/common/BootArgsBuilder.java | 6 +- .../sermant/premain/common/PathDeclarer.java | 2 +- .../kie/client/http/DefaultHttpClient.java | 7 +- .../kie/client/kie/ResultHandler.java | 4 +- sermant-example/demo-plugin/pom.xml | 2 +- .../demo/common/DemoBeanPropertyApi.java | 2 +- .../example/demo/common/DemoLogger.java | 2 +- .../example/demo/config/DemoConfig.java | 6 +- .../huawei/example/demo/config/DemoPojo.java | 2 +- .../demo/declarer/DemoAnnotationDeclarer.java | 9 +- .../demo/declarer/DemoBootstrapDeclarer.java | 9 +- .../demo/declarer/DemoNameDeclarer.java | 11 +- .../demo/declarer/DemoNameInfixDeclarer.java | 9 +- .../demo/declarer/DemoNamePrefixDeclarer.java | 9 +- .../demo/declarer/DemoNameSuffixDeclarer.java | 9 +- .../demo/declarer/DemoSuperTypeDeclarer.java | 9 +- .../demo/declarer/DemoTraceDeclarer.java | 9 +- .../interceptor/DemoConfigInterceptor.java | 7 +- .../interceptor/DemoConstInterceptor.java | 5 +- .../interceptor/DemoFieldSetInterceptor.java | 5 +- .../interceptor/DemoInterfaceInterceptor.java | 5 +- .../interceptor/DemoMemberInterceptor.java | 5 +- .../interceptor/DemoServiceInterceptor.java | 7 +- .../interceptor/DemoStaticInterceptor.java | 5 +- .../DemoTraceConsumerInterceptor.java | 19 +- .../DemoTraceNormalInterceptor.java | 15 +- .../DemoTraceProviderInterceptor.java | 19 +- .../demo/service/DemoComplexService.java | 2 +- .../demo/service/DemoDynaConfService.java | 11 +- .../demo/service/DemoHeartBeatService.java | 8 +- .../demo/service/DemoSimpleService.java | 5 +- ...core.plugin.agent.declarer.PluginDeclarer} | 0 ...d.sermant.core.plugin.config.PluginConfig} | 0 ...sermant.core.plugin.service.PluginService} | 0 sermant-example/demo-service/pom.xml | 2 +- .../demo/config/DemoServiceConfig.java | 2 +- .../demo/service/DemoComplexServiceImpl.java | 5 +- ...d.sermant.core.plugin.config.PluginConfig} | 0 ...sermant.core.plugin.service.PluginService} | 0 .../dynamic-config-plugin/pom.xml | 2 +- .../huawei/dynamic/config/ConfigHolder.java | 5 +- .../dynamic/config/DynamicConfigSource.java | 7 +- .../dynamic/config/DynamicConfiguration.java | 4 +- .../dynamic/config/RefreshNotifier.java | 4 +- .../SpringBootstrapListenerDeclarer.java | 9 +- .../declarers/SpringEnvironmentDeclarer.java | 9 +- .../declarers/SpringFactoriesDeclarer.java | 9 +- .../config/init/DynamicConfigInitializer.java | 17 +- .../BootstrapListenerInterceptor.java | 3 +- .../DynamicConfigSwitchSupport.java | 7 +- .../ForceEnableBootstrapInterceptor.java | 5 +- .../SpringEnvironmentInterceptor.java | 5 +- .../SpringFactoriesInterceptor.java | 5 +- .../config/resolver/ConfigResolver.java | 2 +- .../resolver/DefaultConfigResolver.java | 8 +- .../config/subscribe/ConfigListener.java | 7 +- .../dynamic/config/utils/ClassUtils.java | 4 +- .../dynamic/config/ConfigHolderTest.java | 7 +- .../ForceEnableBootstrapInterceptorTest.java | 5 +- .../SpringFactoriesInterceptorTest.java | 5 +- .../resolver/DefaultConfigResolverTest.java | 2 +- .../source/SpringPropertyLocatorTest.java | 5 +- .../flowcontrol-common/pom.xml | 2 +- .../common/adapte/cse/ResolverManager.java | 9 +- .../cse/match/operator/CompareOperator.java | 3 +- .../adapte/cse/resolver/AbstractResolver.java | 7 +- .../common/adapte/cse/rule/AbstractRule.java | 3 +- .../cse/rule/RuleDynamicConfigListener.java | 9 +- .../common/config/FlowControlConfig.java | 5 +- .../config/KafkaConnectBySslSwitch.java | 2 +- .../common/handler/retry/AbstractRetry.java | 5 +- .../init/FlowControlInitServiceImpl.java | 17 +- .../common/metric/AbstractMetricSender.java | 4 +- .../common/metric/NettyMetricSender.java | 4 +- .../common/util/KafkaProducerUtil.java | 3 +- .../common/util/PluginConfigUtil.java | 5 +- .../flowcontrol/common/util/ReflectUtils.java | 4 +- .../huawei/flowcontrol/common/BaseTest.java | 15 +- .../flowcontrol-plugin/pom.xml | 2 +- .../flowcontrol/AlibabaDubboInterceptor.java | 3 +- .../flowcontrol/ApacheDubboInterceptor.java | 3 +- .../DispatcherServletDeclarer.java | 8 +- .../DispatcherServletInterceptor.java | 3 +- .../com/huawei/flowcontrol/DubboDeclarer.java | 8 +- .../config/AlibabaDubboConfigDeclarer.java | 8 +- .../config/AlibabaDubboConfigInterceptor.java | 7 +- .../config/ApacheDubboConfigDeclarer.java | 8 +- .../config/ApacheDubboConfigInterceptor.java | 7 +- .../config/DubboServiceNameDeclarer.java | 8 +- .../config/DubboServiceNameInterceptor.java | 7 +- .../config/SpringBootDeclarer.java | 8 +- .../config/SpringBootInterceptor.java | 7 +- .../config/SpringEnvironmentDeclarer.java | 8 +- .../config/SpringEnvironmentInterceptor.java | 7 +- .../retry/AlibabaDubboInvokerDeclarer.java | 8 +- .../retry/AlibabaDubboInvokerInterceptor.java | 5 +- .../retry/ApacheDubboInvokerDeclarer.java | 8 +- .../retry/ApacheDubboInvokerInterceptor.java | 5 +- ...xtensionLoaderGetExtensionInterceptor.java | 3 +- .../retry/ExtensionLoaderInterceptor.java | 3 +- .../retry/ExtentionLoaderDeclarer.java | 11 +- .../retry/FeignRequestDeclarer.java | 8 +- .../retry/FeignRequestInterceptor.java | 5 +- .../retry/HttpRequestDeclarer.java | 8 +- .../retry/HttpRequestInterceptor.java | 5 +- .../cluster/AlibabaDubboClusterInvoker.java | 3 +- .../cluster/ApacheDubboClusterInvoker.java | 3 +- .../service/InterceptorSupporter.java | 9 +- .../service/rest4j/DubboRest4jService.java | 3 +- .../service/rest4j/HttpRest4jService.java | 3 +- .../service/sen/DubboSenService.java | 3 +- .../service/sen/HttpSenService.java | 3 +- ...core.plugin.agent.declarer.PluginDeclarer} | 0 ...d.sermant.core.plugin.config.PluginConfig} | 0 ...sermant.core.plugin.service.PluginService} | 0 .../AlibabaDubboInterceptorTest.java | 4 +- .../ApacheDubboInterceptorTest.java | 5 +- .../java/com/huawei/flowcontrol/BaseTest.java | 15 +- .../retry/FeignRequestInterceptorTest.java | 4 +- .../retry/HttpRequestInterceptorTest.java | 4 +- .../flowcontrol-service/pom.xml | 2 +- ...sermant.core.plugin.service.PluginService} | 0 .../dubbo-loadbalancer-plugin/pom.xml | 2 +- .../loadbalancer/declarer/UrlDeclarer.java | 8 +- .../interceptor/UrlInterceptor.java | 7 +- ...core.plugin.agent.declarer.PluginDeclarer} | 0 .../loadbalancer/UrlInterceptorTest.java | 3 +- .../loadbalancer-common/pom.xml | 2 +- .../config/LoadbalancerConfig.java | 4 +- ...d.sermant.core.plugin.config.PluginConfig} | 0 .../loadbalancer-service/pom.xml | 2 +- .../listener/LoadbalancerConfigListener.java | 11 +- .../service/LoadbalancerConfigService.java | 9 +- ...sermant.core.plugin.service.PluginService} | 0 .../spring-cloud-loadbalancer-plugin/pom.xml | 2 +- .../declarer/AbstractDeclarer.java | 8 +- .../loadbalancer/declarer/RandomDeclarer.java | 2 +- .../declarer/RoundRobinDeclarer.java | 4 +- .../interceptor/ClientFactoryInterceptor.java | 9 +- .../interceptor/LoadBalancerInterceptor.java | 5 +- .../RibbonLoadBalancerInterceptor.java | 6 +- ...core.plugin.agent.declarer.PluginDeclarer} | 0 .../ClientFactoryInterceptorTest.java | 3 +- .../LoadBalancerInterceptorTest.java | 3 +- .../RibbonLoadBalancerInterceptorTest.java | 2 +- sermant-plugins/sermant-luban-adaptor/pom.xml | 2 +- .../AttributeAccessImplTemplate.java | 5 +- .../collector/BufferedTransformAccess.java | 3 +- .../collector/LubanListenerCollector.java | 8 +- .../declarer/InterceptorTransformer.java | 6 +- .../adaptor/declarer/LubanPluginDeclarer.java | 12 +- .../declarer/LubanPluginDescription.java | 33 +- .../adaptor/matcher/GetterSetterMatcher.java | 8 +- .../adaptor/service/LubanAdaptorService.java | 14 +- .../service/LubanTransformerAdviser.java | 3 +- ...plugin.adaptor.collector.AdaptorCollector} | 0 ...ore.plugin.adaptor.service.AdaptorService} | 0 .../sermant-route/gray-dubbo-plugin/pom.xml | 2 +- .../gray/dubbo/declarer/AbstractDeclarer.java | 8 +- .../declarer/AbstractDirectoryDeclarer.java | 2 +- .../dubbo/declarer/ClusterDefinition.java | 2 +- .../AbstractDirectoryInterceptor.java | 7 +- .../ApplicationConfigInterceptor.java | 7 +- .../dubbo/interceptor/ClusterInterceptor.java | 7 +- .../interceptor/RegistrationInterceptor.java | 7 +- .../service/AbstractDirectoryService.java | 2 +- .../service/ApplicationConfigService.java | 2 +- .../gray/dubbo/service/ClusterService.java | 2 +- .../dubbo/service/RegistrationService.java | 2 +- .../huawei/gray/dubbo/utils/ReflectUtils.java | 2 +- ...core.plugin.agent.declarer.PluginDeclarer} | 0 .../huawei/gray/dubbo/ReflectUtilsTest.java | 4 +- .../dubbo/RegistrationInterceptorTest.java | 11 +- .../sermant-route/gray-dubbo-service/pom.xml | 2 +- .../service/ApplicationConfigServiceImpl.java | 5 +- .../gray/dubbo/service/ConfigServiceImpl.java | 9 +- .../gray/dubbo/strategy/InvokerChooser.java | 3 +- .../gray/dubbo/strategy/TypeStrategy.java | 4 +- .../dubbo/strategy/TypeStrategyChooser.java | 3 +- .../strategy/type/EmptyTypeStrategy.java | 3 +- .../strategy/type/EnabledTypeStrategy.java | 3 +- .../strategy/type/ObjectTypeStrategy.java | 3 +- .../huawei/gray/dubbo/utils/RouterUtil.java | 3 +- ...sermant.core.plugin.service.PluginService} | 0 .../strategy/TypeStrategyChooserTest.java | 5 +- .../type/EnabledTypeStrategyTest.java | 5 +- .../strategy/type/ObjectTypeStrategyTest.java | 5 +- .../gray-feign-http-9.x-plugin/pom.xml | 2 +- .../definition/AbstractInstDefinition.java | 13 +- .../register/RegistrationDefinition.java | 5 +- .../DefaultHttpClientInterceptor.java | 7 +- .../LoadBalancerClientInterceptor.java | 7 +- .../feign/interceptor/PathVarInterceptor.java | 7 +- .../interceptor/RegisterInterceptor.java | 7 +- .../interceptor/RegistrationInterceptor.java | 7 +- .../ServiceCenterRegisterInterceptor.java | 2 +- .../ServiceCombRegisterInterceptor.java | 2 +- ...erviceInstanceListSupplierInterceptor.java | 7 +- .../service/DefaultHttpClientService.java | 4 +- .../service/LoadBalancerClientService.java | 4 +- .../gray/feign/service/PathVarService.java | 4 +- .../gray/feign/service/RegisterService.java | 4 +- .../ServiceInstanceListSupplierService.java | 4 +- ...t.core.agent.definition.EnhanceDefinition} | 0 .../gray-feign-http-9.x-service/pom.xml | 2 +- .../gray/feign/rule/UpstreamRuleStrategy.java | 3 +- .../gray/feign/service/ConfigServiceImpl.java | 9 +- .../service/DefaultHttpClientServiceImpl.java | 5 +- .../LoadBalancerClientServiceImpl.java | 3 +- .../feign/service/PathVarServiceImpl.java | 3 +- .../feign/service/RegisterServiceImpl.java | 4 +- ...erviceInstanceListSupplierServiceImpl.java | 3 +- .../huawei/gray/feign/util/RouterUtil.java | 3 +- ...sermant.core.plugin.service.PluginService} | 0 .../sermant-route/route-common/pom.xml | 2 +- .../route/common/gray/config/GrayConfig.java | 9 +- .../label/entity/ValueMatchDeserializer.java | 3 +- .../listener/GrayDynamicConfigListener.java | 11 +- ...d.sermant.core.plugin.config.PluginConfig} | 0 .../connection-pool-collect-plugin/pom.xml | 2 +- .../collector/DruidMetricCollector.java | 5 +- .../collector/DruidMetricProvider.java | 7 +- .../collect/config/DruidMonitorConfig.java | 4 +- .../DruidDataSourceStatManagerDefinition.java | 12 +- .../interceptor/AddDataSourceInterceptor.java | 8 +- .../RemoveDataSourceInterceptor.java | 8 +- .../collect/service/DruidMonitorService.java | 6 +- ...t.core.agent.definition.EnhanceDefinition} | 0 ...d.sermant.core.plugin.config.PluginConfig} | 0 .../databasepeer-parse-service/pom.xml | 2 +- .../service/DatabasePeerParseServiceImpl.java | 3 +- ...sermant.core.plugin.service.PluginService} | 0 .../monitor-common/pom.xml | 2 +- .../monitor/common/collect/CollectTask.java | 3 +- .../monitor/common/config/ServiceConfig.java | 4 +- .../service/DatabasePeerParseService.java | 2 +- ...d.sermant.core.plugin.config.PluginConfig} | 0 .../server-monitor-service/pom.xml | 2 +- .../collector/IbmJvmMetricCollector.java | 3 +- .../command/CommandExecutor.java | 3 +- .../command/CommonMonitorCommand.java | 7 +- .../servermonitor/command/CpuCommand.java | 6 +- .../config/ServerMonitorConfig.java | 5 +- .../provider/IbmJvmMetricProvider.java | 9 +- .../provider/OpenJvmMetricProvider.java | 9 +- .../provider/ServerMonitorMetricProvider.java | 9 +- .../servermonitor/service/MonitorService.java | 13 +- ...d.sermant.core.plugin.config.PluginConfig} | 0 ...sermant.core.plugin.service.PluginService} | 0 .../dubbo-registry-plugin/pom.xml | 2 +- .../alibaba/ServiceCenterRegistry.java | 3 +- .../apache/ServiceCenterRegistry.java | 3 +- .../registry/declarer/AbstractDeclarer.java | 6 +- .../declarer/ApplicationConfigDeclarer.java | 4 +- .../declarer/ConfigValidationDeclarer.java | 2 +- .../declarer/ExtensionLoaderDeclarer.java | 4 +- .../declarer/InterfaceConfigDeclarer.java | 4 +- .../declarer/MigrationRuleDeclarer.java | 2 +- .../MigrationRuleHandlerDeclarer.java | 4 +- .../declarer/RegistryConfigDeclarer.java | 5 +- .../declarer/RegistryProtocolDeclarer.java | 6 +- .../registry/declarer/SpringBootDeclarer.java | 4 +- .../ApplicationConfigInterceptor.java | 7 +- .../ConfigValidationInterceptor.java | 5 +- .../ExtensionLoaderInterceptor.java | 5 +- .../InterfaceConfigInterceptor.java | 7 +- .../MigrationRuleHandlerInterceptor.java | 7 +- .../interceptor/MigrationRuleInterceptor.java | 5 +- .../RegistryConfigInterceptor.java | 7 +- .../RegistryProtocolInterceptor.java | 5 +- .../interceptor/SpringBootInterceptor.java | 7 +- .../service/ApplicationConfigService.java | 2 +- .../service/RegistryConfigService.java | 2 +- .../registry/service/RegistryService.java | 2 +- .../dubbo/registry/utils/ReflectUtils.java | 5 +- ...core.plugin.agent.declarer.PluginDeclarer} | 0 .../ConfigValidationInterceptorTest.java | 3 +- .../ExtensionLoaderInterceptorTest.java | 2 +- .../MigrationRuleHandlerInterceptorTest.java | 3 +- .../MigrationRuleInterceptorTest.java | 3 +- .../RegistryConfigInterceptorTest.java | 2 +- .../dubbo/registry/RegistryFactoryTest.java | 4 +- .../RegistryProtocolInterceptorTest.java | 3 +- .../dubbo-registry-service/pom.xml | 2 +- .../service/ApplicationConfigServiceImpl.java | 3 +- .../service/RegistryConfigServiceImpl.java | 3 +- .../registry/service/RegistryServiceImpl.java | 13 +- ...sermant.core.plugin.service.PluginService} | 0 .../registry-common/pom.xml | 2 +- .../registry/config/RegisterConfig.java | 10 +- ...d.sermant.core.plugin.config.PluginConfig} | 0 .../spring-cloud-registry-plugin/pom.xml | 2 +- .../config/RegisterDynamicConfigSyncer.java | 15 +- .../declarers/ClientConfigDeclarer.java | 9 +- .../DiscoveryClientConfigurationDeclarer.java | 9 +- .../declarers/DiscoveryClientDeclarer.java | 9 +- .../declarers/RegistrationDeclarer.java | 9 +- .../declarers/ServerListDeclarer.java | 9 +- .../declarers/ServerListFilterDeclarer.java | 9 +- .../x/ZookeeperInstanceSupplierDeclarer.java | 9 +- .../health/ConsulHealthDeclarer.java | 9 +- .../health/ConsulWatchConDeclarer.java | 9 +- .../health/EurekaHealthDeclarer.java | 9 +- .../declarers/health/NacosHealthDeclarer.java | 9 +- .../health/ZookeeperHealthDeclarer.java | 9 +- .../handler/SingleStateCloseHandler.java | 3 +- .../interceptors/ClientConfigInterceptor.java | 2 +- .../ClientConfigurationInterceptor.java | 3 +- .../DiscoveryClientInterceptor.java | 7 +- .../interceptors/RegistrationInterceptor.java | 5 +- .../ServerListFilterInterceptor.java | 2 +- .../interceptors/ServerListInterceptor.java | 6 +- .../ZookeeperInstanceSupplierInterceptor.java | 3 +- .../health/ConsulHealthInterceptor.java | 5 +- .../health/ConsulWatchInterceptor.java | 3 +- .../health/ConsulWatchRequestInterceptor.java | 3 +- .../health/EurekaHealthInterceptor.java | 5 +- .../health/EurekaRegisterInterceptor.java | 3 +- .../health/NacosHealthInterceptor.java | 5 +- .../health/ZookeeperHealthInterceptor.java | 5 +- .../services/RegisterCenterService.java | 3 +- .../support/InstanceInterceptorSupport.java | 5 +- .../support/RegisterSwitchSupport.java | 7 +- .../huawei/registry/utils/CommonUtils.java | 3 +- .../com/huawei/registry/utils/HostUtils.java | 2 +- ...core.plugin.agent.declarer.PluginDeclarer} | 0 ...sermant.core.plugin.service.PluginService} | 0 .../spring-cloud-registry-service/pom.xml | 2 +- .../registry/service/client/ScClient.java | 13 +- .../impl/RegisterCenterServiceImpl.java | 5 +- .../service/register/RegisterManager.java | 3 +- ...sermant.core.plugin.service.PluginService} | 0 .../registry/service/client/BaseTest.java | 17 +- .../threadlocal-plugin/pom.xml | 2 +- .../lubanops/apm/plugin/common/Constant.java | 33 ++ .../ScheduledThreadPoolEnhance.java | 50 +++ .../plugin/threadlocal/ThreadPoolEnhance.java | 49 +++ .../threadlocal/ThreadPoolInterceptor.java | 27 +- .../lubanops/apm/plugin/common/Constant.java | 14 - .../ScheduledThreadPoolEnhance.java | 33 -- .../plugin/threadlocal/ThreadPoolEnhance.java | 32 -- ...nt.core.agent.definition.EnhanceDefinition | 2 - ...nt.core.agent.definition.EnhanceDefinition | 2 + 561 files changed, 2879 insertions(+), 2101 deletions(-) delete mode 100644 sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/tracing/common/SourceInfo.java delete mode 100644 sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/tracing/common/SpanEvent.java delete mode 100644 sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/tracing/common/TargetInfo.java delete mode 100644 sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/tracing/common/TracingRequest.java delete mode 100644 sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/tracing/sender/TracingMessage.java delete mode 100644 sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/tracing/sender/TracingMessageHeader.java rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/AgentCoreEntrance.java (83%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/agent/common/BeforeResult.java (96%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/agent/definition/EnhanceDefinition.java (91%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/agent/definition/MethodInterceptPoint.java (98%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/agent/interceptor/ConstructorInterceptor.java (95%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/agent/interceptor/InstanceMethodInterceptor.java (94%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/agent/interceptor/Interceptor.java (92%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/agent/interceptor/StaticMethodInterceptor.java (94%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/agent/matcher/AnnotationMatcher.java (96%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/agent/matcher/ClassMatcher.java (95%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/agent/matcher/ClassMatchers.java (95%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/agent/matcher/MultiClassMatcher.java (94%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/agent/matcher/NameMatcher.java (95%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/agent/matcher/NonNameMatcher.java (70%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/agent/matcher/PrefixMatcher.java (94%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/agent/matcher/SuperTypeMatcher.java (97%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/common/BootArgsIndexer.java (94%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/common/CommonConstant.java (98%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/common/LoggerFactory.java (98%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/config/ConfigManager.java (95%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/config/common/BaseConfig.java (76%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/config/common/ConfigFieldKey.java (91%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/config/common/ConfigTypeKey.java (91%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/config/strategy/LoadConfigStrategy.java (95%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/config/strategy/LoadPropertiesStrategy.java (93%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/config/strategy/LoadYamlStrategy.java (93%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/config/utils/ConfigFieldUtil.java (98%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/config/utils/ConfigKeyUtil.java (92%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/config/utils/ConfigValueUtil.java (98%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/exception/DupConfIndexException.java (96%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/exception/DupServiceException.java (95%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/exception/SchemaException.java (98%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/PluginManager.java (94%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/PluginSystemEntrance.java (86%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/adaptor/AdaptorManager.java (93%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/adaptor/collector/AdaptorCollector.java (85%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/adaptor/collector/AdaptorCollectorManager.java (89%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/adaptor/common/AdaptorConstants.java (94%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/adaptor/config/AdaptorConfig.java (88%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/adaptor/config/AdaptorSetting.java (96%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/adaptor/remapper/AdaptorRemapper.java (96%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/adaptor/remapper/AdaptorShader.java (98%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/adaptor/service/AdaptorService.java (95%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/adaptor/service/AdaptorServiceManager.java (97%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/agent/BufferedAgentBuilder.java (95%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/agent/ByteEnhanceManager.java (89%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/agent/annotations/BeanPropertyFlag.java (87%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/agent/annotations/BeanPropertyFlags.java (94%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/agent/collector/AbstractPluginCollector.java (88%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/agent/collector/DefaultPluginCollector.java (84%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/agent/collector/DeprecatedPluginCollector.java (77%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/agent/collector/PluginCollector.java (83%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/agent/collector/PluginCollectorManager.java (93%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/agent/config/AgentConfig.java (80%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/agent/declarer/AbstractPluginDeclarer.java (94%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/agent/declarer/AbstractPluginDescription.java (95%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/agent/declarer/InterceptDeclarer.java (94%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/agent/declarer/PluginDeclarer.java (87%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/agent/declarer/PluginDescription.java (94%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/agent/declarer/SuperTypeDeclarer.java (96%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/agent/entity/ExecuteContext.java (99%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/agent/interceptor/AbstractInterceptor.java (88%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/agent/interceptor/Interceptor.java (91%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/agent/matcher/ClassFuzzyMatcher.java (97%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/agent/matcher/ClassMatcher.java (99%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/agent/matcher/ClassTypeMatcher.java (94%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/agent/matcher/MethodMatcher.java (99%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/agent/matcher/MethodType.java (96%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/agent/template/AdviceConstTemplate.java (95%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/agent/template/AdviceMemberTemplate.java (95%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/agent/template/AdviceStaticTemplate.java (95%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/agent/template/BootstrapConstTemplate.java (92%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/agent/template/BootstrapMemberTemplate.java (93%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/agent/template/BootstrapStaticTemplate.java (93%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/agent/template/CommonBaseAdviser.java (94%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/agent/template/CommonConstAdviser.java (92%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/agent/template/CommonMethodAdviser.java (92%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/agent/template/ImplDelegator.java (97%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/agent/template/MethodKeyCreator.java (98%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/agent/transformer/AdviceTransformer.java (93%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/agent/transformer/BootstrapTransformer.java (94%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/classloader/PluginClassLoader.java (93%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/common/PluginConstant.java (97%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/common/PluginSchemaValidator.java (94%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/config/PluginConfig.java (87%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/config/PluginConfigManager.java (93%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/config/PluginSetting.java (96%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/config/ServiceMeta.java (92%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/converter/Converter.java (94%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/converter/YamlConverter.java (94%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/service/PluginService.java (87%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/service/PluginServiceManager.java (93%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/subscribe/AbstractGroupConfigSubscriber.java (88%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/subscribe/ConfigSubscriber.java (94%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/subscribe/CseGroupConfigSubscriber.java (88%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/plugin/subscribe/DefaultGroupConfigSubscriber.java (87%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/BaseService.java (88%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/ServiceManager.java (96%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/dynamicconfig/BufferedDynamicConfigService.java (92%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/dynamicconfig/DynamicConfigService.java (91%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/dynamicconfig/api/GroupService.java (85%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/dynamicconfig/api/KeyGroupService.java (92%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/dynamicconfig/api/KeyService.java (92%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/dynamicconfig/common/DynamicConfigEvent.java (98%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/dynamicconfig/common/DynamicConfigEventType.java (93%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/dynamicconfig/common/DynamicConfigListener.java (94%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/dynamicconfig/common/DynamicConfigServiceType.java (93%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/dynamicconfig/config/DynamicConfig.java (86%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/dynamicconfig/kie/KieDynamicConfigService.java (90%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/dynamicconfig/kie/client/AbstractClient.java (84%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/dynamicconfig/kie/client/Client.java (91%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/dynamicconfig/kie/client/ClientUrlManager.java (92%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/dynamicconfig/kie/client/http/DefaultHttpClient.java (96%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/dynamicconfig/kie/client/http/HttpClient.java (94%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/dynamicconfig/kie/client/http/HttpResult.java (97%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/dynamicconfig/kie/client/kie/KieClient.java (90%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/dynamicconfig/kie/client/kie/KieConfigEntity.java (96%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/dynamicconfig/kie/client/kie/KieListenerWrapper.java (92%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/dynamicconfig/kie/client/kie/KieRequest.java (97%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/dynamicconfig/kie/client/kie/KieResponse.java (95%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/dynamicconfig/kie/client/kie/KieSubscriber.java (97%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/dynamicconfig/kie/client/kie/ResultHandler.java (94%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/dynamicconfig/kie/config/KieDynamicConfig.java (83%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/dynamicconfig/kie/constants/KieConstants.java (92%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/dynamicconfig/kie/listener/KvDataHolder.java (95%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/dynamicconfig/kie/listener/SubscriberManager.java (94%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/dynamicconfig/kie/selector/SelectStrategy.java (96%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/dynamicconfig/kie/selector/Selector.java (93%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/dynamicconfig/kie/selector/url/UrlSelector.java (82%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/dynamicconfig/nop/NopDynamicConfigService.java (88%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/dynamicconfig/utils/LabelGroupUtils.java (97%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/dynamicconfig/zookeeper/ZooKeeperBufferedClient.java (98%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/dynamicconfig/zookeeper/ZooKeeperDynamicConfigService.java (94%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/dynamicconfig/zookeeper/ZooKeeperInitException.java (94%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/heartbeat/HeartbeatServiceImpl.java (84%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/heartbeat/api/ExtInfoProvider.java (94%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/heartbeat/api/HeartbeatService.java (85%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/heartbeat/common/HeartbeatConstant.java (94%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/heartbeat/common/HeartbeatMessage.java (89%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/heartbeat/config/HeartbeatConfig.java (79%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/send/ClientHandler.java (90%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/send/ClientManager.java (94%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/send/NettyClient.java (96%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/send/NettyClientFactory.java (91%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/send/NettyGatewayClient.java (81%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/send/Sender.java (94%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/send/api/GatewayClient.java (89%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/send/common/BaseHandler.java (96%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/send/common/ThreadPools.java (97%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/send/config/BackendConfig.java (51%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/tracing/TracingServiceImpl.java (90%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/tracing/api/ExtractService.java (90%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/tracing/api/InjectService.java (90%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/tracing/api/TracingService.java (88%) create mode 100644 sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/tracing/common/SourceInfo.java create mode 100644 sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/tracing/common/SpanEvent.java rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/tracing/common/SpanEventContext.java (83%) create mode 100644 sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/tracing/common/TargetInfo.java rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/tracing/common/TracingHeader.java (51%) create mode 100644 sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/tracing/common/TracingRequest.java create mode 100644 sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/tracing/sender/TracingMessage.java create mode 100644 sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/tracing/sender/TracingMessageHeader.java rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/service/tracing/sender/TracingSender.java (93%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/utils/AssertUtils.java (96%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/utils/ClassLoaderUtils.java (99%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/utils/FieldUtils.java (99%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/utils/FileUtils.java (98%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/utils/GzipUtils.java (95%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/utils/JarFileUtils.java (97%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/utils/MapUtils.java (97%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/utils/NetworkUtils.java (96%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/utils/SpiLoadUtils.java (98%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/utils/StringUtils.java (98%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/utils/ThreadFactoryUtils.java (98%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/utils/TimeUtils.java (94%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/utils/TracingUtils.java (54%) rename sermant-agentcore/sermant-agentcore-core/src/main/java/com/{huawei => huaweicloud}/sermant/core/utils/UuidUtil.java (96%) delete mode 100644 sermant-agentcore/sermant-agentcore-core/src/main/resources/META-INF/services/com.huawei.sermant.core.config.common.BaseConfig delete mode 100644 sermant-agentcore/sermant-agentcore-core/src/main/resources/META-INF/services/com.huawei.sermant.core.config.strategy.LoadConfigStrategy delete mode 100644 sermant-agentcore/sermant-agentcore-core/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.agent.collector.PluginCollector delete mode 100644 sermant-agentcore/sermant-agentcore-core/src/main/resources/META-INF/services/com.huawei.sermant.core.service.BaseService create mode 100644 sermant-agentcore/sermant-agentcore-core/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.config.common.BaseConfig create mode 100644 sermant-agentcore/sermant-agentcore-core/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.config.strategy.LoadConfigStrategy create mode 100644 sermant-agentcore/sermant-agentcore-core/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.agent.collector.PluginCollector create mode 100644 sermant-agentcore/sermant-agentcore-core/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.service.BaseService rename sermant-agentcore/sermant-agentcore-core/src/test/java/com/{huawei => huaweicloud}/sermant/core/service/dynamicconfig/BaseTest.java (83%) rename sermant-agentcore/sermant-agentcore-core/src/test/java/com/{huawei => huaweicloud}/sermant/core/service/dynamicconfig/KieDynamicConfigServiceTest.java (84%) rename sermant-agentcore/sermant-agentcore-core/src/test/java/com/{huawei => huaweicloud}/sermant/core/service/dynamicconfig/ZooKeeperDynamicConfigServiceTest.java (89%) rename sermant-agentcore/sermant-agentcore-core/src/test/java/com/{huawei => huaweicloud}/sermant/core/service/dynamicconfig/kie/LabelGroupUtilsTest.java (90%) rename sermant-agentcore/sermant-agentcore-core/src/test/java/com/{huawei => huaweicloud}/sermant/core/service/dynamicconfig/kie/PublishTest.java (58%) rename sermant-agentcore/sermant-agentcore-core/src/test/java/com/{huawei => huaweicloud}/sermant/core/service/send/NettyClientTest.java (64%) rename sermant-agentcore/sermant-agentcore-core/src/test/java/com/{huawei => huaweicloud}/sermant/core/service/tracing/TracingServiceImplTest.java (91%) rename sermant-agentcore/{sermant-agentcore-core/config => sermant-agentcore-premain/config/all}/config.properties (100%) rename sermant-agentcore/{sermant-agentcore-core => sermant-agentcore-premain}/config/all/plugins.yaml (100%) rename sermant-agentcore/{sermant-agentcore-core/config/all => sermant-agentcore-premain/config}/config.properties (100%) rename sermant-agentcore/{sermant-agentcore-core => sermant-agentcore-premain}/config/example/config.properties (100%) rename sermant-agentcore/{sermant-agentcore-core => sermant-agentcore-premain}/config/example/plugins.yaml (100%) rename sermant-agentcore/{sermant-agentcore-core => sermant-agentcore-premain}/config/logback.xml (76%) rename sermant-agentcore/{sermant-agentcore-core => sermant-agentcore-premain}/config/plugins.yaml (100%) rename sermant-example/demo-plugin/src/main/resources/META-INF/services/{com.huawei.sermant.core.plugin.agent.declarer.PluginDeclarer => com.huaweicloud.sermant.core.plugin.agent.declarer.PluginDeclarer} (100%) rename sermant-example/demo-plugin/src/main/resources/META-INF/services/{com.huawei.sermant.core.plugin.config.PluginConfig => com.huaweicloud.sermant.core.plugin.config.PluginConfig} (100%) rename sermant-example/demo-plugin/src/main/resources/META-INF/services/{com.huawei.sermant.core.plugin.service.PluginService => com.huaweicloud.sermant.core.plugin.service.PluginService} (100%) rename sermant-example/demo-service/src/main/resources/META-INF/services/{com.huawei.sermant.core.plugin.config.PluginConfig => com.huaweicloud.sermant.core.plugin.config.PluginConfig} (100%) rename sermant-example/demo-service/src/main/resources/META-INF/services/{com.huawei.sermant.core.plugin.service.PluginService => com.huaweicloud.sermant.core.plugin.service.PluginService} (100%) rename sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/resources/META-INF/services/{com.huawei.sermant.core.plugin.agent.declarer.PluginDeclarer => com.huaweicloud.sermant.core.plugin.agent.declarer.PluginDeclarer} (100%) rename sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/resources/META-INF/services/{com.huawei.sermant.core.plugin.config.PluginConfig => com.huaweicloud.sermant.core.plugin.config.PluginConfig} (100%) rename sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/resources/META-INF/services/{com.huawei.sermant.core.plugin.service.PluginService => com.huaweicloud.sermant.core.plugin.service.PluginService} (100%) rename sermant-plugins/sermant-flowcontrol/flowcontrol-service/src/main/resources/META-INF/services/{com.huawei.sermant.core.plugin.service.PluginService => com.huaweicloud.sermant.core.plugin.service.PluginService} (100%) rename sermant-plugins/sermant-loadbalancer/dubbo-loadbalancer-plugin/src/main/resources/META-INF/services/{com.huawei.sermant.core.plugin.agent.declarer.PluginDeclarer => com.huaweicloud.sermant.core.plugin.agent.declarer.PluginDeclarer} (100%) rename sermant-plugins/sermant-loadbalancer/loadbalancer-common/src/main/resources/META-INF/services/{com.huawei.sermant.core.plugin.config.PluginConfig => com.huaweicloud.sermant.core.plugin.config.PluginConfig} (100%) rename sermant-plugins/sermant-loadbalancer/loadbalancer-service/src/main/resources/META-INF/services/{com.huawei.sermant.core.plugin.service.PluginService => com.huaweicloud.sermant.core.plugin.service.PluginService} (100%) rename sermant-plugins/sermant-loadbalancer/spring-cloud-loadbalancer-plugin/src/main/resources/META-INF/services/{com.huawei.sermant.core.plugin.agent.declarer.PluginDeclarer => com.huaweicloud.sermant.core.plugin.agent.declarer.PluginDeclarer} (100%) rename sermant-plugins/sermant-luban-adaptor/src/main/resources/META-INF/services/{com.huawei.sermant.core.plugin.adaptor.collector.AdaptorCollector => com.huaweicloud.sermant.core.plugin.adaptor.collector.AdaptorCollector} (100%) rename sermant-plugins/sermant-luban-adaptor/src/main/resources/META-INF/services/{com.huawei.sermant.core.plugin.adaptor.service.AdaptorService => com.huaweicloud.sermant.core.plugin.adaptor.service.AdaptorService} (100%) rename sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/resources/META-INF/services/{com.huawei.sermant.core.plugin.agent.declarer.PluginDeclarer => com.huaweicloud.sermant.core.plugin.agent.declarer.PluginDeclarer} (100%) rename sermant-plugins/sermant-route/gray-dubbo-service/src/main/resources/META-INF/services/{com.huawei.sermant.core.plugin.service.PluginService => com.huaweicloud.sermant.core.plugin.service.PluginService} (100%) rename sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/resources/META-INF/services/{com.huawei.sermant.core.agent.definition.EnhanceDefinition => com.huaweicloud.sermant.core.agent.definition.EnhanceDefinition} (100%) rename sermant-plugins/sermant-route/gray-feign-http-9.x-service/src/main/resources/META-INF/services/{com.huawei.sermant.core.plugin.service.PluginService => com.huaweicloud.sermant.core.plugin.service.PluginService} (100%) rename sermant-plugins/sermant-route/route-common/src/main/resources/META-INF/services/{com.huawei.sermant.core.plugin.config.PluginConfig => com.huaweicloud.sermant.core.plugin.config.PluginConfig} (100%) rename sermant-plugins/sermant-server-monitor/connection-pool-collect-plugin/src/main/resources/META-INF/services/{com.huawei.sermant.core.agent.definition.EnhanceDefinition => com.huaweicloud.sermant.core.agent.definition.EnhanceDefinition} (100%) rename sermant-plugins/sermant-server-monitor/connection-pool-collect-plugin/src/main/resources/META-INF/services/{com.huawei.sermant.core.plugin.config.PluginConfig => com.huaweicloud.sermant.core.plugin.config.PluginConfig} (100%) rename sermant-plugins/sermant-server-monitor/databasepeer-parse-service/src/main/resources/META-INF/services/{com.huawei.sermant.core.plugin.service.PluginService => com.huaweicloud.sermant.core.plugin.service.PluginService} (100%) rename sermant-plugins/sermant-server-monitor/monitor-common/src/main/resources/META-INF/services/{com.huawei.sermant.core.plugin.config.PluginConfig => com.huaweicloud.sermant.core.plugin.config.PluginConfig} (100%) rename sermant-plugins/sermant-server-monitor/server-monitor-service/src/main/resources/META-INF/services/{com.huawei.sermant.core.plugin.config.PluginConfig => com.huaweicloud.sermant.core.plugin.config.PluginConfig} (100%) rename sermant-plugins/sermant-server-monitor/server-monitor-service/src/main/resources/META-INF/services/{com.huawei.sermant.core.plugin.service.PluginService => com.huaweicloud.sermant.core.plugin.service.PluginService} (100%) rename sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/resources/META-INF/services/{com.huawei.sermant.core.plugin.agent.declarer.PluginDeclarer => com.huaweicloud.sermant.core.plugin.agent.declarer.PluginDeclarer} (100%) rename sermant-plugins/sermant-service-registry/dubbo-registry-service/src/main/resources/META-INF/services/{com.huawei.sermant.core.plugin.service.PluginService => com.huaweicloud.sermant.core.plugin.service.PluginService} (100%) rename sermant-plugins/sermant-service-registry/registry-common/src/main/resources/META-INF/services/{com.huawei.sermant.core.plugin.config.PluginConfig => com.huaweicloud.sermant.core.plugin.config.PluginConfig} (100%) rename sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/resources/META-INF/services/{com.huawei.sermant.core.plugin.agent.declarer.PluginDeclarer => com.huaweicloud.sermant.core.plugin.agent.declarer.PluginDeclarer} (100%) rename sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/resources/META-INF/services/{com.huawei.sermant.core.plugin.service.PluginService => com.huaweicloud.sermant.core.plugin.service.PluginService} (100%) rename sermant-plugins/sermant-service-registry/spring-cloud-registry-service/src/main/resources/META-INF/services/{com.huawei.sermant.core.plugin.service.PluginService => com.huaweicloud.sermant.core.plugin.service.PluginService} (100%) create mode 100644 sermant-plugins/sermant-threadlocal/threadlocal-plugin/src/main/java/com/huawei/lubanops/apm/plugin/common/Constant.java create mode 100644 sermant-plugins/sermant-threadlocal/threadlocal-plugin/src/main/java/com/huawei/lubanops/apm/plugin/threadlocal/ScheduledThreadPoolEnhance.java create mode 100644 sermant-plugins/sermant-threadlocal/threadlocal-plugin/src/main/java/com/huawei/lubanops/apm/plugin/threadlocal/ThreadPoolEnhance.java rename sermant-plugins/sermant-threadlocal/threadlocal-plugin/src/main/java/com/{ => huawei}/lubanops/apm/plugin/threadlocal/ThreadPoolInterceptor.java (54%) delete mode 100644 sermant-plugins/sermant-threadlocal/threadlocal-plugin/src/main/java/com/lubanops/apm/plugin/common/Constant.java delete mode 100644 sermant-plugins/sermant-threadlocal/threadlocal-plugin/src/main/java/com/lubanops/apm/plugin/threadlocal/ScheduledThreadPoolEnhance.java delete mode 100644 sermant-plugins/sermant-threadlocal/threadlocal-plugin/src/main/java/com/lubanops/apm/plugin/threadlocal/ThreadPoolEnhance.java delete mode 100644 sermant-plugins/sermant-threadlocal/threadlocal-plugin/src/main/resources/META-INF/services/com.huawei.sermant.core.agent.definition.EnhanceDefinition create mode 100644 sermant-plugins/sermant-threadlocal/threadlocal-plugin/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.agent.definition.EnhanceDefinition diff --git a/docs/dev-guide/dev_plugin_code.md b/docs/dev-guide/dev_plugin_code.md index b5909207b2..6e2bc08fe0 100644 --- a/docs/dev-guide/dev_plugin_code.md +++ b/docs/dev-guide/dev_plugin_code.md @@ -29,7 +29,7 @@ 考虑到后三者随实际业务场景不同有较大变化,因此赋予他们的开发自由度较高,对他们仅有模块目录和输出目录的限制。出于这点考虑,`示例模块`将不对他们做参考案例。`示例模块`中包含以下模块: -- [demo-plugin](../../sermant-plugins/sermant-example/demo-plugin): 示例插件 +- [demo-plugin](../../sermant-example/demo-plugin): 示例插件 - [demo-service](../../sermant-plugins/sermant-example/demo-service): 示例插件服务 - [demo-application](../../sermant-plugins/sermant-example/demo-application): 示例宿主应用 @@ -43,15 +43,15 @@ **Sermant**的核心能力是对宿主应用做非侵入式的字节码增强,而这些增强规则则是插件化的。在每个**Sermant**的`插件主模块(main)`中,都可以定义一些增强定义,针对宿主应用的某些特定方法进行字节码增强,从而实现某种功能。因此`插件主模块(main)`如何告知**Sermant**该增强哪些类,是一个重要的课题。 -插件的增强定义需要实现[PluginDeclarer](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/declarer/PluginDeclarer.java)接口,其中包含两个接口方法: +插件的增强定义需要实现[PluginDeclarer](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/declarer/PluginDeclarer.java)接口,其中包含两个接口方法: -- `getClassMatcher`方法用于获取被增强类的匹配器[ClassMatcher](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/matcher/ClassMatcher.java)。 -- `getInterceptDeclarers`方法用于获取被增强类的拦截点方法,以及嵌入其中的拦截器,他们封装于方法拦截点[InterceptDeclarer](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/declarer/InterceptDeclarer.java)中。 -- `getSuperTpeDecarers`方法用于获取插件的超类声明[SuperTypeDeclarer](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/declarer/SuperTypeDeclarer.java) +- `getClassMatcher`方法用于获取被增强类的匹配器[ClassMatcher](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/matcher/ClassMatcher.java)。 +- `getInterceptDeclarers`方法用于获取被增强类的拦截点方法,以及嵌入其中的拦截器,他们封装于方法拦截点[InterceptDeclarer](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/declarer/InterceptDeclarer.java)中。 +- `getSuperTpeDecarers`方法用于获取插件的超类声明[SuperTypeDeclarer](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/declarer/SuperTypeDeclarer.java) -对匹配器 [ClassMatcher](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/matcher/ClassMatcher.java),在核心模块中提供了两种类型的匹配器: +对匹配器 [ClassMatcher](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/matcher/ClassMatcher.java),在核心模块中提供了两种类型的匹配器: -[ClassTypeMatcher](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/matcher/ClassTypeMatcher.java)(类的类型匹配器) +[ClassTypeMatcher](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/matcher/ClassTypeMatcher.java)(类的类型匹配器) - 完全通过名称匹配,也是最常见的定位方式,通过以下方法获取: ```java @@ -66,7 +66,7 @@ ``` 其中`${class reference array}`为被增强类的全限定名可变数组。 -[ClassFuzzyMatcher](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/matcher/ClassFuzzyMatcher.java)(类的模糊匹配器) +[ClassFuzzyMatcher](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/matcher/ClassFuzzyMatcher.java)(类的模糊匹配器) - 通过全限定名前缀定位到被增强类,可通过以下方法获取: ```java @@ -130,7 +130,7 @@ ``` 其中`${class matcher array}`为匹配器可变长数组 -对于方法拦截点[MethodMatcher](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/matcher/MethodMatcher.java),提供了多种匹配方法: +对于方法拦截点[MethodMatcher](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/matcher/MethodMatcher.java),提供了多种匹配方法: - 全数匹配: ```java @@ -239,16 +239,16 @@ 开发到最后,不要忘记添加`PluginDeclarer`接口的*SPI*配置文件: - 在资源目录`resources`下添加`META-INF/services`文件夹。 -- 在`META-INF/services`中添加`com.huawei.sermant.core.plugin.agent.declarer.PluginDeclarer`配置文件。 +- 在`META-INF/services`中添加`com.huaweicloud.sermant.core.plugin.agent.declarer.PluginDeclarer`配置文件。 - 在上述文件中,以换行为分隔,键入插件包中所有的增强定义`PluginDeclarer`实现。 **Sermant**的`示例模块`中包含以下`PluginDeclarer`接口的实现示例: -- [DemoAnnotationDeclarer](../../sermant-plugins/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoAnnotationDeclarer.java): 通过注解定位被修饰类的普通增强定义 -- [DemoNameDeclarer](../../sermant-plugins/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoNameDeclarer.java): 通过名称定位到被增强类的普通增强定义 -- [DemoSuperTypeDeclarer](../../sermant-plugins/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoSuperTypeDeclarer.java): 通过超类定位到被增强子类的普通增强定义 -- [DemoBootstrapDeclarer](../../sermant-plugins/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoBootstrapDeclarer.java): 对启动类加载器进行增强的定义,详见[原生类增强](#原生类增强)一节 -- [DemoTraceDeclarer](../../sermant-plugins/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoTraceDeclarer.java): 对示例应用使用链路功能的增强定义,详见[链路功能](#链路功能)一节 +- [DemoAnnotationDeclarer](../../sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoAnnotationDeclarer.java): 通过注解定位被修饰类的普通增强定义 +- [DemoNameDeclarer](../../sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoNameDeclarer.java): 通过名称定位到被增强类的普通增强定义 +- [DemoSuperTypeDeclarer](../../sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoSuperTypeDeclarer.java): 通过超类定位到被增强子类的普通增强定义 +- [DemoBootstrapDeclarer](../../sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoBootstrapDeclarer.java): 对启动类加载器进行增强的定义,详见[原生类增强](#原生类增强)一节 +- [DemoTraceDeclarer](../../sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoTraceDeclarer.java): 对示例应用使用链路功能的增强定义,详见[链路功能](#链路功能)一节 在各插件开发者在编写插件增强定义的时候,可以以以上示例为参考,开发符合自身需要的增强定义。 @@ -256,9 +256,9 @@ 对于`java.lang.Thread`等*Java*原生类,他们由启动类加载器`BootStrapClassLoader`加载,对他们进行增强的话,主要会面临两个困难: -- 原生类被启动类加载器加载,那么如果对他们做增强的话,就需要将被增强后的字节码重新覆盖回启动类加载器中。考虑到增强后的嵌入代码主要是在**拦截器**中编写的,而这些内容主要由系统类加载器`AppClassLoader`加载,启动类加载器无法访问。得益于[**Advice模板类**](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/template)中使用反射调用拦截器的方法,使得原生类在增强时,编写的拦截器不受拘束。 +- 原生类被启动类加载器加载,那么如果对他们做增强的话,就需要将被增强后的字节码重新覆盖回启动类加载器中。考虑到增强后的嵌入代码主要是在**拦截器**中编写的,而这些内容主要由系统类加载器`AppClassLoader`加载,启动类加载器无法访问。得益于[**Advice模板类**](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/template)中使用反射调用拦截器的方法,使得原生类在增强时,编写的拦截器不受拘束。 -- 鉴于*Java*重定义*Class*的限制,我们无法修改这些原生类的元信息,那么就无法使用[**byte-buddy委派**](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/transformer/DelegateTransformer.java)的方式对他们进行增强(原理是添加委派属性和静态代码块)。所幸我们可以使用[**Advice模板类**](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/template)配合[**byte-buddy advice**](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/transformer/BootstrapTransformer.java)技术进行增强,而现在**核心模块**就是这么做的。两种风格统合之后,前者用于处理系统类加载器加载的普通类,后者用于处理启动类加载器的原生类。 +- 鉴于*Java*重定义*Class*的限制,我们无法修改这些原生类的元信息,那么就无法使用[**byte-buddy委派**](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/transformer/DelegateTransformer.java)的方式对他们进行增强(原理是添加委派属性和静态代码块)。所幸我们可以使用[**Advice模板类**](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/template)配合[**byte-buddy advice**](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/transformer/BootstrapTransformer.java)技术进行增强,而现在**核心模块**就是这么做的。两种风格统合之后,前者用于处理系统类加载器加载的普通类,后者用于处理启动类加载器的原生类。 结合上述内容,其实增强原生类和增强普通类在增强定义和拦截器编写上没有什么区别,但是还是希望插件开发者尽量少地对原生类进行增强,原因有三: @@ -268,25 +268,25 @@ 综上,[**Sermant**核心功能模块](../../sermant-agentcore/sermant-agentcore-core)中提供对*Java*原生类增强的能力,但是,不建议不加限制地对他们进行增强,如果有多个增强点可选,优先考虑增强普通类。 -**Sermant**的`示例模块`中,[DemoBootstrapDeclarer](../../sermant-plugins/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoBootstrapDeclarer.java)对`java.lang.Thread`做了增强,可以启动示例应用[DemoApplication](../../sermant-plugins/sermant-example/demo-application/src/main/java/com/huawei/example/demo/DemoApplication.java)观察`java.lang.Thread`是否被正常增强。 +**Sermant**的`示例模块`中,[DemoBootstrapDeclarer](../../sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoBootstrapDeclarer.java)对`java.lang.Thread`做了增强,可以启动示例应用[DemoApplication](../../sermant-plugins/sermant-example/demo-application/src/main/java/com/huawei/example/demo/DemoApplication.java)观察`java.lang.Thread`是否被正常增强。 ### 拦截器 新版插件的开发中在拦截器层面不再对静态方法、构造函数和实例方法作区分,降低插件开发的复杂度 对于方法拦截点`MethodInterceptPoint`,有静态方法、构造函数和实例方法三种获取类型,对应的拦截器也有三种类型: -- [InterCeptor](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/interceptor/Interceptor.java): 拦截器接口,其中包含三个方法: +- [InterCeptor](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/interceptor/Interceptor.java): 拦截器接口,其中包含三个方法: - `before`,前置方法,该方法在拦截点之前执行。ExecuteContext参数为插件执行的上下文,里面封装拦截器运作所需的所有参数,通过skip方法可跳过主要流程,并设置最终方法结果,注意,增强构造函数时,不能跳过主要流程 - `after`,后置方法,无论被拦截方法是否正常执行,最后都会进入后置方法中。后置方法可以通过返回值覆盖被拦截方法的返回值,因此这里开发者需要注意不要轻易返回null。 - `onThrow`,处理异常的方法,当被拦截方法执行异常时触发。这里处理异常并不会影响异常的正常抛出。 **Sermant**的`示例模块`中包含以下拦截器示例: -- [DemoStaticInterceptor](../../sermant-plugins/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoStaticInterceptor.java): 普通的静态方法拦截器 -- [DemoConstInterceptor](../../sermant-plugins/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoConstInterceptor.java): 普通的构造函数拦截器 -- [DemoMemberInterceptor](../../sermant-plugins/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoMemberInterceptor.java): 普通的实例方法拦截器 -- [DemoConfigInterceptor](../../sermant-plugins/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoConfigInterceptor.java): 插件配置使用示例拦截器,详见[插件配置](#插件配置)一节 -- [DemoServiceInterceptor](../../sermant-plugins/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoServiceInterceptor.java): 插件服务使用示例拦截器,详见[插件服务](#插件服务)一节 +- [DemoStaticInterceptor](../../sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoStaticInterceptor.java): 普通的静态方法拦截器 +- [DemoConstInterceptor](../../sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoConstInterceptor.java): 普通的构造函数拦截器 +- [DemoMemberInterceptor](../../sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoMemberInterceptor.java): 普通的实例方法拦截器 +- [DemoConfigInterceptor](../../sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoConfigInterceptor.java): 插件配置使用示例拦截器,详见[插件配置](#插件配置)一节 +- [DemoServiceInterceptor](../../sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoServiceInterceptor.java): 插件服务使用示例拦截器,详见[插件服务](#插件服务)一节 在各插件开发者在编写自定义拦截器的时候,可以以以上示例为参考,开发满足自身功能需要的拦截器。 @@ -294,14 +294,14 @@ **插件配置**指的是在插件包和插件服务包使用的配置系统,主要由三部分组成: -- [PluginConfig](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/config/PluginConfig.java)插件配置接口: 所有普通的插件配置都要实现该接口。 -- [AliaConfig](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/config/AliaConfig.java)别名插件配置抽象类: 在插件配置`PluginConfig`的基础上,如果需要设定拦截器别名,则改为继承该抽象类。 -- [PluginConfigManager](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/config/PluginConfigManager.java)插件配置管理器: 提供获取插件配置`PluginConfig`的接口: +- [PluginConfig](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/config/PluginConfig.java)插件配置接口: 所有普通的插件配置都要实现该接口。 +- [AliaConfig](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/config/AliaConfig.java)别名插件配置抽象类: 在插件配置`PluginConfig`的基础上,如果需要设定拦截器别名,则改为继承该抽象类。 +- [PluginConfigManager](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/config/PluginConfigManager.java)插件配置管理器: 提供获取插件配置`PluginConfig`的接口: ```java // ${plugin config class}为插件配置的Class PluginConfigManager.getPluginConfig(${plugin config class}); ``` - `PluginConfigManager`是统一配置管理器[ConfigManager](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/config/ConfigManager.java)的特例,插件端可以直接使用后者的接口获取插件配置和统一配置: + `PluginConfigManager`是统一配置管理器[ConfigManager](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/config/ConfigManager.java)的特例,插件端可以直接使用后者的接口获取插件配置和统一配置: ```java // ${base config class}为统一配置或插件配置的Class ConfigManager.getConfig(${base config class}); @@ -309,15 +309,15 @@ 从**Sermant**的`示例模块`的插件配置文件[config.yaml](../../sermant-plugins/sermant-example/config/config.yaml)可以看出,该配置文件是一个*yaml*文件,一个`插件主模块(main)`的`插件模块(plugin)`和`服务模块(service)`中的插件配置对应的配置信息都封装在这唯一的`config.yaml`中。 -相较于传统的*yaml*格式配置文件对应一个*Java Pojo*对象,这里的`config.yaml`可以封装多个*Java Pojo*,他们由全限定名或别名进行区分,形成类似*Map*的结构,其中`demo.test`键对应的是**示例插件包**中的[DemoConfig](../../sermant-plugins/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/config/DemoConfig.java)对象,`com.huawei.example.demo.config.DemoServiceConfig`键对应的是**示例插件服务包**中的[DemoServiceConfig](../../sermant-plugins/sermant-example/demo-service/src/main/java/com/huawei/example/demo/config/DemoServiceConfig.java)对象。 +相较于传统的*yaml*格式配置文件对应一个*Java Pojo*对象,这里的`config.yaml`可以封装多个*Java Pojo*,他们由全限定名或别名进行区分,形成类似*Map*的结构,其中`demo.test`键对应的是**示例插件包**中的[DemoConfig](../../sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/config/DemoConfig.java)对象,`com.huawei.example.demo.config.DemoServiceConfig`键对应的是**示例插件服务包**中的[DemoServiceConfig](../../sermant-plugins/sermant-example/demo-service/src/main/java/com/huawei/example/demo/config/DemoServiceConfig.java)对象。 -[DemoConfig](../../sermant-plugins/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/config/DemoConfig.java)相较于`DemoServiceConfig`,前者被[ConfigTypeKey](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/config/common/ConfigTypeKey.java)注解修饰,因此设定了`demo.test`的别名。如果没有被`ConfigTypeKey`注解修饰,则直接使用全限定名做索引。 +[DemoConfig](../../sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/config/DemoConfig.java)相较于`DemoServiceConfig`,前者被[ConfigTypeKey](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/config/common/ConfigTypeKey.java)注解修饰,因此设定了`demo.test`的别名。如果没有被`ConfigTypeKey`注解修饰,则直接使用全限定名做索引。 -[DemoConfig](../../sermant-plugins/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/config/DemoConfig.java)继承了[AliaConfig](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/config/AliaConfig.java),因此他自动继承了`pluginName`和`interceptors`两个属性,有对拦截器起别名的能力,这些配置在[config.yaml](../../sermant-plugins/sermant-example/config/config.yaml)中清晰可见,不做赘述。 +[DemoConfig](../../sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/config/DemoConfig.java)继承了[AliaConfig](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/config/AliaConfig.java),因此他自动继承了`pluginName`和`interceptors`两个属性,有对拦截器起别名的能力,这些配置在[config.yaml](../../sermant-plugins/sermant-example/config/config.yaml)中清晰可见,不做赘述。 -[DemoConfig](../../sermant-plugins/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/config/DemoConfig.java)中的`map`属性被[ConfigFieldKey](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/config/common/ConfigFieldKey.java)注解修饰,将其属性名修改为`str2DemoSimplePojoMap`。不过需要注意的是,使用该注解的**Java Pojo**如果被数组、*List*或*Map*包装了一层,该注解的语义无效,因此,目前该注解只能用于修饰当前**插件配置类**或直接使用的**Java Pojo**。 +[DemoConfig](../../sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/config/DemoConfig.java)中的`map`属性被[ConfigFieldKey](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/config/common/ConfigFieldKey.java)注解修饰,将其属性名修改为`str2DemoSimplePojoMap`。不过需要注意的是,使用该注解的**Java Pojo**如果被数组、*List*或*Map*包装了一层,该注解的语义无效,因此,目前该注解只能用于修饰当前**插件配置类**或直接使用的**Java Pojo**。 -从[DemoConfig](../../sermant-plugins/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/config/DemoConfig.java)中可以看出,插件配置现在支持的数据类型包括: +从[DemoConfig](../../sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/config/DemoConfig.java)中可以看出,插件配置现在支持的数据类型包括: - 布尔、数值类的基础类型及包装类型 - 字符串类型 @@ -333,25 +333,25 @@ - 对于数组、List和Map中的字符串,不支持`${}`转换,**插件配置类**的字符串属性和复杂类型属性内部的字符串属性支持 - 仅在字符串做`${}`转换时使用入参,不支持使用入参直接设置属性值 -[DemoConfig](../../sermant-plugins/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/config/DemoConfig.java)中已经包含了大部分可能的配置场景,插件开发者可以与之参考,编写符合自身业务需求的插件配置类。 +[DemoConfig](../../sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/config/DemoConfig.java)中已经包含了大部分可能的配置场景,插件开发者可以与之参考,编写符合自身业务需求的插件配置类。 最后,不要忘记添加插件配置的*SPI*配置文件: - 在资源目录`resources`下添加`META-INF/services`文件夹。 -- 在`META-INF/services`中添加`com.huawei.sermant.core.plugin.config.PluginConfig`配置文件。 +- 在`META-INF/services`中添加`com.huaweicloud.sermant.core.plugin.config.PluginConfig`配置文件。 - 在上述文件中,以换行为分隔,键入插件包中所有的插件配置`PluginConfig`或`AliaConfig`实现。 ### 插件服务 **插件服务**指的是在插件包和插件服务包使用的服务系统,主要由两部分组成: -- [PluginService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/service/PluginService.java)插件服务接口。 -- [PluginServiceManager](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/service/PluginServiceManager.java)插件服务管理器,其中提供获取`PluginService`的接口: +- [PluginService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/service/PluginService.java)插件服务接口。 +- [PluginServiceManager](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/service/PluginServiceManager.java)插件服务管理器,其中提供获取`PluginService`的接口: ```java // ${plugin service class}为插件服务的Class PluginServiceManager.getPluginService(${plugin service class}); ``` - `PluginServiceManager`其实只是[ServiceManager](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/ServiceManager.java)的一个特例,可以直接使用后者的接口获取核心服务和插件服务: + `PluginServiceManager`其实只是[ServiceManager](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/ServiceManager.java)的一个特例,可以直接使用后者的接口获取核心服务和插件服务: ```java // ${base service class}为核心服务或插件服务的Class ServiceManager.getService(${base service class}); @@ -364,7 +364,7 @@ #### 简单插件服务 -对于**简单插件服务**,实现[PluginService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/service/PluginService.java)接口即可,如[DemoSimpleService](../../sermant-plugins/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/service/DemoSimpleService.java)示例,在实现`start`方法和`stop`方法的基础上,可以添加其他所需的方法,如`activeFunc`方法,通过以下代码获得`DemoSimpleService`的示例并调用`activeFunc`方法: +对于**简单插件服务**,实现[PluginService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/service/PluginService.java)接口即可,如[DemoSimpleService](../../sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/service/DemoSimpleService.java)示例,在实现`start`方法和`stop`方法的基础上,可以添加其他所需的方法,如`activeFunc`方法,通过以下代码获得`DemoSimpleService`的示例并调用`activeFunc`方法: ```java DemoSimpleService simpleService = PluginServiceManager.getPluginService(DemoSimpleService.class); simpleService.activeFunc(); @@ -372,12 +372,12 @@ simpleService.activeFunc(); 对于**简单插件服务**来说,唯一的限制就是只能使用*Java*原生*API*,[**Sermant**核心功能模块](../../sermant-agentcore/sermant-agentcore-core)中自研的*API*(`com.huawei`开头),以及`byte-buddy`和`slf4j`的*API*。 -插件开发者可以参照[DemoSimpleService](../../sermant-plugins/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/service/DemoSimpleService.java),按需编写自身业务所需的**简单插件服务**。 +插件开发者可以参照[DemoSimpleService](../../sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/service/DemoSimpleService.java),按需编写自身业务所需的**简单插件服务**。 -最后不要忘记添加[PluginService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/service/PluginService.java)的*SPI*配置文件: +最后不要忘记添加[PluginService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/service/PluginService.java)的*SPI*配置文件: - 在资源目录`resources`下添加`META-INF/services`文件夹。 -- 在`META-INF/services`中添加`com.huawei.sermant.core.plugin.service.PluginService`配置文件。 +- 在`META-INF/services`中添加`com.huaweicloud.sermant.core.plugin.service.PluginService`配置文件。 - 在上述文件中,以换行为分隔,键入插件包中所有的插件服务`PluginService`实现。 特别需要注意的是,不要尝试在`PluginService`的`start`方法中获取其他**插件服务**的实例,由于**插件服务**仍在初始化当中,可能无法正确获取这些**插件服务**实例。 @@ -389,7 +389,7 @@ simpleService.activeFunc(); - **复杂插件服务**在`插件模块(plugin)`中编写接口,在[`服务模块(service)`](#插件服务模块)中编写实现,而**简单插件服务**不需要编写接口,直接在`插件模块(plugin)`中实现。 - **复杂插件服务**的实现可以按需使用任意第三方依赖。 -[DemoComplexService](../../sermant-plugins/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/service/DemoComplexService.java)是**复杂插件服务**示例接口,其中可以按需添加接口,如`activeFunc`方法,[DemoComplexServiceImpl](../../sermant-plugins/sermant-example/demo-service/src/main/java/com/huawei/example/demo/service/DemoComplexServiceImpl.java)是对应的实现。我们可以通过以下代码调用`activeFunc`方法: +[DemoComplexService](../../sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/service/DemoComplexService.java)是**复杂插件服务**示例接口,其中可以按需添加接口,如`activeFunc`方法,[DemoComplexServiceImpl](../../sermant-plugins/sermant-example/demo-service/src/main/java/com/huawei/example/demo/service/DemoComplexServiceImpl.java)是对应的实现。我们可以通过以下代码调用`activeFunc`方法: ```java DemoComplexService complexService = PluginServiceManager.getPluginService(DemoComplexService.class); complexService.activeFunc(); @@ -403,11 +403,11 @@ complexService.activeFunc(); ```java -import com.huawei.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.common.LoggerFactory; Logger logger=LoggerFactory.getLogger(); ``` -插件开发者如果需要输出日志信息,可以参考[DemoLogger](../../sermant-plugins/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/common/DemoLogger.java)示例开发。 +插件开发者如果需要输出日志信息,可以参考[DemoLogger](../../sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/common/DemoLogger.java)示例开发。 #### 心跳功能 @@ -439,7 +439,7 @@ heartbeatService.setExtInfo(new ExtInfoProvider() { }); ``` -插件开发者如果需要往心跳功能发送的数据包中增加额外内容,可以参考[DemoHeartBeatService](../../sermant-plugins/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/service/DemoHeartBeatService.java)示例开发。 +插件开发者如果需要往心跳功能发送的数据包中增加额外内容,可以参考[DemoHeartBeatService](../../sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/service/DemoHeartBeatService.java)示例开发。 更多心跳服务相关内容可参见[心跳服务介绍](service_heartbeat.md)。 @@ -452,8 +452,8 @@ heartbeatService.setExtInfo(new ExtInfoProvider() { 在示例宿主的[DemoTraceService](../../sermant-plugins/sermant-example/demo-application/src/main/java/com/huawei/example/demo/service/DemoTraceService.java)中,`counsumer`方法和`provider`方法模仿服务器接收数据并处理发送数据的流程,而数据包则假定存在一个`ThreadLocal`中,直到下一次调用`provider`方法接收数据。 -基于上述示例宿主,我们编写[DemoTraceDeclarer](../../sermant-plugins/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoTraceDeclarer.java)增强定义 -,对`DemoTraceService`的`provider`方法和`consumer`方法分别使用使用[DemoTraceProviderInterceptor](../../sermant-plugins/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoTraceProviderInterceptor.java)和[DemoTraceConsumerInterceptor](../../sermant-plugins/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoTraceConsumerInterceptor.java)拦截器进行增强。 +基于上述示例宿主,我们编写[DemoTraceDeclarer](../../sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoTraceDeclarer.java)增强定义 +,对`DemoTraceService`的`provider`方法和`consumer`方法分别使用使用[DemoTraceProviderInterceptor](../../sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoTraceProviderInterceptor.java)和[DemoTraceConsumerInterceptor](../../sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoTraceConsumerInterceptor.java)拦截器进行增强。 - 对于发送`provider`方法,做如下增强: ```java @@ -514,7 +514,7 @@ heartbeatService.setExtInfo(new ExtInfoProvider() { } ``` **Sermant**的`示例模块`这里只是简单地抛砖引玉。 - 如果插件开发者需要使用链路功能,参照[DemoTraceInterceptor](../../sermant-plugins/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoTraceInterceptor.java)自行开发。 + 如果插件开发者需要使用链路功能,参照[DemoTraceInterceptor](../../sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoTraceInterceptor.java)自行开发。 ### 动态配置功能 @@ -538,7 +538,7 @@ service.addConfigListener("${key}", "${group}", new DynamicConfigListener() { 注册监听器之后,当服务器对应节点发生创建、删除、修改、添加子节点等事件时,就会触发`process`函数。 -插件开发者如果需要使用动态配置,可以参考[DemoDynaConfService](../../sermant-plugins/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/service/DemoDynaConfService.java)示例开发。 +插件开发者如果需要使用动态配置,可以参考[DemoDynaConfService](../../sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/service/DemoDynaConfService.java)示例开发。 更多动态配置服务相关内容可参见[动态配置服务介绍](service_dynamicconfig.md)。 diff --git a/docs/dev-guide/dev_plugin_module.md b/docs/dev-guide/dev_plugin_module.md index 5e60dc4f59..678404f4dd 100644 --- a/docs/dev-guide/dev_plugin_module.md +++ b/docs/dev-guide/dev_plugin_module.md @@ -95,7 +95,7 @@ `插件模块(plugin)`的定位是定义宿主应用的增强逻辑,考虑到依赖冲突的问题,其增强的字节码中不能涉及对`byte-buddy`和`slf4j`以外的第三方依赖的使用,这时就需要分两种情况讨论: - 对于简单的插件,其中编写的插件服务只会使用核心包中的自研功能,不涉及需要依赖其他第三方依赖的复杂功能时,那么只需要开发`插件模块(plugin)`即可。`插件模块(plugin)`将被系统类加载器`AppClassLoader`加载。 -- 对于一些复杂的插件,如果需要依赖其他第三方依赖的复杂功能时,就需要在`插件模块(plugin)`设计服务接口,并编写`服务模块(service)`予以实现。其中`插件模块(plugin)`仍被系统类加载器`AppClassLoader`加载,而`服务模块(service)`则会优先被自定义类加载器[PluginClassLoader](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/classloader/PluginClassLoader.java)加载,以此达成类加载级别的依赖隔离。 +- 对于一些复杂的插件,如果需要依赖其他第三方依赖的复杂功能时,就需要在`插件模块(plugin)`设计服务接口,并编写`服务模块(service)`予以实现。其中`插件模块(plugin)`仍被系统类加载器`AppClassLoader`加载,而`服务模块(service)`则会优先被自定义类加载器[PluginClassLoader](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/classloader/PluginClassLoader.java)加载,以此达成类加载级别的依赖隔离。 至于**核心模块**中的第三方依赖,他们在打包过程中会随自研代码一起,被[shade插件](https://github.com/apache/maven-shade-plugin)修正全限定名。除非`插件模块(plugin)`打包时做同样的全限定名的操作,不然是无法在`插件模块(plugin)`使用的。 @@ -139,7 +139,7 @@ ```xml - com.huawei.sermant + com.huaweicloud.sermant sermant-agentcore-core provided @@ -192,12 +192,12 @@ ```xml - com.huawei.sermant + com.huaweicloud.sermant sermant-agentcore-core provided - com.huawei.sermant + com.huaweicloud.sermant ${插件模块名} ${插件模块版本} provided @@ -241,42 +241,42 @@ `sermant-example`模块是一个示例功能模块,其中涉及了大部分开发插件时可能碰到的场景,本节将会对该模块的内容进行解读,以帮助读者能尽快上手开发插件功能。 -- 增强定义示例,见于[Declarer](../../sermant-plugins/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer)包: - - [DemoAnnotationDeclarer](../../sermant-plugins/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoAnnotationDeclarer.java)展示如何通过修饰类的注解定位到被增强的类。 - - [DemoNameDeclarer](../../sermant-plugins/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoNameDeclarer.java)展示如何通过名称定位到被增强的类。 - - [DemoSuperTypeDeclarer](../../sermant-plugins/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoSuperTypeDeclarer.java)展示如何通过超类定位到被增强的类。 +- 增强定义示例,见于[Declarer](../../sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer)包: + - [DemoAnnotationDeclarer](../../sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoAnnotationDeclarer.java)展示如何通过修饰类的注解定位到被增强的类。 + - [DemoNameDeclarer](../../sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoNameDeclarer.java)展示如何通过名称定位到被增强的类。 + - [DemoSuperTypeDeclarer](../../sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoSuperTypeDeclarer.java)展示如何通过超类定位到被增强的类。 - 上述三者都可以看出如何声明用于增强构造函数、静态函数和实例函数的拦截器。 - - 需要添加[EnhanceDeclarer](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/declarer/PluginDeclarer.java)的[spi配置文件](../../sermant-plugins/sermant-example/demo-plugin/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.agent.declarer.PluginDeclarer)。 -- 拦截器示例,见于[interceptor](../../sermant-plugins/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor)包: - - [DemoConstInterceptor](../../sermant-plugins/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoConstInterceptor.java)展示了如何编写一个用于增强构造方法的拦截器。 - - [DemoStaticInterceptor](../../sermant-plugins/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoStaticInterceptor.java)展示了如何编写一个用于增强静态方法的拦截器。 - - [DemoMemberInterceptor](../../sermant-plugins/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoMemberInterceptor.java)展示了如何编写一个用于增强实例方法的拦截器。 -- 日志系统使用示例,如[DemoLogger](../../sermant-plugins/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/common/DemoLogger.java)展示了如何在插件中获取日志类。 -- 通过心跳功能添加额外参数示例,如[DemoHeartBeatService](../../sermant-plugins/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/service/DemoHeartBeatService.java)服务所示,通常使用自定义服务的方式将额外参数带入。 -- 链路功能使用示例,如[DemoTraceInterceptor](../../sermant-plugins/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoTraceInterceptor.java)所示,通常链路功能应用于拦截器,对宿主应用的方法调用过程进行增强,捕获其相关的数据信息并上报。 -- 增强原生类示例,如[DemoBootstrapDefinition](../../sermant-plugins/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoBootstrapDeclarer.java)所示,与普通类的增强方式无异。但是,考虑到修改原生类是非常危险的且风险扩散的操作,不建议对原生类进行增强。 -- 插件配置示例:插件配置是统一配置系统的特化,遵循统一配置系统的规则。[config.yaml](../../sermant-plugins/sermant-example/config/config.yaml)是示例工程的配置文件,其中包含[DemoConfig](../../sermant-plugins/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/config/DemoConfig.java)和[DemoServiceConfig](../../sermant-plugins/sermant-example/demo-service/src/main/java/com/huawei/example/demo/config/DemoServiceConfig.java)两个配置类对应的配置信息,从配置的定义和调用可以看到: + - 需要添加[EnhanceDeclarer](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/declarer/PluginDeclarer.java)的[spi配置文件](../../sermant-example/demo-plugin/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.agent.declarer.PluginDeclarer)。 +- 拦截器示例,见于[interceptor](../../sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor)包: + - [DemoConstInterceptor](../../sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoConstInterceptor.java)展示了如何编写一个用于增强构造方法的拦截器。 + - [DemoStaticInterceptor](../../sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoStaticInterceptor.java)展示了如何编写一个用于增强静态方法的拦截器。 + - [DemoMemberInterceptor](../../sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoMemberInterceptor.java)展示了如何编写一个用于增强实例方法的拦截器。 +- 日志系统使用示例,如[DemoLogger](../../sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/common/DemoLogger.java)展示了如何在插件中获取日志类。 +- 通过心跳功能添加额外参数示例,如[DemoHeartBeatService](../../sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/service/DemoHeartBeatService.java)服务所示,通常使用自定义服务的方式将额外参数带入。 +- 链路功能使用示例,如[DemoTraceInterceptor](../../sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoTraceInterceptor.java)所示,通常链路功能应用于拦截器,对宿主应用的方法调用过程进行增强,捕获其相关的数据信息并上报。 +- 增强原生类示例,如[DemoBootstrapDefinition](../../sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoBootstrapDeclarer.java)所示,与普通类的增强方式无异。但是,考虑到修改原生类是非常危险的且风险扩散的操作,不建议对原生类进行增强。 +- 插件配置示例:插件配置是统一配置系统的特化,遵循统一配置系统的规则。[config.yaml](../../sermant-plugins/sermant-example/config/config.yaml)是示例工程的配置文件,其中包含[DemoConfig](../../sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/config/DemoConfig.java)和[DemoServiceConfig](../../sermant-plugins/sermant-example/demo-service/src/main/java/com/huawei/example/demo/config/DemoServiceConfig.java)两个配置类对应的配置信息,从配置的定义和调用可以看到: - 每个功能的配置文件仅能有1个,即`config.yaml`文件。 - - 插件包的配置类如果有拦截器别名的设定,可以继承[AliaConfig](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/config/AliaConfig.java)类,其他情况都实现[PluginConfig](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/config/PluginConfig.java)接口。 - - 无论继承哪个类,都需要添加[PluginConfig](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/config/PluginConfig.java)的[spi配置文件](../../sermant-plugins/sermant-example/demo-plugin/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.config.PluginConfig)。 + - 插件包的配置类如果有拦截器别名的设定,可以继承[AliaConfig](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/config/AliaConfig.java)类,其他情况都实现[PluginConfig](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/config/PluginConfig.java)接口。 + - 无论继承哪个类,都需要添加[PluginConfig](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/config/PluginConfig.java)的[spi配置文件](../../sermant-example/demo-plugin/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.config.PluginConfig)。 - 配置类的属性类型可以是布尔、数字、字符串、枚举、复杂对象,以及他们的数组、列表和字典类型。 - 普通字符串和复杂对象的字符串字段支持`${key:default}`风格的映射,优先级如下: ``` javaagent启动参数 > 当前类的其他属性 > 环境变量 > 系统变量 > 默认值 ``` 但是,被数组、列表和字典类型包装的字符串将不会做上述映射。 - - 配置类支持使用[ConfigTypeKey](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/config/common/ConfigTypeKey.java)注解修改限定名,但是需要确保,所有统一配置的限定名(无论是否修改)不可重复。 - - 配置类及其复杂对象的属性支持使用[ConfigFieldKey](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/config/common/ConfigFieldKey.java)注解修改字段的名称。但是,被数组、列表和字典类型包装的复杂对象的属性则不支持修改。 + - 配置类支持使用[ConfigTypeKey](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/config/common/ConfigTypeKey.java)注解修改限定名,但是需要确保,所有统一配置的限定名(无论是否修改)不可重复。 + - 配置类及其复杂对象的属性支持使用[ConfigFieldKey](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/config/common/ConfigFieldKey.java)注解修改字段的名称。但是,被数组、列表和字典类型包装的复杂对象的属性则不支持修改。 - 通过以下代码可以获取配置对象: ```java PluginConfigManager.getPluginConfig(PluginConfigType.class) ``` - 插件服务示例:插件服务是核心服务系统的特化,遵循核心服务系统的规则。 - - 如[DemoSimpleService](../../sermant-plugins/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/service/DemoSimpleService.java)所示,是一个简单的插件服务,他编写于`插件模块(plugin)`中。鉴于简单的插件服务的定位,他只能使用java原生api以及核心包中自研的api,不能使用任何第三方api(无论核心包是否引入)。 - - [DemoComplexService](../../sermant-plugins/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/service/DemoComplexService.java)接口是示例`插件模块(plugin)`中定义复杂服务接口,该接口将会在`服务模块(service)`中实现。 - - [DemoComplexServiceImpl](../../sermant-plugins/sermant-example/demo-service/src/main/java/com/huawei/example/demo/service/DemoComplexServiceImpl.java)是[DemoComplexService](../../sermant-plugins/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/service/DemoComplexService.java)接口的实现,他编写于`服务模块(service)`中,属于复杂的插件服务,可以按需使用其他第三方依赖(示例中未使用)。 - - 简单的插件服务和复杂的插件服务接口都需要继承(实现)[PluginService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/service/PluginService.java)接口。 - - 需要添加[PluginService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/service/PluginService.java)的[spi配置文件](../../sermant-plugins/sermant-example/demo-plugin/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.service.PluginService)。 + - 如[DemoSimpleService](../../sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/service/DemoSimpleService.java)所示,是一个简单的插件服务,他编写于`插件模块(plugin)`中。鉴于简单的插件服务的定位,他只能使用java原生api以及核心包中自研的api,不能使用任何第三方api(无论核心包是否引入)。 + - [DemoComplexService](../../sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/service/DemoComplexService.java)接口是示例`插件模块(plugin)`中定义复杂服务接口,该接口将会在`服务模块(service)`中实现。 + - [DemoComplexServiceImpl](../../sermant-plugins/sermant-example/demo-service/src/main/java/com/huawei/example/demo/service/DemoComplexServiceImpl.java)是[DemoComplexService](../../sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/service/DemoComplexService.java)接口的实现,他编写于`服务模块(service)`中,属于复杂的插件服务,可以按需使用其他第三方依赖(示例中未使用)。 + - 简单的插件服务和复杂的插件服务接口都需要继承(实现)[PluginService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/service/PluginService.java)接口。 + - 需要添加[PluginService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/service/PluginService.java)的[spi配置文件](../../sermant-example/demo-plugin/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.service.PluginService)。 - 通过以下代码可以获取服务对象: ```java ServiceManager.getService(ServiceType.class) @@ -290,12 +290,12 @@ - `插件模块(plugin)`不能依赖或使用`byte-buddy`和`slf4j`以外第三方依赖,如果服务功能较为复杂,必须使用其他第三方依赖,则可以将他们提取为`服务模块(service)`,或者用`shade`插件隔离(不建议)。 - 同个`插件主模块(main)`中,如果存在多个`服务模块(service)`,他们不能存在依赖冲突的问题。 -- 继承[AliaConfig](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/config/AliaConfig.java)的插件配置类对应的spi配置文件依然是[PluginConfig](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/config/PluginConfig.java)。 +- 继承[AliaConfig](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/config/AliaConfig.java)的插件配置类对应的spi配置文件依然是[PluginConfig](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/config/PluginConfig.java)。 - 插件的配置文件有且只能有一个,即`config.yaml`。 -- `config.yaml`中,被数组、列表和字典包装的复杂对象将不支持[ConfigFieldKey](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/config/common/ConfigFieldKey.java)属性别名,被包装的字符串也将不支持`${xxx}`映射。 +- `config.yaml`中,被数组、列表和字典包装的复杂对象将不支持[ConfigFieldKey](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/config/common/ConfigFieldKey.java)属性别名,被包装的字符串也将不支持`${xxx}`映射。 - 配置文件中对应配置类的限定名不能重复,该规则针对全局所有统一配置有效。 - `插件模块(plugin)`和`服务模块(service)`如果不是定义在`插件主模块(main)`的目录下,需要留意输出的jar包和配置路径是否正确。 -- 拦截器的类型需要和[MethodInterceptPoint](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/definition/MethodInterceptPoint.java)的对应方法保持一致,注意别写错。 +- 拦截器的类型需要和[MethodInterceptPoint](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/definition/MethodInterceptPoint.java)的对应方法保持一致,注意别写错。 ### 插件打包流程 diff --git a/docs/dev-guide/service_dynamicconfig.md b/docs/dev-guide/service_dynamicconfig.md index 3d1733e750..a9a2d3dc3d 100644 --- a/docs/dev-guide/service_dynamicconfig.md +++ b/docs/dev-guide/service_dynamicconfig.md @@ -1,6 +1,6 @@ # 动态配置服务介绍 -本文档主要介绍**核心模块**的[动态配置服务](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig)。 +本文档主要介绍**核心模块**的[动态配置服务](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig)。 - [功能定位](#功能定位) - [Api解析](#Api解析) @@ -15,64 +15,64 @@ ## Api解析 -**动态配置服务**的服务功能`API`由[DynamicConfigService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/DynamicConfigService.java)抽象类提供,其实现三个接口,见于[api](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/api)目录中,具体接口如下所示: +**动态配置服务**的服务功能`API`由[DynamicConfigService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/DynamicConfigService.java)抽象类提供,其实现三个接口,见于[api](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/api)目录中,具体接口如下所示: |接口|方法|解析| |:-|:-|:-| -|[KeyService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/api/KeyService.java)|String getConfig(String)|获取某个键的配置值(默认组)| -|[KeyService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/api/KeyService.java)|boolean publishConfig(String, String)|设置某个键的配置值(默认组)| -|[KeyService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/api/KeyService.java)|boolean removeConfig(String)|移除某个键的配置值(默认组)| -|[KeyService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/api/KeyService.java)|List\ listKeys()|获取所有键(默认组)| -|[KeyService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/api/KeyService.java)|boolean addConfigListener(String, [DynamicConfigListener](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/common/DynamicConfigListener.java))|为某个键添加监听器(默认组)| -|[KeyService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/api/KeyService.java)|boolean removeConfigListener(String)|移除某个键的监听器(默认组)| -|[KeyGroupService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/api/KeyGroupService.java)|String getConfig(String, String)|获取组下某个键的配置值| -|[KeyGroupService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/api/KeyGroupService.java)|boolean publishConfig(String, String, String)|设置组下某个键的配置值| -|[KeyGroupService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/api/KeyGroupService.java)|boolean removeConfig(String, String)|移除组下某个键的配置值| -|[KeyGroupService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/api/KeyGroupService.java)|boolean addConfigListener(String, String, [DynamicConfigListener](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/common/DynamicConfigListener.java))|为组下某个键添加监听器| -|[KeyGroupService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/api/KeyGroupService.java)|boolean removeConfigListener(String, String)|移除组下某个键的监听器| -|[GroupService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/api/GroupService.java)|List\ listKeysFromGroup(String)|获取组中所有键| -|[GroupService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/api/GroupService.java)|boolean addGroupListener(String, [DynamicConfigListener](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/common/DynamicConfigListener.java))|为组下所有的键添加监听器| -|[GroupService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/api/GroupService.java)|boolean removeGroupListener(String)|移除组下所有键的监听器| -|[DynamicConfigService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/DynamicConfigService.java)|boolean addConfigListener(String, [DynamicConfigListener](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/common/DynamicConfigListener.java), boolean)|为某个键添加监听器(默认组),根据入参决定是否触发初始化事件| -|[DynamicConfigService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/DynamicConfigService.java)|boolean addConfigListener(String, String, [DynamicConfigListener](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/common/DynamicConfigListener.java), boolean)|为组下某个键添加监听器,根据入参决定是否触发初始化事件| -|[DynamicConfigService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/DynamicConfigService.java)|boolean addGroupListener(String, [DynamicConfigListener](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/common/DynamicConfigListener.java), boolean)|为组下所有的键添加监听器,根据入参决定是否触发初始化事件| +|[KeyService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/api/KeyService.java)|String getConfig(String)|获取某个键的配置值(默认组)| +|[KeyService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/api/KeyService.java)|boolean publishConfig(String, String)|设置某个键的配置值(默认组)| +|[KeyService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/api/KeyService.java)|boolean removeConfig(String)|移除某个键的配置值(默认组)| +|[KeyService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/api/KeyService.java)|List\ listKeys()|获取所有键(默认组)| +|[KeyService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/api/KeyService.java)|boolean addConfigListener(String, [DynamicConfigListener](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/common/DynamicConfigListener.java))|为某个键添加监听器(默认组)| +|[KeyService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/api/KeyService.java)|boolean removeConfigListener(String)|移除某个键的监听器(默认组)| +|[KeyGroupService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/api/KeyGroupService.java)|String getConfig(String, String)|获取组下某个键的配置值| +|[KeyGroupService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/api/KeyGroupService.java)|boolean publishConfig(String, String, String)|设置组下某个键的配置值| +|[KeyGroupService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/api/KeyGroupService.java)|boolean removeConfig(String, String)|移除组下某个键的配置值| +|[KeyGroupService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/api/KeyGroupService.java)|boolean addConfigListener(String, String, [DynamicConfigListener](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/common/DynamicConfigListener.java))|为组下某个键添加监听器| +|[KeyGroupService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/api/KeyGroupService.java)|boolean removeConfigListener(String, String)|移除组下某个键的监听器| +|[GroupService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/api/GroupService.java)|List\ listKeysFromGroup(String)|获取组中所有键| +|[GroupService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/api/GroupService.java)|boolean addGroupListener(String, [DynamicConfigListener](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/common/DynamicConfigListener.java))|为组下所有的键添加监听器| +|[GroupService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/api/GroupService.java)|boolean removeGroupListener(String)|移除组下所有键的监听器| +|[DynamicConfigService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/DynamicConfigService.java)|boolean addConfigListener(String, [DynamicConfigListener](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/common/DynamicConfigListener.java), boolean)|为某个键添加监听器(默认组),根据入参决定是否触发初始化事件| +|[DynamicConfigService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/DynamicConfigService.java)|boolean addConfigListener(String, String, [DynamicConfigListener](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/common/DynamicConfigListener.java), boolean)|为组下某个键添加监听器,根据入参决定是否触发初始化事件| +|[DynamicConfigService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/DynamicConfigService.java)|boolean addGroupListener(String, [DynamicConfigListener](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/common/DynamicConfigListener.java), boolean)|为组下所有的键添加监听器,根据入参决定是否触发初始化事件| 以上,需要明确两个概念: - `Key`,单指某个动态配置的键 - `Group`,指一系列动态配置的分组,通常用于区分使用者 -通过观察可以发现,以上的`API`主要分为数据的增删查改操作,以及监听器的[DynamicConfigListener](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/common/DynamicConfigListener.java)增删操作,其中后者的事件回调是**动态配置服务**得以实现功能中至关重要的一环,也是插件中使用**动态配置服务**的主要功能。 +通过观察可以发现,以上的`API`主要分为数据的增删查改操作,以及监听器的[DynamicConfigListener](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/common/DynamicConfigListener.java)增删操作,其中后者的事件回调是**动态配置服务**得以实现功能中至关重要的一环,也是插件中使用**动态配置服务**的主要功能。 -另外,在[KeyService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/api/KeyService.java)接口中定义的所有`API`都是不带`Group`的`API`,它们在[DynamicConfigService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/DynamicConfigService.java)中其实都会使用默认`Group`修正为[KeyGroupService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/api/KeyGroupService.java)的`API`,这点需要注意。默认`Group`可以通过**统一配置文件**`config.properties`的`dynamic.config.default_group`修改。 +另外,在[KeyService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/api/KeyService.java)接口中定义的所有`API`都是不带`Group`的`API`,它们在[DynamicConfigService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/DynamicConfigService.java)中其实都会使用默认`Group`修正为[KeyGroupService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/api/KeyGroupService.java)的`API`,这点需要注意。默认`Group`可以通过**统一配置文件**`config.properties`的`dynamic.config.default_group`修改。 最后,除了以上的服务接口以外,使用者还需要关注一些其他接口、配置或实体: -- **动态配置服务**的静态配置[DynamicConfig](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/config/DynamicConfig.java),其中涉及一下配置: +- **动态配置服务**的静态配置[DynamicConfig](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/config/DynamicConfig.java),其中涉及一下配置: |类型|属性|统一配置值|解析| |:-|:-|:-|:-| |int|timeoutValue|dynamic.config.timeout_value|服务器连接超时时间,单位:ms| |String|defaultGroup|dynamic.config.default_group|默认分组| |String|serverAddress|dynamic.config.server_address|服务器地址,必须形如:{@code host:port[(,host:port)...]}| - |[DynamicConfigServiceType](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/common/DynamicConfigServiceType.java)|serviceType|dynamic.config.dynamic_config_type|服务实现类型,取NOP、ZOOKEEPER、KIE| -- **动态配置服务**实现类型[DynamicConfigServiceType](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/common/DynamicConfigServiceType.java),含一下几种类型: + |[DynamicConfigServiceType](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/common/DynamicConfigServiceType.java)|serviceType|dynamic.config.dynamic_config_type|服务实现类型,取NOP、ZOOKEEPER、KIE| +- **动态配置服务**实现类型[DynamicConfigServiceType](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/common/DynamicConfigServiceType.java),含一下几种类型: |枚举值|解析| |:-|:-| |ZOOKEEPER|ZooKeeper实现| |KIE|ServiceComb Kie实现| |NOP|无实现| -- 动态配置监听器[DynamicConfigListener](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/common/DynamicConfigListener.java),其中包含的接口方法如下: +- 动态配置监听器[DynamicConfigListener](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/common/DynamicConfigListener.java),其中包含的接口方法如下: |方法|解析| |:-|:-| - |void process([DynamicConfigChangeEvent](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/common/DynamicConfigChangeEvent.java))|处理配置改变事件的回调接口| -- 动态配置改变事件[DynamicConfigChangeEvent](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/common/DynamicConfigChangeEvent.java),其成员属性如下: + |void process([DynamicConfigChangeEvent](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/common/DynamicConfigChangeEvent.java))|处理配置改变事件的回调接口| +- 动态配置改变事件[DynamicConfigChangeEvent](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/common/DynamicConfigChangeEvent.java),其成员属性如下: |类型|属性|解析| |:-|:-|:-| |String|key|配置键| |String|group|配置分组| |String|content|配置信息| - |[DynamicConfigEventType](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/common/DynamicConfigEventType.java)|changeType|事件类型| -- 动态配置改变事件类型[DynamicConfigEventType](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/common/DynamicConfigEventType.java),含以下四种: + |[DynamicConfigEventType](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/common/DynamicConfigEventType.java)|changeType|事件类型| +- 动态配置改变事件类型[DynamicConfigEventType](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/common/DynamicConfigEventType.java),含以下四种: |枚举值|解析| |:-|:-| |INIT|添加监听器时的初始化响应| @@ -87,16 +87,16 @@ /${group}/${key} -> ${value} ``` -至于监听器[DynamicConfigListener](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/common/DynamicConfigListener.java),则需要转换为`ZooKeeper`的`Watcher`。 +至于监听器[DynamicConfigListener](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/common/DynamicConfigListener.java),则需要转换为`ZooKeeper`的`Watcher`。 -`ZooKeeper`实现见于[zookeeper](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/zookeeper)包,主要包含[ZooKeeperDynamicConfigService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/zookeeper/ZooKeeperDynamicConfigService.java)和[ZooKeeperBufferedClient](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/zookeeper/ZooKeeperBufferedClient.java)两个类: +`ZooKeeper`实现见于[zookeeper](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/zookeeper)包,主要包含[ZooKeeperDynamicConfigService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/zookeeper/ZooKeeperDynamicConfigService.java)和[ZooKeeperBufferedClient](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/zookeeper/ZooKeeperBufferedClient.java)两个类: -- [ZooKeeperDynamicConfigService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/zookeeper/ZooKeeperDynamicConfigService.java)是[DynamicConfigService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/DynamicConfigService.java)的`ZooKeeper`实现类,主要职责是完成上述的参数转换: +- [ZooKeeperDynamicConfigService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/zookeeper/ZooKeeperDynamicConfigService.java)是[DynamicConfigService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/DynamicConfigService.java)的`ZooKeeper`实现类,主要职责是完成上述的参数转换: - `Key`和`Group` -> `ZooKeeper`节点路径 - - [DynamicConfigListener](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/common/DynamicConfigListener.java) -> `ZooKeeper`的`Watcher`。 + - [DynamicConfigListener](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/common/DynamicConfigListener.java) -> `ZooKeeper`的`Watcher`。 - 将他们解析完毕之后,交由[ZooKeeperBufferedClient](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/zookeeper/ZooKeeperBufferedClient.java)做业务操作。 -- [ZooKeeperBufferedClient](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/zookeeper/ZooKeeperBufferedClient.java),其主要功能是对原生`ZooKeeper`客户端进行包装,封装其原生的功能,提供更为高阶的`API`: + 将他们解析完毕之后,交由[ZooKeeperBufferedClient](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/zookeeper/ZooKeeperBufferedClient.java)做业务操作。 +- [ZooKeeperBufferedClient](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/zookeeper/ZooKeeperBufferedClient.java),其主要功能是对原生`ZooKeeper`客户端进行包装,封装其原生的功能,提供更为高阶的`API`: |方法|解析| |:-|:-| |boolean ifNodeExist(String)|判断节点是否存在| @@ -132,17 +132,17 @@ groupKey1=groupValue1[&groupKey2=groupVaue2...] ``` -> 其中`groupKey`为标签键, `groupValue`则为标签值,多个标签使用`&`拼接;生成`Group`可通过[LabelGroupUtils#createLabelGroup](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/utils/LabelGroupUtils.java)生成 +> 其中`groupKey`为标签键, `groupValue`则为标签值,多个标签使用`&`拼接;生成`Group`可通过[LabelGroupUtils#createLabelGroup](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/utils/LabelGroupUtils.java)生成 > > **特别说明:** > > ​ 若传入的`Group`非以上格式,则会默认添加标签`GROUP=传入Group` -`Kie`的实现见于包[kie](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie), 主要包含[KieDynamicConfigService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/KieDynamicConfigService.java)、[LabelGroupUtils](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/utils/LabelGroupUtils.java)与[SubscriberManager](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/listener/SubscriberManager.java)三个类: +`Kie`的实现见于包[kie](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie), 主要包含[KieDynamicConfigService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/KieDynamicConfigService.java)、[LabelGroupUtils](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/utils/LabelGroupUtils.java)与[SubscriberManager](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/listener/SubscriberManager.java)三个类: -- [KieDynamicConfigService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/KieDynamicConfigService.java)是[DynamicConfigService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/DynamicConfigService.java)的`Kie`实现类, 主要职责是封装[SubscriberManager](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/listener/SubscriberManager.java)的订阅API以及`Group`的`Key`管理 +- [KieDynamicConfigService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/KieDynamicConfigService.java)是[DynamicConfigService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/DynamicConfigService.java)的`Kie`实现类, 主要职责是封装[SubscriberManager](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/listener/SubscriberManager.java)的订阅API以及`Group`的`Key`管理 -- [LabelGroupUtils](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/utils/LabelGroupUtils.java)则是负责`Group`转换,主要包含以下API: +- [LabelGroupUtils](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/utils/LabelGroupUtils.java)则是负责`Group`转换,主要包含以下API: | 方法 | 解析 | | --------------------------- | -------------------------------- | @@ -150,17 +150,17 @@ groupKey1=groupValue1[&groupKey2=groupVaue2...] | getLabelCondition(String) | 将Group转换为请求的条件 | | isLabelGroup(String) | 判断是否为Kie的标签 | -- [SubscriberManager](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/listener/SubscriberManager.java)主要职责是管理`Group`的所有订阅者以及进行数据更新通知;其会根据订阅的Group,即标签组,与`Kie`建立连接请求任务,动态监听数据更新变化;该类主要包含以下API: +- [SubscriberManager](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/listener/SubscriberManager.java)主要职责是管理`Group`的所有订阅者以及进行数据更新通知;其会根据订阅的Group,即标签组,与`Kie`建立连接请求任务,动态监听数据更新变化;该类主要包含以下API: | 方法 | 解析 | | ------------------------------------------------------------ | ------------------------------------------------------------ | - | boolean addGroupListener(String, DynamicConfigListener, boolean) | 订阅标签监听,由[SubscriberManager](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/listener/SubscriberManager.java)管理,建立监听任务,并提供首次订阅通知能力 | + | boolean addGroupListener(String, DynamicConfigListener, boolean) | 订阅标签监听,由[SubscriberManager](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/listener/SubscriberManager.java)管理,建立监听任务,并提供首次订阅通知能力 | | boolean removeGroupListener(String, DynamicConfigListener) | 移除标签监听 | | boolean publishConfig(String, String, String) | 发布Kie配置 | ## 实现包装 -从[核心模块介绍](../user-guide/agentcore.md#插件服务系统)可知,**插件服务系统**是基于`SPI`实现的,而[DynamicConfigService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/DynamicConfigService.java)对应的`SPI`实现配置为[BufferedDynamicConfigService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/BufferedDynamicConfigService.java),后者为前者所有具体实现类的包装。它在初始化的过程中读取[DynamicConfig](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/config/DynamicConfig.java)配置,通过`dynamic.config.dynamic_config_type`配置选择具体的服务实现,并将所有`API`委派给这些具体的服务实现完成。 +从[核心模块介绍](../user-guide/agentcore.md#插件服务系统)可知,**插件服务系统**是基于`SPI`实现的,而[DynamicConfigService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/DynamicConfigService.java)对应的`SPI`实现配置为[BufferedDynamicConfigService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/BufferedDynamicConfigService.java),后者为前者所有具体实现类的包装。它在初始化的过程中读取[DynamicConfig](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/config/DynamicConfig.java)配置,通过`dynamic.config.dynamic_config_type`配置选择具体的服务实现,并将所有`API`委派给这些具体的服务实现完成。 ## 使用方式 diff --git a/docs/dev-guide/service_heartbeat.md b/docs/dev-guide/service_heartbeat.md index 5d90733372..a02cc34875 100644 --- a/docs/dev-guide/service_heartbeat.md +++ b/docs/dev-guide/service_heartbeat.md @@ -1,6 +1,6 @@ # 心跳服务介绍 -本文档主要介绍**核心模块**的[心跳服务](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/heartbeat)。 +本文档主要介绍**核心模块**的[心跳服务](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/heartbeat)。 ## 功能定位 @@ -78,6 +78,6 @@ service.setExtInfo(new ExtInfoProvider() { 一般情况下,对于插件开发者来说,**心跳服务**是无需关心的内容。只有当插件`后端模块(backend)`需要从**后端模块**的kafka心跳主题中捞特定数据时,才有必要为心跳数据包定制数据。插件为其心跳数据包定制数据时,通常可以[自定义插件服务](dev_plugin_code.md#插件服务),在`start`方法中[添加定制数据](#添加定制数据)即可。 -可以参考示例工程的[DemoHeartBeatService](../../sermant-plugins/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/service/DemoHeartBeatService.java)进行开发。 +可以参考示例工程的[DemoHeartBeatService](../../sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/service/DemoHeartBeatService.java)进行开发。 [返回**Sermant**说明文档](../README.md) \ No newline at end of file diff --git a/docs/dev-guide/service_send.md b/docs/dev-guide/service_send.md index 4238e37924..5180ab4483 100644 --- a/docs/dev-guide/service_send.md +++ b/docs/dev-guide/service_send.md @@ -1,6 +1,6 @@ # send -本文档主要介绍**核心模块**的[统一网关数据发送服务](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/send) +本文档主要介绍**核心模块**的[统一网关数据发送服务](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/send) `GatewayClient`:统一网关(sermant-backend)数据发送服务,简称统一发送服务,用于把Agent数据发往sermant-backend,再由sermant-backend转发给Kafka。 diff --git a/docs/dev-guide/service_template.md b/docs/dev-guide/service_template.md index 2f977a0960..ac8e5ec51b 100644 --- a/docs/dev-guide/service_template.md +++ b/docs/dev-guide/service_template.md @@ -1,6 +1,6 @@ # service name -[服务功能目录](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/serviceName) +[服务功能目录](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service) [定位 是什么]: todo [功能 做什么]: todo diff --git a/docs/user-guide/agentcore.md b/docs/user-guide/agentcore.md index c5745ba907..50e422821c 100644 --- a/docs/user-guide/agentcore.md +++ b/docs/user-guide/agentcore.md @@ -55,15 +55,15 @@ String version = BootArgsIndexer.getCoreVersion(); - `example/plugins.yaml`文件,*example Profile*的插件设置。 - `config.properties`文件,统一配置文件。 - `META-INF/services`目录,*SPI*配置文件目录。 - - `com.huawei.sermant.core.config.common.BaseConfig`文件,用于声明统一配置类。 - - `com.huawei.sermant.core.config.strategy.LoadConfigStrategy`文件,用于声明配置的加载策略。 - - `com.huawei.sermant.core.service.BaseService`文件,用于声明核心服务实现。 + - `com.huaweicloud.sermant.core.config.common.BaseConfig`文件,用于声明统一配置类。 + - `com.huaweicloud.sermant.core.config.strategy.LoadConfigStrategy`文件,用于声明配置的加载策略。 + - `com.huaweicloud.sermant.core.service.BaseService`文件,用于声明核心服务实现。 ## 字节码增强 -**Sermant**的**字节码增强**代码见于[agent](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent)目录。 +**Sermant**的**字节码增强**代码见于[agent](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent)目录。 -**Sermant**基于`byte-buddy`字节码增强框架做字节码增强,主要采用[**byte-buddy委派**](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/transformer/DelegateTransformer.java)的方式进行,对于原生类增强的场景,则使用[**Advice模板类**](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/template)配合[**byte-buddy advice**](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/transformer/BootstrapTransformer.java)技术进行增强。 +**Sermant**基于`byte-buddy`字节码增强框架做字节码增强,主要采用[**byte-buddy委派**](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/transformer/DelegateTransformer.java)的方式进行,对于原生类增强的场景,则使用[**Advice模板类**](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/template)配合[**byte-buddy advice**](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/transformer/BootstrapTransformer.java)技术进行增强。 `agent`目录下主要包含以下内容: @@ -73,28 +73,28 @@ String version = BootArgsIndexer.getCoreVersion(); - `interceptor`目录,存放**拦截器接口**、**拦截器链**相关内容和**拦截器加载器**,其中**拦截器接口**是插件开发者需要关注的内容。 - `matcher`目录,存放**被增强类的匹配器**,是插件开发者需要关注的内容。 - `template`目录,存放**Advice模板类**。 -- `transformer`目录,字节码转换器,包括委派转换器[DelegateTransformer](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/transformer/DelegateTransformer.java)和*Advice*转换器[BootstrapTransformer](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/transformer/BootstrapTransformer.java),他们由通用转换器[CommonTransformer](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/transformer/CommonTransformer.java)统一调度。 +- `transformer`目录,字节码转换器,包括委派转换器[DelegateTransformer](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/transformer/DelegateTransformer.java)和*Advice*转换器[BootstrapTransformer](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/transformer/BootstrapTransformer.java),他们由通用转换器[CommonTransformer](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/transformer/CommonTransformer.java)统一调度。 - `ByteBuddyAgentBuilder`类,字节码增强的入口。 ### 增强定义 -插件开发者在编写**增强定义**时,实现[EnhanceDefinition](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/definition/EnhanceDefinition.java)接口的`enhanceClass`方法和`getMethodInterceptPoints`方法即可,详情可参见[插件代码开发手册中增强定义一节](../dev-guide/dev_plugin_code.md#增强定义)。 +插件开发者在编写**增强定义**时,实现[EnhanceDefinition](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/definition/EnhanceDefinition.java)接口的`enhanceClass`方法和`getMethodInterceptPoints`方法即可,详情可参见[插件代码开发手册中增强定义一节](../dev-guide/dev_plugin_code.md#增强定义)。 注意不要忘记添加`EnhanceDefinition`的*SPI*配置文件。 ### 拦截器 -插件开发者在编写**拦截器**时,需要依据被增强方法的类型,实现[interceptor](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/interceptor)目录的不同接口即可: +插件开发者在编写**拦截器**时,需要依据被增强方法的类型,实现[interceptor](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/interceptor)目录的不同接口即可: -- 增强静态方法时,需要实现[StaticMethodInterceptor](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/interceptor/StaticMethodInterceptor.java) -- 增强构造函数时,需要实现[ConstructorInterceptor](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/interceptor/ConstructorInterceptor.java) -- 增强实例方法时,需要实现[InstanceMethodInterceptor](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/interceptor/InstanceMethodInterceptor.java) +- 增强静态方法时,需要实现[StaticMethodInterceptor](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/interceptor/StaticMethodInterceptor.java) +- 增强构造函数时,需要实现[ConstructorInterceptor](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/interceptor/ConstructorInterceptor.java) +- 增强实例方法时,需要实现[InstanceMethodInterceptor](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/interceptor/InstanceMethodInterceptor.java) 具体如何怎么做,可以参见[插件代码开发手册中拦截器一节](../dev-guide/dev_plugin_code.md#拦截器)。 ## 统一配置系统 -**Sermant**的**统一配置系统**代码见于[config](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/config)目录。 +**Sermant**的**统一配置系统**代码见于[config](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/config)目录。 `config`目录下包含以下内容: @@ -118,14 +118,14 @@ ConfigExample config = ConfigManager.getConfig(ConfigExample.class); ### 统一配置类 -**统一配置系统**是一个加载**静态配置**为**Java Pojo**的管理系统,因此,**统一配置类**必须是一个实现[BaseConfig](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/config/common/BaseConfig.java)接口的**Java Pojo**。这些**统一配置类**的具体要求由`LoadPropertiesStrategy`而定,详见[properties策略详解](#properties策略详解)。至于插件相关的[插件配置](#插件配置系统),则与`LoadYamlStrategy`的要求有关,详见[yaml策略详解](#yaml策略详解)。 +**统一配置系统**是一个加载**静态配置**为**Java Pojo**的管理系统,因此,**统一配置类**必须是一个实现[BaseConfig](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/config/common/BaseConfig.java)接口的**Java Pojo**。这些**统一配置类**的具体要求由`LoadPropertiesStrategy`而定,详见[properties策略详解](#properties策略详解)。至于插件相关的[插件配置](#插件配置系统),则与`LoadYamlStrategy`的要求有关,详见[yaml策略详解](#yaml策略详解)。 **统一配置类**是一个**Java Pojo**,他的`getter`方法和`setter`方法可以直接使用`lombok`的`Data`注解、`Getter`注解和`Setter`注解生成。 -注意,编写完**统一配置类**之后,不要忘记添加[BaseConfig](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/config/common/BaseConfig.java)接口的*SPI*配置文件: +注意,编写完**统一配置类**之后,不要忘记添加[BaseConfig](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/config/common/BaseConfig.java)接口的*SPI*配置文件: - 在资源目录`resources`下添加`META-INF/services`文件夹。 -- 在`META-INF/services`中添加`com.huawei.sermant.core.config.common.BaseConfig`配置文件。 +- 在`META-INF/services`中添加`com.huaweicloud.sermant.core.config.common.BaseConfig`配置文件。 - 在上述文件中,以换行为分隔,键入插件包中所有的**统一配置类**。 ### properties策略详解 @@ -357,12 +357,12 @@ plugins: ## 核心服务系统 -**Sermant**的**核心服务系统**代码见于[service](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service)目录。 +**Sermant**的**核心服务系统**代码见于[service](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service)目录。 `service`目录下中主要包括: -- [BaseService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/BaseService.java): [**核心服务类**](#核心服务类) -- [ServiceManager](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/ServiceManager.java): [**核心服务管理类**](#核心服务类) +- [BaseService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/BaseService.java): [**核心服务类**](#核心服务类) +- [ServiceManager](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/ServiceManager.java): [**核心服务管理类**](#核心服务类) - 核心服务实现目录 ### 核心服务管理类 @@ -374,7 +374,7 @@ ServiceExample service = ServiceManager.getService(ServiceExample.class); ### 核心服务类 -**核心服务系统**是一个将实现[BaseService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/BaseService.java)的**核心服务类**加载、管理的系统,其核心就是实现**核心服务类**。 +**核心服务系统**是一个将实现[BaseService](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/BaseService.java)的**核心服务类**加载、管理的系统,其核心就是实现**核心服务类**。 我们假定有一个叫`example`的服务,为其编写如下接口: ```java @@ -406,21 +406,21 @@ public class ServiceExampleImpl implements ServiceExample { 接下来,把`ServiceExampleImpl`添加到`BaseService`的*SPI*配置中即可使用: - 在资源目录`resources`下添加`META-INF/services`文件夹。 -- 在`META-INF/services`中添加`com.huawei.sermant.core.service.BaseService`配置文件。 +- 在`META-INF/services`中添加`com.huaweicloud.sermant.core.service.BaseService`配置文件。 - 在上述文件中,以换行为分隔,键入插件包中所有的**核心服务类**实现(`ServiceExampleImpl`)。 这样就能通过`ServiceManager`的`getService`方法获取到**核心服务类**实例了。 ## 插件管理系统 -**Sermant**的**插件管理系统**代码见于[plugin](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin)目录。 +**Sermant**的**插件管理系统**代码见于[plugin](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin)目录。 `plugin`目录下主要包括: -- [classloader/PluginClassLoader](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/classloader/PluginClassLoader.java)类,即[插件类加载器](#插件类加载器)。 -- [config](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/config)目录,里面存放着[插件配置系统](#插件配置系统)相关代码。 -- [service](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/service)目录,里面存放着[插件服务系统](#插件服务系统)相关代码。 -- [PluginManager](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/PluginManager.java)类,即[插件管理类](#插件管理类) +- [classloader/PluginClassLoader](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/classloader/PluginClassLoader.java)类,即[插件类加载器](#插件类加载器)。 +- [config](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/config)目录,里面存放着[插件配置系统](#插件配置系统)相关代码。 +- [service](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/service)目录,里面存放着[插件服务系统](#插件服务系统)相关代码。 +- [PluginManager](../../sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/PluginManager.java)类,即[插件管理类](#插件管理类) ### 插件管理类 diff --git a/pom.xml b/pom.xml index 7d409cb5c3..a82f552dae 100644 --- a/pom.xml +++ b/pom.xml @@ -29,7 +29,6 @@ 1.4.01 2.12.1 1.26 - 1.10.14 3.6.0 1.18.10 8.0.1 @@ -49,6 +48,7 @@ 3.0.1 3.2.0 3.1.0 + 3.3.0 3.2.4 2.5.3 1.36.1 @@ -67,7 +67,7 @@ third-party-license.ftl sermant-package/resources - com.huawei.sermant.dependencies + com.huaweicloud.sermant.dependencies ${project.artifactId} LICENSE-binary-suffix.txt @@ -75,9 +75,9 @@ - com.huawei.sermant + com.huaweicloud.sermant sermant-agentcore-core - ${project.version} + 0.2.1 @@ -165,11 +165,6 @@ snakeyaml ${snake.yaml.version} - - net.bytebuddy - byte-buddy - ${byte.buddy.version} - org.apache.zookeeper zookeeper @@ -280,9 +275,6 @@ backend - - true - sermant-backend @@ -295,9 +287,6 @@ package - - true - sermant-package @@ -365,6 +354,11 @@ maven-resources-plugin ${resources.plugin.version} + + org.apache.maven.plugins + maven-dependency-plugin + ${dependency.plugin.version} + org.apache.maven.plugins maven-shade-plugin @@ -380,10 +374,6 @@ ${package.output.dir}/${project.artifactId}-${project.version}.jar - - net.bytebuddy - ${shade.common.prefix}.net.bytebuddy - org.slf4j ${shade.common.prefix}.org.slf4j diff --git a/sermant-agentcore/pom.xml b/sermant-agentcore/pom.xml index a15f4587d6..50cbaabbcd 100644 --- a/sermant-agentcore/pom.xml +++ b/sermant-agentcore/pom.xml @@ -8,15 +8,38 @@ 1.0.0 4.0.0 + sermant-agentcore pom + - sermant-agentcore-core sermant-agentcore-premain - sermant-agentcore - ${pom.basedir}/../.. + + + + org.apache.maven.plugins + maven-clean-plugin + + + agent-clean + clean + + clean + + + + + ${package.temp.dir} + + + + + + + + \ No newline at end of file diff --git a/sermant-agentcore/sermant-agentcore-core/pom.xml b/sermant-agentcore/sermant-agentcore-core/pom.xml index 48a46fd16b..7cdd037133 100644 --- a/sermant-agentcore/sermant-agentcore-core/pom.xml +++ b/sermant-agentcore/sermant-agentcore-core/pom.xml @@ -1,73 +1,181 @@ 4.0.0 - - com.huawei.sermant - sermant-agentcore - 1.0.0 - + + com.huaweicloud.sermant + 0.2.1 sermant-agentcore-core + + sermant-agentcore-core + The core capability and agent framework of Sermant. + https://github.com/huaweicloud/Sermant + + + Apache License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.html + repo + + + + https://github.com/huaweicloud/Sermant + scm:git:git://github.com/huaweicloud/Sermant.git + scm:git:ssh://github.com:huaweicloud/Sermant.git + + + + luanwenfei + luanwenfei-venus + luanwenfei@outlook.com + + Developer + + +8 + + + 1.8 - agent - ${package.agent.dir}/core - config.properties - plugins.yaml - logback.xml - true - config - ${package.agent.dir}/config + com.huaweicloud.sermant.dependencies + + 1.10.14 + 1.2.76 + 1.26 + 4.5.13 + 4.4.13 + 4.12 + 4.4 + 1.5.1 + 4.1.73.Final + 3.17.3 + 3.9.0 + 3.12.0 + 1.3.2 + 1.4.01 + 4.2.3 + 1.7.35 + 3.6.0 + 1.2.9 + 2.12.1 + 8.0.1 + 1.18.10 + 1.36.1 + + 0.5.1 + 3.2.4 + 3.0.1 + 3.2.0 + 2.17.1 + 3.8.1 + 1.5.0.Final + 3.0.1 + 3.3.2 + 1.6.7 + - example - - example - false - - - - all - - all - false - + release + + + + org.apache.maven.plugins + maven-gpg-plugin + ${gpg.plugin.version} + + + sign-artifacts + verify + + sign + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.3.2 + + + package + + jar + + + -Xdoclint:none + + + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + ${nexus.staging.plugin.version} + true + + ossrh + https://oss.sonatype.org/ + true + + + + + + + ossrh + https://oss.sonatype.org/content/repositories/snapshots + + + ossrh + https://oss.sonatype.org/service/local/staging/deploy/maven2/ + + + - net.bytebuddy byte-buddy + ${byte.buddy.version} com.alibaba fastjson + ${fastjson.version} org.yaml snakeyaml + ${snake.yaml.version} org.apache.httpcomponents httpclient + ${http.client.version} org.apache.httpcomponents httpcore + ${http.core.version} org.apache.commons commons-collections4 + ${commons-collections.version} junit junit + ${junit.version} test org.java-websocket Java-WebSocket + ${Java-WebSocket.version} org.slf4j @@ -78,56 +186,69 @@ io.netty netty-all + ${netty.version} io.netty netty-handler + ${netty.version} io.netty netty-transport-native-epoll + ${netty.version} com.google.protobuf protobuf-java + ${protobuf.version} org.mockito mockito-inline + ${mockito-inline.version} test org.apache.commons commons-lang3 + ${commons-lang3.version} org.apache.commons commons-io + ${common.io.version} xml-apis xml-apis + ${xml.apis.version} com.google.inject guice + ${guice.version} com.google.inject.extensions guice-grapher + ${guice.version} test com.google.inject.extensions guice-multibindings + ${guice.version} org.slf4j slf4j-api + ${slf4j.version} org.apache.zookeeper zookeeper + ${zookeeper.version} org.slf4j @@ -142,69 +263,62 @@ org.slf4j jul-to-slf4j + ${slf4j.version} ch.qos.logback logback-core + ${logback.version} ch.qos.logback logback-classic + ${logback.version} org.apache.logging.log4j log4j-to-slf4j + ${log4j2.version} org.slf4j log4j-over-slf4j + ${slf4j.version} org.slf4j jcl-over-slf4j + ${slf4j.version} xerces xercesImpl + ${xerces.version} org.ow2.asm asm + ${asm.version} org.ow2.asm asm-commons - - - org.projectlombok - lombok + ${asm.version} + + + kr.motd.maven + os-maven-plugin + ${os.plugin.version} + + - - org.apache.maven.plugins - maven-clean-plugin - - - agent-clean - clean - - clean - - - - - ${package.temp.dir} - - - - - - org.apache.maven.plugins maven-jar-plugin + ${jar.plugin.version} @@ -213,9 +327,27 @@ + + org.apache.maven.plugins + maven-compiler-plugin + ${compiler.plugin.version} + + 8 + 8 + + org.apache.maven.plugins maven-shade-plugin + ${shade.plugin.version} + + + package + + shade + + + @@ -270,10 +402,6 @@ org.java_websocket ${shade.common.prefix}.org.java_websocket - - org.objectweb.asm - ${shade.common.prefix}.org.objectweb.asm - org.slf4j ${shade.common.prefix}.org.slf4j @@ -295,60 +423,45 @@ ${shade.common.prefix}.org.yaml + + + + - org.apache.maven.plugins - maven-resources-plugin + org.xolstice.maven.plugins + protobuf-maven-plugin + ${protubuf.plugin.version} + + com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier} + + grpc-java + io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier} + + - package - copy-resources + compile + compile-custom - - ${config.output.dir} - true - - - ${config.source.dir} - - ${config.file.name} - ${plugin.setting.name} - ${log.setting.name} - - - - + + + + org.apache.maven.plugins + maven-source-plugin + ${source.plugin.version} + - cover-by-env - package + attach-sources - copy-resources + jar-no-fork - - ${env.cover.skip.flag} - ${config.output.dir} - true - - - ${config.source.dir}/${profile.id} - - ${config.file.name} - ${plugin.setting.name} - ${log.setting.name} - - - - - - org.xolstice.maven.plugins - protobuf-maven-plugin - \ No newline at end of file diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/tracing/common/SourceInfo.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/tracing/common/SourceInfo.java deleted file mode 100644 index 867d801653..0000000000 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/tracing/common/SourceInfo.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (C) 2022-2022 Huawei Technologies Co., Ltd. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software 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.huawei.sermant.core.service.tracing.common; - -import lombok.Builder; -import lombok.Getter; -import lombok.Setter; - -/** - * 描述上一工作单元信息 - * - * @author luanwenfei - * @since 2022-03-01 - */ -@Getter -@Setter -@Builder -public class SourceInfo { - private String address; - - private String className; - - private String method; -} diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/tracing/common/SpanEvent.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/tracing/common/SpanEvent.java deleted file mode 100644 index 743653baff..0000000000 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/tracing/common/SpanEvent.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (C) 2022-2022 Huawei Technologies Co., Ltd. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software 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.huawei.sermant.core.service.tracing.common; - -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; - -import java.util.LinkedHashMap; -import java.util.Map; - -/** - * Span实体数据 - * - * @author luanwenfei - * @since 2022-02-28 - */ -@Getter -@Setter -@NoArgsConstructor -public class SpanEvent { - private String traceId; - - private String spanId; - - private String parentSpanId; - - private transient String spanIdPrefix; - - /** - * 下一进程的spanIdPrefix - */ - private transient String nextSpanIdPrefix; - - private String className; - - private String method; - - private transient SpanEvent parentSpan; - - /** - * Span所标识工作单元执行的操作描述 - */ - private String operationDescription; - - /** - * Span所标识工作单元的类型 mysql、kafka、http等 - */ - private String type; - - private long startTime; - - private long endTime; - - private boolean isError; - - private String errorInfo; - - /** - * Span所标识工作单元是否为异步 - */ - private boolean isAsync; - - /** - * 调用当前Span所标识工作单元的节点信息 - */ - private SourceInfo sourceInfo; - - /** - * Span所标识工作单元调用的目的地的节点信息 - */ - private TargetInfo targetInfo; - - private Map tags = new LinkedHashMap<>(); - - /** - * 通过ParentSpan创建ChildrenSpan - * - * @param spanEvent ParentSpan - */ - public SpanEvent(SpanEvent spanEvent) { - this.parentSpan = spanEvent; - this.traceId = spanEvent.getTraceId(); - this.parentSpanId = spanEvent.getSpanId(); - this.spanIdPrefix = spanEvent.getSpanIdPrefix(); - } - - /** - * 为Span添加标签 - * - * @param key key - * @param value value - */ - public void addTag(String key, String value) { - if (key == null || value == null) { - return; - } - this.tags.put(key, value); - } -} diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/tracing/common/TargetInfo.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/tracing/common/TargetInfo.java deleted file mode 100644 index 7e9e8f46f8..0000000000 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/tracing/common/TargetInfo.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (C) 2022-2022 Huawei Technologies Co., Ltd. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software 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.huawei.sermant.core.service.tracing.common; - -import lombok.Builder; -import lombok.Getter; -import lombok.Setter; - -/** - * 被调用的目的节点信息 - * - * @author luanwenfei - * @since 2022-03-01 - */ -@Getter -@Setter -@Builder -public class TargetInfo { - private String address; - - private String className; - - private String method; -} diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/tracing/common/TracingRequest.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/tracing/common/TracingRequest.java deleted file mode 100644 index b6d66af471..0000000000 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/tracing/common/TracingRequest.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (C) 2022-2022 Huawei Technologies Co., Ltd. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software 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.huawei.sermant.core.service.tracing.common; - -import lombok.Getter; -import lombok.Setter; - -/** - * 调用链路追踪生命周期时需要传入的参数 - * - * @author luanwenfei - * @since 2022-03-01 - */ -@Getter -@Setter -public class TracingRequest { - private String traceId; - - private String parentSpanId; - - /** - * 当前进程生成SpanId的前缀 - */ - private String spanIdPrefix; - - private String className; - - private String method; - - /** - * SpanContext的来源信息 - */ - private SourceInfo sourceInfo; - - private TargetInfo targetInfo; - - /** - * 构造函数 - * - * @param traceId traceId - * @param parentSpanId parentSpanId - * @param spanIdPrefix spanIdPrefix - * @param className className - * @param method method - */ - public TracingRequest(String traceId, String parentSpanId, String spanIdPrefix, String className, String method) { - this.traceId = traceId; - this.parentSpanId = parentSpanId; - this.spanIdPrefix = spanIdPrefix; - this.className = className; - this.method = method; - } - - /** - * 构造函数 - * - * @param className className - * @param method method - */ - public TracingRequest(String className, String method) { - this.className = className; - this.method = method; - } -} diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/tracing/sender/TracingMessage.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/tracing/sender/TracingMessage.java deleted file mode 100644 index 3b859ce94e..0000000000 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/tracing/sender/TracingMessage.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2022-2022 Huawei Technologies Co., Ltd. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software 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.huawei.sermant.core.service.tracing.sender; - -import com.huawei.sermant.core.service.tracing.common.SpanEvent; - -import lombok.AllArgsConstructor; -import lombok.Getter; -import lombok.Setter; - -/** - * 向后端发送的调用链信息 - * - * @author luanwenfei - * @since 2022-03-07 - */ -@Getter -@Setter -@AllArgsConstructor -public class TracingMessage { - private String messageId; - - private TracingMessageHeader header; - - private SpanEvent body; -} diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/tracing/sender/TracingMessageHeader.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/tracing/sender/TracingMessageHeader.java deleted file mode 100644 index d4bdad7d72..0000000000 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/tracing/sender/TracingMessageHeader.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2022-2022 Huawei Technologies Co., Ltd. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software 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.huawei.sermant.core.service.tracing.sender; - -import lombok.Builder; - -/** - * 链路追踪向后端发送数据的头部(应用信息、节点信息) - * - * @author luanwenfei - * @since 2022-03-07 - */ -@Builder -public class TracingMessageHeader { - private String instanceId; - - private String appId; -} diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/AgentCoreEntrance.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/AgentCoreEntrance.java similarity index 83% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/AgentCoreEntrance.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/AgentCoreEntrance.java index 1d53b4f21a..f929e7a67e 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/AgentCoreEntrance.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/AgentCoreEntrance.java @@ -14,13 +14,13 @@ * limitations under the License. */ -package com.huawei.sermant.core; +package com.huaweicloud.sermant.core; -import com.huawei.sermant.core.common.BootArgsIndexer; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.config.ConfigManager; -import com.huawei.sermant.core.plugin.PluginSystemEntrance; -import com.huawei.sermant.core.service.ServiceManager; +import com.huaweicloud.sermant.core.common.BootArgsIndexer; +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.config.ConfigManager; +import com.huaweicloud.sermant.core.plugin.PluginSystemEntrance; +import com.huaweicloud.sermant.core.service.ServiceManager; import java.lang.instrument.Instrumentation; import java.util.Map; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/common/BeforeResult.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/common/BeforeResult.java similarity index 96% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/common/BeforeResult.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/common/BeforeResult.java index b3a4e0df89..f2f1377a3a 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/common/BeforeResult.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/common/BeforeResult.java @@ -20,7 +20,7 @@ * from the Apache Skywalking project. */ -package com.huawei.sermant.core.agent.common; +package com.huaweicloud.sermant.core.agent.common; /** * 实例和静态方法拦截器前置方法执行结果承载类 diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/definition/EnhanceDefinition.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/definition/EnhanceDefinition.java similarity index 91% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/definition/EnhanceDefinition.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/definition/EnhanceDefinition.java index 3edf3f5f2b..2e7d4be898 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/definition/EnhanceDefinition.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/definition/EnhanceDefinition.java @@ -20,9 +20,9 @@ * from the Apache Skywalking project. */ -package com.huawei.sermant.core.agent.definition; +package com.huaweicloud.sermant.core.agent.definition; -import com.huawei.sermant.core.agent.matcher.ClassMatcher; +import com.huaweicloud.sermant.core.agent.matcher.ClassMatcher; /** * 增强定义 diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/definition/MethodInterceptPoint.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/definition/MethodInterceptPoint.java similarity index 98% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/definition/MethodInterceptPoint.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/definition/MethodInterceptPoint.java index e8e392d85f..e0fc2589dc 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/definition/MethodInterceptPoint.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/definition/MethodInterceptPoint.java @@ -22,7 +22,7 @@ * from the Apache Skywalking project. */ -package com.huawei.sermant.core.agent.definition; +package com.huaweicloud.sermant.core.agent.definition; import net.bytebuddy.description.method.MethodDescription; import net.bytebuddy.matcher.ElementMatcher; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/interceptor/ConstructorInterceptor.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/interceptor/ConstructorInterceptor.java similarity index 95% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/interceptor/ConstructorInterceptor.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/interceptor/ConstructorInterceptor.java index e338531e79..5395ed467c 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/interceptor/ConstructorInterceptor.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/interceptor/ConstructorInterceptor.java @@ -20,7 +20,7 @@ * from the Apache Skywalking project. */ -package com.huawei.sermant.core.agent.interceptor; +package com.huaweicloud.sermant.core.agent.interceptor; /** * 构造方法拦截器接口 diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/interceptor/InstanceMethodInterceptor.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/interceptor/InstanceMethodInterceptor.java similarity index 94% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/interceptor/InstanceMethodInterceptor.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/interceptor/InstanceMethodInterceptor.java index 5bbe9c5afe..86c6ea8d96 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/interceptor/InstanceMethodInterceptor.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/interceptor/InstanceMethodInterceptor.java @@ -20,9 +20,9 @@ * from the Apache Skywalking project. */ -package com.huawei.sermant.core.agent.interceptor; +package com.huaweicloud.sermant.core.agent.interceptor; -import com.huawei.sermant.core.agent.common.BeforeResult; +import com.huaweicloud.sermant.core.agent.common.BeforeResult; import java.lang.reflect.Method; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/interceptor/Interceptor.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/interceptor/Interceptor.java similarity index 92% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/interceptor/Interceptor.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/interceptor/Interceptor.java index cf09ca895a..55ba33f154 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/interceptor/Interceptor.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/interceptor/Interceptor.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.huawei.sermant.core.agent.interceptor; +package com.huaweicloud.sermant.core.agent.interceptor; /** * 拦截器接口 diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/interceptor/StaticMethodInterceptor.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/interceptor/StaticMethodInterceptor.java similarity index 94% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/interceptor/StaticMethodInterceptor.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/interceptor/StaticMethodInterceptor.java index cc817cc159..e73659d37a 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/interceptor/StaticMethodInterceptor.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/interceptor/StaticMethodInterceptor.java @@ -20,9 +20,9 @@ * from the Apache Skywalking project. */ -package com.huawei.sermant.core.agent.interceptor; +package com.huaweicloud.sermant.core.agent.interceptor; -import com.huawei.sermant.core.agent.common.BeforeResult; +import com.huaweicloud.sermant.core.agent.common.BeforeResult; import java.lang.reflect.Method; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/matcher/AnnotationMatcher.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/matcher/AnnotationMatcher.java similarity index 96% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/matcher/AnnotationMatcher.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/matcher/AnnotationMatcher.java index 438c9d79b6..ec0610b754 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/matcher/AnnotationMatcher.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/matcher/AnnotationMatcher.java @@ -20,13 +20,13 @@ * from the Apache Skywalking project. */ -package com.huawei.sermant.core.agent.matcher; +package com.huaweicloud.sermant.core.agent.matcher; import static net.bytebuddy.matcher.ElementMatchers.isAnnotatedWith; import static net.bytebuddy.matcher.ElementMatchers.isInterface; import static net.bytebuddy.matcher.ElementMatchers.named; -import com.huawei.sermant.core.utils.AssertUtils; +import com.huaweicloud.sermant.core.utils.AssertUtils; import net.bytebuddy.description.annotation.AnnotationDescription; import net.bytebuddy.description.annotation.AnnotationList; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/matcher/ClassMatcher.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/matcher/ClassMatcher.java similarity index 95% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/matcher/ClassMatcher.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/matcher/ClassMatcher.java index c241cef10e..84c70df65b 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/matcher/ClassMatcher.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/matcher/ClassMatcher.java @@ -20,7 +20,7 @@ * from the Apache Skywalking project. */ -package com.huawei.sermant.core.agent.matcher; +package com.huaweicloud.sermant.core.agent.matcher; /** * 类型匹配器接口 diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/matcher/ClassMatchers.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/matcher/ClassMatchers.java similarity index 95% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/matcher/ClassMatchers.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/matcher/ClassMatchers.java index af20949d1b..b383f62069 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/matcher/ClassMatchers.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/matcher/ClassMatchers.java @@ -20,14 +20,8 @@ * from the Apache Skywalking project. */ -package com.huawei.sermant.core.agent.matcher; +package com.huaweicloud.sermant.core.agent.matcher; -/** - * 匹配器Facade类 - *

Copyright 2021 - * - * @since 2021-12-31 - */ @Deprecated public class ClassMatchers { private ClassMatchers() { diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/matcher/MultiClassMatcher.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/matcher/MultiClassMatcher.java similarity index 94% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/matcher/MultiClassMatcher.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/matcher/MultiClassMatcher.java index 3438afd547..c72e69f8c3 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/matcher/MultiClassMatcher.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/matcher/MultiClassMatcher.java @@ -20,9 +20,9 @@ * from the Apache Skywalking project. */ -package com.huawei.sermant.core.agent.matcher; +package com.huaweicloud.sermant.core.agent.matcher; -import com.huawei.sermant.core.utils.AssertUtils; +import com.huaweicloud.sermant.core.utils.AssertUtils; import net.bytebuddy.description.type.TypeDescription; import net.bytebuddy.matcher.ElementMatcher; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/matcher/NameMatcher.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/matcher/NameMatcher.java similarity index 95% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/matcher/NameMatcher.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/matcher/NameMatcher.java index 42f5dcd2e6..143ac068b1 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/matcher/NameMatcher.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/matcher/NameMatcher.java @@ -20,7 +20,7 @@ * from the Apache Skywalking project. */ -package com.huawei.sermant.core.agent.matcher; +package com.huaweicloud.sermant.core.agent.matcher; /** * 类名匹配器 diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/matcher/NonNameMatcher.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/matcher/NonNameMatcher.java similarity index 70% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/matcher/NonNameMatcher.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/matcher/NonNameMatcher.java index 2cba723318..82e616a71e 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/matcher/NonNameMatcher.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/matcher/NonNameMatcher.java @@ -1,10 +1,9 @@ /* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at + * Copyright (C) 2022-2022 Huawei Technologies Co., Ltd. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * @@ -20,7 +19,7 @@ * from the Apache Skywalking project. */ -package com.huawei.sermant.core.agent.matcher; +package com.huaweicloud.sermant.core.agent.matcher; import net.bytebuddy.description.type.TypeDescription; import net.bytebuddy.matcher.ElementMatcher; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/matcher/PrefixMatcher.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/matcher/PrefixMatcher.java similarity index 94% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/matcher/PrefixMatcher.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/matcher/PrefixMatcher.java index f16f7eca18..4f1291efcb 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/matcher/PrefixMatcher.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/matcher/PrefixMatcher.java @@ -20,9 +20,9 @@ * from the Apache Skywalking project. */ -package com.huawei.sermant.core.agent.matcher; +package com.huaweicloud.sermant.core.agent.matcher; -import com.huawei.sermant.core.utils.AssertUtils; +import com.huaweicloud.sermant.core.utils.AssertUtils; import net.bytebuddy.description.type.TypeDescription; import net.bytebuddy.matcher.ElementMatcher; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/matcher/SuperTypeMatcher.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/matcher/SuperTypeMatcher.java similarity index 97% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/matcher/SuperTypeMatcher.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/matcher/SuperTypeMatcher.java index c570d29a50..b62f44ed61 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/agent/matcher/SuperTypeMatcher.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/agent/matcher/SuperTypeMatcher.java @@ -19,13 +19,13 @@ * Based on org/apache/skywalking/apm/agent/core/plugin/match/HierarchyMatch.java from the Apache Skywalking project. */ -package com.huawei.sermant.core.agent.matcher; +package com.huaweicloud.sermant.core.agent.matcher; import static net.bytebuddy.matcher.ElementMatchers.hasSuperType; import static net.bytebuddy.matcher.ElementMatchers.isInterface; import static net.bytebuddy.matcher.ElementMatchers.named; -import com.huawei.sermant.core.utils.AssertUtils; +import com.huaweicloud.sermant.core.utils.AssertUtils; import net.bytebuddy.description.type.TypeDescription; import net.bytebuddy.description.type.TypeList; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/common/BootArgsIndexer.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/common/BootArgsIndexer.java similarity index 94% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/common/BootArgsIndexer.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/common/BootArgsIndexer.java index aadd2439ec..1ca19896cf 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/common/BootArgsIndexer.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/common/BootArgsIndexer.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.huawei.sermant.core.common; +package com.huaweicloud.sermant.core.common; -import com.huawei.sermant.core.exception.SchemaException; -import com.huawei.sermant.core.utils.JarFileUtils; -import com.huawei.sermant.core.utils.UuidUtil; +import com.huaweicloud.sermant.core.exception.SchemaException; +import com.huaweicloud.sermant.core.utils.JarFileUtils; +import com.huaweicloud.sermant.core.utils.UuidUtil; import java.io.File; import java.io.IOException; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/common/CommonConstant.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/common/CommonConstant.java similarity index 98% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/common/CommonConstant.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/common/CommonConstant.java index e4043b51c6..49d886a5a2 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/common/CommonConstant.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/common/CommonConstant.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.huawei.sermant.core.common; +package com.huaweicloud.sermant.core.common; import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/common/LoggerFactory.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/common/LoggerFactory.java similarity index 98% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/common/LoggerFactory.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/common/LoggerFactory.java index 4fa982249e..c6e1e2b16a 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/common/LoggerFactory.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/common/LoggerFactory.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.huawei.sermant.core.common; +package com.huaweicloud.sermant.core.common; import ch.qos.logback.classic.util.ContextInitializer; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/config/ConfigManager.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/config/ConfigManager.java similarity index 95% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/config/ConfigManager.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/config/ConfigManager.java index f527b5df46..8db966e87b 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/config/ConfigManager.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/config/ConfigManager.java @@ -14,13 +14,13 @@ * limitations under the License. */ -package com.huawei.sermant.core.config; +package com.huaweicloud.sermant.core.config; -import com.huawei.sermant.core.common.BootArgsIndexer; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.config.common.BaseConfig; -import com.huawei.sermant.core.config.strategy.LoadConfigStrategy; -import com.huawei.sermant.core.config.utils.ConfigKeyUtil; +import com.huaweicloud.sermant.core.common.BootArgsIndexer; +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.config.common.BaseConfig; +import com.huaweicloud.sermant.core.config.strategy.LoadConfigStrategy; +import com.huaweicloud.sermant.core.config.utils.ConfigKeyUtil; import java.io.File; import java.util.HashMap; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/config/common/BaseConfig.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/config/common/BaseConfig.java similarity index 76% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/config/common/BaseConfig.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/config/common/BaseConfig.java index 37f373646e..0cbb631bb0 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/config/common/BaseConfig.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/config/common/BaseConfig.java @@ -14,13 +14,15 @@ * limitations under the License. */ -package com.huawei.sermant.core.config.common; +package com.huaweicloud.sermant.core.config.common; + +import com.huaweicloud.sermant.core.config.ConfigManager; /** * 配置基类 *

要求所有配置类都继承该配置基类,同时在{@code META-INF/services}目录创建{@link BaseConfig}文件,并添加所有需要加载的实现类 - *

之后,调用{@link com.huawei.sermant.core.config.ConfigManager#initialize(java.util.Map)}初始化所有配置对象 - *

初始化之后,调用{@link com.huawei.sermant.core.config.ConfigManager#getConfig(Class)}获取配置对象 + *

之后,调用{@link ConfigManager#initialize(java.util.Map)}初始化所有配置对象 + *

初始化之后,调用{@link ConfigManager#getConfig(Class)}获取配置对象 * * @author HapThorin * @version 1.0.0 diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/config/common/ConfigFieldKey.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/config/common/ConfigFieldKey.java similarity index 91% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/config/common/ConfigFieldKey.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/config/common/ConfigFieldKey.java index 981f09ca95..0718c09827 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/config/common/ConfigFieldKey.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/config/common/ConfigFieldKey.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.huawei.sermant.core.config.common; +package com.huaweicloud.sermant.core.config.common; -import com.huawei.sermant.core.config.utils.ConfigKeyUtil; +import com.huaweicloud.sermant.core.config.utils.ConfigKeyUtil; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/config/common/ConfigTypeKey.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/config/common/ConfigTypeKey.java similarity index 91% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/config/common/ConfigTypeKey.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/config/common/ConfigTypeKey.java index e1dc0d3107..002764cad0 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/config/common/ConfigTypeKey.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/config/common/ConfigTypeKey.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.huawei.sermant.core.config.common; +package com.huaweicloud.sermant.core.config.common; -import com.huawei.sermant.core.config.utils.ConfigKeyUtil; +import com.huaweicloud.sermant.core.config.utils.ConfigKeyUtil; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/config/strategy/LoadConfigStrategy.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/config/strategy/LoadConfigStrategy.java similarity index 95% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/config/strategy/LoadConfigStrategy.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/config/strategy/LoadConfigStrategy.java index cc86334712..7dcda35544 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/config/strategy/LoadConfigStrategy.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/config/strategy/LoadConfigStrategy.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package com.huawei.sermant.core.config.strategy; +package com.huaweicloud.sermant.core.config.strategy; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.config.common.BaseConfig; +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.config.common.BaseConfig; import java.io.File; import java.util.Locale; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/config/strategy/LoadPropertiesStrategy.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/config/strategy/LoadPropertiesStrategy.java similarity index 93% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/config/strategy/LoadPropertiesStrategy.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/config/strategy/LoadPropertiesStrategy.java index af17d6d50e..896151eb4f 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/config/strategy/LoadPropertiesStrategy.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/config/strategy/LoadPropertiesStrategy.java @@ -14,16 +14,16 @@ * limitations under the License. */ -package com.huawei.sermant.core.config.strategy; +package com.huaweicloud.sermant.core.config.strategy; -import com.huawei.sermant.core.common.CommonConstant; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.config.common.BaseConfig; -import com.huawei.sermant.core.config.common.ConfigFieldKey; -import com.huawei.sermant.core.config.common.ConfigTypeKey; -import com.huawei.sermant.core.config.utils.ConfigFieldUtil; -import com.huawei.sermant.core.config.utils.ConfigKeyUtil; -import com.huawei.sermant.core.config.utils.ConfigValueUtil; +import com.huaweicloud.sermant.core.common.CommonConstant; +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.config.common.BaseConfig; +import com.huaweicloud.sermant.core.config.common.ConfigFieldKey; +import com.huaweicloud.sermant.core.config.common.ConfigTypeKey; +import com.huaweicloud.sermant.core.config.utils.ConfigFieldUtil; +import com.huaweicloud.sermant.core.config.utils.ConfigKeyUtil; +import com.huaweicloud.sermant.core.config.utils.ConfigValueUtil; import java.io.File; import java.io.FileInputStream; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/config/strategy/LoadYamlStrategy.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/config/strategy/LoadYamlStrategy.java similarity index 93% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/config/strategy/LoadYamlStrategy.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/config/strategy/LoadYamlStrategy.java index 6877b2d6a4..f41df38f2e 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/config/strategy/LoadYamlStrategy.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/config/strategy/LoadYamlStrategy.java @@ -14,14 +14,14 @@ * limitations under the License. */ -package com.huawei.sermant.core.config.strategy; +package com.huaweicloud.sermant.core.config.strategy; -import com.huawei.sermant.core.common.CommonConstant; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.config.common.BaseConfig; -import com.huawei.sermant.core.config.common.ConfigFieldKey; -import com.huawei.sermant.core.config.utils.ConfigKeyUtil; -import com.huawei.sermant.core.config.utils.ConfigValueUtil; +import com.huaweicloud.sermant.core.common.CommonConstant; +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.config.common.BaseConfig; +import com.huaweicloud.sermant.core.config.common.ConfigFieldKey; +import com.huaweicloud.sermant.core.config.utils.ConfigKeyUtil; +import com.huaweicloud.sermant.core.config.utils.ConfigValueUtil; import com.alibaba.fastjson.util.IOUtils; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/config/utils/ConfigFieldUtil.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/config/utils/ConfigFieldUtil.java similarity index 98% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/config/utils/ConfigFieldUtil.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/config/utils/ConfigFieldUtil.java index e256e3d14e..2d532f13b5 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/config/utils/ConfigFieldUtil.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/config/utils/ConfigFieldUtil.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.huawei.sermant.core.config.utils; +package com.huaweicloud.sermant.core.config.utils; -import com.huawei.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.common.LoggerFactory; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/config/utils/ConfigKeyUtil.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/config/utils/ConfigKeyUtil.java similarity index 92% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/config/utils/ConfigKeyUtil.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/config/utils/ConfigKeyUtil.java index c6190c90d6..0f2c69da6f 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/config/utils/ConfigKeyUtil.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/config/utils/ConfigKeyUtil.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package com.huawei.sermant.core.config.utils; +package com.huaweicloud.sermant.core.config.utils; -import com.huawei.sermant.core.config.common.ConfigFieldKey; -import com.huawei.sermant.core.config.common.ConfigTypeKey; +import com.huaweicloud.sermant.core.config.common.ConfigFieldKey; +import com.huaweicloud.sermant.core.config.common.ConfigTypeKey; import java.lang.reflect.Field; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/config/utils/ConfigValueUtil.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/config/utils/ConfigValueUtil.java similarity index 98% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/config/utils/ConfigValueUtil.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/config/utils/ConfigValueUtil.java index 93cd15a508..4759033a0d 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/config/utils/ConfigValueUtil.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/config/utils/ConfigValueUtil.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.huawei.sermant.core.config.utils; +package com.huaweicloud.sermant.core.config.utils; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.exception.DupConfIndexException; -import com.huawei.sermant.core.utils.StringUtils; +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.exception.DupConfIndexException; +import com.huaweicloud.sermant.core.utils.StringUtils; import java.lang.reflect.Array; import java.util.ArrayList; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/exception/DupConfIndexException.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/exception/DupConfIndexException.java similarity index 96% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/exception/DupConfIndexException.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/exception/DupConfIndexException.java index 2581e75277..8ebc23109f 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/exception/DupConfIndexException.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/exception/DupConfIndexException.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.huawei.sermant.core.exception; +package com.huaweicloud.sermant.core.exception; import java.util.Locale; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/exception/DupServiceException.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/exception/DupServiceException.java similarity index 95% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/exception/DupServiceException.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/exception/DupServiceException.java index 5ec5841718..5e46139cba 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/exception/DupServiceException.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/exception/DupServiceException.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.huawei.sermant.core.exception; +package com.huaweicloud.sermant.core.exception; import java.util.Locale; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/exception/SchemaException.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/exception/SchemaException.java similarity index 98% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/exception/SchemaException.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/exception/SchemaException.java index 88ca60404a..68142d686f 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/exception/SchemaException.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/exception/SchemaException.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.huawei.sermant.core.exception; +package com.huaweicloud.sermant.core.exception; import java.util.Locale; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/PluginManager.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/PluginManager.java similarity index 94% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/PluginManager.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/PluginManager.java index 14d1938546..210f65a6d8 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/PluginManager.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/PluginManager.java @@ -14,16 +14,16 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin; +package com.huaweicloud.sermant.core.plugin; -import com.huawei.sermant.core.common.BootArgsIndexer; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.exception.SchemaException; -import com.huawei.sermant.core.plugin.classloader.PluginClassLoader; -import com.huawei.sermant.core.plugin.common.PluginConstant; -import com.huawei.sermant.core.plugin.common.PluginSchemaValidator; -import com.huawei.sermant.core.plugin.config.PluginConfigManager; -import com.huawei.sermant.core.plugin.service.PluginServiceManager; +import com.huaweicloud.sermant.core.common.BootArgsIndexer; +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.exception.SchemaException; +import com.huaweicloud.sermant.core.plugin.classloader.PluginClassLoader; +import com.huaweicloud.sermant.core.plugin.common.PluginConstant; +import com.huaweicloud.sermant.core.plugin.common.PluginSchemaValidator; +import com.huaweicloud.sermant.core.plugin.config.PluginConfigManager; +import com.huaweicloud.sermant.core.plugin.service.PluginServiceManager; import java.io.File; import java.io.FileFilter; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/PluginSystemEntrance.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/PluginSystemEntrance.java similarity index 86% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/PluginSystemEntrance.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/PluginSystemEntrance.java index 454a5b12f2..d9fdf982f0 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/PluginSystemEntrance.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/PluginSystemEntrance.java @@ -14,14 +14,14 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin; +package com.huaweicloud.sermant.core.plugin; -import com.huawei.sermant.core.common.BootArgsIndexer; -import com.huawei.sermant.core.common.CommonConstant; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.plugin.adaptor.AdaptorManager; -import com.huawei.sermant.core.plugin.agent.ByteEnhanceManager; -import com.huawei.sermant.core.plugin.config.PluginSetting; +import com.huaweicloud.sermant.core.common.BootArgsIndexer; +import com.huaweicloud.sermant.core.common.CommonConstant; +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.plugin.adaptor.AdaptorManager; +import com.huaweicloud.sermant.core.plugin.agent.ByteEnhanceManager; +import com.huaweicloud.sermant.core.plugin.config.PluginSetting; import org.yaml.snakeyaml.Yaml; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/adaptor/AdaptorManager.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/adaptor/AdaptorManager.java similarity index 93% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/adaptor/AdaptorManager.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/adaptor/AdaptorManager.java index 1e873f1b67..2d43f84384 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/adaptor/AdaptorManager.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/adaptor/AdaptorManager.java @@ -14,22 +14,22 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.adaptor; +package com.huaweicloud.sermant.core.plugin.adaptor; -import com.huawei.sermant.core.common.BootArgsIndexer; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.config.ConfigManager; -import com.huawei.sermant.core.exception.SchemaException; -import com.huawei.sermant.core.plugin.adaptor.collector.AdaptorCollectorManager; -import com.huawei.sermant.core.plugin.adaptor.common.AdaptorConstants; -import com.huawei.sermant.core.plugin.adaptor.config.AdaptorConfig; -import com.huawei.sermant.core.plugin.adaptor.config.AdaptorSetting; -import com.huawei.sermant.core.plugin.adaptor.remapper.AdaptorShader; -import com.huawei.sermant.core.plugin.adaptor.service.AdaptorServiceManager; -import com.huawei.sermant.core.plugin.classloader.PluginClassLoader; -import com.huawei.sermant.core.plugin.common.PluginConstant; -import com.huawei.sermant.core.plugin.common.PluginSchemaValidator; -import com.huawei.sermant.core.utils.FileUtils; +import com.huaweicloud.sermant.core.common.BootArgsIndexer; +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.config.ConfigManager; +import com.huaweicloud.sermant.core.exception.SchemaException; +import com.huaweicloud.sermant.core.plugin.adaptor.collector.AdaptorCollectorManager; +import com.huaweicloud.sermant.core.plugin.adaptor.common.AdaptorConstants; +import com.huaweicloud.sermant.core.plugin.adaptor.config.AdaptorConfig; +import com.huaweicloud.sermant.core.plugin.adaptor.config.AdaptorSetting; +import com.huaweicloud.sermant.core.plugin.adaptor.remapper.AdaptorShader; +import com.huaweicloud.sermant.core.plugin.adaptor.service.AdaptorServiceManager; +import com.huaweicloud.sermant.core.plugin.classloader.PluginClassLoader; +import com.huaweicloud.sermant.core.plugin.common.PluginConstant; +import com.huaweicloud.sermant.core.plugin.common.PluginSchemaValidator; +import com.huaweicloud.sermant.core.utils.FileUtils; import org.yaml.snakeyaml.Yaml; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/adaptor/collector/AdaptorCollector.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/adaptor/collector/AdaptorCollector.java similarity index 85% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/adaptor/collector/AdaptorCollector.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/adaptor/collector/AdaptorCollector.java index 82988d649e..f9f4f96cdf 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/adaptor/collector/AdaptorCollector.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/adaptor/collector/AdaptorCollector.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.adaptor.collector; +package com.huaweicloud.sermant.core.plugin.adaptor.collector; -import com.huawei.sermant.core.plugin.agent.collector.PluginCollector; +import com.huaweicloud.sermant.core.plugin.agent.collector.PluginCollector; /** * 适配器插件收集器 diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/adaptor/collector/AdaptorCollectorManager.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/adaptor/collector/AdaptorCollectorManager.java similarity index 89% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/adaptor/collector/AdaptorCollectorManager.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/adaptor/collector/AdaptorCollectorManager.java index 54740cd171..da8cc5111b 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/adaptor/collector/AdaptorCollectorManager.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/adaptor/collector/AdaptorCollectorManager.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.adaptor.collector; +package com.huaweicloud.sermant.core.plugin.adaptor.collector; -import com.huawei.sermant.core.plugin.agent.collector.AbstractPluginCollector; -import com.huawei.sermant.core.plugin.agent.declarer.PluginDeclarer; -import com.huawei.sermant.core.plugin.agent.declarer.PluginDescription; +import com.huaweicloud.sermant.core.plugin.agent.collector.AbstractPluginCollector; +import com.huaweicloud.sermant.core.plugin.agent.declarer.PluginDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.PluginDescription; import java.util.ArrayList; import java.util.LinkedHashMap; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/adaptor/common/AdaptorConstants.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/adaptor/common/AdaptorConstants.java similarity index 94% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/adaptor/common/AdaptorConstants.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/adaptor/common/AdaptorConstants.java index dd9fce72bc..9387b18b89 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/adaptor/common/AdaptorConstants.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/adaptor/common/AdaptorConstants.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.adaptor.common; +package com.huaweicloud.sermant.core.plugin.adaptor.common; /** * 适配器相关常量 diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/adaptor/config/AdaptorConfig.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/adaptor/config/AdaptorConfig.java similarity index 88% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/adaptor/config/AdaptorConfig.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/adaptor/config/AdaptorConfig.java index af39066050..29dc1adfac 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/adaptor/config/AdaptorConfig.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/adaptor/config/AdaptorConfig.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.adaptor.config; +package com.huaweicloud.sermant.core.plugin.adaptor.config; -import com.huawei.sermant.core.config.common.BaseConfig; -import com.huawei.sermant.core.config.common.ConfigTypeKey; +import com.huaweicloud.sermant.core.config.common.BaseConfig; +import com.huaweicloud.sermant.core.config.common.ConfigTypeKey; /** * 适配器配置 diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/adaptor/config/AdaptorSetting.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/adaptor/config/AdaptorSetting.java similarity index 96% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/adaptor/config/AdaptorSetting.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/adaptor/config/AdaptorSetting.java index 59d24138cb..2998302dfe 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/adaptor/config/AdaptorSetting.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/adaptor/config/AdaptorSetting.java @@ -14,9 +14,10 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.adaptor.config; +package com.huaweicloud.sermant.core.plugin.adaptor.config; -import com.huawei.sermant.core.plugin.adaptor.common.AdaptorConstants; +import com.huaweicloud.sermant.core.plugin.adaptor.common.AdaptorConstants; +import com.huaweicloud.sermant.core.plugin.config.PluginSetting; import java.util.Arrays; import java.util.List; @@ -31,7 +32,7 @@ */ public class AdaptorSetting { /** - * 适配器名称,用于校验,必须与{@link com.huawei.sermant.core.plugin.config.PluginSetting}中的配置值一致 + * 适配器名称,用于校验,必须与{@link PluginSetting}中的配置值一致 */ private String adaptorName; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/adaptor/remapper/AdaptorRemapper.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/adaptor/remapper/AdaptorRemapper.java similarity index 96% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/adaptor/remapper/AdaptorRemapper.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/adaptor/remapper/AdaptorRemapper.java index 345577bd8e..5256b1b799 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/adaptor/remapper/AdaptorRemapper.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/adaptor/remapper/AdaptorRemapper.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.adaptor.remapper; +package com.huaweicloud.sermant.core.plugin.adaptor.remapper; -import com.huawei.sermant.core.plugin.adaptor.config.AdaptorSetting; +import com.huaweicloud.sermant.core.plugin.adaptor.config.AdaptorSetting; import org.objectweb.asm.commons.Remapper; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/adaptor/remapper/AdaptorShader.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/adaptor/remapper/AdaptorShader.java similarity index 98% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/adaptor/remapper/AdaptorShader.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/adaptor/remapper/AdaptorShader.java index dcdd141c41..4e0ff0aefa 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/adaptor/remapper/AdaptorShader.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/adaptor/remapper/AdaptorShader.java @@ -11,12 +11,12 @@ * specific language governing permissions and limitations under the License. */ -package com.huawei.sermant.core.plugin.adaptor.remapper; +package com.huaweicloud.sermant.core.plugin.adaptor.remapper; -import com.huawei.sermant.core.common.CommonConstant; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.plugin.adaptor.config.AdaptorSetting; -import com.huawei.sermant.core.utils.FileUtils; +import com.huaweicloud.sermant.core.common.CommonConstant; +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.plugin.adaptor.config.AdaptorSetting; +import com.huaweicloud.sermant.core.utils.FileUtils; import org.objectweb.asm.ClassReader; import org.objectweb.asm.ClassVisitor; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/adaptor/service/AdaptorService.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/adaptor/service/AdaptorService.java similarity index 95% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/adaptor/service/AdaptorService.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/adaptor/service/AdaptorService.java index c5f2d6cfe9..24937e701a 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/adaptor/service/AdaptorService.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/adaptor/service/AdaptorService.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.adaptor.service; +package com.huaweicloud.sermant.core.plugin.adaptor.service; import java.io.File; import java.lang.instrument.Instrumentation; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/adaptor/service/AdaptorServiceManager.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/adaptor/service/AdaptorServiceManager.java similarity index 97% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/adaptor/service/AdaptorServiceManager.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/adaptor/service/AdaptorServiceManager.java index 23d3764a32..0b4b5f0022 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/adaptor/service/AdaptorServiceManager.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/adaptor/service/AdaptorServiceManager.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.adaptor.service; +package com.huaweicloud.sermant.core.plugin.adaptor.service; import java.io.File; import java.lang.instrument.Instrumentation; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/BufferedAgentBuilder.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/BufferedAgentBuilder.java similarity index 95% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/BufferedAgentBuilder.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/BufferedAgentBuilder.java index a3ae45bb3a..a72b08ec71 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/BufferedAgentBuilder.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/BufferedAgentBuilder.java @@ -14,14 +14,14 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.agent; +package com.huaweicloud.sermant.core.plugin.agent; -import com.huawei.sermant.core.common.CommonConstant; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.config.ConfigManager; -import com.huawei.sermant.core.plugin.agent.config.AgentConfig; -import com.huawei.sermant.core.plugin.agent.declarer.PluginDescription; -import com.huawei.sermant.core.plugin.classloader.PluginClassLoader; +import com.huaweicloud.sermant.core.common.CommonConstant; +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.config.ConfigManager; +import com.huaweicloud.sermant.core.plugin.agent.config.AgentConfig; +import com.huaweicloud.sermant.core.plugin.agent.declarer.PluginDescription; +import com.huaweicloud.sermant.core.plugin.classloader.PluginClassLoader; import net.bytebuddy.ByteBuddy; import net.bytebuddy.agent.builder.AgentBuilder; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/ByteEnhanceManager.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/ByteEnhanceManager.java similarity index 89% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/ByteEnhanceManager.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/ByteEnhanceManager.java index 7deba8cfd5..02645c0749 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/ByteEnhanceManager.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/ByteEnhanceManager.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.agent; +package com.huaweicloud.sermant.core.plugin.agent; -import com.huawei.sermant.core.plugin.agent.collector.PluginCollectorManager; +import com.huaweicloud.sermant.core.plugin.agent.collector.PluginCollectorManager; import java.lang.instrument.Instrumentation; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/annotations/BeanPropertyFlag.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/annotations/BeanPropertyFlag.java similarity index 87% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/annotations/BeanPropertyFlag.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/annotations/BeanPropertyFlag.java index dd447da048..82c0412413 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/annotations/BeanPropertyFlag.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/annotations/BeanPropertyFlag.java @@ -14,7 +14,9 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.agent.annotations; +package com.huaweicloud.sermant.core.plugin.agent.annotations; + +import com.huaweicloud.sermant.core.plugin.agent.declarer.SuperTypeDeclarer; import java.lang.annotation.ElementType; import java.lang.annotation.Repeatable; @@ -24,7 +26,7 @@ /** * Java Bean标记,被该注解修饰的接口,将根据该注解定义的属性在被增强类中实现get、set方法 - *

见{@link com.huawei.sermant.core.plugin.agent.declarer.SuperTypeDeclarer.ForBeanProperty} + *

见{@link SuperTypeDeclarer.ForBeanProperty} * * @author HapThorin * @version 1.0.0 diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/annotations/BeanPropertyFlags.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/annotations/BeanPropertyFlags.java similarity index 94% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/annotations/BeanPropertyFlags.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/annotations/BeanPropertyFlags.java index 8326080c33..b3e38d9f43 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/annotations/BeanPropertyFlags.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/annotations/BeanPropertyFlags.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.agent.annotations; +package com.huaweicloud.sermant.core.plugin.agent.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/collector/AbstractPluginCollector.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/collector/AbstractPluginCollector.java similarity index 88% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/collector/AbstractPluginCollector.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/collector/AbstractPluginCollector.java index 36d4228e80..f0103d72a1 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/collector/AbstractPluginCollector.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/collector/AbstractPluginCollector.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.agent.collector; +package com.huaweicloud.sermant.core.plugin.agent.collector; -import com.huawei.sermant.core.plugin.agent.declarer.PluginDescription; +import com.huaweicloud.sermant.core.plugin.agent.declarer.PluginDescription; import java.util.Collections; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/collector/DefaultPluginCollector.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/collector/DefaultPluginCollector.java similarity index 84% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/collector/DefaultPluginCollector.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/collector/DefaultPluginCollector.java index 12265152b2..328064a8d9 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/collector/DefaultPluginCollector.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/collector/DefaultPluginCollector.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.agent.collector; +package com.huaweicloud.sermant.core.plugin.agent.collector; -import com.huawei.sermant.core.plugin.agent.declarer.PluginDeclarer; -import com.huawei.sermant.core.plugin.agent.declarer.PluginDescription; +import com.huaweicloud.sermant.core.plugin.agent.declarer.PluginDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.PluginDescription; import java.util.ServiceLoader; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/collector/DeprecatedPluginCollector.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/collector/DeprecatedPluginCollector.java similarity index 77% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/collector/DeprecatedPluginCollector.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/collector/DeprecatedPluginCollector.java index 292a1db49e..5993932263 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/collector/DeprecatedPluginCollector.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/collector/DeprecatedPluginCollector.java @@ -14,24 +14,24 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.agent.collector; +package com.huaweicloud.sermant.core.plugin.agent.collector; -import com.huawei.sermant.core.agent.common.BeforeResult; -import com.huawei.sermant.core.agent.definition.EnhanceDefinition; -import com.huawei.sermant.core.agent.definition.MethodInterceptPoint; -import com.huawei.sermant.core.agent.interceptor.ConstructorInterceptor; -import com.huawei.sermant.core.agent.interceptor.InstanceMethodInterceptor; -import com.huawei.sermant.core.agent.interceptor.StaticMethodInterceptor; -import com.huawei.sermant.core.agent.matcher.NameMatcher; -import com.huawei.sermant.core.agent.matcher.NonNameMatcher; -import com.huawei.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; -import com.huawei.sermant.core.plugin.agent.declarer.PluginDeclarer; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.plugin.agent.interceptor.Interceptor; -import com.huawei.sermant.core.plugin.agent.matcher.ClassMatcher; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; -import com.huawei.sermant.core.plugin.agent.matcher.MethodType; +import com.huaweicloud.sermant.core.agent.common.BeforeResult; +import com.huaweicloud.sermant.core.agent.definition.EnhanceDefinition; +import com.huaweicloud.sermant.core.agent.definition.MethodInterceptPoint; +import com.huaweicloud.sermant.core.agent.interceptor.ConstructorInterceptor; +import com.huaweicloud.sermant.core.agent.interceptor.InstanceMethodInterceptor; +import com.huaweicloud.sermant.core.agent.interceptor.StaticMethodInterceptor; +import com.huaweicloud.sermant.core.agent.matcher.NameMatcher; +import com.huaweicloud.sermant.core.agent.matcher.NonNameMatcher; +import com.huaweicloud.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.PluginDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.agent.interceptor.Interceptor; +import com.huaweicloud.sermant.core.plugin.agent.matcher.ClassMatcher; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodType; import net.bytebuddy.description.method.MethodDescription; import net.bytebuddy.description.type.TypeDescription; @@ -59,7 +59,7 @@ public class DeprecatedPluginCollector extends AbstractPluginCollector { */ private static Interceptor createInterceptor(String interceptor, ClassLoader classLoader) { try { - return interceptorTransform((com.huawei.sermant.core.agent.interceptor.Interceptor) + return interceptorTransform((com.huaweicloud.sermant.core.agent.interceptor.Interceptor) classLoader.loadClass(interceptor).newInstance()); } catch (InstantiationException | IllegalAccessException | ClassNotFoundException e) { throw new IllegalArgumentException( @@ -73,21 +73,22 @@ private static Interceptor createInterceptor(String interceptor, ClassLoader cla * @param interceptor 旧版拦截器 * @return 新版拦截器 */ - private static Interceptor interceptorTransform(com.huawei.sermant.core.agent.interceptor.Interceptor interceptor) { + private static Interceptor + interceptorTransform(com.huaweicloud.sermant.core.agent.interceptor.Interceptor interceptor) { return new Interceptor() { @Override public ExecuteContext before(ExecuteContext context) throws Exception { if (interceptor instanceof StaticMethodInterceptor) { final BeforeResult beforeResult = new BeforeResult(); - ((StaticMethodInterceptor) interceptor).before(context.getRawCls(), context.getMethod(), - context.getArguments(), beforeResult); + ((StaticMethodInterceptor)interceptor).before(context.getRawCls(), context.getMethod(), + context.getArguments(), beforeResult); if (!beforeResult.isContinue()) { context.skip(beforeResult.getResult()); } } else if (interceptor instanceof InstanceMethodInterceptor) { final BeforeResult beforeResult = new BeforeResult(); - ((InstanceMethodInterceptor) interceptor).before(context.getObject(), context.getMethod(), - context.getArguments(), beforeResult); + ((InstanceMethodInterceptor)interceptor).before(context.getObject(), context.getMethod(), + context.getArguments(), beforeResult); if (!beforeResult.isContinue()) { context.skip(beforeResult.getResult()); } @@ -129,14 +130,15 @@ public ExecuteContext onThrow(ExecuteContext context) { * @param classMatcher 旧版类匹配器 * @return 新版类匹配器 */ - private static ClassMatcher classMatcherTransform(com.huawei.sermant.core.agent.matcher.ClassMatcher classMatcher) { + private static ClassMatcher + classMatcherTransform(com.huaweicloud.sermant.core.agent.matcher.ClassMatcher classMatcher) { if (classMatcher instanceof NameMatcher) { - return ClassMatcher.nameEquals(((NameMatcher) classMatcher).getClassName()); + return ClassMatcher.nameEquals(((NameMatcher)classMatcher).getClassName()); } else if (classMatcher instanceof NonNameMatcher) { return new ClassMatcher() { @Override public boolean matches(TypeDescription target) { - return ((NonNameMatcher) classMatcher).isMatch(target); + return ((NonNameMatcher)classMatcher).isMatch(target); } }; } else { diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/collector/PluginCollector.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/collector/PluginCollector.java similarity index 83% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/collector/PluginCollector.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/collector/PluginCollector.java index 123c304a8e..dd15b64ab0 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/collector/PluginCollector.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/collector/PluginCollector.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2022 Huawei Technologies Co., Ltd. All rights reserved. + * Copyright (C) 2021-2021 Huawei Technologies Co., Ltd. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,10 +14,10 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.agent.collector; +package com.huaweicloud.sermant.core.plugin.agent.collector; -import com.huawei.sermant.core.plugin.agent.declarer.PluginDeclarer; -import com.huawei.sermant.core.plugin.agent.declarer.PluginDescription; +import com.huaweicloud.sermant.core.plugin.agent.declarer.PluginDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.PluginDescription; /** * 插件收集器,{@link PluginDeclarer}和{@link PluginDescription}采集的低阶api diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/collector/PluginCollectorManager.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/collector/PluginCollectorManager.java similarity index 93% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/collector/PluginCollectorManager.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/collector/PluginCollectorManager.java index 2707194fbf..52e8feab29 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/collector/PluginCollectorManager.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/collector/PluginCollectorManager.java @@ -14,19 +14,19 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.agent.collector; +package com.huaweicloud.sermant.core.plugin.agent.collector; -import com.huawei.sermant.core.config.ConfigManager; -import com.huawei.sermant.core.plugin.agent.config.AgentConfig; -import com.huawei.sermant.core.plugin.agent.declarer.AbstractPluginDescription; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; -import com.huawei.sermant.core.plugin.agent.declarer.PluginDeclarer; -import com.huawei.sermant.core.plugin.agent.declarer.PluginDescription; -import com.huawei.sermant.core.plugin.agent.declarer.SuperTypeDeclarer; -import com.huawei.sermant.core.plugin.agent.matcher.ClassMatcher; -import com.huawei.sermant.core.plugin.agent.matcher.ClassTypeMatcher; -import com.huawei.sermant.core.plugin.agent.transformer.AdviceTransformer; -import com.huawei.sermant.core.plugin.agent.transformer.BootstrapTransformer; +import com.huaweicloud.sermant.core.config.ConfigManager; +import com.huaweicloud.sermant.core.plugin.agent.config.AgentConfig; +import com.huaweicloud.sermant.core.plugin.agent.declarer.AbstractPluginDescription; +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.PluginDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.PluginDescription; +import com.huaweicloud.sermant.core.plugin.agent.declarer.SuperTypeDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.matcher.ClassMatcher; +import com.huaweicloud.sermant.core.plugin.agent.matcher.ClassTypeMatcher; +import com.huaweicloud.sermant.core.plugin.agent.transformer.AdviceTransformer; +import com.huaweicloud.sermant.core.plugin.agent.transformer.BootstrapTransformer; import net.bytebuddy.description.type.TypeDescription; import net.bytebuddy.dynamic.DynamicType; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/config/AgentConfig.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/config/AgentConfig.java similarity index 80% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/config/AgentConfig.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/config/AgentConfig.java index 6c5b297fd5..4754fe5f77 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/config/AgentConfig.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/config/AgentConfig.java @@ -14,10 +14,12 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.agent.config; +package com.huaweicloud.sermant.core.plugin.agent.config; -import com.huawei.sermant.core.config.common.BaseConfig; -import com.huawei.sermant.core.config.common.ConfigTypeKey; +import com.huaweicloud.sermant.core.config.common.BaseConfig; +import com.huaweicloud.sermant.core.config.common.ConfigTypeKey; +import com.huaweicloud.sermant.core.plugin.agent.declarer.PluginDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.matcher.ClassTypeMatcher; import java.util.Collections; import java.util.Set; @@ -52,7 +54,7 @@ public class AgentConfig implements BaseConfig { private String enhancedClassOutputPath; /** - * 插件的合并策略,定义{@link com.huawei.sermant.core.plugin.agent.declarer.PluginDeclarer}插件声明器的合并策略 + * 插件的合并策略,定义{@link PluginDeclarer}插件声明器的合并策略 */ private CombineStrategy combineStrategy = CombineStrategy.ALL; @@ -105,20 +107,20 @@ public void setCombineStrategy( */ public enum CombineStrategy { /** - * 不合并,每个{@link com.huawei.sermant.core.plugin.agent.declarer.PluginDeclarer}都会被当做是一个transformer + * 不合并,每个{@link PluginDeclarer}都会被当做是一个transformer *

插件较少,且模糊匹配的较多的场景,该策略有优势 */ NONE, /** - * 仅合并{@link com.huawei.sermant.core.plugin.agent.declarer.PluginDeclarer#getClassMatcher}为{@link - * com.huawei.sermant.core.plugin.agent.matcher.ClassTypeMatcher}的插件声明器,即通过匹配的类名合并 + * 仅合并{@link PluginDeclarer#getClassMatcher}为{@link + * ClassTypeMatcher}的插件声明器,即通过匹配的类名合并 *

插件较多,且主要是全限定名匹配的场景时,该策略有优势 */ BY_NAME, /** - * 对于所有{@link com.huawei.sermant.core.plugin.agent.declarer.PluginDeclarer},都会进行合并 + * 对于所有{@link PluginDeclarer},都会进行合并 */ ALL } diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/declarer/AbstractPluginDeclarer.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/declarer/AbstractPluginDeclarer.java similarity index 94% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/declarer/AbstractPluginDeclarer.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/declarer/AbstractPluginDeclarer.java index 7cab5dcd59..aadb5995ff 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/declarer/AbstractPluginDeclarer.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/declarer/AbstractPluginDeclarer.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.agent.declarer; +package com.huaweicloud.sermant.core.plugin.agent.declarer; /** * 抽象的类声明器,默认处理超类声明器 diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/declarer/AbstractPluginDescription.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/declarer/AbstractPluginDescription.java similarity index 95% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/declarer/AbstractPluginDescription.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/declarer/AbstractPluginDescription.java index e3aac37a69..b0564f1b2c 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/declarer/AbstractPluginDescription.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/declarer/AbstractPluginDescription.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.agent.declarer; +package com.huaweicloud.sermant.core.plugin.agent.declarer; import net.bytebuddy.description.type.TypeDescription; import net.bytebuddy.matcher.ElementMatcher; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/declarer/InterceptDeclarer.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/declarer/InterceptDeclarer.java similarity index 94% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/declarer/InterceptDeclarer.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/declarer/InterceptDeclarer.java index 0dea7e63d6..349d469ee8 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/declarer/InterceptDeclarer.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/declarer/InterceptDeclarer.java @@ -14,13 +14,13 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.agent.declarer; +package com.huaweicloud.sermant.core.plugin.agent.declarer; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.plugin.agent.interceptor.Interceptor; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; -import com.huawei.sermant.core.utils.ClassLoaderUtils; -import com.huawei.sermant.core.utils.JarFileUtils; +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.plugin.agent.interceptor.Interceptor; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; +import com.huaweicloud.sermant.core.utils.ClassLoaderUtils; +import com.huaweicloud.sermant.core.utils.JarFileUtils; import java.io.IOException; import java.lang.reflect.InvocationTargetException; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/declarer/PluginDeclarer.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/declarer/PluginDeclarer.java similarity index 87% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/declarer/PluginDeclarer.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/declarer/PluginDeclarer.java index ea72a8c5e3..7c02b45321 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/declarer/PluginDeclarer.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/declarer/PluginDeclarer.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.agent.declarer; +package com.huaweicloud.sermant.core.plugin.agent.declarer; -import com.huawei.sermant.core.plugin.agent.collector.PluginCollectorManager; -import com.huawei.sermant.core.plugin.agent.matcher.ClassMatcher; +import com.huaweicloud.sermant.core.plugin.agent.collector.PluginCollectorManager; +import com.huaweicloud.sermant.core.plugin.agent.matcher.ClassMatcher; /** * 插件声明,{@link PluginDescription}的高阶api diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/declarer/PluginDescription.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/declarer/PluginDescription.java similarity index 94% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/declarer/PluginDescription.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/declarer/PluginDescription.java index 6beab5c98e..02ece8ab73 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/declarer/PluginDescription.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/declarer/PluginDescription.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.agent.declarer; +package com.huaweicloud.sermant.core.plugin.agent.declarer; import net.bytebuddy.agent.builder.AgentBuilder; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/declarer/SuperTypeDeclarer.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/declarer/SuperTypeDeclarer.java similarity index 96% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/declarer/SuperTypeDeclarer.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/declarer/SuperTypeDeclarer.java index 7c5a570c7a..118150c6b5 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/declarer/SuperTypeDeclarer.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/declarer/SuperTypeDeclarer.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.agent.declarer; +package com.huaweicloud.sermant.core.plugin.agent.declarer; -import com.huawei.sermant.core.plugin.agent.annotations.BeanPropertyFlag; -import com.huawei.sermant.core.plugin.agent.template.ImplDelegator; +import com.huaweicloud.sermant.core.plugin.agent.annotations.BeanPropertyFlag; +import com.huaweicloud.sermant.core.plugin.agent.template.ImplDelegator; import net.bytebuddy.description.modifier.Visibility; import net.bytebuddy.dynamic.DynamicType; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/entity/ExecuteContext.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/entity/ExecuteContext.java similarity index 99% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/entity/ExecuteContext.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/entity/ExecuteContext.java index b39489a000..983044d090 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/entity/ExecuteContext.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/entity/ExecuteContext.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.agent.entity; +package com.huaweicloud.sermant.core.plugin.agent.entity; import java.lang.reflect.Constructor; import java.lang.reflect.Field; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/interceptor/AbstractInterceptor.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/interceptor/AbstractInterceptor.java similarity index 88% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/interceptor/AbstractInterceptor.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/interceptor/AbstractInterceptor.java index fc2b4958d7..5f3377c823 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/interceptor/AbstractInterceptor.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/interceptor/AbstractInterceptor.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.agent.interceptor; +package com.huaweicloud.sermant.core.plugin.agent.interceptor; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; /** * 抽象拦截器,提供默认的异常触发点 diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/interceptor/Interceptor.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/interceptor/Interceptor.java similarity index 91% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/interceptor/Interceptor.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/interceptor/Interceptor.java index a1672cd996..7b172fe54e 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/interceptor/Interceptor.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/interceptor/Interceptor.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.agent.interceptor; +package com.huaweicloud.sermant.core.plugin.agent.interceptor; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; /** * 拦截器接口 diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/matcher/ClassFuzzyMatcher.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/matcher/ClassFuzzyMatcher.java similarity index 97% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/matcher/ClassFuzzyMatcher.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/matcher/ClassFuzzyMatcher.java index d7518105af..7538779b7c 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/matcher/ClassFuzzyMatcher.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/matcher/ClassFuzzyMatcher.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.agent.matcher; +package com.huaweicloud.sermant.core.plugin.agent.matcher; import net.bytebuddy.description.type.TypeDescription; import net.bytebuddy.matcher.ElementMatcher; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/matcher/ClassMatcher.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/matcher/ClassMatcher.java similarity index 99% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/matcher/ClassMatcher.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/matcher/ClassMatcher.java index 72f5b0bfb5..efe19eebe3 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/matcher/ClassMatcher.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/matcher/ClassMatcher.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.agent.matcher; +package com.huaweicloud.sermant.core.plugin.agent.matcher; import net.bytebuddy.description.annotation.AnnotationDescription; import net.bytebuddy.description.annotation.AnnotationList; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/matcher/ClassTypeMatcher.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/matcher/ClassTypeMatcher.java similarity index 94% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/matcher/ClassTypeMatcher.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/matcher/ClassTypeMatcher.java index 5b3b519d0f..5a8e0c61aa 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/matcher/ClassTypeMatcher.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/matcher/ClassTypeMatcher.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.agent.matcher; +package com.huaweicloud.sermant.core.plugin.agent.matcher; import java.util.Set; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/matcher/MethodMatcher.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/matcher/MethodMatcher.java similarity index 99% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/matcher/MethodMatcher.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/matcher/MethodMatcher.java index 8fc44060c1..b47f53ff28 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/matcher/MethodMatcher.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/matcher/MethodMatcher.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.agent.matcher; +package com.huaweicloud.sermant.core.plugin.agent.matcher; import net.bytebuddy.description.annotation.AnnotationDescription; import net.bytebuddy.description.annotation.AnnotationList; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/matcher/MethodType.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/matcher/MethodType.java similarity index 96% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/matcher/MethodType.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/matcher/MethodType.java index 3b75906c0c..a78378669a 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/matcher/MethodType.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/matcher/MethodType.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.agent.matcher; +package com.huaweicloud.sermant.core.plugin.agent.matcher; import net.bytebuddy.description.method.MethodDescription; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/template/AdviceConstTemplate.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/template/AdviceConstTemplate.java similarity index 95% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/template/AdviceConstTemplate.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/template/AdviceConstTemplate.java index 16b0714212..1e797cb2e1 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/template/AdviceConstTemplate.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/template/AdviceConstTemplate.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.agent.template; +package com.huaweicloud.sermant.core.plugin.agent.template; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.plugin.agent.interceptor.Interceptor; +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.agent.interceptor.Interceptor; import net.bytebuddy.asm.Advice; import net.bytebuddy.implementation.bytecode.assign.Assigner; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/template/AdviceMemberTemplate.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/template/AdviceMemberTemplate.java similarity index 95% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/template/AdviceMemberTemplate.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/template/AdviceMemberTemplate.java index 052c84f3d8..c113def5b1 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/template/AdviceMemberTemplate.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/template/AdviceMemberTemplate.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.agent.template; +package com.huaweicloud.sermant.core.plugin.agent.template; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.plugin.agent.interceptor.Interceptor; +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.agent.interceptor.Interceptor; import net.bytebuddy.asm.Advice; import net.bytebuddy.implementation.bytecode.assign.Assigner; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/template/AdviceStaticTemplate.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/template/AdviceStaticTemplate.java similarity index 95% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/template/AdviceStaticTemplate.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/template/AdviceStaticTemplate.java index 78ac5cb326..840462fb73 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/template/AdviceStaticTemplate.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/template/AdviceStaticTemplate.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.agent.template; +package com.huaweicloud.sermant.core.plugin.agent.template; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.plugin.agent.interceptor.Interceptor; +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.agent.interceptor.Interceptor; import net.bytebuddy.asm.Advice; import net.bytebuddy.implementation.bytecode.assign.Assigner; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/template/BootstrapConstTemplate.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/template/BootstrapConstTemplate.java similarity index 92% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/template/BootstrapConstTemplate.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/template/BootstrapConstTemplate.java index 01610fcade..861075746c 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/template/BootstrapConstTemplate.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/template/BootstrapConstTemplate.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.agent.template; +package com.huaweicloud.sermant.core.plugin.agent.template; -import com.huawei.sermant.core.plugin.agent.transformer.BootstrapTransformer; +import com.huaweicloud.sermant.core.plugin.agent.transformer.BootstrapTransformer; import net.bytebuddy.asm.Advice; import net.bytebuddy.implementation.bytecode.assign.Assigner; @@ -63,8 +63,8 @@ public static void onMethodEnter( @Advice.Local(value = "_EXECUTE_CONTEXT_$SERMANT_LOCAL") Object context ) throws Exception { final ClassLoader loader = ClassLoader.getSystemClassLoader(); - contextCls = loader.loadClass("com.huawei.sermant.core.plugin.agent.entity.ExecuteContext"); - adviserCls = loader.loadClass("com.huawei.sermant.core.plugin.agent.template.CommonConstAdviser"); + contextCls = loader.loadClass("com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext"); + adviserCls = loader.loadClass("com.huaweicloud.sermant.core.plugin.agent.template.CommonConstAdviser"); final String adviceClsName = "com.huawei.sermant.core.plugin.agent.template.BootstrapConstTemplate_" + Integer.toHexString(methodKey.hashCode()); final Class templateCls = loader.loadClass(adviceClsName); diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/template/BootstrapMemberTemplate.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/template/BootstrapMemberTemplate.java similarity index 93% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/template/BootstrapMemberTemplate.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/template/BootstrapMemberTemplate.java index bcdb8d9c56..6c10ae82c1 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/template/BootstrapMemberTemplate.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/template/BootstrapMemberTemplate.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.agent.template; +package com.huaweicloud.sermant.core.plugin.agent.template; -import com.huawei.sermant.core.plugin.agent.transformer.BootstrapTransformer; +import com.huaweicloud.sermant.core.plugin.agent.transformer.BootstrapTransformer; import net.bytebuddy.asm.Advice; import net.bytebuddy.implementation.bytecode.assign.Assigner; @@ -64,8 +64,8 @@ public static boolean onMethodEnter( @Advice.Local(value = "_EXECUTE_CONTEXT_$SERMANT_LOCAL") Object context ) throws Exception { final ClassLoader loader = ClassLoader.getSystemClassLoader(); - contextCls = loader.loadClass("com.huawei.sermant.core.plugin.agent.entity.ExecuteContext"); - adviserCls = loader.loadClass("com.huawei.sermant.core.plugin.agent.template.CommonMethodAdviser"); + contextCls = loader.loadClass("com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext"); + adviserCls = loader.loadClass("com.huaweicloud.sermant.core.plugin.agent.template.CommonMethodAdviser"); final String adviceClsName = "com.huawei.sermant.core.plugin.agent.template.BootstrapMemberTemplate_" + Integer.toHexString(methodKey.hashCode()); final Class templateCls = loader.loadClass(adviceClsName); diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/template/BootstrapStaticTemplate.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/template/BootstrapStaticTemplate.java similarity index 93% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/template/BootstrapStaticTemplate.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/template/BootstrapStaticTemplate.java index 8b1032c9d4..39d025a820 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/template/BootstrapStaticTemplate.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/template/BootstrapStaticTemplate.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.agent.template; +package com.huaweicloud.sermant.core.plugin.agent.template; -import com.huawei.sermant.core.plugin.agent.transformer.BootstrapTransformer; +import com.huaweicloud.sermant.core.plugin.agent.transformer.BootstrapTransformer; import net.bytebuddy.asm.Advice; import net.bytebuddy.implementation.bytecode.assign.Assigner; @@ -64,8 +64,8 @@ public static boolean onMethodEnter( @Advice.Local(value = "_EXECUTE_CONTEXT_$SERMANT_LOCAL") Object context ) throws Exception { final ClassLoader loader = ClassLoader.getSystemClassLoader(); - contextCls = loader.loadClass("com.huawei.sermant.core.plugin.agent.entity.ExecuteContext"); - adviserCls = loader.loadClass("com.huawei.sermant.core.plugin.agent.template.CommonMethodAdviser"); + contextCls = loader.loadClass("com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext"); + adviserCls = loader.loadClass("com.huaweicloud.sermant.core.plugin.agent.template.CommonMethodAdviser"); final String adviceClsName = "com.huawei.sermant.core.plugin.agent.template.BootstrapStaticTemplate_" + Integer.toHexString(methodKey.hashCode()); final Class templateCls = loader.loadClass(adviceClsName); diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/template/CommonBaseAdviser.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/template/CommonBaseAdviser.java similarity index 94% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/template/CommonBaseAdviser.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/template/CommonBaseAdviser.java index e316f0c5ba..a2ca77db14 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/template/CommonBaseAdviser.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/template/CommonBaseAdviser.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.agent.template; +package com.huaweicloud.sermant.core.plugin.agent.template; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.plugin.agent.interceptor.Interceptor; +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.agent.interceptor.Interceptor; import java.util.ListIterator; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/template/CommonConstAdviser.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/template/CommonConstAdviser.java similarity index 92% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/template/CommonConstAdviser.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/template/CommonConstAdviser.java index 0d704404cf..33f9d44e72 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/template/CommonConstAdviser.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/template/CommonConstAdviser.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.agent.template; +package com.huaweicloud.sermant.core.plugin.agent.template; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.plugin.agent.interceptor.Interceptor; +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.agent.interceptor.Interceptor; import java.util.ListIterator; import java.util.Locale; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/template/CommonMethodAdviser.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/template/CommonMethodAdviser.java similarity index 92% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/template/CommonMethodAdviser.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/template/CommonMethodAdviser.java index 548ca0b9f9..c7f65c1bd3 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/template/CommonMethodAdviser.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/template/CommonMethodAdviser.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.agent.template; +package com.huaweicloud.sermant.core.plugin.agent.template; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.plugin.agent.interceptor.Interceptor; +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.agent.interceptor.Interceptor; import java.util.ListIterator; import java.util.Locale; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/template/ImplDelegator.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/template/ImplDelegator.java similarity index 97% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/template/ImplDelegator.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/template/ImplDelegator.java index 69a5ea3c52..ef2f6e9f4d 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/template/ImplDelegator.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/template/ImplDelegator.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.agent.template; +package com.huaweicloud.sermant.core.plugin.agent.template; import net.bytebuddy.implementation.bind.annotation.AllArguments; import net.bytebuddy.implementation.bind.annotation.Origin; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/template/MethodKeyCreator.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/template/MethodKeyCreator.java similarity index 98% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/template/MethodKeyCreator.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/template/MethodKeyCreator.java index f2003860e8..325309814c 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/template/MethodKeyCreator.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/template/MethodKeyCreator.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.agent.template; +package com.huaweicloud.sermant.core.plugin.agent.template; import net.bytebuddy.description.method.MethodDescription; import net.bytebuddy.description.method.ParameterDescription; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/transformer/AdviceTransformer.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/transformer/AdviceTransformer.java similarity index 93% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/transformer/AdviceTransformer.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/transformer/AdviceTransformer.java index 8b9d9a2c5a..ff265414e1 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/transformer/AdviceTransformer.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/transformer/AdviceTransformer.java @@ -14,15 +14,15 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.agent.transformer; +package com.huaweicloud.sermant.core.plugin.agent.transformer; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; -import com.huawei.sermant.core.plugin.agent.declarer.SuperTypeDeclarer; -import com.huawei.sermant.core.plugin.agent.interceptor.Interceptor; -import com.huawei.sermant.core.plugin.agent.template.AdviceConstTemplate; -import com.huawei.sermant.core.plugin.agent.template.AdviceMemberTemplate; -import com.huawei.sermant.core.plugin.agent.template.AdviceStaticTemplate; -import com.huawei.sermant.core.plugin.agent.template.MethodKeyCreator; +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.SuperTypeDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.interceptor.Interceptor; +import com.huaweicloud.sermant.core.plugin.agent.template.AdviceConstTemplate; +import com.huaweicloud.sermant.core.plugin.agent.template.AdviceMemberTemplate; +import com.huaweicloud.sermant.core.plugin.agent.template.AdviceStaticTemplate; +import com.huaweicloud.sermant.core.plugin.agent.template.MethodKeyCreator; import net.bytebuddy.agent.builder.AgentBuilder; import net.bytebuddy.asm.Advice; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/transformer/BootstrapTransformer.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/transformer/BootstrapTransformer.java similarity index 94% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/transformer/BootstrapTransformer.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/transformer/BootstrapTransformer.java index 973297f3a7..7e2abda81b 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/agent/transformer/BootstrapTransformer.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/agent/transformer/BootstrapTransformer.java @@ -14,16 +14,16 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.agent.transformer; +package com.huaweicloud.sermant.core.plugin.agent.transformer; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; -import com.huawei.sermant.core.plugin.agent.interceptor.Interceptor; -import com.huawei.sermant.core.plugin.agent.template.BootstrapConstTemplate; -import com.huawei.sermant.core.plugin.agent.template.BootstrapMemberTemplate; -import com.huawei.sermant.core.plugin.agent.template.BootstrapStaticTemplate; -import com.huawei.sermant.core.plugin.agent.template.MethodKeyCreator; -import com.huawei.sermant.core.utils.ClassLoaderUtils; +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.interceptor.Interceptor; +import com.huaweicloud.sermant.core.plugin.agent.template.BootstrapConstTemplate; +import com.huaweicloud.sermant.core.plugin.agent.template.BootstrapMemberTemplate; +import com.huaweicloud.sermant.core.plugin.agent.template.BootstrapStaticTemplate; +import com.huaweicloud.sermant.core.plugin.agent.template.MethodKeyCreator; +import com.huaweicloud.sermant.core.utils.ClassLoaderUtils; import net.bytebuddy.ByteBuddy; import net.bytebuddy.agent.builder.AgentBuilder; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/classloader/PluginClassLoader.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/classloader/PluginClassLoader.java similarity index 93% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/classloader/PluginClassLoader.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/classloader/PluginClassLoader.java index 65e9590fed..286cc8bfe8 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/classloader/PluginClassLoader.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/classloader/PluginClassLoader.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.classloader; +package com.huaweicloud.sermant.core.plugin.classloader; -import com.huawei.sermant.core.config.ConfigManager; -import com.huawei.sermant.core.plugin.agent.config.AgentConfig; +import com.huaweicloud.sermant.core.config.ConfigManager; +import com.huaweicloud.sermant.core.plugin.agent.config.AgentConfig; import java.net.URL; import java.net.URLClassLoader; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/common/PluginConstant.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/common/PluginConstant.java similarity index 97% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/common/PluginConstant.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/common/PluginConstant.java index 1f1e5c486f..58e056aaf9 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/common/PluginConstant.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/common/PluginConstant.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.common; +package com.huaweicloud.sermant.core.plugin.common; import java.io.File; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/common/PluginSchemaValidator.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/common/PluginSchemaValidator.java similarity index 94% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/common/PluginSchemaValidator.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/common/PluginSchemaValidator.java index 73355e7d2a..a37c8cd4ad 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/common/PluginSchemaValidator.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/common/PluginSchemaValidator.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.common; +package com.huaweicloud.sermant.core.plugin.common; -import com.huawei.sermant.core.exception.SchemaException; -import com.huawei.sermant.core.utils.JarFileUtils; +import com.huaweicloud.sermant.core.exception.SchemaException; +import com.huaweicloud.sermant.core.utils.JarFileUtils; import java.io.IOException; import java.util.Collections; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/config/PluginConfig.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/config/PluginConfig.java similarity index 87% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/config/PluginConfig.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/config/PluginConfig.java index 864765524d..bdfc62ccbe 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/config/PluginConfig.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/config/PluginConfig.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.config; +package com.huaweicloud.sermant.core.plugin.config; -import com.huawei.sermant.core.config.common.BaseConfig; +import com.huaweicloud.sermant.core.config.common.BaseConfig; /** * 插件服务包的统一配置基类 diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/config/PluginConfigManager.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/config/PluginConfigManager.java similarity index 93% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/config/PluginConfigManager.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/config/PluginConfigManager.java index 53c65ec0a0..32097b7e8e 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/config/PluginConfigManager.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/config/PluginConfigManager.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.config; +package com.huaweicloud.sermant.core.plugin.config; -import com.huawei.sermant.core.config.ConfigManager; +import com.huaweicloud.sermant.core.config.ConfigManager; import java.io.File; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/config/PluginSetting.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/config/PluginSetting.java similarity index 96% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/config/PluginSetting.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/config/PluginSetting.java index a2dafbc601..692239be40 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/config/PluginSetting.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/config/PluginSetting.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.config; +package com.huaweicloud.sermant.core.plugin.config; import java.util.List; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/config/ServiceMeta.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/config/ServiceMeta.java similarity index 92% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/config/ServiceMeta.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/config/ServiceMeta.java index 54b5bf688b..edaa075780 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/config/ServiceMeta.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/config/ServiceMeta.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.config; +package com.huaweicloud.sermant.core.plugin.config; -import com.huawei.sermant.core.config.common.BaseConfig; -import com.huawei.sermant.core.config.common.ConfigTypeKey; +import com.huaweicloud.sermant.core.config.common.BaseConfig; +import com.huaweicloud.sermant.core.config.common.ConfigTypeKey; /** * 配置当前服务信息 diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/converter/Converter.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/converter/Converter.java similarity index 94% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/converter/Converter.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/converter/Converter.java index b3ac56b3d9..e89ecbecfb 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/converter/Converter.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/converter/Converter.java @@ -15,7 +15,7 @@ * */ -package com.huawei.sermant.core.plugin.converter; +package com.huaweicloud.sermant.core.plugin.converter; import java.util.Optional; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/converter/YamlConverter.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/converter/YamlConverter.java similarity index 94% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/converter/YamlConverter.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/converter/YamlConverter.java index f2760dc84e..dcea57ac30 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/converter/YamlConverter.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/converter/YamlConverter.java @@ -15,9 +15,9 @@ * */ -package com.huawei.sermant.core.plugin.converter; +package com.huaweicloud.sermant.core.plugin.converter; -import com.huawei.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.common.LoggerFactory; import org.yaml.snakeyaml.Yaml; import org.yaml.snakeyaml.representer.Representer; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/service/PluginService.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/service/PluginService.java similarity index 87% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/service/PluginService.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/service/PluginService.java index 0b122eb287..e6c340f26b 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/service/PluginService.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/service/PluginService.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.service; +package com.huaweicloud.sermant.core.plugin.service; -import com.huawei.sermant.core.service.BaseService; +import com.huaweicloud.sermant.core.service.BaseService; /** * 插件服务基类 diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/service/PluginServiceManager.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/service/PluginServiceManager.java similarity index 93% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/service/PluginServiceManager.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/service/PluginServiceManager.java index 80040cc256..e184217e2c 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/service/PluginServiceManager.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/service/PluginServiceManager.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.huawei.sermant.core.plugin.service; +package com.huaweicloud.sermant.core.plugin.service; -import com.huawei.sermant.core.service.ServiceManager; +import com.huaweicloud.sermant.core.service.ServiceManager; import java.util.ServiceLoader; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/subscribe/AbstractGroupConfigSubscriber.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/subscribe/AbstractGroupConfigSubscriber.java similarity index 88% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/subscribe/AbstractGroupConfigSubscriber.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/subscribe/AbstractGroupConfigSubscriber.java index a6faca7b22..d41e78a05b 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/subscribe/AbstractGroupConfigSubscriber.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/subscribe/AbstractGroupConfigSubscriber.java @@ -15,12 +15,12 @@ * */ -package com.huawei.sermant.core.plugin.subscribe; +package com.huaweicloud.sermant.core.plugin.subscribe; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.service.ServiceManager; -import com.huawei.sermant.core.service.dynamicconfig.DynamicConfigService; -import com.huawei.sermant.core.service.dynamicconfig.common.DynamicConfigListener; +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.service.ServiceManager; +import com.huaweicloud.sermant.core.service.dynamicconfig.DynamicConfigService; +import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigListener; import java.util.Locale; import java.util.Map; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/subscribe/ConfigSubscriber.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/subscribe/ConfigSubscriber.java similarity index 94% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/subscribe/ConfigSubscriber.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/subscribe/ConfigSubscriber.java index 10d8b1f84b..24db2b11ba 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/subscribe/ConfigSubscriber.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/subscribe/ConfigSubscriber.java @@ -15,7 +15,7 @@ * */ -package com.huawei.sermant.core.plugin.subscribe; +package com.huaweicloud.sermant.core.plugin.subscribe; /** * 配置中心服务订阅 diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/subscribe/CseGroupConfigSubscriber.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/subscribe/CseGroupConfigSubscriber.java similarity index 88% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/subscribe/CseGroupConfigSubscriber.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/subscribe/CseGroupConfigSubscriber.java index cc38ab3bd6..6760f31e68 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/subscribe/CseGroupConfigSubscriber.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/subscribe/CseGroupConfigSubscriber.java @@ -15,13 +15,13 @@ * */ -package com.huawei.sermant.core.plugin.subscribe; +package com.huaweicloud.sermant.core.plugin.subscribe; -import com.huawei.sermant.core.config.ConfigManager; -import com.huawei.sermant.core.plugin.config.ServiceMeta; -import com.huawei.sermant.core.service.dynamicconfig.DynamicConfigService; -import com.huawei.sermant.core.service.dynamicconfig.common.DynamicConfigListener; -import com.huawei.sermant.core.service.dynamicconfig.utils.LabelGroupUtils; +import com.huaweicloud.sermant.core.config.ConfigManager; +import com.huaweicloud.sermant.core.plugin.config.ServiceMeta; +import com.huaweicloud.sermant.core.service.dynamicconfig.DynamicConfigService; +import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigListener; +import com.huaweicloud.sermant.core.service.dynamicconfig.utils.LabelGroupUtils; import org.apache.commons.lang3.StringUtils; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/subscribe/DefaultGroupConfigSubscriber.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/subscribe/DefaultGroupConfigSubscriber.java similarity index 87% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/subscribe/DefaultGroupConfigSubscriber.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/subscribe/DefaultGroupConfigSubscriber.java index 90671f8ab1..18b4738ad9 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/plugin/subscribe/DefaultGroupConfigSubscriber.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/subscribe/DefaultGroupConfigSubscriber.java @@ -15,11 +15,11 @@ * */ -package com.huawei.sermant.core.plugin.subscribe; +package com.huaweicloud.sermant.core.plugin.subscribe; -import com.huawei.sermant.core.service.dynamicconfig.DynamicConfigService; -import com.huawei.sermant.core.service.dynamicconfig.common.DynamicConfigListener; -import com.huawei.sermant.core.service.dynamicconfig.utils.LabelGroupUtils; +import com.huaweicloud.sermant.core.service.dynamicconfig.DynamicConfigService; +import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigListener; +import com.huaweicloud.sermant.core.service.dynamicconfig.utils.LabelGroupUtils; import org.apache.commons.lang3.StringUtils; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/BaseService.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/BaseService.java similarity index 88% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/BaseService.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/BaseService.java index dce45dabbf..9a4b2f329f 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/BaseService.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/BaseService.java @@ -14,7 +14,9 @@ * limitations under the License. */ -package com.huawei.sermant.core.service; +package com.huaweicloud.sermant.core.service; + +import com.huaweicloud.sermant.core.utils.SpiLoadUtils; /** * Agent服务接口 @@ -26,7 +28,7 @@ * 所有{@link BaseService}实例将由{@link ServiceManager}管理, * 可通过{@link ServiceManager#getService(Class)}方法传入{@link BaseService}子类获取服务实例。 * {@link ServiceManager}将根据传入的{@link BaseService}类型,返回最佳的实现类。 - * 可以通过{@link com.huawei.sermant.core.utils.SpiLoadUtils.SpiWeight}注解设置多实现类的权重。 + * 可以通过{@link SpiLoadUtils.SpiWeight}注解设置多实现类的权重。 * * @author justforstudy-A, beetle-man, HapThorin * @version 1.0.0 diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/ServiceManager.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/ServiceManager.java similarity index 96% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/ServiceManager.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/ServiceManager.java index a35783dde2..0d207e2338 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/ServiceManager.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/ServiceManager.java @@ -20,10 +20,10 @@ * from the Apache Skywalking project. */ -package com.huawei.sermant.core.service; +package com.huaweicloud.sermant.core.service; -import com.huawei.sermant.core.exception.DupServiceException; -import com.huawei.sermant.core.utils.SpiLoadUtils; +import com.huaweicloud.sermant.core.exception.DupServiceException; +import com.huaweicloud.sermant.core.utils.SpiLoadUtils; import java.util.HashMap; import java.util.HashSet; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/BufferedDynamicConfigService.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/BufferedDynamicConfigService.java similarity index 92% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/BufferedDynamicConfigService.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/BufferedDynamicConfigService.java index 02d910835f..5c36f16670 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/BufferedDynamicConfigService.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/BufferedDynamicConfigService.java @@ -14,12 +14,12 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.dynamicconfig; +package com.huaweicloud.sermant.core.service.dynamicconfig; -import com.huawei.sermant.core.service.dynamicconfig.common.DynamicConfigListener; -import com.huawei.sermant.core.service.dynamicconfig.kie.KieDynamicConfigService; -import com.huawei.sermant.core.service.dynamicconfig.nop.NopDynamicConfigService; -import com.huawei.sermant.core.service.dynamicconfig.zookeeper.ZooKeeperDynamicConfigService; +import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigListener; +import com.huaweicloud.sermant.core.service.dynamicconfig.kie.KieDynamicConfigService; +import com.huaweicloud.sermant.core.service.dynamicconfig.nop.NopDynamicConfigService; +import com.huaweicloud.sermant.core.service.dynamicconfig.zookeeper.ZooKeeperDynamicConfigService; import java.util.List; import java.util.Optional; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/DynamicConfigService.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/DynamicConfigService.java similarity index 91% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/DynamicConfigService.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/DynamicConfigService.java index 0e9932a041..89ad0f0002 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/DynamicConfigService.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/DynamicConfigService.java @@ -14,17 +14,17 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.dynamicconfig; - -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.config.ConfigManager; -import com.huawei.sermant.core.service.BaseService; -import com.huawei.sermant.core.service.dynamicconfig.api.GroupService; -import com.huawei.sermant.core.service.dynamicconfig.api.KeyGroupService; -import com.huawei.sermant.core.service.dynamicconfig.api.KeyService; -import com.huawei.sermant.core.service.dynamicconfig.common.DynamicConfigEvent; -import com.huawei.sermant.core.service.dynamicconfig.common.DynamicConfigListener; -import com.huawei.sermant.core.service.dynamicconfig.config.DynamicConfig; +package com.huaweicloud.sermant.core.service.dynamicconfig; + +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.config.ConfigManager; +import com.huaweicloud.sermant.core.service.BaseService; +import com.huaweicloud.sermant.core.service.dynamicconfig.api.GroupService; +import com.huaweicloud.sermant.core.service.dynamicconfig.api.KeyGroupService; +import com.huaweicloud.sermant.core.service.dynamicconfig.api.KeyService; +import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigEvent; +import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigListener; +import com.huaweicloud.sermant.core.service.dynamicconfig.config.DynamicConfig; import java.util.List; import java.util.Optional; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/api/GroupService.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/api/GroupService.java similarity index 85% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/api/GroupService.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/api/GroupService.java index 47a45587eb..8678fea5d9 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/api/GroupService.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/api/GroupService.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2021 Huawei Technologies Co., Ltd. All rights reserved. + * Copyright (C) 2022-2022 Huawei Technologies Co., Ltd. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,11 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.huawei.sermant.core.service.dynamicconfig.api; -import java.util.List; +package com.huaweicloud.sermant.core.service.dynamicconfig.api; + +import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigListener; -import com.huawei.sermant.core.service.dynamicconfig.common.DynamicConfigListener; +import java.util.List; /** * 对同组下所有键做操作 diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/api/KeyGroupService.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/api/KeyGroupService.java similarity index 92% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/api/KeyGroupService.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/api/KeyGroupService.java index d6e7a9ce4c..257912d5c0 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/api/KeyGroupService.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/api/KeyGroupService.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.dynamicconfig.api; +package com.huaweicloud.sermant.core.service.dynamicconfig.api; -import com.huawei.sermant.core.service.dynamicconfig.common.DynamicConfigListener; +import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigListener; /** * 对同组下的某个键做操作 diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/api/KeyService.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/api/KeyService.java similarity index 92% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/api/KeyService.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/api/KeyService.java index 997f251f1e..13935534d3 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/api/KeyService.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/api/KeyService.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.dynamicconfig.api; +package com.huaweicloud.sermant.core.service.dynamicconfig.api; -import java.util.List; +import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigListener; -import com.huawei.sermant.core.service.dynamicconfig.common.DynamicConfigListener; +import java.util.List; /** * 对同某个键做操作 diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/common/DynamicConfigEvent.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/common/DynamicConfigEvent.java similarity index 98% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/common/DynamicConfigEvent.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/common/DynamicConfigEvent.java index 23d59fd283..8a99d7fdb1 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/common/DynamicConfigEvent.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/common/DynamicConfigEvent.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.dynamicconfig.common; +package com.huaweicloud.sermant.core.service.dynamicconfig.common; import java.util.EventObject; import java.util.Objects; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/common/DynamicConfigEventType.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/common/DynamicConfigEventType.java similarity index 93% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/common/DynamicConfigEventType.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/common/DynamicConfigEventType.java index 06135e5991..efbccb5d5c 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/common/DynamicConfigEventType.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/common/DynamicConfigEventType.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.dynamicconfig.common; +package com.huaweicloud.sermant.core.service.dynamicconfig.common; /** * Config change event type diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/common/DynamicConfigListener.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/common/DynamicConfigListener.java similarity index 94% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/common/DynamicConfigListener.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/common/DynamicConfigListener.java index 0b3cfbd84f..869c077f42 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/common/DynamicConfigListener.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/common/DynamicConfigListener.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.dynamicconfig.common; +package com.huaweicloud.sermant.core.service.dynamicconfig.common; import java.util.EventListener; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/common/DynamicConfigServiceType.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/common/DynamicConfigServiceType.java similarity index 93% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/common/DynamicConfigServiceType.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/common/DynamicConfigServiceType.java index 89dd7fa257..a069f765eb 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/common/DynamicConfigServiceType.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/common/DynamicConfigServiceType.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.dynamicconfig.common; +package com.huaweicloud.sermant.core.service.dynamicconfig.common; /** diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/config/DynamicConfig.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/config/DynamicConfig.java similarity index 86% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/config/DynamicConfig.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/config/DynamicConfig.java index c04fc0250a..3098f12508 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/config/DynamicConfig.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/config/DynamicConfig.java @@ -14,12 +14,12 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.dynamicconfig.config; +package com.huaweicloud.sermant.core.service.dynamicconfig.config; -import com.huawei.sermant.core.config.common.BaseConfig; -import com.huawei.sermant.core.config.common.ConfigFieldKey; -import com.huawei.sermant.core.config.common.ConfigTypeKey; -import com.huawei.sermant.core.service.dynamicconfig.common.DynamicConfigServiceType; +import com.huaweicloud.sermant.core.config.common.BaseConfig; +import com.huaweicloud.sermant.core.config.common.ConfigFieldKey; +import com.huaweicloud.sermant.core.config.common.ConfigTypeKey; +import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigServiceType; import java.util.Locale; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/KieDynamicConfigService.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/KieDynamicConfigService.java similarity index 90% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/KieDynamicConfigService.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/KieDynamicConfigService.java index 9aac16a6db..5b0a571567 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/KieDynamicConfigService.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/KieDynamicConfigService.java @@ -14,15 +14,15 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.dynamicconfig.kie; - -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.service.dynamicconfig.DynamicConfigService; -import com.huawei.sermant.core.service.dynamicconfig.common.DynamicConfigListener; -import com.huawei.sermant.core.service.dynamicconfig.kie.client.kie.KieConfigEntity; -import com.huawei.sermant.core.service.dynamicconfig.kie.client.kie.KieResponse; -import com.huawei.sermant.core.service.dynamicconfig.kie.listener.SubscriberManager; -import com.huawei.sermant.core.service.dynamicconfig.utils.LabelGroupUtils; +package com.huaweicloud.sermant.core.service.dynamicconfig.kie; + +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.service.dynamicconfig.DynamicConfigService; +import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigListener; +import com.huaweicloud.sermant.core.service.dynamicconfig.kie.client.kie.KieConfigEntity; +import com.huaweicloud.sermant.core.service.dynamicconfig.kie.client.kie.KieResponse; +import com.huaweicloud.sermant.core.service.dynamicconfig.kie.listener.SubscriberManager; +import com.huaweicloud.sermant.core.service.dynamicconfig.utils.LabelGroupUtils; import java.util.ArrayList; import java.util.Collections; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/client/AbstractClient.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/client/AbstractClient.java similarity index 84% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/client/AbstractClient.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/client/AbstractClient.java index c947fd5020..e5797614f1 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/client/AbstractClient.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/client/AbstractClient.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.dynamicconfig.kie.client; +package com.huaweicloud.sermant.core.service.dynamicconfig.kie.client; -import com.huawei.sermant.core.service.dynamicconfig.kie.client.http.DefaultHttpClient; -import com.huawei.sermant.core.service.dynamicconfig.kie.client.http.HttpClient; +import com.huaweicloud.sermant.core.service.dynamicconfig.kie.client.http.DefaultHttpClient; +import com.huaweicloud.sermant.core.service.dynamicconfig.kie.client.http.HttpClient; /** * 抽象客户端 diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/client/Client.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/client/Client.java similarity index 91% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/client/Client.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/client/Client.java index d2c3608e47..bc8fc0ddcb 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/client/Client.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/client/Client.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.dynamicconfig.kie.client; +package com.huaweicloud.sermant.core.service.dynamicconfig.kie.client; /** * 客户端 diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/client/ClientUrlManager.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/client/ClientUrlManager.java similarity index 92% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/client/ClientUrlManager.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/client/ClientUrlManager.java index ff8935c85b..2cdba033eb 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/client/ClientUrlManager.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/client/ClientUrlManager.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.dynamicconfig.kie.client; +package com.huaweicloud.sermant.core.service.dynamicconfig.kie.client; -import com.huawei.sermant.core.service.dynamicconfig.kie.selector.url.UrlSelector; +import com.huaweicloud.sermant.core.service.dynamicconfig.kie.selector.url.UrlSelector; import java.util.Arrays; import java.util.List; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/client/http/DefaultHttpClient.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/client/http/DefaultHttpClient.java similarity index 96% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/client/http/DefaultHttpClient.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/client/http/DefaultHttpClient.java index 4351cc11e6..61e3b431e1 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/client/http/DefaultHttpClient.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/client/http/DefaultHttpClient.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.dynamicconfig.kie.client.http; +package com.huaweicloud.sermant.core.service.dynamicconfig.kie.client.http; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.service.dynamicconfig.kie.listener.SubscriberManager; +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.service.dynamicconfig.kie.listener.SubscriberManager; import com.alibaba.fastjson.JSONObject; @@ -65,7 +65,8 @@ * @author zhouss * @since 2021-11-17 */ -public class DefaultHttpClient implements com.huawei.sermant.core.service.dynamicconfig.kie.client.http.HttpClient { +public class DefaultHttpClient + implements com.huaweicloud.sermant.core.service.dynamicconfig.kie.client.http.HttpClient { private static final Logger LOGGER = LoggerFactory.getLogger(); /** * 默认超时时间 diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/client/http/HttpClient.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/client/http/HttpClient.java similarity index 94% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/client/http/HttpClient.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/client/http/HttpClient.java index 2d9f126cfe..f6f671809c 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/client/http/HttpClient.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/client/http/HttpClient.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.dynamicconfig.kie.client.http; +package com.huaweicloud.sermant.core.service.dynamicconfig.kie.client.http; -import com.huawei.sermant.core.service.dynamicconfig.kie.client.Client; +import com.huaweicloud.sermant.core.service.dynamicconfig.kie.client.Client; import org.apache.http.client.config.RequestConfig; import java.util.Map; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/client/http/HttpResult.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/client/http/HttpResult.java similarity index 97% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/client/http/HttpResult.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/client/http/HttpResult.java index 95c6bcd196..cc8670ac24 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/client/http/HttpResult.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/client/http/HttpResult.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.dynamicconfig.kie.client.http; +package com.huaweicloud.sermant.core.service.dynamicconfig.kie.client.http; import org.apache.http.Header; import org.apache.http.HttpStatus; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/client/kie/KieClient.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/client/kie/KieClient.java similarity index 90% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/client/kie/KieClient.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/client/kie/KieClient.java index 394d0dd4ad..ebafa101a5 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/client/kie/KieClient.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/client/kie/KieClient.java @@ -14,14 +14,14 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.dynamicconfig.kie.client.kie; - -import com.huawei.sermant.core.config.ConfigManager; -import com.huawei.sermant.core.service.dynamicconfig.kie.client.AbstractClient; -import com.huawei.sermant.core.service.dynamicconfig.kie.client.ClientUrlManager; -import com.huawei.sermant.core.service.dynamicconfig.kie.client.http.HttpClient; -import com.huawei.sermant.core.service.dynamicconfig.kie.client.http.HttpResult; -import com.huawei.sermant.core.service.dynamicconfig.kie.config.KieDynamicConfig; +package com.huaweicloud.sermant.core.service.dynamicconfig.kie.client.kie; + +import com.huaweicloud.sermant.core.config.ConfigManager; +import com.huaweicloud.sermant.core.service.dynamicconfig.kie.client.AbstractClient; +import com.huaweicloud.sermant.core.service.dynamicconfig.kie.client.ClientUrlManager; +import com.huaweicloud.sermant.core.service.dynamicconfig.kie.client.http.HttpClient; +import com.huaweicloud.sermant.core.service.dynamicconfig.kie.client.http.HttpResult; +import com.huaweicloud.sermant.core.service.dynamicconfig.kie.config.KieDynamicConfig; import org.apache.http.HttpStatus; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/client/kie/KieConfigEntity.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/client/kie/KieConfigEntity.java similarity index 96% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/client/kie/KieConfigEntity.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/client/kie/KieConfigEntity.java index e547e99d54..78da9f61de 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/client/kie/KieConfigEntity.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/client/kie/KieConfigEntity.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.dynamicconfig.kie.client.kie; +package com.huaweicloud.sermant.core.service.dynamicconfig.kie.client.kie; import java.util.HashMap; import java.util.Map; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/client/kie/KieListenerWrapper.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/client/kie/KieListenerWrapper.java similarity index 92% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/client/kie/KieListenerWrapper.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/client/kie/KieListenerWrapper.java index 594e9551d3..50a04f31cc 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/client/kie/KieListenerWrapper.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/client/kie/KieListenerWrapper.java @@ -14,15 +14,15 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.dynamicconfig.kie.client.kie; - -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.service.dynamicconfig.common.DynamicConfigEvent; -import com.huawei.sermant.core.service.dynamicconfig.common.DynamicConfigEventType; -import com.huawei.sermant.core.service.dynamicconfig.common.DynamicConfigListener; -import com.huawei.sermant.core.service.dynamicconfig.kie.constants.KieConstants; -import com.huawei.sermant.core.service.dynamicconfig.kie.listener.KvDataHolder; -import com.huawei.sermant.core.service.dynamicconfig.kie.listener.SubscriberManager; +package com.huaweicloud.sermant.core.service.dynamicconfig.kie.client.kie; + +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigEvent; +import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigEventType; +import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigListener; +import com.huaweicloud.sermant.core.service.dynamicconfig.kie.constants.KieConstants; +import com.huaweicloud.sermant.core.service.dynamicconfig.kie.listener.KvDataHolder; +import com.huaweicloud.sermant.core.service.dynamicconfig.kie.listener.SubscriberManager; import java.util.HashMap; import java.util.HashSet; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/client/kie/KieRequest.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/client/kie/KieRequest.java similarity index 97% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/client/kie/KieRequest.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/client/kie/KieRequest.java index 6605303401..2b82a9584e 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/client/kie/KieRequest.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/client/kie/KieRequest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.dynamicconfig.kie.client.kie; +package com.huaweicloud.sermant.core.service.dynamicconfig.kie.client.kie; import org.apache.http.client.config.RequestConfig; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/client/kie/KieResponse.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/client/kie/KieResponse.java similarity index 95% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/client/kie/KieResponse.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/client/kie/KieResponse.java index e0c6e95490..f9f0e5bc48 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/client/kie/KieResponse.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/client/kie/KieResponse.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.dynamicconfig.kie.client.kie; +package com.huaweicloud.sermant.core.service.dynamicconfig.kie.client.kie; import java.util.List; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/client/kie/KieSubscriber.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/client/kie/KieSubscriber.java similarity index 97% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/client/kie/KieSubscriber.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/client/kie/KieSubscriber.java index 1fc39e58df..799fcd264f 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/client/kie/KieSubscriber.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/client/kie/KieSubscriber.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.dynamicconfig.kie.client.kie; +package com.huaweicloud.sermant.core.service.dynamicconfig.kie.client.kie; /** * 增加是否为长请求判断 diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/client/kie/ResultHandler.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/client/kie/ResultHandler.java similarity index 94% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/client/kie/ResultHandler.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/client/kie/ResultHandler.java index 6f28323971..9fe81e9ef0 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/client/kie/ResultHandler.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/client/kie/ResultHandler.java @@ -14,10 +14,12 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.dynamicconfig.kie.client.kie; +package com.huaweicloud.sermant.core.service.dynamicconfig.kie.client.kie; + +import com.huaweicloud.sermant.core.service.dynamicconfig.kie.client.http.HttpResult; import com.alibaba.fastjson.JSONObject; -import com.huawei.sermant.core.service.dynamicconfig.kie.client.http.HttpResult; + import org.apache.http.HttpStatus; import java.util.Iterator; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/config/KieDynamicConfig.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/config/KieDynamicConfig.java similarity index 83% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/config/KieDynamicConfig.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/config/KieDynamicConfig.java index 854479ad43..684a4e3574 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/config/KieDynamicConfig.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/config/KieDynamicConfig.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.dynamicconfig.kie.config; +package com.huaweicloud.sermant.core.service.dynamicconfig.kie.config; -import com.huawei.sermant.core.config.common.BaseConfig; -import com.huawei.sermant.core.config.common.ConfigTypeKey; +import com.huaweicloud.sermant.core.config.common.BaseConfig; +import com.huaweicloud.sermant.core.config.common.ConfigTypeKey; /** * KIE配置 diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/constants/KieConstants.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/constants/KieConstants.java similarity index 92% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/constants/KieConstants.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/constants/KieConstants.java index a9d6ccc43b..17ed69d26d 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/constants/KieConstants.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/constants/KieConstants.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.dynamicconfig.kie.constants; +package com.huaweicloud.sermant.core.service.dynamicconfig.kie.constants; /** * Kie配置常量 diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/listener/KvDataHolder.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/listener/KvDataHolder.java similarity index 95% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/listener/KvDataHolder.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/listener/KvDataHolder.java index 52871103f8..3affe18471 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/listener/KvDataHolder.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/listener/KvDataHolder.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.dynamicconfig.kie.listener; +package com.huaweicloud.sermant.core.service.dynamicconfig.kie.listener; -import com.huawei.sermant.core.service.dynamicconfig.kie.client.kie.KieConfigEntity; -import com.huawei.sermant.core.service.dynamicconfig.kie.client.kie.KieResponse; +import com.huaweicloud.sermant.core.service.dynamicconfig.kie.client.kie.KieConfigEntity; +import com.huaweicloud.sermant.core.service.dynamicconfig.kie.client.kie.KieResponse; import java.util.HashMap; import java.util.Map; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/listener/SubscriberManager.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/listener/SubscriberManager.java similarity index 94% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/listener/SubscriberManager.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/listener/SubscriberManager.java index c3f6632a7a..394f6d06da 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/listener/SubscriberManager.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/listener/SubscriberManager.java @@ -20,21 +20,21 @@ * from the Apache ServiceComb Java Chassis project. */ -package com.huawei.sermant.core.service.dynamicconfig.kie.listener; - -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.service.dynamicconfig.common.DynamicConfigListener; -import com.huawei.sermant.core.service.dynamicconfig.kie.client.ClientUrlManager; -import com.huawei.sermant.core.service.dynamicconfig.kie.client.kie.KieClient; -import com.huawei.sermant.core.service.dynamicconfig.kie.client.kie.KieConfigEntity; -import com.huawei.sermant.core.service.dynamicconfig.kie.client.kie.KieListenerWrapper; -import com.huawei.sermant.core.service.dynamicconfig.kie.client.kie.KieRequest; -import com.huawei.sermant.core.service.dynamicconfig.kie.client.kie.KieResponse; -import com.huawei.sermant.core.service.dynamicconfig.kie.client.kie.KieSubscriber; -import com.huawei.sermant.core.service.dynamicconfig.kie.client.kie.ResultHandler; -import com.huawei.sermant.core.service.dynamicconfig.kie.constants.KieConstants; -import com.huawei.sermant.core.service.dynamicconfig.utils.LabelGroupUtils; -import com.huawei.sermant.core.utils.ThreadFactoryUtils; +package com.huaweicloud.sermant.core.service.dynamicconfig.kie.listener; + +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigListener; +import com.huaweicloud.sermant.core.service.dynamicconfig.kie.client.ClientUrlManager; +import com.huaweicloud.sermant.core.service.dynamicconfig.kie.client.kie.KieClient; +import com.huaweicloud.sermant.core.service.dynamicconfig.kie.client.kie.KieConfigEntity; +import com.huaweicloud.sermant.core.service.dynamicconfig.kie.client.kie.KieListenerWrapper; +import com.huaweicloud.sermant.core.service.dynamicconfig.kie.client.kie.KieRequest; +import com.huaweicloud.sermant.core.service.dynamicconfig.kie.client.kie.KieResponse; +import com.huaweicloud.sermant.core.service.dynamicconfig.kie.client.kie.KieSubscriber; +import com.huaweicloud.sermant.core.service.dynamicconfig.kie.client.kie.ResultHandler; +import com.huaweicloud.sermant.core.service.dynamicconfig.kie.constants.KieConstants; +import com.huaweicloud.sermant.core.service.dynamicconfig.utils.LabelGroupUtils; +import com.huaweicloud.sermant.core.utils.ThreadFactoryUtils; import org.apache.commons.lang3.StringUtils; import org.apache.http.client.config.RequestConfig; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/selector/SelectStrategy.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/selector/SelectStrategy.java similarity index 96% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/selector/SelectStrategy.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/selector/SelectStrategy.java index 9488a21ef9..1b601444e8 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/selector/SelectStrategy.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/selector/SelectStrategy.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.dynamicconfig.kie.selector; +package com.huaweicloud.sermant.core.service.dynamicconfig.kie.selector; import java.util.List; import java.util.Random; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/selector/Selector.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/selector/Selector.java similarity index 93% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/selector/Selector.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/selector/Selector.java index 7d001fe24a..88e68bce59 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/selector/Selector.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/selector/Selector.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.dynamicconfig.kie.selector; +package com.huaweicloud.sermant.core.service.dynamicconfig.kie.selector; import java.util.List; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/selector/url/UrlSelector.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/selector/url/UrlSelector.java similarity index 82% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/selector/url/UrlSelector.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/selector/url/UrlSelector.java index c9dcb25f00..512fe5ca62 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/kie/selector/url/UrlSelector.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/selector/url/UrlSelector.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.dynamicconfig.kie.selector.url; +package com.huaweicloud.sermant.core.service.dynamicconfig.kie.selector.url; -import com.huawei.sermant.core.service.dynamicconfig.kie.selector.SelectStrategy; -import com.huawei.sermant.core.service.dynamicconfig.kie.selector.Selector; +import com.huaweicloud.sermant.core.service.dynamicconfig.kie.selector.SelectStrategy; +import com.huaweicloud.sermant.core.service.dynamicconfig.kie.selector.Selector; import java.util.List; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/nop/NopDynamicConfigService.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/nop/NopDynamicConfigService.java similarity index 88% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/nop/NopDynamicConfigService.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/nop/NopDynamicConfigService.java index 9daa957895..59ff0bdafe 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/nop/NopDynamicConfigService.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/nop/NopDynamicConfigService.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.dynamicconfig.nop; +package com.huaweicloud.sermant.core.service.dynamicconfig.nop; -import com.huawei.sermant.core.service.dynamicconfig.DynamicConfigService; -import com.huawei.sermant.core.service.dynamicconfig.common.DynamicConfigListener; +import com.huaweicloud.sermant.core.service.dynamicconfig.DynamicConfigService; +import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigListener; import java.util.Collections; import java.util.List; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/utils/LabelGroupUtils.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/utils/LabelGroupUtils.java similarity index 97% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/utils/LabelGroupUtils.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/utils/LabelGroupUtils.java index e8c747dd5e..effbf5d7c5 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/utils/LabelGroupUtils.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/utils/LabelGroupUtils.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.dynamicconfig.utils; +package com.huaweicloud.sermant.core.service.dynamicconfig.utils; -import com.huawei.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.common.LoggerFactory; import org.apache.commons.lang3.StringUtils; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/zookeeper/ZooKeeperBufferedClient.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/zookeeper/ZooKeeperBufferedClient.java similarity index 98% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/zookeeper/ZooKeeperBufferedClient.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/zookeeper/ZooKeeperBufferedClient.java index ff7005f3f5..f5d4815b9f 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/zookeeper/ZooKeeperBufferedClient.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/zookeeper/ZooKeeperBufferedClient.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.dynamicconfig.zookeeper; +package com.huaweicloud.sermant.core.service.dynamicconfig.zookeeper; -import com.huawei.sermant.core.common.CommonConstant; -import com.huawei.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.common.CommonConstant; +import com.huaweicloud.sermant.core.common.LoggerFactory; import org.apache.zookeeper.AddWatchMode; import org.apache.zookeeper.CreateMode; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/zookeeper/ZooKeeperDynamicConfigService.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/zookeeper/ZooKeeperDynamicConfigService.java similarity index 94% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/zookeeper/ZooKeeperDynamicConfigService.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/zookeeper/ZooKeeperDynamicConfigService.java index 816b377fc7..e4ce0b47c2 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/zookeeper/ZooKeeperDynamicConfigService.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/zookeeper/ZooKeeperDynamicConfigService.java @@ -14,12 +14,12 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.dynamicconfig.zookeeper; +package com.huaweicloud.sermant.core.service.dynamicconfig.zookeeper; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.service.dynamicconfig.DynamicConfigService; -import com.huawei.sermant.core.service.dynamicconfig.common.DynamicConfigEvent; -import com.huawei.sermant.core.service.dynamicconfig.common.DynamicConfigListener; +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.service.dynamicconfig.DynamicConfigService; +import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigEvent; +import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigListener; import org.apache.zookeeper.WatchedEvent; import org.apache.zookeeper.Watcher; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/zookeeper/ZooKeeperInitException.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/zookeeper/ZooKeeperInitException.java similarity index 94% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/zookeeper/ZooKeeperInitException.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/zookeeper/ZooKeeperInitException.java index 36c187bcfb..49588a7263 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/dynamicconfig/zookeeper/ZooKeeperInitException.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/dynamicconfig/zookeeper/ZooKeeperInitException.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.dynamicconfig.zookeeper; +package com.huaweicloud.sermant.core.service.dynamicconfig.zookeeper; import java.util.Locale; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/heartbeat/HeartbeatServiceImpl.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/heartbeat/HeartbeatServiceImpl.java similarity index 84% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/heartbeat/HeartbeatServiceImpl.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/heartbeat/HeartbeatServiceImpl.java index 39530cf568..f6102c4e1f 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/heartbeat/HeartbeatServiceImpl.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/heartbeat/HeartbeatServiceImpl.java @@ -14,22 +14,22 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.heartbeat; - -import com.huawei.sermant.core.common.CommonConstant; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.config.ConfigManager; -import com.huawei.sermant.core.lubanops.integration.transport.netty.pojo.Message; -import com.huawei.sermant.core.plugin.common.PluginConstant; -import com.huawei.sermant.core.plugin.common.PluginSchemaValidator; -import com.huawei.sermant.core.service.heartbeat.api.ExtInfoProvider; -import com.huawei.sermant.core.service.heartbeat.api.HeartbeatService; -import com.huawei.sermant.core.service.heartbeat.common.HeartbeatConstant; -import com.huawei.sermant.core.service.heartbeat.common.HeartbeatMessage; -import com.huawei.sermant.core.service.heartbeat.config.HeartbeatConfig; -import com.huawei.sermant.core.service.send.NettyClient; -import com.huawei.sermant.core.service.send.NettyClientFactory; -import com.huawei.sermant.core.utils.JarFileUtils; +package com.huaweicloud.sermant.core.service.heartbeat; + +import com.huaweicloud.sermant.core.common.CommonConstant; +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.config.ConfigManager; +import com.huaweicloud.sermant.core.plugin.common.PluginConstant; +import com.huaweicloud.sermant.core.plugin.common.PluginSchemaValidator; +import com.huaweicloud.sermant.core.service.heartbeat.api.ExtInfoProvider; +import com.huaweicloud.sermant.core.service.heartbeat.api.HeartbeatService; +import com.huaweicloud.sermant.core.service.heartbeat.common.HeartbeatConstant; +import com.huaweicloud.sermant.core.service.heartbeat.common.HeartbeatMessage; +import com.huaweicloud.sermant.core.service.heartbeat.config.HeartbeatConfig; +import com.huaweicloud.sermant.core.service.send.NettyClient; +import com.huaweicloud.sermant.core.service.send.NettyClientFactory; +import com.huaweicloud.sermant.core.service.send.netty.pojo.Message; +import com.huaweicloud.sermant.core.utils.JarFileUtils; import com.alibaba.fastjson.JSONObject; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/heartbeat/api/ExtInfoProvider.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/heartbeat/api/ExtInfoProvider.java similarity index 94% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/heartbeat/api/ExtInfoProvider.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/heartbeat/api/ExtInfoProvider.java index 039417b3ad..8908b6a6ef 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/heartbeat/api/ExtInfoProvider.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/heartbeat/api/ExtInfoProvider.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.heartbeat.api; +package com.huaweicloud.sermant.core.service.heartbeat.api; import java.util.Map; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/heartbeat/api/HeartbeatService.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/heartbeat/api/HeartbeatService.java similarity index 85% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/heartbeat/api/HeartbeatService.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/heartbeat/api/HeartbeatService.java index 26bd754963..5194ff9a01 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/heartbeat/api/HeartbeatService.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/heartbeat/api/HeartbeatService.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2021 Huawei Technologies Co., Ltd. All rights reserved. + * Copyright (C) 2022-2022 Huawei Technologies Co., Ltd. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.heartbeat.api; +package com.huaweicloud.sermant.core.service.heartbeat.api; -import com.huawei.sermant.core.service.BaseService; +import com.huaweicloud.sermant.core.service.BaseService; /** * 心跳服务 diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/heartbeat/common/HeartbeatConstant.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/heartbeat/common/HeartbeatConstant.java similarity index 94% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/heartbeat/common/HeartbeatConstant.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/heartbeat/common/HeartbeatConstant.java index 2a77776361..7287d90993 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/heartbeat/common/HeartbeatConstant.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/heartbeat/common/HeartbeatConstant.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.heartbeat.common; +package com.huaweicloud.sermant.core.service.heartbeat.common; /** * 心跳发送服务涉及到的常量 diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/heartbeat/common/HeartbeatMessage.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/heartbeat/common/HeartbeatMessage.java similarity index 89% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/heartbeat/common/HeartbeatMessage.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/heartbeat/common/HeartbeatMessage.java index 9dee9c86b7..f047306b88 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/heartbeat/common/HeartbeatMessage.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/heartbeat/common/HeartbeatMessage.java @@ -14,12 +14,12 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.heartbeat.common; +package com.huaweicloud.sermant.core.service.heartbeat.common; -import com.huawei.sermant.core.common.BootArgsIndexer; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.utils.NetworkUtils; -import com.huawei.sermant.core.utils.TimeUtils; +import com.huaweicloud.sermant.core.common.BootArgsIndexer; +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.utils.NetworkUtils; +import com.huaweicloud.sermant.core.utils.TimeUtils; import com.alibaba.fastjson.JSONException; import com.alibaba.fastjson.JSONObject; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/heartbeat/config/HeartbeatConfig.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/heartbeat/config/HeartbeatConfig.java similarity index 79% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/heartbeat/config/HeartbeatConfig.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/heartbeat/config/HeartbeatConfig.java index 5a8e7b0e15..70f6673bbb 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/heartbeat/config/HeartbeatConfig.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/heartbeat/config/HeartbeatConfig.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.heartbeat.config; +package com.huaweicloud.sermant.core.service.heartbeat.config; -import com.huawei.sermant.core.config.common.BaseConfig; -import com.huawei.sermant.core.config.common.ConfigTypeKey; -import com.huawei.sermant.core.service.heartbeat.common.HeartbeatConstant; +import com.huaweicloud.sermant.core.config.common.BaseConfig; +import com.huaweicloud.sermant.core.config.common.ConfigTypeKey; +import com.huaweicloud.sermant.core.service.heartbeat.common.HeartbeatConstant; /** * 心跳配置 diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/send/ClientHandler.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/send/ClientHandler.java similarity index 90% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/send/ClientHandler.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/send/ClientHandler.java index 4a1a720726..840ebe090c 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/send/ClientHandler.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/send/ClientHandler.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.send; +package com.huaweicloud.sermant.core.service.send; -import com.huawei.sermant.core.lubanops.integration.transport.netty.pojo.Message; -import com.huawei.sermant.core.service.send.common.BaseHandler; +import com.huaweicloud.sermant.core.service.send.common.BaseHandler; +import com.huaweicloud.sermant.core.service.send.netty.pojo.Message; import io.netty.channel.ChannelHandlerContext; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/send/ClientManager.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/send/ClientManager.java similarity index 94% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/send/ClientManager.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/send/ClientManager.java index aba5fdcfa9..14e17ed722 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/send/ClientManager.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/send/ClientManager.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.send; +package com.huaweicloud.sermant.core.service.send; /** * 客户端连接管理类 diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/send/NettyClient.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/send/NettyClient.java similarity index 96% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/send/NettyClient.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/send/NettyClient.java index 5624fe1550..065c1f8735 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/send/NettyClient.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/send/NettyClient.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.send; +package com.huaweicloud.sermant.core.service.send; -import com.huawei.sermant.core.lubanops.integration.transport.netty.pojo.Message; -import com.huawei.sermant.core.service.send.common.ThreadPools; -import com.huawei.sermant.core.utils.GzipUtils; +import com.huaweicloud.sermant.core.service.send.common.ThreadPools; +import com.huaweicloud.sermant.core.service.send.netty.pojo.Message; +import com.huaweicloud.sermant.core.utils.GzipUtils; import com.google.protobuf.ByteString; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/send/NettyClientFactory.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/send/NettyClientFactory.java similarity index 91% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/send/NettyClientFactory.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/send/NettyClientFactory.java index 24664faa78..34219b7cc4 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/send/NettyClientFactory.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/send/NettyClientFactory.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.send; +package com.huaweicloud.sermant.core.service.send; -import com.huawei.sermant.core.config.ConfigManager; -import com.huawei.sermant.core.service.send.config.BackendConfig; +import com.huaweicloud.sermant.core.config.ConfigManager; +import com.huaweicloud.sermant.core.service.send.config.BackendConfig; import java.util.HashMap; import java.util.Map; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/send/NettyGatewayClient.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/send/NettyGatewayClient.java similarity index 81% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/send/NettyGatewayClient.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/send/NettyGatewayClient.java index 6656b67d49..fb1cdcea94 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/send/NettyGatewayClient.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/send/NettyGatewayClient.java @@ -14,13 +14,13 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.send; +package com.huaweicloud.sermant.core.service.send; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.config.ConfigManager; -import com.huawei.sermant.core.lubanops.integration.transport.netty.pojo.Message; -import com.huawei.sermant.core.service.send.api.GatewayClient; -import com.huawei.sermant.core.service.send.config.BackendConfig; +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.config.ConfigManager; +import com.huaweicloud.sermant.core.service.send.api.GatewayClient; +import com.huaweicloud.sermant.core.service.send.config.BackendConfig; +import com.huaweicloud.sermant.core.service.send.netty.pojo.Message; import java.util.logging.Logger; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/send/Sender.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/send/Sender.java similarity index 94% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/send/Sender.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/send/Sender.java index 7622b8c27d..d309c78cb9 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/send/Sender.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/send/Sender.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.send; +package com.huaweicloud.sermant.core.service.send; -import com.huawei.sermant.core.lubanops.integration.transport.netty.pojo.Message; +import com.huaweicloud.sermant.core.service.send.netty.pojo.Message; import io.netty.channel.Channel; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/send/api/GatewayClient.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/send/api/GatewayClient.java similarity index 89% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/send/api/GatewayClient.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/send/api/GatewayClient.java index c34076037d..8db7a0a77c 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/send/api/GatewayClient.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/send/api/GatewayClient.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.send.api; +package com.huaweicloud.sermant.core.service.send.api; -import com.huawei.sermant.core.service.BaseService; +import com.huaweicloud.sermant.core.service.BaseService; /** * 网关的客户端 diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/send/common/BaseHandler.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/send/common/BaseHandler.java similarity index 96% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/send/common/BaseHandler.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/send/common/BaseHandler.java index a59b0c5639..57c11701f0 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/send/common/BaseHandler.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/send/common/BaseHandler.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.send.common; +package com.huaweicloud.sermant.core.service.send.common; -import com.huawei.sermant.core.lubanops.integration.transport.netty.pojo.Message; +import com.huaweicloud.sermant.core.service.send.netty.pojo.Message; import io.netty.channel.Channel; import io.netty.channel.ChannelHandlerContext; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/send/common/ThreadPools.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/send/common/ThreadPools.java similarity index 97% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/send/common/ThreadPools.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/send/common/ThreadPools.java index 4a131f1684..520a512676 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/send/common/ThreadPools.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/send/common/ThreadPools.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.send.common; +package com.huaweicloud.sermant.core.service.send.common; import java.util.concurrent.BlockingQueue; import java.util.concurrent.LinkedBlockingQueue; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/send/config/BackendConfig.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/send/config/BackendConfig.java similarity index 51% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/send/config/BackendConfig.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/send/config/BackendConfig.java index e09ca640bc..ccb6254852 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/send/config/BackendConfig.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/send/config/BackendConfig.java @@ -1,20 +1,23 @@ /* - * Copyright (C) 2022-2022 Huawei Technologies Co., Ltd. All rights reserved. + * Copyright (C) 2022-2022 Huawei Technologies Co., Ltd. All rights reserved. * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software 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. + * Unless required by applicable law or agreed to in writing, software + * 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.huawei.sermant.core.service.send.config; +package com.huaweicloud.sermant.core.service.send.config; -import com.huawei.sermant.core.config.common.BaseConfig; -import com.huawei.sermant.core.config.common.ConfigTypeKey; +import com.huaweicloud.sermant.core.config.common.BaseConfig; +import com.huaweicloud.sermant.core.config.common.ConfigTypeKey; /** * Backend配置 diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/tracing/TracingServiceImpl.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/tracing/TracingServiceImpl.java similarity index 90% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/tracing/TracingServiceImpl.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/tracing/TracingServiceImpl.java index e54be9c8e7..21232bb710 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/tracing/TracingServiceImpl.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/tracing/TracingServiceImpl.java @@ -14,16 +14,16 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.tracing; +package com.huaweicloud.sermant.core.service.tracing; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.service.tracing.api.ExtractService; -import com.huawei.sermant.core.service.tracing.api.InjectService; -import com.huawei.sermant.core.service.tracing.api.TracingService; -import com.huawei.sermant.core.service.tracing.common.SpanEvent; -import com.huawei.sermant.core.service.tracing.common.SpanEventContext; -import com.huawei.sermant.core.service.tracing.common.TracingRequest; -import com.huawei.sermant.core.service.tracing.sender.TracingSender; +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.service.tracing.api.ExtractService; +import com.huaweicloud.sermant.core.service.tracing.api.InjectService; +import com.huaweicloud.sermant.core.service.tracing.api.TracingService; +import com.huaweicloud.sermant.core.service.tracing.common.SpanEvent; +import com.huaweicloud.sermant.core.service.tracing.common.SpanEventContext; +import com.huaweicloud.sermant.core.service.tracing.common.TracingRequest; +import com.huaweicloud.sermant.core.service.tracing.sender.TracingSender; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.serializer.SerializerFeature; @@ -85,7 +85,7 @@ public Optional getContext() { @Override public Optional onProviderSpanStart(TracingRequest tracingRequest, ExtractService extractService, - T carrier) { + T carrier) { if (!isTracing) { return Optional.empty(); } diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/tracing/api/ExtractService.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/tracing/api/ExtractService.java similarity index 90% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/tracing/api/ExtractService.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/tracing/api/ExtractService.java index 4f96a6c0b4..0e72dee46d 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/tracing/api/ExtractService.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/tracing/api/ExtractService.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.tracing.api; +package com.huaweicloud.sermant.core.service.tracing.api; -import com.huawei.sermant.core.service.tracing.common.TracingRequest; +import com.huaweicloud.sermant.core.service.tracing.common.TracingRequest; /** * 将Span上下文提取出载体的函数式接口 diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/tracing/api/InjectService.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/tracing/api/InjectService.java similarity index 90% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/tracing/api/InjectService.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/tracing/api/InjectService.java index 9c7ff33bb0..362afc9818 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/tracing/api/InjectService.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/tracing/api/InjectService.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.tracing.api; +package com.huaweicloud.sermant.core.service.tracing.api; -import com.huawei.sermant.core.service.tracing.common.SpanEvent; +import com.huaweicloud.sermant.core.service.tracing.common.SpanEvent; /** * 将Span上下文注入载体的函数式接口 diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/tracing/api/TracingService.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/tracing/api/TracingService.java similarity index 88% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/tracing/api/TracingService.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/tracing/api/TracingService.java index a434156e4a..fe69553097 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/tracing/api/TracingService.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/tracing/api/TracingService.java @@ -14,12 +14,12 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.tracing.api; +package com.huaweicloud.sermant.core.service.tracing.api; -import com.huawei.sermant.core.service.BaseService; -import com.huawei.sermant.core.service.tracing.common.SpanEvent; -import com.huawei.sermant.core.service.tracing.common.SpanEventContext; -import com.huawei.sermant.core.service.tracing.common.TracingRequest; +import com.huaweicloud.sermant.core.service.BaseService; +import com.huaweicloud.sermant.core.service.tracing.common.SpanEvent; +import com.huaweicloud.sermant.core.service.tracing.common.SpanEventContext; +import com.huaweicloud.sermant.core.service.tracing.common.TracingRequest; import java.util.Optional; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/tracing/common/SourceInfo.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/tracing/common/SourceInfo.java new file mode 100644 index 0000000000..03c8188caf --- /dev/null +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/tracing/common/SourceInfo.java @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2022-2022 Huawei Technologies Co., Ltd. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * 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.huaweicloud.sermant.core.service.tracing.common; + +/** + * 描述上一工作单元信息 + * + * @author luanwenfei + * @since 2022-03-01 + */ +public class SourceInfo { + private String address; + + private String className; + + private String method; + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public String getClassName() { + return className; + } + + public void setClassName(String className) { + this.className = className; + } + + public String getMethod() { + return method; + } + + public void setMethod(String method) { + this.method = method; + } +} diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/tracing/common/SpanEvent.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/tracing/common/SpanEvent.java new file mode 100644 index 0000000000..6a6445c3a0 --- /dev/null +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/tracing/common/SpanEvent.java @@ -0,0 +1,257 @@ +/* + * Copyright (C) 2022-2022 Huawei Technologies Co., Ltd. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * 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.huaweicloud.sermant.core.service.tracing.common; + +import java.util.LinkedHashMap; +import java.util.Map; + +/** + * Span实体数据 + * + * @author luanwenfei + * @since 2022-02-28 + */ +public class SpanEvent { + private String traceId; + + private String spanId; + + private String parentSpanId; + + private transient String spanIdPrefix; + + /** + * 下一进程的spanIdPrefix + */ + private transient String nextSpanIdPrefix; + + private String className; + + private String method; + + private transient SpanEvent parentSpan; + + /** + * Span所标识工作单元执行的操作描述 + */ + private String operationDescription; + + /** + * Span所标识工作单元的类型 mysql、kafka、http等 + */ + private String type; + + private long startTime; + + private long endTime; + + private boolean isError; + + private String errorInfo; + + /** + * Span所标识工作单元是否为异步 + */ + private boolean isAsync; + + /** + * 调用当前Span所标识工作单元的节点信息 + */ + private SourceInfo sourceInfo; + + /** + * Span所标识工作单元调用的目的地的节点信息 + */ + private TargetInfo targetInfo; + + private Map tags = new LinkedHashMap<>(); + + /** + * 无参构造方法 + */ + public SpanEvent() { + } + + /** + * 通过ParentSpan创建ChildrenSpan + * + * @param spanEvent ParentSpan + */ + public SpanEvent(SpanEvent spanEvent) { + this.parentSpan = spanEvent; + this.traceId = spanEvent.getTraceId(); + this.parentSpanId = spanEvent.getSpanId(); + this.spanIdPrefix = spanEvent.getSpanIdPrefix(); + } + + /** + * 为Span添加标签 + * + * @param key key + * @param value value + */ + public void addTag(String key, String value) { + if (key == null || value == null) { + return; + } + this.tags.put(key, value); + } + + public String getTraceId() { + return traceId; + } + + public void setTraceId(String traceId) { + this.traceId = traceId; + } + + public String getSpanId() { + return spanId; + } + + public void setSpanId(String spanId) { + this.spanId = spanId; + } + + public String getParentSpanId() { + return parentSpanId; + } + + public void setParentSpanId(String parentSpanId) { + this.parentSpanId = parentSpanId; + } + + public String getSpanIdPrefix() { + return spanIdPrefix; + } + + public void setSpanIdPrefix(String spanIdPrefix) { + this.spanIdPrefix = spanIdPrefix; + } + + public String getNextSpanIdPrefix() { + return nextSpanIdPrefix; + } + + public void setNextSpanIdPrefix(String nextSpanIdPrefix) { + this.nextSpanIdPrefix = nextSpanIdPrefix; + } + + public String getClassName() { + return className; + } + + public void setClassName(String className) { + this.className = className; + } + + public String getMethod() { + return method; + } + + public void setMethod(String method) { + this.method = method; + } + + public SpanEvent getParentSpan() { + return parentSpan; + } + + public void setParentSpan(SpanEvent parentSpan) { + this.parentSpan = parentSpan; + } + + public String getOperationDescription() { + return operationDescription; + } + + public void setOperationDescription(String operationDescription) { + this.operationDescription = operationDescription; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public long getStartTime() { + return startTime; + } + + public void setStartTime(long startTime) { + this.startTime = startTime; + } + + public long getEndTime() { + return endTime; + } + + public void setEndTime(long endTime) { + this.endTime = endTime; + } + + public boolean isError() { + return isError; + } + + public void setError(boolean error) { + isError = error; + } + + public String getErrorInfo() { + return errorInfo; + } + + public void setErrorInfo(String errorInfo) { + this.errorInfo = errorInfo; + } + + public boolean isAsync() { + return isAsync; + } + + public void setAsync(boolean async) { + isAsync = async; + } + + public SourceInfo getSourceInfo() { + return sourceInfo; + } + + public void setSourceInfo(SourceInfo sourceInfo) { + this.sourceInfo = sourceInfo; + } + + public TargetInfo getTargetInfo() { + return targetInfo; + } + + public void setTargetInfo(TargetInfo targetInfo) { + this.targetInfo = targetInfo; + } + + public Map getTags() { + return tags; + } + + public void setTags(Map tags) { + this.tags = tags; + } +} diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/tracing/common/SpanEventContext.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/tracing/common/SpanEventContext.java similarity index 83% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/tracing/common/SpanEventContext.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/tracing/common/SpanEventContext.java index cd35ea05d9..1b94865ece 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/tracing/common/SpanEventContext.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/tracing/common/SpanEventContext.java @@ -14,12 +14,9 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.tracing.common; +package com.huaweicloud.sermant.core.service.tracing.common; -import com.huawei.sermant.core.utils.TracingUtils; - -import lombok.Getter; -import lombok.Setter; +import com.huaweicloud.sermant.core.utils.TracingUtils; import org.apache.commons.lang.StringUtils; @@ -31,8 +28,6 @@ * @author luanwenfei * @since 2022-03-03 */ -@Getter -@Setter public class SpanEventContext { private static final String SPAN_ID_SEPARATOR = "-"; @@ -101,4 +96,28 @@ public void configNextSpanIdPrefix() { this.spanEvent.setNextSpanIdPrefix( this.spanEvent.getSpanId() + SPAN_ID_SEPARATOR + this.nextSpanIdCount.getAndIncrement()); } + + public SpanEvent getSpanEvent() { + return spanEvent; + } + + public void setSpanEvent(SpanEvent spanEvent) { + this.spanEvent = spanEvent; + } + + public AtomicInteger getSpanIdCount() { + return spanIdCount; + } + + public void setSpanIdCount(AtomicInteger spanIdCount) { + this.spanIdCount = spanIdCount; + } + + public AtomicInteger getNextSpanIdCount() { + return nextSpanIdCount; + } + + public void setNextSpanIdCount(AtomicInteger nextSpanIdCount) { + this.nextSpanIdCount = nextSpanIdCount; + } } diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/tracing/common/TargetInfo.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/tracing/common/TargetInfo.java new file mode 100644 index 0000000000..8a7a8340d1 --- /dev/null +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/tracing/common/TargetInfo.java @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2022-2022 Huawei Technologies Co., Ltd. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * 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.huaweicloud.sermant.core.service.tracing.common; + +/** + * 被调用的目的节点信息 + * + * @author luanwenfei + * @since 2022-03-01 + */ +public class TargetInfo { + private String address; + + private String className; + + private String method; + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public String getClassName() { + return className; + } + + public void setClassName(String className) { + this.className = className; + } + + public String getMethod() { + return method; + } + + public void setMethod(String method) { + this.method = method; + } +} diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/tracing/common/TracingHeader.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/tracing/common/TracingHeader.java similarity index 51% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/tracing/common/TracingHeader.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/tracing/common/TracingHeader.java index 7d2088e237..1650ff70c1 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/tracing/common/TracingHeader.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/tracing/common/TracingHeader.java @@ -1,20 +1,20 @@ /* * Copyright (C) 2022-2022 Huawei Technologies Co., Ltd. All rights reserved. * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software 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. + * Unless required by applicable law or agreed to in writing, software + * 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.huawei.sermant.core.service.tracing.common; - -import lombok.AllArgsConstructor; -import lombok.Getter; +package com.huaweicloud.sermant.core.service.tracing.common; /** * 链路追踪插入Carrier的Key @@ -22,8 +22,6 @@ * @author luanwenfei * @since 2022-03-18 */ -@Getter -@AllArgsConstructor public enum TracingHeader { /** * 标识一整条链路 @@ -39,4 +37,12 @@ public enum TracingHeader { SPAN_ID_PREFIX("sermant-span-id-prefix"); private final String value; + + TracingHeader(String value) { + this.value = value; + } + + public String getValue() { + return value; + } } diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/tracing/common/TracingRequest.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/tracing/common/TracingRequest.java new file mode 100644 index 0000000000..ce1ac6ea13 --- /dev/null +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/tracing/common/TracingRequest.java @@ -0,0 +1,129 @@ +/* + * Copyright (C) 2022-2022 Huawei Technologies Co., Ltd. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * 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.huaweicloud.sermant.core.service.tracing.common; + +/** + * 调用链路追踪生命周期时需要传入的参数 + * + * @author luanwenfei + * @since 2022-03-01 + */ +public class TracingRequest { + private String traceId; + + private String parentSpanId; + + /** + * 当前进程生成SpanId的前缀 + */ + private String spanIdPrefix; + + private String className; + + private String method; + + /** + * SpanContext的来源信息 + */ + private SourceInfo sourceInfo; + + private TargetInfo targetInfo; + + /** + * 构造函数 + * + * @param traceId traceId + * @param parentSpanId parentSpanId + * @param spanIdPrefix spanIdPrefix + * @param className className + * @param method method + */ + public TracingRequest(String traceId, String parentSpanId, String spanIdPrefix, String className, String method) { + this.traceId = traceId; + this.parentSpanId = parentSpanId; + this.spanIdPrefix = spanIdPrefix; + this.className = className; + this.method = method; + } + + /** + * 构造函数 + * + * @param className className + * @param method method + */ + public TracingRequest(String className, String method) { + this.className = className; + this.method = method; + } + + public String getTraceId() { + return traceId; + } + + public void setTraceId(String traceId) { + this.traceId = traceId; + } + + public String getParentSpanId() { + return parentSpanId; + } + + public void setParentSpanId(String parentSpanId) { + this.parentSpanId = parentSpanId; + } + + public String getSpanIdPrefix() { + return spanIdPrefix; + } + + public void setSpanIdPrefix(String spanIdPrefix) { + this.spanIdPrefix = spanIdPrefix; + } + + public String getClassName() { + return className; + } + + public void setClassName(String className) { + this.className = className; + } + + public String getMethod() { + return method; + } + + public void setMethod(String method) { + this.method = method; + } + + public SourceInfo getSourceInfo() { + return sourceInfo; + } + + public void setSourceInfo(SourceInfo sourceInfo) { + this.sourceInfo = sourceInfo; + } + + public TargetInfo getTargetInfo() { + return targetInfo; + } + + public void setTargetInfo(TargetInfo targetInfo) { + this.targetInfo = targetInfo; + } +} diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/tracing/sender/TracingMessage.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/tracing/sender/TracingMessage.java new file mode 100644 index 0000000000..cf5a8ecd1f --- /dev/null +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/tracing/sender/TracingMessage.java @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2022-2022 Huawei Technologies Co., Ltd. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * 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.huaweicloud.sermant.core.service.tracing.sender; + +import com.huaweicloud.sermant.core.service.tracing.common.SpanEvent; + +/** + * 向后端发送的调用链信息 + * + * @author luanwenfei + * @since 2022-03-07 + */ +public class TracingMessage { + private String messageId; + + private TracingMessageHeader header; + + private SpanEvent body; + + /** + * 构造链路信息 + * + * @param messageId 消息ID + * @param header 链路消息头部 + * @param body 链路消息体 + */ + public TracingMessage(String messageId, TracingMessageHeader header, SpanEvent body) { + this.messageId = messageId; + this.header = header; + this.body = body; + } + + public String getMessageId() { + return messageId; + } + + public void setMessageId(String messageId) { + this.messageId = messageId; + } + + public TracingMessageHeader getHeader() { + return header; + } + + public void setHeader(TracingMessageHeader header) { + this.header = header; + } + + public SpanEvent getBody() { + return body; + } + + public void setBody(SpanEvent body) { + this.body = body; + } +} diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/tracing/sender/TracingMessageHeader.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/tracing/sender/TracingMessageHeader.java new file mode 100644 index 0000000000..62b8774334 --- /dev/null +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/tracing/sender/TracingMessageHeader.java @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2022-2022 Huawei Technologies Co., Ltd. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * 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.huaweicloud.sermant.core.service.tracing.sender; + +/** + * 链路追踪向后端发送数据的头部(应用信息、节点信息) + * + * @author luanwenfei + * @since 2022-03-07 + */ +public class TracingMessageHeader { + private String instanceId; + + private String appId; + + public String getInstanceId() { + return instanceId; + } + + public void setInstanceId(String instanceId) { + this.instanceId = instanceId; + } + + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } +} diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/tracing/sender/TracingSender.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/tracing/sender/TracingSender.java similarity index 93% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/tracing/sender/TracingSender.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/tracing/sender/TracingSender.java index c68c4dd158..206882e39a 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/service/tracing/sender/TracingSender.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/service/tracing/sender/TracingSender.java @@ -14,12 +14,12 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.tracing.sender; +package com.huaweicloud.sermant.core.service.tracing.sender; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.service.ServiceManager; -import com.huawei.sermant.core.service.send.api.GatewayClient; -import com.huawei.sermant.core.service.tracing.common.SpanEvent; +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.service.ServiceManager; +import com.huaweicloud.sermant.core.service.send.api.GatewayClient; +import com.huaweicloud.sermant.core.service.tracing.common.SpanEvent; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.serializer.SerializerFeature; @@ -173,7 +173,7 @@ private Optional buildTracingMessage() { } // 节点信息待整改配置后获取 - TracingMessageHeader tracingMessageHeader = TracingMessageHeader.builder().build(); + TracingMessageHeader tracingMessageHeader = new TracingMessageHeader(); return Optional.of(new TracingMessage(spanEvent.getTraceId(), tracingMessageHeader, spanEvent)); } diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/utils/AssertUtils.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/utils/AssertUtils.java similarity index 96% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/utils/AssertUtils.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/utils/AssertUtils.java index 87d13c35e5..b5aa846ef1 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/utils/AssertUtils.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/utils/AssertUtils.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.huawei.sermant.core.utils; +package com.huaweicloud.sermant.core.utils; /** * 参数校验工具 diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/utils/ClassLoaderUtils.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/utils/ClassLoaderUtils.java similarity index 99% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/utils/ClassLoaderUtils.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/utils/ClassLoaderUtils.java index 22ecd54fa9..d21def284e 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/utils/ClassLoaderUtils.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/utils/ClassLoaderUtils.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.huawei.sermant.core.utils; +package com.huaweicloud.sermant.core.utils; import java.io.ByteArrayOutputStream; import java.io.IOException; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/utils/FieldUtils.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/utils/FieldUtils.java similarity index 99% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/utils/FieldUtils.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/utils/FieldUtils.java index 3d378a187f..96402a07b6 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/utils/FieldUtils.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/utils/FieldUtils.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.huawei.sermant.core.utils; +package com.huaweicloud.sermant.core.utils; /** * 字段名工具类 diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/utils/FileUtils.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/utils/FileUtils.java similarity index 98% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/utils/FileUtils.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/utils/FileUtils.java index 01d054c199..29b4f3a10d 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/utils/FileUtils.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/utils/FileUtils.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.huawei.sermant.core.utils; +package com.huaweicloud.sermant.core.utils; -import com.huawei.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.common.LoggerFactory; import java.io.File; import java.io.FileInputStream; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/utils/GzipUtils.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/utils/GzipUtils.java similarity index 95% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/utils/GzipUtils.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/utils/GzipUtils.java index 63fbc9e71d..e8989a6acb 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/utils/GzipUtils.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/utils/GzipUtils.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022-2022 Huawei Technologies Co., Ltd. All rights reserved. + * Copyright (C) 2021-2021 Huawei Technologies Co., Ltd. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.huawei.sermant.core.utils; +package com.huaweicloud.sermant.core.utils; -import com.huawei.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.common.LoggerFactory; import org.apache.commons.io.IOUtils; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/utils/JarFileUtils.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/utils/JarFileUtils.java similarity index 97% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/utils/JarFileUtils.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/utils/JarFileUtils.java index 8aa3ecaddf..931114249a 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/utils/JarFileUtils.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/utils/JarFileUtils.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.huawei.sermant.core.utils; +package com.huaweicloud.sermant.core.utils; import java.io.IOException; import java.net.URL; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/utils/MapUtils.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/utils/MapUtils.java similarity index 97% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/utils/MapUtils.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/utils/MapUtils.java index 7e9a1b615e..155cf1b3fa 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/utils/MapUtils.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/utils/MapUtils.java @@ -15,7 +15,7 @@ * */ -package com.huawei.sermant.core.utils; +package com.huaweicloud.sermant.core.utils; import java.util.Collection; import java.util.Locale; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/utils/NetworkUtils.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/utils/NetworkUtils.java similarity index 96% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/utils/NetworkUtils.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/utils/NetworkUtils.java index 43de1e76c8..08f3ac75ab 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/utils/NetworkUtils.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/utils/NetworkUtils.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.huawei.sermant.core.utils; +package com.huaweicloud.sermant.core.utils; -import com.huawei.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.common.LoggerFactory; import java.net.InetAddress; import java.net.NetworkInterface; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/utils/SpiLoadUtils.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/utils/SpiLoadUtils.java similarity index 98% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/utils/SpiLoadUtils.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/utils/SpiLoadUtils.java index 22ffe39767..fb8a8347d1 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/utils/SpiLoadUtils.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/utils/SpiLoadUtils.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.huawei.sermant.core.utils; +package com.huaweicloud.sermant.core.utils; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/utils/StringUtils.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/utils/StringUtils.java similarity index 98% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/utils/StringUtils.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/utils/StringUtils.java index b0f5e172f2..b42c2eb5c8 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/utils/StringUtils.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/utils/StringUtils.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.huawei.sermant.core.utils; +package com.huaweicloud.sermant.core.utils; /** * 字符串工具类 diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/utils/ThreadFactoryUtils.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/utils/ThreadFactoryUtils.java similarity index 98% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/utils/ThreadFactoryUtils.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/utils/ThreadFactoryUtils.java index ae58a11e3d..0915106e53 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/utils/ThreadFactoryUtils.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/utils/ThreadFactoryUtils.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.huawei.sermant.core.utils; +package com.huaweicloud.sermant.core.utils; import java.util.concurrent.ThreadFactory; import java.util.concurrent.atomic.AtomicInteger; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/utils/TimeUtils.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/utils/TimeUtils.java similarity index 94% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/utils/TimeUtils.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/utils/TimeUtils.java index e3f71c35f3..fbd4c19251 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/utils/TimeUtils.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/utils/TimeUtils.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.huawei.sermant.core.utils; +package com.huaweicloud.sermant.core.utils; -import com.huawei.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.common.LoggerFactory; import java.util.concurrent.TimeUnit; import java.util.logging.Logger; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/utils/TracingUtils.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/utils/TracingUtils.java similarity index 54% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/utils/TracingUtils.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/utils/TracingUtils.java index e16de58026..482ad56abf 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/utils/TracingUtils.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/utils/TracingUtils.java @@ -1,17 +1,20 @@ /* * Copyright (C) 2022-2022 Huawei Technologies Co., Ltd. All rights reserved. * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software 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. + * Unless required by applicable law or agreed to in writing, software + * 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.huawei.sermant.core.utils; +package com.huaweicloud.sermant.core.utils; import java.util.UUID; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/utils/UuidUtil.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/utils/UuidUtil.java similarity index 96% rename from sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/utils/UuidUtil.java rename to sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/utils/UuidUtil.java index 2c0a2d99c1..722e6ae1d2 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huawei/sermant/core/utils/UuidUtil.java +++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/utils/UuidUtil.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.huawei.sermant.core.utils; +package com.huaweicloud.sermant.core.utils; import java.text.SimpleDateFormat; import java.util.Date; diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/proto/Message.proto b/sermant-agentcore/sermant-agentcore-core/src/main/proto/Message.proto index d73f860676..9ffa193f3f 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/main/proto/Message.proto +++ b/sermant-agentcore/sermant-agentcore-core/src/main/proto/Message.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -option java_package = "com.huawei.sermant.core.lubanops.integration.transport.netty.pojo"; +option java_package = "com.huaweicloud.sermant.core.service.send.netty.pojo"; message NettyMessage{ diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/resources/META-INF/services/com.huawei.sermant.core.config.common.BaseConfig b/sermant-agentcore/sermant-agentcore-core/src/main/resources/META-INF/services/com.huawei.sermant.core.config.common.BaseConfig deleted file mode 100644 index e8fd6574e7..0000000000 --- a/sermant-agentcore/sermant-agentcore-core/src/main/resources/META-INF/services/com.huawei.sermant.core.config.common.BaseConfig +++ /dev/null @@ -1,7 +0,0 @@ -com.huawei.sermant.core.plugin.agent.config.AgentConfig -com.huawei.sermant.core.plugin.adaptor.config.AdaptorConfig -com.huawei.sermant.core.service.dynamicconfig.config.DynamicConfig -com.huawei.sermant.core.service.dynamicconfig.kie.config.KieDynamicConfig -com.huawei.sermant.core.service.heartbeat.config.HeartbeatConfig -com.huawei.sermant.core.plugin.config.ServiceMeta -com.huawei.sermant.core.service.send.config.BackendConfig diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/resources/META-INF/services/com.huawei.sermant.core.config.strategy.LoadConfigStrategy b/sermant-agentcore/sermant-agentcore-core/src/main/resources/META-INF/services/com.huawei.sermant.core.config.strategy.LoadConfigStrategy deleted file mode 100644 index bfab02fd18..0000000000 --- a/sermant-agentcore/sermant-agentcore-core/src/main/resources/META-INF/services/com.huawei.sermant.core.config.strategy.LoadConfigStrategy +++ /dev/null @@ -1,2 +0,0 @@ -com.huawei.sermant.core.config.strategy.LoadPropertiesStrategy -com.huawei.sermant.core.config.strategy.LoadYamlStrategy \ No newline at end of file diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.agent.collector.PluginCollector b/sermant-agentcore/sermant-agentcore-core/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.agent.collector.PluginCollector deleted file mode 100644 index dfc0f80fbb..0000000000 --- a/sermant-agentcore/sermant-agentcore-core/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.agent.collector.PluginCollector +++ /dev/null @@ -1,3 +0,0 @@ -com.huawei.sermant.core.plugin.agent.collector.DefaultPluginCollector -com.huawei.sermant.core.plugin.agent.collector.DeprecatedPluginCollector -com.huawei.sermant.core.plugin.adaptor.collector.AdaptorCollectorManager$AdaptorPluginCollector \ No newline at end of file diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/resources/META-INF/services/com.huawei.sermant.core.service.BaseService b/sermant-agentcore/sermant-agentcore-core/src/main/resources/META-INF/services/com.huawei.sermant.core.service.BaseService deleted file mode 100644 index c2c0ba5271..0000000000 --- a/sermant-agentcore/sermant-agentcore-core/src/main/resources/META-INF/services/com.huawei.sermant.core.service.BaseService +++ /dev/null @@ -1,4 +0,0 @@ -com.huawei.sermant.core.service.heartbeat.HeartbeatServiceImpl -com.huawei.sermant.core.service.send.NettyGatewayClient -com.huawei.sermant.core.service.dynamicconfig.BufferedDynamicConfigService -com.huawei.sermant.core.service.tracing.TracingServiceImpl \ No newline at end of file diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.config.common.BaseConfig b/sermant-agentcore/sermant-agentcore-core/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.config.common.BaseConfig new file mode 100644 index 0000000000..bea26f9975 --- /dev/null +++ b/sermant-agentcore/sermant-agentcore-core/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.config.common.BaseConfig @@ -0,0 +1,7 @@ +com.huaweicloud.sermant.core.plugin.agent.config.AgentConfig +com.huaweicloud.sermant.core.plugin.adaptor.config.AdaptorConfig +com.huaweicloud.sermant.core.service.dynamicconfig.config.DynamicConfig +com.huaweicloud.sermant.core.service.dynamicconfig.kie.config.KieDynamicConfig +com.huaweicloud.sermant.core.service.heartbeat.config.HeartbeatConfig +com.huaweicloud.sermant.core.plugin.config.ServiceMeta +com.huaweicloud.sermant.core.service.send.config.BackendConfig diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.config.strategy.LoadConfigStrategy b/sermant-agentcore/sermant-agentcore-core/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.config.strategy.LoadConfigStrategy new file mode 100644 index 0000000000..f913c4b047 --- /dev/null +++ b/sermant-agentcore/sermant-agentcore-core/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.config.strategy.LoadConfigStrategy @@ -0,0 +1,2 @@ +com.huaweicloud.sermant.core.config.strategy.LoadPropertiesStrategy +com.huaweicloud.sermant.core.config.strategy.LoadYamlStrategy \ No newline at end of file diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.agent.collector.PluginCollector b/sermant-agentcore/sermant-agentcore-core/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.agent.collector.PluginCollector new file mode 100644 index 0000000000..056ea56e7f --- /dev/null +++ b/sermant-agentcore/sermant-agentcore-core/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.agent.collector.PluginCollector @@ -0,0 +1,3 @@ +com.huaweicloud.sermant.core.plugin.agent.collector.DefaultPluginCollector +com.huaweicloud.sermant.core.plugin.agent.collector.DeprecatedPluginCollector +com.huaweicloud.sermant.core.plugin.adaptor.collector.AdaptorCollectorManager$AdaptorPluginCollector \ No newline at end of file diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.service.BaseService b/sermant-agentcore/sermant-agentcore-core/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.service.BaseService new file mode 100644 index 0000000000..2da3e3258f --- /dev/null +++ b/sermant-agentcore/sermant-agentcore-core/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.service.BaseService @@ -0,0 +1,4 @@ +com.huaweicloud.sermant.core.service.heartbeat.HeartbeatServiceImpl +com.huaweicloud.sermant.core.service.send.NettyGatewayClient +com.huaweicloud.sermant.core.service.dynamicconfig.BufferedDynamicConfigService +com.huaweicloud.sermant.core.service.tracing.TracingServiceImpl \ No newline at end of file diff --git a/sermant-agentcore/sermant-agentcore-core/src/test/java/com/huawei/sermant/core/service/dynamicconfig/BaseTest.java b/sermant-agentcore/sermant-agentcore-core/src/test/java/com/huaweicloud/sermant/core/service/dynamicconfig/BaseTest.java similarity index 83% rename from sermant-agentcore/sermant-agentcore-core/src/test/java/com/huawei/sermant/core/service/dynamicconfig/BaseTest.java rename to sermant-agentcore/sermant-agentcore-core/src/test/java/com/huaweicloud/sermant/core/service/dynamicconfig/BaseTest.java index f94c567895..d7449fca2d 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/test/java/com/huawei/sermant/core/service/dynamicconfig/BaseTest.java +++ b/sermant-agentcore/sermant-agentcore-core/src/test/java/com/huaweicloud/sermant/core/service/dynamicconfig/BaseTest.java @@ -14,17 +14,17 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.dynamicconfig; +package com.huaweicloud.sermant.core.service.dynamicconfig; -import com.huawei.sermant.core.common.CommonConstant; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.config.ConfigManager; -import com.huawei.sermant.core.config.common.BaseConfig; -import com.huawei.sermant.core.service.ServiceManager; -import com.huawei.sermant.core.service.send.config.BackendConfig; -import com.huawei.sermant.core.service.dynamicconfig.config.DynamicConfig; -import com.huawei.sermant.core.service.dynamicconfig.kie.config.KieDynamicConfig; -import com.huawei.sermant.core.service.heartbeat.config.HeartbeatConfig; +import com.huaweicloud.sermant.core.common.CommonConstant; +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.config.ConfigManager; +import com.huaweicloud.sermant.core.config.common.BaseConfig; +import com.huaweicloud.sermant.core.service.ServiceManager; +import com.huaweicloud.sermant.core.service.send.config.BackendConfig; +import com.huaweicloud.sermant.core.service.dynamicconfig.config.DynamicConfig; +import com.huaweicloud.sermant.core.service.dynamicconfig.kie.config.KieDynamicConfig; +import com.huaweicloud.sermant.core.service.heartbeat.config.HeartbeatConfig; import org.junit.Assert; import org.junit.BeforeClass; diff --git a/sermant-agentcore/sermant-agentcore-core/src/test/java/com/huawei/sermant/core/service/dynamicconfig/KieDynamicConfigServiceTest.java b/sermant-agentcore/sermant-agentcore-core/src/test/java/com/huaweicloud/sermant/core/service/dynamicconfig/KieDynamicConfigServiceTest.java similarity index 84% rename from sermant-agentcore/sermant-agentcore-core/src/test/java/com/huawei/sermant/core/service/dynamicconfig/KieDynamicConfigServiceTest.java rename to sermant-agentcore/sermant-agentcore-core/src/test/java/com/huaweicloud/sermant/core/service/dynamicconfig/KieDynamicConfigServiceTest.java index 0a94676acd..d805269e32 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/test/java/com/huawei/sermant/core/service/dynamicconfig/KieDynamicConfigServiceTest.java +++ b/sermant-agentcore/sermant-agentcore-core/src/test/java/com/huaweicloud/sermant/core/service/dynamicconfig/KieDynamicConfigServiceTest.java @@ -14,14 +14,14 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.dynamicconfig; +package com.huaweicloud.sermant.core.service.dynamicconfig; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.service.ServiceManager; -import com.huawei.sermant.core.service.dynamicconfig.common.DynamicConfigEvent; -import com.huawei.sermant.core.service.dynamicconfig.common.DynamicConfigListener; -import com.huawei.sermant.core.service.dynamicconfig.kie.listener.SubscriberManager; -import com.huawei.sermant.core.service.dynamicconfig.utils.LabelGroupUtils; +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.service.ServiceManager; +import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigEvent; +import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigListener; +import com.huaweicloud.sermant.core.service.dynamicconfig.kie.listener.SubscriberManager; +import com.huaweicloud.sermant.core.service.dynamicconfig.utils.LabelGroupUtils; import org.junit.Assert; import org.junit.Test; diff --git a/sermant-agentcore/sermant-agentcore-core/src/test/java/com/huawei/sermant/core/service/dynamicconfig/ZooKeeperDynamicConfigServiceTest.java b/sermant-agentcore/sermant-agentcore-core/src/test/java/com/huaweicloud/sermant/core/service/dynamicconfig/ZooKeeperDynamicConfigServiceTest.java similarity index 89% rename from sermant-agentcore/sermant-agentcore-core/src/test/java/com/huawei/sermant/core/service/dynamicconfig/ZooKeeperDynamicConfigServiceTest.java rename to sermant-agentcore/sermant-agentcore-core/src/test/java/com/huaweicloud/sermant/core/service/dynamicconfig/ZooKeeperDynamicConfigServiceTest.java index 0b1bd099e6..28d854ae0e 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/test/java/com/huawei/sermant/core/service/dynamicconfig/ZooKeeperDynamicConfigServiceTest.java +++ b/sermant-agentcore/sermant-agentcore-core/src/test/java/com/huaweicloud/sermant/core/service/dynamicconfig/ZooKeeperDynamicConfigServiceTest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.dynamicconfig; +package com.huaweicloud.sermant.core.service.dynamicconfig; import java.lang.reflect.Field; import java.net.URL; @@ -22,17 +22,17 @@ import java.util.Map; import java.util.logging.Logger; +import com.huaweicloud.sermant.core.common.CommonConstant; +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.config.ConfigManager; import org.junit.Assert; import org.junit.Before; import org.junit.Test; -import com.huawei.sermant.core.common.CommonConstant; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.config.ConfigManager; -import com.huawei.sermant.core.service.dynamicconfig.common.DynamicConfigEvent; -import com.huawei.sermant.core.service.dynamicconfig.common.DynamicConfigListener; -import com.huawei.sermant.core.service.dynamicconfig.common.DynamicConfigServiceType; -import com.huawei.sermant.core.service.dynamicconfig.config.DynamicConfig; +import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigEvent; +import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigListener; +import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigServiceType; +import com.huaweicloud.sermant.core.service.dynamicconfig.config.DynamicConfig; public class ZooKeeperDynamicConfigServiceTest { private Logger logger; diff --git a/sermant-agentcore/sermant-agentcore-core/src/test/java/com/huawei/sermant/core/service/dynamicconfig/kie/LabelGroupUtilsTest.java b/sermant-agentcore/sermant-agentcore-core/src/test/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/LabelGroupUtilsTest.java similarity index 90% rename from sermant-agentcore/sermant-agentcore-core/src/test/java/com/huawei/sermant/core/service/dynamicconfig/kie/LabelGroupUtilsTest.java rename to sermant-agentcore/sermant-agentcore-core/src/test/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/LabelGroupUtilsTest.java index 24f44ade13..89bccd650d 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/test/java/com/huawei/sermant/core/service/dynamicconfig/kie/LabelGroupUtilsTest.java +++ b/sermant-agentcore/sermant-agentcore-core/src/test/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/LabelGroupUtilsTest.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.huawei.sermant.core.service.dynamicconfig.kie; +package com.huaweicloud.sermant.core.service.dynamicconfig.kie; -import com.huawei.sermant.core.service.dynamicconfig.utils.LabelGroupUtils; +import com.huaweicloud.sermant.core.service.dynamicconfig.utils.LabelGroupUtils; import org.junit.Assert; import org.junit.Test; diff --git a/sermant-agentcore/sermant-agentcore-core/src/test/java/com/huawei/sermant/core/service/dynamicconfig/kie/PublishTest.java b/sermant-agentcore/sermant-agentcore-core/src/test/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/PublishTest.java similarity index 58% rename from sermant-agentcore/sermant-agentcore-core/src/test/java/com/huawei/sermant/core/service/dynamicconfig/kie/PublishTest.java rename to sermant-agentcore/sermant-agentcore-core/src/test/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/PublishTest.java index a0480e5d5a..030b0c37ff 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/test/java/com/huawei/sermant/core/service/dynamicconfig/kie/PublishTest.java +++ b/sermant-agentcore/sermant-agentcore-core/src/test/java/com/huaweicloud/sermant/core/service/dynamicconfig/kie/PublishTest.java @@ -1,16 +1,28 @@ /* - * Copyright (C) 2021-2021 Huawei Technologies Co., Ltd. All rights reserved. + * Copyright (C) 2021-2022 Huawei Technologies Co., Ltd. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * 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.huawei.sermant.core.service.dynamicconfig.kie; +package com.huaweicloud.sermant.core.service.dynamicconfig.kie; -import com.huawei.sermant.core.service.ServiceManager; -import com.huawei.sermant.core.service.dynamicconfig.BaseTest; -import com.huawei.sermant.core.service.dynamicconfig.DynamicConfigService; -import com.huawei.sermant.core.service.dynamicconfig.kie.client.http.DefaultHttpClient; -import com.huawei.sermant.core.service.dynamicconfig.kie.client.http.HttpResult; -import com.huawei.sermant.core.service.dynamicconfig.kie.listener.SubscriberManager; -import com.huawei.sermant.core.service.dynamicconfig.utils.LabelGroupUtils; +import com.huaweicloud.sermant.core.service.ServiceManager; +import com.huaweicloud.sermant.core.service.dynamicconfig.BaseTest; +import com.huaweicloud.sermant.core.service.dynamicconfig.DynamicConfigService; +import com.huaweicloud.sermant.core.service.dynamicconfig.kie.client.http.DefaultHttpClient; +import com.huaweicloud.sermant.core.service.dynamicconfig.kie.client.http.HttpResult; +import com.huaweicloud.sermant.core.service.dynamicconfig.kie.listener.SubscriberManager; +import com.huaweicloud.sermant.core.service.dynamicconfig.utils.LabelGroupUtils; import org.junit.Assert; import org.junit.Test; diff --git a/sermant-agentcore/sermant-agentcore-core/src/test/java/com/huawei/sermant/core/service/send/NettyClientTest.java b/sermant-agentcore/sermant-agentcore-core/src/test/java/com/huaweicloud/sermant/core/service/send/NettyClientTest.java similarity index 64% rename from sermant-agentcore/sermant-agentcore-core/src/test/java/com/huawei/sermant/core/service/send/NettyClientTest.java rename to sermant-agentcore/sermant-agentcore-core/src/test/java/com/huaweicloud/sermant/core/service/send/NettyClientTest.java index 5ef5aee3aa..ae63a96715 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/test/java/com/huawei/sermant/core/service/send/NettyClientTest.java +++ b/sermant-agentcore/sermant-agentcore-core/src/test/java/com/huaweicloud/sermant/core/service/send/NettyClientTest.java @@ -1,21 +1,24 @@ /* - * Copyright (C) 2022-2022 Huawei Technologies Co., Ltd. All rights reserved. + * Copyright (C) 2022-2022 Huawei Technologies Co., Ltd. All rights reserved. * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software 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. + * Unless required by applicable law or agreed to in writing, software + * 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.huawei.sermant.core.service.send; +package com.huaweicloud.sermant.core.service.send; import static org.mockito.Mockito.mock; -import com.huawei.sermant.core.lubanops.integration.transport.netty.pojo.Message; +import com.huaweicloud.sermant.core.service.send.netty.pojo.Message; import io.netty.channel.embedded.EmbeddedChannel; diff --git a/sermant-agentcore/sermant-agentcore-core/src/test/java/com/huawei/sermant/core/service/tracing/TracingServiceImplTest.java b/sermant-agentcore/sermant-agentcore-core/src/test/java/com/huaweicloud/sermant/core/service/tracing/TracingServiceImplTest.java similarity index 91% rename from sermant-agentcore/sermant-agentcore-core/src/test/java/com/huawei/sermant/core/service/tracing/TracingServiceImplTest.java rename to sermant-agentcore/sermant-agentcore-core/src/test/java/com/huaweicloud/sermant/core/service/tracing/TracingServiceImplTest.java index 16c07cadc2..35bd3fa68f 100644 --- a/sermant-agentcore/sermant-agentcore-core/src/test/java/com/huawei/sermant/core/service/tracing/TracingServiceImplTest.java +++ b/sermant-agentcore/sermant-agentcore-core/src/test/java/com/huaweicloud/sermant/core/service/tracing/TracingServiceImplTest.java @@ -1,26 +1,29 @@ /* * Copyright (C) 2022-2022 Huawei Technologies Co., Ltd. All rights reserved. * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software 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. + * Unless required by applicable law or agreed to in writing, software + * 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.huawei.sermant.core.service.tracing; +package com.huaweicloud.sermant.core.service.tracing; -import com.huawei.sermant.core.service.ServiceManager; -import com.huawei.sermant.core.service.send.NettyGatewayClient; -import com.huawei.sermant.core.service.send.api.GatewayClient; -import com.huawei.sermant.core.service.tracing.api.ExtractService; -import com.huawei.sermant.core.service.tracing.api.InjectService; -import com.huawei.sermant.core.service.tracing.common.SpanEvent; -import com.huawei.sermant.core.service.tracing.common.TracingRequest; -import com.huawei.sermant.core.utils.TracingUtils; +import com.huaweicloud.sermant.core.service.ServiceManager; +import com.huaweicloud.sermant.core.service.send.NettyGatewayClient; +import com.huaweicloud.sermant.core.service.send.api.GatewayClient; +import com.huaweicloud.sermant.core.service.tracing.api.ExtractService; +import com.huaweicloud.sermant.core.service.tracing.api.InjectService; +import com.huaweicloud.sermant.core.service.tracing.common.SpanEvent; +import com.huaweicloud.sermant.core.service.tracing.common.TracingRequest; +import com.huaweicloud.sermant.core.utils.TracingUtils; import org.apache.commons.lang.RandomStringUtils; import org.junit.Assert; diff --git a/sermant-agentcore/sermant-agentcore-core/config/config.properties b/sermant-agentcore/sermant-agentcore-premain/config/all/config.properties similarity index 100% rename from sermant-agentcore/sermant-agentcore-core/config/config.properties rename to sermant-agentcore/sermant-agentcore-premain/config/all/config.properties diff --git a/sermant-agentcore/sermant-agentcore-core/config/all/plugins.yaml b/sermant-agentcore/sermant-agentcore-premain/config/all/plugins.yaml similarity index 100% rename from sermant-agentcore/sermant-agentcore-core/config/all/plugins.yaml rename to sermant-agentcore/sermant-agentcore-premain/config/all/plugins.yaml diff --git a/sermant-agentcore/sermant-agentcore-core/config/all/config.properties b/sermant-agentcore/sermant-agentcore-premain/config/config.properties similarity index 100% rename from sermant-agentcore/sermant-agentcore-core/config/all/config.properties rename to sermant-agentcore/sermant-agentcore-premain/config/config.properties diff --git a/sermant-agentcore/sermant-agentcore-core/config/example/config.properties b/sermant-agentcore/sermant-agentcore-premain/config/example/config.properties similarity index 100% rename from sermant-agentcore/sermant-agentcore-core/config/example/config.properties rename to sermant-agentcore/sermant-agentcore-premain/config/example/config.properties diff --git a/sermant-agentcore/sermant-agentcore-core/config/example/plugins.yaml b/sermant-agentcore/sermant-agentcore-premain/config/example/plugins.yaml similarity index 100% rename from sermant-agentcore/sermant-agentcore-core/config/example/plugins.yaml rename to sermant-agentcore/sermant-agentcore-premain/config/example/plugins.yaml diff --git a/sermant-agentcore/sermant-agentcore-core/config/logback.xml b/sermant-agentcore/sermant-agentcore-premain/config/logback.xml similarity index 76% rename from sermant-agentcore/sermant-agentcore-core/config/logback.xml rename to sermant-agentcore/sermant-agentcore-premain/config/logback.xml index 6493b9a53d..c36f0a3af9 100644 --- a/sermant-agentcore/sermant-agentcore-core/config/logback.xml +++ b/sermant-agentcore/sermant-agentcore-premain/config/logback.xml @@ -11,8 +11,8 @@ - - + + ERROR ACCEPT DENY @@ -26,8 +26,8 @@ - - + + ${log.home_dir}/app/%d{yyyy-MM-dd}/${log.app_name}-%i.log ${log.maxHistory} ${log.maxSize} diff --git a/sermant-agentcore/sermant-agentcore-core/config/plugins.yaml b/sermant-agentcore/sermant-agentcore-premain/config/plugins.yaml similarity index 100% rename from sermant-agentcore/sermant-agentcore-core/config/plugins.yaml rename to sermant-agentcore/sermant-agentcore-premain/config/plugins.yaml diff --git a/sermant-agentcore/sermant-agentcore-premain/pom.xml b/sermant-agentcore/sermant-agentcore-premain/pom.xml index 019d4106b7..4b06336b06 100644 --- a/sermant-agentcore/sermant-agentcore-premain/pom.xml +++ b/sermant-agentcore/sermant-agentcore-premain/pom.xml @@ -10,13 +10,33 @@ ${package.agent.dir} ${sermant.name} - bootstrap.properties + bootstrap.properties config ${package.agent.dir}/config + ${package.agent.dir}/core + + agent + config.properties + plugins.yaml + logback.xml + + + example + + example + + + + all + + all + + + - com.huawei.sermant + com.huaweicloud.sermant sermant-agentcore-core provided @@ -64,7 +84,18 @@ ${config.source.dir} + ${bootstrap.config.file.name} ${config.file.name} + ${plugin.setting.name} + ${log.setting.name} + + + + ${config.source.dir}/${profile.id} + + ${config.file.name} + ${plugin.setting.name} + ${log.setting.name} @@ -80,6 +111,31 @@ 8 + + org.apache.maven.plugins + maven-dependency-plugin + 3.3.0 + + + copy + package + + copy + + + + + + + com.huaweicloud.sermant + sermant-agentcore-core + jar + true + ${agent.core.output.div} + + + + \ No newline at end of file diff --git a/sermant-agentcore/sermant-agentcore-premain/src/main/java/com/huawei/sermant/premain/AgentPremain.java b/sermant-agentcore/sermant-agentcore-premain/src/main/java/com/huawei/sermant/premain/AgentPremain.java index c09c72dee7..0842ed435f 100644 --- a/sermant-agentcore/sermant-agentcore-premain/src/main/java/com/huawei/sermant/premain/AgentPremain.java +++ b/sermant-agentcore/sermant-agentcore-premain/src/main/java/com/huawei/sermant/premain/AgentPremain.java @@ -16,7 +16,7 @@ package com.huawei.sermant.premain; -import com.huawei.sermant.core.AgentCoreEntrance; +import com.huaweicloud.sermant.core.AgentCoreEntrance; import com.huawei.sermant.premain.common.BootArgsBuilder; import com.huawei.sermant.premain.common.PathDeclarer; import com.huawei.sermant.premain.exception.DupPremainException; diff --git a/sermant-agentcore/sermant-agentcore-premain/src/main/java/com/huawei/sermant/premain/common/BootArgsBuilder.java b/sermant-agentcore/sermant-agentcore-premain/src/main/java/com/huawei/sermant/premain/common/BootArgsBuilder.java index 37349850e5..dfecc62da1 100644 --- a/sermant-agentcore/sermant-agentcore-premain/src/main/java/com/huawei/sermant/premain/common/BootArgsBuilder.java +++ b/sermant-agentcore/sermant-agentcore-premain/src/main/java/com/huawei/sermant/premain/common/BootArgsBuilder.java @@ -16,9 +16,9 @@ package com.huawei.sermant.premain.common; -import com.huawei.sermant.core.common.CommonConstant; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.utils.FieldUtils; +import com.huaweicloud.sermant.core.common.CommonConstant; +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.utils.FieldUtils; import java.io.FileInputStream; import java.io.IOException; diff --git a/sermant-agentcore/sermant-agentcore-premain/src/main/java/com/huawei/sermant/premain/common/PathDeclarer.java b/sermant-agentcore/sermant-agentcore-premain/src/main/java/com/huawei/sermant/premain/common/PathDeclarer.java index dbf85f2b26..13302d7ae8 100644 --- a/sermant-agentcore/sermant-agentcore-premain/src/main/java/com/huawei/sermant/premain/common/PathDeclarer.java +++ b/sermant-agentcore/sermant-agentcore-premain/src/main/java/com/huawei/sermant/premain/common/PathDeclarer.java @@ -16,7 +16,7 @@ package com.huawei.sermant.premain.common; -import com.huawei.sermant.core.common.CommonConstant; +import com.huaweicloud.sermant.core.common.CommonConstant; import java.io.File; diff --git a/sermant-backend/src/main/java/com/huawei/sermant/backend/service/dynamicconfig/kie/client/http/DefaultHttpClient.java b/sermant-backend/src/main/java/com/huawei/sermant/backend/service/dynamicconfig/kie/client/http/DefaultHttpClient.java index 4ff48bb90a..43fb846b10 100644 --- a/sermant-backend/src/main/java/com/huawei/sermant/backend/service/dynamicconfig/kie/client/http/DefaultHttpClient.java +++ b/sermant-backend/src/main/java/com/huawei/sermant/backend/service/dynamicconfig/kie/client/http/DefaultHttpClient.java @@ -16,8 +16,10 @@ package com.huawei.sermant.backend.service.dynamicconfig.kie.client.http; -import com.alibaba.fastjson.JSONObject; import com.huawei.sermant.backend.service.dynamicconfig.kie.listener.SubscriberManager; + +import com.alibaba.fastjson.JSONObject; + import org.apache.http.HttpEntity; import org.apache.http.HttpHeaders; import org.apache.http.HttpResponse; @@ -148,7 +150,8 @@ public HttpResult doPost(String url, Map params, RequestConfig r } @Override - public HttpResult doPost(String url, Map params, RequestConfig requestConfig, Map headers) { + public HttpResult doPost(String url, Map params, RequestConfig requestConfig, + Map headers) { HttpPost httpPost = new HttpPost(url); beforeRequest(httpPost, requestConfig, headers); addParams(httpPost, params); diff --git a/sermant-backend/src/main/java/com/huawei/sermant/backend/service/dynamicconfig/kie/client/kie/ResultHandler.java b/sermant-backend/src/main/java/com/huawei/sermant/backend/service/dynamicconfig/kie/client/kie/ResultHandler.java index ad9c5e7455..c3eba67ad0 100644 --- a/sermant-backend/src/main/java/com/huawei/sermant/backend/service/dynamicconfig/kie/client/kie/ResultHandler.java +++ b/sermant-backend/src/main/java/com/huawei/sermant/backend/service/dynamicconfig/kie/client/kie/ResultHandler.java @@ -16,8 +16,10 @@ package com.huawei.sermant.backend.service.dynamicconfig.kie.client.kie; -import com.alibaba.fastjson.JSONObject; import com.huawei.sermant.backend.service.dynamicconfig.kie.client.http.HttpResult; + +import com.alibaba.fastjson.JSONObject; + import org.apache.http.HttpStatus; import java.util.Iterator; diff --git a/sermant-example/demo-plugin/pom.xml b/sermant-example/demo-plugin/pom.xml index 667c3fd538..fac3bfef49 100644 --- a/sermant-example/demo-plugin/pom.xml +++ b/sermant-example/demo-plugin/pom.xml @@ -20,7 +20,7 @@ - com.huawei.sermant + com.huaweicloud.sermant sermant-agentcore-core provided diff --git a/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/common/DemoBeanPropertyApi.java b/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/common/DemoBeanPropertyApi.java index dfeb801788..ce502c8f4d 100644 --- a/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/common/DemoBeanPropertyApi.java +++ b/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/common/DemoBeanPropertyApi.java @@ -16,7 +16,7 @@ package com.huawei.example.demo.common; -import com.huawei.sermant.core.plugin.agent.annotations.BeanPropertyFlag; +import com.huaweicloud.sermant.core.plugin.agent.annotations.BeanPropertyFlag; /** * 测试为被增强类添加JavaBean接口,增添JavaBean属性并为之设置get,set方法 diff --git a/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/common/DemoLogger.java b/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/common/DemoLogger.java index c3cc5741a7..8fe9765254 100644 --- a/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/common/DemoLogger.java +++ b/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/common/DemoLogger.java @@ -16,7 +16,7 @@ package com.huawei.example.demo.common; -import com.huawei.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.common.LoggerFactory; import java.util.logging.Logger; diff --git a/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/config/DemoConfig.java b/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/config/DemoConfig.java index aaa1a2cbdf..bc48a9c588 100644 --- a/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/config/DemoConfig.java +++ b/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/config/DemoConfig.java @@ -16,9 +16,9 @@ package com.huawei.example.demo.config; -import com.huawei.sermant.core.config.common.ConfigFieldKey; -import com.huawei.sermant.core.config.common.ConfigTypeKey; -import com.huawei.sermant.core.plugin.config.PluginConfig; +import com.huaweicloud.sermant.core.config.common.ConfigFieldKey; +import com.huaweicloud.sermant.core.config.common.ConfigTypeKey; +import com.huaweicloud.sermant.core.plugin.config.PluginConfig; import java.util.Arrays; import java.util.List; diff --git a/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/config/DemoPojo.java b/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/config/DemoPojo.java index c593161c06..559fd32c41 100644 --- a/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/config/DemoPojo.java +++ b/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/config/DemoPojo.java @@ -16,7 +16,7 @@ package com.huawei.example.demo.config; -import com.huawei.sermant.core.config.common.ConfigFieldKey; +import com.huaweicloud.sermant.core.config.common.ConfigFieldKey; /** * 插件配置中的复杂对象示例 diff --git a/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoAnnotationDeclarer.java b/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoAnnotationDeclarer.java index 7c7a19bb7f..53277ed954 100644 --- a/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoAnnotationDeclarer.java +++ b/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoAnnotationDeclarer.java @@ -19,10 +19,11 @@ import com.huawei.example.demo.interceptor.DemoConstInterceptor; import com.huawei.example.demo.interceptor.DemoMemberInterceptor; import com.huawei.example.demo.interceptor.DemoStaticInterceptor; -import com.huawei.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; -import com.huawei.sermant.core.plugin.agent.matcher.ClassMatcher; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; + +import com.huaweicloud.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.matcher.ClassMatcher; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; /** * 通过注解方式定位到拦截点的增强定义,本示例将测试构造函数、静态方法和示例方法三种拦截点 diff --git a/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoBootstrapDeclarer.java b/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoBootstrapDeclarer.java index e5e1ac1623..90a34abb5d 100644 --- a/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoBootstrapDeclarer.java +++ b/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoBootstrapDeclarer.java @@ -19,10 +19,11 @@ import com.huawei.example.demo.interceptor.DemoConstInterceptor; import com.huawei.example.demo.interceptor.DemoMemberInterceptor; import com.huawei.example.demo.interceptor.DemoStaticInterceptor; -import com.huawei.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; -import com.huawei.sermant.core.plugin.agent.matcher.ClassMatcher; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; + +import com.huaweicloud.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.matcher.ClassMatcher; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; /** * 以Thread为例测试启动类加载器加载的类的增强情况 diff --git a/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoNameDeclarer.java b/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoNameDeclarer.java index c8cb34b8fb..5066cd4ad9 100644 --- a/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoNameDeclarer.java +++ b/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoNameDeclarer.java @@ -24,11 +24,12 @@ import com.huawei.example.demo.interceptor.DemoInterfaceInterceptor; import com.huawei.example.demo.interceptor.DemoMemberInterceptor; import com.huawei.example.demo.interceptor.DemoServiceInterceptor; -import com.huawei.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; -import com.huawei.sermant.core.plugin.agent.declarer.SuperTypeDeclarer; -import com.huawei.sermant.core.plugin.agent.matcher.ClassMatcher; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; + +import com.huaweicloud.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.SuperTypeDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.matcher.ClassMatcher; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; /** * 通过名称定位到拦截点的增强定义,本示例处理测试构造函数、静态方法和示例方法三种拦截点外,还会测试日志功能和统一配置 diff --git a/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoNameInfixDeclarer.java b/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoNameInfixDeclarer.java index 84079f6146..7a516e0d67 100644 --- a/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoNameInfixDeclarer.java +++ b/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoNameInfixDeclarer.java @@ -14,10 +14,11 @@ package com.huawei.example.demo.declarer; import com.huawei.example.demo.interceptor.DemoMemberInterceptor; -import com.huawei.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; -import com.huawei.sermant.core.plugin.agent.matcher.ClassMatcher; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; + +import com.huaweicloud.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.matcher.ClassMatcher; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; /** * 通过类名称内缀定位到拦截点的增强定义 diff --git a/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoNamePrefixDeclarer.java b/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoNamePrefixDeclarer.java index bd465a9420..3b742ff151 100644 --- a/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoNamePrefixDeclarer.java +++ b/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoNamePrefixDeclarer.java @@ -14,10 +14,11 @@ package com.huawei.example.demo.declarer; import com.huawei.example.demo.interceptor.DemoMemberInterceptor; -import com.huawei.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; -import com.huawei.sermant.core.plugin.agent.matcher.ClassMatcher; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; + +import com.huaweicloud.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.matcher.ClassMatcher; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; /** * 通过类名称前缀定位到拦截点的增强定义 diff --git a/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoNameSuffixDeclarer.java b/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoNameSuffixDeclarer.java index 8cb0814ebd..140c49efb7 100644 --- a/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoNameSuffixDeclarer.java +++ b/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoNameSuffixDeclarer.java @@ -14,10 +14,11 @@ package com.huawei.example.demo.declarer; import com.huawei.example.demo.interceptor.DemoMemberInterceptor; -import com.huawei.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; -import com.huawei.sermant.core.plugin.agent.matcher.ClassMatcher; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; + +import com.huaweicloud.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.matcher.ClassMatcher; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; /** * 通过类名称后缀定位到拦截点的增强定义 diff --git a/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoSuperTypeDeclarer.java b/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoSuperTypeDeclarer.java index 84aaca73f5..829b34f93b 100644 --- a/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoSuperTypeDeclarer.java +++ b/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoSuperTypeDeclarer.java @@ -17,10 +17,11 @@ package com.huawei.example.demo.declarer; import com.huawei.example.demo.interceptor.DemoMemberInterceptor; -import com.huawei.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; -import com.huawei.sermant.core.plugin.agent.matcher.ClassMatcher; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; + +import com.huaweicloud.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.matcher.ClassMatcher; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; /** * 通过超类方式定位到拦截点的增强定义,本示例将测试构造函数、静态方法和示例方法三种拦截点 diff --git a/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoTraceDeclarer.java b/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoTraceDeclarer.java index 7ded91045c..35d9e80e37 100644 --- a/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoTraceDeclarer.java +++ b/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/declarer/DemoTraceDeclarer.java @@ -16,10 +16,11 @@ import com.huawei.example.demo.interceptor.DemoTraceConsumerInterceptor; import com.huawei.example.demo.interceptor.DemoTraceNormalInterceptor; import com.huawei.example.demo.interceptor.DemoTraceProviderInterceptor; -import com.huawei.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; -import com.huawei.sermant.core.plugin.agent.matcher.ClassMatcher; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; + +import com.huaweicloud.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.matcher.ClassMatcher; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; /** * 用于测试链路功能的增强定义 diff --git a/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoConfigInterceptor.java b/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoConfigInterceptor.java index 89f6923ccb..436a96c3fb 100644 --- a/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoConfigInterceptor.java +++ b/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoConfigInterceptor.java @@ -18,9 +18,10 @@ import com.huawei.example.demo.common.DemoLogger; import com.huawei.example.demo.config.DemoConfig; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.plugin.agent.interceptor.AbstractInterceptor; -import com.huawei.sermant.core.plugin.config.PluginConfigManager; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.agent.interceptor.AbstractInterceptor; +import com.huaweicloud.sermant.core.plugin.config.PluginConfigManager; /** * 统一配置功能的拦截器示例,在本示例中,将展示如何在插件端获取统一配置 diff --git a/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoConstInterceptor.java b/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoConstInterceptor.java index 3a1aa2a5b0..2c3283d94c 100644 --- a/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoConstInterceptor.java +++ b/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoConstInterceptor.java @@ -17,8 +17,9 @@ package com.huawei.example.demo.interceptor; import com.huawei.example.demo.common.DemoLogger; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.plugin.agent.interceptor.AbstractInterceptor; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.agent.interceptor.AbstractInterceptor; import java.util.Locale; diff --git a/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoFieldSetInterceptor.java b/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoFieldSetInterceptor.java index 73774ac5ee..ca75b169fb 100644 --- a/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoFieldSetInterceptor.java +++ b/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoFieldSetInterceptor.java @@ -17,8 +17,9 @@ package com.huawei.example.demo.interceptor; import com.huawei.example.demo.common.DemoLogger; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.plugin.agent.interceptor.AbstractInterceptor; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.agent.interceptor.AbstractInterceptor; /** * 用于测试局部变量、成员变量和全局变量的写入和读取 diff --git a/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoInterfaceInterceptor.java b/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoInterfaceInterceptor.java index 881121fb92..610825f212 100644 --- a/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoInterfaceInterceptor.java +++ b/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoInterfaceInterceptor.java @@ -19,8 +19,9 @@ import com.huawei.example.demo.common.DemoBeanPropertyApi; import com.huawei.example.demo.common.DemoInterfaceApi; import com.huawei.example.demo.common.DemoLogger; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.plugin.agent.interceptor.AbstractInterceptor; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.agent.interceptor.AbstractInterceptor; /** * 用于测试对被增强类的接口实现 diff --git a/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoMemberInterceptor.java b/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoMemberInterceptor.java index d1c5b8c3ed..bbf8c3b173 100644 --- a/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoMemberInterceptor.java +++ b/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoMemberInterceptor.java @@ -17,8 +17,9 @@ package com.huawei.example.demo.interceptor; import com.huawei.example.demo.common.DemoLogger; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.plugin.agent.interceptor.AbstractInterceptor; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.agent.interceptor.AbstractInterceptor; import java.util.Locale; diff --git a/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoServiceInterceptor.java b/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoServiceInterceptor.java index c407c7cbf1..fc825eee0c 100644 --- a/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoServiceInterceptor.java +++ b/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoServiceInterceptor.java @@ -19,9 +19,10 @@ import com.huawei.example.demo.common.DemoLogger; import com.huawei.example.demo.service.DemoComplexService; import com.huawei.example.demo.service.DemoSimpleService; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.plugin.agent.interceptor.AbstractInterceptor; -import com.huawei.sermant.core.plugin.service.PluginServiceManager; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.agent.interceptor.AbstractInterceptor; +import com.huaweicloud.sermant.core.plugin.service.PluginServiceManager; /** * 插件服务的拦截器示例,在本示例中,将展示如何在拦截器中使用插件服务 diff --git a/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoStaticInterceptor.java b/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoStaticInterceptor.java index c987b854f5..8201a1674d 100644 --- a/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoStaticInterceptor.java +++ b/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoStaticInterceptor.java @@ -17,8 +17,9 @@ package com.huawei.example.demo.interceptor; import com.huawei.example.demo.common.DemoLogger; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.plugin.agent.interceptor.AbstractInterceptor; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.agent.interceptor.AbstractInterceptor; import java.util.Locale; diff --git a/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoTraceConsumerInterceptor.java b/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoTraceConsumerInterceptor.java index fd37f0a15d..e64ea040a7 100644 --- a/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoTraceConsumerInterceptor.java +++ b/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoTraceConsumerInterceptor.java @@ -17,15 +17,16 @@ package com.huawei.example.demo.interceptor; import com.huawei.example.demo.common.DemoLogger; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.plugin.agent.interceptor.AbstractInterceptor; -import com.huawei.sermant.core.service.ServiceManager; -import com.huawei.sermant.core.service.tracing.api.InjectService; -import com.huawei.sermant.core.service.tracing.api.TracingService; -import com.huawei.sermant.core.service.tracing.common.SpanEvent; -import com.huawei.sermant.core.service.tracing.common.SpanEventContext; -import com.huawei.sermant.core.service.tracing.common.TracingHeader; -import com.huawei.sermant.core.service.tracing.common.TracingRequest; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.agent.interceptor.AbstractInterceptor; +import com.huaweicloud.sermant.core.service.ServiceManager; +import com.huaweicloud.sermant.core.service.tracing.api.InjectService; +import com.huaweicloud.sermant.core.service.tracing.api.TracingService; +import com.huaweicloud.sermant.core.service.tracing.common.SpanEvent; +import com.huaweicloud.sermant.core.service.tracing.common.SpanEventContext; +import com.huaweicloud.sermant.core.service.tracing.common.TracingHeader; +import com.huaweicloud.sermant.core.service.tracing.common.TracingRequest; import java.util.HashMap; import java.util.Locale; diff --git a/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoTraceNormalInterceptor.java b/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoTraceNormalInterceptor.java index c90b18579c..6ddad37042 100644 --- a/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoTraceNormalInterceptor.java +++ b/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoTraceNormalInterceptor.java @@ -14,13 +14,14 @@ package com.huawei.example.demo.interceptor; import com.huawei.example.demo.common.DemoLogger; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.plugin.agent.interceptor.AbstractInterceptor; -import com.huawei.sermant.core.service.ServiceManager; -import com.huawei.sermant.core.service.tracing.api.TracingService; -import com.huawei.sermant.core.service.tracing.common.SpanEvent; -import com.huawei.sermant.core.service.tracing.common.SpanEventContext; -import com.huawei.sermant.core.service.tracing.common.TracingRequest; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.agent.interceptor.AbstractInterceptor; +import com.huaweicloud.sermant.core.service.ServiceManager; +import com.huaweicloud.sermant.core.service.tracing.api.TracingService; +import com.huaweicloud.sermant.core.service.tracing.common.SpanEvent; +import com.huaweicloud.sermant.core.service.tracing.common.SpanEventContext; +import com.huaweicloud.sermant.core.service.tracing.common.TracingRequest; import java.util.Locale; import java.util.Optional; diff --git a/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoTraceProviderInterceptor.java b/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoTraceProviderInterceptor.java index 3691ddc9d6..1f8e463da7 100644 --- a/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoTraceProviderInterceptor.java +++ b/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/interceptor/DemoTraceProviderInterceptor.java @@ -17,15 +17,16 @@ package com.huawei.example.demo.interceptor; import com.huawei.example.demo.common.DemoLogger; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.plugin.agent.interceptor.AbstractInterceptor; -import com.huawei.sermant.core.service.ServiceManager; -import com.huawei.sermant.core.service.tracing.api.ExtractService; -import com.huawei.sermant.core.service.tracing.api.TracingService; -import com.huawei.sermant.core.service.tracing.common.SpanEvent; -import com.huawei.sermant.core.service.tracing.common.SpanEventContext; -import com.huawei.sermant.core.service.tracing.common.TracingHeader; -import com.huawei.sermant.core.service.tracing.common.TracingRequest; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.agent.interceptor.AbstractInterceptor; +import com.huaweicloud.sermant.core.service.ServiceManager; +import com.huaweicloud.sermant.core.service.tracing.api.ExtractService; +import com.huaweicloud.sermant.core.service.tracing.api.TracingService; +import com.huaweicloud.sermant.core.service.tracing.common.SpanEvent; +import com.huaweicloud.sermant.core.service.tracing.common.SpanEventContext; +import com.huaweicloud.sermant.core.service.tracing.common.TracingHeader; +import com.huaweicloud.sermant.core.service.tracing.common.TracingRequest; import java.util.HashMap; import java.util.Locale; diff --git a/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/service/DemoComplexService.java b/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/service/DemoComplexService.java index f2b10929c7..519b1a5a76 100644 --- a/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/service/DemoComplexService.java +++ b/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/service/DemoComplexService.java @@ -16,7 +16,7 @@ package com.huawei.example.demo.service; -import com.huawei.sermant.core.plugin.service.PluginService; +import com.huaweicloud.sermant.core.plugin.service.PluginService; /** * 复杂服务的接口示例 diff --git a/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/service/DemoDynaConfService.java b/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/service/DemoDynaConfService.java index ff9937f97c..c17bc349b5 100644 --- a/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/service/DemoDynaConfService.java +++ b/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/service/DemoDynaConfService.java @@ -17,11 +17,12 @@ package com.huawei.example.demo.service; import com.huawei.example.demo.common.DemoLogger; -import com.huawei.sermant.core.plugin.service.PluginService; -import com.huawei.sermant.core.service.ServiceManager; -import com.huawei.sermant.core.service.dynamicconfig.DynamicConfigService; -import com.huawei.sermant.core.service.dynamicconfig.common.DynamicConfigEvent; -import com.huawei.sermant.core.service.dynamicconfig.common.DynamicConfigListener; + +import com.huaweicloud.sermant.core.plugin.service.PluginService; +import com.huaweicloud.sermant.core.service.ServiceManager; +import com.huaweicloud.sermant.core.service.dynamicconfig.DynamicConfigService; +import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigEvent; +import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigListener; /** * 动态配置示例 diff --git a/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/service/DemoHeartBeatService.java b/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/service/DemoHeartBeatService.java index ebd60bac5f..3c0f98fb11 100644 --- a/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/service/DemoHeartBeatService.java +++ b/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/service/DemoHeartBeatService.java @@ -16,10 +16,10 @@ package com.huawei.example.demo.service; -import com.huawei.sermant.core.plugin.service.PluginService; -import com.huawei.sermant.core.service.ServiceManager; -import com.huawei.sermant.core.service.heartbeat.api.ExtInfoProvider; -import com.huawei.sermant.core.service.heartbeat.api.HeartbeatService; +import com.huaweicloud.sermant.core.plugin.service.PluginService; +import com.huaweicloud.sermant.core.service.ServiceManager; +import com.huaweicloud.sermant.core.service.heartbeat.api.ExtInfoProvider; +import com.huaweicloud.sermant.core.service.heartbeat.api.HeartbeatService; import java.util.Collections; import java.util.Map; diff --git a/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/service/DemoSimpleService.java b/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/service/DemoSimpleService.java index a317a95477..d0a4dd673a 100644 --- a/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/service/DemoSimpleService.java +++ b/sermant-example/demo-plugin/src/main/java/com/huawei/example/demo/service/DemoSimpleService.java @@ -17,8 +17,9 @@ package com.huawei.example.demo.service; import com.huawei.example.demo.common.DemoLogger; -import com.huawei.sermant.core.plugin.service.PluginService; -import com.huawei.sermant.core.plugin.service.PluginServiceManager; + +import com.huaweicloud.sermant.core.plugin.service.PluginService; +import com.huaweicloud.sermant.core.plugin.service.PluginServiceManager; /** * 示例服务,本示例中将展示如何编写一个插件服务 diff --git a/sermant-example/demo-plugin/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.agent.declarer.PluginDeclarer b/sermant-example/demo-plugin/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.agent.declarer.PluginDeclarer similarity index 100% rename from sermant-example/demo-plugin/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.agent.declarer.PluginDeclarer rename to sermant-example/demo-plugin/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.agent.declarer.PluginDeclarer diff --git a/sermant-example/demo-plugin/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.config.PluginConfig b/sermant-example/demo-plugin/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.config.PluginConfig similarity index 100% rename from sermant-example/demo-plugin/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.config.PluginConfig rename to sermant-example/demo-plugin/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.config.PluginConfig diff --git a/sermant-example/demo-plugin/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.service.PluginService b/sermant-example/demo-plugin/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.service.PluginService similarity index 100% rename from sermant-example/demo-plugin/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.service.PluginService rename to sermant-example/demo-plugin/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.service.PluginService diff --git a/sermant-example/demo-service/pom.xml b/sermant-example/demo-service/pom.xml index deca6ccc3f..d95af135a0 100644 --- a/sermant-example/demo-service/pom.xml +++ b/sermant-example/demo-service/pom.xml @@ -18,7 +18,7 @@ - com.huawei.sermant + com.huaweicloud.sermant sermant-agentcore-core provided diff --git a/sermant-example/demo-service/src/main/java/com/huawei/example/demo/config/DemoServiceConfig.java b/sermant-example/demo-service/src/main/java/com/huawei/example/demo/config/DemoServiceConfig.java index a6e5532516..39e97dadf2 100644 --- a/sermant-example/demo-service/src/main/java/com/huawei/example/demo/config/DemoServiceConfig.java +++ b/sermant-example/demo-service/src/main/java/com/huawei/example/demo/config/DemoServiceConfig.java @@ -16,7 +16,7 @@ package com.huawei.example.demo.config; -import com.huawei.sermant.core.plugin.config.PluginConfig; +import com.huaweicloud.sermant.core.plugin.config.PluginConfig; /** * 插件服务包中定义的插件配置示例,该示例较{@link com.huawei.example.demo.config.DemoConfig}较为简单 diff --git a/sermant-example/demo-service/src/main/java/com/huawei/example/demo/service/DemoComplexServiceImpl.java b/sermant-example/demo-service/src/main/java/com/huawei/example/demo/service/DemoComplexServiceImpl.java index cd2911eb96..0510b4e0b3 100644 --- a/sermant-example/demo-service/src/main/java/com/huawei/example/demo/service/DemoComplexServiceImpl.java +++ b/sermant-example/demo-service/src/main/java/com/huawei/example/demo/service/DemoComplexServiceImpl.java @@ -18,8 +18,9 @@ import com.huawei.example.demo.config.DemoConfig; import com.huawei.example.demo.config.DemoServiceConfig; -import com.huawei.sermant.core.plugin.config.PluginConfigManager; -import com.huawei.sermant.core.plugin.service.PluginServiceManager; + +import com.huaweicloud.sermant.core.plugin.config.PluginConfigManager; +import com.huaweicloud.sermant.core.plugin.service.PluginServiceManager; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/sermant-example/demo-service/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.config.PluginConfig b/sermant-example/demo-service/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.config.PluginConfig similarity index 100% rename from sermant-example/demo-service/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.config.PluginConfig rename to sermant-example/demo-service/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.config.PluginConfig diff --git a/sermant-example/demo-service/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.service.PluginService b/sermant-example/demo-service/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.service.PluginService similarity index 100% rename from sermant-example/demo-service/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.service.PluginService rename to sermant-example/demo-service/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.service.PluginService diff --git a/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/pom.xml b/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/pom.xml index f0cf3783b9..82d4212729 100644 --- a/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/pom.xml +++ b/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/pom.xml @@ -40,7 +40,7 @@ - com.huawei.sermant + com.huaweicloud.sermant sermant-agentcore-core provided diff --git a/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/ConfigHolder.java b/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/ConfigHolder.java index dcdddce2ea..5ad6f5c6ec 100644 --- a/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/ConfigHolder.java +++ b/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/ConfigHolder.java @@ -18,8 +18,9 @@ package com.huawei.dynamic.config; import com.huawei.dynamic.config.init.DynamicConfigThreadFactory; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.service.dynamicconfig.common.DynamicConfigEvent; + +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigEvent; import java.util.Collections; import java.util.HashSet; diff --git a/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/DynamicConfigSource.java b/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/DynamicConfigSource.java index fc0ba958c0..b3c6d2f728 100644 --- a/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/DynamicConfigSource.java +++ b/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/DynamicConfigSource.java @@ -19,9 +19,10 @@ import com.huawei.dynamic.config.resolver.ConfigResolver; import com.huawei.dynamic.config.resolver.DefaultConfigResolver; -import com.huawei.sermant.core.plugin.config.PluginConfigManager; -import com.huawei.sermant.core.service.dynamicconfig.common.DynamicConfigEvent; -import com.huawei.sermant.core.service.dynamicconfig.common.DynamicConfigEventType; + +import com.huaweicloud.sermant.core.plugin.config.PluginConfigManager; +import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigEvent; +import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigEventType; import java.util.ArrayList; import java.util.HashMap; diff --git a/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/DynamicConfiguration.java b/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/DynamicConfiguration.java index 0f861852e1..27ae71404e 100644 --- a/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/DynamicConfiguration.java +++ b/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/DynamicConfiguration.java @@ -17,8 +17,8 @@ package com.huawei.dynamic.config; -import com.huawei.sermant.core.config.common.ConfigTypeKey; -import com.huawei.sermant.core.plugin.config.PluginConfig; +import com.huaweicloud.sermant.core.config.common.ConfigTypeKey; +import com.huaweicloud.sermant.core.plugin.config.PluginConfig; import java.time.Duration; diff --git a/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/RefreshNotifier.java b/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/RefreshNotifier.java index 4ef276203f..ca86e0ae57 100644 --- a/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/RefreshNotifier.java +++ b/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/RefreshNotifier.java @@ -17,8 +17,8 @@ package com.huawei.dynamic.config; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.plugin.config.PluginConfigManager; +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.plugin.config.PluginConfigManager; import java.util.ArrayList; import java.util.List; diff --git a/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/declarers/SpringBootstrapListenerDeclarer.java b/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/declarers/SpringBootstrapListenerDeclarer.java index a8ce661086..4356d58369 100644 --- a/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/declarers/SpringBootstrapListenerDeclarer.java +++ b/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/declarers/SpringBootstrapListenerDeclarer.java @@ -18,10 +18,11 @@ package com.huawei.dynamic.config.declarers; import com.huawei.dynamic.config.interceptors.BootstrapListenerInterceptor; -import com.huawei.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; -import com.huawei.sermant.core.plugin.agent.matcher.ClassMatcher; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; + +import com.huaweicloud.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.matcher.ClassMatcher; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; /** * 拦截springboot启动配置监听 diff --git a/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/declarers/SpringEnvironmentDeclarer.java b/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/declarers/SpringEnvironmentDeclarer.java index ce00e9e0b9..ba02ef425b 100644 --- a/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/declarers/SpringEnvironmentDeclarer.java +++ b/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/declarers/SpringEnvironmentDeclarer.java @@ -19,10 +19,11 @@ import com.huawei.dynamic.config.interceptors.ForceEnableBootstrapInterceptor; import com.huawei.dynamic.config.interceptors.SpringEnvironmentInterceptor; -import com.huawei.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; -import com.huawei.sermant.core.plugin.agent.matcher.ClassMatcher; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; + +import com.huaweicloud.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.matcher.ClassMatcher; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; /** * 拦截springboot启动方法获取环境变量 diff --git a/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/declarers/SpringFactoriesDeclarer.java b/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/declarers/SpringFactoriesDeclarer.java index 8559cca6d3..fb1cdb38a8 100644 --- a/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/declarers/SpringFactoriesDeclarer.java +++ b/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/declarers/SpringFactoriesDeclarer.java @@ -18,10 +18,11 @@ package com.huawei.dynamic.config.declarers; import com.huawei.dynamic.config.interceptors.SpringFactoriesInterceptor; -import com.huawei.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; -import com.huawei.sermant.core.plugin.agent.matcher.ClassMatcher; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; + +import com.huaweicloud.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.matcher.ClassMatcher; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; /** * 拦截SpringFactoriesLoader注入自定配置源 diff --git a/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/init/DynamicConfigInitializer.java b/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/init/DynamicConfigInitializer.java index 83019e0fb1..3cde019d4f 100644 --- a/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/init/DynamicConfigInitializer.java +++ b/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/init/DynamicConfigInitializer.java @@ -20,14 +20,15 @@ import com.huawei.dynamic.config.DynamicConfiguration; import com.huawei.dynamic.config.entity.ClientMeta; import com.huawei.dynamic.config.subscribe.ConfigListener; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.config.ConfigManager; -import com.huawei.sermant.core.plugin.config.PluginConfigManager; -import com.huawei.sermant.core.plugin.config.ServiceMeta; -import com.huawei.sermant.core.plugin.service.PluginService; -import com.huawei.sermant.core.plugin.subscribe.ConfigSubscriber; -import com.huawei.sermant.core.plugin.subscribe.CseGroupConfigSubscriber; -import com.huawei.sermant.core.plugin.subscribe.DefaultGroupConfigSubscriber; + +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.config.ConfigManager; +import com.huaweicloud.sermant.core.plugin.config.PluginConfigManager; +import com.huaweicloud.sermant.core.plugin.config.ServiceMeta; +import com.huaweicloud.sermant.core.plugin.service.PluginService; +import com.huaweicloud.sermant.core.plugin.subscribe.ConfigSubscriber; +import com.huaweicloud.sermant.core.plugin.subscribe.CseGroupConfigSubscriber; +import com.huaweicloud.sermant.core.plugin.subscribe.DefaultGroupConfigSubscriber; import java.util.concurrent.atomic.AtomicBoolean; diff --git a/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/interceptors/BootstrapListenerInterceptor.java b/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/interceptors/BootstrapListenerInterceptor.java index d109d5cfd9..4103f80c32 100644 --- a/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/interceptors/BootstrapListenerInterceptor.java +++ b/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/interceptors/BootstrapListenerInterceptor.java @@ -18,7 +18,8 @@ package com.huawei.dynamic.config.interceptors; import com.huawei.dynamic.config.DynamicContext; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; /** * 通过拦截开启启动配置后的调用方法来判断是否开启启动配置, 该逻辑将在{@link SpringEnvironmentInterceptor}逻辑之前执行 diff --git a/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/interceptors/DynamicConfigSwitchSupport.java b/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/interceptors/DynamicConfigSwitchSupport.java index 59e68e4a2d..8083f98aae 100644 --- a/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/interceptors/DynamicConfigSwitchSupport.java +++ b/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/interceptors/DynamicConfigSwitchSupport.java @@ -18,9 +18,10 @@ package com.huawei.dynamic.config.interceptors; import com.huawei.dynamic.config.DynamicConfiguration; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.plugin.agent.interceptor.Interceptor; -import com.huawei.sermant.core.plugin.config.PluginConfigManager; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.agent.interceptor.Interceptor; +import com.huaweicloud.sermant.core.plugin.config.PluginConfigManager; /** * 动态配置开关控制 diff --git a/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/interceptors/ForceEnableBootstrapInterceptor.java b/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/interceptors/ForceEnableBootstrapInterceptor.java index 4d74c21b89..bd0baa516d 100644 --- a/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/interceptors/ForceEnableBootstrapInterceptor.java +++ b/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/interceptors/ForceEnableBootstrapInterceptor.java @@ -18,8 +18,9 @@ package com.huawei.dynamic.config.interceptors; import com.huawei.dynamic.config.DynamicConfiguration; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.plugin.config.PluginConfigManager; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.config.PluginConfigManager; import org.springframework.core.env.ConfigurableEnvironment; import org.springframework.core.env.SimpleCommandLinePropertySource; diff --git a/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/interceptors/SpringEnvironmentInterceptor.java b/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/interceptors/SpringEnvironmentInterceptor.java index 1d77ab43f4..bd557125a0 100644 --- a/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/interceptors/SpringEnvironmentInterceptor.java +++ b/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/interceptors/SpringEnvironmentInterceptor.java @@ -20,8 +20,9 @@ import com.huawei.dynamic.config.DynamicContext; import com.huawei.dynamic.config.entity.ClientMeta; import com.huawei.dynamic.config.init.DynamicConfigInitializer; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.service.ServiceManager; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.service.ServiceManager; import org.springframework.core.env.ConfigurableEnvironment; diff --git a/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/interceptors/SpringFactoriesInterceptor.java b/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/interceptors/SpringFactoriesInterceptor.java index 6789be658a..323e97f9f9 100644 --- a/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/interceptors/SpringFactoriesInterceptor.java +++ b/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/interceptors/SpringFactoriesInterceptor.java @@ -18,8 +18,9 @@ package com.huawei.dynamic.config.interceptors; import com.huawei.dynamic.config.utils.ClassUtils; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; + +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; import org.springframework.util.MultiValueMap; diff --git a/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/resolver/ConfigResolver.java b/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/resolver/ConfigResolver.java index c37387d96c..dc2562980a 100644 --- a/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/resolver/ConfigResolver.java +++ b/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/resolver/ConfigResolver.java @@ -17,7 +17,7 @@ package com.huawei.dynamic.config.resolver; -import com.huawei.sermant.core.service.dynamicconfig.common.DynamicConfigEvent; +import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigEvent; /** * 配置解析器 diff --git a/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/resolver/DefaultConfigResolver.java b/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/resolver/DefaultConfigResolver.java index 17de2c374d..5d04358206 100644 --- a/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/resolver/DefaultConfigResolver.java +++ b/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/resolver/DefaultConfigResolver.java @@ -17,10 +17,10 @@ package com.huawei.dynamic.config.resolver; -import com.huawei.sermant.core.plugin.converter.Converter; -import com.huawei.sermant.core.plugin.converter.YamlConverter; -import com.huawei.sermant.core.service.dynamicconfig.common.DynamicConfigEvent; -import com.huawei.sermant.core.utils.MapUtils; +import com.huaweicloud.sermant.core.plugin.converter.Converter; +import com.huaweicloud.sermant.core.plugin.converter.YamlConverter; +import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigEvent; +import com.huaweicloud.sermant.core.utils.MapUtils; import java.util.HashMap; import java.util.Map; diff --git a/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/subscribe/ConfigListener.java b/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/subscribe/ConfigListener.java index 44e832c48f..f50fc4c1b8 100644 --- a/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/subscribe/ConfigListener.java +++ b/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/subscribe/ConfigListener.java @@ -18,9 +18,10 @@ package com.huawei.dynamic.config.subscribe; import com.huawei.dynamic.config.ConfigHolder; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.service.dynamicconfig.common.DynamicConfigEvent; -import com.huawei.sermant.core.service.dynamicconfig.common.DynamicConfigListener; + +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigEvent; +import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigListener; import java.util.Locale; diff --git a/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/utils/ClassUtils.java b/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/utils/ClassUtils.java index 1b0d34c262..4ae252c2c2 100644 --- a/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/utils/ClassUtils.java +++ b/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/main/java/com/huawei/dynamic/config/utils/ClassUtils.java @@ -17,8 +17,8 @@ package com.huawei.dynamic.config.utils; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.utils.ClassLoaderUtils; +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.utils.ClassLoaderUtils; import java.io.IOException; import java.lang.reflect.InvocationTargetException; diff --git a/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/test/java/com/huawei/dynamic/config/ConfigHolderTest.java b/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/test/java/com/huawei/dynamic/config/ConfigHolderTest.java index 0f705d18ad..522076c3d0 100644 --- a/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/test/java/com/huawei/dynamic/config/ConfigHolderTest.java +++ b/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/test/java/com/huawei/dynamic/config/ConfigHolderTest.java @@ -19,9 +19,10 @@ import com.huawei.dynamic.config.sources.TestConfigSources; import com.huawei.dynamic.config.sources.TestLowestConfigSources; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.plugin.config.PluginConfigManager; -import com.huawei.sermant.core.service.dynamicconfig.common.DynamicConfigEvent; + +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.plugin.config.PluginConfigManager; +import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigEvent; import org.junit.Assert; import org.junit.Before; diff --git a/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/test/java/com/huawei/dynamic/config/interceptors/ForceEnableBootstrapInterceptorTest.java b/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/test/java/com/huawei/dynamic/config/interceptors/ForceEnableBootstrapInterceptorTest.java index 1161f4802e..2af2fa6407 100644 --- a/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/test/java/com/huawei/dynamic/config/interceptors/ForceEnableBootstrapInterceptorTest.java +++ b/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/test/java/com/huawei/dynamic/config/interceptors/ForceEnableBootstrapInterceptorTest.java @@ -19,8 +19,9 @@ import com.huawei.dynamic.config.DynamicConfiguration; import com.huawei.dynamic.config.sources.MockEnvironment; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.plugin.config.PluginConfigManager; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.config.PluginConfigManager; import org.junit.Assert; import org.junit.Before; diff --git a/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/test/java/com/huawei/dynamic/config/interceptors/SpringFactoriesInterceptorTest.java b/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/test/java/com/huawei/dynamic/config/interceptors/SpringFactoriesInterceptorTest.java index 3f57b842e3..c78d84a18d 100644 --- a/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/test/java/com/huawei/dynamic/config/interceptors/SpringFactoriesInterceptorTest.java +++ b/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/test/java/com/huawei/dynamic/config/interceptors/SpringFactoriesInterceptorTest.java @@ -18,8 +18,9 @@ package com.huawei.dynamic.config.interceptors; import com.huawei.dynamic.config.DynamicConfiguration; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.plugin.config.PluginConfigManager; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.config.PluginConfigManager; import org.junit.Assert; import org.junit.Before; diff --git a/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/test/java/com/huawei/dynamic/config/resolver/DefaultConfigResolverTest.java b/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/test/java/com/huawei/dynamic/config/resolver/DefaultConfigResolverTest.java index 74066a4de1..d8d02a8fd2 100644 --- a/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/test/java/com/huawei/dynamic/config/resolver/DefaultConfigResolverTest.java +++ b/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/test/java/com/huawei/dynamic/config/resolver/DefaultConfigResolverTest.java @@ -17,7 +17,7 @@ package com.huawei.dynamic.config.resolver; -import com.huawei.sermant.core.service.dynamicconfig.common.DynamicConfigEvent; +import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigEvent; import org.junit.Assert; import org.junit.Test; diff --git a/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/test/java/com/huawei/dynamic/config/source/SpringPropertyLocatorTest.java b/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/test/java/com/huawei/dynamic/config/source/SpringPropertyLocatorTest.java index 4b32349a24..37ef3fd60f 100644 --- a/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/test/java/com/huawei/dynamic/config/source/SpringPropertyLocatorTest.java +++ b/sermant-plugins/sermant-dynamic-config/dynamic-config-plugin/src/test/java/com/huawei/dynamic/config/source/SpringPropertyLocatorTest.java @@ -20,8 +20,9 @@ import com.huawei.dynamic.config.DynamicConfiguration; import com.huawei.dynamic.config.sources.MockEnvironment; import com.huawei.dynamic.config.sources.TestConfigSources; -import com.huawei.sermant.core.plugin.config.PluginConfigManager; -import com.huawei.sermant.core.service.dynamicconfig.common.DynamicConfigEvent; + +import com.huaweicloud.sermant.core.plugin.config.PluginConfigManager; +import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigEvent; import org.junit.Assert; import org.junit.Before; diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-common/pom.xml b/sermant-plugins/sermant-flowcontrol/flowcontrol-common/pom.xml index 0914104ea5..08ec01e9ec 100644 --- a/sermant-plugins/sermant-flowcontrol/flowcontrol-common/pom.xml +++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-common/pom.xml @@ -49,7 +49,7 @@ - com.huawei.sermant + com.huaweicloud.sermant sermant-agentcore-core provided diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/adapte/cse/ResolverManager.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/adapte/cse/ResolverManager.java index fbd4987d6e..ad0dab7535 100644 --- a/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/adapte/cse/ResolverManager.java +++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/adapte/cse/ResolverManager.java @@ -21,10 +21,11 @@ import com.huawei.flowcontrol.common.adapte.cse.resolver.AbstractResolver; import com.huawei.flowcontrol.common.adapte.cse.resolver.listener.ConfigUpdateListener; import com.huawei.flowcontrol.common.util.StringUtils; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.plugin.converter.Converter; -import com.huawei.sermant.core.plugin.converter.YamlConverter; -import com.huawei.sermant.core.utils.MapUtils; + +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.plugin.converter.Converter; +import com.huaweicloud.sermant.core.plugin.converter.YamlConverter; +import com.huaweicloud.sermant.core.utils.MapUtils; import java.util.HashMap; import java.util.Locale; diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/adapte/cse/match/operator/CompareOperator.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/adapte/cse/match/operator/CompareOperator.java index ac0a3d41ea..7d6bd3f0ac 100644 --- a/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/adapte/cse/match/operator/CompareOperator.java +++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/adapte/cse/match/operator/CompareOperator.java @@ -23,7 +23,8 @@ package com.huawei.flowcontrol.common.adapte.cse.match.operator; import com.huawei.flowcontrol.common.util.StringUtils; -import com.huawei.sermant.core.common.LoggerFactory; + +import com.huaweicloud.sermant.core.common.LoggerFactory; import java.util.Arrays; import java.util.HashSet; diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/adapte/cse/resolver/AbstractResolver.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/adapte/cse/resolver/AbstractResolver.java index 1e73ba701b..8516bbd8dd 100644 --- a/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/adapte/cse/resolver/AbstractResolver.java +++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/adapte/cse/resolver/AbstractResolver.java @@ -21,9 +21,10 @@ import com.huawei.flowcontrol.common.adapte.cse.resolver.listener.ConfigUpdateListener; import com.huawei.flowcontrol.common.adapte.cse.rule.Configurable; import com.huawei.flowcontrol.common.util.StringUtils; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.plugin.converter.Converter; -import com.huawei.sermant.core.plugin.converter.YamlConverter; + +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.plugin.converter.Converter; +import com.huaweicloud.sermant.core.plugin.converter.YamlConverter; import java.util.ArrayList; import java.util.HashMap; diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/adapte/cse/rule/AbstractRule.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/adapte/cse/rule/AbstractRule.java index 71faa06bd0..5991356761 100644 --- a/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/adapte/cse/rule/AbstractRule.java +++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/adapte/cse/rule/AbstractRule.java @@ -18,7 +18,8 @@ package com.huawei.flowcontrol.common.adapte.cse.rule; import com.huawei.flowcontrol.common.util.StringUtils; -import com.huawei.sermant.core.common.LoggerFactory; + +import com.huaweicloud.sermant.core.common.LoggerFactory; import java.time.DateTimeException; import java.time.Duration; diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/adapte/cse/rule/RuleDynamicConfigListener.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/adapte/cse/rule/RuleDynamicConfigListener.java index 9249a7529e..429e8a755a 100644 --- a/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/adapte/cse/rule/RuleDynamicConfigListener.java +++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/adapte/cse/rule/RuleDynamicConfigListener.java @@ -18,10 +18,11 @@ package com.huawei.flowcontrol.common.adapte.cse.rule; import com.huawei.flowcontrol.common.adapte.cse.ResolverManager; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.service.dynamicconfig.common.DynamicConfigEvent; -import com.huawei.sermant.core.service.dynamicconfig.common.DynamicConfigEventType; -import com.huawei.sermant.core.service.dynamicconfig.common.DynamicConfigListener; + +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigEvent; +import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigEventType; +import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigListener; import java.util.Collections; import java.util.Locale; diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/config/FlowControlConfig.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/config/FlowControlConfig.java index 3df1282686..a3918e8c6c 100644 --- a/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/config/FlowControlConfig.java +++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/config/FlowControlConfig.java @@ -19,8 +19,9 @@ import com.huawei.flowcontrol.common.enums.FlowFramework; import com.huawei.flowcontrol.common.enums.MetricSendWay; -import com.huawei.sermant.core.config.common.ConfigTypeKey; -import com.huawei.sermant.core.plugin.config.PluginConfig; + +import com.huaweicloud.sermant.core.config.common.ConfigTypeKey; +import com.huaweicloud.sermant.core.plugin.config.PluginConfig; /** * 流控配置类 diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/config/KafkaConnectBySslSwitch.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/config/KafkaConnectBySslSwitch.java index 69c765bee0..cac924d0e5 100644 --- a/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/config/KafkaConnectBySslSwitch.java +++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/config/KafkaConnectBySslSwitch.java @@ -17,7 +17,7 @@ package com.huawei.flowcontrol.common.config; -import com.huawei.sermant.core.plugin.config.PluginConfigManager; +import com.huaweicloud.sermant.core.plugin.config.PluginConfigManager; import java.util.Properties; diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/handler/retry/AbstractRetry.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/handler/retry/AbstractRetry.java index 249ec57c86..236954a98b 100644 --- a/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/handler/retry/AbstractRetry.java +++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/handler/retry/AbstractRetry.java @@ -19,8 +19,9 @@ import com.huawei.flowcontrol.common.config.FlowControlConfig; import com.huawei.flowcontrol.common.support.ReflectMethodCacheSupport; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.plugin.config.PluginConfigManager; + +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.plugin.config.PluginConfigManager; import java.util.ArrayList; import java.util.List; diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/init/FlowControlInitServiceImpl.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/init/FlowControlInitServiceImpl.java index cbd2f5de1d..5f670728e1 100644 --- a/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/init/FlowControlInitServiceImpl.java +++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/init/FlowControlInitServiceImpl.java @@ -21,14 +21,15 @@ import com.huawei.flowcontrol.common.adapte.cse.rule.RuleDynamicConfigListener; import com.huawei.flowcontrol.common.config.FlowControlConfig; import com.huawei.flowcontrol.common.factory.FlowControlThreadFactory; -import com.huawei.sermant.core.plugin.config.PluginConfigManager; -import com.huawei.sermant.core.plugin.service.PluginService; -import com.huawei.sermant.core.plugin.subscribe.ConfigSubscriber; -import com.huawei.sermant.core.plugin.subscribe.CseGroupConfigSubscriber; -import com.huawei.sermant.core.plugin.subscribe.DefaultGroupConfigSubscriber; -import com.huawei.sermant.core.service.ServiceManager; -import com.huawei.sermant.core.service.dynamicconfig.DynamicConfigService; -import com.huawei.sermant.core.service.dynamicconfig.kie.KieDynamicConfigService; + +import com.huaweicloud.sermant.core.plugin.config.PluginConfigManager; +import com.huaweicloud.sermant.core.plugin.service.PluginService; +import com.huaweicloud.sermant.core.plugin.subscribe.ConfigSubscriber; +import com.huaweicloud.sermant.core.plugin.subscribe.CseGroupConfigSubscriber; +import com.huaweicloud.sermant.core.plugin.subscribe.DefaultGroupConfigSubscriber; +import com.huaweicloud.sermant.core.service.ServiceManager; +import com.huaweicloud.sermant.core.service.dynamicconfig.DynamicConfigService; +import com.huaweicloud.sermant.core.service.dynamicconfig.kie.KieDynamicConfigService; import java.util.concurrent.SynchronousQueue; import java.util.concurrent.ThreadPoolExecutor; diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/metric/AbstractMetricSender.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/metric/AbstractMetricSender.java index f259c103a9..4eeddf0059 100644 --- a/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/metric/AbstractMetricSender.java +++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/metric/AbstractMetricSender.java @@ -18,9 +18,9 @@ package com.huawei.flowcontrol.common.metric; import com.huawei.flowcontrol.common.metric.provider.MetricProvider; -import com.huawei.sermant.core.common.LoggerFactory; -import com.alibaba.fastjson.JSONObject; +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.dependencies.com.alibaba.fastjson.JSONObject; import java.util.logging.Logger; diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/metric/NettyMetricSender.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/metric/NettyMetricSender.java index 64d201b998..1ec5ace4d2 100644 --- a/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/metric/NettyMetricSender.java +++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/metric/NettyMetricSender.java @@ -17,8 +17,8 @@ package com.huawei.flowcontrol.common.metric; -import com.huawei.sermant.core.service.ServiceManager; -import com.huawei.sermant.core.service.send.api.GatewayClient; +import com.huaweicloud.sermant.core.service.ServiceManager; +import com.huaweicloud.sermant.core.service.send.api.GatewayClient; import java.io.UnsupportedEncodingException; diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/util/KafkaProducerUtil.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/util/KafkaProducerUtil.java index f49f13877a..44f1910d04 100644 --- a/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/util/KafkaProducerUtil.java +++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/util/KafkaProducerUtil.java @@ -18,7 +18,8 @@ package com.huawei.flowcontrol.common.util; import com.huawei.flowcontrol.common.enums.KafkaProducerEnum; -import com.huawei.sermant.core.common.LoggerFactory; + +import com.huaweicloud.sermant.core.common.LoggerFactory; import org.apache.kafka.clients.producer.Callback; import org.apache.kafka.clients.producer.KafkaProducer; diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/util/PluginConfigUtil.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/util/PluginConfigUtil.java index dd46a0701b..5d64f9670f 100644 --- a/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/util/PluginConfigUtil.java +++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/util/PluginConfigUtil.java @@ -20,8 +20,9 @@ import com.huawei.flowcontrol.common.config.ConfigConst; import com.huawei.flowcontrol.common.config.FlowControlConfig; import com.huawei.flowcontrol.common.config.KafkaConnectBySslSwitch; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.plugin.config.PluginConfigManager; + +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.plugin.config.PluginConfigManager; import java.util.Locale; import java.util.Map; diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/util/ReflectUtils.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/util/ReflectUtils.java index ba6e9eaf76..aae30e4d39 100644 --- a/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/util/ReflectUtils.java +++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/main/java/com/huawei/flowcontrol/common/util/ReflectUtils.java @@ -17,8 +17,8 @@ package com.huawei.flowcontrol.common.util; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.utils.ClassLoaderUtils; +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.utils.ClassLoaderUtils; import java.io.IOException; import java.lang.reflect.InvocationTargetException; diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/test/java/com/huawei/flowcontrol/common/BaseTest.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/test/java/com/huawei/flowcontrol/common/BaseTest.java index bc30c810b7..a829fe63b0 100644 --- a/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/test/java/com/huawei/flowcontrol/common/BaseTest.java +++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-common/src/test/java/com/huawei/flowcontrol/common/BaseTest.java @@ -18,13 +18,14 @@ package com.huawei.flowcontrol.common; import com.huawei.flowcontrol.common.config.FlowControlConfig; -import com.huawei.sermant.core.config.ConfigManager; -import com.huawei.sermant.core.config.common.BaseConfig; -import com.huawei.sermant.core.plugin.config.ServiceMeta; -import com.huawei.sermant.core.service.ServiceManager; -import com.huawei.sermant.core.service.send.config.BackendConfig; -import com.huawei.sermant.core.service.dynamicconfig.config.DynamicConfig; -import com.huawei.sermant.core.service.heartbeat.config.HeartbeatConfig; + +import com.huaweicloud.sermant.core.config.ConfigManager; +import com.huaweicloud.sermant.core.config.common.BaseConfig; +import com.huaweicloud.sermant.core.plugin.config.ServiceMeta; +import com.huaweicloud.sermant.core.service.ServiceManager; +import com.huaweicloud.sermant.core.service.dynamicconfig.config.DynamicConfig; +import com.huaweicloud.sermant.core.service.heartbeat.config.HeartbeatConfig; +import com.huaweicloud.sermant.core.service.send.config.BackendConfig; import org.junit.BeforeClass; diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/pom.xml b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/pom.xml index d858c5dd29..836af8e3fc 100644 --- a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/pom.xml +++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/pom.xml @@ -44,7 +44,7 @@ - com.huawei.sermant + com.huaweicloud.sermant sermant-agentcore-core provided diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/AlibabaDubboInterceptor.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/AlibabaDubboInterceptor.java index 7f3accef7d..23933285cf 100644 --- a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/AlibabaDubboInterceptor.java +++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/AlibabaDubboInterceptor.java @@ -22,7 +22,8 @@ import com.huawei.flowcontrol.common.entity.FlowControlResult; import com.huawei.flowcontrol.common.util.ConvertUtils; import com.huawei.flowcontrol.service.InterceptorSupporter; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; import com.alibaba.dubbo.common.URL; import com.alibaba.dubbo.rpc.Invocation; diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/ApacheDubboInterceptor.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/ApacheDubboInterceptor.java index 7826697b98..8449dd6fca 100644 --- a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/ApacheDubboInterceptor.java +++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/ApacheDubboInterceptor.java @@ -22,7 +22,8 @@ import com.huawei.flowcontrol.common.entity.FlowControlResult; import com.huawei.flowcontrol.common.util.ConvertUtils; import com.huawei.flowcontrol.service.InterceptorSupporter; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; import org.apache.dubbo.common.URL; import org.apache.dubbo.rpc.AsyncRpcResult; diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/DispatcherServletDeclarer.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/DispatcherServletDeclarer.java index 9661cc9e78..c62e9ef42b 100644 --- a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/DispatcherServletDeclarer.java +++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/DispatcherServletDeclarer.java @@ -17,10 +17,10 @@ package com.huawei.flowcontrol; -import com.huawei.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; -import com.huawei.sermant.core.plugin.agent.matcher.ClassMatcher; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; +import com.huaweicloud.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.matcher.ClassMatcher; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; /** * HTTP拦截定义 diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/DispatcherServletInterceptor.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/DispatcherServletInterceptor.java index 238aad1ecc..d528182be3 100644 --- a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/DispatcherServletInterceptor.java +++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/DispatcherServletInterceptor.java @@ -20,7 +20,8 @@ import com.huawei.flowcontrol.common.entity.FlowControlResult; import com.huawei.flowcontrol.common.entity.HttpRequestEntity; import com.huawei.flowcontrol.service.InterceptorSupporter; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; import java.util.Collections; import java.util.Enumeration; diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/DubboDeclarer.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/DubboDeclarer.java index 7389a2d603..4d1a8f3741 100644 --- a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/DubboDeclarer.java +++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/DubboDeclarer.java @@ -17,10 +17,10 @@ package com.huawei.flowcontrol; -import com.huawei.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; -import com.huawei.sermant.core.plugin.agent.matcher.ClassMatcher; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; +import com.huaweicloud.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.matcher.ClassMatcher; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; /** * dubbo增强 apache dubbo alibaba dubbo diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/config/AlibabaDubboConfigDeclarer.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/config/AlibabaDubboConfigDeclarer.java index 5bdc3febe7..0222f6b119 100644 --- a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/config/AlibabaDubboConfigDeclarer.java +++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/config/AlibabaDubboConfigDeclarer.java @@ -17,10 +17,10 @@ package com.huawei.flowcontrol.config; -import com.huawei.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; -import com.huawei.sermant.core.plugin.agent.matcher.ClassMatcher; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; +import com.huaweicloud.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.matcher.ClassMatcher; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; /** * alibaba dubbo 初始化配置拦截 diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/config/AlibabaDubboConfigInterceptor.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/config/AlibabaDubboConfigInterceptor.java index 22d1bc70b6..c7dd2e6919 100644 --- a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/config/AlibabaDubboConfigInterceptor.java +++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/config/AlibabaDubboConfigInterceptor.java @@ -19,9 +19,10 @@ import com.huawei.flowcontrol.common.adapte.cse.constants.CseConstants; import com.huawei.flowcontrol.common.adapte.cse.entity.CseServiceMeta; import com.huawei.flowcontrol.common.config.FlowControlConfig; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.plugin.agent.interceptor.AbstractInterceptor; -import com.huawei.sermant.core.plugin.config.PluginConfigManager; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.agent.interceptor.AbstractInterceptor; +import com.huaweicloud.sermant.core.plugin.config.PluginConfigManager; /** * apache dubbo配置拦截 diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/config/ApacheDubboConfigDeclarer.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/config/ApacheDubboConfigDeclarer.java index ce7f0351fb..e318adaa1a 100644 --- a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/config/ApacheDubboConfigDeclarer.java +++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/config/ApacheDubboConfigDeclarer.java @@ -17,10 +17,10 @@ package com.huawei.flowcontrol.config; -import com.huawei.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; -import com.huawei.sermant.core.plugin.agent.matcher.ClassMatcher; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; +import com.huaweicloud.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.matcher.ClassMatcher; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; /** * apache dubbo 初始化配置拦截 diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/config/ApacheDubboConfigInterceptor.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/config/ApacheDubboConfigInterceptor.java index c466eb1560..7311e662e7 100644 --- a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/config/ApacheDubboConfigInterceptor.java +++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/config/ApacheDubboConfigInterceptor.java @@ -20,9 +20,10 @@ import com.huawei.flowcontrol.common.adapte.cse.constants.CseConstants; import com.huawei.flowcontrol.common.adapte.cse.entity.CseServiceMeta; import com.huawei.flowcontrol.common.config.FlowControlConfig; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.plugin.agent.interceptor.AbstractInterceptor; -import com.huawei.sermant.core.plugin.config.PluginConfigManager; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.agent.interceptor.AbstractInterceptor; +import com.huaweicloud.sermant.core.plugin.config.PluginConfigManager; import org.apache.dubbo.common.utils.ConfigUtils; diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/config/DubboServiceNameDeclarer.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/config/DubboServiceNameDeclarer.java index fca27e8daa..2f7e4a9135 100644 --- a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/config/DubboServiceNameDeclarer.java +++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/config/DubboServiceNameDeclarer.java @@ -17,10 +17,10 @@ package com.huawei.flowcontrol.config; -import com.huawei.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; -import com.huawei.sermant.core.plugin.agent.matcher.ClassMatcher; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; +import com.huaweicloud.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.matcher.ClassMatcher; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; /** * alibaba dubbo 初始化配置拦截 diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/config/DubboServiceNameInterceptor.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/config/DubboServiceNameInterceptor.java index 67ad1ea8c1..b38162cf68 100644 --- a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/config/DubboServiceNameInterceptor.java +++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/config/DubboServiceNameInterceptor.java @@ -19,9 +19,10 @@ import com.huawei.flowcontrol.common.adapte.cse.entity.CseServiceMeta; import com.huawei.flowcontrol.common.config.FlowControlConfig; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.plugin.agent.interceptor.AbstractInterceptor; -import com.huawei.sermant.core.plugin.config.PluginConfigManager; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.agent.interceptor.AbstractInterceptor; +import com.huaweicloud.sermant.core.plugin.config.PluginConfigManager; /** * dubbo服务拦截 diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/config/SpringBootDeclarer.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/config/SpringBootDeclarer.java index 5dc6f25a33..5edf6c611d 100644 --- a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/config/SpringBootDeclarer.java +++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/config/SpringBootDeclarer.java @@ -17,10 +17,10 @@ package com.huawei.flowcontrol.config; -import com.huawei.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; -import com.huawei.sermant.core.plugin.agent.matcher.ClassMatcher; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; +import com.huaweicloud.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.matcher.ClassMatcher; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; /** * 增强SpringBootApplication类的main方法 diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/config/SpringBootInterceptor.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/config/SpringBootInterceptor.java index 5382c444e0..252e346c4c 100644 --- a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/config/SpringBootInterceptor.java +++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/config/SpringBootInterceptor.java @@ -18,9 +18,10 @@ package com.huawei.flowcontrol.config; import com.huawei.flowcontrol.common.init.FlowControlInitServiceImpl; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.plugin.agent.interceptor.AbstractInterceptor; -import com.huawei.sermant.core.service.ServiceManager; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.agent.interceptor.AbstractInterceptor; +import com.huaweicloud.sermant.core.service.ServiceManager; /** * 结束阶段开始初始化流控配置监听 diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/config/SpringEnvironmentDeclarer.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/config/SpringEnvironmentDeclarer.java index e3162e97d7..fb99075a3b 100644 --- a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/config/SpringEnvironmentDeclarer.java +++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/config/SpringEnvironmentDeclarer.java @@ -17,10 +17,10 @@ package com.huawei.flowcontrol.config; -import com.huawei.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; -import com.huawei.sermant.core.plugin.agent.matcher.ClassMatcher; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; +import com.huaweicloud.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.matcher.ClassMatcher; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; /** * 拦截springboot启动方法获取环境变量 diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/config/SpringEnvironmentInterceptor.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/config/SpringEnvironmentInterceptor.java index 25d18d3374..51ad569d62 100644 --- a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/config/SpringEnvironmentInterceptor.java +++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/config/SpringEnvironmentInterceptor.java @@ -22,9 +22,10 @@ import com.huawei.flowcontrol.common.config.ConfigConst; import com.huawei.flowcontrol.common.config.FlowControlConfig; import com.huawei.flowcontrol.common.util.StringUtils; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.plugin.agent.interceptor.AbstractInterceptor; -import com.huawei.sermant.core.plugin.config.PluginConfigManager; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.agent.interceptor.AbstractInterceptor; +import com.huaweicloud.sermant.core.plugin.config.PluginConfigManager; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.core.env.Environment; diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/retry/AlibabaDubboInvokerDeclarer.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/retry/AlibabaDubboInvokerDeclarer.java index a5db5a4954..4f4f863b34 100644 --- a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/retry/AlibabaDubboInvokerDeclarer.java +++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/retry/AlibabaDubboInvokerDeclarer.java @@ -17,10 +17,10 @@ package com.huawei.flowcontrol.retry; -import com.huawei.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; -import com.huawei.sermant.core.plugin.agent.matcher.ClassMatcher; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; +import com.huaweicloud.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.matcher.ClassMatcher; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; /** * apche dubbo invoker请求拦截 diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/retry/AlibabaDubboInvokerInterceptor.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/retry/AlibabaDubboInvokerInterceptor.java index 5d5ff0b824..e39ab6f1ef 100644 --- a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/retry/AlibabaDubboInvokerInterceptor.java +++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/retry/AlibabaDubboInvokerInterceptor.java @@ -25,8 +25,9 @@ import com.huawei.flowcontrol.common.handler.retry.RetryContext; import com.huawei.flowcontrol.common.util.ConvertUtils; import com.huawei.flowcontrol.service.InterceptorSupporter; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; + +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; import com.alibaba.dubbo.common.URL; import com.alibaba.dubbo.rpc.Invocation; diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/retry/ApacheDubboInvokerDeclarer.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/retry/ApacheDubboInvokerDeclarer.java index 28da4a5b42..9cabb636b5 100644 --- a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/retry/ApacheDubboInvokerDeclarer.java +++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/retry/ApacheDubboInvokerDeclarer.java @@ -17,10 +17,10 @@ package com.huawei.flowcontrol.retry; -import com.huawei.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; -import com.huawei.sermant.core.plugin.agent.matcher.ClassMatcher; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; +import com.huaweicloud.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.matcher.ClassMatcher; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; /** * apche dubbo invoker请求拦截 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 12c313f9db..234e8caba3 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 @@ -25,8 +25,9 @@ import com.huawei.flowcontrol.common.handler.retry.RetryContext; import com.huawei.flowcontrol.common.util.ConvertUtils; import com.huawei.flowcontrol.service.InterceptorSupporter; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; + +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; import org.apache.dubbo.common.URL; import org.apache.dubbo.rpc.AsyncRpcResult; diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/retry/ExtensionLoaderGetExtensionInterceptor.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/retry/ExtensionLoaderGetExtensionInterceptor.java index e78438054a..d9d55c8de1 100644 --- a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/retry/ExtensionLoaderGetExtensionInterceptor.java +++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/retry/ExtensionLoaderGetExtensionInterceptor.java @@ -18,7 +18,8 @@ package com.huawei.flowcontrol.retry; import com.huawei.flowcontrol.service.InterceptorSupporter; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; /** * ExtensionLoader 拦截器, 用于注入cluster diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/retry/ExtensionLoaderInterceptor.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/retry/ExtensionLoaderInterceptor.java index 1fec606cbb..501db8034a 100644 --- a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/retry/ExtensionLoaderInterceptor.java +++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/retry/ExtensionLoaderInterceptor.java @@ -19,7 +19,8 @@ import com.huawei.flowcontrol.common.util.ReflectUtils; import com.huawei.flowcontrol.service.InterceptorSupporter; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; import java.util.Map; import java.util.Optional; diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/retry/ExtentionLoaderDeclarer.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/retry/ExtentionLoaderDeclarer.java index 194a5df333..500bc71424 100644 --- a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/retry/ExtentionLoaderDeclarer.java +++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/retry/ExtentionLoaderDeclarer.java @@ -17,12 +17,11 @@ package com.huawei.flowcontrol.retry; -import com.huawei.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; -import com.huawei.sermant.core.plugin.agent.matcher.ClassMatcher; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; - -import net.bytebuddy.matcher.ElementMatchers; +import com.huaweicloud.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.matcher.ClassMatcher; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; +import com.huaweicloud.sermant.dependencies.net.bytebuddy.matcher.ElementMatchers; /** * 拦截dubbo extensionLoader注入cluster实现重试 diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/retry/FeignRequestDeclarer.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/retry/FeignRequestDeclarer.java index 37f80dd4ab..6cb931aedc 100644 --- a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/retry/FeignRequestDeclarer.java +++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/retry/FeignRequestDeclarer.java @@ -17,10 +17,10 @@ package com.huawei.flowcontrol.retry; -import com.huawei.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; -import com.huawei.sermant.core.plugin.agent.matcher.ClassMatcher; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; +import com.huaweicloud.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.matcher.ClassMatcher; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; /** * spring http请求拦截 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 815814a3e6..4626ea7eea 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 @@ -22,8 +22,9 @@ import com.huawei.flowcontrol.common.handler.retry.Retry; import com.huawei.flowcontrol.common.handler.retry.RetryContext; import com.huawei.flowcontrol.service.InterceptorSupporter; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; + +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; import feign.Request; diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/retry/HttpRequestDeclarer.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/retry/HttpRequestDeclarer.java index 9c521a17cf..2d972974cb 100644 --- a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/retry/HttpRequestDeclarer.java +++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/retry/HttpRequestDeclarer.java @@ -17,10 +17,10 @@ package com.huawei.flowcontrol.retry; -import com.huawei.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; -import com.huawei.sermant.core.plugin.agent.matcher.ClassMatcher; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; +import com.huaweicloud.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.matcher.ClassMatcher; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; /** * spring http请求拦截 diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/retry/HttpRequestInterceptor.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/retry/HttpRequestInterceptor.java index 0f8624ca86..c2b6a21028 100644 --- a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/retry/HttpRequestInterceptor.java +++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/retry/HttpRequestInterceptor.java @@ -22,8 +22,9 @@ import com.huawei.flowcontrol.common.handler.retry.Retry; import com.huawei.flowcontrol.common.handler.retry.RetryContext; import com.huawei.flowcontrol.service.InterceptorSupporter; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; + +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; import org.springframework.http.HttpRequest; 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 b85091b44a..77b86fbcb0 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 @@ -25,7 +25,8 @@ import com.huawei.flowcontrol.common.handler.retry.RetryContext; import com.huawei.flowcontrol.common.util.ConvertUtils; import com.huawei.flowcontrol.retry.handler.RetryHandlerV2; -import com.huawei.sermant.core.common.LoggerFactory; + +import com.huaweicloud.sermant.core.common.LoggerFactory; import com.alibaba.dubbo.common.URL; import com.alibaba.dubbo.rpc.Invocation; 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 6ea0786213..0248a348c3 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 @@ -25,7 +25,8 @@ import com.huawei.flowcontrol.common.handler.retry.RetryContext; import com.huawei.flowcontrol.common.util.ConvertUtils; import com.huawei.flowcontrol.retry.handler.RetryHandlerV2; -import com.huawei.sermant.core.common.LoggerFactory; + +import com.huaweicloud.sermant.core.common.LoggerFactory; import io.github.resilience4j.decorators.Decorators; import io.github.resilience4j.decorators.Decorators.DecorateCheckedSupplier; 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 97a4bfe4d8..388ad9995e 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 @@ -27,10 +27,11 @@ import com.huawei.flowcontrol.service.rest4j.HttpRest4jService; import com.huawei.flowcontrol.service.sen.DubboSenService; import com.huawei.flowcontrol.service.sen.HttpSenService; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.plugin.agent.interceptor.Interceptor; -import com.huawei.sermant.core.plugin.config.PluginConfigManager; -import com.huawei.sermant.core.service.ServiceManager; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.agent.interceptor.Interceptor; +import com.huaweicloud.sermant.core.plugin.config.PluginConfigManager; +import com.huaweicloud.sermant.core.service.ServiceManager; import io.github.resilience4j.retry.RetryConfig; diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/service/rest4j/DubboRest4jService.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/service/rest4j/DubboRest4jService.java index 631d5b4e3b..89361b5069 100644 --- a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/service/rest4j/DubboRest4jService.java +++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/service/rest4j/DubboRest4jService.java @@ -18,7 +18,8 @@ package com.huawei.flowcontrol.service.rest4j; import com.huawei.flowcontrol.service.DubboService; -import com.huawei.sermant.core.plugin.service.PluginService; + +import com.huaweicloud.sermant.core.plugin.service.PluginService; /** * Dubbo 基于resilience4j的拦截实现 diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/service/rest4j/HttpRest4jService.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/service/rest4j/HttpRest4jService.java index c92ad93f53..a2ab646b55 100644 --- a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/service/rest4j/HttpRest4jService.java +++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/service/rest4j/HttpRest4jService.java @@ -18,7 +18,8 @@ package com.huawei.flowcontrol.service.rest4j; import com.huawei.flowcontrol.service.HttpService; -import com.huawei.sermant.core.plugin.service.PluginService; + +import com.huaweicloud.sermant.core.plugin.service.PluginService; /** * Http拦截实现 diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/service/sen/DubboSenService.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/service/sen/DubboSenService.java index aa86ba8a9c..db6f411347 100644 --- a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/service/sen/DubboSenService.java +++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/service/sen/DubboSenService.java @@ -18,7 +18,8 @@ package com.huawei.flowcontrol.service.sen; import com.huawei.flowcontrol.service.DubboService; -import com.huawei.sermant.core.plugin.service.PluginService; + +import com.huaweicloud.sermant.core.plugin.service.PluginService; /** * 基于sentinel实现 diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/service/sen/HttpSenService.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/service/sen/HttpSenService.java index 0ce207ccd5..f911711159 100644 --- a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/service/sen/HttpSenService.java +++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/java/com/huawei/flowcontrol/service/sen/HttpSenService.java @@ -18,7 +18,8 @@ package com.huawei.flowcontrol.service.sen; import com.huawei.flowcontrol.service.HttpService; -import com.huawei.sermant.core.plugin.service.PluginService; + +import com.huaweicloud.sermant.core.plugin.service.PluginService; /** * Http diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.agent.declarer.PluginDeclarer b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.agent.declarer.PluginDeclarer similarity index 100% rename from sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.agent.declarer.PluginDeclarer rename to sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.agent.declarer.PluginDeclarer diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.config.PluginConfig b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.config.PluginConfig similarity index 100% rename from sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.config.PluginConfig rename to sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.config.PluginConfig diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.service.PluginService b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.service.PluginService similarity index 100% rename from sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.service.PluginService rename to sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.service.PluginService diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/test/java/com/huawei/flowcontrol/AlibabaDubboInterceptorTest.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/test/java/com/huawei/flowcontrol/AlibabaDubboInterceptorTest.java index 50db864d35..e81fd0c91e 100644 --- a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/test/java/com/huawei/flowcontrol/AlibabaDubboInterceptorTest.java +++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/test/java/com/huawei/flowcontrol/AlibabaDubboInterceptorTest.java @@ -21,14 +21,14 @@ import com.huawei.flowcontrol.alibaba.AlibabaInvocation; import com.huawei.flowcontrol.alibaba.AlibabaInvoker; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.plugin.agent.interceptor.Interceptor; import com.alibaba.dubbo.common.URL; import com.alibaba.dubbo.monitor.support.MonitorFilter; import com.alibaba.dubbo.rpc.Invoker; import com.alibaba.dubbo.rpc.cluster.directory.StaticDirectory; import com.alibaba.dubbo.rpc.cluster.support.FailoverClusterInvoker; +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.agent.interceptor.Interceptor; import org.junit.Before; import org.junit.Test; diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/test/java/com/huawei/flowcontrol/ApacheDubboInterceptorTest.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/test/java/com/huawei/flowcontrol/ApacheDubboInterceptorTest.java index 958ada00f8..7e3b0f6ca0 100644 --- a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/test/java/com/huawei/flowcontrol/ApacheDubboInterceptorTest.java +++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/test/java/com/huawei/flowcontrol/ApacheDubboInterceptorTest.java @@ -21,8 +21,9 @@ import com.huawei.flowcontrol.apache.ApacheInvocation; import com.huawei.flowcontrol.apache.ApacheInvoker; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.plugin.agent.interceptor.Interceptor; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.agent.interceptor.Interceptor; import org.apache.dubbo.common.URL; import org.apache.dubbo.monitor.support.MonitorFilter; diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/test/java/com/huawei/flowcontrol/BaseTest.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/test/java/com/huawei/flowcontrol/BaseTest.java index 0a5e5229de..6ec6c527ed 100644 --- a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/test/java/com/huawei/flowcontrol/BaseTest.java +++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/test/java/com/huawei/flowcontrol/BaseTest.java @@ -18,13 +18,14 @@ package com.huawei.flowcontrol; import com.huawei.flowcontrol.common.config.FlowControlConfig; -import com.huawei.sermant.core.config.ConfigManager; -import com.huawei.sermant.core.config.common.BaseConfig; -import com.huawei.sermant.core.plugin.config.ServiceMeta; -import com.huawei.sermant.core.service.ServiceManager; -import com.huawei.sermant.core.service.send.config.BackendConfig; -import com.huawei.sermant.core.service.dynamicconfig.config.DynamicConfig; -import com.huawei.sermant.core.service.heartbeat.config.HeartbeatConfig; + +import com.huaweicloud.sermant.core.config.ConfigManager; +import com.huaweicloud.sermant.core.config.common.BaseConfig; +import com.huaweicloud.sermant.core.plugin.config.ServiceMeta; +import com.huaweicloud.sermant.core.service.ServiceManager; +import com.huaweicloud.sermant.core.service.dynamicconfig.config.DynamicConfig; +import com.huaweicloud.sermant.core.service.heartbeat.config.HeartbeatConfig; +import com.huaweicloud.sermant.core.service.send.config.BackendConfig; import org.junit.BeforeClass; diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/test/java/com/huawei/flowcontrol/retry/FeignRequestInterceptorTest.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/test/java/com/huawei/flowcontrol/retry/FeignRequestInterceptorTest.java index 23e6a6a4ce..8d7cf0dd6c 100644 --- a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/test/java/com/huawei/flowcontrol/retry/FeignRequestInterceptorTest.java +++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/test/java/com/huawei/flowcontrol/retry/FeignRequestInterceptorTest.java @@ -17,8 +17,8 @@ package com.huawei.flowcontrol.retry; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.plugin.agent.interceptor.Interceptor; +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.agent.interceptor.Interceptor; import feign.Client; import feign.Request; diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/test/java/com/huawei/flowcontrol/retry/HttpRequestInterceptorTest.java b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/test/java/com/huawei/flowcontrol/retry/HttpRequestInterceptorTest.java index 28e8acc70f..053c315656 100644 --- a/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/test/java/com/huawei/flowcontrol/retry/HttpRequestInterceptorTest.java +++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-plugin/src/test/java/com/huawei/flowcontrol/retry/HttpRequestInterceptorTest.java @@ -17,8 +17,8 @@ package com.huawei.flowcontrol.retry; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.plugin.agent.interceptor.Interceptor; +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.agent.interceptor.Interceptor; import org.junit.Assert; import org.junit.Before; diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-service/pom.xml b/sermant-plugins/sermant-flowcontrol/flowcontrol-service/pom.xml index df8c62e963..7b3e215825 100644 --- a/sermant-plugins/sermant-flowcontrol/flowcontrol-service/pom.xml +++ b/sermant-plugins/sermant-flowcontrol/flowcontrol-service/pom.xml @@ -38,7 +38,7 @@ - com.huawei.sermant + com.huaweicloud.sermant sermant-agentcore-core provided diff --git a/sermant-plugins/sermant-flowcontrol/flowcontrol-service/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.service.PluginService b/sermant-plugins/sermant-flowcontrol/flowcontrol-service/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.service.PluginService similarity index 100% rename from sermant-plugins/sermant-flowcontrol/flowcontrol-service/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.service.PluginService rename to sermant-plugins/sermant-flowcontrol/flowcontrol-service/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.service.PluginService diff --git a/sermant-plugins/sermant-loadbalancer/dubbo-loadbalancer-plugin/pom.xml b/sermant-plugins/sermant-loadbalancer/dubbo-loadbalancer-plugin/pom.xml index b23792faeb..7095383201 100644 --- a/sermant-plugins/sermant-loadbalancer/dubbo-loadbalancer-plugin/pom.xml +++ b/sermant-plugins/sermant-loadbalancer/dubbo-loadbalancer-plugin/pom.xml @@ -21,7 +21,7 @@ - com.huawei.sermant + com.huaweicloud.sermant sermant-agentcore-core provided diff --git a/sermant-plugins/sermant-loadbalancer/dubbo-loadbalancer-plugin/src/main/java/com/huawei/loadbalancer/declarer/UrlDeclarer.java b/sermant-plugins/sermant-loadbalancer/dubbo-loadbalancer-plugin/src/main/java/com/huawei/loadbalancer/declarer/UrlDeclarer.java index f7d0637834..f1fd0de4f3 100644 --- a/sermant-plugins/sermant-loadbalancer/dubbo-loadbalancer-plugin/src/main/java/com/huawei/loadbalancer/declarer/UrlDeclarer.java +++ b/sermant-plugins/sermant-loadbalancer/dubbo-loadbalancer-plugin/src/main/java/com/huawei/loadbalancer/declarer/UrlDeclarer.java @@ -16,10 +16,10 @@ package com.huawei.loadbalancer.declarer; -import com.huawei.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; -import com.huawei.sermant.core.plugin.agent.matcher.ClassMatcher; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; +import com.huaweicloud.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.matcher.ClassMatcher; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; /** * URL增强类 diff --git a/sermant-plugins/sermant-loadbalancer/dubbo-loadbalancer-plugin/src/main/java/com/huawei/loadbalancer/interceptor/UrlInterceptor.java b/sermant-plugins/sermant-loadbalancer/dubbo-loadbalancer-plugin/src/main/java/com/huawei/loadbalancer/interceptor/UrlInterceptor.java index 2591b61c1f..3bdd6351b3 100644 --- a/sermant-plugins/sermant-loadbalancer/dubbo-loadbalancer-plugin/src/main/java/com/huawei/loadbalancer/interceptor/UrlInterceptor.java +++ b/sermant-plugins/sermant-loadbalancer/dubbo-loadbalancer-plugin/src/main/java/com/huawei/loadbalancer/interceptor/UrlInterceptor.java @@ -17,9 +17,10 @@ package com.huawei.loadbalancer.interceptor; import com.huawei.loadbalancer.config.LoadbalancerConfig; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.plugin.agent.interceptor.AbstractInterceptor; -import com.huawei.sermant.core.plugin.config.PluginConfigManager; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.agent.interceptor.AbstractInterceptor; +import com.huaweicloud.sermant.core.plugin.config.PluginConfigManager; import java.util.Locale; import java.util.Optional; diff --git a/sermant-plugins/sermant-loadbalancer/dubbo-loadbalancer-plugin/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.agent.declarer.PluginDeclarer b/sermant-plugins/sermant-loadbalancer/dubbo-loadbalancer-plugin/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.agent.declarer.PluginDeclarer similarity index 100% rename from sermant-plugins/sermant-loadbalancer/dubbo-loadbalancer-plugin/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.agent.declarer.PluginDeclarer rename to sermant-plugins/sermant-loadbalancer/dubbo-loadbalancer-plugin/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.agent.declarer.PluginDeclarer diff --git a/sermant-plugins/sermant-loadbalancer/dubbo-loadbalancer-plugin/src/test/java/com/huawei/loadbalancer/UrlInterceptorTest.java b/sermant-plugins/sermant-loadbalancer/dubbo-loadbalancer-plugin/src/test/java/com/huawei/loadbalancer/UrlInterceptorTest.java index 4198a07924..c526eaef14 100644 --- a/sermant-plugins/sermant-loadbalancer/dubbo-loadbalancer-plugin/src/test/java/com/huawei/loadbalancer/UrlInterceptorTest.java +++ b/sermant-plugins/sermant-loadbalancer/dubbo-loadbalancer-plugin/src/test/java/com/huawei/loadbalancer/UrlInterceptorTest.java @@ -19,7 +19,8 @@ import com.huawei.loadbalancer.config.DubboLoadbalancerType; import com.huawei.loadbalancer.config.LoadbalancerConfig; import com.huawei.loadbalancer.interceptor.UrlInterceptor; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; import org.junit.Assert; import org.junit.Test; diff --git a/sermant-plugins/sermant-loadbalancer/loadbalancer-common/pom.xml b/sermant-plugins/sermant-loadbalancer/loadbalancer-common/pom.xml index c3e6c38a61..ae86543a86 100644 --- a/sermant-plugins/sermant-loadbalancer/loadbalancer-common/pom.xml +++ b/sermant-plugins/sermant-loadbalancer/loadbalancer-common/pom.xml @@ -19,7 +19,7 @@ - com.huawei.sermant + com.huaweicloud.sermant sermant-agentcore-core provided diff --git a/sermant-plugins/sermant-loadbalancer/loadbalancer-common/src/main/java/com/huawei/loadbalancer/config/LoadbalancerConfig.java b/sermant-plugins/sermant-loadbalancer/loadbalancer-common/src/main/java/com/huawei/loadbalancer/config/LoadbalancerConfig.java index 917bba85aa..82be2ea556 100644 --- a/sermant-plugins/sermant-loadbalancer/loadbalancer-common/src/main/java/com/huawei/loadbalancer/config/LoadbalancerConfig.java +++ b/sermant-plugins/sermant-loadbalancer/loadbalancer-common/src/main/java/com/huawei/loadbalancer/config/LoadbalancerConfig.java @@ -16,8 +16,8 @@ package com.huawei.loadbalancer.config; -import com.huawei.sermant.core.config.common.ConfigTypeKey; -import com.huawei.sermant.core.plugin.config.PluginConfig; +import com.huaweicloud.sermant.core.config.common.ConfigTypeKey; +import com.huaweicloud.sermant.core.plugin.config.PluginConfig; /** * 负载均衡配置 diff --git a/sermant-plugins/sermant-loadbalancer/loadbalancer-common/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.config.PluginConfig b/sermant-plugins/sermant-loadbalancer/loadbalancer-common/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.config.PluginConfig similarity index 100% rename from sermant-plugins/sermant-loadbalancer/loadbalancer-common/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.config.PluginConfig rename to sermant-plugins/sermant-loadbalancer/loadbalancer-common/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.config.PluginConfig diff --git a/sermant-plugins/sermant-loadbalancer/loadbalancer-service/pom.xml b/sermant-plugins/sermant-loadbalancer/loadbalancer-service/pom.xml index 6fff008082..36801b82d1 100644 --- a/sermant-plugins/sermant-loadbalancer/loadbalancer-service/pom.xml +++ b/sermant-plugins/sermant-loadbalancer/loadbalancer-service/pom.xml @@ -20,7 +20,7 @@ - com.huawei.sermant + com.huaweicloud.sermant sermant-agentcore-core provided diff --git a/sermant-plugins/sermant-loadbalancer/loadbalancer-service/src/main/java/com/huawei/loadbalancer/listener/LoadbalancerConfigListener.java b/sermant-plugins/sermant-loadbalancer/loadbalancer-service/src/main/java/com/huawei/loadbalancer/listener/LoadbalancerConfigListener.java index c4dd8e591e..a2f51f8e1c 100644 --- a/sermant-plugins/sermant-loadbalancer/loadbalancer-service/src/main/java/com/huawei/loadbalancer/listener/LoadbalancerConfigListener.java +++ b/sermant-plugins/sermant-loadbalancer/loadbalancer-service/src/main/java/com/huawei/loadbalancer/listener/LoadbalancerConfigListener.java @@ -20,11 +20,12 @@ import com.huawei.loadbalancer.config.LoadbalancerConfig; import com.huawei.loadbalancer.config.RibbonLoadbalancerType; import com.huawei.loadbalancer.config.SpringLoadbalancerType; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.service.dynamicconfig.common.DynamicConfigEvent; -import com.huawei.sermant.core.service.dynamicconfig.common.DynamicConfigEventType; -import com.huawei.sermant.core.service.dynamicconfig.common.DynamicConfigListener; -import com.huawei.sermant.core.utils.StringUtils; + +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigEvent; +import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigEventType; +import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigListener; +import com.huaweicloud.sermant.core.utils.StringUtils; import org.yaml.snakeyaml.Yaml; diff --git a/sermant-plugins/sermant-loadbalancer/loadbalancer-service/src/main/java/com/huawei/loadbalancer/service/LoadbalancerConfigService.java b/sermant-plugins/sermant-loadbalancer/loadbalancer-service/src/main/java/com/huawei/loadbalancer/service/LoadbalancerConfigService.java index 669ac94336..686a019703 100644 --- a/sermant-plugins/sermant-loadbalancer/loadbalancer-service/src/main/java/com/huawei/loadbalancer/service/LoadbalancerConfigService.java +++ b/sermant-plugins/sermant-loadbalancer/loadbalancer-service/src/main/java/com/huawei/loadbalancer/service/LoadbalancerConfigService.java @@ -18,10 +18,11 @@ import com.huawei.loadbalancer.config.LoadbalancerConfig; import com.huawei.loadbalancer.listener.LoadbalancerConfigListener; -import com.huawei.sermant.core.plugin.config.PluginConfigManager; -import com.huawei.sermant.core.plugin.service.PluginService; -import com.huawei.sermant.core.service.ServiceManager; -import com.huawei.sermant.core.service.dynamicconfig.DynamicConfigService; + +import com.huaweicloud.sermant.core.plugin.config.PluginConfigManager; +import com.huaweicloud.sermant.core.plugin.service.PluginService; +import com.huaweicloud.sermant.core.service.ServiceManager; +import com.huaweicloud.sermant.core.service.dynamicconfig.DynamicConfigService; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; diff --git a/sermant-plugins/sermant-loadbalancer/loadbalancer-service/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.service.PluginService b/sermant-plugins/sermant-loadbalancer/loadbalancer-service/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.service.PluginService similarity index 100% rename from sermant-plugins/sermant-loadbalancer/loadbalancer-service/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.service.PluginService rename to sermant-plugins/sermant-loadbalancer/loadbalancer-service/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.service.PluginService diff --git a/sermant-plugins/sermant-loadbalancer/spring-cloud-loadbalancer-plugin/pom.xml b/sermant-plugins/sermant-loadbalancer/spring-cloud-loadbalancer-plugin/pom.xml index f41c6fc8b5..4bb4673b27 100644 --- a/sermant-plugins/sermant-loadbalancer/spring-cloud-loadbalancer-plugin/pom.xml +++ b/sermant-plugins/sermant-loadbalancer/spring-cloud-loadbalancer-plugin/pom.xml @@ -22,7 +22,7 @@ - com.huawei.sermant + com.huaweicloud.sermant sermant-agentcore-core provided diff --git a/sermant-plugins/sermant-loadbalancer/spring-cloud-loadbalancer-plugin/src/main/java/com/huawei/loadbalancer/declarer/AbstractDeclarer.java b/sermant-plugins/sermant-loadbalancer/spring-cloud-loadbalancer-plugin/src/main/java/com/huawei/loadbalancer/declarer/AbstractDeclarer.java index 1c7b0aa861..e6acac8254 100644 --- a/sermant-plugins/sermant-loadbalancer/spring-cloud-loadbalancer-plugin/src/main/java/com/huawei/loadbalancer/declarer/AbstractDeclarer.java +++ b/sermant-plugins/sermant-loadbalancer/spring-cloud-loadbalancer-plugin/src/main/java/com/huawei/loadbalancer/declarer/AbstractDeclarer.java @@ -16,10 +16,10 @@ package com.huawei.loadbalancer.declarer; -import com.huawei.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; -import com.huawei.sermant.core.plugin.agent.matcher.ClassMatcher; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; +import com.huaweicloud.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.matcher.ClassMatcher; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; /** * 实例增强基类 diff --git a/sermant-plugins/sermant-loadbalancer/spring-cloud-loadbalancer-plugin/src/main/java/com/huawei/loadbalancer/declarer/RandomDeclarer.java b/sermant-plugins/sermant-loadbalancer/spring-cloud-loadbalancer-plugin/src/main/java/com/huawei/loadbalancer/declarer/RandomDeclarer.java index b1f38a076c..a19885201f 100644 --- a/sermant-plugins/sermant-loadbalancer/spring-cloud-loadbalancer-plugin/src/main/java/com/huawei/loadbalancer/declarer/RandomDeclarer.java +++ b/sermant-plugins/sermant-loadbalancer/spring-cloud-loadbalancer-plugin/src/main/java/com/huawei/loadbalancer/declarer/RandomDeclarer.java @@ -16,7 +16,7 @@ package com.huawei.loadbalancer.declarer; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; /** * RandomLoadBalancer增强类 diff --git a/sermant-plugins/sermant-loadbalancer/spring-cloud-loadbalancer-plugin/src/main/java/com/huawei/loadbalancer/declarer/RoundRobinDeclarer.java b/sermant-plugins/sermant-loadbalancer/spring-cloud-loadbalancer-plugin/src/main/java/com/huawei/loadbalancer/declarer/RoundRobinDeclarer.java index 4881d54e1d..9951e9bd26 100644 --- a/sermant-plugins/sermant-loadbalancer/spring-cloud-loadbalancer-plugin/src/main/java/com/huawei/loadbalancer/declarer/RoundRobinDeclarer.java +++ b/sermant-plugins/sermant-loadbalancer/spring-cloud-loadbalancer-plugin/src/main/java/com/huawei/loadbalancer/declarer/RoundRobinDeclarer.java @@ -16,9 +16,9 @@ package com.huawei.loadbalancer.declarer; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; +import com.huaweicloud.sermant.dependencies.net.bytebuddy.matcher.ElementMatchers; -import net.bytebuddy.matcher.ElementMatchers; /** * RoundRobinLoadBalancer增强类 diff --git a/sermant-plugins/sermant-loadbalancer/spring-cloud-loadbalancer-plugin/src/main/java/com/huawei/loadbalancer/interceptor/ClientFactoryInterceptor.java b/sermant-plugins/sermant-loadbalancer/spring-cloud-loadbalancer-plugin/src/main/java/com/huawei/loadbalancer/interceptor/ClientFactoryInterceptor.java index a432c2cfa3..a5f118d25a 100644 --- a/sermant-plugins/sermant-loadbalancer/spring-cloud-loadbalancer-plugin/src/main/java/com/huawei/loadbalancer/interceptor/ClientFactoryInterceptor.java +++ b/sermant-plugins/sermant-loadbalancer/spring-cloud-loadbalancer-plugin/src/main/java/com/huawei/loadbalancer/interceptor/ClientFactoryInterceptor.java @@ -19,10 +19,11 @@ import com.huawei.loadbalancer.cache.LoadbalancerCache; import com.huawei.loadbalancer.config.LoadbalancerConfig; import com.huawei.loadbalancer.config.SpringLoadbalancerType; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.plugin.agent.interceptor.AbstractInterceptor; -import com.huawei.sermant.core.plugin.config.PluginConfigManager; + +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.agent.interceptor.AbstractInterceptor; +import com.huaweicloud.sermant.core.plugin.config.PluginConfigManager; import org.springframework.beans.factory.ObjectProvider; import org.springframework.cloud.loadbalancer.core.RandomLoadBalancer; diff --git a/sermant-plugins/sermant-loadbalancer/spring-cloud-loadbalancer-plugin/src/main/java/com/huawei/loadbalancer/interceptor/LoadBalancerInterceptor.java b/sermant-plugins/sermant-loadbalancer/spring-cloud-loadbalancer-plugin/src/main/java/com/huawei/loadbalancer/interceptor/LoadBalancerInterceptor.java index 8904b01346..a2e1296f25 100644 --- a/sermant-plugins/sermant-loadbalancer/spring-cloud-loadbalancer-plugin/src/main/java/com/huawei/loadbalancer/interceptor/LoadBalancerInterceptor.java +++ b/sermant-plugins/sermant-loadbalancer/spring-cloud-loadbalancer-plugin/src/main/java/com/huawei/loadbalancer/interceptor/LoadBalancerInterceptor.java @@ -17,8 +17,9 @@ package com.huawei.loadbalancer.interceptor; import com.huawei.loadbalancer.cache.LoadbalancerCache; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.plugin.agent.interceptor.AbstractInterceptor; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.agent.interceptor.AbstractInterceptor; /** * LoadBalancer增强类 diff --git a/sermant-plugins/sermant-loadbalancer/spring-cloud-loadbalancer-plugin/src/main/java/com/huawei/loadbalancer/interceptor/RibbonLoadBalancerInterceptor.java b/sermant-plugins/sermant-loadbalancer/spring-cloud-loadbalancer-plugin/src/main/java/com/huawei/loadbalancer/interceptor/RibbonLoadBalancerInterceptor.java index 3bece4585e..5ab7fa6edf 100644 --- a/sermant-plugins/sermant-loadbalancer/spring-cloud-loadbalancer-plugin/src/main/java/com/huawei/loadbalancer/interceptor/RibbonLoadBalancerInterceptor.java +++ b/sermant-plugins/sermant-loadbalancer/spring-cloud-loadbalancer-plugin/src/main/java/com/huawei/loadbalancer/interceptor/RibbonLoadBalancerInterceptor.java @@ -18,10 +18,10 @@ import com.huawei.loadbalancer.config.LoadbalancerConfig; import com.huawei.loadbalancer.config.RibbonLoadbalancerType; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.plugin.agent.interceptor.AbstractInterceptor; -import com.huawei.sermant.core.plugin.config.PluginConfigManager; +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.agent.interceptor.AbstractInterceptor; +import com.huaweicloud.sermant.core.plugin.config.PluginConfigManager; import com.netflix.loadbalancer.AbstractLoadBalancerRule; import com.netflix.loadbalancer.AvailabilityFilteringRule; import com.netflix.loadbalancer.BaseLoadBalancer; diff --git a/sermant-plugins/sermant-loadbalancer/spring-cloud-loadbalancer-plugin/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.agent.declarer.PluginDeclarer b/sermant-plugins/sermant-loadbalancer/spring-cloud-loadbalancer-plugin/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.agent.declarer.PluginDeclarer similarity index 100% rename from sermant-plugins/sermant-loadbalancer/spring-cloud-loadbalancer-plugin/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.agent.declarer.PluginDeclarer rename to sermant-plugins/sermant-loadbalancer/spring-cloud-loadbalancer-plugin/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.agent.declarer.PluginDeclarer diff --git a/sermant-plugins/sermant-loadbalancer/spring-cloud-loadbalancer-plugin/src/test/java/com/huawei/loadbalancer/ClientFactoryInterceptorTest.java b/sermant-plugins/sermant-loadbalancer/spring-cloud-loadbalancer-plugin/src/test/java/com/huawei/loadbalancer/ClientFactoryInterceptorTest.java index 7bdc74edca..58d9ebf88c 100644 --- a/sermant-plugins/sermant-loadbalancer/spring-cloud-loadbalancer-plugin/src/test/java/com/huawei/loadbalancer/ClientFactoryInterceptorTest.java +++ b/sermant-plugins/sermant-loadbalancer/spring-cloud-loadbalancer-plugin/src/test/java/com/huawei/loadbalancer/ClientFactoryInterceptorTest.java @@ -20,7 +20,8 @@ import com.huawei.loadbalancer.config.LoadbalancerConfig; import com.huawei.loadbalancer.config.SpringLoadbalancerType; import com.huawei.loadbalancer.interceptor.ClientFactoryInterceptor; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; import org.junit.Assert; import org.junit.Test; diff --git a/sermant-plugins/sermant-loadbalancer/spring-cloud-loadbalancer-plugin/src/test/java/com/huawei/loadbalancer/LoadBalancerInterceptorTest.java b/sermant-plugins/sermant-loadbalancer/spring-cloud-loadbalancer-plugin/src/test/java/com/huawei/loadbalancer/LoadBalancerInterceptorTest.java index 392ec5e24a..f2a2c047c2 100644 --- a/sermant-plugins/sermant-loadbalancer/spring-cloud-loadbalancer-plugin/src/test/java/com/huawei/loadbalancer/LoadBalancerInterceptorTest.java +++ b/sermant-plugins/sermant-loadbalancer/spring-cloud-loadbalancer-plugin/src/test/java/com/huawei/loadbalancer/LoadBalancerInterceptorTest.java @@ -18,7 +18,8 @@ import com.huawei.loadbalancer.cache.LoadbalancerCache; import com.huawei.loadbalancer.interceptor.LoadBalancerInterceptor; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; import org.junit.Assert; import org.junit.Test; diff --git a/sermant-plugins/sermant-loadbalancer/spring-cloud-loadbalancer-plugin/src/test/java/com/huawei/loadbalancer/RibbonLoadBalancerInterceptorTest.java b/sermant-plugins/sermant-loadbalancer/spring-cloud-loadbalancer-plugin/src/test/java/com/huawei/loadbalancer/RibbonLoadBalancerInterceptorTest.java index baeafe240b..66afc56390 100644 --- a/sermant-plugins/sermant-loadbalancer/spring-cloud-loadbalancer-plugin/src/test/java/com/huawei/loadbalancer/RibbonLoadBalancerInterceptorTest.java +++ b/sermant-plugins/sermant-loadbalancer/spring-cloud-loadbalancer-plugin/src/test/java/com/huawei/loadbalancer/RibbonLoadBalancerInterceptorTest.java @@ -19,8 +19,8 @@ import com.huawei.loadbalancer.config.LoadbalancerConfig; import com.huawei.loadbalancer.config.RibbonLoadbalancerType; import com.huawei.loadbalancer.interceptor.RibbonLoadBalancerInterceptor; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; import com.netflix.loadbalancer.BaseLoadBalancer; import com.netflix.loadbalancer.RandomRule; import com.netflix.loadbalancer.RetryRule; diff --git a/sermant-plugins/sermant-luban-adaptor/pom.xml b/sermant-plugins/sermant-luban-adaptor/pom.xml index b84c4b9b47..7d42fbfae8 100644 --- a/sermant-plugins/sermant-luban-adaptor/pom.xml +++ b/sermant-plugins/sermant-luban-adaptor/pom.xml @@ -20,7 +20,7 @@ - com.huawei.sermant + com.huaweicloud.sermant sermant-agentcore-core provided diff --git a/sermant-plugins/sermant-luban-adaptor/src/main/java/com/huawei/sermant/plugins/luban/adaptor/collector/AttributeAccessImplTemplate.java b/sermant-plugins/sermant-luban-adaptor/src/main/java/com/huawei/sermant/plugins/luban/adaptor/collector/AttributeAccessImplTemplate.java index 2dfa3babb9..2a53e80233 100644 --- a/sermant-plugins/sermant-luban-adaptor/src/main/java/com/huawei/sermant/plugins/luban/adaptor/collector/AttributeAccessImplTemplate.java +++ b/sermant-plugins/sermant-luban-adaptor/src/main/java/com/huawei/sermant/plugins/luban/adaptor/collector/AttributeAccessImplTemplate.java @@ -16,9 +16,8 @@ package com.huawei.sermant.plugins.luban.adaptor.collector; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.plugin.agent.template.ImplDelegator; - +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.plugin.agent.template.ImplDelegator; import com.lubanops.apm.bootstrap.AttributeAccess; import java.lang.reflect.Field; diff --git a/sermant-plugins/sermant-luban-adaptor/src/main/java/com/huawei/sermant/plugins/luban/adaptor/collector/BufferedTransformAccess.java b/sermant-plugins/sermant-luban-adaptor/src/main/java/com/huawei/sermant/plugins/luban/adaptor/collector/BufferedTransformAccess.java index cb7fd69df6..c3a30c9e8f 100644 --- a/sermant-plugins/sermant-luban-adaptor/src/main/java/com/huawei/sermant/plugins/luban/adaptor/collector/BufferedTransformAccess.java +++ b/sermant-plugins/sermant-luban-adaptor/src/main/java/com/huawei/sermant/plugins/luban/adaptor/collector/BufferedTransformAccess.java @@ -16,8 +16,7 @@ package com.huawei.sermant.plugins.luban.adaptor.collector; -import com.huawei.sermant.core.plugin.agent.annotations.BeanPropertyFlag; - +import com.huaweicloud.sermant.core.plugin.agent.annotations.BeanPropertyFlag; import com.lubanops.apm.bootstrap.TransformAccess; /** diff --git a/sermant-plugins/sermant-luban-adaptor/src/main/java/com/huawei/sermant/plugins/luban/adaptor/collector/LubanListenerCollector.java b/sermant-plugins/sermant-luban-adaptor/src/main/java/com/huawei/sermant/plugins/luban/adaptor/collector/LubanListenerCollector.java index 4a8ea12355..2aba4054d3 100644 --- a/sermant-plugins/sermant-luban-adaptor/src/main/java/com/huawei/sermant/plugins/luban/adaptor/collector/LubanListenerCollector.java +++ b/sermant-plugins/sermant-luban-adaptor/src/main/java/com/huawei/sermant/plugins/luban/adaptor/collector/LubanListenerCollector.java @@ -16,13 +16,13 @@ package com.huawei.sermant.plugins.luban.adaptor.collector; -import com.huawei.sermant.core.plugin.adaptor.collector.AdaptorCollector; -import com.huawei.sermant.core.plugin.agent.collector.AbstractPluginCollector; -import com.huawei.sermant.core.plugin.agent.declarer.PluginDeclarer; -import com.huawei.sermant.core.plugin.agent.declarer.PluginDescription; import com.huawei.sermant.plugins.luban.adaptor.declarer.LubanPluginDeclarer; import com.huawei.sermant.plugins.luban.adaptor.declarer.LubanPluginDescription; +import com.huaweicloud.sermant.core.plugin.adaptor.collector.AdaptorCollector; +import com.huaweicloud.sermant.core.plugin.agent.collector.AbstractPluginCollector; +import com.huaweicloud.sermant.core.plugin.agent.declarer.PluginDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.PluginDescription; import com.lubanops.apm.bootstrap.Listener; import com.lubanops.apm.bootstrap.NoneNamedListener; diff --git a/sermant-plugins/sermant-luban-adaptor/src/main/java/com/huawei/sermant/plugins/luban/adaptor/declarer/InterceptorTransformer.java b/sermant-plugins/sermant-luban-adaptor/src/main/java/com/huawei/sermant/plugins/luban/adaptor/declarer/InterceptorTransformer.java index f5f9a11607..91081de6bf 100644 --- a/sermant-plugins/sermant-luban-adaptor/src/main/java/com/huawei/sermant/plugins/luban/adaptor/declarer/InterceptorTransformer.java +++ b/sermant-plugins/sermant-luban-adaptor/src/main/java/com/huawei/sermant/plugins/luban/adaptor/declarer/InterceptorTransformer.java @@ -16,9 +16,9 @@ package com.huawei.sermant.plugins.luban.adaptor.declarer; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.plugin.agent.interceptor.Interceptor; +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.agent.interceptor.Interceptor; import java.util.logging.Logger; diff --git a/sermant-plugins/sermant-luban-adaptor/src/main/java/com/huawei/sermant/plugins/luban/adaptor/declarer/LubanPluginDeclarer.java b/sermant-plugins/sermant-luban-adaptor/src/main/java/com/huawei/sermant/plugins/luban/adaptor/declarer/LubanPluginDeclarer.java index 84e282b53f..99644fe19e 100644 --- a/sermant-plugins/sermant-luban-adaptor/src/main/java/com/huawei/sermant/plugins/luban/adaptor/declarer/LubanPluginDeclarer.java +++ b/sermant-plugins/sermant-luban-adaptor/src/main/java/com/huawei/sermant/plugins/luban/adaptor/declarer/LubanPluginDeclarer.java @@ -16,16 +16,16 @@ package com.huawei.sermant.plugins.luban.adaptor.declarer; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; -import com.huawei.sermant.core.plugin.agent.declarer.PluginDeclarer; -import com.huawei.sermant.core.plugin.agent.declarer.SuperTypeDeclarer; -import com.huawei.sermant.core.plugin.agent.interceptor.Interceptor; -import com.huawei.sermant.core.plugin.agent.matcher.ClassMatcher; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; import com.huawei.sermant.plugins.luban.adaptor.collector.AttributeAccessImplTemplate; import com.huawei.sermant.plugins.luban.adaptor.collector.BufferedTransformAccess; import com.huawei.sermant.plugins.luban.adaptor.matcher.GetterSetterMatcher; +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.PluginDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.SuperTypeDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.interceptor.Interceptor; +import com.huaweicloud.sermant.core.plugin.agent.matcher.ClassMatcher; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; import com.lubanops.apm.bootstrap.AttributeAccess; import com.lubanops.apm.bootstrap.Listener; import com.lubanops.apm.bootstrap.TransformerMethod; diff --git a/sermant-plugins/sermant-luban-adaptor/src/main/java/com/huawei/sermant/plugins/luban/adaptor/declarer/LubanPluginDescription.java b/sermant-plugins/sermant-luban-adaptor/src/main/java/com/huawei/sermant/plugins/luban/adaptor/declarer/LubanPluginDescription.java index 694e77ba12..9d7b4dadfd 100644 --- a/sermant-plugins/sermant-luban-adaptor/src/main/java/com/huawei/sermant/plugins/luban/adaptor/declarer/LubanPluginDescription.java +++ b/sermant-plugins/sermant-luban-adaptor/src/main/java/com/huawei/sermant/plugins/luban/adaptor/declarer/LubanPluginDescription.java @@ -16,26 +16,25 @@ package com.huawei.sermant.plugins.luban.adaptor.declarer; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; -import com.huawei.sermant.core.plugin.agent.declarer.PluginDescription; -import com.huawei.sermant.core.plugin.agent.declarer.SuperTypeDeclarer; -import com.huawei.sermant.core.plugin.agent.interceptor.Interceptor; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; -import com.huawei.sermant.core.plugin.agent.transformer.AdviceTransformer; -import com.huawei.sermant.core.plugin.agent.transformer.BootstrapTransformer; import com.huawei.sermant.plugins.luban.adaptor.collector.BufferedTransformAccess; import com.huawei.sermant.plugins.luban.adaptor.matcher.GetterSetterMatcher; +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.PluginDescription; +import com.huaweicloud.sermant.core.plugin.agent.declarer.SuperTypeDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.interceptor.Interceptor; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; +import com.huaweicloud.sermant.core.plugin.agent.transformer.AdviceTransformer; +import com.huaweicloud.sermant.core.plugin.agent.transformer.BootstrapTransformer; +import com.huaweicloud.sermant.dependencies.net.bytebuddy.description.method.MethodDescription; +import com.huaweicloud.sermant.dependencies.net.bytebuddy.description.type.TypeDescription; +import com.huaweicloud.sermant.dependencies.net.bytebuddy.dynamic.ClassFileLocator; +import com.huaweicloud.sermant.dependencies.net.bytebuddy.dynamic.DynamicType; +import com.huaweicloud.sermant.dependencies.net.bytebuddy.matcher.ElementMatchers; +import com.huaweicloud.sermant.dependencies.net.bytebuddy.utility.JavaModule; import com.lubanops.apm.bootstrap.NoneNamedListener; -import net.bytebuddy.description.method.MethodDescription; -import net.bytebuddy.description.type.TypeDescription; -import net.bytebuddy.dynamic.ClassFileLocator; -import net.bytebuddy.dynamic.DynamicType; -import net.bytebuddy.matcher.ElementMatchers; -import net.bytebuddy.utility.JavaModule; - import java.io.IOException; import java.security.ProtectionDomain; import java.util.ArrayList; @@ -78,7 +77,7 @@ public LubanPluginDescription(NoneNamedListener noneNamedListener, ClassLoader p @Override public boolean matches(TypeDescription typeDescription, ClassLoader classLoader, JavaModule module, - Class classBeingRedefined, ProtectionDomain protectionDomain) { + Class classBeingRedefined, ProtectionDomain protectionDomain) { try { final byte[] classfileBuffer = ClassFileLocator.ForClassLoader.of(classLoader) .locate(typeDescription.getActualName()).resolve(); @@ -96,7 +95,7 @@ public boolean matches(TypeDescription typeDescription, ClassLoader classLoader, @Override public DynamicType.Builder transform(DynamicType.Builder builder, TypeDescription typeDescription, - ClassLoader classLoader, JavaModule module) { + ClassLoader classLoader, JavaModule module) { final Interceptor interceptor = InterceptorTransformer.createInterceptor(noneNamedListener.getInterceptor(), pluginClassLoader); final List interceptDeclarers = new ArrayList<>(); diff --git a/sermant-plugins/sermant-luban-adaptor/src/main/java/com/huawei/sermant/plugins/luban/adaptor/matcher/GetterSetterMatcher.java b/sermant-plugins/sermant-luban-adaptor/src/main/java/com/huawei/sermant/plugins/luban/adaptor/matcher/GetterSetterMatcher.java index 1e980755ae..03da693c64 100644 --- a/sermant-plugins/sermant-luban-adaptor/src/main/java/com/huawei/sermant/plugins/luban/adaptor/matcher/GetterSetterMatcher.java +++ b/sermant-plugins/sermant-luban-adaptor/src/main/java/com/huawei/sermant/plugins/luban/adaptor/matcher/GetterSetterMatcher.java @@ -16,11 +16,11 @@ package com.huawei.sermant.plugins.luban.adaptor.matcher; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; -import net.bytebuddy.description.method.MethodDescription; -import net.bytebuddy.description.type.TypeDefinition; -import net.bytebuddy.matcher.ElementMatchers; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; +import com.huaweicloud.sermant.dependencies.net.bytebuddy.description.method.MethodDescription; +import com.huaweicloud.sermant.dependencies.net.bytebuddy.description.type.TypeDefinition; +import com.huaweicloud.sermant.dependencies.net.bytebuddy.matcher.ElementMatchers; import java.util.Locale; diff --git a/sermant-plugins/sermant-luban-adaptor/src/main/java/com/huawei/sermant/plugins/luban/adaptor/service/LubanAdaptorService.java b/sermant-plugins/sermant-luban-adaptor/src/main/java/com/huawei/sermant/plugins/luban/adaptor/service/LubanAdaptorService.java index 1e218623d7..99d1755f92 100644 --- a/sermant-plugins/sermant-luban-adaptor/src/main/java/com/huawei/sermant/plugins/luban/adaptor/service/LubanAdaptorService.java +++ b/sermant-plugins/sermant-luban-adaptor/src/main/java/com/huawei/sermant/plugins/luban/adaptor/service/LubanAdaptorService.java @@ -16,16 +16,14 @@ package com.huawei.sermant.plugins.luban.adaptor.service; -import com.huawei.sermant.core.plugin.adaptor.service.AdaptorService; -import com.huawei.sermant.core.plugin.classloader.PluginClassLoader; - +import com.huaweicloud.sermant.core.plugin.adaptor.service.AdaptorService; +import com.huaweicloud.sermant.core.plugin.classloader.PluginClassLoader; +import com.huaweicloud.sermant.dependencies.net.bytebuddy.ByteBuddy; +import com.huaweicloud.sermant.dependencies.net.bytebuddy.agent.builder.AgentBuilder; +import com.huaweicloud.sermant.dependencies.net.bytebuddy.asm.Advice; +import com.huaweicloud.sermant.dependencies.net.bytebuddy.matcher.ElementMatchers; import com.lubanops.apm.premain.AgentPremain; -import net.bytebuddy.ByteBuddy; -import net.bytebuddy.agent.builder.AgentBuilder; -import net.bytebuddy.asm.Advice; -import net.bytebuddy.matcher.ElementMatchers; - import java.io.File; import java.io.IOException; import java.lang.instrument.Instrumentation; diff --git a/sermant-plugins/sermant-luban-adaptor/src/main/java/com/huawei/sermant/plugins/luban/adaptor/service/LubanTransformerAdviser.java b/sermant-plugins/sermant-luban-adaptor/src/main/java/com/huawei/sermant/plugins/luban/adaptor/service/LubanTransformerAdviser.java index fd8d21b402..c858dca35b 100644 --- a/sermant-plugins/sermant-luban-adaptor/src/main/java/com/huawei/sermant/plugins/luban/adaptor/service/LubanTransformerAdviser.java +++ b/sermant-plugins/sermant-luban-adaptor/src/main/java/com/huawei/sermant/plugins/luban/adaptor/service/LubanTransformerAdviser.java @@ -16,10 +16,9 @@ package com.huawei.sermant.plugins.luban.adaptor.service; +import com.huaweicloud.sermant.dependencies.net.bytebuddy.asm.Advice; import com.lubanops.apm.core.utils.AgentPath; -import net.bytebuddy.asm.Advice; - import java.lang.instrument.Instrumentation; import java.net.URL; import java.net.URLClassLoader; diff --git a/sermant-plugins/sermant-luban-adaptor/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.adaptor.collector.AdaptorCollector b/sermant-plugins/sermant-luban-adaptor/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.adaptor.collector.AdaptorCollector similarity index 100% rename from sermant-plugins/sermant-luban-adaptor/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.adaptor.collector.AdaptorCollector rename to sermant-plugins/sermant-luban-adaptor/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.adaptor.collector.AdaptorCollector diff --git a/sermant-plugins/sermant-luban-adaptor/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.adaptor.service.AdaptorService b/sermant-plugins/sermant-luban-adaptor/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.adaptor.service.AdaptorService similarity index 100% rename from sermant-plugins/sermant-luban-adaptor/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.adaptor.service.AdaptorService rename to sermant-plugins/sermant-luban-adaptor/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.adaptor.service.AdaptorService diff --git a/sermant-plugins/sermant-route/gray-dubbo-plugin/pom.xml b/sermant-plugins/sermant-route/gray-dubbo-plugin/pom.xml index 50dfe23f67..5f20dafbc4 100644 --- a/sermant-plugins/sermant-route/gray-dubbo-plugin/pom.xml +++ b/sermant-plugins/sermant-route/gray-dubbo-plugin/pom.xml @@ -24,7 +24,7 @@ - com.huawei.sermant + com.huaweicloud.sermant sermant-agentcore-core provided diff --git a/sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/java/com/huawei/gray/dubbo/declarer/AbstractDeclarer.java b/sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/java/com/huawei/gray/dubbo/declarer/AbstractDeclarer.java index c7e7ebe9ab..46db13ea9f 100644 --- a/sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/java/com/huawei/gray/dubbo/declarer/AbstractDeclarer.java +++ b/sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/java/com/huawei/gray/dubbo/declarer/AbstractDeclarer.java @@ -16,10 +16,10 @@ package com.huawei.gray.dubbo.declarer; -import com.huawei.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; -import com.huawei.sermant.core.plugin.agent.matcher.ClassMatcher; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; +import com.huaweicloud.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.matcher.ClassMatcher; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; /** * 实例增强基类 diff --git a/sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/java/com/huawei/gray/dubbo/declarer/AbstractDirectoryDeclarer.java b/sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/java/com/huawei/gray/dubbo/declarer/AbstractDirectoryDeclarer.java index 69cb84b744..005d777f1c 100644 --- a/sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/java/com/huawei/gray/dubbo/declarer/AbstractDirectoryDeclarer.java +++ b/sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/java/com/huawei/gray/dubbo/declarer/AbstractDirectoryDeclarer.java @@ -16,7 +16,7 @@ package com.huawei.gray.dubbo.declarer; -import com.huawei.sermant.core.plugin.agent.matcher.ClassMatcher; +import com.huaweicloud.sermant.core.plugin.agent.matcher.ClassMatcher; /** * 增强AbstractDirectory的子类的doList方法,筛选灰度应用的地址 diff --git a/sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/java/com/huawei/gray/dubbo/declarer/ClusterDefinition.java b/sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/java/com/huawei/gray/dubbo/declarer/ClusterDefinition.java index 58d524e27b..6d63beb85a 100644 --- a/sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/java/com/huawei/gray/dubbo/declarer/ClusterDefinition.java +++ b/sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/java/com/huawei/gray/dubbo/declarer/ClusterDefinition.java @@ -16,7 +16,7 @@ package com.huawei.gray.dubbo.declarer; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; /** * 增强ClusterUtils类的mergeUrl方法 diff --git a/sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/java/com/huawei/gray/dubbo/interceptor/AbstractDirectoryInterceptor.java b/sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/java/com/huawei/gray/dubbo/interceptor/AbstractDirectoryInterceptor.java index dd9b83329d..1588ac33b5 100644 --- a/sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/java/com/huawei/gray/dubbo/interceptor/AbstractDirectoryInterceptor.java +++ b/sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/java/com/huawei/gray/dubbo/interceptor/AbstractDirectoryInterceptor.java @@ -17,9 +17,10 @@ package com.huawei.gray.dubbo.interceptor; import com.huawei.gray.dubbo.service.AbstractDirectoryService; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.plugin.agent.interceptor.AbstractInterceptor; -import com.huawei.sermant.core.service.ServiceManager; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.agent.interceptor.AbstractInterceptor; +import com.huaweicloud.sermant.core.service.ServiceManager; /** * 增强AbstractDirectory的子类的doList方法,筛选灰度应用的地址 diff --git a/sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/java/com/huawei/gray/dubbo/interceptor/ApplicationConfigInterceptor.java b/sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/java/com/huawei/gray/dubbo/interceptor/ApplicationConfigInterceptor.java index 7505d6fcd2..f813bd79a7 100644 --- a/sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/java/com/huawei/gray/dubbo/interceptor/ApplicationConfigInterceptor.java +++ b/sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/java/com/huawei/gray/dubbo/interceptor/ApplicationConfigInterceptor.java @@ -17,9 +17,10 @@ package com.huawei.gray.dubbo.interceptor; import com.huawei.gray.dubbo.service.ApplicationConfigService; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.plugin.agent.interceptor.AbstractInterceptor; -import com.huawei.sermant.core.service.ServiceManager; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.agent.interceptor.AbstractInterceptor; +import com.huaweicloud.sermant.core.service.ServiceManager; /** * 增强ApplicationConfig类的setName方法,用来获取应用名 diff --git a/sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/java/com/huawei/gray/dubbo/interceptor/ClusterInterceptor.java b/sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/java/com/huawei/gray/dubbo/interceptor/ClusterInterceptor.java index 5f446038a7..9f57614a76 100644 --- a/sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/java/com/huawei/gray/dubbo/interceptor/ClusterInterceptor.java +++ b/sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/java/com/huawei/gray/dubbo/interceptor/ClusterInterceptor.java @@ -17,9 +17,10 @@ package com.huawei.gray.dubbo.interceptor; import com.huawei.gray.dubbo.service.ClusterService; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.plugin.agent.interceptor.AbstractInterceptor; -import com.huawei.sermant.core.service.ServiceManager; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.agent.interceptor.AbstractInterceptor; +import com.huaweicloud.sermant.core.service.ServiceManager; /** * 增强ClusterUtils类的mergeUrl方法 diff --git a/sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/java/com/huawei/gray/dubbo/interceptor/RegistrationInterceptor.java b/sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/java/com/huawei/gray/dubbo/interceptor/RegistrationInterceptor.java index 69127b77ae..209530239d 100644 --- a/sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/java/com/huawei/gray/dubbo/interceptor/RegistrationInterceptor.java +++ b/sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/java/com/huawei/gray/dubbo/interceptor/RegistrationInterceptor.java @@ -18,9 +18,10 @@ import com.huawei.gray.dubbo.service.RegistrationService; import com.huawei.gray.dubbo.utils.ReflectUtils; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.plugin.agent.interceptor.AbstractInterceptor; -import com.huawei.sermant.core.service.ServiceManager; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.agent.interceptor.AbstractInterceptor; +import com.huaweicloud.sermant.core.service.ServiceManager; import org.apache.servicecomb.service.center.client.model.Microservice; import org.apache.servicecomb.service.center.client.model.MicroserviceInstance; diff --git a/sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/java/com/huawei/gray/dubbo/service/AbstractDirectoryService.java b/sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/java/com/huawei/gray/dubbo/service/AbstractDirectoryService.java index 6fa7eb767b..5915d07cb5 100644 --- a/sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/java/com/huawei/gray/dubbo/service/AbstractDirectoryService.java +++ b/sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/java/com/huawei/gray/dubbo/service/AbstractDirectoryService.java @@ -16,7 +16,7 @@ package com.huawei.gray.dubbo.service; -import com.huawei.sermant.core.plugin.service.PluginService; +import com.huaweicloud.sermant.core.plugin.service.PluginService; /** * AbstractDirectory的service diff --git a/sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/java/com/huawei/gray/dubbo/service/ApplicationConfigService.java b/sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/java/com/huawei/gray/dubbo/service/ApplicationConfigService.java index bda948de7b..06485b9e78 100644 --- a/sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/java/com/huawei/gray/dubbo/service/ApplicationConfigService.java +++ b/sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/java/com/huawei/gray/dubbo/service/ApplicationConfigService.java @@ -16,7 +16,7 @@ package com.huawei.gray.dubbo.service; -import com.huawei.sermant.core.plugin.service.PluginService; +import com.huaweicloud.sermant.core.plugin.service.PluginService; /** * ApplicationConfig的service diff --git a/sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/java/com/huawei/gray/dubbo/service/ClusterService.java b/sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/java/com/huawei/gray/dubbo/service/ClusterService.java index 62e98eb9bd..3deec93410 100644 --- a/sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/java/com/huawei/gray/dubbo/service/ClusterService.java +++ b/sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/java/com/huawei/gray/dubbo/service/ClusterService.java @@ -16,7 +16,7 @@ package com.huawei.gray.dubbo.service; -import com.huawei.sermant.core.plugin.service.PluginService; +import com.huaweicloud.sermant.core.plugin.service.PluginService; /** * ClusterUtils的service diff --git a/sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/java/com/huawei/gray/dubbo/service/RegistrationService.java b/sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/java/com/huawei/gray/dubbo/service/RegistrationService.java index 2db0805a19..7d9b441966 100644 --- a/sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/java/com/huawei/gray/dubbo/service/RegistrationService.java +++ b/sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/java/com/huawei/gray/dubbo/service/RegistrationService.java @@ -16,7 +16,7 @@ package com.huawei.gray.dubbo.service; -import com.huawei.sermant.core.plugin.service.PluginService; +import com.huaweicloud.sermant.core.plugin.service.PluginService; /** * RegistrationInterceptor的service diff --git a/sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/java/com/huawei/gray/dubbo/utils/ReflectUtils.java b/sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/java/com/huawei/gray/dubbo/utils/ReflectUtils.java index 0f32ebfc07..97407ee185 100644 --- a/sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/java/com/huawei/gray/dubbo/utils/ReflectUtils.java +++ b/sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/java/com/huawei/gray/dubbo/utils/ReflectUtils.java @@ -16,7 +16,7 @@ package com.huawei.gray.dubbo.utils; -import com.huawei.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.common.LoggerFactory; import java.lang.reflect.AccessibleObject; import java.lang.reflect.InvocationTargetException; diff --git a/sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.agent.declarer.PluginDeclarer b/sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.agent.declarer.PluginDeclarer similarity index 100% rename from sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.agent.declarer.PluginDeclarer rename to sermant-plugins/sermant-route/gray-dubbo-plugin/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.agent.declarer.PluginDeclarer diff --git a/sermant-plugins/sermant-route/gray-dubbo-plugin/src/test/java/com/huawei/gray/dubbo/ReflectUtilsTest.java b/sermant-plugins/sermant-route/gray-dubbo-plugin/src/test/java/com/huawei/gray/dubbo/ReflectUtilsTest.java index c151499d46..6c5e5b8c0d 100644 --- a/sermant-plugins/sermant-route/gray-dubbo-plugin/src/test/java/com/huawei/gray/dubbo/ReflectUtilsTest.java +++ b/sermant-plugins/sermant-route/gray-dubbo-plugin/src/test/java/com/huawei/gray/dubbo/ReflectUtilsTest.java @@ -17,8 +17,6 @@ package com.huawei.gray.dubbo; import com.huawei.gray.dubbo.utils.ReflectUtils; -import com.huawei.sermant.core.common.CommonConstant; -import com.huawei.sermant.core.common.LoggerFactory; import com.alibaba.dubbo.common.URL; import com.alibaba.dubbo.config.ApplicationConfig; @@ -26,6 +24,8 @@ import com.alibaba.dubbo.rpc.Invoker; import com.alibaba.dubbo.rpc.Result; import com.alibaba.dubbo.rpc.RpcException; +import com.huaweicloud.sermant.core.common.CommonConstant; +import com.huaweicloud.sermant.core.common.LoggerFactory; import org.junit.Assert; import org.junit.BeforeClass; diff --git a/sermant-plugins/sermant-route/gray-dubbo-plugin/src/test/java/com/huawei/gray/dubbo/RegistrationInterceptorTest.java b/sermant-plugins/sermant-route/gray-dubbo-plugin/src/test/java/com/huawei/gray/dubbo/RegistrationInterceptorTest.java index 86e0fd8667..94143c91d1 100644 --- a/sermant-plugins/sermant-route/gray-dubbo-plugin/src/test/java/com/huawei/gray/dubbo/RegistrationInterceptorTest.java +++ b/sermant-plugins/sermant-route/gray-dubbo-plugin/src/test/java/com/huawei/gray/dubbo/RegistrationInterceptorTest.java @@ -18,11 +18,12 @@ import com.huawei.gray.dubbo.interceptor.RegistrationInterceptor; import com.huawei.gray.dubbo.service.RegistrationService; -import com.huawei.sermant.core.common.CommonConstant; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.service.BaseService; -import com.huawei.sermant.core.service.ServiceManager; + +import com.huaweicloud.sermant.core.common.CommonConstant; +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.service.BaseService; +import com.huaweicloud.sermant.core.service.ServiceManager; import org.apache.servicecomb.service.center.client.model.Microservice; import org.apache.servicecomb.service.center.client.model.MicroserviceInstance; diff --git a/sermant-plugins/sermant-route/gray-dubbo-service/pom.xml b/sermant-plugins/sermant-route/gray-dubbo-service/pom.xml index e1b6d40ce0..ce1574a5ac 100644 --- a/sermant-plugins/sermant-route/gray-dubbo-service/pom.xml +++ b/sermant-plugins/sermant-route/gray-dubbo-service/pom.xml @@ -23,7 +23,7 @@ - com.huawei.sermant + com.huaweicloud.sermant sermant-agentcore-core provided diff --git a/sermant-plugins/sermant-route/gray-dubbo-service/src/main/java/com/huawei/gray/dubbo/service/ApplicationConfigServiceImpl.java b/sermant-plugins/sermant-route/gray-dubbo-service/src/main/java/com/huawei/gray/dubbo/service/ApplicationConfigServiceImpl.java index 6334024e40..e26f872560 100644 --- a/sermant-plugins/sermant-route/gray-dubbo-service/src/main/java/com/huawei/gray/dubbo/service/ApplicationConfigServiceImpl.java +++ b/sermant-plugins/sermant-route/gray-dubbo-service/src/main/java/com/huawei/gray/dubbo/service/ApplicationConfigServiceImpl.java @@ -23,8 +23,9 @@ import com.huawei.route.common.gray.label.LabelCache; import com.huawei.route.common.gray.label.entity.CurrentTag; import com.huawei.route.common.gray.label.entity.GrayConfiguration; -import com.huawei.sermant.core.plugin.config.PluginConfigManager; -import com.huawei.sermant.core.utils.StringUtils; + +import com.huaweicloud.sermant.core.plugin.config.PluginConfigManager; +import com.huaweicloud.sermant.core.utils.StringUtils; import java.util.HashMap; import java.util.Map; diff --git a/sermant-plugins/sermant-route/gray-dubbo-service/src/main/java/com/huawei/gray/dubbo/service/ConfigServiceImpl.java b/sermant-plugins/sermant-route/gray-dubbo-service/src/main/java/com/huawei/gray/dubbo/service/ConfigServiceImpl.java index 7759ace933..4e0718952a 100644 --- a/sermant-plugins/sermant-route/gray-dubbo-service/src/main/java/com/huawei/gray/dubbo/service/ConfigServiceImpl.java +++ b/sermant-plugins/sermant-route/gray-dubbo-service/src/main/java/com/huawei/gray/dubbo/service/ConfigServiceImpl.java @@ -19,10 +19,11 @@ import com.huawei.route.common.gray.config.GrayConfig; import com.huawei.route.common.gray.constants.GrayConstant; import com.huawei.route.common.gray.listener.GrayDynamicConfigListener; -import com.huawei.sermant.core.plugin.config.PluginConfigManager; -import com.huawei.sermant.core.plugin.service.PluginService; -import com.huawei.sermant.core.service.ServiceManager; -import com.huawei.sermant.core.service.dynamicconfig.DynamicConfigService; + +import com.huaweicloud.sermant.core.plugin.config.PluginConfigManager; +import com.huaweicloud.sermant.core.plugin.service.PluginService; +import com.huaweicloud.sermant.core.service.ServiceManager; +import com.huaweicloud.sermant.core.service.dynamicconfig.DynamicConfigService; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; diff --git a/sermant-plugins/sermant-route/gray-dubbo-service/src/main/java/com/huawei/gray/dubbo/strategy/InvokerChooser.java b/sermant-plugins/sermant-route/gray-dubbo-service/src/main/java/com/huawei/gray/dubbo/strategy/InvokerChooser.java index e8d5aa2315..6277534e95 100644 --- a/sermant-plugins/sermant-route/gray-dubbo-service/src/main/java/com/huawei/gray/dubbo/strategy/InvokerChooser.java +++ b/sermant-plugins/sermant-route/gray-dubbo-service/src/main/java/com/huawei/gray/dubbo/strategy/InvokerChooser.java @@ -18,7 +18,8 @@ import com.huawei.gray.dubbo.strategy.invoker.NotMatchVersionsInvokerStrategy; import com.huawei.gray.dubbo.strategy.invoker.TargetVersionInvokerStrategy; -import com.huawei.sermant.core.utils.StringUtils; + +import com.huaweicloud.sermant.core.utils.StringUtils; import java.util.HashMap; import java.util.Map; diff --git a/sermant-plugins/sermant-route/gray-dubbo-service/src/main/java/com/huawei/gray/dubbo/strategy/TypeStrategy.java b/sermant-plugins/sermant-route/gray-dubbo-service/src/main/java/com/huawei/gray/dubbo/strategy/TypeStrategy.java index 4d0c5f106f..cfbc054b84 100644 --- a/sermant-plugins/sermant-route/gray-dubbo-service/src/main/java/com/huawei/gray/dubbo/strategy/TypeStrategy.java +++ b/sermant-plugins/sermant-route/gray-dubbo-service/src/main/java/com/huawei/gray/dubbo/strategy/TypeStrategy.java @@ -16,8 +16,8 @@ package com.huawei.gray.dubbo.strategy; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.utils.StringUtils; +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.utils.StringUtils; import java.util.Optional; import java.util.logging.Logger; diff --git a/sermant-plugins/sermant-route/gray-dubbo-service/src/main/java/com/huawei/gray/dubbo/strategy/TypeStrategyChooser.java b/sermant-plugins/sermant-route/gray-dubbo-service/src/main/java/com/huawei/gray/dubbo/strategy/TypeStrategyChooser.java index 2ccfdc477a..4efe0459e4 100644 --- a/sermant-plugins/sermant-route/gray-dubbo-service/src/main/java/com/huawei/gray/dubbo/strategy/TypeStrategyChooser.java +++ b/sermant-plugins/sermant-route/gray-dubbo-service/src/main/java/com/huawei/gray/dubbo/strategy/TypeStrategyChooser.java @@ -23,7 +23,8 @@ import com.huawei.gray.dubbo.strategy.type.MapTypeStrategy; import com.huawei.gray.dubbo.strategy.type.ObjectTypeStrategy; import com.huawei.route.common.gray.constants.GrayConstant; -import com.huawei.sermant.core.common.LoggerFactory; + +import com.huaweicloud.sermant.core.common.LoggerFactory; import java.util.HashSet; import java.util.Optional; diff --git a/sermant-plugins/sermant-route/gray-dubbo-service/src/main/java/com/huawei/gray/dubbo/strategy/type/EmptyTypeStrategy.java b/sermant-plugins/sermant-route/gray-dubbo-service/src/main/java/com/huawei/gray/dubbo/strategy/type/EmptyTypeStrategy.java index 54f9f3de7d..ee00a834e7 100644 --- a/sermant-plugins/sermant-route/gray-dubbo-service/src/main/java/com/huawei/gray/dubbo/strategy/type/EmptyTypeStrategy.java +++ b/sermant-plugins/sermant-route/gray-dubbo-service/src/main/java/com/huawei/gray/dubbo/strategy/type/EmptyTypeStrategy.java @@ -17,7 +17,8 @@ package com.huawei.gray.dubbo.strategy.type; import com.huawei.gray.dubbo.strategy.TypeStrategy; -import com.huawei.sermant.core.utils.StringUtils; + +import com.huaweicloud.sermant.core.utils.StringUtils; import java.util.Optional; diff --git a/sermant-plugins/sermant-route/gray-dubbo-service/src/main/java/com/huawei/gray/dubbo/strategy/type/EnabledTypeStrategy.java b/sermant-plugins/sermant-route/gray-dubbo-service/src/main/java/com/huawei/gray/dubbo/strategy/type/EnabledTypeStrategy.java index f49141a796..065e4d5eb0 100644 --- a/sermant-plugins/sermant-route/gray-dubbo-service/src/main/java/com/huawei/gray/dubbo/strategy/type/EnabledTypeStrategy.java +++ b/sermant-plugins/sermant-route/gray-dubbo-service/src/main/java/com/huawei/gray/dubbo/strategy/type/EnabledTypeStrategy.java @@ -18,7 +18,8 @@ import com.huawei.gray.dubbo.strategy.TypeStrategy; import com.huawei.route.common.gray.constants.GrayConstant; -import com.huawei.sermant.core.common.LoggerFactory; + +import com.huaweicloud.sermant.core.common.LoggerFactory; import java.lang.reflect.InvocationTargetException; import java.util.Optional; diff --git a/sermant-plugins/sermant-route/gray-dubbo-service/src/main/java/com/huawei/gray/dubbo/strategy/type/ObjectTypeStrategy.java b/sermant-plugins/sermant-route/gray-dubbo-service/src/main/java/com/huawei/gray/dubbo/strategy/type/ObjectTypeStrategy.java index c91464321a..53a73b5215 100644 --- a/sermant-plugins/sermant-route/gray-dubbo-service/src/main/java/com/huawei/gray/dubbo/strategy/type/ObjectTypeStrategy.java +++ b/sermant-plugins/sermant-route/gray-dubbo-service/src/main/java/com/huawei/gray/dubbo/strategy/type/ObjectTypeStrategy.java @@ -18,7 +18,8 @@ import com.huawei.gray.dubbo.strategy.TypeStrategy; import com.huawei.gray.dubbo.utils.ReflectUtils; -import com.huawei.sermant.core.utils.StringUtils; + +import com.huaweicloud.sermant.core.utils.StringUtils; import java.util.Optional; diff --git a/sermant-plugins/sermant-route/gray-dubbo-service/src/main/java/com/huawei/gray/dubbo/utils/RouterUtil.java b/sermant-plugins/sermant-route/gray-dubbo-service/src/main/java/com/huawei/gray/dubbo/utils/RouterUtil.java index df53dbe945..a599bfb59d 100644 --- a/sermant-plugins/sermant-route/gray-dubbo-service/src/main/java/com/huawei/gray/dubbo/utils/RouterUtil.java +++ b/sermant-plugins/sermant-route/gray-dubbo-service/src/main/java/com/huawei/gray/dubbo/utils/RouterUtil.java @@ -27,7 +27,8 @@ import com.huawei.route.common.gray.label.entity.Rule; import com.huawei.route.common.gray.label.entity.ValueMatch; import com.huawei.route.common.utils.CollectionUtils; -import com.huawei.sermant.core.utils.StringUtils; + +import com.huaweicloud.sermant.core.utils.StringUtils; import java.util.ArrayList; import java.util.Collections; diff --git a/sermant-plugins/sermant-route/gray-dubbo-service/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.service.PluginService b/sermant-plugins/sermant-route/gray-dubbo-service/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.service.PluginService similarity index 100% rename from sermant-plugins/sermant-route/gray-dubbo-service/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.service.PluginService rename to sermant-plugins/sermant-route/gray-dubbo-service/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.service.PluginService diff --git a/sermant-plugins/sermant-route/gray-dubbo-service/src/test/java/com/huawei/gray/dubbo/strategy/TypeStrategyChooserTest.java b/sermant-plugins/sermant-route/gray-dubbo-service/src/test/java/com/huawei/gray/dubbo/strategy/TypeStrategyChooserTest.java index e80a1fe98a..b31308cda0 100644 --- a/sermant-plugins/sermant-route/gray-dubbo-service/src/test/java/com/huawei/gray/dubbo/strategy/TypeStrategyChooserTest.java +++ b/sermant-plugins/sermant-route/gray-dubbo-service/src/test/java/com/huawei/gray/dubbo/strategy/TypeStrategyChooserTest.java @@ -17,8 +17,9 @@ package com.huawei.gray.dubbo.strategy; import com.huawei.gray.dubbo.strategy.type.Entity; -import com.huawei.sermant.core.common.CommonConstant; -import com.huawei.sermant.core.common.LoggerFactory; + +import com.huaweicloud.sermant.core.common.CommonConstant; +import com.huaweicloud.sermant.core.common.LoggerFactory; import org.junit.Assert; import org.junit.BeforeClass; diff --git a/sermant-plugins/sermant-route/gray-dubbo-service/src/test/java/com/huawei/gray/dubbo/strategy/type/EnabledTypeStrategyTest.java b/sermant-plugins/sermant-route/gray-dubbo-service/src/test/java/com/huawei/gray/dubbo/strategy/type/EnabledTypeStrategyTest.java index 3766109ae0..22d9cb5595 100644 --- a/sermant-plugins/sermant-route/gray-dubbo-service/src/test/java/com/huawei/gray/dubbo/strategy/type/EnabledTypeStrategyTest.java +++ b/sermant-plugins/sermant-route/gray-dubbo-service/src/test/java/com/huawei/gray/dubbo/strategy/type/EnabledTypeStrategyTest.java @@ -17,8 +17,9 @@ package com.huawei.gray.dubbo.strategy.type; import com.huawei.gray.dubbo.strategy.TypeStrategy; -import com.huawei.sermant.core.common.CommonConstant; -import com.huawei.sermant.core.common.LoggerFactory; + +import com.huaweicloud.sermant.core.common.CommonConstant; +import com.huaweicloud.sermant.core.common.LoggerFactory; import org.junit.Assert; import org.junit.BeforeClass; diff --git a/sermant-plugins/sermant-route/gray-dubbo-service/src/test/java/com/huawei/gray/dubbo/strategy/type/ObjectTypeStrategyTest.java b/sermant-plugins/sermant-route/gray-dubbo-service/src/test/java/com/huawei/gray/dubbo/strategy/type/ObjectTypeStrategyTest.java index 0289d164fd..b0bd1285f3 100644 --- a/sermant-plugins/sermant-route/gray-dubbo-service/src/test/java/com/huawei/gray/dubbo/strategy/type/ObjectTypeStrategyTest.java +++ b/sermant-plugins/sermant-route/gray-dubbo-service/src/test/java/com/huawei/gray/dubbo/strategy/type/ObjectTypeStrategyTest.java @@ -17,8 +17,9 @@ package com.huawei.gray.dubbo.strategy.type; import com.huawei.gray.dubbo.strategy.TypeStrategy; -import com.huawei.sermant.core.common.CommonConstant; -import com.huawei.sermant.core.common.LoggerFactory; + +import com.huaweicloud.sermant.core.common.CommonConstant; +import com.huaweicloud.sermant.core.common.LoggerFactory; import org.junit.Assert; import org.junit.BeforeClass; diff --git a/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/pom.xml b/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/pom.xml index 888a530e7a..48bb7e6871 100644 --- a/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/pom.xml +++ b/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/pom.xml @@ -17,7 +17,7 @@ - com.huawei.sermant + com.huaweicloud.sermant sermant-agentcore-core provided diff --git a/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/definition/AbstractInstDefinition.java b/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/definition/AbstractInstDefinition.java index d4396276ce..706c2cac18 100644 --- a/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/definition/AbstractInstDefinition.java +++ b/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/definition/AbstractInstDefinition.java @@ -16,13 +16,12 @@ package com.huawei.gray.feign.definition; -import com.huawei.sermant.core.agent.definition.EnhanceDefinition; -import com.huawei.sermant.core.agent.definition.MethodInterceptPoint; -import com.huawei.sermant.core.agent.matcher.ClassMatcher; -import com.huawei.sermant.core.agent.matcher.ClassMatchers; - -import net.bytebuddy.description.method.MethodDescription; -import net.bytebuddy.matcher.ElementMatchers; +import com.huaweicloud.sermant.core.agent.definition.EnhanceDefinition; +import com.huaweicloud.sermant.core.agent.definition.MethodInterceptPoint; +import com.huaweicloud.sermant.core.agent.matcher.ClassMatcher; +import com.huaweicloud.sermant.core.agent.matcher.ClassMatchers; +import com.huaweicloud.sermant.dependencies.net.bytebuddy.description.method.MethodDescription; +import com.huaweicloud.sermant.dependencies.net.bytebuddy.matcher.ElementMatchers; /** * 实例增强基类 diff --git a/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/definition/register/RegistrationDefinition.java b/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/definition/register/RegistrationDefinition.java index eb52f7c452..d1f92c7829 100644 --- a/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/definition/register/RegistrationDefinition.java +++ b/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/definition/register/RegistrationDefinition.java @@ -17,8 +17,9 @@ package com.huawei.gray.feign.definition.register; import com.huawei.gray.feign.definition.AbstractInstDefinition; -import com.huawei.sermant.core.agent.matcher.ClassMatcher; -import com.huawei.sermant.core.agent.matcher.ClassMatchers; + +import com.huaweicloud.sermant.core.agent.matcher.ClassMatcher; +import com.huaweicloud.sermant.core.agent.matcher.ClassMatchers; /** * 注册增强 diff --git a/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/interceptor/DefaultHttpClientInterceptor.java b/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/interceptor/DefaultHttpClientInterceptor.java index 3528d15241..6d9731a4e8 100644 --- a/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/interceptor/DefaultHttpClientInterceptor.java +++ b/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/interceptor/DefaultHttpClientInterceptor.java @@ -23,9 +23,10 @@ package com.huawei.gray.feign.interceptor; import com.huawei.gray.feign.service.DefaultHttpClientService; -import com.huawei.sermant.core.agent.common.BeforeResult; -import com.huawei.sermant.core.agent.interceptor.InstanceMethodInterceptor; -import com.huawei.sermant.core.service.ServiceManager; + +import com.huaweicloud.sermant.core.agent.common.BeforeResult; +import com.huaweicloud.sermant.core.agent.interceptor.InstanceMethodInterceptor; +import com.huaweicloud.sermant.core.service.ServiceManager; import java.lang.reflect.Method; diff --git a/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/interceptor/LoadBalancerClientInterceptor.java b/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/interceptor/LoadBalancerClientInterceptor.java index 24c835f384..514c139438 100644 --- a/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/interceptor/LoadBalancerClientInterceptor.java +++ b/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/interceptor/LoadBalancerClientInterceptor.java @@ -17,9 +17,10 @@ package com.huawei.gray.feign.interceptor; import com.huawei.gray.feign.service.LoadBalancerClientService; -import com.huawei.sermant.core.agent.common.BeforeResult; -import com.huawei.sermant.core.agent.interceptor.InstanceMethodInterceptor; -import com.huawei.sermant.core.service.ServiceManager; + +import com.huaweicloud.sermant.core.agent.common.BeforeResult; +import com.huaweicloud.sermant.core.agent.interceptor.InstanceMethodInterceptor; +import com.huaweicloud.sermant.core.service.ServiceManager; import java.lang.reflect.Method; diff --git a/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/interceptor/PathVarInterceptor.java b/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/interceptor/PathVarInterceptor.java index 655670bc08..19d80a6fc9 100644 --- a/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/interceptor/PathVarInterceptor.java +++ b/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/interceptor/PathVarInterceptor.java @@ -23,9 +23,10 @@ package com.huawei.gray.feign.interceptor; import com.huawei.gray.feign.service.PathVarService; -import com.huawei.sermant.core.agent.common.BeforeResult; -import com.huawei.sermant.core.agent.interceptor.InstanceMethodInterceptor; -import com.huawei.sermant.core.service.ServiceManager; + +import com.huaweicloud.sermant.core.agent.common.BeforeResult; +import com.huaweicloud.sermant.core.agent.interceptor.InstanceMethodInterceptor; +import com.huaweicloud.sermant.core.service.ServiceManager; import java.lang.reflect.Method; diff --git a/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/interceptor/RegisterInterceptor.java b/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/interceptor/RegisterInterceptor.java index 8792a66d10..535fd4c076 100644 --- a/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/interceptor/RegisterInterceptor.java +++ b/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/interceptor/RegisterInterceptor.java @@ -17,9 +17,10 @@ package com.huawei.gray.feign.interceptor; import com.huawei.gray.feign.service.RegisterService; -import com.huawei.sermant.core.agent.common.BeforeResult; -import com.huawei.sermant.core.agent.interceptor.InstanceMethodInterceptor; -import com.huawei.sermant.core.service.ServiceManager; + +import com.huaweicloud.sermant.core.agent.common.BeforeResult; +import com.huaweicloud.sermant.core.agent.interceptor.InstanceMethodInterceptor; +import com.huaweicloud.sermant.core.service.ServiceManager; import java.lang.reflect.Method; diff --git a/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/interceptor/RegistrationInterceptor.java b/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/interceptor/RegistrationInterceptor.java index ca62bb4154..1cc0e2a5d6 100644 --- a/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/interceptor/RegistrationInterceptor.java +++ b/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/interceptor/RegistrationInterceptor.java @@ -17,9 +17,10 @@ package com.huawei.gray.feign.interceptor; import com.huawei.gray.feign.service.RegisterService; -import com.huawei.sermant.core.agent.common.BeforeResult; -import com.huawei.sermant.core.agent.interceptor.InstanceMethodInterceptor; -import com.huawei.sermant.core.service.ServiceManager; + +import com.huaweicloud.sermant.core.agent.common.BeforeResult; +import com.huaweicloud.sermant.core.agent.interceptor.InstanceMethodInterceptor; +import com.huaweicloud.sermant.core.service.ServiceManager; import java.lang.reflect.Method; diff --git a/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/interceptor/ServiceCenterRegisterInterceptor.java b/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/interceptor/ServiceCenterRegisterInterceptor.java index 68be78ad15..35405861cf 100644 --- a/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/interceptor/ServiceCenterRegisterInterceptor.java +++ b/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/interceptor/ServiceCenterRegisterInterceptor.java @@ -16,7 +16,7 @@ package com.huawei.gray.feign.interceptor; -import com.huawei.sermant.core.agent.common.BeforeResult; +import com.huaweicloud.sermant.core.agent.common.BeforeResult; import java.lang.reflect.Method; diff --git a/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/interceptor/ServiceCombRegisterInterceptor.java b/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/interceptor/ServiceCombRegisterInterceptor.java index 82b59d52f6..1366176985 100644 --- a/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/interceptor/ServiceCombRegisterInterceptor.java +++ b/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/interceptor/ServiceCombRegisterInterceptor.java @@ -16,7 +16,7 @@ package com.huawei.gray.feign.interceptor; -import com.huawei.sermant.core.agent.common.BeforeResult; +import com.huaweicloud.sermant.core.agent.common.BeforeResult; import java.lang.reflect.Method; diff --git a/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/interceptor/ServiceInstanceListSupplierInterceptor.java b/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/interceptor/ServiceInstanceListSupplierInterceptor.java index 98df903293..17520d699c 100644 --- a/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/interceptor/ServiceInstanceListSupplierInterceptor.java +++ b/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/interceptor/ServiceInstanceListSupplierInterceptor.java @@ -17,9 +17,10 @@ package com.huawei.gray.feign.interceptor; import com.huawei.gray.feign.service.ServiceInstanceListSupplierService; -import com.huawei.sermant.core.agent.common.BeforeResult; -import com.huawei.sermant.core.agent.interceptor.InstanceMethodInterceptor; -import com.huawei.sermant.core.service.ServiceManager; + +import com.huaweicloud.sermant.core.agent.common.BeforeResult; +import com.huaweicloud.sermant.core.agent.interceptor.InstanceMethodInterceptor; +import com.huaweicloud.sermant.core.service.ServiceManager; import java.lang.reflect.Method; diff --git a/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/service/DefaultHttpClientService.java b/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/service/DefaultHttpClientService.java index e3c80b1993..992404afaa 100644 --- a/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/service/DefaultHttpClientService.java +++ b/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/service/DefaultHttpClientService.java @@ -22,8 +22,8 @@ package com.huawei.gray.feign.service; -import com.huawei.sermant.core.agent.common.BeforeResult; -import com.huawei.sermant.core.plugin.service.PluginService; +import com.huaweicloud.sermant.core.agent.common.BeforeResult; +import com.huaweicloud.sermant.core.plugin.service.PluginService; import java.lang.reflect.Method; diff --git a/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/service/LoadBalancerClientService.java b/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/service/LoadBalancerClientService.java index 841b9db801..c14a691402 100644 --- a/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/service/LoadBalancerClientService.java +++ b/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/service/LoadBalancerClientService.java @@ -16,8 +16,8 @@ package com.huawei.gray.feign.service; -import com.huawei.sermant.core.agent.common.BeforeResult; -import com.huawei.sermant.core.plugin.service.PluginService; +import com.huaweicloud.sermant.core.agent.common.BeforeResult; +import com.huaweicloud.sermant.core.plugin.service.PluginService; import java.lang.reflect.Method; diff --git a/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/service/PathVarService.java b/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/service/PathVarService.java index f32c22d44c..b97d1126c7 100644 --- a/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/service/PathVarService.java +++ b/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/service/PathVarService.java @@ -22,8 +22,8 @@ package com.huawei.gray.feign.service; -import com.huawei.sermant.core.agent.common.BeforeResult; -import com.huawei.sermant.core.plugin.service.PluginService; +import com.huaweicloud.sermant.core.agent.common.BeforeResult; +import com.huaweicloud.sermant.core.plugin.service.PluginService; import java.lang.reflect.Method; diff --git a/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/service/RegisterService.java b/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/service/RegisterService.java index 5369308e52..9099b51263 100644 --- a/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/service/RegisterService.java +++ b/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/service/RegisterService.java @@ -16,8 +16,8 @@ package com.huawei.gray.feign.service; -import com.huawei.sermant.core.agent.common.BeforeResult; -import com.huawei.sermant.core.plugin.service.PluginService; +import com.huaweicloud.sermant.core.agent.common.BeforeResult; +import com.huaweicloud.sermant.core.plugin.service.PluginService; import java.lang.reflect.Method; diff --git a/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/service/ServiceInstanceListSupplierService.java b/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/service/ServiceInstanceListSupplierService.java index ba45887751..d66125daa9 100644 --- a/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/service/ServiceInstanceListSupplierService.java +++ b/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/java/com/huawei/gray/feign/service/ServiceInstanceListSupplierService.java @@ -16,8 +16,8 @@ package com.huawei.gray.feign.service; -import com.huawei.sermant.core.agent.common.BeforeResult; -import com.huawei.sermant.core.plugin.service.PluginService; +import com.huaweicloud.sermant.core.agent.common.BeforeResult; +import com.huaweicloud.sermant.core.plugin.service.PluginService; import java.lang.reflect.Method; diff --git a/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/resources/META-INF/services/com.huawei.sermant.core.agent.definition.EnhanceDefinition b/sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.agent.definition.EnhanceDefinition similarity index 100% rename from sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/resources/META-INF/services/com.huawei.sermant.core.agent.definition.EnhanceDefinition rename to sermant-plugins/sermant-route/gray-feign-http-9.x-plugin/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.agent.definition.EnhanceDefinition diff --git a/sermant-plugins/sermant-route/gray-feign-http-9.x-service/pom.xml b/sermant-plugins/sermant-route/gray-feign-http-9.x-service/pom.xml index 0087b9e5b8..77eba628a5 100644 --- a/sermant-plugins/sermant-route/gray-feign-http-9.x-service/pom.xml +++ b/sermant-plugins/sermant-route/gray-feign-http-9.x-service/pom.xml @@ -24,7 +24,7 @@ - com.huawei.sermant + com.huaweicloud.sermant sermant-agentcore-core provided diff --git a/sermant-plugins/sermant-route/gray-feign-http-9.x-service/src/main/java/com/huawei/gray/feign/rule/UpstreamRuleStrategy.java b/sermant-plugins/sermant-route/gray-feign-http-9.x-service/src/main/java/com/huawei/gray/feign/rule/UpstreamRuleStrategy.java index 99c167ce1a..48189c6305 100644 --- a/sermant-plugins/sermant-route/gray-feign-http-9.x-service/src/main/java/com/huawei/gray/feign/rule/UpstreamRuleStrategy.java +++ b/sermant-plugins/sermant-route/gray-feign-http-9.x-service/src/main/java/com/huawei/gray/feign/rule/UpstreamRuleStrategy.java @@ -22,7 +22,8 @@ import com.huawei.route.common.gray.constants.GrayConstant; import com.huawei.route.common.gray.label.entity.CurrentTag; import com.huawei.route.common.gray.label.entity.Route; -import com.huawei.sermant.core.utils.StringUtils; + +import com.huaweicloud.sermant.core.utils.StringUtils; import com.alibaba.fastjson.JSONObject; diff --git a/sermant-plugins/sermant-route/gray-feign-http-9.x-service/src/main/java/com/huawei/gray/feign/service/ConfigServiceImpl.java b/sermant-plugins/sermant-route/gray-feign-http-9.x-service/src/main/java/com/huawei/gray/feign/service/ConfigServiceImpl.java index c373e95a4c..1a2e79ee04 100644 --- a/sermant-plugins/sermant-route/gray-feign-http-9.x-service/src/main/java/com/huawei/gray/feign/service/ConfigServiceImpl.java +++ b/sermant-plugins/sermant-route/gray-feign-http-9.x-service/src/main/java/com/huawei/gray/feign/service/ConfigServiceImpl.java @@ -18,10 +18,11 @@ import com.huawei.route.common.gray.config.GrayConfig; import com.huawei.route.common.gray.listener.GrayDynamicConfigListener; -import com.huawei.sermant.core.plugin.config.PluginConfigManager; -import com.huawei.sermant.core.plugin.service.PluginService; -import com.huawei.sermant.core.service.ServiceManager; -import com.huawei.sermant.core.service.dynamicconfig.DynamicConfigService; + +import com.huaweicloud.sermant.core.plugin.config.PluginConfigManager; +import com.huaweicloud.sermant.core.plugin.service.PluginService; +import com.huaweicloud.sermant.core.service.ServiceManager; +import com.huaweicloud.sermant.core.service.dynamicconfig.DynamicConfigService; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; diff --git a/sermant-plugins/sermant-route/gray-feign-http-9.x-service/src/main/java/com/huawei/gray/feign/service/DefaultHttpClientServiceImpl.java b/sermant-plugins/sermant-route/gray-feign-http-9.x-service/src/main/java/com/huawei/gray/feign/service/DefaultHttpClientServiceImpl.java index 2065f301d0..fd508ef994 100644 --- a/sermant-plugins/sermant-route/gray-feign-http-9.x-service/src/main/java/com/huawei/gray/feign/service/DefaultHttpClientServiceImpl.java +++ b/sermant-plugins/sermant-route/gray-feign-http-9.x-service/src/main/java/com/huawei/gray/feign/service/DefaultHttpClientServiceImpl.java @@ -32,8 +32,9 @@ import com.huawei.route.common.gray.label.entity.GrayConfiguration; import com.huawei.route.common.gray.label.entity.Route; import com.huawei.route.common.gray.label.entity.Rule; -import com.huawei.sermant.core.agent.common.BeforeResult; -import com.huawei.sermant.core.plugin.config.PluginConfigManager; + +import com.huaweicloud.sermant.core.agent.common.BeforeResult; +import com.huaweicloud.sermant.core.plugin.config.PluginConfigManager; import feign.Request; diff --git a/sermant-plugins/sermant-route/gray-feign-http-9.x-service/src/main/java/com/huawei/gray/feign/service/LoadBalancerClientServiceImpl.java b/sermant-plugins/sermant-route/gray-feign-http-9.x-service/src/main/java/com/huawei/gray/feign/service/LoadBalancerClientServiceImpl.java index 24ff04e588..bcee34e59c 100644 --- a/sermant-plugins/sermant-route/gray-feign-http-9.x-service/src/main/java/com/huawei/gray/feign/service/LoadBalancerClientServiceImpl.java +++ b/sermant-plugins/sermant-route/gray-feign-http-9.x-service/src/main/java/com/huawei/gray/feign/service/LoadBalancerClientServiceImpl.java @@ -17,7 +17,8 @@ package com.huawei.gray.feign.service; import com.huawei.gray.feign.context.HostContext; -import com.huawei.sermant.core.agent.common.BeforeResult; + +import com.huaweicloud.sermant.core.agent.common.BeforeResult; import feign.Request; diff --git a/sermant-plugins/sermant-route/gray-feign-http-9.x-service/src/main/java/com/huawei/gray/feign/service/PathVarServiceImpl.java b/sermant-plugins/sermant-route/gray-feign-http-9.x-service/src/main/java/com/huawei/gray/feign/service/PathVarServiceImpl.java index 071e56933f..a81ff55267 100644 --- a/sermant-plugins/sermant-route/gray-feign-http-9.x-service/src/main/java/com/huawei/gray/feign/service/PathVarServiceImpl.java +++ b/sermant-plugins/sermant-route/gray-feign-http-9.x-service/src/main/java/com/huawei/gray/feign/service/PathVarServiceImpl.java @@ -23,7 +23,8 @@ package com.huawei.gray.feign.service; import com.huawei.gray.feign.context.FeignResolvedUrl; -import com.huawei.sermant.core.agent.common.BeforeResult; + +import com.huaweicloud.sermant.core.agent.common.BeforeResult; import feign.RequestTemplate; diff --git a/sermant-plugins/sermant-route/gray-feign-http-9.x-service/src/main/java/com/huawei/gray/feign/service/RegisterServiceImpl.java b/sermant-plugins/sermant-route/gray-feign-http-9.x-service/src/main/java/com/huawei/gray/feign/service/RegisterServiceImpl.java index a833b3c2e0..3eb0f13c8d 100644 --- a/sermant-plugins/sermant-route/gray-feign-http-9.x-service/src/main/java/com/huawei/gray/feign/service/RegisterServiceImpl.java +++ b/sermant-plugins/sermant-route/gray-feign-http-9.x-service/src/main/java/com/huawei/gray/feign/service/RegisterServiceImpl.java @@ -20,9 +20,9 @@ import com.huawei.gray.feign.util.RouterUtil; import com.huawei.route.common.gray.config.GrayConfig; import com.huawei.route.common.gray.constants.GrayConstant; -import com.huawei.sermant.core.agent.common.BeforeResult; -import com.huawei.sermant.core.plugin.config.PluginConfigManager; +import com.huaweicloud.sermant.core.agent.common.BeforeResult; +import com.huaweicloud.sermant.core.plugin.config.PluginConfigManager; import com.huaweicloud.servicecomb.discovery.registry.ServiceCombRegistration; import com.netflix.appinfo.InstanceInfo; diff --git a/sermant-plugins/sermant-route/gray-feign-http-9.x-service/src/main/java/com/huawei/gray/feign/service/ServiceInstanceListSupplierServiceImpl.java b/sermant-plugins/sermant-route/gray-feign-http-9.x-service/src/main/java/com/huawei/gray/feign/service/ServiceInstanceListSupplierServiceImpl.java index 2b75c8604e..dd7d369b89 100644 --- a/sermant-plugins/sermant-route/gray-feign-http-9.x-service/src/main/java/com/huawei/gray/feign/service/ServiceInstanceListSupplierServiceImpl.java +++ b/sermant-plugins/sermant-route/gray-feign-http-9.x-service/src/main/java/com/huawei/gray/feign/service/ServiceInstanceListSupplierServiceImpl.java @@ -20,7 +20,8 @@ import com.huawei.route.common.gray.addr.entity.Instances; import com.huawei.route.common.gray.constants.GrayConstant; import com.huawei.route.common.gray.label.entity.CurrentTag; -import com.huawei.sermant.core.agent.common.BeforeResult; + +import com.huaweicloud.sermant.core.agent.common.BeforeResult; import reactor.core.publisher.Flux; diff --git a/sermant-plugins/sermant-route/gray-feign-http-9.x-service/src/main/java/com/huawei/gray/feign/util/RouterUtil.java b/sermant-plugins/sermant-route/gray-feign-http-9.x-service/src/main/java/com/huawei/gray/feign/util/RouterUtil.java index 9b1ca641a9..a16058bc2e 100644 --- a/sermant-plugins/sermant-route/gray-feign-http-9.x-service/src/main/java/com/huawei/gray/feign/util/RouterUtil.java +++ b/sermant-plugins/sermant-route/gray-feign-http-9.x-service/src/main/java/com/huawei/gray/feign/util/RouterUtil.java @@ -28,7 +28,8 @@ import com.huawei.route.common.gray.label.entity.Route; import com.huawei.route.common.gray.label.entity.Rule; import com.huawei.route.common.gray.label.entity.ValueMatch; -import com.huawei.sermant.core.utils.StringUtils; + +import com.huaweicloud.sermant.core.utils.StringUtils; import com.alibaba.fastjson.JSONObject; diff --git a/sermant-plugins/sermant-route/gray-feign-http-9.x-service/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.service.PluginService b/sermant-plugins/sermant-route/gray-feign-http-9.x-service/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.service.PluginService similarity index 100% rename from sermant-plugins/sermant-route/gray-feign-http-9.x-service/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.service.PluginService rename to sermant-plugins/sermant-route/gray-feign-http-9.x-service/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.service.PluginService diff --git a/sermant-plugins/sermant-route/route-common/pom.xml b/sermant-plugins/sermant-route/route-common/pom.xml index b59c0e0db8..3b903a3ce1 100644 --- a/sermant-plugins/sermant-route/route-common/pom.xml +++ b/sermant-plugins/sermant-route/route-common/pom.xml @@ -23,7 +23,7 @@ - com.huawei.sermant + com.huaweicloud.sermant sermant-agentcore-core provided diff --git a/sermant-plugins/sermant-route/route-common/src/main/java/com/huawei/route/common/gray/config/GrayConfig.java b/sermant-plugins/sermant-route/route-common/src/main/java/com/huawei/route/common/gray/config/GrayConfig.java index 77b1e03aaf..9618f708b7 100644 --- a/sermant-plugins/sermant-route/route-common/src/main/java/com/huawei/route/common/gray/config/GrayConfig.java +++ b/sermant-plugins/sermant-route/route-common/src/main/java/com/huawei/route/common/gray/config/GrayConfig.java @@ -17,10 +17,11 @@ package com.huawei.route.common.gray.config; import com.huawei.route.common.gray.constants.GrayConstant; -import com.huawei.sermant.core.config.ConfigManager; -import com.huawei.sermant.core.config.common.ConfigTypeKey; -import com.huawei.sermant.core.plugin.config.PluginConfig; -import com.huawei.sermant.core.plugin.config.ServiceMeta; + +import com.huaweicloud.sermant.core.config.ConfigManager; +import com.huaweicloud.sermant.core.config.common.ConfigTypeKey; +import com.huaweicloud.sermant.core.plugin.config.PluginConfig; +import com.huaweicloud.sermant.core.plugin.config.ServiceMeta; import java.util.Map; diff --git a/sermant-plugins/sermant-route/route-common/src/main/java/com/huawei/route/common/gray/label/entity/ValueMatchDeserializer.java b/sermant-plugins/sermant-route/route-common/src/main/java/com/huawei/route/common/gray/label/entity/ValueMatchDeserializer.java index 4cb3a09248..89d6f34f30 100644 --- a/sermant-plugins/sermant-route/route-common/src/main/java/com/huawei/route/common/gray/label/entity/ValueMatchDeserializer.java +++ b/sermant-plugins/sermant-route/route-common/src/main/java/com/huawei/route/common/gray/label/entity/ValueMatchDeserializer.java @@ -17,7 +17,8 @@ package com.huawei.route.common.gray.label.entity; import com.huawei.route.common.gray.constants.GrayConstant; -import com.huawei.sermant.core.common.LoggerFactory; + +import com.huaweicloud.sermant.core.common.LoggerFactory; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONException; diff --git a/sermant-plugins/sermant-route/route-common/src/main/java/com/huawei/route/common/gray/listener/GrayDynamicConfigListener.java b/sermant-plugins/sermant-route/route-common/src/main/java/com/huawei/route/common/gray/listener/GrayDynamicConfigListener.java index 63e71d8c88..e25548d458 100644 --- a/sermant-plugins/sermant-route/route-common/src/main/java/com/huawei/route/common/gray/listener/GrayDynamicConfigListener.java +++ b/sermant-plugins/sermant-route/route-common/src/main/java/com/huawei/route/common/gray/listener/GrayDynamicConfigListener.java @@ -22,11 +22,12 @@ import com.huawei.route.common.gray.label.entity.Rule; import com.huawei.route.common.gray.label.entity.VersionFrom; import com.huawei.route.common.utils.CollectionUtils; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.service.dynamicconfig.common.DynamicConfigEvent; -import com.huawei.sermant.core.service.dynamicconfig.common.DynamicConfigEventType; -import com.huawei.sermant.core.service.dynamicconfig.common.DynamicConfigListener; -import com.huawei.sermant.core.utils.StringUtils; + +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigEvent; +import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigEventType; +import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigListener; +import com.huaweicloud.sermant.core.utils.StringUtils; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; diff --git a/sermant-plugins/sermant-route/route-common/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.config.PluginConfig b/sermant-plugins/sermant-route/route-common/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.config.PluginConfig similarity index 100% rename from sermant-plugins/sermant-route/route-common/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.config.PluginConfig rename to sermant-plugins/sermant-route/route-common/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.config.PluginConfig diff --git a/sermant-plugins/sermant-server-monitor/connection-pool-collect-plugin/pom.xml b/sermant-plugins/sermant-server-monitor/connection-pool-collect-plugin/pom.xml index 8f532bbf38..8d0449966f 100644 --- a/sermant-plugins/sermant-server-monitor/connection-pool-collect-plugin/pom.xml +++ b/sermant-plugins/sermant-server-monitor/connection-pool-collect-plugin/pom.xml @@ -18,7 +18,7 @@ - com.huawei.sermant + com.huaweicloud.sermant sermant-agentcore-core provided diff --git a/sermant-plugins/sermant-server-monitor/connection-pool-collect-plugin/src/main/java/com/huawei/sermant/plugin/connection/pool/collect/collector/DruidMetricCollector.java b/sermant-plugins/sermant-server-monitor/connection-pool-collect-plugin/src/main/java/com/huawei/sermant/plugin/connection/pool/collect/collector/DruidMetricCollector.java index b92c9061cb..03c660adbf 100644 --- a/sermant-plugins/sermant-server-monitor/connection-pool-collect-plugin/src/main/java/com/huawei/sermant/plugin/connection/pool/collect/collector/DruidMetricCollector.java +++ b/sermant-plugins/sermant-server-monitor/connection-pool-collect-plugin/src/main/java/com/huawei/sermant/plugin/connection/pool/collect/collector/DruidMetricCollector.java @@ -16,12 +16,13 @@ package com.huawei.sermant.plugin.connection.pool.collect.collector; -import com.huawei.sermant.core.plugin.service.PluginServiceManager; -import com.huawei.sermant.core.utils.StringUtils; import com.huawei.sermant.plugin.monitor.common.service.DatabasePeerParseService; import com.huawei.sermant.plugin.servermonitor.entity.ConnectionPool; import com.huawei.sermant.plugin.servermonitor.entity.DataSourceBean; +import com.huaweicloud.sermant.core.plugin.service.PluginServiceManager; +import com.huaweicloud.sermant.core.utils.StringUtils; + import com.alibaba.druid.pool.DruidDataSource; import java.util.HashMap; diff --git a/sermant-plugins/sermant-server-monitor/connection-pool-collect-plugin/src/main/java/com/huawei/sermant/plugin/connection/pool/collect/collector/DruidMetricProvider.java b/sermant-plugins/sermant-server-monitor/connection-pool-collect-plugin/src/main/java/com/huawei/sermant/plugin/connection/pool/collect/collector/DruidMetricProvider.java index 67358f14eb..adc9eb0bfc 100644 --- a/sermant-plugins/sermant-server-monitor/connection-pool-collect-plugin/src/main/java/com/huawei/sermant/plugin/connection/pool/collect/collector/DruidMetricProvider.java +++ b/sermant-plugins/sermant-server-monitor/connection-pool-collect-plugin/src/main/java/com/huawei/sermant/plugin/connection/pool/collect/collector/DruidMetricProvider.java @@ -16,14 +16,15 @@ package com.huawei.sermant.plugin.connection.pool.collect.collector; -import com.huawei.sermant.core.plugin.config.PluginConfigManager; -import com.huawei.sermant.core.service.ServiceManager; -import com.huawei.sermant.core.service.send.api.GatewayClient; import com.huawei.sermant.plugin.monitor.common.collect.MetricProvider; import com.huawei.sermant.plugin.monitor.common.config.ServiceConfig; import com.huawei.sermant.plugin.servermonitor.entity.ConnectionPool; import com.huawei.sermant.plugin.servermonitor.entity.ConnectionPoolCollection; +import com.huaweicloud.sermant.core.plugin.config.PluginConfigManager; +import com.huaweicloud.sermant.core.service.ServiceManager; +import com.huaweicloud.sermant.core.service.send.api.GatewayClient; + import java.util.List; /** diff --git a/sermant-plugins/sermant-server-monitor/connection-pool-collect-plugin/src/main/java/com/huawei/sermant/plugin/connection/pool/collect/config/DruidMonitorConfig.java b/sermant-plugins/sermant-server-monitor/connection-pool-collect-plugin/src/main/java/com/huawei/sermant/plugin/connection/pool/collect/config/DruidMonitorConfig.java index 48168df9ef..4ae5fb15bf 100644 --- a/sermant-plugins/sermant-server-monitor/connection-pool-collect-plugin/src/main/java/com/huawei/sermant/plugin/connection/pool/collect/config/DruidMonitorConfig.java +++ b/sermant-plugins/sermant-server-monitor/connection-pool-collect-plugin/src/main/java/com/huawei/sermant/plugin/connection/pool/collect/config/DruidMonitorConfig.java @@ -16,8 +16,8 @@ package com.huawei.sermant.plugin.connection.pool.collect.config; -import com.huawei.sermant.core.config.common.ConfigTypeKey; -import com.huawei.sermant.core.plugin.config.PluginConfig; +import com.huaweicloud.sermant.core.config.common.ConfigTypeKey; +import com.huaweicloud.sermant.core.plugin.config.PluginConfig; /** * Druid Monitor 配置 diff --git a/sermant-plugins/sermant-server-monitor/connection-pool-collect-plugin/src/main/java/com/huawei/sermant/plugin/connection/pool/collect/definition/DruidDataSourceStatManagerDefinition.java b/sermant-plugins/sermant-server-monitor/connection-pool-collect-plugin/src/main/java/com/huawei/sermant/plugin/connection/pool/collect/definition/DruidDataSourceStatManagerDefinition.java index adc973f226..dd23c7663c 100644 --- a/sermant-plugins/sermant-server-monitor/connection-pool-collect-plugin/src/main/java/com/huawei/sermant/plugin/connection/pool/collect/definition/DruidDataSourceStatManagerDefinition.java +++ b/sermant-plugins/sermant-server-monitor/connection-pool-collect-plugin/src/main/java/com/huawei/sermant/plugin/connection/pool/collect/definition/DruidDataSourceStatManagerDefinition.java @@ -16,12 +16,12 @@ package com.huawei.sermant.plugin.connection.pool.collect.definition; -import com.huawei.sermant.core.agent.definition.EnhanceDefinition; -import com.huawei.sermant.core.agent.definition.MethodInterceptPoint; -import com.huawei.sermant.core.agent.matcher.ClassMatcher; -import com.huawei.sermant.core.agent.matcher.ClassMatchers; -import net.bytebuddy.description.method.MethodDescription; -import net.bytebuddy.matcher.ElementMatchers; +import com.huaweicloud.sermant.core.agent.definition.EnhanceDefinition; +import com.huaweicloud.sermant.core.agent.definition.MethodInterceptPoint; +import com.huaweicloud.sermant.core.agent.matcher.ClassMatcher; +import com.huaweicloud.sermant.core.agent.matcher.ClassMatchers; +import com.huaweicloud.sermant.dependencies.net.bytebuddy.description.method.MethodDescription; +import com.huaweicloud.sermant.dependencies.net.bytebuddy.matcher.ElementMatchers; /** * Druid Monitor 增强定义 diff --git a/sermant-plugins/sermant-server-monitor/connection-pool-collect-plugin/src/main/java/com/huawei/sermant/plugin/connection/pool/collect/interceptor/AddDataSourceInterceptor.java b/sermant-plugins/sermant-server-monitor/connection-pool-collect-plugin/src/main/java/com/huawei/sermant/plugin/connection/pool/collect/interceptor/AddDataSourceInterceptor.java index 5a959f8ffb..3370b5bc8d 100644 --- a/sermant-plugins/sermant-server-monitor/connection-pool-collect-plugin/src/main/java/com/huawei/sermant/plugin/connection/pool/collect/interceptor/AddDataSourceInterceptor.java +++ b/sermant-plugins/sermant-server-monitor/connection-pool-collect-plugin/src/main/java/com/huawei/sermant/plugin/connection/pool/collect/interceptor/AddDataSourceInterceptor.java @@ -16,11 +16,13 @@ package com.huawei.sermant.plugin.connection.pool.collect.interceptor; -import com.alibaba.druid.pool.DruidDataSource; -import com.huawei.sermant.core.agent.common.BeforeResult; -import com.huawei.sermant.core.agent.interceptor.StaticMethodInterceptor; import com.huawei.sermant.plugin.connection.pool.collect.service.DruidMonitorService; +import com.huaweicloud.sermant.core.agent.common.BeforeResult; +import com.huaweicloud.sermant.core.agent.interceptor.StaticMethodInterceptor; + +import com.alibaba.druid.pool.DruidDataSource; + import java.lang.reflect.Method; /** diff --git a/sermant-plugins/sermant-server-monitor/connection-pool-collect-plugin/src/main/java/com/huawei/sermant/plugin/connection/pool/collect/interceptor/RemoveDataSourceInterceptor.java b/sermant-plugins/sermant-server-monitor/connection-pool-collect-plugin/src/main/java/com/huawei/sermant/plugin/connection/pool/collect/interceptor/RemoveDataSourceInterceptor.java index 86b2eb25a4..68872f1aab 100644 --- a/sermant-plugins/sermant-server-monitor/connection-pool-collect-plugin/src/main/java/com/huawei/sermant/plugin/connection/pool/collect/interceptor/RemoveDataSourceInterceptor.java +++ b/sermant-plugins/sermant-server-monitor/connection-pool-collect-plugin/src/main/java/com/huawei/sermant/plugin/connection/pool/collect/interceptor/RemoveDataSourceInterceptor.java @@ -16,11 +16,13 @@ package com.huawei.sermant.plugin.connection.pool.collect.interceptor; -import com.alibaba.druid.pool.DruidDataSource; -import com.huawei.sermant.core.agent.common.BeforeResult; -import com.huawei.sermant.core.agent.interceptor.StaticMethodInterceptor; import com.huawei.sermant.plugin.connection.pool.collect.service.DruidMonitorService; +import com.huaweicloud.sermant.core.agent.common.BeforeResult; +import com.huaweicloud.sermant.core.agent.interceptor.StaticMethodInterceptor; + +import com.alibaba.druid.pool.DruidDataSource; + import java.lang.reflect.Method; /** diff --git a/sermant-plugins/sermant-server-monitor/connection-pool-collect-plugin/src/main/java/com/huawei/sermant/plugin/connection/pool/collect/service/DruidMonitorService.java b/sermant-plugins/sermant-server-monitor/connection-pool-collect-plugin/src/main/java/com/huawei/sermant/plugin/connection/pool/collect/service/DruidMonitorService.java index 23139d531f..afe9f3ddc8 100644 --- a/sermant-plugins/sermant-server-monitor/connection-pool-collect-plugin/src/main/java/com/huawei/sermant/plugin/connection/pool/collect/service/DruidMonitorService.java +++ b/sermant-plugins/sermant-server-monitor/connection-pool-collect-plugin/src/main/java/com/huawei/sermant/plugin/connection/pool/collect/service/DruidMonitorService.java @@ -16,14 +16,16 @@ package com.huawei.sermant.plugin.connection.pool.collect.service; -import com.alibaba.druid.pool.DruidDataSource; -import com.huawei.sermant.core.config.ConfigManager; import com.huawei.sermant.plugin.connection.pool.collect.collector.DruidMetricCollector; import com.huawei.sermant.plugin.connection.pool.collect.collector.DruidMetricProvider; import com.huawei.sermant.plugin.connection.pool.collect.config.DruidMonitorConfig; import com.huawei.sermant.plugin.monitor.common.collect.CollectTask; import com.huawei.sermant.plugin.servermonitor.entity.ConnectionPool; +import com.huaweicloud.sermant.core.config.ConfigManager; + +import com.alibaba.druid.pool.DruidDataSource; + import java.util.concurrent.TimeUnit; /** diff --git a/sermant-plugins/sermant-server-monitor/connection-pool-collect-plugin/src/main/resources/META-INF/services/com.huawei.sermant.core.agent.definition.EnhanceDefinition b/sermant-plugins/sermant-server-monitor/connection-pool-collect-plugin/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.agent.definition.EnhanceDefinition similarity index 100% rename from sermant-plugins/sermant-server-monitor/connection-pool-collect-plugin/src/main/resources/META-INF/services/com.huawei.sermant.core.agent.definition.EnhanceDefinition rename to sermant-plugins/sermant-server-monitor/connection-pool-collect-plugin/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.agent.definition.EnhanceDefinition diff --git a/sermant-plugins/sermant-server-monitor/connection-pool-collect-plugin/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.config.PluginConfig b/sermant-plugins/sermant-server-monitor/connection-pool-collect-plugin/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.config.PluginConfig similarity index 100% rename from sermant-plugins/sermant-server-monitor/connection-pool-collect-plugin/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.config.PluginConfig rename to sermant-plugins/sermant-server-monitor/connection-pool-collect-plugin/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.config.PluginConfig diff --git a/sermant-plugins/sermant-server-monitor/databasepeer-parse-service/pom.xml b/sermant-plugins/sermant-server-monitor/databasepeer-parse-service/pom.xml index ad40178235..f46e317ef3 100644 --- a/sermant-plugins/sermant-server-monitor/databasepeer-parse-service/pom.xml +++ b/sermant-plugins/sermant-server-monitor/databasepeer-parse-service/pom.xml @@ -17,7 +17,7 @@ - com.huawei.sermant + com.huaweicloud.sermant sermant-agentcore-core provided diff --git a/sermant-plugins/sermant-server-monitor/databasepeer-parse-service/src/main/java/com/huawei/sermant/plugin/databasepeerparse/service/DatabasePeerParseServiceImpl.java b/sermant-plugins/sermant-server-monitor/databasepeer-parse-service/src/main/java/com/huawei/sermant/plugin/databasepeerparse/service/DatabasePeerParseServiceImpl.java index df38bb51df..389e546d12 100644 --- a/sermant-plugins/sermant-server-monitor/databasepeer-parse-service/src/main/java/com/huawei/sermant/plugin/databasepeerparse/service/DatabasePeerParseServiceImpl.java +++ b/sermant-plugins/sermant-server-monitor/databasepeer-parse-service/src/main/java/com/huawei/sermant/plugin/databasepeerparse/service/DatabasePeerParseServiceImpl.java @@ -16,9 +16,10 @@ package com.huawei.sermant.plugin.databasepeerparse.service; -import com.huawei.sermant.core.utils.StringUtils; import com.huawei.sermant.plugin.monitor.common.service.DatabasePeerParseService; +import com.huaweicloud.sermant.core.utils.StringUtils; + import org.apache.skywalking.apm.plugin.jdbc.connectionurl.parser.URLParser; import org.apache.skywalking.apm.plugin.jdbc.trace.ConnectionInfo; diff --git a/sermant-plugins/sermant-server-monitor/databasepeer-parse-service/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.service.PluginService b/sermant-plugins/sermant-server-monitor/databasepeer-parse-service/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.service.PluginService similarity index 100% rename from sermant-plugins/sermant-server-monitor/databasepeer-parse-service/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.service.PluginService rename to sermant-plugins/sermant-server-monitor/databasepeer-parse-service/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.service.PluginService diff --git a/sermant-plugins/sermant-server-monitor/monitor-common/pom.xml b/sermant-plugins/sermant-server-monitor/monitor-common/pom.xml index d83e066630..cf0e5717b1 100644 --- a/sermant-plugins/sermant-server-monitor/monitor-common/pom.xml +++ b/sermant-plugins/sermant-server-monitor/monitor-common/pom.xml @@ -25,7 +25,7 @@ - com.huawei.sermant + com.huaweicloud.sermant sermant-agentcore-core provided diff --git a/sermant-plugins/sermant-server-monitor/monitor-common/src/main/java/com/huawei/sermant/plugin/monitor/common/collect/CollectTask.java b/sermant-plugins/sermant-server-monitor/monitor-common/src/main/java/com/huawei/sermant/plugin/monitor/common/collect/CollectTask.java index bfc3f5bc0d..b2d105dfba 100644 --- a/sermant-plugins/sermant-server-monitor/monitor-common/src/main/java/com/huawei/sermant/plugin/monitor/common/collect/CollectTask.java +++ b/sermant-plugins/sermant-server-monitor/monitor-common/src/main/java/com/huawei/sermant/plugin/monitor/common/collect/CollectTask.java @@ -16,9 +16,10 @@ package com.huawei.sermant.plugin.monitor.common.collect; -import com.huawei.sermant.core.common.LoggerFactory; import com.huawei.sermant.plugin.monitor.common.utils.CommonUtil; +import com.huaweicloud.sermant.core.common.LoggerFactory; + import java.util.LinkedList; import java.util.List; import java.util.concurrent.Executors; diff --git a/sermant-plugins/sermant-server-monitor/monitor-common/src/main/java/com/huawei/sermant/plugin/monitor/common/config/ServiceConfig.java b/sermant-plugins/sermant-server-monitor/monitor-common/src/main/java/com/huawei/sermant/plugin/monitor/common/config/ServiceConfig.java index ff9807001c..069c4fdaf7 100644 --- a/sermant-plugins/sermant-server-monitor/monitor-common/src/main/java/com/huawei/sermant/plugin/monitor/common/config/ServiceConfig.java +++ b/sermant-plugins/sermant-server-monitor/monitor-common/src/main/java/com/huawei/sermant/plugin/monitor/common/config/ServiceConfig.java @@ -16,8 +16,8 @@ package com.huawei.sermant.plugin.monitor.common.config; -import com.huawei.sermant.core.config.common.ConfigTypeKey; -import com.huawei.sermant.core.plugin.config.PluginConfig; +import com.huaweicloud.sermant.core.config.common.ConfigTypeKey; +import com.huaweicloud.sermant.core.plugin.config.PluginConfig; @ConfigTypeKey("service.config") public class ServiceConfig implements PluginConfig { diff --git a/sermant-plugins/sermant-server-monitor/monitor-common/src/main/java/com/huawei/sermant/plugin/monitor/common/service/DatabasePeerParseService.java b/sermant-plugins/sermant-server-monitor/monitor-common/src/main/java/com/huawei/sermant/plugin/monitor/common/service/DatabasePeerParseService.java index a71f7f88cb..74294b7ea4 100644 --- a/sermant-plugins/sermant-server-monitor/monitor-common/src/main/java/com/huawei/sermant/plugin/monitor/common/service/DatabasePeerParseService.java +++ b/sermant-plugins/sermant-server-monitor/monitor-common/src/main/java/com/huawei/sermant/plugin/monitor/common/service/DatabasePeerParseService.java @@ -16,7 +16,7 @@ package com.huawei.sermant.plugin.monitor.common.service; -import com.huawei.sermant.core.plugin.service.PluginService; +import com.huaweicloud.sermant.core.plugin.service.PluginService; import java.util.Optional; diff --git a/sermant-plugins/sermant-server-monitor/monitor-common/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.config.PluginConfig b/sermant-plugins/sermant-server-monitor/monitor-common/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.config.PluginConfig similarity index 100% rename from sermant-plugins/sermant-server-monitor/monitor-common/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.config.PluginConfig rename to sermant-plugins/sermant-server-monitor/monitor-common/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.config.PluginConfig diff --git a/sermant-plugins/sermant-server-monitor/server-monitor-service/pom.xml b/sermant-plugins/sermant-server-monitor/server-monitor-service/pom.xml index 2d306389e2..c68d187fcb 100644 --- a/sermant-plugins/sermant-server-monitor/server-monitor-service/pom.xml +++ b/sermant-plugins/sermant-server-monitor/server-monitor-service/pom.xml @@ -18,7 +18,7 @@ - com.huawei.sermant + com.huaweicloud.sermant sermant-agentcore-core provided diff --git a/sermant-plugins/sermant-server-monitor/server-monitor-service/src/main/java/com/huawei/sermant/plugin/servermonitor/collector/IbmJvmMetricCollector.java b/sermant-plugins/sermant-server-monitor/server-monitor-service/src/main/java/com/huawei/sermant/plugin/servermonitor/collector/IbmJvmMetricCollector.java index 8758b5ed49..c8ce5d425e 100644 --- a/sermant-plugins/sermant-server-monitor/server-monitor-service/src/main/java/com/huawei/sermant/plugin/servermonitor/collector/IbmJvmMetricCollector.java +++ b/sermant-plugins/sermant-server-monitor/server-monitor-service/src/main/java/com/huawei/sermant/plugin/servermonitor/collector/IbmJvmMetricCollector.java @@ -16,11 +16,12 @@ package com.huawei.sermant.plugin.servermonitor.collector; -import com.huawei.sermant.core.common.LoggerFactory; import com.huawei.sermant.plugin.servermonitor.common.CheckIBMParameter; import com.huawei.sermant.plugin.servermonitor.entity.IbmPoolMetric; import com.huawei.sermant.plugin.servermonitor.entity.IbmPoolType; +import com.huaweicloud.sermant.core.common.LoggerFactory; + import java.lang.management.ManagementFactory; import java.lang.management.MemoryPoolMXBean; import java.lang.management.MemoryUsage; diff --git a/sermant-plugins/sermant-server-monitor/server-monitor-service/src/main/java/com/huawei/sermant/plugin/servermonitor/command/CommandExecutor.java b/sermant-plugins/sermant-server-monitor/server-monitor-service/src/main/java/com/huawei/sermant/plugin/servermonitor/command/CommandExecutor.java index 95caef2add..539958e183 100644 --- a/sermant-plugins/sermant-server-monitor/server-monitor-service/src/main/java/com/huawei/sermant/plugin/servermonitor/command/CommandExecutor.java +++ b/sermant-plugins/sermant-server-monitor/server-monitor-service/src/main/java/com/huawei/sermant/plugin/servermonitor/command/CommandExecutor.java @@ -16,10 +16,11 @@ package com.huawei.sermant.plugin.servermonitor.command; -import com.huawei.sermant.core.common.LoggerFactory; import com.huawei.sermant.plugin.servermonitor.common.StreamHandler; import com.huawei.sermant.plugin.servermonitor.common.VoidStreamHandler; +import com.huaweicloud.sermant.core.common.LoggerFactory; + import java.io.IOException; import java.io.InputStream; import java.util.concurrent.Callable; diff --git a/sermant-plugins/sermant-server-monitor/server-monitor-service/src/main/java/com/huawei/sermant/plugin/servermonitor/command/CommonMonitorCommand.java b/sermant-plugins/sermant-server-monitor/server-monitor-service/src/main/java/com/huawei/sermant/plugin/servermonitor/command/CommonMonitorCommand.java index 839a462ebb..2b5cf750e6 100644 --- a/sermant-plugins/sermant-server-monitor/server-monitor-service/src/main/java/com/huawei/sermant/plugin/servermonitor/command/CommonMonitorCommand.java +++ b/sermant-plugins/sermant-server-monitor/server-monitor-service/src/main/java/com/huawei/sermant/plugin/servermonitor/command/CommonMonitorCommand.java @@ -16,7 +16,10 @@ package com.huawei.sermant.plugin.servermonitor.command; -import com.huawei.sermant.core.common.LoggerFactory; +import static com.huawei.sermant.plugin.monitor.common.utils.CommonUtil.getStackTrace; + +import com.huaweicloud.sermant.core.common.LoggerFactory; + import org.apache.commons.io.IOUtils; import java.io.IOException; @@ -26,8 +29,6 @@ import java.util.List; import java.util.logging.Logger; -import static com.huawei.sermant.plugin.monitor.common.utils.CommonUtil.getStackTrace; - /** * 使用通用错误处理方式的{@link MonitorCommand},即通过日志输出错误信息,当错误 * 信息的长度超过200时,则忽略超过该长度的内容,并在日志内容结尾添加省略号。 diff --git a/sermant-plugins/sermant-server-monitor/server-monitor-service/src/main/java/com/huawei/sermant/plugin/servermonitor/command/CpuCommand.java b/sermant-plugins/sermant-server-monitor/server-monitor-service/src/main/java/com/huawei/sermant/plugin/servermonitor/command/CpuCommand.java index d847001e77..e564986e7b 100644 --- a/sermant-plugins/sermant-server-monitor/server-monitor-service/src/main/java/com/huawei/sermant/plugin/servermonitor/command/CpuCommand.java +++ b/sermant-plugins/sermant-server-monitor/server-monitor-service/src/main/java/com/huawei/sermant/plugin/servermonitor/command/CpuCommand.java @@ -16,14 +16,14 @@ package com.huawei.sermant.plugin.servermonitor.command; -import com.huawei.sermant.core.common.LoggerFactory; +import static com.huawei.sermant.plugin.servermonitor.common.Constant.REGEX_MULTI_SPACES; + +import com.huaweicloud.sermant.core.common.LoggerFactory; import java.io.InputStream; import java.util.List; import java.util.logging.Logger; -import static com.huawei.sermant.plugin.servermonitor.common.Constant.REGEX_MULTI_SPACES; - /** * 执行指令:cat /proc/stat * 输出如下内容: diff --git a/sermant-plugins/sermant-server-monitor/server-monitor-service/src/main/java/com/huawei/sermant/plugin/servermonitor/config/ServerMonitorConfig.java b/sermant-plugins/sermant-server-monitor/server-monitor-service/src/main/java/com/huawei/sermant/plugin/servermonitor/config/ServerMonitorConfig.java index c0746cc2aa..6d21c15a11 100644 --- a/sermant-plugins/sermant-server-monitor/server-monitor-service/src/main/java/com/huawei/sermant/plugin/servermonitor/config/ServerMonitorConfig.java +++ b/sermant-plugins/sermant-server-monitor/server-monitor-service/src/main/java/com/huawei/sermant/plugin/servermonitor/config/ServerMonitorConfig.java @@ -16,8 +16,9 @@ package com.huawei.sermant.plugin.servermonitor.config; -import com.huawei.sermant.core.config.common.ConfigTypeKey; -import com.huawei.sermant.core.plugin.config.PluginConfig; +import com.huaweicloud.sermant.core.config.common.ConfigTypeKey; +import com.huaweicloud.sermant.core.plugin.config.PluginConfig; + import lombok.Data; @Data diff --git a/sermant-plugins/sermant-server-monitor/server-monitor-service/src/main/java/com/huawei/sermant/plugin/servermonitor/provider/IbmJvmMetricProvider.java b/sermant-plugins/sermant-server-monitor/server-monitor-service/src/main/java/com/huawei/sermant/plugin/servermonitor/provider/IbmJvmMetricProvider.java index 55decbb387..9e2af6f47e 100644 --- a/sermant-plugins/sermant-server-monitor/server-monitor-service/src/main/java/com/huawei/sermant/plugin/servermonitor/provider/IbmJvmMetricProvider.java +++ b/sermant-plugins/sermant-server-monitor/server-monitor-service/src/main/java/com/huawei/sermant/plugin/servermonitor/provider/IbmJvmMetricProvider.java @@ -16,16 +16,17 @@ package com.huawei.sermant.plugin.servermonitor.provider; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.plugin.config.PluginConfigManager; -import com.huawei.sermant.core.service.ServiceManager; -import com.huawei.sermant.core.service.send.api.GatewayClient; import com.huawei.sermant.plugin.monitor.common.collect.MetricProvider; import com.huawei.sermant.plugin.monitor.common.config.ServiceConfig; import com.huawei.sermant.plugin.servermonitor.collector.IbmJvmMetricCollector; import com.huawei.sermant.plugin.servermonitor.entity.IbmJvmMetric; import com.huawei.sermant.plugin.servermonitor.entity.IbmJvmMetricCollection; +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.plugin.config.PluginConfigManager; +import com.huaweicloud.sermant.core.service.ServiceManager; +import com.huaweicloud.sermant.core.service.send.api.GatewayClient; + import java.util.List; import java.util.logging.Logger; diff --git a/sermant-plugins/sermant-server-monitor/server-monitor-service/src/main/java/com/huawei/sermant/plugin/servermonitor/provider/OpenJvmMetricProvider.java b/sermant-plugins/sermant-server-monitor/server-monitor-service/src/main/java/com/huawei/sermant/plugin/servermonitor/provider/OpenJvmMetricProvider.java index 6e3d6c66b7..6408e9bd42 100644 --- a/sermant-plugins/sermant-server-monitor/server-monitor-service/src/main/java/com/huawei/sermant/plugin/servermonitor/provider/OpenJvmMetricProvider.java +++ b/sermant-plugins/sermant-server-monitor/server-monitor-service/src/main/java/com/huawei/sermant/plugin/servermonitor/provider/OpenJvmMetricProvider.java @@ -22,13 +22,14 @@ package com.huawei.sermant.plugin.servermonitor.provider; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.plugin.config.PluginConfigManager; -import com.huawei.sermant.core.service.ServiceManager; -import com.huawei.sermant.core.service.send.api.GatewayClient; import com.huawei.sermant.plugin.monitor.common.collect.MetricProvider; import com.huawei.sermant.plugin.monitor.common.config.ServiceConfig; +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.plugin.config.PluginConfigManager; +import com.huaweicloud.sermant.core.service.ServiceManager; +import com.huaweicloud.sermant.core.service.send.api.GatewayClient; + import org.apache.skywalking.apm.agent.core.jvm.cpu.CPUProvider; import org.apache.skywalking.apm.agent.core.jvm.gc.GCProvider; import org.apache.skywalking.apm.agent.core.jvm.memory.MemoryProvider; diff --git a/sermant-plugins/sermant-server-monitor/server-monitor-service/src/main/java/com/huawei/sermant/plugin/servermonitor/provider/ServerMonitorMetricProvider.java b/sermant-plugins/sermant-server-monitor/server-monitor-service/src/main/java/com/huawei/sermant/plugin/servermonitor/provider/ServerMonitorMetricProvider.java index 161fae677e..6c766767ba 100644 --- a/sermant-plugins/sermant-server-monitor/server-monitor-service/src/main/java/com/huawei/sermant/plugin/servermonitor/provider/ServerMonitorMetricProvider.java +++ b/sermant-plugins/sermant-server-monitor/server-monitor-service/src/main/java/com/huawei/sermant/plugin/servermonitor/provider/ServerMonitorMetricProvider.java @@ -16,10 +16,6 @@ package com.huawei.sermant.plugin.servermonitor.provider; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.plugin.config.PluginConfigManager; -import com.huawei.sermant.core.service.ServiceManager; -import com.huawei.sermant.core.service.send.api.GatewayClient; import com.huawei.sermant.plugin.monitor.common.collect.MetricProvider; import com.huawei.sermant.plugin.monitor.common.config.ServiceConfig; import com.huawei.sermant.plugin.servermonitor.collector.CpuMetricCollector; @@ -29,6 +25,11 @@ import com.huawei.sermant.plugin.servermonitor.entity.ServerMetric; import com.huawei.sermant.plugin.servermonitor.entity.ServerMetricCollection; +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.plugin.config.PluginConfigManager; +import com.huaweicloud.sermant.core.service.ServiceManager; +import com.huaweicloud.sermant.core.service.send.api.GatewayClient; + import java.util.List; import java.util.logging.Logger; diff --git a/sermant-plugins/sermant-server-monitor/server-monitor-service/src/main/java/com/huawei/sermant/plugin/servermonitor/service/MonitorService.java b/sermant-plugins/sermant-server-monitor/server-monitor-service/src/main/java/com/huawei/sermant/plugin/servermonitor/service/MonitorService.java index 5fd0f589bb..ffc4df55df 100644 --- a/sermant-plugins/sermant-server-monitor/server-monitor-service/src/main/java/com/huawei/sermant/plugin/servermonitor/service/MonitorService.java +++ b/sermant-plugins/sermant-server-monitor/server-monitor-service/src/main/java/com/huawei/sermant/plugin/servermonitor/service/MonitorService.java @@ -16,12 +16,6 @@ package com.huawei.sermant.plugin.servermonitor.service; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.config.ConfigManager; -import com.huawei.sermant.core.plugin.config.PluginConfigManager; -import com.huawei.sermant.core.plugin.service.PluginService; -import com.huawei.sermant.core.service.ServiceManager; -import com.huawei.sermant.core.service.send.api.GatewayClient; import com.huawei.sermant.plugin.monitor.common.collect.CollectTask; import com.huawei.sermant.plugin.monitor.common.config.ServiceConfig; import com.huawei.sermant.plugin.servermonitor.config.ServerMonitorConfig; @@ -31,6 +25,13 @@ import com.huawei.sermant.plugin.servermonitor.provider.OpenJvmMetricProvider; import com.huawei.sermant.plugin.servermonitor.provider.ServerMonitorMetricProvider; +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.config.ConfigManager; +import com.huaweicloud.sermant.core.plugin.config.PluginConfigManager; +import com.huaweicloud.sermant.core.plugin.service.PluginService; +import com.huaweicloud.sermant.core.service.ServiceManager; +import com.huaweicloud.sermant.core.service.send.api.GatewayClient; + import java.net.InetAddress; import java.net.NetworkInterface; import java.net.SocketException; diff --git a/sermant-plugins/sermant-server-monitor/server-monitor-service/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.config.PluginConfig b/sermant-plugins/sermant-server-monitor/server-monitor-service/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.config.PluginConfig similarity index 100% rename from sermant-plugins/sermant-server-monitor/server-monitor-service/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.config.PluginConfig rename to sermant-plugins/sermant-server-monitor/server-monitor-service/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.config.PluginConfig diff --git a/sermant-plugins/sermant-server-monitor/server-monitor-service/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.service.PluginService b/sermant-plugins/sermant-server-monitor/server-monitor-service/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.service.PluginService similarity index 100% rename from sermant-plugins/sermant-server-monitor/server-monitor-service/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.service.PluginService rename to sermant-plugins/sermant-server-monitor/server-monitor-service/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.service.PluginService diff --git a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/pom.xml b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/pom.xml index e4c6707dde..5ce6207d3a 100644 --- a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/pom.xml +++ b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/pom.xml @@ -23,7 +23,7 @@ - com.huawei.sermant + com.huaweicloud.sermant sermant-agentcore-core provided diff --git a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/alibaba/ServiceCenterRegistry.java b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/alibaba/ServiceCenterRegistry.java index 4ded4d2326..53993f36b2 100644 --- a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/alibaba/ServiceCenterRegistry.java +++ b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/alibaba/ServiceCenterRegistry.java @@ -17,7 +17,8 @@ package com.huawei.dubbo.registry.alibaba; import com.huawei.dubbo.registry.service.RegistryService; -import com.huawei.sermant.core.service.ServiceManager; + +import com.huaweicloud.sermant.core.service.ServiceManager; import com.alibaba.dubbo.registry.NotifyListener; import com.alibaba.dubbo.registry.support.FailbackRegistry; diff --git a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/apache/ServiceCenterRegistry.java b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/apache/ServiceCenterRegistry.java index 3315732120..106afa3674 100644 --- a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/apache/ServiceCenterRegistry.java +++ b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/apache/ServiceCenterRegistry.java @@ -17,7 +17,8 @@ package com.huawei.dubbo.registry.apache; import com.huawei.dubbo.registry.service.RegistryService; -import com.huawei.sermant.core.service.ServiceManager; + +import com.huaweicloud.sermant.core.service.ServiceManager; import org.apache.dubbo.registry.NotifyListener; import org.apache.dubbo.registry.support.FailbackRegistry; diff --git a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/declarer/AbstractDeclarer.java b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/declarer/AbstractDeclarer.java index 52451c570b..239ba338de 100644 --- a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/declarer/AbstractDeclarer.java +++ b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/declarer/AbstractDeclarer.java @@ -16,9 +16,9 @@ package com.huawei.dubbo.registry.declarer; -import com.huawei.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; -import com.huawei.sermant.core.plugin.agent.matcher.ClassMatcher; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; +import com.huaweicloud.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.matcher.ClassMatcher; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; /** * 实例增强基类 diff --git a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/declarer/ApplicationConfigDeclarer.java b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/declarer/ApplicationConfigDeclarer.java index 81c8a46cd6..5787ceb4c0 100644 --- a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/declarer/ApplicationConfigDeclarer.java +++ b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/declarer/ApplicationConfigDeclarer.java @@ -16,8 +16,8 @@ package com.huawei.dubbo.registry.declarer; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; /** * ApplicationConfig增强类 diff --git a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/declarer/ConfigValidationDeclarer.java b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/declarer/ConfigValidationDeclarer.java index b981f0cd43..b6974f0e52 100644 --- a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/declarer/ConfigValidationDeclarer.java +++ b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/declarer/ConfigValidationDeclarer.java @@ -16,7 +16,7 @@ package com.huawei.dubbo.registry.declarer; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; /** * 增强ConfigValidationUtils类的extractRegistryType方法 diff --git a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/declarer/ExtensionLoaderDeclarer.java b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/declarer/ExtensionLoaderDeclarer.java index e168911176..407e5353d8 100644 --- a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/declarer/ExtensionLoaderDeclarer.java +++ b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/declarer/ExtensionLoaderDeclarer.java @@ -16,8 +16,8 @@ package com.huawei.dubbo.registry.declarer; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; /** * 增强ExtensionLoader类的createExtension方法 diff --git a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/declarer/InterfaceConfigDeclarer.java b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/declarer/InterfaceConfigDeclarer.java index ad5f9a533a..42b69995ea 100644 --- a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/declarer/InterfaceConfigDeclarer.java +++ b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/declarer/InterfaceConfigDeclarer.java @@ -16,8 +16,8 @@ package com.huawei.dubbo.registry.declarer; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; /** * AbstractInterfaceConfig增强类 diff --git a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/declarer/MigrationRuleDeclarer.java b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/declarer/MigrationRuleDeclarer.java index 9a3a458af2..f08835acf1 100644 --- a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/declarer/MigrationRuleDeclarer.java +++ b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/declarer/MigrationRuleDeclarer.java @@ -16,7 +16,7 @@ package com.huawei.dubbo.registry.declarer; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; /** * 增强MigrationRule类的parse方法 diff --git a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/declarer/MigrationRuleHandlerDeclarer.java b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/declarer/MigrationRuleHandlerDeclarer.java index 73089a3293..acbfc425ea 100644 --- a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/declarer/MigrationRuleHandlerDeclarer.java +++ b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/declarer/MigrationRuleHandlerDeclarer.java @@ -16,8 +16,8 @@ package com.huawei.dubbo.registry.declarer; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; /** * MigrationRuleHandler增强类 diff --git a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/declarer/RegistryConfigDeclarer.java b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/declarer/RegistryConfigDeclarer.java index 8884178317..9a4765c13f 100644 --- a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/declarer/RegistryConfigDeclarer.java +++ b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/declarer/RegistryConfigDeclarer.java @@ -17,8 +17,9 @@ package com.huawei.dubbo.registry.declarer; import com.huawei.dubbo.registry.constants.Constant; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; + +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; /** * RegistryConfig增强类 diff --git a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/declarer/RegistryProtocolDeclarer.java b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/declarer/RegistryProtocolDeclarer.java index 7823a619fa..389ed789cc 100644 --- a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/declarer/RegistryProtocolDeclarer.java +++ b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/declarer/RegistryProtocolDeclarer.java @@ -16,10 +16,10 @@ package com.huawei.dubbo.registry.declarer; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; +import com.huaweicloud.sermant.dependencies.net.bytebuddy.matcher.ElementMatchers; -import net.bytebuddy.matcher.ElementMatchers; /** * InterfaceCompatibleRegistryProtocol增强类 diff --git a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/declarer/SpringBootDeclarer.java b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/declarer/SpringBootDeclarer.java index 960db00884..2884758c26 100644 --- a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/declarer/SpringBootDeclarer.java +++ b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/declarer/SpringBootDeclarer.java @@ -16,8 +16,8 @@ package com.huawei.dubbo.registry.declarer; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; -import com.huawei.sermant.core.plugin.agent.matcher.ClassMatcher; +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.matcher.ClassMatcher; /** * 增强SpringBootApplication类的main方法 diff --git a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/interceptor/ApplicationConfigInterceptor.java b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/interceptor/ApplicationConfigInterceptor.java index 0e23d214d0..b9f21084f9 100644 --- a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/interceptor/ApplicationConfigInterceptor.java +++ b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/interceptor/ApplicationConfigInterceptor.java @@ -17,9 +17,10 @@ package com.huawei.dubbo.registry.interceptor; import com.huawei.dubbo.registry.service.ApplicationConfigService; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.plugin.agent.interceptor.AbstractInterceptor; -import com.huawei.sermant.core.service.ServiceManager; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.agent.interceptor.AbstractInterceptor; +import com.huaweicloud.sermant.core.service.ServiceManager; /** * 增强ApplicationConfig类的setName方法 diff --git a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/interceptor/ConfigValidationInterceptor.java b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/interceptor/ConfigValidationInterceptor.java index 1c23db8975..2a11ce52ef 100644 --- a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/interceptor/ConfigValidationInterceptor.java +++ b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/interceptor/ConfigValidationInterceptor.java @@ -18,8 +18,9 @@ import com.huawei.dubbo.registry.constants.Constant; import com.huawei.dubbo.registry.utils.CollectionUtils; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.plugin.agent.interceptor.AbstractInterceptor; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.agent.interceptor.AbstractInterceptor; import org.apache.dubbo.common.URL; diff --git a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/interceptor/ExtensionLoaderInterceptor.java b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/interceptor/ExtensionLoaderInterceptor.java index 6a00095224..4738464d8b 100644 --- a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/interceptor/ExtensionLoaderInterceptor.java +++ b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/interceptor/ExtensionLoaderInterceptor.java @@ -18,8 +18,9 @@ import com.huawei.dubbo.registry.constants.Constant; import com.huawei.dubbo.registry.utils.ReflectUtils; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.plugin.agent.interceptor.AbstractInterceptor; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.agent.interceptor.AbstractInterceptor; import java.util.Map; import java.util.Optional; diff --git a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/interceptor/InterfaceConfigInterceptor.java b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/interceptor/InterfaceConfigInterceptor.java index d1234d750d..2ff59a13db 100644 --- a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/interceptor/InterfaceConfigInterceptor.java +++ b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/interceptor/InterfaceConfigInterceptor.java @@ -17,9 +17,10 @@ package com.huawei.dubbo.registry.interceptor; import com.huawei.dubbo.registry.service.RegistryConfigService; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.plugin.agent.interceptor.AbstractInterceptor; -import com.huawei.sermant.core.service.ServiceManager; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.agent.interceptor.AbstractInterceptor; +import com.huaweicloud.sermant.core.service.ServiceManager; /** * 增强AbstractInterfaceConfig类的setRegistries/loadRegistriesFromBackwardConfig方法 diff --git a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/interceptor/MigrationRuleHandlerInterceptor.java b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/interceptor/MigrationRuleHandlerInterceptor.java index 772f95bdc5..68c2e22eaf 100644 --- a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/interceptor/MigrationRuleHandlerInterceptor.java +++ b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/interceptor/MigrationRuleHandlerInterceptor.java @@ -17,9 +17,10 @@ package com.huawei.dubbo.registry.interceptor; import com.huawei.dubbo.registry.constants.Constant; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.plugin.agent.interceptor.AbstractInterceptor; + +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.agent.interceptor.AbstractInterceptor; import org.apache.dubbo.registry.client.migration.MigrationInvoker; import org.apache.dubbo.registry.client.migration.MigrationRuleHandler; diff --git a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/interceptor/MigrationRuleInterceptor.java b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/interceptor/MigrationRuleInterceptor.java index 80b8829e98..499fac3587 100644 --- a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/interceptor/MigrationRuleInterceptor.java +++ b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/interceptor/MigrationRuleInterceptor.java @@ -17,8 +17,9 @@ package com.huawei.dubbo.registry.interceptor; import com.huawei.dubbo.registry.constants.Constant; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.plugin.agent.interceptor.AbstractInterceptor; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.agent.interceptor.AbstractInterceptor; import org.apache.dubbo.rpc.cluster.support.migration.MigrationRule; import org.apache.dubbo.rpc.cluster.support.migration.MigrationStep; diff --git a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/interceptor/RegistryConfigInterceptor.java b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/interceptor/RegistryConfigInterceptor.java index 3aa531c6bc..115aebe1e7 100644 --- a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/interceptor/RegistryConfigInterceptor.java +++ b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/interceptor/RegistryConfigInterceptor.java @@ -18,9 +18,10 @@ import com.huawei.dubbo.registry.constants.Constant; import com.huawei.registry.config.RegisterConfig; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.plugin.agent.interceptor.AbstractInterceptor; -import com.huawei.sermant.core.plugin.config.PluginConfigManager; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.agent.interceptor.AbstractInterceptor; +import com.huaweicloud.sermant.core.plugin.config.PluginConfigManager; /** * 增强RegistryConfig类的setProtocol/setAddress方法 diff --git a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/interceptor/RegistryProtocolInterceptor.java b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/interceptor/RegistryProtocolInterceptor.java index 967df2f86a..c44dd69f80 100644 --- a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/interceptor/RegistryProtocolInterceptor.java +++ b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/interceptor/RegistryProtocolInterceptor.java @@ -17,8 +17,9 @@ package com.huawei.dubbo.registry.interceptor; import com.huawei.dubbo.registry.constants.Constant; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.plugin.agent.interceptor.AbstractInterceptor; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.agent.interceptor.AbstractInterceptor; import org.apache.dubbo.common.URL; diff --git a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/interceptor/SpringBootInterceptor.java b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/interceptor/SpringBootInterceptor.java index 60c9480e36..9b3b22b0ce 100644 --- a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/interceptor/SpringBootInterceptor.java +++ b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/interceptor/SpringBootInterceptor.java @@ -17,9 +17,10 @@ package com.huawei.dubbo.registry.interceptor; import com.huawei.dubbo.registry.service.RegistryService; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.plugin.agent.interceptor.AbstractInterceptor; -import com.huawei.sermant.core.service.ServiceManager; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.agent.interceptor.AbstractInterceptor; +import com.huaweicloud.sermant.core.service.ServiceManager; /** * 增强SpringBootApplication类的main方法 diff --git a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/service/ApplicationConfigService.java b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/service/ApplicationConfigService.java index a537a20fdf..9343dff2c8 100644 --- a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/service/ApplicationConfigService.java +++ b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/service/ApplicationConfigService.java @@ -16,7 +16,7 @@ package com.huawei.dubbo.registry.service; -import com.huawei.sermant.core.plugin.service.PluginService; +import com.huaweicloud.sermant.core.plugin.service.PluginService; /** * 接口配置服务,代码中使用反射调用类方法是为了同时兼容alibaba和apache dubbo diff --git a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/service/RegistryConfigService.java b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/service/RegistryConfigService.java index 2287b64ac4..9229f0b44d 100644 --- a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/service/RegistryConfigService.java +++ b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/service/RegistryConfigService.java @@ -16,7 +16,7 @@ package com.huawei.dubbo.registry.service; -import com.huawei.sermant.core.plugin.service.PluginService; +import com.huaweicloud.sermant.core.plugin.service.PluginService; /** * 接口配置服务,代码中使用反射调用类方法是为了同时兼容alibaba和apache dubbo diff --git a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/service/RegistryService.java b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/service/RegistryService.java index 47a81f9bc8..c3793d4fa0 100644 --- a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/service/RegistryService.java +++ b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/service/RegistryService.java @@ -16,7 +16,7 @@ package com.huawei.dubbo.registry.service; -import com.huawei.sermant.core.plugin.service.PluginService; +import com.huaweicloud.sermant.core.plugin.service.PluginService; /** * 注册服务 diff --git a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/utils/ReflectUtils.java b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/utils/ReflectUtils.java index c0a799d646..99091877b5 100644 --- a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/utils/ReflectUtils.java +++ b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/java/com/huawei/dubbo/registry/utils/ReflectUtils.java @@ -18,8 +18,9 @@ import com.huawei.dubbo.registry.cache.DubboCache; import com.huawei.dubbo.registry.constants.Constant; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.utils.ClassLoaderUtils; + +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.utils.ClassLoaderUtils; import java.io.IOException; import java.lang.reflect.Constructor; diff --git a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.agent.declarer.PluginDeclarer b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.agent.declarer.PluginDeclarer similarity index 100% rename from sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.agent.declarer.PluginDeclarer rename to sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.agent.declarer.PluginDeclarer diff --git a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/test/java/com/huawei/dubbo/registry/ConfigValidationInterceptorTest.java b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/test/java/com/huawei/dubbo/registry/ConfigValidationInterceptorTest.java index f30a96aa50..e126218c61 100644 --- a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/test/java/com/huawei/dubbo/registry/ConfigValidationInterceptorTest.java +++ b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/test/java/com/huawei/dubbo/registry/ConfigValidationInterceptorTest.java @@ -17,7 +17,8 @@ package com.huawei.dubbo.registry; import com.huawei.dubbo.registry.interceptor.ConfigValidationInterceptor; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; import org.apache.dubbo.common.URL; import org.junit.Assert; diff --git a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/test/java/com/huawei/dubbo/registry/ExtensionLoaderInterceptorTest.java b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/test/java/com/huawei/dubbo/registry/ExtensionLoaderInterceptorTest.java index b0f897432f..18ca411dd6 100644 --- a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/test/java/com/huawei/dubbo/registry/ExtensionLoaderInterceptorTest.java +++ b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/test/java/com/huawei/dubbo/registry/ExtensionLoaderInterceptorTest.java @@ -19,11 +19,11 @@ import com.huawei.dubbo.registry.constants.Constant; import com.huawei.dubbo.registry.interceptor.ExtensionLoaderInterceptor; import com.huawei.dubbo.registry.utils.ReflectUtils; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; import com.alibaba.dubbo.common.extension.ExtensionLoader; import com.alibaba.dubbo.common.extension.SPI; import com.alibaba.dubbo.registry.RegistryFactory; +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; import org.junit.Assert; import org.junit.Test; diff --git a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/test/java/com/huawei/dubbo/registry/MigrationRuleHandlerInterceptorTest.java b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/test/java/com/huawei/dubbo/registry/MigrationRuleHandlerInterceptorTest.java index 67dcd08e7c..da63a31db8 100644 --- a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/test/java/com/huawei/dubbo/registry/MigrationRuleHandlerInterceptorTest.java +++ b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/test/java/com/huawei/dubbo/registry/MigrationRuleHandlerInterceptorTest.java @@ -18,7 +18,8 @@ import com.huawei.dubbo.registry.constants.Constant; import com.huawei.dubbo.registry.interceptor.MigrationRuleHandlerInterceptor; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; import org.apache.dubbo.common.URL; import org.apache.dubbo.registry.client.migration.MigrationInvoker; diff --git a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/test/java/com/huawei/dubbo/registry/MigrationRuleInterceptorTest.java b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/test/java/com/huawei/dubbo/registry/MigrationRuleInterceptorTest.java index 104e306b55..c4508bf978 100644 --- a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/test/java/com/huawei/dubbo/registry/MigrationRuleInterceptorTest.java +++ b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/test/java/com/huawei/dubbo/registry/MigrationRuleInterceptorTest.java @@ -18,7 +18,8 @@ import com.huawei.dubbo.registry.constants.Constant; import com.huawei.dubbo.registry.interceptor.MigrationRuleInterceptor; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; import org.apache.dubbo.config.ApplicationConfig; import org.apache.dubbo.rpc.cluster.support.migration.MigrationRule; diff --git a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/test/java/com/huawei/dubbo/registry/RegistryConfigInterceptorTest.java b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/test/java/com/huawei/dubbo/registry/RegistryConfigInterceptorTest.java index 3df1cc2628..f426b86e56 100644 --- a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/test/java/com/huawei/dubbo/registry/RegistryConfigInterceptorTest.java +++ b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/test/java/com/huawei/dubbo/registry/RegistryConfigInterceptorTest.java @@ -19,9 +19,9 @@ import com.huawei.dubbo.registry.constants.Constant; import com.huawei.dubbo.registry.interceptor.RegistryConfigInterceptor; import com.huawei.registry.config.RegisterConfig; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; import com.alibaba.dubbo.config.RegistryConfig; +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; import org.junit.Assert; import org.junit.Test; diff --git a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/test/java/com/huawei/dubbo/registry/RegistryFactoryTest.java b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/test/java/com/huawei/dubbo/registry/RegistryFactoryTest.java index 871c950414..8887c4619b 100644 --- a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/test/java/com/huawei/dubbo/registry/RegistryFactoryTest.java +++ b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/test/java/com/huawei/dubbo/registry/RegistryFactoryTest.java @@ -19,10 +19,10 @@ import com.huawei.dubbo.registry.alibaba.ServiceCenterRegistry; import com.huawei.dubbo.registry.alibaba.ServiceCenterRegistryFactory; import com.huawei.dubbo.registry.service.RegistryService; -import com.huawei.sermant.core.service.BaseService; -import com.huawei.sermant.core.service.ServiceManager; import com.alibaba.dubbo.common.URL; +import com.huaweicloud.sermant.core.service.BaseService; +import com.huaweicloud.sermant.core.service.ServiceManager; import org.junit.Assert; import org.junit.Test; diff --git a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/test/java/com/huawei/dubbo/registry/RegistryProtocolInterceptorTest.java b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/test/java/com/huawei/dubbo/registry/RegistryProtocolInterceptorTest.java index 7296ba0671..50444ff706 100644 --- a/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/test/java/com/huawei/dubbo/registry/RegistryProtocolInterceptorTest.java +++ b/sermant-plugins/sermant-service-registry/dubbo-registry-plugin/src/test/java/com/huawei/dubbo/registry/RegistryProtocolInterceptorTest.java @@ -17,7 +17,8 @@ package com.huawei.dubbo.registry; import com.huawei.dubbo.registry.interceptor.RegistryProtocolInterceptor; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; import org.apache.dubbo.common.URL; import org.apache.dubbo.config.ApplicationConfig; diff --git a/sermant-plugins/sermant-service-registry/dubbo-registry-service/pom.xml b/sermant-plugins/sermant-service-registry/dubbo-registry-service/pom.xml index 059858621f..3ab2c8a192 100644 --- a/sermant-plugins/sermant-service-registry/dubbo-registry-service/pom.xml +++ b/sermant-plugins/sermant-service-registry/dubbo-registry-service/pom.xml @@ -25,7 +25,7 @@ - com.huawei.sermant + com.huaweicloud.sermant sermant-agentcore-core provided diff --git a/sermant-plugins/sermant-service-registry/dubbo-registry-service/src/main/java/com/huawei/dubbo/registry/service/ApplicationConfigServiceImpl.java b/sermant-plugins/sermant-service-registry/dubbo-registry-service/src/main/java/com/huawei/dubbo/registry/service/ApplicationConfigServiceImpl.java index e9c4c30a93..7af7e9cdda 100644 --- a/sermant-plugins/sermant-service-registry/dubbo-registry-service/src/main/java/com/huawei/dubbo/registry/service/ApplicationConfigServiceImpl.java +++ b/sermant-plugins/sermant-service-registry/dubbo-registry-service/src/main/java/com/huawei/dubbo/registry/service/ApplicationConfigServiceImpl.java @@ -18,7 +18,8 @@ import com.huawei.dubbo.registry.cache.DubboCache; import com.huawei.dubbo.registry.utils.ReflectUtils; -import com.huawei.sermant.core.utils.StringUtils; + +import com.huaweicloud.sermant.core.utils.StringUtils; /** * 应用配置服务,代码中使用反射调用类方法是为了同时兼容alibaba和apache dubbo diff --git a/sermant-plugins/sermant-service-registry/dubbo-registry-service/src/main/java/com/huawei/dubbo/registry/service/RegistryConfigServiceImpl.java b/sermant-plugins/sermant-service-registry/dubbo-registry-service/src/main/java/com/huawei/dubbo/registry/service/RegistryConfigServiceImpl.java index a4c4584fbe..23ea36302e 100644 --- a/sermant-plugins/sermant-service-registry/dubbo-registry-service/src/main/java/com/huawei/dubbo/registry/service/RegistryConfigServiceImpl.java +++ b/sermant-plugins/sermant-service-registry/dubbo-registry-service/src/main/java/com/huawei/dubbo/registry/service/RegistryConfigServiceImpl.java @@ -20,7 +20,8 @@ import com.huawei.dubbo.registry.utils.CollectionUtils; import com.huawei.dubbo.registry.utils.ReflectUtils; import com.huawei.registry.config.RegisterConfig; -import com.huawei.sermant.core.plugin.config.PluginConfigManager; + +import com.huaweicloud.sermant.core.plugin.config.PluginConfigManager; import java.util.List; import java.util.Optional; diff --git a/sermant-plugins/sermant-service-registry/dubbo-registry-service/src/main/java/com/huawei/dubbo/registry/service/RegistryServiceImpl.java b/sermant-plugins/sermant-service-registry/dubbo-registry-service/src/main/java/com/huawei/dubbo/registry/service/RegistryServiceImpl.java index dc63123b6e..cf1dd0459c 100644 --- a/sermant-plugins/sermant-service-registry/dubbo-registry-service/src/main/java/com/huawei/dubbo/registry/service/RegistryServiceImpl.java +++ b/sermant-plugins/sermant-service-registry/dubbo-registry-service/src/main/java/com/huawei/dubbo/registry/service/RegistryServiceImpl.java @@ -25,12 +25,13 @@ import com.huawei.dubbo.registry.utils.CollectionUtils; import com.huawei.dubbo.registry.utils.ReflectUtils; import com.huawei.registry.config.RegisterConfig; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.plugin.common.PluginConstant; -import com.huawei.sermant.core.plugin.common.PluginSchemaValidator; -import com.huawei.sermant.core.plugin.config.PluginConfigManager; -import com.huawei.sermant.core.utils.JarFileUtils; -import com.huawei.sermant.core.utils.StringUtils; + +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.plugin.common.PluginConstant; +import com.huaweicloud.sermant.core.plugin.common.PluginSchemaValidator; +import com.huaweicloud.sermant.core.plugin.config.PluginConfigManager; +import com.huaweicloud.sermant.core.utils.JarFileUtils; +import com.huaweicloud.sermant.core.utils.StringUtils; import com.alibaba.fastjson.JSONArray; import com.google.common.eventbus.EventBus; diff --git a/sermant-plugins/sermant-service-registry/dubbo-registry-service/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.service.PluginService b/sermant-plugins/sermant-service-registry/dubbo-registry-service/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.service.PluginService similarity index 100% rename from sermant-plugins/sermant-service-registry/dubbo-registry-service/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.service.PluginService rename to sermant-plugins/sermant-service-registry/dubbo-registry-service/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.service.PluginService diff --git a/sermant-plugins/sermant-service-registry/registry-common/pom.xml b/sermant-plugins/sermant-service-registry/registry-common/pom.xml index 497fd88205..9c973ab6d5 100644 --- a/sermant-plugins/sermant-service-registry/registry-common/pom.xml +++ b/sermant-plugins/sermant-service-registry/registry-common/pom.xml @@ -18,7 +18,7 @@ - com.huawei.sermant + com.huaweicloud.sermant sermant-agentcore-core provided diff --git a/sermant-plugins/sermant-service-registry/registry-common/src/main/java/com/huawei/registry/config/RegisterConfig.java b/sermant-plugins/sermant-service-registry/registry-common/src/main/java/com/huawei/registry/config/RegisterConfig.java index 4d86d3731c..efa9c7af96 100644 --- a/sermant-plugins/sermant-service-registry/registry-common/src/main/java/com/huawei/registry/config/RegisterConfig.java +++ b/sermant-plugins/sermant-service-registry/registry-common/src/main/java/com/huawei/registry/config/RegisterConfig.java @@ -17,11 +17,11 @@ package com.huawei.registry.config; -import com.huawei.sermant.core.config.ConfigManager; -import com.huawei.sermant.core.config.common.ConfigTypeKey; -import com.huawei.sermant.core.plugin.config.PluginConfig; -import com.huawei.sermant.core.plugin.config.ServiceMeta; -import com.huawei.sermant.core.utils.StringUtils; +import com.huaweicloud.sermant.core.config.ConfigManager; +import com.huaweicloud.sermant.core.config.common.ConfigTypeKey; +import com.huaweicloud.sermant.core.plugin.config.PluginConfig; +import com.huaweicloud.sermant.core.plugin.config.ServiceMeta; +import com.huaweicloud.sermant.core.utils.StringUtils; import java.util.ArrayList; import java.util.Arrays; diff --git a/sermant-plugins/sermant-service-registry/registry-common/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.config.PluginConfig b/sermant-plugins/sermant-service-registry/registry-common/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.config.PluginConfig similarity index 100% rename from sermant-plugins/sermant-service-registry/registry-common/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.config.PluginConfig rename to sermant-plugins/sermant-service-registry/registry-common/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.config.PluginConfig diff --git a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/pom.xml b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/pom.xml index 701b982269..4d8706252d 100644 --- a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/pom.xml +++ b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/pom.xml @@ -21,7 +21,7 @@ - com.huawei.sermant + com.huaweicloud.sermant sermant-agentcore-core provided diff --git a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/config/RegisterDynamicConfigSyncer.java b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/config/RegisterDynamicConfigSyncer.java index 3eee7af16e..2d6666b2a6 100644 --- a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/config/RegisterDynamicConfigSyncer.java +++ b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/config/RegisterDynamicConfigSyncer.java @@ -19,13 +19,14 @@ import com.huawei.registry.context.RegisterContext; import com.huawei.registry.handler.SingleStateCloseHandler; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.plugin.service.PluginService; -import com.huawei.sermant.core.service.ServiceManager; -import com.huawei.sermant.core.service.dynamicconfig.DynamicConfigService; -import com.huawei.sermant.core.service.dynamicconfig.common.DynamicConfigEvent; -import com.huawei.sermant.core.service.dynamicconfig.common.DynamicConfigEventType; -import com.huawei.sermant.core.service.dynamicconfig.common.DynamicConfigListener; + +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.plugin.service.PluginService; +import com.huaweicloud.sermant.core.service.ServiceManager; +import com.huaweicloud.sermant.core.service.dynamicconfig.DynamicConfigService; +import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigEvent; +import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigEventType; +import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigListener; import java.util.Locale; import java.util.logging.Logger; diff --git a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/declarers/ClientConfigDeclarer.java b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/declarers/ClientConfigDeclarer.java index a44bcd4b8d..56b71a2509 100644 --- a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/declarers/ClientConfigDeclarer.java +++ b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/declarers/ClientConfigDeclarer.java @@ -17,10 +17,11 @@ package com.huawei.registry.declarers; import com.huawei.registry.interceptors.ClientConfigInterceptor; -import com.huawei.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; -import com.huawei.sermant.core.plugin.agent.matcher.ClassMatcher; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; + +import com.huaweicloud.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.matcher.ClassMatcher; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; /** * 针对eureka,consul注册中心获取实例列表拦截 diff --git a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/declarers/DiscoveryClientConfigurationDeclarer.java b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/declarers/DiscoveryClientConfigurationDeclarer.java index 075dc203fe..6a1f8fbb66 100644 --- a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/declarers/DiscoveryClientConfigurationDeclarer.java +++ b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/declarers/DiscoveryClientConfigurationDeclarer.java @@ -17,10 +17,11 @@ package com.huawei.registry.declarers; import com.huawei.registry.interceptors.ClientConfigurationInterceptor; -import com.huawei.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; -import com.huawei.sermant.core.plugin.agent.matcher.ClassMatcher; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; + +import com.huaweicloud.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.matcher.ClassMatcher; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; /** * 获取查询原注册中心查询实例列表客户端 diff --git a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/declarers/DiscoveryClientDeclarer.java b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/declarers/DiscoveryClientDeclarer.java index da80ad3038..0d153352f4 100644 --- a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/declarers/DiscoveryClientDeclarer.java +++ b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/declarers/DiscoveryClientDeclarer.java @@ -17,10 +17,11 @@ package com.huawei.registry.declarers; import com.huawei.registry.interceptors.DiscoveryClientInterceptor; -import com.huawei.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; -import com.huawei.sermant.core.plugin.agent.matcher.ClassMatcher; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; + +import com.huaweicloud.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.matcher.ClassMatcher; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; /** * 针对eureka,consul注册中心获取实例列表拦截 diff --git a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/declarers/RegistrationDeclarer.java b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/declarers/RegistrationDeclarer.java index df02cc7db8..4fa6ed1969 100644 --- a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/declarers/RegistrationDeclarer.java +++ b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/declarers/RegistrationDeclarer.java @@ -17,10 +17,11 @@ package com.huawei.registry.declarers; import com.huawei.registry.interceptors.RegistrationInterceptor; -import com.huawei.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; -import com.huawei.sermant.core.plugin.agent.matcher.ClassMatcher; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; + +import com.huaweicloud.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.matcher.ClassMatcher; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; /** * 注册增强 diff --git a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/declarers/ServerListDeclarer.java b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/declarers/ServerListDeclarer.java index 128b690cde..81503723b9 100644 --- a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/declarers/ServerListDeclarer.java +++ b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/declarers/ServerListDeclarer.java @@ -17,10 +17,11 @@ package com.huawei.registry.declarers; import com.huawei.registry.interceptors.ServerListInterceptor; -import com.huawei.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; -import com.huawei.sermant.core.plugin.agent.matcher.ClassMatcher; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; + +import com.huaweicloud.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.matcher.ClassMatcher; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; /** * 注册增强 diff --git a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/declarers/ServerListFilterDeclarer.java b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/declarers/ServerListFilterDeclarer.java index 6f28dcd0b5..bfc246805f 100644 --- a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/declarers/ServerListFilterDeclarer.java +++ b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/declarers/ServerListFilterDeclarer.java @@ -17,10 +17,11 @@ package com.huawei.registry.declarers; import com.huawei.registry.interceptors.ServerListFilterInterceptor; -import com.huawei.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; -import com.huawei.sermant.core.plugin.agent.matcher.ClassMatcher; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; + +import com.huaweicloud.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.matcher.ClassMatcher; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; /** * 针对ServerList filter增强 diff --git a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/declarers/cloud3/x/ZookeeperInstanceSupplierDeclarer.java b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/declarers/cloud3/x/ZookeeperInstanceSupplierDeclarer.java index 30cf0bf5cd..ca2cfbde4a 100644 --- a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/declarers/cloud3/x/ZookeeperInstanceSupplierDeclarer.java +++ b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/declarers/cloud3/x/ZookeeperInstanceSupplierDeclarer.java @@ -17,10 +17,11 @@ package com.huawei.registry.declarers.cloud3.x; import com.huawei.registry.interceptors.cloud3.x.ZookeeperInstanceSupplierInterceptor; -import com.huawei.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; -import com.huawei.sermant.core.plugin.agent.matcher.ClassMatcher; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; + +import com.huaweicloud.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.matcher.ClassMatcher; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; /** * 针对springCloud 3.x获取实例列表兼容 diff --git a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/declarers/health/ConsulHealthDeclarer.java b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/declarers/health/ConsulHealthDeclarer.java index 8a9431b873..ee437f032f 100644 --- a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/declarers/health/ConsulHealthDeclarer.java +++ b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/declarers/health/ConsulHealthDeclarer.java @@ -17,10 +17,11 @@ package com.huawei.registry.declarers.health; import com.huawei.registry.interceptors.health.ConsulHealthInterceptor; -import com.huawei.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; -import com.huawei.sermant.core.plugin.agent.matcher.ClassMatcher; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; + +import com.huaweicloud.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.matcher.ClassMatcher; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; /** * consul健康检测增强 diff --git a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/declarers/health/ConsulWatchConDeclarer.java b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/declarers/health/ConsulWatchConDeclarer.java index 2fd8922ca7..9df9e02e80 100644 --- a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/declarers/health/ConsulWatchConDeclarer.java +++ b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/declarers/health/ConsulWatchConDeclarer.java @@ -18,10 +18,11 @@ import com.huawei.registry.interceptors.health.ConsulWatchInterceptor; import com.huawei.registry.interceptors.health.ConsulWatchRequestInterceptor; -import com.huawei.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; -import com.huawei.sermant.core.plugin.agent.matcher.ClassMatcher; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; + +import com.huaweicloud.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.matcher.ClassMatcher; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; /** * consul健康检测增强 diff --git a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/declarers/health/EurekaHealthDeclarer.java b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/declarers/health/EurekaHealthDeclarer.java index 69b38c5a9b..4b6426a226 100644 --- a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/declarers/health/EurekaHealthDeclarer.java +++ b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/declarers/health/EurekaHealthDeclarer.java @@ -18,10 +18,11 @@ import com.huawei.registry.interceptors.health.EurekaHealthInterceptor; import com.huawei.registry.interceptors.health.EurekaRegisterInterceptor; -import com.huawei.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; -import com.huawei.sermant.core.plugin.agent.matcher.ClassMatcher; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; + +import com.huaweicloud.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.matcher.ClassMatcher; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; /** * 针对健康判定拦截 diff --git a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/declarers/health/NacosHealthDeclarer.java b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/declarers/health/NacosHealthDeclarer.java index 1c0b7f9a8b..2137e4cbfa 100644 --- a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/declarers/health/NacosHealthDeclarer.java +++ b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/declarers/health/NacosHealthDeclarer.java @@ -17,10 +17,11 @@ package com.huawei.registry.declarers.health; import com.huawei.registry.interceptors.health.NacosHealthInterceptor; -import com.huawei.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; -import com.huawei.sermant.core.plugin.agent.matcher.ClassMatcher; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; + +import com.huaweicloud.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.matcher.ClassMatcher; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; /** * nacos健康检测增强 diff --git a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/declarers/health/ZookeeperHealthDeclarer.java b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/declarers/health/ZookeeperHealthDeclarer.java index bd262987b1..52c30af4ed 100644 --- a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/declarers/health/ZookeeperHealthDeclarer.java +++ b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/declarers/health/ZookeeperHealthDeclarer.java @@ -17,10 +17,11 @@ package com.huawei.registry.declarers.health; import com.huawei.registry.interceptors.health.ZookeeperHealthInterceptor; -import com.huawei.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; -import com.huawei.sermant.core.plugin.agent.declarer.InterceptDeclarer; -import com.huawei.sermant.core.plugin.agent.matcher.ClassMatcher; -import com.huawei.sermant.core.plugin.agent.matcher.MethodMatcher; + +import com.huaweicloud.sermant.core.plugin.agent.declarer.AbstractPluginDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.declarer.InterceptDeclarer; +import com.huaweicloud.sermant.core.plugin.agent.matcher.ClassMatcher; +import com.huaweicloud.sermant.core.plugin.agent.matcher.MethodMatcher; /** * zookeeper注册中心健康状态检测 diff --git a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/handler/SingleStateCloseHandler.java b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/handler/SingleStateCloseHandler.java index 83e0a044f8..e2b4d7691e 100644 --- a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/handler/SingleStateCloseHandler.java +++ b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/handler/SingleStateCloseHandler.java @@ -19,7 +19,8 @@ import com.huawei.registry.config.RegisterDynamicConfig; import com.huawei.registry.context.RegisterContext; import com.huawei.registry.support.RegisterSwitchSupport; -import com.huawei.sermant.core.common.LoggerFactory; + +import com.huaweicloud.sermant.core.common.LoggerFactory; import java.util.Locale; import java.util.concurrent.atomic.AtomicBoolean; diff --git a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/ClientConfigInterceptor.java b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/ClientConfigInterceptor.java index 5a25d3c57c..9f536604ee 100644 --- a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/ClientConfigInterceptor.java +++ b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/ClientConfigInterceptor.java @@ -18,8 +18,8 @@ import com.huawei.registry.context.RegisterContext; import com.huawei.registry.support.RegisterSwitchSupport; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; import com.netflix.client.config.IClientConfig; /** diff --git a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/ClientConfigurationInterceptor.java b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/ClientConfigurationInterceptor.java index 5a77231a70..946aa9825e 100644 --- a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/ClientConfigurationInterceptor.java +++ b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/ClientConfigurationInterceptor.java @@ -18,7 +18,8 @@ import com.huawei.registry.context.RegisterContext; import com.huawei.registry.support.RegisterSwitchSupport; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; import org.springframework.cloud.client.discovery.composite.CompositeDiscoveryClient; diff --git a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/DiscoveryClientInterceptor.java b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/DiscoveryClientInterceptor.java index d1de9121e0..711c57bfc1 100644 --- a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/DiscoveryClientInterceptor.java +++ b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/DiscoveryClientInterceptor.java @@ -20,9 +20,10 @@ import com.huawei.registry.entity.MicroServiceInstance; import com.huawei.registry.services.RegisterCenterService; import com.huawei.registry.support.InstanceInterceptorSupport; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.service.ServiceManager; + +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.service.ServiceManager; import org.springframework.cloud.client.ServiceInstance; import org.springframework.cloud.client.discovery.composite.CompositeDiscoveryClient; diff --git a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/RegistrationInterceptor.java b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/RegistrationInterceptor.java index 18013aa8de..f4f776c148 100644 --- a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/RegistrationInterceptor.java +++ b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/RegistrationInterceptor.java @@ -20,8 +20,9 @@ import com.huawei.registry.entity.FixedResult; import com.huawei.registry.services.RegisterCenterService; import com.huawei.registry.support.RegisterSwitchSupport; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.service.ServiceManager; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.service.ServiceManager; import org.springframework.cloud.client.serviceregistry.Registration; diff --git a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/ServerListFilterInterceptor.java b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/ServerListFilterInterceptor.java index ba5c0764ee..82304d1ca8 100644 --- a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/ServerListFilterInterceptor.java +++ b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/ServerListFilterInterceptor.java @@ -17,8 +17,8 @@ package com.huawei.registry.interceptors; import com.huawei.registry.support.InstanceInterceptorSupport; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; import com.netflix.loadbalancer.Server; import java.util.ArrayList; diff --git a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/ServerListInterceptor.java b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/ServerListInterceptor.java index 111c7b205b..b3172273e6 100644 --- a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/ServerListInterceptor.java +++ b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/ServerListInterceptor.java @@ -20,10 +20,10 @@ import com.huawei.registry.entity.MicroServiceInstance; import com.huawei.registry.services.RegisterCenterService; import com.huawei.registry.support.InstanceInterceptorSupport; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.service.ServiceManager; +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.service.ServiceManager; import com.netflix.client.config.IClientConfig; import com.netflix.loadbalancer.Server; import com.netflix.loadbalancer.ServerList; diff --git a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/cloud3/x/ZookeeperInstanceSupplierInterceptor.java b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/cloud3/x/ZookeeperInstanceSupplierInterceptor.java index 6cd318406b..d0dc54a696 100644 --- a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/cloud3/x/ZookeeperInstanceSupplierInterceptor.java +++ b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/cloud3/x/ZookeeperInstanceSupplierInterceptor.java @@ -18,7 +18,8 @@ import com.huawei.registry.context.RegisterContext; import com.huawei.registry.support.InstanceInterceptorSupport; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; import org.springframework.cloud.client.ServiceInstance; diff --git a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/health/ConsulHealthInterceptor.java b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/health/ConsulHealthInterceptor.java index e800d4c09a..f5a24a1c76 100644 --- a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/health/ConsulHealthInterceptor.java +++ b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/health/ConsulHealthInterceptor.java @@ -18,8 +18,9 @@ import com.huawei.registry.context.RegisterContext; import com.huawei.registry.handler.SingleStateCloseHandler; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; + +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; import org.springframework.cloud.consul.discovery.ConsulCatalogWatch; diff --git a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/health/ConsulWatchInterceptor.java b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/health/ConsulWatchInterceptor.java index c38f2d4040..f2c9400d4c 100644 --- a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/health/ConsulWatchInterceptor.java +++ b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/health/ConsulWatchInterceptor.java @@ -18,7 +18,8 @@ import com.huawei.registry.context.RegisterContext; import com.huawei.registry.support.RegisterSwitchSupport; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; /** * 拦截ConsulCatalogWatch,用于后续关闭服务 diff --git a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/health/ConsulWatchRequestInterceptor.java b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/health/ConsulWatchRequestInterceptor.java index b5a3acd70c..1e04f4f20c 100644 --- a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/health/ConsulWatchRequestInterceptor.java +++ b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/health/ConsulWatchRequestInterceptor.java @@ -18,7 +18,8 @@ import com.huawei.registry.config.RegisterDynamicConfig; import com.huawei.registry.support.RegisterSwitchSupport; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; /** * 针对1.x.x consul版本做的定时任务处理适配 diff --git a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/health/EurekaHealthInterceptor.java b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/health/EurekaHealthInterceptor.java index 3629d9d932..42b59f0add 100644 --- a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/health/EurekaHealthInterceptor.java +++ b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/health/EurekaHealthInterceptor.java @@ -18,8 +18,9 @@ import com.huawei.registry.context.RegisterContext; import com.huawei.registry.handler.SingleStateCloseHandler; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; + +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; import java.util.logging.Logger; diff --git a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/health/EurekaRegisterInterceptor.java b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/health/EurekaRegisterInterceptor.java index d348879242..f961138cca 100644 --- a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/health/EurekaRegisterInterceptor.java +++ b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/health/EurekaRegisterInterceptor.java @@ -19,7 +19,8 @@ import com.huawei.registry.config.RegisterDynamicConfig; import com.huawei.registry.support.RegisterSwitchSupport; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; /** * Eureka定时器注入入口拦截 diff --git a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/health/NacosHealthInterceptor.java b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/health/NacosHealthInterceptor.java index 32bd4b4bf5..e6a714dc84 100644 --- a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/health/NacosHealthInterceptor.java +++ b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/health/NacosHealthInterceptor.java @@ -18,8 +18,9 @@ import com.huawei.registry.context.RegisterContext; import com.huawei.registry.handler.SingleStateCloseHandler; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; + +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; import com.alibaba.nacos.client.naming.beat.BeatInfo; import com.fasterxml.jackson.databind.node.ObjectNode; diff --git a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/health/ZookeeperHealthInterceptor.java b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/health/ZookeeperHealthInterceptor.java index 10a25e8d3d..bf73c426a5 100644 --- a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/health/ZookeeperHealthInterceptor.java +++ b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/interceptors/health/ZookeeperHealthInterceptor.java @@ -19,8 +19,9 @@ import com.huawei.registry.context.RegisterContext; import com.huawei.registry.handler.SingleStateCloseHandler; import com.huawei.registry.support.FieldAccessAction; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; + +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; import org.apache.curator.framework.CuratorFramework; import org.apache.curator.framework.recipes.cache.TreeCacheEvent; diff --git a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/services/RegisterCenterService.java b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/services/RegisterCenterService.java index 174f276d31..3eb7615022 100644 --- a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/services/RegisterCenterService.java +++ b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/services/RegisterCenterService.java @@ -18,7 +18,8 @@ import com.huawei.registry.entity.FixedResult; import com.huawei.registry.entity.MicroServiceInstance; -import com.huawei.sermant.core.plugin.service.PluginService; + +import com.huaweicloud.sermant.core.plugin.service.PluginService; import java.util.List; diff --git a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/support/InstanceInterceptorSupport.java b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/support/InstanceInterceptorSupport.java index 71d6dcf039..7aaaffa10e 100644 --- a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/support/InstanceInterceptorSupport.java +++ b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/support/InstanceInterceptorSupport.java @@ -19,8 +19,9 @@ import com.huawei.registry.config.RegisterConfig; import com.huawei.registry.entity.MicroServiceInstance; -import com.huawei.sermant.core.plugin.config.PluginConfigManager; -import com.huawei.sermant.core.utils.ClassLoaderUtils; + +import com.huaweicloud.sermant.core.plugin.config.PluginConfigManager; +import com.huaweicloud.sermant.core.utils.ClassLoaderUtils; import java.io.IOException; import java.lang.reflect.Constructor; diff --git a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/support/RegisterSwitchSupport.java b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/support/RegisterSwitchSupport.java index 59927d019d..376391f8d0 100644 --- a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/support/RegisterSwitchSupport.java +++ b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/support/RegisterSwitchSupport.java @@ -18,9 +18,10 @@ package com.huawei.registry.support; import com.huawei.registry.config.RegisterConfig; -import com.huawei.sermant.core.plugin.agent.entity.ExecuteContext; -import com.huawei.sermant.core.plugin.agent.interceptor.Interceptor; -import com.huawei.sermant.core.plugin.config.PluginConfigManager; + +import com.huaweicloud.sermant.core.plugin.agent.entity.ExecuteContext; +import com.huaweicloud.sermant.core.plugin.agent.interceptor.Interceptor; +import com.huaweicloud.sermant.core.plugin.config.PluginConfigManager; /** * 注册开关控制 diff --git a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/utils/CommonUtils.java b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/utils/CommonUtils.java index 8ac8b14186..b1a885681d 100644 --- a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/utils/CommonUtils.java +++ b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/utils/CommonUtils.java @@ -18,7 +18,8 @@ package com.huawei.registry.utils; import com.huawei.registry.support.FieldAccessAction; -import com.huawei.sermant.core.common.LoggerFactory; + +import com.huaweicloud.sermant.core.common.LoggerFactory; import java.lang.reflect.Field; import java.security.AccessController; diff --git a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/utils/HostUtils.java b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/utils/HostUtils.java index 11af4d7a88..3fcaa7a687 100644 --- a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/utils/HostUtils.java +++ b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/utils/HostUtils.java @@ -17,7 +17,7 @@ package com.huawei.registry.utils; -import com.huawei.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.common.LoggerFactory; import java.net.Inet4Address; import java.net.InetAddress; diff --git a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.agent.declarer.PluginDeclarer b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.agent.declarer.PluginDeclarer similarity index 100% rename from sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.agent.declarer.PluginDeclarer rename to sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.agent.declarer.PluginDeclarer diff --git a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.service.PluginService b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.service.PluginService similarity index 100% rename from sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.service.PluginService rename to sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.service.PluginService diff --git a/sermant-plugins/sermant-service-registry/spring-cloud-registry-service/pom.xml b/sermant-plugins/sermant-service-registry/spring-cloud-registry-service/pom.xml index df28ecf63a..a28e8692c3 100644 --- a/sermant-plugins/sermant-service-registry/spring-cloud-registry-service/pom.xml +++ b/sermant-plugins/sermant-service-registry/spring-cloud-registry-service/pom.xml @@ -24,7 +24,7 @@ - com.huawei.sermant + com.huaweicloud.sermant sermant-agentcore-core provided diff --git a/sermant-plugins/sermant-service-registry/spring-cloud-registry-service/src/main/java/com/huawei/registry/service/client/ScClient.java b/sermant-plugins/sermant-service-registry/spring-cloud-registry-service/src/main/java/com/huawei/registry/service/client/ScClient.java index 29c89ac191..5979eaafbf 100644 --- a/sermant-plugins/sermant-service-registry/spring-cloud-registry-service/src/main/java/com/huawei/registry/service/client/ScClient.java +++ b/sermant-plugins/sermant-service-registry/spring-cloud-registry-service/src/main/java/com/huawei/registry/service/client/ScClient.java @@ -22,12 +22,13 @@ import com.huawei.registry.config.RegisterConfig; import com.huawei.registry.context.RegisterContext; import com.huawei.registry.utils.HostUtils; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.plugin.common.PluginConstant; -import com.huawei.sermant.core.plugin.common.PluginSchemaValidator; -import com.huawei.sermant.core.plugin.config.PluginConfigManager; -import com.huawei.sermant.core.utils.JarFileUtils; -import com.huawei.sermant.core.utils.StringUtils; + +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.plugin.common.PluginConstant; +import com.huaweicloud.sermant.core.plugin.common.PluginSchemaValidator; +import com.huaweicloud.sermant.core.plugin.config.PluginConfigManager; +import com.huaweicloud.sermant.core.utils.JarFileUtils; +import com.huaweicloud.sermant.core.utils.StringUtils; import com.google.common.eventbus.EventBus; import com.google.common.eventbus.Subscribe; diff --git a/sermant-plugins/sermant-service-registry/spring-cloud-registry-service/src/main/java/com/huawei/registry/service/impl/RegisterCenterServiceImpl.java b/sermant-plugins/sermant-service-registry/spring-cloud-registry-service/src/main/java/com/huawei/registry/service/impl/RegisterCenterServiceImpl.java index 410668e139..efd5be627e 100644 --- a/sermant-plugins/sermant-service-registry/spring-cloud-registry-service/src/main/java/com/huawei/registry/service/impl/RegisterCenterServiceImpl.java +++ b/sermant-plugins/sermant-service-registry/spring-cloud-registry-service/src/main/java/com/huawei/registry/service/impl/RegisterCenterServiceImpl.java @@ -21,8 +21,9 @@ import com.huawei.registry.entity.MicroServiceInstance; import com.huawei.registry.service.register.RegisterManager; import com.huawei.registry.services.RegisterCenterService; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.plugin.config.PluginConfigManager; + +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.plugin.config.PluginConfigManager; import java.util.Collections; import java.util.List; diff --git a/sermant-plugins/sermant-service-registry/spring-cloud-registry-service/src/main/java/com/huawei/registry/service/register/RegisterManager.java b/sermant-plugins/sermant-service-registry/spring-cloud-registry-service/src/main/java/com/huawei/registry/service/register/RegisterManager.java index 6ce5cba336..7d510588f4 100644 --- a/sermant-plugins/sermant-service-registry/spring-cloud-registry-service/src/main/java/com/huawei/registry/service/register/RegisterManager.java +++ b/sermant-plugins/sermant-service-registry/spring-cloud-registry-service/src/main/java/com/huawei/registry/service/register/RegisterManager.java @@ -18,7 +18,8 @@ import com.huawei.registry.config.RegisterConfig; import com.huawei.registry.entity.MicroServiceInstance; -import com.huawei.sermant.core.plugin.config.PluginConfigManager; + +import com.huaweicloud.sermant.core.plugin.config.PluginConfigManager; import java.util.Collections; import java.util.HashMap; diff --git a/sermant-plugins/sermant-service-registry/spring-cloud-registry-service/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.service.PluginService b/sermant-plugins/sermant-service-registry/spring-cloud-registry-service/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.service.PluginService similarity index 100% rename from sermant-plugins/sermant-service-registry/spring-cloud-registry-service/src/main/resources/META-INF/services/com.huawei.sermant.core.plugin.service.PluginService rename to sermant-plugins/sermant-service-registry/spring-cloud-registry-service/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.plugin.service.PluginService diff --git a/sermant-plugins/sermant-service-registry/spring-cloud-registry-service/src/test/java/com/huawei/registry/service/client/BaseTest.java b/sermant-plugins/sermant-service-registry/spring-cloud-registry-service/src/test/java/com/huawei/registry/service/client/BaseTest.java index badbf0ba08..1ee35a6bc1 100644 --- a/sermant-plugins/sermant-service-registry/spring-cloud-registry-service/src/test/java/com/huawei/registry/service/client/BaseTest.java +++ b/sermant-plugins/sermant-service-registry/spring-cloud-registry-service/src/test/java/com/huawei/registry/service/client/BaseTest.java @@ -17,14 +17,15 @@ package com.huawei.registry.service.client; import com.huawei.registry.config.RegisterConfig; -import com.huawei.sermant.core.common.CommonConstant; -import com.huawei.sermant.core.common.LoggerFactory; -import com.huawei.sermant.core.config.ConfigManager; -import com.huawei.sermant.core.config.common.BaseConfig; -import com.huawei.sermant.core.service.ServiceManager; -import com.huawei.sermant.core.service.send.config.BackendConfig; -import com.huawei.sermant.core.service.dynamicconfig.config.DynamicConfig; -import com.huawei.sermant.core.service.heartbeat.config.HeartbeatConfig; + +import com.huaweicloud.sermant.core.common.CommonConstant; +import com.huaweicloud.sermant.core.common.LoggerFactory; +import com.huaweicloud.sermant.core.config.ConfigManager; +import com.huaweicloud.sermant.core.config.common.BaseConfig; +import com.huaweicloud.sermant.core.service.ServiceManager; +import com.huaweicloud.sermant.core.service.dynamicconfig.config.DynamicConfig; +import com.huaweicloud.sermant.core.service.heartbeat.config.HeartbeatConfig; +import com.huaweicloud.sermant.core.service.send.config.BackendConfig; import org.junit.Assert; import org.junit.BeforeClass; diff --git a/sermant-plugins/sermant-threadlocal/threadlocal-plugin/pom.xml b/sermant-plugins/sermant-threadlocal/threadlocal-plugin/pom.xml index 3732a5f660..8a6fc93daf 100644 --- a/sermant-plugins/sermant-threadlocal/threadlocal-plugin/pom.xml +++ b/sermant-plugins/sermant-threadlocal/threadlocal-plugin/pom.xml @@ -17,7 +17,7 @@ - com.huawei.sermant + com.huaweicloud.sermant sermant-agentcore-core provided diff --git a/sermant-plugins/sermant-threadlocal/threadlocal-plugin/src/main/java/com/huawei/lubanops/apm/plugin/common/Constant.java b/sermant-plugins/sermant-threadlocal/threadlocal-plugin/src/main/java/com/huawei/lubanops/apm/plugin/common/Constant.java new file mode 100644 index 0000000000..23162e55db --- /dev/null +++ b/sermant-plugins/sermant-threadlocal/threadlocal-plugin/src/main/java/com/huawei/lubanops/apm/plugin/common/Constant.java @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2021-2021 Huawei Technologies Co., Ltd. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * 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.huawei.lubanops.apm.plugin.common; + +/** + * 通用参数 + * + * @author yiwei + * @since 2021-10-21 + */ +public class Constant { + /** + * 拦截类的全限定名 + */ + public static final String INTERCEPT_CLASS = "com.lubanops.apm.plugin.threadlocal.ThreadPoolInterceptor"; + + private Constant() { + } +} diff --git a/sermant-plugins/sermant-threadlocal/threadlocal-plugin/src/main/java/com/huawei/lubanops/apm/plugin/threadlocal/ScheduledThreadPoolEnhance.java b/sermant-plugins/sermant-threadlocal/threadlocal-plugin/src/main/java/com/huawei/lubanops/apm/plugin/threadlocal/ScheduledThreadPoolEnhance.java new file mode 100644 index 0000000000..66099eca9f --- /dev/null +++ b/sermant-plugins/sermant-threadlocal/threadlocal-plugin/src/main/java/com/huawei/lubanops/apm/plugin/threadlocal/ScheduledThreadPoolEnhance.java @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2021-2021 Huawei Technologies Co., Ltd. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * 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.huawei.lubanops.apm.plugin.threadlocal; + +import static com.huawei.lubanops.apm.plugin.common.Constant.INTERCEPT_CLASS; + +import com.huaweicloud.sermant.core.agent.definition.EnhanceDefinition; +import com.huaweicloud.sermant.core.agent.definition.MethodInterceptPoint; +import com.huaweicloud.sermant.core.agent.matcher.ClassMatcher; +import com.huaweicloud.sermant.core.agent.matcher.ClassMatchers; +import com.huaweicloud.sermant.dependencies.net.bytebuddy.matcher.ElementMatchers; + +/** + * ScheduledThreadpool 增强 + * + * @author yiwei + * @since 2021-10-21 + */ +public class ScheduledThreadPoolEnhance implements EnhanceDefinition { + /** + * 增强类的全限定名 + */ + private static final String ENHANCE_CLASS = "java.util.concurrent.ScheduledThreadPoolExecutor"; + + @Override + public ClassMatcher enhanceClass() { + return ClassMatchers.named(ENHANCE_CLASS); + } + + @Override + public MethodInterceptPoint[] getMethodInterceptPoints() { + return new MethodInterceptPoint[]{MethodInterceptPoint.newInstMethodInterceptPoint(INTERCEPT_CLASS, + ElementMatchers.namedOneOf("schedule", "scheduleAtFixedRate","scheduleWithFixedDelay", + "submit", "execute"))}; + } +} diff --git a/sermant-plugins/sermant-threadlocal/threadlocal-plugin/src/main/java/com/huawei/lubanops/apm/plugin/threadlocal/ThreadPoolEnhance.java b/sermant-plugins/sermant-threadlocal/threadlocal-plugin/src/main/java/com/huawei/lubanops/apm/plugin/threadlocal/ThreadPoolEnhance.java new file mode 100644 index 0000000000..dc95ddfe42 --- /dev/null +++ b/sermant-plugins/sermant-threadlocal/threadlocal-plugin/src/main/java/com/huawei/lubanops/apm/plugin/threadlocal/ThreadPoolEnhance.java @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2021-2021 Huawei Technologies Co., Ltd. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * 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.huawei.lubanops.apm.plugin.threadlocal; + +import static com.huawei.lubanops.apm.plugin.common.Constant.INTERCEPT_CLASS; + +import com.huaweicloud.sermant.core.agent.definition.EnhanceDefinition; +import com.huaweicloud.sermant.core.agent.definition.MethodInterceptPoint; +import com.huaweicloud.sermant.core.agent.matcher.ClassMatcher; +import com.huaweicloud.sermant.core.agent.matcher.ClassMatchers; +import com.huaweicloud.sermant.dependencies.net.bytebuddy.matcher.ElementMatchers; + +/** + * Threadpool 增强 + * + * @author yiwei + * @since 2021-10-21 + */ +public class ThreadPoolEnhance implements EnhanceDefinition { + /** + * 增强类的全限定名 + */ + private static final String ENHANCE_CLASS = "java.util.concurrent.ThreadPoolExecutor"; + + @Override + public ClassMatcher enhanceClass() { + return ClassMatchers.named(ENHANCE_CLASS); + } + + @Override + public MethodInterceptPoint[] getMethodInterceptPoints() { + return new MethodInterceptPoint[]{MethodInterceptPoint.newInstMethodInterceptPoint(INTERCEPT_CLASS, + ElementMatchers.namedOneOf("execute", "remove"))}; + } +} diff --git a/sermant-plugins/sermant-threadlocal/threadlocal-plugin/src/main/java/com/lubanops/apm/plugin/threadlocal/ThreadPoolInterceptor.java b/sermant-plugins/sermant-threadlocal/threadlocal-plugin/src/main/java/com/huawei/lubanops/apm/plugin/threadlocal/ThreadPoolInterceptor.java similarity index 54% rename from sermant-plugins/sermant-threadlocal/threadlocal-plugin/src/main/java/com/lubanops/apm/plugin/threadlocal/ThreadPoolInterceptor.java rename to sermant-plugins/sermant-threadlocal/threadlocal-plugin/src/main/java/com/huawei/lubanops/apm/plugin/threadlocal/ThreadPoolInterceptor.java index b7bfa7ebda..fd2202e591 100644 --- a/sermant-plugins/sermant-threadlocal/threadlocal-plugin/src/main/java/com/lubanops/apm/plugin/threadlocal/ThreadPoolInterceptor.java +++ b/sermant-plugins/sermant-threadlocal/threadlocal-plugin/src/main/java/com/huawei/lubanops/apm/plugin/threadlocal/ThreadPoolInterceptor.java @@ -1,9 +1,26 @@ -package com.lubanops.apm.plugin.threadlocal; +/* + * Copyright (C) 2021-2021 Huawei Technologies Co., Ltd. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * 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.huawei.lubanops.apm.plugin.threadlocal; + +import com.huaweicloud.sermant.core.agent.common.BeforeResult; +import com.huaweicloud.sermant.core.agent.interceptor.InstanceMethodInterceptor; import com.alibaba.ttl.TtlCallable; import com.alibaba.ttl.TtlRunnable; -import com.huawei.sermant.core.agent.common.BeforeResult; -import com.huawei.sermant.core.agent.interceptor.InstanceMethodInterceptor; import java.lang.reflect.Method; import java.util.concurrent.Callable; @@ -11,8 +28,8 @@ /** * 线程池增强,替换Runnable和Callable参数 * - * @author y00556973 - * @since 2021/10/11 + * @author yiwei + * @since 2021-10-11 */ public class ThreadPoolInterceptor implements InstanceMethodInterceptor { @Override diff --git a/sermant-plugins/sermant-threadlocal/threadlocal-plugin/src/main/java/com/lubanops/apm/plugin/common/Constant.java b/sermant-plugins/sermant-threadlocal/threadlocal-plugin/src/main/java/com/lubanops/apm/plugin/common/Constant.java deleted file mode 100644 index 1a63b4e177..0000000000 --- a/sermant-plugins/sermant-threadlocal/threadlocal-plugin/src/main/java/com/lubanops/apm/plugin/common/Constant.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.lubanops.apm.plugin.common; - -/** - * 通用参数 - * - * @author yiwei - * @since 2021/10/21 - */ -public interface Constant { - /** - * 拦截类的全限定名 - */ - String INTERCEPT_CLASS = "com.lubanops.apm.plugin.threadlocal.ThreadPoolInterceptor"; -} diff --git a/sermant-plugins/sermant-threadlocal/threadlocal-plugin/src/main/java/com/lubanops/apm/plugin/threadlocal/ScheduledThreadPoolEnhance.java b/sermant-plugins/sermant-threadlocal/threadlocal-plugin/src/main/java/com/lubanops/apm/plugin/threadlocal/ScheduledThreadPoolEnhance.java deleted file mode 100644 index a3ba61db5e..0000000000 --- a/sermant-plugins/sermant-threadlocal/threadlocal-plugin/src/main/java/com/lubanops/apm/plugin/threadlocal/ScheduledThreadPoolEnhance.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.lubanops.apm.plugin.threadlocal; - -import com.huawei.sermant.core.agent.definition.EnhanceDefinition; -import com.huawei.sermant.core.agent.definition.MethodInterceptPoint; -import com.huawei.sermant.core.agent.matcher.ClassMatcher; -import com.huawei.sermant.core.agent.matcher.ClassMatchers; -import com.lubanops.apm.plugin.common.Constant; -import net.bytebuddy.matcher.ElementMatchers; - -/** - * ScheduledThreadpool 增强 - * - * @author yiwei - * @since 2021/10/21 - */ -public class ScheduledThreadPoolEnhance implements EnhanceDefinition, Constant { - /** - * 增强类的全限定名 - */ - private static final String ENHANCE_CLASS = "java.util.concurrent.ScheduledThreadPoolExecutor"; - - @Override - public ClassMatcher enhanceClass() { - return ClassMatchers.named(ENHANCE_CLASS); - } - - @Override - public MethodInterceptPoint[] getMethodInterceptPoints() { - return new MethodInterceptPoint[]{MethodInterceptPoint.newInstMethodInterceptPoint(INTERCEPT_CLASS, - ElementMatchers.namedOneOf("schedule", "scheduleAtFixedRate","scheduleWithFixedDelay", - "submit", "execute"))}; - } -} diff --git a/sermant-plugins/sermant-threadlocal/threadlocal-plugin/src/main/java/com/lubanops/apm/plugin/threadlocal/ThreadPoolEnhance.java b/sermant-plugins/sermant-threadlocal/threadlocal-plugin/src/main/java/com/lubanops/apm/plugin/threadlocal/ThreadPoolEnhance.java deleted file mode 100644 index 0d10647cb1..0000000000 --- a/sermant-plugins/sermant-threadlocal/threadlocal-plugin/src/main/java/com/lubanops/apm/plugin/threadlocal/ThreadPoolEnhance.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.lubanops.apm.plugin.threadlocal; - -import com.huawei.sermant.core.agent.definition.EnhanceDefinition; -import com.huawei.sermant.core.agent.definition.MethodInterceptPoint; -import com.huawei.sermant.core.agent.matcher.ClassMatcher; -import com.huawei.sermant.core.agent.matcher.ClassMatchers; -import com.lubanops.apm.plugin.common.Constant; -import net.bytebuddy.matcher.ElementMatchers; - -/** - * Threadpool 增强 - * - * @author yiwei - * @since 2021/10/21 - */ -public class ThreadPoolEnhance implements EnhanceDefinition, Constant { - /** - * 增强类的全限定名 - */ - private static final String ENHANCE_CLASS = "java.util.concurrent.ThreadPoolExecutor"; - - @Override - public ClassMatcher enhanceClass() { - return ClassMatchers.named(ENHANCE_CLASS); - } - - @Override - public MethodInterceptPoint[] getMethodInterceptPoints() { - return new MethodInterceptPoint[]{MethodInterceptPoint.newInstMethodInterceptPoint(INTERCEPT_CLASS, - ElementMatchers.namedOneOf("execute", "remove"))}; - } -} diff --git a/sermant-plugins/sermant-threadlocal/threadlocal-plugin/src/main/resources/META-INF/services/com.huawei.sermant.core.agent.definition.EnhanceDefinition b/sermant-plugins/sermant-threadlocal/threadlocal-plugin/src/main/resources/META-INF/services/com.huawei.sermant.core.agent.definition.EnhanceDefinition deleted file mode 100644 index a5e4ad9b1b..0000000000 --- a/sermant-plugins/sermant-threadlocal/threadlocal-plugin/src/main/resources/META-INF/services/com.huawei.sermant.core.agent.definition.EnhanceDefinition +++ /dev/null @@ -1,2 +0,0 @@ -com.lubanops.apm.plugin.threadlocal.ThreadPoolEnhance -com.lubanops.apm.plugin.threadlocal.ScheduledThreadPoolEnhance \ No newline at end of file diff --git a/sermant-plugins/sermant-threadlocal/threadlocal-plugin/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.agent.definition.EnhanceDefinition b/sermant-plugins/sermant-threadlocal/threadlocal-plugin/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.agent.definition.EnhanceDefinition new file mode 100644 index 0000000000..c52cc66eb2 --- /dev/null +++ b/sermant-plugins/sermant-threadlocal/threadlocal-plugin/src/main/resources/META-INF/services/com.huaweicloud.sermant.core.agent.definition.EnhanceDefinition @@ -0,0 +1,2 @@ +com.huawei.lubanops.apm.plugin.threadlocal.ThreadPoolEnhance +com.huawei.lubanops.apm.plugin.threadlocal.ScheduledThreadPoolEnhance \ No newline at end of file