[
https://issues.apache.org/jira/browse/HBASE-25521?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17297790#comment-17297790
]
Duo Zhang commented on HBASE-25521:
-----------------------------------
Copy my comment on PR here to provide more context.
{quote}
It is really a pain. We need a full redesign of the ChoreService and
ScheduledChore. After reading the code, I think the intention here is that, if
the stopper is stopped, we will cleanup the ScheduledChore, otherwise even if
we call cancel, it only means we want to cancel it from the current
ChoreService, and we could still schedule it again, with the current
ChoreService or another one.
But in our code, lots of places just assume that, a simple cancel will do the
clean up work.
In general, I do not think in our code base, we want to switch the ChoreService
so I do not think we need the different semantic for cancel and stop. I think
this is also why in our code base we just use cancel to clean up the chore when
shutting down. But unluckily, ChoreService and ScheduledChore are marked as
IA.Public, so we can not change its public facing API.
But I do not think these two classes should be marked as IA.Public. We are
providing a SDK to users for connecting with HBase Cluster, not a scheduler
framework.
So in this patch, I just added a shutdown method for cleanup the chore, but I
would like to open another issue to change the IA annotation of these two
classes to IA.Private, and then give it a full redesign.
Thanks.
{quote}
> Change ChoreService and ScheduledChore to IA.Private
> ----------------------------------------------------
>
> Key: HBASE-25521
> URL: https://issues.apache.org/jira/browse/HBASE-25521
> Project: HBase
> Issue Type: Task
> Components: util
> Reporter: Duo Zhang
> Assignee: Andrew Kyle Purtell
> Priority: Major
> Fix For: 3.0.0-alpha-1, 2.5.0, 2.4.3
>
>
> Follow up issue for HBASE-25509.
> We are not providing a general scheduling library, so these two classes
> should not be IA.Public. User can just use other more powerful scheduling
> libraries.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)