MCPcopy Create free account
hub / github.com/baidu/bigflow / grouped_top_3

Function grouped_top_3

bigflow_python/python/bigflow/example/grouped_top_3.py:33–54  ·  view source on GitHub ↗

接受包含数字的PCollection,按照模4取余的结果对数字分组,计算每组最大的3个数字并将 结果通过(group, number)形式返回 Args: numbers (PCollection): 输入PCollection,必须全部为数字 Returns: PCollection: 输出 >>> input_data = _pipeline.parallelize([1, 2, 3, 9, 8, 7, 4, 5, 6, 10, 11, 12, 15, 14, 13]) >>> print input_da

(numbers)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 3

flattenMethod · 0.80
apply_valuesMethod · 0.80
group_byMethod · 0.45

Tested by

no test coverage detected