• <i id='ONfzx'><tr id='ONfzx'><dt id='ONfzx'><q id='ONfzx'><span id='ONfzx'><b id='ONfzx'><form id='ONfzx'><ins id='ONfzx'></ins><ul id='ONfzx'></ul><sub id='ONfzx'></sub></form><legend id='ONfzx'></legend><bdo id='ONfzx'><pre id='ONfzx'><center id='ONfzx'></center></pre></bdo></b><th id='ONfzx'></th></span></q></dt></tr></i><div id='ONfzx'><tfoot id='ONfzx'></tfoot><dl id='ONfzx'><fieldset id='ONfzx'></fieldset></dl></div>

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

      <bdo id='ONfzx'></bdo><ul id='ONfzx'></ul>

    1. <legend id='ONfzx'><style id='ONfzx'><dir id='ONfzx'><q id='ONfzx'></q></dir></style></legend>
      1. <tfoot id='ONfzx'></tfoot>

        mapreduce 难以理解

        时间:2023-09-12

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

              • <bdo id='cAgYK'></bdo><ul id='cAgYK'></ul>
                  <tbody id='cAgYK'></tbody>

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

                • <legend id='cAgYK'><style id='cAgYK'><dir id='cAgYK'><q id='cAgYK'></q></dir></style></legend>
                  <tfoot id='cAgYK'></tfoot>

                  本文介绍了mapreduce 难以理解的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我已经看到下面的链接,它是使用 python 开始 mapreduce 的链接

                  I have seen the below link which is of getting started mapreduce with python

                  http://code.google.com/p/appengine-mapreduce/wiki/GettingStartedInPython

                  但我仍然无法理解它是如何工作的.我正在执行下面的代码,但无法理解到底发生了什么?

                  But still I am not able to understand how its working. I am executing below code but not able to understand what exactly is happening?

                  ma​​preduce.yaml

                  mapreduce: 
                  - name: Testmapper 
                     mapper: 
                         input_reader: mapreduce.input_readers.DatastoreInputReader 
                         handler: main.process 
                     params: 
                         - name: entity_kind 
                           default: main.userDetail
                  

                  ma​​preduce/main.py

                  some code
                  
                  class userDetail(db.Model): 
                  name = db.StringProperty()
                  
                  some code
                  
                  def process(u): 
                            u.name="mahesh" 
                            yield op.db.Put(u)
                  

                  我正在执行此操作,它在状态页面中为我提供了 status = success.

                  I am executing this and it gives me status = success in status page.

                  但无法理解发生了什么

                  我想用 mapreduce 做的主要事情是从实体中搜索或计算记录

                  The main thing I want do with mapreduce is to search or count records from entity

                  那么任何人都可以帮助我吗??

                  So anyone can please help me??

                  提前致谢

                  推荐答案

                  您正在将 "mahesh" 值设置为所有 userDetail 的 StringProperty name 实体.

                  You are setting the "mahesh" value to the StringProperty name of all your userDetail entities.

                  如果您想计算您的实体,请使用:

                  If you want to count your entities use :

                  from mapreduce import operation as op
                   def process(entity):
                      yield op.counters.Increment("counter1")
                  

                  这篇关于mapreduce 难以理解的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

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

                    <tfoot id='MPSa1'></tfoot>

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

                        • <bdo id='MPSa1'></bdo><ul id='MPSa1'></ul>
                          <legend id='MPSa1'><style id='MPSa1'><dir id='MPSa1'><q id='MPSa1'></q></dir></style></legend>
                            <tbody id='MPSa1'></tbody>