Skip to content

Commit

Permalink
Remove System.out and some visibility cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
burqen committed Feb 18, 2019
1 parent 84e1a2e commit 7686b94
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Expand Up @@ -92,7 +92,7 @@ public void add( KEY key, VALUE value ) throws IOException
monitor.entryAdded( entrySize );
}

public void doneAdding() throws IOException
void doneAdding() throws IOException
{
if ( !bufferedEntries.isEmpty() )
{
Expand All @@ -113,7 +113,6 @@ private void flushAndResetBuffer() throws IOException
bufferedEntries.sortThis( comparator );
ByteArrayPageCursor pageCursor = new ByteArrayPageCursor( byteBuffer );

System.out.println( "Writing block at " + storeChannel.position() );
// Header
pageCursor.putLong( bufferedEntries.size() );

Expand Down
Expand Up @@ -47,7 +47,7 @@ public class BlockStorageReader<KEY,VALUE> implements Closeable
this.blockSize = blockSize;
}

public BlockReader<KEY,VALUE> nextBlock() throws IOException
BlockReader<KEY,VALUE> nextBlock() throws IOException
{
long position = channel.position();
if ( position >= channel.size() )
Expand All @@ -58,7 +58,6 @@ public BlockReader<KEY,VALUE> nextBlock() throws IOException
blockChannel.position( position );
channel.position( position + blockSize );
PageCursor pageCursor = new ReadableChannelPageCursor( new ReadAheadChannel<>( blockChannel ) );
System.out.println( "Opening block reader at " + position );
return new BlockReader<>( pageCursor, layout );
}

Expand Down
Expand Up @@ -58,7 +58,7 @@ void shouldCreateAndCloseTheBlockFile() throws IOException
// given
SimpleLongLayout layout = layout( 0 );
assertFalse( fileSystem.fileExists( file ) );
try ( BlockStorage<MutableLong,MutableLong> storage = new BlockStorage<>( layout, BUFFER_FACTORY, fileSystem, file, NO_MONITOR, 100 ) )
try ( BlockStorage<MutableLong,MutableLong> ignored = new BlockStorage<>( layout, BUFFER_FACTORY, fileSystem, file, NO_MONITOR, 100 ) )
{
// then
assertTrue( fileSystem.fileExists( file ) );
Expand Down Expand Up @@ -191,7 +191,9 @@ private void sortExpectedBlock( List<Pair<MutableLong,MutableLong>> currentExpec
currentExpected.sort( comparingLong( p -> p.getKey().longValue() ) );
}

private void assertContents( SimpleLongLayout layout, BlockStorage<MutableLong,MutableLong> storage, List<Pair<MutableLong,MutableLong>>... expectedBlocks )
@SafeVarargs
private final void assertContents( SimpleLongLayout layout, BlockStorage<MutableLong,MutableLong> storage,
List<Pair<MutableLong,MutableLong>>... expectedBlocks )
throws IOException
{
try ( BlockStorageReader<MutableLong,MutableLong> reader = storage.reader() )
Expand Down

0 comments on commit 7686b94

Please sign in to comment.