Github user zhangjiajin commented on the pull request:
https://github.com/apache/spark/pull/7412#issuecomment-121902394
@feynmanliang This assumes that all the values (suffixes) associated to a
key (prefix) will fit on an executor, but I don't think that patternsCount >
minPatternsBeforeShuffle will guarantee that. Better to count the suffixes for
each prefix using aggregateByKey before doing local processing.
The minPatternsBeforeLocalProcessing is related to the executors. The
suffixes threshold (call it maxSuffixesThreshold) is related with the input
sequences size. How to set the default value of maxSuffixesThreshold ?
You worry about a exector will overload. If an executor has multiple prefix
maybe reduce the influence of this problem. For example, the number of
executors is 4, the minPatternsBeforeLocalProcessing is 20, means one executor
have 5 random prefixes and its suffixes.
The following diagram show the two methods' different:

---
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]