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

László Bodor updated HIVE-24278:
--------------------------------
    Description: 
For testing purposes sometimes we need to make the query fail in a vertex, so 
assuming that we already know the plan, it could be something like:
on mapper side
{code}
select a.col1, exception_in_vertex("Map 1") from a
join b on b.id = a.id
{code}
or on reducer side
{code}
select a.col1, exception_in_vertex("Reducer 2") from a
join b on b.id = a.id
{code}

more advanced configuration is possible, e.g we want to make Reducer 2's 50th 
task's first (0th) attempt fail with an IllegalArgumentException:
{code}
exception_in_vertex("Reducer 2", "IllegalArgumentException", 50, 0)
{code}

  was:
For testing purposes sometimes we need to make the query fail in a vertex, so 
assuming that we already know the plan, it could be something like:
on mapper side
{code}
select a.col1, exception_in_vertex("Map 1") from a
join b on b.id = a.id
{code}
or on reducer side
{code}
select a.col1, exception_in_vertex("Reducer 2") from a
join b on b.id = a.id
{code}

more advanced configuration is possible, e.g we want to make Reducer 2's 50th 
task's first (0th) attempt fail with an IllegalArgumentException:
{code}
exception_in_vertex("Reducer 2", "IllegalArgumentException" 50, 0)
{code}


> Implement an UDF for throwing exception in arbitrary vertex
> -----------------------------------------------------------
>
>                 Key: HIVE-24278
>                 URL: https://issues.apache.org/jira/browse/HIVE-24278
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: László Bodor
>            Assignee: László Bodor
>            Priority: Major
>
> For testing purposes sometimes we need to make the query fail in a vertex, so 
> assuming that we already know the plan, it could be something like:
> on mapper side
> {code}
> select a.col1, exception_in_vertex("Map 1") from a
> join b on b.id = a.id
> {code}
> or on reducer side
> {code}
> select a.col1, exception_in_vertex("Reducer 2") from a
> join b on b.id = a.id
> {code}
> more advanced configuration is possible, e.g we want to make Reducer 2's 50th 
> task's first (0th) attempt fail with an IllegalArgumentException:
> {code}
> exception_in_vertex("Reducer 2", "IllegalArgumentException", 50, 0)
> {code}



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

Reply via email to