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

Koji Noguchi updated PIG-4819:
------------------------------
    Attachment: pig-4819-v01.patch

Attaching a patch that 
* Use jobid and taskid as the seed. 
* A test case to make sure attempts from the same task would produce a same 
random sequence 
* (Unrelated, but) fixing a minor bug in testUniqueID where results weren't 
checked properly.

I only changed {{./src/org/apache/pig/builtin/RANDOM.java}} but not 
{{./contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/evaluation/math/RANDOM.java}}.
  Let me know if I should make the same change.

> RANDOM() udf can lead to missing or redundant records
> -----------------------------------------------------
>
>                 Key: PIG-4819
>                 URL: https://issues.apache.org/jira/browse/PIG-4819
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Koji Noguchi
>            Assignee: Koji Noguchi
>         Attachments: pig-4819-v01.patch
>
>
> When RANDOM() value is used for grouping/distinct/etc, it breaks the 
> mapreduce rule and can lead to redundant or missing records. 
> Some discussion can be found in 
> https://issues.apache.org/jira/browse/PIG-3257?focusedCommentId=13669195#comment-13669195
> We should make RANDOM less random so that it'll produce the same sequence of 
> random values from the task retries.



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

Reply via email to