[
https://issues.apache.org/jira/browse/HIVE-24278?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17268015#comment-17268015
]
László Bodor commented on HIVE-24278:
-------------------------------------
merged to master, thanks [~kgyrtkirk] for the review
for details, feel free to refer to:
https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFExceptionInVertex.java#L42
https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFExceptionInVertex.java#L38
> 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
> Labels: pull-request-available
> Time Spent: 1h
> Remaining Estimate: 0h
>
> 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 exception:
> {code}
> exception_in_vertex("Reducer 2", 50, 0)
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)