Brock Noland got review request #8558!
FLUME-1777: AbstractSource does not provide enough implementation for sub-classes
Review Request #8558 - Created Dec. 12, 2012 and submitted
Adds BasicSourceSemantics (named similar to the Channel abstract classes) which sets the life cycle state appropriate, doesn't require the use of super, and allows subclasses to set the lifecycle state. Additionall adds AbstractPollableSource and AbstractEventDrivenSource.
Unit tests added, pass.
|Looks like this class implements all the methods from AbstractSource. Is there a reason you chose not to inherit from ...||Hari Shreedharan||Dec. 13, 2012, 12:13 a.m.||Open|
Posted (Dec. 13, 2012, 12:13 a.m.)
Brock, Generally looks excellent. Some relatively minor comments are below. Also it does not look like the spy is actually being used in the tests. In that case you might not need to use spy at all. Using the dummy classes directly would work.
Looks like this class implements all the methods from AbstractSource. Is there a reason you chose not to inherit from the same class?
Do we really need these methods, and force implementation to implement this? AFAICT, it looks like these methods will simply log the error? Why not just implement it here? The name of the component can be prepended to the log message to make the logging clearer
I prefer using @Test (expected = FlumeException.class). It is often cleaner
Same as above. Consider using @Test (expected= .. )
Review request changed
Updated (Dec. 13, 2012, 7:47 p.m.)
- changed from pending to submitted