[
https://issues.apache.org/jira/browse/DRILL-5319?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15931539#comment-15931539
]
ASF GitHub Bot commented on DRILL-5319:
---------------------------------------
GitHub user paul-rogers opened a pull request:
https://github.com/apache/drill/pull/787
DRILL-5319: Refactor "contexts" for unit testing
This PR is purely a refactoring: no functionality is added or changed.
The refactoring splits various context and related classes into a set
of new interfaces with needed for operator-level unit tests. The other,
Drillbit-related methods are left in the original interfaces. Most code
need not change.
The changes here allow operator-level unit tests to mock up the
exec-time methods so we can use them without firing up a Drillbit (or
using mocking libraries).
A later PR will provide the sub-operator test framework that uses this
refactoring.
Changes include:
* The OptionManager is split, with read-only methods moving to a new
OptionSet interface.
* The FragmentContext is split, with an exec-only FragmentExecContext
proving low-level methods.
* OperatorStats is split, with a new OperatorStatReceiver class
providing write-only support to operators.
* Several places that accepted an OperatorContext or FragmentContext,
but needed only an allocator, are changed to accept the allocator
directly.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/paul-rogers/drill DRILL-5319
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/drill/pull/787.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #787
----
commit e4d3b383ee905921ac505f4278220a3270caa68e
Author: Paul Rogers <[email protected]>
Date: 2017-03-19T02:52:52Z
DRILL-5319: Refactor "contexts" for unit testing
This PR is purely a refactoring: no functionality is added or changed.
The refactoring splits various context and related classes into a set
of new interfaces with needed for operator-level unit tests. The other,
Drillbit-related methods are left in the original interfaces. Most code
need not change.
The changes here allow operator-level unit tests to mock up the
exec-time methods so we can use them without firing up a Drillbit (or
using mocking libraries).
A later PR will provide the sub-operator test framework that uses this
refactoring.
Changes include:
* The OptionManager is split, with read-only methods moving to a new
OptionSet interface.
* The FragmentContext is split, with an exec-only FragmentExecContext
proving low-level methods.
* OperatorStats is split, with a new OperatorStatReceiver class
providing write-only support to operators.
* Several places that accepted an OperatorContext or FragmentContext,
but needed only an allocator, are changed to accept the allocator
directly.
----
> Refactor FragmentContext and OptionManager for unit testing
> -----------------------------------------------------------
>
> Key: DRILL-5319
> URL: https://issues.apache.org/jira/browse/DRILL-5319
> Project: Apache Drill
> Issue Type: Sub-task
> Components: Tools, Build & Test
> Affects Versions: 1.10.0
> Reporter: Paul Rogers
> Assignee: Paul Rogers
> Fix For: 1.11.0
>
>
> Roll-up task for two refactorings, see the sub-tasks for details. This ticket
> allows a single PR for the two different refactorings since the work heavily
> overlaps. See DRILL-5320 and DRILL-5321 for details.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)