Google 数据流挂起,没有日志
Google Dataflow hangs with no logs
当我使用 *DataflowPipelineRunner 运行 example WordCount job 来自 Dataflow 文档时,它启动工作程序然后挂起状态 运行。
最后两条状态消息:
Jan 29, 2016, 22:05:50
S02: (b959a12901787f4d): Executing operation ReadLines+WordCount.CountWords/ParDo(ExtractWords)+WordCount.CountWords/Count.PerElement/Init+WordCount.CountWords/Count.PerElement/Count.PerKey/GroupByKey+WordCount.CountWords/Count.PerElement/Count.PerKey/Combine.GroupedValues/Partial+WordCount.CountWords/Count.PerElement/Count.PerKey/GroupByKey/Reify+WordCount.CountWords/Count.PerElement/Count.PerKey/GroupByKey/Write
Jan 29, 2016, 22:06:42
(c3fc1276c0229a41): Workers have started successfully.
就是这样。当我点击 "Worker logs" 时,它完全是空的。这样至少保持20分钟。
它可以与 DirectPipelineRunner 一起正常工作(在几秒钟内完成并在我的 gs://... 上创建输出文件)。
我应该看什么?
命令行参数:
--project=my-project
--stagingLocation=gs://my-project/dataflow/staging
没有日志显示的一个常见原因是云日志 API 尚未启用。如果 getting started guide 中列出的所有 API 都没有启用,那么它可能会导致您描述的两个问题(没有日志记录和挂起的工作人员)。
尝试再次浏览入门指南并启用所有相关的 API。
如果所有 API 都已启用,请检查您的用户身份验证。
glcoud auth login
和
gcloud auth application-default login
此外,请确保您拥有 运行 那些用户具有 project owner or editor
访问权限的命令。
否则,您可以将服务帐户用于您的工作,如下所示
import os
os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = '<creds.json>'
当我使用 *DataflowPipelineRunner 运行 example WordCount job 来自 Dataflow 文档时,它启动工作程序然后挂起状态 运行。
最后两条状态消息:
Jan 29, 2016, 22:05:50
S02: (b959a12901787f4d): Executing operation ReadLines+WordCount.CountWords/ParDo(ExtractWords)+WordCount.CountWords/Count.PerElement/Init+WordCount.CountWords/Count.PerElement/Count.PerKey/GroupByKey+WordCount.CountWords/Count.PerElement/Count.PerKey/Combine.GroupedValues/Partial+WordCount.CountWords/Count.PerElement/Count.PerKey/GroupByKey/Reify+WordCount.CountWords/Count.PerElement/Count.PerKey/GroupByKey/Write
Jan 29, 2016, 22:06:42
(c3fc1276c0229a41): Workers have started successfully.
就是这样。当我点击 "Worker logs" 时,它完全是空的。这样至少保持20分钟。
它可以与 DirectPipelineRunner 一起正常工作(在几秒钟内完成并在我的 gs://... 上创建输出文件)。
我应该看什么?
命令行参数:
--project=my-project
--stagingLocation=gs://my-project/dataflow/staging
没有日志显示的一个常见原因是云日志 API 尚未启用。如果 getting started guide 中列出的所有 API 都没有启用,那么它可能会导致您描述的两个问题(没有日志记录和挂起的工作人员)。
尝试再次浏览入门指南并启用所有相关的 API。
如果所有 API 都已启用,请检查您的用户身份验证。
glcoud auth login
和
gcloud auth application-default login
此外,请确保您拥有 运行 那些用户具有 project owner or editor
访问权限的命令。
否则,您可以将服务帐户用于您的工作,如下所示
import os
os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = '<creds.json>'