reiabreu commented on issue #7947:
URL: https://github.com/apache/storm/issues/7947#issuecomment-2634140283

   Hi!
   It seems that is the case. Definitely a recursive call.
   
   This method is marked as deprecated:
   
   * @deprecated see ***@***.*** IWorkerHook#start(Map, WorkerUserContext)}
   */
   default void start(Map<String, Object> topoConf, WorkerTopologyContext
   context) {
   // NOOP
   }
   
   So perhaps we can just remove it and make  default void
   start(Map<String, Object> topoConf, WorkerUserContext context) a NOOP.
   
   Do you want to open a PR for it?
   
   
   On Fri, 31 Jan 2025 at 15:12, dpv91788 ***@***.***> wrote:
   >
   > In the IWorkerHook there is a default method
   >
   > default void start(Map<String, Object> topoConf, WorkerUserContext 
context) {
   >         start(topoConf, context);
   > }
   >
   > That ends up calling its self. I think the intention was to have it 
default to calling the deprecated method
   >
   > default void start(Map<String, Object> topoConf, WorkerTopologyContext 
context) {
   >         // NOOP
   > }
   >
   > In order for that to work I beleive the first default method needs to be 
changed to:
   >
   > default void start(Map<String, Object> topoConf, WorkerUserContext 
context) {
   >         start(topoConf, (WorkerTopologyContext)context);
   > }
   >
   > If you write a test for example like
   >
   > @Test
   > void ***@***.*** WorkerUserContext workerUContext) {
   > IWorkerHook wHook = new IWorkerHook() {
   > private static final long serialVersionUID = 3766266493839497755L;
   >
   > @Override
   > public void shutdown() {}
   > };
   >
   > wHook.start(Collections.emptyMap(), workerUContext);
   > }
   >
   > It will result in a java.lang.StackOverflowError
   >
   > —
   > Reply to this email directly, view it on GitHub, or unsubscribe.
   > You are receiving this because you are subscribed to this thread.Message 
ID: ***@***.***>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@storm.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to