• Data Ingestion Service

  1. Help Center
  2. Data Ingestion Service
  3. User Guide
  4. DIS SDK Usage Guide
  5. Querying a Stream List

Querying a Stream List

Initialize a DIS client instance named dic. For details, see Initializing a DIS Client.

Use the DIS SDK to list active streams.

Use the setLimit method to set the number of streams returned each time. If setLimit is not specified, a maximum of 10 streams are returned by default.

ListStreamsRequest listStreamsRequest = new ListStreamsRequest();
System.out.println("listStream: " + JsonUtils.objToJson(dic.listStreams(listStreamsRequest)));

The returned stream list is as follows:

listStream: {"total_number":20,"stream_names":["Stream0","Stream1","Stream2","Stream3","Stream4"],"has_more_streams":true}