【发布时间】:2015-06-19 18:09:43
【问题描述】:
我想使用 com.google.cloud.dataflow.examples.PubsubFileInjector 将 GCS 文件转换为 pubsub 事件。
但是,当我提交管道时,如下:
java -cp $JAR_FILE com.google.cloud.dataflow.examples.PubsubFileInjector \
--runner=DataflowPipelineRunner \
--project="project-id" \
--stagingLocation="gs://cloud-dataflow-workspace" \
--input="gs://some/bucket/file" \
--outputTopic="projects/project-id/topics/test-topic"
管道运行时出现以下错误:
Apr 14, 2015, 9:37:36 AM(2b75a55e85963052): java.lang.RuntimeException: com.google.api.client.googleapis.json.GoogleJsonResponseException: 400 Bad Request { "code" : 400, "errors" : [ { "domain" : "global", "message" : "Invalid resource name given (name=projects/project-id/topics/test-topic). Refer to https://cloud.google.com/pubsub/overview#names for more information.", "reason" : "invalidArgument" } ],
但是我确定我的主题名称是正确的。它遵循https://cloud.google.com/pubsub/overview#names 中所述的规则。当我列出所有主题时,主题就会出现。
【问题讨论】:
标签: google-cloud-dataflow google-cloud-pubsub