[
https://issues.apache.org/jira/browse/GIRAPH-467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13577132#comment-13577132
]
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: https://issues.apache.org/jira/browse/GIRAPH-467
> 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: http://www.atlassian.com/software/jira