0

Ich erhalte die folgenden Fehler während des Kompilierens des Google Datenflussbeispiels auf der Cloud-Instanz. Ich versuche, das Streaming-Beispiel mit dem Namen StreamingWordCount mit dem folgenden BefehlStreamingWordCount Beispiel Maven Kompilierzeit Fehler

mvn compile exec:java -Dexec.mainClass=com.google.cloud.dataflow.examples.complete.StreamingWordCount.java 


Gibt es etwas, das ich tue, falsch zu laufen? Jede Hilfe ist willkommen.
Dank

[INFO] Scanning for projects... 
[INFO]                   
[INFO] ------------------------------------------------------------------------ 
[INFO] Building Google Cloud Dataflow Java Examples - All manual_build 
[INFO] ------------------------------------------------------------------------ 
[INFO] 
[INFO] --- build-helper-maven-plugin:1.10:add-source (add-java8-main-source) @ google-cloud-dataflow-java-examples-all --- 
[INFO] Source directory: /home/gaurav_bareja/pipeline/DataflowJavaSDK-examples/src/main/java8 added. 
[INFO] 
[INFO] --- build-helper-maven-plugin:1.10:add-test-source (add-java8-test-source) @ google-cloud-dataflow-java-exam 
ples-all --- 
[INFO] Test Source directory: /home/gaurav_bareja/pipeline/DataflowJavaSDK-examples/src/test/java8 added. 
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ google-cloud-dataflow-java-examples-all --- 
[INFO] Using 'UTF-8' encoding to copy filtered resources. 
[INFO] skip non existing resourceDirectory /home/gaurav_bareja/pipeline/DataflowJavaSDK-examples/src/main/resources 
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ google-cloud-dataflow-java-examples-all --- 
[INFO] Nothing to compile - all classes are up to date 
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (java8-compile) @ google-cloud-dataflow-java-examples-all --- 
[INFO] Nothing to compile - all classes are up to date 
[INFO] 
[INFO] >>> exec-maven-plugin:1.1:java (default-cli) > validate @ google-cloud-dataflow-java-examples-all >>> 
[INFO] 
[INFO] <<< exec-maven-plugin:1.1:java (default-cli) < validate @ google-cloud-dataflow-java-examples-all <<< 
[INFO] 
[INFO] --- exec-maven-plugin:1.1:java (default-cli) @ google-cloud-dataflow-java-examples-all --- 
[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 3.496 s 
[INFO] Finished at: 2016-03-19T13:23:56+00:00 
[INFO] Final Memory: 15M/56M 
[INFO] ------------------------------------------------------------------------ 
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.1:java (default-cli) on project google-cloud-d 
ataflow-java-examples-all: An exception occured while executing the Java class. com.google.cloud.dataflow.examples. 
complete.StreamingWordCount.java -> [Help 1] 
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. 
[ERROR] Re-run Maven using the -X switch to enable full debug logging. 
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles: 
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecution 

Exception

+0

Können Sie einen Link zur Quelle des Beispiels veröffentlichen, damit wir das Problem reproduzieren können? Versuchen Sie auch mit 'mvn compile exec: java -Dexec.mainClass = com.google.cloud.dataflow.examples.complete.StreamingWordCount' ohne die' .java' am Ende. – Tunaki

+0

Danke, das hat geholfen. – alpheus

Antwort

1

Sie scheinen für Java mit dem Google Cloud Dataflow SDK kommt zu versuchen, das StreamingWordCount Beispiel auszuführen,. Das Beispiel unter diesem Namen existiert nicht - daher die Ausnahme, die Sie sehen.

Sie möchten wahrscheinlich stattdessen WindowedWordCount ausführen, ein Beispiel, das zeigt, wie dieselbe Pipeline entweder über unbegrenzte PCollections im Streaming-Modus oder begrenzte PCollections im Batch-Modus ausgeführt wird.

Bitte folgen Sie den Anweisungen here.

+0

Danke, das hat wirklich geholfen. Außerdem musste ich .java vom Ende entfernen. – alpheus