{"description":"\u8b0e\u3063\u3066\u3044\u3046\u306e\u306f\u81ea\u5206\u306b\u3068\u3063\u3066\u3068\u3044\u3046\u3060\u3051\u306a\u306e\u3067\u3042\u3057\u304b\u3089\u305a\u3002 \u521d\u3081\u3066\u306eSpark\u8aad\u3093\u3067\u3066\u3001aggregate\u95a2\u6570\u306a\u308b\u3082\u306e\u304c\u8aac\u660e\u8aad\u3093\u3067\u3082\u3088\u304f\u308f\u304b\u3089\u306a\u304b\u3063\u305f\u306e\u3067\u3001\u5099\u5fd8\u9332\u3068\u3057\u3066\u4eca\u306e\u81ea\u5206\u306e\u7406\u89e3\u3092\u66f8\u3044\u3066\u304a\u304d\u307e\u3059\u3002 \u3042\u307e\u308a\u826f\u304f\u8abf\u3079\u3066\u3044\u306a\u3044\u306e\u3067\u3001\u9593\u9055\u3063\u3066\u3044\u308b\u53ef\u80fd\u6027\u5927\u3067\u3059\u3002\u5f8c\u3067\u8abf\u3079\u3066\u3066\u9593\u9055\u3063\u3066\u3044\u305f\u3089\u8ffd\u8a18\u3057\u307e\u3059\u3002 nums = sc.parallelize([1,2,3,4,5,6,7,8,9,10]) sumCount = nums.aggregate((0, 0), (lambda acc, value: (acc[0] + value, acc[1] + 1)), (lambda acc1, acc2: (ac\u2026","height":"190","author_url":"https://blog.hatena.ne.jp/thekoruku/","width":"100%","url":"https://dibtp.hateblo.jp/entry/2015/10/11/115501","image_url":null,"published":"2015-10-11 11:55:01","blog_title":"done is better than perfect","categories":["Python","Spark"],"type":"rich","provider_name":"Hatena Blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fdibtp.hateblo.jp%2Fentry%2F2015%2F10%2F11%2F115501\" title=\"Spark\u306eaggregate\u304c\u8b0e\u3059\u304e\u305f\u306e\u3067\u30e1\u30e2 - done is better than perfect\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","author_name":"thekoruku","provider_url":"https://hatena.blog","blog_url":"https://dibtp.hateblo.jp/","version":"1.0","title":"Spark\u306eaggregate\u304c\u8b0e\u3059\u304e\u305f\u306e\u3067\u30e1\u30e2"}