【问题标题】:Argument does not begin with '--' error while executing Apache Beam WordCount example from Eclipse in java在 java 中从 Eclipse 执行 Apache Beam WordCount 示例时,参数不以“--”错误开头
【发布时间】:2020-09-12 22:59:41
【问题描述】:

我正在尝试从 Eclipse 中执行示例 WordCount(Java 代码),如 https://cloud.google.com/dataflow/docs/quickstarts/quickstart-java-eclipse#run-the-wordcount-example-pipeline-on-the-cloud-dataflow-service

通过 RunConfiguration 执行时,在 Eclipse 控制台中出现以下错误。

Exception in thread "main" java.lang.IllegalArgumentException: Argument '-output=gs://bucket-for-beam/stage-folder/output-file-prefix' does not begin with '--'
    at org.apache.beam.repackaged.beam_sdks_java_core.com.google.common.base.Preconditions.checkArgument(Preconditions.java:191)
    at org.apache.beam.sdk.option[s.PipelineOptionsFactory.parseCommandLine(PipelineOptionsFactory.java:1423)
    at org.apache.beam.sdk.options.PipelineOptionsFactory.access$200(PipelineOptionsFactory.java:110)
    at org.apache.beam.sdk.options.PipelineOptionsFactory$Builder.as(PipelineOptionsFactory.java:294)
    at com.gcp.dataflow.examples.WordCount.main(WordCount.java:190)][1]

我创建了一个存储桶,名为“bucket-for-beam”文件夹,名为“stage-folder”:

【问题讨论】:

    标签: eclipse apache-beam


    【解决方案1】:

    --- 是不同的。您已经在参数选项卡上指定了第一个。它期待第二个。

    【讨论】:

      【解决方案2】:

      对我来说,这是由于命令的不同选项之间有空格

      【讨论】:

      • 他只有一个选项和零个空格
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-11-15
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多