Skip to content

Commit

Permalink
Remove unused BitSet param
Browse files Browse the repository at this point in the history
  • Loading branch information
niloc132 committed Jun 25, 2024
1 parent d327ca2 commit 709d966
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ public BarrageStreamReader(final LongConsumer deserializeTmConsumer) {

@Override
public BarrageMessage safelyParseFrom(final StreamReaderOptions options,
final BitSet expectedColumns,
final ChunkType[] columnChunkTypes,
final Class<?>[] columnTypes,
final Class<?>[] componentTypes,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,13 @@ public interface StreamReader {
* Converts an InputStream to a BarrageMessage in the context of the provided parameters.
*
* @param options the options related to parsing this message
* @param expectedColumns the columns expected to appear in the stream, null implies all columns
* @param columnChunkTypes the types to use for each column chunk
* @param columnTypes the actual type for the column
* @param componentTypes the actual component type for the column
* @param stream the input stream that holds the message to be parsed
* @return a BarrageMessage filled out by the stream's payload
*/
BarrageMessage safelyParseFrom(final StreamReaderOptions options,
BitSet expectedColumns,
ChunkType[] columnChunkTypes,
Class<?>[] columnTypes,
Class<?>[] componentTypes,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ public class BarrageSnapshotImpl extends ReferenceCountedLivenessNode implements
private final BarrageTable resultTable;
private final CompletableFuture<Table> future;

private volatile BitSet expectedColumns;

private volatile int connected = 1;
private static final AtomicIntegerFieldUpdater<BarrageSnapshotImpl> CONNECTED_UPDATER =
AtomicIntegerFieldUpdater.newUpdater(BarrageSnapshotImpl.class, "connected");
Expand Down Expand Up @@ -209,9 +207,6 @@ public Future<Table> partialTable(
alreadyUsed = true;
}

// store this for streamreader parser
expectedColumns = columns;

// Send the snapshot request:
observer.onNext(FlightData.newBuilder()
.setAppMetadata(ByteStringAccess.wrap(makeRequestInternal(viewport, columns, reverseViewport, options)))
Expand Down Expand Up @@ -355,8 +350,7 @@ public InputStream stream(final BarrageMessage value) {

@Override
public BarrageMessage parse(final InputStream stream) {
return streamReader.safelyParseFrom(options, expectedColumns, columnChunkTypes, columnTypes, componentTypes,
stream);
return streamReader.safelyParseFrom(options, columnChunkTypes, columnTypes, componentTypes, stream);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ public InputStream stream(final BarrageMessage value) {

@Override
public BarrageMessage parse(final InputStream stream) {
return streamReader.safelyParseFrom(options, null, columnChunkTypes, columnTypes, componentTypes, stream);
return streamReader.safelyParseFrom(options, columnChunkTypes, columnTypes, componentTypes, stream);
}
}

Expand Down

0 comments on commit 709d966

Please sign in to comment.