Java SDK: expose deleteSegments

オープン
#4,369 コメント 2 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

@AmalenduManoj がすでに取り組んでいます。

2026年10月2日 から。

  • #4381 @AmalenduManoj による — マージされずにクローズ

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
75/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
java, rust

調査の方向性

Start with serde/CommandCode.java, VsrOperation.java, the blocking and async PartitionsClient interfaces, and the TCP and HTTP client files listed in the issue; compare their existing deletePartitions implementations. Check the payload format in core/binary_protocol/src/requests/segments/delete_segments.rs, then add the case to PartitionsClientBaseTest.java. Done means the new test passes for both TCP and HTTP clients.

索引モデルが issue の本文から書いたものです。

説明

good first issue java

The Rust client has SegmentClient::delete_segments (core/common/src/traits/segment_client.rs). The Java SDK has no method for it.

What to do

  • Add a Segment enum with DELETE(503) to serde/CommandCode.java. The VSR operation is already mapped in VsrOperation.java.
  • Add deleteSegments(StreamId streamId, TopicId topicId, Long partitionId, Long segmentsCount) to the blocking and async PartitionsClient interfaces, next to deletePartitions.
  • Implement it in the TCP clients (client/async/tcp/PartitionsTcpClient.java, client/blocking/tcp/PartitionsTcpClient.java), following deletePartitions. The payload is the stream identifier, the topic identifier, then the partition ID and the segments count as little-endian u32 values (core/binary_protocol/src/requests/segments/delete_segments.rs).
  • Implement it in the HTTP client (client/blocking/http/PartitionsHttpClient.java): DELETE /streams/{stream_id}/topics/{topic_id}/partitions/{partition_id} with a segments_count query parameter.
  • Add a test to PartitionsClientBaseTest.java. The base test runs for both TCP and HTTP.

Done when

The new test passes for both the TCP and HTTP clients.

主要言語
Rust
スター
5.3k
フォーク
548
平均マージ
2日 20時間
マージ済み PR(30日)
194

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/iggy のほかの issue

apache/iggy の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。