# US 10,956,306 B2 · Debugging streaming applications using debug regions

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 10,956,306 B2
- Document ID: US10956306B2
- Status: Granted
- Kind: B2
- Application number: 16/734,371
- Filed: 2020-01-05
- Published: 2020-05-07
- Granted: 2021-03-23
- Earliest claimed: 2016-04-22
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: James E. Cancilla; Samantha Chan; Mary M. L. Komor; Peter A. Nicholls
- Web page: https://patentgrep.com/patent/US10956306B2

## CPC

- G06F 11/3698: Environments for analysis, debugging or testing of software
- G06F 11/362: Debugging of software
- G06F 11/3636: {by tracing the execution of the program}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method for debugging a streaming application is provided. The method may include establishing, by a processor, a debug region in the streaming application to mark a subgraph for debugging. The method may further include receiving a tuple flow suspension notification from a job control plane. The method may also include displaying a plurality of debugging options for debugging a streaming application on a graphical user interface based on the received tuple flow suspension notification. The method may further include determining a debugging option from the displayed plurality of debugging options based on a user selection on the graphical user interface. The method may also include translating the determined debugging option into a format compatible with the job control plane. The method may further include transmitting the translated debugging option to the job control plane.

## Claims

### Claim 1

A processor-implemented method for debugging a streaming application, the method comprising:
establishing a debug region in the streaming application to mark a subgraph for debugging, wherein the debug region is an extension of a consistent region;
determining a debugging option for debugging the debug region in the streaming application from a displayed plurality of debugging options based on a user selection on a graphical user interface;
translating the determined debugging option into a format compatible with a job control plane;
transmitting the translated debugging option to the job control plane; determining the transmitted debugging option is a continue-monitoring request;
resuming a tuple flow using the job control plane based on the continue-monitoring request;
determining a checkpoint policy trigger event has occurred based on a preconfigured checkpoint policy, wherein the preconfigured checkpoint policy is an operator-driven checkpoint policy, and wherein the checkpoint policy trigger event relates to a source operator being read in the consistent region; and
suspending the resumed tuple flow based on the determined checkpoint policy trigger event.

### Claim 2 (depends on 1)

The method of claim 1, wherein the displayed plurality of debugging options comprises a checkpoint request, the continue-monitoring request, a step-n-tuples request, a suspend-tuple-flow request, a reduce-tuple-flow request, and a rewind-application-state request.

### Claim 3 (depends on 2)

The method of claim 2, further comprising:
determining the debugging option is the step-n-tuples request;
requesting a step size from a user based on determining the debugging option is the step-n-tuples request;
receiving the requested step size based on a step size user selection;
updating a checkpoint policy based on the received step size;
resuming the tuple flow using the job control plane based on the updated checkpoint policy;
monitoring the resumed tuple flow for the checkpoint policy trigger event;
determining the checkpoint policy trigger event has occurred based on the updated checkpoint policy; and
suspending the resumed tuple flow based on the determined checkpoint policy trigger event.

### Claim 4 (depends on 1)

The method of claim 1, further comprising:
determining the debugging option is a rewind-application-state request;
displaying a plurality of previous checkpoints on the graphical user interface based on determining the determined debugging option is the rewind-application-state request, wherein the displayed plurality of previous checkpoints correspond to a plurality of previous application states of the streaming application;
identifying a previous checkpoint within the displayed plurality of previous checkpoints based on a previous checkpoint user selection;
resetting an application state associated with the streaming application based on the identified previous checkpoint; and
resuming the tuple flow of the streaming application from the identified previous checkpoint.

### Claim 5 (depends on 4)

The method of claim 4, further comprising:
receiving a plurality of injection tuples from a user; and
injecting the received plurality of injection tuples into the tuple flow.

### Claim 6 (depends on 4)

The method of claim 4, further comprising:
receiving a plurality of replacement tuples from a user; and
replacing a plurality of stored tuples from the tuple flow with the received plurality of replacement tuples.

### Claim 7 (depends on 2)

The method of claim 2, further comprising:
in response to the determined debugging option being a rewind-application-state request, instructing, by the job control plane, all operators to reset an internal state of each operator to a specified checkpoint, wherein the operators comprise the source operator.

### Claim 8

A computer system for debugging a streaming application, the computer system comprising:
one or more processors, one or more computer-readable memories, one or more computer-readable tangible storage medium, and program instructions stored on at least one of the one or more tangible storage medium for execution by at least one of the one or more processors via at least one of the one or more memories, wherein the computer system is capable of performing a method comprising:
establishing a debug region in the streaming application to mark a subgraph for debugging, wherein the debug region is an extension of a consistent region;
determining a debugging option for debugging the debug region in the streaming application from a displayed plurality of debugging options based on a user selection on a graphical user interface;
translating the determined debugging option into a format compatible with a job control plane;
transmitting the translated debugging option to the job control plane;
determining the transmitted debugging option is a continue-monitoring request;
resuming a tuple flow using the job control plane based on the continue-monitoring request;
determining a checkpoint policy trigger event has occurred based on a preconfigured checkpoint policy, wherein the preconfigured checkpoint policy is an operator-driven checkpoint policy, and wherein the checkpoint policy trigger event relates to a source operator being read in the consistent region; and
suspending the resumed tuple flow based on the determined checkpoint policy trigger event.

### Claim 9 (depends on 8)

The computer system of claim 8, wherein the displayed plurality of debugging options comprises a checkpoint request, the continue-monitoring request, a step-n-tuples request, a suspend-tuple-flow request, a reduce-tuple-flow request, and a rewind-application-state request.

### Claim 10 (depends on 9)

The computer system of claim 9, further comprising:
determining the debugging option is the step-n-tuples request;
requesting a step size from a user based on determining the debugging option is the step-n-tuples request;
receiving the requested step size based on a step size user selection;
updating a checkpoint policy based on the received step size;
resuming the tuple flow using the job control plane based on the updated checkpoint policy;
monitoring the resumed tuple flow for the checkpoint policy trigger event;
determining the checkpoint policy trigger event has occurred based on the updated checkpoint policy; and
suspending the resumed tuple flow based on the determined checkpoint policy trigger event.

### Claim 11 (depends on 8)

The computer system of claim 8, further comprising:
determining the debugging option is a rewind-application-state request;
displaying a plurality of previous checkpoints on the graphical user interface based on determining the determined debugging option is the rewind-application-state request, wherein the displayed plurality of previous checkpoints correspond to a plurality of previous application states of the streaming application;
identifying a previous checkpoint within the displayed plurality of previous checkpoints based on a previous checkpoint user selection;
resetting an application state associated with the streaming application based on the identified previous checkpoint; and
resuming the tuple flow of the streaming application from the identified previous checkpoint.

### Claim 12 (depends on 11)

The computer system of claim 11, further comprising:
receiving a plurality of injection tuples from a user; and
injecting the received plurality of injection tuples into the tuple flow.

### Claim 13 (depends on 11)

The computer system of claim 11, further comprising:
receiving a plurality of replacement tuples from a user; and
replacing a plurality of stored tuples from the tuple flow with the received plurality of replacement tuples.

### Claim 14 (depends on 9)

The computer system of claim 9, further comprising:
in response to the determined debugging option being a rewind-application-state request, instructing, by the job control plane, all operators to reset an internal state of each operator to a specified checkpoint, wherein the operators comprise the source operator.

### Claim 15

A computer program product for debugging a streaming application, the computer program product comprising:
one or more computer-readable tangible storage medium and program instructions stored on at least one of the one or more tangible storage medium, the program instructions executable by a processor capable of performing a method, the method comprising:
establishing a debug region in the streaming application to mark a subgraph for debugging, wherein the debug region is an extension of a consistent region;
determining a debugging option for debugging the debug region in the streaming application from a displayed plurality of debugging options based on a user selection on a graphical user interface;
translating the determined debugging option into a format compatible with a job control plane;
transmitting the translated debugging option to the job control plane;
determining the transmitted debugging option is a continue-monitoring request;
resuming a tuple flow using the job control plane based on the continue-monitoring request;
determining a checkpoint policy trigger event has occurred based on a preconfigured checkpoint policy, wherein the preconfigured checkpoint policy is an operator-driven checkpoint policy, and wherein the checkpoint policy trigger event relates to a source operator being read in the consistent region; and
suspending the resumed tuple flow based on the determined checkpoint policy trigger event.

### Claim 16 (depends on 15)

The computer program product of claim 15, wherein the displayed plurality of debugging options comprises a checkpoint request, the continue-monitoring request, a step-n-tuples request, a suspend-tuple-flow request, a reduce-tuple-flow request, and a rewind-application-state request.

### Claim 17 (depends on 16)

The computer program product of claim 16, further comprising:
determining the debugging option is the step-n-tuples request;
requesting a step size from a user based on determining the debugging option is the step-n-tuples request;
receiving the requested step size based on a step size user selection;
updating a checkpoint policy based on the received step size;
resuming the tuple flow using the job control plane based on the updated checkpoint policy;
monitoring the resumed tuple flow for the checkpoint policy trigger event;
determining the checkpoint policy trigger event has occurred based on the updated checkpoint policy; and
suspending the resumed tuple flow based on the determined checkpoint policy trigger event.

### Claim 18 (depends on 15)

The computer program product of claim 15, further comprising:
determining the debugging option is a rewind-application-state request;
displaying a plurality of previous checkpoints on the graphical user interface based on determining the determined debugging option is the rewind-application-state request, wherein the displayed plurality of previous checkpoints correspond to a plurality of previous application states of the streaming application;
identifying a previous checkpoint within the displayed plurality of previous checkpoints based on a previous checkpoint user selection;
resetting an application state associated with the streaming application based on the identified previous checkpoint; and
resuming the tuple flow of the streaming application from the identified previous checkpoint.

### Claim 19 (depends on 18)

The computer program product of claim 18, further comprising:
receiving a plurality of injection tuples from a user; and
injecting the received plurality of injection tuples into the tuple flow.

### Claim 20 (depends on 18)

The computer program product of claim 18, further comprising:
receiving a plurality of replacement tuples from a user; and
replacing a plurality of stored tuples from the tuple flow with the received plurality of replacement tuples.
