public class DataflowWorker extends Object
DataflowWorker presents one public interface, getAndPerformWork(), which uses the WorkUnitClient to get work, execute it, and update the work.
| Modifier and Type | Class and Description |
|---|---|
static class |
DataflowWorker.WorkUnitClient
Abstract base class describing a client for WorkItem work units.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_STATUS_PORT |
| Constructor and Description |
|---|
DataflowWorker(DataflowWorker.WorkUnitClient workUnitClient,
DataflowWorkerHarnessOptions options) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
getAndPerformWork()
Gets WorkItem and performs it; returns true if work was
successfully completed.
|
void |
runStatusServer(int statusPort)
Runs the status server to report worker health on the specified port.
|
public static final int DEFAULT_STATUS_PORT
public DataflowWorker(DataflowWorker.WorkUnitClient workUnitClient, DataflowWorkerHarnessOptions options)
public boolean getAndPerformWork()
throws IOException
getAndPerformWork may throw if there is a failure of the WorkUnitClient.
IOExceptionpublic void runStatusServer(int statusPort)