Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce getConfig QoS Command #11664

Merged
merged 3 commits into from
Feb 27, 2023
Merged

Introduce getConfig QoS Command #11664

merged 3 commits into from
Feb 27, 2023

Conversation

AlbumenJ
Copy link
Member

@AlbumenJ AlbumenJ commented Feb 26, 2023

What is the purpose of the change

Add getConfig command to get config in runtime

Examples:

  1. getConfig
  2. getConfig ApplicationConfig
  3. getConfig ReferenceConfig com.example.DemoService
➜  dubbo-samples git:(apache-master) ✗ telnet 127.0.0.1 22222
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
   ___   __  __ ___   ___   ____     
  / _ \ / / / // _ ) / _ ) / __ \  
 / // // /_/ // _  |/ _  |/ /_/ /    
/____/ \____//____//____/ \____/   
dubbo>getConfig
ApplicationModel: Dubbo Application[1.1](first-dubbo-provider)
ApplicationConfig: first-dubbo-provider
<dubbo:application enableFileCache="true" executorManagementMode="default" environment="product" parameters="{}" name="first-dubbo-provider" protocol="dubbo" />

ProtocolConfig: dubbo
<dubbo:protocol preferSerialization="fastjson2,hessian2" port="-1" name="dubbo" />

RegistryConfig: null
<dubbo:registry address="nacos://127.0.0.1:8848" protocol="nacos" port="8848" />

MetadataReportConfig: null
<dubbo:metadata-report address="nacos://127.0.0.1:8848" protocol="nacos" port="8848" parameters="{client=null}" />

ConfigCenterConfig: config-center-nacos-127.0.0.1-8848
<dubbo:config-center configFile="dubbo.properties" namespace="dubbo" group="dubbo" highestPriority="false" id="config-center-nacos-127.0.0.1-8848" timeout="30000" address="nacos://127.0.0.1:8848" protocol="nacos" check="true" port="8848" parameters="{client=null}" />

SslConfig: null
<dubbo:ssl />

ModuleModel: Dubbo Module[1.1.0]
ProviderConfig: null
<dubbo:provider deprecated="false" dynamic="true" />

ConsumerConfig: null
<dubbo:consumer sticky="false" />

ModuleConfig: null
<dubbo:module background="false" />

ModuleModel: Dubbo Module[1.1.1]
ProviderConfig: null
<dubbo:provider deprecated="false" dynamic="true" />

ConsumerConfig: null
<dubbo:consumer sticky="false" />

ModuleConfig: null
<dubbo:module background="false" />

ServiceConfig: org.apache.dubbo.samples.api.GreetingsService
<dubbo:service path="org.apache.dubbo.samples.api.GreetingsService" deprecated="false" dynamic="true" generic="false" ref="org.apache.dubbo.samples.provider.GreetingsServiceImpl@b2843cb" interface="org.apache.dubbo.samples.api.GreetingsService" />


dubbo>

Brief changelog

Verifying this change

Checklist

  • Make sure there is a GitHub_issue field for the change (usually before you start working on it). Trivial changes like typos do not require a GitHub issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • Each commit in the pull request should have a meaningful subject line and body.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Check if is necessary to patch to Dubbo 3 if you are work on Dubbo 2.7
  • Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add sample in dubbo samples project.
  • Add some description to dubbo-website project if you are requesting to add a feature.
  • GitHub Actions works fine on your own branch.
  • If this contribution is large, please follow the Software Donation Guide.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

94.0% 94.0% Coverage
0.0% 0.0% Duplication

@AlbumenJ AlbumenJ requested a review from chickenlj February 27, 2023 03:43
@AlbumenJ
Copy link
Member Author

@chickenlj PTAL

@chickenlj
Copy link
Contributor

I think this can be a handy tool for quickly investigating the effective configuration when there are problems hard to judge from logs.

@AlbumenJ AlbumenJ merged commit c4d6f94 into apache:3.2 Feb 27, 2023
mytang0 added a commit to mytang0/dubbo that referenced this pull request Feb 27, 2023
* origin/3.2:
  Fix heartbeat failed if serialization changed (apache#11512)
  Update README.md
  Tag router problem fix (apache#11586)
  delete never thrown exception (apache#11674)
  ♻️refact metrics key and meter unit (apache#11661)
  feat: optimize code (apache#11671)
  Introduce getConfig QoS Command (apache#11664)
lcb11 pushed a commit to lcb11/dubbo that referenced this pull request Mar 31, 2023
* Introduce getConfig QoS Command

* Fix NPE

* Fix NPE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants