helix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Xue Junkai <j...@apache.org>
Subject Re: [Question] Worker not executing submitted job by Administrator
Date Wed, 16 Sep 2020 03:04:37 GMT
Thanks for your interest in Helix. For your question:

1) You need to register the implemented task class with some "index" in the
state engine machine as the link you showed.
2) TaskStateModel is the default implementation of the task framework. You
can define your own state model and implement them. State models are for
regular Helix resource management. It depends on you choosing your abstract
thing as a long run "resource" or short running stateless "task".

Overall, the integration test base class would be the best code level
example.

Best,

Junkai

On Tue, Sep 15, 2020 at 5:21 PM Ivan G. Matala <ivanmatala@gmail.com> wrote:

>
> I'm new to Helix and trying to learn it. I was able to create a helix
> cluster and able to see my Participant joined the cluster by seeing it in
> zookeeper. Question, why is that when I'm trying to submit a job thru the
> Administrator, my Participant is not picking them up (not able to see the
> run method invoked in my user implemented Task class)?
>
> I mainly used this
> <https://helix.apache.org/1.0.1-docs/tutorial_task_framework.html>as
> guide for creating my task, job and workflow. However on the integration
> tests, I see a scenario
> <https://github.com/apache/helix/blob/a5cddd4b8fa51b1ea53b2f7082daf79361cd81de/helix-core/src/test/java/org/apache/helix/integration/task/TestTaskAssignmentCalculator.java#L78>where
> we need to register the task as a callback, but I never see their usage on
> the tutorial. My question are
>
> 1. When is the time we need to explicitly register task callbacks?
> 2. What's the difference between StateModel and TaskStateModel? In my
> implementation, I only used a StateModel with no callbacks as per the
> tutorial, but some integration tests are using TaskStateModel with callbacks
>
>
> [image: Mailtrack]
> <https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality5&>
Sender
> notified by
> Mailtrack
> <https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality5&>
09/15/20,
> 08:20:02 PM
>

Mime
View raw message