小编Bha*_*aja的帖子

从 Google App Engine 应用运行 Google Dataflow 管道?

我正在使用 DataflowPipelineRunner 创建数据流作业。我尝试了以下场景。

  1. 不指定任何 machineType
  2. 配g1小机
  3. 使用 n1-highmem-2

在上述所有场景中,输入是来自 GCS 的一个非常小的文件(KB 大小),输出是大查询表。

我在所有情况下都出现内存不足错误

我编译的代码的大小是 94mb。我只尝试字数统计示例,它没有读取任何输入(在作业开始之前它失败了)。请帮助我理解为什么我会收到此错误。

注意:我正在使用 appengine 来开始这项工作。

注意:相同的代码适用于 beta 版本0.4.150414

编辑 1

根据答案中的建议尝试了以下操作,

  1. 自动缩放切换到基本缩放
  2. 二手机器类型B2,提供 256MB 内存

经过这些配置,Java Heap Memory 问题就解决了。但它试图将一个 jar 上传到超过 10Mb 的暂存位置,因此它失败了。

它记录以下异常

com.google.api.client.http.HttpRequest execute: exception thrown while executing request
com.google.appengine.api.urlfetch.RequestPayloadTooLargeException: The request to https://www.googleapis.com/upload/storage/v1/b/pwccloudedw-stagging-bucket/o?name=appengine-api-L4wtoWwoElWmstI1Ia93cg.jar&uploadType=resumable&upload_id=AEnB2Uo6HCfw6Usa3aXlcOzg0g3RawrvuAxWuOUtQxwQdxoyA0cf22LKqno0Gu-hjKGLqXIo8MF2FHR63zTxrSmQ9Yk9HdCdZQ exceeded the 10 MiB limit.
at com.google.appengine.api.urlfetch.URLFetchServiceImpl.convertApplicationException(URLFetchServiceImpl.java:157)
at com.google.appengine.api.urlfetch.URLFetchServiceImpl.fetch(URLFetchServiceImpl.java:45)
at com.google.apphosting.utils.security.urlfetch.URLFetchServiceStreamHandler$Connection.fetchResponse(URLFetchServiceStreamHandler.java:543)
at com.google.apphosting.utils.security.urlfetch.URLFetchServiceStreamHandler$Connection.getInputStream(URLFetchServiceStreamHandler.java:422)
at com.google.apphosting.utils.security.urlfetch.URLFetchServiceStreamHandler$Connection.getResponseCode(URLFetchServiceStreamHandler.java:275)
at com.google.api.client.http.javanet.NetHttpResponse.<init>(NetHttpResponse.java:36)
at com.google.api.client.http.javanet.NetHttpRequest.execute(NetHttpRequest.java:94)
at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:965)
at …
Run Code Online (Sandbox Code Playgroud)

google-bigquery google-cloud-platform google-cloud-dataflow

3
推荐指数
1
解决办法
1465
查看次数