- What's New
- Service Overview
- Getting Started
-
User Guide
- IAM Permissions Management
- Getting Started
- Managing DIS Streams
-
Using DIS
- Checking and Configuring DNS Information
- Uploading Data by Using Agent
- Using DIS Flume Plugin to Upload and Download Data
- Using a DIS Logstash Plugin to Upload and Download Data
- Using Kafka Adapter to Upload and Download Data
- Using SparkStreaming SDK to Download Data
- Using a DIS Flink Connector to Upload and Download Data
- Managing a Dump Task
- Managing Enterprise Projects
- Notifying Events
- Monitoring
- Best Practices
-
SDK Reference
- Overview
- Related Resources
- Enabling DIS
- Creating a DIS Stream
- Obtaining Authentication Information
-
Getting Started with SDK
-
Using the Java SDK
- Preparing the Environment
- Configuring a Sample Project
- Initializing a DIS SDK Client Instance
- Creating a Stream
- Creating a Dump Task
- Updating a Dump Task
- Deleting a Dump Task
- Querying a Dump Task List
- Querying Dump Details
- Deleting a Stream
- Querying a Stream List
- Querying Stream Details
- Downloading Streaming Data
- Uploading Streaming Data
- Obtaining the Data Cursor
- Creating an Application
- Deleting an Application
- Adding a Checkpoint
- Querying a Checkpoint
- Changing Partition Quantity
- Using Kafka Adapter to Upload and Download Data
-
Using the Python SDK
- Preparing the Installation Environment
- Configuring a Sample Project
- Initializing a DIS SDK Client Instance
- Creating a Stream
- Creating a Dump Task
- Deleting a Stream
- Deleting a Dump Task
- Querying a Stream List
- Querying a Dump Task List
- Querying Stream Details
- Querying Dump Details
- Uploading Streaming Data in JSON Format
- Uploading Streaming Data in Protobuf Format
- Downloading Streaming Data
- Creating an Application
- Deleting an Application
- Viewing Application Details
- Querying an Application List
- Adding a Checkpoint
- Querying a Checkpoint
- Changing Partition Quantity
- Obtaining a Data Cursor
-
Using the Java SDK
- Error Codes
- Change History
- API Reference
-
FAQs
-
General Questions
- What Is DIS?
- What Is a Partition?
- What Can I Do with DIS?
- What Advantages Does DIS Have?
- Which Modules Do DIS Have?
- How Do I Create a DIS Stream?
- What Is the Difference Between Storing Data into DIS and Dumping Data Elsewhere?
- How Do I Check Software Package Integrity?
- How Do I Send and Retrieve Data Using DIS?
- What Is Data Control?
- Dump Questions
- DIS Agent Questions
-
General Questions
- General Reference
Show all
Copied.
Querying a Stream List
Initialize a DIS SDK client instance named dic. For details, see Initializing a DIS SDK Client Instance.
You can 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.
1 2 3 |
ListStreamsRequest listStreamsRequest = new ListStreamsRequest(); listStreamsRequest.setLimit(5); System.out.println("listStream: " + JsonUtils.objToJson(dic.listStreams(listStreamsRequest))); |
Parameter |
Type |
Description |
---|---|---|
limit |
long |
The maximum number of DIS streams to list in a single API call. Value range: 1 to 100 Default value: 10 |
exclusiveStartStreamName |
string |
Name of the DIS stream to start the stream list with. The returned stream list does not contain this DIS stream name. If pagination query is required, this parameter is not transferred when you query data on the first page. If the value of has_more_streams is true, the query is performed on the next page. The value of exclusiveStartStreamName is the name of the last stream in the query result of the first page. |
In this demo, start_Stream_Name is defined as a stream name before stream0, and limit is set to 5. The following information is returned:
1 |
listStream: {"total_number":20,"stream_names":["Stream0","Stream1","Stream2","Stream3","Stream4"],"has_more_streams":true} |
Parameter |
Type |
Description |
---|---|---|
total_number |
Int |
Total number of all the DIS streams created by the current tenant. |
stream_names |
List<String> |
List of the streams meeting the current requests. |
has_more_streams |
Boolean |
Specify whether there are more matching DIS streams to list. Possible values:
|
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot