helix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "kishore gopalakrishna (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HELIX-524) add getProgress() to Task interface
Date Thu, 09 Oct 2014 00:57:34 GMT

    [ https://issues.apache.org/jira/browse/HELIX-524?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14164495#comment-14164495
] 

kishore gopalakrishna commented on HELIX-524:
---------------------------------------------

Apologize to throw in another idea into the mix. Why not have additional methods in the implementation
that the agent can invoke on demand based on annotation?. This extends the way we invoke methods
on the statemodel.

For example we have

@Transition(TO=MASTER, FROM=SLAVE)
void fromSlaveTOMaster(Message m, NotificationContext ctx){

}

Can we have something similar as 

@Method(name="getProgress")
Response getProgress(Message m, NotificationContext ctx){

}

Helix provides a generic way to invoke a method on a partition. I think this is more powerful
, does not disturb any interfaces and can be extending to do custom stuff.
Also these methods will not be invoked via ZK, instead the controller can directly invoke
the method on the participant.

Feedback?





> add getProgress() to Task interface
> -----------------------------------
>
>                 Key: HELIX-524
>                 URL: https://issues.apache.org/jira/browse/HELIX-524
>             Project: Apache Helix
>          Issue Type: Improvement
>          Components: helix-core
>    Affects Versions: 0.6.4
>            Reporter: Hongbo Zeng
>             Fix For: 0.6.5
>
>
> Add a getProgress to the Task interface, this is very helpful for long running tasks,
from which we know the status of a task and see if it's blocked. The return value is a double,
ranging from 0 to 1.0, 1.0 indicates a task is finished



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message