1
votes

While trying to run the Google cloud dataflow Wordcount example in eclipse referenced here https://cloud.google.com/dataflow/docs/quickstarts/quickstart-java-eclipse

I am getting the following error:

An internal error occurred during: "Update Hierarchy". Tried to create a TypeHierarchyPipelineOptionsHierarchy for a Java Project 'my project name' where no PipelineOptions type exists

This issue was also faced by somebody else as per the following stackoverflow link:

Eclipse: An internal error occurred during: "Update Hierarchy"

I tried the solution above, the project compiles but it does not run even after Force Update of Snapshots/Releases as explained above.

Based on my research of the problem it looks like google-cloud-dataflow-java-sdk-all-2.0.0-beta1.jar does not have the PipelineRunner class, which is causing the error. The 1.9.0 version of the same jar had those classes. I cannot use 1.9.0 version of the jar directly because it causes other compilation errors e.g. package change to 'org.apache.beam' instead of 'com.google.cloud.dataflow'

2
It's not clear if you are suggesting that there is a bug or asking a question. If you have a question, please update your post to include the specific steps you are taking (not a link offsite) and the actual error output you see. - Grisha Levit
thanks, updated the question per your advice. - Sachin Gupta

2 Answers

1
votes

Indeed, there's an issue in the older versions of the Google Cloud Dataflow plugin for Eclipse -- older versions are not forward-compatible with Dataflow SDKs 2.x series, but the project generation may still automatically create a project using the newest 2.x SDK.

To solve the problem, please upgrade to the newest version of the plugin.

0
votes

Projects generated with versions 1.1.2 of the Dataflow Plugin for Eclipse and earlier will generate projects using the most recent archetype. With the release of Dataflow 2.0.0-beta1, the generated project will use the Apache Beam SDK as an underlying dependency. Modifying the project version to 1.9.0 or earlier will not modify the generated code, which causes the compilation failures you're experiencing.

Version 1.1.3 of the plugin will ensure that any generated project remains within the Dataflow namespace. Future versions will also work forwards-compatibly with Apache Beam. Version 1.1.3 should be available - in Eclipse, go to Help -> Check for Updates (possibly running Perform Setup Tasks to clear the cached current version) should make the updated plugin available.

We have published version 1.1.3 of the Dataflow Plugin for Eclipse; the quickstart example should now function. The project you've generated will not work until a future release of the Dataflow Plugin for Eclipse. Updating the plugin and re-running the quickstart should succeed.