• Data Ingestion Service

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

Creating a Stream

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

When you use the DIS SDK to create a DIS stream, specify the stream name, number of partitions in the stream, and stream type.

STREAM_TYPE_COMMON indicates a common stream, and STREAM_TYPE_ADVANCED indicates an advanced stream.

//Configure the channel name.
String streamName = "myStream";
//Configure the number of partitions in the stream.
Integer partitionCount = new Integer(3);
CreateStreamRequest createStreamRequest = new CreateStreamRequest();
//Configure the stream type.

After configuring CreateStreamRequest, you can create a stream by calling createStream.