drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilooner <...@git.apache.org>
Subject [GitHub] drill issue #1045: DRILL-5730 Test Mocking Improvements
Date Wed, 13 Dec 2017 01:09:26 GMT
Github user ilooner commented on the issue:

    I have split the FragmentContext into Four interfaces. We discussed 3, but it felt like
4 was more appropriate since some methods didn't fit well in some of the contexts.
    - **ExecutorFragmentContext**: This is the highest level context that exposes access to
everything. This is used by the FragmentExecutor and is also passed to the BatchCreators and
    - **RootFragmentContext**: This is exposed to the root executors. It has a few methods
only needed by the root, but doesn't have access to everything like the ExecutorFragmentContext.
    - **ExchangeFragmentContext**: This contains the network functions, and is used by the
senders and recievers.
    - **FragmentContext**: This is the barebones context which has no network functions and
only exposes the bare minimum needed by operators.
    These contexts are interfaces that inherit each other in the following way:
    ExecutorFragmentContext -> RootFragmentContext -> ExchangeFragmentContext ->
    There is only one implementation of the interfaces **FragmentContextImpl**. The facade
pattern is used to cast the context to the appropriate interface depending on where it's used.
    Let me know if you'd like to change the hierarchy or organization. Once we finalize how
we want to organize things I will add javadoc.


View raw message