hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eugene Koifman (Jira)" <j...@apache.org>
Subject [jira] [Assigned] (HIVE-18978) ConditionalTask.addDependentTask(Task t) adds t in the wrong place
Date Wed, 28 Jul 2021 14:14:04 GMT

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

Eugene Koifman reassigned HIVE-18978:
-------------------------------------

    Assignee:     (was: Eugene Koifman)

> ConditionalTask.addDependentTask(Task t) adds t in the wrong place
> ------------------------------------------------------------------
>
>                 Key: HIVE-18978
>                 URL: https://issues.apache.org/jira/browse/HIVE-18978
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>            Reporter: Eugene Koifman
>            Priority: Major
>
> {\{ConditionalTask.addDependentTask(Task t) }} is implemented like this:
> {noformat}
> /**
> * Add a dependent task on the current conditional task. The task will not be a direct
child of
> * conditional task. Actually it will be added as child task of associated tasks.
> *
> * @return true if the task got added false if it already existed
> */
> @Override
> public boolean addDependentTask(Task<? extends Serializable> dependent) {
>   boolean ret = false;
>   if (getListTasks() != null) {
>     ret = true;
>     for (Task<? extends Serializable> tsk : getListTasks()) {
>       ret = ret & tsk.addDependentTask(dependent);
>     }
>   }
>   return ret;
> }
> {noformat}
> So let’s say, the tasks in the ConditionalTask are A,B,C, but they have children.
> {noformat}
>     CondTask
>       |--A
>          |--A1
>             |-A2
>       |--B
>          |--B1
>       |--C
>         |--C1
> {noformat}
> The way ConditionalTask.addDependent() is implemented, MyTask becomes a sibling of A1,
>  B1 and C1. So even if only 1 branch of ConditionalTask is executed (and parallel task
>  execution is enabled), there is no guarantee (as I see) that MyTask runs after A2 or
>  B1 or C1, which is really what is needed.
>  
> Once this is done add a .q file test that records a plan for Export from Acid: HIVE-18739



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message