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>.
|
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>
|
</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>
|
<h3><a id="streams_api_changes_280" href="#streams_api_changes_280">Streams API changes in 2.8.0</a></h3>
|
||||||
<p>
|
<p>
|
||||||
We extended <code>StreamJoined</code> to include the options <code>withLoggingEnabled()</code> and <code>withLoggingDisabled()</code> in
|
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.
|
* 2. Null value bytes should never be returned in range query results.
|
||||||
*/
|
*/
|
||||||
public interface WindowBytesStoreSupplier extends StoreSupplier<WindowStore<Bytes, byte[]>> {
|
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.
|
* The size of the segments (in milliseconds) the store has.
|
||||||
|
|
|
||||||
|
|
@ -55,12 +55,6 @@ public class InMemoryWindowBytesStoreSupplier implements WindowBytesStoreSupplie
|
||||||
return "in-memory-window";
|
return "in-memory-window";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
@Override
|
|
||||||
public int segments() {
|
|
||||||
throw new IllegalStateException("Segments is deprecated and should not be called");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long retentionPeriod() {
|
public long retentionPeriod() {
|
||||||
return retentionPeriod;
|
return retentionPeriod;
|
||||||
|
|
|
||||||
|
|
@ -77,12 +77,6 @@ public class RocksDbWindowBytesStoreSupplier implements WindowBytesStoreSupplier
|
||||||
return "rocksdb-window";
|
return "rocksdb-window";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
@Override
|
|
||||||
public int segments() {
|
|
||||||
return (int) (retentionPeriod / segmentInterval) + 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long segmentIntervalMs() {
|
public long segmentIntervalMs() {
|
||||||
return segmentInterval;
|
return segmentInterval;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue