Help Center/
Data Ingestion Service/
SDK Reference/
Getting Started with SDK/
Using the Java SDK/
Querying Stream Details
Updated on 2024-10-25 GMT+08:00
Querying Stream Details
Initialize a DIS SDK client instance named dic. For details, see Initializing a DIS SDK Client Instance.
Use the DIS SDK to query the details about a specified stream.
1 2 3 4 |
String streamName = "myStream"; DescribeStreamRequest describeStreamRequest = new DescribeStreamRequest(); describeStreamRequest.setStreamName(streamName); System.out.println("descStream: " + JsonUtils.objToJson(dic.describeStream(describeStreamRequest))); |
The returned stream details are as follows:
1
|
descStream: DescribeStreamResult [streamId=JnYbsMfWNn81e8n2mOC, streamName=myStream, createTime=1540977519187, lastModifiedTime=1540977519983, retentionPeriod=24, status=RUNNING, streamType=ADVANCED, dataType=BLOB, writablePartitionCount=2, readablePartitionCount=2, partitions=[PartitionResult{partitionId='shardId-0000000000', hashRange='[0 : 4611686018427387902]', status='ACTIVE', parentPartitionIds='null', sequenceNumberRange='[0 : 13286444]'}, PartitionResult{partitionId='shardId-0000000001', hashRange='[4611686018427387903 : 9223372036854775807]', status='ACTIVE', parentPartitionIds='null', sequenceNumberRange='[0 : 13288589]'}], hasMorePartitions=false, updatePartitionCounts=null] |
Parent topic: Using the Java SDK
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.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot