Skip to content

Commit

Permalink
checkstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
ableegoldman committed Nov 1, 2023
1 parent b666563 commit 3a9153f
Show file tree
Hide file tree
Showing 7 changed files with 284 additions and 283 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ public class CassandraClient {
private final CqlSession session;

private final ResponsiveConfig config;
private final TableCache<RemoteKVTable<BoundStatement>> kvFactory;
private final TableCache<RemoteKVTable<BoundStatement>> factFactory;
private final TableCache<RemoteWindowedTable<BoundStatement>> windowedFactory;
private final TableCache<CassandraKeyValueTable> kvFactory;
private final TableCache<CassandraFactTable> factFactory;
private final TableCache<CassandraWindowedTable> windowedFactory;
private final TableCache<RemoteKVTable<BoundStatement>> globalFactory;

/**
Expand Down Expand Up @@ -156,15 +156,15 @@ public TableCache<RemoteKVTable<BoundStatement>> globalFactory() {
return globalFactory;
}

public TableCache<RemoteKVTable<BoundStatement>> kvFactory() {
public TableCache<CassandraKeyValueTable> kvFactory() {
return kvFactory;
}

public TableCache<RemoteKVTable<BoundStatement>> factFactory() {
public TableCache<CassandraFactTable> factFactory() {
return factFactory;
}

public TableCache<RemoteWindowedTable<BoundStatement>> windowedFactory() {
public TableCache<CassandraWindowedTable> windowedFactory() {
return windowedFactory;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import static dev.responsive.kafka.internal.db.ColumnName.PARTITION_KEY;
import static dev.responsive.kafka.internal.db.ColumnName.ROW_TYPE;
import static dev.responsive.kafka.internal.db.ColumnName.SEGMENT_ID;
import static dev.responsive.kafka.internal.db.ColumnName.TIMESTAMP;
import static dev.responsive.kafka.internal.db.ColumnName.WINDOW_START;
import static dev.responsive.kafka.internal.db.RowType.DATA_ROW;
import static dev.responsive.kafka.internal.db.RowType.METADATA_ROW;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import dev.responsive.kafka.internal.db.partitioning.SegmentPartitioner.SegmentPartition;
import dev.responsive.kafka.internal.utils.Stamped;
import dev.responsive.kafka.internal.utils.StoreUtil;
import java.util.Arrays;
import java.util.Collections;
import java.util.stream.Collectors;
import java.util.stream.LongStream;
Expand Down Expand Up @@ -99,10 +98,10 @@ public SegmentPartition(final int partitionKey, final long segmentId) {

@Override
public String toString() {
return "SegmentPartition{" +
"partitionKey=" + partitionKey +
", segmentId=" + segmentId +
'}';
return "SegmentPartition{"
+ "partitionKey=" + partitionKey
+ ", segmentId=" + segmentId
+ '}';
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import static dev.responsive.kafka.api.config.ResponsiveConfig.STORAGE_DESIRED_NUM_PARTITION_CONFIG;
import static dev.responsive.kafka.api.config.ResponsiveConfig.SUBPARTITION_HASHER_CONFIG;

import com.datastax.oss.driver.shaded.guava.common.annotations.VisibleForTesting;
import dev.responsive.kafka.api.config.ResponsiveConfig;
import java.util.List;
import java.util.OptionalInt;
Expand Down Expand Up @@ -88,7 +89,8 @@ public static SubPartitioner create(
return new SubPartitioner(factor, hasher);
}

SubPartitioner(final int factor, final Function<Bytes, Integer> hasher) {
@VisibleForTesting
public SubPartitioner(final int factor, final Function<Bytes, Integer> hasher) {
this.factor = factor;
this.hasher = hasher;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ private static RemoteKVTable<?> createCassandra(
// TODO(agavra): write the actual remote partition count into cassandra
final OptionalInt actualRemoteCount = OptionalInt.empty();


final TablePartitioner<Bytes, Integer> partitioner =
params.schemaType() == SchemaTypes.KVSchema.FACT
? TablePartitioner.defaultPartitioner()
Expand Down
Loading

0 comments on commit 3a9153f

Please sign in to comment.