编译发现符号的错误,包括Pipeline,PCollection,PipelineOptions等 [英] Compile errors finding symbols including Pipeline, PCollection, PipelineOptions, etc

查看:51
本文介绍了编译发现符号的错误,包括Pipeline,PCollection,PipelineOptions等的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从今天开始,由于在Java的Dataflow SDK中找不到许多关键类的错误,我将对用于正确编译的现有代码进行构建中断.例如:

As of today, I'm getting a build break for existing code that used to compile correctly, due to error locating many key classes in the Dataflow SDK for Java. For example:

[ERROR] /tmp/first-dataflow/src/main/java/com/google/cloud/dataflow/examples/common/DataflowExampleUtils.java:[30,37] cannot find symbol
[ERROR] symbol:   class Pipeline
[ERROR] location: package com.google.cloud.dataflow.sdk

API是否已更改?

推荐答案

使用适用于Java的Google Cloud Dataflow SDK的先前推荐的版本范围[1.0.0,2.0.0)的现有Maven项目可能会很快采用新的该SDK的2.0.0-beta1版本.此新版本具有与1.x版本不兼容的API,因此将其与现有代码一起使用将导致这些损坏.

Existing Maven projects that use the previously recommended version range [1.0.0, 2.0.0) for the Google Cloud Dataflow SDK for Java may soon pick up the new 2.0.0-beta1 version of that SDK. This new version has APIs that are not compatible with the 1.x releases, so using this it with existing code will cause these kinds of breakages.

如果您受到影响,请更新Maven pom.xml以使用排除2.x家族中任何内容的版本范围,例如,使用[1.0.0,1.99),如下所示:

If you are impacted, update your Maven pom.xml to use a version range that precludes anything in the 2.x family, for example by using [1.0.0, 1.99), as follows:

<dependency>
  <groupId>com.google.cloud.dataflow</groupId>
  <artifactId>google-cloud-dataflow-java-sdk-all</artifactId>
  <version>[1.0.0,1.99)</version>
</dependency>

这应该可以解决您的编译问题,并允许您继续使用1.x系列的最新版本(当前为1.9.0).

This should fix your compile issues and allow you to continue with the most recent release in the 1.x series (currently 1.9.0).

有关更多信息和更新,您可以遵循以下 GitHub问题.

For more information and updates, you can follow this GitHub issue.

另外,您可以在其

Separately, you can learn more about the 2.0.0-beta1 release, including what these incompatible API changes are, in its release notes. But be aware that it is an early preview and has corresponding caveats about API stability, support timelines, and documentation.

这篇关于编译发现符号的错误,包括Pipeline,PCollection,PipelineOptions等的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆