Help Center/
Data Ingestion Service/
SDK Reference/
Getting Started with SDK/
Using the Java SDK/
Obtaining the Data Cursor
Updated on 2024-10-25 GMT+08:00
Obtaining the Data Cursor
Initialize a DIS SDK client instance named dic. For details, see Initializing a DIS SDK Client Instance.
Use the DIS SDK to obtain the information about the data cursor.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
//Configure the stream name. String streamName = "myStream"; // Configure the ID of the partition for data download. String partitionId = "0"; //Configure the sequence number for data download. String startingSequenceNumber = "0"; //Configure the data download mode. String cursorType = PartitionCursorTypeEnum.AT_SEQUENCE_NUMBER.name(); GetPartitionCursorRequest request = new GetPartitionCursorRequest(); request.setStreamName(streamName); request.setPartitionId(partitionId); request.setStartingSequenceNumber(startingSequenceNumber); request.setCursorType(cursorType); GetPartitionCursorResult response = dic.getPartitionCursor(request); String cursor = response.getPartitionCursor(); |
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