What is the difference between partitioning with key and round robin?

Showing Answers 1 - 4 of 4 Answers

Ashim Dutta

  • Jul 10th, 2005
 

ashimdutta@yahoo.com 
Partition by Key or hash partition -> This is a partitioning technique which is used to partition data when the keys are diverse. If the key is present in large volume then there can large data skew. But this method is used more often for parallel data processing. 
 
Round robin partition is another partitioning technique to uniformly distribute the data on each of the destination data partitions. The skew is zero in this case when no of records is divisible by number of partitions. A real life example is how a pack of 52 cards is distributed among 4 players in a round-robin manner.

  Was this answer useful?  Yes

K Nagi Reddy

  • Feb 1st, 2006
 

If you have some 30 cards taken at random from 52 card pack-------If take the card color as key(red or white) and distribute then the no of cards in each partion may vary much.But in Round robin , we distribute with block size , so the variation is limited to the block size

kalyan

  • Mar 15th, 2006
 

Partition by Key - Distribute according to the key value

Partition by Round Robin - Distribute a predefined number of records to one flow and then the same numbers of records to the next flow and so on. After the last flow resumes the pattern and almost evenly distributes the records... This patter is called round robin fashion.

  Was this answer useful?  Yes

phani

  • Oct 12th, 2006
 

for partition by key it internally generates the hash code. through that i distributes the data records.

round robin what they said was correct

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions