Skip to content

Commit

Permalink
Fix flat map writer's getBufferedBytes
Browse files Browse the repository at this point in the history
  • Loading branch information
sdruzkin authored and ARUNACHALAM THIRUPATHI committed Jun 1, 2022
1 parent 3131bea commit 51f5cc1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -378,11 +378,10 @@ public List<StreamDataOutput> getIndexStreams(Optional<List<? extends StreamChec
@Override
public long getBufferedBytes()
{
long bufferedBytes = 0;
long bufferedBytes = presentStream.getBufferedBytes();
for (MapFlatValueWriter valueWriter : valueWriters) {
bufferedBytes += valueWriter.getValueWriter().getBufferedBytes();
bufferedBytes += valueWriter.getBufferedBytes();
}
// TODO Implement me
return bufferedBytes;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@ public List<StreamDataOutput> getIndexStreams()
return valueWriter.getIndexStreams(Optional.of(inMapStream.getCheckpoints()));
}

public long getBufferedBytes()
{
return valueWriter.getBufferedBytes() + inMapStream.getBufferedBytes();
}

public void close()
{
inMapStream.close();
Expand Down

0 comments on commit 51f5cc1

Please sign in to comment.