Skip to content

Google Cloud Dataflow provides a simple, powerful model for building both batch and streaming parallel data processing pipelines.

License

Notifications You must be signed in to change notification settings

ngrunwald/DataflowJavaSDK

Repository files navigation

Cloud Dataflow Java SDK (Alpha)

Google Cloud Dataflow provides a simple, powerful programming model for building both batch and streaming parallel data processing pipelines.

Status Build Status

The Cloud Dataflow SDK is used to access the Google Cloud Dataflow service, which is currently in Alpha and restricted to whitelisted users.

The SDK is publicly available and can be used for local execution by anyone. Note, however, that the SDK is also an Alpha release and may change significantly over time. The SDK is built to be extensible and support additional execution environments ("runners") beyond local execution and the Google Cloud Dataflow service. As the product matures, we look forward to working with you to improve Cloud Dataflow.

Overview

The key concepts in this programming model are:

  • PCollection: represents a collection of data, which could be bounded or unbounded in size.
  • PTransform: represents a computation that transforms input PCollections into output PCollections.
  • Pipeline: manages a directed acyclic graph of PTransforms and PCollections that is ready for execution.
  • PipelineRunner: specifies where and how the pipeline should execute.

We provide three PipelineRunners:

  1. The DirectPipelineRunner runs the pipeline on your local machine.
  2. The DataflowPipelineRunner submits the pipeline to the Dataflow Service, where it runs using managed resources in the Google Cloud Platform (GCP).
  3. The BlockingDataflowPipelineRunner submits the pipeline to the Dataflow Service via the DataflowPipelineRunner and then prints messages about the job status until the execution is complete.

The Dataflow Service is currently in the Alpha phase of development and access is limited to whitelisted users.

Additionally, in partnership with Cloudera, you can run Dataflow pipelines on an Apache Spark backend. The relevant runner code is hosted in this repository.

Getting Started

This repository consists of two modules:

  • SDK module provides a set of basic Java APIs to program against.
  • Examples module provides a few samples to get started. We recommend starting with the WordCount example.

The following command will build both modules and install them in your local Maven repository:

mvn clean install

You can speed up the build and install process by using the following options:

  1. To skip execution of the unit tests, run:

    mvn install -DskipTests

  2. While iterating on a specific module, use the following command to compile and reinstall it. For example, to reinstall the examples module, run:

    mvn install -pl examples

Be careful, however, as this command will use the most recently installed SDK from the local repository (or Maven Central) even if you have changed it locally.

  1. To run Maven using multiple threads, run:

    mvn -T 4 install

If you are using Eclipse integrated development environment (IDE), please additionally review our Eclipse integration instructions.

Running the Examples

After building and installing, you can execute the WordCount and other example pipelines by following the instructions in this README.

Contact Us

We welcome all usage-related questions on Stack Overflow tagged with google-cloud-dataflow.

Please use issue tracker on GitHub to report any bugs, comments or questions regarding SDK development.

More Information

About

Google Cloud Dataflow provides a simple, powerful model for building both batch and streaming parallel data processing pipelines.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 99.7%
  • Other 0.3%