Skip to content

Commit

Permalink
Fixes #176 (#183)
Browse files Browse the repository at this point in the history
Co-authored-by: ashamahadev <[email protected]>
  • Loading branch information
ashamw and ashamahadev committed Sep 19, 2023
1 parent 35b23cd commit ef8f0ff
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public int read(ByteBuffer dst) throws IOException {
.range(range));

byte[] s3Bytes = responseBytes.asByteArray();
logger.info("read {} bytes from {}", s3Bytes.length, key);
logger.debug("read {} bytes from {}", s3Bytes.length, key);

delegator.position(delegator.position() + s3Bytes.length);
logger.debug("new position of {} is: {}", key, delegator.position());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public S3ReadAheadByteChannel(S3Path path, int maxFragmentSize, int maxNumberFra
if (maxNumberFragments < 2)
throw new IllegalArgumentException("maxNumberFragments must be >= 2");

logger.info("max read ahead fragments '{}' with size '{}' bytes", maxNumberFragments, maxFragmentSize);
logger.debug("max read ahead fragments '{}' with size '{}' bytes", maxNumberFragments, maxFragmentSize);
this.client = client;
this.path = path;
this.delegator = delegator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ private S3SeekableByteChannel(S3Path s3Path, S3AsyncClient s3Client, long startA

S3NioSpiConfiguration config = new S3NioSpiConfiguration();
if (options.contains(StandardOpenOption.WRITE)) {
LOGGER.info("using S3WritableByteChannel as write delegate for path '{}'", s3Path.toUri());
LOGGER.debug("using S3WritableByteChannel as write delegate for path '{}'", s3Path.toUri());
readDelegate = null;
writeDelegate = new S3WritableByteChannel(s3Path, s3Client, options, timeout, timeUnit);
position = 0L;
} else if (options.contains(StandardOpenOption.READ) || options.size() == 0) {
LOGGER.info("using S3ReadAheadByteChannel as read delegate for path '{}'", s3Path.toUri());
LOGGER.debug("using S3ReadAheadByteChannel as read delegate for path '{}'", s3Path.toUri());
readDelegate = new S3ReadAheadByteChannel(s3Path, config.getMaxFragmentSize(), config.getMaxFragmentNumber(), s3Client, this, timeout, timeUnit);
writeDelegate = null;
} else {
Expand Down

0 comments on commit ef8f0ff

Please sign in to comment.