Generating the Streaming Job API Client Classes

Generating the Streaming Job API Client Classes

The GPSS Streaming Job API service definition defines messages and services exposed by the GPSS gRPC server. This definition resides in the job.proto file. You must run the protocol buffer compiler (protoc) on the job.proto file to generate the classes that the GPSS client uses to send and manage streaming jobs to Greenplum Database.

In some build environments such as gradle, you can configure the build to automatically generate the GPSS client classes for you. Refer to the gRPC examples for your programming language for sample build configurations with automatic code generation.

You may choose to run the protocol buffer compiler manually. If you choose to run the command manually, be sure to specify the gRPC codegen plugin for the programming language in which you are developing the GPSS client. For example, you may run a command similar to the following to generate the gRPC GPSS Go client code:
user@devsys$ protoc --go_out=plugins=grpc:. --go_opt=paths=source_relative jobclient/job.proto

This command generates a jobclient/job.pb.go file, which contains code for populating, serializing, and retrieving the Streaming Job message types. It also contains generated client and server code.