From 9cb159420697f73701a7ac901f04d16719c6c07a Mon Sep 17 00:00:00 2001 From: AmitGlam <61658403+AmitGlam@users.noreply.github.com> Date: Thu, 20 Apr 2023 17:24:22 +0300 Subject: [PATCH] Update README.md --- java-gcp-dataflow/README.md | 62 +++---------------------------------- 1 file changed, 4 insertions(+), 58 deletions(-) diff --git a/java-gcp-dataflow/README.md b/java-gcp-dataflow/README.md index 1582325d..417c76c2 100644 --- a/java-gcp-dataflow/README.md +++ b/java-gcp-dataflow/README.md @@ -8,70 +8,16 @@ Before following this guide we recommend completing the basic [Java + Rookout tu This example is based of the Java word-count-beam example available [here]. -1. Add your sources to the package: +1. Before executing the pipeline run [here](https://beam.apache.org/get-started/wordcount-example/#:~:text=section%2C%20MinimalWordCount.-,To%20run%20this%20example%20in%20Java,-%3A), export Rookout Environmnet variables: ```xml - - - ${basedir}/src/main/java - - + export ROOK_AGENT_JAR="/YourPath/rook.jar" ``` - -2. We imported Rookout packages and the Google services API to the project jar(`pom.xml`): ```xml - - com.rookout - rook - LATEST - - - - com.sun - tools - 1.7.0.13 - - - - com.google.auto.service - auto-service - 1.0-rc6 - + export JAVA_TOOL_OPTIONS="-javaagent:$ROOK_AGENT_JAR -DROOKOUT_TOKEN=" ``` - -3. Add nuiton repository to your repositories section: - ```xml - - nuiton - nuiton - http://maven.nuiton.org/release/ - - ``` -4. Adding the RookoutJvmInitializer class to your solution - ```java - package ; - - import com.rookout.rook.API; - import com.rookout.rook.RookOptions; - import org.apache.beam.sdk.harness.JvmInitializer; - import org.apache.beam.sdk.options.PipelineOptions; - import com.google.auto.service.AutoService; - import java.util.HashMap; - @AutoService(JvmInitializer.class) - public class RookoutJvmInitializer implements JvmInitializer { - @Override - public void beforeProcessing(PipelineOptions options) { - RookOptions opts = new RookOptions(); - opts.token = ""; - opts.labels = new HashMap() {{ - put("env", "prod"); - }}; - API.start(opts); - } - } - ``` -5. Deploy your app and go to [http://app.rookout.com](http://app.rookout.com) and start debugging! +2. Deploy your app and go to [http://app.rookout.com](http://app.rookout.com) and start debugging! [Java + Rookout]: https://docs.rookout.com/docs/sdk-setup.html [here]: https://beam.apache.org/get-started/wordcount-example/