Conversation
so we can see what else is chewing up cpu
|
|
||
| public static class MemberTrackingPolicy extends AbstractMembershipTrackingPolicy { | ||
| @Override protected void onEntityEvent(EventType type, Entity member) { | ||
| defaultHighlightAction(type, entity); |
There was a problem hiding this comment.
Not needed as this policy extends AbstractMembershipTrackingPolicy and onEntityEvent already call defaultHighlightAction
There was a problem hiding this comment.
this method overrides that method and doesn't call super so it has to redo it here, doesn't it?
There was a problem hiding this comment.
Meh, you're right, I didn't see the missing super call for some reason.
| } | ||
| @Override protected void onEntityRemoved(Entity member) { | ||
| // TODO shouldn't be invoked - remove | ||
| log.warn("Removal handler should be hidden by event handler", new Throwable("Trace for unexpected mongo node handler")); |
There was a problem hiding this comment.
Not sure I understand what this is for: is this an error per se? Looks like a removal is handled correctly so why the warn message? Can you give a bit more details ?
There was a problem hiding this comment.
more a note to developer (it caught me out) - due to the onEntityEvent handler being overridden this method is not used
There was a problem hiding this comment.
That make sense now, as onEntityEvent does not call super
| } | ||
| @Override protected void onEntityChange(Entity member) { | ||
| // TODO shouldn't be invoked - remove | ||
| log.warn("Change handler should be hidden by event handler", new Throwable("Trace for unexpected mongo node handler")); |
| public static class MemberTrackingPolicy extends AbstractMembershipTrackingPolicy { | ||
| @Override | ||
| protected void onEntityEvent(EventType type, Entity entity) { | ||
| defaultHighlightAction(type, entity); |
There was a problem hiding this comment.
Not needed as this policy extends AbstractMembershipTrackingPolicy and onEntityEvent already call defaultHighlightAction
| public static class ServerPoolMemberTrackerPolicy extends AbstractMembershipTrackingPolicy { | ||
| @Override | ||
| protected void onEntityEvent(EventType type, Entity entity) { | ||
| defaultHighlightAction(type, entity); |
|
|
||
| public static class MemberTrackingPolicy extends AbstractMembershipTrackingPolicy { | ||
| @Override protected void onEntityEvent(EventType type, Entity member) { | ||
| defaultHighlightAction(type, entity); |
| public static class UrlMappingsMemberTrackerPolicy extends AbstractMembershipTrackingPolicy { | ||
| @Override | ||
| protected void onEntityEvent(EventType type, Entity entity) { | ||
| defaultHighlightAction(type, entity); |
| public static class ServerPoolMemberTrackerPolicy extends AbstractMembershipTrackingPolicy { | ||
| @Override | ||
| protected void onEntityEvent(EventType type, Entity entity) { | ||
| defaultHighlightAction(type, entity); |
| .persistMode(PersistMode.CLEAN) | ||
| .highAvailabilityMode(HighAvailabilityMode.MASTER) | ||
| .persistMode(doPersistence() ? PersistMode.CLEAN : PersistMode.DISABLED) | ||
| .highAvailabilityMode(doPersistence() ? HighAvailabilityMode.MASTER : HighAvailabilityMode.DISABLED) |
There was a problem hiding this comment.
I think for a flag, a field would be cleaner than a method to override
There was a problem hiding this comment.
due to how tests are structured and annotated methods run by the framework, methods for this sort of thing are easier to work with i find. happy if you want to spike an alternative with fields but i doubt it's better.
There was a problem hiding this comment.
Good point, didn't think of the complexity due to the framework and annotation. Your solution works so let's go with that, we can iterate on it later on
|
thanks for the comments @tbouron - i've replied, and think the PR as it stands is correct. wdyt? |
|
Retest this please. |
|
@ahgittin Yup, looks good but I would like Jenkins to be happy before merging it. Looking at the logs, looks like the failure is unrelated though |
|
hmm, failure is related: it's trying to reference |
|
tests good after merging master, so merging this |
uses apache/brooklyn-server#818 to add highlights for software-specific entities. also adds new perf test.