久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    <i id='sxjzG'><tr id='sxjzG'><dt id='sxjzG'><q id='sxjzG'><span id='sxjzG'><b id='sxjzG'><form id='sxjzG'><ins id='sxjzG'></ins><ul id='sxjzG'></ul><sub id='sxjzG'></sub></form><legend id='sxjzG'></legend><bdo id='sxjzG'><pre id='sxjzG'><center id='sxjzG'></center></pre></bdo></b><th id='sxjzG'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='sxjzG'><tfoot id='sxjzG'></tfoot><dl id='sxjzG'><fieldset id='sxjzG'></fieldset></dl></div>
    • <bdo id='sxjzG'></bdo><ul id='sxjzG'></ul>
    <legend id='sxjzG'><style id='sxjzG'><dir id='sxjzG'><q id='sxjzG'></q></dir></style></legend>

    1. <small id='sxjzG'></small><noframes id='sxjzG'>

    2. <tfoot id='sxjzG'></tfoot>

        MapReduce 結(jié)果似乎限制為 100?

        MapReduce results seem limited to 100?(MapReduce 結(jié)果似乎限制為 100?)

      1. <tfoot id='6juLF'></tfoot>

        • <legend id='6juLF'><style id='6juLF'><dir id='6juLF'><q id='6juLF'></q></dir></style></legend>
            • <bdo id='6juLF'></bdo><ul id='6juLF'></ul>
              • <i id='6juLF'><tr id='6juLF'><dt id='6juLF'><q id='6juLF'><span id='6juLF'><b id='6juLF'><form id='6juLF'><ins id='6juLF'></ins><ul id='6juLF'></ul><sub id='6juLF'></sub></form><legend id='6juLF'></legend><bdo id='6juLF'><pre id='6juLF'><center id='6juLF'></center></pre></bdo></b><th id='6juLF'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='6juLF'><tfoot id='6juLF'></tfoot><dl id='6juLF'><fieldset id='6juLF'></fieldset></dl></div>

                <small id='6juLF'></small><noframes id='6juLF'>

                  <tbody id='6juLF'></tbody>

                  本文介紹了MapReduce 結(jié)果似乎限制為 100?的處理方法,對大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  我在 MongoDB 和 python 中使用 Map Reduce,但遇到了一個(gè)奇怪的限制.我只是想計(jì)算書"記錄的數(shù)量.它在少于 100 條記錄時(shí)有效,但當(dāng)超過 100 條記錄時(shí),由于某種原因計(jì)數(shù)會重置.

                  I'm playing around with Map Reduce in MongoDB and python and I've run into a strange limitation. I'm just trying to count the number of "book" records. It works when there are less than 100 records but when it goes over 100 records the count resets for some reason.

                  這是我的 MR 代碼和一些示例輸出:

                  Here is my MR code and some sample outputs:

                  var M = function () {
                  book = this.book;
                  emit(book, {count : 1});
                  }
                  
                  var R = function (key, values) {
                  var sum = 0;
                  values.forEach(function(x) {
                  sum += 1;
                  });
                  var result = {
                  count : sum 
                  };
                  return result;
                  }
                  

                  記錄數(shù)為99時(shí)的MR輸出:

                  MR output when record count is 99:

                  {u'_id': u'superiors', u'value': {u'count': 99}}
                  

                  記錄數(shù)為101時(shí)的MR輸出:

                  MR output when record count is 101:

                  {u'_id': u'superiors', u'value': {u'count': 2.0}}
                  

                  有什么想法嗎?

                  推薦答案

                  你的 reduce 函數(shù)應(yīng)該是對 count 值求和,而不僅僅是添加 1 每個(gè)值.否則,一個(gè) reduce 的輸出不能被正確地用作另一個(gè) reduce 的輸入.試試這個(gè):

                  Your reduce function should be summing up the count values, not just adding 1 for each value. Otherwise the output of a reduce can't properly be used as input back into another reduce. Try this instead:

                  var R = function (key, values) {
                    var sum = 0;
                    values.forEach(function(x) {
                      sum += x.count;
                    });
                    var result = {
                      count : sum 
                    };
                    return result;
                  }
                  

                  這篇關(guān)于MapReduce 結(jié)果似乎限制為 100?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  python: Two modules and classes with the same name under different packages(python:不同包下同名的兩個(gè)模塊和類)
                  Configuring Python to use additional locations for site-packages(配置 Python 以使用站點(diǎn)包的其他位置)
                  How to structure python packages without repeating top level name for import(如何在不重復(fù)導(dǎo)入頂級名稱的情況下構(gòu)造python包)
                  Install python packages on OpenShift(在 OpenShift 上安裝 python 包)
                  How to refresh sys.path?(如何刷新 sys.path?)
                  Distribute a Python package with a compiled dynamic shared library(分發(fā)帶有已編譯動態(tài)共享庫的 Python 包)

                  <i id='Us4Sy'><tr id='Us4Sy'><dt id='Us4Sy'><q id='Us4Sy'><span id='Us4Sy'><b id='Us4Sy'><form id='Us4Sy'><ins id='Us4Sy'></ins><ul id='Us4Sy'></ul><sub id='Us4Sy'></sub></form><legend id='Us4Sy'></legend><bdo id='Us4Sy'><pre id='Us4Sy'><center id='Us4Sy'></center></pre></bdo></b><th id='Us4Sy'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='Us4Sy'><tfoot id='Us4Sy'></tfoot><dl id='Us4Sy'><fieldset id='Us4Sy'></fieldset></dl></div>
                    <tbody id='Us4Sy'></tbody>

                      <small id='Us4Sy'></small><noframes id='Us4Sy'>

                      • <bdo id='Us4Sy'></bdo><ul id='Us4Sy'></ul>
                        <tfoot id='Us4Sy'></tfoot>

                        1. <legend id='Us4Sy'><style id='Us4Sy'><dir id='Us4Sy'><q id='Us4Sy'></q></dir></style></legend>
                          • 主站蜘蛛池模板: 盗摄精品av一区二区三区 | 一级毛片色一级 | 日韩美女爱爱 | 四虎午夜剧场 | 狠狠干av | 欧美性生活视频 | 国产乱码精品1区2区3区 | 一级做a爰片久久毛片 | 美女日批免费视频 | 亚洲精品66 | 狠狠色综合网站久久久久久久 | 一区二区影视 | 久久激情五月丁香伊人 | 日韩欧美三级电影在线观看 | 一区二区三区视频免费观看 | 丝袜美腿一区 | 日韩欧美大片在线观看 | 欧美一区二区三区在线播放 | 日本午夜网 | 亚洲第一区久久 | 国产999精品久久久 日本视频一区二区三区 | 久久久久久国产 | 国产激情一区二区三区 | 精品伦精品一区二区三区视频 | 狠狠操电影 | 美国av毛片 | 欧美国产亚洲一区二区 | 亚洲精品一二三区 | 五月综合久久 | 亚洲欧美国产毛片在线 | 久久天天躁狠狠躁夜夜躁2014 | 国产视频福利一区 | 另类 综合 日韩 欧美 亚洲 | 狠狠艹| 久久久久久久电影 | 精品一区二区三区在线观看国产 | 国产精品久久久久久久久久久免费看 | 精品视频一区二区 | 精品欧美一区二区三区免费观看 | 97日日碰人人模人人澡分享吧 | 一级欧美一级日韩片 |