Documentation ¶
Index ¶
- type Client
- func (c *Client) Checkpoints(jobID string) (checkpointsResp, error)
- func (c *Client) Config() (configResp, error)
- func (c *Client) DeleteJar(jarid string) error
- func (c *Client) Jars() (jarsResp, error)
- func (c *Client) Job(jobID string) (jobResp, error)
- func (c *Client) JobManagerConfig() ([]kv, error)
- func (c *Client) JobManagerMetrics(ids []string) ([]metricValue, error)
- func (c *Client) JobMetrics(opts JobMetricsOpts) (map[string]interface{}, error)
- func (c *Client) Jobs() (jobsResp, error)
- func (c *Client) JobsOverview() (OverviewResp, error)
- func (c *Client) PlanJar(jarid string) (planResp, error)
- func (c *Client) RunJar(opts RunOpts) (runResp, error)
- func (c *Client) SavePoints(jobID string, saveDir string, cancleJob bool) (savePointsResp, error)
- func (c *Client) Shutdown() error
- func (c *Client) StopJob(jobID string) error
- func (c *Client) StopJobWithSavepoint(jobID string, saveDir string, drain bool) (stopJobResp, error)
- func (c *Client) SubmitJob() error
- func (c *Client) UploadJar(fpath string) (uploadResp, error)
- type JobMetricsOpts
- type JobOverview
- type OverviewResp
- type RunOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { // Addr reprents flink job manager server address Addr string // contains filtered or unexported fields }
Client reprents flink REST API client
func (*Client) Checkpoints ¶
Checkpoints returns checkpointing statistics for a job.
func (*Client) JobManagerConfig ¶
JobManagerConfig returns the cluster configuration of job manager server.
func (*Client) JobManagerMetrics ¶
JobManagerMetrics provides access to job manager metrics.
func (*Client) JobMetrics ¶
func (c *Client) JobMetrics(opts JobMetricsOpts) (map[string]interface{}, error)
JobMetrics provides access to aggregated job metrics.
func (*Client) JobsOverview ¶
func (c *Client) JobsOverview() (OverviewResp, error)
JobsOverview returns an overview over all jobs.
func (*Client) PlanJar ¶
PlanJar returns the dataflow plan of a job contained in a jar previously uploaded via '/jars/upload'. Todo: support more args.
func (*Client) RunJar ¶
RunJar submits a job by running a jar previously uploaded via '/jars/upload'.
func (*Client) SavePoints ¶
SavePoints triggers a savepoint, and optionally cancels the job afterwards. This async operation would return a 'triggerid' for further query identifier.
func (*Client) StopJobWithSavepoint ¶
func (c *Client) StopJobWithSavepoint(jobID string, saveDir string, drain bool) (stopJobResp, error)
StopJob stops a job with a savepoint. Optionally, it can also emit a MAX_WATERMARK before taking the savepoint to flush out any state waiting for timers to fire. This async operation would return a 'triggerid' for further query identifier.
type JobMetricsOpts ¶
type JobMetricsOpts struct { // Metrics (optional): string values to select // specific metrics. Metrics []string // Agg (optional): list of aggregation modes which // should be calculated. Available aggregations are: // "min, max, sum, avg". Agg []string // Jobs (optional): job list of 32-character // hexadecimal strings to select specific jobs. Jobs []string }
type JobOverview ¶ added in v1.0.1
type OverviewResp ¶ added in v1.0.1
type OverviewResp struct {
Jobs []JobOverview `json:"jobs"`
}
type RunOpts ¶
type RunOpts struct { // JarID: String value that identifies a jar. When // uploading the jar a path is returned, where the // filename is the ID. JarID string // AllowNonRestoredState(optional): Boolean value that // specifies whether the job submission should be // rejected if the savepoint contains state that // cannot be mapped back to the job. AllowNonRestoredState bool // SavepointPath (optional): String value that // specifies the path of the savepoint to restore the // job from. SavepointPath string // programArg (optional): list of program arguments. ProgramArg []string // EntryClass (optional): String value that specifies // the fully qualified name of the entry point class. // Overrides the class defined in the jar file // manifest. EntryClass string // Parallelism (optional): Positive integer value that // specifies the desired parallelism for the job. Parallelism int }