-
Notifications
You must be signed in to change notification settings - Fork 3.6k
[Issue-8162] [pulsar-io] Added org.apache.pulsar.io.core.Context interface #8164
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
Conversation
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.
We cannot simply extend SourceContext / SinkContext with Context. There are methods in in Context that don't make sense to be in SourceContext or SinkContext. For example:
String getOutputTopic();
Does not make sense to be callable from a SinkContext
@jerrypeng I have moved the duplicate method definitions into a "base" interface named |
@david-streamlio I think you are talking about a new interface called Context? Have you included the Context.java file? I only seeing modification for SourceContext and SinkContext in this PR. Also can we name it something different since we already have a interface called called Context: Something like ConnectorContext? |
* Interface for a connector providing information about environment where it is running. | ||
* It also allows to propagate information, such as logs, metrics, states, back to the Pulsar environment. | ||
*/ | ||
public interface Context { |
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.
Can we rename this this class to something like ConnectorContext? To avoid confusion with the existing Context interface for functions
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.
Done
…rface (apache#8164) * Added org.apache.pulsar.io.core.Context interface * Added the Context interface * Renamed Context to ConnectorContext Co-authored-by: David Kjerrumgaard <dkjerrumgaard@splunk.com>
…rface (apache#8164) * Added org.apache.pulsar.io.core.Context interface * Added the Context interface * Renamed Context to ConnectorContext Co-authored-by: David Kjerrumgaard <dkjerrumgaard@splunk.com>
…rface (apache#8164) * Added org.apache.pulsar.io.core.Context interface * Added the Context interface * Renamed Context to ConnectorContext Co-authored-by: David Kjerrumgaard <dkjerrumgaard@splunk.com>
No description provided.