-
Notifications
You must be signed in to change notification settings - Fork 217
All Resource Event Sources can handle multiple seconday resources for a primary resources #1169
New issue
Have a question about this project? No Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “No 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? No Sign in to your account
Conversation
@metacosm will review some parts little later, and fix javadoc. But conceptually can be reviewed. |
|
||
import java.util.function.Function; | ||
|
||
public interface IDMapper<R> extends Function<R, String> { |
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.
I'd rather have an explicit interface with an actual method which name we control rather than a Function extension. Easier to extend at a later time and more self-documenting than a random apply
method in implementors, imo.
I'm also unsure about the purpose of this, actually. :(
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.
yep, will make it more explicit, not extending the function. Tried to explain here, why it is needed:
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.
pushed.
Can try to explain more in depth here in the javadoc why this needed. But basically we need to have the information if it's a new resource is a new version or just the same as an other. With key check if it referring to same object with equals we check if it changed or not.
…java-operator-sdk into all-multi-resource-es
.../io/javaoperatorsdk/operator/processing/event/source/ExternalResourceCachingEventSource.java
Outdated
Show resolved
Hide resolved
…tor/processing/event/source/ExternalResourceCachingEventSource.java Co-authored-by: Chris Laprun <metacosm@users.noreply.github.com>
a4054b8
to
8b48c1d
Compare
public Optional<Schema> fetchResource(MySQLSchema resource) { | ||
return schemaService.getSchema(resource.getMetadata().getName()); | ||
public Set<Schema> fetchResources(MySQLSchema primaryResource) { | ||
return null; |
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.
Is this normal? If yes, can you add a comment explaining why, please?
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.
its not used, delete it.
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.
good catch! :)
…java-operator-sdk into all-multi-resource-es
Kudos, SonarCloud Quality Gate passed! |
No description provided.