Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/288.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 为什么DatastoreInputReader filters参数只支持相等运算符?_Python_Google App Engine_Mapreduce - Fatal编程技术网

Python 为什么DatastoreInputReader filters参数只支持相等运算符?

Python 为什么DatastoreInputReader filters参数只支持相等运算符?,python,google-app-engine,mapreduce,Python,Google App Engine,Mapreduce,我试图只处理特定日期之后发生的事件。为了实现这一点,我尝试使用大于运算符通过过滤器参数(mapper_params)。但是,我得到了以下错误:“仅支持相等筛选器” 下面是我的run方法的外观: def run(self, action, occurred_after): output = yield mapreduce_pipeline.MapreducePipeline( "word_count", "main.word

我试图只处理特定日期之后发生的事件。为了实现这一点,我尝试使用大于运算符通过过滤器参数(mapper_params)。但是,我得到了以下错误:“仅支持相等筛选器”

下面是我的run方法的外观:

 def run(self, action, occurred_after):
    output = yield mapreduce_pipeline.MapreducePipeline(
                "word_count",
                "main.word_count_map",
                "main.word_count_reduce",
                "mapreduce.input_readers.DatastoreInputReader",
                "mapreduce.output_writers.FileOutputWriter",
                mapper_params={
                    "entity_kind": 'models.Event',
                    "filters": [("action", "=", action),
                    ("occurred_on", ">", occurred_after )]
                },
                reducer_params={
                    "filesystem": "gs",
                    "gs_bucket_name": "mybucket/mapreduce_output",
                    "mime_type": "text/plain",
                    "output_sharding": "input"
                },
                shards=1)

有人知道为什么只支持“=”运算符吗?

MapReduce在内部使用实体键上的不平等过滤器将数据库分割成小块实体

首先,它查询仅存在于一小部分实体上的实体(平均每128个实体查询一次,概率为0.78%),然后在两个连续实体之间(实体x和实体x+128之间)查询实体,然后在该列表中的每个实体上运行映射器函数(对于每个x、x+128组,它创建一个任务)