Changing Partition Quantity
Initialize a DIS client as instructed in Initializing a DIS SDK Client Instance.
Use the DIS SDK to change the number of partitions.
string streamName = "streamName";
int count= 3;
var dic = new DISIngestionClient();
var request = new UpdateShardsRequest
{
//Stream name.
StreamName = streamName,
//Number of the target partitions.
TargetPartitionCount = count,
};
var response = dic.UpdatePartition(request);
Console.Out.WriteLine(response);
Viewing Execution Results
Information similar to the following is displayed on the console:
{UpdateShardsResult{stream_name='dis-shaw', current_partition_count='1', target_partition_count='3'}}
|
Parameter |
Type |
Description |
|---|---|---|
|
stream_name |
String |
Name of the stream whose partition quantity needs to be changed. |
|
current_partition_count |
int |
Number of the current partitions |
|
target_partition_count |
int |
Number of the target partitions. |
Last Article: Querying a Checkpoint
Next Article: Using the Python SDK
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.