Skip to content

[SCB-2084] ServiceComb support dtm#1961

Merged
liubao68 merged 3 commits intoapache:masterfrom
heyile:master
Sep 18, 2020
Merged

[SCB-2084] ServiceComb support dtm#1961
liubao68 merged 3 commits intoapache:masterfrom
heyile:master

Conversation

@heyile
Copy link
Contributor

@heyile heyile commented Sep 16, 2020

Follow this checklist to help us incorporate your contribution quickly and easily:

  • Make sure there is a JIRA issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a JIRA issue. Your pull request should address just this issue, without pulling in other changes.
  • Each commit in the pull request should have a meaningful subject line and body.
  • Format the pull request title like [SCB-XXX] Fixes bug in ApproximateQuantiles, where you replace SCB-XXX with the appropriate JIRA issue.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Run mvn clean install -Pit to make sure basic checks pass. A more thorough check will be performed on your pull request automatically.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

}
}
} catch (Throwable e) {
// ignore
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's better to add a log. If this happens , maybe some bug, do not hide it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

public void init(MicroserviceMeta microserviceMeta, InvocationType invocationType) {
try {
Class<?> clazz = Class.forName("com.huawei.middleware.dtm.client.context.DTMContext");
dtmContextExMethod = clazz.getMethod("getContextData");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestions: class name can be configurable, so that can be easier tested and tollerate to changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment on lines +41 to +45
classNameProperty.addCallback(() -> {
donInitMethod(classNameProperty.getString());
LOG.info("Dtm context class name update, value = [{}]", classNameProperty.getString());
});
}
Copy link
Contributor

@liubao68 liubao68 Sep 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

callback seems useless. Implementation class is compiled and packaged with application, can not be chagned in runtime.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@liubao68 liubao68 merged commit b6e37c7 into apache:master Sep 18, 2020
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