databricks-sdk-java icon indicating copy to clipboard operation
databricks-sdk-java copied to clipboard

[ISSUE] README Quickstart Code Outdated - References ClusterInfo instead of ClusterDetails

Open adchungcsc opened this issue 3 months ago • 0 comments

Description

The quick start code in the README is outdated. It references and old class called ClusterInfo which appears to have been renamed to ClusterDetails

Image

Reproduction A minimal code sample demonstrating the bug.

package org.example;


import com.databricks.sdk.WorkspaceClient;
//import com.databricks.sdk.service.compute.ClusterInfo;
import com.databricks.sdk.service.compute.ClusterDetails;
import com.databricks.sdk.service.compute.ListClustersRequest;

public class Main {
    public static void main(String[] args) {
        WorkspaceClient w = new WorkspaceClient();

//        for (ClusterDetails c : w.clusters().list(new ListClustersRequest())) {
//            System.out.println(c.getClusterName());
//        }

        for (ClusterInfo c : w.clusters().list(new ListClustersRequest())) {
            System.out.println(c.getClusterName());
        }
    }
}

Expected behavior Quick start code should compile. Replace ClusterInfo with ClusterDetails

Is it a regression? Did this work in a previous version of the SDK? If so, which versions did you try?

This appears to have been renamed in https://github.com/databricks/databricks-sdk-java/commit/4817820e826ef96198a59016a9a78b69faee62fe#diff-dcc5c62b8ead6e8f88e09ee1ea136e8d91f15cd927629a563975470a266b71cc

Debug Logs N/A

Other Information N/A

Additional context

The old reference to ClusterInfo is also still present in a code excerpt from Step 3 in the Databricks documentation too https://docs.databricks.com/aws/en/dev-tools/sdk-java

Image

adchungcsc avatar Aug 14 '25 14:08 adchungcsc