更新时间:2024-10-25 GMT+08:00
分享

查询通道详情

参考初始化DIS客户端的操作初始化一个DIS客户端实例,实例名称为dic。

使用DIS SDK查询指定通道信息。

1
2
3
4
String streamName = "myStream";
DescribeStreamRequest describeStreamRequest = new DescribeStreamRequest();
describeStreamRequest.setStreamName(streamName);
System.out.println("descStream: " + JsonUtils.objToJson(dic.describeStream(describeStreamRequest)));

查询通道的返回信息如下。

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]

相关文档