Skip to content

Commit 6142aed

Browse files
committed
Add comments
1 parent 1b541a4 commit 6142aed

File tree

1 file changed

+8
-0
lines changed
  • databricks-sdk-java/src/main/java/com/databricks/sdk/mixin

1 file changed

+8
-0
lines changed

databricks-sdk-java/src/main/java/com/databricks/sdk/mixin/JobsExt.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,14 @@ public JobsExt(JobsService mock) {
1515
super(mock);
1616
}
1717

18+
/**
19+
* List jobs.
20+
*
21+
* <p>Retrieves a list of jobs. If the job has multiple pages of tasks, job_clusters, parameters or environments,
22+
* it will paginate through all pages and aggregate the results.
23+
*/
1824
public Iterable<BaseJob> list(ListJobsRequest request) {
25+
// fetch jobs with limited elements in top level arrays
1926
Iterable<BaseJob> jobsList = super.list(request);
2027

2128
if (!request.getExpandTasks()) {
@@ -32,6 +39,7 @@ public boolean hasNext() {
3239
@Override
3340
public BaseJob next() {
3441
BaseJob job = iterator.next();
42+
// fully fetch all top level arrays for the job
3543
GetJobRequest getJobRequest = new GetJobRequest().setJobId(job.getJobId());
3644
Job fullJob = get(getJobRequest);
3745
job.getSettings().setTasks(fullJob.getSettings().getTasks());

0 commit comments

Comments
 (0)