[ 
https://issues.apache.org/jira/browse/CRUNCH-351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13909737#comment-13909737
 ] 

Chao Shi commented on CRUNCH-351:
---------------------------------

bq. About the use of the random long as the key, I was thinking it might be 
even better to use a limited-range int as the generated key..

OK, let me switch to int32.

bq. Also on the subject of the random key generation, is there any drawback to 
using a constant value as the seed for the Random? If not, it might be better 
to just use a constant to avoid the dependency on the MapReduce framework.

I think a constant random seed is effectively same as using a increasing key 
and passing records to reducers in round-robin. The general drawback is that 
all mapper will produce the same sequence. For this particular problem, I think 
using the round-robin approach is OK and simpler.

> Improve performance of Shard#shard on large records
> ---------------------------------------------------
>
>                 Key: CRUNCH-351
>                 URL: https://issues.apache.org/jira/browse/CRUNCH-351
>             Project: Crunch
>          Issue Type: Improvement
>            Reporter: Chao Shi
>            Assignee: Chao Shi
>         Attachments: crunch-351.patch
>
>
>     This avoids sorting on the input data, which may be long and make
>     shuffle phase slow. The improvement is to sort on pseudo-random numbers.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to