Commit Graph

19 Commits

Author SHA1 Message Date
huazhongming 730695a7a2
[3.2]Use spotless to format the code (#13320)
* Use spotless to format the code

Signed-off-by: crazyhzm <crazyhzm@gmail.com>

* Support develop with JDK 21

Signed-off-by: crazyhzm <crazyhzm@gmail.com>

---------

Signed-off-by: crazyhzm <crazyhzm@gmail.com>
2023-11-07 15:40:13 +08:00
huazhongming c0574962ec
fix npe in the native compilation phase (#11837)
Signed-off-by: crazyhzm <crazyhzm@gmail.com>
2023-03-16 09:42:33 +08:00
huazhongming 69edf4ef8c
Dynamically generate native image config (#11795)
* ADD dubbo-maven-plugin

* add dubbo-maven-plugin module

Signed-off-by: crazyhzm <crazyhzm@gmail.com>

* fix license and compiler error

Signed-off-by: crazyhzm <crazyhzm@gmail.com>

* fix license and ci error

Signed-off-by: crazyhzm <crazyhzm@gmail.com>

* fix ci error

Signed-off-by: crazyhzm <crazyhzm@gmail.com>

* Remove proxy-config, hard code

Signed-off-by: crazyhzm <crazyhzm@gmail.com>

* ignoredModulesInDubboAll

Signed-off-by: crazyhzm <crazyhzm@gmail.com>

* throw exception for generated adaptive class sources

Signed-off-by: crazyhzm <crazyhzm@gmail.com>

* remove useless reflect config

Signed-off-by: crazyhzm <crazyhzm@gmail.com>

* Dynamically generate native image config for graalvm, and remove the original native image config

Signed-off-by: crazyhzm <crazyhzm@gmail.com>

* fix conflict

Signed-off-by: crazyhzm <crazyhzm@gmail.com>

* remove .git.exec.error

Signed-off-by: crazyhzm <crazyhzm@gmail.com>

* remove .git.exec.error

Signed-off-by: crazyhzm <crazyhzm@gmail.com>

* remove useless import

Signed-off-by: crazyhzm <crazyhzm@gmail.com>

---------

Signed-off-by: crazyhzm <crazyhzm@gmail.com>
Co-authored-by: Albumen Kevin <jhq0812@gmail.com>
2023-03-14 11:31:48 +08:00
huazhongming 9497802ec3
Dubbo maven plugin with native (#11540)
* ADD dubbo-maven-plugin

* add dubbo-maven-plugin module

Signed-off-by: crazyhzm <crazyhzm@gmail.com>

* fix license and compiler error

Signed-off-by: crazyhzm <crazyhzm@gmail.com>

* fix license and ci error

Signed-off-by: crazyhzm <crazyhzm@gmail.com>

* fix ci error

Signed-off-by: crazyhzm <crazyhzm@gmail.com>

* Remove proxy-config, hard code

Signed-off-by: crazyhzm <crazyhzm@gmail.com>

* ignoredModulesInDubboAll

Signed-off-by: crazyhzm <crazyhzm@gmail.com>

* throw exception for generated adaptive class sources

Signed-off-by: crazyhzm <crazyhzm@gmail.com>

---------

Signed-off-by: crazyhzm <crazyhzm@gmail.com>
Co-authored-by: Albumen Kevin <jhq0812@gmail.com>
2023-02-26 15:14:11 +08:00
wxbty 4a2f26cc27
move metrics from common to dubbo-metrics (#11386)
* move metrics pkg

* fix path

* revert unnecessary formatting changes

* fix export common path

* add default in all

* spi path fix

* revert merged content && simplify  metrics pkg import

* import single dep

* MetricsFilter has been migrated to the default package

* revert api pkg in bom

* close hint

* fix

---------

Co-authored-by: x-shadow-man <1494445739@qq.com>
2023-02-01 10:30:06 +08:00
huazhongming 7cb75c9a56
Fix native reflect-config.json (#11125) 2022-12-13 15:36:19 +08:00
Albumen Kevin 5c082eaefa Merge branch 'apache-3.1' into apache-3.2
# Conflicts:
#	dubbo-native/src/main/java/org/apache/dubbo/remoting/api/pu/PortUnificationTransporter$Adaptive.java
#	dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/DecodeableRpcInvocation.java
#	dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/call/AbstractServerCallListener.java
2022-12-08 17:44:11 +08:00
huazhongming c5815be7b6
Fix native image compile failure and run binary package failure (#11066)
* fix native image failed

Signed-off-by: crazyhzm <crazyhzm@gmail.com>

* fix native image failed

Signed-off-by: crazyhzm <crazyhzm@gmail.com>

* remove import

Signed-off-by: crazyhzm <crazyhzm@gmail.com>

Signed-off-by: crazyhzm <crazyhzm@gmail.com>
2022-12-05 11:56:37 +08:00
huazhongming cce0bd81ec
update spi for native code (#10951)
Signed-off-by: crazyhzm <crazyhzm@gmail.com>

Signed-off-by: crazyhzm <crazyhzm@gmail.com>
2022-11-18 10:03:05 +08:00
zhangzq7 1aa1aea43e
use Files.newInputStream instead of new FileInputStream and null check (#10847) 2022-11-02 12:57:46 +08:00
gitchenjh 0d453ad146
[3.0]Fix native-image plugin not compatible with Windows OS (#9756) 2022-03-15 14:47:01 +08:00
ken.lj b2a4f612ec
3.0 service discovery metadata refactor (#9506) 2021-12-29 10:56:05 +08:00
Albumen Kevin 77e6708ebd
[3.0] Refactor state router iterator to router chain (#9424)
* [3.0] Refactor state router iterator to router chain

* add asf

* add method

* fix snapshot print

* change to set nextRouter in StateRouter interface

* add doc

* Add logger check

* change RouterChain constructor

* change RouterChain constructor

* Fix Mesh Router

* remove taillist

* fix ut

* override addAll

* Add unit prepare jdk 17 support

* Revert "Add unit prepare jdk 17 support"

This reverts commit 6247538329.

* refactor message

* add option
2021-12-27 16:00:22 +08:00
Albumen Kevin b66509e4a4
[3.0] Refactor State Router (#9228)
* Refactor StateRouter, remove router cache

* Remove unused class

* refactor builtin routers to state routers

* add log

* remove unused method

* move order

* Add generics support
2021-11-21 15:55:01 +08:00
Gong Dewei 1bdf359b1a
[3.0] Manage global resources and executor services, fix zk client connections (#9033)
* shutdown scheduledExecutors and executorServiceRing

* fix NPE of configuration

* Fix notify loop after executor service is shutdown

* improve registry center in tests

* polish unregister shutdown hook log

* Fix systemConfiguration NPE

* enable surefire reuseForks for fast testing

* Fix checking DubboShutdownHook is alive

* fix SPI/Bean instantiation constructor matching

* shutdown share executor

* release zk client

* Improve application destroy processing

* Add GlobalResourcesRepository to manager static resources, including ExecutorService and HashedWheelTimer

* revert zk client address mapping

* Fix zk client early close problem

* improve executor service

* improve both start by module and by application

* release sharedScheduledExecutor and fix AccessLogFilter

* Fix tests

* checking zk registry if destroyed

* fix testSystemPropertyOverrideReferenceConfig config error

* improve KeepRunningOnSpringClosedTest

* SPI extension/scope bean prefers parameterized constructor instead of default constructor

* Support compatible usage of ZookeeperRegistryFactory

* Improve the application/module destroy process, the deployer destruction is divided into pre-destroy and post-destroy

* Destroy NacosDynamicConfiguration

* Destroy MetadataReportFactory

* Recreate adaptive classes

* Destroy global resources on dubbo shutdown

* Fix zk thread leaks when create client failed

* Improve protocol destroying

* Improve thread name of protocol port

* Manage global EventLoopGroup, HashedWheelTimer, etc.

* Protected metadata info in memory

* Support checking unclosed threads when finish test class

* Improve application check started

* add test log4j.properties

* add pom.xml of dubbo-test-check

* fix CodecSupport.checkSerialization error

* Fix ReferenceCountExchangeClientTest log msg checking

* Fix ServiceInstanceMetadataUtilsTest and MigrationInvokerTest

* Fix protocol destroy problem

* rename test check jvm args

* cancel asyncMetadataFuture and unregisterServiceInstance in pre-destroy application

* Ignore refresh metadata if application is stopping

* Remove unused destroyDynamicConfigurations method

* Change ZookeeperTransporter to application scope

* Add testMultiProviderApplicationsStopOneByOne

* Destroy ZookeeperTransporter in RemotingScopeModelInitializer

* support specify test check report file
2021-10-19 10:11:53 +08:00
张志勇 c22c589a9a
support native image(graalvm) for dubbo 3.0.4 (#8966) 2021-10-08 10:46:56 +08:00
Albumen Kevin 31c5ee4086
Refactor Injvm invoke (#8926)
* Refactor Injvm invoke

* Add ut

* Fix import

* Remove deprecated method & fix ut

* Fix Cluster join
2021-09-28 10:58:51 +08:00
Gong Dewei ea151d0f51
[3.0] New service repository support for multi instance (#8669)
* Add ExtensionDirector and Models

* Fix access static getter method of ApplicationModel

* Replace ExtensionFactory with ExtensionInjector

* specify scope of some SPIs

* Support scoped injection for extension

* improve create extension loader logic

* Add ScopeModel and ScopeBeanFactory, fix extension initialization of XxxConfig

* polish doc of scope model

* Extract FrameworkStatusReportService from FrameworkStatusReporter

* Fix application model of default bootstrap instance

* Pass scope model through URL

* Fix scope model of registry, metadata, cluster and so on

* exact ServiceModel from ProviderModel and ConsumerModel

* Add ASF license header for ScopeBeanFactoryInitializer

* Remove unused import

* Remove unused import

* Fix ut in ConfigManagerTest

* Change default Scope Behave

* Resolve recursive creation of Scope Model

* Fix inject default model when scope is parent

* Fix inject default model when scope is parent

* Compact with url without ScopeModel

* Change HttpBinder Scope

* Change some SPIs' scope

* Fix setApplicationModel override issue of MetadataServiceNameMapping

* Default inject ScopeModel in ConfigManager

* Add default Scope for AbstractConfig when init

* Fix field override & Fix ut env

* Fix zk not startup in DubboBootstrapMultiInstanceTest

* Fix ExtensionAccessor not inject in UT of MetricsFilterTest

* Compact old style getName

* Fix UT in DNSServiceDiscoveryTest

* Compact old style ApplicationModel

* Fix UT in DNSServiceDiscoveryTest

* Fix repository changed after ApplicationModel destroyed

* Fix SpringExtensionInjector pollution in UT

* Pass ApplicationModel in ServiceInstance

* reintroduce metadata delay key

* Add Transient on ApplicationModel getter of DefaultServiceInstance

* Fix Configurator Listener in Singleton mode override issue

* Fix Configurator Listener in Singleton mode override issue

* Compact old style getApplication

* Invocation pass ServiceModel

* Compact old style registerConsumer

* Fix NPE in RpcInvocation

* Add ServiceModel pass when init

* Fix ServiceModel cast error

* Add ServiceModel pass when invoke

* Fix NPE when simplify registry url

* Revert "Resolve recursive creation of Scope Model"

This reverts commit 37a99957

* Improve scope model aware

* polish scope model

* Cleanup ApplicationModel.defaultModel usage

* Fix ut

* Compatible with 2.6 Registry

* Fix ut

* Add Callback Service build ProviderModel

* improve scope model of config bean

* Fix scope model of reference/service model

* Revert CallbackServiceCodec for dev

* Fix scope model NPE

* Fix consumer url NPE

* Add Callback Service build ProviderModel

* Fix NPE when destroy

* Fix ut

* pick from Add Callback Service build ProviderModel (b47b2777f9)

* add failback logic for ut

* Fix ut

* Add Scope Model check

* Fix adaptive spi extension loading

* update adaptive classes

* Split ServiceRepository

* Fix apache license

* Fix UT

* Fix uts

* Fix DubboCodec

* Fix ut in DubboBootstrapTest

* Fix ut in DubboBootstrapTest

* Suspend register duplicate providers error

* Improve get unwrapped extension

* Fix GenericServiceTest

* Destroy all protocols in DubboBootstrap.reset()

* Add --no-snapshot-updates and -fae for test fail safe

* Fix uts

* Reset ApplicationModel Before Test

* Improve scope model initialization

* Support instantiating spi/bean constructor with scope model parameters

* change to fail never mode (-fn)

* get unwrapped instance of DubboProtocol

* Change referenced config's scope model after scope model changed

* Change referenced config's scope model after scope model changed

* Fix NPE of setScopeMode

* change to fail-at-end (-fae) mode

* Fix change scope model error

* Avoid duplicate destroy model

* Fix LocalCallMultipleReferenceAnnotationsTest

* Avoid injection bean type of java.lang.Object

* change to fail fast mode

Co-authored-by: Albumen Kevin <jhq0812@gmail.com>
2021-09-03 21:00:47 +08:00
张志勇 042dce468b
support native image (#8234)
* support native image

* add annotations regarding native image
2021-07-21 10:43:19 +08:00