giraph-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nitay Joffe (JIRA)" <>
Subject [jira] [Commented] (GIRAPH-467) Cleanup BspService#process
Date Tue, 12 Feb 2013 22:55:12 GMT


Nitay Joffe commented on GIRAPH-467:

That sounds great yeah. You can probably just implement the trigger() method inside PredicateLock
itself. I'll let you play with it and figure out cleanest solution.

I think in terms of performance we can do a bit better. The nature of the if/else-if/else-if...
is that only one can ever run right. In that case it seems like we should be able to a simple
map lookup type thing. It may be tricky because although the type checks are always just ==
the path checks equals(), contains() others, and endsWith()... Looking at the code I think
the endsWith() is equivalent to using equals() on the last entry in the path (`basename`).
Really at a high level each signal trigger is a Pair<EventType,path-regex> and this
is a list of matchers. We could get fun with this and just write a state machine with something
like Ragel (google it) and use that to spit out some simple Enum value of which trigger matched
the path. This is probably all overkill though, but I like languages ;).
Anyways for now I think your solution is good let's do that, and if you're interested in further
exploring performance improvements we can do it in another JIRA.
> Cleanup BspService#process
> --------------------------
>                 Key: GIRAPH-467
>                 URL:
>             Project: Giraph
>          Issue Type: Improvement
>            Reporter: Nitay Joffe
> lots of duplication, use a vector of events or something

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message