-
Notifications
You must be signed in to change notification settings - Fork 345
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
[CDAP-21079] Refactor SPI/TMS for default context before spanner extension implementation #15731
Conversation
cdap-messaging-spi/src/main/java/io/cdap/cdap/messaging/spi/MessagingContext.java
Outdated
Show resolved
Hide resolved
cdap-app-fabric/src/main/java/io/cdap/cdap/internal/messaging/DelegatingMessagingService.java
Outdated
Show resolved
Hide resolved
@@ -130,6 +135,11 @@ private MessagingService getDelegate() { | |||
"Unsupported messaging service implementation " + getName()); | |||
} | |||
LOG.info("Messaging service {} is loaded", messagingService.getName()); | |||
try { | |||
messagingService.initialize(new DefaultMessagingContext(this.cConf)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why move here instead of doing it in the regular initialize method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Messaging currently doesn't have initialize().
We need this to create spanner database clients. Extension is loaded at this particular place and the current object's delegate is set to the messagingService. So thought this would be an appropriate place for initialize().
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
...pp-fabric/src/main/java/io/cdap/cdap/internal/messaging/MessagingServiceExtensionLoader.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comment; Otherwise LGTM
cdap-tms/src/main/java/io/cdap/cdap/messaging/client/DelegatingMessagingService.java
Show resolved
Hide resolved
…nsion implementation
4901eea
to
3e37e7d
Compare
|
Tested by deploying docker image to GCP project.
All pods up and running.