You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Chris Westin (JIRA)" <ji...@apache.org> on 2015/04/22 19:18:02 UTC

[jira] [Updated] (DRILL-2686) Move writeJson() methods from PhysicalPlanReader to corresponding classes

     [ https://issues.apache.org/jira/browse/DRILL-2686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Westin updated DRILL-2686:
--------------------------------
    Fix Version/s:     (was: 1.0.0)
                   1.1.0

> Move writeJson() methods from PhysicalPlanReader to corresponding classes
> -------------------------------------------------------------------------
>
>                 Key: DRILL-2686
>                 URL: https://issues.apache.org/jira/browse/DRILL-2686
>             Project: Apache Drill
>          Issue Type: Improvement
>          Components: Execution - Flow
>    Affects Versions: 0.7.0
>            Reporter: Sudheesh Katkam
>            Assignee: Chris Westin
>             Fix For: 1.1.0
>
>
> From Chris's comment https://reviews.apache.org/r/32795/
> It would have been better to have a writeJson(ObjectMapper) method added to each of OptionList, PhysicalOperator, and ExecutionControls, and for PhysicalPlanReader just to have a getMapper() that is used to get the argument needed for those. In that form, we don't have to add a new method to PhysicalPlanReader for each thing that we want to add to it. We just get its mapper and write whatever it is to it.
> We'd have
> {code}
> final ObjectMapper mapper = reader.getMapper();
> options.writeJson(mapper);
> executionControls.writeJson(mapper);
> {code}
> So as we add more things to the plan, we don't have to add more methods to it. Each object knows how to write itself, given the mapper. And if we ever need to add them to anything else, that object just needs to expose its mapper in a similar way, rather than having a method per item.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)