Github user viirya commented on the pull request:

    https://github.com/apache/spark/pull/4706#issuecomment-75422885
  
    Because of the design of Parallel FP-Growth (implemented in 
`genCondTransactions`), when we have the ranks 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 and 
two partitions, original mapping would be (0, 1, 2, 3, 4, 5, 6, 7, 8) -> part 
0, (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) -> part 1. The algorithm scans the ranks 
(`filtered` in `genCondTransactions`) from right to left. For a rank it first 
sees, it takes the slice from its potition to most left (`filtered.slice(0, i + 
1)`).
    
    With the partitioning scheme I proposed, we would get the mapping (0, 1, 2, 
3, 4) -> part 0, (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) -> part 1.
    
    You can see my previous comment where the case is 9 items and 2 partitions.
    
    The current:
    
        Map(1 -> List(0, 1, 2, 3, 4, 6, 7), 0 -> List(0, 1, 2, 3, 4, 6, 7, 8))
    
    The propose:
    
        Map(1 -> List(0, 1, 2, 3, 4, 6, 7, 8), 0 -> List(0, 1, 2, 3, 4))
    
    



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to