mirror of https://github.com/apache/kafka.git
KAFKA-12524: Remove deprecated segments() (#10379)
Reviewers: Boyang Chen <boyang@confluent.io>
This commit is contained in:
parent
99b9b3e84f
commit
7071ded2a6
|
|
@ -92,6 +92,14 @@
|
|||
this restriction will be enforced. If you wish to run more than one instance of Kafka Streams, you must configure them with different values for <code>state.dir</code>.
|
||||
</p>
|
||||
|
||||
<h3><a id="streams_api_changes_300" href="#streams_api_changes_300">Streams API changes in 3.0.0</a></h3>
|
||||
<p>
|
||||
We removed the following deprecated APIs:
|
||||
</p>
|
||||
<ul>
|
||||
<li> <code>WindowBytesStoreSupplier#segments</code>: deprecated in Kafka 2.1.0 (<a href="https://cwiki.apache.org/confluence/display/KAFKA/KIP-319%3A+Replace+segments+with+segmentInterval+in+WindowBytesStoreSupplier">KIP-319</a>).</li>
|
||||
</ul>
|
||||
|
||||
<h3><a id="streams_api_changes_280" href="#streams_api_changes_280">Streams API changes in 2.8.0</a></h3>
|
||||
<p>
|
||||
We extended <code>StreamJoined</code> to include the options <code>withLoggingEnabled()</code> and <code>withLoggingDisabled()</code> in
|
||||
|
|
|
|||
|
|
@ -27,16 +27,6 @@ import org.apache.kafka.common.utils.Bytes;
|
|||
* 2. Null value bytes should never be returned in range query results.
|
||||
*/
|
||||
public interface WindowBytesStoreSupplier extends StoreSupplier<WindowStore<Bytes, byte[]>> {
|
||||
/**
|
||||
* The number of segments the store has. If your store is segmented then this should be the number of segments
|
||||
* in the underlying store.
|
||||
* It is also used to reduce the amount of data that is scanned when caching is enabled.
|
||||
*
|
||||
* @return number of segments
|
||||
* @deprecated since 2.1. Use {@link WindowBytesStoreSupplier#segmentIntervalMs()} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
int segments();
|
||||
|
||||
/**
|
||||
* The size of the segments (in milliseconds) the store has.
|
||||
|
|
|
|||
|
|
@ -55,12 +55,6 @@ public class InMemoryWindowBytesStoreSupplier implements WindowBytesStoreSupplie
|
|||
return "in-memory-window";
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Override
|
||||
public int segments() {
|
||||
throw new IllegalStateException("Segments is deprecated and should not be called");
|
||||
}
|
||||
|
||||
@Override
|
||||
public long retentionPeriod() {
|
||||
return retentionPeriod;
|
||||
|
|
|
|||
|
|
@ -77,12 +77,6 @@ public class RocksDbWindowBytesStoreSupplier implements WindowBytesStoreSupplier
|
|||
return "rocksdb-window";
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Override
|
||||
public int segments() {
|
||||
return (int) (retentionPeriod / segmentInterval) + 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long segmentIntervalMs() {
|
||||
return segmentInterval;
|
||||
|
|
|
|||
Loading…
Reference in New Issue