id stringlengths 29 30 | content stringlengths 152 2.6k |
|---|---|
codereview_new_java_data_8249 | final class ArmeriaServerHttpRequest extends AbstractServerHttpRequest {
private static HttpHeaders springHeaders(RequestHeaders headers) {
final HttpHeaders springHeaders = new HttpHeaders();
- toHttp1Headers(headers, (key, value) -> springHeaders.add(key.toString(), value));
return sp... |
codereview_new_java_data_8250 | public HttpHeaders getHeaders() {
}
this.httpHeaders = new HttpHeaders();
toHttp1Headers(headers, this.httpHeaders,
- (output, header, value) -> output.add(header.toString(), value));
return this.httpHeaders;
}
nit:
```suggestion
... |
codereview_new_java_data_8251 | private Flags() {}
// These static variables are defined at the end of this file deliberately
// to ensure that all static variables beforehand are initialized.
private static final boolean INITIALIZED;
static {
INITIALIZED = true;
}
Question: The behavior of this inline initializati... |
codereview_new_java_data_8252 |
package com.linecorp.armeria.common;
import org.junit.jupiter.api.Test;
-public class CyclicDependencyTest {
@Test
void testFlags() {
- System.out.println(Flags.requestContextStorageProvider());
}
}
How about using `assertThatCode(...).doesNotThrowAnyException()`?
package com.l... |
codereview_new_java_data_8253 |
package com.linecorp.armeria.common;
import org.junit.jupiter.api.Test;
-public class CyclicDependencyTest {
@Test
void testFlags() {
- System.out.println(Flags.requestContextStorageProvider());
}
}
How about prefixing `Flags` to tell what could have cyclic dependencies.
```suggestio... |
codereview_new_java_data_8254 | default HttpResponse recover(Function<? super Throwable, ? extends HttpResponse>
}
/**
- * Recovers an {@link HttpResponse} exception to the specified {@link Throwable} class.
- * when any error occurs before a {@link ResponseHeaders} is written.
- * Note that the failed {@link HttpResponse} ca... |
codereview_new_java_data_8255 | default StreamMessage<T> recoverAndResume(
}
/**
- * Recovers failed {@link StreamMessage} for the specified {@link Throwable} and resumes by subscribing
* to a returned fallback {@link StreamMessage} when any error occurs.
*
* <p>Example:<pre>{@code
```suggestion
* Recovers a ... |
codereview_new_java_data_8256 | default HttpResponse recover(Function<? super Throwable, ? extends HttpResponse>
* // In this case, CompletionException is returned. (can't recover exception)
* misMatchRecovered.aggregate().join();
* }</pre>
- * */
@UnstableApi
default <T extends Throwable> HttpResponse recover(Class<T... |
codereview_new_java_data_8257 | default HttpResponse recover(Function<? super Throwable, ? extends HttpResponse>
*
* HttpResponse response = HttpResponse.ofFailure(new IllegalStateException("Oops..."));
* // If the exception type does not match
- * HttpResponse misMatchRecovered =
* response.recover(IllegalArgumentExc... |
codereview_new_java_data_8258 | default <T extends Throwable> HttpResponse recover(Class<T> causeClass,
requireNonNull(causeClass, "causeClass");
requireNonNull(function, "function");
return recover(cause -> {
- if (!causeClass.isAssignableFrom(cause.getClass())) {
return Exceptions.throwUnsafel... |
codereview_new_java_data_8259 | public void testBinaryNode() throws IOException {
mapper.writeTree(mapper.createGenerator(writer), new BinaryNode(expected));
- JsonNode binaryNode = mapper.readTree(writer.toString());
- assertTrue(binaryNode.isTextual(), binaryNode.toString());
- byte[] actual = MessageUtil.jsonNo... |
codereview_new_java_data_8262 | public void onMetadataUpdate(
case SNAPSHOT:
publishSnapshot(delta, newImage, (SnapshotManifest) manifest);
break;
- default:
- break;
}
}
wdyt about throwing an IllegalStateException in the `default`. I do that sometimes to futu... |
codereview_new_java_data_8264 | public enum LogStartOffsetIncrementReason {
ClientRecordDeletion("client delete records request"),
SnapshotGenerated("snapshot generated");
- private final String value;
- LogStartOffsetIncrementReason(String value) {
- this.value = value;
}
@Override
public String toString(... |
codereview_new_java_data_8265 |
import java.util.Optional;
/**
- * Structure used for lower level reads using [[kafka.cluster.Partition.fetchRecords()]].
*/
public class LogReadInfo {
The java doc needs to be updated to java style with `@link`
import java.util.Optional;
/**
+ * Structure used for lower level reads using {@link kafk... |
codereview_new_java_data_8270 | public void putAll(final List<KeyValue<Bytes, byte[]>> entries) {
@Override
public byte[] delete(final Bytes key) {
- throw new UnsupportedOperationException("Versioned key-value stores do not support delete(key)");
}
@Override
Should we point to `delete(key, ts)` in the error message?
... |
codereview_new_java_data_8271 | public void maybeSetThrottleTimeMs(int throttleTimeMs) {
public Map<String, Map<TopicPartition, Errors>> errors() {
Map<String, Map<TopicPartition, Errors>> errorsMap = new HashMap<>();
- errorsMap.put(V3_AND_BELOW_TXN_ID, errorsForTransaction(this.data.resultsByTopicV3AndBelow()));
f... |
codereview_new_java_data_8272 | public void testBatchedErrors() {
assertEquals(txn1Errors, errorsForTransaction(response.getTransactionTopicResults("txn1")));
assertEquals(txn2Errors, errorsForTransaction(response.getTransactionTopicResults("txn2")));
}
}
nit: Should we add a test for `errors()`?
public void test... |
codereview_new_java_data_8275 | public static class ConsumerPerfRebListener implements ConsumerRebalanceListener
private long joinStartMs, joinTimeMsInSingleRound;
public ConsumerPerfRebListener(AtomicLong joinGroupTimeMs, long joinStartMs, long joinTimeMsInSingleRound) {
- super();
this.joinGroupTimeMs = ... |
codereview_new_java_data_8276 | public KafkaRaftMetrics(Metrics metrics, String metricGrpPrefix, QuorumState sta
new Rate(TimeUnit.SECONDS, new WindowedSum()));
this.pollDurationSensor = metrics.sensor("poll-idle-ratio");
- this.pollDurationSensor.add(metrics.metricName(
"poll-idle-ratio-avg",
... |
codereview_new_java_data_8277 | public class TimeRatio implements MeasurableStat {
private final double defaultRatio;
public TimeRatio(double defaultRatio) {
this.defaultRatio = defaultRatio;
}
Should this check that `defaultRatio` is between `1.0` and `0.0`?
public class TimeRatio implements MeasurableStat {
priv... |
codereview_new_java_data_8278 | public void shouldRecordPollIdleRatio() {
raftMetrics.updatePollStart(time.milliseconds());
time.sleep(5);
- // Measurement arrives before poll end
assertEquals(0.6, getMetric(metrics, "poll-idle-ratio-avg").metricValue());
// More idle time for 5ms
time.sleep(5)... |
codereview_new_java_data_8279 |
import java.util.Optional;
public class ReplicaAlterLogDirsTierStateMachine implements TierStateMachine {
public PartitionFetchState start(TopicPartition topicPartition,
PartitionFetchState currentFetchState,
FetchRequest.Partitio... |
codereview_new_java_data_8282 | public AssignmentSpec(
) {
Objects.requireNonNull(members);
Objects.requireNonNull(topics);
-
this.members = members;
this.topics = topics;
}
extremely small nit: any reason why we include a newline here but not on the other specs
public AssignmentSpec(
) {
... |
codereview_new_java_data_8283 | public void testTopicCreateWhenTopicExists() {
workerTask.sendRecords();
verifySendRecord(2);
}
@Test
We need to make sure that, under these circumstances, we never tried to create a topic. One way to accomplish this is to verify that we never used the `TopicAdmin` for anything except ... |
codereview_new_java_data_8284 | boolean joinGroupIfNeeded(final Timer timer) {
else if (!future.isRetriable())
throw exception;
- // Timer check upon retrying the RetriableExceptions
if (timer.isExpired()) {
return false;
}
the previous log... |
codereview_new_java_data_8285 |
*/
package org.apache.kafka.streams.state;
-import org.apache.kafka.streams.KeyValue;
-
import java.util.Objects;
/**
- * Combines a value from a {@link KeyValue} with a timestamp, for use as the return type
* from {@link VersionedKeyValueStore#get(Object, long)} and related methods.
*
* @param <V> The ... |
codereview_new_java_data_8286 | public R apply(R record) {
@Override
public void close() {
- Utils.closeQuietly(delegate, "predicated");
Utils.closeQuietly(predicate, "predicate");
}
@Override
public String toString() {
- return "PredicatedTransformation{" +
"predicate=" + predicat... |
codereview_new_java_data_8287 | private void applyAndAssert(boolean predicateResult, boolean negate,
Predicate<SourceRecord> predicate = mock(Predicate.class);
when(predicate.test(any())).thenReturn(predicateResult);
@SuppressWarnings("unchecked")
- Transformation<SourceRecord> predicatedTransform = mock(Transformat... |
codereview_new_java_data_8288 | public boolean includeRecordDetailsInErrorLog() {
}
/**
- * Returns the initialized list of {@link TransformationStage} which are specified in {@link #TRANSFORMS_CONFIG}.
*/
public <R extends ConnectRecord<R>> List<TransformationStage<R>> transformationStages() {
final List<String> ... |
codereview_new_java_data_8289 | public void run() throws Exception {
propagator.sendRPCsToBrokersFromMetadataDelta(delta, image,
migrationLeadershipState.zkControllerEpoch());
} else {
- log.trace("Not sending RPCs to brokers for metadata {} since no relevant metad... |
codereview_new_java_data_8290 |
/**
* Fake plugin class for testing classloading isolation.
* See {@link org.apache.kafka.connect.runtime.isolation.TestPlugins}.
- * <p>Defines a connector as an non-static inner class, which does not have a default constructor.
*/
public class OuterClass {
```suggestion
* <p>Defines a connector as a non... |
codereview_new_java_data_8291 |
/**
* Fake plugin class for testing classloading isolation.
* See {@link org.apache.kafka.connect.runtime.isolation.TestPlugins}.
- * This is a plugin co-located with other poorly packaged plugins, but should be visible despite other errors.
*/
public class CoLocatedPlugin implements Converter {
```suggesti... |
codereview_new_java_data_8292 | public Map<String, Object> originals(Map<String, Object> configOverrides) {
*/
public Map<String, String> originalsStrings() {
Map<String, String> copy = new RecordingMap<>();
- copyAsStrings(originals, copy);
- return copy;
- }
-
- /**
- * Ensures that all values of a map a... |
codereview_new_java_data_8293 | private void maybeThrowCancellationException(Throwable cause) {
* Waits if necessary for this future to complete, and then returns its result.
*/
@Override
- public abstract T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException {
try {
... |
codereview_new_java_data_8294 | public Properties configProperties(ConfigResource configResource) {
}
}
- public Map<String, String> configMap(ConfigResource configResource) {
ConfigurationImage configurationImage = data.get(configResource);
if (configurationImage != null) {
return configurationImage... |
codereview_new_java_data_8296 | protected void stopServices() {
this.configBackingStore.stop();
this.worker.stop();
this.connectorExecutor.shutdown();
- try {
- this.connectorClientConfigOverridePolicy.close();
- } catch (Exception e) {
- log.warn("Exception while stop connectorClientCon... |
codereview_new_java_data_8297 | public KeyValue<Bytes, byte[]> makeNext() {
@Override
public synchronized void close() {
- if (closeCallback != null) {
- closeCallback.run();
}
iterNoTimestamp.close();
iterWithTimestamp.close();
open = false;
Don't we ... |
codereview_new_java_data_8299 | private void trySend(final long currentTimeMs) {
if (unsent.timer.isExpired()) {
iterator.remove();
unsent.callback.onFailure(new TimeoutException(
- "Failed to send request after " + unsent.timer.timeoutMs() + " " + "ms."));
continue;
... |
codereview_new_java_data_8300 | public class DistributedHerder extends AbstractHerder implements Runnable {
* @param uponShutdown any {@link AutoCloseable} objects that should be closed when this herder is {@link #stop() stopped},
* after all services and resources owned by this herder are stopped
*/... |
codereview_new_java_data_8301 | public class MirrorMakerConfig extends AbstractConfig {
static final String TARGET_PREFIX = "target.";
static final String ENABLE_INTERNAL_REST_CONFIG = "dedicated.mode.enable.internal.rest";
private static final String ENABLE_INTERNAL_REST_DOC =
- "Whether to bring up an internal-only REST s... |
codereview_new_java_data_8302 | public void initializeServer() {
protected final void initializeResources() {
log.info("Initializing REST resources");
- this.resources = new ArrayList<>();
ResourceConfig resourceConfig = new ResourceConfig();
resourceConfig.register(new JacksonJsonProvider());
nit: slightl... |
codereview_new_java_data_8304 | public void afterEach() {
public void kafkaVersion() {
String out = executeAndGetOut("--version");
assertNormalExit();
- assertEquals(AppInfoParser.getVersion(), out);
}
@Test
This fails when running in Intellij. The output is:
```
[2023-02-01 16:49:33,671] WARN Error while... |
codereview_new_java_data_8306 | public void reconfigure(Map<String, String> props) {
/**
* Validate the connector configuration values against configuration definitions.
* @param connectorConfigs the provided configuration values
- * @return {@link Config}, essentially a list of {@link ConfigValue}s containing the updated config... |
codereview_new_java_data_8307 | public interface ConnectorClientConfigOverridePolicy extends Configurable, AutoC
/**
- * Workers will invoke this while constructing producer for SourceConnectors, DLQs for SinkConnectors and
- * consumers for SinkConnectors to validate if all of the overridden client configurations are allowed per th... |
codereview_new_java_data_8308 | public void initialize(SinkTaskContext context) {
/**
* Put the records in the sink. This should either write them to the downstream system or batch them for
- * later writing
* <p>
* If this operation fails, the SinkTask may throw a {@link org.apache.kafka.connect.errors.RetriableExceptio... |
codereview_new_java_data_8312 | public void testCreateTopicsWithConfigs() throws Exception {
assertEquals(TopicRecord.class, result4.records().get(0).message().getClass());
TopicRecord batchedTopic1Record = (TopicRecord) result4.records().get(0).message();
assertEquals(batchedTopic1, batchedTopic1Record.name());
- a... |
codereview_new_java_data_8313 | public void testCompatibilityWithClusterId() throws IOException {
// We initialized a state from the metadata log
assertTrue(stateFile.exists());
String jsonString = "{\"clusterId\":\"abc\",\"leaderId\":0,\"leaderEpoch\":0,\"votedId\":-1,\"appliedOffset\":0,\"currentVoters\":[],\"data_vers... |
codereview_new_java_data_8314 | public void add(TopicPartition topicPartition, PartitionData data) {
}
}
- /**
- * Build a FetchRequestData for the provided partitions
- * @throws IllegalStateException if it has already been called
- */
public FetchRequestData build() {
- if ... |
codereview_new_java_data_8315 | public boolean isCancelled() {
public boolean isDone() {
return true;
}
@Override
public Void get() {
return null;
add a newline above.
public boolean isCancelled() {
public boolean isDone() {
return true;
}
+
@Ove... |
codereview_new_java_data_8317 |
import org.apache.kafka.common.utils.FetchRequestUtils;
public enum FetchIsolation {
- FETCH_LOG_END,
- FETCH_HIGH_WATERMARK,
- FETCH_TXN_COMMITTED;
public static FetchIsolation apply(FetchRequest request) {
return apply(request.replicaId(), request.isolationLevel());
}
public ... |
codereview_new_java_data_8319 | static ProcessorSupplier<Object, Object, Void, Void> printProcessorSupplier(fina
@Override
public void init(final ProcessorContext<Void, Void> context) {
super.init(context);
- System.out.println("[3.2] initializing processor: topic=" + topic + " taskId=" + con... |
codereview_new_java_data_8323 | public KafkaMetricsGroup(Class<?> klass) {
* @return Sanitized metric name object.
*/
public MetricName metricName(String name, Map<String, String> tags) {
- String pkg;
- if (klass.getPackage() == null) {
- pkg = "";
- } else {
- pkg = klass.getPackage().get... |
codereview_new_java_data_8324 | public KafkaMetricsGroup(Class<?> klass) {
* @return Sanitized metric name object.
*/
public MetricName metricName(String name, Map<String, String> tags) {
- String pkg;
- if (klass.getPackage() == null) {
- pkg = "";
- } else {
- pkg = klass.getPackage().get... |
codereview_new_java_data_8325 | public KafkaMetricsGroup(Class<?> klass) {
* @return Sanitized metric name object.
*/
public MetricName metricName(String name, Map<String, String> tags) {
- String pkg;
- if (klass.getPackage() == null) {
- pkg = "";
- } else {
- pkg = klass.getPackage().get... |
codereview_new_java_data_8326 | public KafkaMetricsGroup(Class<?> klass) {
* @return Sanitized metric name object.
*/
public MetricName metricName(String name, Map<String, String> tags) {
- String pkg;
- if (klass.getPackage() == null) {
- pkg = "";
- } else {
- pkg = klass.getPackage().get... |
codereview_new_java_data_8327 | Optional<Checkpoint> checkpoint(String group, TopicPartition topicPartition,
}
}
return Optional.empty();
-
}
SourceRecord checkpointRecord(Checkpoint checkpoint, long timestamp) {
nit: Can you remove this unnecessary line?
Optional<Checkpoint> checkpoint(String group, Top... |
codereview_new_java_data_8328 | public void testWithClassLoader() {
assertNotEquals(dummyClassLoader, Thread.currentThread().getContextClassLoader());
}
- private class DummyClassLoader extends ClassLoader { }
}
This should be a static class.
public void testWithClassLoader() {
assertNotEquals(dummyClassLoader, Thread... |
codereview_new_java_data_8330 |
* -----checkpoint file end----------
*/
public class LeaderEpochCheckpointFile implements LeaderEpochCheckpoint {
private static final String LEADER_EPOCH_CHECKPOINT_FILENAME = "leader-epoch-checkpoint";
private static final Pattern WHITE_SPACES_PATTERN = Pattern.compile("\\s+");
private static fin... |
codereview_new_java_data_8334 | public class ProducerStateEntry {
public OptionalLong currentTxnFirstOffset;
public ProducerStateEntry(long producerId) {
- this(producerId, null, RecordBatch.NO_PRODUCER_EPOCH, -1, RecordBatch.NO_TIMESTAMP, OptionalLong.empty());
}
- public ProducerStateEntry(long producerId, short produc... |
codereview_new_java_data_8339 | public void maybeAddOfflineLogDir(String logDir, String msg, IOException e) {
* The method will wait if necessary until a new offline log directory becomes available
*
* @return The next offline log dir.
*/
- public String takeNextOfflineLogDir() {
- try {
- return offline... |
codereview_new_java_data_8344 | private boolean onSameSegment(LogOffsetMetadata that) {
// if they are on the same segment and this offset precedes the given offset
public int positionDiff(LogOffsetMetadata that) {
if (messageOffsetOnly())
- throw new KafkaException(this + " cannot compare its segment info with " + that... |
codereview_new_java_data_8345 | public void writeUnsignedVarint(int i) {
public void writeByteBuffer(ByteBuffer buf) {
try {
if (buf.hasArray()) {
- out.write(buf.array(), buf.arrayOffset(), buf.limit());
} else {
byte[] bytes = Utils.toArray(buf);
out.write(byt... |
codereview_new_java_data_8346 | Map<TaskId, Task> allTasks() {
}
}
Map<TaskId, Task> notPausedTasks() {
return Collections.unmodifiableMap(tasks.allTasks()
.stream()
I could not find a test for this change. Could you add one?
Map<TaskId, Task> allTasks() {
}
}
+ /**
+ * Returns tas... |
codereview_new_java_data_8347 | public void clearTaskTimeout() {
@Override
public boolean commitNeeded() {
- return task.commitNeeded();
}
@Override
Why do we need to change these two functions?
public void clearTaskTimeout() {
@Override
public boolean commitNeeded() {
+ throw new UnsupportedOpera... |
codereview_new_java_data_8349 | private Optional<Exception> isValid(final Map<TopicPartition, OffsetAndMetadata>
@Override
public String toString() {
- return getClass() + "_" + this.offsets;
}
}
need to refactor this sad toString method.
private Optional<Exception> isValid(final Map<TopicPartition, OffsetAndMetadata>
... |
codereview_new_java_data_8350 | private boolean process(final NoopApplicationEvent event) {
private boolean process(final PollApplicationEvent event) {
Optional<RequestManager> commitRequestManger = registry.get(RequestManager.Type.COMMIT);
if (!commitRequestManger.isPresent()) {
- return false;
}
... |
codereview_new_java_data_8351 | private void produceValueRange(final int key, final int start, final int endExcl
private Properties streamsConfiguration() {
final Properties config = new Properties();
config.put(StreamsConfig.TOPOLOGY_OPTIMIZATION_CONFIG, StreamsConfig.OPTIMIZE);
- config.put(StreamsConfig.APPLICATION_I... |
codereview_new_java_data_8352 | public void configure(Map<String, ?> configs) {
@Override
public void close() throws IOException {
- ClassLoader originalClassLoader = Thread.currentThread().getContextClassLoader();
- Thread.currentThread().setContextClassLoader(rsmClassLoader);
- try {
delegate.close();
... |
codereview_new_java_data_8353 | public class TimeIndex extends AbstractIndex {
private volatile TimestampOffset lastEntry;
- public TimeIndex(File file, long baseOffset) throws IOException {
- this(file, baseOffset, -1);
- }
-
public TimeIndex(File file, long baseOffset, int maxIndexSize) throws IOException {
this... |
codereview_new_java_data_8355 | public class MigrationControlManager {
zkMigrationState = new TimelineObject<>(snapshotRegistry, ZkMigrationState.NONE);
}
- public ZkMigrationState zkMigrationState() {
return zkMigrationState.get();
}
does this need to be a public function or can it be package-private
public cla... |
codereview_new_java_data_8358 |
* topic partition from offset 0 up to but not including the end offset in the snapshot
* id.
*
- * @see org.apache.kafka.raft.KafkaRaftClient#createSnapshot(OffsetAndEpoch, long)
*/
public interface SnapshotWriter<T> extends AutoCloseable {
/**
Maybe this should point to `RaftClient.createSnapshot` sinc... |
codereview_new_java_data_8359 | public static ApiVersionsResponse createApiVersionsResponse(
}
public static ApiVersionCollection filterApis(
- Set<ApiKeys> enabledApi,
RecordVersion minRecordVersion
) {
ApiVersionCollection apiKeys = new ApiVersionCollection();
- for (ApiKeys apiKey : enabledApi) {
... |
codereview_new_java_data_8360 | public enum Errors {
OFFSET_MOVED_TO_TIERED_STORAGE(109, "The requested offset is moved to tiered storage.", OffsetMovedToTieredStorageException::new),
FENCED_MEMBER_EPOCH(110, "The member epoch is fenced by the group coordinator. The member must abandon all its partitions and rejoins.", FencedMemberEpochExc... |
codereview_new_java_data_8361 |
*/
package org.apache.kafka.common.errors;
public class FencedMemberEpochException extends ApiException {
public FencedMemberEpochException(String message) {
super(message);
We haven't done it for the other exception types, but I wonder if it makes sense to add the `@InterfaceStability.Evolving` t... |
codereview_new_java_data_8362 | public void shouldThrowIllegalArgumentExceptionWhenCustomPartitionerReturnsMulti
for (final KafkaStreams stream: kafkaStreamsList) {
stream.setUncaughtExceptionHandler(e -> {
- Assertions.assertEquals("The partitions returned by StreamPartitioner#partitions method when used for F... |
codereview_new_java_data_8365 | public void shouldEnablePartitionAutoscaling() {
public void shouldSetPartitionAutoscalingTimeout() {
props.put("partition.autoscaling.timeout.ms", 0L);
final StreamsConfig config = new StreamsConfig(props);
- assertThat(config.getBoolean(PARTITION_AUTOSCALING_TIMEOUT_MS_CONFIG), is(0L));... |
codereview_new_java_data_8368 | protected AbstractControlRequest(ApiKeys api, short version) {
public abstract int controllerId();
- public abstract int kraftControllerId();
public abstract int controllerEpoch();
I didn't see how is this field used in `KafkaApis`.
protected AbstractControlRequest(ApiKeys api, short version) {... |
codereview_new_java_data_8369 | public boolean isNoOpRecordSupported() {
return this.isAtLeast(IBP_3_3_IV1);
}
- public boolean isApiForwardingSupported() {
return this.isAtLeast(IBP_3_4_IV0);
}
nit: Should we say "isApiForwardingEnabled" since we require API forwarding at this version?
public boolean isNoOpReco... |
codereview_new_java_data_8371 | public LeaderAndIsrRequest build(short version) {
).collect(Collectors.toList());
LeaderAndIsrRequestData data = new LeaderAndIsrRequestData()
.setControllerEpoch(controllerEpoch)
.setBrokerEpoch(brokerEpoch)
.setLiveLeaders(leaders);
- ... |
codereview_new_java_data_8372 | public static class Builder extends AbstractControlRequest.Builder<LeaderAndIsrR
public Builder(short version, int controllerId, int controllerEpoch, long brokerEpoch,
List<LeaderAndIsrPartitionState> partitionStates, Map<String, Uuid> topicIds,
Collection<Node>... |
codereview_new_java_data_8373 | public static class Builder extends AbstractControlRequest.Builder<StopReplicaRe
public Builder(short version, int controllerId, int controllerEpoch, long brokerEpoch,
boolean deletePartitions, List<StopReplicaTopicState> topicStates) {
- super(ApiKeys.STOP_REPLICA, versio... |
codereview_new_java_data_8374 | public static class Builder extends AbstractControlRequest.Builder<UpdateMetadat
public Builder(short version, int controllerId, int controllerEpoch, long brokerEpoch,
List<UpdateMetadataPartitionState> partitionStates, List<UpdateMetadataBroker> liveBrokers,
Ma... |
codereview_new_java_data_8376 | public void shouldDeleteKeyAndPropagateV0() {
.withValue(new Change<>(newValue, oldValue)),
forwarded.get(0).record()
);
-
- stateStore.close();
}
@Test
Why do you close the state store in the test here but not in the other tests?
public void shouldDeleteK... |
codereview_new_java_data_8379 |
/**
* <p>
* Command line utility that runs Kafka Connect as a standalone process. In this mode, work (connectors and tasks) is not
- * distributed. Instead, all the normal Connect machinery works within a single process. This is useful for for development
- * and testing Kafka Connect on a local machine.
* </p>... |
codereview_new_java_data_8380 | protected void processExtraArgs(Herder herder, Connect connect, String[] extraAr
cb.get();
}
} catch (Throwable t) {
- log.error("Stopping Connect due to an error while attempting to create a connector", t);
connect.stop();
Exit.exit(3);
... |
codereview_new_java_data_8382 | public String toString() {
+ "To enable exactly-once source support on a new cluster, set this property to '" + ExactlyOnceSourceSupport.ENABLED + "'. "
+ "To enable support on an existing cluster, first set to '" + ExactlyOnceSourceSupport.PREPARING + "' on every worker in the cluster, "
... |
codereview_new_java_data_8383 |
* limitations under the License.
*/
/**
- * Provides pluggable interfaces for connector security policies.
*/
package org.apache.kafka.connect.connector.policy;
\ No newline at end of file
Maybe worth including an example that calls out the only interface currently in this package? Possibly something like thi... |
codereview_new_java_data_8384 |
* limitations under the License.
*/
/**
- * Provides common exception classes for Connect.
*/
package org.apache.kafka.connect.errors;
\ No newline at end of file
We should make it clear that these exception classes establish a two-way API, between connectors/tasks/etc. and the framework:
```suggestion
* P... |
codereview_new_java_data_8385 |
* limitations under the License.
*/
/**
- * Provides interface for describing the state of a running Connect cluster.
*/
package org.apache.kafka.connect.health;
\ No newline at end of file
We should be clear about who is going to be describing the cluster, and how this information can be used:
```suggesti... |
codereview_new_java_data_8386 |
* limitations under the License.
*/
/**
- * Provides API for implementing connectors which write Kafka records to external applications.
*/
package org.apache.kafka.connect.sink;
\ No newline at end of file
Nits:
```suggestion
* Provides an API for implementing connectors which write Kafka records to ext... |
codereview_new_java_data_8387 |
* limitations under the License.
*/
/**
- * Provides pluggable interface for altering data which is being moved by Connect.
*/
package org.apache.kafka.connect.transforms;
\ No newline at end of file
Nit:
```suggestion
* Provides a pluggable interface for altering data which is being moved by Connect.
`... |
codereview_new_java_data_8388 |
* limitations under the License.
*/
/**
- * Provides pluggable interface for describing when a {@link org.apache.kafka.connect.transforms.Transformation} should be applied to a record.
*/
package org.apache.kafka.connect.transforms.predicates;
\ No newline at end of file
Nit:
```suggestion
* Provides a p... |
codereview_new_java_data_8389 |
* limitations under the License.
*/
/**
- * Provides low-level abstractions of streaming data and computation over that streaming data.
*/
package org.apache.kafka.streams.processor;
\ No newline at end of file
Same as for `processer.api`
* limitations under the License.
*/
/**
+ * Provides a low-level... |
codereview_new_java_data_8390 |
* limitations under the License.
*/
/**
- * Provides API for extracting data from a Streams application.
*/
package org.apache.kafka.streams.query;
\ No newline at end of file
What about this:
```
Provides a query API (aka Interactive Queries) over state stores, for extracting data from a stateful Kafka Str... |
codereview_new_java_data_8391 |
* limitations under the License.
*/
/**
- * Provides classes for testing Streams applications with mocked inputs.
*/
package org.apache.kafka.streams.test;
\ No newline at end of file
```suggestion
* Provides classes for testing Kafka Streams applications with mocked inputs.
```
* limitations under the... |
codereview_new_java_data_8393 | public class StreamsConfig extends AbstractConfig {
@SuppressWarnings("WeakerAccess")
public static final String CLIENT_ID_CONFIG = CommonClientConfigs.CLIENT_ID_CONFIG;
private static final String CLIENT_ID_DOC = "An ID prefix string used for the client IDs of internal consumer, producer and restore-co... |
codereview_new_java_data_8394 | public static VerificationResult verify(final String kafka,
return verificationResult;
}
- private static Map<String, Set<Number>> parseRecordsForEchoTopic(final Map<String, Map<String, LinkedList<ConsumerRecord<String, Number>>>> events) {
return events.containsKey("echo") ?
e... |
codereview_new_java_data_8396 |
* limitations under the License.
*/
/**
- * Kafka Client for producing events to a Kafka Cluster
*/
package org.apache.kafka.clients.producer;
\ No newline at end of file
```suggestion
* Provides a Kafka client for producing records to topics and/or partitions in a Kafka cluster.
```
* limitations unde... |
codereview_new_java_data_8397 |
* limitations under the License.
*/
/**
- * Access Control List API for Authorization of Kafka Clients
*/
package org.apache.kafka.common.acl;
\ No newline at end of file
```suggestion
* Provides classes representing Access Control Lists for authorization of clients.
```
* limitations under the License... |
codereview_new_java_data_8398 |
* limitations under the License.
*/
/**
- * Annotations for describing properties of Kafka API Classes
*/
package org.apache.kafka.common.annotation;
\ No newline at end of file
```suggestion
* Provides annotations used on Kafka APIs.
```
* limitations under the License.
*/
/**
+ * Provides annotati... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.