【问题标题】:Python AppEngine MapReducePython AppEngine MapReduce
【发布时间】:2016-10-17 08:25:32
【问题描述】:

我创建了一个非常简单的 MapReduce 管道,但我有一个神秘的:

PipelineSetupError: Error starting production.cron.pipelines.ItemsInfoPipeline(*(), **{})#a741186284ed4fb8a4cd06e38921beff:

当我尝试启动它时。这是管道代码:

class ItemsInfoPipeline(base_handler.PipelineBase):
"""
"""

    def run(self):
        output = yield mapreduce_pipeline.MapreducePipeline(
            job_name="items_job",
            mapper_spec="production.cron.mappers.items_info_mapper",
            input_reader_spec="mapreduce.input_readers.DatastoreInputReader",
            mapper_params={
                "input_reader": {
                    "entity_kind": "production.models.Transaction"
                }
            }
        )

        yield ItemsInfoStorePipeline(output)


class ItemsInfoStorePipeline(base_handler.PipelineBase):
"""
"""

    def run(self, statistics):
        print statistics
        return "OK"

当然,我已经仔细检查了映射器路径是否正确,并考虑到 ItemsInfoStorePipeline 没有做任何事情,因为我正在关注管道是否已启动,而这并没有发生。

都是由 Flask 视图触发的,如下:

class ItemsInfoMRJob(views.MethodView):
"""

It's based on transacions.

"""

    def get(self):
    """

    :return:
    """
        pipeline = ItemsInfoPipeline()
        pipeline.start()

        redirect_url = "%s/status?root=%s" % (pipeline.base_path, pipeline.pipeline_id)

        return flask.redirect(redirect_url)

我正在使用GoogleAppEngineMapReduce==1.9.22.0

感谢您的帮助。

更新

上述代码一旦部署就可以工作。

更新 2

显然有更多的人在处理这个问题:

https://github.com/GoogleCloudPlatform/appengine-mapreduce/issues/103

【问题讨论】:

    标签: python google-app-engine mapreduce google-app-engine-python


    【解决方案1】:

    我正在更新这个。我有一个使用管道的代码库,并且在 OSX 中运行良好。我有另一个使用 OSX 的开发人员,我似乎没有做任何事情,他明白了:

    ProtoRPC 方法实现遇到意外错误:PipelineSetupError

    我尝试过交换版本并让我们的 PC 完美匹配,并且这种情况继续发生。我终于崩溃并在 docker 中构建了一个 Ubuntu 映像。我也在尽我所能来完美匹配我们的 AppEngine 和库版本。

    它也拒绝以相同的消息开始。我开始在库中工作,取消注释正在吞噬错误的部分,但这是一个很长的兔子洞,因为它上面的很多东西似乎也在吞噬正在发生的事情。

    【讨论】:

    • 有趣。您可以在此处粘贴以下结果:which dev_appserver.py 吗?真的很有用。
    • 它只在那台机器上工作。我的 osx 盒子工作正常。出于绝望,我在 Ubuntu 上创建了一个 docker 镜像库,并且可靠地抛出了这个错误,上面并没有解决它。
    猜你喜欢
    • 1970-01-01
    • 2011-08-26
    • 2011-08-14
    • 2012-03-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多